summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>2018-03-14 12:33:07 +0100
committerJakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>2018-03-14 13:57:24 +0100
commit4f5bf8c67467b77c2213945c32c3f69be0b07efb (patch)
treed064932a99c54b6344ca19bb22d89cf99e0ccf85
parent2cce73b7ff5bd354d023f0cc41fae271687436f2 (diff)
rockchip: rk3399-puma: prefer sd card unless booted from spi
If we were loaded from sd card, we want to load the kernel from sd card, too. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
-rw-r--r--include/configs/puma_rk3399.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/configs/puma_rk3399.h b/include/configs/puma_rk3399.h
index 39d0786266..cb95ac9bd5 100644
--- a/include/configs/puma_rk3399.h
+++ b/include/configs/puma_rk3399.h
@@ -37,4 +37,18 @@
#define CONFIG_BMP_24BPP
#define CONFIG_BMP_32BPP
+/*
+ * We usually boot from SPI flash: This sets CONFIG_ENV_IS_IN_SPI_FLASH=y
+ * and tries to load the kernel from eMMC (mmc0) first.
+ *
+ * If we boot from SD card, we prefer to load the kernel from SD card (mmc1)
+ * first.
+ */
+#if !CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH)
+#undef BOOT_TARGET_DEVICES
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 1) \
+ func(MMC, mmc, 0)
#endif
+
+#endif /* __PUMA_RK3399_H */