diff options
Diffstat (limited to 'arch/mips/bcm47xx/wgt634u.c')
-rw-r--r-- | arch/mips/bcm47xx/wgt634u.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/mips/bcm47xx/wgt634u.c b/arch/mips/bcm47xx/wgt634u.c index 74d06965326f..e9f9ec8d443b 100644 --- a/arch/mips/bcm47xx/wgt634u.c +++ b/arch/mips/bcm47xx/wgt634u.c | |||
@@ -108,7 +108,7 @@ static irqreturn_t gpio_interrupt(int irq, void *ignored) | |||
108 | 108 | ||
109 | /* Interrupts are shared, check if the current one is | 109 | /* Interrupts are shared, check if the current one is |
110 | a GPIO interrupt. */ | 110 | a GPIO interrupt. */ |
111 | if (!ssb_chipco_irq_status(&ssb_bcm47xx.chipco, | 111 | if (!ssb_chipco_irq_status(&bcm47xx_bus.ssb.chipco, |
112 | SSB_CHIPCO_IRQ_GPIO)) | 112 | SSB_CHIPCO_IRQ_GPIO)) |
113 | return IRQ_NONE; | 113 | return IRQ_NONE; |
114 | 114 | ||
@@ -132,22 +132,26 @@ static int __init wgt634u_init(void) | |||
132 | * machine. Use the MAC address as an heuristic. Netgear Inc. has | 132 | * machine. Use the MAC address as an heuristic. Netgear Inc. has |
133 | * been allocated ranges 00:09:5b:xx:xx:xx and 00:0f:b5:xx:xx:xx. | 133 | * been allocated ranges 00:09:5b:xx:xx:xx and 00:0f:b5:xx:xx:xx. |
134 | */ | 134 | */ |
135 | u8 *et0mac; | ||
135 | 136 | ||
136 | u8 *et0mac = ssb_bcm47xx.sprom.et0mac; | 137 | if (bcm47xx_bus_type != BCM47XX_BUS_TYPE_SSB) |
138 | return -ENODEV; | ||
139 | |||
140 | et0mac = bcm47xx_bus.ssb.sprom.et0mac; | ||
137 | 141 | ||
138 | if (et0mac[0] == 0x00 && | 142 | if (et0mac[0] == 0x00 && |
139 | ((et0mac[1] == 0x09 && et0mac[2] == 0x5b) || | 143 | ((et0mac[1] == 0x09 && et0mac[2] == 0x5b) || |
140 | (et0mac[1] == 0x0f && et0mac[2] == 0xb5))) { | 144 | (et0mac[1] == 0x0f && et0mac[2] == 0xb5))) { |
141 | struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore; | 145 | struct ssb_mipscore *mcore = &bcm47xx_bus.ssb.mipscore; |
142 | 146 | ||
143 | printk(KERN_INFO "WGT634U machine detected.\n"); | 147 | printk(KERN_INFO "WGT634U machine detected.\n"); |
144 | 148 | ||
145 | if (!request_irq(gpio_to_irq(WGT634U_GPIO_RESET), | 149 | if (!request_irq(gpio_to_irq(WGT634U_GPIO_RESET), |
146 | gpio_interrupt, IRQF_SHARED, | 150 | gpio_interrupt, IRQF_SHARED, |
147 | "WGT634U GPIO", &ssb_bcm47xx.chipco)) { | 151 | "WGT634U GPIO", &bcm47xx_bus.ssb.chipco)) { |
148 | gpio_direction_input(WGT634U_GPIO_RESET); | 152 | gpio_direction_input(WGT634U_GPIO_RESET); |
149 | gpio_intmask(WGT634U_GPIO_RESET, 1); | 153 | gpio_intmask(WGT634U_GPIO_RESET, 1); |
150 | ssb_chipco_irq_mask(&ssb_bcm47xx.chipco, | 154 | ssb_chipco_irq_mask(&bcm47xx_bus.ssb.chipco, |
151 | SSB_CHIPCO_IRQ_GPIO, | 155 | SSB_CHIPCO_IRQ_GPIO, |
152 | SSB_CHIPCO_IRQ_GPIO); | 156 | SSB_CHIPCO_IRQ_GPIO); |
153 | } | 157 | } |