summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/Makefile1
-rw-r--r--cmd/remoteproc.c4
-rw-r--r--configs/sama5d2_ptc_ek_mmc_defconfig2
-rw-r--r--drivers/power/regulator/Kconfig9
-rw-r--r--drivers/w1-eeprom/ds24xxx.c2
-rw-r--r--drivers/w1/w1-uclass.c14
-rw-r--r--include/configs/at91sam9x5ek.h5
-rw-r--r--include/environment/ti/boot.h1
-rw-r--r--test/dm/tee.c35
9 files changed, 49 insertions, 24 deletions
diff --git a/cmd/Makefile b/cmd/Makefile
index d9cdaf6064b..ac4830a692f 100644
--- a/cmd/Makefile
+++ b/cmd/Makefile
@@ -15,7 +15,6 @@ obj-$(CONFIG_CMD_AES) += aes.o
obj-$(CONFIG_CMD_ADC) += adc.o
obj-$(CONFIG_CMD_ARMFLASH) += armflash.o
obj-y += blk_common.o
-obj-$(CONFIG_SOURCE) += source.o
obj-$(CONFIG_CMD_SOURCE) += source.o
obj-$(CONFIG_CMD_BDI) += bdinfo.o
obj-$(CONFIG_CMD_BEDBUG) += bedbug.o
diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c
index 9aebfc2f6ef..81463f36b60 100644
--- a/cmd/remoteproc.c
+++ b/cmd/remoteproc.c
@@ -120,7 +120,7 @@ static int do_remoteproc_load(cmd_tbl_t *cmdtp, int flag, int argc,
if (argc != 4)
return CMD_RET_USAGE;
- id = (int)simple_strtoul(argv[1], NULL, 3);
+ id = (int)simple_strtoul(argv[1], NULL, 10);
addr = simple_strtoul(argv[2], NULL, 16);
size = simple_strtoul(argv[3], NULL, 16);
@@ -163,7 +163,7 @@ static int do_remoteproc_wrapper(cmd_tbl_t *cmdtp, int flag, int argc,
if (argc != 2)
return CMD_RET_USAGE;
- id = (int)simple_strtoul(argv[1], NULL, 3);
+ id = (int)simple_strtoul(argv[1], NULL, 10);
if (!rproc_is_initialized()) {
printf("\tRemote Processors are not initialized\n");
diff --git a/configs/sama5d2_ptc_ek_mmc_defconfig b/configs/sama5d2_ptc_ek_mmc_defconfig
index e40ee003122..4a78b2da3d9 100644
--- a/configs/sama5d2_ptc_ek_mmc_defconfig
+++ b/configs/sama5d2_ptc_ek_mmc_defconfig
@@ -32,7 +32,7 @@ CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_ptc_ek"
-CONFIG_ENV_IS_IN_MMC=y
+CONFIG_ENV_IS_IN_FAT=y
CONFIG_DM=y
CONFIG_SPL_DM_SEQ_ALIAS=y
CONFIG_CLK=y
diff --git a/drivers/power/regulator/Kconfig b/drivers/power/regulator/Kconfig
index 414f4a53f78..2561a8a8561 100644
--- a/drivers/power/regulator/Kconfig
+++ b/drivers/power/regulator/Kconfig
@@ -86,12 +86,19 @@ config SPL_DM_REGULATOR_FIXED
config DM_REGULATOR_GPIO
bool "Enable Driver Model for GPIO REGULATOR"
- depends on DM_REGULATOR
+ depends on DM_REGULATOR && DM_GPIO
---help---
This config enables implementation of driver-model regulator uclass
features for gpio regulators. The driver implements get/set for
voltage value.
+config SPL_DM_REGULATOR_GPIO
+ bool "Enable Driver Model for GPIO REGULATOR in SPL"
+ depends on DM_REGULATOR_GPIO && SPL_GPIO_SUPPORT
+ ---help---
+ This config enables implementation of driver-model regulator uclass
+ features for gpio regulators in SPL.
+
config REGULATOR_RK8XX
bool "Enable driver for RK8XX regulators"
depends on DM_REGULATOR && PMIC_RK8XX
diff --git a/drivers/w1-eeprom/ds24xxx.c b/drivers/w1-eeprom/ds24xxx.c
index 56186e587cf..0967accdf00 100644
--- a/drivers/w1-eeprom/ds24xxx.c
+++ b/drivers/w1-eeprom/ds24xxx.c
@@ -31,7 +31,7 @@ static int ds24xxx_probe(struct udevice *dev)
{
struct w1_device *w1;
- w1 = dev_get_platdata(dev);
+ w1 = dev_get_parent_platdata(dev);
w1->id = 0;
return 0;
}
diff --git a/drivers/w1/w1-uclass.c b/drivers/w1/w1-uclass.c
index aecf7fec77c..cb41b68eff1 100644
--- a/drivers/w1/w1-uclass.c
+++ b/drivers/w1/w1-uclass.c
@@ -115,17 +115,19 @@ int w1_get_bus(int busnum, struct udevice **busp)
struct udevice *dev;
for (ret = uclass_first_device(UCLASS_W1, &dev);
- !ret;
- uclass_next_device(&dev), i++) {
- if (ret) {
- debug("Cannot find w1 bus %d\n", busnum);
- return ret;
- }
+ dev && !ret;
+ ret = uclass_next_device(&dev), i++) {
if (i == busnum) {
*busp = dev;
return 0;
}
}
+
+ if (!ret) {
+ debug("Cannot find w1 bus %d\n", busnum);
+ ret = -ENODEV;
+ }
+
return ret;
}
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index d48b7d07855..63305a7cdd3 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -85,8 +85,9 @@
#define CONFIG_ENV_OFFSET_REDUND 0x100000
#define CONFIG_ENV_SIZE 0x20000 /* 1 sector = 128 kB */
#define CONFIG_BOOTCOMMAND "nand read " \
- "0x22000000 0x200000 0x300000; " \
- "bootm 0x22000000"
+ "0x22000000 0x200000 0x600000; " \
+ "nand read 0x21000000 0x180000 0x20000; " \
+ "bootz 0x22000000 - 0x21000000"
#elif defined(CONFIG_SPI_BOOT)
/* bootstrap + u-boot + env + linux in spi flash */
#define CONFIG_ENV_OFFSET 0x5000
diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h
index 560753ae4c8..3c9c87f21b1 100644
--- a/include/environment/ti/boot.h
+++ b/include/environment/ti/boot.h
@@ -93,7 +93,6 @@
AVB_VERIFY_CHECK \
"part start mmc ${mmcdev} boot boot_start; " \
"part size mmc ${mmcdev} boot boot_size; " \
- "mmc read ${fdtaddr} ${fdt_start} ${fdt_size}; " \
"mmc read ${loadaddr} ${boot_start} ${boot_size}; " \
"bootm ${loadaddr}#${fdtfile};\0 "
diff --git a/test/dm/tee.c b/test/dm/tee.c
index 13e3f4003a7..22f05a42197 100644
--- a/test/dm/tee.c
+++ b/test/dm/tee.c
@@ -49,7 +49,12 @@ static int match(struct tee_version_data *vers, const void *data)
return vers->gen_caps & TEE_GEN_CAP_GP;
}
-static int dm_test_tee(struct unit_test_state *uts)
+struct test_tee_vars {
+ struct tee_shm *reg_shm;
+ struct tee_shm *alloc_shm;
+};
+
+static int test_tee(struct unit_test_state *uts, struct test_tee_vars *vars)
{
struct tee_version_data vers;
struct udevice *dev;
@@ -57,8 +62,6 @@ static int dm_test_tee(struct unit_test_state *uts)
u32 session = 0;
int rc;
u8 data[128];
- struct tee_shm *reg_shm;
- struct tee_shm *alloc_shm;
dev = tee_find_device(NULL, match, NULL, &vers);
ut_assert(dev);
@@ -77,22 +80,36 @@ static int dm_test_tee(struct unit_test_state *uts)
ut_assert(!state->session);
ut_assert(!state->num_shms);
- rc = tee_shm_register(dev, data, sizeof(data), 0, &reg_shm);
+ rc = tee_shm_register(dev, data, sizeof(data), 0, &vars->reg_shm);
ut_assert(!rc);
ut_assert(state->num_shms == 1);
- rc = tee_shm_alloc(dev, 256, 0, &alloc_shm);
+ rc = tee_shm_alloc(dev, 256, 0, &vars->alloc_shm);
ut_assert(!rc);
ut_assert(state->num_shms == 2);
- ut_assert(tee_shm_is_registered(reg_shm, dev));
- ut_assert(tee_shm_is_registered(alloc_shm, dev));
+ ut_assert(tee_shm_is_registered(vars->reg_shm, dev));
+ ut_assert(tee_shm_is_registered(vars->alloc_shm, dev));
- tee_shm_free(reg_shm);
- tee_shm_free(alloc_shm);
+ tee_shm_free(vars->reg_shm);
+ vars->reg_shm = NULL;
+ tee_shm_free(vars->alloc_shm);
+ vars->alloc_shm = NULL;
ut_assert(!state->num_shms);
return 0;
}
+static int dm_test_tee(struct unit_test_state *uts)
+{
+ struct test_tee_vars vars = { NULL, NULL };
+ int rc = test_tee(uts, &vars);
+
+ /* In case test_tee() asserts these may still remain allocated */
+ tee_shm_free(vars.reg_shm);
+ tee_shm_free(vars.alloc_shm);
+
+ return rc;
+}
+
DM_TEST(dm_test_tee, DM_TESTF_SCAN_FDT);