summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-02-26 15:14:57 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-13 12:00:29 +0100
commit6fcaea2f74f8320792467aabf69181bd2aacc47e (patch)
tree1878d2225b0a01b8be150edc63a6ad1d14a0188f
parent5fd8076751aeb231dea6db8294a74a27f54ffa4f (diff)
downloadbarebox-6fcaea2f74f8320792467aabf69181bd2aacc47e.tar.gz
barebox-6fcaea2f74f8320792467aabf69181bd2aacc47e.tar.xz
ARM: i.MX6ul: TQMa6ul: fix mmc aliases
The TQMa6ul upstream device trees contain aliases which swap the order of the mmc nodes, so what used to be mmc0 has now become mmc1 and vice versa. With this mmc0 now is the eMMC and mmc1 is the SD card. Introduce a imx6ul.dtsi which adds barebox,bootsource-mmcx aliases so that bootsource_get_instance() matches our mmc numbering again. Also register the eMMC BBU handler on /dev/mmc0 and the SD BBU handler on /dev/mmc1. Fixes: 5a23f05267 ("ARM: tqma6ul: use upstream device trees") Link: https://lore.barebox.org/20240226141458.620463-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/tqma6ulx/board.c8
-rw-r--r--arch/arm/dts/imx6ul-tqma6ul-common.dtsi2
-rw-r--r--arch/arm/dts/imx6ul.dtsi6
3 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/boards/tqma6ulx/board.c b/arch/arm/boards/tqma6ulx/board.c
index 312bb9f585..04e35c199e 100644
--- a/arch/arm/boards/tqma6ulx/board.c
+++ b/arch/arm/boards/tqma6ulx/board.c
@@ -80,11 +80,11 @@ static int mba6ulx_probe(struct device *dev)
clk_enable(clk);
/* the bootloader is stored in one of the two boot partitions */
- flags = bootsource_get_instance() == 0 ? BBU_HANDLER_FLAG_DEFAULT : 0;
- imx6_bbu_internal_mmc_register_handler("SD", "/dev/mmc0.barebox", flags);
-
flags = bootsource_get_instance() == 1 ? BBU_HANDLER_FLAG_DEFAULT : 0;
- imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc1", flags);
+ imx6_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", flags);
+
+ flags = bootsource_get_instance() == 0 ? BBU_HANDLER_FLAG_DEFAULT : 0;
+ imx6_bbu_internal_mmc_register_handler("eMMC", "/dev/mmc0", flags);
if (bootsource_get_instance() == 0)
of_device_enable_path("/chosen/environment-sd");
diff --git a/arch/arm/dts/imx6ul-tqma6ul-common.dtsi b/arch/arm/dts/imx6ul-tqma6ul-common.dtsi
index 64f1ee253c..71a447a394 100644
--- a/arch/arm/dts/imx6ul-tqma6ul-common.dtsi
+++ b/arch/arm/dts/imx6ul-tqma6ul-common.dtsi
@@ -4,6 +4,8 @@
* Author: Rouven Czerwinski
*/
+#include "imx6ul.dtsi"
+
/ {
chosen {
environment-sd {
diff --git a/arch/arm/dts/imx6ul.dtsi b/arch/arm/dts/imx6ul.dtsi
new file mode 100644
index 0000000000..7d600f505b
--- /dev/null
+++ b/arch/arm/dts/imx6ul.dtsi
@@ -0,0 +1,6 @@
+/ {
+ aliases {
+ barebox,bootsource-mmc0 = &usdhc1;
+ barebox,bootsource-mmc1 = &usdhc2;
+ };
+};