diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/85xx/mpc85xx_mds.c | 24 | ||||
-rw-r--r-- | arch/powerpc/platforms/fsl_uli1575.c | 12 |
3 files changed, 31 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c index 6f8ebe1085b3..072b948b2e2d 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c | |||
@@ -553,7 +553,7 @@ static ssize_t mpc52xx_wdt_write(struct file *file, const char __user *data, | |||
553 | return 0; | 553 | return 0; |
554 | } | 554 | } |
555 | 555 | ||
556 | static struct watchdog_info mpc5200_wdt_info = { | 556 | static const struct watchdog_info mpc5200_wdt_info = { |
557 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, | 557 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, |
558 | .identity = WDT_IDENTITY, | 558 | .identity = WDT_IDENTITY, |
559 | }; | 559 | }; |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index 04d105d689f1..f0684c8ac960 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c | |||
@@ -237,6 +237,8 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
237 | } else if (machine_is(mpc8569_mds)) { | 237 | } else if (machine_is(mpc8569_mds)) { |
238 | #define BCSR7_UCC12_GETHnRST (0x1 << 2) | 238 | #define BCSR7_UCC12_GETHnRST (0x1 << 2) |
239 | #define BCSR8_UEM_MARVELL_RST (0x1 << 1) | 239 | #define BCSR8_UEM_MARVELL_RST (0x1 << 1) |
240 | #define BCSR_UCC_RGMII (0x1 << 6) | ||
241 | #define BCSR_UCC_RTBI (0x1 << 5) | ||
240 | /* | 242 | /* |
241 | * U-Boot mangles interrupt polarity for Marvell PHYs, | 243 | * U-Boot mangles interrupt polarity for Marvell PHYs, |
242 | * so reset built-in and UEM Marvell PHYs, this puts | 244 | * so reset built-in and UEM Marvell PHYs, this puts |
@@ -247,6 +249,28 @@ static void __init mpc85xx_mds_setup_arch(void) | |||
247 | 249 | ||
248 | setbits8(&bcsr_regs[7], BCSR7_UCC12_GETHnRST); | 250 | setbits8(&bcsr_regs[7], BCSR7_UCC12_GETHnRST); |
249 | clrbits8(&bcsr_regs[8], BCSR8_UEM_MARVELL_RST); | 251 | clrbits8(&bcsr_regs[8], BCSR8_UEM_MARVELL_RST); |
252 | |||
253 | for (np = NULL; (np = of_find_compatible_node(np, | ||
254 | "network", | ||
255 | "ucc_geth")) != NULL;) { | ||
256 | const unsigned int *prop; | ||
257 | int ucc_num; | ||
258 | |||
259 | prop = of_get_property(np, "cell-index", NULL); | ||
260 | if (prop == NULL) | ||
261 | continue; | ||
262 | |||
263 | ucc_num = *prop - 1; | ||
264 | |||
265 | prop = of_get_property(np, "phy-connection-type", NULL); | ||
266 | if (prop == NULL) | ||
267 | continue; | ||
268 | |||
269 | if (strcmp("rtbi", (const char *)prop) == 0) | ||
270 | clrsetbits_8(&bcsr_regs[7 + ucc_num], | ||
271 | BCSR_UCC_RGMII, BCSR_UCC_RTBI); | ||
272 | } | ||
273 | |||
250 | } | 274 | } |
251 | iounmap(bcsr_regs); | 275 | iounmap(bcsr_regs); |
252 | } | 276 | } |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index fd23a1d4b39d..8b0c2082a783 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
@@ -222,6 +222,7 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev) | |||
222 | int i; | 222 | int i; |
223 | u8 *dummy; | 223 | u8 *dummy; |
224 | struct pci_bus *bus = dev->bus; | 224 | struct pci_bus *bus = dev->bus; |
225 | struct resource *res; | ||
225 | resource_size_t end = 0; | 226 | resource_size_t end = 0; |
226 | 227 | ||
227 | for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) { | 228 | for (i = PCI_BRIDGE_RESOURCES; i < PCI_BRIDGE_RESOURCES+3; i++) { |
@@ -230,13 +231,12 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev) | |||
230 | end = pci_resource_end(dev, i); | 231 | end = pci_resource_end(dev, i); |
231 | } | 232 | } |
232 | 233 | ||
233 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | 234 | pci_bus_for_each_resource(bus, res, i) { |
234 | if ((bus->resource[i]) && | 235 | if (res && res->flags & IORESOURCE_MEM) { |
235 | (bus->resource[i]->flags & IORESOURCE_MEM)) { | 236 | if (res->end == end) |
236 | if (bus->resource[i]->end == end) | 237 | dummy = ioremap(res->start, 0x4); |
237 | dummy = ioremap(bus->resource[i]->start, 0x4); | ||
238 | else | 238 | else |
239 | dummy = ioremap(bus->resource[i]->end - 3, 0x4); | 239 | dummy = ioremap(res->end - 3, 0x4); |
240 | if (dummy) { | 240 | if (dummy) { |
241 | in_8(dummy); | 241 | in_8(dummy); |
242 | iounmap(dummy); | 242 | iounmap(dummy); |