summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-03-21 05:00:34 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-21 05:00:33 -0700
commit2fbbf07b80edaa2a10dbed83fef624dae211cfa3 (patch)
tree58f823f92cf940fc32496c031a80f3127f3d1f7d /drivers/net
parenta012178c172883227fa680092ee984eddce7a0d0 (diff)
parentd68630f7bfa59ce1a030a928a386d0b72069816d (diff)
Merge "ath10k: Get WCN3990 mem base from dt node"
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath10k/snoc.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index d24c09455e41..dc5f6fdaa9dc 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1002,24 +1002,28 @@ static void ath10k_snoc_free_irq(struct ath10k *ar)
static int ath10k_snoc_get_soc_info(struct ath10k *ar)
{
- int ret;
- struct icnss_soc_info soc_info;
+ struct resource *res;
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
+ struct platform_device *pdev;
- memset(&soc_info, 0, sizeof(soc_info));
-
- ret = icnss_get_soc_info(&soc_info);
- if (ret < 0) {
- ath10k_err(ar, "%s: icnss_get_soc_info error = %d",
- __func__, ret);
- return ret;
+ pdev = ar_snoc->dev;
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "membase");
+ if (!res) {
+ ath10k_err(ar, "Memory base not found in DT\n");
+ return -EINVAL;
}
- ar_snoc->mem = soc_info.v_addr;
- ar_snoc->mem_pa = soc_info.p_addr;
+ ar_snoc->mem_pa = res->start;
+ ar_snoc->mem = devm_ioremap(&pdev->dev, ar_snoc->mem_pa,
+ resource_size(res));
+ if (!ar_snoc->mem) {
+ ath10k_err(ar, "Memory base ioremap failed: phy addr: %pa\n",
+ &ar_snoc->mem_pa);
+ return -EINVAL;
+ }
- ar_snoc->target_info.soc_version = soc_info.soc_id;
- ar_snoc->target_info.target_version = soc_info.soc_id;
+ ar_snoc->target_info.soc_version = ATH10K_HW_WCN3990;
+ ar_snoc->target_info.target_version = ATH10K_HW_WCN3990;
ar_snoc->target_info.target_revision = 0;
ath10k_dbg(ar, ATH10K_DBG_SNOC,