From patchwork Fri Aug 11 13:03:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350867 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 8F287C001DB for ; Fri, 11 Aug 2023 13:04:48 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=E4Cn1XtYMR4Qat+7OSLBVkBH2BhqQRAVIYdKcpcrBI8=; b=LG+PNWBSTDySTk rneoc6PRbFn5ngMbR1BbhnZS4r1Dw8kMKROhZ/rxLnuZzosqxs51znjAqGR7d1HHbC54+dMze62SH fMN0czR1c370YikuGRXLlSeXP1hWoiAvS5oP5LiiCTprsHrjtWyM9beuZiDhfmrp9AfKjJ9s+Pd/k 0VV3meymsQG1ltbqordCvgl1a3Ywg+O7u0E5GkRdv6whwRgP9LiRe51jY3ThUcaZijRfEk6VAdln3 3I/L1in7bCoUpupH99Kzf9kBpVsnNvZriLO/Xd+EZNXa+DKeVEmVZLPTRehMsG8rd70Wh02klJoze 4fHcrC03KLQkUAatW2Xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURoV-00AfG8-0d; Fri, 11 Aug 2023 13:04:23 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURoS-00AfEG-2m for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:04:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759060; x=1723295060; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AjEg3FTVN+rBx+5E/fDJF0wydV3uUpzFCc6aneAIa5Q=; b=MRnEkZIfbJlgHbkjspL+Q1hGM40aaNjLKGMeKmAzKjF9GeL6CCXJT4tN xXYyRDMfRixNlaczb8yrvma05thD9yLtTuf78zdPxy1WQ9FlD/KGjsY7L 9KUqqpb0A4dDVqDlEbViWInBd8fCTZ/2uiyu9cKxy9p+KINjDawh4LCjN hNQC2xJF8ZQpmtGLSwerFbmdPon+xMKwdYq38m3IXYAtEI0OqkUiq9w5A JtI7gFyOQ4Ea2qKHdlC77YbNK0p8KMZESFWRM2D/WgISzt1JGYkf1Alei +ccRcE90zzyxToTcaShRSuMDqmX32BoBLNUaEFJ6TUO3pB/2YXpW1rbtG g==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811664" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811664" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535181" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535181" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:11 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 01/16] mmc: sdhci-pltfm: Add sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:36 +0300 Message-Id: <20230811130351.7038-2-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060421_033270_2A2AA465 X-CRM114-Status: GOOD ( 13.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add sdhci_pltfm_remove() to replace sdhci_pltfm_unregister(). The difference is that sdhci_pltfm_remove() does not do: clk_disable_unprepare(pltfm_host->clk); which allows drivers to choose to use devm_clk_get_enabled() or similar, for pltfm_host->clk. Once all drivers using sdhci_pltfm_unregister() have been amended to use sdhci_pltfm_remove() instead, sdhci_pltfm_unregister() will be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-pltfm.c | 10 ++++++++++ drivers/mmc/host/sdhci-pltfm.h | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 72d07b49b0a3..5a63c8818987 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -199,6 +199,16 @@ void sdhci_pltfm_unregister(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); +void sdhci_pltfm_remove(struct platform_device *pdev) +{ + struct sdhci_host *host = platform_get_drvdata(pdev); + int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff); + + sdhci_remove_host(host, dead); + sdhci_pltfm_free(pdev); +} +EXPORT_SYMBOL_GPL(sdhci_pltfm_remove); + #ifdef CONFIG_PM_SLEEP int sdhci_pltfm_suspend(struct device *dev) { diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 6e6a443dafd9..402f4edc6ca5 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -103,6 +103,7 @@ extern int sdhci_pltfm_register(struct platform_device *pdev, const struct sdhci_pltfm_data *pdata, size_t priv_size); extern void sdhci_pltfm_unregister(struct platform_device *pdev); +extern void sdhci_pltfm_remove(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host); From patchwork Fri Aug 11 13:03:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350868 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 C58FEC0015E for ; Fri, 11 Aug 2023 13:04:59 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BsZAm7kDfPu654LZKNa5qHV/NMh6g71v3tKY2zumwo8=; b=EsFO5mJ+xgDnyg tBB+JUrZz7J8d7MIWo8VAMF+037XyoIMkTvhnch0sxmgTT5VF0OWoux48zXERPAlz+4AvOuPm/pEK Y0J7avIIK2krnasxs/tGD6AI4WZYeXfeQrXVssDdZe1FdkIa5aJwJ7PWk1nn2aDX4ATH/lzlndg+s n7XzvMBtLx0vhf+SHnBg8U82IOuW+99pM1nePmbJ8hd7KmNu578Ujm1sQO78uITleIugP2XtVkEpO FnDBJcMuE7GFmsGnp5bSTDcL5dff9PpbWHdLyl5K0RRecgvTK08yaebsQui/cp+v0Z+zLLTIUWBRg 7NKEV4oAyng1dGJHU0TA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURof-00AfIN-33; Fri, 11 Aug 2023 13:04:33 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURoc-00AfH9-2q for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:04:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759070; x=1723295070; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DIC96ebnUuCHNyIRxeKIBfaOMFZiMuJ8mbYu9+QOiuk=; b=K/hfHo+DylmnxJZMsGakStzBqSp2RArNL2Z+7hTsFucEWH4VIbuddo+C e82mvikmXTPxQ/0ukoHDu5WYIak8WClvrndoPpKVa6OUr5NuPXCE4NA+f fPflYb6ElgDHPLfSlbGfV4bR6Tf9nUdMU6iq7rSN229F+uz3dhb6TBBvx d5A4sDuNtseQ3nsuSA1jn59yRCjI7rIsPGQoILDr9YWervAXkTq6Pb8+8 ipi69doLq4W/tjccpmyDmItlwOTGIo83JR5TRAevTmt1C5FwAQJVluwJk kDG62G4Z9iUjZ/wGLMI5Ps1FTgjmCkasWmtsF9csd9IPZpoRsw/ApKRln Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811722" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811722" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535197" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535197" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:20 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 02/16] mmc: sdhci-bcm-kona: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:37 +0300 Message-Id: <20230811130351.7038-3-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060430_960024_4CC3A50B X-CRM114-Status: GOOD ( 15.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-bcm-kona.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-bcm-kona.c b/drivers/mmc/host/sdhci-bcm-kona.c index 02bb871e838f..cb9152c6a65d 100644 --- a/drivers/mmc/host/sdhci-bcm-kona.c +++ b/drivers/mmc/host/sdhci-bcm-kona.c @@ -310,6 +310,16 @@ static int sdhci_bcm_kona_probe(struct platform_device *pdev) return ret; } +static void sdhci_bcm_kona_remove(struct platform_device *pdev) +{ + struct sdhci_host *host = platform_get_drvdata(pdev); + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct clk *clk = pltfm_host->clk; + + sdhci_pltfm_remove(pdev); + clk_disable_unprepare(clk); +} + static struct platform_driver sdhci_bcm_kona_driver = { .driver = { .name = "sdhci-kona", @@ -318,7 +328,7 @@ static struct platform_driver sdhci_bcm_kona_driver = { .of_match_table = sdhci_bcm_kona_of_match, }, .probe = sdhci_bcm_kona_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_bcm_kona_remove, }; module_platform_driver(sdhci_bcm_kona_driver); From patchwork Fri Aug 11 13:03:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350869 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 4832AC0015E for ; Fri, 11 Aug 2023 13:05:05 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BZaireCNV5sfVQ3dduEqQY9UiJw0kmfKdXI26rOPrBY=; b=qmNn6PDblOmMF9 X9ZkBfCuqUK+hm89tY6WnsqQVZI91NW+QI4KLjnC244/onGlrBopkXLX8ETkOi8hA1bWDbPOQnBci SOFIUSwfdgaXIJcMaU1iux3H8z25jZXnFO9kgzYFf1o4dH4Rv0eyQOi03K1temnoiUUbfLe0iqAm5 RNLE7giZmzZlbd0hznUEvi8u1MurNEiYW/tpzzUJCcTqmzxk4UnbZkR/cg7hpVtWyGHEWfvbJS8vU 1WBQ2b8q/KHpPxLqvixgD+P5FV41JEUl05iWO5c8ART1EYHKp12ikwhAr/S6PogHFh6o2AwwaG0ac Qg8PQ2L3sv6/AGF3A9Og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURon-00AfLE-21; Fri, 11 Aug 2023 13:04:41 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURok-00AfJz-2W for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:04:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759078; x=1723295078; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NJ+oDcj0/HsM4ftQsJN9ghcnz+v/hRDm+Rt5+H5fL6M=; b=iIukfdIGoeG5mLpmiKtjAtOA9tAfz1nSeDJJHL3s+rSSsmf7+kgpJ2Rg p1Y8EpOsR8tn45KSVYRfUUrLQU2Zm2BRpo22yDOEauAImN+S+uMN4S1t6 NI7urF2Q4fQwRmNUBg6m+jECWGuktfikYk1RVRYiWYX2MEPdU8v1jSqKX y8ft6K8wzXWgOd+32CPaoCEsfIBU8VyRQBw1sEs6IiWyjA/wAhk9HItnu 3azIGOalW6LbAZv4hx4rupAYHrmbYYx7T6DFInbudMi480q+xhwuOkGhk kPplqzA0U68M3nlonGhPrS6DqMnRy5hyuUYBBfbkzxnMWerYK7rEEJzmD w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811754" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811754" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535211" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535211" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:29 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 03/16] mmc: sdhci-brcmstb: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:38 +0300 Message-Id: <20230811130351.7038-4-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060438_863060_83AC3543 X-CRM114-Status: GOOD ( 17.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that devm_clk_get_optional_enabled() can be used for pltfm_host->clk. This has the side effect that the order of operations on the error path and remove path is not the same as it was before, but should be safe nevertheless. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-brcmstb.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-brcmstb.c b/drivers/mmc/host/sdhci-brcmstb.c index a2b6d8f2eeb6..c23251bb95f3 100644 --- a/drivers/mmc/host/sdhci-brcmstb.c +++ b/drivers/mmc/host/sdhci-brcmstb.c @@ -264,23 +264,17 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "Probe found match for %s\n", match->compatible); - clk = devm_clk_get_optional(&pdev->dev, NULL); + clk = devm_clk_get_optional_enabled(&pdev->dev, NULL); if (IS_ERR(clk)) return dev_err_probe(&pdev->dev, PTR_ERR(clk), - "Failed to get clock from Device Tree\n"); - - res = clk_prepare_enable(clk); - if (res) - return res; + "Failed to get and enable clock from Device Tree\n"); memset(&brcmstb_pdata, 0, sizeof(brcmstb_pdata)); brcmstb_pdata.ops = match_priv->ops; host = sdhci_pltfm_init(pdev, &brcmstb_pdata, sizeof(struct sdhci_brcmstb_priv)); - if (IS_ERR(host)) { - res = PTR_ERR(host); - goto err_clk; - } + if (IS_ERR(host)) + return PTR_ERR(host); pltfm_host = sdhci_priv(host); priv = sdhci_pltfm_priv(pltfm_host); @@ -369,9 +363,7 @@ static int sdhci_brcmstb_probe(struct platform_device *pdev) err: sdhci_pltfm_free(pdev); -err_clk: clk_disable_unprepare(base_clk); - clk_disable_unprepare(clk); return res; } @@ -430,7 +422,7 @@ static struct platform_driver sdhci_brcmstb_driver = { .of_match_table = of_match_ptr(sdhci_brcm_of_match), }, .probe = sdhci_brcmstb_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, .shutdown = sdhci_brcmstb_shutdown, }; From patchwork Fri Aug 11 13:03:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350870 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 AC89AC001DE for ; Fri, 11 Aug 2023 13:05:18 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OBzjOVzJMKO+tq8i//woc42lGw6qLk5QKFKi9ui6Lvs=; b=JO4ZoPFBNfZprt N10Vh7iTyDXHybrmM0ts6OAYG3ctH0gFzl5JrmuXmnO/q/6uIPhRIWXnxzX/oCiVZ5odLFOBrBW+0 mopxeC911NxgmgLHWa3TeQT8qMnWMFR8VpRMrDW9B4/dKVsQkr4HAnYe4H4Vfc5vLfgTholsRpHUU Zo9sGRa1DmW9a/uiBtHuqGZWjC30qb/qEsboKjUgyIgm39m2/cI4rIybOcYgKSdgF0ZGRWUun/iix F3S2jylIquqHQq2Mzcjy1c+Od9IbTGzrVpsRJeFuGpqmmE5lCmYBccRV+oux9Y0ngN8aNLqReaQDH +OB0mZrUPGLUdr7KED8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURox-00AfPZ-3C; Fri, 11 Aug 2023 13:04:51 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURou-00AfOA-37 for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:04:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759088; x=1723295088; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=og6p3BQnbXUst3nN/+/nya1jNf4kelt5VwqtGADhToQ=; b=B+WXmtZpumRqzgcI6HZpcyMUgJRY3O6Hslh+o6FQ3i7HcFw1dHVeeDjL POe5KwrwTfi6EvC5KWQffTw0LB874PhtevxqF5ZGT6KN2kfGEJ7ojHLTh DU36Juvww4dj+Ma9x+emgoBIz3Q/1ZFTmJiW+2L6E6X747cmZrKgvvbV5 ysPvHkQMRSao3Pnwda3yWQtmNT3Phh3iKYkoGO7ArdUK9kAw+6gnzF1LT ZZXOJYKsLZnVRRzqqLdg9B810VbEefRRcuHUO6cv8qkwXK/y1Lv7gMU3n FwcgggfO3zagmG/rzMYmvcjqI/Ff2sEEqN+Izt1EBBTInvxq9kEbixfMW A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811809" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811809" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535218" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535218" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:38 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 04/16] mmc: sdhci-cadence: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:39 +0300 Message-Id: <20230811130351.7038-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060449_050249_C436D5AE X-CRM114-Status: GOOD ( 17.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that devm_clk_get_enabled() can be used for pltfm_host->clk. This has the side effect that the order of operations on the error path and remove path is not the same as it was before, but should be safe nevertheless. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-cadence.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c index 8cdc178ec1ba..be1505e8c536 100644 --- a/drivers/mmc/host/sdhci-cadence.c +++ b/drivers/mmc/host/sdhci-cadence.c @@ -487,14 +487,10 @@ static int sdhci_cdns_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; static const u16 version = SDHCI_SPEC_400 << SDHCI_SPEC_VER_SHIFT; - clk = devm_clk_get(dev, NULL); + clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(clk)) return PTR_ERR(clk); - ret = clk_prepare_enable(clk); - if (ret) - return ret; - data = of_device_get_match_data(dev); if (!data) data = &sdhci_cdns_drv_data; @@ -502,10 +498,8 @@ static int sdhci_cdns_probe(struct platform_device *pdev) nr_phy_params = sdhci_cdns_phy_param_count(dev->of_node); host = sdhci_pltfm_init(pdev, &data->pltfm_data, struct_size(priv, phy_params, nr_phy_params)); - if (IS_ERR(host)) { - ret = PTR_ERR(host); - goto disable_clk; - } + if (IS_ERR(host)) + return PTR_ERR(host); pltfm_host = sdhci_priv(host); pltfm_host->clk = clk; @@ -556,9 +550,6 @@ static int sdhci_cdns_probe(struct platform_device *pdev) return 0; free: sdhci_pltfm_free(pdev); -disable_clk: - clk_disable_unprepare(clk); - return ret; } @@ -617,7 +608,7 @@ static struct platform_driver sdhci_cdns_driver = { .of_match_table = sdhci_cdns_match, }, .probe = sdhci_cdns_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_cdns_driver); From patchwork Fri Aug 11 13:03:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350871 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 9423AC001DB for ; Fri, 11 Aug 2023 13:05:19 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8knrXF6hEVLvN2awLELai6MbIwLU8Tqt6d0Pan0vCss=; b=DyUtfgN3FImwjO 1jYntUqj3dCb2gug5TFBzphxLFdb3urz9R8xqpzxdjo/Tm+aRL+NTati6cHsDZuVybM62gK+4WclV YmtgHvh7Ly2NUpZZVhyFU1vKcRp6uigKmNH2Tbk30IzEpuEQPFk/QgNJdp2OqQPaSm/+qil7gghtN kbbNEqqlhaSZ2CYqbhJmoQwHv7PiHdiYCNSValeNNboPDEZUkW5FPiqA2DvwH3j00eBWcY+BY0uI8 A3aK2x+2wFau3gs41RDxHCIDAiiTamW7kKs7lb21FB0IZi62X0maB1ow5Y6JuzvZukSrVhTE4Dj3i kyT0bNjJNeuCWiFbrmDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURp4-00AfRg-2A; Fri, 11 Aug 2023 13:04:58 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURp2-00AfQo-0K for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:04:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759096; x=1723295096; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xZrErSzsM0EXMApP7R+1ojq0A8MKbG/2/kUip18lDpw=; b=js+nRpdHQgya5vRtu0GHXmUBd9fLhq10FOOfrnyE64YNlZ/PzGrii87m 9yrW+AMvUZ9KLRIFRAXRp8Cgv23xktnxoGbbkcaXp5xU2LcAo/tPd3Fi1 11aDWH0TNtMQWD5MC3zJaygXtKiDXmyZ0c6WGe6KgPKpKeqanXl625kkv icvZUFC7RChGrG6g9AnuZA+osjncPtbbGA8r6NuSNCqpNm9WnrR9BRuU8 8KzLVK+RPfPEWCi2O52TEZj6Z/fT+uzlWKo/iMJ41qmoab+nzdYJwyES3 E8ofd/641eAklHPaY5fxo4cQvwpjgpyEASPrKS7KOL+sdicCmnx1MkEIR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811851" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811851" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535225" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535225" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:46 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 05/16] mmc: sdhci-dove: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:40 +0300 Message-Id: <20230811130351.7038-6-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060456_195273_2A0456A4 X-CRM114-Status: GOOD ( 16.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that devm_clk_get_enabled() can be used for pltfm_host->clk. This has the side effect that the order of operations on the error path and remove path is not the same as it was before, but should be safe nevertheless. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-dove.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-dove.c b/drivers/mmc/host/sdhci-dove.c index 75335dbf223c..88ec23417808 100644 --- a/drivers/mmc/host/sdhci-dove.c +++ b/drivers/mmc/host/sdhci-dove.c @@ -75,10 +75,7 @@ static int sdhci_dove_probe(struct platform_device *pdev) return PTR_ERR(host); pltfm_host = sdhci_priv(host); - pltfm_host->clk = devm_clk_get(&pdev->dev, NULL); - - if (!IS_ERR(pltfm_host->clk)) - clk_prepare_enable(pltfm_host->clk); + pltfm_host->clk = devm_clk_get_enabled(&pdev->dev, NULL); ret = mmc_of_parse(host->mmc); if (ret) @@ -91,7 +88,6 @@ static int sdhci_dove_probe(struct platform_device *pdev) return 0; err_sdhci_add: - clk_disable_unprepare(pltfm_host->clk); sdhci_pltfm_free(pdev); return ret; } @@ -110,7 +106,7 @@ static struct platform_driver sdhci_dove_driver = { .of_match_table = sdhci_dove_of_match_table, }, .probe = sdhci_dove_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_dove_driver); From patchwork Fri Aug 11 13:03:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350872 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 245F5C001DB for ; Fri, 11 Aug 2023 13:05:33 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=47t4TyprvyRk8Ak3CSXohxmeVYWDWKTc1OggfB0r1J4=; b=zUeFf9v/zvW7Ln 82jVtfmcOEl+7/DJNmXov6bK7N2c5dPMWmlz86SQ8tnoC6K3BzVd6mHuQ+OOQpbjtxrYNSmSBAeKz dEtX1hnCe1BmHtT4ki1L6TYhoKLLRZ19jKKH0mLtucVBe1PlemKpc3lIVzW3hXizPwxbo00ZHR+w6 Eq5MMM0x817s2g6S9GZXUR+mW9K0Zt8I31plJM4E74xtBrsRNvScA2geeFC3d01BtyayXOjI3y5g1 7EvON+EtJk75vM4MdhjojT3ce5/SOMPHMfixmRU0ezvCbQogDEKMf+aWYPK6en9NkBDR0E9QLGqVu q120VteMmEa8wVb7f2Rw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURpD-00AfVr-1B; Fri, 11 Aug 2023 13:05:07 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURpB-00AfTe-0f for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:05:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759105; x=1723295105; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1In5kSRWhvZHc7zpV71cszO6jwa5BLGsLz6bC4bc1BU=; b=WmkACXYLXeEas8ktAIPjn8H4PUf4I8jzMhDvq9cKSlBOWZ4+jsgprv+i hOLwwX58kR8c+CRsckZ8m4scQvJBhAgbX6Hk1WO+iL0CTRK1tAcKP0M4D xaL/jZ7jupJhlOTy0ZnEAMtqzfbRtdrxisW8nyO0LDvul/aA1oxxnsSIr tegNPEK9cQubncAOq0lHVOTg1SFy9PGp+K8tGCciLW7OYnExpf8/Kut3x 4U+TrH9/2foTWKzus6+vCVcbPyDBZndbIXK8pGEIQis0pDmcssFLKHGfB pE73hbTxAWK6y+v7mRZrjEg9UVltWpRnHJNJTL2LYz5u3P+6PY3ljyWYN A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811895" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811895" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535242" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535242" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:04:55 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 06/16] mmc: sdhci_f_sdh30: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:41 +0300 Message-Id: <20230811130351.7038-7-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060505_292496_6A7BCD76 X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci_f_sdh30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 47ae853f51aa..c58e7cb1e2a7 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -214,7 +214,7 @@ static void sdhci_f_sdh30_remove(struct platform_device *pdev) struct reset_control *rst = priv->rst; struct clk *clk = priv->clk; - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); reset_control_assert(rst); clk_disable_unprepare(clk); From patchwork Fri Aug 11 13:03:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350873 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 C84CFC001DB for ; Fri, 11 Aug 2023 13:05:38 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CjBIt59XpxPybOK7AphQ4hHJ9TNyIeL0em1YKtfo7po=; b=tEdHx1HIjTNM9q DmFgySk6FR1QHziyTSsgixBqyaFk0bhj7dO6EVTCCuPOcva4PwPp3n/IKNUvwcszm3daqbgFs6+2K M6LnGGtc+8jsYpQBx5aD8byd62DVsx5zVjmRBu/tFsc0tcaLO2GGJjERmvzFGDkFK2xw09+gFc8Cm FtiHgXEEHliLnN4r0wqOH3r00pcDf/pKm0bVf9NvXJBnqvKzPENOWfxLrsAg0PSy3rOfvCA7VgvLt cDep1cWZHb6B7NXHaIu/mwUD5r9x0wrdDb+Fk0aijEisHg6RQJDkg6yh/HWNBPjzeChi3UmzomCDh 82nNuPaQHQuMWe9llimQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURpO-00AfbD-0P; Fri, 11 Aug 2023 13:05:18 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURpK-00AfZK-27 for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:05:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759115; x=1723295115; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EpaGcbRZtUVPRNtweQ68G8X1R1przpLPCnn4gPSdxoU=; b=bdQSOxm+6NamJykIWSqYh88m97ZfTugeBAzAWVaFfDy2DFykWT4VisyS muIprZ5uTquD+mYdzNIA0jfoN+erP1JzgjKifKys4j4EmBq/5A8Kb3+Wk ZsjUgud46YQxtUlFddAD30ApwlWVKgT3XABGbKyNUPrIOYIFBKp90+yk3 2ZTrEqG83c8go5WNl7dRhFBAgbqemnETtTOK2yLtp42gS1r7nBfRCRT2H jAWSajGzrpOg0HZVceCIDlZOlBTGJf2XMgkz3oBuKVfXfvFBoilc5JBbI IswK/2EuTrMQcCHpE4282Gn9DzDxum6m7FGbKkEjVc5qsfM8qHSmMCfG6 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361811952" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361811952" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535251" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535251" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:04 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 07/16] mmc: sdhci-iproc: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:42 +0300 Message-Id: <20230811130351.7038-8-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060515_115303_8CC1279C X-CRM114-Status: GOOD ( 17.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that devm_clk_get_enabled() can be used for pltfm_host->clk. This has the side effect that the order of operations on the error path and remove path is not the same as it was before, but should be safe nevertheless. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-iproc.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index b1547bcbec32..10235fdff246 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -386,16 +386,11 @@ static int sdhci_iproc_probe(struct platform_device *pdev) host->mmc->caps |= iproc_host->data->mmc_caps; if (dev->of_node) { - pltfm_host->clk = devm_clk_get(dev, NULL); + pltfm_host->clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(pltfm_host->clk)) { ret = PTR_ERR(pltfm_host->clk); goto err; } - ret = clk_prepare_enable(pltfm_host->clk); - if (ret) { - dev_err(dev, "failed to enable host clk\n"); - goto err; - } } if (iproc_host->data->missing_caps) { @@ -406,13 +401,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev) ret = sdhci_add_host(host); if (ret) - goto err_clk; + goto err; return 0; -err_clk: - if (dev->of_node) - clk_disable_unprepare(pltfm_host->clk); err: sdhci_pltfm_free(pdev); return ret; @@ -432,7 +424,7 @@ static struct platform_driver sdhci_iproc_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_iproc_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, .shutdown = sdhci_iproc_shutdown, }; module_platform_driver(sdhci_iproc_driver); From patchwork Fri Aug 11 13:03:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350874 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 8FD72C0015E for ; Fri, 11 Aug 2023 13:06:12 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DOKm45q7sfyxGZxINznayYCHv0Q9I6X85Cky0ydiRgE=; b=GRR0ys/VsRIF3A buiTpk9n3XqoS/ESr0OvhlGg1x8chkOlvn/ebBByl+beGMjrD4nLNYgD43OffpsTQuG2My7IBQCIG lfibKZISqmq/ekj4d8kpAVSqv7NcBrrXSKe3rxeoelUcGPZGxoClNxk7A86BfzjDslZ0ikLGn8uZT lxTbYWBdVbu+tyep0Y4s1IOGWJ/+/TvYDXOyEQ3W35cdVAEes4A9V/bSPM//SbujO9H1/XI2NhEMP EbeJ5ngHwKzhq66Mswpebk9BLoJrDVLXgKB8kJ+Htlfnke+vr8CNvWC5cwsioqulGJtXM0xQe4vok yhPfTdMx7VQlb9oc8tIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURpo-00Afl5-33; Fri, 11 Aug 2023 13:05:44 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURpm-00Afju-2K for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:05:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759142; x=1723295142; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4Wpr+H06t2fMqc96D3gA9qTHa+iJJfudU7PaCZYhRrM=; b=dcMu97ifCG1957ewnUobrt7qS1gOF2bOMxtD95grcmUa+2iWHSAOuON2 eZ/xsPM1UHPE5CWOlbBwov2hSzqBE3f/kN6J9orIzGLrUst38cUrW9qqt 6ISHesQUV88Xxn31wPeZxpRYJ3yQcAA8tbEa6uvCZNuTUNr/deJejzsgB Dg8Q8pSKE1LIJ4Gryc4rxZpOrEpdxV30twlfKANeU98d69/jSylhe/6cx 8PaQ2wKX5aouLsO19kguGnJbdkembhy97dKdw+xoNAPNDiM8/iIFuxphA NisN3kgEV4k5wl6nR5FstHHTsHITTznH4I7hRFv6kQmhAcBRk0Owsn/lV g==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812152" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812152" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535255" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535255" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:12 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 08/16] mmc: sdhci-of-arasan: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:43 +0300 Message-Id: <20230811130351.7038-9-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060542_819013_A1AC0A5B X-CRM114-Status: GOOD ( 13.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-arasan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 15025af326a2..5edd024347bd 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -2022,6 +2022,7 @@ static void sdhci_arasan_remove(struct platform_device *pdev) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host); struct clk *clk_ahb = sdhci_arasan->clk_ahb; + struct clk *clk_xin = pltfm_host->clk; if (!IS_ERR(sdhci_arasan->phy)) { if (sdhci_arasan->is_phy_on) @@ -2031,8 +2032,9 @@ static void sdhci_arasan_remove(struct platform_device *pdev) sdhci_arasan_unregister_sdclk(&pdev->dev); - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); + clk_disable_unprepare(clk_xin); clk_disable_unprepare(clk_ahb); } From patchwork Fri Aug 11 13:03:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350875 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 CF5C8C001DB for ; Fri, 11 Aug 2023 13:06:39 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TvPkOCgHliF8S+xh+bSTMqO6OTFmYv4snz6JWd/6RyU=; b=caS4Atg4ETnPI7 fVVMg07NGuGRkgd0CrTpAEjYwQEHyubfe8GJRW6inpPzhQuNRzWZkASC8DoXjEhKVR3H1dZR06m5W p8QLmC2cbHvGl3S+O5qwocKTFhoKvJ0luDo0OMIorcWtlbcc7+O+SyYyrLtuu3LIS+WuzCWNNcZnR 4V1yNRn4VM4wGogm6C0ObyLK3Em4OFH1Hr0c/puFwSUeU5X2MKhHjHkz9lVLuAI5tgpUOy29KWZR7 Hno+SHkI5KwaweM06dS5oAXXwMbB0Smac6h+2Yd8pHs/reC/rZleLz6SfrZtA327pSVHV0byWrp2+ i6DJvAYa6wxEAHsa+lRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURqJ-00Afsn-0n; Fri, 11 Aug 2023 13:06:15 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqG-00Afrz-2b for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759172; x=1723295172; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1wMuUWk+qLV1632Awen/X3G20KWSG3w5FhLYhGIunT8=; b=SDkfP3k4dQAgqaoYzFtwgf9SBhHOsjpSpFZFokvqw7Gy+cvmGGWOWZhQ 7Ym9k/rB/OtAvg7JvOMCQmC6CjZYgu79z6rvQphKBL/osmpLdLzj3mq7u +iqGxoOn4n+j4hDsI7knnkBk87LnbYjVFvcmE5kI2RRpAq0kkBZ2c2/3d kXtNhbDFv8lGQCez3H6EOtBwKJZN6uDeEfMVPQsm24CPO/XdkS/UWtVa6 XGYdVHzr9fOPgoYMIl7dkhc1wSlOCMQaCNwDMP90HoyU0tqRbTFBx+j2E yBNPFSzTO+X1wsIkYadhgIM6fAU5RcDpVJxUkRj77yD+vjrfXvGTv2+iA w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812401" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812401" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535264" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535264" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:21 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 09/16] mmc: sdhci-of-at91: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:44 +0300 Message-Id: <20230811130351.7038-10-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060612_990033_77BD70FF X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index db01ea9fa203..23a9faad2ff8 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -456,7 +456,7 @@ static void sdhci_at91_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev); - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); clk_disable_unprepare(gck); clk_disable_unprepare(hclock); From patchwork Fri Aug 11 13:03:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350876 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 70708C0015E for ; Fri, 11 Aug 2023 13:06:50 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aO140UjTegpObzcnmzs8NBXaXJvNmleFwXYNC0VDh7M=; b=sRVC1ljVI3A3AN pGPmKciQpUCcpgTQVipJCdP5/lEUHUzRDctQLfsNeJUdaSRg/KUN5Ns9a3P/mHKsCwUpiIzighC0v hI8Nus0aBn76sfMOpg3PpFSlpNmzTKFzFREf7JmzGeZH7dgQGr0MPF90Tnks8c2aIBYWsO+Qkafeq K6br81/bDFsUIxzdc4Pr5FOHDUcjpzs5oyUvyutQyM7SqBi64jRAN7AJlgPgVuXSa0YT3sv0NJKYn rkcLMGWCNZF17imgyFcYmgvPECmDDEynYJ5RPN2KJuwRRDqdSLemw8z1+1xKeHChTecGS3INQ0sLw GJLREymOmPDx6sGhSf9Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURqV-00Afvg-0F; Fri, 11 Aug 2023 13:06:27 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqS-00Afus-2v for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759184; x=1723295184; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ld9CK0rCa3tPsrpHzxmuQkRBDumJn2j+IQr/7+g+C+4=; b=hJ+mlLu/SuNzmR4SY6s77TVyzT2PnzbunSI/zVFtyr0HeAyH4opkX32b SxBSYlU/Q9CYw2DmD2WHZnnioQRFVaC3qxriP88VZN5xPFmA6AjF6dJGC aS0zhmt3SHJ9MT5EpyjgRszljJVjJ7kkElBiMxvnjgPbB4VyTr+TxCB1u b/Yu7qt/aF/lvXCCoHmQiNXOyCudRic06qw34qB9aYl9GHjQZtHHVbuVN N8Vx57VaApAhfh7gkQOX7Lw/WW3bDH9+DMVeCREp1RL3h0IKDa11micNL CNu45Qien/5BMVBkrJclvQkxigZ51K/nHzmlapxaFsyKyOIxEtAgGniqj w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812516" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812516" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535268" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535268" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:30 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 10/16] mmc: sdhci-of-esdhc: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:45 +0300 Message-Id: <20230811130351.7038-11-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060625_034727_9844EAB4 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-esdhc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index 5072b59f6165..3ae9aa25745a 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -1521,7 +1521,7 @@ static struct platform_driver sdhci_esdhc_driver = { .pm = &esdhc_of_dev_pm_ops, }, .probe = sdhci_esdhc_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_esdhc_driver); From patchwork Fri Aug 11 13:03:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350877 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 D0139C0015E for ; Fri, 11 Aug 2023 13:06:54 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1Qf6WwqnkFAqomWVCthJgrlpyLIfoRBROi8zEraMnRw=; b=xuj/qBCRoZr8EZ ZFw1c8xGteDiVMDIoNz2RBXsC4sp9tlj2zIHCUKqPIPyTXAVEJCtAKJmHk/3ZDDatK1MctTYkiuDn UAtuIC1n7EBw4V/DULwHezXsY1g1kfB06z2qOO2v/WsGZDdrtsdli2edYf58NUcJnM8SXSFNEgyJm mGPcEf29jBt87pQi69a9dAMj94KrrMBwLGf/Q1pmDQ+uUP6OlRrFgZkQZL+hNC/hVeh9NcojQWAti TCMOI/fpYtlykQGZABCWPbBKpiLCoHOrzc0W8K6WZWqyuoUMTshEoHGHjeJKTSPHkUoaf0zub7nWa ojZ+vY0vFfMvDHPrsDbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURqZ-00Afwr-2G; Fri, 11 Aug 2023 13:06:31 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqX-00Afus-1r for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759189; x=1723295189; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WT3HV2tZzWIc9OTpeg8Qukvf8xDydJfY3kEvm35RQKY=; b=JmIB8DU1NWJJ7ZlVrc6/BAkY+rFVLCVd9AOzZ8zVsQdK80B0yDW4KuvT dDU1qwxw+bmScfxohGc+1XTEjHZrw3pUSBz5K4aDlaV+qfw3YTbYQsqA6 SqN+v3rV0hkVXmDyZ0WNCAgPh4uC5+0x1sf90H2zWfZogsMdvtHnzs/vK dIL3bSWzV8AThN9gmNpadayuOMk+5ln1ALi+1uGnVSC9f+gEWXR50xH25 5rZG6cVnh1JDalbdoH+j5dUPYx2tCWCr8FqQTaAfrCKH2+y7XtJKB88Ka on6qi+q7sfCdhJon2/oFAuuzxqG4g0mT6nRjZT85qX6Eq6GrA7hVuPQg1 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812595" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812595" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535275" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535275" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:39 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 11/16] mmc: sdhci-of-hlwd: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:46 +0300 Message-Id: <20230811130351.7038-12-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060629_679079_2DF2E7C7 X-CRM114-Status: GOOD ( 14.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-hlwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index cba3ba48e9dc..06e88bb22ea5 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -85,7 +85,7 @@ static struct platform_driver sdhci_hlwd_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_hlwd_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_hlwd_driver); From patchwork Fri Aug 11 13:03:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350878 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 175B8C001DB for ; Fri, 11 Aug 2023 13:07:05 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ttng+E7imHwr9Z+I3mJV3+5jSrhwDUey73XlnvZYmnw=; b=D2hhaDFBAolb8D kYoIkFI8y7oqPd6PIqy0a1Za8IvnQ4YzbSwsK7lVQp6MhI5zlFeOV/5sOwREre/yJ+hcDibhR8zc9 NGZOeRYHWnrhFxvQg1zcq+JKHu2Hbyq6cEiLT35R4gVwfTQJYDqbYIu01pJEp+bA8018CPTE0jFpC 0ulheWolGHg3kE21wHgr1Dsp4EWLZ1IeRAMLfi6FEfSSp7YTxWJxH2N2EmNHObEagn06dlNEsRuj0 vRhE5YfhURMNBQZAQv1pHfVTHA1hD0FgoCiCxbguKMWDdJghsZhFIrKwEb29FCWbvRQRfWg/C9pOX idV8o0muL9+pFnqnNcUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURqj-00Afz4-1X; Fri, 11 Aug 2023 13:06:41 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqg-00AfyL-2H for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759198; x=1723295198; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cLITUlXAKi/BwJx9Dy+d4fQ//8DCwhp6Xa5EddapwMg=; b=cZsCpTyKlE3PJXBj8N9/a/cLsRragn38kOBSBmlNr0UAT9VmbSF72Me0 hIjbMJbQeKJhdm+G91lqWRYAN+ryCxCs6vX8O2TYZI+MEpoKaoDOgirRd PAFLjBsSBNDZy49eElv0KHJh1SDW7iyPL1RlJ/FoPZY/1kFBQCnH7NTxU FW7mF3Rwo3lvxgC2xtHoRH09hlF9I4KGUmH7Fta4SUbbltB2kxhm+VehG gl/TWMxSWEdQbcO+DioKFTNlBN+7uZ8MqQdhz+GPjmaeRuYfa9w4UnLHA YM4c4WjdgXma+5PK9ER+S8FomK5VFfKhKPwDEFNgQCxUqgP441QuUSfIs Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812685" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812685" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535288" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535288" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:48 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 12/16] mmc: sdhci-of-sparx5: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:47 +0300 Message-Id: <20230811130351.7038-13-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060638_819102_8E425567 X-CRM114-Status: GOOD ( 17.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that devm_clk_get_enabled() can be used for pltfm_host->clk. This has the side effect that the order of operations on the error path and remove path is not the same as it was before, but should be safe nevertheless. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-sparx5.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-sparx5.c b/drivers/mmc/host/sdhci-of-sparx5.c index 653480dbe6bb..64b77e7d14cd 100644 --- a/drivers/mmc/host/sdhci-of-sparx5.c +++ b/drivers/mmc/host/sdhci-of-sparx5.c @@ -184,15 +184,12 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) sdhci_sparx5 = sdhci_pltfm_priv(pltfm_host); sdhci_sparx5->host = host; - pltfm_host->clk = devm_clk_get(&pdev->dev, "core"); + pltfm_host->clk = devm_clk_get_enabled(&pdev->dev, "core"); if (IS_ERR(pltfm_host->clk)) { ret = PTR_ERR(pltfm_host->clk); - dev_err(&pdev->dev, "failed to get core clk: %d\n", ret); + dev_err(&pdev->dev, "failed to get and enable core clk: %d\n", ret); goto free_pltfm; } - ret = clk_prepare_enable(pltfm_host->clk); - if (ret) - goto free_pltfm; if (!of_property_read_u32(np, "microchip,clock-delay", &value) && (value > 0 && value <= MSHC_DLY_CC_MAX)) @@ -202,13 +199,13 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) ret = mmc_of_parse(host->mmc); if (ret) - goto err_clk; + goto free_pltfm; sdhci_sparx5->cpu_ctrl = syscon_regmap_lookup_by_compatible(syscon); if (IS_ERR(sdhci_sparx5->cpu_ctrl)) { dev_err(&pdev->dev, "No CPU syscon regmap !\n"); ret = PTR_ERR(sdhci_sparx5->cpu_ctrl); - goto err_clk; + goto free_pltfm; } if (sdhci_sparx5->delay_clock >= 0) @@ -225,7 +222,7 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) ret = sdhci_add_host(host); if (ret) - goto err_clk; + goto free_pltfm; /* Set AXI bus master to use un-cached access (for DMA) */ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA) && @@ -239,8 +236,6 @@ static int sdhci_sparx5_probe(struct platform_device *pdev) return ret; -err_clk: - clk_disable_unprepare(pltfm_host->clk); free_pltfm: sdhci_pltfm_free(pdev); return ret; @@ -260,7 +255,7 @@ static struct platform_driver sdhci_sparx5_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_sparx5_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_sparx5_driver); From patchwork Fri Aug 11 13:03:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350879 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 947B6C001DE for ; Fri, 11 Aug 2023 13:07:13 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zZKpTC7iy5b+6an9V7c/JhBJSsgMOKRfHfuYP6PlXLk=; b=1D0B5IwStfwGYh M7QoFbhZ+P8FIXa6CvhlBEqAVG4hzCLbq8mvbzcfseBwc8A5evHSTpI1aliPAidz0D8hAAZ/mvnsN 4N5bUZynIbuW+epm4wTgrt6DtB4k4IUXUqaXuZnRIG+QygwW5oG+u/9pwzw3EanckLDU4v+25NPat SNAz6+j3+HlNzq7BuHry0XDrms3T4qPndBgwItiVELwwfIBgFs3EPViaEwLHmEf6IMpYDcyuO+nZp RpXf6XNkN9goxs4rY8X4nRgwLhmWpqzpU6Dx111xHjQiKZc/VK88pV22FecD7cRiSkzR7UouEjxDi gdDvj+LrOLLU5ZhKVvWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURqo-00Ag0m-16; Fri, 11 Aug 2023 13:06:46 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqk-00AfyL-1j for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759202; x=1723295202; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cELYaecOpOxwmlY9lj9HXHEoAv/KTQp9fFm7cY/4i5Y=; b=FrlJTKUSlKhwHf+7QZ3EgQM3Pdm4jenLTc5VVA8IXd0L2IG2R+F31p87 QeeNyFotytAxNhxoURgccAjoMotnW99FaoImfm7YPL2fljv6I6BpASRKk UmzG1WHIhwbhpEiLpDKL6QYtJx+Kn/HC+Aej7zH9yq+O8KMMrpeU1cBxU inBQ1O8C7peAB1RiY3bexWyAEMnBRUqTBxktW2V0iVMNSQATdV5nHHOd3 2l0y8PUhRMYmlPmt/aM8E1lx3oPzhB7j2N1bwqJQ+MKj1z03QeYGBRWLI VMitbD9jF6f2GlY1A7CQGS1WOKXQJRlvHgqAMh2fnwBDkfTwBzxgJ4bjT w==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812751" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812751" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:06:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535330" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535330" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:05:57 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 13/16] mmc: sdhci-pxav2: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:48 +0300 Message-Id: <20230811130351.7038-14-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060642_666547_D253CC77 X-CRM114-Status: GOOD ( 17.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() so that devm_clk_get_enabled() can be used for pltfm_host->clk. This has the side effect that the order of operations on the error path and remove path is not the same as it was before, but should be safe nevertheless. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-pxav2.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav2.c b/drivers/mmc/host/sdhci-pxav2.c index a0c8470e9214..b75cbea88b40 100644 --- a/drivers/mmc/host/sdhci-pxav2.c +++ b/drivers/mmc/host/sdhci-pxav2.c @@ -268,26 +268,21 @@ static int sdhci_pxav2_probe(struct platform_device *pdev) pltfm_host = sdhci_priv(host); pxav2_host = sdhci_pltfm_priv(pltfm_host); - clk = devm_clk_get(dev, "io"); - if (IS_ERR(clk) && PTR_ERR(clk) != -EPROBE_DEFER) - clk = devm_clk_get(dev, NULL); + clk = devm_clk_get_optional_enabled(dev, "io"); + if (!clk) + clk = devm_clk_get_enabled(dev, NULL); if (IS_ERR(clk)) { ret = PTR_ERR(clk); dev_err_probe(dev, ret, "failed to get io clock\n"); goto free; } pltfm_host->clk = clk; - ret = clk_prepare_enable(clk); - if (ret) { - dev_err(dev, "failed to enable io clock\n"); - goto free; - } clk_core = devm_clk_get_optional_enabled(dev, "core"); if (IS_ERR(clk_core)) { ret = PTR_ERR(clk_core); dev_err_probe(dev, ret, "failed to enable core clock\n"); - goto disable_clk; + goto free; } host->quirks = SDHCI_QUIRK_BROKEN_ADMA @@ -339,12 +334,10 @@ static int sdhci_pxav2_probe(struct platform_device *pdev) ret = sdhci_add_host(host); if (ret) - goto disable_clk; + goto free; return 0; -disable_clk: - clk_disable_unprepare(clk); free: sdhci_pltfm_free(pdev); return ret; @@ -358,7 +351,7 @@ static struct platform_driver sdhci_pxav2_driver = { .pm = &sdhci_pltfm_pmops, }, .probe = sdhci_pxav2_probe, - .remove_new = sdhci_pltfm_unregister, + .remove_new = sdhci_pltfm_remove, }; module_platform_driver(sdhci_pxav2_driver); From patchwork Fri Aug 11 13:03:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350881 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 29199C41513 for ; Fri, 11 Aug 2023 13:07:18 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=49qcPdF1MqXhpcEOn66tiErmlcr0FkGDPtSPRCHlTmA=; b=uEWc2FDTZf3xpt /TBPHkdS4A8sGkAfx6lKEWq+DapoHtIQjppZIBqqkhbAwFnKgWJhN04EVrjkZDhYey/HK4b0axlUV YZBrv+D9IMmt8og9y4kRiG6h4qmORuFTQydZgDYi+kI/ljqkHy2XKLH86DeeM3PtwNrzZ0A1/Gro5 7vQzBoaadiHQcgE8wXbog3x4/C4fS5vnZKwdxHiKj3XUbmamXdsGhSLaIUbjclFdII7xYveVBoNox Nd4wETYFWJD1yx3II/bLxEki02JqgOxM3k6qOPPt/zJEKyer+gOqicmS6MDt3uBwqmfaDP0/3oxH/ Voxr8uGm8jzTtIfvaHyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURqu-00Ag3G-1P; Fri, 11 Aug 2023 13:06:52 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqq-00AfyL-3B for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759208; x=1723295208; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oyHZlWm1kbOR1r7fOMlVwR9HINvOVnjP/BkAeoiZa6M=; b=MqYUFXFbJwkvdsgfF9lrcdn+xb6denSf/Q9UaKl8VPJN08Z8Z0NdQyDj HB1QK/mIEe01M5QodOKs/KhDMyK2TWEFhx+2+vjX6soIRNf6jnjZAtZyz wxTvw2EtphKaC3/WTHuDVO1/LfBOlzq1n7WqW3ng/0dybmJZ3UTYc9h8P 6A1mvNpWk31FSwFPrvmyyZWvuw62PVKdPKKD0pnpK2WkLQuN3/7rkc931 6ohL7OxtzxtgAnuQAR/4ZWTMnyeJ1/1krj0IMhoAzPrZGP6NHob9D8jq+ O5urB2R6EDu/1PypY2En9OqUXLalaqYxaOz6kB2p02H62houLLsLXobdM A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812823" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812823" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:06:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535421" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535421" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:06:06 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 14/16] mmc: sdhci-st: Use sdhci_pltfm_remove() Date: Fri, 11 Aug 2023 16:03:49 +0300 Message-Id: <20230811130351.7038-15-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060649_095128_75C3EE07 X-CRM114-Status: GOOD ( 13.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use sdhci_pltfm_remove() instead of sdhci_pltfm_unregister() because sdhci_pltfm_unregister() is going to be removed. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-st.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-st.c b/drivers/mmc/host/sdhci-st.c index 14fc2c386bd3..d12532b96b51 100644 --- a/drivers/mmc/host/sdhci-st.c +++ b/drivers/mmc/host/sdhci-st.c @@ -437,10 +437,12 @@ static void sdhci_st_remove(struct platform_device *pdev) struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct st_mmc_platform_data *pdata = sdhci_pltfm_priv(pltfm_host); struct reset_control *rstc = pdata->rstc; + struct clk *clk = pltfm_host->clk; - sdhci_pltfm_unregister(pdev); + sdhci_pltfm_remove(pdev); clk_disable_unprepare(pdata->icnclk); + clk_disable_unprepare(clk); reset_control_assert(rstc); } From patchwork Fri Aug 11 13:03:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350880 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 094BDC0015E for ; Fri, 11 Aug 2023 13:07:18 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=InEpqtMzN3pR0sZms8RbYZgSPbb+XpsqzaNKZYFVdPU=; b=WFg1kPQ1g339k0 E2NTB0PT2VugCx26cBrQdFrW95vkYqnYv1aLmf0gDOb6Li7TCfalIe08l+dpDzil0mGKm6cbRHuYm KhFN0IkQK4dFGBXUphx2CiQidity12cGDQo54RpLs2mg5vpFRu4JM4KJbsmnqs739bwC51GvGdYZ0 2woxb19LLPSebiRvGlgRER41J/8fKW0YBchDnFvVtDyD3m2SlzZWreDJGreQjLq13fETTOqsEDWMP BptEp783ZNu3xkZAypa5uyDanKotFSkl0PRB4DVsdnnb9KEoQpbCkbeovEnvHz28PMjKisY4Ahzge yP065pKRE360Lgpcdm3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURqz-00Ag56-0D; Fri, 11 Aug 2023 13:06:57 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqs-00Ag26-1W for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759210; x=1723295210; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ckVZspebDlBIvx+fK25/shZbYaEVR+Q2R9lm4tMDkc=; b=kWvoEUN+Dzj5n1GqVTPwAUJcEkguKmU+ve2CC19IrA3V/JcByyk6L3L+ mQYpegV+FP5U41Ket03qb/h6dqe9bcEdLbwSqT7JYYOBm3SUjXOBmZ1YH Ivcr+NbcGYoczYAMGp34izaKekU5NbCYp2P+kKKqHdKMNEQUVlRoODVkv vABh2YXallPAa6fcD7qZ4kpVs5lDmC3cheTrKyEE87oOEx4O/Q9FsMFaG SarutKZoduRGLC9rJmYBCoIcocs6T04KgKX2cTu+/SS0kqXYw/EVsc3PM ECqfQ6nVSdDnJ8u9VDah2dSs2Qlc0FmuIv9+S7rV6QwM/311xAcHkRsz4 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812851" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812851" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:06:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535514" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535514" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:06:19 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 15/16] mmc: sdhci-pltfm: Remove sdhci_pltfm_unregister() Date: Fri, 11 Aug 2023 16:03:50 +0300 Message-Id: <20230811130351.7038-16-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060650_588982_B4E27F1E X-CRM114-Status: GOOD ( 12.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that sdhci_pltfm_unregister() is unused, remove it. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-pltfm.c | 12 ------------ drivers/mmc/host/sdhci-pltfm.h | 1 - 2 files changed, 13 deletions(-) diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 5a63c8818987..894f3bbe2b0f 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -187,18 +187,6 @@ int sdhci_pltfm_register(struct platform_device *pdev, } EXPORT_SYMBOL_GPL(sdhci_pltfm_register); -void sdhci_pltfm_unregister(struct platform_device *pdev) -{ - struct sdhci_host *host = platform_get_drvdata(pdev); - struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); - int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff); - - sdhci_remove_host(host, dead); - clk_disable_unprepare(pltfm_host->clk); - sdhci_pltfm_free(pdev); -} -EXPORT_SYMBOL_GPL(sdhci_pltfm_unregister); - void sdhci_pltfm_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index 402f4edc6ca5..bebc450d5098 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -102,7 +102,6 @@ extern void sdhci_pltfm_free(struct platform_device *pdev); extern int sdhci_pltfm_register(struct platform_device *pdev, const struct sdhci_pltfm_data *pdata, size_t priv_size); -extern void sdhci_pltfm_unregister(struct platform_device *pdev); extern void sdhci_pltfm_remove(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host); From patchwork Fri Aug 11 13:03:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 13350882 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 3D57FC001DB for ; Fri, 11 Aug 2023 13:07:26 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=v4Waaya7DiUfEzwIvfBTN9Gm4BzW8sahkPQsv7qf9rQ=; b=ECvQouUBYqSoLs lMUA/bdo0Fkw+rgOYAYRKgrj3oWCBhULMkqi0TUbKzFJuobdIuConepiAlGRtw1y6JHvQLmBPA+nI fU//vvfFMWVTRauQh6zdLSp9QNxxX3OM64lmSvMBokK1njq3oFH1B6/xD83dq1Y/+QftKR2lbHAdx ia93YXUUW7rxfsmSHAg6HM9fQlIQj9SyHkxKwDrWkpVIEIBVCa4qKm5oER4WV4y2E2ex2KOz0riMi gy/3k+IsKcxKz+MWMHuc1he+58CFX6ERIyVgJjFPDlBRBu6vY0W9aSjOTJwTMMP0yjmbG/1b3tMpx zECSljQIidKrP+n/NqBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qURr3-00Ag7I-2M; Fri, 11 Aug 2023 13:07:01 +0000 Received: from mgamail.intel.com ([134.134.136.20]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qURqz-00Ag57-2X for linux-arm-kernel@lists.infradead.org; Fri, 11 Aug 2023 13:06:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691759217; x=1723295217; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LId8a7HwDxC1IoswqQqzYbnaFhMlLbhkTHUD6bZclso=; b=mK92wdx3FZcr0qrZkRgoAjEczGl86NUskHEPouo+5+sWwA8b25dxiwjI 4Fy+WkKNFdPR3rZPdY5f/K2fU6SU4IwO5ZljxKTP7lAznc2DjtQXML9/5 HrWIEqIt7215QNXMsB2Byxjkr9WnDjhTmiUNmZkczPIzAXazwl8jG4Usz l6d3M4A8sm77JyNRjfGU2pIwMh518XCuPscks9VlbHE14gABnKLWR/BBY yKB5KVrfpuD8pcwtKjU9hc9mNzUkdy34qpuNEQiSKdH4Mh6tr/3fQEWe6 79ejhVd8vED75jevj/PnBwWQLNjsrtKrTVhVOp1sNm8O62letIhT/m/44 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="361812913" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="361812913" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:06:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10798"; a="709535540" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="709535540" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.51.13]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2023 06:06:29 -0700 From: Adrian Hunter To: Ulf Hansson , Andy Shevchenko , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Yangtao Li Subject: [PATCH 16/16] mmc: sdhci-pltfm: Rename sdhci_pltfm_register() Date: Fri, 11 Aug 2023 16:03:51 +0300 Message-Id: <20230811130351.7038-17-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230811130351.7038-1-adrian.hunter@intel.com> References: <20230811130351.7038-1-adrian.hunter@intel.com> MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230811_060657_869582_36C5B438 X-CRM114-Status: GOOD ( 15.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Kunihiko Hayashi , Al Cooper , Li Zetao , Brad Larson , Swati Agarwal , linux-kernel@vger.kernel.org, Sai Krishna Potthuri , Jiapeng Chong , Florian Fainelli , Steen Hegelund , Brian Norris , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org, Ye Xingchen , Patrice Chotard , Kamal Dasu , Doug Brown , Daniel Machon , Ray Jui , Eugen Hristev , Jassi Brar , Christophe JAILLET , Georgii Kruglov , Michal Simek , Lars Povlsen , Andy Tang , Scott Branden , linux-mmc@vger.kernel.org, UNGLinuxDriver@microchip.com, Claudiu Beznea Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now that sdhci_pltfm_unregister() has been removed, rename sdhci_pltfm_register() to sdhci_pltfm_init_and_add_host() to better reflect what it does. Signed-off-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-hlwd.c | 2 +- drivers/mmc/host/sdhci-pltfm.c | 8 ++++---- drivers/mmc/host/sdhci-pltfm.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-hlwd.c b/drivers/mmc/host/sdhci-of-hlwd.c index 06e88bb22ea5..9c1c0ce610ef 100644 --- a/drivers/mmc/host/sdhci-of-hlwd.c +++ b/drivers/mmc/host/sdhci-of-hlwd.c @@ -68,7 +68,7 @@ static const struct sdhci_pltfm_data sdhci_hlwd_pdata = { static int sdhci_hlwd_probe(struct platform_device *pdev) { - return sdhci_pltfm_register(pdev, &sdhci_hlwd_pdata, 0); + return sdhci_pltfm_init_and_add_host(pdev, &sdhci_hlwd_pdata, 0); } static const struct of_device_id sdhci_hlwd_of_match[] = { diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index 894f3bbe2b0f..a72e123a585d 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -166,9 +166,9 @@ void sdhci_pltfm_free(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(sdhci_pltfm_free); -int sdhci_pltfm_register(struct platform_device *pdev, - const struct sdhci_pltfm_data *pdata, - size_t priv_size) +int sdhci_pltfm_init_and_add_host(struct platform_device *pdev, + const struct sdhci_pltfm_data *pdata, + size_t priv_size) { struct sdhci_host *host; int ret = 0; @@ -185,7 +185,7 @@ int sdhci_pltfm_register(struct platform_device *pdev, return ret; } -EXPORT_SYMBOL_GPL(sdhci_pltfm_register); +EXPORT_SYMBOL_GPL(sdhci_pltfm_init_and_add_host); void sdhci_pltfm_remove(struct platform_device *pdev) { diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h index bebc450d5098..b81d5b0fd616 100644 --- a/drivers/mmc/host/sdhci-pltfm.h +++ b/drivers/mmc/host/sdhci-pltfm.h @@ -99,9 +99,9 @@ extern struct sdhci_host *sdhci_pltfm_init(struct platform_device *pdev, size_t priv_size); extern void sdhci_pltfm_free(struct platform_device *pdev); -extern int sdhci_pltfm_register(struct platform_device *pdev, - const struct sdhci_pltfm_data *pdata, - size_t priv_size); +extern int sdhci_pltfm_init_and_add_host(struct platform_device *pdev, + const struct sdhci_pltfm_data *pdata, + size_t priv_size); extern void sdhci_pltfm_remove(struct platform_device *pdev); extern unsigned int sdhci_pltfm_clk_get_max_clock(struct sdhci_host *host);