staging: brcm80211: remove iovars IOV_SDMODE
authorFranky Lin <frankyl@broadcom.com>
Wed, 1 Jun 2011 11:45:04 +0000 (13:45 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Jun 2011 19:36:48 +0000 (12:36 -0700)
Remove unused sdio related iovars IOV_SDMODE for fullmac driver

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

index 375577441a4dd34cbb31a33e07b19501105260a0..789922b41770b90beab585544fb9b9369bd18a0a 100644 (file)
@@ -365,9 +365,6 @@ void bcmsdh_unregister_oob_intr(void)
 extern uint sd_msglevel;       /* Debug message level */
 module_param(sd_msglevel, uint, 0);
 
-extern uint sd_sdmode;         /* Default is SD4, 0=SPI, 1=SD1, 2=SD4 */
-module_param(sd_sdmode, uint, 0);
-
 extern uint sd_hiok;           /* Ok to use hi-speed mode */
 module_param(sd_hiok, uint, 0);
 
index c817e5e38224703062c05d4228597205868bcd63..2422890582905e7698046c21a69878c9406a68d6 100644 (file)
@@ -45,7 +45,6 @@ extern int sdio_reset_comm(struct mmc_card *card);
 
 extern PBCMSDH_SDMMC_INSTANCE gInstance;
 
-uint sd_sdmode = SDIOH_MODE_SD4;       /* Use SD4 mode by default */
 uint sd_f2_blocksize = 512;    /* Default blocksize */
 
 uint sd_hiok = false;          /* Don't use hi-speed mode by default */
@@ -350,7 +349,6 @@ enum {
        IOV_USEINTS,
        IOV_NUMINTS,
        IOV_DEVREG,
-       IOV_SDMODE,
        IOV_HISPEED,
        IOV_HCIREGS,
        IOV_RXCHAIN
@@ -364,8 +362,6 @@ const bcm_iovar_t sdioh_iovars[] = {
        {"sd_numints", IOV_NUMINTS, 0, IOVT_UINT32, 0},
        {"sd_devreg", IOV_DEVREG, 0, IOVT_BUFFER, sizeof(sdreg_t)}
        ,
-       {"sd_mode", IOV_SDMODE, 0, IOVT_UINT32, 100}
-       ,
        {"sd_highspeed", IOV_HISPEED, 0, IOVT_UINT32, 0}
        ,
        {"sd_rxchain", IOV_RXCHAIN, 0, IOVT_BOOL, 0}
@@ -498,15 +494,6 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
 
                break;
 
-       case IOV_GVAL(IOV_SDMODE):
-               int_val = (u32) sd_sdmode;
-               memcpy(arg, &int_val, val_size);
-               break;
-
-       case IOV_SVAL(IOV_SDMODE):
-               sd_sdmode = int_val;
-               break;
-
        case IOV_GVAL(IOV_HISPEED):
                int_val = (u32) sd_hiok;
                memcpy(arg, &int_val, val_size);
index 86f88bf9a259a5d771521ea34b12f0c03a56d7fd..42c71a853b6696acbda0669a65191e0365e7719d 100644 (file)
@@ -88,7 +88,6 @@ struct sdioh_info {
        bool sd_blockmode;      /* sd_blockmode == false => 64 Byte Cmd 53s. */
        /*  Must be on for sd_multiblock to be effective */
        bool use_client_ints;   /* If this is false, make sure to restore */
-       int sd_mode;            /* SD1/SD4/SPI */
        int client_block_size[SDIOD_MAX_IOFUNCS];       /* Blocksize */
        u8 num_funcs;   /* Supported funcs on client */
        u32 com_cis_ptr;
index e6ea714581a5ce21f63d4e7363487a4028f467f2..5d747b851ed7cde8fd0bf9d93b82e5ddaa5c4bc3 100644 (file)
@@ -253,7 +253,6 @@ typedef struct dhd_bus {
        s32 idletime;           /* Control for activity timeout */
        s32 idlecount;  /* Activity timeout counter */
        s32 idleclock;  /* How to set bus driver when idle */
-       s32 sd_mode;            /* Mode control to bus driver */
        s32 sd_rxchain; /* If bcmsdh api accepts PKT chains */
        bool use_rxchain;       /* If dhd should use PKT chains */
        bool sleeping;          /* Is SDIO bus sleeping? */
@@ -659,47 +658,12 @@ static int dhdsdio_htclk(dhd_bus_t *bus, bool on, bool pendok)
 /* Change idle/active SD state */
 static int dhdsdio_sdclk(dhd_bus_t *bus, bool on)
 {
-       int err;
-       s32 iovalue;
-
        DHD_TRACE(("%s: Enter\n", __func__));
 
-       if (on) {
-               if (bus->idleclock == DHD_IDLE_STOP) {
-                       iovalue = bus->sd_mode;
-                       err = bcmsdh_iovar_op(bus->sdh, "sd_mode", NULL, 0,
-                                             &iovalue, sizeof(iovalue), true);
-                       if (err) {
-                               DHD_ERROR(("%s: error changing sd_mode: %d\n",
-                                          __func__, err));
-                               return -EBADE;
-                       }
-               }
+       if (on)
                bus->clkstate = CLK_SDONLY;
-       } else {
-               /* Stop or slow the SD clock itself */
-               if (bus->sd_mode == -1) {
-                       DHD_TRACE(("%s: can't idle clock, mode %d\n",
-                                  __func__, bus->sd_mode));
-                       return -EBADE;
-               }
-               if (bus->idleclock == DHD_IDLE_STOP) {
-                       if (sd1idle) {
-                               /* Change to SD1 mode and turn off clock */
-                               iovalue = 1;
-                               err =
-                                   bcmsdh_iovar_op(bus->sdh, "sd_mode", NULL,
-                                                   0, &iovalue,
-                                                   sizeof(iovalue), true);
-                               if (err) {
-                                       DHD_ERROR(("%s: error changing sd_clock: %d\n",
-                                               __func__, err));
-                                       return -EBADE;
-                               }
-                       }
-               }
+       else
                bus->clkstate = CLK_NONE;
-       }
 
        return 0;
 }
@@ -2670,21 +2634,6 @@ dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
                    bcmsdh_iovar_op(bus->sdh, name, params, plen, arg, len,
                                    set);
 
-               /* Check for bus configuration changes of interest */
-
-               /* If it was a mode change, read the new one */
-               if (set && strcmp(name, "sd_mode") == 0) {
-                       if (bcmsdh_iovar_op(bus->sdh, "sd_mode", NULL, 0,
-                                           &bus->sd_mode, sizeof(s32),
-                                           false) != 0) {
-                               bus->sd_mode = -1;
-                               DHD_ERROR(("%s: fail on %s get\n", __func__,
-                                          name));
-                       } else {
-                               DHD_INFO(("%s: noted %s update, value now %d\n",
-                                         __func__, name, bus->sd_mode));
-                       }
-               }
                /* Similar check for blocksize change */
                if (set && strcmp(name, "sd_blocksize") == 0) {
                        s32 fnum = 2;
@@ -5315,16 +5264,6 @@ static bool dhdsdio_probe_init(dhd_bus_t *bus, void *sdh)
        bus->idletime = (s32) dhd_idletime;
        bus->idleclock = DHD_IDLE_ACTIVE;
 
-       /* Query the SD bus mode */
-       if (bcmsdh_iovar_op(sdh, "sd_mode", NULL, 0,
-                           &bus->sd_mode, sizeof(s32), false) != 0) {
-               DHD_ERROR(("%s: fail on %s get\n", __func__, "sd_mode"));
-               bus->sd_mode = -1;
-       } else {
-               DHD_INFO(("%s: Initial value for %s is %d\n",
-                         __func__, "sd_mode", bus->sd_mode));
-       }
-
        /* Query the F2 block size, set roundup accordingly */
        fnum = 2;
        if (bcmsdh_iovar_op(sdh, "sd_blocksize", &fnum, sizeof(s32),