Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bc8b48a authored by Erik Stromdahl's avatar Erik Stromdahl Committed by Gerrit - the friendly Code Review server
Browse files

UPSTREAM: ath10k: add device type enum to ath10k_bus_params



Add dev_type parameter to struct ath10k_bus_params.

The dev type specifies if the device is a high latency device (usb and
sdio) or low latency device (pci, ahb and snoc)

The setup of high latency chips is sometimes different than
for chips using low latency interfaces.

Change-Id: I64820fa08d42414b7ebaed44d3c10bd116581710
Signed-off-by: default avatarErik Stromdahl <erik.stromdahl@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarGovind Singh <govinds@codeaurora.org>
Git-commit: 7c2dd6154fc22e2aec1fcb384beb0a6372f2b439
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


Signed-off-by: default avatarGovind Singh <govinds@codeaurora.org>
parent f9a01edf
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -814,6 +814,7 @@ static int ath10k_ahb_probe(struct platform_device *pdev)


	ath10k_pci_ce_deinit(ar);
	ath10k_pci_ce_deinit(ar);


	bus_params.dev_type = ATH10K_DEV_TYPE_LL;
	bus_params.chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
	bus_params.chip_id = ath10k_ahb_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
	if (bus_params.chip_id == 0xffffffff) {
	if (bus_params.chip_id == 0xffffffff) {
		ath10k_err(ar, "failed to get chip id\n");
		ath10k_err(ar, "failed to get chip id\n");
+1 −0
Original line number Original line Diff line number Diff line
@@ -2641,6 +2641,7 @@ int ath10k_core_register(struct ath10k *ar,
			 const struct ath10k_bus_params *bus_params)
			 const struct ath10k_bus_params *bus_params)
{
{
	ar->chip_id = bus_params->chip_id;
	ar->chip_id = bus_params->chip_id;
	ar->dev_type = bus_params->dev_type;
	queue_work(ar->workqueue, &ar->register_work);
	queue_work(ar->workqueue, &ar->register_work);


	return 0;
	return 0;
+7 −0
Original line number Original line Diff line number Diff line
@@ -769,8 +769,14 @@ struct ath10k_per_peer_tx_stats {
	u32	reserved2;
	u32	reserved2;
};
};


enum ath10k_dev_type {
	ATH10K_DEV_TYPE_LL,
	ATH10K_DEV_TYPE_HL,
};

struct ath10k_bus_params {
struct ath10k_bus_params {
	u32 chip_id;
	u32 chip_id;
	enum ath10k_dev_type dev_type;
};
};


struct ath10k {
struct ath10k {
@@ -783,6 +789,7 @@ struct ath10k {
	enum ath10k_hw_rev hw_rev;
	enum ath10k_hw_rev hw_rev;
	u16 dev_id;
	u16 dev_id;
	u32 chip_id;
	u32 chip_id;
	enum ath10k_dev_type dev_type;
	u32 target_version;
	u32 target_version;
	u8 fw_version_major;
	u8 fw_version_major;
	u32 fw_version_minor;
	u32 fw_version_minor;
+1 −0
Original line number Original line Diff line number Diff line
@@ -3556,6 +3556,7 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
		goto err_free_irq;
		goto err_free_irq;
	}
	}


	bus_params.dev_type = ATH10K_DEV_TYPE_LL;
	bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
	bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
	if (bus_params.chip_id == 0xffffffff) {
	if (bus_params.chip_id == 0xffffffff) {
		ath10k_err(ar, "failed to get chip id\n");
		ath10k_err(ar, "failed to get chip id\n");
+1 −0
Original line number Original line Diff line number Diff line
@@ -2037,6 +2037,7 @@ static int ath10k_sdio_probe(struct sdio_func *func,
		goto err_free_wq;
		goto err_free_wq;
	}
	}


	bus_params.dev_type = ATH10K_DEV_TYPE_HL;
	/* TODO: don't know yet how to get chip_id with SDIO */
	/* TODO: don't know yet how to get chip_id with SDIO */
	bus_params.chip_id = 0;
	bus_params.chip_id = 0;
	ret = ath10k_core_register(ar, &bus_params);
	ret = ath10k_core_register(ar, &bus_params);
Loading