]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/configs/tx6.h
arm: spear: Move to common SPL infrastructure
[karo-tx-uboot.git] / include / configs / tx6.h
index deb3f13119acf5e32c513fd52e7c461e64f74290..aa0e7af33462f1c76bc51f3b1ac1aad9a9e50338 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <linux/sizes.h>
 #include <asm/arch/imx-regs.h>
-#include "mx6_common.h"
 
 /*
  * Ka-Ro TX6 board - SoC configuration
 #define PHYS_SDRAM_1_WIDTH             64
 #endif
 #define PHYS_SDRAM_1_SIZE              (SZ_512M / 32 * PHYS_SDRAM_1_WIDTH)
-#ifdef CONFIG_MX6Q
+#ifdef CONFIG_SOC_MX6Q
 #define CONFIG_SYS_SDRAM_CLK           528
 #else
 #define CONFIG_SYS_SDRAM_CLK           400
 #endif
 #define CONFIG_STACKSIZE               SZ_128K
+#define CONFIG_SPL_STACK               (IRAM_BASE_ADDR + SZ_16K)
 #define CONFIG_SYS_MALLOC_LEN          SZ_8M
 #define CONFIG_SYS_MEMTEST_START       PHYS_SDRAM_1    /* Memtest start address */
 #define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_MEMTEST_START + SZ_4M)
  * U-Boot general configurations
  */
 #define CONFIG_SYS_LONGHELP
-#if defined(CONFIG_MX6Q)
+#if defined(CONFIG_SOC_MX6Q)
 #define CONFIG_SYS_PROMPT              "TX6Q U-Boot > "
-#elif defined(CONFIG_MX6DL)
+#elif defined(CONFIG_SOC_MX6DL)
 #define CONFIG_SYS_PROMPT              "TX6DL U-Boot > "
-#elif defined(CONFIG_MX6S)
+#elif defined(CONFIG_SOC_MX6S)
 #define CONFIG_SYS_PROMPT              "TX6S U-Boot > "
 #else
 #error Unsupported i.MX6 processor variant
 #endif
 #define CONFIG_ZERO_BOOTDELAY_CHECK
 #define CONFIG_SYS_AUTOLOAD            "no"
-#ifndef CONFIG_TX6_UBOOT_MFG
+#define DEFAULT_BOOTCMD                        "run bootcmd_${boot_mode} bootm_cmd"
 #define CONFIG_BOOTFILE                        "uImage"
 #define CONFIG_BOOTARGS                        "init=/linuxrc console=ttymxc0,115200 ro debug panic=1"
-#define CONFIG_BOOTCOMMAND             "run bootcmd_${boot_mode} bootm_cmd"
+#ifndef CONFIG_TX6_UBOOT_MFG
+#define CONFIG_BOOTCOMMAND             DEFAULT_BOOTCMD
 #else
-#define CONFIG_BOOTCOMMAND             "env import " xstr(CONFIG_BOOTCMD_MFG_LOADADDR) ";run bootcmd_mfg"
+#define CONFIG_BOOTCOMMAND             "set bootcmd '" DEFAULT_BOOTCMD "';" \
+       "env import " xstr(CONFIG_BOOTCMD_MFG_LOADADDR) ";run bootcmd_mfg"
 #define CONFIG_BOOTCMD_MFG_LOADADDR    10500000
 #define CONFIG_DELAY_ENVIRONMENT
 #endif /* CONFIG_TX6_UBOOT_MFG */
 /*
  * Extra Environments
  */
-#ifndef CONFIG_TX6_UBOOT_MFG
-#ifdef CONFIG_ENV_IS_NOWHERE
+#ifdef CONFIG_TX6_UBOOT_NOENV
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
        "autostart=no\0"                                                \
        "autoload=no\0"                                                 \
        "cpu_clk=800\0"                                                 \
        "default_bootargs=set bootargs " CONFIG_BOOTARGS                \
        " ${append_bootargs}\0"                                         \
+       EMMC_BOOT_PART_STR                                              \
+       EMMC_BOOT_ACK_STR                                               \
        "fdtaddr=" xstr(CONFIG_FDTADDR) "\0"                            \
        CONFIG_SYS_FDTSAVE_CMD                                          \
        "mtdids=" MTDIDS_DEFAULT "\0"                                   \
        "touchpanel=tsc2007\0"                                          \
        "video_mode=" DEFAULT_VIDEO_MODE "\0"
 #endif /*  CONFIG_ENV_IS_NOWHERE */
-#endif /*  CONFIG_TX6_UBOOT_MFG */
 
 #ifdef CONFIG_TX6_NAND
-#define CONFIG_SYS_DEFAULT_BOOT_MODE "nand"
+#define CONFIG_SYS_DEFAULT_BOOT_MODE   "nand"
 #define CONFIG_SYS_BOOT_CMD_NAND                                       \
        "bootcmd_nand=set autostart no;run bootargs_ubifs;nboot linux\0"
 #define CONFIG_SYS_FDTSAVE_CMD                                         \
 #define MTDIDS_DEFAULT                 "nand0=" MTD_NAME
 #define CONFIG_SYS_NAND_ONFI_DETECTION
 #define MMC_ROOT_STR " root=/dev/mmcblk0p2 rootwait\0"
-#define ROOTPART_UUID_STR ""
+#define ROOTPART_UUID_STR              ""
+#define EMMC_BOOT_ACK_STR              ""
+#define EMMC_BOOT_PART_STR             ""
 #else
-#define CONFIG_SYS_DEFAULT_BOOT_MODE "mmc"
-#define CONFIG_SYS_BOOT_CMD_NAND ""
+#define CONFIG_SYS_DEFAULT_BOOT_MODE   "mmc"
+#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
+#define CONFIG_SYS_BOOT_CMD_NAND       ""
 #define CONFIG_SYS_FDTSAVE_CMD                                         \
-       "fdtsave=mmc open 0 1;mmc write ${fdtaddr} "                    \
-       xstr(CONFIG_SYS_DTB_BLKNO) " 80;mmc close 0 1\0"
-#define MMC_ROOT_STR " root=PARTUUID=${rootpart_uuid} rootwait\0"
-#define ROOTPART_UUID_STR "rootpart_uuid=0cc66cc0-02\0"
+       "fdtsave=mmc partconf 0 ${emmc_boot_ack} ${emmc_boot_part} ${emmc_boot_part}" \
+       ";mmc write ${fdtaddr} " xstr(CONFIG_SYS_DTB_BLKNO) " 80"       \
+       ";mmc partconf 0 ${emmc_boot_ack} ${emmc_boot_part} 0\0"
 #define MTD_NAME                       ""
 #define MTDIDS_DEFAULT                 ""
-#ifdef CONFIG_SUPPORT_EMMC_BOOT
-#endif
+#define MMC_ROOT_STR " root=PARTUUID=${rootpart_uuid} rootwait\0"
+#define ROOTPART_UUID_STR "rootpart_uuid=0cc66cc0-02\0"
+#define EMMC_BOOT_ACK_STR              "emmc_boot_ack=1\0"
+#define EMMC_BOOT_PART_STR             "emmc_boot_part="       \
+       xstr(CONFIG_SYS_MMCSD_FS_BOOT_PARTITION) "\0"
 #endif /* CONFIG_TX6_NAND */
 
-/*
- * U-Boot Commands
- */
-#include <config_cmd_default.h>
-
 /*
  * Serial Driver
  */
 #define CONFIG_SYS_FSL_ESDHC_ADDR      0
 #endif
 #ifdef CONFIG_CMD_MMC
-#define CONFIG_DOS_PARTITION
 #define CONFIG_CMD_FAT
 #define CONFIG_FAT_WRITE
 #define CONFIG_CMD_EXT2