From e85e2fa85ec09a6fac2846d1d881d8737e2bbda9 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 4 Mar 2008 17:39:25 +0100 Subject: [PATCH 1/3] net: Print error message upon net usage when no ethernet-interface is found This patch fixes a problem seen on PPC4xx boards, when no MAC address is defined. Then no ethernet interface is available but a simple "tftp" command will return without any error message which is quite confusing. Signed-off-by: Stefan Roese --- net/eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index 62297abba..16a6dcbd8 100644 --- a/net/eth.c +++ b/net/eth.c @@ -441,8 +441,10 @@ int eth_init(bd_t *bis) { struct eth_device* old_current; - if (!eth_current) + if (!eth_current) { + puts ("No ethernet found.\n"); return -1; + } old_current = eth_current; do { From fc84a8495ac750f6b4adae81f8c4f100f65b6340 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Fri, 7 Mar 2008 08:01:43 +0100 Subject: [PATCH 2/3] ppc4xx: Sequoia: Add device tree (fdt) Linux booting default env variables Signed-off-by: Stefan Roese --- include/configs/sequoia.h | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/include/configs/sequoia.h b/include/configs/sequoia.h index cc910deb6..dfa8779bc 100644 --- a/include/configs/sequoia.h +++ b/include/configs/sequoia.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2006-2007 + * (C) Copyright 2006-2008 * Stefan Roese, DENX Software Engineering, sr@denx.de. * * (C) Copyright 2006 @@ -254,11 +254,13 @@ /* Setup some board specific values for the default environment variables */ #ifndef CONFIG_RAINIER #define CONFIG_HOSTNAME sequoia -#define CFG_BOOTFILE "bootfile=/tftpboot/sequoia/uImage\0" +#define CFG_BOOTFILE "bootfile=sequoia/uImage\0" +#define CFG_DTBFILE "fdt_file=sequoia/sequoia.dtb\0" #define CFG_ROOTPATH "rootpath=/opt/eldk/ppc_4xxFP\0" #else #define CONFIG_HOSTNAME rainier -#define CFG_BOOTFILE "bootfile=/tftpboot/rainier/uImage\0" +#define CFG_BOOTFILE "bootfile=rainier/uImage\0" +#define CFG_DTBFILE "fdt_file=rainier/rainier.dtb\0" #define CFG_ROOTPATH "rootpath=/opt/eldk/ppc_4xx\0" #endif @@ -273,12 +275,20 @@ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ ":${hostname}:${netdev}:off panic=1\0" \ "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ - "flash_nfs=run nfsargs addip addtty;" \ + "addmisc=setenv bootargs ${bootargs} mem=${mem}\0" \ + "flash_nfs=run nfsargs addip addtty addmisc;" \ "bootm ${kernel_addr}\0" \ - "flash_self=run ramargs addip addtty;" \ + "flash_self=run ramargs addip addtty addmisc;" \ "bootm ${kernel_addr} ${ramdisk_addr}\0" \ - "net_nfs=tftp 200000 ${bootfile};run nfsargs addip addtty;" \ - "bootm\0" \ + "net_nfs=tftp 200000 ${bootfile};" \ + "run nfsargs addip addtty addmisc;" \ + "bootm\0" \ + "fdt_file=sequoia/sequoia.dtb\0" \ + "fdt_addr=400000\0" \ + "net_nfs_fdt=tftp 200000 ${bootfile};" \ + "tftp ${fdt_addr} ${fdt_file};" \ + "run nfsargs addip addtty addmisc;" \ + "bootm 200000 - ${fdt_addr}\0" \ "kernel_addr=FC000000\0" \ "ramdisk_addr=FC180000\0" \ "load=tftp 200000 /tftpboot/${hostname}/u-boot.bin\0" \ From 772003e43957ee0c895abed7cd82cbe72820cbb8 Mon Sep 17 00:00:00 2001 From: Markus Brunner Date: Wed, 5 Mar 2008 21:38:12 +0100 Subject: [PATCH 3/3] fix taihu soft spi_read The taihu board used gpio_read_out_bit which reads the output register and not the pin state. Signed-off-by: Markus Brunner --- board/amcc/taihu/taihu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/amcc/taihu/taihu.c b/board/amcc/taihu/taihu.c index ea8367198..eedde597b 100644 --- a/board/amcc/taihu/taihu.c +++ b/board/amcc/taihu/taihu.c @@ -162,7 +162,7 @@ void spi_sda(int bit) unsigned char spi_read(void) { - return (unsigned char)gpio_read_out_bit(SPI_DIN_GPIO15); + return (unsigned char)gpio_read_in_bit(SPI_DIN_GPIO15); } void taihu_spi_chipsel(int cs)