[PATCH v6 12/13] ARM: OMAP2+: gpmc: update nand register info
Afzal Mohammed
afzal at ti.com
Fri Jun 22 08:57:41 EDT 2012
GPMC has dedicated NAND handling blocks and have a few
registers exclusively meant for NAND operations. These
registers can be handled by OMAP NAND driver as it is
meant for handling NAND on GPMC. Update OMAP NAND
platform data with GPMC-NAND register details so that
OMAP NAND driver can handle by itself instead of
relying on GPMC exported symbols.
Signed-off-by: Afzal Mohammed <afzal at ti.com>
---
arch/arm/mach-omap2/gpmc.c | 9 ++++++++-
arch/arm/plat-omap/include/plat/gpmc.h | 1 +
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 3729136..c8e967f 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -28,6 +28,7 @@
#include <asm/mach-types.h>
#include <plat/gpmc.h>
+#include <plat/nand.h>
#include <plat/omap_device.h>
#include <plat/sdrc.h>
@@ -1497,12 +1498,18 @@ static __devinit int gpmc_probe(struct platform_device *pdev)
gpmc_waitpin_nr = gp->waitpin_nr;
/* Traverse NULL terminated array of peripheral pointers and setup */
- for (gdq = gp->device_pdata, g_per = gpmc_peripheral; *gdq; gdq++)
+ for (gdq = gp->device_pdata, g_per = gpmc_peripheral; *gdq; gdq++) {
+ if ((*gdq)->is_nand) {
+ struct omap_nand_platform_data *p = (*gdq)->pdata;
+
+ gpmc_update_nand_reg(&p->reg, p->cs);
+ }
if (IS_ERR_VALUE(gpmc_setup_device(g_per, *gdq)))
dev_err(gpmc_dev, "gpmc setup on %s failed\n",
(*gdq)->name);
else
g_per++;
+ }
gpmc_num_peripheral = g_per - gpmc_peripheral;
for (l = 0, g_per = gpmc_peripheral;
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
index 7909867..0085a01 100644
--- a/arch/arm/plat-omap/include/plat/gpmc.h
+++ b/arch/arm/plat-omap/include/plat/gpmc.h
@@ -196,6 +196,7 @@ struct gpmc_device_pdata {
unsigned per_res_cnt;
struct gpmc_cs_data *cs_data;
unsigned num_cs;
+ bool is_nand;
};
struct gpmc_pdata {
--
1.7.10.2
More information about the linux-arm-kernel
mailing list