aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2008-01-14 22:47:53 -0500
committerPaul Mundt <lethal@linux-sh.org>2008-01-27 23:19:03 -0500
commit29ec6778a49d30c47345afdfaf1d03acff3cf656 (patch)
tree55ca74a5876ea93f77abdc42411a9f63101c7231 /arch/sh/boards
parentcbd10dfb82d6b0b169a42fe52223259f0b1a2cab (diff)
sh: remove voyagergx
This patch removes redundant irq handling code together with unused consistent alloc code. R2D uart setup code is changed to use sm501-regs.h and unused header files are removed. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/irq.c4
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c73
2 files changed, 39 insertions, 38 deletions
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c
index 3fecd49e0d2a..8e49f6e51247 100644
--- a/arch/sh/boards/renesas/rts7751r2d/irq.c
+++ b/arch/sh/boards/renesas/rts7751r2d/irq.c
@@ -13,7 +13,6 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <asm/voyagergx.h>
17#include <asm/rts7751r2d.h> 16#include <asm/rts7751r2d.h>
18 17
19#define R2D_NR_IRL 13 18#define R2D_NR_IRL 13
@@ -153,7 +152,4 @@ void __init init_rts7751r2d_IRQ(void)
153 } 152 }
154 153
155 register_intc_controller(d); 154 register_intc_controller(d);
156#ifdef CONFIG_MFD_SM501
157 setup_voyagergx_irq();
158#endif
159} 155}
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index dc143c10cd18..8cb496617073 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -13,36 +13,13 @@
13#include <linux/pata_platform.h> 13#include <linux/pata_platform.h>
14#include <linux/serial_8250.h> 14#include <linux/serial_8250.h>
15#include <linux/sm501.h> 15#include <linux/sm501.h>
16#include <linux/sm501-regs.h>
16#include <linux/pm.h> 17#include <linux/pm.h>
17#include <linux/fb.h> 18#include <linux/fb.h>
18#include <asm/machvec.h> 19#include <asm/machvec.h>
19#include <asm/rts7751r2d.h> 20#include <asm/rts7751r2d.h>
20#include <asm/voyagergx.h>
21#include <asm/io.h> 21#include <asm/io.h>
22 22
23static void __init voyagergx_serial_init(void)
24{
25 unsigned long val;
26
27 /*
28 * GPIO Control
29 */
30 val = readl((void __iomem *)GPIO_MUX_HIGH);
31 val |= 0x00001fe0;
32 writel(val, (void __iomem *)GPIO_MUX_HIGH);
33
34 /*
35 * Power Mode Gate
36 */
37 val = readl((void __iomem *)POWER_MODE0_GATE);
38 val |= (POWER_MODE0_GATE_U0 | POWER_MODE0_GATE_U1);
39 writel(val, (void __iomem *)POWER_MODE0_GATE);
40
41 val = readl((void __iomem *)POWER_MODE1_GATE);
42 val |= (POWER_MODE1_GATE_U0 | POWER_MODE1_GATE_U1);
43 writel(val, (void __iomem *)POWER_MODE1_GATE);
44}
45
46static struct resource cf_ide_resources[] = { 23static struct resource cf_ide_resources[] = {
47 [0] = { 24 [0] = {
48 .start = PA_AREA5_IO + 0x1000, 25 .start = PA_AREA5_IO + 0x1000,
@@ -94,11 +71,11 @@ static struct platform_device heartbeat_device = {
94#ifdef CONFIG_MFD_SM501 71#ifdef CONFIG_MFD_SM501
95static struct plat_serial8250_port uart_platform_data[] = { 72static struct plat_serial8250_port uart_platform_data[] = {
96 { 73 {
97 .membase = (void __iomem *)VOYAGER_UART_BASE, 74 .membase = (void __iomem *)0xb3e30000,
98 .mapbase = VOYAGER_UART_BASE, 75 .mapbase = 0xb3e30000,
99 .iotype = UPIO_MEM, 76 .iotype = UPIO_MEM,
100 .irq = IRQ_SM501_U0, 77 .irq = IRQ_VOYAGER,
101 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, 78 .flags = UPF_BOOT_AUTOCONF | UPF_SHARE_IRQ,
102 .regshift = 2, 79 .regshift = 2,
103 .uartclk = (9600 * 16), 80 .uartclk = (9600 * 16),
104 }, 81 },
@@ -125,7 +102,7 @@ static struct resource sm501_resources[] = {
125 .flags = IORESOURCE_MEM, 102 .flags = IORESOURCE_MEM,
126 }, 103 },
127 [2] = { 104 [2] = {
128 .start = IRQ_SM501_CV, 105 .start = IRQ_VOYAGER,
129 .flags = IORESOURCE_IRQ, 106 .flags = IORESOURCE_IRQ,
130 }, 107 },
131}; 108};
@@ -167,7 +144,15 @@ static struct sm501_platdata_fb sm501_fb_pdata = {
167 .flags = SM501_FBPD_SWAP_FB_ENDIAN, 144 .flags = SM501_FBPD_SWAP_FB_ENDIAN,
168}; 145};
169 146
147static struct sm501_initdata sm501_initdata = {
148 .gpio_high = {
149 .set = 0x00001fe0,
150 .mask = 0x0,
151 },
152};
153
170static struct sm501_platdata sm501_platform_data = { 154static struct sm501_platdata sm501_platform_data = {
155 .init = &sm501_initdata,
171 .fb = &sm501_fb_pdata, 156 .fb = &sm501_fb_pdata,
172}; 157};
173 158
@@ -237,6 +222,7 @@ u8 rts7751r2d_readb(void __iomem *addr)
237 */ 222 */
238static void __init rts7751r2d_setup(char **cmdline_p) 223static void __init rts7751r2d_setup(char **cmdline_p)
239{ 224{
225 void __iomem *sm501_reg;
240 u16 ver = ctrl_inw(PA_VERREG); 226 u16 ver = ctrl_inw(PA_VERREG);
241 227
242 printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n"); 228 printk(KERN_INFO "Renesas Technology Sales RTS7751R2D support.\n");
@@ -247,7 +233,30 @@ static void __init rts7751r2d_setup(char **cmdline_p)
247 ctrl_outw(0x0000, PA_OUTPORT); 233 ctrl_outw(0x0000, PA_OUTPORT);
248 pm_power_off = rts7751r2d_power_off; 234 pm_power_off = rts7751r2d_power_off;
249 235
250 voyagergx_serial_init(); 236 /* sm501 dram configuration:
237 * ColSizeX = 11 - External Memory Column Size: 256 words.
238 * APX = 1 - External Memory Active to Pre-Charge Delay: 7 clocks.
239 * RstX = 1 - External Memory Reset: Normal.
240 * Rfsh = 1 - Local Memory Refresh to Command Delay: 12 clocks.
241 * BwC = 1 - Local Memory Block Write Cycle Time: 2 clocks.
242 * BwP = 1 - Local Memory Block Write to Pre-Charge Delay: 1 clock.
243 * AP = 1 - Internal Memory Active to Pre-Charge Delay: 7 clocks.
244 * Rst = 1 - Internal Memory Reset: Normal.
245 * RA = 1 - Internal Memory Remain in Active State: Do not remain.
246 */
247
248 sm501_reg = (void __iomem *)0xb3e00000 + SM501_DRAM_CONTROL;
249 writel(readl(sm501_reg) | 0x00f107c0, sm501_reg);
250
251 /*
252 * Power Mode Gate - Enable UART0
253 */
254
255 sm501_reg = (void __iomem *)0xb3e00000 + SM501_POWER_MODE_0_GATE;
256 writel(readl(sm501_reg) | (1 << SM501_GATE_UART0), sm501_reg);
257
258 sm501_reg = (void __iomem *)0xb3e00000 + SM501_POWER_MODE_1_GATE;
259 writel(readl(sm501_reg) | (1 << SM501_GATE_UART0), sm501_reg);
251} 260}
252 261
253/* 262/*
@@ -260,8 +269,4 @@ static struct sh_machine_vector mv_rts7751r2d __initmv = {
260 .mv_irq_demux = rts7751r2d_irq_demux, 269 .mv_irq_demux = rts7751r2d_irq_demux,
261 .mv_writeb = rts7751r2d_writeb, 270 .mv_writeb = rts7751r2d_writeb,
262 .mv_readb = rts7751r2d_readb, 271 .mv_readb = rts7751r2d_readb,
263#if defined(CONFIG_MFD_SM501) && defined(CONFIG_USB_OHCI_HCD)
264 .mv_consistent_alloc = voyagergx_consistent_alloc,
265 .mv_consistent_free = voyagergx_consistent_free,
266#endif
267}; 272};