]> git.sur5r.net Git - u-boot/commitdiff
mtd: nand: omap: move omap_gpmc.h from arch/arm/include/asm to drivers/mtd/nand
authorpekon gupta <pekon@ti.com>
Fri, 22 Nov 2013 11:23:29 +0000 (16:53 +0530)
committerScott Wood <scottwood@freescale.com>
Tue, 4 Mar 2014 23:23:54 +0000 (17:23 -0600)
omap_gpmc.h is a generic header used by OMAP NAND driver for all TI platfoms.
Hence this file should be present in generic folder instead of architecture
specific include folder.
Build tested using: ./MAKEALL -s am33xx -s omap3 -s omap4 -s omap5

Signed-off-by: Pekon Gupta <pekon@ti.com>
arch/arm/include/asm/arch-am33xx/sys_proto.h
arch/arm/include/asm/arch-omap3/sys_proto.h
arch/arm/include/asm/arch-omap4/sys_proto.h
arch/arm/include/asm/arch-omap5/sys_proto.h
arch/arm/include/asm/omap_gpmc.h [deleted file]
board/isee/igep00x0/igep00x0.c
board/overo/overo.c
drivers/mtd/nand/omap_elm.c
drivers/mtd/nand/omap_gpmc.c
include/linux/mtd/omap_gpmc.h [new file with mode: 0644]

index f73e285a899599456388305bc2a8e541eeb67855..91ff2ad0e4cd49b3f86df6ba2be439e92387beb6 100644 (file)
@@ -10,7 +10,7 @@
 
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
-#include <asm/omap_gpmc.h>
+#include <linux/mtd/omap_gpmc.h>
 #include <asm/arch/cpu.h>
 
 #define BOARD_REV_ID   0x0
index 83d7f1146fdb324abf27882ffaf2c6103590323c..44fa66f8a389b91bf195b8c11fce016f7ffcf7a3 100644 (file)
@@ -7,7 +7,7 @@
  */
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
-#include <asm/omap_gpmc.h>
+#include <linux/mtd/omap_gpmc.h>
 
 typedef struct {
        u32 mtype;
index ea8b72c431c0c846e7dacb48dc87c5bcd31b686a..b338a1566c6df3b02bc8c553ca1df7d23eca2991 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/arch/clock.h>
 #include <asm/io.h>
 #include <asm/omap_common.h>
-#include <asm/omap_gpmc.h>
+#include <linux/mtd/omap_gpmc.h>
 #include <asm/arch/mux_omap4.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index 4247473a66697f6b793ba2b216e15bfdb3804694..9e007c87ae61217e2e784477362192e833db5b54 100644 (file)
@@ -12,7 +12,7 @@
 #include <asm/io.h>
 #include <asm/arch/clock.h>
 #include <asm/omap_common.h>
-#include <asm/omap_gpmc.h>
+#include <linux/mtd/omap_gpmc.h>
 #include <asm/arch/clock.h>
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/arch/arm/include/asm/omap_gpmc.h b/arch/arm/include/asm/omap_gpmc.h
deleted file mode 100644 (file)
index 22f6573..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * (C) Copyright 2004-2008 Texas Instruments, <www.ti.com>
- * Rohit Choraria <rohitkc@ti.com>
- *
- * (C) Copyright 2013 Andreas Bießmann <andreas.devel@googlemail.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
- */
-#ifndef __ASM_OMAP_GPMC_H
-#define __ASM_OMAP_GPMC_H
-
-#define GPMC_BUF_EMPTY 0
-#define GPMC_BUF_FULL  1
-
-enum omap_ecc {
-       /* 1-bit  ECC calculation by Software, Error detection by Software */
-       OMAP_ECC_HAM1_CODE_SW = 1, /* avoid un-initialized int can be 0x0 */
-       /* 1-bit  ECC calculation by GPMC, Error detection by Software */
-       /* ECC layout compatible to legacy ROMCODE. */
-       OMAP_ECC_HAM1_CODE_HW,
-       /* 4-bit  ECC calculation by GPMC, Error detection by Software */
-       OMAP_ECC_BCH4_CODE_HW_DETECTION_SW,
-       /* 4-bit  ECC calculation by GPMC, Error detection by ELM */
-       OMAP_ECC_BCH4_CODE_HW,
-       /* 8-bit  ECC calculation by GPMC, Error detection by Software */
-       OMAP_ECC_BCH8_CODE_HW_DETECTION_SW,
-       /* 8-bit  ECC calculation by GPMC, Error detection by ELM */
-       OMAP_ECC_BCH8_CODE_HW,
-};
-
-struct gpmc_cs {
-       u32 config1;            /* 0x00 */
-       u32 config2;            /* 0x04 */
-       u32 config3;            /* 0x08 */
-       u32 config4;            /* 0x0C */
-       u32 config5;            /* 0x10 */
-       u32 config6;            /* 0x14 */
-       u32 config7;            /* 0x18 */
-       u32 nand_cmd;           /* 0x1C */
-       u32 nand_adr;           /* 0x20 */
-       u32 nand_dat;           /* 0x24 */
-       u8 res[8];              /* blow up to 0x30 byte */
-};
-
-struct bch_res_0_3 {
-       u32 bch_result_x[4];
-};
-
-struct gpmc {
-       u8 res1[0x10];
-       u32 sysconfig;          /* 0x10 */
-       u8 res2[0x4];
-       u32 irqstatus;          /* 0x18 */
-       u32 irqenable;          /* 0x1C */
-       u8 res3[0x20];
-       u32 timeout_control;    /* 0x40 */
-       u8 res4[0xC];
-       u32 config;             /* 0x50 */
-       u32 status;             /* 0x54 */
-       u8 res5[0x8];           /* 0x58 */
-       struct gpmc_cs cs[8];   /* 0x60, 0x90, .. */
-       u8 res6[0x14];          /* 0x1E0 */
-       u32 ecc_config;         /* 0x1F4 */
-       u32 ecc_control;        /* 0x1F8 */
-       u32 ecc_size_config;    /* 0x1FC */
-       u32 ecc1_result;        /* 0x200 */
-       u32 ecc2_result;        /* 0x204 */
-       u32 ecc3_result;        /* 0x208 */
-       u32 ecc4_result;        /* 0x20C */
-       u32 ecc5_result;        /* 0x210 */
-       u32 ecc6_result;        /* 0x214 */
-       u32 ecc7_result;        /* 0x218 */
-       u32 ecc8_result;        /* 0x21C */
-       u32 ecc9_result;        /* 0x220 */
-       u8 res7[12];            /* 0x224 */
-       u32 testmomde_ctrl;     /* 0x230 */
-       u8 res8[12];            /* 0x234 */
-       struct bch_res_0_3 bch_result_0_3[2];   /* 0x240 */
-};
-
-/* Used for board specific gpmc initialization */
-extern struct gpmc *gpmc_cfg;
-
-#endif /* __ASM_OMAP_GPMC_H */
index 7a7500b342076476e98a25cc5e86892d543ce5ca..3b2b1f15b8e9647fe0fc72efee1e8f78fa11b588 100644 (file)
@@ -8,7 +8,6 @@
 #include <twl4030.h>
 #include <netdev.h>
 #include <asm/gpio.h>
-#include <asm/omap_gpmc.h>
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mmc_host_def.h>
index 9ac35d2f4e331056bff1b1359b270688444e97c2..1192d02e9171ed99b52f3152cf86e3bab0e48d72 100644 (file)
@@ -21,7 +21,6 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/omap_gpmc.h>
 #include <asm/gpio.h>
 #include <asm/mach-types.h>
 #include "overo.h"
index 64dca4fe9831efdc01f466016889cdc000cd2908..55a631deb4a5f2ba728585fe336aa8fd03e44d2c 100644 (file)
@@ -16,7 +16,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/errno.h>
-#include <asm/omap_gpmc.h>
+#include <linux/mtd/omap_gpmc.h>
 #include <asm/omap_elm.h>
 #include <asm/arch/hardware.h>
 
index b54e39e1cd5be28a8ac764197cb6cf90bb0133b0..452e40f04ef5301bbc547b3b5cddf8123d730e3d 100644 (file)
@@ -9,7 +9,7 @@
 #include <asm/io.h>
 #include <asm/errno.h>
 #include <asm/arch/mem.h>
-#include <asm/omap_gpmc.h>
+#include <linux/mtd/omap_gpmc.h>
 #include <linux/mtd/nand_ecc.h>
 #include <linux/bch.h>
 #include <linux/compiler.h>
diff --git a/include/linux/mtd/omap_gpmc.h b/include/linux/mtd/omap_gpmc.h
new file mode 100644 (file)
index 0000000..22f6573
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * (C) Copyright 2004-2008 Texas Instruments, <www.ti.com>
+ * Rohit Choraria <rohitkc@ti.com>
+ *
+ * (C) Copyright 2013 Andreas Bießmann <andreas.devel@googlemail.com>
+ *
+ * SPDX-License-Identifier:    GPL-2.0+
+ */
+#ifndef __ASM_OMAP_GPMC_H
+#define __ASM_OMAP_GPMC_H
+
+#define GPMC_BUF_EMPTY 0
+#define GPMC_BUF_FULL  1
+
+enum omap_ecc {
+       /* 1-bit  ECC calculation by Software, Error detection by Software */
+       OMAP_ECC_HAM1_CODE_SW = 1, /* avoid un-initialized int can be 0x0 */
+       /* 1-bit  ECC calculation by GPMC, Error detection by Software */
+       /* ECC layout compatible to legacy ROMCODE. */
+       OMAP_ECC_HAM1_CODE_HW,
+       /* 4-bit  ECC calculation by GPMC, Error detection by Software */
+       OMAP_ECC_BCH4_CODE_HW_DETECTION_SW,
+       /* 4-bit  ECC calculation by GPMC, Error detection by ELM */
+       OMAP_ECC_BCH4_CODE_HW,
+       /* 8-bit  ECC calculation by GPMC, Error detection by Software */
+       OMAP_ECC_BCH8_CODE_HW_DETECTION_SW,
+       /* 8-bit  ECC calculation by GPMC, Error detection by ELM */
+       OMAP_ECC_BCH8_CODE_HW,
+};
+
+struct gpmc_cs {
+       u32 config1;            /* 0x00 */
+       u32 config2;            /* 0x04 */
+       u32 config3;            /* 0x08 */
+       u32 config4;            /* 0x0C */
+       u32 config5;            /* 0x10 */
+       u32 config6;            /* 0x14 */
+       u32 config7;            /* 0x18 */
+       u32 nand_cmd;           /* 0x1C */
+       u32 nand_adr;           /* 0x20 */
+       u32 nand_dat;           /* 0x24 */
+       u8 res[8];              /* blow up to 0x30 byte */
+};
+
+struct bch_res_0_3 {
+       u32 bch_result_x[4];
+};
+
+struct gpmc {
+       u8 res1[0x10];
+       u32 sysconfig;          /* 0x10 */
+       u8 res2[0x4];
+       u32 irqstatus;          /* 0x18 */
+       u32 irqenable;          /* 0x1C */
+       u8 res3[0x20];
+       u32 timeout_control;    /* 0x40 */
+       u8 res4[0xC];
+       u32 config;             /* 0x50 */
+       u32 status;             /* 0x54 */
+       u8 res5[0x8];           /* 0x58 */
+       struct gpmc_cs cs[8];   /* 0x60, 0x90, .. */
+       u8 res6[0x14];          /* 0x1E0 */
+       u32 ecc_config;         /* 0x1F4 */
+       u32 ecc_control;        /* 0x1F8 */
+       u32 ecc_size_config;    /* 0x1FC */
+       u32 ecc1_result;        /* 0x200 */
+       u32 ecc2_result;        /* 0x204 */
+       u32 ecc3_result;        /* 0x208 */
+       u32 ecc4_result;        /* 0x20C */
+       u32 ecc5_result;        /* 0x210 */
+       u32 ecc6_result;        /* 0x214 */
+       u32 ecc7_result;        /* 0x218 */
+       u32 ecc8_result;        /* 0x21C */
+       u32 ecc9_result;        /* 0x220 */
+       u8 res7[12];            /* 0x224 */
+       u32 testmomde_ctrl;     /* 0x230 */
+       u8 res8[12];            /* 0x234 */
+       struct bch_res_0_3 bch_result_0_3[2];   /* 0x240 */
+};
+
+/* Used for board specific gpmc initialization */
+extern struct gpmc *gpmc_cfg;
+
+#endif /* __ASM_OMAP_GPMC_H */