9 #include <linux/kernel.h>
10 #include <linux/module.h>
14 #include <linux/slab.h>
16 #include <linux/pci.h>
23 #define PFX "bcm63xx_pcmcia: "
28 static struct pci_dev *bcm63xx_cb_dev;
105 spin_unlock_irqrestore(&skt->
lock, flags);
123 static const u8 vscd_to_cardtype[] = {
177 unsigned int stat = 0;
249 static int bcm63xx_pcmcia_get_status(
struct pcmcia_socket *sock,
256 spin_lock_bh(&skt->
lock);
257 *status = __get_socket_status(skt);
258 spin_unlock_bh(&skt->
lock);
266 static void bcm63xx_pcmcia_poll(
unsigned long data)
273 spin_lock_bh(&skt->
lock);
275 stat = __get_socket_status(skt);
281 spin_unlock_bh(&skt->
lock);
290 static int bcm63xx_pcmcia_set_io_map(
struct pcmcia_socket *sock,
298 static int bcm63xx_pcmcia_set_mem_map(
struct pcmcia_socket *sock,
315 .init = bcm63xx_pcmcia_sock_init,
316 .suspend = bcm63xx_pcmcia_suspend,
317 .get_status = bcm63xx_pcmcia_get_status,
318 .set_socket = bcm63xx_pcmcia_set_socket,
319 .set_io_map = bcm63xx_pcmcia_set_io_map,
320 .set_mem_map = bcm63xx_pcmcia_set_mem_map,
346 skt->
pd = pdev->
dev.platform_data;
354 regmem_size = resource_size(res);
378 sock->
ops = &bcm63xx_pcmcia_operations;
380 sock->
dev.parent = &pdev->
dev;
385 #ifdef CONFIG_CARDBUS
386 sock->
cb_dev = bcm63xx_cb_dev;
425 platform_set_drvdata(pdev, skt);
444 skt = platform_get_drvdata(pdev);
455 .probe = bcm63xx_drv_pcmcia_probe,
458 .name =
"bcm63xx_pcmcia",
463 #ifdef CONFIG_CARDBUS
468 bcm63xx_cb_dev =
dev;
475 bcm63xx_cb_dev =
NULL;
502 static struct pci_driver bcm63xx_cardbus_driver = {
503 .
name =
"bcm63xx_cardbus",
504 .id_table = bcm63xx_cb_table,
505 .probe = bcm63xx_cb_probe,
514 static int __init bcm63xx_pcmcia_init(
void)
516 #ifdef CONFIG_CARDBUS
517 return pci_register_driver(&bcm63xx_cardbus_driver);
523 static void __exit bcm63xx_pcmcia_exit(
void)
525 #ifdef CONFIG_CARDBUS