Dear Dirk, In message <[email protected]> you wrote: > > > Please provide proper C structs! > > Would you like to have a look to the code snippet visible in Matthias' > patch > > http://lists.denx.de/pipermail/u-boot/2009-May/052157.html > > ?
Done. > It's my understanding that what's in code > > writel(NET_GPMC_CONFIG1, &gpmc_cs5_base->config1); > > is what you want? I.e. as I understand it, the code is correct (we use It is only part of what I want to see. There are still deficiencies. Yes, we have a struct gpmc_csx, that's good. Note though that using such typedef's not in line with the Coding Style, which says: "It's a _mistake_ to use typedef for structures and pointers." Also, checkpatch.pl complains about this. The next problem is that the entries in these structs are declared as "unsigned int", which just happens to work by chance. "u32" would be more reliable. Finally, and this is what I really compalin about, is that there is no big structure which includes all the blocks that make up the CPU into one big structure (as it's done for example for PowerPC systems in the include/asm-ppc/*immap* files) - you still use code like gpmc_csx_t *gpmc_cs5_base = (gpmc_csx_t *)GPMC_CONFIG_CS5_BASE; to locate each of the individual C structs in the memory map; instead, onle one single pointer to the internal memory should be needed. > Sorry if I missed something, just correct then ;) Done. Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected] Winners never talk about glorious victories. That's because they're the ones who see what the battlefield looks like afterwards. It's only the losers who have glorious victories. - Terry Pratchett, _Small Gods_ _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

