15 #include <linux/kernel.h>
19 #include <linux/slab.h>
26 #define HNBU_CHIPID 0x01
28 #define B43_SDIO_BLOCK_SIZE 64
31 static const struct b43_sdio_quirk {
35 } b43_sdio_quirks[] = {
43 const struct b43_sdio_quirk *
q;
45 for (q = b43_sdio_quirks; q->quirks; q++) {
46 if (vendor == q->vendor && device == q->device)
53 static void b43_sdio_interrupt_dispatcher(
struct sdio_func *
func)
62 sdio->irq_handler(dev);
74 sdio->irq_handler_opaque =
dev;
92 sdio->irq_handler_opaque =
NULL;
93 sdio->irq_handler =
NULL;
99 struct b43_sdio *sdio;
101 u16 vendor = 0, device = 0;
107 switch (tuple->
code) {
109 switch (tuple->
data[0]) {
111 if (tuple->
size != 5)
113 vendor = tuple->
data[1] | (tuple->
data[2]<<8);
114 device = tuple->
data[3] | (tuple->
data[4]<<8);
127 if (!vendor || !device) {
135 dev_err(&func->
dev,
"failed to set block size to %u bytes,"
137 goto err_release_host;
141 dev_err(&func->
dev,
"failed to enable func, error %d\n", error);
142 goto err_release_host;
149 dev_err(&func->
dev,
"failed to allocate ssb bus\n");
150 goto err_disable_func;
152 error = ssb_bus_sdiobus_register(&sdio->ssb, func,
153 b43_sdio_get_quirks(vendor, device));
155 dev_err(&func->
dev,
"failed to register ssb sdio bus,"
156 " error %d\n", error);
194 .id_table = b43_sdio_ids,
195 .probe = b43_sdio_probe,