staging: brcm80211: remove code for unsupported chip
authorFranky Lin <frankyl@broadcom.com>
Mon, 8 Aug 2011 13:58:30 +0000 (15:58 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 20:00:03 +0000 (13:00 -0700)
Currently fullmac only support bcm4329. Remove dead code for
unsupported chip.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c

index d6f0f921e562bd4a5101e71d5a3392c46b933ec5..846b6beff5abbd8d2ec9cc19470b4a698e9d1e2b 100644 (file)
 #include "dhd_dbg.h"
 #include "wl_cfg80211.h"
 
-#define BLOCK_SIZE_64 64
-#define BLOCK_SIZE_512 512
-#define BLOCK_SIZE_4318 64
-#define BLOCK_SIZE_4328 512
-
-/* private bus modes */
-#define SDIOH_MODE_SD4         2
-
 #define CLIENT_INTR            0x100   /* Get rid of this! */
 
 #if !defined(SDIO_VENDOR_ID_BROADCOM)
 #define SDIO_VENDOR_ID_BROADCOM                0x02d0
 #endif                         /* !defined(SDIO_VENDOR_ID_BROADCOM) */
 
-#define SDIO_DEVICE_ID_BROADCOM_DEFAULT        0x0000
-
 #define DMA_ALIGN_MASK 0x03
 
-#if !defined(SDIO_DEVICE_ID_BROADCOM_4325_SDGWB)
-#define SDIO_DEVICE_ID_BROADCOM_4325_SDGWB     0x0492  /* BCM94325SDGWB */
-#endif         /* !defined(SDIO_DEVICE_ID_BROADCOM_4325_SDGWB) */
-#if !defined(SDIO_DEVICE_ID_BROADCOM_4325)
-#define SDIO_DEVICE_ID_BROADCOM_4325   0x0493
-#endif         /* !defined(SDIO_DEVICE_ID_BROADCOM_4325) */
 #if !defined(SDIO_DEVICE_ID_BROADCOM_4329)
 #define SDIO_DEVICE_ID_BROADCOM_4329   0x4329
 #endif         /* !defined(SDIO_DEVICE_ID_BROADCOM_4329) */
-#if !defined(SDIO_DEVICE_ID_BROADCOM_4319)
-#define SDIO_DEVICE_ID_BROADCOM_4319   0x4319
-#endif         /* !defined(SDIO_DEVICE_ID_BROADCOM_4329) */
 
 /* Common msglevel constants */
 #define SDH_ERROR_VAL          0x0001  /* Error */
@@ -136,12 +117,6 @@ uint sd_f2_blocksize = 512;        /* Default blocksize */
 
 uint sd_msglevel = 0x01;
 
-/* module param defaults */
-static int clockoverride;
-
-module_param(clockoverride, int, 0644);
-MODULE_PARM_DESC(clockoverride, "SDIO card clock override");
-
 struct brcmf_sdmmc_instance *gInstance;
 static atomic_t brcmf_mmc_suspend;
 
@@ -149,12 +124,7 @@ struct device sdmmc_dev;
 
 /* devices we support, null terminated */
 static const struct sdio_device_id brcmf_sdmmc_ids[] = {
-       {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_DEFAULT)},
-       {SDIO_DEVICE
-        (SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4325_SDGWB)},
-       {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4325)},
        {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4329)},
-       {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4319)},
        { /* end: all zeroes */ },
 };
 
@@ -498,10 +468,10 @@ brcmf_sdioh_iovar_op(struct sdioh_info *si, const char *name,
                                maxsize = 32;
                                break;
                        case 1:
-                               maxsize = BLOCK_SIZE_4318;
+                               maxsize = 64;
                                break;
                        case 2:
-                               maxsize = BLOCK_SIZE_4328;
+                               maxsize = 512;
                                break;
                        default:
                                maxsize = 0;
@@ -1058,12 +1028,6 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
                sdio_func_0.num = 0;
                sdio_func_0.card = func->card;
                gInstance->func[0] = &sdio_func_0;
-               if (func->device == 0x4) {      /* 4318 */
-                       gInstance->func[2] = NULL;
-                       sd_trace(("NIC found, calling brcmf_sdio_probe...\n"));
-                       ret = brcmf_sdio_probe(&sdmmc_dev);
-               }
-               atomic_set(&brcmf_mmc_suspend, false);
        }
 
        gInstance->func[func->num] = func;
index e9806c3c1f8281e3d7469c0b0afec7c3217a070e..fe114788676566449e1c2042cb8421c8cf5fb070 100644 (file)
@@ -1273,8 +1273,7 @@ int brcmf_sdbrcm_bussleep(struct brcmf_bus *bus, bool sleep)
                        SBSDIO_FORCE_HW_CLKREQ_OFF, NULL);
 
                /* Isolate the bus */
-               if (bus->ci->chip != BCM4329_CHIP_ID
-                   && bus->ci->chip != BCM4319_CHIP_ID) {
+               if (bus->ci->chip != BCM4329_CHIP_ID) {
                        brcmf_sdcard_cfg_write(card, SDIO_FUNC_1,
                                SBSDIO_DEVICE_CTL,
                                SBSDIO_DEVCTL_PADS_ISO, NULL);
@@ -5401,12 +5400,8 @@ done:
 
 static bool brcmf_sdbrcm_chipmatch(u16 chipid)
 {
-       if (chipid == BCM4325_CHIP_ID)
-               return true;
        if (chipid == BCM4329_CHIP_ID)
                return true;
-       if (chipid == BCM4319_CHIP_ID)
-               return true;
        return false;
 }
 
@@ -5461,22 +5456,12 @@ static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
 
        /* Check the Device ID and make sure it's one that we support */
        switch (devid) {
-       case BCM4325_D11DUAL_ID:        /* 4325 802.11a/g id */
-       case BCM4325_D11G_ID:   /* 4325 802.11g 2.4Ghz band id */
-       case BCM4325_D11A_ID:   /* 4325 802.11a 5Ghz band id */
-               BRCMF_INFO(("%s: found 4325 Dongle\n", __func__));
-               break;
        case BCM4329_D11NDUAL_ID:       /* 4329 802.11n dualband device */
        case BCM4329_D11N2G_ID: /* 4329 802.11n 2.4G device */
        case BCM4329_D11N5G_ID: /* 4329 802.11n 5G device */
        case 0x4329:
                BRCMF_INFO(("%s: found 4329 Dongle\n", __func__));
                break;
-       case BCM4319_D11N_ID:   /* 4319 802.11n id */
-       case BCM4319_D11N2G_ID: /* 4319 802.11n2g id */
-       case BCM4319_D11N5G_ID: /* 4319 802.11n5g id */
-               BRCMF_INFO(("%s: found 4319 Dongle\n", __func__));
-               break;
        case 0:
                BRCMF_INFO(("%s: allow device id 0, will check chip"
                            " internals\n", __func__));