arm: mach-k3: Move MSMC fixup to SoC level
The MSMC fixup is something we do based on SoC, not based on the board.
So this fixup does not belong in the board files. Move this to the
mach-k3 common file so that it does not have to be done in each board
that uses these SoCs.
We use ft_system_setup() here instead of ft_board_setup() since it is no
longer board level. Enable OF_SYSTEM_SETUP in the configurations that use
this to keep functionality the same.
Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c
index df705b7..1ba3e90 100644
--- a/board/siemens/iot2050/board.c
+++ b/board/siemens/iot2050/board.c
@@ -482,19 +482,10 @@
int ft_board_setup(void *blob, struct bd_info *bd)
{
- int ret;
-
- ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000");
- if (ret < 0)
- ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000",
- "sram@70000000");
- if (ret)
- pr_err("%s: fixing up msmc ram failed %d\n", __func__, ret);
-
if (board_is_m2())
m2_fdt_fixup(blob);
- return ret;
+ return 0;
}
#endif
diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c
index b266ccb..4053b83 100644
--- a/board/ti/am65x/evm.c
+++ b/board/ti/am65x/evm.c
@@ -101,24 +101,6 @@
}
#endif
-#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-int ft_board_setup(void *blob, struct bd_info *bd)
-{
- int ret;
-
- ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000");
- if (ret < 0)
- ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000",
- "sram@70000000");
- if (ret) {
- printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
- return ret;
- }
-
- return 0;
-}
-#endif
-
#ifdef CONFIG_TI_I2C_BOARD_DETECT
int do_board_detect(void)
{
diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index d4e672a..00ce009 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -144,18 +144,9 @@
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, struct bd_info *bd)
{
- int ret;
-
- ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000");
- if (ret < 0)
- ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000",
- "sram@70000000");
- if (ret)
- printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
-
detect_enable_hyperflash(blob);
- return ret;
+ return 0;
}
#endif
diff --git a/board/ti/j721s2/evm.c b/board/ti/j721s2/evm.c
index c86715f..9b130c1 100644
--- a/board/ti/j721s2/evm.c
+++ b/board/ti/j721s2/evm.c
@@ -73,22 +73,6 @@
return 0;
}
-#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
-int ft_board_setup(void *blob, struct bd_info *bd)
-{
- int ret;
-
- ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000");
- if (ret < 0)
- ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000",
- "sram@70000000");
- if (ret)
- printf("%s: fixing up msmc ram failed %d\n", __func__, ret);
-
- return ret;
-}
-#endif
-
#ifdef CONFIG_TI_I2C_BOARD_DETECT
/*
* Functions specific to EVM and SK designs of J721S2/AM68 family.