diff mbox series

[6/6] ARM: uniphier: enable MTD partition and UBI

Message ID 1531985307-4208-6-git-send-email-yamada.masahiro@socionext.com
State New
Headers show
Series [1/6] fdt_support: make fdt_fixup_mtdparts() prototype more specific | expand

Commit Message

Masahiro Yamada July 19, 2018, 7:28 a.m. UTC
Enable "mtdparts" and "ubi" commands for uniphier_v8_defconfig to
use UBI on NAND devices.

Enable only "mtdparts" for uniphier_{v7,ld4_sld8}_defconfig because
enabling UBI would increase 170KB, which would be memory footprint
problem.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 configs/uniphier_ld4_sld8_defconfig | 4 ++++
 configs/uniphier_v7_defconfig       | 4 ++++
 configs/uniphier_v8_defconfig       | 4 ++++
 include/configs/uniphier.h          | 1 +
 4 files changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig
index e5c1deb..225be21 100644
--- a/configs/uniphier_ld4_sld8_defconfig
+++ b/configs/uniphier_ld4_sld8_defconfig
@@ -31,6 +31,9 @@  CONFIG_CMD_TIME=y
 # CONFIG_CMD_MISC is not set
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NET_RANDOM_ETHADDR=y
@@ -52,3 +55,4 @@  CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_GENERIC=y
 CONFIG_USB_STORAGE=y
 CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/uniphier_v7_defconfig b/configs/uniphier_v7_defconfig
index 89b7b4a..c54ee00 100644
--- a/configs/uniphier_v7_defconfig
+++ b/configs/uniphier_v7_defconfig
@@ -30,6 +30,9 @@  CONFIG_CMD_TIME=y
 # CONFIG_CMD_MISC is not set
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
 # CONFIG_SPL_DOS_PARTITION is not set
 # CONFIG_SPL_EFI_PARTITION is not set
 CONFIG_NET_RANDOM_ETHADDR=y
@@ -53,3 +56,4 @@  CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_UNIPHIER=y
 CONFIG_USB_STORAGE=y
 CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig
index 93df2f6..67ebde7 100644
--- a/configs/uniphier_v8_defconfig
+++ b/configs/uniphier_v8_defconfig
@@ -26,6 +26,9 @@  CONFIG_CMD_TIME=y
 # CONFIG_CMD_MISC is not set
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
+CONFIG_CMD_UBI=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_GPIO_UNIPHIER=y
 CONFIG_MISC=y
@@ -53,3 +56,4 @@  CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_UNIPHIER=y
 CONFIG_USB_STORAGE=y
 CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index b631f79..49eb18f 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -26,6 +26,7 @@ 
 
 /* FLASH related */
 #define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
 
 #define CONFIG_FLASH_CFI_DRIVER
 #define CONFIG_SYS_FLASH_CFI