Skip to contentSkip to conversation

mx25: NAND support

PATCH New Baruch Siach 2 participants 7 messages Jan 14, 2010 – Jan 21, 2010

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover mx25: NAND support

This patch series add support for NAND chips on the i.MX25 platform, using the recently merged support for this platform in the mxc_nand driver.

I tested this code on the i.MX25 PDK platform.

Baruch Siach (3):
mtd: mxc_nand: add MX25 to Kconfig
mx25: add NAND support
mx25pdk: add NAND device support

 arch/arm/mach-mx25/devices.c          |   20 ++++++++++++++++++++
 arch/arm/mach-mx25/devices.h          |    1 +
 arch/arm/mach-mx25/mx25pdk.c          |    7 +++++++
 arch/arm/plat-mxc/include/mach/mx25.h |    2 ++
 drivers/mtd/nand/Kconfig              |    2 +-
 5 files changed, 31 insertions(+), 1 deletions(-)
#1 lore raw

PATCH 1/3 mtd: mxc_nand: add MX25 to Kconfig

---
 drivers/mtd/nand/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/Kconfig +1 -1
index 677cd53..4f99274 100644
@@ -444,7 +444,7 @@ config MTD_NAND_FSL_UPM
 
 config MTD_NAND_MXC
 	tristate "MXC NAND support"
-	depends on ARCH_MX2 || ARCH_MX3
+	depends on ARCH_MX2 || ARCH_MX25 || ARCH_MX3
 	help
 	  This enables the driver for the NAND flash controller on the
 	  MXC processors.
Signature · 1 line
1.6.5
#2 lore raw

PATCH 2/3 mx25: add NAND support

In reply to Baruch Siach
---
 arch/arm/mach-mx25/devices.c          |   20 ++++++++++++++++++++
 arch/arm/mach-mx25/devices.h          |    1 +
 arch/arm/plat-mxc/include/mach/mx25.h |    2 ++
 3 files changed, 23 insertions(+), 0 deletions(-)
arch/arm/mach-mx25/devices.c +20 -0
index 9fdeea1..dd40697 100644
@@ -438,3 +438,23 @@ struct platform_device mx25_fec_device = {
 	.num_resources	= ARRAY_SIZE(mx25_fec_resources),
 	.resource	= mx25_fec_resources,
 };
+
+static struct resource mxc_nand_resources[] = {
+	{
+		.start	= MX25_NFC_BASE_ADDR,
+		.end	= MX25_NFC_BASE_ADDR + 0x1fff,
+		.flags	= IORESOURCE_MEM,
+	},
+	{
+		.start	= MX25_INT_NANDFC,
+		.end	= MX25_INT_NANDFC,
+		.flags	= IORESOURCE_IRQ,
+	},
+};
+
+struct platform_device mxc_nand_device = {
+	.name		= "mxc_nand",
+	.id		= 0,
+	.num_resources	= ARRAY_SIZE(mxc_nand_resources),
+	.resource	= mxc_nand_resources,
+};
arch/arm/mach-mx25/devices.h +1 -0
index fe5420f..8f55300 100644
@@ -18,3 +18,4 @@ extern struct platform_device mxc_i2c_device0;
 extern struct platform_device mxc_i2c_device1;
 extern struct platform_device mxc_i2c_device2;
 extern struct platform_device mx25_fec_device;
+extern struct platform_device mxc_nand_device;
arch/arm/plat-mxc/include/mach/mx25.h +2 -0
index 854e2dc..58e0bd3 100644
@@ -42,7 +42,9 @@
 #define UART2_BASE_ADDR			0x43f94000
 
 #define MX25_FEC_BASE_ADDR		0x50038000
+#define MX25_NFC_BASE_ADDR		0xbb000000
 
 #define MX25_INT_FEC	57
+#define MX25_INT_NANDFC	33
 
 #endif /* __MACH_MX25_H__ */
Signature · 1 line
1.6.5
#3 lore raw

PATCH 3/3 mx25pdk: add NAND device support

In reply to Baruch Siach
---
 arch/arm/mach-mx25/mx25pdk.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/mach-mx25/mx25pdk.c +7 -0
index 921bc99..c8b1d3b 100644
@@ -77,6 +77,12 @@ static void __init mx25pdk_fec_reset(void)
 	gpio_set_value(FEC_RESET_B_GPIO, 1);
 }
 
+static struct mxc_nand_platform_data mx25pdk_nand_board_info = {
+	.width		= 1,
+	.hw_ecc		= 1,
+	.flash_bbt	= 1,
+};
+
 static void __init mx25pdk_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads,
@@ -84,6 +90,7 @@ static void __init mx25pdk_init(void)
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
 	mxc_register_device(&mxc_usbh2, NULL);
+	mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info);
 
 	mx25pdk_fec_reset();
 	mxc_register_device(&mx25_fec_device, &mx25_fec_pdata);
Signature · 1 line
1.6.5
maintainer
#4 lore raw

cover mx25: NAND support

In reply to Baruch Siach
Quoted 9 lines · Baruch Siach

This patch series add support for NAND chips on the i.MX25 platform, using the recently merged support for this platform in the mxc_nand driver.

I tested this code on the i.MX25 PDK platform.

Baruch Siach (3):
mtd: mxc_nand: add MX25 to Kconfig
mx25: add NAND support
mx25pdk: add NAND device support

Ok, added to mxc-master.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#5 lore raw

cover mx25: NAND support

Hi Sascha,

Quoted 4 lines · Sascha Hauer
Quoted 3 lines · Baruch Siach

This patch series add support for NAND chips on the i.MX25 platform, using the recently merged support for this platform in the mxc_nand driver.

Quoted 8 lines
Quoted 6 lines

I tested this code on the i.MX25 PDK platform.

Baruch Siach (3):
mtd: mxc_nand: add MX25 to Kconfig
mx25: add NAND support
mx25pdk: add NAND device support

Ok, added to mxc-master.

Should these patches be visible in the mxc-master of the imx/linux-2.6.git tree? I don't see them there.

baruch

Signature · 3 lines
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
maintainer
#6 lore raw

cover mx25: NAND support

Quoted 14 lines · Baruch Siach

Hi Sascha,

Quoted 11 lines · Sascha Hauer
Quoted 9 lines · Baruch Siach

This patch series add support for NAND chips on the i.MX25 platform, using the recently merged support for this platform in the mxc_nand driver.

I tested this code on the i.MX25 PDK platform.

Baruch Siach (3):
mtd: mxc_nand: add MX25 to Kconfig
mx25: add NAND support
mx25pdk: add NAND device support

Quoted 4 lines
Quoted 1 line

Ok, added to mxc-master.

Should these patches be visible in the mxc-master of the imx/linux-2.6.git tree? I don't see them there.

I forgot to push. Try again please.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |