]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: OMAP2+: onenand: connected soc info in pdata
authorAfzal Mohammed <afzal@ti.com>
Fri, 5 Oct 2012 06:09:54 +0000 (11:39 +0530)
committerAfzal Mohammed <afzal@ti.com>
Mon, 15 Oct 2012 09:11:59 +0000 (14:41 +0530)
onenand driver needs to know whether soc is falling under
34xx family to properly handle onenand. But driver is not
supposed to do cpu_is_* check, hence educate platform data
with this information. Driver can make use of it to avoid
cpu_is_* check.

Signed-off-by: Afzal Mohammed <afzal@ti.com>
arch/arm/mach-omap2/gpmc-onenand.c
include/linux/platform_data/mtd-onenand-omap2.h

index 06fd84657218ee512211d58508958140a8a67286..4a1c0b7ab4328917fdcd8616475745b4230f4a9c 100644 (file)
@@ -428,6 +428,11 @@ void __init gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
                gpmc_onenand_data->flags |= ONENAND_SYNC_READ;
        }
 
+       if (cpu_is_omap34xx())
+               gpmc_onenand_data->flags |= ONENAND_IN_OMAP34XX;
+       else
+               gpmc_onenand_data->flags &= ~ONENAND_IN_OMAP34XX;
+
        err = gpmc_cs_request(gpmc_onenand_data->cs, ONENAND_IO_SIZE,
                                (unsigned long *)&gpmc_onenand_resource.start);
        if (err < 0) {
index 21bb0ff4052eb694d5285974595e62faedb07b4d..ef9c60d4b29bc0a946e34bcd0fc457722869e1c7 100644 (file)
@@ -14,6 +14,7 @@
 
 #define ONENAND_SYNC_READ      (1 << 0)
 #define ONENAND_SYNC_READWRITE (1 << 1)
+#define        ONENAND_IN_OMAP34XX     (1 << 2)
 
 struct omap_onenand_platform_data {
        int                     cs;