Dear Troy Kisky, [...]
> >> Why is there a union ? It looks to me like you just want to access the > >> same variable > >> with 2 naming strategies. > > > > That is correct. I can either pass it further into functions as the > > struct mxs_register_32 name_reg or I can directly access it as > > name_set/_clr/_tog . Works just fine. > > I never said it didn't work, obviously it does. > > > Best regards, > > Marek Vasut > > There may be code that you can point at that would make this useful, but > I have > a hard time envisioning it. The code I added, I know doesn't need a > union, and I bet most > of the other variable accesses don't need a union. That's why I asked if > you'd like > me to attempt to clean it up (always access thru struct, ie replace > name_set with name.set). No, I want to keep this as-is. Especially because the MX28 has the registers named exactly by this scheme. > I don't want to change the code I added to use this. Please do, I do not want a duplicit implementation of these register structures in the tree. > I can see a small advantage in consistency with the mx28. THe MX6 uses many IP blocks from MX28 -- APBH DMA, NAND, USB -- to name a few. Keeping mx28 and mx6 aligned is more than helpful. Best regards, Marek Vasut _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot