From patchwork Tue Apr 6 16:51:04 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: 90806 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 o36H1tbT022467 for ; Tue, 6 Apr 2010 17:01:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757407Ab0DFRBy (ORCPT ); Tue, 6 Apr 2010 13:01:54 -0400 Received: from exprod7og119.obsmtp.com ([64.18.2.16]:44472 "HELO exprod7og119.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757089Ab0DFRBw (ORCPT ); Tue, 6 Apr 2010 13:01:52 -0400 Received: from source ([204.130.249.21]) by exprod7ob119.postini.com ([64.18.6.12]) with SMTP ID DSNKS7to/wnD9686U1lWbstMzufAXETapI14@postini.com; Tue, 06 Apr 2010 10:01:52 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 09:52:21 -0700 From: Laine Walker-Avina To: linux-omap@vger.kernel.org Cc: Laine Walker-Avina Subject: [PATCH 1/5] OMAP: Add in helper macros for the SDRAM timings Date: Tue, 6 Apr 2010 09:51:04 -0700 Message-Id: <1270572668-2336-2-git-send-email-lwalkera@ieee.org> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1270572668-2336-1-git-send-email-lwalkera@ieee.org> References: <1270572668-2336-1-git-send-email-lwalkera@ieee.org> X-OriginalArrivalTime: 06 Apr 2010 16:52:21.0281 (UTC) FILETIME=[864C3110:01CAD5A9] 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:01:59 +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,