
On May 21, 2010, at 10:57 AM, Timur Tabi wrote:
On Fri, May 21, 2010 at 4:18 AM, Kumar Gala galak@kernel.crashing.org wrote:
+#ifdef CONFIG_FSL_NGPIXIS +#include "ngpixis.h" +#define PIXIS_VSYSCLK0 offsetof(struct ngpixis, sclk[0]) +#define PIXIS_VSYSCLK1 offsetof(struct ngpixis, sclk[1]) +#define PIXIS_VSYSCLK2 offsetof(struct ngpixis, sclk[2]) +#define PIXIS_VDDRCLK0 offsetof(struct ngpixis, dclk[0]) +#define PIXIS_VDDRCLK1 offsetof(struct ngpixis, dclk[1]) +#define PIXIS_VDDRCLK2 offsetof(struct ngpixis, dclk[2]) +#endif
Yuck. I specifically created the ngpixis_t structure because Wolfgang objected to the use of macros for offsets.
But I understand why you did it. It's the easiest way to maintain compatibility between pixis and ngpixis.
Wolfgang, is this an issue?
The other option is have 3 different structs:
On p2020: #define PIXIS_VSYSCLK0 offsetof(struct ngpixis, sclk[0]) on 8572: #define PIXIS_VSYSCLK0 0x1C on 8536: #define PIXIS_VSYSCLK0 0x1A
- k