From patchwork Wed Jan 3 16:06:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4vkv34tZz1ydb for ; Thu, 4 Jan 2024 03:07:51 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rL3mQ-0001Vj-Ga; Wed, 03 Jan 2024 16:07:42 +0000 Received: from mail-dm6nam10on2056.outbound.protection.outlook.com ([40.107.93.56] helo=NAM10-DM6-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rL3mK-0001UJ-HY for kernel-team@lists.ubuntu.com; Wed, 03 Jan 2024 16:07:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Flu661CHUcWS/UAAnue1V/PbbXybbiNQKwf8r+JYliIP0G+xahJX3Z+ihaMjaGueWv5FahDD1y5CTaxxOYvzN9Dcfl/YNPHxr7Dh5JNxqHTSKiB/m3n1U8dMYl1Z1Mff6VedMsUX89Mbkgga+XZwdrLZTXuXXJ3VMKSRUXIZUWCog7zggrTx1opmQL55BPh9v/yG+vevDh9KAeNousz9Wcxlbc9dkxvEy5PS9DlIrxw3efXVErF8B2LVxLHN5GX62zDZwm7Xg2A7s7NoJ0vFFlof+GLpxFfCI3+xSiK2GHJhxJoXb/yYtCbl8woVrXd0O/5zNUR7dJF2z4+SmVKqpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SVsUWDecY0JTxbQYIo57UGbXCpSEZmTsmCR8aM8kqwY=; b=H3xBKe4YZdSZoQoQSXsVS/xHunDx68BVlNhnJfPwuQK8Mx9Q1c4hzYHN1IJjRcDeogXxNAmC4S+RywFIKq4I7e2+BOqhTOTjIRY/X5vJu1UoM6YusljwRLEd5nzBs71tOQAuIrik4CqpXY901qNCuQs6P40ozcnzBsMqcM3AelNdCQJUNaB2NGRvCjX4o8sSAJNWTDHD8Fvat/d2rNPvnF+BUJ36neYXsQbX07JVRaEHn78i4jZsqYqzeyBskk/KtavCyLfSyq2rW9Jl3j3DwFCBOtgIDL8h3LBwd40KF1wAZbChlEoD3ctQCcUCiCpI09b9vSd8mEjgC1sHgMWmHw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from CYZPR12CA0008.namprd12.prod.outlook.com (2603:10b6:930:8b::9) by MN2PR12MB4237.namprd12.prod.outlook.com (2603:10b6:208:1d6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 16:07:31 +0000 Received: from CY4PEPF0000EE3C.namprd03.prod.outlook.com (2603:10b6:930:8b:cafe::b0) by CYZPR12CA0008.outlook.office365.com (2603:10b6:930:8b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.14 via Frontend Transport; Wed, 3 Jan 2024 16:07:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CY4PEPF0000EE3C.mail.protection.outlook.com (10.167.242.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 16:07:30 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:20 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:20 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 08:07:19 -0800 From: Liming Sun To: Subject: [PATCH v3 1/7] [SRU][J:linux-bluefield][PATCH v3 1/7] Revert UBUNTU: SAUCE: mmc: sdhci-of-dwcmshc: Add runtime PM operations for BlueField-3 Date: Wed, 3 Jan 2024 11:06:53 -0500 Message-ID: <20240103160659.144149-2-limings@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> References: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3C:EE_|MN2PR12MB4237:EE_ X-MS-Office365-Filtering-Correlation-Id: 0a5d47ad-bceb-4191-53e3-08dc0c7616f9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7mFsA/eHv3+LNdiWDDhKUYsJJe30U9DfCWRucZm/bOOFIzFdl0IEmNmT3/Kg1j4e2MDPStZ1glZG8to3m7OQJ638U7puo77cIEr4b4yhDrqRoJj9B+wD/FKWFKV7m29zP5nziwAUAXXa/OR10SaMMiW+7uSkduuE5Td0VW0HJZlsZtleD9inATrYc7/QEa8gMx5w43+jFymh5wYZvQaVNp9PKLn0O332O+vp1vuVMWxxAmsLwB8dbj7/AvAD8WyxVpConT0I9SJRBabmTpt3PWm9TpK+ys2JFdLtbkevInq35c4tei3Bi9eb7wolD6ygv7Bil505b1pnIwJfMiBRKX6cSqS+NcihFb7w3je2yMIZovXGBjxak+3JvgoVll3RWgwBacOSIaNOn70N+0CSS1McEPjO6Jfdl5ohDjQj/E/cKTxgxfXLJF3a4njMF/x766bI16jwyOqune8nypY8XZ+JIo7+M7iDAeMMze4Bdo/AyDybDLMi7y8kzlnvGfiHTmG1ui+21zVc/DMouwS+xzMM2UPViPKPiZmyh4hzxzNv39g80GsCc9mq+Re2+enmCXctIGhFTr4i0n/ozQTFHH2H9VeruTJzfaaM1gtF4BnftBBMHifaFsQhzxZpYknpiyb55iM7MXEFuvdCsYi5x5SJYhtNQMRhx7W8LaZkNOz5Ixu8ABeIyQIjdkaFsi4etY6dI/6KhFYfXGG5RdQnT+xF6A7VJ5ukw7KcwxyXxJe8W2wqY4R5RfGrgjkpWEVLaZ5kioiP0J9MUpVjsU33BjGPbA//crrFYOYc+MMW1E185KfAaVZDAuJcI+qmrN1X X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(396003)(376002)(39860400002)(346002)(230922051799003)(451199024)(82310400011)(186009)(64100799003)(1800799012)(40470700004)(36840700001)(46966006)(2616005)(336012)(83380400001)(26005)(1076003)(107886003)(426003)(6666004)(70206006)(36860700001)(7696005)(47076005)(5660300002)(4326008)(41300700001)(478600001)(2906002)(966005)(316002)(8936002)(8676002)(6916009)(54906003)(86362001)(70586007)(36756003)(82740400003)(356005)(7636003)(40480700001)(40460700003)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 16:07:30.9943 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a5d47ad-bceb-4191-53e3-08dc0c7616f9 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE3C.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4237 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Sun , David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2046657 This reverts commit 3ec050f4050f804ad65d051796c95c49feb15efa. Signed-off-by: Liming Sun --- drivers/mmc/host/sdhci-of-dwcmshc.c | 103 +--------------------------- 1 file changed, 1 insertion(+), 102 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index 188c5ae7efc5..87a831a752fd 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -75,22 +74,6 @@ struct dwcmshc_priv { void *priv; /* pointer to SoC private stuff */ }; -/* Last jiffies when entering idle state */ -static uint64_t idle_last_jiffies; - -/* Total jiffies in idle state */ -static uint64_t idle_total_jiffies; - -/* Total idle time */ -static int idle_time; -module_param(idle_time, int, 0444); -MODULE_PARM_DESC(idle_time, "idle time (seconds)"); - -/* The current idle state */ -static int idle_state; -module_param(idle_state, int, 0444); -MODULE_PARM_DESC(idle_state, "idle state (0: not idle, 1: idle)"); - /* * If DMA addr spans 128MB boundary, we split the DMA transfer into two * so that each DMA transfer doesn't exceed the boundary. @@ -474,7 +457,6 @@ static int dwcmshc_probe(struct platform_device *pdev) #ifdef CONFIG_ACPI if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { sdhci_enable_v4_mode(host); - pm_runtime_enable(dev); } #endif @@ -569,90 +551,7 @@ static int dwcmshc_resume(struct device *dev) } #endif -#ifdef CONFIG_PM - -#ifdef CONFIG_ACPI -static void dwcmshc_enable_card_clk(struct sdhci_host *host) -{ - u16 ctrl; - - ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); - ctrl |= SDHCI_CLOCK_CARD_EN; - sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); -} - -static void dwcmshc_disable_card_clk(struct sdhci_host *host) -{ - u16 ctrl; - - ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); - ctrl &= ~SDHCI_CLOCK_CARD_EN; - sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); -} -#endif - -static int dwcmshc_runtime_suspend(struct device *dev) -{ - struct sdhci_host *host = dev_get_drvdata(dev); - const struct sdhci_pltfm_data *pltfm_data; - int ret = 0; - - pltfm_data = device_get_match_data(dev); - if (!pltfm_data) - return -ENODEV; - -#ifdef CONFIG_ACPI - if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { - ret = sdhci_runtime_suspend_host(host); - if (!ret) { - dwcmshc_disable_card_clk(host); - - if (!idle_state) { - idle_state = 1; - idle_last_jiffies = jiffies; - } - } - } -#endif - - return ret; -} - -static int dwcmshc_runtime_resume(struct device *dev) -{ - struct sdhci_host *host = dev_get_drvdata(dev); - const struct sdhci_pltfm_data *pltfm_data; - int ret = 0; - - pltfm_data = device_get_match_data(dev); - if (!pltfm_data) - return -ENODEV; - -#ifdef CONFIG_ACPI - if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { - dwcmshc_enable_card_clk(host); - - if (idle_state) { - idle_state = 0; - idle_total_jiffies = jiffies - idle_last_jiffies; - idle_time += jiffies_to_msecs( - idle_total_jiffies) / 1000; - } - - ret = sdhci_runtime_resume_host(host, 0); - } -#endif - - return ret; -} - -#endif - -static const struct dev_pm_ops dwcmshc_pmops = { - SET_SYSTEM_SLEEP_PM_OPS(dwcmshc_suspend, dwcmshc_resume) - SET_RUNTIME_PM_OPS(dwcmshc_runtime_suspend, - dwcmshc_runtime_resume, NULL) -}; +static SIMPLE_DEV_PM_OPS(dwcmshc_pmops, dwcmshc_suspend, dwcmshc_resume); static struct platform_driver sdhci_dwcmshc_driver = { .driver = { From patchwork Wed Jan 3 16:06:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881995 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4vlG0njRz1ydb for ; Thu, 4 Jan 2024 03:08:10 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rL3mU-0001Xs-0v; Wed, 03 Jan 2024 16:07:46 +0000 Received: from mail-dm6nam12on2064.outbound.protection.outlook.com ([40.107.243.64] helo=NAM12-DM6-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rL3mO-0001V6-Ki for kernel-team@lists.ubuntu.com; Wed, 03 Jan 2024 16:07:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P42KgFAkc5iaSld2ej1dBujfSHrsD98fK+6YpF07tQGW+XQMVoJrC9U8ICK3IkEYZfCFZhg3rlFPHiW6DfGYLHjXwS+eaVXHkKLl2JXL4dG8Z9AGa44W+QJlf4xhFah1wpZBE5vevjBWpHOO43+O1RWHxsLcdAEf8QdO8AE4bOenki2YB/TysPPA2K3cJFeylrfeoDaSONCjY1HLC7g9dT85Jt18UYOXA6lklDr3ihW0ZFOtlX8Vn3pu7QXoS8tpe195risydXgSCYardkonSrSGp7SAB6hp4M8qpWjiMsb4qMx2myod0pZIAcKSJfqneXDA+2mcf2dz1S2pra61lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cYOdBoXgLpaMitVszXNhQFK/wLE+Hjs3PR7krEPzXXY=; b=dUrqDfGH4x0Joc+NEOdnBP2hh3BTxnB3zfzZ4MEn4a1+i8CGG4+vYbW4GehJ0Nizxg8L+6dfJI0UbQOc/1jY7g6VeaAfykGKG+eEZAh9qxwwIe7DQtCkSnRPxSeGFEg6h6a4FXP0NM3FIpgGEZSMGZ89IcKx8RLFXpzR2Wbavquj+DfCMOwMF8+f3yR6JV4ywZ5RkeLFcbqaCeFLz9N0y0ytzT5F/Tj9xE9K4pvH9cU++ogsYI3c5Y4P7dcrukKEMCppA80czdJNR4tD3V08bWAI7Oa5+awRuY31Vvvf6TMkCanjFvlqLN+MrHVfysGqbhg+Eg4phi9Wpw4TfMnMDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from DS7PR03CA0117.namprd03.prod.outlook.com (2603:10b6:5:3b7::32) by DS7PR12MB5983.namprd12.prod.outlook.com (2603:10b6:8:7e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 16:07:36 +0000 Received: from CY4PEPF0000EE39.namprd03.prod.outlook.com (2603:10b6:5:3b7:cafe::9e) by DS7PR03CA0117.outlook.office365.com (2603:10b6:5:3b7::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24 via Frontend Transport; Wed, 3 Jan 2024 16:07:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CY4PEPF0000EE39.mail.protection.outlook.com (10.167.242.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 16:07:36 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:25 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:25 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 08:07:24 -0800 From: Liming Sun To: Subject: [PATCH v3 2/7] [SRU][J:linux-bluefield][PATCH v3 2/7] Revert UBUNTU: SAUCE: mmc: sdhci-of-dwcmshc: add the missing device table IDs for acpi Date: Wed, 3 Jan 2024 11:06:54 -0500 Message-ID: <20240103160659.144149-3-limings@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> References: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE39:EE_|DS7PR12MB5983:EE_ X-MS-Office365-Filtering-Correlation-Id: 674a353c-b841-4591-548a-08dc0c761a3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sepYHrzX7RuhSMuwFWXy7AaB3GBpmEscilRP3uHVPN0KTmCnP4UsFxDo1Q1X/E7l9vYXddgRf2zaYrmFn1VlPC+OO5jEmHAEUxaLTPVKn9l3dLUTVmBuRnNrbzQ8m3Bpu3hkt9OXMrk3L4bmPIV/4sgZ9kWuNqnek5U0pffNeyfN1faJY9WokjYB9bQm+mNAFx0hd2EgqcIeYi6Jhd1ajN+/laRp8XZ1U9QBGc+5MMTpGEZo9cn/p1Si3k6FjaXzEFCxh5GpNpqH/KiaeThjMii05+1b+eUSbJPjg+QhijR9ZAAmlq8SFC418KSywYwrN2w2l5hCqeaXszCH0bjuRpn3PScFoWFtnI/rriQOw0IELj8QM31gdaRrEelHrW9b7HdivwoZlZ96ftfpI+DI9e1Y+BubyqykiuJEzozs0Xg5J6D0KkiDAZYWXeQa0isHU3VdUO1t/YI0HjiTxC8ofAKjf4RZqofe+gmtsYva2TrR1UX+xrnIBKvdk9cbqCByr/X9uxbhspVveZdk05lBmrLiKnt+19bQ4YHkfOXRJzVso38cBC2JQ9+e+dszQLcItrwP405Acc5Lt9ErYI9M5ngxXkr9nE+hoDlgagxNG7nkXwU927Sm+Yd+ZopH18iwsvMnxybmjtmztG/MS+miJ6r4v+aJbg5xJRJh4moX78BWqa1fvq9Z/LUnWUhMSKJ6tIGh3hHwXiFyKIl6rgWw8Z9pbgnw6e+RFeYWtiDTdISdmI816t50+J+0Aqs1lCFcnBKfJ66u6banySVLMoBXdZHpgIwCVTI7WwIIF59+cbdazRWG5gn1+iOrjGKsgFsQ X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(1800799012)(186009)(82310400011)(64100799003)(451199024)(46966006)(36840700001)(40470700004)(4744005)(4326008)(8676002)(316002)(2906002)(5660300002)(966005)(478600001)(7696005)(8936002)(6916009)(6666004)(54906003)(70206006)(70586007)(36860700001)(41300700001)(47076005)(426003)(86362001)(336012)(82740400003)(356005)(7636003)(40480700001)(36756003)(40460700003)(83380400001)(26005)(1076003)(107886003)(2616005)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 16:07:36.4862 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 674a353c-b841-4591-548a-08dc0c761a3f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE39.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5983 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Sun , David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2046657 This reverts commit 9c34ae931985c2ab152755503caa5610c1277439. Signed-off-by: Liming Sun --- drivers/mmc/host/sdhci-of-dwcmshc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index 87a831a752fd..b272846a91b7 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -376,7 +376,6 @@ static const struct acpi_device_id sdhci_dwcmshc_acpi_ids[] = { }, {} }; -MODULE_DEVICE_TABLE(acpi, sdhci_dwcmshc_acpi_ids); #endif static int dwcmshc_probe(struct platform_device *pdev) From patchwork Wed Jan 3 16:06:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881996 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4vlR2Q9xz1ydb for ; Thu, 4 Jan 2024 03:08:19 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rL3mn-0001dJ-0u; Wed, 03 Jan 2024 16:08:06 +0000 Received: from mail-co1nam11on2059.outbound.protection.outlook.com ([40.107.220.59] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rL3mP-0001VH-BP for kernel-team@lists.ubuntu.com; Wed, 03 Jan 2024 16:07:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Of4ZqT7spPe8MDFcB6MmESSSCH9Sw2HhmCw8J+8YjMfjMvDtlQDMQVh+FzcrPO91D1zYcMQR61M0ce/i9Rqy30/QY7NXmi/a+2KFi1WjWuQvpubITFLxrvrHurIF8OtgStlKQEq9qUZMDDGJP4OSibyijBRLcrU9eQbrQCal2r92pdJ9pV3sI1Q3oYKRLKZft6utRRB1w18QF2weH69qNCDDqnB1k9MVWc9BxKwJCf0Ccdxd98qM9/rEdP0LS3npNPMVJQ9uAsngG6fGZpKwwGuvMVdVr2fGfZGVMYnK034p8yj04Y4/axrd9L057JGruJk8CYg9KrlX8Q87E8/pqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1egvL/dOb6yUHpNsLyV4DwxbwNaIyEaEWqAKJJ49fi0=; b=Y26iNu0OLnxivIpWBgE/xKPMgpKmyEQCwGlkwGA4QaGixHajOE1pwH1FacROC3wRHH7tCsX3PQZ1C7VQKTx8PscDlRM6UJxTYnEL7yc0pK/1x0lp/DzxKIaf2rcft575PRMaPtL5+sWyxX78HbLo7CpSy47cqkvUCF8f64pgbw9FsAm8ePq2PXa6EMXleUqb7g+vHt7elofxrf2fD+XfQto+viZKgSqAM2y44llJhAh8vc718obHFyJM2o3LFphOlgNtApLM1BaX52cWcS8f9c4DQmU+0DuT1ROlHAWN6Y4IGw8AWQgOH6kfr9tsDBL3zPP8gLjW7W4b7cHuLISQEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from CH0PR03CA0086.namprd03.prod.outlook.com (2603:10b6:610:cc::31) by MW3PR12MB4588.namprd12.prod.outlook.com (2603:10b6:303:2e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 16:07:36 +0000 Received: from DS3PEPF000099E2.namprd04.prod.outlook.com (2603:10b6:610:cc:cafe::63) by CH0PR03CA0086.outlook.office365.com (2603:10b6:610:cc::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25 via Frontend Transport; Wed, 3 Jan 2024 16:07:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DS3PEPF000099E2.mail.protection.outlook.com (10.167.17.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 16:07:35 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:28 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:28 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 08:07:27 -0800 From: Liming Sun To: Subject: [PATCH v3 3/7] [SRU][J:linux-bluefield][PATCH v3 3/7] Revert UBUNTU: SAUCE: sdhci-of-dwcmshc: Enable host V4 support for BlueField-3 SoC Date: Wed, 3 Jan 2024 11:06:55 -0500 Message-ID: <20240103160659.144149-4-limings@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> References: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099E2:EE_|MW3PR12MB4588:EE_ X-MS-Office365-Filtering-Correlation-Id: d2a2f94a-01c6-4874-76bf-08dc0c7619f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: phPnaoI8/rcFMunQYKccCVFMS+Dqkg17CWmq1gnoI6P5VPidsEiVTZMFlrR9WkCmtYHeXbI4moKnBBctVPhhjp3MWpXXINU6mYfex3cQ+2ROy2DkEUMecM1Zh4KDhaAB5f1IHX1sWaneVNOK4/kDFcYxfd4PTBXUzVwHoVxBV8hzKdBRYYBNJHzWivrxBhlOEleeWxuTDsjoJzUjp64cXKqdgBDXNLs2Mdu8giGrKQEAbYzFwllmFGmFGf2Yv1m9hnm/9fLa7/2ZzlX+dHv15ZpTdwsXF5/Ux7D6XeBovkjhd3qyFEd7BniGeDnwxYKOAVbIqmtHCjTqEuL1hd7/66ZEyR+8cXSycXkaZMmsBiibThYNo6ZwvYsXreTlQuC6PIrmWvr1JQrukjG9L1YfodVVnR5raUq0hjnwZ6RQJNti3ZRtX8nqdJkhcb0UcaFfyXra3CVY+LIbDUck0L/Hrjvu3s6hDtYlUSa2VJfXmEbiV6ngdEER4OqhDTHFf0e53fHyp4U4lmIbCrtO6ntWP1jlB0v5lH8VQvKj3HrBq6FDsKt6Xmh3Pi7a14Yu8Qc01NYzhYp3S50JI3ElzXD4bAqxPhj/NRg3ZNysicYmixw6UM3Z4wzsrnct98ORs2+4pidnXOBNFlXrUJrvHO9BWJt4vwgmzQLi34j3tFiQHZXvnEbQkRdlLcKXCRcIrN/RgoASI/hBYXZpHwziCsB7AND0QtGyHP6+ODcPNqk3A3eRHZkMNEsjuvez3X7pyzAZ78wd/UxBegiWm/9jofAgSXVf2RMPqi5K+rVL5dkZ+ROa7wwy3vAE+JC9niJGQkGS X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(346002)(376002)(396003)(39860400002)(230922051799003)(1800799012)(82310400011)(451199024)(186009)(64100799003)(40470700004)(46966006)(36840700001)(47076005)(1076003)(26005)(107886003)(7636003)(82740400003)(2616005)(83380400001)(356005)(54906003)(8936002)(41300700001)(8676002)(316002)(5660300002)(4326008)(2906002)(966005)(36860700001)(6666004)(478600001)(6916009)(7696005)(70206006)(70586007)(426003)(4744005)(336012)(86362001)(36756003)(40480700001)(40460700003)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 16:07:35.9280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d2a2f94a-01c6-4874-76bf-08dc0c7619f8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099E2.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4588 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Sun , David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2046657 This reverts commit a1aa43d62f5c39070040ba1949c4019d0c176675. Signed-off-by: Liming Sun --- drivers/mmc/host/sdhci-of-dwcmshc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index b272846a91b7..c31daf3628fb 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -453,12 +453,6 @@ static int dwcmshc_probe(struct platform_device *pdev) goto err_clk; } -#ifdef CONFIG_ACPI - if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) { - sdhci_enable_v4_mode(host); - } -#endif - host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY; err = sdhci_add_host(host); From patchwork Wed Jan 3 16:06:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881997 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4vm94ch8z1ydb for ; Thu, 4 Jan 2024 03:08:57 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rL3nG-00022s-2c; Wed, 03 Jan 2024 16:08:38 +0000 Received: from mail-dm6nam04on2046.outbound.protection.outlook.com ([40.107.102.46] helo=NAM04-DM6-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rL3mQ-0001Vl-Bz for kernel-team@lists.ubuntu.com; Wed, 03 Jan 2024 16:07:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VRrV8Doldj6x43WP3UlU9T//PIH4TLtIofIwgmd3dohxtabqdEvI1MX69TWDqOF8ZUDD+4i/aGgyO5lx7sMyJVK7lyAJDVKmEFBmA/p8p9DBt06cCE4dJmoIaNzQueLHoeTQXl4k9UkY040Ph2pcB9pz6vCjUahs60cJ4oaUQpzAalX1aVW3zBb23MG5uDV6ieKEoNG32DSd0CUvfVkDShFcuQoo1g5OLva+414XxrZtDoojq4yFFqFsejY/T7/Anuy0tnW1l7xm/TY/4fThsw/0DBgAh4WwgmNTLxcZ33+RqGjNN+S8vyb66F8z5eXNycR1h86zKGvj3/uSfKTvIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=prCu/5m5mg6xNIF3pqQInT9StSTBHOCiFOiBOz2eIvI=; b=RM2vOqyLLf8BOAd0wBnGWqGdTiqNJ2Ypplc0qu+UCC+m5oXJ/G35EnCZIoBUaQrLV0Mr/hZBOm0g/gZRyx+2JFmwc6vpoqQb7ksLvPWly5xYhrifEZUXDS2dJeuHBF5wfniAA3FvvyEtNM3za8LY0nOyiIQ12wVWFSsiR94ncwO7ZBX+aDBYFav5jJZ3EJZX9VmhIbwRVskTZbV6DSQ7G9sV5t0mSiZf9ncx1rEzJGrCXEWfbxx76DfZMCNzSFHtPuud344b7+OmueOPNJl1gAAke00iBOd9VdUmH4QEvsuS35AehmTGWbNlFwQkHYUUbJoSPrQ9x+OOYmHJ69Ya4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from CH2PR18CA0033.namprd18.prod.outlook.com (2603:10b6:610:55::13) by BL1PR12MB5238.namprd12.prod.outlook.com (2603:10b6:208:31e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.26; Wed, 3 Jan 2024 16:07:39 +0000 Received: from DS3PEPF000099DC.namprd04.prod.outlook.com (2603:10b6:610:55:cafe::79) by CH2PR18CA0033.outlook.office365.com (2603:10b6:610:55::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13 via Frontend Transport; Wed, 3 Jan 2024 16:07:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DS3PEPF000099DC.mail.protection.outlook.com (10.167.17.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 16:07:38 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:30 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:30 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 08:07:29 -0800 From: Liming Sun To: Subject: [PATCH v3 4/7] [SRU][J:linux-bluefield][PATCH v3 4/7] mmc: sdhci-of-dwcmshc: enable host V4 support for BlueField-3 SoC Date: Wed, 3 Jan 2024 11:06:56 -0500 Message-ID: <20240103160659.144149-5-limings@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> References: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DC:EE_|BL1PR12MB5238:EE_ X-MS-Office365-Filtering-Correlation-Id: ed3bc318-3dc3-458e-649a-08dc0c761b96 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QHbhSD7+uJguc1ulJwaZNyztYSSgulz1bwKd4lFXx8K9qfgIgB6SG7ycC60weDDOnVTZfa59mz7VKyObyn8ojsTstGM5D4S0BRVB20YsqnL+4EIsy5ebsscP2B88y8gVnV+WsuOehuR2JiIxssSCX3zMtf+VjP83qjWspa0SofOT6MhCZaz762RYd2dfluPj9HXI14VViVlSGUyxJ0lx1isWBcEQ6S6WnQItQmtfwj96FAy4Ab5OxfFOHepvZYi1z0V/rVldjYuzeMPPr9nnRUabHVtlt+0LRjQvQmft4uYiJ1fGtAK/otvx95FEsq/P4wVKsmJfQ+1Uz5vINe3r1LtixOQRgrgy+NdxHf4OS7nV7OS0UAXqcjKpPX/12B9M55lIsZNv9f3aBcjFJYpt3tZ6GRaI4IcjS2GKGKiwLeNGJB8KwnnSb+uH6eEEm9HzXzC2EnC6ruckgMZklFPaBRCgmsOdqHdDRE50cZCyy0OZ8l8U0jUmVjEm4aTuqqeaeVlmXNm/JBd/NngVvz3OOS4n8rc+SnN0z3d8r0eiRKlxrdD5nKjs7iIF5tQdx2cja4NUMqgEFne//8K4wJRLdoo6aWbSqAYRli6PTC6mCix1kXQJblhH3a34M7/5zPlTM6F5TIIR/2Kw0s/kgnrx/Edjh8Z6bFgjAIDx6uU/bkJb/eGyZ8iZAIgmlb20BgKxp9VWmZlzECpMVx7e2EeSHA1wKRfQPRdizu57IndL3C/MecaGf6rFf0ucbJ+w3taW3f41hfcTtTHyYboN/204n3f7uhi/yFQSyRkm0WNlSToO0stCOeS0g9OifC2TgCQf X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(376002)(346002)(396003)(136003)(39860400002)(230922051799003)(1800799012)(186009)(82310400011)(64100799003)(451199024)(46966006)(40470700004)(36840700001)(36756003)(40480700001)(40460700003)(70586007)(70206006)(478600001)(86362001)(426003)(7636003)(82740400003)(47076005)(26005)(1076003)(336012)(2616005)(356005)(2906002)(6916009)(5660300002)(4326008)(7696005)(966005)(6666004)(41300700001)(54906003)(36860700001)(316002)(8936002)(8676002)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 16:07:38.6876 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed3bc318-3dc3-458e-649a-08dc0c761b96 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DC.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5238 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Woods , Liming Sun , Ulf Hansson , David Thompson , Adrian Hunter Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This commit enables SDHCI Host V4 support on Bluefield-3 SoC to be consistent with the default setting in firmware(UEFI). Reviewed-by: David Woods Signed-off-by: Liming Sun Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/990885f566c32ac8e6888ad6b434fb70d1a5d7af.1673460632.git.limings@nvidia.com Signed-off-by: Ulf Hansson (cherry picked from commit 95921151e04335e9e2ddf4f294405e64be4ea947) Signed-off-by: Liming Sun --- drivers/mmc/host/sdhci-of-dwcmshc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index c31daf3628fb..0adebc46eb46 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -453,6 +453,11 @@ static int dwcmshc_probe(struct platform_device *pdev) goto err_clk; } +#ifdef CONFIG_ACPI + if (pltfm_data == &sdhci_dwcmshc_bf3_pdata) + sdhci_enable_v4_mode(host); +#endif + host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY; err = sdhci_add_host(host); From patchwork Wed Jan 3 16:06:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4vmy4JHbz1ydb for ; Thu, 4 Jan 2024 03:09:38 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rL3ni-0002Qs-66; Wed, 03 Jan 2024 16:09:02 +0000 Received: from mail-bn1nam02on2042.outbound.protection.outlook.com ([40.107.212.42] helo=NAM02-BN1-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rL3mR-0001XB-Qa for kernel-team@lists.ubuntu.com; Wed, 03 Jan 2024 16:07:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aUTGa8GSYYll4JZjsOImQJwl454qfMC0iXWoCFA0/IrqsmKIc4ujX1MjyRTL8hXxGc9M9GSpQ8wy6/9NCpuR8aojgpOr4eKF4WcoHwpsmT3M0svS6lFIEtnLY0uIInqS6bOvqkKY5GslOQtWtEwGo40L4M+/Wte3LYvj/vZTkzDDVWmYTJNIhiF5LHeG+2bvDdcCaahj96gUZd3v1xc/OVJobSmn8XJ0LPzAI/GPSCL4Cbk9OQoMERBj4TLQ5mR9U8TwczvhQ8l/Ef2ZYIuhIZGHfHd6Ww01+tkCOC7hga1glGImIWoSfH45qYD05dBRX8itu4kI2JQzZaq3KQtGlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mjSs9oV5cUejQFl9J+8/+bTLKWKNKDkxs8ZnezMzdss=; b=hSSrBV+ZuJ6fwdLo8AHAKitepnQuNb3YKhueKb9bOV2vYMYuhSLjMtx9jpEo4rlnRgS3vAe0Pdg9lCYNjDWoEB6/bDWbLENifR4Y743Qwi1fR7lXOx+CxDZqpn0kUkPDHo+MihrPWD+AWwPPb5obbUEm7e8rTOh72hM+ilOhUz1M8inU6I6AB64VNdrgihVIjYGYsP687j3m/FuDx+T4KXIpZj+l8Oq28RHLLh7fUGfKuj7wLJARWvgCqbzy1fWC6rbvjTTsWBCd3YY32SoBbL1F8yO3P4dfmBz7AJG0BAX8FATsTg+488zaTwCD7ZFgnZuvYh5nOM6uMjVefpm5Yw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from CH0PR03CA0083.namprd03.prod.outlook.com (2603:10b6:610:cc::28) by MN2PR12MB4126.namprd12.prod.outlook.com (2603:10b6:208:199::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 16:07:40 +0000 Received: from DS3PEPF000099E2.namprd04.prod.outlook.com (2603:10b6:610:cc:cafe::77) by CH0PR03CA0083.outlook.office365.com (2603:10b6:610:cc::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25 via Frontend Transport; Wed, 3 Jan 2024 16:07:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by DS3PEPF000099E2.mail.protection.outlook.com (10.167.17.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 16:07:40 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:32 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:32 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 08:07:31 -0800 From: Liming Sun To: Subject: [PATCH v3 5/7] [SRU][J:linux-bluefield][PATCH v3 5/7] mmc: sdhci-of-dwcmshc: add the missing device table IDs for acpi Date: Wed, 3 Jan 2024 11:06:57 -0500 Message-ID: <20240103160659.144149-6-limings@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> References: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099E2:EE_|MN2PR12MB4126:EE_ X-MS-Office365-Filtering-Correlation-Id: 39738ec5-8f8b-44f4-5b41-08dc0c761c64 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lMN0KVed/P2KbR7SfnpHWF5KHbeZllU+el04uPWje/+W8rHHCGnqQMuO1DwaIlPNypZFQRJldWPNkgKtD8hDqZ4YobFgeEXRbn60WaQVL9TMSLWFKe9U6w23MZo8DxFsUk/wK8dtecgtqJv9D7S/iCZyp5HgYP+VY2zIKhEzHJy7zJVtWjEq95kHuVUumbP8+iLJHwA8Vt9JoGTDRfkEf5nHlwA19Vdghx+bdjGYMDpC5Kn445zMHVfn3bU/0W+IAjjXXnsgsnirGX0o5uGwXeFKiL76/QPx1RyECe4RqZQu+ZVhhrXjoZH68myfft3h3Y71qZGGTmLOytCiuFivvQpHf4gucZusXATPlG1C9NVQapG09+uCTLNcJiOaxsf58Lq29+Hynsj18nAr/3e0BsiTsLlSGV6j0XNZomUmMI5XOQo9Y4VukIuavZ4yayuDKAoUOowhRFQQqb7b6gllh3rp7X7KQ/tx8NnaA43XP/egtFOxxXvh2ZS5B/1NJ4wS5TdkdXDhophaxpInqmnpoDPlkp6FcyQiZg1PUrUuBA1aBPIX/wHqDHCWUok8oq6r8f/oIcBvlsPtFqMkdl950eScrctPpyWMS6LnY7QoU8bb527VOBYks0zubmlEDLUPsM6Dh4XsbkGUmhhxvX+/Xmy35AmWqsm8mary7bG64ZPQ6LLRj5orITyxsVgq+nGhoMcngpEtHlaloVYx0yR3H1zghS07mLcLcW1v4NG4LgHIDmvVMQXd6Up6SjV6QY0oesIbidmOO38J0iL/hdoGK0Gtf/yEuWN3o79iQX7LgOKzyVtQrjEIfP1S2wSpAKpw X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(136003)(39860400002)(346002)(376002)(230922051799003)(451199024)(82310400011)(64100799003)(1800799012)(186009)(46966006)(36840700001)(40470700004)(356005)(82740400003)(7636003)(36756003)(40460700003)(40480700001)(86362001)(7696005)(478600001)(336012)(426003)(6666004)(47076005)(966005)(4326008)(70206006)(36860700001)(70586007)(26005)(1076003)(54906003)(6916009)(316002)(2616005)(8936002)(8676002)(41300700001)(5660300002)(2906002)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 16:07:40.0531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 39738ec5-8f8b-44f4-5b41-08dc0c761c64 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099E2.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4126 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Sun , Ulf Hansson , David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This commit adds the missing MODULE_DEVICE_TABLE for acpi, or else it won't be loaded automatically when compiled as a kernel module. Reviewed-by: David Thompson Signed-off-by: Liming Sun Link: https://lore.kernel.org/r/f57ad0f8fdf663465bca74467c344dfa305a3199.1675305696.git.limings@nvidia.com Signed-off-by: Ulf Hansson (cherry picked from commit cfd4ea4815d16f7426723a5cb80ee5db811ea1f2) Signed-off-by: Liming Sun --- drivers/mmc/host/sdhci-of-dwcmshc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index 0adebc46eb46..1e78c1e33325 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -376,6 +376,7 @@ static const struct acpi_device_id sdhci_dwcmshc_acpi_ids[] = { }, {} }; +MODULE_DEVICE_TABLE(acpi, sdhci_dwcmshc_acpi_ids); #endif static int dwcmshc_probe(struct platform_device *pdev) From patchwork Wed Jan 3 16:06:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881999 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4vn51mwXz1ydb for ; Thu, 4 Jan 2024 03:09:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rL3oG-0002aB-0y; Wed, 03 Jan 2024 16:09:36 +0000 Received: from mail-mw2nam10on2044.outbound.protection.outlook.com ([40.107.94.44] helo=NAM10-MW2-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rL3ma-0001cx-9Y for kernel-team@lists.ubuntu.com; Wed, 03 Jan 2024 16:07:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i78ikLdP1qPWcf8grWU9lAseZHuZX9AanQoUP4KepxdwJ0SuZ8M8/35noDN73kv25iO9KT3OQBosaC3Bihid1Bq5YcPLZ/13FbuGlTWQo2JzdiepP22dCx7SBY/L8i01oGin9sic51PmZyl0V0/zciP31tNjp4IaRHi30xGwcRr7q4hzblA5Sl2U6KPaMkLdc/Pv62JSziwnV457DYmT40ZJyUDehTEZRcl2hQlimkTDkxGyzDvzMUzidOvmUkFHpsU7gdZJE64vX4A3iy7JL494PHWOi7Ottn2AEUxlkxcNuOF9O7s8xjQx3xfstWzpZYH85cLRdxHbhqrIecIFNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cBfpU4THz6yTmWrpZKvHswi3Vh+AH5MXNh74ytpM2AQ=; b=EbLC8FzttAlyseXAOVpn0TRzFJ15A/mIJ64Oe8Km8h5WIwYZNatUc/AaRC6562VsxeydvDhMQBrq/hSkRNFjBTaR9bLudU7PvvtbbwbqR8G0hnznTMKK69JG/B2sRDughuysFjWELDDiTTrSKIHwOsvmaJhGQ7O5u8SsQxs9651F/5GUAkk0Uq3UufZv8LdGU/u+MF3LWt/Xjz8wF/m6tlT13UerUrCsZHTlMDzW1AHrcGtUONxAwpyTFKdkppX84S4bw3s33+E8+RdRFVaIytg/igI81Y+rR6bXqnOHizQUsDmL3yP18B/PiHRRLlQ/0+bexXJodi81ivgTCE1bjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from DM6PR13CA0036.namprd13.prod.outlook.com (2603:10b6:5:bc::49) by PH7PR12MB5709.namprd12.prod.outlook.com (2603:10b6:510:1e0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 16:07:47 +0000 Received: from CY4PEPF0000EE3D.namprd03.prod.outlook.com (2603:10b6:5:bc:cafe::b) by DM6PR13CA0036.outlook.office365.com (2603:10b6:5:bc::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.12 via Frontend Transport; Wed, 3 Jan 2024 16:07:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CY4PEPF0000EE3D.mail.protection.outlook.com (10.167.242.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 16:07:46 +0000 Received: from drhqmail203.nvidia.com (10.126.190.182) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:34 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail203.nvidia.com (10.126.190.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:34 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 08:07:33 -0800 From: Liming Sun To: Subject: [PATCH v3 6/7] [SRU][J:linux-bluefield][PATCH v3 6/7] mmc: sdhci-of-dwcmshc: Add error handling in dwcmshc_resume Date: Wed, 3 Jan 2024 11:06:58 -0500 Message-ID: <20240103160659.144149-7-limings@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> References: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3D:EE_|PH7PR12MB5709:EE_ X-MS-Office365-Filtering-Correlation-Id: be0ae07c-bc06-4aea-7c1e-08dc0c762048 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v07pIyxzuWI39Ke2517eYwdzUa3LZRYyZs+Rsr/4Ffmt5Lfd3oEaZNWuD5NAcsiv522Mq5u9Q5OFu2fs0CqDzZskQ9UZxzoKCja6UawrwJCsAltXwKHPuz6P3jKUijZE3l0ERL0YIRpwhU7aDAZaWw4ml0f1pKFcSnxpoSLHkcc3MU7GnO8gmM4GCKp0/Un5Jm4EoSjNraIpSwkkbcD3KVMpoy2f8P3ngdpDF8QHFyc3eNrdqO3Oix71MR29cMyajzOXYVHHNBok6JkjyR/CiE3RnF0hX1KGoSMbFN/Xcu+y3eTDBdV+MbGWUee/MsdjSkXqsnbRL5acqOrp8UIMktTDy6g3Gav9XgfcAOwdNxEGDW4UT7ebQUdRhgyEHxyFEBoxKwori43z8au1IO1jKnA4i/DPA2pBSKCL1ZLRCTd7PvYoDLy7V3bBj2TU24jOa5zEgxgatMQyVwXtxxn76EP+vxoydtA5dksUi0AgBdRYRgsWuR+P1jyfHqVJZt9g0ymQ1S3VCyKySdy7zBqU9PWrim8IWdWtWvteU75C8OqGTm7n+KoLfdGdwa2ZQiEF4E2zITFDEKDvIOiYQI74qwvc6XDC1oq1WmDK3CC/DfYr/9Zf7EQFicKy1TLLyjURWU+nlwfgNdiz29Lxe/pSjT19YNc+Sx9cRINpmDnkfbJu28s5EH5/x/whf7GyouYpefMeqYPXnhTvS9/Q7PyAXD3fgh7JM4saHLh+V27Bo3rGIG/Nb2a4PISLexHrXh61pOxl+zsF76Ls1TkCIU61+qnhU/PJJueXWhydQk+tjIk7JTdFbf0rNnVTAES1uEiN X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(39860400002)(136003)(346002)(376002)(230922051799003)(186009)(82310400011)(64100799003)(1800799012)(451199024)(40470700004)(46966006)(36840700001)(40480700001)(40460700003)(41300700001)(5660300002)(2906002)(966005)(8676002)(4326008)(316002)(70206006)(70586007)(54906003)(6666004)(6916009)(36756003)(47076005)(82740400003)(7636003)(7696005)(356005)(8936002)(478600001)(86362001)(426003)(36860700001)(26005)(83380400001)(1076003)(2616005)(336012)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 16:07:46.6125 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: be0ae07c-bc06-4aea-7c1e-08dc0c762048 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE3D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5709 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Sun , Ulf Hansson , David Thompson , Adrian Hunter Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This commit adds handling in dwcmshc_resume() for different error cases. Signed-off-by: Liming Sun Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230822195929.168552-1-limings@nvidia.com Signed-off-by: Ulf Hansson (cherry picked from commit a11937b3cff5449871f428e46e202481dc61a9de) Signed-off-by: Liming Sun --- drivers/mmc/host/sdhci-of-dwcmshc.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index 1e78c1e33325..bb0fe18be5dc 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -536,17 +536,32 @@ static int dwcmshc_resume(struct device *dev) if (!IS_ERR(priv->bus_clk)) { ret = clk_prepare_enable(priv->bus_clk); if (ret) - return ret; + goto disable_clk; } if (rk_priv) { ret = clk_bulk_prepare_enable(RK35xx_MAX_CLKS, rk_priv->rockchip_clks); if (ret) - return ret; + goto disable_bus_clk; } - return sdhci_resume_host(host); + ret = sdhci_resume_host(host); + if (ret) + goto disable_rockchip_clks; + + return 0; + +disable_rockchip_clks: + if (rk_priv) + clk_bulk_disable_unprepare(RK35xx_MAX_CLKS, + rk_priv->rockchip_clks); +disable_bus_clk: + if (!IS_ERR(priv->bus_clk)) + clk_disable_unprepare(priv->bus_clk); +disable_clk: + clk_disable_unprepare(pltfm_host->clk); + return ret; } #endif From patchwork Wed Jan 3 16:06:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1882000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T4vnB5F2Tz1ydb for ; Thu, 4 Jan 2024 03:09:50 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1rL3oK-0002d1-1c; Wed, 03 Jan 2024 16:09:40 +0000 Received: from mail-mw2nam12on2047.outbound.protection.outlook.com ([40.107.244.47] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1rL3mb-0001d9-Kb for kernel-team@lists.ubuntu.com; Wed, 03 Jan 2024 16:08:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O8SFzpaOuTzclCyZTe09Rli3nWCW9UIc7PwBFkBRczmq7fhzkes63CwWIMEKRg0Re2xP3VHj07osN0cHObHmiJ+CTKwYTk8fmteM9jcz8hPigFPaR1xgqL4rubSw3li5mBeo644cIyNQrgz5rA/XK1VW7NBsvWsiztNL2grCdSjhY6Rl6e75w7y15+uMyJLCw4dezjSIM2PW8edYFvajCLaL/hjWwq/piUuQdzrdFb03hkgUPbEvI4l6De9zOsjuEiV7xk2PDlKuXK0weMhBy+LI2g+u1nk+CK65ZS90YdgxDD5eLdSiDYSSy/BqudOQIuGoQwhUOXAePC4S1v0Nyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A9TWjZ/C8QDOOjDGK+9VjEg+UN3dMzT0/KkL4SRzQug=; b=La6uziFo95pLzAg0HxaoU1hzOCfZ+etO2rWMYTp9cwHzOXSOq2RzLY6CGavDfKU46n53cH+Rsj2kVnH4LEQbGcKQsSVAcKzinfAiTbcQyFQUnM+OoGp09OXO90nlHTYr/S1yAKPwWXGJjB1T/934hzFhouLM21y9Qdp5hslPCqloPzzJ8VJ2D6bovdFXwMECiI/k686A2mjMVMy4oIH/WwP3zE1+o8UoltWw7f3kd4iDZOq211KfVHDOUFJuPJanyxcuhoZH/LiPzeQXf0WHXZdRVvacQNdP0x0q4SSN9guLPWUIXsSrDsXrkbEYrcGLUs44c5Ft0UQPHVxOnPOGaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from DS7PR03CA0223.namprd03.prod.outlook.com (2603:10b6:5:3ba::18) by CY8PR12MB7097.namprd12.prod.outlook.com (2603:10b6:930:51::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Wed, 3 Jan 2024 16:07:48 +0000 Received: from CY4PEPF0000EE3A.namprd03.prod.outlook.com (2603:10b6:5:3ba:cafe::73) by DS7PR03CA0223.outlook.office365.com (2603:10b6:5:3ba::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25 via Frontend Transport; Wed, 3 Jan 2024 16:07:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by CY4PEPF0000EE3A.mail.protection.outlook.com (10.167.242.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 16:07:48 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:36 -0800 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Wed, 3 Jan 2024 08:07:35 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Wed, 3 Jan 2024 08:07:35 -0800 From: Liming Sun To: Subject: [PATCH v3 7/7] [SRU][J:linux-bluefield][PATCH v3 7/7] mmc: sdhci-of-dwcmshc: Add runtime PM operations Date: Wed, 3 Jan 2024 11:06:59 -0500 Message-ID: <20240103160659.144149-8-limings@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> References: <7315e47661ea7ae98ccffaee3c4d921c8de7ef07.1702924774.git.limings@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3A:EE_|CY8PR12MB7097:EE_ X-MS-Office365-Filtering-Correlation-Id: 59039990-ee06-44dc-effb-08dc0c76214f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VN25oyc2kVWCbmXPPrRjCKyUxbee3U7b0YOPmvKXhaBy4++at8JgtDWh0QdpFnXuaqLPj4MJTAoh4NvpovlY5jjbizwrQBHoMuWDCMOT5PVsvRUQocDnhkxaIhUGrvbX7zDA1SpRvzFlIoxe+P3QADkrD+D3DuW9HJhFTtTvy8733B1nbWjYGl+2vBhabBrU55+ktnP6/uuYGFiTfys8imK3n6o5VMuqqwYL6AddG3aDmRSjtE+xNny3PwfUzi0Ezw6cwPQ0MQikcsSyy0H11wJNCSsjyPBLkUbGlLktMoG+AS93qOiHb7wZxC4Kv5b6B7QN7N2GQIUc6Ppj8fcpEZUvkRJf5bnXkSg+txRCtLzQunJuIxpasM2dvPjKV4zFvo5FI3Jz1WarZUZ26LnMo1Ja+WBN5aMiwEYoOxlVWDoqzsF+P8RgblV/JcOc/YQ9P7ED4umzg91xi+cHHOC8KT24u3H98D1FNtXmxcMN8QeJVowaB/R0uLQpgNW2hp9mNDZ7f7Be9AjhwCnpLEsgLJFpC3f0kC+95ku+qoRiEPMV3LnfX8VBGe49h4HNAAvl6pONofIf3zQXiBIZXrV3sBnQYgcnNZlirZwU+HpIHMKCJUm/lqVQBrNTBpyDlncdcBFyq4Lrh/YTnIin3CdsQvHxphMOgq802JGyhbtyuUMhx5eVu37zNe7ZrSSo+3ke16br8JHamR9jtHOtEAFyd6aK6X7LPqPexiaRka8taoQMd5QFCMky/yB/w8GXkQec4nmy46p1HHj6DSk75Ld7DSsKNwZL9URaJPx25QOzATCaezc0bhiYAENj/d8cejNd X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(136003)(376002)(39860400002)(346002)(230922051799003)(451199024)(1800799012)(82310400011)(186009)(64100799003)(36840700001)(40470700004)(46966006)(82740400003)(356005)(7636003)(36756003)(40480700001)(40460700003)(86362001)(7696005)(336012)(6666004)(966005)(83380400001)(47076005)(426003)(478600001)(4326008)(70586007)(70206006)(36860700001)(1076003)(26005)(6916009)(316002)(2616005)(54906003)(8936002)(8676002)(41300700001)(5660300002)(2906002)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 16:07:48.3391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59039990-ee06-44dc-effb-08dc0c76214f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE3A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7097 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Liming Sun , Ulf Hansson , David Thompson , Adrian Hunter Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" This commit implements the runtime PM operations to disable eMMC card clock when idle. Reviewed-by: David Thompson Signed-off-by: Liming Sun Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20230822195929.168552-2-limings@nvidia.com Signed-off-by: Ulf Hansson (cherry picked from commit 48fe8fadbe5e03edfd83315c331b171a9ae245a4) Signed-off-by: Liming Sun --- drivers/mmc/host/sdhci-of-dwcmshc.c | 73 +++++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index bb0fe18be5dc..689a297c10ca 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include @@ -461,12 +463,27 @@ static int dwcmshc_probe(struct platform_device *pdev) host->mmc->caps |= MMC_CAP_WAIT_WHILE_BUSY; - err = sdhci_add_host(host); + pm_runtime_get_noresume(dev); + pm_runtime_set_active(dev); + pm_runtime_enable(dev); + + err = sdhci_setup_host(host); if (err) - goto err_clk; + goto err_rpm; + + err = __sdhci_add_host(host); + if (err) + goto err_setup_host; + + pm_runtime_put(dev); return 0; +err_setup_host: + sdhci_cleanup_host(host); +err_rpm: + pm_runtime_disable(dev); + pm_runtime_put_noidle(dev); err_clk: clk_disable_unprepare(pltfm_host->clk); clk_disable_unprepare(priv->bus_clk); @@ -506,6 +523,8 @@ static int dwcmshc_suspend(struct device *dev) struct rk35xx_priv *rk_priv = priv->priv; int ret; + pm_runtime_resume(dev); + ret = sdhci_suspend_host(host); if (ret) return ret; @@ -565,7 +584,55 @@ static int dwcmshc_resume(struct device *dev) } #endif -static SIMPLE_DEV_PM_OPS(dwcmshc_pmops, dwcmshc_suspend, dwcmshc_resume); +#ifdef CONFIG_PM + +static void dwcmshc_enable_card_clk(struct sdhci_host *host) +{ + u16 ctrl; + + ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); + if ((ctrl & SDHCI_CLOCK_INT_EN) && !(ctrl & SDHCI_CLOCK_CARD_EN)) { + ctrl |= SDHCI_CLOCK_CARD_EN; + sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); + } +} + +static void dwcmshc_disable_card_clk(struct sdhci_host *host) +{ + u16 ctrl; + + ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); + if (ctrl & SDHCI_CLOCK_CARD_EN) { + ctrl &= ~SDHCI_CLOCK_CARD_EN; + sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); + } +} + +static int dwcmshc_runtime_suspend(struct device *dev) +{ + struct sdhci_host *host = dev_get_drvdata(dev); + + dwcmshc_disable_card_clk(host); + + return 0; +} + +static int dwcmshc_runtime_resume(struct device *dev) +{ + struct sdhci_host *host = dev_get_drvdata(dev); + + dwcmshc_enable_card_clk(host); + + return 0; +} + +#endif + +static const struct dev_pm_ops dwcmshc_pmops = { + SET_SYSTEM_SLEEP_PM_OPS(dwcmshc_suspend, dwcmshc_resume) + SET_RUNTIME_PM_OPS(dwcmshc_runtime_suspend, + dwcmshc_runtime_resume, NULL) +}; static struct platform_driver sdhci_dwcmshc_driver = { .driver = {