]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ARM: OMAP2+: gpmc: localize gpmc header
authorAfzal Mohammed <afzal@ti.com>
Fri, 5 Oct 2012 05:07:27 +0000 (10:37 +0530)
committerAfzal Mohammed <afzal@ti.com>
Mon, 15 Oct 2012 09:12:15 +0000 (14:42 +0530)
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>
30 files changed:
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-flash.c
arch/arm/mach-omap2/board-flash.h
arch/arm/mach-omap2/board-h4.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-rx51.c
arch/arm/mach-omap2/board-zoom-debugboard.c
arch/arm/mach-omap2/gpmc-nand.c
arch/arm/mach-omap2/gpmc-nand.h
arch/arm/mach-omap2/gpmc-onenand.c
arch/arm/mach-omap2/gpmc-smc91x.c
arch/arm/mach-omap2/gpmc-smsc911x.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/gpmc.h [new file with mode: 0644]
arch/arm/mach-omap2/pm34xx.c
arch/arm/mach-omap2/usb-tusb6010.c
arch/arm/plat-omap/include/plat/gpmc.h [deleted file]

index 95b384d54f8aa847ff2c07b0cb33d3c94a2b1e64..49e49d0b7cf5a8dc7ce7d308762cf3143f532a5a 100644 (file)
@@ -34,7 +34,7 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/usb.h>
 #include "gpmc-smc91x.h"
 
index 96cd3693e1ae9990c621f8f44778775e1e2008cc..5ad0901fddb4283b9fc71988c7af49b5b797a519 100644 (file)
@@ -33,7 +33,7 @@
 #include <plat/usb.h>
 #include "common.h"
 #include <plat/dma.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <video/omapdss.h>
 #include <video/omap-panel-tfp410.h>
 
index cea3abace815716b4fea93aa1e9aae1c61238740..8cdd18699de6fa0e63b574c3ad9d261d9a2f44bb 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <plat/led.h>
 #include "common.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
index fef68de716b5d108857e6d978ccc63df1b9ad8ba..73e2ba9b343ba41b1c7ac74bb57d6cd182a37a3c 100644 (file)
@@ -40,7 +40,7 @@
 
 #include "common.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/usb.h>
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
index 3a19e80e0005b8c071dbb6c664ddc6e63e1a49f0..b5495e41502469bfc662bed017d6400553682f1f 100644 (file)
@@ -41,7 +41,7 @@
 #include "common.h"
 #include <plat/usb.h>
 #include <linux/platform_data/mtd-nand-omap2.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 
 #include "am35xx.h"
 
index 99339666d2d355ba80f427d2213923408bcde4d9..3eedb8fd037040ba806dcb7120547e563d6f1c24 100644 (file)
@@ -39,7 +39,7 @@
 #include <asm/mach/flash.h>
 
 #include "common.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <plat/usb.h>
 #include <video/omapdss.h>
index ba9fa86a10aa225cb59738036402ee61527894a7..020b96b91f7346b60afa2ee85528d41f172419ad 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/io.h>
 
 #include <plat/cpu.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <linux/platform_data/mtd-onenand-omap2.h>
 #include <plat/tc.h>
index a3aa5fca44957bcda19dbe7d76474aa40006a4d5..2fb5d41a9fae2679781a9c759913a032b1a69e9e 100644 (file)
@@ -12,7 +12,7 @@
  */
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 
 #define PDC_NOR                1
 #define PDC_NAND       2
index 8d04bf851af44e36568f4824a0d3cbb84760d566..65ebf58e66e254983ceb1d7b8e7583944bd1d50c 100644 (file)
@@ -33,7 +33,6 @@
 
 #include <plat/menelaus.h>
 #include <plat/dma.h>
-#include <plat/gpmc.h>
 #include "debug-devices.h"
 
 #include <video/omapdss.h>
@@ -42,6 +41,7 @@
 #include "common.h"
 #include "mux.h"
 #include "control.h"
+#include "gpmc.h"
 
 #define H4_FLASH_CS    0
 #define H4_SMC91X_CS   1
