diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-08-25 00:56:07 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-08-25 00:56:07 -0400 |
| commit | ea0763a7e62f60f3e166327268a80f16ad806718 (patch) | |
| tree | de54ec5e5d5a49b3cba81b096b7572852aa6f5a9 /arch/powerpc/sysdev | |
| parent | 271c511db9d37d6797745adb1f151a8bd2838c6f (diff) | |
| parent | c85c41ad73c6db4cf4cc98c595cc5e2fdbdb53d5 (diff) | |
Merge branch 'merge'
Diffstat (limited to 'arch/powerpc/sysdev')
| -rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 12 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/tsi108_dev.c | 10 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/tsi108_pci.c | 21 |
3 files changed, 28 insertions, 15 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 4a6aa640ac13..92ba378b7990 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
| @@ -166,8 +166,16 @@ static int __init gfar_of_init(void) | |||
| 166 | goto err; | 166 | goto err; |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | mac_addr = get_property(np, "address", NULL); | 169 | mac_addr = get_property(np, "local-mac-address", NULL); |
| 170 | memcpy(gfar_data.mac_addr, mac_addr, 6); | 170 | if (mac_addr == NULL) |
| 171 | mac_addr = get_property(np, "mac-address", NULL); | ||
| 172 | if (mac_addr == NULL) { | ||
| 173 | /* Obsolete */ | ||
| 174 | mac_addr = get_property(np, "address", NULL); | ||
| 175 | } | ||
| 176 | |||
| 177 | if (mac_addr) | ||
| 178 | memcpy(gfar_data.mac_addr, mac_addr, 6); | ||
| 171 | 179 | ||
| 172 | if (model && !strcasecmp(model, "TSEC")) | 180 | if (model && !strcasecmp(model, "TSEC")) |
| 173 | gfar_data.device_flags = | 181 | gfar_data.device_flags = |
diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c index 26a0cc820cde..f3038461d4c0 100644 --- a/arch/powerpc/sysdev/tsi108_dev.c +++ b/arch/powerpc/sysdev/tsi108_dev.c | |||
| @@ -93,13 +93,15 @@ static int __init tsi108_eth_of_init(void) | |||
| 93 | goto err; | 93 | goto err; |
| 94 | 94 | ||
| 95 | r[1].name = "tx"; | 95 | r[1].name = "tx"; |
| 96 | r[1].start = np->intrs[0].line; | 96 | r[1].start = irq_of_parse_and_map(np, 0); |
| 97 | r[1].end = np->intrs[0].line; | 97 | r[1].end = irq_of_parse_and_map(np, 0); |
| 98 | r[1].flags = IORESOURCE_IRQ; | 98 | r[1].flags = IORESOURCE_IRQ; |
| 99 | DBG("%s: name:start->end = %s:0x%lx-> 0x%lx\n", | ||
| 100 | __FUNCTION__,r[1].name, r[1].start, r[1].end); | ||
| 99 | 101 | ||
| 100 | tsi_eth_dev = | 102 | tsi_eth_dev = |
| 101 | platform_device_register_simple("tsi-ethernet", i, &r[0], | 103 | platform_device_register_simple("tsi-ethernet", i, &r[0], |
| 102 | np->n_intrs + 1); | 104 | 1); |
| 103 | 105 | ||
| 104 | if (IS_ERR(tsi_eth_dev)) { | 106 | if (IS_ERR(tsi_eth_dev)) { |
| 105 | ret = PTR_ERR(tsi_eth_dev); | 107 | ret = PTR_ERR(tsi_eth_dev); |
| @@ -127,7 +129,7 @@ static int __init tsi108_eth_of_init(void) | |||
| 127 | tsi_eth_data.regs = r[0].start; | 129 | tsi_eth_data.regs = r[0].start; |
| 128 | tsi_eth_data.phyregs = res.start; | 130 | tsi_eth_data.phyregs = res.start; |
| 129 | tsi_eth_data.phy = *phy_id; | 131 | tsi_eth_data.phy = *phy_id; |
| 130 | tsi_eth_data.irq_num = np->intrs[0].line; | 132 | tsi_eth_data.irq_num = irq_of_parse_and_map(np, 0); |
| 131 | of_node_put(phy); | 133 | of_node_put(phy); |
| 132 | ret = | 134 | ret = |
| 133 | platform_device_add_data(tsi_eth_dev, &tsi_eth_data, | 135 | platform_device_add_data(tsi_eth_dev, &tsi_eth_data, |
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c index f6c492f8ab95..c28f69bef8e2 100644 --- a/arch/powerpc/sysdev/tsi108_pci.c +++ b/arch/powerpc/sysdev/tsi108_pci.c | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
| 27 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
| 28 | 28 | ||
| 29 | |||
| 30 | #include <asm/byteorder.h> | 29 | #include <asm/byteorder.h> |
| 31 | #include <asm/io.h> | 30 | #include <asm/io.h> |
| 32 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
| @@ -228,7 +227,7 @@ int __init tsi108_setup_pci(struct device_node *dev) | |||
| 228 | 227 | ||
| 229 | (hose)->ops = &tsi108_direct_pci_ops; | 228 | (hose)->ops = &tsi108_direct_pci_ops; |
| 230 | 229 | ||
| 231 | printk(KERN_INFO "Found tsi108 PCI host bridge at 0x%08lx. " | 230 | printk(KERN_INFO "Found tsi108 PCI host bridge at 0x%08x. " |
| 232 | "Firmware bus number: %d->%d\n", | 231 | "Firmware bus number: %d->%d\n", |
| 233 | rsrc.start, hose->first_busno, hose->last_busno); | 232 | rsrc.start, hose->first_busno, hose->last_busno); |
| 234 | 233 | ||
| @@ -278,7 +277,7 @@ static void init_pci_source(void) | |||
| 278 | mb(); | 277 | mb(); |
| 279 | } | 278 | } |
| 280 | 279 | ||
| 281 | static inline int get_pci_source(void) | 280 | static inline unsigned int get_pci_source(void) |
| 282 | { | 281 | { |
| 283 | u_int temp = 0; | 282 | u_int temp = 0; |
| 284 | int irq = -1; | 283 | int irq = -1; |
| @@ -371,12 +370,12 @@ static void tsi108_pci_irq_end(u_int irq) | |||
| 371 | * Interrupt controller descriptor for cascaded PCI interrupt controller. | 370 | * Interrupt controller descriptor for cascaded PCI interrupt controller. |
| 372 | */ | 371 | */ |
| 373 | 372 | ||
| 374 | struct hw_interrupt_type tsi108_pci_irq = { | 373 | static struct irq_chip tsi108_pci_irq = { |
| 375 | .typename = "tsi108_PCI_int", | 374 | .typename = "tsi108_PCI_int", |
| 376 | .enable = tsi108_pci_irq_enable, | 375 | .mask = tsi108_pci_irq_disable, |
| 377 | .disable = tsi108_pci_irq_disable, | ||
| 378 | .ack = tsi108_pci_irq_ack, | 376 | .ack = tsi108_pci_irq_ack, |
| 379 | .end = tsi108_pci_irq_end, | 377 | .end = tsi108_pci_irq_end, |
| 378 | .unmask = tsi108_pci_irq_enable, | ||
| 380 | }; | 379 | }; |
| 381 | 380 | ||
| 382 | /* | 381 | /* |
| @@ -399,14 +398,18 @@ void __init tsi108_pci_int_init(void) | |||
| 399 | DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); | 398 | DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); |
| 400 | 399 | ||
| 401 | for (i = 0; i < NUM_PCI_IRQS; i++) { | 400 | for (i = 0; i < NUM_PCI_IRQS; i++) { |
| 402 | irq_desc[i + IRQ_PCI_INTAD_BASE].handler = &tsi108_pci_irq; | 401 | irq_desc[i + IRQ_PCI_INTAD_BASE].chip = &tsi108_pci_irq; |
| 403 | irq_desc[i + IRQ_PCI_INTAD_BASE].status |= IRQ_LEVEL; | 402 | irq_desc[i + IRQ_PCI_INTAD_BASE].status |= IRQ_LEVEL; |
| 404 | } | 403 | } |
| 405 | 404 | ||
| 406 | init_pci_source(); | 405 | init_pci_source(); |
| 407 | } | 406 | } |
| 408 | 407 | ||
| 409 | int tsi108_irq_cascade(struct pt_regs *regs, void *unused) | 408 | void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc, |
| 409 | struct pt_regs *regs) | ||
| 410 | { | 410 | { |
| 411 | return get_pci_source(); | 411 | unsigned int cascade_irq = get_pci_source(); |
| 412 | if (cascade_irq != NO_IRQ) | ||
| 413 | generic_handle_irq(cascade_irq, regs); | ||
| 414 | desc->chip->eoi(irq); | ||
| 412 | } | 415 | } |
