aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/bluecard_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/bluecard_cs.c')
-rw-r--r--drivers/bluetooth/bluecard_cs.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index 6d34f405a2f3..d52e90a5a617 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -39,7 +39,6 @@
39#include <linux/skbuff.h> 39#include <linux/skbuff.h>
40#include <linux/io.h> 40#include <linux/io.h>
41 41
42#include <pcmcia/cs_types.h>
43#include <pcmcia/cs.h> 42#include <pcmcia/cs.h>
44#include <pcmcia/cistpl.h> 43#include <pcmcia/cistpl.h>
45#include <pcmcia/ciscode.h> 44#include <pcmcia/ciscode.h>
@@ -160,7 +159,7 @@ static void bluecard_detach(struct pcmcia_device *p_dev);
160static void bluecard_activity_led_timeout(u_long arg) 159static void bluecard_activity_led_timeout(u_long arg)
161{ 160{
162 bluecard_info_t *info = (bluecard_info_t *)arg; 161 bluecard_info_t *info = (bluecard_info_t *)arg;
163 unsigned int iobase = info->p_dev->io.BasePort1; 162 unsigned int iobase = info->p_dev->resource[0]->start;
164 163
165 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 164 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
166 return; 165 return;
@@ -177,7 +176,7 @@ static void bluecard_activity_led_timeout(u_long arg)
177 176
178static void bluecard_enable_activity_led(bluecard_info_t *info) 177static void bluecard_enable_activity_led(bluecard_info_t *info)
179{ 178{
180 unsigned int iobase = info->p_dev->io.BasePort1; 179 unsigned int iobase = info->p_dev->resource[0]->start;
181 180
182 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 181 if (!test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
183 return; 182 return;
@@ -233,7 +232,7 @@ static void bluecard_write_wakeup(bluecard_info_t *info)
233 } 232 }
234 233
235 do { 234 do {
236 register unsigned int iobase = info->p_dev->io.BasePort1; 235 register unsigned int iobase = info->p_dev->resource[0]->start;
237 register unsigned int offset; 236 register unsigned int offset;
238 register unsigned char command; 237 register unsigned char command;
239 register unsigned long ready_bit; 238 register unsigned long ready_bit;
@@ -380,7 +379,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)
380 return; 379 return;
381 } 380 }
382 381
383 iobase = info->p_dev->io.BasePort1; 382 iobase = info->p_dev->resource[0]->start;
384 383
385 if (test_bit(XMIT_SENDING_READY, &(info->tx_state))) 384 if (test_bit(XMIT_SENDING_READY, &(info->tx_state)))
386 bluecard_enable_activity_led(info); 385 bluecard_enable_activity_led(info);
@@ -509,7 +508,7 @@ static irqreturn_t bluecard_interrupt(int irq, void *dev_inst)
509 if (!test_bit(CARD_READY, &(info->hw_state))) 508 if (!test_bit(CARD_READY, &(info->hw_state)))
510 return IRQ_HANDLED; 509 return IRQ_HANDLED;
511 510
512 iobase = info->p_dev->io.BasePort1; 511 iobase = info->p_dev->resource[0]->start;
513 512
514 spin_lock(&(info->lock)); 513 spin_lock(&(info->lock));
515 514
@@ -623,7 +622,7 @@ static int bluecard_hci_flush(struct hci_dev *hdev)
623static int bluecard_hci_open(struct hci_dev *hdev) 622static int bluecard_hci_open(struct hci_dev *hdev)
624{ 623{
625 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); 624 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
626 unsigned int iobase = info->p_dev->io.BasePort1; 625 unsigned int iobase = info->p_dev->resource[0]->start;
627 626
628 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) 627 if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state)))
629 bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE); 628 bluecard_hci_set_baud_rate(hdev, DEFAULT_BAUD_RATE);
@@ -643,7 +642,7 @@ static int bluecard_hci_open(struct hci_dev *hdev)
643static int bluecard_hci_close(struct hci_dev *hdev) 642static int bluecard_hci_close(struct hci_dev *hdev)
644{ 643{
645 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data); 644 bluecard_info_t *info = (bluecard_info_t *)(hdev->driver_data);
646 unsigned int iobase = info->p_dev->io.BasePort1; 645 unsigned int iobase = info->p_dev->resource[0]->start;
647 646
648 if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags))) 647 if (!test_and_clear_bit(HCI_RUNNING, &(hdev->flags)))
649 return 0; 648 return 0;
@@ -710,7 +709,7 @@ static int bluecard_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned l
710 709
711static int bluecard_open(bluecard_info_t *info) 710static int bluecard_open(bluecard_info_t *info)
712{ 711{
713 unsigned int iobase = info->p_dev->io.BasePort1; 712 unsigned int iobase = info->p_dev->resource[0]->start;
714 struct hci_dev *hdev; 713 struct hci_dev *hdev;
715 unsigned char id; 714 unsigned char id;
716 715
@@ -829,7 +828,7 @@ static int bluecard_open(bluecard_info_t *info)
829 828
830static int bluecard_close(bluecard_info_t *info) 829static int bluecard_close(bluecard_info_t *info)
831{ 830{
832 unsigned int iobase = info->p_dev->io.BasePort1; 831 unsigned int iobase = info->p_dev->resource[0]->start;
833 struct hci_dev *hdev = info->hdev; 832 struct hci_dev *hdev = info->hdev;
834 833
835 if (!hdev) 834 if (!hdev)
@@ -866,9 +865,6 @@ static int bluecard_probe(struct pcmcia_device *link)
866 info->p_dev = link; 865 info->p_dev = link;
867 link->priv = info; 866 link->priv = info;
868 867
869 link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
870 link->io.NumPorts1 = 8;
871
872 link->conf.Attributes = CONF_ENABLE_IRQ; 868 link->conf.Attributes = CONF_ENABLE_IRQ;
873 link->conf.IntType = INT_MEMORY_AND_IO; 869 link->conf.IntType = INT_MEMORY_AND_IO;
874 870
@@ -891,12 +887,14 @@ static int bluecard_config(struct pcmcia_device *link)
891 int i, n; 887 int i, n;
892 888
893 link->conf.ConfigIndex = 0x20; 889 link->conf.ConfigIndex = 0x20;
894 link->io.NumPorts1 = 64; 890
895 link->io.IOAddrLines = 6; 891 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
892 link->resource[0]->end = 64;
893 link->io_lines = 6;
896 894
897 for (n = 0; n < 0x400; n += 0x40) { 895 for (n = 0; n < 0x400; n += 0x40) {
898 link->io.BasePort1 = n ^ 0x300; 896 link->resource[0]->start = n ^ 0x300;
899 i = pcmcia_request_io(link, &link->io); 897 i = pcmcia_request_io(link);
900 if (i == 0) 898 if (i == 0)
901 break; 899 break;
902 } 900 }