]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
nand: mxc: Switch NAND SPL to generic SPL
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Thu, 11 Apr 2013 09:35:51 +0000 (09:35 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Fri, 12 Apr 2013 05:55:07 +0000 (07:55 +0200)
This also fixes support for mx31pdk and tx25, which had been broken by commit
e05e5de7fae5bec79617e113916dac6631251156.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Acked-by: Scott Wood <scottwood@freescale.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
20 files changed:
arch/arm/cpu/arm926ejs/start.S
board/freescale/mx31pdk/Makefile
board/freescale/mx31pdk/config.mk [deleted file]
board/freescale/mx31pdk/mx31pdk.c
board/karo/tx25/Makefile
board/karo/tx25/config.mk [deleted file]
board/karo/tx25/tx25.c
boards.cfg
doc/README.arm-relocation
drivers/mtd/nand/Makefile
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/mxc_nand.h [moved from include/fsl_nfc.h with 98% similarity]
drivers/mtd/nand/mxc_nand_spl.c [moved from nand_spl/nand_boot_fsl_nfc.c with 92% similarity]
include/configs/mx31pdk.h
include/configs/tx25.h
nand_spl/board/freescale/mx31pdk/Makefile [deleted file]
nand_spl/board/freescale/mx31pdk/u-boot.lds [deleted file]
nand_spl/board/karo/tx25/Makefile [deleted file]
nand_spl/board/karo/tx25/config.mk [deleted file]
nand_spl/board/karo/tx25/u-boot.lds [deleted file]

index 552279feeeca72402e7f71240172355557e0b89f..0a9cf1d9664f77cd0a9d3cbb8f06fbedee204acf 100644 (file)
@@ -200,7 +200,6 @@ reset:
 
 /*------------------------------------------------------------------------------*/
 
-#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_NAND_SPL)
 /*
  * void relocate_code (addr_sp, gd, addr_moni)
  *
@@ -269,6 +268,8 @@ relocate_done:
 
        bx      lr
 
+#ifndef CONFIG_SPL_BUILD
+
 _rel_dyn_start_ofs:
        .word __rel_dyn_start - _start
 _rel_dyn_end_ofs:
index 5b7cafd9f65c339d739ad4c128fba9317dbf8209..b91072285a5eb21082feb32f96aaab8ce650af93 100644 (file)
@@ -27,6 +27,9 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(BOARD).o
 
+ifdef CONFIG_SPL_BUILD
+SOBJS  := lowlevel_init.o
+endif
 COBJS  := mx31pdk.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/board/freescale/mx31pdk/config.mk b/board/freescale/mx31pdk/config.mk
deleted file mode 100644 (file)
index de2c642..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ifdef CONFIG_NAND_SPL
-CONFIG_SYS_TEXT_BASE = 0x87ec0000
-else
-CONFIG_SYS_TEXT_BASE = 0x87f00000
-endif
index 895396cd6231ce037493629f8742c70598ba7ef0..3d0d419e273901bac63c23a19a6b77dcd73a3b53 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_SPL_BUILD
+void board_init_f(ulong bootflag)
+{
+       relocate_code(0, NULL, CONFIG_SPL_TEXT_BASE);
+       asm volatile("ldr pc, =nand_boot");
+}
+#endif
+
 int dram_init(void)
 {
        /* dram_init must store complete ramsize in gd->ram_size */
index 9617fa528846da430570badb517787108d2309da..c26bf36b55ebfa055bb77d3fbb52fa9ea3f998ac 100644 (file)
@@ -25,8 +25,10 @@ include $(TOPDIR)/config.mk
 
 LIB    = $(obj)lib$(BOARD).o
 
-COBJS  := tx25.o
+ifdef CONFIG_SPL_BUILD
 SOBJS  := lowlevel_init.o
+endif
+COBJS  := tx25.o
 
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
diff --git a/board/karo/tx25/config.mk b/board/karo/tx25/config.mk
deleted file mode 100644 (file)
index 18b2883..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-ifdef CONFIG_NAND_SPL
-CONFIG_SYS_TEXT_BASE = 0x810c0000
-else
-CONFIG_SYS_TEXT_BASE = 0x81200000
-endif
index 362f00a173f1bf30f020b21e7748df8919701645..69ee590e263eac4d8f1b4c75c1d43c4a7ffc939d 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_SPL_BUILD
+void board_init_f(ulong bootflag)
+{
+       relocate_code(0, NULL, CONFIG_SPL_TEXT_BASE);
+       asm volatile("ldr pc, =nand_boot");
+}
+#endif
+
 #ifdef CONFIG_FEC_MXC
 #define GPIO_FEC_RESET_B       IMX_GPIO_NR(4, 7)
 #define GPIO_FEC_ENABLE_B      IMX_GPIO_NR(4, 9)
index 1acf56acb3f57cfc5067a259f4a424b4dd30aeaa..860d8f1055d76ec9162252ea17f52d8690b89a29 100644 (file)
@@ -45,7 +45,7 @@ imx31_phycore                arm         arm1136     -                   -
 imx31_phycore_eet            arm         arm1136     imx31_phycore       -              mx31         imx31_phycore:IMX31_PHYCORE_EET
 qong                         arm         arm1136     -                   davedenx       mx31
 mx31ads                      arm         arm1136     -                   freescale      mx31
-mx31pdk                      arm         arm1136     -                   freescale      mx31         mx31pdk:NAND_U_BOOT
+mx31pdk                      arm         arm1136     -                   freescale      mx31
 tt01                         arm         arm1136     -                   hale           mx31
 imx31_litekit                arm         arm1136     -                   logicpd        mx31
 flea3                        arm         arm1136     -                   CarMediaLab    mx35
index 5a9a2fb07105b5aefe3a4cda44082a894950569c..645b3746c8a88fe25f7c9a33cd9b8b17aa7b5a57 100644 (file)
@@ -40,15 +40,15 @@ Boards which are not fixed to support relocation will be REMOVED!
 
 -----------------------------------------------------------------------------
 
-For boards which boot from nand_spl, it is possible to save one copy
+For boards which boot from spl, it is possible to save one copy
 if CONFIG_SYS_TEXT_BASE == relocation address! This prevents that uboot code
 is copied again in relocate_code().
 
-example for the tx25 board:
+example for the tx25 board booting from NAND Flash:
 
 a) cpu starts
 b) it copies the first page in nand to internal ram
-   (nand_spl_code)
+   (spl code)
 c) end executes this code
 d) this initialize CPU, RAM, ... and copy itself to RAM
    (this bin must fit in one page, so board_init_f()
@@ -79,20 +79,20 @@ TODO
 
 -----------------------------------------------------------------------------
 
-Relocation with NAND_SPL (example for the tx25):
+Relocation with SPL (example for the tx25 booting from NAND Flash):
 
 - cpu copies the first page from NAND to 0xbb000000 (IMX_NFC_BASE)
   and start with code execution on this address.
 
-- The First page contains u-boot code from u-boot:nand_spl/nand_boot_fsl_nfc.c
-  which inits the dram, cpu registers, reloacte itself to CONFIG_SYS_TEXT_BASE and loads
+- The First page contains u-boot code from drivers/mtd/nand/mxc_nand_spl.c
+  which inits the dram, cpu registers, reloacte itself to CONFIG_SPL_TEXT_BASE and loads
   the "real" u-boot to CONFIG_SYS_NAND_U_BOOT_DST and starts execution
   @CONFIG_SYS_NAND_U_BOOT_START
 
 - This u-boot does no RAM init, nor CPU register setup. Just look
   where it has to copy and relocate itself to this address. If
   relocate address = CONFIG_SYS_TEXT_BASE (not the same, as the
-  CONFIG_SYS_TEXT_BASE from the nand_spl code), then there is no need
+  CONFIG_SPL_TEXT_BASE from the spl code), then there is no need
   to copy, just go on with bss clear and jump to board_init_r.
 
 -----------------------------------------------------------------------------
index c77c0c4f0f6eec10c34ce5e3b17d495b6531026f..bcb71619b587ebc368c41b05bc783ebcaed4051d 100644 (file)
@@ -82,6 +82,7 @@ COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o
 else  # minimal SPL drivers
 
 COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_spl.o
+COBJS-$(CONFIG_NAND_MXC) += mxc_nand_spl.o
 
 endif # drivers
 endif # nand
