From patchwork Fri May 26 19:08:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 99624 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp702129vqr; Fri, 26 May 2023 12:24:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6XkyOxbSfvtG92EecdrtxlZG413s0yRK9mnVL+syS+DfXJ7Oq/8z1shivRxmqVuBlXBpm3 X-Received: by 2002:a05:6a00:1702:b0:64a:9090:5147 with SMTP id h2-20020a056a00170200b0064a90905147mr4996078pfc.10.1685129088221; Fri, 26 May 2023 12:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685129088; cv=none; d=google.com; s=arc-20160816; b=jXTKCJFS7qSewRd3I5xtICmfB40YIiIBp5cE72d1UvQq9lYwEckmbrheQF1rdkT+sk D+XKKQc5/GiUNeyOKTUoy4Ge4AUXDxGvp5PpyaAXcDu3dDvjKoba8RVawKSmAsobbVYe ZZeSGQ0r2J6/XXyXDTINGlN/AdqxgDxUaz5Cij3suSyQjCLvImllttIoNtJl8Ea0BKnd KPOb3nGwDjtsuisV9Leu2oK05To85T9zyL5R4r7g/F3rsx0FhGBSdxhkcIYOr2E7333m RI9OMownRTv+TOMDoUHzbDE6m/4UbC0UverNdBdzhHP8zIqwoO15B/cqJYKSIA/R5V3N 6dyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QMgZAckXx8VyIyvdPqZk+MsBx1jAUZv0/tmo2hWhZHU=; b=RB8Ih+yYY+m202n330PsV4U3H4l82BA7AgytE6knID5AUoVNXS/AY3v5JOTDMbjuu0 l6fqj2WI73wP0t1qRjQHe6acTjkxKpJUHXFsiY4Cu7tJOqIz8DGBE28SWIbVgJuWOKuQ MTXQpF9vI553BOT0YdTzqiyruKO3gfzHXjr12nfw/ZhYRaJETAWPFdqd2CwpuhDN2xfm 7gs58nSYBauHobumLMBCanVGrhcNonbFmFrLUFmlTmHMU9z9a+RFkFF/B+nIp18PeBGm vk56lwUaTx1e0xQiGlfGrOqBImLPuASoZ32saSnYwREG1bdWDsBDqsOxIzaRgFFRClTN fZMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=A6587J6i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p26-20020aa79e9a000000b0064f3917aedesi4919670pfq.176.2023.05.26.12.24.34; Fri, 26 May 2023 12:24:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=A6587J6i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243860AbjEZTJH (ORCPT + 99 others); Fri, 26 May 2023 15:09:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243464AbjEZTJD (ORCPT ); Fri, 26 May 2023 15:09:03 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 496DD135; Fri, 26 May 2023 12:09:00 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-51403554f1dso1647602a12.1; Fri, 26 May 2023 12:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685128139; x=1687720139; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QMgZAckXx8VyIyvdPqZk+MsBx1jAUZv0/tmo2hWhZHU=; b=A6587J6isdh2rRAY5QiHXIiiLRAIstSnzsfxn31ZQQHfX98koKki73kOBk7smdJhRK lny+bzLxADkkSMIORh6NCXwlK47mkYte9X4b0gvHsL1HQHp0IrNRcBSg/6hLsKTPCUn9 /SsYa5/c+o0BsUoWVTPBWs1VF9ZXUIk/eKv2pJ2NfMEQ8KhRWNridsAE8QqoPU5bXIbQ QcPaiw6fS9Do0zopt16HdhEwvZtAtPHNIBYWwtaxqOOB4zSM4t4+hWt5Mza4VgX2ZLnm RJ7po8euzJgARrJpBFEMrvN0faEOXeJzJpviT/Rzb4fJmbaWvLlF0p2NybKTmfj+41yM fyZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685128139; x=1687720139; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QMgZAckXx8VyIyvdPqZk+MsBx1jAUZv0/tmo2hWhZHU=; b=kZ37RKnop7sc4sk/Uc/gVcjFxlyHc0m1uBNbN6KMz/XAF+gYVFKzl9EAVpFLjeyIIs fmRxM5lywrXm+gwEVNR+6M2zmLzSe3p4tyrTPfyLOkr5NAbFvJkCVYaneepIw26nF2x2 PsZRQQ2PTG2lost37uTbwW5oB1Ys8W7uPBGwFt3uSn6KnS1tk+IWIJBY0OgeNAxtt+V7 pCONzHmJ2M6FXLaJS9tr9v1tFkQJ1CN20gJF2hAMtK8Y6KTnaprh8IB6u0Ul1Q7QHfoW BD93b0iMuInEulWpVJRK1llGxz199FjJ9TU5dTk8GmPHna+mCIAYMrMe8pqxcQlWlP8P tIfg== X-Gm-Message-State: AC+VfDzE26PvfIcco/J4KlyST2kd/nT4dl9MZC7IS+WwSDcWAeNJ7eEC fzGDM0cet0fPcbFMkzAJztYFOPHV+DfNoA== X-Received: by 2002:a17:906:7951:b0:966:54ac:17d7 with SMTP id l17-20020a170906795100b0096654ac17d7mr4115384ejo.76.1685128138557; Fri, 26 May 2023 12:08:58 -0700 (PDT) Received: from fedora.. (dh207-98-6.xnet.hr. [88.207.98.6]) by smtp.googlemail.com with ESMTPSA id q18-20020a170906b29200b0095844605bb8sm2507439ejz.10.2023.05.26.12.08.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 May 2023 12:08:58 -0700 (PDT) From: Robert Marko To: andersson@kernel.org, agross@kernel.org, konrad.dybcio@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Robert Marko Subject: [PATCH 2/2] clk: qcom: ipq6018: fix networking resets Date: Fri, 26 May 2023 21:08:55 +0200 Message-Id: <20230526190855.2941291-2-robimarko@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230526190855.2941291-1-robimarko@gmail.com> References: <20230526190855.2941291-1-robimarko@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766985919066510966?= X-GMAIL-MSGID: =?utf-8?q?1766985919066510966?= Networking resets in IPQ6018 all use bitmask as they require multiple bits to be set and cleared instead of a single bit. So, current networking resets have the same register and bit 0 set which is clearly incorrect. Fixes: d9db07f088af ("clk: qcom: Add ipq6018 Global Clock Controller support") Signed-off-by: Robert Marko --- drivers/clk/qcom/gcc-ipq6018.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/clk/qcom/gcc-ipq6018.c b/drivers/clk/qcom/gcc-ipq6018.c index abd97b939850f..b8310f29a8ff4 100644 --- a/drivers/clk/qcom/gcc-ipq6018.c +++ b/drivers/clk/qcom/gcc-ipq6018.c @@ -4520,24 +4520,24 @@ static const struct qcom_reset_map gcc_ipq6018_resets[] = { [GCC_PCIE0_AHB_ARES] = { 0x75040, 5 }, [GCC_PCIE0_AXI_MASTER_STICKY_ARES] = { 0x75040, 6 }, [GCC_PCIE0_AXI_SLAVE_STICKY_ARES] = { 0x75040, 7 }, - [GCC_PPE_FULL_RESET] = { 0x68014, 0 }, - [GCC_UNIPHY0_SOFT_RESET] = { 0x56004, 0 }, + [GCC_PPE_FULL_RESET] = { .reg = 0x68014, .bitmask = 0xf0000 }, + [GCC_UNIPHY0_SOFT_RESET] = { .reg = 0x56004, .bitmask = 0x3ff2 }, [GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 }, - [GCC_UNIPHY1_SOFT_RESET] = { 0x56104, 0 }, + [GCC_UNIPHY1_SOFT_RESET] = { .reg = 0x56104, .bitmask = 0x32 }, [GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 }, - [GCC_EDMA_HW_RESET] = { 0x68014, 0 }, - [GCC_NSSPORT1_RESET] = { 0x68014, 0 }, - [GCC_NSSPORT2_RESET] = { 0x68014, 0 }, - [GCC_NSSPORT3_RESET] = { 0x68014, 0 }, - [GCC_NSSPORT4_RESET] = { 0x68014, 0 }, - [GCC_NSSPORT5_RESET] = { 0x68014, 0 }, - [GCC_UNIPHY0_PORT1_ARES] = { 0x56004, 0 }, - [GCC_UNIPHY0_PORT2_ARES] = { 0x56004, 0 }, - [GCC_UNIPHY0_PORT3_ARES] = { 0x56004, 0 }, - [GCC_UNIPHY0_PORT4_ARES] = { 0x56004, 0 }, - [GCC_UNIPHY0_PORT5_ARES] = { 0x56004, 0 }, - [GCC_UNIPHY0_PORT_4_5_RESET] = { 0x56004, 0 }, - [GCC_UNIPHY0_PORT_4_RESET] = { 0x56004, 0 }, + [GCC_EDMA_HW_RESET] = { .reg = 0x68014, .bitmask = 0x300000 }, + [GCC_NSSPORT1_RESET] = { .reg = 0x68014, .bitmask = 0x1000003 }, + [GCC_NSSPORT2_RESET] = { .reg = 0x68014, .bitmask = 0x200000c }, + [GCC_NSSPORT3_RESET] = { .reg = 0x68014, .bitmask = 0x4000030 }, + [GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = 0x8000300 }, + [GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = 0x10000c00 }, + [GCC_UNIPHY0_PORT1_ARES] = { .reg = 0x56004, .bitmask = 0x30 }, + [GCC_UNIPHY0_PORT2_ARES] = { .reg = 0x56004, .bitmask = 0xc0 }, + [GCC_UNIPHY0_PORT3_ARES] = { .reg = 0x56004, .bitmask = 0x300 }, + [GCC_UNIPHY0_PORT4_ARES] = { .reg = 0x56004, .bitmask = 0xc00 }, + [GCC_UNIPHY0_PORT5_ARES] = { .reg = 0x56004, .bitmask = 0x3000 }, + [GCC_UNIPHY0_PORT_4_5_RESET] = { .reg = 0x56004, .bitmask = 0x3c02 }, + [GCC_UNIPHY0_PORT_4_RESET] = { .reg = 0x56004, .bitmask = 0xc02 }, [GCC_LPASS_BCR] = {0x1F000, 0}, [GCC_UBI32_TBU_BCR] = {0x65000, 0}, [GCC_LPASS_TBU_BCR] = {0x6C000, 0},