diff options
author | Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> | 2009-08-27 13:57:26 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-28 10:19:13 +0900 |
commit | e79d57479c86e388051244e1f17851a0e63d1ff0 (patch) | |
tree | 7f390ec63d97c82e16bb342c62f9d260b5145644 /arch/sh/boards/board-sh7785lcr.c | |
parent | f840dd5e7424a0c8a7166fc3e87798d0e44d3ce7 (diff) | |
download | linux-stable-e79d57479c86e388051244e1f17851a0e63d1ff0.tar.gz linux-stable-e79d57479c86e388051244e1f17851a0e63d1ff0.tar.bz2 linux-stable-e79d57479c86e388051244e1f17851a0e63d1ff0.zip |
sh: sh7785lcr: fix prototype board on 32bit MMU mode.
Fix up PCA9564 resources on 32bit MMU mode using prototype board.
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Tested-by: Raul Porcel <armin76@gentoo.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/board-sh7785lcr.c')
-rw-r--r-- | arch/sh/boards/board-sh7785lcr.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/sh/boards/board-sh7785lcr.c b/arch/sh/boards/board-sh7785lcr.c index 42410a15d255..726427c3522b 100644 --- a/arch/sh/boards/board-sh7785lcr.c +++ b/arch/sh/boards/board-sh7785lcr.c @@ -223,6 +223,19 @@ static struct platform_device sm501_device = { .resource = sm501_resources, }; +static struct resource i2c_proto_resources[] = { + [0] = { + .start = PCA9564_PROTO_32BIT_ADDR, + .end = PCA9564_PROTO_32BIT_ADDR + PCA9564_SIZE - 1, + .flags = IORESOURCE_MEM | IORESOURCE_MEM_8BIT, + }, + [1] = { + .start = 12, + .end = 12, + .flags = IORESOURCE_IRQ, + }, +}; + static struct resource i2c_resources[] = { [0] = { .start = PCA9564_ADDR, @@ -271,6 +284,11 @@ static int __init sh7785lcr_devices_setup(void) i2c_register_board_info(0, sh7785lcr_i2c_devices, ARRAY_SIZE(sh7785lcr_i2c_devices)); + if (mach_is_sh7785lcr_pt()) { + i2c_device.resource = &i2c_proto_resources; + i2c_device.num_resources = ARRAY_SIZE(i2c_proto_resources); + } + return platform_add_devices(sh7785lcr_devices, ARRAY_SIZE(sh7785lcr_devices)); } |