public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] PPC-44x: Add Open Firmware support to AMCC Yosemite
@ 2008-04-29  5:25 Ira Snyder
  2008-04-29  9:56 ` Stefan Roese
  0 siblings, 1 reply; 3+ messages in thread
From: Ira Snyder @ 2008-04-29  5:25 UTC (permalink / raw)
  To: u-boot

Hello U-Boot users,

This is my first patch, so any suggestions would be welcome.

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.

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 for all of the great work.
Ira

--

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] [PATCH] PPC-44x: Add Open Firmware support to AMCC Yosemite
  2008-04-29  5:25 [U-Boot-Users] [PATCH] PPC-44x: Add Open Firmware support to AMCC Yosemite Ira Snyder
@ 2008-04-29  9:56 ` Stefan Roese
  2008-04-29 18:18   ` [U-Boot-Users] [PATCH] ppc4xx: Add device tree " Ira Snyder
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2008-04-29  9:56 UTC (permalink / raw)
  To: u-boot

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@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@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
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot-Users] [PATCH] ppc4xx: Add device tree support to AMCC Yosemite
  2008-04-29  9:56 ` Stefan Roese
@ 2008-04-29 18:18   ` Ira Snyder
  0 siblings, 0 replies; 3+ messages in thread
From: Ira Snyder @ 2008-04-29 18:18 UTC (permalink / raw)
  To: u-boot

Hello Stefan, U-Boot users

I have made the changes that Stefan requested:
* Include headers unconditionally
* Change "eth0addr" to "ethaddr"
* Change "Open Firmware support" to "device tree support"
* Add NOR flash mapping fixup from Sequoia

I have re-tested the same three setups I tested earlier:
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 did not test the NOR flash mapping fixup, as I do not have any NOR
flash to test with. It is an exact copy of the Sequoia code, so I hope
it is correct.

Thanks for the comments.
Ira

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-29 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29  5:25 [U-Boot-Users] [PATCH] PPC-44x: Add Open Firmware support to AMCC Yosemite Ira Snyder
2008-04-29  9:56 ` Stefan Roese
2008-04-29 18:18   ` [U-Boot-Users] [PATCH] ppc4xx: Add device tree " Ira Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox