From d89217468d52d3128e6a8c045cb9cb9ba54c828c Mon Sep 17 00:00:00 2001 From: Yingying Tang Date: Tue, 18 Oct 2016 18:13:07 +0800 Subject: [PATCH] qcacmn: Add support for QCA9379 SDIO & USB boards Propagate from qcacld-2.0 to qcacmn This change add the corresponding support for QCA9379 which has new chip ID. Change-Id: I252b75d9ae7b760a6a8f6931b4db753f50d3baba CRs-Fixed: 990755 --- hif/src/hif_hw_version.h | 1 + hif/src/hif_main.c | 5 +++++ hif/src/sdio/hif_sdio_common.h | 1 + hif/src/sdio/if_sdio.c | 6 ++++-- hif/src/sdio/native_sdio/src/hif.c | 16 ++++++++++++++++ hif/src/usb/if_usb.c | 1 + 6 files changed, 28 insertions(+), 2 deletions(-) diff --git a/hif/src/hif_hw_version.h b/hif/src/hif_hw_version.h index d50cc4d2bc64..386b5a359844 100644 --- a/hif/src/hif_hw_version.h +++ b/hif/src/hif_hw_version.h @@ -38,6 +38,7 @@ #define AR6320_REV2_1_VERSION 0x5010000 #define AR6320_REV3_VERSION 0x5020000 #define AR6320_REV3_2_VERSION 0x5030000 +#define QCA9379_REV1_VERSION 0x5040000 #define AR6320_DEV_VERSION 0x1000000 #define QCA9377_REV1_1_VERSION 0x5020001 #define WCN3990_v1 0x40000000 diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 7127e35782d5..8a82d5814cf0 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -318,6 +318,11 @@ static const struct qwlan_hw qwlan_hw_list[] = { .id = WCN3990_v2_1, .subid = 0x0, .name = "WCN3990_V2.1", + }, + { + .id = QCA9379_REV1_VERSION, + .subid = 0xC, + .name = "QCA9379_REV1", } }; diff --git a/hif/src/sdio/hif_sdio_common.h b/hif/src/sdio/hif_sdio_common.h index e5cdda6f6cdc..94e06aa9aa83 100644 --- a/hif/src/sdio/hif_sdio_common.h +++ b/hif/src/sdio/hif_sdio_common.h @@ -35,6 +35,7 @@ #define MANUFACTURER_ID_AR6004_BASE 0x400 #define MANUFACTURER_ID_AR6320_BASE 0x500 #define MANUFACTURER_ID_QCA9377_BASE 0x700 +#define MANUFACTURER_ID_QCA9379_BASE 0x800 #define MANUFACTURER_ID_AR6K_BASE_MASK 0xFF00 #define MANUFACTURER_ID_AR6K_REV_MASK 0x00FF #define FUNCTION_CLASS 0x0 diff --git a/hif/src/sdio/if_sdio.c b/hif/src/sdio/if_sdio.c index 18d3d6abedf0..7118f239d4a8 100644 --- a/hif/src/sdio/if_sdio.c +++ b/hif/src/sdio/if_sdio.c @@ -133,8 +133,10 @@ static A_STATUS hif_sdio_probe(void *context, void *hif_handle) target_type = TARGET_TYPE_AR9888; #elif defined(CONFIG_AR6320_SUPPORT) id = ((struct hif_sdio_dev *) hif_handle)->id; - if ((id->device & MANUFACTURER_ID_AR6K_BASE_MASK) == - MANUFACTURER_ID_QCA9377_BASE) { + if (((id->device & MANUFACTURER_ID_AR6K_BASE_MASK) == + MANUFACTURER_ID_QCA9377_BASE) || + ((id->device & MANUFACTURER_ID_AR6K_BASE_MASK) == + MANUFACTURER_ID_QCA9379_BASE)) { hif_register_tbl_attach(ol_sc, HIF_TYPE_AR6320V2); target_register_tbl_attach(ol_sc, TARGET_TYPE_AR6320V2); } else if ((id->device & MANUFACTURER_ID_AR6K_BASE_MASK) == diff --git a/hif/src/sdio/native_sdio/src/hif.c b/hif/src/sdio/native_sdio/src/hif.c index 7c6d071bcd69..bfe728827030 100644 --- a/hif/src/sdio/native_sdio/src/hif.c +++ b/hif/src/sdio/native_sdio/src/hif.c @@ -212,6 +212,22 @@ static const struct sdio_device_id ar6k_id_table[] = { {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0xD))}, {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0xE))}, {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9377_BASE | 0xF))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x0))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x1))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x2))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x3))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x4))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x5))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x6))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x7))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x8))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0x9))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0xA))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0xB))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0xC))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0xD))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0xE))}, + {SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_QCA9379_BASE | 0xF))}, {SDIO_DEVICE(MANUFACTURER_CODE, (0 | 0x0))}, {SDIO_DEVICE(MANUFACTURER_CODE, (0 | 0x1))}, #endif diff --git a/hif/src/usb/if_usb.c b/hif/src/usb/if_usb.c index ae86a37c6b9b..d66eefb9b8e7 100644 --- a/hif/src/usb/if_usb.c +++ b/hif/src/usb/if_usb.c @@ -436,6 +436,7 @@ void hif_usb_reg_tbl_attach(struct hif_softc *scn) case AR6320_REV2_1_VERSION: case AR6320_REV3_VERSION: case QCA9377_REV1_1_VERSION: + case QCA9379_REV1_VERSION: hif_type = HIF_TYPE_AR6320V2; target_type = TARGET_TYPE_AR6320V2; break;