diff options
author | Afzal Mohammed <afzal@ti.com> | 2012-09-29 01:02:42 -0400 |
---|---|---|
committer | Afzal Mohammed <afzal@ti.com> | 2012-10-15 05:12:03 -0400 |
commit | b6ab13e7d6d2778702baea7433d0bd9f234d5083 (patch) | |
tree | aef0daa2d085015b64f7069c116f972d94e72e76 | |
parent | b7754452b3e27716347a528b47b0a1083af32520 (diff) |
ARM: OMAP2+: onenand: header cleanup
For common arm zImage existing onenand header file
in platform specific location was moved to generic
platform data location, but it contained more than
platform data, remove it. New local header has been
created for exposing functions.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
-rw-r--r-- | arch/arm/mach-omap2/board-flash.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-n8x0.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rm680.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc-onenand.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc-onenand.h | 24 | ||||
-rw-r--r-- | include/linux/platform_data/mtd-onenand-omap2.h | 19 |
8 files changed, 33 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index d4ac5352a71c..f438d511ba11 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -25,6 +25,7 @@ | |||
25 | 25 | ||
26 | #include "common.h" | 26 | #include "common.h" |
27 | #include "board-flash.h" | 27 | #include "board-flash.h" |
28 | #include "gpmc-onenand.h" | ||
28 | 29 | ||
29 | #define REG_FPGA_REV 0x10 | 30 | #define REG_FPGA_REV 0x10 |
30 | #define REG_FPGA_DIP_SWITCH_INPUT2 0x60 | 31 | #define REG_FPGA_DIP_SWITCH_INPUT2 0x60 |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index f6b3ed0e5c94..83c6efaf4226 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include "common-board-devices.h" | 43 | #include "common-board-devices.h" |
44 | #include "board-flash.h" | 44 | #include "board-flash.h" |
45 | #include "control.h" | 45 | #include "control.h" |
46 | #include "gpmc-onenand.h" | ||
46 | 47 | ||
47 | #define IGEP2_SMSC911X_CS 5 | 48 | #define IGEP2_SMSC911X_CS 5 |
48 | #define IGEP2_SMSC911X_GPIO 176 | 49 | #define IGEP2_SMSC911X_GPIO 176 |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index d95f727ca39a..92b19166aac8 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <plat/mmc.h> | 32 | #include <plat/mmc.h> |
33 | 33 | ||
34 | #include "mux.h" | 34 | #include "mux.h" |
35 | #include "gpmc-onenand.h" | ||
35 | 36 | ||
36 | #define TUSB6010_ASYNC_CS 1 | 37 | #define TUSB6010_ASYNC_CS 1 |
37 | #define TUSB6010_SYNC_CS 4 | 38 | #define TUSB6010_SYNC_CS 4 |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 45997bfbcbd2..154cf337c0c7 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "hsmmc.h" | 33 | #include "hsmmc.h" |
34 | #include "sdram-nokia.h" | 34 | #include "sdram-nokia.h" |
35 | #include "common-board-devices.h" | 35 | #include "common-board-devices.h" |
36 | #include "gpmc-onenand.h" | ||
36 | 37 | ||
37 | static struct regulator_consumer_supply rm680_vemmc_consumers[] = { | 38 | static struct regulator_consumer_supply rm680_vemmc_consumers[] = { |
38 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | 39 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 020e03c95bfe..45760044b2bd 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include "mux.h" | 54 | #include "mux.h" |
55 | #include "hsmmc.h" | 55 | #include "hsmmc.h" |
56 | #include "common-board-devices.h" | 56 | #include "common-board-devices.h" |
57 | #include "gpmc-onenand.h" | ||
57 | 58 | ||
58 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 | 59 | #define SYSTEM_REV_B_USES_VAUX3 0x1699 |
59 | #define SYSTEM_REV_S_USES_VAUX3 0x8 | 60 | #define SYSTEM_REV_S_USES_VAUX3 0x8 |
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 4a1c0b7ab432..f318f11da2fa 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <plat/gpmc.h> | 23 | #include <plat/gpmc.h> |
24 | 24 | ||
25 | #include "soc.h" | 25 | #include "soc.h" |
26 | #include "gpmc-onenand.h" | ||
26 | 27 | ||
27 | #define ONENAND_IO_SIZE SZ_128K | 28 | #define ONENAND_IO_SIZE SZ_128K |
28 | 29 | ||
diff --git a/arch/arm/mach-omap2/gpmc-onenand.h b/arch/arm/mach-omap2/gpmc-onenand.h new file mode 100644 index 000000000000..216f23a8b45c --- /dev/null +++ b/arch/arm/mach-omap2/gpmc-onenand.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-omap2/gpmc-onenand.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | */ | ||
9 | |||
10 | #ifndef __OMAP2_GPMC_ONENAND_H | ||
11 | #define __OMAP2_GPMC_ONENAND_H | ||
12 | |||
13 | #include <linux/platform_data/mtd-onenand-omap2.h> | ||
14 | |||
15 | #if IS_ENABLED(CONFIG_MTD_ONENAND_OMAP2) | ||
16 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); | ||
17 | #else | ||
18 | #define board_onenand_data NULL | ||
19 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) | ||
20 | { | ||
21 | } | ||
22 | #endif | ||
23 | |||
24 | #endif | ||
diff --git a/include/linux/platform_data/mtd-onenand-omap2.h b/include/linux/platform_data/mtd-onenand-omap2.h index ef9c60d4b29b..685af7e8b120 100644 --- a/include/linux/platform_data/mtd-onenand-omap2.h +++ b/include/linux/platform_data/mtd-onenand-omap2.h | |||
@@ -9,6 +9,9 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef __MTD_ONENAND_OMAP2_H | ||
13 | #define __MTD_ONENAND_OMAP2_H | ||
14 | |||
12 | #include <linux/mtd/mtd.h> | 15 | #include <linux/mtd/mtd.h> |
13 | #include <linux/mtd/partitions.h> | 16 | #include <linux/mtd/partitions.h> |
14 | 17 | ||
@@ -27,20 +30,4 @@ struct omap_onenand_platform_data { | |||
27 | u8 regulator_can_sleep; | 30 | u8 regulator_can_sleep; |
28 | u8 skip_initial_unlocking; | 31 | u8 skip_initial_unlocking; |
29 | }; | 32 | }; |
30 | |||
31 | #define ONENAND_MAX_PARTITIONS 8 | ||
32 | |||
33 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
34 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | ||
35 | |||
36 | extern void gpmc_onenand_init(struct omap_onenand_platform_data *d); | ||
37 | |||
38 | #else | ||
39 | |||
40 | #define board_onenand_data NULL | ||
41 | |||
42 | static inline void gpmc_onenand_init(struct omap_onenand_platform_data *d) | ||
43 | { | ||
44 | } | ||
45 | |||
46 | #endif | 33 | #endif |