forked from Minki/linux
ath10k: add bus type check in ath10k_init_hw_params
The bus type is used together with the other hw parameters to find a matching entry in ath10k_hw_params_list for the device. This is necessary since HL devices can have the same dev_id and target_version as a corresponding LL device (same chipset) and yet use a totally different configuration. Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
7c2dd6154f
commit
367c899f62
@ -64,6 +64,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA988X_HW_2_0_VERSION,
|
||||
.dev_id = QCA988X_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca988x hw2.0",
|
||||
.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
@ -133,6 +134,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA9887_HW_1_0_VERSION,
|
||||
.dev_id = QCA9887_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9887 hw1.0",
|
||||
.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
@ -168,6 +170,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA6174_HW_2_1_VERSION,
|
||||
.dev_id = QCA6164_2_1_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca6164 hw2.1",
|
||||
.patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
@ -202,6 +205,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA6174_HW_2_1_VERSION,
|
||||
.dev_id = QCA6174_2_1_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca6174 hw2.1",
|
||||
.patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
@ -236,6 +240,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA6174_HW_3_0_VERSION,
|
||||
.dev_id = QCA6174_2_1_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca6174 hw3.0",
|
||||
.patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
@ -270,6 +275,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA6174_HW_3_2_VERSION,
|
||||
.dev_id = QCA6174_2_1_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca6174 hw3.2",
|
||||
.patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
@ -307,6 +313,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA99X0_HW_2_0_DEV_VERSION,
|
||||
.dev_id = QCA99X0_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca99x0 hw2.0",
|
||||
.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
@ -347,6 +354,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA9984_HW_1_0_DEV_VERSION,
|
||||
.dev_id = QCA9984_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9984/qca9994 hw1.0",
|
||||
.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
@ -394,6 +402,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA9888_HW_2_0_DEV_VERSION,
|
||||
.dev_id = QCA9888_2_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9888 hw2.0",
|
||||
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
@ -438,6 +447,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA9377_HW_1_0_DEV_VERSION,
|
||||
.dev_id = QCA9377_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9377 hw1.0",
|
||||
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
@ -472,6 +482,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA9377_HW_1_1_DEV_VERSION,
|
||||
.dev_id = QCA9377_1_0_DEVICE_ID,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "qca9377 hw1.1",
|
||||
.patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 6,
|
||||
@ -508,6 +519,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = QCA4019_HW_1_0_DEV_VERSION,
|
||||
.dev_id = 0,
|
||||
.bus = ATH10K_BUS_AHB,
|
||||
.name = "qca4019 hw1.0",
|
||||
.patch_load_addr = QCA4019_HW_1_0_PATCH_LOAD_ADDR,
|
||||
.uart_pin = 7,
|
||||
@ -549,6 +561,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
|
||||
{
|
||||
.id = WCN3990_HW_1_0_DEV_VERSION,
|
||||
.dev_id = 0,
|
||||
.bus = ATH10K_BUS_PCI,
|
||||
.name = "wcn3990 hw1.0",
|
||||
.continuous_frag_desc = true,
|
||||
.tx_chain_mask = 0x7,
|
||||
@ -2085,7 +2098,8 @@ static int ath10k_init_hw_params(struct ath10k *ar)
|
||||
for (i = 0; i < ARRAY_SIZE(ath10k_hw_params_list); i++) {
|
||||
hw_params = &ath10k_hw_params_list[i];
|
||||
|
||||
if (hw_params->id == ar->target_version &&
|
||||
if (hw_params->bus == ar->hif.bus &&
|
||||
hw_params->id == ar->target_version &&
|
||||
hw_params->dev_id == ar->dev_id)
|
||||
break;
|
||||
}
|
||||
|
@ -92,14 +92,6 @@
|
||||
|
||||
struct ath10k;
|
||||
|
||||
enum ath10k_bus {
|
||||
ATH10K_BUS_PCI,
|
||||
ATH10K_BUS_AHB,
|
||||
ATH10K_BUS_SDIO,
|
||||
ATH10K_BUS_USB,
|
||||
ATH10K_BUS_SNOC,
|
||||
};
|
||||
|
||||
static inline const char *ath10k_bus_str(enum ath10k_bus bus)
|
||||
{
|
||||
switch (bus) {
|
||||
|
@ -21,6 +21,14 @@
|
||||
|
||||
#include "targaddrs.h"
|
||||
|
||||
enum ath10k_bus {
|
||||
ATH10K_BUS_PCI,
|
||||
ATH10K_BUS_AHB,
|
||||
ATH10K_BUS_SDIO,
|
||||
ATH10K_BUS_USB,
|
||||
ATH10K_BUS_SNOC,
|
||||
};
|
||||
|
||||
#define ATH10K_FW_DIR "ath10k"
|
||||
|
||||
#define QCA988X_2_0_DEVICE_ID_UBNT (0x11ac)
|
||||
@ -508,6 +516,7 @@ struct ath10k_hw_clk_params {
|
||||
struct ath10k_hw_params {
|
||||
u32 id;
|
||||
u16 dev_id;
|
||||
enum ath10k_bus bus;
|
||||
const char *name;
|
||||
u32 patch_load_addr;
|
||||
int uart_pin;
|
||||
|
Loading…
Reference in New Issue
Block a user