index 83c6efaf4226b23323541edaa762ebbfd6b2f520..9a9a9b5f78b6362cdea5347a0e035d8f69749cf7 100644 (file)
@@ -30,7 +30,7 @@
 #include <asm/mach/arch.h>
 
 #include "common.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/usb.h>
 
 #include <video/omapdss.h>
index 83383f39e674f51abdc19e8aef5bf7039ed1d4e7..e1628cd25ab4111bfcc2afe49841e0f5be7bf486 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/mach/map.h>
 
 #include "common.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <mach/board-zoom.h>
 #include <plat/usb.h>
 #include "gpmc-smsc911x.h"
index 43b5f797e712b6045a8752b3c27530116b0607af..f11a5eb595f7872cc16f770ece5f024141a77a6c 100644 (file)
@@ -41,7 +41,7 @@
 #include "common.h"
 #include <video/omapdss.h>
 #include <video/omap-panel-tfp410.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <plat/usb.h>
 #include <plat/omap_device.h>
index 7bd8253b5d1d61613ac6ad2e702a4efea26e5787..5cfade235bb468ed8ceb08f4e694f71c131fe461 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/mach/map.h>
 
 #include "gpmc-smsc911x.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/sdrc.h>
 #include <plat/usb.h>
 
index 731235eb319e7456c10a20d2405d4d54bf5cff5d..3c83b9fbff4558f65cb5575b510b53899c149086 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/mach/flash.h>
 
 #include "common.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <plat/usb.h>
 #include <video/omapdss.h>
index 3f013c8511ee41247080b0b34130fd1a839c1c60..cd282ae0856b619933474fc68a179aa319062f58 100644 (file)
@@ -44,7 +44,7 @@
 #include <asm/system_info.h>
 
 #include "common.h"
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
 #include <plat/usb.h>
 
index e2cf0f768dddbcf473d46c817b1fc21b7fc63b53..3a9d1fa8bebdcac42ff3870450ffe9a52e4c11e4 100644 (file)
@@ -49,7 +49,7 @@
 #include <video/omapdss.h>
 #include <video/omap-panel-generic-dpi.h>
 #include <video/omap-panel-tfp410.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/usb.h>
 
 #include "mux.h"
index 154cf337c0c7983dfa5f0aa47be8a7d944729e09..3c3a47317f8f5ddf3c6708d7e8adaf4cc703623a 100644 (file)
@@ -25,7 +25,7 @@
 #include <plat/i2c.h>
 #include <plat/mmc.h>
 #include <plat/usb.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include "common.h"
 #include <plat/serial.h>
 
index 45760044b2bdcede40f68229bb58601b720c85cd..42b6056decaead849efc89d93802ad4a99016ace 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "common.h"
 #include <plat/dma.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/omap-pm.h>
 #include "gpmc-smc91x.h"
 
index 7bbb05d9689b806534b6b83bed6b1a2c6e1dd9cb..88ba5be475b73b927363e33a13c008b95e5ef688 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "common.h"
 #include <plat/dma.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/usb.h>
 
 #include "mux.h"
index afb2278a29f6456c07f7c2d06b0c7a07d5957ca1..be9f71d436bf26447a760f9d459222ba1b3cab35 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/machine.h>
 
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include "gpmc-smsc911x.h"
 
 #include <mach/board-zoom.h>
index e89a36c8143b0432bec11a6ee326a0fbb1c48f2e..8607735b3ab3c96b8a6fecf25066843a47aaee57 100644 (file)
@@ -17,8 +17,7 @@
 
 #include <asm/mach/flash.h>
 
-#include <plat/gpmc.h>
-
+#include "gpmc.h"
 #include "soc.h"
 #include "gpmc-nand.h"
 
index 11a377f0e6f0420952330e57056aebb252187266..d59e1281e8517c9c951f3bd7a405e0705388e54f 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef        __OMAP2_GPMC_NAND_H
 #define        __OMAP2_GPMC_NAND_H
 
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <linux/platform_data/mtd-nand-omap2.h>
 
 #if IS_ENABLED(CONFIG_MTD_NAND_OMAP2)
