From df548d3c3e2bbc40258713167859ffc2ce99a900 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Sun, 19 Nov 2006 18:06:53 +0100 Subject: AVR32: Resource management rewrite Rewrite the resource management code (i.e. I/O memory, clock gating, gpio) so it doesn't depend on any global state. This is necessary because this code is heavily used before relocation to RAM, so we can't write to any global variables. As an added bonus, this makes u-boot's memory footprint a bit smaller, although some functionality has been left out; all clocks are enabled all the time, and there's no checking for gpio line conflicts. Signed-off-by: Haavard Skinnemoen --- include/configs/atstk1002.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/configs/atstk1002.h') diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h index 458ebabeb9..717f54022c 100644 --- a/include/configs/atstk1002.h +++ b/include/configs/atstk1002.h @@ -62,9 +62,10 @@ */ #define CFG_PLL0_OPT 0x04 -#define CFG_USART1 1 - -#define CFG_CONSOLE_UART_DEV DEVICE_USART1 +#undef CONFIG_USART0 +#define CONFIG_USART1 1 +#undef CONFIG_USART2 +#undef CONFIG_USART3 /* User serviceable stuff */ #define CONFIG_CMDLINE_TAG 1 -- cgit v1.2.1 From 1f4f2121c2685182eb87fa9a9b799d1917387a1c Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Mon, 20 Nov 2006 15:53:10 +0100 Subject: AVR32: Relocate u-boot to SDRAM Relocate the u-boot image into SDRAM like everyone else does. This means that we can handle much larger .data and .bss than we used to. Signed-off-by: Haavard Skinnemoen --- include/configs/atstk1002.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'include/configs/atstk1002.h') diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h index 717f54022c..74636335a5 100644 --- a/include/configs/atstk1002.h +++ b/include/configs/atstk1002.h @@ -151,16 +151,8 @@ #define CFG_INIT_SP_ADDR (CFG_INTRAM_BASE + CFG_INTRAM_SIZE) #define CFG_MALLOC_LEN (256*1024) -#define CFG_MALLOC_END \ - ({ \ - DECLARE_GLOBAL_DATA_PTR; \ - CFG_SDRAM_BASE + gd->sdram_size; \ - }) -#define CFG_MALLOC_START (CFG_MALLOC_END - CFG_MALLOC_LEN) - #define CFG_DMA_ALLOC_LEN (16384) -#define CFG_DMA_ALLOC_END (CFG_MALLOC_START) -#define CFG_DMA_ALLOC_START (CFG_DMA_ALLOC_END - CFG_DMA_ALLOC_LEN) + /* Allow 2MB for the kernel run-time image */ #define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 0x00200000) #define CFG_BOOTPARAMS_LEN (16 * 1024) -- cgit v1.2.1 From 1b804b229556a4d862da93c0ec94e79419364b2c Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Wed, 21 Mar 2007 19:47:36 +0100 Subject: AVR32: Include more commands for ATSTK1000 Include the imi, imls and jffs commands sets by default on ATSTK1000. Also define CONFIG_BOOTARGS to something more useful, define CONFIG_BOOTCOMMAND and enable autoboot by default. Signed-off-by: Haavard Skinnemoen --- include/configs/atstk1002.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'include/configs/atstk1002.h') diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h index 74636335a5..807d4a4a8b 100644 --- a/include/configs/atstk1002.h +++ b/include/configs/atstk1002.h @@ -76,12 +76,27 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_BOOTARGS \ - "console=ttyUS0 root=/dev/mtdblock1 fbmem=600k" + "console=ttyS0 root=/dev/mtdblock1 rootfstype=jffs2 fbmem=600k" + +#define CONFIG_BOOTCOMMAND \ + "fsload; bootm $(fileaddr)" + +/* + * Only interrupt autoboot if is pressed. Otherwise, garbage + * data on the serial line may interrupt the boot sequence. + */ +#define CONFIG_BOOTDELAY 2 +#define CONFIG_AUTOBOOT 1 +#define CONFIG_AUTOBOOT_KEYED 1 +#define CONFIG_AUTOBOOT_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_DELAY_STR "d" +#define CONFIG_AUTOBOOT_STOP_STR " " #define CONFIG_COMMANDS (CFG_CMD_BDI \ | CFG_CMD_LOADS \ | CFG_CMD_LOADB \ - /* | CFG_CMD_IMI */ \ + | CFG_CMD_IMI \ /* | CFG_CMD_CACHE */ \ | CFG_CMD_FLASH \ | CFG_CMD_MEMORY \ @@ -109,9 +124,10 @@ /* | CFG_CMD_PING */ \ /* | CFG_CMD_MMC */ \ /* | CFG_CMD_FAT */ \ - /* | CFG_CMD_IMLS */ \ + | CFG_CMD_IMLS \ /* | CFG_CMD_ITEST */ \ /* | CFG_CMD_EXT2 */ \ + | CFG_CMD_JFFS2 \ ) #include -- cgit v1.2.1 From 9a24f477a1ed5bb0f74377c985d754ebbfa44872 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Sun, 17 Dec 2006 17:14:30 +0100 Subject: AVR32: Enable networking Implement MACB initialization for AVR32 and ATSTK1000, and turn everything on, including the MACB driver. Signed-off-by: Haavard Skinnemoen --- include/configs/atstk1002.h | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'include/configs/atstk1002.h') diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h index 807d4a4a8b..5e63ef8915 100644 --- a/include/configs/atstk1002.h +++ b/include/configs/atstk1002.h @@ -93,6 +93,22 @@ #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " +/* + * These are "locally administered ethernet addresses" generated by + * ./tools/gen_eth_addr + * + * After booting the board for the first time, new addresses should be + * generated and assigned to the environment variables "ethaddr" and + * "eth1addr". + */ +#define CONFIG_ETHADDR "6a:87:71:14:cd:cb" +#define CONFIG_ETH1ADDR "ca:f8:15:e6:3e:e6" +#define CONFIG_OVERWRITE_ETHADDR_ONCE 1 +#define CONFIG_NET_MULTI 1 + +#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_SUBNETMASK \ + | CONFIG_BOOTP_GATEWAY) + #define CONFIG_COMMANDS (CFG_CMD_BDI \ | CFG_CMD_LOADS \ | CFG_CMD_LOADB \ @@ -100,7 +116,7 @@ /* | CFG_CMD_CACHE */ \ | CFG_CMD_FLASH \ | CFG_CMD_MEMORY \ - /* | CFG_CMD_NET */ \ + | CFG_CMD_NET \ | CFG_CMD_ENV \ /* | CFG_CMD_IRQ */ \ | CFG_CMD_BOOTD \ @@ -112,7 +128,7 @@ /* | CFG_CMD_I2C */ \ | CFG_CMD_REGINFO \ /* | CFG_CMD_DATE */ \ - /* | CFG_CMD_DHCP */ \ + | CFG_CMD_DHCP \ /* | CFG_CMD_AUTOSCRIPT */ \ /* | CFG_CMD_MII */ \ | CFG_CMD_MISC \ @@ -133,6 +149,7 @@ #include #define CONFIG_ATMEL_USART 1 +#define CONFIG_MACB 1 #define CONFIG_PIO2 1 #define CFG_NR_PIOS 5 #define CFG_HSDRAMC 1 -- cgit v1.2.1 From 8e6875183cdca91c134408d119d4abcd48ef6856 Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Sun, 17 Dec 2006 18:56:46 +0100 Subject: AVR32: Enable MMC support Set up the portmux for the MMC interface and enable the MMC driver along with support for DOS partitions, ext2 and FAT filesystems. Signed-off-by: Haavard Skinnemoen --- include/configs/atstk1002.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/configs/atstk1002.h') diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h index 5e63ef8915..ed3ee5a164 100644 --- a/include/configs/atstk1002.h +++ b/include/configs/atstk1002.h @@ -68,6 +68,8 @@ #undef CONFIG_USART3 /* User serviceable stuff */ +#define CONFIG_DOS_PARTITION 1 + #define CONFIG_CMDLINE_TAG 1 #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1 @@ -138,11 +140,11 @@ /* | CFG_CMD_SAVES */ \ /* | CFG_CMD_SPI */ \ /* | CFG_CMD_PING */ \ - /* | CFG_CMD_MMC */ \ - /* | CFG_CMD_FAT */ \ + | CFG_CMD_MMC \ + | CFG_CMD_FAT \ | CFG_CMD_IMLS \ /* | CFG_CMD_ITEST */ \ - /* | CFG_CMD_EXT2 */ \ + | CFG_CMD_EXT2 \ | CFG_CMD_JFFS2 \ ) @@ -153,6 +155,7 @@ #define CONFIG_PIO2 1 #define CFG_NR_PIOS 5 #define CFG_HSDRAMC 1 +#define CONFIG_MMC 1 #define CFG_DCACHE_LINESZ 32 #define CFG_ICACHE_LINESZ 32 -- cgit v1.2.1