From 12c550d4fbfae272793c222c51af77613ffc5963 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 4 Jul 2016 11:57:43 -0600 Subject: spl: Drop include of i2c.h This file does not appear to use I2C, so drop this include. Signed-off-by: Simon Glass --- common/spl/spl.c | 1 - 1 file changed, 1 deletion(-) (limited to 'common/spl') diff --git a/common/spl/spl.c b/common/spl/spl.c index 840910a..5fbf101 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include -- cgit v1.1 From d223e0a82255b5fa6049f92556236f8ffd6b745c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 4 Jul 2016 11:57:56 -0600 Subject: dm: spl: Don't set up device tree with of-platdata When this feature is enabled, we should not access the device tree. Signed-off-by: Simon Glass --- common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/spl') diff --git a/common/spl/spl.c b/common/spl/spl.c index 5fbf101..59f41a1 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -202,7 +202,7 @@ int spl_init(void) gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN; gd->malloc_ptr = 0; #endif - if (CONFIG_IS_ENABLED(OF_CONTROL)) { + if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) { ret = fdtdec_setup(); if (ret) { debug("fdtdec_setup() returned error %d\n", ret); -- cgit v1.1 From 7d23b9cf2b1a5a86f7e89a443e3a2de9dac8a9ad Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 4 Jul 2016 11:58:14 -0600 Subject: dm: spl: Bind in all devices in SPL with of-platdata When CONFIG_OF_PLATDATA is enabled, we cannot use the u-boot,dm-pre-reloc device tree property since the device tree is not available. However, dt-platdata.c only includes devices which would have been present in the device tree, and we can assume that all such devices are needed for SPL. If they were not needed, they would have been omitted to save space. So in this case, bind all devices regardless of the u-boot,dm-pre-reloc setting. This avoids needing to add a DM_FLAG_PRE_RELOC to every driver, thus affecting U-Boot proper also. Signed-off-by: Simon Glass --- common/spl/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/spl') diff --git a/common/spl/spl.c b/common/spl/spl.c index 59f41a1..12aed02 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -210,7 +210,8 @@ int spl_init(void) } } if (IS_ENABLED(CONFIG_SPL_DM)) { - ret = dm_init_and_scan(true); + /* With CONFIG_OF_PLATDATA, bring in all devices */ + ret = dm_init_and_scan(!CONFIG_IS_ENABLED(OF_PLATDATA)); if (ret) { debug("dm_init_and_scan() returned error %d\n", ret); return ret; -- cgit v1.1