index f318f11da2fa53ca07117bf34b00f1156f626f01..d102183ed9a5b21289b61678b9f4b49746d68c31 100644 (file)
@@ -20,8 +20,7 @@
 
 #include <asm/mach/flash.h>
 
-#include <plat/gpmc.h>
-
+#include "gpmc.h"
 #include "soc.h"
 #include "gpmc-onenand.h"
 
index 5654753103744dfa02f8fab8ddfd1ff037806c7a..6eed907d594cc700134ad0e7716df079d1b793c8 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/io.h>
 #include <linux/smc91x.h>
 
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include "gpmc-smc91x.h"
 
 #include "soc.h"
index 249a0b440cd6f5396a38bea78fbd9fdc28061c77..ef990118d32b2f4205c25c58aec555465096aa39 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/io.h>
 #include <linux/smsc911x.h>
 
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include "gpmc-smsc911x.h"
 
 static struct resource gpmc_smsc911x_resources[] = {
index 05aca39f52cb548051d77e743799cec18d4427b6..f14bd3f55218e5372d96e5f57226a75d66068b0c 100644 (file)
 #include <linux/platform_data/mtd-nand-omap2.h>
 
 #include <asm/mach-types.h>
-#include <plat/gpmc.h>
 
 #include <plat/cpu.h>
-#include <plat/gpmc.h>
 #include <plat/sdrc.h>
 #include <plat/omap_device.h>
 
 #include "soc.h"
 #include "common.h"
+#include "gpmc.h"
 
 #define        DEVICE_NAME             "omap-gpmc"
 
diff --git a/arch/arm/mach-omap2/gpmc.h b/arch/arm/mach-omap2/gpmc.h
new file mode 100644 (file)
index 0000000..79f4dfc
--- /dev/null
@@ -0,0 +1,135 @@
+/*
+ * General-Purpose Memory Controller for OMAP2
+ *
+ * Copyright (C) 2005-2006 Nokia Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __OMAP2_GPMC_H
+#define __OMAP2_GPMC_H
+
+#include <linux/platform_data/mtd-nand-omap2.h>
+
+/* Maximum Number of Chip Selects */
+#define GPMC_CS_NUM            8
+
+#define GPMC_CS_CONFIG1                0x00
+#define GPMC_CS_CONFIG2                0x04
+#define GPMC_CS_CONFIG3                0x08
+#define GPMC_CS_CONFIG4                0x0c
+#define GPMC_CS_CONFIG5                0x10
+#define GPMC_CS_CONFIG6                0x14
+#define GPMC_CS_CONFIG7                0x18
+#define GPMC_CS_NAND_COMMAND   0x1c
+#define GPMC_CS_NAND_ADDRESS   0x20
+#define GPMC_CS_NAND_DATA      0x24
+
+/* Control Commands */
+#define GPMC_CONFIG_RDY_BSY    0x00000001
+#define GPMC_CONFIG_DEV_SIZE   0x00000002
+#define GPMC_CONFIG_DEV_TYPE   0x00000003
+#define GPMC_SET_IRQ_STATUS    0x00000004
+#define GPMC_CONFIG_WP         0x00000005
+
+#define GPMC_ENABLE_IRQ                0x0000000d
+
+/* ECC commands */
+#define GPMC_ECC_READ          0 /* Reset Hardware ECC for read */
+#define GPMC_ECC_WRITE         1 /* Reset Hardware ECC for write */
+#define GPMC_ECC_READSYN       2 /* Reset before syndrom is read back */
+
+#define GPMC_CONFIG1_WRAPBURST_SUPP     (1 << 31)
+#define GPMC_CONFIG1_READMULTIPLE_SUPP  (1 << 30)
+#define GPMC_CONFIG1_READTYPE_ASYNC     (0 << 29)
+#define GPMC_CONFIG1_READTYPE_SYNC      (1 << 29)
+#define GPMC_CONFIG1_WRITEMULTIPLE_SUPP (1 << 28)
+#define GPMC_CONFIG1_WRITETYPE_ASYNC    (0 << 27)
+#define GPMC_CONFIG1_WRITETYPE_SYNC     (1 << 27)
+#define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25)
+#define GPMC_CONFIG1_PAGE_LEN(val)      ((val & 3) << 23)
+#define GPMC_CONFIG1_WAIT_READ_MON      (1 << 22)
+#define GPMC_CONFIG1_WAIT_WRITE_MON     (1 << 21)
+#define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18)
+#define GPMC_CONFIG1_WAIT_PIN_SEL(val)  ((val & 3) << 16)
+#define GPMC_CONFIG1_DEVICESIZE(val)    ((val & 3) << 12)
+#define GPMC_CONFIG1_DEVICESIZE_16      GPMC_CONFIG1_DEVICESIZE(1)
+#define GPMC_CONFIG1_DEVICETYPE(val)    ((val & 3) << 10)
+#define GPMC_CONFIG1_DEVICETYPE_NOR     GPMC_CONFIG1_DEVICETYPE(0)
+#define GPMC_CONFIG1_MUXADDDATA         (1 << 9)
+#define GPMC_CONFIG1_TIME_PARA_GRAN     (1 << 4)
+#define GPMC_CONFIG1_FCLK_DIV(val)      (val & 3)
+#define GPMC_CONFIG1_FCLK_DIV2          (GPMC_CONFIG1_FCLK_DIV(1))
+#define GPMC_CONFIG1_FCLK_DIV3          (GPMC_CONFIG1_FCLK_DIV(2))
+#define GPMC_CONFIG1_FCLK_DIV4          (GPMC_CONFIG1_FCLK_DIV(3))
+#define GPMC_CONFIG7_CSVALID           (1 << 6)
+
+#define GPMC_DEVICETYPE_NOR            0
+#define GPMC_DEVICETYPE_NAND           2
+#define GPMC_CONFIG_WRITEPROTECT       0x00000010
+#define WR_RD_PIN_MONITORING           0x00600000
+#define GPMC_IRQ_FIFOEVENTENABLE       0x01
+#define GPMC_IRQ_COUNT_EVENT           0x02
+
+
+/*
+ * Note that all values in this struct are in nanoseconds except sync_clk
+ * (which is in picoseconds), while the register values are in gpmc_fck cycles.
+ */
+struct gpmc_timings {
+       /* Minimum clock period for synchronous mode (in picoseconds) */
+       u32 sync_clk;
+
+       /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */
+       u16 cs_on;              /* Assertion time */
+       u16 cs_rd_off;          /* Read deassertion time */
+       u16 cs_wr_off;          /* Write deassertion time */
+
+       /* ADV signal timings corresponding to GPMC_CONFIG3 */
+       u16 adv_on;             /* Assertion time */
+       u16 adv_rd_off;         /* Read deassertion time */
+       u16 adv_wr_off;         /* Write deassertion time */
+
+       /* WE signals timings corresponding to GPMC_CONFIG4 */
+       u16 we_on;              /* WE assertion time */
+       u16 we_off;             /* WE deassertion time */
+
+       /* OE signals timings corresponding to GPMC_CONFIG4 */
+       u16 oe_on;              /* OE assertion time */
+       u16 oe_off;             /* OE deassertion time */
+
+       /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */
+       u16 page_burst_access;  /* Multiple access word delay */
+       u16 access;             /* Start-cycle to first data valid delay */
+       u16 rd_cycle;           /* Total read cycle time */
+       u16 wr_cycle;           /* Total write cycle time */
+
+       /* The following are only on OMAP3430 */
+       u16 wr_access;          /* WRACCESSTIME */
+       u16 wr_data_mux_bus;    /* WRDATAONADMUXBUS */
+};
+
+extern void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs);
+extern int gpmc_get_client_irq(unsigned irq_config);
+
+extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
+extern unsigned int gpmc_ps_to_ticks(unsigned int time_ps);
+extern unsigned int gpmc_ticks_to_ns(unsigned int ticks);
+extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);
+extern unsigned long gpmc_get_fclk_period(void);
+
+extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
+extern u32 gpmc_cs_read_reg(int cs, int idx);
+extern int gpmc_calc_divider(unsigned int sync_clk);
+extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
+extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
+extern void gpmc_cs_free(int cs);
+extern int gpmc_cs_set_reserved(int cs, int reserved);
+extern int gpmc_cs_reserved(int cs);
+extern void omap3_gpmc_save_context(void);
+extern void omap3_gpmc_restore_context(void);
+extern int gpmc_cs_configure(int cs, int cmd, int wval);
+
+#endif
index ba670db1fd37416a8da3e1d343b319afa8161adf..ed98f4f9e667b03b6fe55d77d418bb5cf30ca564 100644 (file)
@@ -40,7 +40,7 @@
 #include "powerdomain.h"
 #include <plat/sdrc.h>
 #include <plat/prcm.h>
