diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:29:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-15 00:29:06 -0500 |
commit | 11d64be6a631236b3b3d21711c7d1a83d9f85904 (patch) | |
tree | ddd4d2444ff79cc9866d30c35c16f75e0c6ce16d /arch/sh/boards/renesas | |
parent | c24ce1d88781b4d2b8232967630abaa1c90724cf (diff) | |
parent | a602cc05f8fc849023e72e2857bd842f0104f648 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (46 commits)
sh: Fix multiple UTLB hit on UP SH-4.
sh: fix pci io access for r2d boards
sh: fix ioreadN_rep and iowriteN_rep
sh: use ctrl_in/out for on chip pci access
sh: Kill off more dead symbols.
sh: __uncached_start only on sh32.
sh: asm/irq.h needs asm/cpu/irq.h.
serial: sh-sci: Fix up SH-5 build.
sh: Get SH-5 caches working again post-unification.
maple: Fix up maple build failure.
sh: Kill off bogus SH_SDK7780_STANDALONE symbol.
sh: asm/tlb.h needs linux/pagemap.h for CONFIG_SWAP=n.
sh: Tidy include/asm-sh/hp6xx.h
maple: improve detection of attached peripherals
sh: Shut up some trivial build warnings.
sh: Update SH-5 flush_cache_sigtramp() for API changes.
sh: Fix up set_fixmap_nocache() for SH-5.
sh: Fix up pte_mkhuge() build breakage for SH-5.
sh: Disable big endian for SH-5.
sh: Handle SH7366 CPU in check_bugs().
...
Diffstat (limited to 'arch/sh/boards/renesas')
-rw-r--r-- | arch/sh/boards/renesas/migor/Makefile | 1 | ||||
-rw-r--r-- | arch/sh/boards/renesas/migor/setup.c | 61 | ||||
-rw-r--r-- | arch/sh/boards/renesas/r7780rp/setup.c | 47 | ||||
-rw-r--r-- | arch/sh/boards/renesas/rts7751r2d/setup.c | 45 | ||||
-rw-r--r-- | arch/sh/boards/renesas/sdk7780/Kconfig | 7 |
5 files changed, 92 insertions, 69 deletions
diff --git a/arch/sh/boards/renesas/migor/Makefile b/arch/sh/boards/renesas/migor/Makefile new file mode 100644 index 000000000000..77037567633b --- /dev/null +++ b/arch/sh/boards/renesas/migor/Makefile | |||
@@ -0,0 +1 @@ | |||
obj-y := setup.o | |||
diff --git a/arch/sh/boards/renesas/migor/setup.c b/arch/sh/boards/renesas/migor/setup.c new file mode 100644 index 000000000000..21ab8c8fb590 --- /dev/null +++ b/arch/sh/boards/renesas/migor/setup.c | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * Renesas System Solutions Asia Pte. Ltd - Migo-R | ||
3 | * | ||
4 | * Copyright (C) 2008 Magnus Damm | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <asm/machvec.h> | ||
14 | #include <asm/io.h> | ||
15 | |||
16 | /* Address IRQ Size Bus Description | ||
17 | * 0x00000000 64MB 16 NOR Flash (SP29PL256N) | ||
18 | * 0x0c000000 64MB 64 SDRAM (2xK4M563233G) | ||
19 | * 0x10000000 IRQ0 16 Ethernet (SMC91C111) | ||
20 | * 0x14000000 IRQ4 16 USB 2.0 Host Controller (M66596) | ||
21 | * 0x18000000 8GB 8 NAND Flash (K9K8G08U0A) | ||
22 | */ | ||
23 | |||
24 | static struct resource smc91x_eth_resources[] = { | ||
25 | [0] = { | ||
26 | .name = "smc91x-regs" , | ||
27 | .start = P2SEGADDR(0x10000300), | ||
28 | .end = P2SEGADDR(0x1000030f), | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, | ||
31 | [1] = { | ||
32 | .start = 32, /* IRQ0 */ | ||
33 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | ||
34 | }, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device smc91x_eth_device = { | ||
38 | .name = "smc91x", | ||
39 | .num_resources = ARRAY_SIZE(smc91x_eth_resources), | ||
40 | .resource = smc91x_eth_resources, | ||
41 | }; | ||
42 | |||
43 | static struct platform_device *migor_devices[] __initdata = { | ||
44 | &smc91x_eth_device, | ||
45 | }; | ||
46 | |||
47 | static int __init migor_devices_setup(void) | ||
48 | { | ||
49 | return platform_add_devices(migor_devices, ARRAY_SIZE(migor_devices)); | ||
50 | } | ||
51 | __initcall(migor_devices_setup); | ||
52 | |||
53 | static void __init migor_setup(char **cmdline_p) | ||
54 | { | ||
55 | ctrl_outw(0x1000, 0xa4050110); /* Enable IRQ0 in PJCR */ | ||
56 | } | ||
57 | |||
58 | static struct sh_machine_vector mv_migor __initmv = { | ||
59 | .mv_name = "Migo-R", | ||
60 | .mv_setup = migor_setup, | ||
61 | }; | ||
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index f7a8d5c9d510..2f68bea7890c 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/clock.h> | 23 | #include <asm/clock.h> |
24 | #include <asm/heartbeat.h> | 24 | #include <asm/heartbeat.h> |
25 | #include <asm/io.h> | 25 | #include <asm/io.h> |
26 | #include <asm/io_trapped.h> | ||
26 | 27 | ||
27 | static struct resource r8a66597_usb_host_resources[] = { | 28 | static struct resource r8a66597_usb_host_resources[] = { |
28 | [0] = { | 29 | [0] = { |
@@ -181,13 +182,27 @@ static struct platform_device *r7780rp_devices[] __initdata = { | |||
181 | &m66592_usb_peripheral_device, | 182 | &m66592_usb_peripheral_device, |
182 | &heartbeat_device, | 183 | &heartbeat_device, |
183 | #ifndef CONFIG_SH_R7780RP | 184 | #ifndef CONFIG_SH_R7780RP |
184 | &cf_ide_device, | ||
185 | &ax88796_device, | 185 | &ax88796_device, |
186 | #endif | 186 | #endif |
187 | }; | 187 | }; |
188 | 188 | ||
189 | /* | ||
190 | * The CF is connected using a 16-bit bus where 8-bit operations are | ||
191 | * unsupported. The linux ata driver is however using 8-bit operations, so | ||
192 | * insert a trapped io filter to convert 8-bit operations into 16-bit. | ||
193 | */ | ||
194 | static struct trapped_io cf_trapped_io = { | ||
195 | .resource = cf_ide_resources, | ||
196 | .num_resources = 2, | ||
197 | .minimum_bus_width = 16, | ||
198 | }; | ||
199 | |||
189 | static int __init r7780rp_devices_setup(void) | 200 | static int __init r7780rp_devices_setup(void) |
190 | { | 201 | { |
202 | #ifndef CONFIG_SH_R7780RP | ||
203 | if (register_trapped_io(&cf_trapped_io) == 0) | ||
204 | platform_device_register(&cf_ide_device); | ||
205 | #endif | ||
191 | return platform_add_devices(r7780rp_devices, | 206 | return platform_add_devices(r7780rp_devices, |
192 | ARRAY_SIZE(r7780rp_devices)); | 207 | ARRAY_SIZE(r7780rp_devices)); |
193 | } | 208 | } |
@@ -226,34 +241,6 @@ static void r7780rp_power_off(void) | |||
226 | ctrl_outw(0x0001, PA_POFF); | 241 | ctrl_outw(0x0001, PA_POFF); |
227 | } | 242 | } |
228 | 243 | ||
229 | static inline unsigned char is_ide_ioaddr(unsigned long addr) | ||
230 | { | ||
231 | return ((cf_ide_resources[0].start <= addr && | ||
232 | addr <= cf_ide_resources[0].end) || | ||
233 | (cf_ide_resources[1].start <= addr && | ||
234 | addr <= cf_ide_resources[1].end)); | ||
235 | } | ||
236 | |||
237 | void highlander_writeb(u8 b, void __iomem *addr) | ||
238 | { | ||
239 | unsigned long tmp = (unsigned long __force)addr; | ||
240 | |||
241 | if (is_ide_ioaddr(tmp)) | ||
242 | ctrl_outw((u16)b, tmp); | ||
243 | else | ||
244 | ctrl_outb(b, tmp); | ||
245 | } | ||
246 | |||
247 | u8 highlander_readb(void __iomem *addr) | ||
248 | { | ||
249 | unsigned long tmp = (unsigned long __force)addr; | ||
250 | |||
251 | if (is_ide_ioaddr(tmp)) | ||
252 | return ctrl_inw(tmp) & 0xff; | ||
253 | else | ||
254 | return ctrl_inb(tmp); | ||
255 | } | ||
256 | |||
257 | /* | 244 | /* |
258 | * Initialize the board | 245 | * Initialize the board |
259 | */ | 246 | */ |
@@ -338,6 +325,4 @@ static struct sh_machine_vector mv_highlander __initmv = { | |||
338 | .mv_setup = highlander_setup, | 325 | .mv_setup = highlander_setup, |
339 | .mv_init_irq = highlander_init_irq, | 326 | .mv_init_irq = highlander_init_irq, |
340 | .mv_irq_demux = highlander_irq_demux, | 327 | .mv_irq_demux = highlander_irq_demux, |
341 | .mv_readb = highlander_readb, | ||
342 | .mv_writeb = highlander_writeb, | ||
343 | }; | 328 | }; |
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index a0ef81b7de37..f21ee49ef3a5 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <asm/machvec.h> | 21 | #include <asm/machvec.h> |
22 | #include <asm/rts7751r2d.h> | 22 | #include <asm/rts7751r2d.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/io_trapped.h> | ||
24 | #include <asm/spi.h> | 25 | #include <asm/spi.h> |
25 | 26 | ||
26 | static struct resource cf_ide_resources[] = { | 27 | static struct resource cf_ide_resources[] = { |
@@ -214,13 +215,25 @@ static struct platform_device *rts7751r2d_devices[] __initdata = { | |||
214 | &uart_device, | 215 | &uart_device, |
215 | &sm501_device, | 216 | &sm501_device, |
216 | #endif | 217 | #endif |
217 | &cf_ide_device, | ||
218 | &heartbeat_device, | 218 | &heartbeat_device, |
219 | &spi_sh_sci_device, | 219 | &spi_sh_sci_device, |
220 | }; | 220 | }; |
221 | 221 | ||
222 | /* | ||
223 | * The CF is connected with a 16-bit bus where 8-bit operations are | ||
224 | * unsupported. The linux ata driver is however using 8-bit operations, so | ||
225 | * insert a trapped io filter to convert 8-bit operations into 16-bit. | ||
226 | */ | ||
227 | static struct trapped_io cf_trapped_io = { | ||
228 | .resource = cf_ide_resources, | ||
229 | .num_resources = 2, | ||
230 | .minimum_bus_width = 16, | ||
231 | }; | ||
232 | |||
222 | static int __init rts7751r2d_devices_setup(void) | 233 | static int __init rts7751r2d_devices_setup(void) |
223 | { | 234 | { |
235 | if (register_trapped_io(&cf_trapped_io) == 0) | ||
236 | platform_device_register(&cf_ide_device); | ||
224 | spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); | 237 | spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus)); |
225 | return platform_add_devices(rts7751r2d_devices, | 238 | return platform_add_devices(rts7751r2d_devices, |
226 | ARRAY_SIZE(rts7751r2d_devices)); | 239 | ARRAY_SIZE(rts7751r2d_devices)); |
@@ -232,34 +245,6 @@ static void rts7751r2d_power_off(void) | |||
232 | ctrl_outw(0x0001, PA_POWOFF); | 245 | ctrl_outw(0x0001, PA_POWOFF); |
233 | } | 246 | } |
234 | 247 | ||
235 | static inline unsigned char is_ide_ioaddr(unsigned long addr) | ||
236 | { | ||
237 | return ((cf_ide_resources[0].start <= addr && | ||
238 | addr <= cf_ide_resources[0].end) || | ||
239 | (cf_ide_resources[1].start <= addr && | ||
240 | addr <= cf_ide_resources[1].end)); | ||
241 | } | ||
242 | |||
243 | void rts7751r2d_writeb(u8 b, void __iomem *addr) | ||
244 | { | ||
245 | unsigned long tmp = (unsigned long __force)addr; | ||
246 | |||
247 | if (is_ide_ioaddr(tmp)) | ||
248 | ctrl_outw((u16)b, tmp); | ||
249 | else | ||
250 | ctrl_outb(b, tmp); | ||
251 | } | ||
252 | |||
253 | u8 rts7751r2d_readb(void __iomem *addr) | ||
254 | { | ||
255 | unsigned long tmp = (unsigned long __force)addr; | ||
256 | |||
257 | if (is_ide_ioaddr(tmp)) | ||
258 | return ctrl_inw(tmp) & 0xff; | ||
259 | else | ||
260 | return ctrl_inb(tmp); | ||
261 | } | ||
262 | |||
263 | /* | 248 | /* |
264 | * Initialize the board | 249 | * Initialize the board |
265 | */ | 250 | */ |
@@ -310,6 +295,4 @@ static struct sh_machine_vector mv_rts7751r2d __initmv = { | |||
310 | .mv_setup = rts7751r2d_setup, | 295 | .mv_setup = rts7751r2d_setup, |
311 | .mv_init_irq = init_rts7751r2d_IRQ, | 296 | .mv_init_irq = init_rts7751r2d_IRQ, |
312 | .mv_irq_demux = rts7751r2d_irq_demux, | 297 | .mv_irq_demux = rts7751r2d_irq_demux, |
313 | .mv_writeb = rts7751r2d_writeb, | ||
314 | .mv_readb = rts7751r2d_readb, | ||
315 | }; | 298 | }; |
diff --git a/arch/sh/boards/renesas/sdk7780/Kconfig b/arch/sh/boards/renesas/sdk7780/Kconfig index e4f5b6985be1..065f1df09bf1 100644 --- a/arch/sh/boards/renesas/sdk7780/Kconfig +++ b/arch/sh/boards/renesas/sdk7780/Kconfig | |||
@@ -4,13 +4,6 @@ choice | |||
4 | prompt "SDK7780 options" | 4 | prompt "SDK7780 options" |
5 | default SH_SDK7780_BASE | 5 | default SH_SDK7780_BASE |
6 | 6 | ||
7 | config SH_SDK7780_STANDALONE | ||
8 | bool "SDK7780 board support" | ||
9 | depends on CPU_SUBTYPE_SH7780 | ||
10 | help | ||
11 | Selecting this option will enable support for the | ||
12 | standalone version of the SDK7780. If in doubt, say Y. | ||
13 | |||
14 | config SH_SDK7780_BASE | 7 | config SH_SDK7780_BASE |
15 | bool "SDK7780 with base-board support" | 8 | bool "SDK7780 with base-board support" |
16 | depends on CPU_SUBTYPE_SH7780 | 9 | depends on CPU_SUBTYPE_SH7780 |