index 29ceab37c9bd8b5ccd33f6fbd27b963ce7c598ab..507bbc25445c77a952a03ab8ceb9193af3a6a234 100644 (file)
@@ -26,7 +26,7 @@
        defined(CONFIG_MX51) || defined(CONFIG_MX53)
 #include <asm/arch/imx-regs.h>
 #endif
-#include <fsl_nfc.h>
+#include "mxc_nand.h"
 
 #define DRIVER_NAME "mxc_nand"
 
@@ -36,9 +36,9 @@ struct mxc_nand_host {
        struct mtd_info                 mtd;
        struct nand_chip                *nand;
 
-       struct fsl_nfc_regs __iomem     *regs;
+       struct mxc_nand_regs __iomem    *regs;
 #ifdef MXC_NFC_V3_2
-       struct fsl_nfc_ip_regs __iomem  *ip_regs;
+       struct mxc_nand_ip_regs __iomem *ip_regs;
 #endif
        int                             spare_only;
        int                             status_request;
@@ -1213,10 +1213,10 @@ int board_nand_init(struct nand_chip *this)
        this->read_buf = mxc_nand_read_buf;
        this->verify_buf = mxc_nand_verify_buf;
 
-       host->regs = (struct fsl_nfc_regs __iomem *)CONFIG_MXC_NAND_REGS_BASE;
+       host->regs = (struct mxc_nand_regs __iomem *)CONFIG_MXC_NAND_REGS_BASE;
 #ifdef MXC_NFC_V3_2
        host->ip_regs =
-               (struct fsl_nfc_ip_regs __iomem *)CONFIG_MXC_NAND_IP_REGS_BASE;
+               (struct mxc_nand_ip_regs __iomem *)CONFIG_MXC_NAND_IP_REGS_BASE;
 #endif
        host->clk_act = 1;
 
similarity index 98%
rename from include/fsl_nfc.h
rename to drivers/mtd/nand/mxc_nand.h
index 48a6448977df4a459785c9b88f4901ca56b514bf..308ff8d8a8e55e3bccc823f7418946052a133c0b 100644 (file)
@@ -20,8 +20,8 @@
  * MA 02111-1307 USA
  */
 
-#ifndef __FSL_NFC_H
-#define __FSL_NFC_H
+#ifndef __MXC_NAND_H
+#define __MXC_NAND_H
 
 /*
  * Register map and bit definitions for the Freescale NAND Flash Controller
@@ -73,7 +73,7 @@
 #define NAND_MXC_REG_OFFSET            0x1e00
 #endif
 
-struct fsl_nfc_regs {
+struct mxc_nand_regs {
        u8 main_area[NAND_MXC_NR_BUFS][0x200];
        u8 spare_area[NAND_MXC_NR_BUFS][NAND_MXC_SPARE_BUF_SIZE];
        /*
@@ -131,7 +131,7 @@ struct fsl_nfc_regs {
 };
 
 #ifdef MXC_NFC_V3_2
-struct fsl_nfc_ip_regs {
+struct mxc_nand_ip_regs {
        u32 wrprot;
        u32 wrprot_unlock_blkaddr[8];
        u32 config2;
@@ -222,4 +222,4 @@ struct fsl_nfc_ip_regs {
 #define writenfc       writel
 #endif
 
-#endif /* __FSL_NFC_H */
+#endif /* __MXC_NAND_H */
similarity index 92%
rename from nand_spl/nand_boot_fsl_nfc.c
rename to drivers/mtd/nand/mxc_nand_spl.c
index 1096727aed30ae33d5fabd0b6cfe8b3b0734af7a..09f23c30c4ef46a4e5158750fba8d8b2125989ba 100644 (file)
 #include <nand.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/io.h>
-#include <fsl_nfc.h>
+#include "mxc_nand.h"
 
 #if defined(MXC_NFC_V1) || defined(MXC_NFC_V2_1)
-static struct fsl_nfc_regs *const nfc = (void *)NFC_BASE_ADDR;
+static struct mxc_nand_regs *const nfc = (void *)NFC_BASE_ADDR;
 #elif defined(MXC_NFC_V3_2)
-static struct fsl_nfc_regs *const nfc = (void *)NFC_BASE_ADDR_AXI;
-static struct fsl_nfc_ip_regs *const nfc_ip = (void *)NFC_BASE_ADDR;
+static struct mxc_nand_regs *const nfc = (void *)NFC_BASE_ADDR_AXI;
+static struct mxc_nand_ip_regs *const nfc_ip = (void *)NFC_BASE_ADDR;
 #endif
 
 static void nfc_wait_ready(void)
@@ -68,7 +68,7 @@ static void nfc_nand_init(void)
 
        tmp = (readnfc(&nfc_ip->config2) & ~(NFC_V3_CONFIG2_SPAS_MASK |
                        NFC_V3_CONFIG2_EDC_MASK | NFC_V3_CONFIG2_PS_MASK)) |
-               NFC_V3_CONFIG2_SPAS(CONFIG_SYS_NAND_SPARE_SIZE / 2) |
+               NFC_V3_CONFIG2_SPAS(CONFIG_SYS_NAND_OOBSIZE / 2) |
                NFC_V3_CONFIG2_INT_MSK | NFC_V3_CONFIG2_ECC_EN |
                NFC_V3_CONFIG2_ONE_CYCLE;
        if (CONFIG_SYS_NAND_PAGE_SIZE == 4096)
@@ -81,7 +81,7 @@ static void nfc_nand_init(void)
         * if spare size is larger that 16 bytes per 512 byte hunk
         * then use 8 symbol correction instead of 4
         */
-       if (CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page > 16)
+       if (CONFIG_SYS_NAND_OOBSIZE / ecc_per_page > 16)
                tmp |= NFC_V3_CONFIG2_ECC_MODE_8;
        else
                tmp &= ~NFC_V3_CONFIG2_ECC_MODE_8;
@@ -102,7 +102,7 @@ static void nfc_nand_init(void)
        int ecc_per_page = CONFIG_SYS_NAND_PAGE_SIZE / 512;
        int config1;
 
-       writenfc(CONFIG_SYS_NAND_SPARE_SIZE / 2, &nfc->spare_area_size);
+       writenfc(CONFIG_SYS_NAND_OOBSIZE / 2, &nfc->spare_area_size);
 
        /* unlocking RAM Buff */
        writenfc(0x2, &nfc->config);
@@ -115,7 +115,7 @@ static void nfc_nand_init(void)
         * if spare size is larger that 16 bytes per 512 byte hunk
         * then use 8 symbol correction instead of 4
         */
-       if (CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page > 16)
+       if (CONFIG_SYS_NAND_OOBSIZE / ecc_per_page > 16)
                config1 &= ~NFC_V2_CONFIG1_ECC_MODE_4;
        else
                config1 |= NFC_V2_CONFIG1_ECC_MODE_4;
@@ -204,7 +204,7 @@ static int nfc_nand_check_ecc(void)
 #elif defined(MXC_NFC_V2_1) || defined(MXC_NFC_V3_2)
        u32 ecc_status = readl(&nfc->ecc_status_result);
        int ecc_per_page = CONFIG_SYS_NAND_PAGE_SIZE / 512;
-       int err_limit = CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page > 16 ? 8 : 4;
+       int err_limit = CONFIG_SYS_NAND_OOBSIZE / ecc_per_page > 16 ? 8 : 4;
        int subpages = CONFIG_SYS_NAND_PAGE_SIZE / 512;
 
        do {
@@ -332,14 +332,6 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf)
        return 0;
 }
 
-#if defined(CONFIG_ARM)
-void board_init_f (ulong bootflag)
-{
-       relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL,
-                      CONFIG_SYS_TEXT_BASE);
-}
-#endif
-
 /*
  * The main entry for NAND booting. It's necessary that SDRAM is already
  * configured and available since this code loads the main U-Boot image
index 34e429577e0a80504dc386523f4bb26253179d25..80ec08e20d84201de9c6098e7a28826958a1b65a 100644 (file)
 
 #define CONFIG_MACH_TYPE       MACH_TYPE_MX31_3DS
 
-#if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)
+#define CONFIG_SPL
+#define CONFIG_SPL_TARGET      "u-boot-with-spl.bin"
+#define CONFIG_SPL_LDSCRIPT    "arch/$(ARCH)/cpu/u-boot-spl.lds"
+#define CONFIG_SPL_MAX_SIZE    2048
+#define CONFIG_SPL_NAND_SUPPORT
+
+#define CONFIG_SPL_TEXT_BASE   0x87dc0000
+#define CONFIG_SYS_TEXT_BASE   0x87e00000
+
+#ifndef CONFIG_SPL_BUILD
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #endif
 
        "bootcmd=run bootcmd_net\0"                                     \
        "bootcmd_net=run bootargs_base bootargs_mtd bootargs_nfs; "     \
                "tftpboot 0x81000000 uImage-mx31; bootm\0"              \
-       "prg_uboot=tftpboot 0x81000000 u-boot-nand.bin; "               \
+       "prg_uboot=tftpboot 0x81000000 u-boot-with-spl.bin; "           \
                "nand erase 0x0 0x40000; "                              \
                "nand write 0x81000000 0x0 0x40000\0"
 
 #define CONFIG_SYS_GBL_DATA_OFFSET     (CONFIG_SYS_INIT_RAM_SIZE - \
                                                GENERATED_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_INIT_RAM_ADDR + \
-                                               CONFIG_SYS_GBL_DATA_OFFSET)
+                                               CONFIG_SYS_INIT_RAM_SIZE)
 
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
 /* NAND configuration for the NAND_SPL */
 
 /* Start copying real U-boot from the second page */
