broadcom-wl: get the mmio address directly from the struct if bcma is used.
[openwrt/.git] / package / broadcom-wl / src / glue / wl_glue.c
index 638a65321a765ed1dbae641ca4526ad861f13dfd..bf009e5bbeec0f73c5fdc4c06b9b47d9ae5e187e 100644 (file)
@@ -88,7 +88,6 @@ static struct ssb_driver wl_glue_ssb_driver = {
 #ifdef CONFIG_BCMA
 static int wl_glue_bcma_probe(struct bcma_device *dev)
 {
-       void *mmio;
        void *wldev;
 
        if (!attach_cb)
@@ -109,8 +108,7 @@ static int wl_glue_bcma_probe(struct bcma_device *dev)
         * 0x1000     = BCMA_CORE_SIZE
         */
 
-       mmio = (void *) 0x18000000 + dev->core_index * 0x1000;
-       wldev = attach_cb(dev->id.manuf, dev->id.id, (ulong)mmio, dev, dev->irq);
+       wldev = attach_cb(dev->id.manuf, dev->id.id, (ulong)dev->io_addr, dev, dev->irq);
 
        if (!wldev)
        {
@@ -235,12 +233,6 @@ struct device * wl_glue_get_dmadev(void *dev)
 {
        struct device *dma_dev;
 
-       if (!wl_glue_attached)
-       {
-               BUG();
-               return NULL;
-       }
-
        switch (active_bus_type)
        {
 #ifdef CONFIG_SSB