
26 Apr
2011
26 Apr
'11
9:20 a.m.
Hi Wolfgang,
2011/4/26 Wolfgang Denk wd@denx.de:
Dear Macpaul Lin,
+#define FTSDMC021_OFFSET_BANK7_BSR 0x2C /* External Bank Base/Size Reg 7 */
Lines too long. Please fix globally.
I think it is generally wrong to manually define these offsets here. You should use a C struct instead, and auto-generate the offsets if needed using the asm-offsets approach (see top level Makefile for details).
Since this is a patch send before in old times, I will fix it soon and send the next patch.
+#define FTSDMC021_BANK_SIZE_128M 0x7 +#define FTSDMC021_BANK_SIZE_256M 0x8 +#define FTSDMC021_BANK_SIZE_512M 0x9
Why don't you use a generic macro here, like
#define FTSDMC021_BANK_SIZE(sz) (ffs(x) - 21)
Thanks for your suggestion.
--
Best regards,
Macpaul Lin