From patchwork Mon Nov 7 13:28:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 16415 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2051872wru; Mon, 7 Nov 2022 05:32:43 -0800 (PST) X-Google-Smtp-Source: AMsMyM498ywyENmKKqVD0TAo7ExLsya8c/UZaQhFk/fa7RN+gS2e5oXQTW3+QwhQALVYSoZUSysr X-Received: by 2002:a05:6a00:14cf:b0:56d:88a8:32cf with SMTP id w15-20020a056a0014cf00b0056d88a832cfmr39008433pfu.27.1667827963340; Mon, 07 Nov 2022 05:32:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667827963; cv=none; d=google.com; s=arc-20160816; b=mZeO40q/DVhXT9D3iVGaQnXhvzqfyisTuDPCvdMjZYcubud9d3qb8Gx/eTN6Seh2hE oR0vyYmYpAcm0cURz2Ou2aGtrI3iVXdePLD380gENnIwIuZI35PYqyARQoXAjw2VsWUG Al63gVz26PPY9Z1XEaL9EXYTm2u/vdrBvF0k/P3sIDZYB6JPjcVCvuseqYZg8+oNGviE 9bDSAvjydLz9A9vOOk9H0lQf4K6Xxm/SO6MXMPrsrmndHvht3tlZMK9N8qyUbt5p3B6p L4JK3OlMbSlbAmX06IOl8xrcI1pZVv7R0ap5/XSPfc3RzTGbB5Fdx4bkw6gRTain3aeV ehDg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=4s/Ptq8qmBpFC+qJpngwSoeByDBagm3Zx2Ag2l+arII=; b=yLfuhAr00gtdKZkJVeKA+ki7G8EuPGQ+h+HlamPgNO4bALnR2dn87us3HWpTTk0DaL 04nF/uYRYV0wTn6nJ0eNNhneX68bDZIxdw5pnNyJik8x+92BvtU6nbsO88TNATonYpbT AR60UuGUkEyPBTYEDY+l4hTRusILAH81E/MB72S1YqAa7/YyJ51gDdtORW6diYCQN982 7W8T63P2zQkrPi8xbzLmtOoaQOvLl/3Yfu7Wx93bz03p5hJDhz9pVJDF7XBTDs2dQH5l WuVIxJM5c8MyzOykd7S/r+Ghs3XhCBHzN/WLVHcPgsiPx8fTx2awANfPxCpKIEi49Xv0 KBWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="L2PeUV/v"; 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 x22-20020a17090a789600b00201d6d4cc79si12624544pjk.113.2022.11.07.05.32.27; Mon, 07 Nov 2022 05:32:43 -0800 (PST) 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=20210112 header.b="L2PeUV/v"; 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 S232100AbiKGN3V (ORCPT + 99 others); Mon, 7 Nov 2022 08:29:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231667AbiKGN3S (ORCPT ); Mon, 7 Nov 2022 08:29:18 -0500 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EF211CB0D; Mon, 7 Nov 2022 05:29:05 -0800 (PST) Received: by mail-ej1-x630.google.com with SMTP id d26so30036373eje.10; Mon, 07 Nov 2022 05:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4s/Ptq8qmBpFC+qJpngwSoeByDBagm3Zx2Ag2l+arII=; b=L2PeUV/vUgUVmloujR/vHOf91PEBnyAq+3zmOkc/1hunmGtWrlLICfsUgd0JwBoOUT bBfomTM43fmiMli/d4SrMTUHLjvFhvkyF1DF+Bw66b+QdZoHOJwJ4pIeLR/jVT7tlnii jU1gZJL2rRk6pTzfGaEw1Dmx4kN+yaw88/ofOkt57hseoZ7yMjh4TNuAWbhwmQ8GCCAD HMlgfNfW790FXoM50zTC/NTBLGefApdwayg6+JAmL6phIFVMnuwk5AQlTbZ1k3kDanhm 5bHu9GL2FfO9hRr+XK9phvhMELcg9otEYnT0mTBj4kkBtsqN9rXK+wzYUYJpC5BP3LGs rBqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4s/Ptq8qmBpFC+qJpngwSoeByDBagm3Zx2Ag2l+arII=; b=LlCfFSGoE4BWaqBZ+DKn2oaQ4PNye78Gh4e3niJ7SKSd8UHuQqMB6D8erSVD/D0UbD HxCvlAfgDaX0nX8JxJN00BdO9YUuyf6RZhkhLda/CD2KjluK+skiDU/bucL8Cng7KOFK hmO9Ouy4QAMlpfDeY+Y5TG/ODOSHLlll1nOmqtrq8gh6ndS5A3eq0EIFyBf6S8JL4lcx 86CX5bOrtIh2Hos66Ob7fnPsgWofRuTcDIQ9+QdBxOh18nb33KrxsAKD59LHXCpSFlJi A8007s43AHYCQb8W8JhQmY4VRRzeVHDanyu7JuxvWpCJa1ikiGv3MllaT1ebVYXcQNjI nMYg== X-Gm-Message-State: ACrzQf2bCe75t8Fpl7jXXxqiwfmkg4APsAKqMaAVwzubFBHqz7IRXKVP /g77w1NXwwlf1LPg+fB4Bek= X-Received: by 2002:a17:906:794a:b0:7a0:72b8:2368 with SMTP id l10-20020a170906794a00b007a072b82368mr47657792ejo.601.1667827744013; Mon, 07 Nov 2022 05:29:04 -0800 (PST) Received: from fedora.. (dh207-98-26.xnet.hr. [88.207.98.26]) by smtp.googlemail.com with ESMTPSA id ky14-20020a170907778e00b0073c8d4c9f38sm3446037ejc.177.2022.11.07.05.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 05:29:03 -0800 (PST) From: Robert Marko To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@somainline.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Robert Marko Subject: [PATCH 1/3] clk: qcom: reset: support resetting multiple bits Date: Mon, 7 Nov 2022 14:28:59 +0100 Message-Id: <20221107132901.489240-1-robimarko@gmail.com> X-Mailer: git-send-email 2.38.1 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 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?1748844374301011246?= X-GMAIL-MSGID: =?utf-8?q?1748844374301011246?= This patch adds the support for giving the complete bitmask in reset structure and reset operation will use this bitmask for all reset operations. Currently, reset structure only takes a single bit for each reset and then calculates the bitmask by using the BIT() macro. However, this is not sufficient anymore for newer SoC-s like IPQ8074, IPQ6018 and more, since their networking resets require multiple bits to be asserted in order to properly reset the HW block completely. So, in order to allow asserting multiple bits add "bitmask" field to qcom_reset_map, and then use that bitmask value if its populated in the driver, if its not populated, then we just default to existing behaviour and calculate the bitmask on the fly. Signed-off-by: Robert Marko --- drivers/clk/qcom/reset.c | 4 ++-- drivers/clk/qcom/reset.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/reset.c b/drivers/clk/qcom/reset.c index 2a16adb572d2..0e914ec7aeae 100644 --- a/drivers/clk/qcom/reset.c +++ b/drivers/clk/qcom/reset.c @@ -30,7 +30,7 @@ qcom_reset_assert(struct reset_controller_dev *rcdev, unsigned long id) rst = to_qcom_reset_controller(rcdev); map = &rst->reset_map[id]; - mask = BIT(map->bit); + mask = map->bitmask ? map->bitmask : BIT(map->bit); return regmap_update_bits(rst->regmap, map->reg, mask, mask); } @@ -44,7 +44,7 @@ qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id) rst = to_qcom_reset_controller(rcdev); map = &rst->reset_map[id]; - mask = BIT(map->bit); + mask = map->bitmask ? map->bitmask : BIT(map->bit); return regmap_update_bits(rst->regmap, map->reg, mask, 0); } diff --git a/drivers/clk/qcom/reset.h b/drivers/clk/qcom/reset.h index b8c113582072..9a47c838d9b1 100644 --- a/drivers/clk/qcom/reset.h +++ b/drivers/clk/qcom/reset.h @@ -12,6 +12,7 @@ struct qcom_reset_map { unsigned int reg; u8 bit; u8 udelay; + u32 bitmask; }; struct regmap; From patchwork Mon Nov 7 13:29:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 16417 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2052803wru; Mon, 7 Nov 2022 05:34:16 -0800 (PST) X-Google-Smtp-Source: AMsMyM7jiz6jENvvdGhge9jVBJGye+n6qdvnGBv/v6PD9pQmWwXr2g/ZLs7aBPqN67pJkkDoRRCL X-Received: by 2002:a17:903:1211:b0:178:a692:b1e3 with SMTP id l17-20020a170903121100b00178a692b1e3mr52401849plh.48.1667828056569; Mon, 07 Nov 2022 05:34:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667828056; cv=none; d=google.com; s=arc-20160816; b=gtVqme7Fw+kam0lq/2KvOcxNmdqUrFyF4kWUCVSuzwjlueSP61UKUiKQ9ISG2lUPdF U28Dejdg494yJQzYZFU3aSDUzQPWveA681bvD/kYd6Y7MpI29NoYdVozeInZvwv5ZNF6 O850kO6SkBpgvyBg09iOinMgXFfk3EWWrJXOvAYhs8wavxIyps8vWL14hT33Z6yu8KBd bIq1txRir5dWaz3jWKDKXcaO6Yzr3HlEkIBENPhhbt4O2jKfkGu9gr0o3s10xTHHriiW RfyHCPLIh37ZMTkaWzetmvztNzQYwzSbrV0vO7TYTIY3sjXDIRplhkOEiOjfN6C0GHZq CASw== 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=xDq+dF/YTBWalc8Ldtbu93f8AMlelceS56nsDHxpWFY=; b=wVBu1lMApEmW0ZJHY/B3BTJ+bQDI2EI2MnA4MmucUAx7RZo13JyVjFgpyt/Opfuctb aPESBNX8V/tte2VxMzVcDlY1Iof8ZktzqAI2bcvoUi9g84l+KH+H08vU+OSMu8ZQDKTz UhNXVIgGApN1BdzPInrMkWpD5kJ1vTCprOkFn1LF+R8FQZRzz0SfWq2EyKA6C1LBFHM+ yJ3igbyuIedSBGUXCpR6ni3OuRuQGotONQvFjUIaUWp4eF6cf0viXgRa3N1z2lI5MGvM cWMdPRnjE+wjk4yoJPhquDqD0HP2Iw67ghGdQhP8rHdCB3IZDDvxx89TWpV6GVQ1GT9V rNdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AN7WfcRN; 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 u31-20020a63235f000000b00440395dafc7si10885114pgm.187.2022.11.07.05.34.02; Mon, 07 Nov 2022 05:34:16 -0800 (PST) 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=20210112 header.b=AN7WfcRN; 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 S231886AbiKGN3Y (ORCPT + 99 others); Mon, 7 Nov 2022 08:29:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231860AbiKGN3S (ORCPT ); Mon, 7 Nov 2022 08:29:18 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1C851CB28; Mon, 7 Nov 2022 05:29:06 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id sc25so29998146ejc.12; Mon, 07 Nov 2022 05:29:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=xDq+dF/YTBWalc8Ldtbu93f8AMlelceS56nsDHxpWFY=; b=AN7WfcRNngvJVDPpT0OecabQU542LiG7ZfGJ3aRwjFuTIlK2vHkwGk84ZkAYjHJK5q DX+wo9NFVOtMc5YMUfz1m8AmjbFl6mfslo3w57e8nHieYGwLGgIT2N7iaOaQa2IyKVF7 GLsRQQb6Earm+QlBMfoRoo53azeVbNRR2/p1ntWnVDFbdFSRpvkkxHF/ngKPrdJYRtTa A1UutbAtAsWR9/Ro2eYmZ722gRT1rxa5zD5gHMFzDVeEme7idVKxXXiTskr9XQ1+SZxE 7XbORXZ1/PNFW08JnUNRLH5a3mqtwc8kMsmajR0fgUzODDlD79oLyU+v7efol0d5q2ie ihMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=xDq+dF/YTBWalc8Ldtbu93f8AMlelceS56nsDHxpWFY=; b=LhwICmhqW5MoKX272ytSGR5d+mG6m7L0xNvEa8aZZRz8oVjWISDtRn1TEAxgCW/0k3 uUv1nxbLUh9xnzUvRc9h49G8opkOIK5I1nFQCBJLJ5vJ1rH/C0dK1jxSxICixP0g6BG0 Fs4qUbzr54JDJji6psjTqp2afTRbAAQytbp+H0UoB7ZSkaTM4WV5Kle7InaxFsxQYk7y XmqZT/o4xyOQIXXOjj15+PMu/Z84fZwM7ibtBZqpnhVbpTz8kBL+8SNCKWol/jwyPgwN sFnIHBWeZ8o9WSbDXDwZzZC6xLiYRn0UgUc5GQTO0Zryj5LdHw+3DZyHI8AvsUzFbY+f oCEw== X-Gm-Message-State: ACrzQf0g1MV7uNhvSbgSzO8sxyamyVb+pwLLBt6ukZsbWX7EptKmajqJ 42/G4hJZXtJ16jkQG1dOeCo= X-Received: by 2002:a17:907:6a09:b0:7ae:2793:aa23 with SMTP id rf9-20020a1709076a0900b007ae2793aa23mr19134094ejc.184.1667827745265; Mon, 07 Nov 2022 05:29:05 -0800 (PST) Received: from fedora.. (dh207-98-26.xnet.hr. [88.207.98.26]) by smtp.googlemail.com with ESMTPSA id ky14-20020a170907778e00b0073c8d4c9f38sm3446037ejc.177.2022.11.07.05.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 05:29:04 -0800 (PST) From: Robert Marko To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@somainline.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Robert Marko Subject: [PATCH 2/3] dt-bindings: clock: qcom: ipq8074: add missing networking resets Date: Mon, 7 Nov 2022 14:29:00 +0100 Message-Id: <20221107132901.489240-2-robimarko@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107132901.489240-1-robimarko@gmail.com> References: <20221107132901.489240-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 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?1748844472023836063?= X-GMAIL-MSGID: =?utf-8?q?1748844472023836063?= Add bindings for the missing networking resets found in IPQ8074 GCC. Signed-off-by: Robert Marko Acked-by: Krzysztof Kozlowski --- include/dt-bindings/clock/qcom,gcc-ipq8074.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/dt-bindings/clock/qcom,gcc-ipq8074.h b/include/dt-bindings/clock/qcom,gcc-ipq8074.h index e4991d303708..f9ea55811104 100644 --- a/include/dt-bindings/clock/qcom,gcc-ipq8074.h +++ b/include/dt-bindings/clock/qcom,gcc-ipq8074.h @@ -367,6 +367,20 @@ #define GCC_PCIE1_AHB_ARES 129 #define GCC_PCIE1_AXI_MASTER_STICKY_ARES 130 #define GCC_PCIE0_AXI_SLAVE_STICKY_ARES 131 +#define GCC_PPE_FULL_RESET 132 +#define GCC_UNIPHY0_SOFT_RESET 133 +#define GCC_UNIPHY0_XPCS_RESET 134 +#define GCC_UNIPHY1_SOFT_RESET 135 +#define GCC_UNIPHY1_XPCS_RESET 136 +#define GCC_UNIPHY2_SOFT_RESET 137 +#define GCC_UNIPHY2_XPCS_RESET 138 +#define GCC_EDMA_HW_RESET 139 +#define GCC_NSSPORT1_RESET 140 +#define GCC_NSSPORT2_RESET 141 +#define GCC_NSSPORT3_RESET 142 +#define GCC_NSSPORT4_RESET 143 +#define GCC_NSSPORT5_RESET 144 +#define GCC_NSSPORT6_RESET 145 #define USB0_GDSC 0 #define USB1_GDSC 1 From patchwork Mon Nov 7 13:29:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 16416 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2052548wru; Mon, 7 Nov 2022 05:33:48 -0800 (PST) X-Google-Smtp-Source: AMsMyM5ia6trVAmsdAeUBvuxZsMZ/Tb8jL93HKgpXuN3GWLURFnA9GAnBjknierkWQ1XeuEYQd/+ X-Received: by 2002:a17:903:2410:b0:17a:b32:dbec with SMTP id e16-20020a170903241000b0017a0b32dbecmr50116310plo.163.1667828027704; Mon, 07 Nov 2022 05:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667828027; cv=none; d=google.com; s=arc-20160816; b=prCszzKUGDaIlhx+AFT/Wsw7akzLF3zY9atx8s6zqF/Y8S4oRZNRWz7CI1mwqj2ko0 G7bQJIxLAZRUOXheXGZbll+3jK/O42NAvDIK19mQMHLnSlZsjJ2ppYTFaoZe+9+dQHzz q+eYsN9bIfVKBZvAgp+pggI4C3N7o1MBvaftMImNxon9+AepuAFHdOkSmbIIXSKZgXU9 ES5mWd3TJkf3ttu/GuFRKBUm+JEEISYkUU+GetJJ/mgUoSLSPV81s6gUZwNiIfUkt5Ao oHuUtaQNgA9T3S/OhWwO1q+JUqIJcuo8rhIO/ovYqOCztsehHvGlGbfUphUsp6fHh2Yz oidw== 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=XDOdLV96aBPIAMlkNzE1ZyzcwED/u+zRiKOTdjgBJUU=; b=TsxbK2FxpVNE8yKUTrZsFfWdaiyePSqZ9M6Yo75gGCRQz4HXrcYgvW4DT0A1GNA4bv uVCxpUFufU11MIsBSfmNno0P8VowpM9jr9azPaeFu7D9yTV1S9pa19joB98I4BMmG5Ah bKFD2uP+U10WbmfJuvrF6XRBO8nKbwsZxYNK33Du7cTFVosRXb/g3XT9Qru85dkqKnBP im+9cL6W2jt2UuSZ/QbzL7AEJFRcAIQAkA+Rb+vm5OhRH3a78UE7HtF5smvi6ia9e1Zo OocDTNpSMTWNPV7DnVdutAYbJw1aaJAZmpKLbAnanCoPW1ALz7oU1FMCTGgbvg/0/3yF BKoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YgLNaVxs; 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 k4-20020a170902c40400b00184000a834dsi12497841plk.455.2022.11.07.05.33.34; Mon, 07 Nov 2022 05:33:47 -0800 (PST) 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=20210112 header.b=YgLNaVxs; 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 S232134AbiKGN3a (ORCPT + 99 others); Mon, 7 Nov 2022 08:29:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbiKGN3S (ORCPT ); Mon, 7 Nov 2022 08:29:18 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5D6E1CB17; Mon, 7 Nov 2022 05:29:07 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id q9so30216325ejd.0; Mon, 07 Nov 2022 05:29:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=XDOdLV96aBPIAMlkNzE1ZyzcwED/u+zRiKOTdjgBJUU=; b=YgLNaVxs1RztJCcCieI8ERHtdHkFdvRBWXaoGj+AFLeV0EnQ6J9GsBnutFSoPtBsGf wqGEIUoUKqYNOPeCTfn1rUDGU9lSJJHHLAMyEkvxmsyoJ9eWysOIIAcot7QrHsOycz5S +q4LOxO5qs1upjjEHf4jIk1N12UBXbFxAZwTxHCwRSJIduSE0b0ZzJNltKmKYx1KkoUt XJ67MNa49mxB1PeKRLXDPhmykww37tN+1pOnpwTxZmVGCP7PD+HZlxp/DKqcBopnEb1V ylZmHLI/HZ8aYw8pU8iCpTAdKu75zLJV/mhhhXEMhmp5q2GkuQ0NwczZFxyfCRvo4mQz AOgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=XDOdLV96aBPIAMlkNzE1ZyzcwED/u+zRiKOTdjgBJUU=; b=HPDnA8geCSuNImobfdCHM3QjfHemVxFNMA51rvatLbGeqXs7CECMrHkTGjef3qo1Uj /RVYurq6X9xcTIgoDB0zgWFANkW1kO4/aPwabmB509O0H2AjujbrlGC8BpM5CEm2fX9V TOiVzQAA8JilnNpRkRCFwwk9qt54x9qzaMBmB12QZpgz9vX7XDUWI6O4ggw83iWYj5Yb ad3pHHD+9CaeSNjYNhNFZNElK4NqIhuc4EiZobBIa2Fb63jzAGCZyyBOrYKbGgHT2KTG ZRzc2CWJSfnhvQ3tFaznCu+wCnPstk0WTSyn9F16FGb2WGXx7Wk/HyjK4HDvF1J8SGwk nZ0g== X-Gm-Message-State: ACrzQf1XyZ3V1GmH0n6DITaINeHWXd5isafndPNkzxXfznc5nGtCcG3x INVQdlwU81DQE7ihHX/+wNk= X-Received: by 2002:a17:907:c711:b0:7ae:35c9:f07b with SMTP id ty17-20020a170907c71100b007ae35c9f07bmr16421779ejc.423.1667827746465; Mon, 07 Nov 2022 05:29:06 -0800 (PST) Received: from fedora.. (dh207-98-26.xnet.hr. [88.207.98.26]) by smtp.googlemail.com with ESMTPSA id ky14-20020a170907778e00b0073c8d4c9f38sm3446037ejc.177.2022.11.07.05.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 05:29:06 -0800 (PST) From: Robert Marko To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@somainline.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Robert Marko Subject: [PATCH 3/3] clk: qcom: ipq8074: add missing networking resets Date: Mon, 7 Nov 2022 14:29:01 +0100 Message-Id: <20221107132901.489240-3-robimarko@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221107132901.489240-1-robimarko@gmail.com> References: <20221107132901.489240-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 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?1748844441943536804?= X-GMAIL-MSGID: =?utf-8?q?1748844441943536804?= Downstream QCA 5.4 kernel defines networking resets which are not present in the mainline kernel but are required for the networking drivers. So, port the downstream resets and avoid using magic values for mask, construct mask for resets which require multiple bits to be set/cleared. Signed-off-by: Robert Marko --- drivers/clk/qcom/gcc-ipq8074.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/qcom/gcc-ipq8074.c b/drivers/clk/qcom/gcc-ipq8074.c index 42d185fe19c8..37d8a9f4105e 100644 --- a/drivers/clk/qcom/gcc-ipq8074.c +++ b/drivers/clk/qcom/gcc-ipq8074.c @@ -4826,6 +4826,20 @@ static const struct qcom_reset_map gcc_ipq8074_resets[] = { [GCC_PCIE1_AXI_SLAVE_ARES] = { 0x76040, 4 }, [GCC_PCIE1_AHB_ARES] = { 0x76040, 5 }, [GCC_PCIE1_AXI_MASTER_STICKY_ARES] = { 0x76040, 6 }, + [GCC_PPE_FULL_RESET] = { .reg = 0x68014, .bitmask = GENMASK(19, 16) }, + [GCC_UNIPHY0_SOFT_RESET] = { .reg = 0x56004, .bitmask = GENMASK(13, 4) | BIT(1) }, + [GCC_UNIPHY0_XPCS_RESET] = { 0x56004, 2 }, + [GCC_UNIPHY1_SOFT_RESET] = { .reg = 0x56104, .bitmask = GENMASK(5, 4) | BIT(1) }, + [GCC_UNIPHY1_XPCS_RESET] = { 0x56104, 2 }, + [GCC_UNIPHY2_SOFT_RESET] = { .reg = 0x56204, .bitmask = GENMASK(5, 4) | BIT(1) }, + [GCC_UNIPHY2_XPCS_RESET] = { 0x56204, 2 }, + [GCC_EDMA_HW_RESET] = { .reg = 0x68014, .bitmask = GENMASK(21, 20) }, + [GCC_NSSPORT1_RESET] = { .reg = 0x68014, .bitmask = BIT(24) | GENMASK(1, 0) }, + [GCC_NSSPORT2_RESET] = { .reg = 0x68014, .bitmask = BIT(25) | GENMASK(3, 2) }, + [GCC_NSSPORT3_RESET] = { .reg = 0x68014, .bitmask = BIT(26) | GENMASK(5, 4) }, + [GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = BIT(27) | GENMASK(9, 8) }, + [GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = BIT(28) | GENMASK(11, 10) }, + [GCC_NSSPORT6_RESET] = { .reg = 0x68014, .bitmask = BIT(29) | GENMASK(13, 12) }, }; static struct gdsc *gcc_ipq8074_gdscs[] = {