staging: brcm80211: remove duplicate set sb window address function
In fullmac, brcmf_sdbrcm_set_siaddr_window and brcmf_sdcard_set_sbaddr_window have identical fucntionality. Remove the one in dhd_sdio.c Reported-by: Rafal Milecki <zajec5@gmail.com> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9904663c5e
commit
a723a22de6
@@ -275,7 +275,7 @@ int brcmf_sdcard_cis_read(struct brcmf_sdio_dev *sdiodev, uint func, u8 * cis,
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int
|
||||||
brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev, u32 address)
|
brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev, u32 address)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
@@ -948,24 +948,6 @@ static void brcmf_sdbrcm_setmemsize(struct brcmf_bus *bus, int mem_size)
|
|||||||
bus->ramsize = brcmf_dongle_memsize;
|
bus->ramsize = brcmf_dongle_memsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int brcmf_sdbrcm_set_siaddr_window(struct brcmf_bus *bus, u32 address)
|
|
||||||
{
|
|
||||||
int err = 0;
|
|
||||||
brcmf_sdcard_cfg_write(bus->sdiodev, SDIO_FUNC_1,
|
|
||||||
SBSDIO_FUNC1_SBADDRLOW,
|
|
||||||
(address >> 8) & SBSDIO_SBADDRLOW_MASK, &err);
|
|
||||||
if (!err)
|
|
||||||
brcmf_sdcard_cfg_write(bus->sdiodev, SDIO_FUNC_1,
|
|
||||||
SBSDIO_FUNC1_SBADDRMID,
|
|
||||||
(address >> 16) & SBSDIO_SBADDRMID_MASK, &err);
|
|
||||||
if (!err)
|
|
||||||
brcmf_sdcard_cfg_write(bus->sdiodev, SDIO_FUNC_1,
|
|
||||||
SBSDIO_FUNC1_SBADDRHIGH,
|
|
||||||
(address >> 24) & SBSDIO_SBADDRHIGH_MASK,
|
|
||||||
&err);
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Turn backplane clock on or off */
|
/* Turn backplane clock on or off */
|
||||||
static int brcmf_sdbrcm_htclk(struct brcmf_bus *bus, bool on, bool pendok)
|
static int brcmf_sdbrcm_htclk(struct brcmf_bus *bus, bool on, bool pendok)
|
||||||
{
|
{
|
||||||
@@ -1958,7 +1940,7 @@ brcmf_sdbrcm_membytes(struct brcmf_bus *bus, bool write, u32 address, u8 *data,
|
|||||||
dsize = size;
|
dsize = size;
|
||||||
|
|
||||||
/* Set the backplane window to include the start address */
|
/* Set the backplane window to include the start address */
|
||||||
bcmerror = brcmf_sdbrcm_set_siaddr_window(bus, address);
|
bcmerror = brcmf_sdcard_set_sbaddr_window(bus->sdiodev, address);
|
||||||
if (bcmerror) {
|
if (bcmerror) {
|
||||||
brcmf_dbg(ERROR, "window change failed\n");
|
brcmf_dbg(ERROR, "window change failed\n");
|
||||||
goto xfer_done;
|
goto xfer_done;
|
||||||
@@ -1981,7 +1963,8 @@ brcmf_sdbrcm_membytes(struct brcmf_bus *bus, bool write, u32 address, u8 *data,
|
|||||||
if (size) {
|
if (size) {
|
||||||
data += dsize;
|
data += dsize;
|
||||||
address += dsize;
|
address += dsize;
|
||||||
bcmerror = brcmf_sdbrcm_set_siaddr_window(bus, address);
|
bcmerror = brcmf_sdcard_set_sbaddr_window(bus->sdiodev,
|
||||||
|
address);
|
||||||
if (bcmerror) {
|
if (bcmerror) {
|
||||||
brcmf_dbg(ERROR, "window change failed\n");
|
brcmf_dbg(ERROR, "window change failed\n");
|
||||||
break;
|
break;
|
||||||
@@ -1993,7 +1976,7 @@ brcmf_sdbrcm_membytes(struct brcmf_bus *bus, bool write, u32 address, u8 *data,
|
|||||||
|
|
||||||
xfer_done:
|
xfer_done:
|
||||||
/* Return the window to backplane enumeration space for core access */
|
/* Return the window to backplane enumeration space for core access */
|
||||||
if (brcmf_sdbrcm_set_siaddr_window(bus,
|
if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev,
|
||||||
brcmf_sdcard_cur_sbwad(
|
brcmf_sdcard_cur_sbwad(
|
||||||
bus->sdiodev)))
|
bus->sdiodev)))
|
||||||
brcmf_dbg(ERROR, "FAILED to set window back to 0x%x\n",
|
brcmf_dbg(ERROR, "FAILED to set window back to 0x%x\n",
|
||||||
@@ -4838,7 +4821,7 @@ brcmf_sdbrcm_probe_attach(struct brcmf_bus *bus, u32 regsva)
|
|||||||
bus->alp_only = true;
|
bus->alp_only = true;
|
||||||
|
|
||||||
/* Return the window to backplane enumeration space for core access */
|
/* Return the window to backplane enumeration space for core access */
|
||||||
if (brcmf_sdbrcm_set_siaddr_window(bus, SI_ENUM_BASE))
|
if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev, SI_ENUM_BASE))
|
||||||
brcmf_dbg(ERROR, "FAILED to return to SI_ENUM_BASE\n");
|
brcmf_dbg(ERROR, "FAILED to return to SI_ENUM_BASE\n");
|
||||||
|
|
||||||
#ifdef BCMDBG
|
#ifdef BCMDBG
|
||||||
|
@@ -234,6 +234,9 @@ extern int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev);
|
|||||||
/* Function to return current window addr */
|
/* Function to return current window addr */
|
||||||
extern u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_dev *sdiodev);
|
extern u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_dev *sdiodev);
|
||||||
|
|
||||||
|
extern int brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev,
|
||||||
|
u32 address);
|
||||||
|
|
||||||
/* attach, return handler on success, NULL if failed.
|
/* attach, return handler on success, NULL if failed.
|
||||||
* The handler shall be provided by all subsequent calls. No local cache
|
* The handler shall be provided by all subsequent calls. No local cache
|
||||||
* cfghdl points to the starting address of pci device mapped memory
|
* cfghdl points to the starting address of pci device mapped memory
|
||||||
|
Reference in New Issue
Block a user