diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2006-10-12 04:38:15 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-10-21 11:35:05 -0400 |
commit | 6652018c829c26d6ab0524c5c74f70daa5ed478d (patch) | |
tree | 7d236b8da550909c240cbcfafae56451ceedbeca /drivers/mtd/maps | |
parent | d25ade71ef80e6312b3e0b53583db518ebb11798 (diff) |
[MTD] MAPS: Remove ITE 8172G and Globespan IVR MTD support
This patch has removed ITE 8172G and Globespan IVR MTD support.
These boards support have already been removed.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Ralf Bächle <ralf@linux-mips.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r-- | drivers/mtd/maps/cstm_mips_ixx.c | 121 |
1 files changed, 1 insertions, 120 deletions
diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c index df2c38ef105a..d57eba24c201 100644 --- a/drivers/mtd/maps/cstm_mips_ixx.c +++ b/drivers/mtd/maps/cstm_mips_ixx.c | |||
@@ -40,62 +40,6 @@ | |||
40 | #include <linux/mtd/partitions.h> | 40 | #include <linux/mtd/partitions.h> |
41 | #include <linux/delay.h> | 41 | #include <linux/delay.h> |
42 | 42 | ||
43 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | ||
44 | #define CC_GCR 0xB4013818 | ||
45 | #define CC_GPBCR 0xB401380A | ||
46 | #define CC_GPBDR 0xB4013808 | ||
47 | #define CC_M68K_DEVICE 1 | ||
48 | #define CC_M68K_FUNCTION 6 | ||
49 | #define CC_CONFADDR 0xB8004000 | ||
50 | #define CC_CONFDATA 0xB8004004 | ||
51 | #define CC_FC_FCR 0xB8002004 | ||
52 | #define CC_FC_DCR 0xB8002008 | ||
53 | #define CC_GPACR 0xB4013802 | ||
54 | #define CC_GPAICR 0xB4013804 | ||
55 | #endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */ | ||
56 | |||
57 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | ||
58 | void cstm_mips_ixx_set_vpp(struct map_info *map,int vpp) | ||
59 | { | ||
60 | static DEFINE_SPINLOCK(vpp_lock); | ||
61 | static int vpp_count = 0; | ||
62 | unsigned long flags; | ||
63 | |||
64 | spin_lock_irqsave(&vpp_lock, flags); | ||
65 | |||
66 | if (vpp) { | ||
67 | if (!vpp_count++) { | ||
68 | __u16 data; | ||
69 | __u8 data1; | ||
70 | static u8 first = 1; | ||
71 | |||
72 | // Set GPIO port B pin3 to high | ||
73 | data = *(__u16 *)(CC_GPBCR); | ||
74 | data = (data & 0xff0f) | 0x0040; | ||
75 | *(__u16 *)CC_GPBCR = data; | ||
76 | *(__u8 *)CC_GPBDR = (*(__u8*)CC_GPBDR) | 0x08; | ||
77 | if (first) { | ||
78 | first = 0; | ||
79 | /* need to have this delay for first | ||
80 | enabling vpp after powerup */ | ||
81 | udelay(40); | ||
82 | } | ||
83 | } | ||
84 | } else { | ||
85 | if (!--vpp_count) { | ||
86 | __u16 data; | ||
87 | |||
88 | // Set GPIO port B pin3 to high | ||
89 | data = *(__u16 *)(CC_GPBCR); | ||
90 | data = (data & 0xff3f) | 0x0040; | ||
91 | *(__u16 *)CC_GPBCR = data; | ||
92 | *(__u8 *)CC_GPBDR = (*(__u8*)CC_GPBDR) & 0xf7; | ||
93 | } | ||
94 | } | ||
95 | spin_unlock_irqrestore(&vpp_lock, flags); | ||
96 | } | ||
97 | #endif | ||
98 | |||
99 | /* board and partition description */ | 43 | /* board and partition description */ |
100 | 44 | ||
101 | #define MAX_PHYSMAP_PARTITIONS 8 | 45 | #define MAX_PHYSMAP_PARTITIONS 8 |
@@ -107,29 +51,6 @@ struct cstm_mips_ixx_info { | |||
107 | int num_partitions; | 51 | int num_partitions; |
108 | }; | 52 | }; |
109 | 53 | ||
110 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | ||
111 | #define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type | ||
112 | const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = | ||
113 | { | ||
114 | { // 28F128J3A in 2x16 configuration | ||
115 | "big flash", // name | ||
116 | 0x08000000, // window_addr | ||
117 | 0x02000000, // window_size | ||
118 | 4, // bankwidth | ||
119 | 1, // num_partitions | ||
120 | } | ||
121 | |||
122 | }; | ||
123 | static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP_PARTITIONS] = { | ||
124 | { // 28F128J3A in 2x16 configuration | ||
125 | { | ||
126 | .name = "main partition ", | ||
127 | .size = 0x02000000, // 128 x 2 x 128k byte sectors | ||
128 | .offset = 0, | ||
129 | }, | ||
130 | }, | ||
131 | }; | ||
132 | #else /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */ | ||
133 | #define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type | 54 | #define PHYSMAP_NUMBER 1 // number of board desc structs needed, one per contiguous flash type |
134 | const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = | 55 | const struct cstm_mips_ixx_info cstm_mips_ixx_board_desc[PHYSMAP_NUMBER] = |
135 | { | 56 | { |
@@ -151,7 +72,6 @@ static struct mtd_partition cstm_mips_ixx_partitions[PHYSMAP_NUMBER][MAX_PHYSMAP | |||
151 | }, | 72 | }, |
152 | }, | 73 | }, |
153 | }; | 74 | }; |
154 | #endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */ | ||
155 | 75 | ||
156 | struct map_info cstm_mips_ixx_map[PHYSMAP_NUMBER]; | 76 | struct map_info cstm_mips_ixx_map[PHYSMAP_NUMBER]; |
157 | 77 | ||
@@ -184,17 +104,10 @@ int __init init_cstm_mips_ixx(void) | |||
184 | cstm_mips_ixx_map[i].name = cstm_mips_ixx_board_desc[i].name; | 104 | cstm_mips_ixx_map[i].name = cstm_mips_ixx_board_desc[i].name; |
185 | cstm_mips_ixx_map[i].size = cstm_mips_ixx_board_desc[i].window_size; | 105 | cstm_mips_ixx_map[i].size = cstm_mips_ixx_board_desc[i].window_size; |
186 | cstm_mips_ixx_map[i].bankwidth = cstm_mips_ixx_board_desc[i].bankwidth; | 106 | cstm_mips_ixx_map[i].bankwidth = cstm_mips_ixx_board_desc[i].bankwidth; |
187 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | ||
188 | cstm_mips_ixx_map[i].set_vpp = cstm_mips_ixx_set_vpp; | ||
189 | #endif | ||
190 | simple_map_init(&cstm_mips_ixx_map[i]); | 107 | simple_map_init(&cstm_mips_ixx_map[i]); |
191 | //printk(KERN_NOTICE "cstm_mips_ixx: ioremap is %x\n",(unsigned int)(cstm_mips_ixx_map[i].virt)); | 108 | //printk(KERN_NOTICE "cstm_mips_ixx: ioremap is %x\n",(unsigned int)(cstm_mips_ixx_map[i].virt)); |
192 | } | 109 | } |
193 | 110 | ||
194 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | ||
195 | setup_ITE_IVR_flash(); | ||
196 | #endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */ | ||
197 | |||
198 | for (i=0;i<PHYSMAP_NUMBER;i++) { | 111 | for (i=0;i<PHYSMAP_NUMBER;i++) { |
199 | parts = &cstm_mips_ixx_partitions[i][0]; | 112 | parts = &cstm_mips_ixx_partitions[i][0]; |
200 | jedec = 0; | 113 | jedec = 0; |
@@ -241,38 +154,6 @@ static void __exit cleanup_cstm_mips_ixx(void) | |||
241 | } | 154 | } |
242 | } | 155 | } |
243 | } | 156 | } |
244 | #if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) | ||
245 | void PCISetULongByOffset(__u32 DevNumber, __u32 FuncNumber, __u32 Offset, __u32 data) | ||
246 | { | ||
247 | __u32 offset; | ||
248 | |||
249 | offset = ( unsigned long )( 0x80000000 | ( DevNumber << 11 ) + ( FuncNumber << 8 ) + Offset) ; | ||
250 | |||
251 | *(__u32 *)CC_CONFADDR = offset; | ||
252 | *(__u32 *)CC_CONFDATA = data; | ||
253 | } | ||
254 | void setup_ITE_IVR_flash() | ||
255 | { | ||
256 | __u32 size, base; | ||
257 | |||
258 | size = 0x0e000000; // 32MiB | ||
259 | base = (0x08000000) >> 8 >>1; // Bug: we must shift one more bit | ||
260 | |||
261 | /* need to set ITE flash to 32 bits instead of default 8 */ | ||
262 | #ifdef CONFIG_MIPS_IVR | ||
263 | *(__u32 *)CC_FC_FCR = 0x55; | ||
264 | *(__u32 *)CC_GPACR = 0xfffc; | ||
265 | #else | ||
266 | *(__u32 *)CC_FC_FCR = 0x77; | ||
267 | #endif | ||
268 | /* turn bursting off */ | ||
269 | *(__u32 *)CC_FC_DCR = 0x0; | ||
270 | |||
271 | /* setup for one chip 4 byte PCI access */ | ||
272 | PCISetULongByOffset(CC_M68K_DEVICE, CC_M68K_FUNCTION, 0x60, size | base); | ||
273 | PCISetULongByOffset(CC_M68K_DEVICE, CC_M68K_FUNCTION, 0x64, 0x02); | ||
274 | } | ||
275 | #endif /* defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) */ | ||
276 | 157 | ||
277 | module_init(init_cstm_mips_ixx); | 158 | module_init(init_cstm_mips_ixx); |
278 | module_exit(cleanup_cstm_mips_ixx); | 159 | module_exit(cleanup_cstm_mips_ixx); |
@@ -280,4 +161,4 @@ module_exit(cleanup_cstm_mips_ixx); | |||
280 | 161 | ||
281 | MODULE_LICENSE("GPL"); | 162 | MODULE_LICENSE("GPL"); |
282 | MODULE_AUTHOR("Alice Hennessy <ahennessy@mvista.com>"); | 163 | MODULE_AUTHOR("Alice Hennessy <ahennessy@mvista.com>"); |
283 | MODULE_DESCRIPTION("MTD map driver for ITE 8172G and Globespan IVR boards"); | 164 | MODULE_DESCRIPTION("MTD map driver for MIPS boards"); |