summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorGovind Singh <govinds@codeaurora.org>2017-02-22 14:31:48 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-19 21:38:17 -0700
commitd68630f7bfa59ce1a030a928a386d0b72069816d (patch)
treee90a9550c8dd352383e5783e115c6729fa161278 /drivers/net
parent87aed5e5d9af5d1d0d00906067eab06552896f84 (diff)
ath10k: Get WCN3990 mem base from dt node
Add support to get WCN3990 mem base from device tree node. Change-Id: I1561dc18577a075bda123429b3e9b89e92a9bfb5 Signed-off-by: Govind Singh <govinds@codeaurora.org>
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 f6eb131e1e1b..1c9ea5e549f0 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,