Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1
Commit:     5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1
Parent:     a3b3e23015061814bffd733dbd9c4452b81ca6aa
Author:     Magnus Damm <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 3 10:16:29 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Fri Aug 3 10:16:29 2007 +0900

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
---
 arch/sh/boards/renesas/rts7751r2d/setup.c |    9 ++++++++-
 include/asm-sh/rts7751r2d.h               |    2 +-
 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 e165d85..6f7029d 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 = {
 static struct platform_device *rts7751r2d_devices[] __initdata = {
        &uart_device,
        &heartbeat_device,
-       &cf_ide_device,
        &sm501_device,
 };
 
 static int __init rts7751r2d_devices_setup(void)
 {
+       int ret;
+
+       if (ctrl_inw(PA_BVERREG) == 0x10) { /* only working on R2D-PLUS */
+               ret = platform_device_register(&cf_ide_device);
+               if (ret)
+                       return ret;
+       }
+
        return platform_add_devices(rts7751r2d_devices,
                                    ARRAY_SIZE(rts7751r2d_devices));
 }
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h
index 10565ac..5d7800a 100644
--- a/include/asm-sh/rts7751r2d.h
+++ b/include/asm-sh/rts7751r2d.h
@@ -37,7 +37,7 @@
 #define PA_VERREG      0xa4000032      /* FPGA Version Register */
 #define PA_INPORT      0xa4000034      /* KEY Input Port control */
 #define PA_OUTPORT     0xa4000036      /* LED control */
-#define PA_DMPORT      0xa4000038      /* DM270 Output Port control */
+#define PA_BVERREG     0xa4000038      /* Board Revision Register */
 
 #define PA_AX88796L    0xaa000400      /* AX88796L Area */
 #define PA_VOYAGER     0xab000000      /* VOYAGER GX Area */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to