rb532: restore command line patching functionality
[openwrt-10.03/.git] / target / linux / rb532 / patches-2.6.28 / 023-rb532_fix_init_of_rb532_dev3_ctl_res.patch
1 This register just contains the address of the actual resource, so
2 initialisation has to be the same as cf_slot0_res and nand_slot0_res.
3
4 Signed-off-by: Phil Sutter <n0-1@freewrt.org>
5 ---
6 --- a/arch/mips/rb532/gpio.c
7 +++ b/arch/mips/rb532/gpio.c
8 @@ -55,8 +55,6 @@ static struct resource rb532_gpio_reg0_r
9  static struct resource rb532_dev3_ctl_res[] = {
10         {
11                 .name   = "dev3_ctl",
12 -               .start  = REGBASE + DEV3BASE,
13 -               .end    = REGBASE + DEV3BASE + sizeof(struct dev_reg) - 1,
14                 .flags  = IORESOURCE_MEM,
15         }
16  };
17 @@ -251,6 +249,9 @@ int __init rb532_gpio_init(void)
18         /* Register our GPIO chip */
19         gpiochip_add(&rb532_gpio_chip->chip);
20  
21 +       rb532_dev3_ctl_res[0].start = readl(IDT434_REG_BASE + DEV3BASE);
22 +       rb532_dev3_ctl_res[0].end = rb532_dev3_ctl_res[0].start + 0x1000;
23 +
24         r = rb532_dev3_ctl_res;
25         dev3.base = ioremap_nocache(r->start, r->end - r->start);
26