2010/11/16 Stefano Babic <[email protected]>: > I would like to propose a structure to better clarify the internal > layout. Let me explain and check if this can be suitable for you. We > could use a union to define the different layouts for the fuse banks, > such as (the example is for the i.MX51): > > typedef union fuse_bank { > struct { > u32 fuse_lock; > u32 osc_jtag; > u32 reserved0; > u32 bt > ..... > u32 mac_addr[6]; > .... > u32 reserved_filled[..]; /* to fill the 0x80-0xFF*/ > }; > /* Now the layout for the other fuse banks */ > struct { > .... > }; > /* > * If we do not want to set now the layout, we can distinguish > * only between real register and reserved addresses > * as you already did > */ > struct { > u32 fuse_regs[0x20]; > u32 reserved[0xe0]; > } > } > > And in your structure you can have something like this: > > .... > u32 scs3; > u32 res0[0x1f1]; > fuse_bank fuses[4]; > } > > You do not need to set the layout for the fuse banks 1-3, if you do not > want, but the structure is prepared if someone else will add functions > to manage the fuses. > > What do you think about it ?
It's OK, I think. But there will change a lot of code for the platform other than i.mx51. In fact, the rule of my every commit patch is to solve one problem or add one feature with the minimum code change to the exist code base. If need some code clean-up or restructure, then use another commit to fix it. This will give us a clear track of the code change. If you insist on changing it in this patch, I will follow your rule to change it. BR, Jason > > Best regards, > Stefano Babic > > -- > ===================================================================== > DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: [email protected] > ===================================================================== > _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

