brcmfmac: add BCM4354 SDIO interface support
authorFranky Lin <frankyl@broadcom.com>
Sat, 15 Mar 2014 16:18:17 +0000 (17:18 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 17 Mar 2014 17:44:14 +0000 (13:44 -0400)
BCM4354 is an a/b/g/n/ac 2x2 WiFi chip. This patch adds support for it through
SDIO interface.

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: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
drivers/net/wireless/brcm80211/brcmfmac/chip.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
drivers/net/wireless/brcm80211/include/brcm_hw_ids.h
include/linux/mmc/sdio_ids.h

index d737cf78469a64f05baeefde17a364457ca54ea6..6e8718bf69209cad1886319d7694b3faa53c6c9c 100644 (file)
@@ -988,6 +988,7 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = {
        {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_43362)},
        {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM,
                     SDIO_DEVICE_ID_BROADCOM_4335_4339)},
+       {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, SDIO_DEVICE_ID_BROADCOM_4354)},
        { /* end: all zeroes */ },
 };
 MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids);
index a07b95ef9e703310781c276f51ca81ba0376f24d..df130ef53d1c4054f59f2fe10d197a80673000c9 100644 (file)
@@ -504,6 +504,7 @@ static void brcmf_chip_get_raminfo(struct brcmf_chip_priv *ci)
                ci->pub.ramsize = 0x3c000;
                break;
        case BCM4339_CHIP_ID:
+       case BCM4354_CHIP_ID:
                ci->pub.ramsize = 0xc0000;
                ci->pub.rambase = 0x180000;
                break;
@@ -1006,6 +1007,10 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub)
        chip = container_of(pub, struct brcmf_chip_priv, pub);
 
        switch (pub->chip) {
+       case BCM4354_CHIP_ID:
+               /* explicitly check SR engine enable bit */
+               pmu_cc3_mask = BIT(2);
+               /* fall-through */
        case BCM43241_CHIP_ID:
        case BCM4335_CHIP_ID:
        case BCM4339_CHIP_ID:
index a111b6fbbeba337e1bacc041504d5362d0f6e854..4aa8678590d5e74524755fb123062b57e49fd881 100644 (file)
@@ -578,6 +578,8 @@ static const struct sdiod_drive_str sdiod_drvstr_tab2_3v3[] = {
 #define BCM43362_NVRAM_NAME            "brcm/brcmfmac43362-sdio.txt"
 #define BCM4339_FIRMWARE_NAME          "brcm/brcmfmac4339-sdio.bin"
 #define BCM4339_NVRAM_NAME             "brcm/brcmfmac4339-sdio.txt"
+#define BCM4354_FIRMWARE_NAME          "brcm/brcmfmac4354-sdio.bin"
+#define BCM4354_NVRAM_NAME             "brcm/brcmfmac4354-sdio.txt"
 
 MODULE_FIRMWARE(BCM43143_FIRMWARE_NAME);
 MODULE_FIRMWARE(BCM43143_NVRAM_NAME);
@@ -597,6 +599,8 @@ MODULE_FIRMWARE(BCM43362_FIRMWARE_NAME);
 MODULE_FIRMWARE(BCM43362_NVRAM_NAME);
 MODULE_FIRMWARE(BCM4339_FIRMWARE_NAME);
 MODULE_FIRMWARE(BCM4339_NVRAM_NAME);
+MODULE_FIRMWARE(BCM4354_FIRMWARE_NAME);
+MODULE_FIRMWARE(BCM4354_NVRAM_NAME);
 
 struct brcmf_firmware_names {
        u32 chipid;
@@ -622,7 +626,8 @@ static const struct brcmf_firmware_names brcmf_fwname_data[] = {
        { BCM4334_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4334) },
        { BCM4335_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4335) },
        { BCM43362_CHIP_ID, 0xFFFFFFFE, BRCMF_FIRMWARE_NVRAM(BCM43362) },
-       { BCM4339_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4339) }
+       { BCM4339_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4339) },
+       { BCM4354_CHIP_ID, 0xFFFFFFFF, BRCMF_FIRMWARE_NVRAM(BCM4354) }
 };
 
 
index 6fa5d4863782ea2575089583270186c015b810fa..d816270db3be56cd7af0ec130fc6bf74b9aa0b69 100644 (file)
@@ -43,5 +43,6 @@
 #define BCM4335_CHIP_ID                0x4335
 #define BCM43362_CHIP_ID       43362
 #define BCM4339_CHIP_ID                0x4339
+#define BCM4354_CHIP_ID                0x4354
 
 #endif                         /* _BRCM_HW_IDS_H_ */
index d8836623f36afcbd0aa88949c27a9f3c7000fa38..0f01fe065424d0fcddd53acec02697d89d1ba3d7 100644 (file)
@@ -31,6 +31,7 @@
 #define SDIO_DEVICE_ID_BROADCOM_4334           0x4334
 #define SDIO_DEVICE_ID_BROADCOM_4335_4339      0x4335
 #define SDIO_DEVICE_ID_BROADCOM_43362          43362
+#define SDIO_DEVICE_ID_BROADCOM_4354           0x4354
 
 #define SDIO_VENDOR_ID_INTEL                   0x0089
 #define SDIO_DEVICE_ID_INTEL_IWMC3200WIMAX     0x1402