aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cs89x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cs89x0.c')
-rw-r--r--drivers/net/cs89x0.c40
1 files changed, 37 insertions, 3 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index 25e4495de79e..b96d6fb1929e 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -174,6 +174,13 @@ static unsigned int cs8900_irq_map[] = {1,0,0,0};
174#include <asm/irq.h> 174#include <asm/irq.h>
175static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0}; 175static unsigned int netcard_portlist[] __initdata = {IXDP2X01_CS8900_VIRT_BASE, 0};
176static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; 176static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0};
177#elif defined(CONFIG_ARCH_PNX0105)
178#include <asm/irq.h>
179#include <asm/arch/gpio.h>
180#define CIRRUS_DEFAULT_BASE IO_ADDRESS(EXT_STATIC2_s0_BASE + 0x200000) /* = Physical address 0x48200000 */
181#define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */
182static unsigned int netcard_portlist[] __initdata = {CIRRUS_DEFAULT_BASE, 0};
183static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0};
177#else 184#else
178static unsigned int netcard_portlist[] __initdata = 185static unsigned int netcard_portlist[] __initdata =
179 { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; 186 { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0};
@@ -431,6 +438,30 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
431#endif 438#endif
432 } 439 }
433 440
441#ifdef CONFIG_ARCH_PNX0105
442 initialize_ebi();
443
444 /* Map GPIO registers for the pins connected to the CS8900a. */
445 if (map_cirrus_gpio() < 0)
446 return -ENODEV;
447
448 reset_cirrus();
449
450 /* Map event-router registers. */
451 if (map_event_router() < 0)
452 return -ENODEV;
453
454 enable_cirrus_irq();
455
456 unmap_cirrus_gpio();
457 unmap_event_router();
458
459 dev->base_addr = ioaddr;
460
461 for (i = 0 ; i < 3 ; i++)
462 readreg(dev, 0);
463#endif
464
434 /* Grab the region so we can find another board if autoIRQ fails. */ 465 /* Grab the region so we can find another board if autoIRQ fails. */
435 /* WTF is going on here? */ 466 /* WTF is going on here? */
436 if (!request_region(ioaddr & ~3, NETCARD_IO_EXTENT, DRV_NAME)) { 467 if (!request_region(ioaddr & ~3, NETCARD_IO_EXTENT, DRV_NAME)) {
@@ -672,7 +703,7 @@ printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
672 } else { 703 } else {
673 i = lp->isa_config & INT_NO_MASK; 704 i = lp->isa_config & INT_NO_MASK;
674 if (lp->chip_type == CS8900) { 705 if (lp->chip_type == CS8900) {
675#ifdef CONFIG_ARCH_IXDP2X01 706#if defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX0105)
676 i = cs8900_irq_map[0]; 707 i = cs8900_irq_map[0];
677#else 708#else
678 /* Translate the IRQ using the IRQ mapping table. */ 709 /* Translate the IRQ using the IRQ mapping table. */
@@ -1145,7 +1176,7 @@ net_open(struct net_device *dev)
1145 int i; 1176 int i;
1146 int ret; 1177 int ret;
1147 1178
1148#ifndef CONFIG_SH_HICOSH4 /* uses irq#1, so this won't work */ 1179#if !defined(CONFIG_SH_HICOSH4) && !defined(CONFIG_ARCH_PNX0105) /* uses irq#1, so this won't work */
1149 if (dev->irq < 2) { 1180 if (dev->irq < 2) {
1150 /* Allow interrupts to be generated by the chip */ 1181 /* Allow interrupts to be generated by the chip */
1151/* Cirrus' release had this: */ 1182/* Cirrus' release had this: */
@@ -1176,7 +1207,7 @@ net_open(struct net_device *dev)
1176 else 1207 else
1177#endif 1208#endif
1178 { 1209 {
1179#ifndef CONFIG_ARCH_IXDP2X01 1210#if !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX0105)
1180 if (((1 << dev->irq) & lp->irq_map) == 0) { 1211 if (((1 << dev->irq) & lp->irq_map) == 0) {
1181 printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", 1212 printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n",
1182 dev->name, dev->irq, lp->irq_map); 1213 dev->name, dev->irq, lp->irq_map);
@@ -1261,6 +1292,9 @@ net_open(struct net_device *dev)
1261 case A_CNF_MEDIA_10B_2: result = lp->adapter_cnf & A_CNF_10B_2; break; 1292 case A_CNF_MEDIA_10B_2: result = lp->adapter_cnf & A_CNF_10B_2; break;
1262 default: result = lp->adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | A_CNF_10B_2); 1293 default: result = lp->adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | A_CNF_10B_2);
1263 } 1294 }
1295#ifdef CONFIG_ARCH_PNX0105
1296 result = A_CNF_10B_T;
1297#endif
1264 if (!result) { 1298 if (!result) {
1265 printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name); 1299 printk(KERN_ERR "%s: EEPROM is configured for unavailable media\n", dev->name);
1266 release_irq: 1300 release_irq: