Commit 1c4db8e8 authored by Phil Sutter's avatar Phil Sutter Committed by Ralf Baechle

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: default avatarPhil Sutter <n0-1@freewrt.org>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 4ca3803f
...@@ -63,13 +63,6 @@ unsigned char get_latch_u5(void) ...@@ -63,13 +63,6 @@ unsigned char get_latch_u5(void)
} }
EXPORT_SYMBOL(get_latch_u5); EXPORT_SYMBOL(get_latch_u5);
static struct resource rb532_dev3_ctl_res[] = {
{
.name = "dev3_ctl",
.flags = IORESOURCE_MEM,
}
};
static struct resource korina_dev0_res[] = { static struct resource korina_dev0_res[] = {
{ {
.name = "korina_regs", .name = "korina_regs",
...@@ -342,11 +335,8 @@ static int __init plat_setup_devices(void) ...@@ -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].start = readl(IDT434_REG_BASE + DEV2BASE);
nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000; nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000;
/* Read the third (multi purpose) resources from the DC */ /* Read and map device controller 3 */
rb532_dev3_ctl_res[0].start = readl(IDT434_REG_BASE + DEV3BASE); dev3.base = ioremap_nocache(readl(IDT434_REG_BASE + DEV3BASE), 1);
rb532_dev3_ctl_res[0].end = rb532_dev3_ctl_res[0].start + 0x1000;
dev3.base = ioremap_nocache(rb532_dev3_ctl_res[0].start, 0x1000);
if (!dev3.base) { if (!dev3.base) {
printk(KERN_ERR "rb532: cannot remap device controller 3\n"); printk(KERN_ERR "rb532: cannot remap device controller 3\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment