diff mbox

[U-Boot,v2,7/9] KM: add the KM_UBI_PART_BOOT_OPTS #define

Message ID 1390819752-21233-8-git-send-email-valentin.longchamp@keymile.com
State Accepted
Delegated to: York Sun
Headers show

Commit Message

Valentin Longchamp Jan. 27, 2014, 10:49 a.m. UTC
This define can be used if the ubi boot partition (defined for all
Keymile boards with KM_UBI_PARTITION_NAME_BOOT #define to ubi0) needs
some additionnal boot options.

This is the case for the kmp204x boards since u-boot does not support
NAND Flash subpage accesses on this platform, an additionnal argument
that defines the VID offstet must be given to the kernel.

The UBI cmd line option now looks like this "ubi.mtd=ubi0,2048" on this
platform.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
---

Changes in v2: None

 include/configs/km/keymile-common.h | 10 ++++++++--
 include/configs/km/kmp204x-common.h |  4 ++++
 2 files changed, 12 insertions(+), 2 deletions(-)

Comments

York Sun Feb. 3, 2014, 8:24 p.m. UTC | #1
On 01/27/2014 02:49 AM, Valentin Longchamp wrote:
> This define can be used if the ubi boot partition (defined for all
> Keymile boards with KM_UBI_PARTITION_NAME_BOOT #define to ubi0) needs
> some additionnal boot options.
> 
> This is the case for the kmp204x boards since u-boot does not support
> NAND Flash subpage accesses on this platform, an additionnal argument
> that defines the VID offstet must be given to the kernel.
> 
> The UBI cmd line option now looks like this "ubi.mtd=ubi0,2048" on this
> platform.
> 
> Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
> ---
> 
> Changes in v2: None
> 

Applied to u-boot-mpc85xx master branch.

York
diff mbox

Patch

diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index 2a15ad4..a4e0f7c 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -99,11 +99,16 @@ 
 #define CONFIG_KM_UBI_PARTITION_NAME_BOOT	"ubi0"
 #endif /* CONFIG_KM_UBI_PARTITION_NAME_BOOT */
 
+#ifndef CONFIG_KM_UBI_PART_BOOT_OPTS
+#define CONFIG_KM_UBI_PART_BOOT_OPTS		""
+#endif /* CONFIG_KM_UBI_PART_BOOT_OPTS */
+
 #ifndef CONFIG_KM_UBI_PARTITION_NAME_APP
 /* one flash chip only called boot */
 /* boot: CONFIG_KM_UBI_PARTITION_NAME_BOOT */
 # define CONFIG_KM_UBI_LINUX_MTD					\
-	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT
+	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT			\
+	CONFIG_KM_UBI_PART_BOOT_OPTS
 # define CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI				\
 	"ubiattach=ubi part " CONFIG_KM_UBI_PARTITION_NAME_BOOT "\0"
 #else /* CONFIG_KM_UBI_PARTITION_NAME_APP */
@@ -111,7 +116,8 @@ 
 /* boot: CONFIG_KM_UBI_PARTITION_NAME_BOOT */
 /* app:  CONFIG_KM_UBI_PARTITION_NAME_APP */
 # define CONFIG_KM_UBI_LINUX_MTD					\
-	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT " "		\
+	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_BOOT			\
+	CONFIG_KM_UBI_PART_BOOT_OPTS " "				\
 	"ubi.mtd=" CONFIG_KM_UBI_PARTITION_NAME_APP
 # define CONFIG_KM_DEV_ENV_FLASH_BOOT_UBI				\
 	"ubiattach=if test ${boot_bank} -eq 0; then; "			\
diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
index 626879a..ac7c2e3 100644
--- a/include/configs/km/kmp204x-common.h
+++ b/include/configs/km/kmp204x-common.h
@@ -15,6 +15,10 @@ 
 
 #define CONFIG_KM_DEF_NETDEV	"netdev=eth0\0"
 
+/* an additionnal option is required for UBI as subpage access is
+ * supported in u-boot */
+#define CONFIG_KM_UBI_PART_BOOT_OPTS		",2048"
+
 #define CONFIG_NAND_ECC_BCH
 
 /* common KM defines */