From mboxrd@z Thu Jan 1 00:00:00 1970 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 1BDE5F532C7 for ; Tue, 24 Mar 2026 01:59:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YyM5rRNjcVV3czh5+aRe7NOC3Lwt/0jnRpSysakwEY8=; b=pqLbZ8AvTYdGmAEIZJSIojHWFi Si7+aFVjlCRUWRjs5DYuP3443xiT6cfiBpDq3PpLxGPV1YZgjZ/kdiQ2LrzA8LDpRaYRBPmgJZ3bl HUzQiGvbtWcQ6BKO06x3dEbIvMpy6T4UIGqfNJNnAYwEF8dpI0JPWRvVjmk0MQpcB3HxUlkuZJ1/W IIYif/8l+N4X/er2O8SaXRCRUuqMHbvkFAx9GcoEzlahSECdsbCZBMbSU9mQW0o/NIbcRCvBdViSk GFg4Z8DCJR0GEIIK7w5tHsJ16IHfXK6MDj77cEZauAsRs9Ew8gnv923C05vt1tG1KWTd3Dmx+y6u9 LMCMlyaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4r36-00000000MOw-0sTu; Tue, 24 Mar 2026 01:59:16 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4r31-00000000MLP-3noo for linux-arm-kernel@bombadil.infradead.org; Tue, 24 Mar 2026 01:59:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=CC:To:In-Reply-To:References:Message-ID :Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender :Reply-To:Content-ID:Content-Description; bh=YyM5rRNjcVV3czh5+aRe7NOC3Lwt/0jnRpSysakwEY8=; b=HYOE+SwW0/+ThovYq1qEAS6WjX xffxns+Ixhy+eLYTe3PfXWAZQ/3v+1IT0U9/rdzvjSo4dd4G8g7u/wG8Lw4GIOcrUf2ZR304AwZOS Pc743zvaT1E+Tl/enS0DYKJShtqaiInxcHXMFIZ4b863JpDy7/H5IrOw1ujfj1sgjO8oUS1tRptn1 2Oe6ycICLX0Npi2qg061mkasg7ysktwqgci+m44tDwbbbVfqes7g1BdTc6maTqab19R4Tha+GoT/9 +QKSPzKpaaIUln37VgD1fKeDSRUGBGis+AS72Xpxk5gcE92G/YqROlFXZuMANX2oSufrHog+Z/+AU n/YDWygg==; Received: from mail.aspeedtech.com ([211.20.114.72] helo=TWMBX01.aspeed.com) by casper.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w4r2y-0000000DDpP-3p0F for linux-arm-kernel@lists.infradead.org; Tue, 24 Mar 2026 01:59:10 +0000 Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 24 Mar 2026 09:58:50 +0800 Received: from [127.0.1.1] (192.168.10.13) by TWMBX01.aspeed.com (192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Tue, 24 Mar 2026 09:58:50 +0800 From: Ryan Chen Date: Tue, 24 Mar 2026 09:58:50 +0800 Subject: [PATCH v4 2/2] mmc: sdhci-of-aspeed: Handle optional controller reset MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20260324-sdhci-v4-2-c8c2060ccb5c@aspeedtech.com> References: <20260324-sdhci-v4-0-c8c2060ccb5c@aspeedtech.com> In-Reply-To: <20260324-sdhci-v4-0-c8c2060ccb5c@aspeedtech.com> To: Andrew Jeffery , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joel Stanley , Ryan Chen , Adrian Hunter , Philipp Zabel CC: Andrew Jeffery , , , , , , , Ryan Chen X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1774317530; l=1827; i=ryan_chen@aspeedtech.com; s=20251126; h=from:subject:message-id; bh=yTcAx3NAX05a2PPdk/ad8cZuE2IR4g+b9LdPiaLiA/A=; b=MrgtEjbFQCFNWXmMIdrLZxoiBifWfguS1h4SY1cutKwXP3miq5WzhUXtZrjM6Bmi03aNYkmWg Av7r8hBQHHkChhAr4t/wfNJvImB/FeLmU2szrgd/v+1n0jxaabx+eTE X-Developer-Key: i=ryan_chen@aspeedtech.com; a=ed25519; pk=Xe73xY6tcnkuRjjbVAB/oU30KdB3FvG4nuJuILj7ZVc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260324_015908_968602_68D12EBC X-CRM114-Status: GOOD ( 11.69 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Get the optional reset line for the ASPEED SD controller during probe by using devm_reset_control_get_optional_exclusive_deasserted(). This allows platforms such as AST2700, which require the SD controller to be taken out of reset before use, to work with the existing driver. Acked-by: Adrian Hunter Signed-off-by: Ryan Chen --- Changes in v4: - rebase git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git next branch fix the conflit. Changes in v2: - use devm_reset_control_get_optional_exclusive_deasserted replace reset_control_get_optional_exclusive. - add include reset.h --- drivers/mmc/host/sdhci-of-aspeed.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index 4296def69436..f5d973783cbe 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "sdhci-pltfm.h" @@ -519,6 +520,7 @@ static struct platform_driver aspeed_sdhci_driver = { static int aspeed_sdc_probe(struct platform_device *pdev) { + struct reset_control *reset; struct device_node *parent; struct aspeed_sdc *sdc; int ret; @@ -529,6 +531,10 @@ static int aspeed_sdc_probe(struct platform_device *pdev) spin_lock_init(&sdc->lock); + reset = devm_reset_control_get_optional_exclusive_deasserted(&pdev->dev, NULL); + if (IS_ERR(reset)) + return dev_err_probe(&pdev->dev, PTR_ERR(reset), "unable to acquire reset\n"); + sdc->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(sdc->clk)) return PTR_ERR(sdc->clk); -- 2.34.1