From patchwork Fri Nov 11 09:42:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13040033 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE9EDC4332F for ; Fri, 11 Nov 2022 09:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oYfJe2S3FKkzXUZ1s/ma07ImcF3Xa7IqOzPZQe8MVpw=; b=c8o7P8+PIjFySi FXmnGTkRjpghTdrgzfvyWQtUKvBjKom1x4jAYGilgr06mc5Cq+LO9y0MyVFDg2u2pwGG1W8bjIA49 cPbxzq8AeXZH/pVogeQ+KwKgjEP5l2V+l2uRNVNjPGCBL4iFwr+lGXObAF2TPrwjVHWtpO/N3vPM4 gF6PKIMEeHyUT4Pd9XI7c/kVDwtrMT+0K7MQFeqIhjGzp2HzMlNudNYD3kyt4SXPb6mvc+ejCRkgw 9RrZ01PscBdUmwh0YxjhXme77378U9V9RczqYaW8u2VBU95SgCQX986WxAn+aCgWg+Z8BZxKYdSpD E1asVUCFSJGvaAMbd0Yg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQZe-00EgLO-Cz; Fri, 11 Nov 2022 09:43:46 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQZI-00EfxS-MD for linux-phy@lists.infradead.org; Fri, 11 Nov 2022 09:43:26 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 1B9E4CE25F2; Fri, 11 Nov 2022 09:43:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5888DC433B5; Fri, 11 Nov 2022 09:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668159796; bh=8YG8lt72rO1Cs+V80J6Go1x/JXY6d0vosuLh08p4JvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F5jHfJUzbt3T6B3evWEbe7XBmR3i3yHG507NsBMsKamKI4dQu51FmTFke4ymx831l eqzxRpr6QOMOH0RN8Cy8A87r2ejEwC5IyF/CtZTUXhMj9SXm6bvaPW+Y7QoTUKd0zN TV7ACvzoaBfbbvD4ioCrB26gtGFGKHnmOgkOt91usj/Yvz53aKzOb4gYxi4Y90rEOu 59j9CJ5qsJPb3ZDgJ7yj4AE8RCDsYWTnBMe0KOaS7w0KLqTkKpqYjga+6yMhN6Hui1 O3N1HDKdplQnhKHVbwt5vczUdLOc0hsxRkZPGbDATJ6PxDH+uNvEi4E6lwCng3NZIx GoXaR7YUF9rcw== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQYi-00030b-Ep; Fri, 11 Nov 2022 10:42:48 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 1/3] phy: qcom-qmp: drop unused type header Date: Fri, 11 Nov 2022 10:42:37 +0100 Message-Id: <20221111094239.11547-2-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111094239.11547-1-johan+linaro@kernel.org> References: <20221111094239.11547-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_014325_201992_68B3CD87 X-CRM114-Status: UNSURE ( 9.12 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The PHY type defines are no longer used in the PCIe, UFS and USB QMP drivers so drop the corresponding include. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 2 -- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 -- drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 2 -- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 2 -- 4 files changed, 8 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index ff198d846fd2..a088477e274f 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -20,8 +20,6 @@ #include #include -#include - #include "phy-qcom-qmp.h" /* QPHY_SW_RESET bit */ diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 111716e25b17..328708a09c37 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -23,8 +23,6 @@ #include #include -#include - #include "phy-qcom-qmp.h" /* QPHY_SW_RESET bit */ diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index 189103d1bd18..318eea35b972 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -20,8 +20,6 @@ #include #include -#include - #include "phy-qcom-qmp.h" /* QPHY_SW_RESET bit */ diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 9b1f8c9d0eb8..8b111b7087b9 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -20,8 +20,6 @@ #include #include -#include - #include "phy-qcom-qmp.h" /* QPHY_SW_RESET bit */ From patchwork Fri Nov 11 09:42:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13040030 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 06C55C4332F for ; Fri, 11 Nov 2022 09:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=u+4QIRXtvlM7hton7Cf16x6bIksROcD6SzJtIabkRpg=; b=hmV7FAXeDKCTz0 mU3rARzdM8Pt903dVHQfPpxhwy6lrpJVx47JPr7CfeG20yreKrwXXaM4NDKrOFQXyCtJqvLqB8GPf 9FaJqBlEWHNa/+Tq62BKiRSUehwQbUrQaPPzJQLqrtll/cBk8+oaLMgbTcjpSPK3WLCvkIhNUumAW kVZcvbj87X7ZpWYFHeldKPsnTkHRznjJA6Z3Rl73A3A8ToeCWSOe4q0lKEJN1pMFgDDxW38iopt4R Wtsc7qs07uXBlJIJxoeBtTgoV/IN+fUdrbWqOC38aye7mxtIB3pY9JLoopF3Wt1ixPfw8I8n3kOI7 Zips+Yb1F3d0QgkYPj9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQZc-00EgHH-7U; Fri, 11 Nov 2022 09:43:44 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQZC-00EfvT-5A for linux-phy@lists.infradead.org; Fri, 11 Nov 2022 09:43:19 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9868761F19; Fri, 11 Nov 2022 09:43:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BF55C4347C; Fri, 11 Nov 2022 09:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668159796; bh=NPLRtc4/Xi9APO2NAgfGkGH+wyMbp8HKKo8ZM8BktiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SmTC1BBmrJxXcYYRf0fP3bXS4z3EM0EYWeLP9UXr0ulim3nf06NrmRvF0HfJ766kw Krzq1iH5aamZYtsRKqYQys8BlObh/bzCX2qSY3SFPTXmlaiYqtcWG87lhR24fM8sP0 5gNN2VHtaOnvBJQpxwSYonvdk/s6oGfLO+0EbBxTJWLXmR910uSHEki/mEYO9Xw5oV eH3jhao8g3WxHqBVVdYmZjD2SXW3hml5ViNpgpCQUUYuRIfUx8KULpVyiRy41cGTth oMA5bB0MpqmKi9xbz5TTUdIyISQR34+nr8/uPuPFVDFjEmC65DzU+7Hc6sajR09qgC VjiwEg8w5zU8g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQYi-00030d-I4; Fri, 11 Nov 2022 10:42:48 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 2/3] phy: qcom-qmp-usb: drop redundant clock allocation Date: Fri, 11 Nov 2022 10:42:38 +0100 Message-Id: <20221111094239.11547-3-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111094239.11547-1-johan+linaro@kernel.org> References: <20221111094239.11547-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_014318_259456_EB592990 X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index 8b111b7087b9..27f2398ebf08 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1485,6 +1485,8 @@ struct qmp_usb { enum phy_mode mode; struct phy *phy; + + struct clk_fixed_rate pipe_clk_fixed; }; static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) @@ -2357,7 +2359,7 @@ static void phy_clk_release_provider(void *res) */ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np) { - struct clk_fixed_rate *fixed; + struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed; struct clk_init_data init = { }; int ret; @@ -2367,10 +2369,6 @@ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np) return ret; } - fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL); - if (!fixed) - return -ENOMEM; - init.ops = &clk_fixed_rate_ops; /* controllers using QMP phys use 125MHz pipe clock interface */ From patchwork Fri Nov 11 09:42:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13040032 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D9A7EC4321E for ; Fri, 11 Nov 2022 09:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nlrAlwrPaEjRHeMU7/KqP3TFQkkdbUoF2BmJ5gx3n/E=; b=zGQKRU9++RCsAO EbU6MiUT62SuGTajlcxIN1tDi/nOELR10ldcctYfaRCgksCyBF6nONZioWwlz88v2pIhrGnX0cBDh emZLrnZxUu9MvmHYzfvudl9V9aWQO6VHHl2adXW9wrKWNADt8REggcqZkIkj/+h0y9bJ1Q7GyrlTo c50LwjttUlzNQz6LK9eJv6pNUWoqdhWR/wT8i2+SLYJaExQa87Qbc9i2xP/mTwj5b5wm0wVg82O18 WLIq8akBu5pya8GOhcu0F8/woFTXXxzCMt32NSAoyV2jegjPdkoLPmt+Z1dzpFsXVl2MeVDf4tIoL YSxc1XzYw5At/Awj3saQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQZd-00EgKo-Sv; Fri, 11 Nov 2022 09:43:45 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otQZE-00Efwa-5H for linux-phy@lists.infradead.org; Fri, 11 Nov 2022 09:43:21 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BAD42B824C2; Fri, 11 Nov 2022 09:43:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5DF7EC43142; Fri, 11 Nov 2022 09:43:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668159796; bh=TzRtDoyAfzMufPd65BGkX4pJ/DMl35ij09Pc1cMge34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AkV9KHrhRaLPwJse3DLZBzlWclo57AXP2hdYhe7qInV7pfqF1KTZLt8OMfbx06k+r o9GGULfLHoOYWvqVHiK/U//cKrOV5fQEIgyp82qL6bkblNQBoFr0UWNXpefv0i3vQo UhF2MbjxzLtaebXZnrwmJWD3RRmzZcMEEUBXYlvKnpVPB0Uj+BRPBT7YvqxZpQFyVM bE1LRoirVW/mSJ5d2+oiuKEcDZ8mucVDY5C9hRZ7fZiKu8BJGI6gdKRcyibQcdW9EW TMLCzMJbtt+Hqv4Jl0/GqRZLjftDUwTEsdFe0ry78I9NZwRHxcmFN/4y45/JZd7qHM 3mbwPHT3w88QQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1otQYi-00030f-Kx; Fri, 11 Nov 2022 10:42:48 +0100 From: Johan Hovold To: Vinod Koul Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 3/3] phy: qcom-qmp-pcie: drop redundant clock allocation Date: Fri, 11 Nov 2022 10:42:39 +0100 Message-Id: <20221111094239.11547-4-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221111094239.11547-1-johan+linaro@kernel.org> References: <20221111094239.11547-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_014320_403523_A71D9027 X-CRM114-Status: GOOD ( 13.58 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Since the QMP driver split, there is no reason to allocate the fixed-rate pipe clock structure separately from the driver data. Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov --- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index 328708a09c37..68cafc9561ae 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -1546,6 +1546,8 @@ struct qmp_pcie { struct phy *phy; int mode; + + struct clk_fixed_rate pipe_clk_fixed; }; static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) @@ -2410,7 +2412,7 @@ static void phy_clk_release_provider(void *res) */ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) { - struct clk_fixed_rate *fixed; + struct clk_fixed_rate *fixed = &qmp->pipe_clk_fixed; struct clk_init_data init = { }; int ret; @@ -2420,10 +2422,6 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np) return ret; } - fixed = devm_kzalloc(qmp->dev, sizeof(*fixed), GFP_KERNEL); - if (!fixed) - return -ENOMEM; - init.ops = &clk_fixed_rate_ops; /*