From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Mon, 30 Nov 2009 00:15:26 +0100 Subject: [U-Boot] [PATCH V2 2/9] video: add amba-clcd prime-cell In-Reply-To: <20091129214419.GA12518@mail.gnudd.com> References: <20091129222444.2e454083@wker> <84aa128b71cbe6595dd5859c64a592b122cef723.1259185128.git.rubini@unip v.it> <20091129214419.GA12518@mail.gnudd.com> Message-ID: <20091130001526.20cf0b17@wker> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Alessandro Rubini wrote: ... > >> +#define CLCD_LBAS 0x00000014 > > > > CLCD_LBAS isn't used in the code, please remove it. > > I disagree for two reasons: the register exists in the logic block, > and the code is copied from a linux header (as noted in the file itself). > > Since the clcd block is not something designed for the nomadik but the > standard primecell, I don't think trimming its definition is useful; > other boards can benefit from the header being complete. I understand your arguments. If Wolfgang will not reject my pull request, I'm fine with it. Could you please use something like: struct clcd_regs { u32 tim0; u32 tim1; u32 tim2; u32 tim3; u32 ubas; u32 lbas; #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) u32 ienb; u32 cntl; #else /* * Someone rearranged these two registers on the Versatile * platform... */ u32 cntl; u32 ienb; #endif u32 stat; u32 intr; u32 ucur; u32 lcur; u32 res[0x74]; u32 pal; }; in the amba_clcd header? And then in the code something like: struct clcd_regs *regs; ... ... regs = (struct clcd_regs *)NOMADIK_CLCDC_BASE; ... writel(regval->tim0, ®s->tim0); ... Thanks, Anatolij