msm: nand: Add platform data and platform device for NAND
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Conflicts:
arch/arm/mach-msm/board-9615.c
arch/arm/mach-msm/devices-9615.c
diff --git a/arch/arm/mach-msm/board-9615.c b/arch/arm/mach-msm/board-9615.c
index d60b6ca..1901c03 100644
--- a/arch/arm/mach-msm/board-9615.c
+++ b/arch/arm/mach-msm/board-9615.c
@@ -33,6 +33,7 @@
&msm9615_device_qup_spi_gsbi3,
&msm_device_sps,
&msm9615_device_tsens,
+ &msm_device_nand,
};
static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = {
diff --git a/arch/arm/mach-msm/devices-9615.c b/arch/arm/mach-msm/devices-9615.c
index 4972585..5805ecd 100644
--- a/arch/arm/mach-msm/devices-9615.c
+++ b/arch/arm/mach-msm/devices-9615.c
@@ -17,6 +17,7 @@
#include <linux/io.h>
#include <linux/msm_tsens.h>
#include <asm/hardware/gic.h>
+#include <asm/mach/flash.h>
#include <mach/board.h>
#include <mach/msm_iomap.h>
#include <mach/irqs.h>
@@ -207,11 +208,42 @@
.tsens_num_sensor = 5,
};
-struct platform_device msm9615_device_tsens = {
+struct platform_device msm9615_device_tsens = {
.name = "tsens8960-tm",
.id = -1,
+ .dev = {
+ .platform_data = &msm_tsens_pdata,
+ },
+};
+
+#define MSM_NAND_PHYS 0x1B400000
+static struct resource resources_nand[] = {
+ [0] = {
+ .name = "msm_nand_dmac",
+ .start = DMOV_NAND_CHAN,
+ .end = DMOV_NAND_CHAN,
+ .flags = IORESOURCE_DMA,
+ },
+ [1] = {
+ .name = "msm_nand_phys",
+ .start = MSM_NAND_PHYS,
+ .end = MSM_NAND_PHYS + 0x7FF,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+struct flash_platform_data msm_nand_data = {
+ .parts = NULL,
+ .nr_parts = 0,
+};
+
+struct platform_device msm_device_nand = {
+ .name = "msm_nand",
+ .id = -1,
+ .num_resources = ARRAY_SIZE(resources_nand),
+ .resource = resources_nand,
.dev = {
- .platform_data = &msm_tsens_pdata,
+ .platform_data = &msm_nand_data,
},
};