]> git.karo-electronics.de Git - linux-beck.git/commitdiff
brcmfmac: remove unused parameter of brcmf_sdcard_reg_write
authorFranky Lin <frankyl@broadcom.com>
Sat, 5 May 2012 01:27:29 +0000 (18:27 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 15 May 2012 21:27:55 +0000 (17:27 -0400)
The size parameter for brcmf_sdcard_reg_write is always 4. Remove it
to make the code cleaner.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_chip.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h

index 9966cf25320a4b1e2d102156066ac04e338c0cbf..7c9bc2b3001a6f6281983658730dd552ad94850f 100644 (file)
@@ -254,15 +254,14 @@ u32 brcmf_sdcard_reg_read(struct brcmf_sdio_dev *sdiodev, u32 addr)
        }
 }
 
-u32 brcmf_sdcard_reg_write(struct brcmf_sdio_dev *sdiodev, u32 addr, uint size,
-                          u32 data)
+u32 brcmf_sdcard_reg_write(struct brcmf_sdio_dev *sdiodev, u32 addr, u32 data)
 {
        int status;
        uint bar0 = addr & ~SBSDIO_SB_OFT_ADDR_MASK;
        int err = 0;
 
-       brcmf_dbg(INFO, "fun = 1, addr = 0x%x, uint%ddata = 0x%x\n",
-                 addr, size * 8, data);
+       brcmf_dbg(INFO, "fun = 1, addr = 0x%x, uint32data = 0x%x\n",
+                 addr, data);
 
        if (bar0 != sdiodev->sbwad) {
                err = brcmf_sdcard_set_sbaddr_window(sdiodev, bar0);
@@ -273,18 +272,17 @@ u32 brcmf_sdcard_reg_write(struct brcmf_sdio_dev *sdiodev, u32 addr, uint size,
        }
 
        addr &= SBSDIO_SB_OFT_ADDR_MASK;
-       if (size == 4)
-               addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
+       addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
        status =
            brcmf_sdioh_request_word(sdiodev, SDIOH_WRITE, SDIO_FUNC_1,
-                                    addr, &data, size);
+                                    addr, &data, 4);
        sdiodev->regfail = (status != 0);
 
        if (status == 0)
                return 0;
 
-       brcmf_dbg(ERROR, "error writing 0x%08x to addr 0x%04x size %d\n",
-                 data, addr, size);
+       brcmf_dbg(ERROR, "error writing 0x%08x to addr 0x%04x\n",
+                 data, addr);
        return 0xFFFFFFFF;
 }
 
index 0d1f3b8f400fa1c311701e1ee3fd116058abd15a..7ed215d5a891d2da46cea9e5a99810373a4d2154 100644 (file)
@@ -656,7 +656,7 @@ w_sdreg32(struct brcmf_sdio *bus, u32 regval, u32 reg_offset, u32 *retryvar)
        do {
                brcmf_sdcard_reg_write(bus->sdiodev,
                                       bus->ci->c_inf[idx].base + reg_offset,
-                                      sizeof(u32), regval);
+                                      regval);
        } while (brcmf_sdcard_regfail(bus->sdiodev) &&
                 (++(*retryvar) <= retry_limit));
        if (*retryvar) {
@@ -3782,8 +3782,7 @@ brcmf_sdbrcm_probe_attach(struct brcmf_sdio *bus, u32 regsva)
        reg_addr = bus->ci->c_inf[idx].base +
                   offsetof(struct sdpcmd_regs, corecontrol);
        reg_val = brcmf_sdcard_reg_read(bus->sdiodev, reg_addr);
-       brcmf_sdcard_reg_write(bus->sdiodev, reg_addr, sizeof(u32),
-                              reg_val | CC_BPRESEN);
+       brcmf_sdcard_reg_write(bus->sdiodev, reg_addr, reg_val | CC_BPRESEN);
 
        brcmu_pktq_init(&bus->txq, (PRIOMASK + 1), TXQLEN);
 
index b5688a706067ced79e2606ce745e55cd4d9fd263..3ced61380d9990722fdb84851d5c078a6d184f99 100644 (file)
@@ -171,7 +171,7 @@ brcmf_sdio_sb_coredisable(struct brcmf_sdio_dev *sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbtmstatelow));
                brcmf_sdcard_reg_write(sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbtmstatelow),
-                               4, regdata | SSB_TMSLOW_REJECT);
+                               regdata | SSB_TMSLOW_REJECT);
 
                regdata = brcmf_sdcard_reg_read(sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbtmstatelow));
@@ -192,7 +192,7 @@ brcmf_sdio_sb_coredisable(struct brcmf_sdio_dev *sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbimstate)) |
                                SSB_IMSTATE_REJECT;
                        brcmf_sdcard_reg_write(sdiodev,
-                               CORE_SB(ci->c_inf[idx].base, sbimstate), 4,
+                               CORE_SB(ci->c_inf[idx].base, sbimstate),
                                regdata);
                        regdata = brcmf_sdcard_reg_read(sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbimstate));
@@ -204,7 +204,7 @@ brcmf_sdio_sb_coredisable(struct brcmf_sdio_dev *sdiodev,
 
                /* set reset and reject while enabling the clocks */
                brcmf_sdcard_reg_write(sdiodev,
-                       CORE_SB(ci->c_inf[idx].base, sbtmstatelow), 4,
+                       CORE_SB(ci->c_inf[idx].base, sbtmstatelow),
                        (SSB_TMSLOW_FGC | SSB_TMSLOW_CLOCK |
                        SSB_TMSLOW_REJECT | SSB_TMSLOW_RESET));
                regdata = brcmf_sdcard_reg_read(sdiodev,
@@ -219,14 +219,14 @@ brcmf_sdio_sb_coredisable(struct brcmf_sdio_dev *sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbimstate)) &
                                ~SSB_IMSTATE_REJECT;
                        brcmf_sdcard_reg_write(sdiodev,
-                               CORE_SB(ci->c_inf[idx].base, sbimstate), 4,
+                               CORE_SB(ci->c_inf[idx].base, sbimstate),
                                regdata);
                }
        }
 
        /* leave reset and reject asserted */
        brcmf_sdcard_reg_write(sdiodev,
-               CORE_SB(ci->c_inf[idx].base, sbtmstatelow), 4,
+               CORE_SB(ci->c_inf[idx].base, sbtmstatelow),
                (SSB_TMSLOW_REJECT | SSB_TMSLOW_RESET));
        udelay(1);
 }
@@ -246,14 +246,13 @@ brcmf_sdio_ai_coredisable(struct brcmf_sdio_dev *sdiodev,
        if ((regdata & BCMA_RESET_CTL_RESET) != 0)
                return;
 
-       brcmf_sdcard_reg_write(sdiodev, ci->c_inf[idx].wrapbase+BCMA_IOCTL,
-                              4, 0);
+       brcmf_sdcard_reg_write(sdiodev, ci->c_inf[idx].wrapbase+BCMA_IOCTL, 0);
        regdata = brcmf_sdcard_reg_read(sdiodev,
                                        ci->c_inf[idx].wrapbase+BCMA_IOCTL);
        udelay(10);
 
        brcmf_sdcard_reg_write(sdiodev, ci->c_inf[idx].wrapbase+BCMA_RESET_CTL,
-                              4, BCMA_RESET_CTL_RESET);
+                              BCMA_RESET_CTL_RESET);
        udelay(1);
 }
 
@@ -278,7 +277,7 @@ brcmf_sdio_sb_resetcore(struct brcmf_sdio_dev *sdiodev,
         * forcing them on throughout the core
         */
        brcmf_sdcard_reg_write(sdiodev,
-                       CORE_SB(ci->c_inf[idx].base, sbtmstatelow), 4,
+                       CORE_SB(ci->c_inf[idx].base, sbtmstatelow),
                        SSB_TMSLOW_FGC | SSB_TMSLOW_CLOCK | SSB_TMSLOW_RESET);
        regdata = brcmf_sdcard_reg_read(sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbtmstatelow));
@@ -289,18 +288,18 @@ brcmf_sdio_sb_resetcore(struct brcmf_sdio_dev *sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbtmstatehigh));
        if (regdata & SSB_TMSHIGH_SERR)
                brcmf_sdcard_reg_write(sdiodev,
-                       CORE_SB(ci->c_inf[idx].base, sbtmstatehigh), 4, 0);
+                       CORE_SB(ci->c_inf[idx].base, sbtmstatehigh), 0);
 
        regdata = brcmf_sdcard_reg_read(sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbimstate));
        if (regdata & (SSB_IMSTATE_IBE | SSB_IMSTATE_TO))
                brcmf_sdcard_reg_write(sdiodev,
-                       CORE_SB(ci->c_inf[idx].base, sbimstate), 4,
+                       CORE_SB(ci->c_inf[idx].base, sbimstate),
                        regdata & ~(SSB_IMSTATE_IBE | SSB_IMSTATE_TO));
 
        /* clear reset and allow it to propagate throughout the core */
        brcmf_sdcard_reg_write(sdiodev,
-               CORE_SB(ci->c_inf[idx].base, sbtmstatelow), 4,
+               CORE_SB(ci->c_inf[idx].base, sbtmstatelow),
                SSB_TMSLOW_FGC | SSB_TMSLOW_CLOCK);
        regdata = brcmf_sdcard_reg_read(sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbtmstatelow));