-#include <plat/gpmc.h>
+#include "gpmc.h"
 #include <plat/dma.h>
 
 #include "common.h"
index 805bea6edf1711adf0de68e8f68318bdd4c44b80..6064425ed47bab595c2d641b72ad1956b7f56be5 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <linux/usb/musb.h>
 
-#include <plat/gpmc.h>
+#include "gpmc.h"
 
 #include "mux.h"
 
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h
deleted file mode 100644 (file)
index 79f4dfc..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * General-Purpose Memory Controller for OMAP2
- *
- * Copyright (C) 2005-2006 Nokia Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __OMAP2_GPMC_H
-#define __OMAP2_GPMC_H
-
-#include <linux/platform_data/mtd-nand-omap2.h>
-
-/* Maximum Number of Chip Selects */
-#define GPMC_CS_NUM            8
-
-#define GPMC_CS_CONFIG1                0x00
-#define GPMC_CS_CONFIG2                0x04
-#define GPMC_CS_CONFIG3                0x08
-#define GPMC_CS_CONFIG4                0x0c
-#define GPMC_CS_CONFIG5                0x10
-#define GPMC_CS_CONFIG6                0x14
-#define GPMC_CS_CONFIG7                0x18
-#define GPMC_CS_NAND_COMMAND   0x1c
-#define GPMC_CS_NAND_ADDRESS   0x20
-#define GPMC_CS_NAND_DATA      0x24
-
-/* Control Commands */
-#define GPMC_CONFIG_RDY_BSY    0x00000001
-#define GPMC_CONFIG_DEV_SIZE   0x00000002
-#define GPMC_CONFIG_DEV_TYPE   0x00000003
-#define GPMC_SET_IRQ_STATUS    0x00000004
-#define GPMC_CONFIG_WP         0x00000005
-
-#define GPMC_ENABLE_IRQ                0x0000000d
-
-/* ECC commands */
-#define GPMC_ECC_READ          0 /* Reset Hardware ECC for read */
-#define GPMC_ECC_WRITE         1 /* Reset Hardware ECC for write */
-#define GPMC_ECC_READSYN       2 /* Reset before syndrom is read back */
-
-#define GPMC_CONFIG1_WRAPBURST_SUPP     (1 << 31)
-#define GPMC_CONFIG1_READMULTIPLE_SUPP  (1 << 30)
-#define GPMC_CONFIG1_READTYPE_ASYNC     (0 << 29)
-#define GPMC_CONFIG1_READTYPE_SYNC      (1 << 29)
-#define GPMC_CONFIG1_WRITEMULTIPLE_SUPP (1 << 28)
-#define GPMC_CONFIG1_WRITETYPE_ASYNC    (0 << 27)
-#define GPMC_CONFIG1_WRITETYPE_SYNC     (1 << 27)
-#define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25)
-#define GPMC_CONFIG1_PAGE_LEN(val)      ((val & 3) << 23)
-#define GPMC_CONFIG1_WAIT_READ_MON      (1 << 22)
-#define GPMC_CONFIG1_WAIT_WRITE_MON     (1 << 21)
-#define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18)
-#define GPMC_CONFIG1_WAIT_PIN_SEL(val)  ((val & 3) << 16)
-#define GPMC_CONFIG1_DEVICESIZE(val)    ((val & 3) << 12)
-#define GPMC_CONFIG1_DEVICESIZE_16      GPMC_CONFIG1_DEVICESIZE(1)
-#define GPMC_CONFIG1_DEVICETYPE(val)    ((val & 3) << 10)
-#define GPMC_CONFIG1_DEVICETYPE_NOR     GPMC_CONFIG1_DEVICETYPE(0)
-#define GPMC_CONFIG1_MUXADDDATA         (1 << 9)
-#define GPMC_CONFIG1_TIME_PARA_GRAN     (1 << 4)
-#define GPMC_CONFIG1_FCLK_DIV(val)      (val & 3)
-#define GPMC_CONFIG1_FCLK_DIV2          (GPMC_CONFIG1_FCLK_DIV(1))
-#define GPMC_CONFIG1_FCLK_DIV3          (GPMC_CONFIG1_FCLK_DIV(2))
-#define GPMC_CONFIG1_FCLK_DIV4          (GPMC_CONFIG1_FCLK_DIV(3))
-#define GPMC_CONFIG7_CSVALID           (1 << 6)
-
-#define GPMC_DEVICETYPE_NOR            0
-#define GPMC_DEVICETYPE_NAND           2
-#define GPMC_CONFIG_WRITEPROTECT       0x00000010
-#define WR_RD_PIN_MONITORING           0x00600000
-#define GPMC_IRQ_FIFOEVENTENABLE       0x01
-#define GPMC_IRQ_COUNT_EVENT           0x02
-
-
-/*
- * Note that all values in this struct are in nanoseconds except sync_clk
- * (which is in picoseconds), while the register values are in gpmc_fck cycles.
- */
-struct gpmc_timings {
-       /* Minimum clock period for synchronous mode (in picoseconds) */
-       u32 sync_clk;
-
-       /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */
-       u16 cs_on;              /* Assertion time */
-       u16 cs_rd_off;          /* Read deassertion time */
-       u16 cs_wr_off;          /* Write deassertion time */
-
-       /* ADV signal timings corresponding to GPMC_CONFIG3 */
-       u16 adv_on;             /* Assertion time */
-       u16 adv_rd_off;         /* Read deassertion time */
-       u16 adv_wr_off;         /* Write deassertion time */
-
-       /* WE signals timings corresponding to GPMC_CONFIG4 */
-       u16 we_on;              /* WE assertion time */
-       u16 we_off;             /* WE deassertion time */
-
-       /* OE signals timings corresponding to GPMC_CONFIG4 */
-       u16 oe_on;              /* OE assertion time */
-       u16 oe_off;             /* OE deassertion time */
-
-       /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */
-       u16 page_burst_access;  /* Multiple access word delay */
-       u16 access;             /* Start-cycle to first data valid delay */
-       u16 rd_cycle;           /* Total read cycle time */
-       u16 wr_cycle;           /* Total write cycle time */
-
-       /* The following are only on OMAP3430 */
-       u16 wr_access;          /* WRACCESSTIME */
-       u16 wr_data_mux_bus;    /* WRDATAONADMUXBUS */
-};
-
-extern void gpmc_update_nand_reg(struct gpmc_nand_regs *reg, int cs);
-extern int gpmc_get_client_irq(unsigned irq_config);
-
-extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
-extern unsigned int gpmc_ps_to_ticks(unsigned int time_ps);
-extern unsigned int gpmc_ticks_to_ns(unsigned int ticks);
-extern unsigned int gpmc_round_ns_to_ticks(unsigned int time_ns);
-extern unsigned long gpmc_get_fclk_period(void);
-
-extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
-extern u32 gpmc_cs_read_reg(int cs, int idx);
-extern int gpmc_calc_divider(unsigned int sync_clk);
-extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
-extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
-extern void gpmc_cs_free(int cs);
-extern int gpmc_cs_set_reserved(int cs, int reserved);
-extern int gpmc_cs_reserved(int cs);
-extern void omap3_gpmc_save_context(void);
-extern void omap3_gpmc_restore_context(void);
-extern int gpmc_cs_configure(int cs, int cmd, int wval);
-
-#endif