]> git.sur5r.net Git - u-boot/commitdiff
Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx
authorTom Rini <trini@ti.com>
Mon, 22 Oct 2012 23:54:38 +0000 (16:54 -0700)
committerTom Rini <trini@ti.com>
Mon, 22 Oct 2012 23:54:38 +0000 (16:54 -0700)
246 files changed:
.gitignore
Makefile
README
arch/arm/cpu/arm920t/ep93xx/u-boot.lds
arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
arch/arm/cpu/ixp/u-boot.lds
arch/arm/cpu/u-boot.lds
arch/arm/imx-common/cmd_bmode.c
arch/arm/lib/board.c
arch/avr32/cpu/u-boot.lds
arch/avr32/lib/board.c
arch/blackfin/cpu/u-boot.lds
arch/m68k/lib/board.c
arch/microblaze/cpu/u-boot.lds
arch/mips/lib/board.c
arch/nds32/cpu/n1213/u-boot.lds
arch/nds32/lib/board.c
arch/nios2/cpu/u-boot.lds
arch/powerpc/cpu/74xx_7xx/u-boot.lds
arch/powerpc/cpu/mpc512x/u-boot.lds
arch/powerpc/cpu/mpc5xx/u-boot.lds
arch/powerpc/cpu/mpc5xxx/u-boot-customlayout.lds
arch/powerpc/cpu/mpc5xxx/u-boot.lds
arch/powerpc/cpu/mpc8220/u-boot.lds
arch/powerpc/cpu/mpc824x/u-boot.lds
arch/powerpc/cpu/mpc8260/u-boot.lds
arch/powerpc/cpu/mpc83xx/u-boot.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
arch/powerpc/cpu/mpc85xx/u-boot.lds
arch/powerpc/cpu/mpc86xx/u-boot.lds
arch/powerpc/cpu/ppc4xx/u-boot.lds
arch/sandbox/cpu/u-boot.lds
arch/sh/cpu/sh2/u-boot.lds
arch/sh/cpu/sh3/u-boot.lds
arch/sh/cpu/sh4/u-boot.lds
arch/sparc/lib/board.c
arch/x86/cpu/u-boot.lds
board/BuS/eb_cpu5282/u-boot.lds
board/LEOX/elpt860/u-boot.lds
board/RPXClassic/u-boot.lds
board/RPXClassic/u-boot.lds.debug
board/RPXlite/u-boot.lds
board/RPXlite/u-boot.lds.debug
board/RPXlite_dw/u-boot.lds
board/RPXlite_dw/u-boot.lds.debug
board/RRvision/u-boot.lds
board/actux1/u-boot.lds
board/actux2/u-boot.lds
board/actux3/u-boot.lds
board/adder/u-boot.lds
board/ait/cam_enc_4xx/u-boot-spl.lds
board/altera/nios2-generic/u-boot.lds
board/amcc/acadia/u-boot-nand.lds
board/amcc/bamboo/u-boot-nand.lds
board/amcc/canyonlands/u-boot-nand.lds
board/amcc/kilauea/u-boot-nand.lds
board/amcc/sequoia/u-boot-nand.lds
board/amcc/sequoia/u-boot-ram.lds
board/astro/mcf5373l/u-boot.lds
board/c2mon/u-boot.lds
board/c2mon/u-boot.lds.debug
board/cobra5272/u-boot.lds
board/cogent/u-boot.lds
board/cogent/u-boot.lds.debug
board/cray/L1/u-boot.lds.debug
board/dave/PPChameleonEVB/u-boot.lds
board/davinci/da8xxevm/u-boot-spl-da850evm.lds
board/davinci/da8xxevm/u-boot-spl-hawk.lds
board/dbau1x00/u-boot.lds
board/dvlhost/u-boot.lds
board/eltec/mhpc/u-boot.lds
board/eltec/mhpc/u-boot.lds.debug
board/emk/top860/u-boot.lds
board/ep88x/u-boot.lds
board/esd/dasa_sim/u-boot.lds
board/esd/pmc440/u-boot-nand.lds
board/esd/tasreg/u-boot.lds
board/esteem192e/u-boot.lds
board/etx094/u-boot.lds
board/evb64260/u-boot.lds
board/fads/u-boot.lds
board/flagadm/u-boot.lds
board/flagadm/u-boot.lds.debug
board/freescale/m5208evbe/u-boot.lds
board/freescale/m52277evb/u-boot.lds
board/freescale/m5235evb/u-boot.lds
board/freescale/m5249evb/u-boot.lds
board/freescale/m5253demo/u-boot.lds
board/freescale/m5253evbe/u-boot.lds
board/freescale/m5271evb/u-boot.lds
board/freescale/m5272c3/u-boot.lds
board/freescale/m5275evb/u-boot.lds
board/freescale/m5282evb/u-boot.lds
board/freescale/m53017evb/u-boot.lds
board/freescale/m5329evb/u-boot.lds
board/freescale/m5373evb/u-boot.lds
board/freescale/m54451evb/u-boot.lds
board/freescale/m54455evb/u-boot.lds
board/freescale/m547xevb/u-boot.lds
board/freescale/m548xevb/u-boot.lds
board/freescale/mx31ads/u-boot.lds
board/gaisler/gr_cpci_ax2000/u-boot.lds
board/gaisler/gr_ep2s60/u-boot.lds
board/gaisler/gr_xc3s_1500/u-boot.lds
board/gaisler/grsim/u-boot.lds
board/gaisler/grsim_leon2/u-boot.lds
board/gen860t/u-boot-flashenv.lds
board/gen860t/u-boot.lds
board/genietv/u-boot.lds
board/genietv/u-boot.lds.debug
board/hermes/u-boot.lds
board/hermes/u-boot.lds.debug
board/hymod/u-boot.lds
board/hymod/u-boot.lds.debug
board/icu862/u-boot.lds
board/icu862/u-boot.lds.debug
board/idmr/u-boot.lds
board/incaip/u-boot.lds
board/ip860/u-boot.lds
board/ip860/u-boot.lds.debug
board/ivm/u-boot.lds
board/ivm/u-boot.lds.debug
board/korat/u-boot-F7FC.lds
board/kup/kup4k/u-boot.lds
board/kup/kup4k/u-boot.lds.debug
board/kup/kup4x/u-boot.lds
board/kup/kup4x/u-boot.lds.debug
board/lantec/u-boot.lds
board/lantec/u-boot.lds.debug
board/lubbock/lubbock.c
board/lwmon/u-boot.lds
board/lwmon/u-boot.lds.debug
board/manroland/uc100/u-boot.lds
board/matrix_vision/mvsmr/u-boot.lds
board/mbx8xx/u-boot.lds
board/mbx8xx/u-boot.lds.debug
board/micronas/vct/u-boot.lds
board/mousse/u-boot.lds
board/mousse/u-boot.lds.ram
board/mousse/u-boot.lds.rom
board/mpl/pip405/u-boot.lds.debug
board/mvblue/u-boot.lds
board/netphone/u-boot.lds
board/netphone/u-boot.lds.debug
board/netta/u-boot.lds
board/netta/u-boot.lds.debug
board/netta2/u-boot.lds
board/netta2/u-boot.lds.debug
board/netvia/u-boot.lds
board/netvia/u-boot.lds.debug
board/nx823/u-boot.lds
board/nx823/u-boot.lds.debug
board/openrisc/openrisc-generic/u-boot.lds
board/palmtc/palmtc.c
board/pb1x00/u-boot.lds
board/pxa255_idp/pxa_idp.c
board/qemu-mips/u-boot.lds
board/qi/qi_lb60/u-boot.lds
board/quantum/u-boot.lds
board/r360mpi/u-boot.lds
board/rbc823/u-boot.lds
board/renesas/sh7757lcr/u-boot.lds
board/rsdproto/u-boot.lds
board/samsung/smdk5250/smdk5250-uboot-spl.lds
board/samsung/smdk6400/u-boot-nand.lds
board/sandburst/karef/u-boot.lds.debug
board/sandburst/metrobox/u-boot.lds.debug
board/sandpoint/u-boot.lds
board/siemens/IAD210/u-boot.lds
board/sixnet/u-boot.lds
board/snmc/qs850/u-boot.lds
board/snmc/qs860t/u-boot.lds
board/spc1920/u-boot.lds
board/spd8xx/u-boot.lds
board/spd8xx/u-boot.lds.debug
board/stx/stxxtc/u-boot.lds
board/stx/stxxtc/u-boot.lds.debug
board/svm_sc8xx/u-boot.lds
board/ti/omap2420h4/omap2420h4.c
board/tqc/tqm8xx/u-boot.lds
board/trizepsiv/conxs.c
board/v37/u-boot.lds
board/vpac270/u-boot-spl.lds
board/w7o/u-boot.lds.debug
board/westel/amx860/u-boot.lds
board/westel/amx860/u-boot.lds.debug
board/xes/xpedite1000/u-boot.lds.debug
common/Makefile
common/bouncebuf.c [new file with mode: 0644]
common/cmd_cbfs.c [new file with mode: 0644]
common/cmd_help.c
common/command.c
common/usb.c
common/usb_storage.c
config.mk
disk/part.c
disk/part_efi.c
doc/DocBook/Makefile
doc/DocBook/linker_lists.tmpl [new file with mode: 0644]
doc/README.commands
drivers/mmc/Makefile
drivers/mmc/dw_mmc.c [new file with mode: 0644]
drivers/mmc/mmc.c
drivers/mmc/mmc_spi.c
drivers/mmc/mxsmmc.c
drivers/mmc/pxa_mmc.c [deleted file]
drivers/mmc/s5p_sdhci.c
drivers/mmc/sdhci.c
drivers/usb/host/ehci-fsl.c
examples/standalone/sparc.lds
fs/Makefile
fs/cbfs/Makefile [new file with mode: 0644]
fs/cbfs/cbfs.c [new file with mode: 0644]
helper.mk [new file with mode: 0644]
include/bouncebuf.h [new file with mode: 0644]
include/cbfs.h [new file with mode: 0644]
include/command.h
include/configs/apx4devkit.h
include/configs/coreboot.h
include/configs/lubbock.h
include/configs/m28evk.h
include/configs/mx28evk.h
include/configs/palmtc.h
include/configs/pxa255_idp.h
include/configs/trizepsiv.h
include/dwmmc.h [new file with mode: 0644]
include/ide.h
include/linker_lists.h [new file with mode: 0644]
include/sdhci.h
nand_spl/board/freescale/mpc8536ds/Makefile
nand_spl/board/freescale/mpc8569mds/Makefile
nand_spl/board/freescale/mpc8572ds/Makefile
nand_spl/board/freescale/mx31pdk/Makefile
nand_spl/board/freescale/mx31pdk/u-boot.lds
nand_spl/board/freescale/p1010rdb/Makefile
nand_spl/board/freescale/p1023rds/Makefile
nand_spl/board/freescale/p1_p2_rdb/Makefile
nand_spl/board/freescale/p1_p2_rdb_pc/Makefile
nand_spl/board/karo/tx25/Makefile
nand_spl/board/karo/tx25/u-boot.lds
nand_spl/board/samsung/smdk6400/u-boot.lds
spl/.gitignore
spl/Makefile

index d91e91b1e652dcac5a91e5f653e7d08e763e1d1c..1ac43f2825666d93f2f611e86ab2f735777bf83f 100644 (file)
@@ -38,6 +38,7 @@
 /u-boot.sha1
 /u-boot.dis
 /u-boot.lds
+/u-boot.lst
 /u-boot.ubl
 /u-boot.ais
 /u-boot.dtb
index 08eecbbbcdff22746e2febc856c8045f600ec6b6..328347d1775a4c78a4293bbebfe6165334462eac 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -260,7 +260,8 @@ LIBS-y += drivers/net/npe/libnpe.o
 endif
 LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o
 LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
-LIBS-y += fs/cramfs/libcramfs.o \
+LIBS-y += fs/cbfs/libcbfs.o \
+       fs/cramfs/libcramfs.o \
        fs/ext4/libext4fs.o \
        fs/fat/libfat.o \
        fs/fdos/libfdos.o \
@@ -533,9 +534,10 @@ GEN_UBOOT = \
                        $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot
 else
 GEN_UBOOT = \
