aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2014-05-04 07:03:12 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-07 15:24:07 -0400
commit528b971bba8e64ffa13bc98f0eaa0060888ae148 (patch)
tree2f86078f9e768418f96a09cdce03a8cad68e82c4 /drivers/net/irda
parent79e0f1c9f2c7096e93879d4158f2d34142b693dd (diff)
w83977af_ir: remove two faux Kconfig macros
Ever since v2.3.5 the driver for "Winbond W83977AF (IR)" contains two unneeded preprocessor macros. CONFIG_NETWINDER_TX_DMA_PROBLEMS is never defined and can safely be removed. And CONFIG_NETWINDER_RX_DMA_PROBLEMS is just an alias for CONFIG_ARCH_NETWINDER, so that (valid) Kconfig macro can be used instead. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda')
-rw-r--r--drivers/net/irda/w83977af_ir.c33
1 files changed, 4 insertions, 29 deletions
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c
index e641bb240362..11dbdf36d9c1 100644
--- a/drivers/net/irda/w83977af_ir.c
+++ b/drivers/net/irda/w83977af_ir.c
@@ -62,10 +62,6 @@
62#include "w83977af.h" 62#include "w83977af.h"
63#include "w83977af_ir.h" 63#include "w83977af_ir.h"
64 64
65#ifdef CONFIG_ARCH_NETWINDER /* Adjust to NetWinder differences */
66#undef CONFIG_NETWINDER_TX_DMA_PROBLEMS /* Not needed */
67#define CONFIG_NETWINDER_RX_DMA_PROBLEMS /* Must have this one! */
68#endif
69#define CONFIG_USE_W977_PNP /* Currently needed */ 65#define CONFIG_USE_W977_PNP /* Currently needed */
70#define PIO_MAX_SPEED 115200 66#define PIO_MAX_SPEED 115200
71 67
@@ -332,7 +328,7 @@ static int w83977af_probe(int iobase, int irq, int dma)
332 w977_write_reg(0x74, dma+1, efbase[i]); 328 w977_write_reg(0x74, dma+1, efbase[i]);
333#else 329#else
334 w977_write_reg(0x74, dma, efbase[i]); 330 w977_write_reg(0x74, dma, efbase[i]);
335#endif /*CONFIG_ARCH_NETWINDER */ 331#endif /* CONFIG_ARCH_NETWINDER */
336 w977_write_reg(0x75, 0x04, efbase[i]); /* Disable Tx DMA */ 332 w977_write_reg(0x75, 0x04, efbase[i]); /* Disable Tx DMA */
337 333
338 /* Set append hardware CRC, enable IR bank selection */ 334 /* Set append hardware CRC, enable IR bank selection */
@@ -563,10 +559,6 @@ static netdev_tx_t w83977af_hard_xmit(struct sk_buff *skb,
563static void w83977af_dma_write(struct w83977af_ir *self, int iobase) 559static void w83977af_dma_write(struct w83977af_ir *self, int iobase)
564{ 560{
565 __u8 set; 561 __u8 set;
566#ifdef CONFIG_NETWINDER_TX_DMA_PROBLEMS
567 unsigned long flags;
568 __u8 hcr;
569#endif
570 IRDA_DEBUG(4, "%s(), len=%d\n", __func__ , self->tx_buff.len); 562 IRDA_DEBUG(4, "%s(), len=%d\n", __func__ , self->tx_buff.len);
571 563
572 /* Save current set */ 564 /* Save current set */
@@ -579,30 +571,13 @@ static void w83977af_dma_write(struct w83977af_ir *self, int iobase)
579 /* Choose transmit DMA channel */ 571 /* Choose transmit DMA channel */
580 switch_bank(iobase, SET2); 572 switch_bank(iobase, SET2);
581 outb(ADCR1_D_CHSW|/*ADCR1_DMA_F|*/ADCR1_ADV_SL, iobase+ADCR1); 573 outb(ADCR1_D_CHSW|/*ADCR1_DMA_F|*/ADCR1_ADV_SL, iobase+ADCR1);
582#ifdef CONFIG_NETWINDER_TX_DMA_PROBLEMS
583 spin_lock_irqsave(&self->lock, flags);
584
585 disable_dma(self->io.dma);
586 clear_dma_ff(self->io.dma);
587 set_dma_mode(self->io.dma, DMA_MODE_READ);
588 set_dma_addr(self->io.dma, self->tx_buff_dma);
589 set_dma_count(self->io.dma, self->tx_buff.len);
590#else
591 irda_setup_dma(self->io.dma, self->tx_buff_dma, self->tx_buff.len, 574 irda_setup_dma(self->io.dma, self->tx_buff_dma, self->tx_buff.len,
592 DMA_MODE_WRITE); 575 DMA_MODE_WRITE);
593#endif
594 self->io.direction = IO_XMIT; 576 self->io.direction = IO_XMIT;
595 577
596 /* Enable DMA */ 578 /* Enable DMA */
597 switch_bank(iobase, SET0); 579 switch_bank(iobase, SET0);
598#ifdef CONFIG_NETWINDER_TX_DMA_PROBLEMS
599 hcr = inb(iobase+HCR);
600 outb(hcr | HCR_EN_DMA, iobase+HCR);
601 enable_dma(self->io.dma);
602 spin_unlock_irqrestore(&self->lock, flags);
603#else
604 outb(inb(iobase+HCR) | HCR_EN_DMA | HCR_TX_WT, iobase+HCR); 580 outb(inb(iobase+HCR) | HCR_EN_DMA | HCR_TX_WT, iobase+HCR);
605#endif
606 581
607 /* Restore set register */ 582 /* Restore set register */
608 outb(set, iobase+SSR); 583 outb(set, iobase+SSR);
@@ -711,7 +686,7 @@ static int w83977af_dma_receive(struct w83977af_ir *self)
711{ 686{
712 int iobase; 687 int iobase;
713 __u8 set; 688 __u8 set;
714#ifdef CONFIG_NETWINDER_RX_DMA_PROBLEMS 689#ifdef CONFIG_ARCH_NETWINDER
715 unsigned long flags; 690 unsigned long flags;
716 __u8 hcr; 691 __u8 hcr;
717#endif 692#endif
@@ -736,7 +711,7 @@ static int w83977af_dma_receive(struct w83977af_ir *self)
736 self->io.direction = IO_RECV; 711 self->io.direction = IO_RECV;
737 self->rx_buff.data = self->rx_buff.head; 712 self->rx_buff.data = self->rx_buff.head;
738 713
739#ifdef CONFIG_NETWINDER_RX_DMA_PROBLEMS 714#ifdef CONFIG_ARCH_NETWINDER
740 spin_lock_irqsave(&self->lock, flags); 715 spin_lock_irqsave(&self->lock, flags);
741 716
742 disable_dma(self->io.dma); 717 disable_dma(self->io.dma);
@@ -759,7 +734,7 @@ static int w83977af_dma_receive(struct w83977af_ir *self)
759 734
760 /* Enable DMA */ 735 /* Enable DMA */
761 switch_bank(iobase, SET0); 736 switch_bank(iobase, SET0);
762#ifdef CONFIG_NETWINDER_RX_DMA_PROBLEMS 737#ifdef CONFIG_ARCH_NETWINDER
763 hcr = inb(iobase+HCR); 738 hcr = inb(iobase+HCR);
764 outb(hcr | HCR_EN_DMA, iobase+HCR); 739 outb(hcr | HCR_EN_DMA, iobase+HCR);
765 enable_dma(self->io.dma); 740 enable_dma(self->io.dma);