From 09d318a8bb1444ec92e31cafcdba877eb9409e58 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 29 Jul 2008 12:23:49 -0500 Subject: fsl_i2c: Use timebase timer functions instead of get_timer() The current implementation of get_timer() is only really useful after we have relocated u-boot to memory. The i2c code is used before that as part of the SPD DDR setup. We actually have a bug when using the get_timer() code before relocation because the .bss hasn't been setup and thus we could be reading/writing a random location (probably in flash). Signed-off-by: Kumar Gala diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 9d5df8a..3f78e2f 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -173,12 +173,11 @@ i2c_init(int speed, int slaveadd) static __inline__ int i2c_wait4bus(void) { - ulong timeval = get_timer(0); + unsigned long long timeval = get_ticks(); while (readb(&i2c_dev[i2c_bus_num]->sr) & I2C_SR_MBB) { - if (get_timer(timeval) > I2C_TIMEOUT) { + if ((get_ticks() - timeval) > usec2ticks(I2C_TIMEOUT)) return -1; - } } return 0; @@ -188,7 +187,7 @@ static __inline__ int i2c_wait(int write) { u32 csr; - ulong timeval = get_timer(0); + unsigned long long timeval = get_ticks(); do { csr = readb(&i2c_dev[i2c_bus_num]->sr); @@ -213,7 +212,7 @@ i2c_wait(int write) } return 0; - } while (get_timer (timeval) < I2C_TIMEOUT); + } while ((get_ticks() - timeval) < usec2ticks(I2C_TIMEOUT)); debug("i2c_wait: timed out\n"); return -1; -- cgit v0.10.2 From 3c95960e526b3b026da20201db64526f46faf14b Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 31 Jul 2008 10:12:09 +0200 Subject: at91rm9200dk, csb637: fix NAND related build problems Tried fixing NAND support for the at91rm9200dk board; untested. Disabled NAND support in the csb637 board config file. Signed-off-by: Wolfgang Denk diff --git a/include/asm-arm/arch-at91rm9200/AT91RM9200.h b/include/asm-arm/arch-at91rm9200/AT91RM9200.h index 2f7f710..95db017 100644 --- a/include/asm-arm/arch-at91rm9200/AT91RM9200.h +++ b/include/asm-arm/arch-at91rm9200/AT91RM9200.h @@ -25,6 +25,7 @@ #ifndef AT91RM9200_H #define AT91RM9200_H +#ifndef __ASSEMBLY__ typedef volatile unsigned int AT91_REG; /* Hardware register definition */ /*****************************************************************************/ @@ -780,4 +781,5 @@ typedef struct _AT91S_PDC #define AT91C_PIOB_ODR ((AT91_REG *) 0xFFFFF614) /* (PIOB) Output Disable Registerr */ #define AT91C_PIOB_PDSR ((AT91_REG *) 0xFFFFF63C) /* (PIOB) Pin Data Status Register */ -#endif +#endif /* __ASSEMBLY__ */ +#endif /* AT91RM9200_H */ diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h index 951ce16..cd2eae2 100644 --- a/include/configs/at91rm9200dk.h +++ b/include/configs/at91rm9200dk.h @@ -112,16 +112,11 @@ */ #include -#define CONFIG_CMD_MII #define CONFIG_CMD_DHCP +#define CONFIG_CMD_MII +#define CONFIG_CMD_NAND -#undef CONFIG_CMD_BDI -#undef CONFIG_CMD_IMI -#undef CONFIG_CMD_AUTOSCRIPT -#undef CONFIG_CMD_FPGA -#undef CONFIG_CMD_MISC -#undef CONFIG_CMD_LOADS - +#define CFG_NAND_LEGACY #define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ #define SECTORSIZE 512 @@ -137,6 +132,7 @@ #define AT91_SMART_MEDIA_ALE (1 << 22) /* our ALE is AD22 */ #define AT91_SMART_MEDIA_CLE (1 << 21) /* our CLE is AD21 */ +#include /* needed for port definitions */ #define NAND_DISABLE_CE(nand) do { *AT91C_PIOC_SODR = AT91C_PIO_PC0;} while(0) #define NAND_ENABLE_CE(nand) do { *AT91C_PIOC_CODR = AT91C_PIO_PC0;} while(0) diff --git a/include/configs/csb637.h b/include/configs/csb637.h index e9c6d8e..735a211 100644 --- a/include/configs/csb637.h +++ b/include/configs/csb637.h @@ -114,17 +114,11 @@ */ #include -#define CONFIG_CMD_JFFS2 #define CONFIG_CMD_DHCP +#define CONFIG_CMD_JFFS2 #define CONFIG_CMD_PING -#undef CONFIG_CMD_BDI -#undef CONFIG_CMD_IMI -#undef CONFIG_CMD_AUTOSCRIPT -#undef CONFIG_CMD_FPGA -#undef CONFIG_CMD_MISC -#undef CONFIG_CMD_LOADS - +#ifdef NAND_SUPPORT_HAS_BEEN_FIXED /* NAND support is broken / unimplemented */ #define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ #define SECTORSIZE 512 @@ -140,6 +134,7 @@ #define AT91_SMART_MEDIA_ALE (1 << 22) /* our ALE is AD22 */ #define AT91_SMART_MEDIA_CLE (1 << 21) /* our CLE is AD21 */ +#include /* needed for port definitions */ #define NAND_DISABLE_CE(nand) do { *AT91C_PIOC_SODR = AT91C_PIO_PC0;} while(0) #define NAND_ENABLE_CE(nand) do { *AT91C_PIOC_CODR = AT91C_PIO_PC0;} while(0) @@ -155,6 +150,8 @@ #define NAND_CTL_CLRCLE(nandptr) #define NAND_CTL_SETCLE(nandptr) +#endif /* NAND_SUPPORT_HAS_BEEN_FIXED */ + #define CONFIG_NR_DRAM_BANKS 1 #define PHYS_SDRAM 0x20000000 #define PHYS_SDRAM_SIZE 0x4000000 /* 64 megs */ -- cgit v0.10.2 From 2cb9080427fe641dcb71da46cd0634dd406f37ed Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Tue, 22 Jul 2008 08:01:43 +0900 Subject: Remove unused I2C at apollon board There are no I2C devices on this board. Signed-off-by: Kyungmin Park diff --git a/include/configs/apollon.h b/include/configs/apollon.h index 8973296..5884611 100644 --- a/include/configs/apollon.h +++ b/include/configs/apollon.h @@ -103,14 +103,6 @@ */ #define CONFIG_SERIAL1 1 /* UART1 on H4 */ - /* - * I2C configuration - */ -#define CONFIG_HARD_I2C -#define CFG_I2C_SPEED 100000 -#define CFG_I2C_SLAVE 1 -#define CONFIG_DRIVER_OMAP24XX_I2C - /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #define CONFIG_CONS_INDEX 1 -- cgit v0.10.2 From ebb86c4ecd37a7701358284e497ca4c6483c7cc5 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 30 Jul 2008 09:59:51 +0200 Subject: cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)' A recent patch used '#if (CONFIG_CMD_USB)' instead of '#if defined(CONFIG_CMD_USB)'. This patch fixes this problem and makes common/bootm.c compile again. Signed-off-by: Stefan Roese Acked-by: Markus Klotzbuecher diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 4040a69..18682fe 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -36,7 +36,7 @@ #include #include -#if (CONFIG_CMD_USB) +#if defined(CONFIG_CMD_USB) #include #endif @@ -217,7 +217,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) */ iflag = disable_interrupts(); -#if (CONFIG_CMD_USB) +#if defined(CONFIG_CMD_USB) /* * turn off USB to prevent the host controller from writing to the * SDRAM while Linux is booting. This could happen (at least for OHCI -- cgit v0.10.2 From 3f9ae1a5d43c49a8ecf497470c3d1d80255e44b9 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Wed, 30 Jul 2008 10:21:01 +0200 Subject: ppc4xx: Fix W7OLMG compile problems by adding missing LM75 defines Signed-off-by: Stefan Roese diff --git a/board/w7o/post2.c b/board/w7o/post2.c index e590128..6ee33eb 100644 --- a/board/w7o/post2.c +++ b/board/w7o/post2.c @@ -29,6 +29,12 @@ #include "errors.h" #include "dtt.h" +/* for LM75 DTT POST test */ +#define DTT_READ_TEMP 0x0 +#define DTT_CONFIG 0x1 +#define DTT_TEMP_HYST 0x2 +#define DTT_TEMP_SET 0x3 + #if defined(CONFIG_RTC_M48T35A) void rtctest(void) { -- cgit v0.10.2 From 57c219ad5d34dd9d49991777a62e3899595f2ec7 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 30 Jul 2008 08:01:15 -0500 Subject: Fix compile warnings in dlmalloc The origional code was using on odd reference to get to the first real element in av_[]. The first two elements of the array are not used for actual bins, but for house keeping. If we are more explicit about how use the first few elements we can get rid of the warnings: dlmalloc.c: In function 'malloc_extend_top': dlmalloc.c:1971: warning: dereferencing type-punned pointer will break strict-aliasing rules dlmalloc.c:1999: warning: dereferencing type-punned pointer will break strict-aliasing rules dlmalloc.c:2029: warning: dereferencing type-punned pointer will break strict-aliasing rules ... The logic of how this code came to be is: bin_at(0) = (char*)&(av_[2]) - 2*SIZE_SZ SIZE_SZ is the size of pointer, and av_ is arry of pointers so: bin_at(0) = &(av_[0]) Going from there to bin_at(0)->fd or bin_at(0)->size should be straight forward. Signed-off-by: Kumar Gala diff --git a/common/dlmalloc.c b/common/dlmalloc.c index c51351e..4a18562 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1457,7 +1457,7 @@ typedef struct malloc_chunk* mbinptr; indexing, maintain locality, and avoid some initialization tests. */ -#define top (bin_at(0)->fd) /* The topmost chunk */ +#define top (av_[2]) /* The topmost chunk */ #define last_remainder (bin_at(1)) /* remainder from last split */ @@ -1552,13 +1552,14 @@ void malloc_bin_reloc (void) #define BINBLOCKWIDTH 4 /* bins per block */ -#define binblocks (bin_at(0)->size) /* bitvector of nonempty blocks */ +#define binblocks_r ((INTERNAL_SIZE_T)av_[1]) /* bitvector of nonempty blocks */ +#define binblocks_w (av_[1]) /* bin<->block macros */ #define idx2binblock(ix) ((unsigned)1 << (ix / BINBLOCKWIDTH)) -#define mark_binblock(ii) (binblocks |= idx2binblock(ii)) -#define clear_binblock(ii) (binblocks &= ~(idx2binblock(ii))) +#define mark_binblock(ii) (binblocks_w = (mbinptr)(binblocks_r | idx2binblock(ii))) +#define clear_binblock(ii) (binblocks_w = (mbinptr)(binblocks_r & ~(idx2binblock(ii)))) @@ -2250,17 +2251,17 @@ Void_t* mALLOc(bytes) size_t bytes; search for best fitting chunk by scanning bins in blockwidth units. */ - if ( (block = idx2binblock(idx)) <= binblocks) + if ( (block = idx2binblock(idx)) <= binblocks_r) { /* Get to the first marked block */ - if ( (block & binblocks) == 0) + if ( (block & binblocks_r) == 0) { /* force to an even block boundary */ idx = (idx & ~(BINBLOCKWIDTH - 1)) + BINBLOCKWIDTH; block <<= 1; - while ((block & binblocks) == 0) + while ((block & binblocks_r) == 0) { idx += BINBLOCKWIDTH; block <<= 1; @@ -2315,7 +2316,7 @@ Void_t* mALLOc(bytes) size_t bytes; { if ((startidx & (BINBLOCKWIDTH - 1)) == 0) { - binblocks &= ~block; + av_[1] = (mbinptr)(binblocks_r & ~block); break; } --startidx; @@ -2324,9 +2325,9 @@ Void_t* mALLOc(bytes) size_t bytes; /* Get to the next possibly nonempty block */ - if ( (block <<= 1) <= binblocks && (block != 0) ) + if ( (block <<= 1) <= binblocks_r && (block != 0) ) { - while ((block & binblocks) == 0) + while ((block & binblocks_r) == 0) { idx += BINBLOCKWIDTH; block <<= 1; -- cgit v0.10.2 From f0ff885ca64655bee6540eb8a25eed90b1152686 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Wed, 30 Jul 2008 14:13:30 -0500 Subject: mpc85xx: Update linker scripts for Freescale boards * Move to using absolute addressing always. Makes the scripts a bit more portable and common * Moved .bss after the end of the image. These allows us to have more room in the resulting binary image for code and data. * Removed .text object files that aren't really needed * Make sure _end is 4-byte aligned as the .bss init code expects this. (Its possible that the end of .bss isn't 4-byte aligned) Signed-off-by: Kumar Gala diff --git a/board/freescale/mpc8540ads/u-boot.lds b/board/freescale/mpc8540ads/u-boot.lds index f200810..0e4f5a2 100644 --- a/board/freescale/mpc8540ads/u-boot.lds +++ b/board/freescale/mpc8540ads/u-boot.lds @@ -2,6 +2,8 @@ * (C) Copyright 2002,2003, Motorola,Inc. * Xianghua Xiao, X.Xiao@motorola.com. * + * Copyright 2008 Freescale Semiconductor, Inc. + * * See file CREDITS for list of people who contributed to this * project. * @@ -26,16 +28,6 @@ OUTPUT_ARCH(powerpc) __DYNAMIC = 0; */ SECTIONS { - .resetvec 0xFFFFFFFC : - { - *(.resetvec) - } = 0xffff - - .bootpg 0xFFFFF000 : - { - cpu/mpc85xx/start.o (.bootpg) - } = 0xffff - /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; .interp : { *(.interp) } @@ -62,17 +54,6 @@ SECTIONS .plt : { *(.plt) } .text : { - cpu/mpc85xx/start.o (.text) - cpu/mpc85xx/traps.o (.text) - cpu/mpc85xx/interrupts.o (.text) - cpu/mpc85xx/cpu_init.o (.text) - cpu/mpc85xx/cpu.o (.text) - cpu/mpc85xx/speed.o (.text) - cpu/mpc85xx/pci.o (.text) - common/dlmalloc.o (.text) - lib_generic/crc32.o (.text) - lib_ppc/extable.o (.text) - lib_generic/zlib.o (.text) *(.text) *(.fixup) *(.got1) @@ -134,6 +115,18 @@ SECTIONS . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x7f000 : + { + cpu/mpc85xx/start.o (.bootpg) + } = 0xffff + + .resetvec ADDR(.text) + 0x7fffc : + { + *(.resetvec) + } = 0xffff + + . = ADDR(.text) + 0x80000; + __bss_start = .; .bss (NOLOAD) : { @@ -142,6 +135,8 @@ SECTIONS *(.bss) *(COMMON) } + + . = ALIGN(4); _end = . ; PROVIDE (end = .); } diff --git a/board/freescale/mpc8541cds/u-boot.lds b/board/freescale/mpc8541cds/u-boot.lds index 5f4dcf0..1c583de 100644 --- a/board/freescale/mpc8541cds/u-boot.lds +++ b/board/freescale/mpc8541cds/u-boot.lds @@ -1,5 +1,5 @@ /* - * Copyright 2004 Freescale Semiconductor. + * Copyright 2004, 2008 Freescale Semiconductor. * * See file CREDITS for list of people who contributed to this * project. @@ -25,16 +25,6 @@ OUTPUT_ARCH(powerpc) __DYNAMIC = 0; */ SECTIONS { - .resetvec 0xFFFFFFFC : - { - *(.resetvec) - } = 0xffff - - .bootpg 0xFFFFF000 : - { - cpu/mpc85xx/start.o (.bootpg) - } = 0xffff - /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; .interp : { *(.interp) } @@ -61,18 +51,6 @@ SECTIONS .plt : { *(.plt) } .text : { - cpu/mpc85xx/start.o (.text) - cpu/mpc85xx/traps.o (.text) - cpu/mpc85xx/interrupts.o (.text) - cpu/mpc85xx/cpu_init.o (.text) - cpu/mpc85xx/cpu.o (.text) - drivers/net/tsec.o (.text) - cpu/mpc85xx/speed.o (.text) - cpu/mpc85xx/pci.o (.text) - common/dlmalloc.o (.text) - lib_generic/crc32.o (.text) - lib_ppc/extable.o (.text) - lib_generic/zlib.o (.text) *(.text) *(.fixup) *(.got1) @@ -134,6 +112,18 @@ SECTIONS . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x7f000 : + { + cpu/mpc85xx/start.o (.bootpg) + } = 0xffff + + .resetvec ADDR(.text) + 0x7fffc : + { + *(.resetvec) + } = 0xffff + + . = ADDR(.text) + 0x80000; + __bss_start = .; .bss (NOLOAD) : { @@ -142,6 +132,8 @@ SECTIONS *(.bss) *(COMMON) } + + . = ALIGN(4); _end = . ; PROVIDE (end = .); } diff --git a/board/freescale/mpc8544ds/u-boot.lds b/board/freescale/mpc8544ds/u-boot.lds index c66c69f..500e647 100644 --- a/board/freescale/mpc8544ds/u-boot.lds +++ b/board/freescale/mpc8544ds/u-boot.lds @@ -1,5 +1,5 @@ /* - * Copyright 2007 Freescale Semiconductor, Inc. + * Copyright 2007-2008 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -25,16 +25,6 @@ OUTPUT_ARCH(powerpc) __DYNAMIC = 0; */ SECTIONS { - .resetvec 0xFFFFFFFC : - { - *(.resetvec) - } = 0xffff - - .bootpg 0xFFFFF000 : - { - cpu/mpc85xx/start.o (.bootpg) - } = 0xffff - /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; .interp : { *(.interp) } @@ -61,17 +51,6 @@ SECTIONS .plt : { *(.plt) } .text : { - cpu/mpc85xx/start.o (.text) - cpu/mpc85xx/traps.o (.text) - cpu/mpc85xx/interrupts.o (.text) - cpu/mpc85xx/cpu_init.o (.text) - cpu/mpc85xx/cpu.o (.text) - cpu/mpc85xx/speed.o (.text) - common/dlmalloc.o (.text) - lib_generic/crc32.o (.text) - lib_ppc/extable.o (.text) - lib_generic/zlib.o (.text) - drivers/bios_emulator/atibios.o (.text) *(.text) *(.fixup) *(.got1) @@ -133,6 +112,18 @@ SECTIONS . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x7f000 : + { + cpu/mpc85xx/start.o (.bootpg) + } = 0xffff + + .resetvec ADDR(.text) + 0x7fffc : + { + *(.resetvec) + } = 0xffff + + . = ADDR(.text) + 0x80000; + __bss_start = .; .bss (NOLOAD) : { @@ -141,6 +132,8 @@ SECTIONS *(.bss) *(COMMON) } + + . = ALIGN(4); _end = . ; PROVIDE (end = .); } diff --git a/board/freescale/mpc8548cds/u-boot.lds b/board/freescale/mpc8548cds/u-boot.lds index eba7e8a..6b93395 100644 --- a/board/freescale/mpc8548cds/u-boot.lds +++ b/board/freescale/mpc8548cds/u-boot.lds @@ -1,5 +1,5 @@ /* - * Copyright 2004, 2007 Freescale Semiconductor. + * Copyright 2004, 2007-2008 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -25,16 +25,6 @@ OUTPUT_ARCH(powerpc) __DYNAMIC = 0; */ SECTIONS { - .resetvec 0xFFFFFFFC : - { - *(.resetvec) - } = 0xffff - - .bootpg 0xFFFFF000 : - { - cpu/mpc85xx/start.o (.bootpg) - } = 0xffff - /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; .interp : { *(.interp) } @@ -61,17 +51,6 @@ SECTIONS .plt : { *(.plt) } .text : { - cpu/mpc85xx/start.o (.text) - cpu/mpc85xx/traps.o (.text) - cpu/mpc85xx/interrupts.o (.text) - cpu/mpc85xx/cpu_init.o (.text) - cpu/mpc85xx/cpu.o (.text) - drivers/net/tsec.o (.text) - cpu/mpc85xx/speed.o (.text) - common/dlmalloc.o (.text) - lib_generic/crc32.o (.text) - lib_ppc/extable.o (.text) - lib_generic/zlib.o (.text) *(.text) *(.fixup) *(.got1) @@ -133,6 +112,18 @@ SECTIONS . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x7f000 : + { + cpu/mpc85xx/start.o (.bootpg) + } = 0xffff + + .resetvec ADDR(.text) + 0x7fffc : + { + *(.resetvec) + } = 0xffff + + . = ADDR(.text) + 0x80000; + __bss_start = .; .bss (NOLOAD) : { @@ -141,6 +132,8 @@ SECTIONS *(.bss) *(COMMON) } + + . = ALIGN(4); _end = . ; PROVIDE (end = .); } diff --git a/board/freescale/mpc8555cds/u-boot.lds b/board/freescale/mpc8555cds/u-boot.lds index 5f4dcf0..a18b3a7 100644 --- a/board/freescale/mpc8555cds/u-boot.lds +++ b/board/freescale/mpc8555cds/u-boot.lds @@ -1,5 +1,5 @@ /* - * Copyright 2004 Freescale Semiconductor. + * Copyright 2004, 2008 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -25,16 +25,6 @@ OUTPUT_ARCH(powerpc) __DYNAMIC = 0; */ SECTIONS { - .resetvec 0xFFFFFFFC : - { - *(.resetvec) - } = 0xffff - - .bootpg 0xFFFFF000 : - { - cpu/mpc85xx/start.o (.bootpg) - } = 0xffff - /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; .interp : { *(.interp) } @@ -61,18 +51,6 @@ SECTIONS .plt : { *(.plt) } .text : { - cpu/mpc85xx/start.o (.text) - cpu/mpc85xx/traps.o (.text) - cpu/mpc85xx/interrupts.o (.text) - cpu/mpc85xx/cpu_init.o (.text) - cpu/mpc85xx/cpu.o (.text) - drivers/net/tsec.o (.text) - cpu/mpc85xx/speed.o (.text) - cpu/mpc85xx/pci.o (.text) - common/dlmalloc.o (.text) - lib_generic/crc32.o (.text) - lib_ppc/extable.o (.text) - lib_generic/zlib.o (.text) *(.text) *(.fixup) *(.got1) @@ -134,6 +112,18 @@ SECTIONS . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x7f000 : + { + cpu/mpc85xx/start.o (.bootpg) + } = 0xffff + + .resetvec ADDR(.text) + 0x7fffc : + { + *(.resetvec) + } = 0xffff + + . = ADDR(.text) + 0x80000; + __bss_start = .; .bss (NOLOAD) : { @@ -142,6 +132,8 @@ SECTIONS *(.bss) *(COMMON) } + + . = ALIGN(4); _end = . ; PROVIDE (end = .); } diff --git a/board/freescale/mpc8560ads/u-boot.lds b/board/freescale/mpc8560ads/u-boot.lds index cb30ea9..0e4f5a2 100644 --- a/board/freescale/mpc8560ads/u-boot.lds +++ b/board/freescale/mpc8560ads/u-boot.lds @@ -1,7 +1,9 @@ /* - * (C) Copyright 2002,2003,Motorola,Inc. + * (C) Copyright 2002,2003, Motorola,Inc. * Xianghua Xiao, X.Xiao@motorola.com. * + * Copyright 2008 Freescale Semiconductor, Inc. + * * See file CREDITS for list of people who contributed to this * project. * @@ -26,16 +28,6 @@ OUTPUT_ARCH(powerpc) __DYNAMIC = 0; */ SECTIONS { - .resetvec 0xFFFFFFFC : - { - *(.resetvec) - } = 0xffff - - .bootpg 0xFFFFF000 : - { - cpu/mpc85xx/start.o (.bootpg) - } = 0xffff - /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; .interp : { *(.interp) } @@ -62,20 +54,6 @@ SECTIONS .plt : { *(.plt) } .text : { - cpu/mpc85xx/start.o (.text) - cpu/mpc85xx/commproc.o (.text) - cpu/mpc85xx/traps.o (.text) - cpu/mpc85xx/interrupts.o (.text) - cpu/mpc85xx/serial_scc.o (.text) - cpu/mpc85xx/ether_fcc.o (.text) - cpu/mpc85xx/cpu_init.o (.text) - cpu/mpc85xx/cpu.o (.text) - cpu/mpc85xx/speed.o (.text) - cpu/mpc85xx/spd_sdram.o (.text) - common/dlmalloc.o (.text) - lib_generic/crc32.o (.text) - lib_ppc/extable.o (.text) - lib_generic/zlib.o (.text) *(.text) *(.fixup) *(.got1) @@ -137,6 +115,18 @@ SECTIONS . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x7f000 : + { + cpu/mpc85xx/start.o (.bootpg) + } = 0xffff + + .resetvec ADDR(.text) + 0x7fffc : + { + *(.resetvec) + } = 0xffff + + . = ADDR(.text) + 0x80000; + __bss_start = .; .bss (NOLOAD) : { @@ -145,6 +135,8 @@ SECTIONS *(.bss) *(COMMON) } + + . = ALIGN(4); _end = . ; PROVIDE (end = .); } diff --git a/board/freescale/mpc8568mds/u-boot.lds b/board/freescale/mpc8568mds/u-boot.lds index 1b83834..9d245e4 100644 --- a/board/freescale/mpc8568mds/u-boot.lds +++ b/board/freescale/mpc8568mds/u-boot.lds @@ -1,5 +1,5 @@ /* - * Copyright 2004-2007 Freescale Semiconductor. + * Copyright 2004-2008 Freescale Semiconductor, Inc. * * See file CREDITS for list of people who contributed to this * project. @@ -23,21 +23,8 @@ OUTPUT_ARCH(powerpc) /* Do we need any of these for elf? __DYNAMIC = 0; */ - SECTIONS { - /* ELIOR - From RAM: From FLASH: 0xFFFFFFFC*/ - .resetvec 0xFFFFFFFC: - { - *(.resetvec) - } = 0xffff - - /*(ELIOR - From RAM: From FLASH: 0xFFFFF000*/ - .bootpg 0xFFFFF000: - { - cpu/mpc85xx/start.o (.bootpg) - } = 0xffff - /* Read-only sections, merged into text segment: */ . = + SIZEOF_HEADERS; .interp : { *(.interp) } @@ -64,17 +51,6 @@ SECTIONS .plt : { *(.plt) } .text : { - cpu/mpc85xx/start.o (.text) - cpu/mpc85xx/traps.o (.text) - cpu/mpc85xx/interrupts.o (.text) - cpu/mpc85xx/cpu_init.o (.text) - cpu/mpc85xx/cpu.o (.text) - cpu/mpc85xx/speed.o (.text) - cpu/mpc85xx/pci.o (.text) - common/dlmalloc.o (.text) - lib_generic/crc32.o (.text) - lib_ppc/extable.o (.text) - lib_generic/zlib.o (.text) *(.text) *(.fixup) *(.got1) @@ -136,6 +112,18 @@ SECTIONS . = ALIGN(256); __init_end = .; + .bootpg ADDR(.text) + 0x7f000 : + { + cpu/mpc85xx/start.o (.bootpg) + } = 0xffff + + .resetvec ADDR(.text) + 0x7fffc : + { + *(.resetvec) + } = 0xffff + + . = ADDR(.text) + 0x80000; + __bss_start = .; .bss (NOLOAD) : { @@ -144,6 +132,8 @@ SECTIONS *(.bss) *(COMMON) } + + . = ALIGN(4); _end = . ; PROVIDE (end = .); } -- cgit v0.10.2 From 6361ad4b596f5a940a01c91ae0297d98f790cbe0 Mon Sep 17 00:00:00 2001 From: Matvejchikov Ilya Date: Wed, 30 Jul 2008 23:20:32 +0400 Subject: PPC: Add pci_clk in the global_data for CPM2 processors This patch adds pci_clk field to the global_data structure for the processors which have CPM2 module in case the CONFIG_PCI is defined. Signed-off-by: Matvejchikov Ilya diff --git a/include/asm-ppc/global_data.h b/include/asm-ppc/global_data.h index c5ac658..be2ce24 100644 --- a/include/asm-ppc/global_data.h +++ b/include/asm-ppc/global_data.h @@ -51,6 +51,9 @@ typedef struct global_data { unsigned long cpm_clk; unsigned long scc_clk; unsigned long brg_clk; +#ifdef CONFIG_PCI + unsigned long pci_clk; +#endif #endif unsigned long mem_clk; #if defined(CONFIG_MPC83XX) -- cgit v0.10.2 From 9196b44334c330cc13de2464c59181e4db71f549 Mon Sep 17 00:00:00 2001 From: Matvejchikov Ilya Date: Wed, 30 Jul 2008 23:21:19 +0400 Subject: 8260: Making the use of gd->pci_clk dependant on the CONFIG_PCI Signed-off-by: Matvejchikov Ilya diff --git a/cpu/mpc8260/speed.c b/cpu/mpc8260/speed.c index 38cd0d9..8d280fb 100644 --- a/cpu/mpc8260/speed.c +++ b/cpu/mpc8260/speed.c @@ -162,6 +162,30 @@ int get_clocks (void) gd->cpu_clk = clkin; } +#ifdef CONFIG_PCI + gd->pci_clk = clkin; + + if (sccr & SCCR_PCI_MODE) { + uint pci_div; + uint pcidf = (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT; + + if (sccr & SCCR_PCI_MODCK) { + pci_div = 2; + if (pcidf == 9) { + pci_div *= 5; + } else if (pcidf == 0xB) { + pci_div *= 6; + } else { + pci_div *= (pcidf + 1); + } + } else { + pci_div = pcidf + 1; + } + + gd->pci_clk = (gd->cpm_clk * 2) / pci_div; + } +#endif + return (0); } @@ -220,26 +244,9 @@ int prt_8260_clks (void) printf (" - cpu_clk %10ld, cpm_clk %10ld, bus_clk %10ld\n", gd->cpu_clk, gd->cpm_clk, gd->bus_clk); - - if (sccr & SCCR_PCI_MODE) { - uint pci_div; - uint pcidf = (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT; - - if (sccr & SCCR_PCI_MODCK) { - pci_div = 2; - if (pcidf == 9) { - pci_div *= 5; - } else if (pcidf == 0xB) { - pci_div *= 6; - } else { - pci_div *= (pcidf + 1); - } - } else { - pci_div = pcidf + 1; - } - - printf (" - pci_clk %10ld\n", (gd->cpm_clk * 2) / pci_div); - } +#ifdef CONFIG_PCI + printf (" - pci_clk %10ld\n", gd->pci_clk); +#endif putc ('\n'); return (0); -- cgit v0.10.2 From c4ec6db074051d2f6fc76a66411c60621b22bc02 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 31 Jul 2008 13:57:20 +0200 Subject: E1000: clean up CONFIG_E1000_FALLBACK_MAC handling Avoid "integer constant is too large for 'long' type" warnings. And simplify the code. Signed-off-by: Wolfgang Denk diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 060b518..c8b4e98 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -513,9 +513,11 @@ e1000_read_mac_addr(struct eth_device *nic) nic->enetaddr[5] += 1; } #ifdef CONFIG_E1000_FALLBACK_MAC - if ( *(u32*)(nic->enetaddr) == 0 || *(u32*)(nic->enetaddr) == ~0 ) - for ( i=0; i < NODE_ADDRESS_SIZE; i++ ) - nic->enetaddr[i] = (CONFIG_E1000_FALLBACK_MAC >> (8*(5-i))) & 0xff; + if ( *(u32*)(nic->enetaddr) == 0 || *(u32*)(nic->enetaddr) == ~0 ) { + unsigned char fb_mac[NODE_ADDRESS_SIZE] = CONFIG_E1000_FALLBACK_MAC; + + memcpy (nic->enetaddr, fb_mac, NODE_ADDRESS_SIZE); + } #endif #else /* @@ -531,10 +533,9 @@ e1000_read_mac_addr(struct eth_device *nic) DEBUGFUNC(); s = getenv ("ethaddr"); - if (s == NULL){ + if (s == NULL) { return -E1000_ERR_EEPROM; - } - else{ + } else { for(ii = 0; ii < 6; ii++) { nic->enetaddr[ii] = s ? simple_strtoul (s, &e, 16) : 0; if (s){ diff --git a/include/configs/MVBC_P.h b/include/configs/MVBC_P.h index ff6f6cc..48f427e 100644 --- a/include/configs/MVBC_P.h +++ b/include/configs/MVBC_P.h @@ -255,7 +255,7 @@ #define CONFIG_NET_RETRY_COUNT 5 #define CONFIG_E1000 -#define CONFIG_E1000_FALLBACK_MAC 0xb6b445ebfbc0 +#define CONFIG_E1000_FALLBACK_MAC { 0xb6, 0xb4, 0x45, 0xeb, 0xfb, 0xc0 } #undef CONFIG_MPC5xxx_FEC #undef CONFIG_PHY_ADDR #define CONFIG_NETDEV eth0 -- cgit v0.10.2 From 0b4951d4cddca9cc800745891c95b291e47cbbd7 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 31 Jul 2008 15:27:01 +0200 Subject: mvbc_p board: fix most build warnings. Signed-off-by: Wolfgang Denk diff --git a/board/matrix_vision/mvbc_p/mvbc_p.c b/board/matrix_vision/mvbc_p/mvbc_p.c index b61e84e..5c71dec 100644 --- a/board/matrix_vision/mvbc_p/mvbc_p.c +++ b/board/matrix_vision/mvbc_p/mvbc_p.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -109,7 +110,7 @@ void mvbc_init_gpio(void) struct mpc5xxx_gpio *gpio = (struct mpc5xxx_gpio*)MPC5XXX_GPIO; printf("Ports : 0x%08x\n", gpio->port_config); - printf("PORCFG: 0x%08x\n", *(vu_long*)MPC5XXX_CDM_PORCFG); + printf("PORCFG: 0x%08lx\n", *(vu_long*)MPC5XXX_CDM_PORCFG); out_be32(&gpio->simple_ddr, SIMPLE_DDR); out_be32(&gpio->simple_dvo, SIMPLE_DVO); -- cgit v0.10.2 From 54754120637b6a7f4ff774fb199fc550bcfea1da Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 31 Jul 2008 17:02:14 +0200 Subject: TQM85xx: fix typo introduce by commit ffbb5cb9 Signed-off-by: Wolfgang Denk diff --git a/board/tqc/tqm85xx/tqm85xx.c b/board/tqc/tqm85xx/tqm85xx.c index 839d47d..ae3c245 100644 --- a/board/tqc/tqm85xx/tqm85xx.c +++ b/board/tqc/tqm85xx/tqm85xx.c @@ -464,7 +464,7 @@ void local_bus_init (void) if (lbc_mhz < 66) { lbc->lcrr = CFG_LBC_LCRR | LCRR_DBYP; /* DLL Bypass */ - lbc->ltedr = LTEDR_BMD | LTEDR_PARD | LTEDR_WPD | LTERD_WARA | + lbc->ltedr = LTEDR_BMD | LTEDR_PARD | LTEDR_WPD | LTEDR_WARA | LTEDR_RAWA | LTEDR_CSD; /* Disable all error checking */ } else if (lbc_mhz >= 133) { -- cgit v0.10.2 From c37207d7f51e19c17f859966f314e27cc1231801 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Wed, 16 Jul 2008 16:38:59 +0200 Subject: Fix printf() format problems with configurable prompts U-Boot allows for configurable prompt strings using the CONFIG_AUTOBOOT_PROMPT resp. CONFIG_MENUPROMPT definitions. So far, the assumption was that any such user defined problts would contain exactly one "%d" format specifier. But some boards did not. To allow for flexible boot prompts without adding too complex code we now allow to specify the whole list of printf() arguments in the user definition. This is powerful, but requires a responsible user who really understands what he is doing, as he needs to know for exanple which variables are available in the respective context. Signed-off-by: Wolfgang Denk diff --git a/common/main.c b/common/main.c index 79ad291..187ef8a 100644 --- a/common/main.c +++ b/common/main.c @@ -116,7 +116,7 @@ static __inline__ int abortboot(int bootdelay) u_int i; # ifdef CONFIG_AUTOBOOT_PROMPT - printf(CONFIG_AUTOBOOT_PROMPT, bootdelay); + printf(CONFIG_AUTOBOOT_PROMPT); # endif # ifdef CONFIG_AUTOBOOT_DELAY_STR @@ -212,7 +212,7 @@ static __inline__ int abortboot(int bootdelay) int abort = 0; #ifdef CONFIG_MENUPROMPT - printf(CONFIG_MENUPROMPT, bootdelay); + printf(CONFIG_MENUPROMPT); #else printf("Hit any key to stop autoboot: %2d ", bootdelay); #endif diff --git a/doc/README.autoboot b/doc/README.autoboot index e4c4186..2042fe5 100644 --- a/doc/README.autoboot +++ b/doc/README.autoboot @@ -114,10 +114,17 @@ What they do CONFIG_AUTOBOOT_PROMPT is displayed before the boot delay selected by CONFIG_BOOTDELAY starts. If it is not defined there is no output indicating that autoboot is in progress. - If "%d" is included, it is replaced by the number of seconds - remaining before autoboot will start, but it does not count - down the seconds. "autoboot in %d seconds\n" is a reasonable - prompt. + + Note that CONFIG_AUTOBOOT_PROMPT is used as the (only) + argument to a printf() call, so it may contain '%' format + specifications, provided that it also includes, sepearated by + commas exactly like in a printf statement, the required + arguments. It is the responsibility of the user to select only + such arguments that are valid in the given context. A + reasonable prompt could be defined as + + #define CONFIG_AUTOBOOT_PROMPT \ + "autoboot in %d seconds\n",bootdelay If CONFIG_AUTOBOOT_DELAY_STR or "bootdelaykey" is specified and this string is received from console input before diff --git a/include/configs/APC405.h b/include/configs/APC405.h index 02f0c76..2f266a2 100644 --- a/include/configs/APC405.h +++ b/include/configs/APC405.h @@ -193,7 +193,8 @@ /* If a long serial cable is connected but */ /* other end is dead, garbage will be read */ #define CONFIG_AUTOBOOT_KEYED 1 -#define CONFIG_AUTOBOOT_PROMPT "Press SPACE to abort autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #undef CONFIG_AUTOBOOT_DELAY_STR #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/AmigaOneG3SE.h b/include/configs/AmigaOneG3SE.h index a992498..84efd2f 100644 --- a/include/configs/AmigaOneG3SE.h +++ b/include/configs/AmigaOneG3SE.h @@ -371,7 +371,8 @@ #define CONFIG_BOOTDELAY 5 /* Boot automatically after five seconds */ #define CONFIG_PREBOOT "" #define CONFIG_BOOTCOMMAND "fdcboot; diskboot" -#define CONFIG_MENUPROMPT "Press any key to interrupt autoboot: %2d " +#define CONFIG_MENUPROMPT \ + "Press any key to interrupt autoboot: %2d ", bootdelay #define CONFIG_MENUKEY ' ' #define CONFIG_MENUCOMMAND "menu" /* #define CONFIG_AUTOBOOT_KEYED */ diff --git a/include/configs/CPCI405DT.h b/include/configs/CPCI405DT.h index 6b585be..c173539 100644 --- a/include/configs/CPCI405DT.h +++ b/include/configs/CPCI405DT.h @@ -152,8 +152,9 @@ #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ /* Only interrupt boot if special string is typed */ -#define CONFIG_AUTOBOOT_KEYED 1 -#define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds\n" +#define CONFIG_AUTOBOOT_KEYED 1 +#define CONFIG_AUTOBOOT_PROMPT \ + "Autobooting in %d seconds\n", bootdelay #undef CONFIG_AUTOBOOT_DELAY_STR #undef CONFIG_AUTOBOOT_STOP_STR /* defined via environment var */ #define CONFIG_AUTOBOOT_STOP_STR2 "esdesd" /* esd special for esd access*/ diff --git a/include/configs/DU440.h b/include/configs/DU440.h index 0f5f85c..64c9ac0 100644 --- a/include/configs/DU440.h +++ b/include/configs/DU440.h @@ -345,8 +345,9 @@ int du440_phy_addr(int devnum); #define CONFIG_ZERO_BOOTDELAY_CHECK /* check for keypress on bootdelay==0 */ #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ -#define CONFIG_AUTOBOOT_KEYED 1 -#define CONFIG_AUTOBOOT_PROMPT "Press SPACE to abort autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_KEYED 1 +#define CONFIG_AUTOBOOT_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/GTH.h b/include/configs/GTH.h index 00e09f7..461670a 100644 --- a/include/configs/GTH.h +++ b/include/configs/GTH.h @@ -62,8 +62,9 @@ /* Only interrupt boot if space is pressed */ /* If a long serial cable is connected but */ /* other end is dead, garbage will be read */ -#define CONFIG_AUTOBOOT_KEYED 1 -#define CONFIG_AUTOBOOT_PROMPT "Press space to abort autoboot in %d second\n" +#define CONFIG_AUTOBOOT_KEYED 1 +#define CONFIG_AUTOBOOT_PROMPT \ + "Press space to abort autoboot in %d second\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/KUP4K.h b/include/configs/KUP4K.h index f6c31ea..e52fbfd 100644 --- a/include/configs/KUP4K.h +++ b/include/configs/KUP4K.h @@ -488,7 +488,8 @@ #define CONFIG_AUTOBOOT_KEYED /* use key strings to stop autoboot */ #if 0 -#define CONFIG_AUTOBOOT_PROMPT "Boote in %d Sekunden - stop mit \"2\"\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "Boote in %d Sekunden - stop mit \"2\"\n", bootdelay #endif #define CONFIG_AUTOBOOT_STOP_STR "." /* easy to stop for now */ #define CONFIG_SILENT_CONSOLE 1 diff --git a/include/configs/KUP4X.h b/include/configs/KUP4X.h index e558aa4..be0c7af 100644 --- a/include/configs/KUP4X.h +++ b/include/configs/KUP4X.h @@ -454,7 +454,8 @@ #define CONFIG_AUTOBOOT_KEYED /* use key strings to stop autoboot */ #if 0 -#define CONFIG_AUTOBOOT_PROMPT "Boote in %d Sekunden - stop mit \"2\"\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "Boote in %d Sekunden - stop mit \"2\"\n", bootdelay #endif #define CONFIG_AUTOBOOT_STOP_STR "." /* easy to stop for now */ #define CONFIG_SILENT_CONSOLE 1 diff --git a/include/configs/MVBLUE.h b/include/configs/MVBLUE.h index d08d795..8e247af 100644 --- a/include/configs/MVBLUE.h +++ b/include/configs/MVBLUE.h @@ -59,17 +59,18 @@ #define CONFIG_CLOCKS_IN_MHZ 1 -#define CONFIG_BOARD_TYPES 1 +#define CONFIG_BOARD_TYPES 1 #define CONFIG_CONS_INDEX 1 #define CONFIG_BAUDRATE 115200 #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -#define CONFIG_BOOTDELAY 3 +#define CONFIG_BOOTDELAY 3 #define CONFIG_BOOT_RETRY_TIME -1 #define CONFIG_AUTOBOOT_KEYED -#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds (stop with 's')...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "autoboot in %d seconds (stop with 's')...\n", bootdelay #define CONFIG_AUTOBOOT_STOP_STR "s" #define CONFIG_ZERO_BOOTDELAY_CHECK #define CONFIG_RESET_TO_RETRY 60 diff --git a/include/configs/NC650.h b/include/configs/NC650.h index 0b09482..84c6e9b 100644 --- a/include/configs/NC650.h +++ b/include/configs/NC650.h @@ -65,9 +65,10 @@ #define CFG_MEASURE_CPUCLK #define CFG_8XX_XIN CONFIG_8xx_OSCLK -#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ +#define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ #define CONFIG_AUTOBOOT_KEYED -#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d seconds...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nEnter password - autoboot in %d seconds...\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "ids" #define CONFIG_BOOT_RETRY_TIME 900 #define CONFIG_BOOT_RETRY_MIN 30 diff --git a/include/configs/PLU405.h b/include/configs/PLU405.h index 0bd77c0..a3d1c56 100644 --- a/include/configs/PLU405.h +++ b/include/configs/PLU405.h @@ -154,8 +154,9 @@ /* Only interrupt boot if space is pressed */ /* If a long serial cable is connected but */ /* other end is dead, garbage will be read */ -#define CONFIG_AUTOBOOT_KEYED 1 -#define CONFIG_AUTOBOOT_PROMPT "Press SPACE to abort autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_KEYED 1 +#define CONFIG_AUTOBOOT_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #undef CONFIG_AUTOBOOT_DELAY_STR #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/PMC440.h b/include/configs/PMC440.h index e8b405a..42f1d8d 100644 --- a/include/configs/PMC440.h +++ b/include/configs/PMC440.h @@ -409,7 +409,8 @@ #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ #define CONFIG_AUTOBOOT_KEYED 1 -#define CONFIG_AUTOBOOT_PROMPT "Press SPACE to abort autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #undef CONFIG_AUTOBOOT_DELAY_STR #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/RPXlite_DW.h b/include/configs/RPXlite_DW.h index 872765c..faae407 100644 --- a/include/configs/RPXlite_DW.h +++ b/include/configs/RPXlite_DW.h @@ -68,7 +68,8 @@ #ifdef DEPLOYMENT #define CONFIG_BOOT_RETRY_TIME -1 #define CONFIG_AUTOBOOT_KEYED -#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds (stop with 'st')...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "autoboot in %d seconds (stop with 'st')...\n", bootdelay #define CONFIG_AUTOBOOT_STOP_STR "st" #define CONFIG_ZERO_BOOTDELAY_CHECK #define CONFIG_RESET_TO_RETRY 1 diff --git a/include/configs/SXNI855T.h b/include/configs/SXNI855T.h index 3aee45c..aefc7ee 100644 --- a/include/configs/SXNI855T.h +++ b/include/configs/SXNI855T.h @@ -465,7 +465,7 @@ #if 1 #define CONFIG_AUTOBOOT_KEYED /* use key strings to stop autoboot */ -#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "delayabit" #define CONFIG_AUTOBOOT_STOP_STR " " /* easy to stop for now */ #endif diff --git a/include/configs/atngw100.h b/include/configs/atngw100.h index 84d235e..f040b86 100644 --- a/include/configs/atngw100.h +++ b/include/configs/atngw100.h @@ -82,8 +82,8 @@ #define CONFIG_BOOTDELAY 1 #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_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/atstk1002.h b/include/configs/atstk1002.h index 90910bb..68f0cec 100644 --- a/include/configs/atstk1002.h +++ b/include/configs/atstk1002.h @@ -110,8 +110,8 @@ #define CONFIG_BOOTDELAY 1 #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_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/atstk1003.h b/include/configs/atstk1003.h index 03472a8..d3a2f69 100644 --- a/include/configs/atstk1003.h +++ b/include/configs/atstk1003.h @@ -110,8 +110,8 @@ #define CONFIG_BOOTDELAY 1 #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_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/atstk1004.h b/include/configs/atstk1004.h index 07add82..a37ba92 100644 --- a/include/configs/atstk1004.h +++ b/include/configs/atstk1004.h @@ -110,8 +110,8 @@ #define CONFIG_BOOTDELAY 1 #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_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/atstk1006.h b/include/configs/atstk1006.h index f9af675..a6c5b6e 100644 --- a/include/configs/atstk1006.h +++ b/include/configs/atstk1006.h @@ -110,8 +110,8 @@ #define CONFIG_BOOTDELAY 1 #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_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/gth2.h b/include/configs/gth2.h index c2d6ca7..7f7190b 100644 --- a/include/configs/gth2.h +++ b/include/configs/gth2.h @@ -54,8 +54,9 @@ /* Only interrupt boot if space is pressed */ /* If a long serial cable is connected but */ /* other end is dead, garbage will be read */ -#define CONFIG_AUTOBOOT_KEYED 1 -#define CONFIG_AUTOBOOT_PROMPT "Press space to abort autoboot in %d second\n" +#define CONFIG_AUTOBOOT_KEYED 1 +#define CONFIG_AUTOBOOT_PROMPT \ + "Press space to abort autoboot in %d second\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "d" #define CONFIG_AUTOBOOT_STOP_STR " " diff --git a/include/configs/gw8260.h b/include/configs/gw8260.h index 7c2c224..d918782 100644 --- a/include/configs/gw8260.h +++ b/include/configs/gw8260.h @@ -279,7 +279,8 @@ * To stop use: " " */ #define CONFIG_AUTOBOOT_KEYED -#define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, press \" \" to stop\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "Autobooting in %d seconds, press \" \" to stop\n", bootdelay #define CONFIG_AUTOBOOT_STOP_STR " " #undef CONFIG_AUTOBOOT_DELAY_STR #define DEBUG_BOOTKEYS 0 diff --git a/include/configs/hymod.h b/include/configs/hymod.h index 01e7970..264192f 100644 --- a/include/configs/hymod.h +++ b/include/configs/hymod.h @@ -224,7 +224,7 @@ */ #define CONFIG_AUTOBOOT_KEYED #define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, " \ - "press to stop\n" + "press to stop\n", bootdelay #define CONFIG_AUTOBOOT_STOP_STR " " #undef CONFIG_AUTOBOOT_DELAY_STR #define DEBUG_BOOTKEYS 0 diff --git a/include/configs/linkstation.h b/include/configs/linkstation.h index d3908b9..bc64294 100644 --- a/include/configs/linkstation.h +++ b/include/configs/linkstation.h @@ -82,7 +82,8 @@ #undef CONFIG_BOOT_RETRY_TIME #define CONFIG_AUTOBOOT_KEYED -#define CONFIG_AUTOBOOT_PROMPT "Boot in %02d seconds ('s' to stop)..." +#define CONFIG_AUTOBOOT_PROMPT \ + "Boot in %02d seconds ('s' to stop)...", bootdelay #define CONFIG_AUTOBOOT_STOP_STR "s" #define CONFIG_CMD_IDE diff --git a/include/configs/lwmon.h b/include/configs/lwmon.h index 8a82702..87abfba 100644 --- a/include/configs/lwmon.h +++ b/include/configs/lwmon.h @@ -252,7 +252,8 @@ #define CONFIG_POST_KEY_MAGIC "3C+3E" /* press F3 + F5 keys to force POST */ #if 0 #define CONFIG_AUTOBOOT_KEYED /* Enable "password" protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nEnter password - autoboot in %d sec...\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR " " /* "password" */ #endif /*----------------------------------------------------------------------*/ diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h index cf406c8..2f3a066 100644 --- a/include/configs/lwmon5.h +++ b/include/configs/lwmon5.h @@ -277,7 +277,8 @@ #define CONFIG_POST_KEY_MAGIC "3C+3E" /* press F3 + F5 keys to force POST */ #if 0 #define CONFIG_AUTOBOOT_KEYED /* Enable "password" protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nEnter password - autoboot in %d sec...\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR " " /* "password" */ #endif diff --git a/include/configs/m501sk.h b/include/configs/m501sk.h index 060330e..e4be1ed 100644 --- a/include/configs/m501sk.h +++ b/include/configs/m501sk.h @@ -40,7 +40,6 @@ #define CONFIG_SETUP_MEMORY_TAGS 1 #define CONFIG_INITRD_TAG 1 -#undef CONFIG_AUTOBOOT_PROMPT #define CONFIG_MENUPROMPT "." /* diff --git a/include/configs/motionpro.h b/include/configs/motionpro.h index b6843af..3d1eafe 100644 --- a/include/configs/motionpro.h +++ b/include/configs/motionpro.h @@ -96,7 +96,7 @@ #undef CONFIG_AUTOBOOT_DELAY_STR #undef CONFIG_BOOTARGS #define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, " \ - "press \"\" to stop\n" + "press \"\" to stop\n", bootdelay #define CONFIG_ETHADDR 00:50:C2:40:10:00 #define CONFIG_OVERWRITE_ETHADDR_ONCE 1 diff --git a/include/configs/mp2usb.h b/include/configs/mp2usb.h index 2eb4af1..87264fb 100644 --- a/include/configs/mp2usb.h +++ b/include/configs/mp2usb.h @@ -230,7 +230,8 @@ #undef CONFIG_SILENT_CONSOLE /* enable silent startup */ #define CONFIG_AUTOBOOT_KEYED -#define CONFIG_AUTOBOOT_PROMPT "Press SPACE to abort autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "Press SPACE to abort autoboot in %d seconds\n", bootdelay #define CONFIG_AUTOBOOT_STOP_STR " " #define CONFIG_AUTOBOOT_DELAY_STR "d" diff --git a/include/configs/netstar.h b/include/configs/netstar.h index d4deda4..756b7c2 100644 --- a/include/configs/netstar.h +++ b/include/configs/netstar.h @@ -195,7 +195,8 @@ #if 0 /* feel free to disable for development */ #define CONFIG_AUTOBOOT_KEYED /* Enable password protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nNetStar PBX - boot in %d secs...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nNetStar PBX - boot in %d secs...\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "." /* 1st "password" */ #endif diff --git a/include/configs/ppmc8260.h b/include/configs/ppmc8260.h index 56b4d92..dee6643 100644 --- a/include/configs/ppmc8260.h +++ b/include/configs/ppmc8260.h @@ -228,7 +228,8 @@ * To stop use: " " */ # define CONFIG_AUTOBOOT_KEYED -# define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, press \" \" to stop\n" +# define CONFIG_AUTOBOOT_PROMPT \ + "Autobooting in %d seconds, press \" \" to stop\n", bootdelay # define CONFIG_AUTOBOOT_STOP_STR " " # undef CONFIG_AUTOBOOT_DELAY_STR # define DEBUG_BOOTKEYS 0 diff --git a/include/configs/quantum.h b/include/configs/quantum.h index f49e2b0..cc261c3 100644 --- a/include/configs/quantum.h +++ b/include/configs/quantum.h @@ -116,7 +116,8 @@ #define CONFIG_AUTOBOOT_KEYED /* Enable password protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nEnter password - autoboot in %d sec...\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "system" /* * Miscellaneous configurable options diff --git a/include/configs/rmu.h b/include/configs/rmu.h index 28fb7c3..596bf15 100644 --- a/include/configs/rmu.h +++ b/include/configs/rmu.h @@ -111,7 +111,8 @@ #define CONFIG_AUTOBOOT_KEYED /* Enable password protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nEnter password - autoboot in %d sec...\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "system" /* diff --git a/include/configs/sacsng.h b/include/configs/sacsng.h index 2a398e8..8427752 100644 --- a/include/configs/sacsng.h +++ b/include/configs/sacsng.h @@ -436,7 +436,7 @@ * To stop use: " " */ #define CONFIG_AUTOBOOT_KEYED -#define CONFIG_AUTOBOOT_PROMPT "Autobooting...\n" +#define CONFIG_AUTOBOOT_PROMPT "Autobooting...\n" #define CONFIG_AUTOBOOT_STOP_STR " " #undef CONFIG_AUTOBOOT_DELAY_STR #define CONFIG_ZERO_BOOTDELAY_CHECK diff --git a/include/configs/sbc8260.h b/include/configs/sbc8260.h index 7993137..b92344c 100644 --- a/include/configs/sbc8260.h +++ b/include/configs/sbc8260.h @@ -306,7 +306,8 @@ */ #undef CONFIG_AUTOBOOT_KEYED #ifdef CONFIG_AUTOBOOT_KEYED -# define CONFIG_AUTOBOOT_PROMPT "Autobooting in %d seconds, press \" \" to stop\n" +# define CONFIG_AUTOBOOT_PROMPT \ + "Autobooting in %d seconds, press \" \" to stop\n", bootdelay # define CONFIG_AUTOBOOT_STOP_STR " " # undef CONFIG_AUTOBOOT_DELAY_STR # define DEBUG_BOOTKEYS 0 diff --git a/include/configs/sc3.h b/include/configs/sc3.h index f6e40de..87311ea 100644 --- a/include/configs/sc3.h +++ b/include/configs/sc3.h @@ -132,7 +132,8 @@ #if 1 /* feel free to disable for development */ #define CONFIG_AUTOBOOT_KEYED /* Enable password protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nSC3 - booting... stop with ENTER\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nSC3 - booting... stop with ENTER\n" #define CONFIG_AUTOBOOT_DELAY_STR "\r" /* 1st "password" */ #define CONFIG_AUTOBOOT_DELAY_STR2 "\n" /* 1st "password" */ #endif diff --git a/include/configs/trab.h b/include/configs/trab.h index de36fca..b0615a0 100644 --- a/include/configs/trab.h +++ b/include/configs/trab.h @@ -289,7 +289,8 @@ #if 1 /* feel free to disable for development */ #define CONFIG_AUTOBOOT_KEYED /* Enable password protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n" +#define CONFIG_AUTOBOOT_PROMPT \ + "\nEnter password - autoboot in %d sec...\n", bootdelay #define CONFIG_AUTOBOOT_DELAY_STR "R" /* 1st "password" */ #endif diff --git a/include/configs/utx8245.h b/include/configs/utx8245.h index 287a618..1675ab7 100644 --- a/include/configs/utx8245.h +++ b/include/configs/utx8245.h @@ -58,7 +58,7 @@ #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } #define CONFIG_BOOTDELAY 2 -#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds\n" +#define CONFIG_AUTOBOOT_PROMPT "autoboot in %d seconds\n", bootdelay #define CONFIG_BOOTCOMMAND "run nfsboot" /* autoboot command */ #define CONFIG_BOOTARGS "root=/dev/ram console=ttyS0,57600" /* RAMdisk */ #define CONFIG_ETHADDR 00:AA:00:14:00:05 /* UTX5 */ -- cgit v0.10.2 From 2e752be39d3e398d4ab89ffa6634c397df298297 Mon Sep 17 00:00:00 2001 From: Guennadi Liakhovetski Date: Thu, 31 Jul 2008 12:35:04 +0200 Subject: Uncompressed images loaded to their start address shall set load_end too Signed-off-by: Guennadi Liakhovetski Acked-by: Bartlomiej Sieka diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 18682fe..18d7100 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -251,10 +251,9 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) memmove_wd ((void *)load_start, (void *)os_data, os_len, CHUNKSZ); - - load_end = load_start + os_len; - puts("OK\n"); } + load_end = load_start + os_len; + puts("OK\n"); break; case IH_COMP_GZIP: printf (" Uncompressing %s ... ", type_name); -- cgit v0.10.2 From cdb8bd2fd3bcbe65d8e4334a55f5a667845426a1 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 31 Jul 2008 15:56:01 +0200 Subject: apollon: fix build out of tree Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD diff --git a/Makefile b/Makefile index b104617..0f54121 100644 --- a/Makefile +++ b/Makefile @@ -346,10 +346,9 @@ $(U_BOOT_NAND): $(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin $(ONENAND_IPL): $(VERSION_FILE) $(obj)include/autoconf.mk - $(MAKE) -C $(obj)onenand_ipl/board/$(BOARDDIR) all + $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk - $(MAKE) -C $(obj)onenand_ipl/board/$(BOARDDIR) all cat $(obj)onenand_ipl/onenand-ipl-2k.bin $(obj)u-boot.bin > $(obj)u-boot-onenand.bin cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin @@ -2661,6 +2660,7 @@ zylonite_config : apollon_config : unconfig @mkdir -p $(obj)include + @mkdir -p $(obj)onenand_ipl/board/apollon @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h @$(MKCONFIG) $(@:_config=) arm arm1136 apollon NULL omap24xx @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk diff --git a/onenand_ipl/board/apollon/Makefile b/onenand_ipl/board/apollon/Makefile index f10ed02..1f996a4 100644 --- a/onenand_ipl/board/apollon/Makefile +++ b/onenand_ipl/board/apollon/Makefile @@ -1,6 +1,5 @@ include $(TOPDIR)/config.mk -include $(TOPDIR)/include/config.mk include $(TOPDIR)/onenand_ipl/board/$(BOARDDIR)/config.mk LDSCRIPT= $(TOPDIR)/onenand_ipl/board/$(BOARDDIR)/u-boot.onenand.lds @@ -9,8 +8,11 @@ AFLAGS += -DCONFIG_ONENAND_IPL CFLAGS += -DCONFIG_ONENAND_IPL OBJCLFAGS += --gap-fill=0x00 -SOBJS = start.o low_levelinit.o -COBJS = apollon.o onenand_read.o onenand_boot.o +SOBJS := low_levelinit.o +SOBJS += start.o +COBJS := apollon.o +COBJS += onenand_read.o +COBJS += onenand_boot.o SRCS := $(addprefix $(obj),$(SOBJS:.o=.S) $(COBJS:.o=.c)) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) @@ -34,28 +36,39 @@ $(onenandobj)onenand-ipl.bin: $(onenandobj)onenand-ipl $(onenandobj)onenand-ipl: $(OBJS) cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \ - -Map $(onenandobj)onenand-ipl.map \ - -o $(onenandobj)onenand-ipl + -Map $@.map -o $@ # create symbolic links from common files # from cpu directory $(obj)start.S: - rm -f $(obj)start.S - ln -s $(SRCTREE)/cpu/$(CPU)/start.S $(obj)start.S + @rm -f $@ + ln -s $(SRCTREE)/cpu/$(CPU)/start.S $@ # from onenand_ipl directory $(obj)onenand_ipl.h: - rm -f $(obj)onenand_ipl.h - ln -s $(SRCTREE)/onenand_ipl/onenand_ipl.h $(obj)onenand_ipl.h + @rm -f $@ + ln -s $(SRCTREE)/onenand_ipl/onenand_ipl.h $@ $(obj)onenand_boot.c: $(obj)onenand_ipl.h - rm -f $(obj)onenand_boot.c - ln -s $(SRCTREE)/onenand_ipl/onenand_boot.c $(obj)onenand_boot.c + @rm -f $@ + ln -s $(SRCTREE)/onenand_ipl/onenand_boot.c $@ $(obj)onenand_read.c: $(obj)onenand_ipl.h - rm -f $(obj)onenand_read.c - ln -s $(SRCTREE)/onenand_ipl/onenand_read.c $(obj)onenand_read.c + @rm -f $@ + ln -s $(SRCTREE)/onenand_ipl/onenand_read.c $@ + +ifneq ($(OBJTREE), $(SRCTREE)) +$(obj)apollon.c: + @rm -f $@ + ln -s $(SRCTREE)/onenand_ipl/board/$(BOARDDIR)/apollon.c $@ + +$(obj)low_levelinit.S: + @rm -f $@ + ln -s $(SRCTREE)/onenand_ipl/board/$(BOARDDIR)/low_levelinit.S $@ +endif + +######################################################################### $(obj)%.o: $(obj)%.S $(CC) $(AFLAGS) -c -o $@ $< @@ -63,6 +76,9 @@ $(obj)%.o: $(obj)%.S $(obj)%.o: $(obj)$.c $(CC) $(CFLAGS) -c -o $@ $< +# defines $(obj).depend target include $(SRCTREE)/rules.mk sinclude $(obj).depend + +######################################################################### -- cgit v0.10.2 From a5bcb01fbde6b1f1c9863cd86e5c4c369f0121ac Mon Sep 17 00:00:00 2001 From: Mark Jackson Date: Thu, 31 Jul 2008 15:56:48 +0100 Subject: Fix Atmel LCD controller endianess for AVR32 processors The Atmel lcd controller is used on Atmel's AT91 (little endian) and AVR32 (big endian) platforms. As such, the controller can handle both big and little endian memory. This patch fixes the driver for the AVR32 platform. Signed-off-by: Mark Jackson diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 27df449..b332a82 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -100,7 +100,11 @@ void lcd_ctrl_init(void *lcdbase) value << ATMEL_LCDC_CLKVAL_OFFSET); /* Initialize control register 2 */ +#ifdef CONFIG_AVR32 + value = ATMEL_LCDC_MEMOR_BIG | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE; +#else value = ATMEL_LCDC_MEMOR_LITTLE | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE; +#endif if (panel_info.vl_tft) value |= ATMEL_LCDC_DISTYPE_TFT; -- cgit v0.10.2 From a48311557db6e7e9473a6163b44bb1e6c6ed64c4 Mon Sep 17 00:00:00 2001 From: Mark Jackson Date: Thu, 31 Jul 2008 16:09:00 +0100 Subject: Add gzipped logo support The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows: If this option is set, additionally to standard BMP images, gzipped BMP images can be displayed via the splashscreen support or the bmp command. However, the splashscreen function *only* supports standard BMP images. This patch adds the documented gzip support. Signed-off-by: Mark Jackson diff --git a/common/lcd.c b/common/lcd.c index eec1f53..3bbc7ba 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -740,6 +740,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) } #endif +#ifdef CONFIG_VIDEO_BMP_GZIP +extern bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp); +#endif static void *lcd_logo (void) { @@ -761,6 +764,16 @@ static void *lcd_logo (void) addr = simple_strtoul(s, NULL, 16); do_splash = 0; +#ifdef CONFIG_VIDEO_BMP_GZIP + bmp_image_t *bmp = (bmp_image_t *)addr; + unsigned long len; + + if (!((bmp->header.signature[0]=='B') && + (bmp->header.signature[1]=='M'))) { + addr = (ulong)gunzip_bmp(addr, &len); + } +#endif + if (lcd_display_bitmap (addr, 0, 0) == 0) { return ((void *)lcd_base); } -- cgit v0.10.2 From 4b50cd12a3b3c644153c4cf393f4a4c12289e5aa Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 31 Jul 2008 17:54:03 +0200 Subject: Prepare v1.3.4-rc2: update CHANGELOG Signed-off-by: Wolfgang Denk diff --git a/CHANGELOG b/CHANGELOG index 0e317cb..7ff1a8a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,553 @@ +commit a48311557db6e7e9473a6163b44bb1e6c6ed64c4 +Author: Mark Jackson +Date: Thu Jul 31 16:09:00 2008 +0100 + + Add gzipped logo support + + The README file states that CONFIG_VIDEO_BMP_GZIP behaves as follows: + + If this option is set, additionally to standard BMP + images, gzipped BMP images can be displayed via the + splashscreen support or the bmp command. + + However, the splashscreen function *only* supports standard BMP images. + + This patch adds the documented gzip support. + + Signed-off-by: Mark Jackson + +commit a5bcb01fbde6b1f1c9863cd86e5c4c369f0121ac +Author: Mark Jackson +Date: Thu Jul 31 15:56:48 2008 +0100 + + Fix Atmel LCD controller endianess for AVR32 processors + + The Atmel lcd controller is used on Atmel's AT91 (little endian) and + AVR32 (big endian) platforms. + + As such, the controller can handle both big and little endian memory. + + This patch fixes the driver for the AVR32 platform. + + Signed-off-by: Mark Jackson + +commit cdb8bd2fd3bcbe65d8e4334a55f5a667845426a1 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Thu Jul 31 15:56:01 2008 +0200 + + apollon: fix build out of tree + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 2e752be39d3e398d4ab89ffa6634c397df298297 +Author: Guennadi Liakhovetski +Date: Thu Jul 31 12:35:04 2008 +0200 + + Uncompressed images loaded to their start address shall set load_end too + + Signed-off-by: Guennadi Liakhovetski + Acked-by: Bartlomiej Sieka + +commit c37207d7f51e19c17f859966f314e27cc1231801 +Author: Wolfgang Denk +Date: Wed Jul 16 16:38:59 2008 +0200 + + Fix printf() format problems with configurable prompts + + U-Boot allows for configurable prompt strings using the + CONFIG_AUTOBOOT_PROMPT resp. CONFIG_MENUPROMPT definitions. So far, + the assumption was that any such user defined problts would contain + exactly one "%d" format specifier. But some boards did not. + + To allow for flexible boot prompts without adding too complex code we + now allow to specify the whole list of printf() arguments in the user + definition. This is powerful, but requires a responsible user who + really understands what he is doing, as he needs to know for exanple + which variables are available in the respective context. + + Signed-off-by: Wolfgang Denk + +commit 54754120637b6a7f4ff774fb199fc550bcfea1da +Author: Wolfgang Denk +Date: Thu Jul 31 17:02:14 2008 +0200 + + TQM85xx: fix typo introduce by commit ffbb5cb9 + + Signed-off-by: Wolfgang Denk + +commit 0b4951d4cddca9cc800745891c95b291e47cbbd7 +Author: Wolfgang Denk +Date: Thu Jul 31 15:27:01 2008 +0200 + + mvbc_p board: fix most build warnings. + + Signed-off-by: Wolfgang Denk + +commit c4ec6db074051d2f6fc76a66411c60621b22bc02 +Author: Wolfgang Denk +Date: Thu Jul 31 13:57:20 2008 +0200 + + E1000: clean up CONFIG_E1000_FALLBACK_MAC handling + + Avoid "integer constant is too large for 'long' type" warnings. + And simplify the code. + + Signed-off-by: Wolfgang Denk + +commit 9196b44334c330cc13de2464c59181e4db71f549 +Author: Matvejchikov Ilya +Date: Wed Jul 30 23:21:19 2008 +0400 + + 8260: Making the use of gd->pci_clk dependant on the CONFIG_PCI + + Signed-off-by: Matvejchikov Ilya + +commit 6361ad4b596f5a940a01c91ae0297d98f790cbe0 +Author: Matvejchikov Ilya +Date: Wed Jul 30 23:20:32 2008 +0400 + + PPC: Add pci_clk in the global_data for CPM2 processors + + This patch adds pci_clk field to the global_data structure for the + processors which have CPM2 module in case the CONFIG_PCI is defined. + + Signed-off-by: Matvejchikov Ilya + +commit f0ff885ca64655bee6540eb8a25eed90b1152686 +Author: Kumar Gala +Date: Wed Jul 30 14:13:30 2008 -0500 + + mpc85xx: Update linker scripts for Freescale boards + + * Move to using absolute addressing always. Makes the scripts a bit more + portable and common + * Moved .bss after the end of the image. These allows us to have more + room in the resulting binary image for code and data. + * Removed .text object files that aren't really needed + * Make sure _end is 4-byte aligned as the .bss init code expects this. + (Its possible that the end of .bss isn't 4-byte aligned) + + Signed-off-by: Kumar Gala + +commit 57c219ad5d34dd9d49991777a62e3899595f2ec7 +Author: Kumar Gala +Date: Wed Jul 30 08:01:15 2008 -0500 + + Fix compile warnings in dlmalloc + + The origional code was using on odd reference to get to the first + real element in av_[]. The first two elements of the array are + not used for actual bins, but for house keeping. If we are more + explicit about how use the first few elements we can get rid of the + warnings: + + dlmalloc.c: In function 'malloc_extend_top': + dlmalloc.c:1971: warning: dereferencing type-punned pointer will break strict-aliasing rules + dlmalloc.c:1999: warning: dereferencing type-punned pointer will break strict-aliasing rules + dlmalloc.c:2029: warning: dereferencing type-punned pointer will break strict-aliasing rules + ... + + The logic of how this code came to be is: + bin_at(0) = (char*)&(av_[2]) - 2*SIZE_SZ + + SIZE_SZ is the size of pointer, and av_ is arry of pointers so: + bin_at(0) = &(av_[0]) + + Going from there to bin_at(0)->fd or bin_at(0)->size should be straight forward. + + Signed-off-by: Kumar Gala + +commit 3f9ae1a5d43c49a8ecf497470c3d1d80255e44b9 +Author: Stefan Roese +Date: Wed Jul 30 10:21:01 2008 +0200 + + ppc4xx: Fix W7OLMG compile problems by adding missing LM75 defines + + Signed-off-by: Stefan Roese + +commit ebb86c4ecd37a7701358284e497ca4c6483c7cc5 +Author: Stefan Roese +Date: Wed Jul 30 09:59:51 2008 +0200 + + cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)' + + A recent patch used '#if (CONFIG_CMD_USB)' instead of + '#if defined(CONFIG_CMD_USB)'. This patch fixes this problem and makes + common/bootm.c compile again. + + Signed-off-by: Stefan Roese + Acked-by: Markus Klotzbuecher + +commit 2cb9080427fe641dcb71da46cd0634dd406f37ed +Author: Kyungmin Park +Date: Tue Jul 22 08:01:43 2008 +0900 + + Remove unused I2C at apollon board + + There are no I2C devices on this board. + + Signed-off-by: Kyungmin Park + +commit 3c95960e526b3b026da20201db64526f46faf14b +Author: Wolfgang Denk +Date: Thu Jul 31 10:12:09 2008 +0200 + + at91rm9200dk, csb637: fix NAND related build problems + + Tried fixing NAND support for the at91rm9200dk board; untested. + Disabled NAND support in the csb637 board config file. + + Signed-off-by: Wolfgang Denk + +commit 09d318a8bb1444ec92e31cafcdba877eb9409e58 +Author: Kumar Gala +Date: Tue Jul 29 12:23:49 2008 -0500 + + fsl_i2c: Use timebase timer functions instead of get_timer() + + The current implementation of get_timer() is only really useful after we + have relocated u-boot to memory. The i2c code is used before that as part + of the SPD DDR setup. + + We actually have a bug when using the get_timer() code before relocation + because the .bss hasn't been setup and thus we could be reading/writing + a random location (probably in flash). + + Signed-off-by: Kumar Gala + +commit 4fc72a0d6ca85070a5e90d76cc5a853526ac09c4 +Author: Frank Svendsbøe +Date: Tue Jul 29 14:49:31 2008 +0200 + + Adder8xx: Fix CFG_MONITOR_LEN + + Due to increased space usage, U-Boot can no longer be stored in three sectors. + The current U-Boot use just over three flash sectors (197k), and U-Boot will + become corrupt after saving environment variables. This patch adds another 64k + to CFG_MONITOR_LEN. + + Signed-off-by: Frank E. Svendsbøe + +commit a4c59ad4a21140550ada6f97690d2527c4146ce5 +Author: Kyungmin Park +Date: Tue Jul 29 08:47:57 2008 +0900 + + Add OneNAND IPL related files to gitignore + + Signed-off-by: Kyungmin Park + +commit 8d87589e8e874df7120a3d9667f051bc33bac250 +Author: Rafal Jaworowski +Date: Mon Jul 28 20:38:25 2008 +0200 + + API: Teach the storage layer about SATA and MMC options. + + Signed-off-by: Rafal Czubak + Acked-by: Rafal Jaworowski + +commit 6b73b754f782e1ecce5048bf20b22ce56a07a5b8 +Author: Rafal Jaworowski +Date: Mon Jul 28 20:37:48 2008 +0200 + + API: Dump contents of sector 0 in the demo application. + + Signed-off-by: Rafal Czubak + Acked-by: Rafal Jaworowski + +commit 13ca6305f2eba49c175f6370c35286141059c789 +Author: Rafal Jaworowski +Date: Mon Jul 28 20:37:10 2008 +0200 + + API: Correct storage enumeration routine, other minor fixes in API storage area. + + Signed-off-by: Rafal Czubak + Acked-by: Rafal Jaworowski + +commit 05c7fe0f049b1c9eb9a1992f27e5e350d865f4a8 +Author: Rafal Jaworowski +Date: Mon Jul 28 20:36:19 2008 +0200 + + API: Fix compilation warnings in api_examples/demo.c. + + Signed-off-by: Rafal Czubak + +commit c14eefcc48212af2f3314809605698dd8393a90a +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Sun Jul 27 17:09:43 2008 +0200 + + Fix more printf() format warnings + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 936897d4d1365452bbbdf8430db5e7769ef08d38 +Author: Jean-Christophe PLAGNIOL-VILLARD +Date: Fri Jul 25 15:18:16 2008 +0200 + + Fix remaining CFG_CMD_ define, ifdef and comments + + Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD + +commit 5d1d00fb36005482e1803a00ddc46efa11d719af +Author: Stefano Babic +Date: Fri Jul 25 08:57:40 2008 +0200 + + Add include for config.h in command.h. + + Because the cmd_tbl_s structure depends on the configuration file, it + must be assured that config.h is included before the structure is + evaluated by the compiler. If this is not certain, it could happen + that the compiler generates structures of different size, depending + on the fact if the source file includes before or after + . + + The effect is that u-boot crashes when tries to relocate the command + table (for ppc) or try to access to the command table for other + architectures. + + The problem can happen on board-depending commands. All general + commands under /common are unaffected, because they include already + config.h before command.h. + + Signed-off-by: Stefano Babic + +commit 2dacb734bac9dba1db9e704d3e0b200ef521c79a +Author: Scott Wood +Date: Wed Jul 23 13:16:06 2008 -0500 + + NAND: $(obj)-qualify ecc.h in kilauea NAND boot Makefile. + + This fixes building out-of-tree. + + Signed-off-by: Scott Wood + +commit 36d59bd9da9e15d19b867b48449408830f4e2ad5 +Author: Heiko Schocher +Date: Wed Jul 23 07:30:46 2008 +0200 + + Fix warnings if compiling with IDE support. + + cmd_ide.c:827: Warnung: weak declaration of `ide_outb' after first use results in unspecified behavior + cmd_ide.c:839: Warnung: weak declaration of `ide_inb' after first use results in unspecified behavior + + Signed-off-by: Heiko Schocher + +commit 7610db17fd4d59c51d825488526d85ede2f06767 +Author: Adrian Filipi +Date: Tue Jul 22 14:28:11 2008 -0400 + + Removed support for the adsvix board. + + Support for the adsvix was originally provided by Applied Data + Systems (ADS), inc., now EuroTech, Inc. + The board never shipped aside from some sample boards. + + Signed-off-by: Adrian Filipi + +commit f96b44cef897bd372beb86dde1b33637c119d84d +Author: Remy Bohmer +Date: Tue Jul 22 16:22:11 2008 +0200 + + ARM: set GD_FLG_RELOC for boards skipping relocation to RAM + + If CONFIG_SKIP_RELOCATE_UBOOT is set the flag GD_FLG_RELOC is usually + never set, because relocation to RAM is actually never done by U-boot + itself. However, several pieces of code check if this flag is set at + some time. + + So, to make sure this flag is set on boards skipping relocation, this + is added to the initialisation of U-boot at a moment where it is safe + to do so. + + Signed-off-by: Remy Bohmer + +commit e4dafff86f289b5677143a3e41da7b45c6d27fc7 +Author: Timur Tabi +Date: Mon Jul 21 14:26:23 2008 -0500 + + fsl-i2c: fix writes to data segment before relocation + + Prevent i2c_init() in fsl_i2c.c from writing to the data segment before + relocation. Commit d8c82db4 added the ability for i2c_init() to program the + I2C bus speed and save the value in i2c_bus_speed[], which is a global + variable. It is an error to write to the data segment before relocation, + which is what i2c_init() does when it stores the bus speed in i2c_bus_speed[]. + + Signed-off-by: Timur Tabi + +commit dbd32387920e5ad6f9dd58a7b5012bbabe2a6a21 +Author: Wolfgang Ocker +Date: Mon Jul 28 16:56:51 2008 +0200 + + mips: Fix baudrate divisor computation on alchemy cpus + + Use CFG_MIPS_TIMER_FREQ when computing the baudrate divisor + on alchemy cpus. + + Signed-off-by: Wolfgang Ocker + Signed-off-by: Shinya Kuribayashi + +commit a229d291f33308ab7761d39f25fa1a53c0fc00a2 +Author: Haavard Skinnemoen +Date: Wed Jul 23 10:55:46 2008 +0200 + + spi flash: Fix printf() format warnings + + Signed-off-by: Haavard Skinnemoen + +commit 252a5e0738bcafaf25f7fbb40f19a59abc2cb13e +Author: Haavard Skinnemoen +Date: Wed Jul 23 10:55:31 2008 +0200 + + atmel_mci: Fix printf() format warnings + + Signed-off-by: Haavard Skinnemoen + +commit 7f4b009f4232d57084ce0ec5aeb3b57bccb08e4c +Author: Haavard Skinnemoen +Date: Wed Jul 23 10:55:15 2008 +0200 + + avr32: Fix printf() format warnings + + Signed-off-by: Haavard Skinnemoen + +commit a79c3e8d9c31db25d5ca3ec8e08a97f323410dd4 +Author: Haavard Skinnemoen +Date: Wed Jul 23 10:52:19 2008 +0200 + + avr32: asm/io.h needs asm/types.h + + map_physmem() takes a phys_addr_t as parameter. This type is defined in + asm/types.h, so we need to include that file. + + Signed-off-by: Haavard Skinnemoen + +commit 1953d128fd07f07d1c3810a28c0863ea64dae1b6 +Author: Michal Simek +Date: Thu Jul 17 12:25:46 2008 +0200 + + microblaze: Fix printf() format issues + + Signed-off-by: Michal Simek + +commit de2a07e534f18b1ca5f9869a4ef0604ca829cff0 +Author: Gururaja Hebbar K R +Date: Thu Jul 17 07:27:51 2008 +0530 + + Remove unused code from lib_arm/bootm.c + + Signed-off-by: Gururaja Hebbar + +commit ffbb5cb942e9856fa24e946977e0a60c64df04ab +Author: Detlev Zundel +Date: Wed Jul 16 18:56:45 2008 +0200 + + tqm85xx: Demystify 'DK: !!!' comment + + Signed-off-by: Detlev Zundel + +commit b2f44ba570f3a01113bbb745daf46f3858d22f53 +Author: Detlev Zundel +Date: Wed Jul 16 18:56:44 2008 +0200 + + 83xx/85xx/86xx: Add LTEDR local bus definitions + + Signed-off-by: Detlev Zundel + +commit f13f64cf42d5abec3e0f920233f6a7a61e7ae494 +Author: Ricardo Ribalda Delgado +Date: Wed Jul 16 16:22:32 2008 +0200 + + serial_xuartlite.c: fix compiler warnings + + Signed-off-by: Ricardo Ribalda Delgado + Acked-by: Grant Likely + +commit 86446d3a5d9d3ca81e85d1ccd3accaaae6f8e3c9 +Author: Stefan Roese +Date: Fri Jul 18 11:03:35 2008 +0200 + + POST: Add disable interrupts in some of the missing CPU POST tests + + Some CPU POST tests did not disable the interrupts while running. This + seems to be necessary to protect this self modifying code. + + Signed-off-by: Stefan Roese + +commit 97a3bf268d096e0e97e54048448c35114edcf557 +Author: Stefan Roese +Date: Fri Jul 18 10:43:24 2008 +0200 + + ide: Use CFG_64BIT_LBA instead of CFG_64BIT_STRTOUL + + This is needed for boards that define CFG_64BIT_STRTOUL but don't define + CFG_64BIT_LBA. + + Signed-off-by: Stefan Roese + +commit 0043ac55024963295fc79b39af85b6dc3b261e17 +Author: Niklaus Giger +Date: Fri Jul 18 11:22:23 2008 +0200 + + POST PPC4xx/spr IVPR only if PPC440 + + The SPR IVPR register is only present (as far as I know) for + processors with a PPC440 core. + + Signed-off-by: Niklaus Giger + Acked-by: Stefan Roese + +commit 1092fbd64748dfa2e979b102611ece9bc5ec1855 +Author: Stefan Roese +Date: Fri Jul 18 10:42:29 2008 +0200 + + ppc4xx: Enable 64bit printf format on 440/460 platforms + + This patch defines CFG_64BIT_VSPRINTF and CFG_64BIT_STRTOUL for all + 440/460 platforms. This may be needed since those platforms support + 36bit physical address space. + + Signed-off-by: Stefan Roese + +commit 66fe183b1dd9c7534605147a8ecfed1c02345ee5 +Author: Stefan Roese +Date: Fri Jul 18 15:57:23 2008 +0200 + + ppc4xx: Fix incorrect MODTx setup for some DIMM configurations + + This patch fixes a problem with incorrect MODTx (On Die Termination) + setup for a configuration with multiple DIMM's and multiple ranks. + Without this change Katmai was unable to boot Linux with DDR2 frequency + >= 533MHz and mem>=3GB. With this patch Katmai successfully boots Linux + with DDR2 frequency = 640MHz and mem=4GB. + + Signed-off-by: Stefan Roese + +commit 340ccb260f21516be360745d5c5e3bd0657698df +Author: Sebastian Siewior +Date: Wed Jul 16 20:04:49 2008 +0200 + + cfi_flash: fix flash on BE machines with CFG_WRITE_SWAPPED_DATA + + This got broken by commits 93c56f212c + [cfi_flash: support of long cmd in U-boot.] + + That command needs to be in little endian format on BE machines + with CFG_WRITE_SWAPPED_DATA. Without this patch, the command 0xf0 + gets saved on stack as 0x00 00 00 f0 and 0x00 gets written into + the cmdbuf in case portwidth = chipwidth = 8bit. + + Cc: Alexey Korolev + Cc: Vasiliy Leonenko + Signed-off-by: Sebastian Siewior + +commit 699f05125509249072a0b865c8d35520d97cd501 +Author: Wolfgang Denk +Date: Tue Jul 15 22:22:44 2008 +0200 + + Prepare v1.3.4-rc1: Code cleanup, update CHANGELOG, sort Makefile + + Signed-off-by: Wolfgang Denk + commit bcab74baa6b1b1c969038ab6f64a186239180405 Author: Hugo Villeneuve Date: Tue Jul 15 11:23:02 2008 -0400 diff --git a/Makefile b/Makefile index 0f54121..3179c67 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ VERSION = 1 PATCHLEVEL = 3 SUBLEVEL = 4 -EXTRAVERSION = -rc1 +EXTRAVERSION = -rc2 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) VERSION_FILE = $(obj)include/version_autogenerated.h -- cgit v0.10.2 From a58c78067c928976c082c758d3987e89ead5b191 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Fri, 1 Aug 2008 12:06:22 +0200 Subject: Fix build issues with MPC8xx FADS boards. Signed-off-by: Wolfgang Denk diff --git a/include/configs/ADS860.h b/include/configs/ADS860.h index 2ee8c61..f677b9c 100644 --- a/include/configs/ADS860.h +++ b/include/configs/ADS860.h @@ -51,7 +51,7 @@ /* This is picked up again in fads.h */ #define FADS_COMMANDS_ALREADY_DEFINED -#include "fads.h" +#include "../../board/fads/fads.h" #define CFG_PC_IDE_RESET ((ushort)0x0008) /* PC 12 */ -- cgit v0.10.2 From 5c40548f01218360a1f1395198c50ff45f3035b5 Mon Sep 17 00:00:00 2001 From: TsiChung Liew Date: Thu, 31 Jul 2008 19:52:28 -0500 Subject: Fix compile error caused by incorrect function return type Rename int mii_init(void) to void mii_init(void) for idmr ColdFire platform Signed-off-by: TsiChung Liew diff --git a/board/idmr/mii.c b/board/idmr/mii.c index f130e6e..78a7028 100644 --- a/board/idmr/mii.c +++ b/board/idmr/mii.c @@ -200,7 +200,7 @@ int mii_discover_phy(struct eth_device *dev) } #endif /* CFG_DISCOVER_PHY */ -int mii_init(void) __attribute__((weak,alias("__mii_init"))); +void mii_init(void) __attribute__((weak,alias("__mii_init"))); void __mii_init(void) { -- cgit v0.10.2 From 35d3bd3cc35c508a6823dac77e0fd126808e4fc7 Mon Sep 17 00:00:00 2001 From: TsiChung Liew Date: Thu, 31 Jul 2008 19:52:36 -0500 Subject: Fix compilation error for MCF5275 Rename OBJ to COBJ in board/platform/Makefile Signed-off-by: TsiChung Liew diff --git a/board/freescale/m5275evb/Makefile b/board/freescale/m5275evb/Makefile index f337a75..74c2528 100644 --- a/board/freescale/m5275evb/Makefile +++ b/board/freescale/m5275evb/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -OBJS = $(BOARD).o mii.o +COBJS = $(BOARD).o mii.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) -- cgit v0.10.2 From 01ae85b58b51d2fb1fac5b93095f6042cf48ae7b Mon Sep 17 00:00:00 2001 From: TsiChung Liew Date: Thu, 31 Jul 2008 19:53:06 -0500 Subject: Fix compilation error for TASREG TASREG is ColdFire platform, the include ppc4xx.h in board/esd/common/flash.c causes conflict. Signed-off-by: TsiChung Liew diff --git a/board/esd/common/flash.c b/board/esd/common/flash.c index dca10be..bda361e 100644 --- a/board/esd/common/flash.c +++ b/board/esd/common/flash.c @@ -22,7 +22,9 @@ */ #include +#ifdef __PPC__ #include +#endif #include flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */ -- cgit v0.10.2 From ac169d645f5f0e0b9a232563099209e92a355d8e Mon Sep 17 00:00:00 2001 From: TsiChung Liew Date: Thu, 31 Jul 2008 19:53:21 -0500 Subject: ColdFire: Fix compilation issue caused by a missing function Implement usec2ticks() which is used by fsl_i2c.c in lib_m68k/time.c Signed-off-by: TsiChung Liew diff --git a/lib_m68k/time.c b/lib_m68k/time.c index 28d371d..6eba784 100644 --- a/lib_m68k/time.c +++ b/lib_m68k/time.c @@ -199,6 +199,11 @@ unsigned long long get_ticks(void) return get_timer(0); } +unsigned long usec2ticks(unsigned long usec) +{ + return get_timer(usec); +} + /* * This function is derived from PowerPC code (timebase clock frequency). * On M68K it returns the number of timer ticks per second. -- cgit v0.10.2 From 2a433c66b1e2770349fe4911be23c375f053ebd8 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 1 Aug 2008 08:40:34 +0200 Subject: qemu_mips: update README to follow qemu update about default machine Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD diff --git a/doc/README.qemu_mips b/doc/README.qemu_mips index 476c5e6..c9ac3f3 100644 --- a/doc/README.qemu_mips +++ b/doc/README.qemu_mips @@ -15,4 +15,4 @@ create image: # dd of=flash bs=1k count=4k if=/dev/zero # dd of=flash bs=1k conv=notrunc if=u-boot.bin start it: -# qemu-system-mips -pflash flash -monitor null -nographic +# qemu-system-mips -M mips -pflash flash -monitor null -nographic -- cgit v0.10.2 From 1464eff77e7fdaed609ecf263a2423c9dcf96b1f Mon Sep 17 00:00:00 2001 From: Mark Jackson Date: Fri, 1 Aug 2008 09:48:29 +0100 Subject: Fix bitmap display for atmel lcd controller The current lcd_display_bitmap() function does not work properly for the Atmel LCD controller. 2 fixes need to be done:- (a) when setting the colour map, use the lcd_setcolreg() function as provided by the Atmel driver (b) the data is never actually written to the lcd framebuffer !! Signed-off-by: Mark Jackson diff --git a/common/lcd.c b/common/lcd.c index 3bbc7ba..e3347ec 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -678,6 +678,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) /* Set color map */ for (i=0; icolor_table[i]; +#if !defined(CONFIG_ATMEL_LCD) ushort colreg = ( ((cte.red) << 8) & 0xf800) | ( ((cte.green) << 3) & 0x07e0) | @@ -692,6 +693,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) #elif defined(CONFIG_MPC823) cmap--; #endif +#else /* CONFIG_ATMEL_LCD */ + lcd_setcolreg(i, cte.red, cte.green, cte.blue); +#endif } } #endif @@ -727,7 +731,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) for (i = 0; i < height; ++i) { WATCHDOG_RESET(); for (j = 0; j < width ; j++) -#if defined(CONFIG_PXA250) +#if defined(CONFIG_PXA250) || defined(CONFIG_ATMEL_LCD) *(fb++) = *(bmap++); #elif defined(CONFIG_MPC823) || defined(CONFIG_MCC200) *(fb++)=255-*(bmap++); -- cgit v0.10.2 From 5fa62000db6d0b46ecdeadbeb50faf5197db49ef Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 2 Aug 2008 23:48:34 +0200 Subject: mvbc_p: Fix problem with '#if (CONFIG_CMD_KGDB)' Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD diff --git a/include/configs/MVBC_P.h b/include/configs/MVBC_P.h index 48f427e..8c8a445 100644 --- a/include/configs/MVBC_P.h +++ b/include/configs/MVBC_P.h @@ -40,7 +40,7 @@ #define CONFIG_MISC_INIT_R 1 #define CFG_CACHELINE_SIZE 32 -#if (CONFIG_CMD_KGDB) +#ifdef (CONFIG_CMD_KGDB) #define CFG_CACHELINE_SHIFT 5 #endif @@ -268,7 +268,7 @@ #define CFG_PROMPT_HUSH_PS2 "> " #undef CFG_LONGHELP #define CFG_PROMPT "=> " -#if (CONFIG_CMD_KGDB) +#ifdef (CONFIG_CMD_KGDB) #define CFG_CBSIZE 1024 #else #define CFG_CBSIZE 256 -- cgit v0.10.2 From 81d3f1fdddafd1eb53bbca8739f488d417eb3dd2 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 2 Aug 2008 23:48:31 +0200 Subject: nios2: fix phys_addr_t and phys_size_t support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD diff --git a/cpu/nios2/interrupts.c b/cpu/nios2/interrupts.c index aeb5b65..ec5db31b 100644 --- a/cpu/nios2/interrupts.c +++ b/cpu/nios2/interrupts.c @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/include/asm-nios2/types.h b/include/asm-nios2/types.h index f13d8bd..ea859c0 100644 --- a/include/asm-nios2/types.h +++ b/include/asm-nios2/types.h @@ -52,6 +52,9 @@ typedef unsigned long long u64; /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; + +typedef unsigned long phys_addr_t; +typedef unsigned long phys_size_t; #endif /* __KERNEL__ */ #endif /* __ASM_NIOS2_TYPES_H */ -- cgit v0.10.2 From 66da6fa0e35e7ee56628c85981709afe7180fc8e Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 2 Aug 2008 23:48:33 +0200 Subject: Fix remaining build issues with MPC8xx FADS boards. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD diff --git a/include/configs/FADS860T.h b/include/configs/FADS860T.h index 18de6b0..38295c4 100644 --- a/include/configs/FADS860T.h +++ b/include/configs/FADS860T.h @@ -38,7 +38,7 @@ #define CONFIG_DRAM_50MHZ 1 #define CONFIG_SDRAM_50MHZ 1 -#include "fads.h" +#include "../../board/fads/fads.h" #ifdef USE_REAL_FLASH_VALUES /* diff --git a/include/configs/MPC86xADS.h b/include/configs/MPC86xADS.h index e0e8554..233a8d1 100644 --- a/include/configs/MPC86xADS.h +++ b/include/configs/MPC86xADS.h @@ -41,7 +41,7 @@ #define CONFIG_DRAM_50MHZ 1 #define CONFIG_SDRAM_50MHZ 1 -#include "fads.h" +#include "../../board/fads/fads.h" #define CFG_OR5_PRELIM 0xFFFF8110 /* 64Kbyte address space */ #define CFG_BR5_PRELIM (CFG_PHYDEV_ADDR | BR_PS_8 | BR_V) diff --git a/include/configs/MPC885ADS.h b/include/configs/MPC885ADS.h index 1867c5b..f4d1842 100644 --- a/include/configs/MPC885ADS.h +++ b/include/configs/MPC885ADS.h @@ -27,7 +27,7 @@ #define CONFIG_SDRAM_50MHZ 1 -#include "fads.h" +#include "../../board/fads/fads.h" #define CFG_OR5_PRELIM 0xFFFF8110 /* 64Kbyte address space */ #define CFG_BR5_PRELIM (CFG_PHYDEV_ADDR | BR_PS_8 | BR_V) -- cgit v0.10.2 From 4cd7e6528f61ec669755c3754bb4f9779874fab3 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 2 Aug 2008 23:48:32 +0200 Subject: nios2/sysid: fix printf warning Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD diff --git a/cpu/nios2/sysid.c b/cpu/nios2/sysid.c index b5a2959..697ed03 100644 --- a/cpu/nios2/sysid.c +++ b/cpu/nios2/sysid.c @@ -40,7 +40,7 @@ void display_sysid (void) stamp = readl (&sysid->timestamp); localtime_r (&stamp, &t); asctime_r (&t, asc); - printf ("SYSID : %08x, %s", readl (&sysid->id), asc); + printf ("SYSID : %08lx, %s", readl (&sysid->id), asc); } -- cgit v0.10.2 From 81091f58f0c58ecd26c5b05de2ae20ca6cdb521c Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 2 Aug 2008 23:48:30 +0200 Subject: drivers/serial: Move conditional compilation to Makefile for CONFIG_* macros Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index c9e797e..de6fbab 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile @@ -25,18 +25,18 @@ include $(TOPDIR)/config.mk LIB := $(obj)libserial.a -COBJS-y += atmel_usart.o -COBJS-y += mcfuart.o +COBJS-$(CONFIG_ATMEL_USART) += atmel_usart.o +COBJS-$(CONFIG_MCFUART) += mcfuart.o COBJS-y += ns9750_serial.o COBJS-y += ns16550.o -COBJS-y += s3c4510b_uart.o +COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o COBJS-y += serial.o -COBJS-y += serial_max3100.o +COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o COBJS-y += serial_pl010.o COBJS-y += serial_pl011.o -COBJS-y += serial_xuartlite.o +COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o COBJS-y += serial_sh.o -COBJS-y += usbtty.o +COBJS-$(CONFIG_USB_TTY) += usbtty.o COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c index f35b997..f3b146c 100644 --- a/drivers/serial/atmel_usart.c +++ b/drivers/serial/atmel_usart.c @@ -17,7 +17,6 @@ */ #include -#ifdef CONFIG_ATMEL_USART #include #include #include @@ -96,5 +95,3 @@ int serial_tstc(void) { return (usart3_readl(CSR) & USART3_BIT(RXRDY)) != 0; } - -#endif /* CONFIG_ATMEL_USART */ diff --git a/drivers/serial/mcfuart.c b/drivers/serial/mcfuart.c index 5eb4f45..a1fcd05 100644 --- a/drivers/serial/mcfuart.c +++ b/drivers/serial/mcfuart.c @@ -29,8 +29,6 @@ #include -#ifdef CONFIG_MCFUART - #include #include @@ -130,4 +128,3 @@ void serial_setbrg(void) uart->ucr = UART_UCR_RX_ENABLED | UART_UCR_TX_ENABLED; } -#endif /* CONFIG_MCFUART */ diff --git a/drivers/serial/s3c4510b_uart.c b/drivers/serial/s3c4510b_uart.c index ddcd591..aa378e1 100644 --- a/drivers/serial/s3c4510b_uart.c +++ b/drivers/serial/s3c4510b_uart.c @@ -45,8 +45,6 @@ #include -#ifdef CONFIG_DRIVER_S3C4510_UART - #include #include "s3c4510b_uart.h" @@ -212,5 +210,3 @@ void serial_puts (const char *s) uart->m_ctrl.bf.sendBreak = 0; } - -#endif diff --git a/drivers/serial/serial_max3100.c b/drivers/serial/serial_max3100.c index 0611fc1..4abc271 100644 --- a/drivers/serial/serial_max3100.c +++ b/drivers/serial/serial_max3100.c @@ -26,8 +26,6 @@ #include #include -#ifdef CONFIG_MAX3100_SERIAL - DECLARE_GLOBAL_DATA_PTR; /**************************************************************/ @@ -298,5 +296,3 @@ int serial_tstc(void) void serial_setbrg(void) { } - -#endif diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c index 74546ce..00d0eaa 100644 --- a/drivers/serial/serial_xuartlite.c +++ b/drivers/serial/serial_xuartlite.c @@ -27,8 +27,6 @@ #include #include -#ifdef CONFIG_XILINX_UARTLITE - #define RX_FIFO_OFFSET 0 /* receive FIFO, read only */ #define TX_FIFO_OFFSET 4 /* transmit FIFO, write only */ #define STATUS_REG_OFFSET 8 /* status register, read only */ @@ -77,5 +75,3 @@ int serial_tstc(void) { return (in_be32((u32 *) UARTLITE_STATUS) & SR_RX_FIFO_VALID_DATA); } - -#endif /* CONFIG_MICROBLZE */ diff --git a/drivers/serial/usbtty.c b/drivers/serial/usbtty.c index 2bc5c3c..e738c56 100644 --- a/drivers/serial/usbtty.c +++ b/drivers/serial/usbtty.c @@ -23,8 +23,6 @@ #include -#ifdef CONFIG_USB_TTY - #include #include #include "usbtty.h" @@ -1007,6 +1005,3 @@ void usbtty_poll (void) udc_irq(); } - - -#endif -- cgit v0.10.2 From 0eb5717a85b6cba3f67c11fa89bdde38dcd081b5 Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Wed, 6 Aug 2008 14:42:13 +0200 Subject: avr32: add support for EarthLCD Favr-32 board This patch adds support for the Favr-32 board made by EarthLCD. This kit, which is also called ezLCD-101 when running with EarthLCD firmware, has a 10.4" touch screen LCD panel, 16 MB 32-bit SDRAM, 8 MB parallel flash, Ethernet, audio out, USB device, SD-card slot, USART and various other connectors for cennecting stuff to SPI, I2C, GPIO, etc. Signed-off-by: Hans-Christian Egtvedt Signed-off-by: Haavard Skinnemoen diff --git a/MAINTAINERS b/MAINTAINERS index cbe5c47..0ff2add 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -709,6 +709,10 @@ Haavard Skinnemoen ATSTK1006 AT32AP7000 ATNGW100 AT32AP7000 +Hans-Christian Egtvedt + + FAVR-32-EZKIT AT32AP7000 + ######################################################################### # SuperH Systems: # # # diff --git a/MAKEALL b/MAKEALL index ee83cca..76dd334 100755 --- a/MAKEALL +++ b/MAKEALL @@ -714,6 +714,7 @@ LIST_avr32=" \ atstk1004 \ atstk1006 \ atngw100 \ + favr-32-ezkit \ " ######################################################################### diff --git a/Makefile b/Makefile index 3179c67..ebbf2bc 100644 --- a/Makefile +++ b/Makefile @@ -2911,6 +2911,9 @@ atstk1004_config : unconfig atstk1006_config : unconfig @$(MKCONFIG) $(@:_config=) avr32 at32ap atstk1000 atmel at32ap700x +favr-32-ezkit_config : unconfig + @$(MKCONFIG) $(@:_config=) avr32 at32ap favr-32-ezkit earthlcd at32ap700x + #======================================================================== # SH3 (SuperH) #======================================================================== diff --git a/board/earthlcd/favr-32-ezkit/Makefile b/board/earthlcd/favr-32-ezkit/Makefile new file mode 100644 index 0000000..3e67a65 --- /dev/null +++ b/board/earthlcd/favr-32-ezkit/Makefile @@ -0,0 +1,42 @@ +# +# (C) Copyright 2001-2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +# +# Copyright (C) 2008 Atmel Corporation +# +# See file CREDITS for list of people who contributed to this project. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place, Suite 330, Boston, MA 02111-1307 USA + +include $(TOPDIR)/config.mk + +LIB := $(obj)lib$(BOARD).a + +COBJS := $(BOARD).o flash.o + +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(AR) $(ARFLAGS) $@ $(OBJS) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +######################################################################### diff --git a/board/earthlcd/favr-32-ezkit/config.mk b/board/earthlcd/favr-32-ezkit/config.mk new file mode 100644 index 0000000..2337d62 --- /dev/null +++ b/board/earthlcd/favr-32-ezkit/config.mk @@ -0,0 +1,4 @@ +PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections +PLATFORM_LDFLAGS += --gc-sections +TEXT_BASE = 0x00000000 +LDSCRIPT = $(obj)board/earthlcd/favr-32-ezkit/u-boot.lds diff --git a/board/earthlcd/favr-32-ezkit/favr-32-ezkit.c b/board/earthlcd/favr-32-ezkit/favr-32-ezkit.c new file mode 100644 index 0000000..22b6981 --- /dev/null +++ b/board/earthlcd/favr-32-ezkit/favr-32-ezkit.c @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2008 Atmel Corporation + * + * See file CREDITS for list of people who contributed to this project. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include + +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +static const struct sdram_config sdram_config = { + /* MT48LC4M32B2P-6 (16 MB) */ + .data_bits = SDRAM_DATA_32BIT, + .row_bits = 12, + .col_bits = 8, + .bank_bits = 2, + .cas = 3, + .twr = 2, + .trc = 7, + .trp = 2, + .trcd = 2, + .tras = 5, + .txsr = 5, + /* 15.6 us */ + .refresh_period = (156 * (SDRAMC_BUS_HZ / 1000)) / 10000, +}; + +int board_early_init_f(void) +{ + /* Enable SDRAM in the EBI mux */ + hmatrix_slave_write(EBI, SFR, HMATRIX_BIT(EBI_SDRAM_ENABLE)); + + gpio_enable_ebi(); + gpio_enable_usart3(); +#if defined(CONFIG_MACB) + gpio_enable_macb0(); +#endif +#if defined(CONFIG_MMC) + gpio_enable_mmci(); +#endif + + return 0; +} + +phys_size_t initdram(int board_type) +{ + unsigned long expected_size; + unsigned long actual_size; + void *sdram_base; + + sdram_base = map_physmem(EBI_SDRAM_BASE, EBI_SDRAM_SIZE, MAP_NOCACHE); + + expected_size = sdram_init(sdram_base, &sdram_config); + actual_size = get_ram_size(sdram_base, expected_size); + + unmap_physmem(sdram_base, EBI_SDRAM_SIZE); + + if (expected_size != actual_size) + printf("Warning: Only %u of %u MiB SDRAM is working\n", + actual_size >> 20, expected_size >> 20); + + return actual_size; +} + +void board_init_info(void) +{ + gd->bd->bi_phy_id[0] = 0x01; +} + +#if defined(CONFIG_MACB) && defined(CONFIG_CMD_NET) +extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr); + +int board_eth_init(bd_t *bi) +{ + return macb_eth_initialize(0, (void *)MACB0_BASE, bi->bi_phy_id[0]); +} +#endif diff --git a/board/earthlcd/favr-32-ezkit/flash.c b/board/earthlcd/favr-32-ezkit/flash.c new file mode 100644 index 0000000..49a715a --- /dev/null +++ b/board/earthlcd/favr-32-ezkit/flash.c @@ -0,0 +1,230 @@ +/* + * Copyright (C) 2008 Atmel Corporation + * + * See file CREDITS for list of people who contributed to this project. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include + +#ifdef CONFIG_FAVR32_EZKIT_EXT_FLASH +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +flash_info_t flash_info[1]; + +static void flash_identify(uint16_t *flash, flash_info_t *info) +{ + unsigned long flags; + + flags = disable_interrupts(); + + dcache_flush_unlocked(); + + writew(0xaa, flash + 0x555); + writew(0x55, flash + 0xaaa); + writew(0x90, flash + 0x555); + info->flash_id = readl(flash); + writew(0xff, flash); + + readw(flash); + + if (flags) + enable_interrupts(); +} + +unsigned long flash_init(void) +{ + unsigned long addr; + unsigned int i; + + flash_info[0].size = CFG_FLASH_SIZE; + flash_info[0].sector_count = 135; + + flash_identify(uncached((void *)CFG_FLASH_BASE), &flash_info[0]); + + for (i = 0, addr = 0; i < 8; i++, addr += 0x2000) + flash_info[0].start[i] = addr; + for (; i < flash_info[0].sector_count; i++, addr += 0x10000) + flash_info[0].start[i] = addr; + + return CFG_FLASH_SIZE; +} + +void flash_print_info(flash_info_t *info) +{ + printf("Flash: Vendor ID: 0x%02x, Product ID: 0x%02x\n", + info->flash_id >> 16, info->flash_id & 0xffff); + printf("Size: %ld MB in %d sectors\n", + info->size >> 10, info->sector_count); +} + +int flash_erase(flash_info_t *info, int s_first, int s_last) +{ + unsigned long flags; + unsigned long start_time; + uint16_t *fb, *sb; + unsigned int i; + int ret; + uint16_t status; + + if ((s_first < 0) || (s_first > s_last) + || (s_last >= info->sector_count)) { + puts("Error: first and/or last sector out of range\n"); + return ERR_INVAL; + } + + for (i = s_first; i < s_last; i++) + if (info->protect[i]) { + printf("Error: sector %d is protected\n", i); + return ERR_PROTECTED; + } + + fb = (uint16_t *)uncached(info->start[0]); + + dcache_flush_unlocked(); + + for (i = s_first; (i <= s_last) && !ctrlc(); i++) { + printf("Erasing sector %3d...", i); + + sb = (uint16_t *)uncached(info->start[i]); + + flags = disable_interrupts(); + + start_time = get_timer(0); + + /* Unlock sector */ + writew(0xaa, fb + 0x555); + writew(0x70, sb); + + /* Erase sector */ + writew(0xaa, fb + 0x555); + writew(0x55, fb + 0xaaa); + writew(0x80, fb + 0x555); + writew(0xaa, fb + 0x555); + writew(0x55, fb + 0xaaa); + writew(0x30, sb); + + /* Wait for completion */ + ret = ERR_OK; + do { + /* TODO: Timeout */ + status = readw(sb); + } while ((status != 0xffff) && !(status & 0x28)); + + writew(0xf0, fb); + + /* + * Make sure the command actually makes it to the bus + * before we re-enable interrupts. + */ + readw(fb); + + if (flags) + enable_interrupts(); + + if (status != 0xffff) { + printf("Flash erase error at address 0x%p: 0x%02x\n", + sb, status); + ret = ERR_PROG_ERROR; + break; + } + } + + if (ctrlc()) + printf("User interrupt!\n"); + + return ERR_OK; +} + +int write_buff(flash_info_t *info, uchar *src, + ulong addr, ulong count) +{ + unsigned long flags; + uint16_t *base, *p, *s, *end; + uint16_t word, status, status1; + int ret = ERR_OK; + + if (addr < info->start[0] + || (addr + count) > (info->start[0] + info->size) + || (addr + count) < addr) { + puts("Error: invalid address range\n"); + return ERR_INVAL; + } + + if (addr & 1 || count & 1 || (unsigned int)src & 1) { + puts("Error: misaligned source, destination or count\n"); + return ERR_ALIGN; + } + + base = (uint16_t *)uncached(info->start[0]); + end = (uint16_t *)uncached(addr + count); + + flags = disable_interrupts(); + + dcache_flush_unlocked(); + sync_write_buffer(); + + for (p = (uint16_t *)uncached(addr), s = (uint16_t *)src; + p < end && !ctrlc(); p++, s++) { + word = *s; + + writew(0xaa, base + 0x555); + writew(0x55, base + 0xaaa); + writew(0xa0, base + 0x555); + writew(word, p); + + sync_write_buffer(); + + /* Wait for completion */ + status1 = readw(p); + do { + /* TODO: Timeout */ + status = status1; + status1 = readw(p); + } while (((status ^ status1) & 0x40) /* toggled */ + && !(status1 & 0x28)); /* error bits */ + + /* + * We'll need to check once again for toggle bit + * because the toggle bit may stop toggling as I/O5 + * changes to "1" (ref at49bv642.pdf p9) + */ + status1 = readw(p); + status = readw(p); + if ((status ^ status1) & 0x40) { + printf("Flash write error at address 0x%p: " + "0x%02x != 0x%02x\n", + p, status,word); + ret = ERR_PROG_ERROR; + writew(0xf0, base); + readw(base); + break; + } + + writew(0xf0, base); + readw(base); + } + + if (flags) + enable_interrupts(); + + return ret; +} + +#endif /* CONFIG_FAVR32_EZKIT_EXT_FLASH */ diff --git a/board/earthlcd/favr-32-ezkit/u-boot.lds b/board/earthlcd/favr-32-ezkit/u-boot.lds new file mode 100644 index 0000000..ad056b3 --- /dev/null +++ b/board/earthlcd/favr-32-ezkit/u-boot.lds @@ -0,0 +1,71 @@ +/* -*- Fundamental -*- + * + * Copyright (C) 2008 Atmel Corporation + * + * See file CREDITS for list of people who contributed to this project. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ +OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32") +OUTPUT_ARCH(avr32) +ENTRY(_start) + +SECTIONS +{ + . = 0; + _text = .; + .text : { + *(.exception.text) + *(.text) + *(.text.*) + } + _etext = .; + + .rodata : { + *(.rodata) + *(.rodata.*) + } + + . = ALIGN(8); + _data = .; + .data : { + *(.data) + *(.data.*) + } + + . = ALIGN(4); + __u_boot_cmd_start = .; + .u_boot_cmd : { + KEEP(*(.u_boot_cmd)) + } + __u_boot_cmd_end = .; + + . = ALIGN(4); + _got = .; + .got : { + *(.got) + } + _egot = .; + + . = ALIGN(8); + _edata = .; + + .bss (NOLOAD) : { + *(.bss) + *(.bss.*) + } + . = ALIGN(8); + _end = .; +} diff --git a/include/configs/favr-32-ezkit.h b/include/configs/favr-32-ezkit.h new file mode 100644 index 0000000..6f77c25 --- /dev/null +++ b/include/configs/favr-32-ezkit.h @@ -0,0 +1,201 @@ +/* + * Copyright (C) 2008 Atmel Corporation + * + * Configuration settings for the Favr-32 EarthLCD LCD kit. + * + * See file CREDITS for list of people who contributed to this project. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#define CONFIG_AVR32 1 +#define CONFIG_AT32AP 1 +#define CONFIG_AT32AP7000 1 +#define CONFIG_FAVR32_EZKIT 1 + +#define CONFIG_FAVR32_EZKIT_EXT_FLASH 1 + +/* + * Timer clock frequency. We're using the CPU-internal COUNT register + * for this, so this is equivalent to the CPU core clock frequency + */ +#define CFG_HZ 1000 + +/* + * Set up the PLL to run at 140 MHz, the CPU to run at the PLL + * frequency, the HSB and PBB at 1/2, and the PBA to run at 1/4 the + * PLL frequency. + * (CFG_OSC0_HZ * CFG_PLL0_MUL) / CFG_PLL0_DIV = PLL MHz + */ +#define CONFIG_PLL 1 +#define CFG_POWER_MANAGER 1 +#define CFG_OSC0_HZ 20000000 +#define CFG_PLL0_DIV 1 +#define CFG_PLL0_MUL 7 +#define CFG_PLL0_SUPPRESS_CYCLES 16 +/* + * Set the CPU running at: + * PLL / (2^CFG_CLKDIV_CPU) = CPU MHz + */ +#define CFG_CLKDIV_CPU 0 +/* + * Set the HSB running at: + * PLL / (2^CFG_CLKDIV_HSB) = HSB MHz + */ +#define CFG_CLKDIV_HSB 1 +/* + * Set the PBA running at: + * PLL / (2^CFG_CLKDIV_PBA) = PBA MHz + */ +#define CFG_CLKDIV_PBA 2 +/* + * Set the PBB running at: + * PLL / (2^CFG_CLKDIV_PBB) = PBB MHz + */ +#define CFG_CLKDIV_PBB 1 + +/* + * The PLLOPT register controls the PLL like this: + * icp = PLLOPT<2> + * ivco = PLLOPT<1:0> + * + * We want icp=1 (default) and ivco=0 (80-160 MHz) or ivco=2 (150-240MHz). + */ +#define CFG_PLL0_OPT 0x04 + +#undef CONFIG_USART0 +#undef CONFIG_USART1 +#undef CONFIG_USART2 +#define CONFIG_USART3 1 + +/* User serviceable stuff */ +#define CONFIG_DOS_PARTITION 1 + +#define CONFIG_CMDLINE_TAG 1 +#define CONFIG_SETUP_MEMORY_TAGS 1 +#define CONFIG_INITRD_TAG 1 + +#define CONFIG_STACKSIZE (2048) + +#define CONFIG_BAUDRATE 115200 +#define CONFIG_BOOTARGS \ + "root=/dev/mtdblock1 rootfstype=jffs fbmem=1800k" + +#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 1 +#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 " " + +/* + * After booting the board for the first time, new ethernet addresses + * should be generated and assigned to the environment variables + * "ethaddr" and "eth1addr". This is normally done during production. + */ +#define CONFIG_OVERWRITE_ETHADDR_ONCE 1 +#define CONFIG_NET_MULTI 1 + +/* + * BOOTP options + */ +#define CONFIG_BOOTP_SUBNETMASK +#define CONFIG_BOOTP_GATEWAY + + +/* + * Command line configuration. + */ +#include + +#define CONFIG_CMD_ASKENV +#define CONFIG_CMD_DHCP +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT +#define CONFIG_CMD_JFFS2 +#define CONFIG_CMD_MMC + +#undef CONFIG_CMD_AUTOSCRIPT +#undef CONFIG_CMD_FPGA +#undef CONFIG_CMD_SETGETDCR +#undef CONFIG_CMD_XIMG + +#define CONFIG_ATMEL_USART 1 +#define CONFIG_MACB 1 +#define CONFIG_PIO2 1 +#define CFG_NR_PIOS 5 +#define CFG_HSDRAMC 1 +#define CONFIG_MMC 1 +#define CONFIG_ATMEL_MCI 1 + +#define CFG_DCACHE_LINESZ 32 +#define CFG_ICACHE_LINESZ 32 + +#define CONFIG_NR_DRAM_BANKS 1 + +/* External flash on Favr-32 */ +#if 0 +#define CFG_FLASH_CFI 1 +#define CFG_FLASH_CFI_DRIVER 1 +#endif + +#define CFG_FLASH_BASE 0x00000000 +#define CFG_FLASH_SIZE 0x800000 +#define CFG_MAX_FLASH_BANKS 1 +#define CFG_MAX_FLASH_SECT 135 + +#define CFG_MONITOR_BASE CFG_FLASH_BASE + +#define CFG_INTRAM_BASE INTERNAL_SRAM_BASE +#define CFG_INTRAM_SIZE INTERNAL_SRAM_SIZE +#define CFG_SDRAM_BASE EBI_SDRAM_BASE + +#define CFG_ENV_IS_IN_FLASH 1 +#define CFG_ENV_SIZE 65536 +#define CFG_ENV_ADDR (CFG_FLASH_BASE + CFG_FLASH_SIZE - CFG_ENV_SIZE) + +#define CFG_INIT_SP_ADDR (CFG_INTRAM_BASE + CFG_INTRAM_SIZE) + +#define CFG_MALLOC_LEN (256*1024) +#define CFG_DMA_ALLOC_LEN (16384) + +/* Allow 4MB for the kernel run-time image */ +#define CFG_LOAD_ADDR (EBI_SDRAM_BASE + 0x00400000) +#define CFG_BOOTPARAMS_LEN (16 * 1024) + +/* Other configuration settings that shouldn't have to change all that often */ +#define CFG_PROMPT "U-Boot> " +#define CFG_CBSIZE 256 +#define CFG_MAXARGS 16 +#define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16) +#define CFG_LONGHELP 1 + +#define CFG_MEMTEST_START EBI_SDRAM_BASE +#define CFG_MEMTEST_END (CFG_MEMTEST_START + 0x700000) +#define CFG_BAUDRATE_TABLE { 115200, 38400, 19200, 9600, 2400 } + +#endif /* __CONFIG_H */ -- cgit v0.10.2