
No comments?
On Sat, Jan 7, 2017 at 12:04 AM, Marty Plummer netz.kernel@gmail.com wrote:
Greetings,
So, out of a desire to learn (or simply pure masochism), I've taken it upon myself to work on mainlining support for a new arm SoC and board, which the vendor SDK only provides source for release 2010.06 (which I had to find via taobao since the vendor in question is not being nice in regards to providing gpl source code from their sdks, but this is besides the point).
Having already cobbled together devicetree files for the SoC which has allowed me to boot mainline linux from Linus' tree using the u-boot on the board, I figured I'd take a go at using devicetree in u-boot itself to describe the hardware. Asking about this on irc, I was pointed at the firefly-rk3288 as an example of how to do this. Referencing the source code and the datasheet in question, I started to wrap my head around bootrom, spl, u-boot, and their interactions, and began the task of defining the various system controller registers, using the rockhip code as a guide.
However, upon mentioning the structs on irc, I was asked by Marex to not use this method, instead using macros and hex offsets. At this point I've become a bit confused as to how I should proceed. The coding style guide[1] says one should use "a C structure to map out the registers in an I/O region", which appears to be what the rk3288 code does, but is at odds with Marex's request and instruction to use macros.
So, I'm asking the ml and whatever powers that be how I should proceed, as I'd really hate to write a bunch of code that has to be changed to such a degree that it may as well be discarded and started from scratch.
Regards, Marty Plummer