@@ -309,7 +308,7 @@ brcmf_sdio_sb_resetcore(struct brcmf_sdio_dev *sdiodev,
        /* leave clock enabled */
        brcmf_sdcard_reg_write(sdiodev,
                               CORE_SB(ci->c_inf[idx].base, sbtmstatelow),
-                              4, SSB_TMSLOW_CLOCK);
+                              SSB_TMSLOW_CLOCK);
        regdata = brcmf_sdcard_reg_read(sdiodev,
                                CORE_SB(ci->c_inf[idx].base, sbtmstatelow));
        udelay(1);
@@ -329,15 +328,15 @@ brcmf_sdio_ai_resetcore(struct brcmf_sdio_dev *sdiodev,
 
        /* now do initialization sequence */
        brcmf_sdcard_reg_write(sdiodev, ci->c_inf[idx].wrapbase+BCMA_IOCTL,
-                              4, BCMA_IOCTL_FGC | BCMA_IOCTL_CLK);
+                              BCMA_IOCTL_FGC | BCMA_IOCTL_CLK);
        regdata = brcmf_sdcard_reg_read(sdiodev,
                                        ci->c_inf[idx].wrapbase+BCMA_IOCTL);
        brcmf_sdcard_reg_write(sdiodev, ci->c_inf[idx].wrapbase+BCMA_RESET_CTL,
-                              4, 0);
+                              0);
        udelay(1);
 
        brcmf_sdcard_reg_write(sdiodev, ci->c_inf[idx].wrapbase+BCMA_IOCTL,
-                              4, BCMA_IOCTL_CLK);
+                              BCMA_IOCTL_CLK);
        regdata = brcmf_sdcard_reg_read(sdiodev,
                                        ci->c_inf[idx].wrapbase+BCMA_IOCTL);
        udelay(1);
@@ -522,9 +521,9 @@ int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev,
        brcmf_sdio_chip_buscoresetup(sdiodev, ci);
 
        brcmf_sdcard_reg_write(sdiodev,
-               CORE_CC_REG(ci->c_inf[0].base, gpiopullup), 4, 0);
+               CORE_CC_REG(ci->c_inf[0].base, gpiopullup), 0);
        brcmf_sdcard_reg_write(sdiodev,
-               CORE_CC_REG(ci->c_inf[0].base, gpiopulldown), 4, 0);
+               CORE_CC_REG(ci->c_inf[0].base, gpiopulldown), 0);
 
        *ci_ptr = ci;
        return 0;
@@ -591,7 +590,7 @@ brcmf_sdio_chip_drivestrengthinit(struct brcmf_sdio_dev *sdiodev,
 
                brcmf_sdcard_reg_write(sdiodev,
                        CORE_CC_REG(ci->c_inf[0].base, chipcontrol_addr),
-                       4, 1);
+                       1);
                cc_data_temp = brcmf_sdcard_reg_read(sdiodev,
                        CORE_CC_REG(ci->c_inf[0].base, chipcontrol_addr));
                cc_data_temp &= ~str_mask;
@@ -599,7 +598,7 @@ brcmf_sdio_chip_drivestrengthinit(struct brcmf_sdio_dev *sdiodev,
                cc_data_temp |= drivestrength_sel;
                brcmf_sdcard_reg_write(sdiodev,
                        CORE_CC_REG(ci->c_inf[0].base, chipcontrol_addr),
-                       4, cc_data_temp);
+                       cc_data_temp);
 
                brcmf_dbg(INFO, "SDIO: %dmA drive strength selected, set to 0x%08x\n",
                          drivestrength, cc_data_temp);
index a5670c4fa393cf4846d80d9cfe34c31b7697588d..6df06cfe543a2ce8aeabaa610b382f5baa4a0088 100644 (file)
@@ -184,8 +184,7 @@ extern u32
 brcmf_sdcard_reg_read(struct brcmf_sdio_dev *sdiodev, u32 addr);
 
 extern u32
-brcmf_sdcard_reg_write(struct brcmf_sdio_dev *sdiodev, u32 addr, uint size,
-                      u32 data);
+brcmf_sdcard_reg_write(struct brcmf_sdio_dev *sdiodev, u32 addr, u32 data);
 
 /* Indicate if last reg read/write failed */
 extern bool brcmf_sdcard_regfail(struct brcmf_sdio_dev *sdiodev);