diff options
author | Phil Sutter <n0-1@freewrt.org> | 2009-01-19 23:42:54 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-01-30 21:33:01 +0000 |
commit | 1c4db8e82808a804751be906e8c14bbe0a264a9c (patch) | |
tree | 0ece1c8ef033c31325696e2dd1a9f484ed52b245 /arch/mips/rb532/devices.c | |
parent | 4ca3803f81bca9081f17ef67ffca8b11790f608d (diff) |
MIPS: RB532: Simplify dev3 init
As rb532_dev3_ctl_res is not used by any platform device, it can be dropped
when not used for holding the physical address of the device 3 controller.
Also a size of one byte should suffice when ioremapping the physical
address mentioned above, as only a single byte is being read from and
written to it.
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/rb532/devices.c')
-rw-r--r-- | arch/mips/rb532/devices.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c index 1a0209eca78..4a5f05b662a 100644 --- a/arch/mips/rb532/devices.c +++ b/arch/mips/rb532/devices.c @@ -63,13 +63,6 @@ unsigned char get_latch_u5(void) } EXPORT_SYMBOL(get_latch_u5); -static struct resource rb532_dev3_ctl_res[] = { - { - .name = "dev3_ctl", - .flags = IORESOURCE_MEM, - } -}; - static struct resource korina_dev0_res[] = { { .name = "korina_regs", @@ -342,11 +335,8 @@ static int __init plat_setup_devices(void) nand_slot0_res[0].start = readl(IDT434_REG_BASE + DEV2BASE); nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000; - /* Read the third (multi purpose) resources from the DC */ - rb532_dev3_ctl_res[0].start = readl(IDT434_REG_BASE + DEV3BASE); - rb532_dev3_ctl_res[0].end = rb532_dev3_ctl_res[0].start + 0x1000; - - dev3.base = ioremap_nocache(rb532_dev3_ctl_res[0].start, 0x1000); + /* Read and map device controller 3 */ + dev3.base = ioremap_nocache(readl(IDT434_REG_BASE + DEV3BASE), 1); if (!dev3.base) { printk(KERN_ERR "rb532: cannot remap device controller 3\n"); |