24 #include <linux/module.h>
25 #include <linux/slab.h>
47 for (i = 0; i < timeout; i++) {
48 val = bcma_read32(dev, reg);
49 if ((val & bitmask) == bitmask)
59 #ifdef CONFIG_BCMA_DRIVER_MIPS
61 if (dev->
bus->chipinfo.id == 0x4716) {
67 else if (tmp == 453000000)
76 bcma_write32(dev, 0x524, 0x1);
79 bcma_write32(dev, 0x524, tmp);
81 bcma_write32(dev, 0x524, 0x4ab);
83 bcma_read32(dev, 0x528);
84 bcma_write32(dev, 0x528, 0x80000000);
108 if (dev->
id.rev >= 5) {
110 tmp = bcma_read32(dev, 0x1e0);
112 bcma_write32(dev, 0x1e0, tmp);
113 if (bcma_wait_bits(dev, 0x1e0, 1 << 24, 100))
117 bcma_write32(dev, 0x200, 0x4ff);
119 bcma_write32(dev, 0x200, 0x6ff);
123 bcma_write32(dev, 0x524, 0x6b);
125 tmp = bcma_read32(dev, 0x524);
127 bcma_write32(dev, 0x524, 0xab);
129 tmp = bcma_read32(dev, 0x524);
131 bcma_write32(dev, 0x524, 0x2b);
133 tmp = bcma_read32(dev, 0x524);
135 bcma_write32(dev, 0x524, 0x10ab);
137 tmp = bcma_read32(dev, 0x524);
139 if (bcma_wait_bits(dev, 0x528, 0xc000, 10000)) {
140 tmp = bcma_read32(dev, 0x528);
142 "USB20H mdio_rddata 0x%08x\n", tmp);
144 bcma_write32(dev, 0x528, 0x80000000);
145 tmp = bcma_read32(dev, 0x314);
147 bcma_write32(dev, 0x200, 0x7ff);
151 bcma_write32(dev, 0x510, 0);
153 bcma_write32(dev, 0x200, 0x7ff);
158 bcma_hcd_4716wa(dev);
175 memset(hci_res, 0,
sizeof(hci_res));
177 hci_res[0].start =
addr;
178 hci_res[0].end = hci_res[0].start + 0x1000 - 1;
181 hci_res[1].start = dev->
irq;
185 "ehci-platform" , 0);
189 hci_dev->
dev.parent = &dev->
dev;
190 hci_dev->
dev.dma_mask = &hci_dev->
dev.coherent_dma_mask;
223 chipinfo = &dev->
bus->chipinfo;
225 chipid_top = (chipinfo->
id & 0xFF00);
226 if (chipid_top != 0x4700 && chipid_top != 0x5300)
239 bcma_hcd_init_chip(dev);
242 ohci_addr = dev->
addr1;
243 if ((chipinfo->
id == 0x5357 || chipinfo->
id == 0x4749)
244 && chipinfo->
rev == 0)
245 ohci_addr = 0x18009000;
247 usb_dev->
ohci_dev = bcma_hcd_create_pdev(dev,
true, ohci_addr);
250 goto err_free_usb_dev;
253 usb_dev->
ehci_dev = bcma_hcd_create_pdev(dev,
false, dev->
addr);
256 goto err_unregister_ohci_dev;
259 bcma_set_drvdata(dev, usb_dev);
262 err_unregister_ohci_dev:
283 static void bcma_hcd_shutdown(
struct bcma_device *dev)
305 #define bcma_hcd_suspend NULL
306 #define bcma_hcd_resume NULL
316 .name = KBUILD_MODNAME,
317 .id_table = bcma_hcd_table,
318 .probe = bcma_hcd_probe,
320 .shutdown = bcma_hcd_shutdown,
325 static int __init bcma_hcd_init(
void)
331 static void __exit bcma_hcd_exit(
void)