-               UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
-               sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
-               cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \
+               UNDEF_LST=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
+               sed  -n -e 's/.*\($(SYM_PREFIX)_u_boot_list_.*\)/-u\1/p'|sort|uniq`;\
+               cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
+                       $$UNDEF_LST $(__OBJS) \
                        --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
                        -Map u-boot.map -o u-boot
 endif
@@ -568,8 +570,12 @@ $(SUBDIR_EXAMPLES): $(obj)u-boot
 $(LDSCRIPT):   depend
                $(MAKE) -C $(dir $@) $(notdir $@)
 
-$(obj)u-boot.lds: $(LDSCRIPT)
-               $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates u-boot.lst,
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(obj)include/u-boot.lst, $(LIBBOARD) $(LIBS)))
+$(obj)u-boot.lds: $(LDSCRIPT) $(obj)include/u-boot.lst
+               $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 nand_spl:      $(TIMESTAMP_FILE) $(VERSION_FILE) depend
                $(MAKE) -C nand_spl/board/$(BOARDDIR) all
@@ -808,6 +814,7 @@ clean:
               $(obj)board/matrix_vision/*/bootscript.img                 \
               $(obj)board/voiceblue/eeprom                               \
               $(obj)u-boot.lds                                           \
+              $(obj)include/u-boot.lst                                   \
               $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]          \
               $(obj)arch/blackfin/cpu/init.{lds,elf}
        @rm -f $(obj)include/bmp_logo.h
@@ -841,8 +848,10 @@ clobber:   tidy
        @rm -f $(obj)u-boot.dtb
        @rm -f $(obj)u-boot.sb
        @rm -f $(obj)u-boot.spr
-       @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}
-       @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.lds,u-boot-spl.map}
+       @rm -f $(obj)nand_spl/{u-boot.{lds,lst},System.map}
+       @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map}
+       @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map}
+       @rm -f $(obj)spl/{u-boot-spl.lds,u-boot.lst}
        @rm -f $(obj)MLO
        @rm -f $(obj)tools/xway-swap-bytes
        @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c
diff --git a/README b/README
index 4dad1594eb17a8678e4db4d5c31f6782fa5825a3..69da2b86ba14219d735fe401af34d46a54ab0433 100644 (file)
--- a/README
+++ b/README
@@ -1090,7 +1090,7 @@ The following options need to be configured:
                CONFIG_CALXEDA_XGMAC
                Support for the Calxeda XGMAC device
 
-               CONFIG_DRIVER_LAN91C96
+               CONFIG_LAN91C96
                Support for SMSC's LAN91C96 chips.
 
                        CONFIG_LAN91C96_BASE
@@ -1100,7 +1100,7 @@ The following options need to be configured:
                        CONFIG_LAN91C96_USE_32_BIT
                        Define this to enable 32 bit addressing
 
-               CONFIG_DRIVER_SMC91111
+               CONFIG_SMC91111
                Support for SMSC's LAN91C111 chip
 
                        CONFIG_SMC91111_BASE
@@ -1322,6 +1322,13 @@ The following options need to be configured:
                This will also enable the command "fatwrite" enabling the
                user to write files to FAT.
 
+CBFS (Coreboot Filesystem) support
+               CONFIG_CMD_CBFS
+
+               Define this to enable support for reading from a Coreboot
+               filesystem. Available commands are cbfsinit, cbfsinfo, cbfsls
+               and cbfsload.
+
 - Keyboard Support:
                CONFIG_ISA_KEYBOARD
 
index dc6ba34082ecd33e58e8b989f83e82b84a3fe6f2..008ae891cafd8e47b8dc44ad9fc4b0918f37cdb1 100644 (file)
@@ -48,9 +48,11 @@ SECTIONS
        .got : { *(.got) }
 
        . = .;
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
        __bss_start = .;
index f8ea38c03d4758f261e063b710273e6ab66ac9e4..6dc681a313988550f78399232d6a6a7bcdff57ba 100644 (file)
@@ -50,9 +50,10 @@ SECTIONS
        }
 
        . = ALIGN(4);
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index afd3381e1675bd33457215f523d928590fb179f3..f3bd5e736757e756a4829206164052513d42e717 100644 (file)
@@ -50,9 +50,10 @@ SECTIONS
        }
 
        . = ALIGN(4);
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index 1d8efb213bf4f9198e4a43db16870d5b54f20afe..9979c3085360b19c5c5e585fc6f677ec84018857 100644 (file)
@@ -47,6 +47,11 @@ SECTIONS
 
        . = ALIGN(4);
        .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
+
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
+
        . = ALIGN(4);
        __image_copy_end = .;
        _end = .;
index 7199de4af1e317fed2cf01764d57d536f6c2f562..81d954f2de7fce029d5e74b81bdfcc00ff9b82cb 100644 (file)
@@ -46,9 +46,11 @@ SECTIONS
        . = ALIGN(4);
 
        . = .;
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index e49ca0c5522912ba8849182105cf141e04d0c6b3..227aaff1e60b822056736137e402faf6a3e707a9 100644 (file)
@@ -49,9 +49,11 @@ SECTIONS
        . = ALIGN(4);
 
        . = .;
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index 02fe72ed7faa2f418ad85bf7eabc2ea906c74b90..ddc14b099e6cdd4e46dbfe83bd0f1025bcebd0f9 100644 (file)
@@ -24,6 +24,7 @@
 #include <asm/io.h>
 #include <asm/imx-common/boot_mode.h>
 #include <malloc.h>
+#include <command.h>
 
 static const struct boot_mode *modes[2];
 
@@ -103,9 +104,11 @@ void add_board_boot_modes(const struct boot_mode *p)
        int size;
        char *dest;
 
-       if (__u_boot_cmd_bmode.usage) {
-               free(__u_boot_cmd_bmode.usage);
-               __u_boot_cmd_bmode.usage = NULL;
+       cmd_tbl_t *entry = ll_entry_get(cmd_tbl_t, bmode, cmd);
+
+       if (entry->usage) {
+               free(entry->usage);
+               entry->usage = NULL;
        }
 
        modes[0] = p;
@@ -114,6 +117,6 @@ void add_board_boot_modes(const struct boot_mode *p)
        dest = malloc(size);
        if (dest) {
                create_usage(dest);
-               __u_boot_cmd_bmode.usage = dest;
+               entry->usage = dest;
        }
 }
index 99cb54b8d8c88e1ef4a7e81e8a8b72e747169a29..92cad9a6eb1a8c2f0b71ad7d6c19bb61780fc383 100644 (file)
 #include <miiphy.h>
 #endif
 
-#ifdef CONFIG_DRIVER_SMC91111
-#include "../drivers/net/smc91111.h"
-#endif
-#ifdef CONFIG_DRIVER_LAN91C96
-#include "../drivers/net/lan91c96.h"
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 ulong monitor_flash_len;
@@ -613,16 +606,6 @@ void board_init_r(gd_t *id, ulong dest_addr)
        /* enable exceptions */
        enable_interrupts();
 
-       /* Perform network card initialisation if necessary */
-#if defined(CONFIG_DRIVER_SMC91111) || defined (CONFIG_DRIVER_LAN91C96)
-       /* XXX: this needs to be moved to board init */
-       if (getenv("ethaddr")) {
-               uchar enetaddr[6];
-               eth_getenv_enetaddr("ethaddr", enetaddr);
-               smc_set_mac_addr(enetaddr);
-       }
-#endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
-
        /* Initialize from environment */
        load_addr = getenv_ulong("loadaddr", 16, load_addr);
 
index 0e532f234e4c3d0a0350dba456433d308fb66c9d..0b16d2a883d9bc3e9303889962ee73bf8aaee018 100644 (file)
@@ -47,11 +47,11 @@ SECTIONS
        }
 
        . = ALIGN(4);
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : {
-               KEEP(*(.u_boot_cmd))
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
        }
-       __u_boot_cmd_end = .;
 
        . = ALIGN(4);
        _got = .;
index 9d3b76e15ae8504551eeb23a15f9ac84aa19e5f8..e3287c486b1b985d462e1085b20cb09b8db781b7 100644 (file)
@@ -272,8 +272,8 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
        /*
         * We have to relocate the command table manually
         */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+                       ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
        /* there are some other pointer constants we must deal with */
index 2b8d285e1f420a52be8d99c1e1dbbb3e0ff2a7e1..58db838fb02bbd950b2fed3ead12858e22477791 100644 (file)
@@ -112,11 +112,9 @@ SECTIONS
                CONSTRUCTORS
        } >ram_data
 
-       .u_boot_cmd :
-       {
-               ___u_boot_cmd_start = .;
-               *(.u_boot_cmd)
-               ___u_boot_cmd_end = .;
+
+       .u_boot_list : {
+               #include <u-boot.lst>
        } >ram_data
 
        .text_l1 :
index 92f935bd0183e439aa7465a865a78f28031df613..02d73fda6111045052d5be20e1efe19e833bbc14 100644 (file)
@@ -416,8 +416,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
        /*
         * We have to relocate the command table manually
         */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+                       ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
        /* there are some other pointer constants we must deal with */
index d033a2835b362f48381390da2ce4649aeb38086d..4297b9344313af12b181ae084a109e88dc8afe8c 100644 (file)
@@ -50,12 +50,9 @@ SECTIONS
                __data_end = .;
        }
 
-       .u_boot_cmd ALIGN(0x4):
-       {
-               . = .;
-               __u_boot_cmd_start = .;
-               *(.u_boot_cmd)
-               __u_boot_cmd_end = .;
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
 
        .bss ALIGN(0x4):
index b14b33efcd0bf20317f01a27b58194662aaeba14..7ddd77832cc5f165111d5b553d212002fa6d1047 100644 (file)
@@ -266,8 +266,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
        /*
         * We have to relocate the command table manually
         */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+                       ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
        /* there are some other pointer constants we must deal with */
index 190342062aa8ea3026e34bf4035557d46df0039c..cef19c51ee5fa2d43837106d8f0908b25ed2f69a 100644 (file)
@@ -52,9 +52,11 @@ SECTIONS
        }
 
        . = .;
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index 875f22013c04e429905577475e76b2b023745f31..91395cabf35dde2bbbc70c58a910270c1e407bf3 100644 (file)
@@ -320,8 +320,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
        /*
         * We have to relocate the command table manually
         */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+                       ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
        serial_initialize();
index 4856bd368d249338a535c9fecd518f3aac792975..d0eb80de0e9804d3c84de41c0bc9b496db6ab3aa 100644 (file)
@@ -45,13 +45,11 @@ SECTIONS
         * the initialization code relocates the command table as
         * well -- admittedly, this is just pure laziness ;-)
         */
-       __u_boot_cmd_start = .;
-       .u_boot_cmd :
-       {
-         *(.u_boot_cmd)
-       }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        /* INIT DATA sections - "Small" data (see the gcc -G option)
         * is always gp-relative. Here we make all init data sections
index 24823cd20fdb7d3dfd27348819b349c1edca6574..ecee439579ee0c32084da892d8cb931968bf5039 100644 (file)
@@ -62,9 +62,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 7a4d9270dfa10a80c0fd9efb4d27f3fe9fd5fe43..7faefba5558d2ce25f23a9c64dfd3e8ec0ff8a6d 100644 (file)
@@ -57,9 +57,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index e02b213d28ef3f52cfb4b005aa6504f81a215678..c91e146d26281cc293e295e20dc3c33ea23b8087 100644 (file)
@@ -65,9 +65,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 0c6c54e10a5e7bed0ced125e023d6833325ec365..ac7844dcf46077ef13c3aa01a37e3ff2c4ab2f36 100644 (file)
@@ -66,10 +66,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 5dcaec18202978818ac399b5ce5a63e111b9d56d..1f46eadb5d09f7b3055b631846f09e8fb5266f28 100644 (file)
@@ -60,9 +60,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 39bb42e1c943b454c8d03f31b475907e60791831..c1479544f95946e5a591cbb5813c574f0cdf895d 100644 (file)
@@ -59,9 +59,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index b30ce76e02a45dd784cb1a902bd47f5744dc109a..a7130125c7c1d2ccf07c7c79cf62c266fb83352f 100644 (file)
@@ -60,9 +60,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 60b71ecd70e9069b956579fbc3c9ded80698c5fb..42385fcc192324d584aea866627089b119b27ff6 100644 (file)
@@ -59,9 +59,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 2f4b9ad557e650118067f953299730486c4007ff..d699def9ddf28eb53f4539648fe05d2fe98fdeaa 100644 (file)
@@ -58,9 +58,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 8ba9399169de6d2773e2c01eca286ef407a178ca..f7c4a22d29b42a80497bc578781bb47969103eb7 100644 (file)
@@ -70,9 +70,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 668158f7029ceae7d43666bd2e448c37d02c6c09..46dbaed1e06918cb6b7668113a4968e355ae2e7a 100644 (file)
@@ -53,6 +53,10 @@ SECTIONS
        }
        _edata  =  .;
 
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
+
        . = ALIGN(8);
        __init_begin = .;
        __init_end = .;
index efe34b774d65b2c338e487b13e9d3c02d4cd272d..4a40a1f51bea936d189a1374909cd1dee7097abd 100644 (file)
@@ -77,9 +77,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 121e529876e3b4cac4b193629a68b144ee77131f..8bfadf28dc2c2a8224814fea092d4af222d28309 100644 (file)
@@ -64,9 +64,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 2466b795940192173a0127e5b52c550e131e2bd4..a96ddd5577b66a46d7c66d7dfdb52f07cc246a49 100644 (file)
@@ -78,9 +78,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 99601387cbec979f81820dfd44731beb82e98b97..1b781ebf6ac17df8539f98e8a750d48a9ec5dde9 100644 (file)
 
 SECTIONS
 {
-       __u_boot_cmd_start = .;
-       _u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        __u_boot_sandbox_option_start = .;
        _u_boot_sandbox_getopt : { *(.u_boot_sandbox_getopt) }
index b86a82297fa1d3686cdb31a8a862d3333812fe1e..17f8091ea4ebfbc2c02e4b7ab2f7f10bcbff608f 100644 (file)
@@ -72,13 +72,10 @@ SECTIONS
        }
        PROVIDE (_egot = .);
 
-       PROVIDE (__u_boot_cmd_start = .);
-       .u_boot_cmd :
-       {
-               *(.u_boot_cmd)
-               . = ALIGN(4);
+
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
-       PROVIDE (__u_boot_cmd_end = .);
 
        PROVIDE (reloc_dst_end = .);
 
index 9bf8503640a944f47aeaaa8e3b6b2ae9aeb7a8c3..c8319610c2fe20d21b1a27f4290cc40ef68ecd04 100644 (file)
@@ -78,13 +78,10 @@ SECTIONS
        }
        PROVIDE (_egot = .);
 
-       PROVIDE (__u_boot_cmd_start = .);
-       .u_boot_cmd :
-       {
-               *(.u_boot_cmd)
-               . = ALIGN(4);
+
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
-       PROVIDE (__u_boot_cmd_end = .);
 
        PROVIDE (reloc_dst_end = .);
        /* _reloc_dst_end = .; */
index d9c70bce0910ad6a3566f5cc4c945102a3f401ae..0ecafcf5d94253ff74ab0846bcfee9618b9b85c8 100644 (file)
@@ -75,13 +75,10 @@ SECTIONS
        }
        PROVIDE (_egot = .);
 
-       PROVIDE (__u_boot_cmd_start = .);
-       .u_boot_cmd :
-       {
-               *(.u_boot_cmd)
-               . = ALIGN(4);
+
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
-       PROVIDE (__u_boot_cmd_end = .);
 
        PROVIDE (reloc_dst_end = .);
        /* _reloc_dst_end = .; */
index ff0e0f2fd04cce0b57a2f409c2cd76f91f4a9a63..32d025a34237c89c443314035f58c3f6264105f3 100644 (file)
@@ -246,8 +246,8 @@ void board_init_f(ulong bootflag)
        /*
         * We have to relocate the command table manually
         */
-       fixup_cmdtable(&__u_boot_cmd_start,
-               (ulong)(&__u_boot_cmd_end - &__u_boot_cmd_start));
+       fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd),
+                       ll_entry_count(cmd_tbl_t, cmd));
 #endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */
 
 #if defined(CONFIG_CMD_AMBAPP) && defined(CONFIG_SYS_AMBAPP_PRINT_ON_STARTUP)
index fe28030d849a8e143ec75f9a7994a3391c49c5c7..a1ecefafc64326bce747cfab1138c545651a35a8 100644 (file)
@@ -33,10 +33,11 @@ SECTIONS
        .text  : { *(.text*); }
 
        . = ALIGN(4);
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
        .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
index 4ba1964f7ef44d0331a3a43622939cddb33894ab..0c92d31f616415efa03377446929559a92acb8bf 100644 (file)
@@ -65,9 +65,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 5aaf6b309d8eda7be637e2b352af588d727418fa..2bb876d689e0e7372324632c9d714a9b32fd9e53 100644 (file)
@@ -86,9 +86,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 99c48f28d4e491353d27be03e86bb909edea9614..dc8c4e958f1c7c58250914c6b822a92db922f087 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 99c48f28d4e491353d27be03e86bb909edea9614..dc8c4e958f1c7c58250914c6b822a92db922f087 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 4491edd944b57780c6a83f262a84d8403a2883b0..b43a1e4281fffb7e438167283addf21e0d1a0fa8 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 838537375b3fefd55c8cb2359787b2553282d3fb..748e5113ef61859566fdada7f573490bbaaf8bd5 100644 (file)
@@ -71,9 +71,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 63fd356097ca625dac6b1453c8c9ad068ed6d18e..c41eed0e6f08c71812792e1398e118bba6100196 100644 (file)
@@ -54,11 +54,11 @@ SECTIONS
                *(.got)
        }
        . =.;
-       __u_boot_cmd_start =.;
-       .u_boot_cmd : {
-               *(.u_boot_cmd)
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
        }
-       __u_boot_cmd_end =.;
 
        . = ALIGN (4);
        .rel.dyn : {
index 9885d06b8e72880cfa8d4edfb5429c589b0f312c..84099840b55b35b78539623ee97ec6bdb0a37c07 100644 (file)
@@ -54,11 +54,11 @@ SECTIONS
                *(.got)
        }
        . =.;
-       __u_boot_cmd_start =.;
-       .u_boot_cmd : {
-               *(.u_boot_cmd)
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
        }
-       __u_boot_cmd_end =.;
 
        . = ALIGN (4);
        .rel.dyn : {
index 4a1c75aecc436cd7d2ad0f1c9bee4d440e53fd65..a3bd02b0d2b2a016561ed2692fd70410df456bc7 100644 (file)
@@ -54,11 +54,11 @@ SECTIONS
                *(.got)
        }
        . =.;
-       __u_boot_cmd_start =.;
-       .u_boot_cmd : {
-               *(.u_boot_cmd)
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
        }
-       __u_boot_cmd_end =.;
 
        . = ALIGN (4);
        .rel.dyn : {
index a7627699e76f04cd15cf086b55b28b2aec0465e5..73e2f3f9cfdc417fb23e3f70f0b1d36e21191aec 100644 (file)
@@ -62,9 +62,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 52c986e8a9ef0b11a18dbcdf96cd2281ac3ba159..656b2fbf890ba28104eccbb155521de4d3b221b4 100644 (file)
@@ -48,6 +48,10 @@ SECTIONS
        . = ALIGN(4);
        .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
        . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
+       } >.sram
+       . = ALIGN(4);
        .rel.dyn : {
                __rel_dyn_start = .;
                *(.rel*)
index 88ced629ec8e587e4db248a517619cfac74b6438..289386b35c837c7452b5bf022ea8861b62b67507 100644 (file)
@@ -46,13 +46,11 @@ SECTIONS
         * the initialization code relocates the command table as
         * well -- admittedly, this is just pure laziness ;-)
         */
-       __u_boot_cmd_start = .;
-       .u_boot_cmd :
-       {
-         *(.u_boot_cmd)
-       }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        /* INIT DATA sections - "Small" data (see the gcc -G option)
         * is always gp-relative. Here we make all init data sections
index ab67de2f76de392ed709a7c72e1f609252bf459a..beba978f8385d790933e694aab3da65ed6204395 100644 (file)
@@ -72,10 +72,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 3ad87095a1ba15d46270a64066d2fd4afdeb0c53..2dd00d7f420102f9be41038fd913b229671fa481 100644 (file)
@@ -73,10 +73,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 76f89f188d9302fd9d63701ff9089bdda7e98243..8ac5116296020be60075de4bff84b8ced9eb3b98 100644 (file)
@@ -73,10 +73,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index ab67de2f76de392ed709a7c72e1f609252bf459a..beba978f8385d790933e694aab3da65ed6204395 100644 (file)
@@ -72,10 +72,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 07ae8b1291f7b5d55d6b46a4adba3e07996f6051..18266efd094f4b93181a61e75f78b887da9f8987 100644 (file)
@@ -73,10 +73,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 423400ac665169a59734d6fa8416ad25145033bd..6b02784926f741b6fea77b24a9816038762664d3 100644 (file)
@@ -64,10 +64,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 19342ac21431fc69ea58c84380370e59af8e2983..bc40fd649d67cc4097f7458a513786b17242d942 100644 (file)
@@ -69,9 +69,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index b9b8e3c727420129f506cac912430025c8f78756..b854c180c48c1eeb968bec882c3684de0601572b 100644 (file)
@@ -74,9 +74,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index c7711028ad249f06b8fc1f77ac6ae2a2187331b0..92796e674448973b8237e56f5f07380f6d5d49e7 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index c4039edf432c3445c5811c941e2be606087bc072..d054f20bce087b4476d98e8f345ed8d966313949 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 2393d8d8af67d02e351d843cd2f31483048561d0..2a6027f814d83ab4707c1043d888b6c5062fe9ab 100644 (file)
@@ -70,9 +70,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 99c48f28d4e491353d27be03e86bb909edea9614..dc8c4e958f1c7c58250914c6b822a92db922f087 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index fcf8ebbf8ec9a1ef095476904fc5c6c6fbdc1cda..d7a2e560084621905bf1b76952243e654321a863 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 3b1011435405e3ff2dfe96aa7912248349b6e91b..8a306d6076f0ef6ec4ce49004adc3c018c0d5489 100644 (file)
@@ -74,9 +74,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 6f6e065a9f1e0d239c36f778ef0f5edd89e542f1..c5fd93c0f73084c385eaa6eba11dd46cd4d35d5b 100644 (file)
@@ -47,6 +47,12 @@ SECTIONS
 
        . = ALIGN(4);
        .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
+
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
+       } >.sram
+
        . = ALIGN(4);
        .rel.dyn : {
                __rel_dyn_start = .;
index b3a41afc42daa331e6761aabf749d6ec043603ff..86dc172ee24a470341b2f2c74e40a02fc4a4e427 100644 (file)
@@ -57,6 +57,11 @@ SECTIONS
                *(.data.rel.ro)
        }
 
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
+
        . = ALIGN(4);
        __rel_dyn_start = .;
        __rel_dyn_end = .;
index 4a59cea80f86aa0b7d1de31e28b7bf1cefd2939d..8a871cff49c7496a0f9fff3d8e4741c221d921c9 100644 (file)
@@ -54,10 +54,9 @@ SECTIONS
 
        .sdata  : { *(.sdata*) }
 
-       .u_boot_cmd : {
-         __u_boot_cmd_start = .;
-         *(.u_boot_cmd)
-         __u_boot_cmd_end = .;
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
 
        uboot_end_data = .;
index 01ec39008d6d88e69897f8c2dbf5c4b21198df72..1bd1700aa202272fb39ed9bf0cfcd2a4b3383623 100644 (file)
@@ -54,11 +54,11 @@ SECTIONS
                *(.got)
        }
        . =.;
-       __u_boot_cmd_start =.;
-       .u_boot_cmd : {
-               *(.u_boot_cmd)
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
        }
-       __u_boot_cmd_end =.;
 
        . = ALIGN (4);
        .rel.dyn : {
index fd4e8a50d543a62df0422cdb6c30af81e7cd8752..c8d38942c96d46216896859e59b2f6a408d1b34a 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index c7711028ad249f06b8fc1f77ac6ae2a2187331b0..92796e674448973b8237e56f5f07380f6d5d49e7 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index fb066486633a8b184ccd5a503ee19a64169e5d43..22626d392ae2bf5d7d5bf72f949bcd55d006b2bd 100644 (file)
@@ -67,9 +67,11 @@ SECTIONS
 
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 332b35a57d68bba3be2dd450bac71168348813ed..1dcc22a1918ab44593980990914b60d7a5618204 100644 (file)
@@ -62,9 +62,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index b15948d34c7d3a58d469171ab17005efd3bf856f..7eca18390b11a32aadab8e42ce592158f2333d13 100644 (file)
@@ -73,9 +73,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 71f0fd2c3e2a20871d85324d9e9d11f9c7840b93..ca7df4592ea4d14075ada0d9e2a71a365474366c 100644 (file)
@@ -102,10 +102,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+               #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index f697ccd515dcba0b910a8fe7768aa467277d18c6..0d6a0f3a3b27ff5c25f155be98e360e2b7522089 100644 (file)
@@ -65,9 +65,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 163b83d8199d0fc4941407c2760b711a3f823dc1..69f15000dbc6f8acb718e92804eee444054935fb 100644 (file)
@@ -75,9 +75,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 8465937d101486c96d82d0df3004d420ce6c3f2c..56c3470bde547a5045009cb2711da55c1a72f2bd 100644 (file)
@@ -75,9 +75,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 2d031efc4e93fde4868428ff775c7fba6f65a9cb..eac9c070e3ab42e449f1dc64c27b7df0143b14d9 100644 (file)
@@ -70,9 +70,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 9ea0674b887a40b588821eb4c8082984a986c164..6022dbce72227772b5c6cbd8bc0ae2cb6811b0f4 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index fd4e8a50d543a62df0422cdb6c30af81e7cd8752..c8d38942c96d46216896859e59b2f6a408d1b34a 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index c7711028ad249f06b8fc1f77ac6ae2a2187331b0..92796e674448973b8237e56f5f07380f6d5d49e7 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 6e39be169afb161e303a0d2b141e47b6dabe4413..2c151f20f57ced21ffc1e1140f995ed357dada3f 100644 (file)
@@ -69,9 +69,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 3e9f4c3460ed163cf9fe2df5bf3845a26c2c7252..dbd6f6ab201981987deaaa8e55fe172ed6832f3d 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index d39e7348b3a46de549b853f1c464515024809c41..00932ae68de2bdb276fffc052b6cbfa416bc1745 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index c4039edf432c3445c5811c941e2be606087bc072..d054f20bce087b4476d98e8f345ed8d966313949 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index cbd28312a0ae07b655df4fca5c143a51eabd79f7..f8116f601ee24ca8711f95fad1a0c817bf84a3c9 100644 (file)
@@ -69,9 +69,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index c4039edf432c3445c5811c941e2be606087bc072..d054f20bce087b4476d98e8f345ed8d966313949 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 4717036d50a8a15f58c0318b6df7ee0095c4e243..133ec01036b8a04d7be97551078aa6d2f3c6e801 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index c4039edf432c3445c5811c941e2be606087bc072..d054f20bce087b4476d98e8f345ed8d966313949 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 6c2dfe8ec4f6281c47e86a7ec90c8c31c1a8703c..fc68de1ba15c3ba06c74b2956449d009096994c7 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 500fefd445e5ad408f6ffa9811a5577a20b6043f..ad49874c5abdec0087478da98cce00c1c65620d5 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 80935f28bf3e1eee712681e7a4eb4a9aa71ade4a..d25a36f6518763a4db6b9d09f9df235380ef2c12 100644 (file)
@@ -71,9 +71,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 40af8bc23c4c24d9cbf0149aa965ae0dfc462a8f..6616594e7b0385642bb2fc2db6bb54c5549e1616 100644 (file)
@@ -69,9 +69,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 19342ac21431fc69ea58c84380370e59af8e2983..bc40fd649d67cc4097f7458a513786b17242d942 100644 (file)
@@ -69,9 +69,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 45924b751418b3fb0a10d10c3ed2f3992a637ba1..91328a4af66faca84e711392469fbb2ed331a1a9 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index f3414493469bb7b378c359a966d73e050b727a72..36a4c264b9255f54793b36a2e11b95141aa58f15 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 5472689b5b45f6bffa706f13d44c4a408ad1037d..de4d0eb9077646eccf8a00157c11ed9aac1bf391 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index cf3f38c0f3cd128966f7459965796d7b560bcb3a..fbbe0c5dc5ad928bf6e30748a68ea2c0fa9cafe4 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 79eb7aca387b10a66281f5c51a71508237e4a0ec..29ad0e6e79c94b856d669ebb3d24b44c0427ee34 100644 (file)
@@ -57,9 +57,11 @@ SECTIONS
        }
 
        . = ALIGN(4);
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index 87cb8e32bad9373409b169e338f74cc0a310a0e6..774c494f03547220dc9f956a2426ee011bb13109 100644 (file)
@@ -85,10 +85,11 @@ SECTIONS
 
        /* CMD Table */
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        .data   :
        {
index 2fb44aa832fc00351c379425e159652978c3bde8..f6d13014f311b407ad4a9185e07c0c4535993ce7 100644 (file)
@@ -85,10 +85,11 @@ SECTIONS
 
        /* CMD Table */
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        .data   :
        {
index 8719e97ee4dae0221f7aba0ba6a1f1ab3b2cde0a..7df6e833926f59f99a31dfd7c4ac9a1e7e7d486f 100644 (file)
@@ -85,10 +85,11 @@ SECTIONS
 
        /* CMD Table */
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        .data   :
        {
index 33890b504d59a8676de35b946787f32dd924446e..b241cbc1d044fbef9628dd279b994a23e76d9a8e 100644 (file)
@@ -84,10 +84,11 @@ SECTIONS
 
        /* CMD Table */
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        .data   :
        {
index cf6e5020ba1d6fbc57196180855fda36e858e03c..63c15b9117a40d3b4329fff5e6a9ef9e00be5456 100644 (file)
@@ -84,10 +84,11 @@ SECTIONS
 
        /* CMD Table */
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
+
        . = ALIGN(4);
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        .data   :
        {
index 5bb6c62d7124e47bc01f11cdff3120431ec0c5e7..1cbe7e32bad40a178bbd1bceadd817c5ad6210d7 100644 (file)
@@ -71,9 +71,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  .u_boot_list : {
+               #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index be99b512088fc0a84425efcb73e7894dc79731b3..dd89c70f56fe028d2a99940dac7d11ff724755a9 100644 (file)
@@ -71,9 +71,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 1d66a9b2bda15f129b7480b5d3a121c12f72ec87..124b1835164e98f8d07d0700c1130758e71f9561 100644 (file)
@@ -80,9 +80,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index cfa4ef3f875ca7e683e309fd4e329d698247df17..e1cf2496506f0ef8ce3aa72b0998a269d07e7a53 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index ca9711575d31af81e7d6a07533bac77b389d8045..f02eb1c2aa1fc1ff7b42622e01d8be4d7a60bd8a 100644 (file)
@@ -72,9 +72,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 8a197deef7331d1ea15a2fd0c98e2125bd0640b0..e84cc7991e7b45247d58102e26d37c5b1178e253 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 1309f209de546de73d85c6ef9b799d1b8cebdedf..7afae0a6257e6131f04519ac79b51d5f7ee4be85 100644 (file)
@@ -110,9 +110,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 99c48f28d4e491353d27be03e86bb909edea9614..dc8c4e958f1c7c58250914c6b822a92db922f087 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 93c79a64b4eddb5d8ef1865ac40f4086f3cf01ab..6778eb13add674fcd6fa4091f466ae5e776ec704 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 91d3e67e82bb567cd327834c1d34cc76c7d423a0..3e075a85bd14f27342f838ceeb0a8aebb2288b44 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index f697ccd515dcba0b910a8fe7768aa467277d18c6..0d6a0f3a3b27ff5c25f155be98e360e2b7522089 100644 (file)
@@ -65,9 +65,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 4a59cea80f86aa0b7d1de31e28b7bf1cefd2939d..8a871cff49c7496a0f9fff3d8e4741c221d921c9 100644 (file)
@@ -54,10 +54,9 @@ SECTIONS
 
        .sdata  : { *(.sdata*) }
 
-       .u_boot_cmd : {
-         __u_boot_cmd_start = .;
-         *(.u_boot_cmd)
-         __u_boot_cmd_end = .;
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
 
        uboot_end_data = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 2f61b11d8125768b820c09775313988e75b87974..e47aff0fa795f38cfa8ceab5c70e2b2bfe94fbec 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 1e843eb24ed300f6845cc4410e73649a97cb5f97..4cca65274810f2ce42ab44d2a3e0e52d97213b95 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 732a46f27213921f8aeb47f43f21c3f20e3b195f..53a19b2947316c3c01057fced4c61e0d5c5d9373 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 6a017e305cadfc4f78a9a057807ce74c7fc4d335..033cff42d9b6797445eea0d8809ee7b7196f84ab 100644 (file)
@@ -108,10 +108,10 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 4491edd944b57780c6a83f262a84d8403a2883b0..b43a1e4281fffb7e438167283addf21e0d1a0fa8 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 4491edd944b57780c6a83f262a84d8403a2883b0..b43a1e4281fffb7e438167283addf21e0d1a0fa8 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index de0b355a6287a6ecb69c62a62ec4cf22a4215cf7..94118024bd6408e63dc557fc3c4d16303e7021c4 100644 (file)
@@ -75,9 +75,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 856a99b6f9707701eab89f4242dc42f3793c6a59..e788f5c1703981651190fe5ac61bf539888b8e85 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 3527b381df6ddaf843386ce2d39b79f6b8433b72..ef2cc24aae8093c266ed5d44de4dc319c58626b8 100644 (file)
@@ -29,6 +29,7 @@
 #include <netdev.h>
 #include <asm/arch/pxa.h>
 #include <asm/arch/pxa-regs.h>
+#include <asm/arch/regs-mmc.h>
 #include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -56,6 +57,14 @@ int board_init (void)
        return 0;
 }
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+       pxa_mmc_register(0);
+       return 0;
+}
+#endif
+
 int board_late_init(void)
 {
        setenv("stdout", "serial");
index 8bf7324f37a240d4c111c2d8690e5c84ff97261c..bc71b0d2c1f4721dbae607e36b777ad3fd5ac997 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 241223481bc92ada6cdfe4afe179e2eb7430b98c..0a3e6466a9c4f01d46f344b4f8ee20ea6a2ff799 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 731cec9af70bc3d67f1942c885656ac9a6299832..e32ae37ea492fbc31c41b6b177a19b971fb4c6cc 100644 (file)
@@ -69,9 +69,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 57c37deb8928a4db7080e9b9f51f0cab0fec232d..5a3a9eabbfd29daf1e4b0a961f60b17fb9e377cf 100644 (file)
@@ -74,9 +74,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a95c47feac864109af38d23b18b1e513a4e5a08b..4155b604fb84b9d4df0eca28e05cc95d7ae1a581 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 3a05ef90499cf0b4b1daf0fabe2b307b4eece051..2ce8d0e158f4cb29b5d05ebc4e762000b26f92f4 100644 (file)
@@ -53,10 +53,8 @@ SECTIONS
        .sdata  : { *(.sdata*) }
 
        . = ALIGN(4);
-       .u_boot_cmd : {
-         __u_boot_cmd_start = .;
-         *(.u_boot_cmd)
-         __u_boot_cmd_end = .;
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
 
        . = ALIGN(4);
index dae2cfc7dae8b6dbd11b88ca2e851b52c72a639c..43f91f1a3cc10bb78a153198c1c1a093b102a754 100644 (file)
@@ -60,9 +60,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index b3364be48c128fbcad6665411244d06e83341986..525565134777d29c0544d682d87b2fb2e5189e72 100644 (file)
@@ -85,9 +85,6 @@ SECTIONS
   } > ram
   */
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
    __start___ex_table = .;
     __ex_table : { *(__ex_table) } > ram
index b4b9e02e523e0d80d06bb5b95c9ec4eaad811dab..29a34fb9c5688cc966d28e1479159bfb89c36a27 100644 (file)
@@ -102,9 +102,6 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
 
   __start___ex_table = .;
   __ex_table : { *(__ex_table) }
index fcf8ebbf8ec9a1ef095476904fc5c6c6fbdc1cda..d7a2e560084621905bf1b76952243e654321a863 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 11624d21f5412c85461bf2530488fa5fc5d81e50..c378564f6da16fed847e0b62fc0820c23597901a 100644 (file)
@@ -70,9 +70,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a949e4f59201a000a805c9ae0746ca767246344d..cdc1fdac2c47d22ca3d200967c056b6df13f3173 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a001f3fd878f5747de0d378b9d3158c2ee5b6c52..900da64859525681ad4cb572432ca4ed019bac7f 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index a949e4f59201a000a805c9ae0746ca767246344d..cdc1fdac2c47d22ca3d200967c056b6df13f3173 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a001f3fd878f5747de0d378b9d3158c2ee5b6c52..900da64859525681ad4cb572432ca4ed019bac7f 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index a949e4f59201a000a805c9ae0746ca767246344d..cdc1fdac2c47d22ca3d200967c056b6df13f3173 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a001f3fd878f5747de0d378b9d3158c2ee5b6c52..900da64859525681ad4cb572432ca4ed019bac7f 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index a949e4f59201a000a805c9ae0746ca767246344d..cdc1fdac2c47d22ca3d200967c056b6df13f3173 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 6c7d698c9504b93fac9ccab84e69e28a19880f4b..6cbf4dc66e3e03e54a2462d6cbce11940c57efa3 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index fd4e8a50d543a62df0422cdb6c30af81e7cd8752..c8d38942c96d46216896859e59b2f6a408d1b34a 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index c7711028ad249f06b8fc1f77ac6ae2a2187331b0..92796e674448973b8237e56f5f07380f6d5d49e7 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 1aed197bb9ba92ff08fcadba103d21deb8cbdfd1..4cffacbd46ab953a0dbdc2d82ca3b2e164d132af 100644 (file)
@@ -26,9 +26,11 @@ SECTIONS
                _endtext = .;
        }  > ram
 
-        __u_boot_cmd_start = .;
-        .u_boot_cmd : { *(.u_boot_cmd) } > ram
-        __u_boot_cmd_end = .;
+
+        . = ALIGN(4);
+        .u_boot_list : {
+       #include <u-boot.lst>
+        }
 
        .rodata : {
                *(.rodata);
index b23eec805e77afc0b6ecaeb4ef6e0bd5a5d4e8d1..590ca414aab8668fd73589d7e804062935723040 100644 (file)
@@ -24,6 +24,7 @@
 #include <serial.h>
 #include <asm/io.h>
 #include <asm/arch/pxa.h>
+#include <asm/arch/regs-mmc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -51,6 +52,14 @@ int board_init(void)
        return 0;
 }
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+       pxa_mmc_register(0);
+       return 0;
+}
+#endif
+
 int dram_init(void)
 {
        pxa2xx_dram_init();
index bd0dee1efb9a8798d749332478fb6bb1ef49bcaa..07ddd364a09dbab67309d1be0aee1112aff3ea86 100644 (file)
@@ -54,10 +54,9 @@ SECTIONS
 
        .sdata  : { *(.sdata*) }
 
-       .u_boot_cmd : {
-         __u_boot_cmd_start = .;
-         *(.u_boot_cmd)
-         __u_boot_cmd_end = .;
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
 
        uboot_end_data = .;
index 877e8d9b2a8d5a467dccb6120f54f43d849ab551..9931efdc08465b0c589000244e14dd4ec4512617 100644 (file)
@@ -35,6 +35,7 @@
 #include <command.h>
 #include <asm/io.h>
 #include <asm/arch/pxa.h>
+#include <asm/arch/regs-mmc.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -77,6 +78,14 @@ int board_init (void)
        return 0;
 }
 
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+       pxa_mmc_register(0);
+       return 0;
+}
+#endif
+
 int board_late_init(void)
 {
        setenv("stdout", "serial");
index 4d9580f817448cc239373c3a27855c2c25c54fa9..cb2356f731cf9102125e55922e975bce857277d7 100644 (file)
@@ -59,11 +59,9 @@ SECTIONS
        . = ALIGN(4);
        .sdata  : { *(.sdata*) }
 
-       . = .;
-       .u_boot_cmd : {
-       __u_boot_cmd_start = .;
-       *(.u_boot_cmd)
-       __u_boot_cmd_end = .;
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
 
        uboot_end_data = .;
index 731765256964cd557face20409dee0edbc0a0910..b3cb86974837581cd541b8a8b5a282a2ee530cf3 100644 (file)
@@ -47,9 +47,11 @@ SECTIONS
 
        .sdata  : { *(.sdata*) }
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        uboot_end_data = .;
        num_got_entries = (__got_end - __got_start) >> 2;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 2fa085a3d9bf90698167952f0c514d41c82d6be9..3ef0d9e0b7ae24e12d9aa7b101d527445fb45dab 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index d943fb6de73860b15070fcfa27b593e0f7770e39..a86b568f6eb3c71f93a852b2c7cce15782e5d9c5 100644 (file)
@@ -77,9 +77,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
   . = .;
   __start___ex_table = .;
index 38ebe885071a28efbed89fb7ba01661808a6b469..cf406ce966f66b099a3ea71805bb4d7d107d519c 100644 (file)
@@ -77,13 +77,10 @@ SECTIONS
        }
        PROVIDE (_egot = .);
 
-       PROVIDE (__u_boot_cmd_start = .);
-       .u_boot_cmd :
-       {
-               *(.u_boot_cmd)
-               . = ALIGN(4);
+
+       .u_boot_list : {
+               #include <u-boot.lst>
        }
-       PROVIDE (__u_boot_cmd_end = .);
 
        PROVIDE (reloc_dst_end = .);
        /* _reloc_dst_end = .; */
index a729c52626661f702b4409e11dfff2603f649c03..ff950294f3fa8a36d6cb7b094f2670344f1eb38b 100644 (file)
@@ -97,9 +97,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index d78dd77efdc580d22288289ba0f8d8408ab6763b..951d8cec1d84eb4c9d0eb2eb2134f64b1fdc7f41 100644 (file)
@@ -48,6 +48,11 @@ SECTIONS
        .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
        . = ALIGN(4);
 
+       .u_boot_list : {
+               #include <u-boot.lst>
+       } >.sram
+       . = ALIGN(4);
+
        /* Align .machine_param on 256 byte boundary for easier searching */
        .machine_param ALIGN(0x100) : { *(.machine_param) } >.sram
        . = ALIGN(4);
index f1628152d33d5dc0af5e8d82a6b9dd81b6644cc2..fbb442a02baea1f8c51e73c35c504809f5ebb792 100644 (file)
@@ -47,11 +47,13 @@ SECTIONS
        . = ALIGN(4);
        .got : { *(.got) }
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
 
-       . = ALIGN(4);
+       . = align(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
+
+       . = align(4);
        .mmudata : { *(.mmudata) }
 
        . = ALIGN(4);
index 31746e3adca4392aef48fe8a847acd05a00415ed..7a0757f1462f5d7e05c6a4226904de61d323159a 100644 (file)
@@ -115,9 +115,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 4922bd241e74f8bbde8eed029d0a589d97c3e995..07bd6fe19fb6fbf372fb6dbdf4dfa32081894df3 100644 (file)
@@ -115,9 +115,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index e382fd1a1e667de44ba416e0f03337d6de51da74..ae3afa113064261b7ebd26857d6b087bb3bdb02f 100644 (file)
@@ -68,9 +68,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 0e78e4fd477ce6ca1fb69f620b407a8b6776fc24..c0f107319e4371ccd1628475eb7f577890042cf8 100644 (file)
@@ -75,9 +75,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 02d198001fd5d368ee8bff736aa624fe99ced201..6cf7a017386d24e3c28d8ef84998e76941943be8 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 9ab248a4e97f8ad12f2aefcb165360d217935c34..f57f8a0258dd11b0f395f24f623638717fd41fd6 100644 (file)
@@ -69,9 +69,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index d0b60cf7c1079f4642fb63a032b0e40d9f9d34b3..18f962cfa5801fd2f9cee4a7220afa0a71609e96 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a84e7fd35b90df98ba5678787e42a5671fe5fbff..f69e39d583d8661463e2957e639f884c27d04a34 100644 (file)
@@ -75,9 +75,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a95c47feac864109af38d23b18b1e513a4e5a08b..4155b604fb84b9d4df0eca28e05cc95d7ae1a581 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index a949e4f59201a000a805c9ae0746ca767246344d..cdc1fdac2c47d22ca3d200967c056b6df13f3173 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a001f3fd878f5747de0d378b9d3158c2ee5b6c52..900da64859525681ad4cb572432ca4ed019bac7f 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index c65f0228c3fd6f8e86b5e4164ced2476a9383d59..163587512bafef14105a5998bfe25f21b4c45ba8 100644 (file)
@@ -83,9 +83,11 @@ SECTIONS
 
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index a3983e376b631467e48abcd8aa69d3a158f315f0..188e4acc0998cf9fd8247dc79aecc2a94148e206 100644 (file)
@@ -153,7 +153,7 @@ void wait_for_command_complete(unsigned int wd_base)
  ******************************************************************/
 void ether_init (void)
 {
-#ifdef CONFIG_DRIVER_LAN91C96
+#ifdef CONFIG_LAN91C96
        int cnt = 20;
 
        __raw_writeb(0x3,OMAP2420_CTRL_BASE+0x10a); /*protect->gpio95 */
index e905c26c6f0c5a2aeaffac92f8fe60163f601281..7cc41cd521b0b97a98bbd5ae3a87075339e5c14f 100644 (file)
@@ -81,9 +81,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 871e052b04e8e699dc3785cbf5f1cb433071d4b1..c3dee8459e68a2ab166dc3f0426f2f4ead7253b9 100644 (file)
@@ -34,6 +34,7 @@
 #include <common.h>
 #include <asm/arch/pxa-regs.h>
 #include <asm/arch/pxa.h>
+#include <asm/arch/regs-mmc.h>
 #include <netdev.h>
 #include <asm/io.h>
 
@@ -152,3 +153,11 @@ int board_eth_init(bd_t *bis)
        return dm9000_initialize(bis);
 }
 #endif
+
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+       pxa_mmc_register(0);
+       return 0;
+}
+#endif
index e62d53db54fa048d4c0966f06dde05b6bbfb29f5..fd2d72e8ae01dc2447edacf74775e73c9972108a 100644 (file)
@@ -66,9 +66,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 1958c2fb9031b2c252b48247062003f44e36484a..20161a46a64579d219e54b534b3f1fc04907f6f4 100644 (file)
@@ -57,6 +57,10 @@ SECTIONS
                *(.data)
        }
 
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
+
        . = ALIGN(4);
 
        .rel.dyn : {
index 1c67b301fb467055e4ccd3ec4c25ca76052aac03..2ce5a9a71c9b458ad941cf0fc1be9b8e2d9e2111 100644 (file)
@@ -106,9 +106,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index 3470b437e82583a8e7b39f62451c357d488585d7..9b69d3d1e616d83c05f6cd29e2e722d50630e5f1 100644 (file)
@@ -75,9 +75,11 @@ SECTIONS
   PROVIDE (edata = .);
 
   . = .;
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   . = .;
index 91d3e67e82bb567cd327834c1d34cc76c7d423a0..3e075a85bd14f27342f838ceeb0a8aebb2288b44 100644 (file)
@@ -107,9 +107,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index e2e66aec9955cbac5bc24923ae13c99ceef890b3..c4e5706543bf2fc749377c83b7017972896db880 100644 (file)
@@ -111,9 +111,11 @@ SECTIONS
   _edata  =  .;
   PROVIDE (edata = .);
 
-  __u_boot_cmd_start = .;
-  .u_boot_cmd : { *(.u_boot_cmd) }
-  __u_boot_cmd_end = .;
+
+  . = ALIGN(4);
+  .u_boot_list : {
+       #include <u-boot.lst>
+  }
 
 
   __start___ex_table = .;
index fdfead79c27b952f4cde380e201c95ae85a7363c..eac63605ce73a9d8c9540887673cd5cdcd3b9058 100644 (file)
@@ -70,6 +70,7 @@ COBJS-$(CONFIG_CMD_BMP) += cmd_bmp.o
 COBJS-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o
 COBJS-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o
 COBJS-$(CONFIG_CMD_CACHE) += cmd_cache.o
+COBJS-$(CONFIG_CMD_CBFS) += cmd_cbfs.o
 COBJS-$(CONFIG_CMD_CONSOLE) += cmd_console.o
 COBJS-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o
 COBJS-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o
@@ -204,6 +205,7 @@ COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_common.o
 COBJS-$(CONFIG_SPL_NET_SUPPORT) += env_nowhere.o
 COBJS-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
 endif
+COBJS-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o
 COBJS-y += console.o
 COBJS-y += dlmalloc.o
 COBJS-y += image.o
diff --git a/common/bouncebuf.c b/common/bouncebuf.c
new file mode 100644 (file)
index 0000000..4f827f8
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Generic bounce buffer implementation
+ *
+ * Copyright (C) 2012 Marek Vasut <marex@denx.de>
+ *
+ * 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 <common.h>
+#include <malloc.h>
+#include <errno.h>
+#include <bouncebuf.h>
+
+static int addr_aligned(void *data, size_t len)
+{
+       const ulong align_mask = ARCH_DMA_MINALIGN - 1;
+
+       /* Check if start is aligned */
+       if ((ulong)data & align_mask) {
+               debug("Unaligned start address %p\n", data);
+               return 0;
+       }
+
+       data += len;
+
+       /* Check if end is aligned */
+       if ((ulong)data & align_mask) {
+               debug("Unaligned end address %p\n", data);
+               return 0;
+       }
+
+       /* Aligned */
+       return 1;
+}
+
+int bounce_buffer_start(void **data, size_t len, void **backup, uint8_t flags)
+{
+       void *tmp;
+       size_t alen;
+
+       if (addr_aligned(*data, len)) {
+               *backup = NULL;
+               return 0;
+       }
+
+       alen = roundup(len, ARCH_DMA_MINALIGN);
+       tmp = memalign(ARCH_DMA_MINALIGN, alen);
+
+       if (!tmp)
+               return -ENOMEM;
+
+       if (flags & GEN_BB_READ)
+               memcpy(tmp, *data, len);
+
+       *backup = *data;
+       *data = tmp;
+
+       return 0;
+}
+
+int bounce_buffer_stop(void **data, size_t len, void **backup, uint8_t flags)
+{
+       void *tmp = *data;
+
+       /* The buffer was already aligned, since "backup" is NULL. */
+       if (!*backup)
+               return 0;
+
+       if (flags & GEN_BB_WRITE)
+               memcpy(*backup, *data, len);
+
+       *data = *backup;
+       free(tmp);
+
+       return 0;
+}
diff --git a/common/cmd_cbfs.c b/common/cmd_cbfs.c
new file mode 100644 (file)
index 0000000..3b6cfd8
--- /dev/null
@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * 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
+ */
+
+/*
+ * CBFS commands
+ */
+#include <common.h>
+#include <command.h>
+#include <cbfs.h>
+
+int do_cbfs_init(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+       uintptr_t end_of_rom = 0xffffffff;
+       char *ep;
+
+       if (argc > 2) {
+               printf("usage: cbfsls [end of rom]>\n");
+               return 0;
+       }
+       if (argc == 2) {
+               end_of_rom = (int)simple_strtoul(argv[1], &ep, 16);
+               if (*ep) {
+                       puts("\n** Invalid end of ROM **\n");
+                       return 1;
+               }
+       }
+       file_cbfs_init(end_of_rom);
+       if (file_cbfs_result != CBFS_SUCCESS) {
+               printf("%s.\n", file_cbfs_error());
+               return 1;
+       }
+       return 0;
+}
+
+U_BOOT_CMD(
+       cbfsinit,       2,      0,      do_cbfs_init,
+       "initialize the cbfs driver",
+       "[end of rom]\n"
+       "    - Initialize the cbfs driver. The optional 'end of rom'\n"
+       "      parameter specifies where the end of the ROM is that the\n"
+       "      CBFS is in. It defaults to 0xFFFFFFFF\n"
+);
+
+int do_cbfs_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+       const struct cbfs_cachenode *file;
+       unsigned long offset;
+       unsigned long count;
+       char buf[12];
+       long size;
+
+       if (argc < 3) {
+               printf("usage: cbfsload <addr> <filename> [bytes]\n");
+               return 1;
+       }
+
+       /* parse offset and count */
+       offset = simple_strtoul(argv[1], NULL, 16);
+       if (argc == 4)
+               count = simple_strtoul(argv[3], NULL, 16);
+       else
+               count = 0;
+
+       file = file_cbfs_find(argv[2]);
+       if (!file) {
+               if (file_cbfs_result == CBFS_FILE_NOT_FOUND)
+                       printf("%s: %s\n", file_cbfs_error(), argv[2]);
+               else
+                       printf("%s.\n", file_cbfs_error());
+               return 1;
+       }
+
+       printf("reading %s\n", file_cbfs_name(file));
+
+       size = file_cbfs_read(file, (void *)offset, count);
+
+       printf("\n%ld bytes read\n", size);
+
+       sprintf(buf, "%lX", size);
+       setenv("filesize", buf);
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       cbfsload,       4,      0,      do_cbfs_fsload,
+       "load binary file from a cbfs filesystem",
+       "<addr> <filename> [bytes]\n"
+       "    - load binary file 'filename' from the cbfs to address 'addr'\n"
+);
+
+int do_cbfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+       const struct cbfs_cachenode *file = file_cbfs_get_first();
+       int files = 0;
+
+       if (!file) {
+               printf("%s.\n", file_cbfs_error());
+               return 1;
+       }
+
+       printf("     size              type  name\n");
+       printf("------------------------------------------\n");
+       while (file) {
+               u32 type = file_cbfs_type(file);
+               char *type_name = NULL;
+               const char *filename = file_cbfs_name(file);
+
+               printf(" %8d", file_cbfs_size(file));
+
+               switch (type) {
+               case CBFS_TYPE_STAGE:
+                       type_name = "stage";
+                       break;
+               case CBFS_TYPE_PAYLOAD:
+                       type_name = "payload";
+                       break;
+               case CBFS_TYPE_OPTIONROM:
+                       type_name = "option rom";
+                       break;
+               case CBFS_TYPE_BOOTSPLASH:
+                       type_name = "boot splash";
+                       break;
+               case CBFS_TYPE_RAW:
+                       type_name = "raw";
+                       break;
+               case CBFS_TYPE_VSA:
+                       type_name = "vsa";
+                       break;
+               case CBFS_TYPE_MBI:
+                       type_name = "mbi";
+                       break;
+               case CBFS_TYPE_MICROCODE:
+                       type_name = "microcode";
+                       break;
+               case CBFS_COMPONENT_CMOS_DEFAULT:
+                       type_name = "cmos default";
+                       break;
+               case CBFS_COMPONENT_CMOS_LAYOUT:
+                       type_name = "cmos layout";
+                       break;
+               case -1UL:
+                       type_name = "null";
+                       break;
+               }
+               if (type_name)
+                       printf("  %16s", type_name);
+               else
+                       printf("  %16d", type);
+
+               if (filename[0])
+                       printf("  %s\n", filename);
+               else
+                       printf("  %s\n", "(empty)");
+               file_cbfs_get_next(&file);
+               files++;
+       }
+
+       printf("\n%d file(s)\n\n", files);
+       return 0;
+}
+
+U_BOOT_CMD(
+       cbfsls, 1,      1,      do_cbfs_ls,
+       "list files",
+       "    - list the files in the cbfs\n"
+);
+
+int do_cbfs_fsinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+       const struct cbfs_header *header = file_cbfs_get_header();
+
+       if (!header) {
+               printf("%s.\n", file_cbfs_error());
+               return 1;
+       }
+
+       printf("\n");
+       printf("CBFS version: %#x\n", header->version);
+       printf("ROM size: %#x\n", header->rom_size);
+       printf("Boot block size: %#x\n", header->boot_block_size);
+       printf("CBFS size: %#x\n",
+               header->rom_size - header->boot_block_size - header->offset);
+       printf("Alignment: %d\n", header->align);
+       printf("Offset: %#x\n", header->offset);
+       printf("\n");
+
+       return 0;
+}
+
+U_BOOT_CMD(
+       cbfsinfo,       1,      1,      do_cbfs_fsinfo,
+       "print information about filesystem",
+       "    - print information about the cbfs filesystem\n"
+);
index 8c8178e41daea37c33f8b6e47116ddd052c6576f..3178a1aa428534ed1044f62d9978200792a0b849 100644 (file)
@@ -26,9 +26,9 @@
 
 int do_help(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 {
-       return _do_help(&__u_boot_cmd_start,
-                       &__u_boot_cmd_end - &__u_boot_cmd_start,
-                       cmdtp, flag, argc, argv);
+       cmd_tbl_t *start = ll_entry_start(cmd_tbl_t, cmd);
+       const int len = ll_entry_count(cmd_tbl_t, cmd);
+       return _do_help(start, len, cmdtp, flag, argc, argv);
 }
 
 U_BOOT_CMD(
@@ -41,7 +41,7 @@ U_BOOT_CMD(
 );
 
 /* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
-cmd_tbl_t __u_boot_cmd_question_mark Struct_Section = {
+ll_entry_declare(cmd_tbl_t, question_mark, cmd, cmd) = {
        "?",    CONFIG_SYS_MAXARGS,     1,      do_help,
        "alias for 'help'",
 #ifdef  CONFIG_SYS_LONGHELP
index aa0fb0a3d36b06830afdcbcb4c3a37bd5c158088..50c84292c166ef1fa5487997ce04298ae4fe834e 100644 (file)
@@ -137,8 +137,9 @@ cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len)
 
 cmd_tbl_t *find_cmd (const char *cmd)
 {
-       int len = &__u_boot_cmd_end - &__u_boot_cmd_start;
-       return find_cmd_tbl(cmd, &__u_boot_cmd_start, len);
+       cmd_tbl_t *start = ll_entry_start(cmd_tbl_t, cmd);
+       const int len = ll_entry_count(cmd_tbl_t, cmd);
+       return find_cmd_tbl(cmd, start, len);
 }
 
 int cmd_usage(const cmd_tbl_t *cmdtp)
@@ -181,7 +182,9 @@ int var_complete(int argc, char * const argv[], char last_char, int maxv, char *
 
 static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv, char *cmdv[])
 {
-       cmd_tbl_t *cmdtp;
+       cmd_tbl_t *cmdtp = ll_entry_start(cmd_tbl_t, cmd);
+       const int count = ll_entry_count(cmd_tbl_t, cmd);
+       const cmd_tbl_t *cmdend = cmdtp + count;
        const char *p;
        int len, clen;
        int n_found = 0;
@@ -195,12 +198,12 @@ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv
 
        if (argc == 0) {
                /* output full list of commands */
-               for (cmdtp = &__u_boot_cmd_start; cmdtp != &__u_boot_cmd_end; cmdtp++) {
+               for (; cmdtp != cmdend; cmdtp++) {
                        if (n_found >= maxv - 2) {
-                               cmdv[n_found++] = "...";
+                               cmdv[n_found] = "...";
                                break;
                        }
-                       cmdv[n_found++] = cmdtp->name;
+                       cmdv[n_found] = cmdtp->name;
                }
                cmdv[n_found] = NULL;
                return n_found;
@@ -228,7 +231,7 @@ static int complete_cmdv(int argc, char * const argv[], char last_char, int maxv
                len = p - cmd;
 
        /* return the partial matches */
-       for (cmdtp = &__u_boot_cmd_start; cmdtp != &__u_boot_cmd_end; cmdtp++) {
+       for (; cmdtp != cmdend; cmdtp++) {
 
                clen = strlen(cmdtp->name);
                if (clen < len)
index 1c9763cb6ca50ef9816c95c2d6e0dc75952730a4..50b81752ebca7300599da7580629614d84e0d696 100644 (file)
@@ -508,8 +508,8 @@ int usb_get_configuration_no(struct usb_device *dev,
        tmp = le16_to_cpu(config->wTotalLength);
 
        if (tmp > USB_BUFSIZ) {
-               USB_PRINTF("usb_get_configuration_no: failed to get " \
-                          "descriptor - too long: %d\n", tmp);
+               printf("usb_get_configuration_no: failed to get " \
+                      "descriptor - too long: %d\n", tmp);
                return -1;
        }
 
@@ -946,7 +946,13 @@ int usb_new_device(struct usb_device *dev)
        le16_to_cpus(&dev->descriptor.idProduct);
        le16_to_cpus(&dev->descriptor.bcdDevice);
        /* only support for one config for now */
-       usb_get_configuration_no(dev, tmpbuf, 0);
+       err = usb_get_configuration_no(dev, tmpbuf, 0);
+       if (err < 0) {
+               printf("usb_new_device: Cannot read configuration, " \
+                      "skipping device %04x:%04x\n",
+                      dev->descriptor.idVendor, dev->descriptor.idProduct);
+               return -1;
+       }
        usb_parse_config(dev, tmpbuf, 0);
        usb_set_maxpacket(dev);
        /* we set the default configuration here */
index 950451e11f6570576898cc0fc1c33bf209c7c588..0c2a4c718f3a4617b36333859dd1154456b1422f 100644 (file)
@@ -179,9 +179,9 @@ int usb_stor_get_info(struct usb_device *dev, struct us_data *us,
 int usb_storage_probe(struct usb_device *dev, unsigned int ifnum,
                      struct us_data *ss);
 unsigned long usb_stor_read(int device, unsigned long blknr,
-                           unsigned long blkcnt, void *buffer);
+                           lbaint_t blkcnt, void *buffer);
 unsigned long usb_stor_write(int device, unsigned long blknr,
-                            unsigned long blkcnt, const void *buffer);
+                            lbaint_t blkcnt, const void *buffer);
 struct usb_device * usb_get_dev_index(int index);
 void uhci_show_temp_int_td(void);
 
@@ -1053,9 +1053,10 @@ static void usb_bin_fixup(struct usb_device_descriptor descriptor,
 #endif /* CONFIG_USB_BIN_FIXUP */
 
 unsigned long usb_stor_read(int device, unsigned long blknr,
-                           unsigned long blkcnt, void *buffer)
+                           lbaint_t blkcnt, void *buffer)
 {
-       unsigned long start, blks, buf_addr;
+       lbaint_t start, blks;
+       uintptr_t buf_addr;
        unsigned short smallblks;
        struct usb_device *dev;
        struct us_data *ss;
@@ -1084,7 +1085,7 @@ unsigned long usb_stor_read(int device, unsigned long blknr,
        start = blknr;
        blks = blkcnt;
 
-       USB_STOR_PRINTF("\nusb_read: dev %d startblk %lx, blccnt %lx"
+       USB_STOR_PRINTF("\nusb_read: dev %d startblk " LBAF ", blccnt " LBAF
                        " buffer %lx\n", device, start, blks, buf_addr);
 
        do {
@@ -1114,7 +1115,8 @@ retry_it:
        } while (blks != 0);
        ss->flags &= ~USB_READY;
 
-       USB_STOR_PRINTF("usb_read: end startblk %lx, blccnt %x buffer %lx\n",
+       USB_STOR_PRINTF("usb_read: end startblk " LBAF
+                       ", blccnt %x buffer %lx\n",
                        start, smallblks, buf_addr);
 
        usb_disable_asynch(0); /* asynch transfer allowed */
@@ -1124,9 +1126,10 @@ retry_it:
 }
 
 unsigned long usb_stor_write(int device, unsigned long blknr,
-                               unsigned long blkcnt, const void *buffer)
+                               lbaint_t blkcnt, const void *buffer)
 {
-       unsigned long start, blks, buf_addr;
+       lbaint_t start, blks;
+       uintptr_t buf_addr;
        unsigned short smallblks;
        struct usb_device *dev;
        struct us_data *ss;
@@ -1156,7 +1159,7 @@ unsigned long usb_stor_write(int device, unsigned long blknr,
        start = blknr;
        blks = blkcnt;
 
-       USB_STOR_PRINTF("\nusb_write: dev %d startblk %lx, blccnt %lx"
+       USB_STOR_PRINTF("\nusb_write: dev %d startblk " LBAF ", blccnt " LBAF
                        " buffer %lx\n", device, start, blks, buf_addr);
 
        do {
@@ -1188,7 +1191,8 @@ retry_it:
        } while (blks != 0);
        ss->flags &= ~USB_READY;
 
-       USB_STOR_PRINTF("usb_write: end startblk %lx, blccnt %x buffer %lx\n",
+       USB_STOR_PRINTF("usb_write: end startblk " LBAF
+                       ", blccnt %x buffer %lx\n",
                        start, smallblks, buf_addr);
 
        usb_disable_asynch(0); /* asynch transfer allowed */
index bb5c69a15d9f67376ca58534b189707dc714db72..b7cd4814fe74e87633dc15d9c1c8f388c5b8da78 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -23,6 +23,8 @@
 
 #########################################################################
 
+include $(TOPDIR)/helper.mk
+
 ifeq ($(CURDIR),$(SRCTREE))
 dir :=
 else
index 8ba3cdeaa026a119e04dffe094bb4f536cc31384..4646f682d2c8b6c7f05bf0dc5ea9fba1c8b4f791 100644 (file)
 #define PRINTF(fmt,args...)
 #endif
 
+/* Rather than repeat this expression each time, add a define for it */
 #if (defined(CONFIG_CMD_IDE) || \
      defined(CONFIG_CMD_SATA) || \
      defined(CONFIG_CMD_SCSI) || \
      defined(CONFIG_CMD_USB) || \
      defined(CONFIG_MMC) || \
      defined(CONFIG_SYSTEMACE) )
+#define HAVE_BLOCK_DEVICE
+#endif
 
 struct block_drvr {
        char *name;
@@ -71,6 +74,7 @@ static const struct block_drvr block_drvr[] = {
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef HAVE_BLOCK_DEVICE
 block_dev_desc_t *get_dev(const char *ifname, int dev)
 {
        const struct block_drvr *drvr = block_drvr;
@@ -104,12 +108,7 @@ block_dev_desc_t *get_dev(const char *ifname, int dev)
 }
 #endif
 
-#if (defined(CONFIG_CMD_IDE) || \
-     defined(CONFIG_CMD_SATA) || \
-     defined(CONFIG_CMD_SCSI) || \
-     defined(CONFIG_CMD_USB) || \
-     defined(CONFIG_MMC) || \
-     defined(CONFIG_SYSTEMACE) )
+#ifdef HAVE_BLOCK_DEVICE
 
 /* ------------------------------------------------------------------------- */
 /*
@@ -239,18 +238,7 @@ void dev_print (block_dev_desc_t *dev_desc)
 }
 #endif
 
-#if (defined(CONFIG_CMD_IDE) || \
-     defined(CONFIG_CMD_SATA) || \
-     defined(CONFIG_CMD_SCSI) || \
-     defined(CONFIG_CMD_USB) || \
-     defined(CONFIG_MMC)               || \
-     defined(CONFIG_SYSTEMACE) )
-
-#if defined(CONFIG_MAC_PARTITION) || \
-    defined(CONFIG_DOS_PARTITION) || \
-    defined(CONFIG_ISO_PARTITION) || \
-    defined(CONFIG_AMIGA_PARTITION) || \
-    defined(CONFIG_EFI_PARTITION)
+#ifdef HAVE_BLOCK_DEVICE
 
 void init_part (block_dev_desc_t * dev_desc)
 {
@@ -293,6 +281,12 @@ void init_part (block_dev_desc_t * dev_desc)
 }
 
 
+#if defined(CONFIG_MAC_PARTITION) || \
+       defined(CONFIG_DOS_PARTITION) || \
+       defined(CONFIG_ISO_PARTITION) || \
+       defined(CONFIG_AMIGA_PARTITION) || \
+       defined(CONFIG_EFI_PARTITION)
+
 static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
 {
        puts ("\nPartition Map for ");
@@ -326,6 +320,8 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
                        dev_desc->dev, type);
 }
 
+#endif /* any CONFIG_..._PARTITION */
+
 void print_part (block_dev_desc_t * dev_desc)
 {
 
@@ -372,24 +368,12 @@ void print_part (block_dev_desc_t * dev_desc)
        puts ("## Unknown partition table\n");
 }
 
-
-#else  /* neither MAC nor DOS nor ISO nor AMIGA nor EFI partition configured */
-# error neither CONFIG_MAC_PARTITION nor CONFIG_DOS_PARTITION
-# error nor CONFIG_ISO_PARTITION nor CONFIG_AMIGA_PARTITION
-# error nor CONFIG_EFI_PARTITION configured!
-#endif
-
-#endif
+#endif /* HAVE_BLOCK_DEVICE */
 
 int get_partition_info(block_dev_desc_t *dev_desc, int part
                                        , disk_partition_t *info)
 {
-#if defined(CONFIG_CMD_IDE) || \
-       defined(CONFIG_CMD_SATA) || \
-       defined(CONFIG_CMD_SCSI) || \
-       defined(CONFIG_CMD_USB) || \
-       defined(CONFIG_MMC) || \
-       defined(CONFIG_SYSTEMACE)
+#ifdef HAVE_BLOCK_DEVICE
 
 #ifdef CONFIG_PARTITION_UUIDS
        /* The common case is no UUID support */
@@ -444,7 +428,7 @@ int get_partition_info(block_dev_desc_t *dev_desc, int part
        default:
                break;
        }
-#endif
+#endif /* HAVE_BLOCK_DEVICE */
 
        return -1;
 }
index 7a39d52f8ee5242c314d97be1512278114e59da4..a3873cebb33712d2ad016eb522eff8d6427b2096 100644 (file)
@@ -422,7 +422,7 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc,
        count = le32_to_int(pgpt_head->num_partition_entries) *
                le32_to_int(pgpt_head->sizeof_partition_entry);
 
-       debug("%s: count = %lu * %lu = %u\n", __func__,
+       debug("%s: count = %lu * %lu = %zu\n", __func__,
                le32_to_int(pgpt_head->num_partition_entries),
                le32_to_int(pgpt_head->sizeof_partition_entry), count);
 
@@ -432,7 +432,8 @@ static gpt_entry *alloc_read_gpt_entries(block_dev_desc_t * dev_desc,
        }
 
        if (count == 0 || pte == NULL) {
-               printf("%s: ERROR: Can't allocate 0x%X bytes for GPT Entries\n",
+               printf("%s: ERROR: Can't allocate 0x%zX "
+                      "bytes for GPT Entries\n",
                        __func__, count);
                return NULL;
        }
@@ -474,7 +475,7 @@ static int is_pte_valid(gpt_entry * pte)
                sizeof(unused_guid.b)) == 0) {
 
                debug("%s: Found an unused PTE GUID at 0x%08X\n", __func__,
-               (unsigned int)pte);
+                     (unsigned int)(uintptr_t)pte);
 
                return 0;
        } else {
index 7f3844403933fdfdc9fbe9865eb114474448ef02..da88b3241984c45bf5c8970ca7f818e54c4d9a18 100644 (file)
@@ -8,7 +8,7 @@
 
 include $(TOPDIR)/config.mk
 
-DOCBOOKS := stdio.xml
+DOCBOOKS := linker_lists.xml stdio.xml
 
 ###
 # The build process is as follows (targets):
diff --git a/doc/DocBook/linker_lists.tmpl b/doc/DocBook/linker_lists.tmpl
new file mode 100644 (file)
index 0000000..f197516
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+       "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
+
+<book id="UBootLGArrays">
+ <bookinfo>
+  <title>The U-Boot Linker-Generated Arrays</title>
+
+  <legalnotice>
+   <para>
+     This documentation 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.
+   </para>
+
+   <para>
+     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.
+   </para>
+
+   <para>
+     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
+   </para>
+
+   <para>
+     For more details see the file COPYING in the source
+     distribution of U-Boot Bootloader.
+   </para>
+  </legalnotice>
+ </bookinfo>
+
+<toc></toc>
+
+  <chapter id="adt">
+     <title>Linker-Generated Arrays</title>
+!Iinclude/linker_lists.h
+  </chapter>
+
+</book>
index 125f077c08ffc03f7cf549e6c54480e3a6a41b87..923418b1a455a4dc610c4efd4c5f59b5d5da6263 100644 (file)
@@ -15,12 +15,12 @@ help:        Long description. This is a string
 
 **** Behind the scene ******
 
-The structure created is named with a special prefix (__u_boot_cmd_)
+The structure created is named with a special prefix (__u_boot_list_cmd_)
 and placed by the linker in a special section.
 
 This makes it possible for the final link to extract all commands
 compiled into any object code and construct a static array so the
-command can be found in an array starting at __u_boot_cmd_start.
+command can be found in an array starting at _u_boot_list_cmd__start.
 
 To ensure that the linker does not discard these symbols when linking
 full U-Boot we generate a list of all the commands we have built (based
@@ -33,6 +33,6 @@ If a new board is defined do not forget to define the command section
 by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these
 3 lines:
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+       .u_boot_list : {
+       #include "u-boot.lst";
+       }
index 565ba6a3837a33a9247380e00ddbaf1a9e4894a3..a1dd7302bfc732122fe6620ded02b46dd8c817fd 100644 (file)
@@ -41,12 +41,12 @@ COBJS-$(CONFIG_MV_SDHCI) += mv_sdhci.o
 COBJS-$(CONFIG_MXC_MMC) += mxcmmc.o
 COBJS-$(CONFIG_MXS_MMC) += mxsmmc.o
 COBJS-$(CONFIG_OMAP_HSMMC) += omap_hsmmc.o
-COBJS-$(CONFIG_PXA_MMC) += pxa_mmc.o
 COBJS-$(CONFIG_PXA_MMC_GENERIC) += pxa_mmc_gen.o
 COBJS-$(CONFIG_SDHCI) += sdhci.o
 COBJS-$(CONFIG_S5P_SDHCI) += s5p_sdhci.o
 COBJS-$(CONFIG_SH_MMCIF) += sh_mmcif.o
 COBJS-$(CONFIG_TEGRA_MMC) += tegra_mmc.o
+COBJS-$(CONFIG_DWMMC) += dw_mmc.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
new file mode 100644 (file)
index 0000000..4070d4e
--- /dev/null
@@ -0,0 +1,385 @@
+/*
+ * (C) Copyright 2012 SAMSUNG Electronics
+ * Jaehoon Chung <jh80.chung@samsung.com>
+ * Rajeshawari Shinde <rajeshwari.s@samsung.com>
+ *
+ * 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 <common.h>
+#include <malloc.h>
+#include <mmc.h>
+#include <dwmmc.h>
+#include <asm/arch/clk.h>
+#include <asm-generic/errno.h>
+
+#define PAGE_SIZE 4096
+
+static int dwmci_wait_reset(struct dwmci_host *host, u32 value)
+{
+       unsigned long timeout = 1000;
+       u32 ctrl;
+
+       dwmci_writel(host, DWMCI_CTRL, value);
+
+       while (timeout--) {
+               ctrl = dwmci_readl(host, DWMCI_CTRL);
+               if (!(ctrl & DWMCI_RESET_ALL))
+                       return 1;
+       }
+       return 0;
+}
+
+static void dwmci_set_idma_desc(struct dwmci_idmac *idmac,
+               u32 desc0, u32 desc1, u32 desc2)
+{
+       struct dwmci_idmac *desc = idmac;
+
+       desc->flags = desc0;
+       desc->cnt = desc1;
+       desc->addr = desc2;
+       desc->next_addr = (unsigned int)desc + sizeof(struct dwmci_idmac);
+}
+
+static void dwmci_prepare_data(struct dwmci_host *host,
+               struct mmc_data *data)
+{
+       unsigned long ctrl;
+       unsigned int i = 0, flags, cnt, blk_cnt;
+       ulong data_start, data_end, start_addr;
+       ALLOC_CACHE_ALIGN_BUFFER(struct dwmci_idmac, cur_idmac, data->blocks);
+
+
+       blk_cnt = data->blocks;
+
+       dwmci_wait_reset(host, DWMCI_CTRL_FIFO_RESET);
+
+       data_start = (ulong)cur_idmac;
+       dwmci_writel(host, DWMCI_DBADDR, (unsigned int)cur_idmac);
+
+       if (data->flags == MMC_DATA_READ)
+               start_addr = (unsigned int)data->dest;
+       else
+               start_addr = (unsigned int)data->src;
+
+       do {
+               flags = DWMCI_IDMAC_OWN | DWMCI_IDMAC_CH ;
+               flags |= (i == 0) ? DWMCI_IDMAC_FS : 0;
+               if (blk_cnt <= 8) {
+                       flags |= DWMCI_IDMAC_LD;
+                       cnt = data->blocksize * blk_cnt;
+               } else
+                       cnt = data->blocksize * 8;
+
+               dwmci_set_idma_desc(cur_idmac, flags, cnt,
+                               start_addr + (i * PAGE_SIZE));
+
+               if(blk_cnt < 8)
+                       break;
+               blk_cnt -= 8;
+               cur_idmac++;
+               i++;
+       } while(1);
+
+       data_end = (ulong)cur_idmac;
+       flush_dcache_range(data_start, data_end + ARCH_DMA_MINALIGN);
+
+       ctrl = dwmci_readl(host, DWMCI_CTRL);
+       ctrl |= DWMCI_IDMAC_EN | DWMCI_DMA_EN;
+       dwmci_writel(host, DWMCI_CTRL, ctrl);
+
+       ctrl = dwmci_readl(host, DWMCI_BMOD);
+       ctrl |= DWMCI_BMOD_IDMAC_FB | DWMCI_BMOD_IDMAC_EN;
+       dwmci_writel(host, DWMCI_BMOD, ctrl);
+
+       dwmci_writel(host, DWMCI_BLKSIZ, data->blocksize);
+       dwmci_writel(host, DWMCI_BYTCNT, data->blocksize * data->blocks);
+}
+
+static int dwmci_set_transfer_mode(struct dwmci_host *host,
+               struct mmc_data *data)
+{
+       unsigned long mode;
+
+       mode = DWMCI_CMD_DATA_EXP;
+       if (data->flags & MMC_DATA_WRITE)
+               mode |= DWMCI_CMD_RW;
+
+       return mode;
+}
+
+static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
+               struct mmc_data *data)
+{
+       struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
+       int flags = 0, i;
+       unsigned int timeout = 100000;
+       u32 retry = 10000;
+       u32 mask, ctrl;
+
+       while (dwmci_readl(host, DWMCI_STATUS) & DWMCI_BUSY) {
+               if (timeout == 0) {
+                       printf("Timeout on data busy\n");
+                       return TIMEOUT;
+               }
+               timeout--;
+       }
+
+       dwmci_writel(host, DWMCI_RINTSTS, DWMCI_INTMSK_ALL);
+
+       if (data)
+               dwmci_prepare_data(host, data);
+
+
+       dwmci_writel(host, DWMCI_CMDARG, cmd->cmdarg);
+
+       if (data)
+               flags = dwmci_set_transfer_mode(host, data);
+
+       if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY))
+               return -1;
+
+       if (cmd->cmdidx == MMC_CMD_STOP_TRANSMISSION)
+               flags |= DWMCI_CMD_ABORT_STOP;
+       else
+               flags |= DWMCI_CMD_PRV_DAT_WAIT;
+
+       if (cmd->resp_type & MMC_RSP_PRESENT) {
+               flags |= DWMCI_CMD_RESP_EXP;
+               if (cmd->resp_type & MMC_RSP_136)
+                       flags |= DWMCI_CMD_RESP_LENGTH;
+       }
+
+       if (cmd->resp_type & MMC_RSP_CRC)
+               flags |= DWMCI_CMD_CHECK_CRC;
+
+       flags |= (cmd->cmdidx | DWMCI_CMD_START | DWMCI_CMD_USE_HOLD_REG);
+
+       debug("Sending CMD%d\n",cmd->cmdidx);
+
+       dwmci_writel(host, DWMCI_CMD, flags);
+
+       for (i = 0; i < retry; i++) {
+               mask = dwmci_readl(host, DWMCI_RINTSTS);
+               if (mask & DWMCI_INTMSK_CDONE) {
+                       if (!data)
+                               dwmci_writel(host, DWMCI_RINTSTS, mask);
+                       break;
+               }
+       }
+
+       if (i == retry)
+               return TIMEOUT;
+
+       if (mask & DWMCI_INTMSK_RTO) {
+               debug("Response Timeout..\n");
+               return TIMEOUT;
+       } else if (mask & DWMCI_INTMSK_RE) {
+               debug("Response Error..\n");
+               return -1;
+       }
+
+
+       if (cmd->resp_type & MMC_RSP_PRESENT) {
+               if (cmd->resp_type & MMC_RSP_136) {
+                       cmd->response[0] = dwmci_readl(host, DWMCI_RESP3);
+                       cmd->response[1] = dwmci_readl(host, DWMCI_RESP2);
+                       cmd->response[2] = dwmci_readl(host, DWMCI_RESP1);
+                       cmd->response[3] = dwmci_readl(host, DWMCI_RESP0);
+               } else {
+                       cmd->response[0] = dwmci_readl(host, DWMCI_RESP0);
+               }
+       }
+
+       if (data) {
+               do {
+                       mask = dwmci_readl(host, DWMCI_RINTSTS);
+                       if (mask & (DWMCI_DATA_ERR | DWMCI_DATA_TOUT)) {
+                               debug("DATA ERROR!\n");
+                               return -1;
+                       }
+               } while (!(mask & DWMCI_INTMSK_DTO));
+
+               dwmci_writel(host, DWMCI_RINTSTS, mask);
+
+               ctrl = dwmci_readl(host, DWMCI_CTRL);
+               ctrl &= ~(DWMCI_DMA_EN);
+               dwmci_writel(host, DWMCI_CTRL, ctrl);
+       }
+
+       udelay(100);
+
+       return 0;
+}
+
+static int dwmci_setup_bus(struct dwmci_host *host, u32 freq)
+{
+       u32 div, status;
+       int timeout = 10000;
+       unsigned long sclk;
+
+       if (freq == host->clock)
+               return 0;
+
+       /*
+        * If host->mmc_clk didn't define,
+        * then assume that host->bus_hz is source clock value.
+        * host->bus_hz should be set from user.
+        */
+       if (host->mmc_clk)
+               sclk = host->mmc_clk(host->dev_index);
+       else if (host->bus_hz)
+               sclk = host->bus_hz;
+       else {
+               printf("Didn't get source clock value..\n");
+               return -EINVAL;
+       }
+
+       div = DIV_ROUND_UP(sclk, 2 * freq);
+
+       dwmci_writel(host, DWMCI_CLKENA, 0);
+       dwmci_writel(host, DWMCI_CLKSRC, 0);
+
+       dwmci_writel(host, DWMCI_CLKDIV, div);
+       dwmci_writel(host, DWMCI_CMD, DWMCI_CMD_PRV_DAT_WAIT |
+                       DWMCI_CMD_UPD_CLK | DWMCI_CMD_START);
+
+       do {
+               status = dwmci_readl(host, DWMCI_CMD);
+               if (timeout-- < 0) {
+                       printf("TIMEOUT error!!\n");
+                       return -ETIMEDOUT;
+               }
+       } while (status & DWMCI_CMD_START);
+
+       dwmci_writel(host, DWMCI_CLKENA, DWMCI_CLKEN_ENABLE |
+                       DWMCI_CLKEN_LOW_PWR);
+
+       dwmci_writel(host, DWMCI_CMD, DWMCI_CMD_PRV_DAT_WAIT |
+                       DWMCI_CMD_UPD_CLK | DWMCI_CMD_START);
+
+       timeout = 10000;
+       do {
+               status = dwmci_readl(host, DWMCI_CMD);
+               if (timeout-- < 0) {
+                       printf("TIMEOUT error!!\n");
+                       return -ETIMEDOUT;
+               }
+       } while (status & DWMCI_CMD_START);
+
+       host->clock = freq;
+
+       return 0;
+}
+
+static void dwmci_set_ios(struct mmc *mmc)
+{
+       struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
+       u32 ctype;
+
+       debug("Buswidth = %d, clock: %d\n",mmc->bus_width, mmc->clock);
+
+       dwmci_setup_bus(host, mmc->clock);
+       switch (mmc->bus_width) {
+       case 8:
+               ctype = DWMCI_CTYPE_8BIT;
+               break;
+       case 4:
+               ctype = DWMCI_CTYPE_4BIT;
+               break;
+       default:
+               ctype = DWMCI_CTYPE_1BIT;
+               break;
+       }
+
+       dwmci_writel(host, DWMCI_CTYPE, ctype);
+
+       if (host->clksel)
+               host->clksel(host);
+}
+
+static int dwmci_init(struct mmc *mmc)
+{
+       struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
+       u32 fifo_size, fifoth_val;
+
+       dwmci_writel(host, DWMCI_PWREN, 1);
+
+       if (!dwmci_wait_reset(host, DWMCI_RESET_ALL)) {
+               debug("%s[%d] Fail-reset!!\n",__func__,__LINE__);
+               return -1;
+       }
+
+       dwmci_writel(host, DWMCI_RINTSTS, 0xFFFFFFFF);
+       dwmci_writel(host, DWMCI_INTMASK, 0);
+
+       dwmci_writel(host, DWMCI_TMOUT, 0xFFFFFFFF);
+
+       dwmci_writel(host, DWMCI_IDINTEN, 0);
+       dwmci_writel(host, DWMCI_BMOD, 1);
+
+       fifo_size = dwmci_readl(host, DWMCI_FIFOTH);
+       if (host->fifoth_val)
+               fifoth_val = host->fifoth_val;
+       else
+               fifoth_val = MSIZE(0x2) | RX_WMARK(fifo_size/2 -1) |
+                       TX_WMARK(fifo_size/2);
+       dwmci_writel(host, DWMCI_FIFOTH, fifoth_val);
+
+       dwmci_writel(host, DWMCI_CLKENA, 0);
+       dwmci_writel(host, DWMCI_CLKSRC, 0);
+
+       return 0;
+}
+
+int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk)
+{
+       struct mmc *mmc;
+       int err = 0;
+
+       mmc = malloc(sizeof(struct mmc));
+       if (!mmc) {
+               printf("mmc malloc fail!\n");
+               return -1;
+       }
+
+       mmc->priv = host;
+       host->mmc = mmc;
+
+       sprintf(mmc->name, "%s", host->name);
+       mmc->send_cmd = dwmci_send_cmd;
+       mmc->set_ios = dwmci_set_ios;
+       mmc->init = dwmci_init;
+       mmc->f_min = min_clk;
+       mmc->f_max = max_clk;
+
+       mmc->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
+
+       mmc->host_caps = host->caps;
+
+       if (host->buswidth == 8) {
+               mmc->host_caps |= MMC_MODE_8BIT;
+               mmc->host_caps &= ~MMC_MODE_4BIT;
+       } else {
+               mmc->host_caps |= MMC_MODE_4BIT;
+               mmc->host_caps &= ~MMC_MODE_8BIT;
+       }
+       mmc->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_HC;
+
+       err = mmc_register(mmc);
+
+       return err;
+}
index a60cfe1cb0d181be890bc2a8a2de9d209b3e99b3..5fbf95630295a770e1eba3bd82bd676715a91a90 100644 (file)
@@ -47,93 +47,6 @@ int __board_mmc_getcd(struct mmc *mmc) {
 int board_mmc_getcd(struct mmc *mmc)__attribute__((weak,
        alias("__board_mmc_getcd")));
 
-#ifdef CONFIG_MMC_BOUNCE_BUFFER
-static int mmc_bounce_need_bounce(struct mmc_data *orig)
-{
-       ulong addr, len;
-
-       if (orig->flags & MMC_DATA_READ)
-               addr = (ulong)orig->dest;
-       else
-               addr = (ulong)orig->src;
-
-       if (addr % ARCH_DMA_MINALIGN) {
-               debug("MMC: Unaligned data destination address %08lx!\n", addr);
-               return 1;
-       }
-
-       len = (ulong)(orig->blocksize * orig->blocks);
-       if (len % ARCH_DMA_MINALIGN) {
-               debug("MMC: Unaligned data destination length %08lx!\n", len);
-               return 1;
-       }
-
-       return 0;
-}
-
-static int mmc_bounce_buffer_start(struct mmc_data *backup,
-                                       struct mmc_data *orig)
-{
-       ulong origlen, len;
-       void *buffer;
-
-       if (!orig)
-               return 0;
-
-       if (!mmc_bounce_need_bounce(orig))
-               return 0;
-
-       memcpy(backup, orig, sizeof(struct mmc_data));
-
-       origlen = orig->blocksize * orig->blocks;
-       len = roundup(origlen, ARCH_DMA_MINALIGN);
-       buffer = memalign(ARCH_DMA_MINALIGN, len);
-       if (!buffer) {
-               puts("MMC: Error allocating MMC bounce buffer!\n");
-               return 1;
-       }
-
-       if (orig->flags & MMC_DATA_READ) {
-               orig->dest = buffer;
-       } else {
-               memcpy(buffer, orig->src, origlen);
-               orig->src = buffer;
-       }
-
-       return 0;
-}
-
-static void mmc_bounce_buffer_stop(struct mmc_data *backup,
-                                       struct mmc_data *orig)
-{
-       ulong len;
-
-       if (!orig)
-               return;
-
-       if (!mmc_bounce_need_bounce(backup))
-               return;
-
-       if (backup->flags & MMC_DATA_READ) {
-               len = backup->blocksize * backup->blocks;
-               memcpy(backup->dest, orig->dest, len);
-               free(orig->dest);
-               orig->dest = backup->dest;
-       } else {
-               free((void *)orig->src);
-               orig->src = backup->src;
-       }
-
-       return;
-
-}
-#else
-static inline int mmc_bounce_buffer_start(struct mmc_data *backup,
-                                       struct mmc_data *orig) { return 0; }
-static inline void mmc_bounce_buffer_stop(struct mmc_data *backup,
-                                       struct mmc_data *orig) { }
-#endif
-
 int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 {
        struct mmc_data backup;
@@ -141,10 +54,6 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 
        memset(&backup, 0, sizeof(backup));
 
-       ret = mmc_bounce_buffer_start(&backup, data);
-       if (ret)
-               return ret;
-
 #ifdef CONFIG_MMC_TRACE
        int i;
        u8 *ptr;
@@ -196,7 +105,6 @@ int mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
 #else
        ret = mmc->send_cmd(mmc, cmd, data);
 #endif
-       mmc_bounce_buffer_stop(&backup, data);
        return ret;
 }
 
index de43a85355f4755a4088cbc387740240d8c08ed1..11ba532b0c6d02ed96bf0394d1f56def57137c2f 100644 (file)
@@ -176,8 +176,8 @@ static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd *cmd,
        u8 r1;
        int i;
        int ret = 0;
-       debug("%s:cmd%d %x %x %x\n", __func__,
-             cmd->cmdidx, cmd->resp_type, cmd->cmdarg, cmd->flags);
+       debug("%s:cmd%d %x %x\n", __func__,
+             cmd->cmdidx, cmd->resp_type, cmd->cmdarg);
        spi_claim_bus(spi);
        spi_cs_activate(spi);
        r1 = mmc_spi_sendcmd(mmc, cmd->cmdidx, cmd->cmdarg);
index c80b41b1925c88b9ba2d3305aeeb06f7307adbca..109acbf6234bf3eb29e4caf9ba18f5c4294e784e 100644 (file)
@@ -42,6 +42,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/dma.h>
+#include <bouncebuf.h>
 
 struct mxsmmc_priv {
        int                     id;
@@ -95,28 +96,33 @@ static int mxsmmc_send_cmd_pio(struct mxsmmc_priv *priv, struct mmc_data *data)
 static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data)
 {
        uint32_t data_count = data->blocksize * data->blocks;
-       uint32_t cache_data_count;
+       uint32_t cache_data_count = roundup(data_count, ARCH_DMA_MINALIGN);
        int dmach;
        struct mxs_dma_desc *desc = priv->desc;
+       void *addr, *backup;
+       uint8_t flags;
 
        memset(desc, 0, sizeof(struct mxs_dma_desc));
        desc->address = (dma_addr_t)desc;
 
-       if (data_count % ARCH_DMA_MINALIGN)
-               cache_data_count = roundup(data_count, ARCH_DMA_MINALIGN);
-       else
-               cache_data_count = data_count;
-
        if (data->flags & MMC_DATA_READ) {
                priv->desc->cmd.data = MXS_DMA_DESC_COMMAND_DMA_WRITE;
-               priv->desc->cmd.address = (dma_addr_t)data->dest;
+               addr = data->dest;
+               flags = GEN_BB_WRITE;
        } else {
                priv->desc->cmd.data = MXS_DMA_DESC_COMMAND_DMA_READ;
-               priv->desc->cmd.address = (dma_addr_t)data->src;
+               addr = (void *)data->src;
+               flags = GEN_BB_READ;
+       }
+
+       bounce_buffer_start(&addr, data_count, &backup, flags);
+
+       priv->desc->cmd.address = (dma_addr_t)addr;
 
+       if (data->flags & MMC_DATA_WRITE) {
                /* Flush data to DRAM so DMA can pick them up */
-               flush_dcache_range((uint32_t)priv->desc->cmd.address,
-                       (uint32_t)(priv->desc->cmd.address + cache_data_count));
+               flush_dcache_range((uint32_t)addr,
+                       (uint32_t)(addr) + cache_data_count);
        }
 
        /* Invalidate the area, so no writeback into the RAM races with DMA */
@@ -128,15 +134,19 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data)
 
        dmach = MXS_DMA_CHANNEL_AHB_APBH_SSP0 + priv->id;
        mxs_dma_desc_append(dmach, priv->desc);
-       if (mxs_dma_go(dmach))
+       if (mxs_dma_go(dmach)) {
+               bounce_buffer_stop(&addr, data_count, &backup, flags);
                return COMM_ERR;
+       }
 
        /* The data arrived into DRAM, invalidate cache over them */
        if (data->flags & MMC_DATA_READ) {
-               invalidate_dcache_range((uint32_t)priv->desc->cmd.address,
-                       (uint32_t)(priv->desc->cmd.address + cache_data_count));
+               invalidate_dcache_range((uint32_t)addr,
+                       (uint32_t)(addr) + cache_data_count);
        }
 
+       bounce_buffer_stop(&addr, data_count, &backup, flags);
+
        return 0;
 }
 
diff --git a/drivers/mmc/pxa_mmc.c b/drivers/mmc/pxa_mmc.c
deleted file mode 100644 (file)
index 80c4445..0000000
+++ /dev/null
@@ -1,643 +0,0 @@
-/*
- * (C) Copyright 2003
- * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
- *
- * 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 <config.h>
-#include <common.h>
-#include <mmc.h>
-#include <asm/errno.h>
-#include <asm/arch/hardware.h>
-#include <part.h>
-#include <asm/io.h>
-
-#include "pxa_mmc.h"
-
-extern int fat_register_device(block_dev_desc_t * dev_desc, int part_no);
-
-static block_dev_desc_t mmc_dev;
-
-block_dev_desc_t *mmc_get_dev(int dev)
-{
-       return ((block_dev_desc_t *) & mmc_dev);
-}
-
-/*
- * FIXME needs to read cid and csd info to determine block size
- * and other parameters
- */
-static uchar mmc_buf[MMC_BLOCK_SIZE];
-static uchar spec_ver;
-static int mmc_ready = 0;
-static int wide = 0;
-
-static uint32_t *
-/****************************************************/
-mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
-/****************************************************/
-{
-       static uint32_t resp[4], a, b, c;
-       uint32_t status;
-       int i;
-
-       debug("mmc_cmd %u 0x%04x 0x%04x 0x%04x\n", cmd, argh, argl,
-             cmdat | wide);
-       writel(MMC_STRPCL_STOP_CLK, MMC_STRPCL);
-       writel(~MMC_I_MASK_CLK_IS_OFF, MMC_I_MASK);
-       while (!(readl(MMC_I_REG) & MMC_I_REG_CLK_IS_OFF))
-               ;
-       writel(cmd, MMC_CMD);
-       writel(argh, MMC_ARGH);
-       writel(argl, MMC_ARGL);
-       writel(cmdat | wide, MMC_CMDAT);
-       writel(~MMC_I_MASK_END_CMD_RES, MMC_I_MASK);
-       writel(MMC_STRPCL_START_CLK, MMC_STRPCL);
-       while (!(readl(MMC_I_REG) & MMC_I_REG_END_CMD_RES))
-               ;
-
-       status = readl(MMC_STAT);
-       debug("MMC status 0x%08x\n", status);
-       if (status & MMC_STAT_TIME_OUT_RESPONSE) {
-               return 0;
-       }
-
-       /* Linux says:
-        * Did I mention this is Sick.  We always need to
-        * discard the upper 8 bits of the first 16-bit word.
-        */
-       a = (readl(MMC_RES) & 0xffff);
-       for (i = 0; i < 4; i++) {
-               b = (readl(MMC_RES) & 0xffff);
-               c = (readl(MMC_RES) & 0xffff);
-               resp[i] = (a << 24) | (b << 8) | (c >> 8);
-               a = c;
-               debug("MMC resp[%d] = %#08x\n", i, resp[i]);
-       }
-
-       return resp;
-}
-
-int
-/****************************************************/
-mmc_block_read(uchar * dst, uint32_t src, int len)
-/****************************************************/
-{
-       ushort argh, argl;
-       ulong status;
-
-       if (len == 0) {
-               return 0;
-       }
-
-       debug("mmc_block_rd dst %p src %08x len %d\n", dst, src, len);
-
-       argh = len >> 16;
-       argl = len & 0xffff;
-
-       /* set block len */
-       mmc_cmd(MMC_CMD_SET_BLOCKLEN, argh, argl, MMC_CMDAT_R1);
-
-       /* send read command */
-       argh = src >> 16;
-       argl = src & 0xffff;
-       writel(MMC_STRPCL_STOP_CLK, MMC_STRPCL);
-       writel(0xffff, MMC_RDTO);
-       writel(1, MMC_NOB);
-       writel(len, MMC_BLKLEN);
-       mmc_cmd(MMC_CMD_READ_SINGLE_BLOCK, argh, argl,
-               MMC_CMDAT_R1 | MMC_CMDAT_READ | MMC_CMDAT_BLOCK |
-               MMC_CMDAT_DATA_EN);
-
-       writel(~MMC_I_MASK_RXFIFO_RD_REQ, MMC_I_MASK);
-       while (len) {
-               if (readl(MMC_I_REG) & MMC_I_REG_RXFIFO_RD_REQ) {
-#if defined(CONFIG_CPU_PXA27X) || defined(CONFIG_CPU_MONAHANS)
-                       int i;
-                       for (i = min(len, 32); i; i--) {
-                               *dst++ = readb(MMC_RXFIFO);
-                               len--;
-                       }
-#else
-                       *dst++ = readb(MMC_RXFIFO);
-                       len--;
-#endif
-               }
-               status = readl(MMC_STAT);
-               if (status & MMC_STAT_ERRORS) {
-                       printf("MMC_STAT error %lx\n", status);
-                       return -1;
-               }
-       }
-       writel(~MMC_I_MASK_DATA_TRAN_DONE, MMC_I_MASK);
-       while (!(readl(MMC_I_REG) & MMC_I_REG_DATA_TRAN_DONE))
-               ;
-       status = readl(MMC_STAT);
-       if (status & MMC_STAT_ERRORS) {
-               printf("MMC_STAT error %lx\n", status);
-               return -1;
-       }
-       return 0;
-}
-
-int
-/****************************************************/
-mmc_block_write(ulong dst, uchar * src, int len)
-/****************************************************/
-{
-       ushort argh, argl;
-       ulong status;
-
-       if (len == 0) {
-               return 0;
-       }
-
-       debug("mmc_block_wr dst %lx src %lx len %d\n", dst, (ulong) src, len);
-
-       argh = len >> 16;
-       argl = len & 0xffff;
-
-       /* set block len */
-       mmc_cmd(MMC_CMD_SET_BLOCKLEN, argh, argl, MMC_CMDAT_R1);
-
-       /* send write command */
-       argh = dst >> 16;
-       argl = dst & 0xffff;
-       writel(MMC_STRPCL_STOP_CLK, MMC_STRPCL);
-       writel(1, MMC_NOB);
-       writel(len, MMC_BLKLEN);
-       mmc_cmd(MMC_CMD_WRITE_SINGLE_BLOCK, argh, argl,
-               MMC_CMDAT_R1 | MMC_CMDAT_WRITE | MMC_CMDAT_BLOCK |
-               MMC_CMDAT_DATA_EN);
-
-       writel(~MMC_I_MASK_TXFIFO_WR_REQ, MMC_I_MASK);
-       while (len) {
-               if (readl(MMC_I_REG) & MMC_I_REG_TXFIFO_WR_REQ) {
-                       int i, bytes = min(32, len);
-
-                       for (i = 0; i < bytes; i++) {
-                               writel(*src++, MMC_TXFIFO);
-                       }
-                       if (bytes < 32) {
-                               writel(MMC_PRTBUF_BUF_PART_FULL, MMC_PRTBUF);
-                       }
-                       len -= bytes;
-               }
-               status = readl(MMC_STAT);
-               if (status & MMC_STAT_ERRORS) {
-                       printf("MMC_STAT error %lx\n", status);
-                       return -1;
-               }
-       }
-       writel(~MMC_I_MASK_DATA_TRAN_DONE, MMC_I_MASK);
-       while (!(readl(MMC_I_REG) & MMC_I_REG_DATA_TRAN_DONE))
-               ;
-       writel(~MMC_I_MASK_PRG_DONE, MMC_I_MASK);
-       while (!(readl(MMC_I_REG) & MMC_I_REG_PRG_DONE))
-               ;
-       status = readl(MMC_STAT);
-       if (status & MMC_STAT_ERRORS) {
-               printf("MMC_STAT error %lx\n", status);
-               return -1;
-       }
-       return 0;
-}
-
-int
-/****************************************************/
-pxa_mmc_read(long src, uchar * dst, int size)
-/****************************************************/
-{
-       ulong end, part_start, part_end, part_len, aligned_start, aligned_end;
-       ulong mmc_block_size, mmc_block_address;
-
-       if (size == 0) {
-               return 0;
-       }
-
-       if (!mmc_ready) {
-               printf("Please initial the MMC first\n");
-               return -1;
-       }
-
-       mmc_block_size = MMC_BLOCK_SIZE;
-       mmc_block_address = ~(mmc_block_size - 1);
-
-       src -= CONFIG_SYS_MMC_BASE;
-       end = src + size;
-       part_start = ~mmc_block_address & src;
-       part_end = ~mmc_block_address & end;
-       aligned_start = mmc_block_address & src;
-       aligned_end = mmc_block_address & end;
-
-       /* all block aligned accesses */
-       debug
-           ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-            src, (ulong) dst, end, part_start, part_end, aligned_start,
-            aligned_end);
-       if (part_start) {
-               part_len = mmc_block_size - part_start;
-               debug
-                   ("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-                    src, (ulong) dst, end, part_start, part_end, aligned_start,
-                    aligned_end);
-               if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
-                   0) {
-                       return -1;
-               }
-               memcpy(dst, mmc_buf + part_start, part_len);
-               dst += part_len;
-               src += part_len;
-       }
-       debug
-           ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-            src, (ulong) dst, end, part_start, part_end, aligned_start,
-            aligned_end);
-       for (; src < aligned_end; src += mmc_block_size, dst += mmc_block_size) {
-               debug
-                   ("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-                    src, (ulong) dst, end, part_start, part_end, aligned_start,
-                    aligned_end);
-               if ((mmc_block_read((uchar *) (dst), src, mmc_block_size)) < 0) {
-                       return -1;
-               }
-       }
-       debug
-           ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-            src, (ulong) dst, end, part_start, part_end, aligned_start,
-            aligned_end);
-       if (part_end && src < end) {
-               debug
-                   ("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-                    src, (ulong) dst, end, part_start, part_end, aligned_start,
-                    aligned_end);
-               if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) {
-                       return -1;
-               }
-               memcpy(dst, mmc_buf, part_end);
-       }
-       return 0;
-}
-
-int
-/****************************************************/
-pxa_mmc_write(uchar * src, uint32_t dst, int size)
-/****************************************************/
-{
-       ulong end, part_start, part_end, part_len, aligned_start, aligned_end;
-       ulong mmc_block_size, mmc_block_address;
-
-       if (size == 0) {
-               return 0;
-       }
-
-       if (!mmc_ready) {
-               printf("Please initial the MMC first\n");
-               return -1;
-       }
-
-       mmc_block_size = MMC_BLOCK_SIZE;
-       mmc_block_address = ~(mmc_block_size - 1);
-
-       dst -= CONFIG_SYS_MMC_BASE;
-       end = dst + size;
-       part_start = ~mmc_block_address & dst;
-       part_end = ~mmc_block_address & end;
-       aligned_start = mmc_block_address & dst;
-       aligned_end = mmc_block_address & end;
-
-       /* all block aligned accesses */
-       debug
-           ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-            src, dst, end, part_start, part_end, aligned_start,
-            aligned_end);
-       if (part_start) {
-               part_len = mmc_block_size - part_start;
-               debug
-                   ("ps src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-                    src, dst, end, part_start, part_end, aligned_start,
-                    aligned_end);
-               if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
-                   0) {
-                       return -1;
-               }
-               memcpy(mmc_buf + part_start, src, part_len);
-               if ((mmc_block_write(aligned_start, mmc_buf, mmc_block_size)) <
-                   0) {
-                       return -1;
-               }
-               dst += part_len;
-               src += part_len;
-       }
-       debug
-           ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-            src, dst, end, part_start, part_end, aligned_start,
-            aligned_end);
-       for (; dst < aligned_end; src += mmc_block_size, dst += mmc_block_size) {
-               debug
-                   ("al src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-                    src, dst, end, part_start, part_end, aligned_start,
-                    aligned_end);
-               if ((mmc_block_write(dst, (uchar *) src, mmc_block_size)) < 0) {
-                       return -1;
-               }
-       }
-       debug
-           ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-            src, dst, end, part_start, part_end, aligned_start,
-            aligned_end);
-       if (part_end && dst < end) {
-               debug
-                   ("pe src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-                    src, dst, end, part_start, part_end, aligned_start,
-                    aligned_end);
-               if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) {
-                       return -1;
-               }
-               memcpy(mmc_buf, src, part_end);
-               if ((mmc_block_write(aligned_end, mmc_buf, mmc_block_size)) < 0) {
-                       return -1;
-               }
-       }
-       return 0;
-}
-
-static ulong
-/****************************************************/
-mmc_bread(int dev_num, ulong blknr, lbaint_t blkcnt, void *dst)
-/****************************************************/
-{
-       int mmc_block_size = MMC_BLOCK_SIZE;
-       ulong src = blknr * mmc_block_size + CONFIG_SYS_MMC_BASE;
-
-       pxa_mmc_read(src, (uchar *) dst, blkcnt * mmc_block_size);
-       return blkcnt;
-}
-
-#ifdef __GNUC__
-#define likely(x)       __builtin_expect(!!(x), 1)
-#define unlikely(x)     __builtin_expect(!!(x), 0)
-#else
-#define likely(x)      (x)
-#define unlikely(x)    (x)
-#endif
-
-#define UNSTUFF_BITS(resp,start,size)                                  \
-       ({                                                              \
-               const int __size = size;                                \
-               const uint32_t __mask = (__size < 32 ? 1 << __size : 0) - 1;    \
-               const int32_t __off = 3 - ((start) / 32);                       \
-               const int32_t __shft = (start) & 31;                    \
-               uint32_t __res;                                         \
-                                                                       \
-               __res = resp[__off] >> __shft;                          \
-               if (__size + __shft > 32)                               \
-                       __res |= resp[__off-1] << ((32 - __shft) % 32); \
-               __res & __mask;                                         \
-       })
-
-/*
- * Given the decoded CSD structure, decode the raw CID to our CID structure.
- */
-static void mmc_decode_cid(uint32_t * resp)
-{
-       if (IF_TYPE_SD == mmc_dev.if_type) {
-               /*
-                * SD doesn't currently have a version field so we will
-                * have to assume we can parse this.
-                */
-               sprintf((char *)mmc_dev.vendor,
-                       "Man %02x OEM %c%c \"%c%c%c%c%c\" Date %02u/%04u",
-                       UNSTUFF_BITS(resp, 120, 8), UNSTUFF_BITS(resp, 112, 8),
-                       UNSTUFF_BITS(resp, 104, 8), UNSTUFF_BITS(resp, 96, 8),
-                       UNSTUFF_BITS(resp, 88, 8), UNSTUFF_BITS(resp, 80, 8),
-                       UNSTUFF_BITS(resp, 72, 8), UNSTUFF_BITS(resp, 64, 8),
-                       UNSTUFF_BITS(resp, 8, 4), UNSTUFF_BITS(resp, 12,
-                                                              8) + 2000);
-               sprintf((char *)mmc_dev.revision, "%d.%d",
-                       UNSTUFF_BITS(resp, 60, 4), UNSTUFF_BITS(resp, 56, 4));
-               sprintf((char *)mmc_dev.product, "%u",
-                       UNSTUFF_BITS(resp, 24, 32));
-       } else {
-               /*
-                * The selection of the format here is based upon published
-                * specs from sandisk and from what people have reported.
-                */
-               switch (spec_ver) {
-               case 0: /* MMC v1.0 - v1.2 */
-               case 1: /* MMC v1.4 */
-                       sprintf((char *)mmc_dev.vendor,
-                               "Man %02x%02x%02x \"%c%c%c%c%c%c%c\" Date %02u/%04u",
-                               UNSTUFF_BITS(resp, 120, 8), UNSTUFF_BITS(resp,
-                                                                        112,
-                                                                        8),
-                               UNSTUFF_BITS(resp, 104, 8), UNSTUFF_BITS(resp,
-                                                                        96, 8),
-                               UNSTUFF_BITS(resp, 88, 8), UNSTUFF_BITS(resp,
-                                                                       80, 8),
-                               UNSTUFF_BITS(resp, 72, 8), UNSTUFF_BITS(resp,
-                                                                       64, 8),
-                               UNSTUFF_BITS(resp, 56, 8), UNSTUFF_BITS(resp,
-                                                                       48, 8),
-                               UNSTUFF_BITS(resp, 12, 4), UNSTUFF_BITS(resp, 8,
-                                                                       4) +
-                               1997);
-                       sprintf((char *)mmc_dev.revision, "%d.%d",
-                               UNSTUFF_BITS(resp, 44, 4), UNSTUFF_BITS(resp,
-                                                                       40, 4));
-                       sprintf((char *)mmc_dev.product, "%u",
-                               UNSTUFF_BITS(resp, 16, 24));
-                       break;
-
-               case 2: /* MMC v2.0 - v2.2 */
-               case 3: /* MMC v3.1 - v3.3 */
-               case 4: /* MMC v4 */
-                       sprintf((char *)mmc_dev.vendor,
-                               "Man %02x OEM %04x \"%c%c%c%c%c%c\" Date %02u/%04u",
-                               UNSTUFF_BITS(resp, 120, 8), UNSTUFF_BITS(resp,
-                                                                        104,
-                                                                        16),
-                               UNSTUFF_BITS(resp, 96, 8), UNSTUFF_BITS(resp,
-                                                                       88, 8),
-                               UNSTUFF_BITS(resp, 80, 8), UNSTUFF_BITS(resp,
-                                                                       72, 8),
-                               UNSTUFF_BITS(resp, 64, 8), UNSTUFF_BITS(resp,
-                                                                       56, 8),
-                               UNSTUFF_BITS(resp, 12, 4), UNSTUFF_BITS(resp, 8,
-                                                                       4) +
-                               1997);
-                       sprintf((char *)mmc_dev.product, "%u",
-                               UNSTUFF_BITS(resp, 16, 32));
-                       sprintf((char *)mmc_dev.revision, "N/A");
-                       break;
-
-               default:
-                       printf("MMC card has unknown MMCA version %d\n",
-                              spec_ver);
-                       break;
-               }
-       }
-       printf("%s card.\nVendor: %s\nProduct: %s\nRevision: %s\n",
-              (IF_TYPE_SD == mmc_dev.if_type) ? "SD" : "MMC", mmc_dev.vendor,
-              mmc_dev.product, mmc_dev.revision);
-}
-
-/*
- * Given a 128-bit response, decode to our card CSD structure.
- */
-static void mmc_decode_csd(uint32_t * resp)
-{
-       unsigned int mult, csd_struct;
-
-       if (IF_TYPE_SD == mmc_dev.if_type) {
-               csd_struct = UNSTUFF_BITS(resp, 126, 2);
-               if (csd_struct != 0) {
-                       printf("SD: unrecognised CSD structure version %d\n",
-                              csd_struct);
-                       return;
-               }
-       } else {
-               /*
-                * We only understand CSD structure v1.1 and v1.2.
-                * v1.2 has extra information in bits 15, 11 and 10.
-                */
-               csd_struct = UNSTUFF_BITS(resp, 126, 2);
-               if (csd_struct != 1 && csd_struct != 2) {
-                       printf("MMC: unrecognised CSD structure version %d\n",
-                              csd_struct);
-                       return;
-               }
-
-               spec_ver = UNSTUFF_BITS(resp, 122, 4);
-               mmc_dev.if_type = IF_TYPE_MMC;
-       }
-
-       mult = 1 << (UNSTUFF_BITS(resp, 47, 3) + 2);
-       mmc_dev.lba = (1 + UNSTUFF_BITS(resp, 62, 12)) * mult;
-       mmc_dev.blksz = 1 << UNSTUFF_BITS(resp, 80, 4);
-
-       /* FIXME: The following just makes assumes that's the partition type -- should really read it */
-       mmc_dev.part_type = PART_TYPE_DOS;
-       mmc_dev.dev = 0;
-       mmc_dev.lun = 0;
-       mmc_dev.type = DEV_TYPE_HARDDISK;
-       mmc_dev.removable = 0;
-       mmc_dev.block_read = mmc_bread;
-
-       printf("Detected: %lu blocks of %lu bytes (%luMB) ",
-               mmc_dev.lba,
-               mmc_dev.blksz,
-               mmc_dev.lba * mmc_dev.blksz / (1024 * 1024));
-}
-
-int
-/****************************************************/
-mmc_legacy_init(int verbose)
-/****************************************************/
-{
-       int retries, rc = -ENODEV;
-       uint32_t cid_resp[4];
-       uint32_t *resp;
-       uint16_t rca = 0;
-
-       /* Reset device interface type */
-       mmc_dev.if_type = IF_TYPE_UNKNOWN;
-
-#ifdef CONFIG_CPU_MONAHANS     /* pxa3xx */
-       writel(readl(CKENA) | CKENA_12_MMC0 | CKENA_13_MMC1, CKENA);
-#else  /* pxa2xx */
-       writel(readl(CKEN) | CKEN12_MMC, CKEN); /* enable MMC unit clock */
-#endif
-       writel(MMC_CLKRT_0_3125MHZ, MMC_CLKRT);
-       writel(MMC_RES_TO_MAX, MMC_RESTO);
-       writel(MMC_SPI_DISABLE, MMC_SPI);
-
-       /* reset */
-       mmc_cmd(MMC_CMD_GO_IDLE_STATE, 0, 0, MMC_CMDAT_INIT | MMC_CMDAT_R0);
-       udelay(200000);
-       retries = 3;
-       while (retries--) {
-               resp = mmc_cmd(MMC_CMD_APP_CMD, 0, 0, MMC_CMDAT_R1);
-               if (!(resp[0] & 0x00000020)) {  /* Card does not support APP_CMD */
-                       debug("Card does not support APP_CMD\n");
-                       break;
-               }
-
-               /* Select 3.2-3.3V and 3.3-3.4V */
-               resp = mmc_cmd(SD_CMD_APP_SEND_OP_COND, 0x0030, 0x0000,
-                               MMC_CMDAT_R3 | (retries < 2 ? 0
-                                       : MMC_CMDAT_INIT));
-               if (resp[0] & 0x80000000) {
-                       mmc_dev.if_type = IF_TYPE_SD;
-                       debug("Detected SD card\n");
-                       break;
-               }
-               udelay(200000);
-       }
-
-       if (retries <= 0 || !(IF_TYPE_SD == mmc_dev.if_type)) {
-               debug("Failed to detect SD Card, trying MMC\n");
-               resp =
-                   mmc_cmd(MMC_CMD_SEND_OP_COND, 0x00ff, 0x8000, MMC_CMDAT_R3);
-
-               retries = 10;
-               while (retries-- && resp && !(resp[0] & 0x80000000)) {
-                       udelay(200000);
-                       resp =
-                           mmc_cmd(MMC_CMD_SEND_OP_COND, 0x00ff, 0x8000,
-                                   MMC_CMDAT_R3);
-               }
-       }
-
-       /* try to get card id */
-       resp =
-           mmc_cmd(MMC_CMD_ALL_SEND_CID, 0, 0, MMC_CMDAT_R2 | MMC_CMDAT_BUSY);
-       if (resp) {
-               memcpy(cid_resp, resp, sizeof(cid_resp));
-
-               /* MMC exists, get CSD too */
-               resp = mmc_cmd(MMC_CMD_SET_RELATIVE_ADDR, 0, 0, MMC_CMDAT_R1);
-               if (IF_TYPE_SD == mmc_dev.if_type)
-                       rca = ((resp[0] & 0xffff0000) >> 16);
-               resp = mmc_cmd(MMC_CMD_SEND_CSD, rca, 0, MMC_CMDAT_R2);
-               if (resp) {
-                       mmc_decode_csd(resp);
-                       rc = 0;
-                       mmc_ready = 1;
-               }
-
-               mmc_decode_cid(cid_resp);
-       }
-
-       writel(0, MMC_CLKRT);           /* 20 MHz */
-       resp = mmc_cmd(MMC_CMD_SELECT_CARD, rca, 0, MMC_CMDAT_R1);
-
-#if defined(CONFIG_CPU_PXA27X) || defined(CONFIG_CPU_MONAHANS)
-       if (IF_TYPE_SD == mmc_dev.if_type) {
-               resp = mmc_cmd(MMC_CMD_APP_CMD, rca, 0, MMC_CMDAT_R1);
-               resp = mmc_cmd(SD_CMD_APP_SET_BUS_WIDTH, 0, 2, MMC_CMDAT_R1);
-               wide = MMC_CMDAT_SD_4DAT;
-       }
-#endif
-
-       fat_register_device(&mmc_dev, 1);       /* partitions start counting with 1 */
-
-       return rc;
-}
index b9782367e2a43ddc9647d0c1956e8f040720b21e..dc49d37f5caee08ebfccd0efe182eed6bc53ffeb 100644 (file)
@@ -83,7 +83,8 @@ int s5p_sdhci_init(u32 regbase, int index, int bus_width)
        host->ioaddr = (void *)regbase;
 
        host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
-               SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR;
+               SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR |
+               SDHCI_QUIRK_WAIT_SEND_CMD;
        host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
        host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
 
index 2e3c408bc55ab2a0d50b07a88d676fe1d70f135c..7845f873ac9009295768c102fd4024d75f85c565 100644 (file)
@@ -82,8 +82,15 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
                                unsigned int start_addr)
 {
        unsigned int stat, rdy, mask, timeout, block = 0;
+#ifdef CONFIG_MMC_SDMA
+       unsigned char ctrl;
+       ctrl = sdhci_readl(host, SDHCI_HOST_CONTROL);
+       ctrl &= ~SDHCI_CTRL_DMA_MASK;
+       ctrl |= SDHCI_CTRL_SDMA;
+       sdhci_writel(host, ctrl, SDHCI_HOST_CONTROL);
+#endif
 
-       timeout = 10000;
+       timeout = 1000000;
        rdy = SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_AVAIL;
        mask = SDHCI_DATA_AVAILABLE | SDHCI_SPACE_AVAILABLE;
        do {
@@ -233,6 +240,9 @@ int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
        if (!ret && data)
                ret = sdhci_transfer_data(host, data, start_addr);
 
+       if (host->quirks & SDHCI_QUIRK_WAIT_SEND_CMD)
+               udelay(1000);
+
        stat = sdhci_readl(host, SDHCI_INT_STATUS);
        sdhci_writel(host, SDHCI_INT_ALL_MASK, SDHCI_INT_STATUS);
        if (!ret) {
index 7b8f033b0396feb671487e2671c45d88d36f1c67..f54b4089662d8cf472ff39f7f3d230987d630228 100644 (file)
 
 #include "ehci.h"
 
+/* Check USB PHY clock valid */
+static int usb_phy_clk_valid(struct usb_ehci *ehci)
+{
+       if (!((in_be32(&ehci->control) & PHY_CLK_VALID) ||
+                       in_be32(&ehci->prictrl))) {
+               printf("USB PHY clock invalid!\n");
+               return 0;
+       } else {
+               return 1;
+       }
+}
+
 /*
  * Create the appropriate control structures to manage
  * a new EHCI host controller.
@@ -82,18 +94,16 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
                udelay(1000); /* delay required for PHY Clk to appear */
 #endif
                out_le32(&(*hcor)->or_portsc[0], PORT_PTS_UTMI);
+               setbits_be32(&ehci->control, USB_EN);
        } else {
-#if defined(CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY)
-               clrbits_be32(&ehci->control, UTMI_PHY_EN);
                setbits_be32(&ehci->control, PHY_CLK_SEL_ULPI);
+               clrsetbits_be32(&ehci->control, UTMI_PHY_EN, USB_EN);
                udelay(1000); /* delay required for PHY Clk to appear */
-#endif
+               if (!usb_phy_clk_valid(ehci))
+                       return -EINVAL;
                out_le32(&(*hcor)->or_portsc[0], PORT_PTS_ULPI);
        }
 
-       /* Enable interface. */
-       setbits_be32(&ehci->control, USB_EN);
-
        out_be32(&ehci->prictrl, 0x0000000c);
        out_be32(&ehci->age_cnt_limit, 0x00000040);
        out_be32(&ehci->sictrl, 0x00000001);
index 9733daa86b902cc4bdc77d9a1c951738930d8c15..646b80f2d33600d462c9a89be576a61da1fb9115 100644 (file)
@@ -46,6 +46,7 @@ SECTIONS
        {
                *(.data)
        }
+
        . = ALIGN(4);
        __data_end = .;
 
index 901e1894b6a6b5a1fc26e4fe800f75b42db0dae4..b4db606236034ceed449bb315c892dd14d3104c5 100644 (file)
@@ -22,6 +22,7 @@
 #
 #
 
+subdirs-$(CONFIG_CMD_CBFS) += cbfs
 subdirs-$(CONFIG_CMD_CRAMFS) := cramfs
 subdirs-$(CONFIG_CMD_EXT4) += ext4
 ifndef CONFIG_CMD_EXT4
diff --git a/fs/cbfs/Makefile b/fs/cbfs/Makefile
new file mode 100644 (file)
index 0000000..2be8a68
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# 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)libcbfs.o
+
+COBJS-$(CONFIG_CMD_CBFS)       := cbfs.o
+
+SRCS   := $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+
+all:   $(LIB)
+
+$(LIB):        $(obj).depend $(OBJS)
+       $(call cmd_link_o_target, $(OBJS))
+
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
new file mode 100644 (file)
index 0000000..cae6d56
--- /dev/null
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * 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 <cbfs.h>
+#include <malloc.h>
+#include <asm/byteorder.h>
+
+enum cbfs_result file_cbfs_result;
+
+const char *file_cbfs_error(void)
+{
+       switch (file_cbfs_result) {
+       case CBFS_SUCCESS:
+               return "Success";
+       case CBFS_NOT_INITIALIZED:
+               return "CBFS not initialized";
+       case CBFS_BAD_HEADER:
+               return "Bad CBFS header";
+       case CBFS_BAD_FILE:
+               return "Bad CBFS file";
+       case CBFS_FILE_NOT_FOUND:
+               return "File not found";
+       default:
+               return "Unknown";
+       }
+}
+
+
+static const u32 good_magic = 0x4f524243;
+static const u8 good_file_magic[] = "LARCHIVE";
+
+
+static int initialized;
+static struct cbfs_header cbfs_header;
+static struct cbfs_cachenode *file_cache;
+
+/* Do endian conversion on the CBFS header structure. */
+static void swap_header(struct cbfs_header *dest, struct cbfs_header *src)
+{
+       dest->magic = be32_to_cpu(src->magic);
+       dest->version = be32_to_cpu(src->version);
+       dest->rom_size = be32_to_cpu(src->rom_size);
+       dest->boot_block_size = be32_to_cpu(src->boot_block_size);
+       dest->align = be32_to_cpu(src->align);
+       dest->offset = be32_to_cpu(src->offset);
+}
+
+/* Do endian conversion on a CBFS file header. */
+static void swap_file_header(struct cbfs_fileheader *dest,
+                            const struct cbfs_fileheader *src)
+{
+       memcpy(&dest->magic, &src->magic, sizeof(dest->magic));
+       dest->len = be32_to_cpu(src->len);
+       dest->type = be32_to_cpu(src->type);
+       dest->checksum = be32_to_cpu(src->checksum);
+       dest->offset = be32_to_cpu(src->offset);
+}
+
+/*
+ * Given a starting position in memory, scan forward, bounded by a size, and
+ * find the next valid CBFS file. No memory is allocated by this function. The
+ * caller is responsible for allocating space for the new file structure.
+ *
+ * @param start                The location in memory to start from.
+ * @param size         The size of the memory region to search.
+ * @param align                The alignment boundaries to check on.
+ * @param newNode      A pointer to the file structure to load.
+ * @param used         A pointer to the count of of bytes scanned through,
+ *                     including the file if one is found.
+ *
+ * @return 1 if a file is found, 0 if one isn't.
+ */
+static int file_cbfs_next_file(u8 *start, u32 size, u32 align,
+                              struct cbfs_cachenode *newNode, u32 *used)
+{
+       struct cbfs_fileheader header;
+
+       *used = 0;
+
+       while (size >= align) {
+               const struct cbfs_fileheader *fileHeader =
+                       (const struct cbfs_fileheader *)start;
+               u32 name_len;
+               u32 step;
+
+               /* Check if there's a file here. */
+               if (memcmp(good_file_magic, &(fileHeader->magic),
+                               sizeof(fileHeader->magic))) {
+                       *used += align;
+                       size -= align;
+                       start += align;
+                       continue;
+               }
+
+               swap_file_header(&header, fileHeader);
+               if (header.offset < sizeof(const struct cbfs_cachenode *) ||
+                               header.offset > header.len) {
+                       file_cbfs_result = CBFS_BAD_FILE;
+                       return -1;
+               }
+               newNode->next = NULL;
+               newNode->type = header.type;
+               newNode->data = start + header.offset;
+               newNode->data_length = header.len;
+               name_len = header.offset - sizeof(struct cbfs_cachenode *);
+               newNode->name = (char *)fileHeader +
+                               sizeof(struct cbfs_cachenode *);
+               newNode->name_length = name_len;
+               newNode->checksum = header.checksum;
+
+               step = header.len;
+               if (step % align)
+                       step = step + align - step % align;
+
+               *used += step;
+               return 1;
+       }
+       return 0;
+}
+
+/* Look through a CBFS instance and copy file metadata into regular memory. */
+static void file_cbfs_fill_cache(u8 *start, u32 size, u32 align)
+{
+       struct cbfs_cachenode *cache_node;
+       struct cbfs_cachenode *newNode;
+       struct cbfs_cachenode **cache_tail = &file_cache;
+
+       /* Clear out old information. */
+       cache_node = file_cache;
+       while (cache_node) {
+               struct cbfs_cachenode *oldNode = cache_node;
+               cache_node = cache_node->next;
+               free(oldNode);
+       }
+       file_cache = NULL;
+
+       while (size >= align) {
+               int result;
+               u32 used;
+
+               newNode = (struct cbfs_cachenode *)
+                               malloc(sizeof(struct cbfs_cachenode));
+               result = file_cbfs_next_file(start, size, align,
+                       newNode, &used);
+
+               if (result < 0) {
+                       free(newNode);
+                       return;
+               } else if (result == 0) {
+                       free(newNode);
+                       break;
+               }
+               *cache_tail = newNode;
+               cache_tail = &newNode->next;
+
+               size -= used;
+               start += used;
+       }
+       file_cbfs_result = CBFS_SUCCESS;
+}
+
+/* Get the CBFS header out of the ROM and do endian conversion. */
+static int file_cbfs_load_header(uintptr_t end_of_rom,
+                                struct cbfs_header *header)
+{
+       struct cbfs_header *header_in_rom;
+
+       header_in_rom = (struct cbfs_header *)(uintptr_t)
+                       *(u32 *)(end_of_rom - 3);
+       swap_header(header, header_in_rom);
+
+       if (header->magic != good_magic || header->offset >
+                       header->rom_size - header->boot_block_size) {
+               file_cbfs_result = CBFS_BAD_HEADER;
+               return 1;
+       }
+       return 0;
+}
+
+void file_cbfs_init(uintptr_t end_of_rom)
+{
+       u8 *start_of_rom;
+       initialized = 0;
+
+       if (file_cbfs_load_header(end_of_rom, &cbfs_header))
+               return;
+
+       start_of_rom = (u8 *)(end_of_rom + 1 - cbfs_header.rom_size);
+
+       file_cbfs_fill_cache(start_of_rom + cbfs_header.offset,
+                            cbfs_header.rom_size, cbfs_header.align);
+       if (file_cbfs_result == CBFS_SUCCESS)
+               initialized = 1;
+}
+
+const struct cbfs_header *file_cbfs_get_header(void)
+{
+       if (initialized) {
+               file_cbfs_result = CBFS_SUCCESS;
+               return &cbfs_header;
+       } else {
+               file_cbfs_result = CBFS_NOT_INITIALIZED;
+               return NULL;
+       }
+}
+
+const struct cbfs_cachenode *file_cbfs_get_first(void)
+{
+       if (!initialized) {
+               file_cbfs_result = CBFS_NOT_INITIALIZED;
+               return NULL;
+       } else {
+               file_cbfs_result = CBFS_SUCCESS;
+               return file_cache;
+       }
+}
+
+void file_cbfs_get_next(const struct cbfs_cachenode **file)
+{
+       if (!initialized) {
+               file_cbfs_result = CBFS_NOT_INITIALIZED;
+               file = NULL;
+               return;
+       }
+
+       if (*file)
+               *file = (*file)->next;
+       file_cbfs_result = CBFS_SUCCESS;
+}
+
+const struct cbfs_cachenode *file_cbfs_find(const char *name)
+{
+       struct cbfs_cachenode *cache_node = file_cache;
+
+       if (!initialized) {
+               file_cbfs_result = CBFS_NOT_INITIALIZED;
+               return NULL;
+       }
+
+       while (cache_node) {
+               if (!strcmp(name, cache_node->name))
+                       break;
+               cache_node = cache_node->next;
+       }
+       if (!cache_node)
+               file_cbfs_result = CBFS_FILE_NOT_FOUND;
+       else
+               file_cbfs_result = CBFS_SUCCESS;
+
+       return cache_node;
+}
+
+const struct cbfs_cachenode *file_cbfs_find_uncached(uintptr_t end_of_rom,
+                                                    const char *name)
+{
+       u8 *start;
+       u32 size;
+       u32 align;
+       static struct cbfs_cachenode node;
+
+       if (file_cbfs_load_header(end_of_rom, &cbfs_header))
+               return NULL;
+
+       start = (u8 *)(end_of_rom + 1 - cbfs_header.rom_size);
+       size = cbfs_header.rom_size;
+       align = cbfs_header.align;
+
+       while (size >= align) {
+               int result;
+               u32 used;
+
+               result = file_cbfs_next_file(start, size, align, &node, &used);
+
+               if (result < 0)
+                       return NULL;
+               else if (result == 0)
+                       break;
+
+               if (!strcmp(name, node.name))
+                       return &node;
+
+               size -= used;
+               start += used;
+       }
+       file_cbfs_result = CBFS_FILE_NOT_FOUND;
+       return NULL;
+}
+
+const char *file_cbfs_name(const struct cbfs_cachenode *file)
+{
+       file_cbfs_result = CBFS_SUCCESS;
+       return file->name;
+}
+
+u32 file_cbfs_size(const struct cbfs_cachenode *file)
+{
+       file_cbfs_result = CBFS_SUCCESS;
+       return file->data_length;
+}
+
+u32 file_cbfs_type(const struct cbfs_cachenode *file)
+{
+       file_cbfs_result = CBFS_SUCCESS;
+       return file->type;
+}
+
+long file_cbfs_read(const struct cbfs_cachenode *file, void *buffer,
+                   unsigned long maxsize)
+{
+       u32 size;
+
+       size = file->data_length;
+       if (maxsize && size > maxsize)
+               size = maxsize;
+
+       memcpy(buffer, file->data, size);
+
+       file_cbfs_result = CBFS_SUCCESS;
+       return size;
+}
diff --git a/helper.mk b/helper.mk
new file mode 100644 (file)
index 0000000..79a1da0
--- /dev/null
+++ b/helper.mk
@@ -0,0 +1,64 @@
+#
+# Copyright (C) 2012 Marek Vasut <marex@denx.de>
+#
+# 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.
+#
+#########################################################################
+
+##
+# make_u_boot_list - Generate contents of u_boot_list section
+# 1:           The name of the resulting file (usually u-boot.lst)
+# 2:           Files to analyze for possible u_boot_list entries
+#
+# This function generates the contents of the u_boot_list section,
+# including all the border symbols for it's subsections. The operation
+# of this function is as follows, numbering goes per lines:
+#
+# 1) Dump the ELF header sections from all files supplied via $(2)
+# 2) Filter out all other stuff that does not belong into .u_boot_list
+#    section.
+# 3) Fix up the lines so that the resulting output is is in format
+#    ".u_boot_list.*".
+# 4) Remove the last .something$, since that only contains the name
+#    of the variable to be put into a subsection. This name is irelevant
+#    for generation of border symbols, thus of no interest, remove it.
+# 5) Take each line and for every dot "." in that line, print the whole
+#    line until that dot "." . This is important so that we have all
+#    parent border symbols generated as well.
+# 6) Load every line and firstly append "\a" at the end and print the
+#    line. Next, append "@" at the end and print the line. Finally,
+#    append "~" at the end of line. This will make sense in conjunction
+#    with 6) and 7).
+# 7) Sort the lines. It is imperative to use LC_COLLATE=C here because
+#    with this, the "\a" symbol is first and "~" symbol is last. Any
+#    other symbols fall inbetween. Symbols like "@", which marks the
+#    end of current line (representing current section) and ".", which
+#    means the line continues and thus represents subsection.
+# 8) With such ordering, all lines ending with "\a" will float at the
+#    begining of all lines with the same prefix. Thus it is easy to
+#    replace "\a" with __start and make it the __start border symbol.
+#    Very similarly for "~", which will be always at the bottom and so
+#    can be replaced by "__end" and made into the __end border symbol.
+#    Finally, every line ending with "@" symbol will be transformed
+#    into " *(SORT(${line}*)); " format, which in the linker parlance
+#    will allow it to trap all symbols relevant to the subsection.
+#
+define make_u_boot_list
+$(1): $(2)
+       $(OBJDUMP) -h $(2) | \
+       sed -n -e '/.*\.u_boot_list[^ ]\+/ ! {d;n}' \
+               -e 's/.*\(\.u_boot_list[^ ]\+\).*$$$$/\1/' \
+               -e 's/\.[^\.]\+$$$$//' \
+               -e ':s /^.\+$$$$/ { p;s/^\(.*\)\.[^\.]*$$$$/\1/;b s }' | \
+       sed -n -e 'h;s/$$$$/\a/p;g;s/$$$$/@/p;g;s/$$$$/~/p;' | \
+       LC_COLLATE=C sort -u | \
+       sed -n -e '/\a$$$$/ { s/\./_/g;s/\a$$$$/__start = .;/p; }'\
+               -e '/~$$$$/ { s/\./_/g;s/~$$$$/__end = .;/p; }'\
+               -e '/@$$$$/ { s/\(.*\)@$$$$/*(SORT(\1.*));/p }' > $(1)
+endef
diff --git a/include/bouncebuf.h b/include/bouncebuf.h
new file mode 100644 (file)
index 0000000..31021c5
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Generic bounce buffer implementation
+ *
+ * Copyright (C) 2012 Marek Vasut <marex@denx.de>
+ *
+ * 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 __INCLUDE_BOUNCEBUF_H__
+#define __INCLUDE_BOUNCEBUF_H__
+
+/*
+ * GEN_BB_READ -- Data are read from the buffer eg. by DMA hardware.
+ * The source buffer is copied into the bounce buffer (if unaligned, otherwise
+ * the source buffer is used directly) upon start() call, then the operation
+ * requiring the aligned transfer happens, then the bounce buffer is lost upon
+ * stop() call.
+ */
+#define GEN_BB_READ    (1 << 0)
+/*
+ * GEN_BB_WRITE -- Data are written into the buffer eg. by DMA hardware.
+ * The source buffer starts in an undefined state upon start() call, then the
+ * operation requiring the aligned transfer happens, then the bounce buffer is
+ * copied into the destination buffer (if unaligned, otherwise destination
+ * buffer is used directly) upon stop() call.
+ */
+#define GEN_BB_WRITE   (1 << 1)
+/*
+ * GEN_BB_RW -- Data are read and written into the buffer eg. by DMA hardware.
+ * The source buffer is copied into the bounce buffer (if unaligned, otherwise
+ * the source buffer is used directly) upon start() call, then the  operation
+ * requiring the aligned transfer happens, then the bounce buffer is  copied
+ * into the destination buffer (if unaligned, otherwise destination buffer is
+ * used directly) upon stop() call.
+ */
+#define GEN_BB_RW      (GEN_BB_READ | GEN_BB_WRITE)
+
+#ifdef CONFIG_BOUNCE_BUFFER
+/**
+ * bounce_buffer_start() -- Start the bounce buffer session
+ * data:       pointer to buffer to be aligned
+ * len:                length of the buffer
+ * backup:     pointer to backup buffer (the original value is stored here if
+ *              needed
+ * flags:      flags describing the transaction, see above.
+ */
+int bounce_buffer_start(void **data, size_t len, void **backup, uint8_t flags);
+/**
+ * bounce_buffer_stop() -- Finish the bounce buffer session
+ * data:       pointer to buffer that was aligned
+ * len:                length of the buffer
+ * backup:     pointer to backup buffer (the original value is stored here if
+ *              needed
+ * flags:      flags describing the transaction, see above.
+ */
+int bounce_buffer_stop(void **data, size_t len, void **backup, uint8_t flags);
+#else
+static inline int bounce_buffer_start(void **data, size_t len, void **backup,
+                                       uint8_t flags)
+{
+       return 0;
+}
+
+static inline int bounce_buffer_stop(void **data, size_t len, void **backup,
+                                       uint8_t flags)
+{
+       return 0;
+}
+#endif
+
+#endif
diff --git a/include/cbfs.h b/include/cbfs.h
new file mode 100644 (file)
index 0000000..6ea3f35
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+ *
+ * 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 __CBFS_H
+#define __CBFS_H
+
+#include <compiler.h>
+#include <linux/compiler.h>
+
+enum cbfs_result {
+       CBFS_SUCCESS = 0,
+       CBFS_NOT_INITIALIZED,
+       CBFS_BAD_HEADER,
+       CBFS_BAD_FILE,
+       CBFS_FILE_NOT_FOUND
+};
+
+enum cbfs_filetype {
+       CBFS_TYPE_STAGE = 0x10,
+       CBFS_TYPE_PAYLOAD = 0x20,
+       CBFS_TYPE_OPTIONROM = 0x30,
+       CBFS_TYPE_BOOTSPLASH = 0x40,
+       CBFS_TYPE_RAW = 0x50,
+       CBFS_TYPE_VSA = 0x51,
+       CBFS_TYPE_MBI = 0x52,
+       CBFS_TYPE_MICROCODE = 0x53,
+       CBFS_COMPONENT_CMOS_DEFAULT = 0xaa,
+       CBFS_COMPONENT_CMOS_LAYOUT = 0x01aa
+};
+
+struct cbfs_header {
+       u32 magic;
+       u32 version;
+       u32 rom_size;
+       u32 boot_block_size;
+       u32 align;
+       u32 offset;
+       u32 pad[2];
+} __packed;
+
+struct cbfs_fileheader {
+       u8 magic[8];
+       u32 len;
+       u32 type;
+       u32 checksum;
+       u32 offset;
+} __packed;
+
+struct cbfs_cachenode {
+       struct cbfs_cachenode *next;
+       u32 type;
+       void *data;
+       u32 data_length;
+       char *name;
+       u32 name_length;
+       u32 checksum;
+} __packed;
+
+extern enum cbfs_result file_cbfs_result;
+
+/*
+ * Return a string describing the most recent error condition.
+ *
+ * @return A pointer to the constant string.
+ */
+const char *file_cbfs_error(void);
+
+/*
+ * Initialize the CBFS driver and load metadata into RAM.
+ *
+ * @param end_of_rom   Points to the end of the ROM the CBFS should be read
+ *                      from.
+ */
+void file_cbfs_init(uintptr_t end_of_rom);
+
+/*
+ * Get the header structure for the current CBFS.
+ *
+ * @return A pointer to the constant structure, or NULL if there is none.
+ */
+const struct cbfs_header *file_cbfs_get_header(void);
+
+/*
+ * Get a handle for the first file in CBFS.
+ *
+ * @return A handle for the first file in CBFS, NULL on error.
+ */
+const struct cbfs_cachenode *file_cbfs_get_first(void);
+
+/*
+ * Get a handle to the file after this one in CBFS.
+ *
+ * @param file         A pointer to the handle to advance.
+ */
+void file_cbfs_get_next(const struct cbfs_cachenode **file);
+
+/*
+ * Find a file with a particular name in CBFS.
+ *
+ * @param name         The name to search for.
+ *
+ * @return A handle to the file, or NULL on error.
+ */
+const struct cbfs_cachenode *file_cbfs_find(const char *name);
+
+
+/***************************************************************************/
+/* All of the functions below can be used without first initializing CBFS. */
+/***************************************************************************/
+
+/*
+ * Find a file with a particular name in CBFS without using the heap.
+ *
+ * @param end_of_rom   Points to the end of the ROM the CBFS should be read
+ *                      from.
+ * @param name         The name to search for.
+ *
+ * @return A handle to the file, or NULL on error.
+ */
+const struct cbfs_cachenode *file_cbfs_find_uncached(uintptr_t end_of_rom,
+                                                    const char *name);
+
+/*
+ * Get the name of a file in CBFS.
+ *
+ * @param file         The handle to the file.
+ *
+ * @return The name of the file, NULL on error.
+ */
+const char *file_cbfs_name(const struct cbfs_cachenode *file);
+
+/*
+ * Get the size of a file in CBFS.
+ *
+ * @param file         The handle to the file.
+ *
+ * @return The size of the file, zero on error.
+ */
+u32 file_cbfs_size(const struct cbfs_cachenode *file);
+
+/*
+ * Get the type of a file in CBFS.
+ *
+ * @param file         The handle to the file.
+ *
+ * @return The type of the file, zero on error.
+ */
+u32 file_cbfs_type(const struct cbfs_cachenode *file);
+
+/*
+ * Read a file from CBFS into RAM
+ *
+ * @param file         A handle to the file to read.
+ * @param buffer       Where to read it into memory.
+ *
+ * @return If positive or zero, the number of characters read. If negative, an
+ *         error occurred.
+ */
+long file_cbfs_read(const struct cbfs_cachenode *file, void *buffer,
+                   unsigned long maxsize);
+
+#endif /* __CBFS_H */
index 1f06aa1819023c0869b5c30ddeff4fe949becf19..10bc2606c717f600de2af73e9857c4926ccd510e 100644 (file)
@@ -28,6 +28,7 @@
 #define __COMMAND_H
 
 #include <config.h>
+#include <linker_lists.h>
 
 #ifndef NULL
 #define NULL   0
@@ -61,8 +62,6 @@ struct cmd_tbl_s {
 
 typedef struct cmd_tbl_s       cmd_tbl_t;
 
-extern cmd_tbl_t  __u_boot_cmd_start;
-extern cmd_tbl_t  __u_boot_cmd_end;
 
 #if defined(CONFIG_CMD_RUN)
 extern int do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
@@ -153,9 +152,6 @@ int cmd_process(int flag, int argc, char * const argv[],
 #define CMD_FLAG_REPEAT                0x0001  /* repeat last command          */
 #define CMD_FLAG_BOOTD         0x0002  /* command is from bootd        */
 
-#define Struct_Section  __attribute__((unused, section(".u_boot_cmd"), \
-               aligned(4)))
-
 #ifdef CONFIG_AUTO_COMPLETE
 # define _CMD_COMPLETE(x) x,
 #else
@@ -167,18 +163,22 @@ int cmd_process(int flag, int argc, char * const argv[],
 # define _CMD_HELP(x)
 #endif
 
-#define U_BOOT_CMD_MKENT_COMPLETE(name,maxargs,rep,cmd,usage,help,comp) \
-       {#name, maxargs, rep, cmd, usage, _CMD_HELP(help) _CMD_COMPLETE(comp)}
+#define U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd,         \
+                               _usage, _help, _comp)                   \
+               { #_name, _maxargs, _rep, _cmd, _usage,                 \
+                       _CMD_HELP(_help) _CMD_COMPLETE(_comp) }
 
-#define U_BOOT_CMD_MKENT(name,maxargs,rep,cmd,usage,help) \
-       U_BOOT_CMD_MKENT_COMPLETE(name,maxargs,rep,cmd,usage,help,NULL)
+#define U_BOOT_CMD_MKENT(_name, _maxargs, _rep, _cmd, _usage, _help)   \
+       U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd,          \
+                                       _usage, _help, NULL)
 
-#define U_BOOT_CMD_COMPLETE(name,maxargs,rep,cmd,usage,help,comp) \
-       cmd_tbl_t __u_boot_cmd_##name Struct_Section = \
-               U_BOOT_CMD_MKENT_COMPLETE(name,maxargs,rep,cmd,usage,help,comp)
+#define U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, _comp) \
+       ll_entry_declare(cmd_tbl_t, _name, cmd, cmd) =                  \
+               U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd,  \
+                                               _usage, _help, _comp);
 
-#define U_BOOT_CMD(name,maxargs,rep,cmd,usage,help) \
-       U_BOOT_CMD_COMPLETE(name,maxargs,rep,cmd,usage,help,NULL)
+#define U_BOOT_CMD(_name, _maxargs, _rep, _cmd, _usage, _help)         \
+       U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, NULL)
 
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 void fixup_cmdtable(cmd_tbl_t *cmdtp, int size);
index af0b714e11a9099c83e4ff534cb305974a778124..6764b4749c9b90e6bc26c4cf43a73033252861a4 100644 (file)
 #ifdef CONFIG_CMD_MMC
 #define CONFIG_MMC
 #define CONFIG_GENERIC_MMC
-#define CONFIG_MMC_BOUNCE_BUFFER
+#define CONFIG_BOUNCE_BUFFER
 #define CONFIG_MXS_MMC
 #endif
 
index 0e89242db75aa34c203f90dfb47790d7b1969e6f..3df085be51146eebd43dba256f8b6177418333e5 100644 (file)
@@ -92,6 +92,9 @@
 #define CONFIG_MAC_PARTITION
 #define CONFIG_ISO_PARTITION           /* Experimental */
 
+#define CONFIG_CMD_CBFS
+#define CONFIG_CMD_EXT4
+#define CONFIG_CMD_EXT4_WRITE
 
 /*-----------------------------------------------------------------------
  * Video Configuration
index ed64960879b0ead9add0102d8d2264596616a50c..5886a155dcbe3e66590e169ee0513b84feb3c5ce 100644 (file)
 #define CONFIG_SYS_CPUSPEED            0x161           /* set core clock to 400/200/100 MHz */
 
 #ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
+#define        CONFIG_GENERIC_MMC
+#define        CONFIG_PXA_MMC_GENERIC
 #define CONFIG_CMD_MMC
 #define CONFIG_SYS_MMC_BASE            0xF0000000
 #endif
index bdbb82065e5e7c2df19de34ae4a2b57f63d9ef55..b49ec8c7dd61fd4139a145bb62f2f730b23c025f 100644 (file)
  */
 #ifdef CONFIG_CMD_MMC
 #define        CONFIG_MMC
-#define        CONFIG_MMC_BOUNCE_BUFFER
+#define        CONFIG_BOUNCE_BUFFER
 #define        CONFIG_GENERIC_MMC
 #define        CONFIG_MXS_MMC
 #endif
index 7cdbec68deac5191afa2246a5340d50947748591..1443833c832bece7324507ab339614cc2ab7fde2 100644 (file)
 #ifdef CONFIG_CMD_MMC
 #define CONFIG_MMC
 #define CONFIG_GENERIC_MMC
-#define CONFIG_MMC_BOUNCE_BUFFER
+#define CONFIG_BOUNCE_BUFFER
 #define CONFIG_MXS_MMC
 #endif
 
index 6e8d8e9d573398b2a25ef08475ef8e94f6db37da..9c948c547355075935c56e64d4dc25dca130d4df 100644 (file)
@@ -77,7 +77,8 @@
  */
 #ifdef CONFIG_CMD_MMC
 #define        CONFIG_MMC
-#define        CONFIG_PXA_MMC
+#define        CONFIG_GENERIC_MMC
+#define        CONFIG_PXA_MMC_GENERIC
 #define        CONFIG_SYS_MMC_BASE             0xF0000000
 #define        CONFIG_CMD_FAT
 #define        CONFIG_CMD_EXT2
index 24c53633f065ce176ec1d2ad0809fc1f8e10176e..5a15af6b6a9f2cfbd1c31934f5708d341ae26eae 100644 (file)
 #define RTC    1                               /* enable 32KHz osc */
 
 #ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
+#define        CONFIG_GENERIC_MMC
+#define        CONFIG_PXA_MMC_GENERIC
 #define CONFIG_CMD_MMC
 #define CONFIG_SYS_MMC_BASE            0xF0000000
 #endif
index bc69c1ea2b71d7a16f6e51f3cd1d9449e247775b..c1bfe31e46233cf32e6e1123e9291e4461bff172 100644 (file)
 #define CONFIG_SYS_CPUSPEED            0x207           /* need to look more closely, I think this is Turbo = 2x, L=91Mhz */
 
 #ifdef CONFIG_MMC
-#define CONFIG_PXA_MMC
+#define        CONFIG_GENERIC_MMC
+#define        CONFIG_PXA_MMC_GENERIC
 #define CONFIG_CMD_MMC
 #define CONFIG_SYS_MMC_BASE            0xF0000000
 #endif
diff --git a/include/dwmmc.h b/include/dwmmc.h
new file mode 100644 (file)
index 0000000..c8b1d40
--- /dev/null
@@ -0,0 +1,191 @@
+/*
+ * (C) Copyright 2012 SAMSUNG Electronics
+ * Jaehoon Chung <jh80.chung@samsung.com>
+ *
+ * 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 __DWMMC_HW_H
+#define __DWMMC_HW_H
+
+#include <asm/io.h>
+#include <mmc.h>
+
+#define DWMCI_CTRL             0x000
+#define        DWMCI_PWREN             0x004
+#define DWMCI_CLKDIV           0x008
+#define DWMCI_CLKSRC           0x00C
+#define DWMCI_CLKENA           0x010
+#define DWMCI_TMOUT            0x014
+#define DWMCI_CTYPE            0x018
+#define DWMCI_BLKSIZ           0x01C
+#define DWMCI_BYTCNT           0x020
+#define DWMCI_INTMASK          0x024
+#define DWMCI_CMDARG           0x028
+#define DWMCI_CMD              0x02C
+#define DWMCI_RESP0            0x030
+#define DWMCI_RESP1            0x034
+#define DWMCI_RESP2            0x038
+#define DWMCI_RESP3            0x03C
+#define DWMCI_MINTSTS          0x040
+#define DWMCI_RINTSTS          0x044
+#define DWMCI_STATUS           0x048
+#define DWMCI_FIFOTH           0x04C
+#define DWMCI_CDETECT          0x050
+#define DWMCI_WRTPRT           0x054
+#define DWMCI_GPIO             0x058
+#define DWMCI_TCMCNT           0x05C
+#define DWMCI_TBBCNT           0x060
+#define DWMCI_DEBNCE           0x064
+#define DWMCI_USRID            0x068
+#define DWMCI_VERID            0x06C
+#define DWMCI_HCON             0x070
+#define DWMCI_UHS_REG          0x074
+#define DWMCI_BMOD             0x080
+#define DWMCI_PLDMND           0x084
+#define DWMCI_DBADDR           0x088
+#define DWMCI_IDSTS            0x08C
+#define DWMCI_IDINTEN          0x090
+#define DWMCI_DSCADDR          0x094
+#define DWMCI_BUFADDR          0x098
+#define DWMCI_DATA             0x200
+
+/* Interrupt Mask register */
+#define DWMCI_INTMSK_ALL       0xffffffff
+#define DWMCI_INTMSK_RE                (1 << 1)
+#define DWMCI_INTMSK_CDONE     (1 << 2)
+#define DWMCI_INTMSK_DTO       (1 << 3)
+#define DWMCI_INTMSK_TXDR      (1 << 4)
+#define DWMCI_INTMSK_RXDR      (1 << 5)
+#define DWMCI_INTMSK_DCRC      (1 << 7)
+#define DWMCI_INTMSK_RTO       (1 << 8)
+#define DWMCI_INTMSK_DRTO      (1 << 9)
+#define DWMCI_INTMSK_HTO       (1 << 10)
+#define DWMCI_INTMSK_FRUN      (1 << 11)
+#define DWMCI_INTMSK_HLE       (1 << 12)
+#define DWMCI_INTMSK_SBE       (1 << 13)
+#define DWMCI_INTMSK_ACD       (1 << 14)
+#define DWMCI_INTMSK_EBE       (1 << 15)
+
+/* Raw interrupt Regsiter */
+#define DWMCI_DATA_ERR (DWMCI_INTMSK_EBE | DWMCI_INTMSK_SBE | DWMCI_INTMSK_HLE |\
+                       DWMCI_INTMSK_FRUN | DWMCI_INTMSK_EBE | DWMCI_INTMSK_DCRC)
+#define DWMCI_DATA_TOUT        (DWMCI_INTMSK_HTO | DWMCI_INTMSK_DRTO)
+/* CTRL register */
+#define DWMCI_CTRL_RESET       (1 << 0)
+#define DWMCI_CTRL_FIFO_RESET  (1 << 1)
+#define DWMCI_CTRL_DMA_RESET   (1 << 2)
+#define DWMCI_DMA_EN           (1 << 5)
+#define DWMCI_CTRL_SEND_AS_CCSD        (1 << 10)
+#define DWMCI_IDMAC_EN         (1 << 25)
+#define DWMCI_RESET_ALL                (DWMCI_CTRL_RESET | DWMCI_CTRL_FIFO_RESET |\
+                               DWMCI_CTRL_DMA_RESET)
+
+/* CMD register */
+#define DWMCI_CMD_RESP_EXP     (1 << 6)
+#define DWMCI_CMD_RESP_LENGTH  (1 << 7)
+#define DWMCI_CMD_CHECK_CRC    (1 << 8)
+#define DWMCI_CMD_DATA_EXP     (1 << 9)
+#define DWMCI_CMD_RW           (1 << 10)
+#define DWMCI_CMD_SEND_STOP    (1 << 12)
+#define DWMCI_CMD_ABORT_STOP   (1 << 14)
+#define DWMCI_CMD_PRV_DAT_WAIT (1 << 13)
+#define DWMCI_CMD_UPD_CLK      (1 << 21)
+#define DWMCI_CMD_USE_HOLD_REG (1 << 29)
+#define DWMCI_CMD_START                (1 << 31)
+
+/* CLKENA register */
+#define DWMCI_CLKEN_ENABLE     (1 << 0)
+#define DWMCI_CLKEN_LOW_PWR    (1 << 16)
+
+/* Card-type registe */
+#define DWMCI_CTYPE_1BIT       0
+#define DWMCI_CTYPE_4BIT       (1 << 0)
+#define DWMCI_CTYPE_8BIT       (1 << 16)
+
+/* Status Register */
+#define DWMCI_BUSY             (1 << 9)
+
+/* FIFOTH Register */
+#define MSIZE(x)               ((x) << 28)
+#define RX_WMARK(x)            ((x) << 16)
+#define TX_WMARK(x)            (x)
+
+#define DWMCI_IDMAC_OWN                (1 << 31)
+#define DWMCI_IDMAC_CH         (1 << 4)
+#define DWMCI_IDMAC_FS         (1 << 3)
+#define DWMCI_IDMAC_LD         (1 << 2)
+
+/*  Bus Mode Register */
+#define DWMCI_BMOD_IDMAC_RESET (1 << 0)
+#define DWMCI_BMOD_IDMAC_FB    (1 << 1)
+#define DWMCI_BMOD_IDMAC_EN    (1 << 7)
+
+struct dwmci_host {
+       char *name;
+       void *ioaddr;
+       unsigned int quirks;
+       unsigned int caps;
+       unsigned int version;
+       unsigned int clock;
+       unsigned int bus_hz;
+       int dev_index;
+       int buswidth;
+       u32 fifoth_val;
+       struct mmc *mmc;
+
+       void (*clksel)(struct dwmci_host *host);
+       unsigned int (*mmc_clk)(int dev_index);
+};
+
+struct dwmci_idmac {
+       u32 flags;
+       u32 cnt;
+       u32 addr;
+       u32 next_addr;
+};
+
+static inline void dwmci_writel(struct dwmci_host *host, int reg, u32 val)
+{
+       writel(val, host->ioaddr + reg);
+}
+
+static inline void dwmci_writew(struct dwmci_host *host, int reg, u16 val)
+{
+       writew(val, host->ioaddr + reg);
+}
+
+static inline void dwmci_writeb(struct dwmci_host *host, int reg, u8 val)
+{
+       writeb(val, host->ioaddr + reg);
+}
+static inline u32 dwmci_readl(struct dwmci_host *host, int reg)
+{
+       return readl(host->ioaddr + reg);
+}
+
+static inline u16 dwmci_readw(struct dwmci_host *host, int reg)
+{
+       return readw(host->ioaddr + reg);
+}
+
+static inline u8 dwmci_readb(struct dwmci_host *host, int reg)
+{
+       return readb(host->ioaddr + reg);
+}
+
+int add_dwmci(struct dwmci_host *host, u32 max_clk, u32 min_clk);
+#endif /* __DWMMC_HW_H */
index 695d08eeccf1accdd8934d83ce07e778e85fb877..158e1beaf9510385353dde29dfbf33c7665125d5 100644 (file)
@@ -43,8 +43,10 @@ extern ulong ide_bus_offset[];
 
 #ifdef CONFIG_SYS_64BIT_LBA
 typedef uint64_t lbaint_t;
+#define LBAF "%llx"
 #else
 typedef ulong lbaint_t;
+#define LBAF "%lx"
 #endif
 
 /*
diff --git a/include/linker_lists.h b/include/linker_lists.h
new file mode 100644 (file)
index 0000000..0b405d7
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * include/linker_lists.h
+ *
+ * Implementation of linker-generated arrays
+ *
+ * Copyright (C) 2012 Marek Vasut <marex@denx.de>
+ *
+ * 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.
+ */
+#ifndef __LINKER_LISTS_H__
+#define __LINKER_LISTS_H__
+
+/**
+ * ll_entry_declare() - Declare linker-generated array entry
+ * @_type:     Data type of the entry
+ * @_name:     Name of the entry
+ * @_section_u:        Subsection of u_boot_list in which this entry is placed
+ *             (with underscores instead of dots, for name concatenation)
+ * @_section_d:        Subsection of u_boot_list in which this entry is placed
+ *             (with dots, for section concatenation)
+ *
+ * This macro declares a variable that is placed into a linker-generated
+ * array. This is a basic building block for more advanced use of linker-
+ * generated arrays. The user is expected to build their own macro wrapper
+ * around this one.
+ *
+ * A variable declared using this macro must be compile-time initialized
+ * and is as such placed into subsection of special section, .u_boot_list.
+ * The subsection is specified by the _section_[u,d] parameter, see below.
+ * The base name of the variable is _name, yet the actual variable is
+ * declared as concatenation of
+ *
+ *   %_u_boot_list_ + @_section_u + _ + @_name
+ *
+ * which ensures name uniqueness. This variable shall never be refered
+ * directly though.
+ *
+ * Special precaution must be made when using this macro:
+ * 1) The _type must not contain the "static" keyword, otherwise the entry
+ *    is not generated.
+ *
+ * 2) The @_section_u and @_section_d variables must match, the only difference
+ *    is that in @_section_u is every dot "." character present in @_section_d
+ *    replaced by a single underscore "_" character in @_section_u. The actual
+ *    purpose of these parameters is to select proper subsection in the global
+ *    .u_boot_list section.
+ *
+ * 3) In case a section is declared that contains some array elements AND a
+ *    subsection of this section is declared and contains some elements, it is
+ *    imperative that the elements are of the same type.
+ *
+ * 4) In case an outer section is declared that contains some array elements
+ *    AND am inner subsection of this section is declared and contains some
+ *    elements, then when traversing the outer section, even the elements of
+ *    the inner sections are present in the array.
+ *
+ * Example:
+ * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub, cmd.sub) = {
+ *         .x = 3,
+ *         .y = 4,
+ * };
+ */
+#define ll_entry_declare(_type, _name, _section_u, _section_d)         \
+       _type _u_boot_list_##_section_u##_##_name __attribute__((       \
+                       unused, aligned(4),                             \
+                       section(".u_boot_list."#_section_d"."#_name)))
+
+/**
+ * ll_entry_start() - Point to first entry of linker-generated array
+ * @_type:     Data type of the entry
+ * @_section_u:        Subsection of u_boot_list in which this entry is placed
+ *             (with underscores instead of dots)
+ *
+ * This function returns (_type *) pointer to the very first entry of a
+ * linker-generated array placed into subsection of .u_boot_list section
+ * specified by _section_u argument.
+ *
+ * Example:
+ * struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);
+ */
+#define ll_entry_start(_type, _section_u)                              \
+       ({                                                              \
+               extern _type _u_boot_list_##_section_u##__start;        \
+               _type *_ll_result = &_u_boot_list_##_section_u##__start;\
+               _ll_result;                                             \
+       })
+
+/**
+ * ll_entry_count() - Return the number of elements in linker-generated array
+ * @_type:     Data type of the entry
+ * @_section_u:        Subsection of u_boot_list in which this entry is placed
+ *             (with underscores instead of dots)
+ *
+ * This function returns the number of elements of a linker-generated array
+ * placed into subsection of .u_boot_list section specified by _section_u
+ * argument. The result is of an unsigned int type.
+ *
+ * Example:
+ * int i;
+ * const unsigned int count = ll_entry_count(struct my_sub_cmd, cmd_sub);
+ * struct my_sub_cmd *msc = ll_entry_start(struct my_sub_cmd, cmd_sub);
+ * for (i = 0; i < count; i++, msc++)
+ *         printf("Entry %i, x=%i y=%i\n", i, msc->x, msc->y);
+ */
+#define ll_entry_count(_type, _section_u)                              \
+       ({                                                              \
+               extern _type _u_boot_list_##_section_u##__start;        \
+               extern _type _u_boot_list_##_section_u##__end;          \
+               unsigned int _ll_result =                               \
+                       &_u_boot_list_##_section_u##__end -             \
+                       &_u_boot_list_##_section_u##__start;            \
+               _ll_result;                                             \
+       })
+
+
+/**
+ * ll_entry_get() - Retrieve entry from linker-generated array by name
+ * @_type:     Data type of the entry
+ * @_name:     Name of the entry
+ * @_section_u:        Subsection of u_boot_list in which this entry is placed
+ *             (with underscores instead of dots)
+ *
+ * This function returns a pointer to a particular entry in LG-array
+ * identified by the subsection of u_boot_list where the entry resides
+ * and it's name.
+ *
+ * Example:
+ * ll_entry_declare(struct my_sub_cmd, my_sub_cmd, cmd_sub, cmd.sub) = {
+ *         .x = 3,
+ *         .y = 4,
+ * };
+ * ...
+ * struct my_sub_cmd *c = ll_entry_get(struct my_sub_cmd, my_sub_cmd, cmd_sub);
+ */
+#define ll_entry_get(_type, _name, _section_u)                         \
+       ({                                                              \
+               extern _type _u_boot_list_##_section_u##_##_name;       \
+               _type *_ll_result = &_u_boot_list_##_section_u##_##_name;\
+               _ll_result;                                             \
+       })
+
+#endif /* __LINKER_LISTS_H__ */
index c0345ed86ef108f7d218ecbfb3ce8d6b7f13b64c..c44793d5ecf773b8baea5dd5daf860687e38648c 100644 (file)
 #define SDHCI_QUIRK_NO_HISPD_BIT       (1 << 3)
 #define SDHCI_QUIRK_BROKEN_VOLTAGE     (1 << 4)
 #define SDHCI_QUIRK_NO_CD              (1 << 5)
+#define SDHCI_QUIRK_WAIT_SEND_CMD      (1 << 6)
 
 /* to make gcc happy */
 struct sdhci_host;
index 43da3df15743902d15f3c17a6579bcb8558f294c..e5388d89c859bfd6092489e915e9ee3f66b4ffd9 100644 (file)
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -61,8 +62,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
 
index 43da3df15743902d15f3c17a6579bcb8558f294c..e5388d89c859bfd6092489e915e9ee3f66b4ffd9 100644 (file)
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -61,8 +62,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
 
index 43da3df15743902d15f3c17a6579bcb8558f294c..e5388d89c859bfd6092489e915e9ee3f66b4ffd9 100644 (file)
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -61,8 +62,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
 
index 87784d29370a6fd5a52081dbe67c56eea29fdf28..43e72c42d48f44515c4e57f0cd7c81f06d969093 100644 (file)
@@ -6,6 +6,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
@@ -36,8 +37,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $@
 
-$(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 #########################################################################
 
index d2b08f60c59c7597299ebab1c3002e02ebbdf6e8..da49c100c5c13845fa17c110f110b18fcfad8c95 100644 (file)
@@ -46,9 +46,11 @@ SECTIONS
        }
 
        . = ALIGN(4);
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+               #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index cdbd49292cb4bdae4400d47ea39118af4871d811..f270faae02454e0c4eb45ff07feb20f3d22c1c55 100644 (file)
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -62,8 +63,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
 
index da435213fcfdf7d43c268f748d4cd747d4868e6c..b2882844b3b470f5de253ca2608ee2d12426eb19 100644 (file)
@@ -27,6 +27,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -57,8 +58,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
 
index 43da3df15743902d15f3c17a6579bcb8558f294c..e5388d89c859bfd6092489e915e9ee3f66b4ffd9 100644 (file)
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -61,8 +62,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
 
index 46cf7099b6e1096015c0728c453a8d7027dd02cd..7146d16a272d0dd05b83be99cf1c12779bda2bde 100644 (file)
@@ -32,6 +32,7 @@ include $(TOPDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
                $(LDFLAGS) $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_NAND_SPL
@@ -62,8 +63,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot-nand_spl.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $(nandobj)u-boot-spl
 
-$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 # create symbolic links for common files
 
index 03363466605f8eba2afb4097ef9584f62cf89531..becf7fa99ebf4bbf93494c329110bfb8bb07d673 100644 (file)
@@ -27,6 +27,7 @@ include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk
 nandobj        := $(OBJTREE)/nand_spl/
 
 LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
+LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst
 LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
           $(LDFLAGS_FINAL)
 AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
@@ -57,8 +58,12 @@ $(nandobj)u-boot-spl:        $(OBJS) $(nandobj)u-boot.lds
                -Map $(nandobj)u-boot-spl.map \
                -o $@
 
-$(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@
+# The following line expands into whole rule which generates $(LSTSCRIPT),
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS)))
+$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT)
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj) -ansi -D__ASSEMBLY__ -P - <$< >$@
 
 #########################################################################
 
index d2b08f60c59c7597299ebab1c3002e02ebbdf6e8..ee361314fdaeb143a3832f42b8dcc90eb2f98067 100644 (file)
@@ -46,9 +46,11 @@ SECTIONS
        }
 
        . = ALIGN(4);
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index 567f63516f87872e9506b5ffacc621efa9fc96be..2ed646630c9b31bb0aa793cc9bae1c81c1de35ca 100644 (file)
@@ -50,9 +50,11 @@ SECTIONS
        . = ALIGN(4);
        .got : { *(.got) }
 
-       __u_boot_cmd_start = .;
-       .u_boot_cmd : { *(.u_boot_cmd) }
-       __u_boot_cmd_end = .;
+
+       . = ALIGN(4);
+       .u_boot_list : {
+       #include <u-boot.lst>
+       }
 
        . = ALIGN(4);
 
index 7c8814709f63ea6e6eee98cbf7786280e8ba5bc7..8cf487e5c8ff06c6ca29afa81bcefea7c9fac8ac 100644 (file)
@@ -2,3 +2,4 @@ u-boot-spl
 u-boot-spl.bin
 u-boot-spl.lds
 u-boot-spl.map
+u-boot.lst
index 92267d6deaacf1d3c2fef84b6e1f777d684b5603..20a943c14d47e686ea1dee2a5769d7cb62130d7a 100644 (file)
@@ -154,8 +154,12 @@ $(START):  depend
 $(LIBS):       depend
        $(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))
 
-$(obj)u-boot-spl.lds: $(LDSCRIPT) depend
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - < $< > $@
+# The following line expands into whole rule which generates u-boot.lst,
+# the file containing u-boots LG-array linker section. This is included into
+# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file.
+$(eval $(call make_u_boot_list, $(obj)u-boot.lst, $(LIBS)))
+$(obj)u-boot-spl.lds: $(LDSCRIPT) $(obj)u-boot.lst depend
+       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@
 
 depend:        $(obj).depend
 .PHONY: depend