[PATCH 02/19] OpenRISC: Device tree

Arnd Bergmann arnd at arndb.de
Mon Jun 20 03:19:27 EST 2011


On Sunday 19 June 2011 13:43:28 Jonas Bonn wrote:
> 
> The OpenRISC architecture uses the device tree infrastructure for the
> platform description.  This is currently limited to having a device tree
> built into the kernel, but work is underway within the OpenRISC project
> to define how this device tree blob should be passed into the kernel from
> an external resource.
> 
> Signed-off-by: Jonas Bonn <jonas at southpole.se>

Best take devicetree-discuss at lists.ozlabs.org when posting this again.

> ---
>  arch/openrisc/boot/dts/aac.dts    |  290 +++++++++++++++++++++++++++++++++++++
>  arch/openrisc/boot/dts/atlys.dts  |   94 ++++++++++++
>  arch/openrisc/boot/dts/system.dts |   88 +++++++++++
>  arch/openrisc/include/asm/prom.h  |   92 ++++++++++++
>  arch/openrisc/kernel/prom.c       |  109 ++++++++++++++
>  5 files changed, 673 insertions(+), 0 deletions(-)
>  create mode 100644 arch/openrisc/boot/dts/aac.dts
>  create mode 100644 arch/openrisc/boot/dts/atlys.dts
>  create mode 100644 arch/openrisc/boot/dts/system.dts
>  create mode 100644 arch/openrisc/include/asm/prom.h
>  create mode 100644 arch/openrisc/kernel/prom.c
> 
> diff --git a/arch/openrisc/boot/dts/aac.dts b/arch/openrisc/boot/dts/aac.dts
> new file mode 100644
> index 0000000..d9e724f
> --- /dev/null
> +++ b/arch/openrisc/boot/dts/aac.dts
> @@ -0,0 +1,290 @@
> +/dts-v1/;
> +/ {
> +	compatible = "orsoc,development-board";
> +	#size-cells = <1>;
> +	#address-cells = <1>;
> +
> +	chosen {
> +		bootargs = "console=uart,mmio,0x90000000,115200 lpj=200000 debug";
> +/*		bootargs = "console=uart,mmio,0x90000000,115200 lpj=200000 root=/dev/nfs rw nfsroot=172.30.0.1:/home/jonas/local/opencores/linux-2.6/arch/or32/support/rootfs,rw,nolock ip=172.30.0.2::::::"; */
> +	};

I think having a hardcoded command line here is not really helpful, this
should normally be filled by the bootloader. The console settings should
probably be probed from the device tree, we have good existing bindings
for serial ports.

For the lpj value, I would also recommend passing the clock frequency
in the device tree in a generic form, so you can compute the delay
loop settings from it.

	Arnd


More information about the devicetree-discuss mailing list