aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@st.com>2019-07-02 13:26:07 +0200
committerPatrick Delaunay <patrick.delaunay@st.com>2019-07-12 11:50:53 +0200
commite81f8d16e27803a2178a35268d2ba8d4a22ed3f1 (patch)
tree7af83b0b54e147122d358f0f55b3a14bb616e7c5 /board
parent152c84bce9bee4ef839074347ca00df3f47afd00 (diff)
downloadu-boot-e81f8d16e27803a2178a35268d2ba8d4a22ed3f1.zip
u-boot-e81f8d16e27803a2178a35268d2ba8d4a22ed3f1.tar.gz
u-boot-e81f8d16e27803a2178a35268d2ba8d4a22ed3f1.tar.bz2
stm32mp1: activate OF_BOARD_SETUP and FDT_FIXUP_PARTITIONS
Update kernel MTD partition in device tree with U-Boot information. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'board')
-rw-r--r--board/st/stm32mp1/stm32mp1.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c
index 40adf3a..ff4907d 100644
--- a/board/st/stm32mp1/stm32mp1.c
+++ b/board/st/stm32mp1/stm32mp1.c
@@ -13,6 +13,8 @@
#include <i2c.h>
#include <led.h>
#include <misc.h>
+#include <mtd.h>
+#include <mtd_node.h>
#include <phy.h>
#include <reset.h>
#include <syscon.h>
@@ -21,6 +23,7 @@
#include <asm/gpio.h>
#include <asm/arch/stm32.h>
#include <asm/arch/sys_proto.h>
+#include <jffs2/load_kernel.h>
#include <power/regulator.h>
#include <usb/dwc2_udc.h>
@@ -751,3 +754,18 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)
debug("%s:mtdids=%s & mtdparts=%s\n", __func__, ids, parts);
}
#endif
+
+#if defined(CONFIG_OF_BOARD_SETUP)
+int ft_board_setup(void *blob, bd_t *bd)
+{
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+ struct node_info nodes[] = {
+ { "st,stm32f469-qspi", MTD_DEV_TYPE_NOR, },
+ { "st,stm32mp15-fmc2", MTD_DEV_TYPE_NAND, },
+ };
+ fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+#endif
+
+ return 0;
+}
+#endif