aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-2.6.39.2/at91/0001-Support-configurable-NAND-partitions-for-Atmel-at91-.patch
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf_samuelsson@telia.com>2011-11-21 17:00:46 +0100
committerUlf Samuelsson <ulf_samuelsson@telia.com>2011-11-21 17:00:46 +0100
commit744d72124c655ba369ec23540fc5168c8717b325 (patch)
treef2375e7ee515b1bc13756f31bb0721fc95bcc6d9 /recipes/linux/linux-2.6.39.2/at91/0001-Support-configurable-NAND-partitions-for-Atmel-at91-.patch
parent24207644c4efe29fe22c5c69688a0c3f7ffb106e (diff)
downloadopenembedded-744d72124c655ba369ec23540fc5168c8717b325.tar.gz
linux-2.6.39: Add at91 support
Signed-off-by: Ulf Samuelsson <ulf_samuelsson@telia.com>
Diffstat (limited to 'recipes/linux/linux-2.6.39.2/at91/0001-Support-configurable-NAND-partitions-for-Atmel-at91-.patch')
-rw-r--r--recipes/linux/linux-2.6.39.2/at91/0001-Support-configurable-NAND-partitions-for-Atmel-at91-.patch403
1 files changed, 403 insertions, 0 deletions
diff --git a/recipes/linux/linux-2.6.39.2/at91/0001-Support-configurable-NAND-partitions-for-Atmel-at91-.patch b/recipes/linux/linux-2.6.39.2/at91/0001-Support-configurable-NAND-partitions-for-Atmel-at91-.patch
new file mode 100644
index 0000000000..a754638842
--- /dev/null
+++ b/recipes/linux/linux-2.6.39.2/at91/0001-Support-configurable-NAND-partitions-for-Atmel-at91-.patch
@@ -0,0 +1,403 @@
+From 4f229b86469496fd0532c34cc91892e923d7d3de Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Sun, 30 Oct 2011 12:41:29 +0100
+Subject: [PATCH 1/3] Support configurable NAND partitions for Atmel at91
+ boards
+
+Signed-off-by: Ulf Samuelsson <ulf.samuelsson@telia.com>
+---
+ arch/arm/mach-at91/Kconfig | 29 +++++++++++++++++++++++++++++
+ arch/arm/mach-at91/board-at572d940hf_ek.c | 21 +++++++++------------
+ arch/arm/mach-at91/board-cap9adk.c | 14 ++++++++++++--
+ arch/arm/mach-at91/board-rm9200dk.c | 14 ++++++++++++--
+ arch/arm/mach-at91/board-sam9260ek.c | 13 +++++++++----
+ arch/arm/mach-at91/board-sam9261ek.c | 13 +++++++++----
+ arch/arm/mach-at91/board-sam9263ek.c | 13 +++++++++----
+ arch/arm/mach-at91/board-sam9g20ek.c | 6 +++---
+ arch/arm/mach-at91/board-sam9m10g45ek.c | 13 +++++++++----
+ arch/arm/mach-at91/board-sam9rlek.c | 13 +++++++++----
+ arch/arm/mach-at91/board-sam9x5cm.c | 13 +++++++++----
+ 11 files changed, 119 insertions(+), 43 deletions(-)
+
+diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
+index b5d29ef..42a7283 100644
+--- a/arch/arm/mach-at91/Kconfig
++++ b/arch/arm/mach-at91/Kconfig
+@@ -122,6 +122,7 @@ config MACH_ONEARM
+ config ARCH_AT91RM9200DK
+ bool "Atmel AT91RM9200-DK Development board"
+ select HAVE_AT91_DATAFLASH_CARD
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91RM9200-DK Development board.
+ (Discontinued)
+@@ -217,6 +218,7 @@ config MACH_AT91SAM9260EK
+ bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit"
+ select HAVE_AT91_DATAFLASH_CARD
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
+ <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
+@@ -278,6 +280,7 @@ config MACH_AT91SAM9261EK
+ bool "Atmel AT91SAM9261-EK Evaluation Kit"
+ select HAVE_AT91_DATAFLASH_CARD
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit.
+ <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820>
+@@ -294,6 +297,7 @@ config MACH_AT91SAM9G10EK
+ bool "Atmel AT91SAM9G10-EK Evaluation Kit"
+ select HAVE_AT91_DATAFLASH_CARD
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit.
+ <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588>
+@@ -310,6 +314,7 @@ config MACH_AT91SAM9263EK
+ bool "Atmel AT91SAM9263-EK Evaluation Kit"
+ select HAVE_AT91_DATAFLASH_CARD
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit.
+ <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057>
+@@ -336,6 +341,7 @@ comment "AT91SAM9RL Board Type"
+
+ config MACH_AT91SAM9RLEK
+ bool "Atmel AT91SAM9RL-EK Evaluation Kit"
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit.
+
+@@ -351,6 +357,7 @@ config MACH_AT91SAM9G20EK
+ bool "Atmel AT91SAM9G20-EK Evaluation Kit"
+ select HAVE_AT91_DATAFLASH_CARD
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit
+ that embeds only one SD/MMC slot.
+@@ -359,6 +366,7 @@ config MACH_AT91SAM9G20EK_2MMC
+ depends on MACH_AT91SAM9G20EK
+ bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots"
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
+ with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
+@@ -424,6 +432,7 @@ comment "AT91SAM9G45 Board Type"
+ config MACH_AT91SAM9M10G45EK
+ bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit.
+ "ES" at the end of the name means that this board is an
+@@ -439,6 +448,7 @@ comment "AT91SAM9x5 Series Board Type"
+
+ config MACH_AT91SAM9X5EK
+ bool "Atmel AT91SAM9x5 Series Evaluation Kit"
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you re using Atmel's AT91SAM9x5-EK Evaluation Kit.
+ Supported chips are sam9g15, sam9g25, sam9x25, sam9g35 and sam9x35.
+@@ -455,6 +465,7 @@ config MACH_AT91CAP9ADK
+ bool "Atmel AT91CAP9A-DK Evaluation Kit"
+ select HAVE_AT91_DATAFLASH_CARD
+ select HAVE_NAND_ATMEL_BUSWIDTH_16
++ select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+ help
+ Select this if you are using Atmel's AT91CAP9A-DK Evaluation Kit.
+ <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4138>
+@@ -511,6 +522,24 @@ config MTD_NAND_ATMEL_BUSWIDTH_16
+ On AT91SAM926x boards both types of NAND flash can be present
+ (8 and 16 bit data bus width).
+
++config MTD_NAND_ATMEL_ROOTFS_SIZE
++ int "Size NAND rootfs in MB"
++ range 8 250
++ depends on MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
++ default "124"
++ help
++ Many Atmel development boards has a NAND Flash,
++ divided into three partitions.
++ 1) Boot partition (4 MB)
++ 2) Root FS
++ 3) Data partition
++ This allows you to configure the size of the root fs
++ with the remainder ending up in the data partition.
++ The legal values are between 8 and 250
++
++config MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
++ bool
++
+ # ----------------------------------------------------------
+
+ comment "AT91 Feature Selections"
+diff --git a/arch/arm/mach-at91/board-at572d940hf_ek.c b/arch/arm/mach-at91/board-at572d940hf_ek.c
+index 3929f1c..d737aa8 100644
+--- a/arch/arm/mach-at91/board-at572d940hf_ek.c
++++ b/arch/arm/mach-at91/board-at572d940hf_ek.c
+@@ -115,22 +115,19 @@ static struct at91_eth_data __initdata eb_eth_data = {
+
+ static struct mtd_partition eb_nor_partitions[] = {
+ {
+- .name = "Raw Environment",
+- .offset = 0,
+- .size = SZ_4M,
+- .mask_flags = 0,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
+ },
+ {
+- .name = "OS FS",
+- .offset = MTDPART_OFS_APPEND,
+- .size = 3 * SZ_1M,
+- .mask_flags = 0,
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+ },
+ {
+- .name = "APP FS",
+- .offset = MTDPART_OFS_APPEND,
+- .size = MTDPART_SIZ_FULL,
+- .mask_flags = 0,
++ .name = "Data",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = MTDPART_SIZ_FULL,
+ },
+ };
+
+diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c
+index 017c7f4..7936339 100644
+--- a/arch/arm/mach-at91/board-cap9adk.c
++++ b/arch/arm/mach-at91/board-cap9adk.c
+@@ -169,8 +169,18 @@ static struct at91_eth_data __initdata cap9adk_macb_data = {
+ */
+ static struct mtd_partition __initdata cap9adk_nand_partitions[] = {
+ {
+- .name = "NAND partition",
+- .offset = 0,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
++ },
++ {
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
++ },
++ {
++ .name = "Data",
++ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+ };
+diff --git a/arch/arm/mach-at91/board-rm9200dk.c b/arch/arm/mach-at91/board-rm9200dk.c
+index 4c1047c..825996e 100644
+--- a/arch/arm/mach-at91/board-rm9200dk.c
++++ b/arch/arm/mach-at91/board-rm9200dk.c
+@@ -137,8 +137,18 @@ static struct i2c_board_info __initdata dk_i2c_devices[] = {
+
+ static struct mtd_partition __initdata dk_nand_partition[] = {
+ {
+- .name = "NAND Partition 1",
+- .offset = 0,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
++ },
++ {
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
++ },
++ {
++ .name = "Data",
++ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+ };
+diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c
+index de1816e..ec2a7ed 100644
+--- a/arch/arm/mach-at91/board-sam9260ek.c
++++ b/arch/arm/mach-at91/board-sam9260ek.c
+@@ -167,12 +167,17 @@ static struct at91_eth_data __initdata ek_macb_data = {
+ */
+ static struct mtd_partition __initdata ek_nand_partition[] = {
+ {
+- .name = "Partition 1",
+- .offset = 0,
+- .size = SZ_256K,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
+ },
+ {
+- .name = "Partition 2",
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
++ },
++ {
++ .name = "Data",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
+index b737e59..b28d900 100644
+--- a/arch/arm/mach-at91/board-sam9261ek.c
++++ b/arch/arm/mach-at91/board-sam9261ek.c
+@@ -174,12 +174,17 @@ static struct at91_udc_data __initdata ek_udc_data = {
+ */
+ static struct mtd_partition __initdata ek_nand_partition[] = {
+ {
+- .name = "Partition 1",
+- .offset = 0,
+- .size = SZ_256K,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
+ },
+ {
+- .name = "Partition 2",
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
++ },
++ {
++ .name = "Data",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
+index 3640554..279800e 100644
+--- a/arch/arm/mach-at91/board-sam9263ek.c
++++ b/arch/arm/mach-at91/board-sam9263ek.c
+@@ -175,12 +175,17 @@ static struct at91_eth_data __initdata ek_macb_data = {
+ */
+ static struct mtd_partition __initdata ek_nand_partition[] = {
+ {
+- .name = "Partition 1",
+- .offset = 0,
+- .size = SZ_64M,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
+ },
+ {
+- .name = "Partition 2",
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
++ },
++ {
++ .name = "Data",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c
+index ca8198b..7e110e1 100644
+--- a/arch/arm/mach-at91/board-sam9g20ek.c
++++ b/arch/arm/mach-at91/board-sam9g20ek.c
+@@ -151,12 +151,12 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
+ .size = 4 * SZ_1M,
+ },
+ {
+- .name = "Partition 1",
++ .name = "Root File System",
+ .offset = MTDPART_OFS_NXTBLK,
+- .size = 60 * SZ_1M,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+ },
+ {
+- .name = "Partition 2",
++ .name = "Data",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+diff --git a/arch/arm/mach-at91/board-sam9m10g45ek.c b/arch/arm/mach-at91/board-sam9m10g45ek.c
+index 6fb7ce9..5f0f6f5 100644
+--- a/arch/arm/mach-at91/board-sam9m10g45ek.c
++++ b/arch/arm/mach-at91/board-sam9m10g45ek.c
+@@ -135,12 +135,17 @@ static struct at91_eth_data __initdata ek_macb_data = {
+ */
+ static struct mtd_partition __initdata ek_nand_partition[] = {
+ {
+- .name = "Partition 1",
+- .offset = 0,
+- .size = SZ_64M,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
+ },
+ {
+- .name = "Partition 2",
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
++ },
++ {
++ .name = "Data",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c
+index 721186f..cd3dae4 100644
+--- a/arch/arm/mach-at91/board-sam9rlek.c
++++ b/arch/arm/mach-at91/board-sam9rlek.c
+@@ -84,12 +84,17 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
+ */
+ static struct mtd_partition __initdata ek_nand_partition[] = {
+ {
+- .name = "Partition 1",
+- .offset = 0,
+- .size = SZ_256K,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
+ },
+ {
+- .name = "Partition 2",
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
++ },
++ {
++ .name = "Data",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+diff --git a/arch/arm/mach-at91/board-sam9x5cm.c b/arch/arm/mach-at91/board-sam9x5cm.c
+index a5f8f3d..82797a0 100644
+--- a/arch/arm/mach-at91/board-sam9x5cm.c
++++ b/arch/arm/mach-at91/board-sam9x5cm.c
+@@ -110,12 +110,17 @@ static struct spi_board_info cm_spi_devices[] = {
+ */
+ static struct mtd_partition __initdata cm_nand_partition[] = {
+ {
+- .name = "Partition 1",
+- .offset = 0,
+- .size = SZ_64M,
++ .name = "Bootstrap",
++ .offset = 0,
++ .size = 4 * SZ_1M,
++ },
++ {
++ .name = "Root File System",
++ .offset = MTDPART_OFS_NXTBLK,
++ .size = CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+ },
+ {
+- .name = "Partition 2",
++ .name = "Data",
+ .offset = MTDPART_OFS_NXTBLK,
+ .size = MTDPART_SIZ_FULL,
+ },
+--
+1.7.5.4
+