diff options
author | Michael Buesch <mb@bu3sch.de> | 2008-03-10 12:26:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-13 19:32:32 -0400 |
commit | e7ec2e3230633a858af1b0b359f6c4670dbeb997 (patch) | |
tree | c43dbd7f6cab0ac066c039697528312d802617ef /drivers/ssb/main.c | |
parent | 068edceb7e73c05f77e204442ea8f86e238575da (diff) |
ssb: Add SPROM/invariants support for PCMCIA devices
This adds support for reading/writing the SPROM invariants
for PCMCIA based devices.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/ssb/main.c')
-rw-r--r-- | drivers/ssb/main.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index 49d7bbb9bea7..e12371916444 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -69,6 +69,25 @@ found: | |||
69 | } | 69 | } |
70 | #endif /* CONFIG_SSB_PCIHOST */ | 70 | #endif /* CONFIG_SSB_PCIHOST */ |
71 | 71 | ||
72 | #ifdef CONFIG_SSB_PCMCIAHOST | ||
73 | struct ssb_bus *ssb_pcmcia_dev_to_bus(struct pcmcia_device *pdev) | ||
74 | { | ||
75 | struct ssb_bus *bus; | ||
76 | |||
77 | ssb_buses_lock(); | ||
78 | list_for_each_entry(bus, &buses, list) { | ||
79 | if (bus->bustype == SSB_BUSTYPE_PCMCIA && | ||
80 | bus->host_pcmcia == pdev) | ||
81 | goto found; | ||
82 | } | ||
83 | bus = NULL; | ||
84 | found: | ||
85 | ssb_buses_unlock(); | ||
86 | |||
87 | return bus; | ||
88 | } | ||
89 | #endif /* CONFIG_SSB_PCMCIAHOST */ | ||
90 | |||
72 | int ssb_for_each_bus_call(unsigned long data, | 91 | int ssb_for_each_bus_call(unsigned long data, |
73 | int (*func)(struct ssb_bus *bus, unsigned long data)) | 92 | int (*func)(struct ssb_bus *bus, unsigned long data)) |
74 | { | 93 | { |
@@ -398,7 +417,7 @@ void ssb_bus_unregister(struct ssb_bus *bus) | |||
398 | list_del(&bus->list); | 417 | list_del(&bus->list); |
399 | ssb_buses_unlock(); | 418 | ssb_buses_unlock(); |
400 | 419 | ||
401 | /* ssb_pcmcia_exit(bus); */ | 420 | ssb_pcmcia_exit(bus); |
402 | ssb_pci_exit(bus); | 421 | ssb_pci_exit(bus); |
403 | ssb_iounmap(bus); | 422 | ssb_iounmap(bus); |
404 | } | 423 | } |
@@ -663,7 +682,7 @@ out: | |||
663 | err_dequeue: | 682 | err_dequeue: |
664 | list_del(&bus->list); | 683 | list_del(&bus->list); |
665 | err_pcmcia_exit: | 684 | err_pcmcia_exit: |
666 | /* ssb_pcmcia_exit(bus); */ | 685 | ssb_pcmcia_exit(bus); |
667 | err_pci_exit: | 686 | err_pci_exit: |
668 | ssb_pci_exit(bus); | 687 | ssb_pci_exit(bus); |
669 | err_unmap: | 688 | err_unmap: |