[RFC PATCH 04/14] ARM: r1 DT mach id init

Grant Likely grant.likely at secretlab.ca
Thu Aug 19 06:56:57 EST 2010


On Wed, Aug 18, 2010 at 12:59 PM, Lorenzo Pieralisi
<lorenzo.pieralisi at arm.com> wrote:
> Device tree ARM machine desc has been allocated id 0xffffffff temporarily.
> This machine id should be passed in r1 upon kernel booting.
> Legacy code requires code stubs to update r1 accordingly when
> booting from legacy boot loaders that do not necessarily pass DT
> mach id on r1.
>
> This patch adds code in the dtb stub to automatically generate and move
> the required DT machine id into r1 before jumping to kernel code.
>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>

Fixed in test-devicetree.  You'll be able to drop this one.

> ---
>  arch/arm/boot/dt/dtb.S |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/boot/dt/dtb.S b/arch/arm/boot/dt/dtb.S
> index e678db2..7d56289 100644
> --- a/arch/arm/boot/dt/dtb.S
> +++ b/arch/arm/boot/dt/dtb.S
> @@ -35,6 +35,9 @@ setup_dtb:
>        cmp     r4, r5
>        blo     2b
>
> +       /* update r1 with DT id  */
> +       mvn     r1, #0x0
> +
>        b       zimage_start
>
>        .ltorg
> --
> 1.6.3.3
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.


More information about the devicetree-discuss mailing list