aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPraneeth Bajjuri2017-01-17 22:59:21 -0600
committerPraneeth Bajjuri2017-01-17 22:59:21 -0600
commitee38754f397c667ad9f082233ca7893b1d11b6df (patch)
treeb6c9af8901b47fe5d8883da75fbf4653d83a2604
parent40079e2817255ea8a6190dc768fb3e8ceb046b96 (diff)
parent496542bc2d3c1b0ff19adc2e2fb6c4bf0fecefe2 (diff)
downloadu-boot-ee38754f397c667ad9f082233ca7893b1d11b6df.tar.gz
u-boot-ee38754f397c667ad9f082233ca7893b1d11b6df.tar.xz
u-boot-ee38754f397c667ad9f082233ca7893b1d11b6df.zip
Merge branch 'p-ti-u-boot-2016.05' of git://git.omapzoom.org/repo/u-boot into p-ti-u-boot-2016.05
* 'p-ti-u-boot-2016.05' of git://git.omapzoom.org/repo/u-boot: (26 commits) fastboot: qspi: fix for dual stage qspi u-boot failure drivers: mmc: omap_hsmmc: update phase delay value per latest TRM drivers: block: Fixed capacity message regulator: fixed: Add support to handle enable-active-high DT property mmc: disable the mmc clock during power off mmc: Enable mmc clock before sending init stream ti_armv7_common: env: Add NFS loading support for PMMC and MON defconfigs: am57xx_hs_evm: Add default OPTEE load address defconfigs: dra7xx_hs_evm: Add default OPTEE load address TI: Rework SRAM definitions and maximums spl: usb: dfu: adding configuration for non-FIT image TI: Rework SRAM definitions and maximums for dra7xx platform omap3: Fix SPI registers on am33xx and am43xx dra7: config: enable dynamic dt loading Revert "power: regulator: pbias: Add pbias regulator support" Revert "ARM: dts: dra7xx: Fix broken pbias device creation" Revert "mmc: power off the IO regulator during power cycle" Revert "drivers: mmc: omap_hsmmc: use regulator APIs to program pbias" Revert "configs: enable misc and pbias options on configs for dra7 based boards" Revert "mmc: disable the mmc clock during power off" ... Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
-rw-r--r--arch/arm/include/asm/arch-am33xx/omap.h13
-rw-r--r--arch/arm/include/asm/arch-omap3/omap.h5
-rw-r--r--arch/arm/include/asm/arch-omap4/omap.h5
-rw-r--r--arch/arm/include/asm/arch-omap5/omap.h6
-rw-r--r--configs/am57xx_hs_evm_defconfig5
-rw-r--r--configs/dra7xx_evm_defconfig1
-rw-r--r--configs/dra7xx_hs_evm_defconfig5
-rw-r--r--disk/part.c4
-rw-r--r--doc/device-tree-bindings/regulator/fixed.txt4
-rw-r--r--drivers/mmc/mmc.c3
-rw-r--r--drivers/mmc/omap_hsmmc.c2
-rw-r--r--drivers/power/regulator/fixed.c7
-rw-r--r--drivers/spi/omap3_spi.c23
-rw-r--r--drivers/usb/gadget/f_fastboot.c12
-rw-r--r--include/configs/am3517_crane.h3
-rw-r--r--include/configs/am3517_evm.h3
-rw-r--r--include/configs/am43xx_evm.h3
-rw-r--r--include/configs/am57xx_evm.h2
-rw-r--r--include/configs/bur_am335x_common.h6
-rw-r--r--include/configs/cm_t35.h3
-rw-r--r--include/configs/cm_t43.h1
-rw-r--r--include/configs/dra7xx_evm.h14
-rw-r--r--include/configs/kc1.h3
-rw-r--r--include/configs/omap3_evm_common.h3
-rw-r--r--include/configs/omap3_igep00x0.h8
-rw-r--r--include/configs/omap3_logic.h10
-rw-r--r--include/configs/omap3_overo.h8
-rw-r--r--include/configs/siemens-am33x-common.h3
-rw-r--r--include/configs/sniper.h3
-rw-r--r--include/configs/tam3517-common.h2
-rw-r--r--include/configs/tao3530.h3
-rw-r--r--include/configs/ti814x_evm.h3
-rw-r--r--include/configs/ti816x_evm.h3
-rw-r--r--include/configs/ti_am335x_common.h1
-rw-r--r--include/configs/ti_armv7_common.h20
-rw-r--r--include/configs/ti_armv7_keystone2.h3
-rw-r--r--include/configs/ti_omap3_common.h1
-rw-r--r--include/configs/ti_omap4_common.h1
-rw-r--r--include/configs/ti_omap5_common.h6
-rw-r--r--include/configs/tricorder.h3
40 files changed, 135 insertions, 79 deletions
diff --git a/arch/arm/include/asm/arch-am33xx/omap.h b/arch/arm/include/asm/arch-am33xx/omap.h
index 47962dadf5..3293caaca4 100644
--- a/arch/arm/include/asm/arch-am33xx/omap.h
+++ b/arch/arm/include/asm/arch-am33xx/omap.h
@@ -15,24 +15,23 @@
15#ifndef _OMAP_H_ 15#ifndef _OMAP_H_
16#define _OMAP_H_ 16#define _OMAP_H_
17 17
18#include <linux/sizes.h>
19
18#ifdef CONFIG_AM33XX 20#ifdef CONFIG_AM33XX
19#define NON_SECURE_SRAM_START 0x402F0400 21#define NON_SECURE_SRAM_START 0x402F0400
20#define NON_SECURE_SRAM_END 0x40310000 22#define NON_SECURE_SRAM_END 0x40310000
21#define SRAM_SCRATCH_SPACE_ADDR 0x4030B800 23#define NON_SECURE_SRAM_IMG_END 0x4030B800
22#elif defined(CONFIG_TI81XX) 24#elif defined(CONFIG_TI81XX)
23#define NON_SECURE_SRAM_START 0x40300000 25#define NON_SECURE_SRAM_START 0x40300000
24#define NON_SECURE_SRAM_END 0x40320000 26#define NON_SECURE_SRAM_END 0x40320000
25#define SRAM_SCRATCH_SPACE_ADDR 0x4031B800 27#define NON_SECURE_SRAM_IMG_END 0x4031B800
26#elif defined(CONFIG_AM43XX) 28#elif defined(CONFIG_AM43XX)
27#define NON_SECURE_SRAM_START 0x402F0400 29#define NON_SECURE_SRAM_START 0x402F0400
28#define NON_SECURE_SRAM_END 0x40340000 30#define NON_SECURE_SRAM_END 0x40340000
29#define SRAM_SCRATCH_SPACE_ADDR 0x40337C00 31#define NON_SECURE_SRAM_IMG_END 0x40337DE0
30#define AM4372_BOARD_NAME_START SRAM_SCRATCH_SPACE_ADDR
31#define AM4372_BOARD_NAME_END SRAM_SCRATCH_SPACE_ADDR + 0xC
32#define AM4372_BOARD_VERSION_START SRAM_SCRATCH_SPACE_ADDR + 0xD
33#define AM4372_BOARD_VERSION_END SRAM_SCRATCH_SPACE_ADDR + 0x14
34#define QSPI_BASE 0x47900000 32#define QSPI_BASE 0x47900000
35#endif 33#endif
34#define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K)
36 35
37/* Boot parameters */ 36/* Boot parameters */
38#ifndef __ASSEMBLY__ 37#ifndef __ASSEMBLY__
diff --git a/arch/arm/include/asm/arch-omap3/omap.h b/arch/arm/include/asm/arch-omap3/omap.h
index 116d863667..417ff895f1 100644
--- a/arch/arm/include/asm/arch-omap3/omap.h
+++ b/arch/arm/include/asm/arch-omap3/omap.h
@@ -10,6 +10,8 @@
10#ifndef _OMAP3_H_ 10#ifndef _OMAP3_H_
11#define _OMAP3_H_ 11#define _OMAP3_H_
12 12
13#include <linux/sizes.h>
14
13/* Stuff on L3 Interconnect */ 15/* Stuff on L3 Interconnect */
14#define SMX_APE_BASE 0x68000000 16#define SMX_APE_BASE 0x68000000
15 17
@@ -145,7 +147,8 @@ struct gpio {
145 147
146#define NON_SECURE_SRAM_START 0x40208000 /* Works for GP & EMU */ 148#define NON_SECURE_SRAM_START 0x40208000 /* Works for GP & EMU */
147#define NON_SECURE_SRAM_END 0x40210000 149#define NON_SECURE_SRAM_END 0x40210000
148#define SRAM_SCRATCH_SPACE_ADDR 0x4020EC00 150#define NON_SECURE_SRAM_IMG_END 0x4020F000
151#define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K)
149 152
150#define LOW_LEVEL_SRAM_STACK 0x4020FFFC 153#define LOW_LEVEL_SRAM_STACK 0x4020FFFC
151 154
diff --git a/arch/arm/include/asm/arch-omap4/omap.h b/arch/arm/include/asm/arch-omap4/omap.h
index 5ccda6ee94..b86a776840 100644
--- a/arch/arm/include/asm/arch-omap4/omap.h
+++ b/arch/arm/include/asm/arch-omap4/omap.h
@@ -19,6 +19,8 @@
19#include <asm/types.h> 19#include <asm/types.h>
20#endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */ 20#endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */
21 21
22#include <linux/sizes.h>
23
22/* 24/*
23 * L4 Peripherals - L4 Wakeup and L4 Core now 25 * L4 Peripherals - L4 Wakeup and L4 Core now
24 */ 26 */
@@ -109,7 +111,8 @@ struct s32ktimer {
109 */ 111 */
110#define NON_SECURE_SRAM_START 0x40304000 112#define NON_SECURE_SRAM_START 0x40304000
111#define NON_SECURE_SRAM_END 0x4030E000 /* Not inclusive */ 113#define NON_SECURE_SRAM_END 0x4030E000 /* Not inclusive */
112#define SRAM_SCRATCH_SPACE_ADDR 0x4030C000 114#define NON_SECURE_SRAM_IMG_END 0x4030C000
115#define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K)
113/* base address for indirect vectors (internal boot mode) */ 116/* base address for indirect vectors (internal boot mode) */
114#define SRAM_ROM_VECT_BASE 0x4030D000 117#define SRAM_ROM_VECT_BASE 0x4030D000
115 118
diff --git a/arch/arm/include/asm/arch-omap5/omap.h b/arch/arm/include/asm/arch-omap5/omap.h
index 3b98f6abc1..b5e5519fbd 100644
--- a/arch/arm/include/asm/arch-omap5/omap.h
+++ b/arch/arm/include/asm/arch-omap5/omap.h
@@ -16,6 +16,8 @@
16#include <asm/types.h> 16#include <asm/types.h>
17#endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */ 17#endif /* !(__KERNEL_STRICT_NAMES || __ASSEMBLY__) */
18 18
19#include <linux/sizes.h>
20
19/* 21/*
20 * L4 Peripherals - L4 Wakeup and L4 Core now 22 * L4 Peripherals - L4 Wakeup and L4 Core now
21 */ 23 */
@@ -186,11 +188,13 @@ struct s32ktimer {
186#if defined(CONFIG_DRA7XX) 188#if defined(CONFIG_DRA7XX)
187#define NON_SECURE_SRAM_START 0x40300000 189#define NON_SECURE_SRAM_START 0x40300000
188#define NON_SECURE_SRAM_END 0x40380000 /* Not inclusive */ 190#define NON_SECURE_SRAM_END 0x40380000 /* Not inclusive */
191#define NON_SECURE_SRAM_IMG_END 0x4037E000
189#else 192#else
190#define NON_SECURE_SRAM_START 0x40300000 193#define NON_SECURE_SRAM_START 0x40300000
191#define NON_SECURE_SRAM_END 0x40320000 /* Not inclusive */ 194#define NON_SECURE_SRAM_END 0x40320000 /* Not inclusive */
195#define NON_SECURE_SRAM_IMG_END 0x4031E000
192#endif 196#endif
193#define SRAM_SCRATCH_SPACE_ADDR 0x4031E000 197#define SRAM_SCRATCH_SPACE_ADDR (NON_SECURE_SRAM_IMG_END - SZ_1K)
194 198
195/* base address for indirect vectors (internal boot mode) */ 199/* base address for indirect vectors (internal boot mode) */
196#define SRAM_ROM_VECT_BASE 0x4031F000 200#define SRAM_ROM_VECT_BASE 0x4031F000
diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig
index 8376f30da6..d9a8e51dff 100644
--- a/configs/am57xx_hs_evm_defconfig
+++ b/configs/am57xx_hs_evm_defconfig
@@ -2,8 +2,9 @@ CONFIG_ARM=y
2CONFIG_OMAP54XX=y 2CONFIG_OMAP54XX=y
3CONFIG_TI_SECURE_DEVICE=y 3CONFIG_TI_SECURE_DEVICE=y
4CONFIG_TARGET_AM57XX_EVM=y 4CONFIG_TARGET_AM57XX_EVM=y
5CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x01700000 5CONFIG_TI_SECURE_EMIF_REGION_START=0xbe000000
6CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01300000 6CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x02000000
7CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000
7CONFIG_DM_SERIAL=y 8CONFIG_DM_SERIAL=y
8CONFIG_DM_GPIO=y 9CONFIG_DM_GPIO=y
9CONFIG_SPL_STACK_R_ADDR=0x82000000 10CONFIG_SPL_STACK_R_ADDR=0x82000000
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 28f0339790..827b0f5970 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -53,6 +53,7 @@ CONFIG_DM_ETH=y
53CONFIG_DM_PMIC=y 53CONFIG_DM_PMIC=y
54CONFIG_PMIC_PALMAS=y 54CONFIG_PMIC_PALMAS=y
55CONFIG_PMIC_LP873X=y 55CONFIG_PMIC_LP873X=y
56CONFIG_SPL_LOAD_FIT=y
56CONFIG_DISK=y 57CONFIG_DISK=y
57CONFIG_DWC_AHCI=y 58CONFIG_DWC_AHCI=y
58CONFIG_DM_MMC=y 59CONFIG_DM_MMC=y
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index d5b8e30b3b..810ba1e3f5 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -2,8 +2,9 @@ CONFIG_ARM=y
2CONFIG_OMAP54XX=y 2CONFIG_OMAP54XX=y
3CONFIG_TI_SECURE_DEVICE=y 3CONFIG_TI_SECURE_DEVICE=y
4CONFIG_TARGET_DRA7XX_EVM=y 4CONFIG_TARGET_DRA7XX_EVM=y
5CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x01700000 5CONFIG_TI_SECURE_EMIF_REGION_START=0xbe000000
6CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01300000 6CONFIG_TI_SECURE_EMIF_TOTAL_REGION_SIZE=0x02000000
7CONFIG_TI_SECURE_EMIF_PROTECTED_REGION_SIZE=0x01c00000
7CONFIG_DM_SERIAL=y 8CONFIG_DM_SERIAL=y
8CONFIG_DM_SPI=y 9CONFIG_DM_SPI=y
9CONFIG_DM_SPI_FLASH=y 10CONFIG_DM_SPI_FLASH=y
diff --git a/disk/part.c b/disk/part.c
index 543cab8103..d93a643067 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -241,13 +241,13 @@ void dev_print (struct blk_desc *dev_desc)
241 printf (" Supports 48-bit addressing\n"); 241 printf (" Supports 48-bit addressing\n");
242#endif 242#endif
243#if defined(CONFIG_SYS_64BIT_LBA) 243#if defined(CONFIG_SYS_64BIT_LBA)
244 printf (" Capacity: %ld.%ld MB = %ld.%ld GB (%Ld x %ld)\n", 244 printf (" Capacity: %lu.%lu MB = %lu.%lu GB (%llu x %lu)\n",
245 mb_quot, mb_rem, 245 mb_quot, mb_rem,
246 gb_quot, gb_rem, 246 gb_quot, gb_rem,
247 lba, 247 lba,
248 dev_desc->blksz); 248 dev_desc->blksz);
249#else 249#else
250 printf (" Capacity: %ld.%ld MB = %ld.%ld GB (%ld x %ld)\n", 250 printf (" Capacity: %lu.%lu MB = %lu.%lu GB (%lu x %lu)\n",
251 mb_quot, mb_rem, 251 mb_quot, mb_rem,
252 gb_quot, gb_rem, 252 gb_quot, gb_rem,
253 (ulong)lba, 253 (ulong)lba,
diff --git a/doc/device-tree-bindings/regulator/fixed.txt b/doc/device-tree-bindings/regulator/fixed.txt
index 4ff39b8f51..ef010eace6 100644
--- a/doc/device-tree-bindings/regulator/fixed.txt
+++ b/doc/device-tree-bindings/regulator/fixed.txt
@@ -11,6 +11,9 @@ Required properties:
11Optional properties: 11Optional properties:
12- gpio: GPIO to use for enable control 12- gpio: GPIO to use for enable control
13- regulator constraints (binding info: regulator.txt) 13- regulator constraints (binding info: regulator.txt)
14- enable-active-high: Polarity of GPIO is Active high. If this property
15 is missing, the default assumed is Active low.
16
14 17
15Other kernel-style properties, are currently not used. 18Other kernel-style properties, are currently not used.
16 19
@@ -35,4 +38,5 @@ fixed_regulator@0 {
35 regulator-max-microamp = <15000>; 38 regulator-max-microamp = <15000>;
36 regulator-always-on; 39 regulator-always-on;
37 regulator-boot-on; 40 regulator-boot-on;
41 enable-active-high;
38}; 42};
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 1255abcf78..85e231b898 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2049,14 +2049,15 @@ static void mmc_set_initial_state(struct mmc *mmc)
2049 2049
2050static void mmc_power_up(struct mmc *mmc) 2050static void mmc_power_up(struct mmc *mmc)
2051{ 2051{
2052 mmc_set_vdd(mmc, true);
2053 mmc_set_initial_state(mmc); 2052 mmc_set_initial_state(mmc);
2053 mmc_set_vdd(mmc, true);
2054 udelay(10000); 2054 udelay(10000);
2055} 2055}
2056 2056
2057static void mmc_power_off(struct mmc *mmc) 2057static void mmc_power_off(struct mmc *mmc)
2058{ 2058{
2059 mmc_set_vdd(mmc, false); 2059 mmc_set_vdd(mmc, false);
2060 mmc_set_clock(mmc, 1, true);
2060} 2061}
2061 2062
2062static void mmc_power_cycle(struct mmc *mmc) 2063static void mmc_power_cycle(struct mmc *mmc)
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index e3c64bb05b..2849519a58 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -633,7 +633,7 @@ static int omap_hsmmc_execute_tuning(struct mmc *mmc, uint opcode)
633 goto tuning_error; 633 goto tuning_error;
634 } 634 }
635 635
636 phase_delay = max_window + 4 * (max_len >> 1); 636 phase_delay = max_window + 4 * ((3 * max_len) >> 2);
637 omap_hsmmc_set_dll(mmc, phase_delay); 637 omap_hsmmc_set_dll(mmc, phase_delay);
638 638
639 mmc_reset_controller_fsm(mmc_base, SYSCTL_SRD); 639 mmc_reset_controller_fsm(mmc_base, SYSCTL_SRD);
diff --git a/drivers/power/regulator/fixed.c b/drivers/power/regulator/fixed.c
index d053817fc2..dbd532d89d 100644
--- a/drivers/power/regulator/fixed.c
+++ b/drivers/power/regulator/fixed.c
@@ -26,6 +26,8 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
26 struct dm_regulator_uclass_platdata *uc_pdata; 26 struct dm_regulator_uclass_platdata *uc_pdata;
27 struct fixed_regulator_platdata *dev_pdata; 27 struct fixed_regulator_platdata *dev_pdata;
28 struct gpio_desc *gpio; 28 struct gpio_desc *gpio;
29 const void *blob = gd->fdt_blob;
30 int node = dev->of_offset, flags = GPIOD_IS_OUT;
29 int ret; 31 int ret;
30 32
31 dev_pdata = dev_get_platdata(dev); 33 dev_pdata = dev_get_platdata(dev);
@@ -36,9 +38,12 @@ static int fixed_regulator_ofdata_to_platdata(struct udevice *dev)
36 /* Set type to fixed */ 38 /* Set type to fixed */
37 uc_pdata->type = REGULATOR_TYPE_FIXED; 39 uc_pdata->type = REGULATOR_TYPE_FIXED;
38 40
41 if (fdtdec_get_bool(blob, node, "enable-active-high"))
42 flags |= GPIOD_IS_OUT_ACTIVE;
43
39 /* Get fixed regulator gpio desc */ 44 /* Get fixed regulator gpio desc */
40 gpio = &dev_pdata->gpio; 45 gpio = &dev_pdata->gpio;
41 ret = gpio_request_by_name(dev, "gpio", 0, gpio, GPIOD_IS_OUT); 46 ret = gpio_request_by_name(dev, "gpio", 0, gpio, flags);
42 if (ret) 47 if (ret)
43 debug("Fixed regulator gpio - not found! Error: %d", ret); 48 debug("Fixed regulator gpio - not found! Error: %d", ret);
44 49
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c
index 2fe34c9a14..60e9d6e825 100644
--- a/drivers/spi/omap3_spi.c
+++ b/drivers/spi/omap3_spi.c
@@ -35,6 +35,12 @@ DECLARE_GLOBAL_DATA_PTR;
35#define OMAP3_MCSPI4_BASE 0x480BA000 35#define OMAP3_MCSPI4_BASE 0x480BA000
36#endif 36#endif
37 37
38#define OMAP4_MCSPI_REG_OFFSET 0x100
39
40struct omap2_mcspi_platform_config {
41 unsigned int regs_offset;
42};
43
38/* per-register bitmasks */ 44/* per-register bitmasks */
39#define OMAP3_MCSPI_SYSCONFIG_SMARTIDLE (2 << 3) 45#define OMAP3_MCSPI_SYSCONFIG_SMARTIDLE (2 << 3)
40#define OMAP3_MCSPI_SYSCONFIG_ENAWAKEUP BIT(2) 46#define OMAP3_MCSPI_SYSCONFIG_ENAWAKEUP BIT(2)
@@ -623,7 +629,10 @@ static int omap3_spi_probe(struct udevice *dev)
623 const void *blob = gd->fdt_blob; 629 const void *blob = gd->fdt_blob;
624 int node = dev->of_offset; 630 int node = dev->of_offset;
625 631
626 priv->regs = (struct mcspi *)dev_get_addr(dev); 632 struct omap2_mcspi_platform_config* data =
633 (struct omap2_mcspi_platform_config*)dev_get_driver_data(dev);
634
635 priv->regs = (struct mcspi *)(dev_get_addr(dev) + data->regs_offset);
627 priv->pin_dir = fdtdec_get_uint(blob, node, "ti,pindir-d0-out-d1-in", 636 priv->pin_dir = fdtdec_get_uint(blob, node, "ti,pindir-d0-out-d1-in",
628 MCSPI_PINDIR_D0_IN_D1_OUT); 637 MCSPI_PINDIR_D0_IN_D1_OUT);
629 priv->wordlen = SPI_DEFAULT_WORDLEN; 638 priv->wordlen = SPI_DEFAULT_WORDLEN;
@@ -662,9 +671,17 @@ static const struct dm_spi_ops omap3_spi_ops = {
662 */ 671 */
663}; 672};
664 673
674static struct omap2_mcspi_platform_config omap2_pdata = {
675 .regs_offset = 0,
676};
677
678static struct omap2_mcspi_platform_config omap4_pdata = {
679 .regs_offset = OMAP4_MCSPI_REG_OFFSET,
680};
681
665static const struct udevice_id omap3_spi_ids[] = { 682static const struct udevice_id omap3_spi_ids[] = {
666 { .compatible = "ti,omap2-mcspi" }, 683 { .compatible = "ti,omap2-mcspi", .data = (ulong)&omap2_pdata },
667 { .compatible = "ti,omap4-mcspi" }, 684 { .compatible = "ti,omap4-mcspi", .data = (ulong)&omap4_pdata },
668 { } 685 { }
669}; 686};
670 687
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index ece16005a1..c64d3173f5 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -622,19 +622,15 @@ static void fastboot_update_bootloader(char *cmd)
622 reset_fastboot_cmd(); 622 reset_fastboot_cmd();
623 623
624 if (strncmp("xloader", cmd, 7) == 0) { 624 if (strncmp("xloader", cmd, 7) == 0) {
625 printf("%s:xloader\n", __func__);
625 sprintf(cmdbuf, "sf write 0x%x 0 40000", 626 sprintf(cmdbuf, "sf write 0x%x 0 40000",
626 (unsigned int)CONFIG_FASTBOOT_BUF_ADDR); 627 (unsigned int)CONFIG_FASTBOOT_BUF_ADDR);
627 add_fastboot_cmd(0, cmdbuf); 628 add_fastboot_cmd(0, cmdbuf);
628 sprintf(cmdbuf, "sf update 0x%x 0 40000",
629 (unsigned int)CONFIG_FASTBOOT_BUF_ADDR);
630 add_fastboot_cmd(1, cmdbuf);
631 } else if (strncmp("bootloader", cmd, 10) == 0) { 629 } else if (strncmp("bootloader", cmd, 10) == 0) {
632 sprintf(cmdbuf, "sf write 0x%x 40000 80000", 630 printf("%s:bootloader\n", __func__);
631 sprintf(cmdbuf, "sf write 0x%x 40000 100000",
633 (unsigned int)CONFIG_FASTBOOT_BUF_ADDR); 632 (unsigned int)CONFIG_FASTBOOT_BUF_ADDR);
634 add_fastboot_cmd(0, cmdbuf); 633 add_fastboot_cmd(0, cmdbuf);
635 sprintf(cmdbuf, "sf update 0x%x 40000 80000",
636 (unsigned int)CONFIG_FASTBOOT_BUF_ADDR);
637 add_fastboot_cmd(1, cmdbuf);
638 } 634 }
639 run_fastboot_cmd(); 635 run_fastboot_cmd();
640} 636}
@@ -845,7 +841,7 @@ static void cb_oem(struct usb_ep *ep, struct usb_request *req)
845 flash_spi = 1; 841 flash_spi = 1;
846 add_fastboot_cmd(0, "sf probe 0"); 842 add_fastboot_cmd(0, "sf probe 0");
847 add_fastboot_cmd(1, "sf erase 0 0x40000"); 843 add_fastboot_cmd(1, "sf erase 0 0x40000");
848 add_fastboot_cmd(2, "sf erase 0x40000 0x80000"); 844 add_fastboot_cmd(2, "sf erase 0x40000 0x100000");
849 } else if (strncmp("unlock", cmd + 4, 8) == 0) { 845 } else if (strncmp("unlock", cmd + 4, 8) == 0) {
850 fastboot_tx_write_str("FAILnot implemented"); 846 fastboot_tx_write_str("FAILnot implemented");
851 return ; 847 return ;
diff --git a/include/configs/am3517_crane.h b/include/configs/am3517_crane.h
index 822e1c8edc..60e145157f 100644
--- a/include/configs/am3517_crane.h
+++ b/include/configs/am3517_crane.h
@@ -280,7 +280,8 @@
280#define CONFIG_SPL_BOARD_INIT 280#define CONFIG_SPL_BOARD_INIT
281#define CONFIG_SPL_NAND_SIMPLE 281#define CONFIG_SPL_NAND_SIMPLE
282#define CONFIG_SPL_TEXT_BASE 0x40200800 282#define CONFIG_SPL_TEXT_BASE 0x40200800
283#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ 283#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
284 CONFIG_SPL_TEXT_BASE)
284 285
285#define CONFIG_SPL_BSS_START_ADDR 0x80000000 286#define CONFIG_SPL_BSS_START_ADDR 0x80000000
286#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ 287#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 6f83870868..1d553d7d63 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -338,7 +338,8 @@
338#define CONFIG_SPL_BOARD_INIT 338#define CONFIG_SPL_BOARD_INIT
339#define CONFIG_SPL_NAND_SIMPLE 339#define CONFIG_SPL_NAND_SIMPLE
340#define CONFIG_SPL_TEXT_BASE 0x40200000 340#define CONFIG_SPL_TEXT_BASE 0x40200000
341#define CONFIG_SPL_MAX_SIZE (64 * 1024) 341#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
342 CONFIG_SPL_TEXT_BASE)
342 343
343#define CONFIG_SPL_BSS_START_ADDR 0x80000000 344#define CONFIG_SPL_BSS_START_ADDR 0x80000000
344#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ 345#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index a3eefc9956..f805c21f26 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -38,9 +38,6 @@
38 38
39/* SPL defines. */ 39/* SPL defines. */
40#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR 40#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR
41#define CONFIG_SPL_MAX_SIZE (NON_SECURE_SRAM_END - \
42 CONFIG_PUB_ROM_DATA_SIZE - \
43 CONFIG_SPL_TEXT_BASE)
44#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ 41#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
45 (128 << 20)) 42 (128 << 20))
46#define CONFIG_SPL_POWER_SUPPORT 43#define CONFIG_SPL_POWER_SUPPORT
diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h
index b233b9d8fd..fa84e24875 100644
--- a/include/configs/am57xx_evm.h
+++ b/include/configs/am57xx_evm.h
@@ -204,8 +204,6 @@
204#ifdef CONFIG_SPL_BUILD 204#ifdef CONFIG_SPL_BUILD
205#undef CONFIG_DM_SPI 205#undef CONFIG_DM_SPI
206#undef CONFIG_DM_SPI_FLASH 206#undef CONFIG_DM_SPI_FLASH
207#undef CONFIG_SPL_MAX_SIZE
208#define CONFIG_SPL_MAX_SIZE (256 << 10) /* 256 KiB */
209#endif 207#endif
210 208
211/* SPI SPL */ 209/* SPI SPL */
diff --git a/include/configs/bur_am335x_common.h b/include/configs/bur_am335x_common.h
index a94b1e2711..a6a4f0c943 100644
--- a/include/configs/bur_am335x_common.h
+++ b/include/configs/bur_am335x_common.h
@@ -47,10 +47,12 @@
47 * area between 0x402F0400 and 0x4030B800 as a download area and 47 * area between 0x402F0400 and 0x4030B800 as a download area and
48 * 0x4030B800 to 0x4030CE00 as a public stack area. The ROM also 48 * 0x4030B800 to 0x4030CE00 as a public stack area. The ROM also
49 * supports X-MODEM loading via UART, and we leverage this and then use 49 * supports X-MODEM loading via UART, and we leverage this and then use
50 * Y-MODEM to load u-boot.img, when booted over UART. 50 * Y-MODEM to load u-boot.img, when booted over UART. We must also include
51 * the scratch space that U-Boot uses in SRAM.
51 */ 52 */
52#define CONFIG_SPL_TEXT_BASE 0x402F0400 53#define CONFIG_SPL_TEXT_BASE 0x402F0400
53#define CONFIG_SPL_MAX_SIZE (0x4030B800 - CONFIG_SPL_TEXT_BASE) 54#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
55 CONFIG_SPL_TEXT_BASE)
54 56
55/* 57/*
56 * Since SPL did pll and ddr initialization for us, 58 * Since SPL did pll and ddr initialization for us,
diff --git a/include/configs/cm_t35.h b/include/configs/cm_t35.h
index 5d581162cb..7deb2f83de 100644
--- a/include/configs/cm_t35.h
+++ b/include/configs/cm_t35.h
@@ -347,7 +347,8 @@
347#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 347#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
348 348
349#define CONFIG_SPL_TEXT_BASE 0x40200800 349#define CONFIG_SPL_TEXT_BASE 0x40200800
350#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ 350#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
351 CONFIG_SPL_TEXT_BASE)
351 352
352/* 353/*
353 * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the 354 * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index ee818ede26..a7f669d1bf 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -158,7 +158,6 @@
158 158
159/* SPL defines. */ 159/* SPL defines. */
160#define CONFIG_SPL_TEXT_BASE 0x40300350 160#define CONFIG_SPL_TEXT_BASE 0x40300350
161#define CONFIG_SPL_MAX_SIZE (64 * 1024)
162#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + (128 << 20)) 161#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + (128 << 20))
163#define CONFIG_SPL_POWER_SUPPORT 162#define CONFIG_SPL_POWER_SUPPORT
164#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024) 163#define CONFIG_SYS_SPI_U_BOOT_OFFS (256 * 1024)
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 69e9a07dc8..4f647ad034 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -143,6 +143,8 @@
143#define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000 143#define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000
144#define CONFIG_SPL_ENV_SUPPORT 144#define CONFIG_SPL_ENV_SUPPORT
145#define CONFIG_SPL_HASH_SUPPORT 145#define CONFIG_SPL_HASH_SUPPORT
146
147#ifdef CONFIG_SPL_LOAD_FIT
146#define DFU_ALT_INFO_RAM \ 148#define DFU_ALT_INFO_RAM \
147 "dfu_alt_info_ram=" \ 149 "dfu_alt_info_ram=" \
148 "kernel ram 0x80200000 0x4000000;" \ 150 "kernel ram 0x80200000 0x4000000;" \
@@ -151,6 +153,16 @@
151#define DFUARGS \ 153#define DFUARGS \
152 "dfu_bufsiz=0x10000\0" \ 154 "dfu_bufsiz=0x10000\0" \
153 DFU_ALT_INFO_RAM 155 DFU_ALT_INFO_RAM
156#else
157#define DFU_ALT_INFO_RAM \
158 "dfu_alt_info_ram=" \
159 "kernel ram 0x807fffc0 0x4000000;" \
160 "fdt ram 0x80f80000 0x80000;" \
161 "ramdisk ram 0x81000000 0x4000000\0"
162#define DFUARGS \
163 "dfu_bufsiz=0x10000\0" \
164 DFU_ALT_INFO_RAM
165#endif
154#endif 166#endif
155#endif 167#endif
156 168
@@ -204,8 +216,6 @@
204/* In SPL, use the environment and discard MMC support for space. */ 216/* In SPL, use the environment and discard MMC support for space. */
205#ifdef CONFIG_SPL_BUILD 217#ifdef CONFIG_SPL_BUILD
206#undef CONFIG_SPL_MMC_SUPPORT 218#undef CONFIG_SPL_MMC_SUPPORT
207#undef CONFIG_SPL_MAX_SIZE
208#define CONFIG_SPL_MAX_SIZE (256 << 10) /* 256 KiB */
209#endif 219#endif
210#define CONFIG_SPL_ENV_SUPPORT 220#define CONFIG_SPL_ENV_SUPPORT
211#define CONFIG_ENV_IS_IN_SPI_FLASH 221#define CONFIG_ENV_IS_IN_SPI_FLASH
diff --git a/include/configs/kc1.h b/include/configs/kc1.h
index b08cf2161d..b30aca6047 100644
--- a/include/configs/kc1.h
+++ b/include/configs/kc1.h
@@ -120,7 +120,8 @@
120#define CONFIG_SPL_FRAMEWORK 120#define CONFIG_SPL_FRAMEWORK
121 121
122#define CONFIG_SPL_TEXT_BASE 0x40300000 122#define CONFIG_SPL_TEXT_BASE 0x40300000
123#define CONFIG_SPL_MAX_SIZE (48 * 1024) 123#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
124 CONFIG_SPL_TEXT_BASE)
124#define CONFIG_SPL_BSS_START_ADDR 0x80000000 125#define CONFIG_SPL_BSS_START_ADDR 0x80000000
125#define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) 126#define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024)
126#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 127#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
index 01336ff4d6..4b94571c38 100644
--- a/include/configs/omap3_evm_common.h
+++ b/include/configs/omap3_evm_common.h
@@ -258,7 +258,8 @@
258/* Defines for SPL */ 258/* Defines for SPL */
259#define CONFIG_SPL_FRAMEWORK 259#define CONFIG_SPL_FRAMEWORK
260#define CONFIG_SPL_TEXT_BASE 0x40200800 260#define CONFIG_SPL_TEXT_BASE 0x40200800
261#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ 261#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
262 CONFIG_SPL_TEXT_BASE)
262 263
263#define CONFIG_SPL_BSS_START_ADDR 0x80000000 264#define CONFIG_SPL_BSS_START_ADDR 0x80000000
264#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ 265#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
diff --git a/include/configs/omap3_igep00x0.h b/include/configs/omap3_igep00x0.h
index 547aa69e34..fbdaa95f9e 100644
--- a/include/configs/omap3_igep00x0.h
+++ b/include/configs/omap3_igep00x0.h
@@ -19,11 +19,11 @@
19#include <configs/ti_omap3_common.h> 19#include <configs/ti_omap3_common.h>
20#include <asm/mach-types.h> 20#include <asm/mach-types.h>
21 21
22/* SRAM starts at 0x40200000 and ends at 0x4020FFFF (64KB) */ 22/*
23#undef CONFIG_SPL_MAX_SIZE 23 * We are only ever GP parts and will utilize all of the "downloaded image"
24 * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB).
25 */
24#undef CONFIG_SPL_TEXT_BASE 26#undef CONFIG_SPL_TEXT_BASE
25
26#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE)
27#define CONFIG_SPL_TEXT_BASE 0x40200000 27#define CONFIG_SPL_TEXT_BASE 0x40200000
28 28
29#define CONFIG_MISC_INIT_R 29#define CONFIG_MISC_INIT_R
diff --git a/include/configs/omap3_logic.h b/include/configs/omap3_logic.h
index 282626f09c..9f850cd4f1 100644
--- a/include/configs/omap3_logic.h
+++ b/include/configs/omap3_logic.h
@@ -30,11 +30,13 @@
30 30
31#include <configs/ti_omap3_common.h> 31#include <configs/ti_omap3_common.h>
32 32
33/* Override default SPL info to minimize empty space and allow BCH8 in SPL */ 33/*
34 * We are only ever GP parts and will utilize all of the "downloaded image"
35 * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in
36 * order to allow for BCH8 to fit in.
37 */
34#undef CONFIG_SPL_TEXT_BASE 38#undef CONFIG_SPL_TEXT_BASE
35#undef CONFIG_SPL_MAX_SIZE 39#define CONFIG_SPL_TEXT_BASE 0x40200000
36#define CONFIG_SPL_TEXT_BASE 0x40200000
37#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE)
38 40
39#define CONFIG_BOARD_LATE_INIT 41#define CONFIG_BOARD_LATE_INIT
40#define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */ 42#define CONFIG_MISC_INIT_R /* misc_init_r dumps the die id */
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 4d790e9b87..85e011736c 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -11,10 +11,12 @@
11#define CONFIG_NAND 11#define CONFIG_NAND
12 12
13#include <configs/ti_omap3_common.h> 13#include <configs/ti_omap3_common.h>
14#undef CONFIG_SPL_MAX_SIZE 14/*
15 * We are only ever GP parts and will utilize all of the "downloaded image"
16 * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB).
17 */
15#undef CONFIG_SPL_TEXT_BASE 18#undef CONFIG_SPL_TEXT_BASE
16#define CONFIG_SPL_TEXT_BASE 0x40200000 19#define CONFIG_SPL_TEXT_BASE 0x40200000
17#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - CONFIG_SPL_TEXT_BASE)
18 20
19#define CONFIG_BCH 21#define CONFIG_BCH
20 22
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index dfc928d33b..0cbfbdf7f0 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -124,7 +124,8 @@
124/* Defines for SPL */ 124/* Defines for SPL */
125#define CONFIG_SPL_FRAMEWORK 125#define CONFIG_SPL_FRAMEWORK
126#define CONFIG_SPL_TEXT_BASE 0x402F0400 126#define CONFIG_SPL_TEXT_BASE 0x402F0400
127#define CONFIG_SPL_MAX_SIZE (101 * 1024) 127#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
128 CONFIG_SPL_TEXT_BASE)
128 129
129#define CONFIG_SPL_BSS_START_ADDR 0x80000000 130#define CONFIG_SPL_BSS_START_ADDR 0x80000000
130#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ 131#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
diff --git a/include/configs/sniper.h b/include/configs/sniper.h
index fb348a5cd2..cd303c3c20 100644
--- a/include/configs/sniper.h
+++ b/include/configs/sniper.h
@@ -128,7 +128,8 @@
128#define CONFIG_SPL_FRAMEWORK 128#define CONFIG_SPL_FRAMEWORK
129 129
130#define CONFIG_SPL_TEXT_BASE 0x40200000 130#define CONFIG_SPL_TEXT_BASE 0x40200000
131#define CONFIG_SPL_MAX_SIZE (54 * 1024) 131#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
132 CONFIG_SPL_TEXT_BASE)
132#define CONFIG_SPL_BSS_START_ADDR 0x80000000 133#define CONFIG_SPL_BSS_START_ADDR 0x80000000
133#define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024) 134#define CONFIG_SPL_BSS_MAX_SIZE (512 * 1024)
134#define CONFIG_SYS_SPL_MALLOC_START 0x80208000 135#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index efdc70622f..4dfe74f06f 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -219,6 +219,8 @@
219 219
220#define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/ 220#define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/
221#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ 221#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */
222#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
223 CONFIG_SPL_TEXT_BASE)
222 224
223#define CONFIG_SYS_SPL_MALLOC_START 0x8f000000 225#define CONFIG_SYS_SPL_MALLOC_START 0x8f000000
224#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000 226#define CONFIG_SYS_SPL_MALLOC_SIZE 0x80000
diff --git a/include/configs/tao3530.h b/include/configs/tao3530.h
index 4d66dd2407..68ad266d9b 100644
--- a/include/configs/tao3530.h
+++ b/include/configs/tao3530.h
@@ -329,7 +329,8 @@
329#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000 329#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
330 330
331#define CONFIG_SPL_TEXT_BASE 0x40200800 331#define CONFIG_SPL_TEXT_BASE 0x40200800
332#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */ 332#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
333 CONFIG_SPL_TEXT_BASE)
333 334
334/* 335/*
335 * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the 336 * Use 0x80008000 as TEXT_BASE here for compatibility reasons with the
diff --git a/include/configs/ti814x_evm.h b/include/configs/ti814x_evm.h
index 09f8e8fe5c..e61cd78939 100644
--- a/include/configs/ti814x_evm.h
+++ b/include/configs/ti814x_evm.h
@@ -160,7 +160,8 @@
160/* Defines for SPL */ 160/* Defines for SPL */
161#define CONFIG_SPL_FRAMEWORK 161#define CONFIG_SPL_FRAMEWORK
162#define CONFIG_SPL_TEXT_BASE 0x40300000 162#define CONFIG_SPL_TEXT_BASE 0x40300000
163#define CONFIG_SPL_MAX_SIZE ((128 - 18) * 1024) 163#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
164 CONFIG_SPL_TEXT_BASE)
164 165
165#define CONFIG_SPL_BSS_START_ADDR 0x80000000 166#define CONFIG_SPL_BSS_START_ADDR 0x80000000
166#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ 167#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
diff --git a/include/configs/ti816x_evm.h b/include/configs/ti816x_evm.h
index 2e84dd27e4..85c575dd8d 100644
--- a/include/configs/ti816x_evm.h
+++ b/include/configs/ti816x_evm.h
@@ -126,7 +126,8 @@
126/* Defines for SPL */ 126/* Defines for SPL */
127#define CONFIG_SPL_FRAMEWORK 127#define CONFIG_SPL_FRAMEWORK
128#define CONFIG_SPL_TEXT_BASE 0x40400000 128#define CONFIG_SPL_TEXT_BASE 0x40400000
129#define CONFIG_SPL_MAX_SIZE ((128 - 18) * 1024) 129#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
130 CONFIG_SPL_TEXT_BASE)
130 131
131#define CONFIG_SPL_BSS_START_ADDR 0x80000000 132#define CONFIG_SPL_BSS_START_ADDR 0x80000000
132#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */ 133#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
diff --git a/include/configs/ti_am335x_common.h b/include/configs/ti_am335x_common.h
index 52f4ed66db..fb4e82fe8e 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -58,7 +58,6 @@
58 * Y-MODEM to load u-boot.img, when booted over UART. 58 * Y-MODEM to load u-boot.img, when booted over UART.
59 */ 59 */
60#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR 60#define CONFIG_SPL_TEXT_BASE CONFIG_ISW_ENTRY_ADDR
61#define CONFIG_SPL_MAX_SIZE (0x4030B800 - CONFIG_SPL_TEXT_BASE)
62#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ 61#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
63 (128 << 20)) 62 (128 << 20))
64 63
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 5dd519531c..bba511ab99 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -255,14 +255,14 @@
255/* 255/*
256 * Place the image at the start of the ROM defined image space (per 256 * Place the image at the start of the ROM defined image space (per
257 * CONFIG_SPL_TEXT_BASE and we limit our size to the ROM-defined 257 * CONFIG_SPL_TEXT_BASE and we limit our size to the ROM-defined
258 * downloaded image area. We initalize DRAM as soon as we can so that 258 * downloaded image area minus 1KiB for scratch space. We initalize DRAM as
259 * we can place stack, malloc and BSS there. We load U-Boot itself into 259 * soon as we can so that we can place stack, malloc and BSS there. We load
260 * memory at 0x80800000 for legacy reasons (to not conflict with older 260 * U-Boot itself into memory at 0x80800000 for legacy reasons (to not conflict
261 * SPLs). We have our BSS be placed 2MiB after this, to allow for the 261 * with older SPLs). We have our BSS be placed 2MiB after this, to allow for
262 * default Linux kernel address of 0x80008000 to work with most sized 262 * the default Linux kernel address of 0x80008000 to work with most sized
263 * kernels, in the Falcon Mode case. We have the SPL malloc pool at the 263 * kernels, in the Falcon Mode case. We have the SPL malloc pool at the end
264 * end of the BSS area. We suggest that the stack be placed at 32MiB after 264 * of the BSS area. We suggest that the stack be placed at 32MiB after the
265 * the start of DRAM to allow room for all of the above (handled in Kconfig). 265 * start of DRAM to allow room for all of the above (handled in Kconfig).
266 */ 266 */
267#ifndef CONFIG_SYS_TEXT_BASE 267#ifndef CONFIG_SYS_TEXT_BASE
268#define CONFIG_SYS_TEXT_BASE 0x80800000 268#define CONFIG_SYS_TEXT_BASE 0x80800000
@@ -276,6 +276,10 @@
276 CONFIG_SPL_BSS_MAX_SIZE) 276 CONFIG_SPL_BSS_MAX_SIZE)
277#define CONFIG_SYS_SPL_MALLOC_SIZE CONFIG_SYS_MALLOC_LEN 277#define CONFIG_SYS_SPL_MALLOC_SIZE CONFIG_SYS_MALLOC_LEN
278#endif 278#endif
279#ifndef CONFIG_SPL_MAX_SIZE
280#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
281 CONFIG_SPL_TEXT_BASE)
282#endif
279 283
280/* RAW SD card / eMMC locations. */ 284/* RAW SD card / eMMC locations. */
281#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* address 0x40000 */ 285#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* address 0x40000 */
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 97ff26360b..5a90930f38 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -273,6 +273,8 @@
273 "set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0" \ 273 "set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}\0" \
274 "init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; " \ 274 "init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; " \
275 "run set_rd_spec\0" \ 275 "run set_rd_spec\0" \
276 "init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; " \
277 "run set_rd_spec\0" \
276 "init_fw_rd_ramfs=setenv rd_spec -\0" \ 278 "init_fw_rd_ramfs=setenv rd_spec -\0" \
277 "init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; " \ 279 "init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; " \
278 "run set_rd_spec\0" \ 280 "run set_rd_spec\0" \
@@ -281,6 +283,7 @@
281 "set_name_pmmc=setenv name_pmmc ti-sci-firmware-${soc_variant}.bin\0" \ 283 "set_name_pmmc=setenv name_pmmc ti-sci-firmware-${soc_variant}.bin\0" \
282 "dev_pmmc=0\0" \ 284 "dev_pmmc=0\0" \
283 "get_pmmc_net=dhcp ${loadaddr} ${tftp_root}/${name_pmmc}\0" \ 285 "get_pmmc_net=dhcp ${loadaddr} ${tftp_root}/${name_pmmc}\0" \
286 "get_pmmc_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_pmmc}\0" \
284 "get_pmmc_ramfs=run get_pmmc_net\0" \ 287 "get_pmmc_ramfs=run get_pmmc_net\0" \
285 "get_pmmc_mmc=load mmc ${bootpart} ${loadaddr} " \ 288 "get_pmmc_mmc=load mmc ${bootpart} ${loadaddr} " \
286 "${bootdir}/${name_pmmc}\0" \ 289 "${bootdir}/${name_pmmc}\0" \
diff --git a/include/configs/ti_omap3_common.h b/include/configs/ti_omap3_common.h
index 32877d1964..843f87d930 100644
--- a/include/configs/ti_omap3_common.h
+++ b/include/configs/ti_omap3_common.h
@@ -70,7 +70,6 @@
70 70
71/* SPL */ 71/* SPL */
72#define CONFIG_SPL_TEXT_BASE 0x40200800 72#define CONFIG_SPL_TEXT_BASE 0x40200800
73#define CONFIG_SPL_MAX_SIZE (54 * 1024)
74#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" 73#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
75#define CONFIG_SPL_POWER_SUPPORT 74#define CONFIG_SPL_POWER_SUPPORT
76#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ 75#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
diff --git a/include/configs/ti_omap4_common.h b/include/configs/ti_omap4_common.h
index fb9a0ce42f..99873e2b07 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -146,7 +146,6 @@
146 * So moving TEXT_BASE down to non-HS limit. 146 * So moving TEXT_BASE down to non-HS limit.
147 */ 147 */
148#define CONFIG_SPL_TEXT_BASE 0x40300000 148#define CONFIG_SPL_TEXT_BASE 0x40300000
149#define CONFIG_SPL_MAX_SIZE (0x4030C000 - CONFIG_SPL_TEXT_BASE)
150#define CONFIG_SPL_DISPLAY_PRINT 149#define CONFIG_SPL_DISPLAY_PRINT
151#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" 150#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
152#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ 151#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index fed164a096..171cc9aa36 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -211,12 +211,6 @@
211#endif 211#endif
212 212
213/* DRA7xx/AM57xx have 512K of SRAM, OMAP5 only 128K */ 213/* DRA7xx/AM57xx have 512K of SRAM, OMAP5 only 128K */
214#if defined(CONFIG_DRA7XX)
215#define CONFIG_SPL_BOOT_END 0x4037E000
216#else
217#define CONFIG_SPL_BOOT_END 0x4031E000
218#endif
219#define CONFIG_SPL_MAX_SIZE (CONFIG_SPL_BOOT_END - CONFIG_SPL_TEXT_BASE)
220#define CONFIG_SPL_DISPLAY_PRINT 214#define CONFIG_SPL_DISPLAY_PRINT
221#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds" 215#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
222#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \ 216#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
diff --git a/include/configs/tricorder.h b/include/configs/tricorder.h
index 855d789c18..289aaffef1 100644
--- a/include/configs/tricorder.h
+++ b/include/configs/tricorder.h
@@ -342,7 +342,8 @@
342#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */ 342#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
343 343
344#define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/ 344#define CONFIG_SPL_TEXT_BASE 0x40200000 /*CONFIG_SYS_SRAM_START*/
345#define CONFIG_SPL_MAX_SIZE (57 * 1024) /* 7 KB for stack */ 345#define CONFIG_SPL_MAX_SIZE (SRAM_SCRATCH_SPACE_ADDR - \
346 CONFIG_SPL_TEXT_BASE)
346 347
347#define CONFIG_SPL_BSS_START_ADDR 0x80000000 /*CONFIG_SYS_SDRAM_BASE*/ 348#define CONFIG_SPL_BSS_START_ADDR 0x80000000 /*CONFIG_SYS_SDRAM_BASE*/
348#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 349#define CONFIG_SPL_BSS_MAX_SIZE 0x80000