From patchwork Tue Apr 6 17:31:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laine Walker-Avina X-Patchwork-Id: 90812 X-Patchwork-Delegate: paul@pwsan.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o36HZqJs030284 for ; Tue, 6 Apr 2010 17:35:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756718Ab0DFRfu (ORCPT ); Tue, 6 Apr 2010 13:35:50 -0400 Received: from exprod7og115.obsmtp.com ([64.18.2.217]:44384 "HELO exprod7og115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756620Ab0DFRfu (ORCPT ); Tue, 6 Apr 2010 13:35:50 -0400 Received: from source ([204.130.249.21]) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKS7tw8xtslQXr57+LKHNTiA6bWKDB9cij@postini.com; Tue, 06 Apr 2010 10:35:50 PDT Received: from localhost.localdomain ([172.16.2.46]) by p21.roseville.pasco.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 6 Apr 2010 10:32:33 -0700 From: Laine Walker-Avina To: linux-omap@vger.kernel.org Cc: Laine Walker-Avina Subject: [PATCH v2 1/5] OMAP: Add in helper macros for the SDRAM timings Date: Tue, 6 Apr 2010 10:31:12 -0700 Message-Id: <1270575072-3768-1-git-send-email-lwalkera@ieee.org> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <20100406171713.GA24981@nokia.com> References: <20100406171713.GA24981@nokia.com> X-OriginalArrivalTime: 06 Apr 2010 17:32:33.0296 (UTC) FILETIME=[23F87900:01CAD5AF] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 06 Apr 2010 17:35:52 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h index 7b76f50..c74d1e7 100644 --- a/arch/arm/plat-omap/include/plat/sdrc.h +++ b/arch/arm/plat-omap/include/plat/sdrc.h @@ -124,6 +124,29 @@ struct omap_sdrc_params { u32 mr; }; +/* Helper macros and defines for the omap_sdrc_params registers */ +#define ACTIM_TRFC(a) (((a) & 0x1f) << 27) +#define ACTIM_TRC(a) (((a) & 0x1f) << 22) +#define ACTIM_TRAS(a) (((a) & 0xf) << 18) +#define ACTIM_TRP(a) (((a) & 0x3) << 15) +#define ACTIM_TRCD(a) (((a) & 0x3) << 12) +#define ACTIM_TRRD(a) (((a) & 0x3) << 9) +#define ACTIM_TDPL(a) (((a) & 0x3) << 6) +#define ACTIM_TDAL(a) (((a) & 0x1f) << 0) + +#define ACTIM_TWTR(a) (((a) & 0x3) << 16) +#define ACTIM_TCKE(a) (((a) & 0x7) << 12) +#define ACTIM_TXP(a) (((a) & 0x7) << 8) +#define ACTIM_TXSR(a) (((a) & 0xff) << 0) + +#define RFR_CTRL_ARCV(a) (((a) & 0xffff) << 8) +#define RFR_CTRL_ARE(a) (((a) & 0x3) << 0) + +#define MR_WBST(a) (((a) & 0x1) << 9) +#define MR_CASL(a) (((a) & 0x7) << 4) +#define MR_BL(a) (((a) & 0x7) << 0) + + void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, struct omap_sdrc_params *sdrc_cs1); int omap2_sdrc_get_params(unsigned long r,