Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3091339pxk; Mon, 7 Sep 2020 02:59:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbPzuC+Cq3N8RsZo2X4k/XCQs8dYY0hPG0taQ4QDJDWR7+HkCtczByTxA0IJSnQEBkNRFI X-Received: by 2002:a05:6402:305a:: with SMTP id bu26mr21194663edb.262.1599472750036; Mon, 07 Sep 2020 02:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599472750; cv=none; d=google.com; s=arc-20160816; b=JSy6DH50H1jgtM6e05gAKFgvUMWO/CwetmK3tI9eFj/hhl4kYqkG0Rovv774cCriVf Z86vF5LpVGv5VO5RBX0nvtUTfFZurvNfES40GNGTt875wf/vdcS8hb+GmxoO8Tgz3O1J jrKwL9Qk9UyCul9a6u12vWRZ9yDBCBSOoLqDG3zZX8eyx0ASSS1YCm211WcQhzdPqfnR ZvfjphmaaQS7beMPuMZiCUhvPJCwkE2fg8ULnXUU/qGMp+8UnM5/t32GazecEmrPOOFX 5lw5B70gXbgUa1ky0mgMiX4ZsXsf/czu4o0b9/0TyPoIzbG8HwahfmCMbADhM+hz7OR6 bgTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :message-id:in-reply-to:date:references:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature; bh=DYU8YCFTeWSPGGml1i2qo8T6ykdN/MG2ixUtc14f+Lw=; b=0drEVTXE/BuDzym9yKcVuj0fYLwifbFRO93mC2bCifHTxvmfQwNhpu1mvuR8z00gZw SnKuQ8hWbr2yvNDgjB+SlHEC0zvjrXnAcQHif+fOI/jWcyYEDeuV5aie25FBjc3ParVA YtpsW1zdEaUD9D+2kodq7hLYRGYjbbRs0TNxFouRUPEwbP89Eg72pIZxynQ4iQu6YaKu Xf8NR4GLZPWfhwLsuy1iYV5rA3fiXTKA/Oz/Qiic8GKRGafmCnxiP1JhflbfFdLSHME1 InVu7sEuOHH3ItmPOWDfi04U/7zkiphbez65xJJE7X445P7AnXj8Xa8tSJSEyjZ2NPBt IZaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=S1enhPdk; dkim=pass header.i=@amazonses.com header.s=hsbnp7p3ensaochzwyq5wwmceodymuwv header.b="emEEd/3m"; 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 g12si9366555ejj.277.2020.09.07.02.58.45; Mon, 07 Sep 2020 02:59:10 -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=pass header.i=@codeaurora.org header.s=zsmsymrwgfyinv5wlfyidntwsjeeldzt header.b=S1enhPdk; dkim=pass header.i=@amazonses.com header.s=hsbnp7p3ensaochzwyq5wwmceodymuwv header.b="emEEd/3m"; 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 S1728345AbgIGJ43 (ORCPT + 99 others); Mon, 7 Sep 2020 05:56:29 -0400 Received: from a27-188.smtp-out.us-west-2.amazonses.com ([54.240.27.188]:47772 "EHLO a27-188.smtp-out.us-west-2.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbgIGJ41 (ORCPT ); Mon, 7 Sep 2020 05:56:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=zsmsymrwgfyinv5wlfyidntwsjeeldzt; d=codeaurora.org; t=1599472586; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:MIME-Version:Content-Type; bh=EKtUKPB3gmnM0BbeYvDZjSYUc0HismSLiDOG12Akloc=; b=S1enhPdk+4HQ9VskhNVxCTy3B7wN2XqJ3Emrqq8sPZ/KzGmRNul2qP4kPEGRPyUH 6+VrqgukQOmjBlJ6AwwPpcQL/Gk8NRgLEIr4tIx8i3Ranh6+JdZtEHY5A/yGhvx3vVs Jtxm24V5zy2drGVm1xZmfdd7+okB2KgMAYXZRr6U= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=hsbnp7p3ensaochzwyq5wwmceodymuwv; d=amazonses.com; t=1599472586; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID:MIME-Version:Content-Type:Feedback-ID; bh=EKtUKPB3gmnM0BbeYvDZjSYUc0HismSLiDOG12Akloc=; b=emEEd/3mgW6MyuQCV3Nn2LItioAWkzP6kMDWReKuwndQ60NwfwfxgyyTviiflvXR dB91jYJb7apKNsufzCEN9QRJTkS8FWLjXaaF2XE//AgSl7BGqpxF/In8Oc+0vvEgIMD yVqTX+mFLGTYvzCndsiGy8yWEUNaEs6K31Co9FU0= 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=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 13529C43387 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=fail smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: akolli@codeaurora.org Cc: Julian Calaby , devicetree , linux-wireless@vger.kernel.org, ath11k@lists.infradead.org Subject: Re: [PATCH v3 2/3] ath11k: copy ce service configs to hw_params References: <1592458104-2961-1-git-send-email-akolli@codeaurora.org> <1592458104-2961-3-git-send-email-akolli@codeaurora.org> <34ed705f28b40fab493b8c888138e6a7@codeaurora.org> Date: Mon, 7 Sep 2020 09:56:25 +0000 In-Reply-To: <34ed705f28b40fab493b8c888138e6a7@codeaurora.org> (akolli@codeaurora.org's message of "Fri, 19 Jun 2020 21:54:42 +0530") Message-ID: <0101017467feccbe-322cfbf1-f151-4ebe-aa6a-f6cd8791178d-000000@us-west-2.amazonses.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SES-Outgoing: 2020.09.07-54.240.27.188 Feedback-ID: 1.us-west-2.CZuq2qbDmUIuT3qdvXlRHZZCpfZqZ4GtG9v3VKgRyF0=:AmazonSES Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org akolli@codeaurora.org writes: > On 2020-06-19 04:40, Julian Calaby wrote: >> >> On Thu, Jun 18, 2020 at 3:31 PM Anilkumar Kolli >> wrote: >>> >>> @@ -950,6 +950,16 @@ static int ath11k_ahb_probe(struct >>> platform_device *pdev) >>> goto err_hal_srng_deinit; >>> } >>> >>> + ret = ath11k_init_hw_params(ab); >>> + if (ret) { >>> + ath11k_err(ab, "failed to get hw params %d\n", ret); >>> + return ret; >>> + } >>> + >>> + ab->hw_params.svc_to_ce_map_len = >>> + >>> ARRAY_SIZE(target_service_to_ce_map_wlan_ipq8074); >>> + ab->hw_params.svc_to_ce_map = >>> target_service_to_ce_map_wlan_ipq8074; >> >> I think you misunderstood my point about this, the point wasn't to >> copy the svc map to hw_params, but define it in hw_params: >> >> + { >> + .hw_rev = ATH11K_HW_IPQ6018, >> + .name = "ipq6018 hw1.0", >> + .fw = { >> + .dir = "IPQ6018/hw1.0", >> + .board_size = 256 * 1024, >> + .cal_size = 256 * 1024, >> + }, >> + .max_radios = 2, >> + .bdf_addr = 0x4ABC0000, >> + .hw_ops = &ipq6018_ops, >> + .svc_to_ce_map_len = >> ARRAY_SIZE(target_service_to_ce_map_wlan_ipq6018, >> + .svc_to_ce_map = target_service_to_ce_map_wlan_ipq6018, >> + }, >> >> That completely eliminates special case code based on the hardware ID >> in the driver. >> > The static array of structures target_service_to_ce_map_wlan_ipq6018[] > is defined in ahb.c and hw_params are initialised in core.c, this will > not work. no? You could move the map arrays to hw.c, as an example see how ath11k_hw_ring_mask_ipq8074 is implemented. That way we don't need any new hw_rev checks. -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches