]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: Load U-Boot proper binary in SPL code based on kwbimage header
authorPali Rohár <pali@kernel.org>
Fri, 23 Jul 2021 09:14:29 +0000 (11:14 +0200)
committerStefan Roese <sr@denx.de>
Sat, 31 Jul 2021 07:59:58 +0000 (09:59 +0200)
Now that proper load and execution addresses are set in v1 kwbimage we
can use it for loading and booting U-Boot proper.

Use the new spl_parse_board_header() function to implement parsing the
kwbimage v1 header. Use information from this header to locate offset and
size of the U-Boot proper binary, instead of using the legacy U-Boot
header which is prepended to the U-Boot proper binary stored at fixed
offset. This has the advantage that we do not need to relay on legacy
U-Boot header anymore and therefore U-Boot proper binary can be stored at
any offset, as is the case when loading & booting U-Boot proper by
BootROM. The CONFIG_SYS_U_BOOT_OFFS option is therefore not used by SPL
code anymore.

Also allow to compile U-Boot SPL without CONFIG_SPL_SPI_FLASH_SUPPORT,
CONFIG_SPL_MMC_SUPPORT or CONFIG_SPL_SATA_SUPPORT set. In this case
BootROM is used for loading and executing U-Boot proper. This reduces the
size of U-Boot's SPL image. By default these config options are enabled
and so BootROM loading is not used. In some cases BootROM reads from SPI
NOR at lower speed than U-Boot SPL. So people can decide whether they
want to have smaller SPL binary at the cost of slower boot.

Therefore dependency on CONFIG_SPL_DM_SPI, CONFIG_SPL_SPI_FLASH_SUPPORT,
CONFIG_SPL_SPI_LOAD, CONFIG_SPL_SPI_SUPPORT, CONFIG_SPL_DM_GPIO,
CONFIG_SPL_DM_MMC, CONFIG_SPL_GPIO_SUPPORT, CONFIG_SPL_LIBDISK_SUPPORT,
CONFIG_SPL_MMC_SUPPORT, CONFIG_SPL_SATA_SUPPORT and
CONFIG_SPL_LIBDISK_SUPPORT is changed from strict to related "imply"
(which can be selectivelly turned off and causes booting via BootROM).

Options CONFIG_SYS_SPI_U_BOOT_OFFS,
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR and
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET have to to be set to
zero as they define the location where kwbimage header starts. It is the
location where BootROM expects start of the kwbimage from which it reads,
parses and executes SPL part. The same applies to option
CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR, which has to be set to one.

Update all config files to set correct values of these options and set
CONFIG_SYS_U_BOOT_OFFS to the correct value - the offset where U-Boot
proper starts.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
28 files changed:
arch/arm/mach-mvebu/Kconfig
arch/arm/mach-mvebu/spl.c
board/kobol/helios4/Kconfig
board/solidrun/clearfog/Kconfig
common/spl/Kconfig
configs/clearfog_defconfig
configs/controlcenterdc_defconfig
configs/db-88f6720_defconfig
configs/db-88f6820-amc_defconfig
configs/db-88f6820-gp_defconfig
configs/db-mv784mp-gp_defconfig
configs/ds414_defconfig
configs/helios4_defconfig
configs/maxbcm_defconfig
configs/theadorable_debug_defconfig
configs/turris_omnia_defconfig
configs/x530_defconfig
include/configs/clearfog.h
include/configs/controlcenterdc.h
include/configs/db-88f6720.h
include/configs/db-88f6820-amc.h
include/configs/db-88f6820-gp.h
include/configs/db-mv784mp-gp.h
include/configs/ds414.h
include/configs/helios4.h
include/configs/theadorable.h
include/configs/turris_omnia.h
include/configs/x530.h

index 12de6f16259997711dd4140ea3942646b951ffe6..89737a37ad9e2db419ca27a8ac940233b5c0219a 100644 (file)
@@ -253,27 +253,27 @@ choice
 config MVEBU_SPL_BOOT_DEVICE_SPI
        bool "SPI NOR flash"
        imply ENV_IS_IN_SPI_FLASH
-       select SPL_DM_SPI
-       select SPL_SPI_FLASH_SUPPORT
-       select SPL_SPI_LOAD
-       select SPL_SPI_SUPPORT
+       imply SPL_DM_SPI
+       imply SPL_SPI_FLASH_SUPPORT
+       imply SPL_SPI_LOAD
+       imply SPL_SPI_SUPPORT
        select SPL_BOOTROM_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_MMC
        bool "SDIO/MMC card"
        imply ENV_IS_IN_MMC
        # GPIO needed for eMMC/SD card presence detection
-       select SPL_DM_GPIO
-       select SPL_DM_MMC
-       select SPL_GPIO
-       select SPL_LIBDISK_SUPPORT
-       select SPL_MMC_SUPPORT
+       imply SPL_DM_GPIO
+       imply SPL_DM_MMC
+       imply SPL_GPIO
+       imply SPL_LIBDISK_SUPPORT
+       imply SPL_MMC_SUPPORT
        select SPL_BOOTROM_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_SATA
        bool "SATA"
-       select SPL_SATA_SUPPORT
-       select SPL_LIBDISK_SUPPORT
+       imply SPL_SATA_SUPPORT
+       imply SPL_LIBDISK_SUPPORT
        select SPL_BOOTROM_SUPPORT
 
 config MVEBU_SPL_BOOT_DEVICE_UART
index 5c3d959bffbc977a656340865000fc0c946ac87b..3b6bc3897090d140c1c6692ba9ae21f64735050e 100644 (file)
@@ -8,6 +8,7 @@
 #include <debug_uart.h>
 #include <fdtdec.h>
 #include <hang.h>
+#include <image.h>
 #include <init.h>
 #include <log.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
 
+#if defined(CONFIG_SPL_SPI_FLASH_SUPPORT) || defined(CONFIG_SPL_MMC_SUPPORT) || defined(CONFIG_SPL_SATA_SUPPORT)
+
+/*
+ * When loading U-Boot via SPL from SPI NOR, CONFIG_SYS_SPI_U_BOOT_OFFS must
+ * point to the offset of kwbimage main header which is always at offset zero
+ * (defined by BootROM). Therefore other values of CONFIG_SYS_SPI_U_BOOT_OFFS
+ * makes U-Boot non-bootable.
+ */
+#ifdef CONFIG_SPL_SPI_FLASH_SUPPORT
+#if defined(CONFIG_SYS_SPI_U_BOOT_OFFS) && CONFIG_SYS_SPI_U_BOOT_OFFS != 0
+#error CONFIG_SYS_SPI_U_BOOT_OFFS must be set to 0
+#endif
+#endif
+
+/*
+ * When loading U-Boot via SPL from eMMC (in Marvell terminology SDIO), the
+ * kwbimage main header is stored at sector 0. U-Boot SPL needs to parse this
+ * header and figure out at which sector the U-Boot proper binary is stored.
+ * Partition booting is therefore not supported and CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
+ * and CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET need to point to the
+ * kwbimage main header.
+ */
+#ifdef CONFIG_SPL_MMC_SUPPORT
+#ifdef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
+#error CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION is unsupported
+#endif
+#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR) && CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR != 0
+#error CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR must be set to 0
+#endif
+#if defined(CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET) && CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET != 0
+#error CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET must be set to 0
+#endif
+#endif
+
+/*
+ * When loading U-Boot via SPL from SATA disk, the kwbimage main header is
+ * stored at sector 1. Therefore CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR must be
+ * set to 1. Otherwise U-Boot SPL would not be able to load U-Boot proper.
+ */
+#ifdef CONFIG_SPL_SATA_SUPPORT
+#if !defined(CONFIG_SPL_SATA_RAW_U_BOOT_USE_SECTOR) || !defined(CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR) || CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR != 1
+#error CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR must be set to 1
+#endif
+#endif
+
+/* Boot Type - block ID */
+#define IBR_HDR_I2C_ID                 0x4D
+#define IBR_HDR_SPI_ID                 0x5A
+#define IBR_HDR_NAND_ID                        0x8B
+#define IBR_HDR_SATA_ID                        0x78
+#define IBR_HDR_PEX_ID                 0x9C
+#define IBR_HDR_UART_ID                        0x69
+#define IBR_HDR_SDIO_ID                        0xAE
+
+/* Structure of the main header, version 1 (Armada 370/38x/XP) */
+struct kwbimage_main_hdr_v1 {
+       uint8_t  blockid;               /* 0x0       */
+       uint8_t  flags;                 /* 0x1       */
+       uint16_t reserved2;             /* 0x2-0x3   */
+       uint32_t blocksize;             /* 0x4-0x7   */
+       uint8_t  version;               /* 0x8       */
+       uint8_t  headersz_msb;          /* 0x9       */
+       uint16_t headersz_lsb;          /* 0xA-0xB   */
+       uint32_t srcaddr;               /* 0xC-0xF   */
+       uint32_t destaddr;              /* 0x10-0x13 */
+       uint32_t execaddr;              /* 0x14-0x17 */
+       uint8_t  options;               /* 0x18      */
+       uint8_t  nandblocksize;         /* 0x19      */
+       uint8_t  nandbadblklocation;    /* 0x1A      */
+       uint8_t  reserved4;             /* 0x1B      */
+       uint16_t reserved5;             /* 0x1C-0x1D */
+       uint8_t  ext;                   /* 0x1E      */
+       uint8_t  checksum;              /* 0x1F      */
+} __packed;
+
+#ifdef CONFIG_SPL_MMC_SUPPORT
+u32 spl_mmc_boot_mode(const u32 boot_device)
+{
+       return MMCSD_MODE_RAW;
+}
+#endif
+
+int spl_parse_board_header(struct spl_image_info *spl_image,
+                          const void *image_header, size_t size)
+{
+       const struct kwbimage_main_hdr_v1 *mhdr = image_header;
+
+       if (size < sizeof(*mhdr)) {
+               /* This should be compile time assert */
+               printf("FATAL ERROR: Image header size is too small\n");
+               hang();
+       }
+
+       /*
+        * Very basic check for image validity. We cannot check mhdr->checksum
+        * as it is calculated also from variable length extended headers
+        * (including SPL content) which is not included in U-Boot image_header.
+        */
+       if (mhdr->version != 1 ||
+           ((mhdr->headersz_msb << 16) | mhdr->headersz_lsb) < sizeof(*mhdr) ||
+           (
+#ifdef CONFIG_SPL_SPI_FLASH_SUPPORT
+            mhdr->blockid != IBR_HDR_SPI_ID &&
+#endif
+#ifdef CONFIG_SPL_SATA_SUPPORT
+            mhdr->blockid != IBR_HDR_SATA_ID &&
+#endif
+#ifdef CONFIG_SPL_MMC_SUPPORT
+            mhdr->blockid != IBR_HDR_SDIO_ID &&
+#endif
+            1
+           )) {
+               printf("ERROR: Not valid SPI/NAND/SATA/SDIO kwbimage v1\n");
+               return -EINVAL;
+       }
+
+       spl_image->offset = mhdr->srcaddr;
+
+#ifdef CONFIG_SPL_SATA_SUPPORT
+       /*
+        * For SATA srcaddr is specified in number of sectors.
+        * The main header is must be stored at sector number 1.
+        * This expects that sector size is 512 bytes and recalculates
+        * data offset to bytes relative to the main header.
+        */
+       if (mhdr->blockid == IBR_HDR_SATA_ID) {
+               if (spl_image->offset < 1) {
+                       printf("ERROR: Wrong SATA srcaddr in kwbimage\n");
+                       return -EINVAL;
+               }
+               spl_image->offset -= 1;
+               spl_image->offset *= 512;
+       }
+#endif
+
+#ifdef CONFIG_SPL_MMC_SUPPORT
+       /*
+        * For SDIO (eMMC) srcaddr is specified in number of sectors.
+        * This expects that sector size is 512 bytes and recalculates
+        * data offset to bytes.
+        */
+       if (mhdr->blockid == IBR_HDR_SDIO_ID)
+               spl_image->offset *= 512;
+#endif
+
+       spl_image->size = mhdr->blocksize;
+       spl_image->entry_point = mhdr->execaddr;
+       spl_image->load_addr = mhdr->destaddr;
+       spl_image->os = IH_OS_U_BOOT;
+       spl_image->name = "U-Boot";
+
+       return 0;
+}
+
 static u32 get_boot_device(void)
 {
        u32 val;
@@ -49,11 +204,11 @@ static u32 get_boot_device(void)
        boot_device = (val & BOOT_DEV_SEL_MASK) >> BOOT_DEV_SEL_OFFS;
        debug("SAR_REG=0x%08x boot_device=0x%x\n", val, boot_device);
        switch (boot_device) {
-#if defined(CONFIG_ARMADA_38X)
+#ifdef BOOT_FROM_NAND
        case BOOT_FROM_NAND:
                return BOOT_DEVICE_NAND;
 #endif
-#ifdef CONFIG_SPL_MMC_SUPPORT
+#ifdef BOOT_FROM_MMC
        case BOOT_FROM_MMC:
        case BOOT_FROM_MMC_ALT:
                return BOOT_DEVICE_MMC1;
@@ -69,15 +224,26 @@ static u32 get_boot_device(void)
                return BOOT_DEVICE_SATA;
 #endif
        case BOOT_FROM_SPI:
-       default:
                return BOOT_DEVICE_SPI;
+       default:
+               return BOOT_DEVICE_BOOTROM;
        };
 }
 
+#else
+
+static u32 get_boot_device(void)
+{
+       return BOOT_DEVICE_BOOTROM;
+}
+
+#endif
+
 u32 spl_boot_device(void)
 {
        u32 boot_device = get_boot_device();
 
+       switch (boot_device) {
        /*
         * Return to the BootROM to continue the Marvell xmodem
         * UART boot protocol. As initiated by the kwboot tool.
@@ -87,18 +253,35 @@ u32 spl_boot_device(void)
         * SPL has no chance to receive this information. So we
         * need to return to the BootROM to enable this xmodem
         * UART download. Use SPL infrastructure to return to BootROM.
-        *
-        * If booting from NAND lets let the BootROM load the
-        * rest of the bootloader.
         */
-       switch (boot_device) {
        case BOOT_DEVICE_UART:
-#if defined(CONFIG_ARMADA_38X)
-       case BOOT_DEVICE_NAND:
-#endif
                return BOOT_DEVICE_BOOTROM;
+
+       /*
+        * If SPL is compiled with chosen boot_device support
+        * then use SPL driver for loading U-Boot proper.
+        */
+#ifdef CONFIG_SPL_MMC_SUPPORT
+       case BOOT_DEVICE_MMC1:
+               return BOOT_DEVICE_MMC1;
+#endif
+#ifdef CONFIG_SPL_SATA_SUPPORT
+       case BOOT_FROM_SATA:
+               return BOOT_FROM_SATA;
+#endif
+#ifdef CONFIG_SPL_SPI_FLASH_SUPPORT
+       case BOOT_DEVICE_SPI:
+               return BOOT_DEVICE_SPI;
+#endif
+
+       /*
+        * If SPL is not compiled with chosen boot_device support
+        * then return to the BootROM. BootROM supports loading
+        * U-Boot proper from any valid boot_device present in SAR
+        * register.
+        */
        default:
-               return boot_device;
+               return BOOT_DEVICE_BOOTROM;
        }
 }
 
index cad51c1cf02226d9ace9d6ee6dd856e131b0e428..81a2199ae5f8948ccea7c9535f39ee9627101ea3 100644 (file)
@@ -16,9 +16,4 @@ config ENV_SECT_SIZE
        # Use optimistic 64 KiB erase block, will vary between actual media
        default 0x10000 if MVEBU_SPL_BOOT_DEVICE_MMC || MVEBU_SPL_BOOT_DEVICE_UART
 
-config SYS_SPI_U_BOOT_OFFS
-       hex "address of u-boot payload in SPI flash"
-       default 0x20000
-       depends on MVEBU_SPL_BOOT_DEVICE_SPI
-
 endmenu
index cf9525809064cb359cb1cd60d1cdda57f35e4eb2..60d392130731d60a33f34967b9bf9f5ea702fac2 100644 (file)
@@ -54,9 +54,4 @@ config ENV_SECT_SIZE
        # Use optimistic 64 KiB erase block, will vary between actual media
        default 0x10000 if MVEBU_SPL_BOOT_DEVICE_MMC || MVEBU_SPL_BOOT_DEVICE_UART
 
-config SYS_SPI_U_BOOT_OFFS
-       hex "address of u-boot payload in SPI flash"
-       default 0x20000
-       depends on MVEBU_SPL_BOOT_DEVICE_SPI
-
 endmenu
index 9552ed49117b5cb39ef4225d23142dd3df9fb820..c155a3b5fcca3b101ad26ce0e729fe247d031a29 100644 (file)
@@ -344,7 +344,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
        default 0x75 if ARCH_DAVINCI
        default 0x8a if ARCH_MX6 || ARCH_MX7
        default 0x100 if ARCH_UNIPHIER
-       default 0x140 if ARCH_MVEBU
+       default 0x0 if ARCH_MVEBU
        default 0x200 if ARCH_SOCFPGA || ARCH_AT91
        default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
                         OMAP54XX || AM33XX || AM43XX || ARCH_K3
@@ -1099,6 +1099,7 @@ config SPL_SATA_SUPPORT
 config SPL_SATA_RAW_U_BOOT_USE_SECTOR
        bool "SATA raw mode: by sector"
        depends on SPL_SATA_SUPPORT
+       default y if ARCH_MVEBU
        help
          Use sector number for specifying U-Boot location on SATA disk in
          raw mode.
@@ -1106,6 +1107,7 @@ config SPL_SATA_RAW_U_BOOT_USE_SECTOR
 config SPL_SATA_RAW_U_BOOT_SECTOR
        hex "Sector on the SATA disk to load U-Boot from"
        depends on SPL_SATA_RAW_U_BOOT_USE_SECTOR
+       default 0x1 if ARCH_MVEBU
        help
          Sector on the SATA disk to load U-Boot from, when the SATA disk is being
          used in raw mode. Units: SATA disk sectors (1 sector = 512 bytes).
index 8f28eb8f98683d7be4df02bbd384affd834f7e77..d8edc453fff3d550b1359a4f6599d6f33bd7a4b5 100644 (file)
@@ -24,7 +24,6 @@ CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x1
 CONFIG_SPL_I2C=y
 CONFIG_CMD_TLV_EEPROM=y
 CONFIG_SPL_CMD_TLV_EEPROM=y
index 3a2aa2063c5129c52a0081e02cc9f2c2a1ed4776..23e8197ca9293b29937267e0985338ad2b37b667 100644 (file)
@@ -9,7 +9,6 @@ CONFIG_TARGET_CONTROLCENTERDC=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x40000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x30000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-38x-controlcenterdc"
 CONFIG_SPL_TEXT_BASE=0x40000030
index 963f5cdf47ce1b59097ddf61a07239845971ec3f..7f9d65f020b12262f10b593e6b566c9ef4f86034 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_DB_88F6720=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x10000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="armada-375-db"
 CONFIG_SPL_TEXT_BASE=0x40004030
 CONFIG_SPL_SERIAL_SUPPORT=y
index bd23ce7185682bce5de4ba4bed8042dc9956d847..96841d786278ca43cce7ad7cd5c0102b3f0ce4f8 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_DB_88F6820_AMC=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x40000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_DEFAULT_DEVICE_TREE="armada-385-db-88f6820-amc"
 CONFIG_SPL_TEXT_BASE=0x40000030
 CONFIG_SPL_SERIAL_SUPPORT=y
index be91fafcbe12300698425248675a39af8ea1b309..0ab8722c82fc2c2382672e9e5e8351607809fdbe 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_DB_88F6820_GP=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x40000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_DEFAULT_DEVICE_TREE="armada-388-gp"
 CONFIG_SPL_TEXT_BASE=0x40000030
 CONFIG_SPL_SERIAL_SUPPORT=y
@@ -24,7 +23,6 @@ CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION=y
 CONFIG_SPL_I2C=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
index b56ec57d548559773c08904611df50ac2dd2c080..a4345bae2b0b717cdfd165437b3824ca76373f7b 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_DB_MV784MP_GP=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x10000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="armada-xp-gp"
 CONFIG_SPL_TEXT_BASE=0x40004030
 CONFIG_SPL_SERIAL_SUPPORT=y
index 8ec7846f0b517509644d360762535fd37758b67b..bfe2e5f4fe70f57ee9e26b846e91608dfc6c70d0 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_DS414=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x7E0000
 CONFIG_ENV_SECT_SIZE=0x10000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_DEFAULT_DEVICE_TREE="armada-xp-synology-ds414"
 CONFIG_SPL_TEXT_BASE=0x40004030
 CONFIG_SPL_SERIAL_SUPPORT=y
index 77827bb1fefe87eed9de675febe572e0f8c2017b..4e593601efd1f3c6be3f3355876bec1bc4afd6d7 100644 (file)
@@ -24,7 +24,6 @@ CONFIG_USE_PREBOOT=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
-CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET=0x1
 CONFIG_SPL_I2C=y
 CONFIG_CMD_TLV_EEPROM=y
 CONFIG_SPL_CMD_TLV_EEPROM=y
index 8e8b0ff986020877ad3ab90e6dd2936a915d2cfd..f4e493cc928501133756eca2b54b184ac5bd81d5 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_MAXBCM=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x10000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
 CONFIG_DEFAULT_DEVICE_TREE="armada-xp-maxbcm"
 CONFIG_SPL_TEXT_BASE=0x40004030
 CONFIG_SPL_SERIAL_SUPPORT=y
index 0104324a66ff78c625e8d3d9a795e78ac0d68016..93b0c6b0645d348577c0fef5c5a69fc39859f199 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_THEADORABLE=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x40000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x1a000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-xp-theadorable"
 CONFIG_SPL_TEXT_BASE=0x40004030
index 298a4da47f1495f4ae418191cf2c9d3a5cc689c2..cd443ceb300fdbf5e6b96c3ab1944dc1c2fd6840 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_TARGET_TURRIS_OMNIA=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0xF0000
 CONFIG_ENV_SECT_SIZE=0x10000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-385-turris-omnia"
 CONFIG_SPL_TEXT_BASE=0x40000030
index 90798a3996990f75402931a7f3fb0142a0759759..6df383b81e67a41fd2334c3ca3bc24023eda2889 100644 (file)
@@ -10,7 +10,6 @@ CONFIG_TARGET_X530=y
 CONFIG_ENV_SIZE=0x10000
 CONFIG_ENV_OFFSET=0x100000
 CONFIG_ENV_SECT_SIZE=0x40000
-CONFIG_SYS_SPI_U_BOOT_OFFS=0x24000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="armada-385-atl-x530"
 CONFIG_SPL_TEXT_BASE=0x40000030
index c9852a72b9e5964ab2df7431c30036a3bec415bd..255b1479457005890bf2e6bf259bb5b9c35500ce 100644 (file)
 
 #if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI)
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x20000
 #elif defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA)
 /* SPL related MMC defines */
-#define CONFIG_SYS_MMC_U_BOOT_OFFS             (160 << 10)
-#define CONFIG_SYS_U_BOOT_OFFS                 CONFIG_SYS_MMC_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS                 (160 << 10)
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER      0x00180000      /* in SDRAM */
 #endif
index c4e9c796647d9133f595eb289d5915a4998e18c3..f9355815356663cd9df51a696a2913fb17c6ed60 100644 (file)
 
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x30000
 #endif
 
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
 /* SPL related MMC defines */
 #define CONFIG_SPL_MMC_SUPPORT
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 1
-#define CONFIG_SYS_MMC_U_BOOT_OFFS             (168 << 10)
-#define CONFIG_SYS_U_BOOT_OFFS                 CONFIG_SYS_MMC_U_BOOT_OFFS
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR        (CONFIG_SYS_U_BOOT_OFFS / 512)
+#define CONFIG_SYS_U_BOOT_OFFS                 (168 << 10)
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER      0x00180000      /* in SDRAM */
 #endif
index 83c173243c26fdf66db6b82be83a1546b9df118c..86c7f7341e9cc8096f303db7ac60c7b80d71066d 100644 (file)
@@ -66,6 +66,6 @@
 #define CONFIG_SPL_BOOTROM_SAVE                (CONFIG_SPL_STACK + 4)
 
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x20000
 
 #endif /* _CONFIG_DB_88F6720_H */
index fe9a7ab563510ee8f608b39fd7f117d5e4c0ed72..3cd1ff899a6b543d5355785299a3e2f64a7d9572 100644 (file)
@@ -61,7 +61,7 @@
 
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x24000
 #endif
 
 /*
index 5a6b42854c419171b2134a9f627295539ab9c9c9..23a53cba3f127588c2e9df1ed36d48b52d9fb01a 100644 (file)
 
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x24000
 #endif
 
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SDIO_MMC_CARD
 /* SPL related MMC defines */
-#define CONFIG_SYS_MMC_U_BOOT_OFFS             (160 << 10)
-#define CONFIG_SYS_U_BOOT_OFFS                 CONFIG_SYS_MMC_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS                 (160 << 10)
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER      0x00180000      /* in SDRAM */
 #endif
index 319a291a92a2ce88cd72a566130bd5b9f30d9ab7..c40257b4a9719c7dd2ca49f4ff26972a699f6dce 100644 (file)
@@ -79,7 +79,7 @@
 #define CONFIG_SPL_BOOTROM_SAVE                (CONFIG_SPL_STACK + 4)
 
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x20000
 
 /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */
 #define CONFIG_SPD_EEPROM              0x4e
index 80fd148f712a51dc2883f2f64f6e6420520eca41..861e9f19a97997908ff5822548ec77ef59ac58b1 100644 (file)
@@ -70,7 +70,7 @@
 
 #if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI)
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x24000
 #endif
 
 /* DS414 bus width is 32bits */
index 2cda05c85a06cb2316834af7449468c92a284bc7..387537797119b9a8f8f744592fe568583758fe8c 100644 (file)
 
 #if defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI)
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x20000
 #elif defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC) || defined(CONFIG_MVEBU_SPL_BOOT_DEVICE_SATA)
 /* SPL related MMC defines */
-#define CONFIG_SYS_MMC_U_BOOT_OFFS             (160 << 10)
-#define CONFIG_SYS_U_BOOT_OFFS                 CONFIG_SYS_MMC_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS                 (160 << 10)
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER      0x00180000      /* in SDRAM */
 #endif
index 70dd15115bfb4039a44b688ac2ce505ffe28864a..c448ee92cfb31a847f1bbce4d61bd33155cea528 100644 (file)
@@ -94,7 +94,7 @@
 #define CONFIG_SPL_BOOTROM_SAVE                (CONFIG_SPL_STACK + 4)
 
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x1a000
 
 /* Enable DDR support in SPL (DDR3 training from Marvell bin_hdr) */
 #define CONFIG_DDR_FIXED_SIZE          (2 << 20)       /* 2GiB */
index bc5a5f298e0273ad4b5c115965f7aabcd3ed075d..ab966baa08450e780be6728873d7b812b0c8e65b 100644 (file)
 
 #ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_SPI
 /* SPL related SPI defines */
-# define CONFIG_SYS_U_BOOT_OFFS                CONFIG_SYS_SPI_U_BOOT_OFFS
+# define CONFIG_SYS_U_BOOT_OFFS                0x24000
 #endif
 
 #ifdef CONFIG_MVEBU_SPL_BOOT_DEVICE_MMC
 /* SPL related MMC defines */
-# define CONFIG_SYS_MMC_U_BOOT_OFFS            (160 << 10)
-# define CONFIG_SYS_U_BOOT_OFFS                        CONFIG_SYS_MMC_U_BOOT_OFFS
+# define CONFIG_SYS_U_BOOT_OFFS                        (160 << 10)
 # ifdef CONFIG_SPL_BUILD
 #  define CONFIG_FIXED_SDHCI_ALIGNED_BUFFER    0x00180000      /* in SDRAM */
 # endif
index 4446510df4e0454283848e4640c8ab2c08aef959..25b259832ad151e24cd382850957cf88164e18b6 100644 (file)
@@ -98,6 +98,6 @@
 #define CONFIG_SPL_BOOTROM_SAVE                (CONFIG_SPL_STACK + 4)
 
 /* SPL related SPI defines */
-#define CONFIG_SYS_U_BOOT_OFFS         CONFIG_SYS_SPI_U_BOOT_OFFS
+#define CONFIG_SYS_U_BOOT_OFFS         0x24000
 
 #endif /* _CONFIG_X530_H */