]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: da850-evm: Enable MTD Parts in SPI Flash
authorAdam Ford <aford173@gmail.com>
Mon, 18 Sep 2017 01:43:47 +0000 (20:43 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 29 Sep 2017 14:52:22 +0000 (10:52 -0400)
There is a discrepency between U-Boot and Linux on the partition map.
This enabes the MTD parts to pass MTD partition information from U-Boot to
Linux.  Linux already has a pending patch to enable MTD PARTS in
davinci_all_defconfig

Reviewed-by: Jagan Teki <jagan@openedev.com>
Signed-off-by: Adam Ford <aford173@gmail.com>
configs/da850evm_defconfig
include/configs/da850evm.h

index 05dc8131facbc674ed29d39c8690484630f83338..80160eff079461b95af29b15a84c3000716ae97c 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_CRC32_VERIFY=y
 # CONFIG_CMD_TIME is not set
 # CONFIG_CMD_EXT4 is not set
 # CONFIG_CMD_FS_GENERIC is not set
+CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
@@ -38,6 +39,7 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_MTD=y
 CONFIG_DM_SERIAL=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_SPI=y
index d383c23bbe0a29045c87df5e0da8f585f4ae28f7..0bdf0cb1340fb4c076cc5037a05cb2f5eba5838d 100644 (file)
 #define CONFIG_ENV_SIZE                        (64 << 10)
 #define CONFIG_ENV_OFFSET              (512 << 10)
 #define CONFIG_ENV_SECT_SIZE           (64 << 10)
+#ifdef CONFIG_SPL_BUILD
+#undef CONFIG_SPI_FLASH_MTD
+#endif
+#define CONFIG_MTD_DEVICE              /* needed for mtdparts commands */
+#define CONFIG_MTD_PARTITIONS          /* required for UBI partition support */
+#define MTDIDS_DEFAULT                 "nor0=spi0.0"
+#define MTDPARTS_DEFAULT               "mtdparts=spi0.0:"\
+                                               "512k(u-boot.ais),"\
+                                               "64k(u-boot-env),"\
+                                               "7552k(kernel-spare),"\
+                                               "64k(MAC-Address)"
 #endif
 
 /*