Skip to contentSkip to conversation

mmp: add nand support to mmp2

PATCH New Lei Wen 1 participant 1 message Jun 3, 2010

Subsystems (4)
lore
Share & tools
lore

Lei Wen

author
#0 lore raw

PATCH 15/25 mmp: add nand support to mmp2

---
 arch/arm/configs/mmp2_defconfig       |    4 +-
 arch/arm/mach-mmp/include/mach/mmp2.h |    6 ++++
 arch/arm/mach-mmp/jasper.c            |   52 +++++++++++++++++++++++++++++++++
 3 files changed, 60 insertions(+), 2 deletions(-)
arch/arm/configs/mmp2_defconfig +2 -2
index 4b55dcb..e63dec3 100644
@@ -469,7 +469,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
 #
 # User Modules And Translation Layers
 #
-# CONFIG_MTD_CHAR is not set
+CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLKDEVS=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
@@ -525,7 +525,7 @@ CONFIG_MTD_NAND=y
 # CONFIG_MTD_NAND_GPIO is not set
 CONFIG_MTD_NAND_IDS=y
 # CONFIG_MTD_NAND_DISKONCHIP is not set
-# CONFIG_MTD_NAND_PXA3xx is not set
+CONFIG_MTD_NAND_PXA3xx=y
 # CONFIG_MTD_NAND_NANDSIM is not set
 # CONFIG_MTD_NAND_PLATFORM is not set
 CONFIG_MTD_ONENAND=y
(quoted diff) +0 -0

b/arch/arm/mach-mmp/include/mach/mmp2.h
index fec220b..d68890b 100644

arch/arm/mach-mmp/include/mach/mmp2.h +2 -0
@@ -4,6 +4,7 @@
 #include <linux/i2c.h>
 #include <mach/devices.h>
 #include <plat/i2c.h>
+#include <plat/pxa3xx_nand.h>
 
 extern struct pxa_device_desc mmp2_device_uart1;
 extern struct pxa_device_desc mmp2_device_uart2;
@@ -15,6 +16,7 @@ extern struct pxa_device_desc mmp2_device_twsi3;
 extern struct pxa_device_desc mmp2_device_twsi4;
 extern struct pxa_device_desc mmp2_device_twsi5;
 extern struct pxa_device_desc mmp2_device_twsi6;
+extern struct pxa_device_desc mmp2_device_nand;
 
 static inline int mmp2_add_uart(int id)
 {
@@ -56,5 +58,9 @@ static inline int mmp2_add_twsi(int id, struct

i2c_pxa_platform_data *data,
return pxa_register_device(d, data, sizeof(*data));
}

+static inline int mmp2_add_nand(struct pxa3xx_nand_platform_data *data) +{
+ return pxa_register_device(&mmp2_device_nand, data, sizeof(*data));
+}
#endif /* __ASM_MACH_MMP2_H */

arch/arm/mach-mmp/jasper.c +52 -0

64 lines not on this page · raw message

Signature · 1 line
1.7.0.4