aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2007-08-02 21:16:29 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-08-02 21:16:29 -0400
commit5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1 (patch)
treea34e1a5ad3ecaca2d6f294d6ed3a83f9f6afca1a
parenta3b3e23015061814bffd733dbd9c4452b81ca6aa (diff)
sh: fix cf support on r2d boards
This patch makes sure cf support is enabled on R2D-PLUS but disabled on R2D-1. Without this fix R2D-1 boards hang on bootup. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/setup.c9
-rw-r--r--include/asm-sh/rts7751r2d.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c
index e165d85c03b5..6f7029d33241 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -140,12 +140,19 @@ static struct platform_device sm501_device = {
140static struct platform_device *rts7751r2d_devices[] __initdata = { 140static struct platform_device *rts7751r2d_devices[] __initdata = {
141 &uart_device, 141 &uart_device,
142 &heartbeat_device, 142 &heartbeat_device,
143 &cf_ide_device,
144 &sm501_device, 143 &sm501_device,
145}; 144};
146 145
147static int __init rts7751r2d_devices_setup(void) 146static int __init rts7751r2d_devices_setup(void)
148{ 147{
148 int ret;
149
150 if (ctrl_inw(PA_BVERREG) == 0x10) { /* only working on R2D-PLUS */
151 ret = platform_device_register(&cf_ide_device);
152 if (ret)
153 return ret;
154 }
155
149 return platform_add_devices(rts7751r2d_devices, 156 return platform_add_devices(rts7751r2d_devices,
150 ARRAY_SIZE(rts7751r2d_devices)); 157 ARRAY_SIZE(rts7751r2d_devices));
151} 158}
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h
index 10565ac7966a..5d7800aa31b5 100644
--- a/include/asm-sh/rts7751r2d.h
+++ b/include/asm-sh/rts7751r2d.h
@@ -37,7 +37,7 @@
37#define PA_VERREG 0xa4000032 /* FPGA Version Register */ 37#define PA_VERREG 0xa4000032 /* FPGA Version Register */
38#define PA_INPORT 0xa4000034 /* KEY Input Port control */ 38#define PA_INPORT 0xa4000034 /* KEY Input Port control */
39#define PA_OUTPORT 0xa4000036 /* LED control */ 39#define PA_OUTPORT 0xa4000036 /* LED control */
40#define PA_DMPORT 0xa4000038 /* DM270 Output Port control */ 40#define PA_BVERREG 0xa4000038 /* Board Revision Register */
41 41
42#define PA_AX88796L 0xaa000400 /* AX88796L Area */ 42#define PA_AX88796L 0xaa000400 /* AX88796L Area */
43#define PA_VOYAGER 0xab000000 /* VOYAGER GX Area */ 43#define PA_VOYAGER 0xab000000 /* VOYAGER GX Area */