aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/bt3c_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/bt3c_cs.c')
-rw-r--r--drivers/bluetooth/bt3c_cs.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index 21e05fdc9121..7ab8f29d5e0d 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -45,7 +45,6 @@
45#include <linux/device.h> 45#include <linux/device.h>
46#include <linux/firmware.h> 46#include <linux/firmware.h>
47 47
48#include <pcmcia/cs_types.h>
49#include <pcmcia/cs.h> 48#include <pcmcia/cs.h>
50#include <pcmcia/cistpl.h> 49#include <pcmcia/cistpl.h>
51#include <pcmcia/ciscode.h> 50#include <pcmcia/ciscode.h>
@@ -189,7 +188,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info)
189 return; 188 return;
190 189
191 do { 190 do {
192 register unsigned int iobase = info->p_dev->io.BasePort1; 191 register unsigned int iobase = info->p_dev->resource[0]->start;
193 register struct sk_buff *skb; 192 register struct sk_buff *skb;
194 register int len; 193 register int len;
195 194
@@ -227,7 +226,7 @@ static void bt3c_receive(bt3c_info_t *info)
227 return; 226 return;
228 } 227 }
229 228
230 iobase = info->p_dev->io.BasePort1; 229 iobase = info->p_dev->resource[0]->start;
231 230
232 avail = bt3c_read(iobase, 0x7006); 231 avail = bt3c_read(iobase, 0x7006);
233 //printk("bt3c_cs: receiving %d bytes\n", avail); 232 //printk("bt3c_cs: receiving %d bytes\n", avail);
@@ -348,7 +347,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
348 /* our irq handler is shared */ 347 /* our irq handler is shared */
349 return IRQ_NONE; 348 return IRQ_NONE;
350 349
351 iobase = info->p_dev->io.BasePort1; 350 iobase = info->p_dev->resource[0]->start;
352 351
353 spin_lock(&(info->lock)); 352 spin_lock(&(info->lock));
354 353
@@ -481,7 +480,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,
481 unsigned int iobase, size, addr, fcs, tmp; 480 unsigned int iobase, size, addr, fcs, tmp;
482 int i, err = 0; 481 int i, err = 0;
483 482
484 iobase = info->p_dev->io.BasePort1; 483 iobase = info->p_dev->resource[0]->start;
485 484
486 /* Reset */ 485 /* Reset */
487 bt3c_io_write(iobase, 0x8040, 0x0404); 486 bt3c_io_write(iobase, 0x8040, 0x0404);
@@ -658,8 +657,8 @@ static int bt3c_probe(struct pcmcia_device *link)
658 info->p_dev = link; 657 info->p_dev = link;
659 link->priv = info; 658 link->priv = info;
660 659
661 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 660 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
662 link->io.NumPorts1 = 8; 661 link->resource[0]->end = 8;
663 662
664 link->conf.Attributes = CONF_ENABLE_IRQ; 663 link->conf.Attributes = CONF_ENABLE_IRQ;
665 link->conf.IntType = INT_MEMORY_AND_IO; 664 link->conf.IntType = INT_MEMORY_AND_IO;
@@ -684,14 +683,14 @@ static int bt3c_check_config(struct pcmcia_device *p_dev,
684{ 683{
685 unsigned long try = (unsigned long) priv_data; 684 unsigned long try = (unsigned long) priv_data;
686 685
686 p_dev->io_lines = (try == 0) ? 16 : cf->io.flags & CISTPL_IO_LINES_MASK;
687
687 if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM)) 688 if (cf->vpp1.present & (1 << CISTPL_POWER_VNOM))
688 p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000; 689 p_dev->conf.Vpp = cf->vpp1.param[CISTPL_POWER_VNOM] / 10000;
689 if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) && 690 if ((cf->io.nwin > 0) && (cf->io.win[0].len == 8) &&
690 (cf->io.win[0].base != 0)) { 691 (cf->io.win[0].base != 0)) {
691 p_dev->io.BasePort1 = cf->io.win[0].base; 692 p_dev->resource[0]->start = cf->io.win[0].base;
692 p_dev->io.IOAddrLines = (try == 0) ? 16 : 693 if (!pcmcia_request_io(p_dev))
693 cf->io.flags & CISTPL_IO_LINES_MASK;
694 if (!pcmcia_request_io(p_dev, &p_dev->io))
695 return 0; 694 return 0;
696 } 695 }
697 return -ENODEV; 696 return -ENODEV;
@@ -708,9 +707,9 @@ static int bt3c_check_config_notpicky(struct pcmcia_device *p_dev,
708 707
709 if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) { 708 if ((cf->io.nwin > 0) && ((cf->io.flags & CISTPL_IO_LINES_MASK) <= 3)) {
710 for (j = 0; j < 5; j++) { 709 for (j = 0; j < 5; j++) {
711 p_dev->io.BasePort1 = base[j]; 710 p_dev->resource[0]->start = base[j];
712 p_dev->io.IOAddrLines = base[j] ? 16 : 3; 711 p_dev->io_lines = base[j] ? 16 : 3;
713 if (!pcmcia_request_io(p_dev, &p_dev->io)) 712 if (!pcmcia_request_io(p_dev))
714 return 0; 713 return 0;
715 } 714 }
716 } 715 }