diff options
author | Franky Lin <frankyl@broadcom.com> | 2013-04-11 07:28:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-12 14:27:54 -0400 |
commit | 1640f28f6b839637d9b82a3c4a19120601e59c66 (patch) | |
tree | aa993155ba1352b8c26b7aa3a9fe3651925dbf37 /drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |
parent | 83cf17aa80820248178deb7ca263123cced179dc (diff) |
brcmfmac: add support for dongle ARM CR4 core
Newer WiFi chip use ARM CR4 core to achieve higher performance. Add necessary
code for host driver in order to support CR4 core.
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index 3147960ad975..d24eb66d324d 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -2652,7 +2652,7 @@ static int brcmf_sdio_readshared(struct brcmf_sdio *bus, | |||
2652 | struct sdpcm_shared_le sh_le; | 2652 | struct sdpcm_shared_le sh_le; |
2653 | __le32 addr_le; | 2653 | __le32 addr_le; |
2654 | 2654 | ||
2655 | shaddr = bus->ramsize - 4; | 2655 | shaddr = bus->ci->rambase + bus->ramsize - 4; |
2656 | 2656 | ||
2657 | /* | 2657 | /* |
2658 | * Read last word in socram to determine | 2658 | * Read last word in socram to determine |
@@ -3030,10 +3030,11 @@ static int brcmf_sdbrcm_get_image(char *buf, int len, struct brcmf_sdio *bus) | |||
3030 | 3030 | ||
3031 | static int brcmf_sdbrcm_download_code_file(struct brcmf_sdio *bus) | 3031 | static int brcmf_sdbrcm_download_code_file(struct brcmf_sdio *bus) |
3032 | { | 3032 | { |
3033 | int offset = 0; | 3033 | int offset; |
3034 | uint len; | 3034 | uint len; |
3035 | u8 *memblock = NULL, *memptr; | 3035 | u8 *memblock = NULL, *memptr; |
3036 | int ret; | 3036 | int ret; |
3037 | u8 idx; | ||
3037 | 3038 | ||
3038 | brcmf_dbg(INFO, "Enter\n"); | 3039 | brcmf_dbg(INFO, "Enter\n"); |
3039 | 3040 | ||
@@ -3054,9 +3055,14 @@ static int brcmf_sdbrcm_download_code_file(struct brcmf_sdio *bus) | |||
3054 | memptr += (BRCMF_SDALIGN - | 3055 | memptr += (BRCMF_SDALIGN - |
3055 | ((u32)(unsigned long)memblock % BRCMF_SDALIGN)); | 3056 | ((u32)(unsigned long)memblock % BRCMF_SDALIGN)); |
3056 | 3057 | ||
3058 | offset = bus->ci->rambase; | ||
3059 | |||
3057 | /* Download image */ | 3060 | /* Download image */ |
3058 | while ((len = | 3061 | len = brcmf_sdbrcm_get_image((char *)memptr, MEMBLOCK, bus); |
3059 | brcmf_sdbrcm_get_image((char *)memptr, MEMBLOCK, bus))) { | 3062 | idx = brcmf_sdio_chip_getinfidx(bus->ci, BCMA_CORE_ARM_CR4); |
3063 | if (BRCMF_MAX_CORENUM != idx) | ||
3064 | memcpy(&bus->ci->rst_vec, memptr, sizeof(bus->ci->rst_vec)); | ||
3065 | while (len) { | ||
3060 | ret = brcmf_sdio_ramrw(bus->sdiodev, true, offset, memptr, len); | 3066 | ret = brcmf_sdio_ramrw(bus->sdiodev, true, offset, memptr, len); |
3061 | if (ret) { | 3067 | if (ret) { |
3062 | brcmf_err("error %d on writing %d membytes at 0x%08x\n", | 3068 | brcmf_err("error %d on writing %d membytes at 0x%08x\n", |
@@ -3065,6 +3071,7 @@ static int brcmf_sdbrcm_download_code_file(struct brcmf_sdio *bus) | |||
3065 | } | 3071 | } |
3066 | 3072 | ||
3067 | offset += MEMBLOCK; | 3073 | offset += MEMBLOCK; |
3074 | len = brcmf_sdbrcm_get_image((char *)memptr, MEMBLOCK, bus); | ||
3068 | } | 3075 | } |
3069 | 3076 | ||
3070 | err: | 3077 | err: |