[U-Boot-Users] [PATCH] PPC-44x: Add Open Firmware support to AMCC Yosemite

Stefan Roese sr at denx.de
Tue Apr 29 11:56:29 CEST 2008


Hi Ira,

On Tuesday 29 April 2008, Ira Snyder wrote:
> This is my first patch, so any suggestions would be welcome.

Thanks for your contribution. Its actually quite good for the first time. :)

> I have an AMCC Yosemite board, which I recently updated to use the
> recent ARCH=powerpc work from mainline Linux. Without this patch, trying
> to boot from a uImage does not work. The kernel panics while trying to
> parse the device tree blob. Note that a cuImage works fine previous to
> this patch.
>
> Also, I noticed that when I started booting with a uImage and dtb, that
> eth0 had a MAC address of 00:00:00:00:00:00. Adding
> #define CONFIG_HAS_ETH0 1 fixed this issue, by setting the MAC address
> via the eth0addr variable in U-Boot.

This should be "ethaddr" instead of "eth0addr".

> I tested the following setups:
> 1) Old ARCH=ppc 2.6.13 kernel
> 2) New ARCH=powerpc 2.6.26rc0 kernel (cuImage)
> 3) New ARCH=powerpc 2.6.26rc0 kernel (uImage + dtb)
>
> I ran MAKEALL both with and without the patch. The only changes in output
> were a ~20kB increase in image size for the yellowstone and yosemite
> boards.

Thanks. Please find some comments below.

> Thanks for all of the great work.
> Ira
>
> --
>
> From d76d560b1f61126c63320cec18d5b436f4bb10c0 Mon Sep 17 00:00:00 2001
> From: Ira W. Snyder <iws at ovro.caltech.edu>
> Date: Sat, 26 Apr 2008 16:06:26 -0700
> Subject: [PATCH] PPC-44x: Add Open Firmware support to AMCC Yosemite

I find the subject a little misleading. "Open Firmware" support sounds a 
little too much. How about:

"ppc4xx: Add device tree support to AMCC Yosemite"

> Add support for booting with a device tree blob. This is needed to boot
> ARCH=powerpc kernels. Also add support for setting the eth0 mac address
> via the eth0addr variable.

"ethaddr".

> Signed-off-by: Ira W. Snyder <iws at ovro.caltech.edu>
> ---
>  board/amcc/yosemite/yosemite.c |   11 +++++++++++
>  include/configs/yosemite.h     |    9 +++++++++
>  2 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/board/amcc/yosemite/yosemite.c
> b/board/amcc/yosemite/yosemite.c index 6ec922a..fa610c3 100644
> --- a/board/amcc/yosemite/yosemite.c
> +++ b/board/amcc/yosemite/yosemite.c
> @@ -26,6 +26,9 @@
>  #include <asm/processor.h>
>  #include <asm/io.h>
>  #include <spd_sdram.h>
> +#if defined(CONFIG_OF_LIBFDT)
> +	#include <libfdt.h>
> +#endif

Please add this header unconditionally (without indentation).

>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -554,3 +557,11 @@ void board_reset(void)
>  	/* give reset to BCSR */
>  	*(unsigned char *)(CFG_BCSR_BASE | 0x06) = 0x09;
>  }
> +
> +#if defined(CONFIG_OF_BOARD_SETUP)
> +void ft_board_setup(void *blob, bd_t *bd)
> +{
> +	ft_cpu_setup(blob, bd);
> +

Why didn't you add the NOR FLASH mapping fixup as done on Sequoia etc? Please 
add it here.

> +}
> +#endif
> diff --git a/include/configs/yosemite.h b/include/configs/yosemite.h
> index c9323f6..7dcd4e6 100644
> --- a/include/configs/yosemite.h
> +++ b/include/configs/yosemite.h
> @@ -141,6 +141,14 @@
>
>
>  /*-----------------------------------------------------------------------
> + * Open Firmware (Linux-2.6.26+)

I would prefer "Device tree support" here too.

> + *----------------------------------------------------------------------*/
> +
> +/* pass open firmware flat tree */
> +#define CONFIG_OF_LIBFDT	1
> +#define CONFIG_OF_BOARD_SETUP	1
> +
> +/*-----------------------------------------------------------------------
>   * I2C
>   *----------------------------------------------------------------------*/
>  #define CONFIG_HARD_I2C		1	    /* I2C with hardware support	*/
> @@ -227,6 +235,7 @@
>  #define CONFIG_MII		1	/* MII PHY management		*/
>  #define CONFIG_NET_MULTI        1	/* required for netconsole      */
>  #define CONFIG_PHY1_ADDR        3
> +#define CONFIG_HAS_ETH0		1	/* add support for "eth0addr"	*/
>  #define CONFIG_HAS_ETH1		1	/* add support for "eth1addr"	*/
>  #define CONFIG_PHY_ADDR		1	/* PHY address, See schematics	*/

Please address the issues above and resend.

Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================




More information about the U-Boot mailing list