[U-Boot] Porting u-boot to a new soc, unsure of standards to follow.

Marty Plummer netz.kernel at gmail.com
Sat Jan 7 07:04:13 CET 2017


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

[1] http://www.denx.de/wiki/U-Boot/CodingStyle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xC030918D.asc
Type: application/pgp-keys
Size: 3935 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170107/f8c4a0d0/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170107/f8c4a0d0/attachment.sig>


More information about the U-Boot mailing list