-#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x800
-#define CONFIG_SYS_NAND_U_BOOT_SIZE    0x30000
+#define CONFIG_SYS_NAND_U_BOOT_OFFS    CONFIG_SPL_PAD_TO
+#define CONFIG_SYS_NAND_U_BOOT_SIZE    0x3f800
 /* Load U-Boot to this address */
-#define CONFIG_SYS_NAND_U_BOOT_DST     0x87f00000
+#define CONFIG_SYS_NAND_U_BOOT_DST     CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_START   CONFIG_SYS_NAND_U_BOOT_DST
 
 #define CONFIG_SYS_NAND_PAGE_SIZE      0x800
index 80194d824c19d2e49d6ad1cc35d178eb8bd884e0..e72f8f66b1d7ef66d137083583ad3d7b5ad45cca 100644 (file)
@@ -21,6 +21,7 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#include <asm/arch/imx-regs.h>
 
 /*
  * KARO TX25 board - SoC Configuration
 
 #define        CONFIG_SYS_MONITOR_LEN          (256 << 10)     /* 256 kB for U-Boot */
 
-/* NAND BOOT is the only boot method */
-#define CONFIG_NAND_U_BOOT
+#define CONFIG_SPL
+#define CONFIG_SPL_TARGET              "u-boot-with-spl.bin"
+#define CONFIG_SPL_LDSCRIPT            "arch/$(ARCH)/cpu/u-boot-spl.lds"
+#define CONFIG_SPL_MAX_SIZE            2048
+#define CONFIG_SPL_NAND_SUPPORT
+
+#define CONFIG_SPL_TEXT_BASE           0x810c0000
+#define CONFIG_SYS_TEXT_BASE           0x81200000
 
 #ifndef MACH_TYPE_TX25
 #define MACH_TYPE_TX25 2177
 
 #define CONFIG_MACH_TYPE MACH_TYPE_TX25
 
-#ifdef CONFIG_NAND_SPL
+#ifdef CONFIG_SPL_BUILD
 /* Start copying real U-boot from the second page */
-#define CONFIG_SYS_NAND_U_BOOT_OFFS    0x800
+#define CONFIG_SYS_NAND_U_BOOT_OFFS    CONFIG_SPL_PAD_TO
 #define CONFIG_SYS_NAND_U_BOOT_SIZE    0x30000
 
-#define CONFIG_SYS_NAND_U_BOOT_DST      (0x81200000)
+#define CONFIG_SYS_NAND_U_BOOT_DST      CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_NAND_U_BOOT_START    CONFIG_SYS_NAND_U_BOOT_DST
 
 #define CONFIG_SYS_NAND_PAGE_SIZE      2048
-#define CONFIG_SYS_NAND_SPARE_SIZE     64
+#define CONFIG_SYS_NAND_OOBSIZE                64
 #define CONFIG_SYS_NAND_BLOCK_SIZE     (128 * 1024)
 #define CONFIG_SYS_NAND_PAGE_COUNT     64
 #define CONFIG_SYS_NAND_SIZE           (128 * 1024 * 1024)
 
 /* additions for new relocation code, must be added to all boards */
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
-#define CONFIG_SYS_INIT_SP_ADDR                (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \
-                                       GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR                (IMX_RAM_BASE + IMX_RAM_SIZE)
 
 #endif /* __CONFIG_H */
