
Alessandro Rubini rubini@unipv.it 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