root/trunk/patches/u-boot/0001-ixp-Support-for-NSLU2.patch
| Revision 1058, 18.3 kB (checked in by rwhitby, 2 years ago) |
|---|
-
u-boot/MAINTAINERS
old new 564 564 actux3 xscale 565 565 actux4 xscale 566 566 567 Rod Whitby <rod@whitby.id.au> 568 569 nslu2 xscale 570 567 571 ######################################################################### 568 572 # x86 Systems: # 569 573 # # -
u-boot/MAKEALL
old new 529 529 actux4 \ 530 530 ixdp425 \ 531 531 ixdpg425 \ 532 nslu2 \ 532 533 pdnb3 \ 533 534 scpu \ 534 535 " -
u-boot/Makefile
old new 2532 2532 ixdpg425_config : unconfig 2533 2533 @$(MKCONFIG) $(@:_config=) arm ixp ixdp425 2534 2534 2535 nslu2_config : unconfig 2536 @$(MKCONFIG) $(@:_config=) arm ixp nslu2 2537 2535 2538 lubbock_config : unconfig 2536 2539 @$(MKCONFIG) $(@:_config=) arm pxa lubbock 2537 2540 -
/dev/null
old new 1 # 2 # (C) Copyright 2008 3 # Rod Whitby <rod@whitby.id.au> 4 # 5 # (C) Copyright 2000-2006 6 # Wolfgang Denk, DENX Software Engineering, wd@denx.de. 7 # 8 # See file CREDITS for list of people who contributed to this 9 # project. 10 # 11 # This program is free software; you can redistribute it and/or 12 # modify it under the terms of the GNU General Public License as 13 # published by the Free Software Foundation; either version 2 of 14 # the License, or (at your option) any later version. 15 # 16 # This program is distributed in the hope that it will be useful, 17 # but WITHOUT ANY WARRANTY; without even the implied warranty of 18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 # GNU General Public License for more details. 20 # 21 # You should have received a copy of the GNU General Public License 22 # along with this program; if not, write to the Free Software 23 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, 24 # MA 02111-1307 USA 25 # 26 27 include $(TOPDIR)/config.mk 28 29 LIB = $(obj)lib$(BOARD).a 30 31 COBJS := nslu2.o load_sernum_ethaddr.o 32 33 SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) 34 OBJS := $(addprefix $(obj),$(COBJS)) 35 SOBJS := $(addprefix $(obj),$(SOBJS)) 36 37 $(LIB): $(obj).depend $(OBJS) 38 $(AR) $(ARFLAGS) $@ $(OBJS) 39 40 clean: 41 rm -f $(SOBJS) $(OBJS) 42 43 distclean: clean 44 rm -f $(LIB) core *.bak .depend 45 46 ######################################################################### 47 48 # defines $(obj).depend target 49 include $(SRCTREE)/rules.mk 50 51 sinclude $(obj).depend 52 53 ######################################################################### -
/dev/null
old new -
/dev/null
old new 1 /* 2 * (C) Copyright 2008 3 * Rod Whitby <rod@whitby.id.au> 4 * 5 * (C) Copyright 2000, 2001, 2002 6 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 7 * 8 * See file CREDITS for list of people who contributed to this 9 * project. 10 * 11 * This program is free software; you can redistribute it and/or 12 * modify it under the terms of the GNU General Public License as 13 * published by the Free Software Foundation; either version 2 of 14 * the License, or (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 24 * MA 02111-1307 USA 25 */ 26 27 #include <common.h> 28 29 /*----------------------------------------------------------------------- 30 * Linksys NSLU2 RedBoot Trailer Block: 31 * 32 * If we boot from RAM on a system which still contains the original 33 * RedBoot bootloader, check if the trailer signature exists and save 34 * the MAC address information it contains. 35 * 36 * 0x3ffb0: six byte binary mac address 37 * 0x3fff8: ' sErCoMm' 38 */ 39 40 void load_sernum_ethaddr (void) 41 { 42 unsigned char *hwi; 43 unsigned char ethaddr[19]; /* 6 x "%02X", + 1 */ 44 unsigned short ih, ie; 45 46 /* Check for signature at the end of RedBoot partition */ 47 /* If RedBoot has been replaced, this will not exist. */ 48 hwi = (unsigned char *)(CFG_FLASH_BASE + CFG_SERCOMM_OFFSET); 49 if (strncmp((char *)hwi, " sErCoMm", 8)) { 50 return; 51 } 52 53 hwi = (unsigned char *)(CFG_FLASH_BASE + CFG_ETHADDR_OFFSET); 54 ie = 0; 55 56 /* copy MAC address */ 57 for (ih = 0; ih < 6; ih++) { 58 sprintf((char *)ðaddr[ie], "%02X:", hwi[ih]); 59 ie += 3; 60 } 61 ethaddr[--ie] = '\0'; 62 63 /* set ethaddr if not yet defined */ 64 if (getenv("ethaddr") == NULL) { 65 setenv ((char *)"ethaddr", (char *)ethaddr); 66 } 67 } -
/dev/null
old new 1 /* 2 * (C) Copyright 2008 3 * Rod Whitby <rod@whitby.id.au> 4 * 5 * (C) Copyright 2006 6 * Stefan Roese, DENX Software Engineering, sr@denx.de. 7 * 8 * (C) Copyright 2002 9 * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net 10 * 11 * (C) Copyright 2002 12 * Sysgo Real-Time Solutions, GmbH <www.elinos.com> 13 * Marius Groeger <mgroeger@sysgo.de> 14 * 15 * See file CREDITS for list of people who contributed to this 16 * project. 17 * 18 * This program is free software; you can redistribute it and/or 19 * modify it under the terms of the GNU General Public License as 20 * published by the Free Software Foundation; either version 2 of 21 * the License, or (at your option) any later version. 22 * 23 * This program is distributed in the hope that it will be useful, 24 * but WITHOUT ANY WARRANTY; without even the implied warranty of 25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 * GNU General Public License for more details. 27 * 28 * You should have received a copy of the GNU General Public License 29 * along with this program; if not, write to the Free Software 30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 31 * MA 02111-1307 USA 32 */ 33 34 #include <common.h> 35 #include <command.h> 36 #include <malloc.h> 37 #include <asm/arch/ixp425.h> 38 39 DECLARE_GLOBAL_DATA_PTR; 40 41 /* 42 * Miscelaneous platform dependent initialisations 43 */ 44 int board_init (void) 45 { 46 /* arch number of NSLU2 */ 47 gd->bd->bi_arch_number = MACH_TYPE_NSLU2; 48 49 /* adress of boot parameters */ 50 gd->bd->bi_boot_params = 0x00000100; 51 52 /* 53 * Setup GPIO's for PCI interrupts 54 */ 55 GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTA_N); 56 GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTA_N); 57 GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTB_N); 58 GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTB_N); 59 GPIO_OUTPUT_DISABLE(CFG_GPIO_PCI_INTC_N); 60 GPIO_INT_ACT_LOW_SET(CFG_GPIO_PCI_INTC_N); 61 62 /* 63 * Setup GPIO's for 33MHz clock output 64 */ 65 *IXP425_GPIO_GPCLKR = 0x01FF01FF; 66 GPIO_OUTPUT_ENABLE(CFG_GPIO_PCI_CLK); 67 GPIO_OUTPUT_ENABLE(CFG_GPIO_EXTBUS_CLK); 68 69 return 0; 70 } 71 72 /* 73 * Check Board Identity 74 */ 75 int checkboard(void) 76 { 77 char *s = getenv("serial#"); 78 79 puts("Board: NSLU2 - Linksys NSLU2"); 80 81 if (s != NULL) { 82 puts(", serial# "); 83 puts(s); 84 } 85 putc('\n'); 86 87 return (0); 88 } 89 90 int dram_init (void) 91 { 92 gd->bd->bi_dram[0].start = PHYS_SDRAM_1; 93 gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; 94 95 return (0); 96 } -
/dev/null
old new 1 /* 2 * (C) Copyright 2000 3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 4 * 5 * See file CREDITS for list of people who contributed to this 6 * project. 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License as 10 * published by the Free Software Foundation; either version 2 of 11 * the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 21 * MA 02111-1307 USA 22 */ 23 24 OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm", "elf32-bigarm") 25 OUTPUT_ARCH(arm) 26 ENTRY(_start) 27 SECTIONS 28 { 29 . = 0x00000000; 30 31 . = ALIGN(4); 32 .text : 33 { 34 cpu/ixp/start.o (.text) 35 *(.text) 36 } 37 38 . = ALIGN(4); 39 .rodata : { *(.rodata) } 40 41 . = ALIGN(4); 42 .data : { *(.data) } 43 44 . = ALIGN(4); 45 .got : { *(.got) } 46 47 . = .; 48 __u_boot_cmd_start = .; 49 .u_boot_cmd : { *(.u_boot_cmd) } 50 __u_boot_cmd_end = .; 51 52 . = ALIGN(4); 53 __bss_start = .; 54 .bss (NOLOAD) : { *(.bss) } 55 _end = .; 56 } -
/dev/null
old new 1 /* 2 * (C) Copyright 2008 3 * Rod Whitby <rod@whitby.id.au> 4 * 5 * (C) Copyright 2005-2006 6 * Stefan Roese, DENX Software Engineering, sr@denx.de. 7 * 8 * (C) Copyright 2003 9 * Martijn de Gouw, Prodrive B.V., martijn.de.gouw@prodrive.nl 10 * 11 * Configuation settings for the NSLU2 board. 12 * 13 * See file CREDITS for list of people who contributed to this 14 * project. 15 * 16 * This program is free software; you can redistribute it and/or 17 * modify it under the terms of the GNU General Public License as 18 * published by the Free Software Foundation; either version 2 of 19 * the License, or (at your option) any later version. 20 * 21 * This program is distributed in the hope that it will be useful, 22 * but WITHOUT ANY WARRANTY; without even the implied warranty of 23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 * GNU General Public License for more details. 25 * 26 * You should have received a copy of the GNU General Public License 27 * along with this program; if not, write to the Free Software 28 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 29 * MA 02111-1307 USA 30 */ 31 32 #ifndef __CONFIG_H 33 #define __CONFIG_H 34 35 /* 36 * High Level Configuration Options (easy to change) 37 */ 38 #define CONFIG_IXP425 1 /* This is an IXP425 CPU */ 39 #define CONFIG_NSLU2 1 /* on a Linksys NSLU2 Board */ 40 41 #define CONFIG_DISPLAY_CPUINFO 1 /* display cpu info (and speed) */ 42 #define CONFIG_DISPLAY_BOARDINFO 1 /* display board info */ 43 44 /* 45 * Serial Console (soldering skills required) 46 */ 47 #define CONFIG_BAUDRATE 115200 48 #define CFG_IXP425_CONSOLE IXP425_UART1 /* we use UART1 for console */ 49 50 /* 51 * Network Console (no hardware modifications required) 52 */ 53 #define CONFIG_NETCONSOLE 1 /* UDP port 6666 on dhcp server */ 54 #define CFG_CONSOLE_IS_IN_ENV 1 /* Allow console to be changed */ 55 56 /* 57 * Boot Delay 58 */ 59 #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ 60 #define CONFIG_ZERO_BOOTDELAY_CHECK 1 /* check for keypress on bootdelay==0 */ 61 62 /* 63 * Autoboot Command 64 */ 65 #define CONFIG_BOOTCOMMAND "echo;" 66 #undef CONFIG_BOOTARGS 67 68 /* 69 * Pre-boot Commands 70 */ 71 #define CONFIG_PREBOOT "run setncip" 72 73 /* 74 * Monitor Functions 75 */ 76 #include <config_cmd_default.h> 77 78 #define CONFIG_CMD_DHCP 79 #define CONFIG_CMD_ELF 80 #define CONFIG_CMD_MII 81 #define CONFIG_CMD_NET 82 #define CONFIG_CMD_PING 83 84 /* 85 * Ethernet (requires IxNpeMicrocode.c from Intel IXP4xx NPE Microcode package) 86 */ 87 #define CONFIG_IXP4XX_NPE 1 /* include IXP4xx NPE support */ 88 #define CONFIG_PHY_ADDR 1 /* NPE0 PHY address */ 89 #define CONFIG_MII 1 /* MII PHY management */ 90 #define CONFIG_NET_MULTI 1 /* Required for netconsole support */ 91 #define CFG_RX_ETH_BUFFER 16 /* Number of ethernet rx buffers & descriptors */ 92 93 /* 94 * DHCP Advanced Options 95 */ 96 #define CONFIG_BOOTP_SUBNETMASK 1 97 #define CONFIG_BOOTP_GATEWAY 1 98 #define CONFIG_BOOTP_HOSTNAME 1 99 #define CONFIG_BOOTP_NISDOMAIN 1 100 #define CONFIG_BOOTP_BOOTPATH 1 101 #define CONFIG_BOOTP_BOOTFILESIZE 1 102 #define CONFIG_BOOTP_DNS 1 103 #define CONFIG_BOOTP_SEND_HOSTNAME 1 104 105 /* 106 * Vendor Parameter Protection 107 */ 108 #define CONFIG_ENV_OVERWRITE 1 /* Allow changing of the MAC address */ 109 110 /* 111 * Default Environment 112 */ 113 #define CONFIG_EXTRA_ENV_SETTINGS \ 114 "hostname=nslu2\0" \ 115 "setncip=setenv autoload no;dhcp;setenv autoload;" \ 116 "setenv ncip ${serverip}\0" \ 117 "setnc=setenv stdin nc;setenv stdout nc;setenv stderr nc\0" \ 118 "setser=setenv stdin serial;setenv stdout serial;" \ 119 "setenv stderr serial\0" \ 120 "bootfile=/tftpboot/nslu2/uImage\0" \ 121 "rootpath=/tftpboot/nslu2/rootfs\0" \ 122 "nfsargs=setenv bootargs root=/dev/nfs rw " \ 123 "nfsroot=${serverip}:${rootpath}\0" \ 124 "addip=setenv bootargs ${bootargs} " \ 125 "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}" \ 126 ":${hostname}:eth0:off panic=1\0" \ 127 "addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\ 128 "net_nfs=tftp 10000 ${bootfile};run nfsargs addip addtty;" \ 129 "bootm\0" \ 130 "" 131 132 /* 133 * Configuration Settings 134 */ 135 #define CFG_LONGHELP 1 /* undef to save memory */ 136 #define CFG_PROMPT "=> " /* Monitor Command Prompt */ 137 138 #define CFG_CBSIZE 256 /* Console I/O Buffer Size */ 139 #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */ 140 #define CFG_MAXARGS 16 /* max number of command args */ 141 #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ 142 143 #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } 144 145 #define CFG_MEMTEST_START 0x00400000 /* memtest works on */ 146 #define CFG_MEMTEST_END 0x00800000 /* 4 ... 8 MB in DRAM */ 147 148 #define CFG_LOAD_ADDR 0x00010000 /* default load address */ 149 150 #define CFG_MONITOR_BASE CFG_FLASH_BASE 151 #define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ 152 153 #define CFG_MALLOC_LEN (256 << 10) 154 155 #define CFG_FLASH_BASE 0x50000000 156 157 #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */ 158 #define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */ 159 160 #define CFG_FLASH_CFI 1 /* The flash is CFI compatible */ 161 #define CFG_FLASH_CFI_DRIVER 1 /* Use common CFI driver */ 162 163 #define CFG_FLASH_CFI_WIDTH FLASH_CFI_16BIT /* no byte writes on IXP4xx */ 164 165 #define CFG_FLASH_EMPTY_INFO 1 /* print 'E' for empty sector on flinfo */ 166 #define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */ 167 168 #define CFG_ENV_IS_IN_FLASH 1 169 #define CFG_ENV_OFFSET 0x40000 /* use the sysconfig partition */ 170 #define CFG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */ 171 #define CFG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */ 172 173 #define CFG_ETHADDR_OFFSET 0x3FFB0 /* Location of MAC address in flash */ 174 #define CFG_SERCOMM_OFFSET 0x3FFF8 /* Location of " sErCoMm" signature */ 175 176 #define CFG_CACHELINE_SIZE 32 177 178 #define CFG_HZ 33000000 /* NSLU2 has a 33.000 MHz crystal */ 179 180 #define CONFIG_STACKSIZE (128*1024) /* regular stack */ 181 182 #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */ 183 184 /* 185 * Platform/Board Specific Defines 186 */ 187 #define CONFIG_SETUP_MEMORY_TAGS 1 188 #define CONFIG_CMDLINE_TAG 1 189 #define CONFIG_INITRD_TAG 1 190 191 /* 192 * Physical Memory Map 193 */ 194 #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ 195 #define PHYS_SDRAM_1 0x00000000 /* SDRAM Bank #1 */ 196 #define PHYS_SDRAM_1_SIZE 0x02000000 /* 32 MB */ 197 198 /* 199 * Expansion bus settings 200 */ 201 #define CFG_EXP_CS0 0xbcd23c42 202 203 /* 204 * SDRAM settings 205 */ 206 #define CFG_SDR_CONFIG 0x18 207 #define CFG_SDR_MODE_CONFIG 0x1 208 #define CFG_SDRAM_REFRESH_CNT 0x81a 209 210 /* 211 * GPIO settings 212 */ 213 #define CFG_GPIO_STATUS_LED 0 214 #define CFG_GPIO_READY_LED 1 215 #define CFG_GPIO_DISK2_LED 2 216 #define CFG_GPIO_DISK1_LED 3 217 #define CFG_GPIO_BUZZER 4 218 #define CFG_GPIO_POWER_IN 5 219 #define CFG_GPIO_I2C_SCL 6 220 #define CFG_GPIO_I2C_SDA 7 221 #define CFG_GPIO_POWER_OFF 8 222 #define CFG_GPIO_PCI_INTC_N 9 223 #define CFG_GPIO_PCI_INTB_N 10 224 #define CFG_GPIO_PCI_INTA_N 11 225 #define CFG_GPIO_RESET_IN 12 226 #define CFG_GPIO_PCI_RESET 13 227 #define CFG_GPIO_PCI_CLK 14 228 #define CFG_GPIO_EXTBUS_CLK 15 229 230 #endif /* __CONFIG_H */ -
u-boot/lib_arm/board.c
old new 396 396 397 397 devices_init (); /* get the devices list going. */ 398 398 399 #if def CONFIG_CMC_PU2399 #if defined(CONFIG_CMC_PU2) || defined (CONFIG_NSLU2) 400 400 load_sernum_ethaddr (); 401 #endif /* CONFIG_CMC_PU2 */401 #endif /* CONFIG_CMC_PU2 || CONFIG_NSLU2 */ 402 402 403 403 jumptable_init (); 404 404
Note: See TracBrowser for help on using the browser.