diff --git a/nand_spl/board/freescale/mx31pdk/Makefile b/nand_spl/board/freescale/mx31pdk/Makefile
deleted file mode 100644 (file)
index 3d57059..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-CONFIG_NAND_SPL        = y
-PAD_TO := 2048
-
-include $(TOPDIR)/config.mk
-
-nandobj        := $(OBJTREE)/nand_spl/
-
-LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
-LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
-          $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
-
-SOBJS  = start.o crt0.o lowlevel_init.o
-COBJS  = nand_boot_fsl_nfc.o
-
-SRCS   := $(SRCTREE)/nand_spl/nand_boot_fsl_nfc.c
-SRCS   += $(SRCTREE)/arch/arm/cpu/arm1136/start.S
-SRCS   += $(SRCTREE)/arch/arm/lib/crt0.S
-SRCS   += $(SRCTREE)/board/freescale/mx31pdk/lowlevel_init.S
-OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
-__OBJS := $(SOBJS) $(COBJS)
-LNDIR  := $(nandobj)board/$(BOARDDIR)
-
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
-
-$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
-       $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
-
-$(nandobj)u-boot-spl.bin:      $(nandobj)u-boot-spl
-       $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
-
-$(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
-       cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $@
-
-$(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
-               -ansi -D__ASSEMBLY__ -P - <$< >$@
-
-#########################################################################
-
-$(obj)%.o:     $(SRCTREE)/arch/arm/cpu/arm1136/%.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)%.o:     $(SRCTREE)/arch/arm/lib/%.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)%.o:     $(SRCTREE)/board/freescale/mx31pdk/%.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)%.o:     $(SRCTREE)/nand_spl/%.c
-       $(CC) $(CFLAGS) -c -o $@ $<
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/nand_spl/board/freescale/mx31pdk/u-boot.lds b/nand_spl/board/freescale/mx31pdk/u-boot.lds
deleted file mode 100644 (file)
index 5f2b5e2..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * (C) Copyright 2009
- * Wolfgang Denk, DENX Software Engineering, wd@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
- */
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-       . = 0x00000000;
-
-       . = ALIGN(4);
-       .text :
-       {
-               start.o                 (.text)
-               lowlevel_init.o         (.text)
-               nand_boot_fsl_nfc.o     (.text)
-               *(.text)
-               . = 2K;
-       }
-
-       . = ALIGN(4);
-       .rodata : { *(.rodata) }
-
-       . = ALIGN(4);
-       .data : {
-               *(.data)
-       }
-
-       . = ALIGN(4);
-
-       . = ALIGN(4);
-       .u_boot_list : {
-               *(SORT(.u_boot_list*));
-       }
-
-       . = ALIGN(4);
-
-       __image_copy_end = .;
-
-       .rel.dyn : {
-               __rel_dyn_start = .;
-               *(.rel*)
-               __rel_dyn_end = .;
-       }
-
-       .dynsym : {
-               __dynsym_start = .;
-               *(.dynsym)
-       }
-
-       _end = .;
-
-       .bss __rel_dyn_start (OVERLAY) : {
-               __bss_start = .;
-               *(.bss)
-                . = ALIGN(4);
-               __bss_end = .;
-       }
-
-       /DISCARD/ : { *(.bss*) }
-       /DISCARD/ : { *(.dynstr*) }
-       /DISCARD/ : { *(.dynsym*) }
-       /DISCARD/ : { *(.dynamic*) }
-       /DISCARD/ : { *(.hash*) }
-       /DISCARD/ : { *(.plt*) }
-       /DISCARD/ : { *(.interp*) }
-       /DISCARD/ : { *(.gnu*) }
-}
diff --git a/nand_spl/board/karo/tx25/Makefile b/nand_spl/board/karo/tx25/Makefile
deleted file mode 100644 (file)
index 9f9c589..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-#
-# (C) Copyright 2009 DENX Software Engineering
-#
-# 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 Foundatio; 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
-#
-CONFIG_NAND_SPL        = y
-
-include $(TOPDIR)/config.mk
-include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk
-
-nandobj        := $(OBJTREE)/nand_spl/
-
-LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
-LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \
-          $(LDFLAGS_FINAL)
-AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
-CFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL
-
-SOBJS  = start.o crt0.o lowlevel_init.o
-COBJS  = nand_boot_fsl_nfc.o
-
-SRCS   := $(SRCTREE)/nand_spl/nand_boot_fsl_nfc.c
-SRCS   += $(SRCTREE)/arch/arm/cpu/arm926ejs/start.S
-SRCS   += $(SRCTREE)/arch/arm/lib/crt0.S
-SRCS   += $(SRCTREE)/board/karo/tx25/lowlevel_init.S
-OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
-__OBJS := $(SOBJS) $(COBJS)
-LNDIR  := $(nandobj)board/$(BOARDDIR)
-
-ALL    = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin
-
-all:   $(obj).depend $(ALL)
-
-$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl
-       $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@
-
-$(nandobj)u-boot-spl.bin:      $(nandobj)u-boot-spl
-       $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@
-
-$(nandobj)u-boot-spl:  $(OBJS) $(nandobj)u-boot.lds
-       cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \
-               -Map $(nandobj)u-boot-spl.map \
-               -o $@
-
-$(nandobj)u-boot.lds: $(LDSCRIPT)
-       $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \
-               -ansi -D__ASSEMBLY__ -P - <$< >$@
-
-#########################################################################
-
-$(obj)%.o:     $(SRCTREE)/arch/arm/cpu/arm926ejs/%.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)%.o:     $(SRCTREE)/arch/arm/lib/%.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)%.o:     $(SRCTREE)/board/karo/tx25/%.S
-       $(CC) $(AFLAGS) -c -o $@ $<
-
-$(obj)%.o:     $(SRCTREE)/nand_spl/%.c
-       $(CC) $(CFLAGS) -c -o $@ $<
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/nand_spl/board/karo/tx25/config.mk b/nand_spl/board/karo/tx25/config.mk
deleted file mode 100644 (file)
index 68afbf1..0000000
+++ /dev/null
@@ -1 +0,0 @@
-PAD_TO := 2048
diff --git a/nand_spl/board/karo/tx25/u-boot.lds b/nand_spl/board/karo/tx25/u-boot.lds
deleted file mode 100644 (file)
index e5363e2..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * (C) Copyright 2009
- * Wolfgang Denk, DENX Software Engineering, wd@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
- */
-OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
-OUTPUT_ARCH(arm)
-ENTRY(_start)
-SECTIONS
-{
-       . = 0x00000000;
-
-       . = ALIGN(4);
-       .text :
-       {
-               start.o                 (.text)
-               lowlevel_init.o         (.text)
-               nand_boot_fsl_nfc.o     (.text)
-               *(.text)
-               . = 2K;
-       }
-
-       . = ALIGN(4);
-       .rodata : { *(.rodata) }
-
-       . = ALIGN(4);
-       .data : {
-               *(.data)
-       }
-
-       . = ALIGN(4);
-
-       . = ALIGN(4);
-       .u_boot_list : {
-       *(SORT(.u_boot_list*));
-       }
-
-       . = ALIGN(4);
-
-       __image_copy_end = .;
-
-       .rel.dyn : {
-               __rel_dyn_start = .;
-               *(.rel*)
-               __rel_dyn_end = .;
-       }
-
-       .dynsym : {
-               __dynsym_start = .;
-               *(.dynsym)
-       }
-
-       _end = .;
-
-       .bss __rel_dyn_start (OVERLAY) : {
-               __bss_start = .;
-               *(.bss)
-                . = ALIGN(4);
-               __bss_end = .;
-       }
-
-       /DISCARD/ : { *(.bss*) }
-       /DISCARD/ : { *(.dynstr*) }
-       /DISCARD/ : { *(.dynsym*) }
-       /DISCARD/ : { *(.dynamic*) }
-       /DISCARD/ : { *(.hash*) }
-       /DISCARD/ : { *(.plt*) }
-       /DISCARD/ : { *(.interp*) }
-       /DISCARD/ : { *(.gnu*) }
-}