diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/Kconfig | 8 | ||||
-rw-r--r-- | drivers/net/cs89x0.c | 12 | ||||
-rw-r--r-- | drivers/net/smc91x.c | 9 | ||||
-rw-r--r-- | drivers/net/smc91x.h | 2 | ||||
-rw-r--r-- | drivers/serial/serial_ks8695.c | 61 | ||||
-rw-r--r-- | drivers/watchdog/ixp4xx_wdt.c | 4 |
6 files changed, 79 insertions, 17 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 4a11296a9514..9df7bb93edca 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1386,7 +1386,8 @@ config FORCEDETH_NAPI | |||
1386 | 1386 | ||
1387 | config CS89x0 | 1387 | config CS89x0 |
1388 | tristate "CS89x0 support" | 1388 | tristate "CS89x0 support" |
1389 | depends on NET_PCI && (ISA || MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X) | 1389 | depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \ |
1390 | || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS) | ||
1390 | ---help--- | 1391 | ---help--- |
1391 | Support for CS89x0 chipset based Ethernet cards. If you have a | 1392 | Support for CS89x0 chipset based Ethernet cards. If you have a |
1392 | network (Ethernet) card of this type, say Y and read the | 1393 | network (Ethernet) card of this type, say Y and read the |
@@ -1397,6 +1398,11 @@ config CS89x0 | |||
1397 | To compile this driver as a module, choose M here. The module | 1398 | To compile this driver as a module, choose M here. The module |
1398 | will be called cs89x0. | 1399 | will be called cs89x0. |
1399 | 1400 | ||
1401 | config CS89x0_NONISA_IRQ | ||
1402 | def_bool y | ||
1403 | depends on CS89x0 != n | ||
1404 | depends on MACH_IXDP2351 || ARCH_IXDP2X01 || ARCH_PNX010X || MACH_MX31ADS | ||
1405 | |||
1400 | config TC35815 | 1406 | config TC35815 |
1401 | tristate "TOSHIBA TC35815 Ethernet support" | 1407 | tristate "TOSHIBA TC35815 Ethernet support" |
1402 | depends on NET_PCI && PCI && MIPS | 1408 | depends on NET_PCI && PCI && MIPS |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index ea6144a9565e..5890a917a628 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -194,6 +194,12 @@ static unsigned int cs8900_irq_map[] = {IRQ_IXDP2X01_CS8900, 0, 0, 0}; | |||
194 | #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ | 194 | #define CIRRUS_DEFAULT_IRQ VH_INTC_INT_NUM_CASCADED_INTERRUPT_1 /* Event inputs bank 1 - ID 35/bit 3 */ |
195 | static unsigned int netcard_portlist[] __used __initdata = {CIRRUS_DEFAULT_BASE, 0}; | 195 | static unsigned int netcard_portlist[] __used __initdata = {CIRRUS_DEFAULT_BASE, 0}; |
196 | static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0}; | 196 | static unsigned int cs8900_irq_map[] = {CIRRUS_DEFAULT_IRQ, 0, 0, 0}; |
197 | #elif defined(CONFIG_MACH_MX31ADS) | ||
198 | #include <mach/board-mx31ads.h> | ||
199 | static unsigned int netcard_portlist[] __used __initdata = { | ||
200 | PBC_BASE_ADDRESS + PBC_CS8900A_IOBASE + 0x300, 0 | ||
201 | }; | ||
202 | static unsigned cs8900_irq_map[] = {EXPIO_INT_ENET_INT, 0, 0, 0}; | ||
197 | #else | 203 | #else |
198 | static unsigned int netcard_portlist[] __used __initdata = | 204 | static unsigned int netcard_portlist[] __used __initdata = |
199 | { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; | 205 | { 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; |
@@ -802,7 +808,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
802 | } else { | 808 | } else { |
803 | i = lp->isa_config & INT_NO_MASK; | 809 | i = lp->isa_config & INT_NO_MASK; |
804 | if (lp->chip_type == CS8900) { | 810 | if (lp->chip_type == CS8900) { |
805 | #if defined(CONFIG_MACH_IXDP2351) || defined(CONFIG_ARCH_IXDP2X01) || defined(CONFIG_ARCH_PNX010X) | 811 | #ifdef CONFIG_CS89x0_NONISA_IRQ |
806 | i = cs8900_irq_map[0]; | 812 | i = cs8900_irq_map[0]; |
807 | #else | 813 | #else |
808 | /* Translate the IRQ using the IRQ mapping table. */ | 814 | /* Translate the IRQ using the IRQ mapping table. */ |
@@ -1029,6 +1035,7 @@ skip_this_frame: | |||
1029 | 1035 | ||
1030 | void __init reset_chip(struct net_device *dev) | 1036 | void __init reset_chip(struct net_device *dev) |
1031 | { | 1037 | { |
1038 | #if !defined(CONFIG_MACH_MX31ADS) | ||
1032 | #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) | 1039 | #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) |
1033 | struct net_local *lp = netdev_priv(dev); | 1040 | struct net_local *lp = netdev_priv(dev); |
1034 | int ioaddr = dev->base_addr; | 1041 | int ioaddr = dev->base_addr; |
@@ -1057,6 +1064,7 @@ void __init reset_chip(struct net_device *dev) | |||
1057 | reset_start_time = jiffies; | 1064 | reset_start_time = jiffies; |
1058 | while( (readreg(dev, PP_SelfST) & INIT_DONE) == 0 && jiffies - reset_start_time < 2) | 1065 | while( (readreg(dev, PP_SelfST) & INIT_DONE) == 0 && jiffies - reset_start_time < 2) |
1059 | ; | 1066 | ; |
1067 | #endif /* !CONFIG_MACH_MX31ADS */ | ||
1060 | } | 1068 | } |
1061 | 1069 | ||
1062 | 1070 | ||
@@ -1304,7 +1312,7 @@ net_open(struct net_device *dev) | |||
1304 | else | 1312 | else |
1305 | #endif | 1313 | #endif |
1306 | { | 1314 | { |
1307 | #if !defined(CONFIG_MACH_IXDP2351) && !defined(CONFIG_ARCH_IXDP2X01) && !defined(CONFIG_ARCH_PNX010X) | 1315 | #ifndef CONFIG_CS89x0_NONISA_IRQ |
1308 | if (((1 << dev->irq) & lp->irq_map) == 0) { | 1316 | if (((1 << dev->irq) & lp->irq_map) == 0) { |
1309 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", | 1317 | printk(KERN_ERR "%s: IRQ %d is not in our map of allowable IRQs, which is %x\n", |
1310 | dev->name, dev->irq, lp->irq_map); | 1318 | dev->name, dev->irq, lp->irq_map); |
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c index 24768c10cadb..e332a518efe8 100644 --- a/drivers/net/smc91x.c +++ b/drivers/net/smc91x.c | |||
@@ -1520,7 +1520,9 @@ smc_open(struct net_device *dev) | |||
1520 | /* Setup the default Register Modes */ | 1520 | /* Setup the default Register Modes */ |
1521 | lp->tcr_cur_mode = TCR_DEFAULT; | 1521 | lp->tcr_cur_mode = TCR_DEFAULT; |
1522 | lp->rcr_cur_mode = RCR_DEFAULT; | 1522 | lp->rcr_cur_mode = RCR_DEFAULT; |
1523 | lp->rpc_cur_mode = RPC_DEFAULT; | 1523 | lp->rpc_cur_mode = RPC_DEFAULT | |
1524 | lp->cfg.leda << RPC_LSXA_SHFT | | ||
1525 | lp->cfg.ledb << RPC_LSXB_SHFT; | ||
1524 | 1526 | ||
1525 | /* | 1527 | /* |
1526 | * If we are not using a MII interface, we need to | 1528 | * If we are not using a MII interface, we need to |
@@ -2157,6 +2159,11 @@ static int smc_drv_probe(struct platform_device *pdev) | |||
2157 | lp->cfg.flags |= (nowait) ? SMC91X_NOWAIT : 0; | 2159 | lp->cfg.flags |= (nowait) ? SMC91X_NOWAIT : 0; |
2158 | } | 2160 | } |
2159 | 2161 | ||
2162 | if (!lp->cfg.leda && !lp->cfg.ledb) { | ||
2163 | lp->cfg.leda = RPC_LSA_DEFAULT; | ||
2164 | lp->cfg.ledb = RPC_LSB_DEFAULT; | ||
2165 | } | ||
2166 | |||
2160 | ndev->dma = (unsigned char)-1; | 2167 | ndev->dma = (unsigned char)-1; |
2161 | 2168 | ||
2162 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); | 2169 | res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-regs"); |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 997e7f1d5c6e..8322e7f37af5 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -794,7 +794,7 @@ smc_pxa_dma_irq(int dma, void *dummy) | |||
794 | #define RPC_LSB_DEFAULT RPC_LED_FD | 794 | #define RPC_LSB_DEFAULT RPC_LED_FD |
795 | #endif | 795 | #endif |
796 | 796 | ||
797 | #define RPC_DEFAULT (RPC_ANEG | (RPC_LSA_DEFAULT << RPC_LSXA_SHFT) | (RPC_LSB_DEFAULT << RPC_LSXB_SHFT) | RPC_SPEED | RPC_DPLX) | 797 | #define RPC_DEFAULT (RPC_ANEG | RPC_SPEED | RPC_DPLX) |
798 | 798 | ||
799 | 799 | ||
800 | /* Bank 0 0x0C is reserved */ | 800 | /* Bank 0 0x0C is reserved */ |
diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c index b9cbfc87f616..998e89dc5aaf 100644 --- a/drivers/serial/serial_ks8695.c +++ b/drivers/serial/serial_ks8695.c | |||
@@ -63,8 +63,44 @@ | |||
63 | #define UART_DUMMY_LSR_RX 0x100 | 63 | #define UART_DUMMY_LSR_RX 0x100 |
64 | #define UART_PORT_SIZE (KS8695_USR - KS8695_URRB + 4) | 64 | #define UART_PORT_SIZE (KS8695_USR - KS8695_URRB + 4) |
65 | 65 | ||
66 | #define tx_enabled(port) ((port)->unused[0]) | 66 | static inline int tx_enabled(struct uart_port *port) |
67 | #define rx_enabled(port) ((port)->unused[1]) | 67 | { |
68 | return port->unused[0] & 1; | ||
69 | } | ||
70 | |||
71 | static inline int rx_enabled(struct uart_port *port) | ||
72 | { | ||
73 | return port->unused[0] & 2; | ||
74 | } | ||
75 | |||
76 | static inline int ms_enabled(struct uart_port *port) | ||
77 | { | ||
78 | return port->unused[0] & 4; | ||
79 | } | ||
80 | |||
81 | static inline void ms_enable(struct uart_port *port, int enabled) | ||
82 | { | ||
83 | if(enabled) | ||
84 | port->unused[0] |= 4; | ||
85 | else | ||
86 | port->unused[0] &= ~4; | ||
87 | } | ||
88 | |||
89 | static inline void rx_enable(struct uart_port *port, int enabled) | ||
90 | { | ||
91 | if(enabled) | ||
92 | port->unused[0] |= 2; | ||
93 | else | ||
94 | port->unused[0] &= ~2; | ||
95 | } | ||
96 | |||
97 | static inline void tx_enable(struct uart_port *port, int enabled) | ||
98 | { | ||
99 | if(enabled) | ||
100 | port->unused[0] |= 1; | ||
101 | else | ||
102 | port->unused[0] &= ~1; | ||
103 | } | ||
68 | 104 | ||
69 | 105 | ||
70 | #ifdef SUPPORT_SYSRQ | 106 | #ifdef SUPPORT_SYSRQ |
@@ -75,7 +111,7 @@ static void ks8695uart_stop_tx(struct uart_port *port) | |||
75 | { | 111 | { |
76 | if (tx_enabled(port)) { | 112 | if (tx_enabled(port)) { |
77 | disable_irq(KS8695_IRQ_UART_TX); | 113 | disable_irq(KS8695_IRQ_UART_TX); |
78 | tx_enabled(port) = 0; | 114 | tx_enable(port, 0); |
79 | } | 115 | } |
80 | } | 116 | } |
81 | 117 | ||
@@ -83,7 +119,7 @@ static void ks8695uart_start_tx(struct uart_port *port) | |||
83 | { | 119 | { |
84 | if (!tx_enabled(port)) { | 120 | if (!tx_enabled(port)) { |
85 | enable_irq(KS8695_IRQ_UART_TX); | 121 | enable_irq(KS8695_IRQ_UART_TX); |
86 | tx_enabled(port) = 1; | 122 | tx_enable(port, 1); |
87 | } | 123 | } |
88 | } | 124 | } |
89 | 125 | ||
@@ -91,18 +127,24 @@ static void ks8695uart_stop_rx(struct uart_port *port) | |||
91 | { | 127 | { |
92 | if (rx_enabled(port)) { | 128 | if (rx_enabled(port)) { |
93 | disable_irq(KS8695_IRQ_UART_RX); | 129 | disable_irq(KS8695_IRQ_UART_RX); |
94 | rx_enabled(port) = 0; | 130 | rx_enable(port, 0); |
95 | } | 131 | } |
96 | } | 132 | } |
97 | 133 | ||
98 | static void ks8695uart_enable_ms(struct uart_port *port) | 134 | static void ks8695uart_enable_ms(struct uart_port *port) |
99 | { | 135 | { |
100 | enable_irq(KS8695_IRQ_UART_MODEM_STATUS); | 136 | if (!ms_enabled(port)) { |
137 | enable_irq(KS8695_IRQ_UART_MODEM_STATUS); | ||
138 | ms_enable(port,1); | ||
139 | } | ||
101 | } | 140 | } |
102 | 141 | ||
103 | static void ks8695uart_disable_ms(struct uart_port *port) | 142 | static void ks8695uart_disable_ms(struct uart_port *port) |
104 | { | 143 | { |
105 | disable_irq(KS8695_IRQ_UART_MODEM_STATUS); | 144 | if (ms_enabled(port)) { |
145 | disable_irq(KS8695_IRQ_UART_MODEM_STATUS); | ||
146 | ms_enable(port,0); | ||
147 | } | ||
106 | } | 148 | } |
107 | 149 | ||
108 | static irqreturn_t ks8695uart_rx_chars(int irq, void *dev_id) | 150 | static irqreturn_t ks8695uart_rx_chars(int irq, void *dev_id) |
@@ -285,8 +327,9 @@ static int ks8695uart_startup(struct uart_port *port) | |||
285 | int retval; | 327 | int retval; |
286 | 328 | ||
287 | set_irq_flags(KS8695_IRQ_UART_TX, IRQF_VALID | IRQF_NOAUTOEN); | 329 | set_irq_flags(KS8695_IRQ_UART_TX, IRQF_VALID | IRQF_NOAUTOEN); |
288 | tx_enabled(port) = 0; | 330 | tx_enable(port, 0); |
289 | rx_enabled(port) = 1; | 331 | rx_enable(port, 1); |
332 | ms_enable(port, 1); | ||
290 | 333 | ||
291 | /* | 334 | /* |
292 | * Allocate the IRQ | 335 | * Allocate the IRQ |
diff --git a/drivers/watchdog/ixp4xx_wdt.c b/drivers/watchdog/ixp4xx_wdt.c index 8302ef005be7..147b4d5c63b3 100644 --- a/drivers/watchdog/ixp4xx_wdt.c +++ b/drivers/watchdog/ixp4xx_wdt.c | |||
@@ -174,10 +174,8 @@ static struct miscdevice ixp4xx_wdt_miscdev = { | |||
174 | static int __init ixp4xx_wdt_init(void) | 174 | static int __init ixp4xx_wdt_init(void) |
175 | { | 175 | { |
176 | int ret; | 176 | int ret; |
177 | unsigned long processor_id; | ||
178 | 177 | ||
179 | asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :); | 178 | if (!(read_cpuid_id() & 0xf) && !cpu_is_ixp46x()) { |
180 | if (!(processor_id & 0xf) && !cpu_is_ixp46x()) { | ||
181 | printk(KERN_ERR "IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected" | 179 | printk(KERN_ERR "IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected" |
182 | " - watchdog disabled\n"); | 180 | " - watchdog disabled\n"); |
183 | 181 | ||