From: David Gibson <dwg@au1.ibm.com>
To: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [patch 1/4] cuimage for Bamboo board
Date: Sat, 15 Sep 2007 12:19:52 +1000 [thread overview]
Message-ID: <20070915021952.GD25414@localhost.localdomain> (raw)
In-Reply-To: <20070914185648.698807000@linux.vnet.ibm.com>
On Fri, Sep 14, 2007 at 01:54:11PM -0500, Josh Boyer wrote:
> Add a cuboot wrapper for the Bamboo board. This also removes some obsoleted
> linker declarations that have been moved into ops.h
>
> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>
Heh, well, I know I acked this already, but...
[snip]
> --- /dev/null
> +++ linux-2.6/arch/powerpc/boot/cuboot-bamboo.c
> @@ -0,0 +1,30 @@
> +/*
> + * Old U-boot compatibility for Ebony
Error in the comment here.
[snip]
> --- linux-2.6.orig/arch/powerpc/boot/bamboo.c
> +++ linux-2.6/arch/powerpc/boot/bamboo.c
> @@ -24,8 +24,7 @@
> #include "4xx.h"
> #include "44x.h"
>
> -extern char _dtb_start[];
> -extern char _dtb_end[];
> +static u8 *bamboo_mac0, *bamboo_mac1;
This additional handling of the MAC addresses should really also be
mentioned in the commit comment.
>
> static void bamboo_fixups(void)
> {
> @@ -34,12 +33,15 @@ static void bamboo_fixups(void)
> ibm440ep_fixup_clocks(sysclk, 11059200);
> ibm4xx_fixup_memsize();
> ibm4xx_quiesce_eth((u32 *)0xef600e00, (u32 *)0xef600f00);
> + dt_fixup_mac_addresses(bamboo_mac0, bamboo_mac1);
> }
>
> -void bamboo_init(void)
> +void bamboo_init(void *mac0, void *mac1)
> {
> platform_ops.fixups = bamboo_fixups;
> platform_ops.exit = ibm44x_dbcr_reset;
> + bamboo_mac0 = mac0;
> + bamboo_mac1 = mac1;
> ft_init(_dtb_start, 0, 32);
> serial_console_init();
> }
> --- linux-2.6.orig/arch/powerpc/boot/treeboot-bamboo.c
> +++ linux-2.6/arch/powerpc/boot/treeboot-bamboo.c
> @@ -12,16 +12,32 @@
> #include "ops.h"
> #include "stdio.h"
> #include "44x.h"
> -
> -extern char _end[];
> +#include "stdlib.h"
>
> BSS_STACK(4096);
>
> +#define PIBS_MAC0 0xfffc0400
> +#define PIBS_MAC1 0xfffc0500
> +char pibs_mac0[6];
> +char pibs_mac1[6];
> +
> +static void read_pibs_mac(void)
> +{
> + unsigned long long mac64;
> +
> + mac64 = strtoull((char *)PIBS_MAC0, 0, 16);
> + memcpy(&pibs_mac0, (char *)&mac64+2, 6);
> +
> + mac64 = strtoull((char *)PIBS_MAC1, 0, 16);
> + memcpy(&pibs_mac1, (char *)&mac64+2, 6);
> +}
> +
> void platform_init(void)
> {
> unsigned long end_of_ram = 0x8000000;
> unsigned long avail_ram = end_of_ram - (unsigned long)_end;
>
> simple_alloc_init(_end, avail_ram, 32, 64);
> - bamboo_init();
> + read_pibs_mac();
> + bamboo_init((u8 *)&pibs_mac0, (u8 *)&pibs_mac1);
> }
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2007-09-15 2:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-14 18:54 [patch 0/4] Small 4xx updates for 2.6.24 Josh Boyer
2007-09-14 18:54 ` [patch 1/4] cuimage for Bamboo board Josh Boyer
2007-09-15 2:19 ` David Gibson [this message]
2007-09-15 14:26 ` Josh Boyer
2007-09-14 18:54 ` [patch 2/4] Make partitions optional in physmap_of Josh Boyer
2007-09-15 2:21 ` David Gibson
2007-09-14 18:54 ` [patch 3/4] 4xx: Convert Walnut flash mappings to new binding Josh Boyer
2007-09-15 2:22 ` David Gibson
2007-09-15 14:25 ` Josh Boyer
2007-09-15 3:23 ` Stefan Roese
2007-09-15 14:26 ` Josh Boyer
2007-09-15 15:09 ` Wolfgang Denk
2007-09-15 17:35 ` Josh Boyer
2007-09-15 19:20 ` Segher Boessenkool
2007-09-17 2:03 ` David Gibson
2007-09-17 2:02 ` David Gibson
2007-09-14 18:54 ` [patch 4/4] 4xx: Convert Seqouia " Josh Boyer
2007-09-15 2:23 ` David Gibson
2007-09-15 3:32 ` Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070915021952.GD25414@localhost.localdomain \
--to=dwg@au1.ibm.com \
--cc=jwboyer@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.