
On Wed, Mar 11, 2015 at 01:03:16PM -0300, Fabio Estevam wrote:
On Wed, Mar 11, 2015 at 10:55 AM, Pantelis Antoniou panto@antoniou-consulting.com wrote:
Although I agree with fixing this, I’m kinda scared about how fragile structs for describing hardware registers are.
Agreed!
But we’re stuck with it I guess.
Yes, it seems this is mandatory in U-boot.
Kernel does not have such requirement and the standard way there is to use (base + offset) for register accesses.
So this is one of those topics that long term, I'd like to change U-Boot for but it's both a giant change and something we need to do a lot of prep-work for still. The long ago argument for why U-Boot does things the way it does boils down to type checking. The kernel gets this I think with a combination of sparse and other preprocessor magic / checks.
We'll also need to migrate once device model work is farther along and people want more seriously to look at splitting out a runs-many-places U-Boot from a "must be board-centric, pretty much" SPL.