aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorAfzal Mohammed <afzal@ti.com>2012-10-05 01:07:27 -0400
committerAfzal Mohammed <afzal@ti.com>2012-10-15 05:12:15 -0400
commit3ef5d0071cf6c8b9a00b559232bb700ad59999d7 (patch)
treea99f2f7184d414d44fccb648a71565cab2c670b3 /arch/arm/mach-omap2
parentc46406a3f28e4bc2139415db385b91ae756009c1 (diff)
ARM: OMAP2+: gpmc: localize gpmc header
Requirement of gpmc header outside of mach-omap2 has been cutoff, move gpmc header file in plat-omap folder to local mach-omap2 folder Objective - common zImage participation of omap Signed-off-by: Afzal Mohammed <afzal@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c2
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c2
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c2
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c2
-rw-r--r--arch/arm/mach-omap2/board-flash.c2
-rw-r--r--arch/arm/mach-omap2/board-flash.h2
-rw-r--r--arch/arm/mach-omap2/board-h4.c2
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c2
-rw-r--r--arch/arm/mach-omap2/board-ldp.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c2
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c2
-rw-r--r--arch/arm/mach-omap2/board-overo.c2
-rw-r--r--arch/arm/mach-omap2/board-rm680.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c3
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.h2
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c3
-rw-r--r--arch/arm/mach-omap2/gpmc-smc91x.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-smsc911x.c2
-rw-r--r--arch/arm/mach-omap2/gpmc.c3
-rw-r--r--arch/arm/mach-omap2/gpmc.h135
-rw-r--r--arch/arm/mach-omap2/pm34xx.c2
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c2
29 files changed, 163 insertions, 31 deletions
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 95b384d54f8a..49e49d0b7cf5 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -34,7 +34,7 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35 35
36#include "common.h" 36#include "common.h"
37#include <plat/gpmc.h> 37#include "gpmc.h"
38#include <plat/usb.h> 38#include <plat/usb.h>
39#include "gpmc-smc91x.h" 39#include "gpmc-smc91x.h"
40 40
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 96cd3693e1ae..5ad0901fddb4 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -33,7 +33,7 @@
33#include <plat/usb.h> 33#include <plat/usb.h>
34#include "common.h" 34#include "common.h"
35#include <plat/dma.h> 35#include <plat/dma.h>
36#include <plat/gpmc.h> 36#include "gpmc.h"
37#include <video/omapdss.h> 37#include <video/omapdss.h>
38#include <video/omap-panel-tfp410.h> 38#include <video/omap-panel-tfp410.h>
39 39
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index cea3abace815..8cdd18699de6 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -35,7 +35,7 @@
35 35
36#include <plat/led.h> 36#include <plat/led.h>
37#include "common.h" 37#include "common.h"
38#include <plat/gpmc.h> 38#include "gpmc.h"
39 39
40#include <video/omapdss.h> 40#include <video/omapdss.h>
41#include <video/omap-panel-generic-dpi.h> 41#include <video/omap-panel-generic-dpi.h>
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index fef68de716b5..73e2ba9b343b 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -40,7 +40,7 @@
40 40
41#include "common.h" 41#include "common.h"
42#include <linux/platform_data/mtd-nand-omap2.h> 42#include <linux/platform_data/mtd-nand-omap2.h>
43#include <plat/gpmc.h> 43#include "gpmc.h"
44#include <plat/usb.h> 44#include <plat/usb.h>
45#include <video/omapdss.h> 45#include <video/omapdss.h>
46#include <video/omap-panel-generic-dpi.h> 46#include <video/omap-panel-generic-dpi.h>
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index 3a19e80e0005..b5495e415024 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -41,7 +41,7 @@
41#include "common.h" 41#include "common.h"
42#include <plat/usb.h> 42#include <plat/usb.h>
43#include <linux/platform_data/mtd-nand-omap2.h> 43#include <linux/platform_data/mtd-nand-omap2.h>
44#include <plat/gpmc.h> 44#include "gpmc.h"
45 45
46#include "am35xx.h" 46#include "am35xx.h"
47 47
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 99339666d2d3..3eedb8fd0370 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -39,7 +39,7 @@
39#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
40 40
41#include "common.h" 41#include "common.h"
42#include <plat/gpmc.h> 42#include "gpmc.h"
43#include <linux/platform_data/mtd-nand-omap2.h> 43#include <linux/platform_data/mtd-nand-omap2.h>
44#include <plat/usb.h> 44#include <plat/usb.h>
45#include <video/omapdss.h> 45#include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index ba9fa86a10aa..020b96b91f73 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -18,7 +18,7 @@
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <plat/cpu.h> 20#include <plat/cpu.h>
21#include <plat/gpmc.h> 21#include "gpmc.h"
22#include <linux/platform_data/mtd-nand-omap2.h> 22#include <linux/platform_data/mtd-nand-omap2.h>
23#include <linux/platform_data/mtd-onenand-omap2.h> 23#include <linux/platform_data/mtd-onenand-omap2.h>
24#include <plat/tc.h> 24#include <plat/tc.h>
diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h
index a3aa5fca4495..2fb5d41a9fae 100644
--- a/arch/arm/mach-omap2/board-flash.h
+++ b/arch/arm/mach-omap2/board-flash.h
@@ -12,7 +12,7 @@
12 */ 12 */
13#include <linux/mtd/mtd.h> 13#include <linux/mtd/mtd.h>
14#include <linux/mtd/partitions.h> 14#include <linux/mtd/partitions.h>
15#include <plat/gpmc.h> 15#include "gpmc.h"
16 16
17#define PDC_NOR 1 17#define PDC_NOR 1
18#define PDC_NAND 2 18#define PDC_NAND 2
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 8d04bf851af4..65ebf58e66e2 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -33,7 +33,6 @@
33 33
34#include <plat/menelaus.h> 34#include <plat/menelaus.h>
35#include <plat/dma.h> 35#include <plat/dma.h>
36#include <plat/gpmc.h>
37#include "debug-devices.h" 36#include "debug-devices.h"
38 37
39#include <video/omapdss.h> 38#include <video/omapdss.h>
@@ -42,6 +41,7 @@
42#include "common.h" 41#include "common.h"
43#include "mux.h" 42#include "mux.h"
44#include "control.h" 43#include "control.h"
44#include "gpmc.h"
45 45
46#define H4_FLASH_CS 0 46#define H4_FLASH_CS 0
47#define H4_SMC91X_CS 1 47#define H4_SMC91X_CS 1
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 83c6efaf4226..9a9a9b5f78b6 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -30,7 +30,7 @@
30#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
31 31
32#include "common.h" 32#include "common.h"
33#include <plat/gpmc.h> 33#include "gpmc.h"
34#include <plat/usb.h> 34#include <plat/usb.h>
35 35
36#include <video/omapdss.h> 36#include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 83383f39e674..e1628cd25ab4 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -35,7 +35,7 @@
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include "common.h" 37#include "common.h"
38#include <plat/gpmc.h> 38#include "gpmc.h"
39#include <mach/board-zoom.h> 39#include <mach/board-zoom.h>
40#include <plat/usb.h> 40#include <plat/usb.h>
41#include "gpmc-smsc911x.h" 41#include "gpmc-smsc911x.h"
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 43b5f797e712..f11a5eb595f7 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -41,7 +41,7 @@
41#include "common.h" 41#include "common.h"
42#include <video/omapdss.h> 42#include <video/omapdss.h>
43#include <video/omap-panel-tfp410.h> 43#include <video/omap-panel-tfp410.h>
44#include <plat/gpmc.h> 44#include "gpmc.h"
45#include <linux/platform_data/mtd-nand-omap2.h> 45#include <linux/platform_data/mtd-nand-omap2.h>
46#include <plat/usb.h> 46#include <plat/usb.h>
47#include <plat/omap_device.h> 47#include <plat/omap_device.h>
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 7bd8253b5d1d..5cfade235bb4 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -35,7 +35,7 @@
35#include <asm/mach/map.h> 35#include <asm/mach/map.h>
36 36
37#include "gpmc-smsc911x.h" 37#include "gpmc-smsc911x.h"
38#include <plat/gpmc.h> 38#include "gpmc.h"
39#include <plat/sdrc.h> 39#include <plat/sdrc.h>
40#include <plat/usb.h> 40#include <plat/usb.h>
41 41
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 731235eb319e..3c83b9fbff45 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -40,7 +40,7 @@
40#include <asm/mach/flash.h> 40#include <asm/mach/flash.h>
41 41
42#include "common.h" 42#include "common.h"
43#include <plat/gpmc.h> 43#include "gpmc.h"
44#include <linux/platform_data/mtd-nand-omap2.h> 44#include <linux/platform_data/mtd-nand-omap2.h>
45#include <plat/usb.h> 45#include <plat/usb.h>
46#include <video/omapdss.h> 46#include <video/omapdss.h>
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 3f013c8511ee..cd282ae0856b 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -44,7 +44,7 @@
44#include <asm/system_info.h> 44#include <asm/system_info.h>
45 45
46#include "common.h" 46#include "common.h"
47#include <plat/gpmc.h> 47#include "gpmc.h"
48#include <linux/platform_data/mtd-nand-omap2.h> 48#include <linux/platform_data/mtd-nand-omap2.h>
49#include <plat/usb.h> 49#include <plat/usb.h>
50 50
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index e2cf0f768ddd..3a9d1fa8bebd 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -49,7 +49,7 @@
49#include <video/omapdss.h> 49#include <video/omapdss.h>
50#include <video/omap-panel-generic-dpi.h> 50#include <video/omap-panel-generic-dpi.h>
51#include <video/omap-panel-tfp410.h> 51#include <video/omap-panel-tfp410.h>
52#include <plat/gpmc.h> 52#include "gpmc.h"
53#include <plat/usb.h> 53#include <plat/usb.h>
54 54
55#include "mux.h" 55#include "mux.h"
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 154cf337c0c7..3c3a47317f8f 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -25,7 +25,7 @@
25#include <plat/i2c.h> 25#include <plat/i2c.h>
26#include <plat/mmc.h> 26#include <plat/mmc.h>
27#include <plat/usb.h> 27#include <plat/usb.h>
28#include <plat/gpmc.h> 28#include "gpmc.h"
29#include "common.h" 29#include "common.h"
30#include <plat/serial.h> 30#include <plat/serial.h>
31 31
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 45760044b2bd..42b6056decae 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -32,7 +32,7 @@
32 32
33#include "common.h" 33#include "common.h"
34#include <plat/dma.h> 34#include <plat/dma.h>
35#include <plat/gpmc.h> 35#include "gpmc.h"
36#include <plat/omap-pm.h> 36#include <plat/omap-pm.h>
37#include "gpmc-smc91x.h" 37#include "gpmc-smc91x.h"
38 38
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index 7bbb05d9689b..88ba5be475b7 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -25,7 +25,7 @@
25 25
26#include "common.h" 26#include "common.h"
27#include <plat/dma.h> 27#include <plat/dma.h>
28#include <plat/gpmc.h> 28#include "gpmc.h"
29#include <plat/usb.h> 29#include <plat/usb.h>
30 30
31#include "mux.h" 31#include "mux.h"
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index afb2278a29f6..be9f71d436bf 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -17,7 +17,7 @@
17#include <linux/regulator/fixed.h> 17#include <linux/regulator/fixed.h>
18#include <linux/regulator/machine.h> 18#include <linux/regulator/machine.h>
19 19
20#include <plat/gpmc.h> 20#include "gpmc.h"
21#include "gpmc-smsc911x.h" 21#include "gpmc-smsc911x.h"
22 22
23#include <mach/board-zoom.h> 23#include <mach/board-zoom.h>
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index e89a36c8143b..8607735b3ab3 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -17,8 +17,7 @@
17 17
18#include <asm/mach/flash.h> 18#include <asm/mach/flash.h>
19 19
20#include <plat/gpmc.h> 20#include "gpmc.h"
21
22#include "soc.h" 21#include "soc.h"
23#include "gpmc-nand.h" 22#include "gpmc-nand.h"
24 23
diff --git a/arch/arm/mach-omap2/gpmc-nand.h b/arch/arm/mach-omap2/gpmc-nand.h
index 11a377f0e6f0..d59e1281e851 100644
--- a/arch/arm/mach-omap2/gpmc-nand.h
+++ b/arch/arm/mach-omap2/gpmc-nand.h
@@ -10,7 +10,7 @@
10#ifndef __OMAP2_GPMC_NAND_H 10#ifndef __OMAP2_GPMC_NAND_H
11#define __OMAP2_GPMC_NAND_H 11#define __OMAP2_GPMC_NAND_H
12 12
13#include <plat/gpmc.h> 13#include "gpmc.h"
14#include <linux/platform_data/mtd-nand-omap2.h> 14#include <linux/platform_data/mtd-nand-omap2.h>
15 15
16#if IS_ENABLED(CONFIG_MTD_NAND_OMAP2) 16#if IS_ENABLED(CONFIG_MTD_NAND_OMAP2)
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index f318f11da2fa..d102183ed9a5 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -20,8 +20,7 @@
20 20
21#include <asm/mach/flash.h> 21#include <asm/mach/flash.h>
22 22
23#include <plat/gpmc.h> 23#include "gpmc.h"
24
25#include "soc.h" 24#include "soc.h"
26#include "gpmc-onenand.h" 25#include "gpmc-onenand.h"
27 26
diff --git a/arch/arm/mach-omap2/gpmc-smc91x.c b/arch/arm/mach-omap2/gpmc-smc91x.c
index 565475310374..6eed907d594c 100644
--- a/arch/arm/mach-omap2/gpmc-smc91x.c
+++ b/arch/arm/mach-omap2/gpmc-smc91x.c
@@ -17,7 +17,7 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/smc91x.h> 18#include <linux/smc91x.h>
19 19
20#include <plat/gpmc.h> 20#include "gpmc.h"
21#include "gpmc-smc91x.h" 21#include "gpmc-smc91x.h"
22 22
23#include "soc.h" 23#include "soc.h"
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c
index 249a0b440cd6..ef990118d32b 100644
--- a/arch/arm/mach-omap2/gpmc-smsc911x.c
+++ b/arch/arm/mach-omap2/gpmc-smsc911x.c
@@ -20,7 +20,7 @@
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/smsc911x.h> 21#include <linux/smsc911x.h>
22 22
23#include <plat/gpmc.h> 23#include "gpmc.h"
24#include "gpmc-smsc911x.h" 24#include "gpmc-smsc911x.h"
25 25
26static struct resource gpmc_smsc911x_resources[] = { 26static struct resource gpmc_smsc911x_resources[] = {
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 05aca39f52cb..f14bd3f55218 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -29,15 +29,14 @@
29#include <linux/platform_data/mtd-nand-omap2.h> 29#include <linux/platform_data/mtd-nand-omap2.h>
30 30
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <plat/gpmc.h>
33 32
34#include <plat/cpu.h> 33#include <plat/cpu.h>
35#include <plat/gpmc.h>
36#include <plat/sdrc.h> 34#include <plat/sdrc.h>
37#include <plat/omap_device.h> 35#include <plat/omap_device.h>
38 36
39#include "soc.h" 37#include "soc.h"
40#include "common.h" 38#include "common.h"
39#include "gpmc.h"
41 40
42#define DEVICE_NAME "omap-gpmc" 41#define DEVICE_NAME "omap-gpmc"
43 42
diff --git a/arch/arm/mach-omap2/gpmc.h b/arch/arm/mach-omap2/gpmc.h
new file mode 100644
index 000000000000..79f4dfc2adb3
--- /dev/null
+++ b/arch/arm/mach-omap2/gpmc.h
@@ -0,0 +1,135 @@
1/*
2 * General-Purpose Memory Controller for OMAP2
3 *
4 * Copyright (C) 2005-2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __OMAP2_GPMC_H
12#define __OMAP2_GPMC_H
13
14#include <linux/platform_data/mtd-nand-omap2.h>
15
16/* Maximum Number of Chip Selects */
17#define GPMC_CS_NUM 8
18
19#define GPMC_CS_CONFIG1 0x00
20#define GPMC_CS_CONFIG2 0x04
21#define GPMC_CS_CONFIG3 0x08
22#define GPMC_CS_CONFIG4 0x0c
23#define GPMC_CS_CONFIG5 0x10
24#define GPMC_CS_CONFIG6 0x14
25#define GPMC_CS_CONFIG7 0x18
26#define GPMC_CS_NAND_COMMAND 0x1c
27#define GPMC_CS_NAND_ADDRESS 0x20
28#define GPMC_CS_NAND_DATA 0x24
29
30/* Control Commands */
31#define GPMC_CONFIG_RDY_BSY 0x00000001
32#define GPMC_CONFIG_DEV_SIZE 0x00000002
33#define GPMC_CONFIG_DEV_TYPE 0x00000003
34#define GPMC_SET_IRQ_STATUS 0x00000004
35#define GPMC_CONFIG_WP 0x00000005
36
37#define GPMC_ENABLE_IRQ 0x0000000d
38
39/* ECC commands */
40#define GPMC_ECC_READ 0 /* Reset Hardware ECC for read */
41#define GPMC_ECC_WRITE 1 /* Reset Hardware ECC for write */
42#define GPMC_ECC_READSYN 2 /* Reset before syndrom is read back */
43
44#define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31)
45#define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 30)
46#define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29)
47#define GPMC_CONFIG1_READTYPE_SYNC (1 << 29)
48#define GPMC_CONFIG1_WRITEMULTIPLE_SUPP (1 << 28)
49#define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27)
50#define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27)
51#define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25)
52#define GPMC_CONFIG1_PAGE_LEN(val) ((val & 3) << 23)
53#define GPMC_CONFIG1_WAIT_READ_MON (1 << 22)
54#define GPMC_CONFIG1_WAIT_WRITE_MON (1 << 21)
55#define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18)
56#define GPMC_CONFIG1_WAIT_PIN_SEL(val) ((val & 3) << 16)
57#define GPMC_CONFIG1_DEVICESIZE(val) ((val & 3) << 12)
58#define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1)
59#define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10)
60#define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0)
61#define GPMC_CONFIG1_MUXADDDATA (1 << 9)
62#define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4)
63#define GPMC_CONFIG1_FCLK_DIV(val) (val & 3)
64#define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1))
65#define GPMC_CONFIG1_FCLK_DIV3 (GPMC_CONFIG1_FCLK_DIV(2))
66#define GPMC_CONFIG1_FCLK_DIV4 (GPMC_CONFIG1_FCLK_DIV(3))
67#define GPMC_CONFIG7_CSVALID (1 << 6)
68
69#define GPMC_DEVICETYPE_NOR 0
70#define GPMC_DEVICETYPE_NAND 2
71#define GPMC_CONFIG_WRITEPROTECT 0x00000010
72#define WR_RD_PIN_MONITORING 0x00600000
73#define GPMC_IRQ_FIFOEVENTENABLE 0x01
74#define GPMC_IRQ_COUNT_EVENT 0x02
75
76
77/*
78 * Note that all values in this struct are in nanoseconds except sync_clk
79 * (which is in picoseconds), while the register values are in gpmc_fck cycles.
80 */
81struct gpmc_timings {
82 /* Minimum clock period for synchronous mode (in picoseconds) */
83 u32 sync_clk;
84
85 /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */
86 u16 cs_on; /* Assertion time */
87 u16 cs_rd_off; /* Read deassertion time */
88 u16 cs_wr_off; /* Write deassertion time */
89
90 /* ADV signal timings corresponding to GPMC_CONFIG3 */
91 u16 adv_on; /* Assertion time */
92 u16 adv_rd_off; /* Read deassertion time */
93 u16 adv_wr_off; /* Write deassertion time */
94
95 /* WE signals timings corresponding to GPMC_CONFIG4 */
96 u16 we_on; /* WE assertion time */
97 u16 we_off; /* WE deassertion time */
98
99 /* OE signals timings corresponding to GPMC_CONFIG4 */
100 u16 oe_on; /* OE assertion time */
101 u16 oe_off; /* OE deassertion time */
102
103 /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */
104 u16 page_burst_access; /* Multiple access word delay */
105 u16 access; /* Start-cycle to first data valid delay */
106 u16 rd_cycle; /* Total read cycle time */
107 u16 wr_cycle; /* Total write cycle time */
108
109 /* The following are only on OMAP3430 */
110 u16 wr_access; /* WRACCESSTIME */
111 u16 wr_data_mux_bus; /* WRDATAONADMUXBUS */
112};
113
114extern void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs);
115extern int gpmc_get_client_irq(unsigned irq_config);
116
117extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
118extern unsigned int gpmc_ps_to_ticks(unsigned int time_ps);
119extern unsigned int gpmc_ticks_to_ns(unsigned int ticks);
120extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);
121extern unsigned long gpmc_get_fclk_period(void);
122
123extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
124extern u32 gpmc_cs_read_reg(int cs, int idx);
125extern int gpmc_calc_divider(unsigned int sync_clk);
126extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
127extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
128extern void gpmc_cs_free(int cs);
129extern int gpmc_cs_set_reserved(int cs, int reserved);
130extern int gpmc_cs_reserved(int cs);
131extern void omap3_gpmc_save_context(void);
132extern void omap3_gpmc_restore_context(void);
133extern int gpmc_cs_configure(int cs, int cmd, int wval);
134
135#endif
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index ba670db1fd37..ed98f4f9e667 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -40,7 +40,7 @@
40#include "powerdomain.h" 40#include "powerdomain.h"
41#include <plat/sdrc.h> 41#include <plat/sdrc.h>
42#include <plat/prcm.h> 42#include <plat/prcm.h>
43#include <plat/gpmc.h> 43#include "gpmc.h"
44#include <plat/dma.h> 44#include <plat/dma.h>
45 45
46#include "common.h" 46#include "common.h"
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 805bea6edf17..6064425ed47b 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -18,7 +18,7 @@
18 18
19#include <linux/usb/musb.h> 19#include <linux/usb/musb.h>
20 20
21#include <plat/gpmc.h> 21#include "gpmc.h"
22 22
23#include "mux.h" 23#include "mux.h"
24 24