public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V3 4/5] arm: da850-evm: Enable MTD Parts
Date: Wed,  6 Sep 2017 16:30:38 -0500	[thread overview]
Message-ID: <1504733439-25283-4-git-send-email-aford173@gmail.com> (raw)
In-Reply-To: <1504733439-25283-1-git-send-email-aford173@gmail.com>

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>
---
V3:  No Change
V2:  This patch is new to the series

 configs/da850evm_defconfig |  2 ++
 include/configs/da850evm.h | 16 ++++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 652da01..08cc2e8 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -33,6 +33,7 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_FAT=y
+CONFIG_CMD_MTDPARTS=y
 CONFIG_CMD_DIAG=y
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
@@ -41,6 +42,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
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index b147bc5..a47ba96 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -139,7 +139,6 @@
 /*
  * Serial Driver info
  */
-
 #ifdef CONFIG_SPL_BUILD
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_REG_SIZE	-4	/* NS16550 register size */
@@ -148,6 +147,9 @@
 #define CONFIG_SYS_NS16550_CLK	clk_get(DAVINCI_UART2_CLKID)
 #define CONFIG_CONS_INDEX	1		/* use UART0 for console */
 
+/*
+ * SPI Driver Info
+ */
 #define CONFIG_SPI
 #define CONFIG_DAVINCI_SPI
 #define CONFIG_SYS_SPI_CLK		clk_get(DAVINCI_SPI1_CLKID)
@@ -156,11 +158,21 @@
 #define CONFIG_SF_DEFAULT_SPEED		30000000
 #define CONFIG_ENV_SPI_MAX_HZ	CONFIG_SF_DEFAULT_SPEED
 #endif
-
 #ifdef CONFIG_USE_SPIFLASH
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE	0x40000
+#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
 
 /*
-- 
2.7.4

  parent reply	other threads:[~2017-09-06 21:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06 21:30 [U-Boot] [PATCH V3 1/5] arm: dts: da850: Migrate da850-evm DTS files from Linux 4.13-RC5 Adam Ford
2017-09-06 21:30 ` [U-Boot] [PATCH V3 2/5] spi: davinci_spi: Add da830-spi support for DM Adam Ford
2017-09-06 21:30 ` [U-Boot] [PATCH V3 3/5] arm: da850-evm: Enable DM and device tree support for da850-evm Adam Ford
2017-09-13 13:03   ` [U-Boot] [U-Boot, V3, " Tom Rini
2017-09-06 21:30 ` Adam Ford [this message]
2017-09-06 21:30 ` [U-Boot] [PATCH V3 5/5] ARM: da850-evm: Enable DM_I2C Adam Ford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1504733439-25283-4-git-send-email-aford173@gmail.com \
    --to=aford173@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox