From ad2d11301d83fbaffb855110e3e2341c93e29fda Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Fri, 3 Aug 2007 10:16:29 +0900 Subject: [PATCH] --- yaml --- r: 63644 b: refs/heads/master c: 5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/sh/boards/renesas/rts7751r2d/setup.c | 9 ++++++++- trunk/include/asm-sh/rts7751r2d.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 8bb43f973a4a..e5dca898b7ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a3b3e23015061814bffd733dbd9c4452b81ca6aa +refs/heads/master: 5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1 diff --git a/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c b/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c index e165d85c03b5..6f7029d33241 100644 --- a/trunk/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/trunk/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/trunk/include/asm-sh/rts7751r2d.h b/trunk/include/asm-sh/rts7751r2d.h index 10565ac7966a..5d7800aa31b5 100644 --- a/trunk/include/asm-sh/rts7751r2d.h +++ b/trunk/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 */