Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp230235ybg; Mon, 8 Jun 2020 22:05:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvn2JSNzwC5rxdmE+7VYq8UXymYlFbQnyG1ZtU6Rp9fU+IgJyr0KHIuhmIlcjtXaq776oY X-Received: by 2002:a17:906:4702:: with SMTP id y2mr22548548ejq.87.1591679136626; Mon, 08 Jun 2020 22:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591679136; cv=none; d=google.com; s=arc-20160816; b=W2Zn26ZZF4pYNubJv7sjfyD2FxbESChM3VwgYqBJqpCdcVPJk7ZV3DJs3CP9BalsBK fxPi6EzCUa+IOT2DmdL9/e61J9gwh70TNTVheczhwaAShGhqkucdYusyjxtRCEKTA3tN gaEtMyogFPc1nXJrDQLfzaqRw5pY/GOOzcXy9Zf/HTLnePEDF4erok8AUtQIMqFrawbt lO/dQzFpJfphoLXjrYtMTNUYwW0jBYelvXeehLglLk5JCWOPEAJlJlEBEtN4Hxjd8Tea YqKjAbjC9LYSR+J3Ujz6aBnpExnVsIRruN30hK+r7LyRIBeUt1JzAtS7pQEgoMqNUI67 qnKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=ouV4hRX7eTdMM4clzO/wacpOOJiV995VYuXa3JNwq04=; b=QwlOwN7KB6PbTuLf08Zb02ixWQd60jh2sXrsEG9XhZZtQYlLvxHpDE4kzgrNhJYZcL t5huFSKs9oXnrVJRE5YJKwbvwtQwXT8I8FR1OUkcy0pfm0OjgzbhzMXIJYAiWbLTnu4x 94KsKoL2tJYm/H0Kyg7ArsKr05ULbd0BtB/osZv3DcWwF0vElQShfA/502CnhJErjukA MDo4xMOXOJ444h/nBYevmj+kc2UI3+plZ9GJU3m58kQvSqGg9vTGwZdlybEV28g/XcNN JZCyNliEXO9smN/KRSiRf27CuCxl4GOrrkxvIWw+J03ZCh8wHs5HFHAYWb1dljiPTdFH pTZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=IhJ4B3Nt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n23si10078275edq.264.2020.06.08.22.05.12; Mon, 08 Jun 2020 22:05:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=IhJ4B3Nt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727037AbgFIFDy (ORCPT + 99 others); Tue, 9 Jun 2020 01:03:54 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:57569 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbgFIFDx (ORCPT ); Tue, 9 Jun 2020 01:03:53 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1591679032; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=ouV4hRX7eTdMM4clzO/wacpOOJiV995VYuXa3JNwq04=; b=IhJ4B3Nts/b0SOq3MkcSLq7GGyX9orYXQbYxmUQkPjC+yHWpQ/mjxPhs8aFGaED/0APqwcXU OVrosISz54dXc5iD3+nLMgQ9DS9o04xYrjLmVNQwBbJhEXyXIGjqN/4cJZc6hvsgyJG0/TU7 nT8Nt/mmyKptSYsHgJI9EC6JmRk= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n10.prod.us-west-2.postgun.com with SMTP id 5edf1834cea6afef5fdcf4e7 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 09 Jun 2020 05:03:48 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 3A690C43387; Tue, 9 Jun 2020 05:03:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from vnaralas-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akolli) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3726CC433CB; Tue, 9 Jun 2020 05:03:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3726CC433CB Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=akolli@codeaurora.org From: Anilkumar Kolli To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Anilkumar Kolli Subject: [PATCH 7/8] ath11k: add ce services for IPQ6018 Date: Tue, 9 Jun 2020 10:33:12 +0530 Message-Id: <1591678993-11016-8-git-send-email-akolli@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591678993-11016-1-git-send-email-akolli@codeaurora.org> References: <1591678993-11016-1-git-send-email-akolli@codeaurora.org> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org IPQ6018 does not support mac2, add a new ce service map. Signed-off-by: Anilkumar Kolli --- drivers/net/wireless/ath/ath11k/ahb.c | 122 ++++++++++++++++++++++++++++++++-- 1 file changed, 117 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index b080ad8fab0a..25764f719db0 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -155,7 +155,7 @@ static const struct ce_pipe_config target_ce_config_wlan[] = { * This table is derived from the CE_PCI TABLE, above. * It is passed to the Target at startup for use by firmware. */ -static const struct service_to_pipe target_service_to_ce_map_wlan[] = { +static const struct service_to_pipe target_service_to_ce_map_wlan_ipq8074[] = { { .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ @@ -267,6 +267,108 @@ static const struct service_to_pipe target_service_to_ce_map_wlan[] = { { /* terminator entry */ } }; +static const struct service_to_pipe target_service_to_ce_map_wlan_ipq6018[] = { + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VO), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BK), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_BE), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_DATA_VI), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(3), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(7), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_WMI_CONTROL_MAC1), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(2), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(0), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_RSVD_CTRL), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(1), + }, + { /* not used */ + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(0), + }, + { /* not used */ + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_TEST_RAW_STREAMS), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(1), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), + .pipedir = __cpu_to_le32(PIPEDIR_OUT), /* out = UL = host -> target */ + .pipenum = __cpu_to_le32(4), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_HTT_DATA_MSG), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(1), + }, + { + .service_id = __cpu_to_le32(ATH11K_HTC_SVC_ID_PKT_LOG), + .pipedir = __cpu_to_le32(PIPEDIR_IN), /* in = DL = target -> host */ + .pipenum = __cpu_to_le32(5), + }, + + /* (Additions here) */ + + { /* terminator entry */ } +}; + #define ATH11K_IRQ_CE0_OFFSET 4 static const char *irq_name[ATH11K_IRQ_NUM_MAX] = { @@ -647,8 +749,15 @@ static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab) cfg->tgt_ce_len = ARRAY_SIZE(target_ce_config_wlan) - 1; cfg->tgt_ce = target_ce_config_wlan; - cfg->svc_to_ce_map_len = ARRAY_SIZE(target_service_to_ce_map_wlan); - cfg->svc_to_ce_map = target_service_to_ce_map_wlan; + if (ab->hw_params.dev_id == ATH11K_HW_IPQ6018) { + cfg->svc_to_ce_map_len = + ARRAY_SIZE(target_service_to_ce_map_wlan_ipq6018); + cfg->svc_to_ce_map = target_service_to_ce_map_wlan_ipq6018; + } else { + cfg->svc_to_ce_map_len = + ARRAY_SIZE(target_service_to_ce_map_wlan_ipq8074); + cfg->svc_to_ce_map = target_service_to_ce_map_wlan_ipq8074; + } } static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab) @@ -856,8 +965,11 @@ static int ath11k_ahb_map_service_to_pipe(struct ath11k_base *ab, u16 service_id bool ul_set = false, dl_set = false; int i; - for (i = 0; i < ARRAY_SIZE(target_service_to_ce_map_wlan); i++) { - entry = &target_service_to_ce_map_wlan[i]; + for (i = 0; i < ab->qmi.ce_cfg.svc_to_ce_map_len; i++) { + if (ab->hw_params.dev_id == ATH11K_HW_IPQ6018) + entry = &target_service_to_ce_map_wlan_ipq6018[i]; + else + entry = &target_service_to_ce_map_wlan_ipq8074[i]; if (__le32_to_cpu(entry->service_id) != service_id) continue; -- 2.7.4