From patchwork Tue Jan 2 14:21:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881636 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 4T4FXQ3NN0z23dJ for ; Wed, 3 Jan 2024 01:26:30 +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 1rKfio-0005XE-9s; Tue, 02 Jan 2024 14:26:22 +0000 Received: from mail-bn8nam12on2081.outbound.protection.outlook.com ([40.107.237.81] helo=NAM12-BN8-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 1rKfiY-0005Q2-52 for kernel-team@lists.ubuntu.com; Tue, 02 Jan 2024 14:26:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J+lCJTpYtrlXU0FnIb7upSgIX136Ad3Joapn+rHYirOqdElRrlG5zgJpUyD6OwkhM7ifNCIdveS+HX39GVnkQij+w9JZtJAlIFMVtRJYOnRRe19jc52bJNsArYMFpjBVyOrqNonfYmosxbi3JJQVuRPkl06crXYvis5Q9fshVnPawP41k7WRVVLKAv+9jsdmXYgajvA8jOSrmFh0AoPbxA/e/Uu93Ak2P6JZ3iyc4mhKXP60Jh2vDghmCwMIjIaeNZyrX17N4qPde2WqL1ydk8i/LZP/ThO/dXnH5wooe+bs6BIvJUB09gFDLWCD5XbHgAPeNdlYKxcXV76O3PCueg== 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=3zcRB2amBMgw9IZ+j8zbQBWgFh8eWRwQD3zd75AM3h4=; b=FAc8M/UDcGWrKaFnlBYT9KkzlmiAlxICRFgPBPDwHnceVWP1gdpxiWVjjHJK4Kh3kmXKFKY1kumJ+d2iLZczICH7FV+ON31A/wWUr7ncg6NpDxUEtj9faJZvU49nRBffjkedTWyyiNcyNDNtD5bRrMiXh41SCWvAQwx3oHSuDSScV+qEYP1tW+rJ7U/55vnBuuqhRZ11qsnLGfQXR7R9eNGDmQ+F9l0nZXJUMse4ElZWrQcDTcYgd8fQZorVV+CaLwofY4Y+7WANAm839cHpOd1BbjdPy/GBG8pv93aEVBNxkmNxKP/iNfRpR9lP0zxwtuN52lCaqR6MfviXWoxbqg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 BL1PR13CA0345.namprd13.prod.outlook.com (2603:10b6:208:2c6::20) by CY5PR12MB6552.namprd12.prod.outlook.com (2603:10b6:930:40::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Tue, 2 Jan 2024 14:26:02 +0000 Received: from BL02EPF0001A107.namprd05.prod.outlook.com (2603:10b6:208:2c6:cafe::cc) by BL1PR13CA0345.outlook.office365.com (2603:10b6:208:2c6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.12 via Frontend Transport; Tue, 2 Jan 2024 14:26:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF0001A107.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Tue, 2 Jan 2024 14:26:01 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:48 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:47 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 2 Jan 2024 06:25:47 -0800 From: Liming Sun To: Subject: [PATCH v2 1/7] [SRU][J:linux-bluefield] Revert UBUNTU: SAUCE: mmc: sdhci-of-dwcmshc: Add runtime PM operations for BlueField-3 Date: Tue, 2 Jan 2024 09:21:22 -0500 Message-ID: <20240102142128.157022-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: BL02EPF0001A107:EE_|CY5PR12MB6552:EE_ X-MS-Office365-Filtering-Correlation-Id: 53fc6497-bff4-44e6-511f-08dc0b9ebf03 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eNSbvQPjH/IHCyrjypVyrIGxeB7K5HLPh0viRHri2xMgzWaJGXR4A5QEDsWlK7PKTd9AQ55SfySehfRxOM5ul5Acf1sH4uzkg6o/hnm9gkAXsG5UVO+X9WmNBnGm1THjucc6yVPqWVne0wfAF3pUa7zIH/Z41ZPlkGMhk/H7HGtOhtVYlxPJ4sOH7QDf5xvSZ6B5bRpXJSyKbMlrvOLT2eXvxd+ECDCtttya70zm2qAP79CRBzRIeEAu0cwggYsiqf9P6ExoJGMfAJq/DX0aABcEzjj6vyPEgfIruTkVHYqZ0uI2ERPFzi0PsSMJQxeFrMPW+QrpsIXa38d2f3DzW5ebfsVRc+C68+bOpI8W+uyOK0VPkgS5Fca7oPjDJsg/xbFfRRmh+1V21lRBk/dCnQxhGwCHRBQvg3PxgSSA60j+T1bx71/S70xv/2uBqobSPB2Ae1C/69ZuCCI4hzBQ0ttExUDABo+sYrgYLai7hGAqJ0SPWDw8R+qgUHwUbPBjyVrrmnVJ+MrX6wtMcSQWRRKjAHmUxN/G2M2fdgTfxU22Fz8z0yNQVQ/aDHqk+x7OPkKW0nU+TZZWm0bf+gQnNAcWauWnr1e06YcsIGuCA2vBzcs1NkgIjRmucCKVdYnt+qE+X3jOThyBhClhX6he2DzUyU7E7TYU/OluM8j9mJ/iS/yq2/Npp4pPTLF3H/1pltGpm1oFbhue0aARBNaj6h3Uqx3KJ5Pg76qROWhTQRrN5Q01dwcWIn7XnjPJn1ZJz2ci83HMwMaxQBlEX7lQGXLoHu0mfrrr35KqDLNoS+j4vE6QdHIlUzr8gfgqwd4l X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(346002)(376002)(136003)(39860400002)(230922051799003)(82310400011)(186009)(64100799003)(451199024)(1800799012)(40470700004)(36840700001)(46966006)(70206006)(6916009)(4326008)(36860700001)(70586007)(316002)(54906003)(8936002)(2616005)(8676002)(26005)(1076003)(107886003)(966005)(83380400001)(336012)(478600001)(426003)(47076005)(7696005)(6666004)(5660300002)(2906002)(41300700001)(36756003)(82740400003)(7636003)(356005)(86362001)(40480700001)(40460700003)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2024 14:26:01.5140 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 53fc6497-bff4-44e6-511f-08dc0b9ebf03 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A107.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6552 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. --- 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 Tue Jan 2 14:21:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881633 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 4T4FXD1MrMz23dJ for ; Wed, 3 Jan 2024 01:26:20 +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 1rKfie-0005QR-1l; Tue, 02 Jan 2024 14:26:12 +0000 Received: from mail-dm6nam10on2088.outbound.protection.outlook.com ([40.107.93.88] 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 1rKfiW-0005Pf-2e for kernel-team@lists.ubuntu.com; Tue, 02 Jan 2024 14:26:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PxZUkE1jh+D+OUSlkh8F8d+TAWFcU+/YFstzn6ONuKNLl5muynMa0q8fBltz+ZKuW3S10adDJt86vjmGDJDMQhnph8xfG4Osh6kUxXTPx/AKLEGS7Tps6eWMlemkDxuC4WumgWTOUmfrP2vDy21B0VslbQ6go57UiUfT/g3cVjpB7kqUVL7bTaYHvGQdMOPQwO3hBsbH/b7hnjpswuwxsEgycy3JIqGun2W4GB185RfGgcGcDA6riIs3wAsdpBJdgv0NxqQ/Ilawv1hjgToYh55YLQiGg+ISJFepV5rcwz0MoEWaSzci7PnakPYUqJHHgzk5hKb62wPyYOdkUYk5Fw== 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=IKfezj2SaV/0OTIo6V92jkdyWczZnPJIjCkXwRetR04=; b=cxUkQVg4SwH0OXIeAxZhOEQmwlaNBP31QaK+XxyVIXMf5ULplgvY7Pn4zyzQoDQVMrIyhRu4Z/4TrsJNsp87GZZQQoaWYLjzVnnESio351jebUs+/klFiBak5vcxdGdwKXm7vNnnXqXcxOzjNLdMIW4iRbhGWRNXJTsjGSVzoEpSiXY30gGvhjUSQpeKNiX/uJKiNRh+FU9DNCMFIewDFz6GsZ015ro9zfFk6sqBAxML+X96o+Sg9dvn2G2kQ7i4uP8KQZN/7PxlOxOBWtHJJKHXBwTkyHCKkhZA0Qg38CsV6TFTfRw0eHv5pJJlFbxMa1GvuDVQ8LbbqRke/Df8Nw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 BL1PR13CA0386.namprd13.prod.outlook.com (2603:10b6:208:2c0::31) by PH0PR12MB7791.namprd12.prod.outlook.com (2603:10b6:510:280::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13; Tue, 2 Jan 2024 14:25:59 +0000 Received: from BL02EPF0001A104.namprd05.prod.outlook.com (2603:10b6:208:2c0:cafe::52) by BL1PR13CA0386.outlook.office365.com (2603:10b6:208:2c0::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.7 via Frontend Transport; Tue, 2 Jan 2024 14:25:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A104.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Tue, 2 Jan 2024 14:25:58 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:50 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:49 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 2 Jan 2024 06:25:49 -0800 From: Liming Sun To: Subject: [PATCH v2 2/7] [SRU][J:linux-bluefield] Revert UBUNTU: SAUCE: mmc: sdhci-of-dwcmshc: add the missing device table IDs for acpi Date: Tue, 2 Jan 2024 09:21:23 -0500 Message-ID: <20240102142128.157022-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: BL02EPF0001A104:EE_|PH0PR12MB7791:EE_ X-MS-Office365-Filtering-Correlation-Id: 5127eb69-f719-4d32-d4d1-08dc0b9ebd63 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7WvwiK4SZ8YgoWK+7icE5mTcosT8gDUkF7dSOPlWMTbv3uXfKk2UtgVqYwXH3Z3IOYwH2FK7HECOxJBpQGpC1J/QemfbPcTKERDMco6SicR1OKCPnVBE0TvBgupdfNWjrh28OM5gKFMfePJe4SFBUXE+DT6+cbnRuUZAhqsn+OPTUeFcdIx5Lq5IFJsV60P5Eytof0sek730mstIwXP4BuBYabEGc0LbrGzXozjamxhRtHokX9rK3E5QV5D2epYiMZC0wgPCcva1VT4EU2Nhzd2vmKF+3eB0qfJDCWKZqVpxOEH4rzi+xwLj4aZJemDKz6CdpbC9Shwm6qtbrJcpJ/UgdVKPAjpDKXDUO+vJw60rsDMEXlWKk7sTvKbD8D3a1sANs7pTLwFXGdnLOKC9lGalfco9Xon0LA0tOaoLrxStzvuGO4lZrPrycQ8ZT9jF+BlibQZfwRJSCYAh3/pByjzRITIJ7Vb+zf6eryAS4gd+aCaN6IDdOUnlsH2U0LuR9ZddCzyUOa+ACViMgyiE0h7mj0eVct/FiFfJ0BL0cekdjdk8LcKPc0H2BBU3AoNGgwBpg5yv5h96tK7fCqxSJhEYoBMePDMEaB3gIJT8LHmx31MxlmwfEzrKbmgGmErUDC8z7ZdxFQW77cHX4SLirIYRyW7EfWV5zWGjFOnhXmyffuwJZJnSAClCMmUZZmnhXfDcWjC3Q2HQ/68yVs0tjgSpykX96T8CXQ51Lp5CRhBOS1Wg4RgIFL8vQacNjxObm0aYhG5rLdn1SyPt8wUaYfMoc9JlqIfNaUbW7w0sv37+YQeo+f+9RroaPFlENt1k X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(396003)(346002)(39860400002)(376002)(136003)(230922051799003)(64100799003)(451199024)(82310400011)(186009)(1800799012)(40470700004)(46966006)(36840700001)(7696005)(6666004)(40460700003)(40480700001)(7636003)(107886003)(356005)(2616005)(966005)(478600001)(36860700001)(6916009)(70586007)(70206006)(86362001)(54906003)(316002)(47076005)(41300700001)(82740400003)(36756003)(83380400001)(4326008)(8676002)(2906002)(8936002)(426003)(1076003)(336012)(26005)(5660300002)(4744005)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2024 14:25:58.8067 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5127eb69-f719-4d32-d4d1-08dc0b9ebd63 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A104.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7791 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. --- 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 Tue Jan 2 14:21:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881635 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 4T4FXK1Vfxz23dN for ; Wed, 3 Jan 2024 01:26:25 +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 1rKfii-0005Sq-7W; Tue, 02 Jan 2024 14:26:16 +0000 Received: from mail-mw2nam10on2086.outbound.protection.outlook.com ([40.107.94.86] 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 1rKfiZ-0005Q3-9L for kernel-team@lists.ubuntu.com; Tue, 02 Jan 2024 14:26:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n2dso9pvYuV3q5nQeR2Yf7Dcyvow6wpgwxtNARgPQTkdwc7E9+JR0QG7uaAA4P0H4ZiDy2HrMj00a62uH2Oz/H4y1ix57TUck2ph2yq/5gSfSw+fbykoP0y/fr3vQ384uDnWRjuwFltP93oM1BwPjIxCyp7THtQBsoprFymGiBMOEDAHHfrnNEkfWOLRlPi1DU8EX2TKmMEJQfh8pMdyPC8u0/wc6opj8VXQx5HC3EVzeTKSkRbmJQOpcpLNHRFbD/5uxblNOTIORGL1NfetW9oZUTrKaT7QiZ8y4j0rMRZtNSsIy040b8pnMGgIFtbpXD8NwSy+nr2jWlfLSkWMKw== 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=6YYLJfetgcBN+7L5/1Q3clQjWcTVz/TPiaWuG7OIDII=; b=h60UHeUVFw+wfb6Vglm1ZRQtmeo2xNgASAajT/kqE3UZDLIVdGlgsowv+dJ4LtDMoKT+91ZAvJgsBNyEv82Ja76rPq6Jp5JIr7uHfMfTq+GtcAkQ8BVuQdirkSKwoupbM8riNK6NAA4dE3KWV/BxXxNrDXMkMSam3zzH1xyhrwewaob74f8TMf/Pwzv5SGB9TCUxI4VAc9lbk0QwdttqLvMMWLeLUDflYBcQxY5KQhY0XJkRQhfej2sJMKOPOkeyU26lh+zGoBmUJ41VKJcj61gSIdFjcIl9vENQ1Suzk4fxoH74umQbSEWgznWp2GeE2yPaTNz5YWJ1qk+WY20NlA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 BL1PR13CA0380.namprd13.prod.outlook.com (2603:10b6:208:2c0::25) by DM6PR12MB4927.namprd12.prod.outlook.com (2603:10b6:5:20a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13; Tue, 2 Jan 2024 14:26:02 +0000 Received: from BL02EPF0001A104.namprd05.prod.outlook.com (2603:10b6:208:2c0:cafe::c1) by BL1PR13CA0380.outlook.office365.com (2603:10b6:208:2c0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.10 via Frontend Transport; Tue, 2 Jan 2024 14:26:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A104.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Tue, 2 Jan 2024 14:26:02 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:51 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:51 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 2 Jan 2024 06:25:50 -0800 From: Liming Sun To: Subject: [PATCH v2 3/7] [SRU][J:linux-bluefield] Revert UBUNTU: SAUCE: sdhci-of-dwcmshc: Enable host V4 support for BlueField-3 SoC Date: Tue, 2 Jan 2024 09:21:24 -0500 Message-ID: <20240102142128.157022-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: BL02EPF0001A104:EE_|DM6PR12MB4927:EE_ X-MS-Office365-Filtering-Correlation-Id: dcdc1dec-1a54-4934-e4f8-08dc0b9ebf79 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VJGB7AGkt60gw/NUSRWAtx8aXtOwMNO0t0z400xLHbTq7AS5C2WUnUs7FwBP+euJT/T1yYZEhsaqUmYBJlghwcDx+2BA0LvBlztd8Fa29gRYEA/KSsqSaM7juJz0rMw57OFgmGMqTZu+1CLUFBxc0sBZDii663JbZfgUfS4VxMln3Rj2pBvmn6TTRE+4yghGkbIxb3c1etjIRrVbldjCU+9FPwlQRxUcRtrlXMWyqJQgI+5X+uUr10xTz9pa3Lo8+hqYStXV05F0eMVg/C2pyUyoNd0RCt0ZGtLr3n5Iwd0rT2Dr8W7uSfnMZfsvoMlhheHEv0lSirOk4wArhaNq93kghwWRMOzM/Bn/3s2rDYiwzRS2v2uyV8iwkH2TDbVEinWm5qxYCjLTg7EAJs2y2GunGlTe10ca4shUzOEDVqWh5n8wPmb895/YbLAc6rtVr7B7cNlbxCaISvw1fRBBhzUm/7sf8ztFOPnCcH5fjeqJNCoPPba2MVAQDRcRTBsqwnQ19+OViG0kjuzJVfTUqkcRIidL7u2mR1cZFXxIEWyJ0fgRKdFZtxTHckJRWIp5YXZ5XGu5oN7RL+UDwFTbwp4e6WxMIqAqYHTqGQOzJAdZNUkvoSvTzwfET/XauHVoryZNA5lX2vf20QdJzWHF9TZQco3T7/5L9dpcXqonODdjb91goYcZ67oVY5L2UgVJVDVZykZq2ms8B1WiR0nSvcAG4k/Z9h1eNPAnJQPtsG17so10nAnsWmFc1x8lj+0wN4ZjgPl8+uEZRD1LO88UnAWpGjCh8frZGLO7QS/G+28C1QzcvJGNZW2C5soHWKVz X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(396003)(376002)(346002)(39860400002)(230922051799003)(451199024)(1800799012)(186009)(82310400011)(64100799003)(46966006)(40470700004)(36840700001)(4744005)(2906002)(36860700001)(82740400003)(8936002)(8676002)(47076005)(41300700001)(7636003)(36756003)(86362001)(356005)(4326008)(478600001)(966005)(6666004)(7696005)(6916009)(70206006)(70586007)(83380400001)(54906003)(2616005)(336012)(426003)(107886003)(316002)(26005)(1076003)(5660300002)(40460700003)(40480700001)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2024 14:26:02.2911 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dcdc1dec-1a54-4934-e4f8-08dc0b9ebf79 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A104.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4927 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. --- 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 Tue Jan 2 14:21:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881639 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 4T4FXk31Yrz23dJ for ; Wed, 3 Jan 2024 01:26:46 +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 1rKfj5-0005rF-Vz; Tue, 02 Jan 2024 14:26:40 +0000 Received: from mail-bn8nam04on2083.outbound.protection.outlook.com ([40.107.100.83] helo=NAM04-BN8-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 1rKfiZ-0005Q4-8M for kernel-team@lists.ubuntu.com; Tue, 02 Jan 2024 14:26:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=avx0K6a5DKynrZ5ffBzvaQzNp9ka+pAS2BPg/Ep+NBaMP568WRr8xvOltaXE/b8mjHadaO04sCQfyNqPAVgh5vO3hYAxYoOznAMqqOjIwzPu3HvRFTr/Nrq8o9NT+ZgXAOHnj5LgVN89cb8eunDSg1hmfT5F0doh80wVY5Z9+zZb0PwkCVDtAj8PANmbj9StAuZpFoj1M/8d4HXzyaoi2pmoGFxfiB5nRGcDPMYia8V3F6t7dlIgIwZNOqeLYEoYswBiehNDXL/UKBtnomd9KMVYbKfvBbuccOFTMDG1ZLd5pjO3UbJHL6cB+fnExn4lSnela9iR9lrXcCs2hxJjIQ== 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=DwCEM4k3APm3h0VFGcl6lnsPjJANvSGopC/Ahz2WknY=; b=kYMSFdbTQf3sH8Ev5KBTMO0fXe3QwTnIcRLXRuhpWp1er1R9y+e4nkioxytW9Rw2L6AsYPUJzZ1KKQQeECuqVoq5XbgyZ/bwSIYND4CePXgeUik4cVM8cVEDgo/mRi5B5CYKpIaO3foQV/LhTk0mttlyZmDf6fzr6zPOPiPxEH872sAjOKYHu/rkoGZ8T20ah91o8O8K4LyeJmyknyPvsD2Rp6W398ao7l5afDJkeXhiX2bJTUXruC84cMVlToVelsOQBKaDfdjwmnUfbWmWjIDyYJFWo8ClEsWS0qysmXo7/B/9zBR74pRebcyDz424ye5kIa+aMmnXPa5Cg9Juuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 BLAP220CA0010.NAMP220.PROD.OUTLOOK.COM (2603:10b6:208:32c::15) by MW5PR12MB5598.namprd12.prod.outlook.com (2603:10b6:303:193::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Tue, 2 Jan 2024 14:26:03 +0000 Received: from BL02EPF0001A106.namprd05.prod.outlook.com (2603:10b6:208:32c:cafe::8) by BLAP220CA0010.outlook.office365.com (2603:10b6:208:32c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Tue, 2 Jan 2024 14:26:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A106.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Tue, 2 Jan 2024 14:26:02 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:54 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:53 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 2 Jan 2024 06:25:52 -0800 From: Liming Sun To: Subject: [PATCH v2 4/7] [SRU][J:linux-bluefield] mmc: sdhci-of-dwcmshc: enable host V4 support for BlueField-3 SoC Date: Tue, 2 Jan 2024 09:21:25 -0500 Message-ID: <20240102142128.157022-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: BL02EPF0001A106:EE_|MW5PR12MB5598:EE_ X-MS-Office365-Filtering-Correlation-Id: 7007c0eb-f4ed-4437-7943-08dc0b9ebfe0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZAikmPAVsI5Qbmz1SkWnyXS8f2wuzc6j1MGfvX4/O4n9MIPOsYiaqhHNrKyITAOlW4LqZH6RwnB0LVuec1MG9RWh2Bv+Y0nuiSqhu3zRVFCRHUrNkJzu0cyGGsYmvpo82xp2xXz0zK3diWnjhJ9KTQtybyPhr8Q3bwNgOuyOs2BXy8UoOUvsL7gucFa70mWw6Hqh++S87mmjK05gUQ1/6iAHbhde2QFjgDRZiXXcg9k1g5TMeIhWVh0yWacK5CE4BUCjuMWJUch1KJyOWChp+D49jNiwclXXtZdAaRGYcHWx0d0UZMpRSgY8Gfp4eRWnqFAac5+/McmGJXaUkyrp4jitolQQBa8HTDj+mNf5iBmiiNT2Gt45M2v6yHgZwj3IaP46RH8YRPNXsxAbU+dQUvmeOV3GdKKI81k6AICN0B2nm8ckPC/e9mHmxZwnP6j5XrXC33BgWldSETmsjlsHB33pfmmXYAOaPcjDJn5b3G+P4tISJ1CvXEdcrbb19NSE176qgFm/h7zIHjG7MfR3k1Mqx5FDt+QbwrDbzTJozzBgvTBxMVjjrhCh3zfxzBY8MdZyRfOd4HCij+qdnpT5ErS0rEakX6wkXJ0fZcW6JvtrVpUfig7BMwWRORxOm6lO1m01NsFM97tUYRNF9uXLTdG3429AP0utjN7hMGIlP9pRGz3+lgHqVMpii9tESXMZNNmCmGv3Q6+MVoCmUpzX8V+SX9rK6Ps+dGdnaobAmakGlekDmkVESo1uxfkn8TK0a7Zw9tvnD88MDLoEjU9BcQG7w9mVOl7GHOAwkR8FXLnQAbIqGe47leC6qGqCltUm X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(376002)(346002)(396003)(39860400002)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(82310400011)(36840700001)(46966006)(40470700004)(4744005)(2906002)(5660300002)(41300700001)(8936002)(356005)(7636003)(966005)(86362001)(82740400003)(6666004)(7696005)(36756003)(336012)(26005)(1076003)(2616005)(426003)(47076005)(36860700001)(316002)(4326008)(8676002)(478600001)(54906003)(70586007)(6916009)(70206006)(40480700001)(40460700003)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2024 14:26:02.9946 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7007c0eb-f4ed-4437-7943-08dc0b9ebfe0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A106.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5598 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 --- 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 Tue Jan 2 14:21:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881634 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 4T4FXJ5ssbz23dJ for ; Wed, 3 Jan 2024 01:26:24 +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 1rKfij-0005UA-Km; Tue, 02 Jan 2024 14:26:18 +0000 Received: from mail-dm6nam11on2050.outbound.protection.outlook.com ([40.107.223.50] helo=NAM11-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 1rKfia-0005Q5-3g for kernel-team@lists.ubuntu.com; Tue, 02 Jan 2024 14:26:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fSEKFkQD9Q6FMcgYHkeK5wyT/P49AlXuAQmBcrTSt0UeYKneYKNCALWQIu4QgJxdK56wCiOLM4mhg4l6O6eRqDAPRBxFXuu83GVxQFlf29T34usH/fJhm3l64gSdZNn41aIiGpIPSQVastBJyFmZLaWBA/uXJgIcbD/YH4K3/qil4AqWmYTU1iuM0Fy0zOBaRORhmbmlFfL1pRQpQ34ZhBdkeAUatL6K/ID8fDtpWz1xvn3viOoeNTzp+TB3gG9QCaisDzHV+RPZGo6/ntmtYJ17+glhwoPqUJSueiP6R2yGifWW52DtqEsrRzlMP/J3S4i0cSTwT2YMp7rvrl/k8w== 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=X2ar23Ir3eQZQaNWXtV7IkuWjUT8uF19oG6K1Ze7r6c=; b=AssYbuyk/afphPZEbNszzE0pzy+pOolkhpiCZJpCLj4zyi+OFmJtizT2ltYJ3wR7EDZOglpHSDggWyHbCEZibmZgi7+ANBOORDaB9wwYHXw2KVNo4oySszaEEJuPHUuAbEo+JywmPqZBhmWOZ66Vs7CjAZBNPTbCm5M2emUKWHpnTU6n7LnmF4el3FJ5KWX4HlpTMFsdCbW+7rnD7mKDBwJlVHGDnlTH3G4j11NAGnCBz8XbEfjkr/isK0WLq9W0BX6PMDqtw0ziXj52IXJ7T+5B+6xwjrOlK1o4xHkkDlqQvaMaw2oX3FaMXZhzoYRA9yanlDj9V6DaDg5zvBvBOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 BL1PR13CA0375.namprd13.prod.outlook.com (2603:10b6:208:2c0::20) by DM8PR12MB5477.namprd12.prod.outlook.com (2603:10b6:8:35::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Tue, 2 Jan 2024 14:26:04 +0000 Received: from BL02EPF0001A104.namprd05.prod.outlook.com (2603:10b6:208:2c0:cafe::f) by BL1PR13CA0375.outlook.office365.com (2603:10b6:208:2c0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.7 via Frontend Transport; Tue, 2 Jan 2024 14:26:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A104.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Tue, 2 Jan 2024 14:26:03 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:56 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:55 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 2 Jan 2024 06:25:54 -0800 From: Liming Sun To: Subject: [PATCH v2 5/7] [SRU][J:linux-bluefield] mmc: sdhci-of-dwcmshc: add the missing device table IDs for acpi Date: Tue, 2 Jan 2024 09:21:26 -0500 Message-ID: <20240102142128.157022-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: BL02EPF0001A104:EE_|DM8PR12MB5477:EE_ X-MS-Office365-Filtering-Correlation-Id: 93a44ea3-0006-43a6-63c5-08dc0b9ec07b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: V87p+bs1BV4WwM5lS7y1tgNpSCsqGALCDYf+pUle6u0iVoTXckvd0u0oKsGcLJasl/s2RBlP2QBT7i1CuwFwmnL/HftQXYYhFWxkkOaM9r8XWG96zH5XY8CZRpkM1tL7PX6J0HcU0kKPVUafg3dtweoytu7x6JMI/dMxvXA/yR2JCwyMpJZsf11BljOxyH7eySoj/PYEP9abr9VR8QzGv73kGmD+6U28Z8a3Yva121a/kI2tG94cHR76q6uR7KepkgKExB4TprK445ifKM5V3Zy+qMFYgTngB5S0oouOMyMivcoLKQyB9sy0xvpgiQWos2M47n6ALKjRjeRMf9wvuDxXykTMz8BgSxr9kzSL4EVTjMh+Fqh/HqVf+raexSlsnH5RELSgEDzdwU/QlEWIIwvuTx5ZqT5ODPpG23In0j6J2CQCvX6rPchv6kaAHyNIEWf5RmYaO6K4CvMrherX3J8bKM2x/++JF5y7txWQ4n6Nqp5Dmd4UhfxwxKd6WJKi/t2aOygjC/NGRyI2TWJMIL8dUdTIt+dN47lv30oerd7JyYuWina1H60dSLR/KzMI+cez/ntao0JBZay1lD8ixttuLzI7GJJjfpkVvI7tFsBNR7/KdOwWieRTxMYL0MfmtXwtY3gqU/R9/Ihy2W5bGuZnoHg5R1xC9NnLilX/4/z/0mGR/I+HPmBctptfMSDISy6COnOXjrIdNpToV3zCgYvxJLFhYo/5hHG9gFBu5cvyXX+Wk599farHwR0LM/lteo/DS9i9u9ZH8A0Fw9hllICT2qKn4XPHCXBqAOGv4SQBQM2ax4R5eeqYu1gPy1HT X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(396003)(346002)(136003)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(82310400011)(186009)(46966006)(40470700004)(36840700001)(356005)(7636003)(82740400003)(36756003)(40480700001)(40460700003)(86362001)(2616005)(336012)(426003)(26005)(1076003)(7696005)(6666004)(54906003)(4326008)(478600001)(316002)(8936002)(8676002)(966005)(47076005)(36860700001)(6916009)(70206006)(70586007)(41300700001)(5660300002)(4744005)(2906002)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2024 14:26:03.9786 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93a44ea3-0006-43a6-63c5-08dc0b9ec07b X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A104.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5477 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 --- 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 Tue Jan 2 14:21:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881637 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 4T4FXc1fT2z23dJ for ; Wed, 3 Jan 2024 01:26:40 +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 1rKfiz-0005gj-3W; Tue, 02 Jan 2024 14:26:33 +0000 Received: from mail-dm6nam12on2053.outbound.protection.outlook.com ([40.107.243.53] 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 1rKfif-0005Rf-JW for kernel-team@lists.ubuntu.com; Tue, 02 Jan 2024 14:26:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VtSatSvI+jQKk08McH+RJVfvaGNY9nL46u+X+cK4AOl0fR6IJHrQ9BQfDapQflsDLt7f9YiOCiSXKKB5s5LLbQXVx0Sq0wLqe2EzM8MohCuhfymdgIlA6Cd9Md5SB6RtpYTQ5DtLw4kmeH664IlfaiJGGPt5NUhTBfVdBoxNoarcZp51K4mlnwDMR4SRTOgO4qsnwINTfH6W1/iQGCoi+3FchsUFMP20SWqFn+QjOrX5gjQPIM9tgev5vo+VxusZrlAeVJ8pkD11VTMVxl/f8OPT942O6NyKjfgBQkdFuFKM/CIHjA31VmUQBjV2F7x04EJqxEuMYGjEuktreJ2LzA== 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=MMEk7XssOIJiMqVRI7arq6lZhQmL4YQDaeOWI008uTI=; b=fi0Lc8NABBZ000SrV7fZRw4q18dn6/3KHgZztIfb6GzgKVoo7xkRRz/ZqQW/Mii2KuT4G/7HwV2I4HSnXKA3SI/dOkWLmKk3I2Y+Pl6uVMzyxTDMQkoAPJUtTX33ErEmmOQYtOaHKHwIXzdqElzbZLtmnqrfLs8l9mZApo3yAHU+Njvf0tLVjmPqLLu+PxW643+0VE2AA2jfLvHzMabtEImBx3T1CmlGRmWs+yf0m2uPFAWFY6rDPre2Q6iYbsnQOCwZ4FzlINx2ZJikgDDih7u/wRCjUnFHlqlEv3R7NoeNLF2ERcBEfpwONdEkW9EFYYXJ3H5mnTqpeevz+f/qFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 MN2PR05CA0035.namprd05.prod.outlook.com (2603:10b6:208:c0::48) by CH3PR12MB7665.namprd12.prod.outlook.com (2603:10b6:610:14a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Tue, 2 Jan 2024 14:26:09 +0000 Received: from BL02EPF0001A103.namprd05.prod.outlook.com (2603:10b6:208:c0:cafe::53) by MN2PR05CA0035.outlook.office365.com (2603:10b6:208:c0::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.8 via Frontend Transport; Tue, 2 Jan 2024 14:26:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A103.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Tue, 2 Jan 2024 14:26:08 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:58 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:25:57 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 2 Jan 2024 06:25:56 -0800 From: Liming Sun To: Subject: [PATCH v2 6/7] [SRU][J:linux-bluefield] mmc: sdhci-of-dwcmshc: Add error handling in dwcmshc_resume Date: Tue, 2 Jan 2024 09:21:27 -0500 Message-ID: <20240102142128.157022-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: BL02EPF0001A103:EE_|CH3PR12MB7665:EE_ X-MS-Office365-Filtering-Correlation-Id: 041adef3-12a4-4bf9-7da6-08dc0b9ec32c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: on8s0DVNONJ/WT66af7V4F4NsZXEbtUFpO49prNF3dXt1zXit2jl26bM3J2fIo4ixygVo0XVwfwhm/iNUTs/loyd7jN6bGlp2FNfIm3ehYBJ5puaXMMHri70AYrj+rLgAdqk/iguzuAs6yon+Be4gyn5i+Hy0b1n+jcLH7AsdeMpnuPx+SAnPflWtVk75EBnEHIjZbvBEdRLo3AmJNXjfVGKQNPLf7sPYGStii1YSdPjBcLbDaj597c1bXsq4/L0lGlZcI14OYYiwKmD56/DEPwGurSH/Ym/1r93jRteZMf+Eq29+B7x07F3lcCIp3cbgmKXavmzI7BPWKmtLaEm3QMt5GEqz+Or6J3J67dxOnfZFt7zdgpAOaqURSOMaRVTIWRdVbteE/9YCyZ1mOi3BTHxtulN4C1cBHkqrvUHsUDJrvkDi37zdmHiVZEFqvKYsLkmHi0C2MStlL06CTJ1X2gzIV9XGKuzEecl847s3nOAeHpeOxd/g1wy6VFH48jhz1U1QxXkbYH1LPRsyqK34VMYue65KoAd483hZt9nIb4fbDJLTDLNo5ZKPnCPboVKWzXFPRxO8ja3KyUoSkzrhUQ88dFd7wzMJdrM3MMvFPzqyprqKLG8WN0zbAkKSCT00x9iXqL8c08Gvx3QJGJgHEdY8hYLFdxt+GRn/xE8YjUMOgAJNvFaKEvrfQlxaP/YyCwN6BWWo7wn6CKjRGEBbtGufpePD3ZNObY/+fSe657XWyrrk78UEvRdu1zxAbzo6APJD7F2O18LTtEB+au5rxtnEGXIIoKctSyMkgUTy1GegCBFpcjGQkRaq21vDQ45 X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(136003)(346002)(376002)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(82310400011)(46966006)(40470700004)(36840700001)(40480700001)(40460700003)(426003)(336012)(1076003)(83380400001)(2616005)(26005)(86362001)(36756003)(36860700001)(356005)(7636003)(82740400003)(4326008)(8676002)(47076005)(5660300002)(6666004)(7696005)(70586007)(70206006)(54906003)(316002)(6916009)(41300700001)(8936002)(966005)(478600001)(2906002)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2024 14:26:08.5104 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 041adef3-12a4-4bf9-7da6-08dc0b9ec32c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A103.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7665 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 --- 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 Tue Jan 2 14:21:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liming Sun X-Patchwork-Id: 1881638 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 4T4FXg6vP9z23dJ for ; Wed, 3 Jan 2024 01:26:43 +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 1rKfj3-0005o2-Vb; Tue, 02 Jan 2024 14:26:38 +0000 Received: from mail-dm6nam10on2085.outbound.protection.outlook.com ([40.107.93.85] 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 1rKfig-0005S4-HN for kernel-team@lists.ubuntu.com; Tue, 02 Jan 2024 14:26:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IcjGS5D319Pawe1JfrRZiW94qegvwy2Qnee87P/uO0JWS6BWllsenMjx+IEoAGZKILd78eeufZyUX7e5QKZpi7BaTVZtbrU0oXRefHrcemO1SncMnoVRmT6lomYX0zZ6nGXVcvOSEu35tRbhjsZkdiLixpm2/KyOgUyUKozlGbYkJdqOZIT4//1EyBFBm44GFGkXUOokaU0hTtWlYbC/22EHoG/6wdMO/ug60xYwFAjCnc57yEvdAykGi1H2tD6KXzy6Cqrpkgus6qv3VA4KC8LmUZ3U2bHqk03PMlTROySNjLKyaOKXbYC6N8E/fQdQ3al2Jq6D6Anqgf7lPU7QmQ== 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=5mGaH8kYHgtXpptODU3B5sJ9q4vaLLxiSF0/6YAHFjU=; b=nFhTy3ffKbaY3dmXYxP0N5zcsuHbXxlkG2gNIVnWsfvjIuQfqfslcfQMJ6FFPbJlkC8TJ8dkqjnG96Wf+iQHQG9GHmHWnAyN/s3rVf6/r+IAC7I3qCqru5ttPQ5MC5K9GG5oVrAvm/okyjVIek7t7zwTbysEPPPBVyarSq70HRh+gk9DnPLfLOGFtS6L3bPNO2smCNVNqvmXzXb7bDQmgq5DW2W+U6+6NLl3IJ/Ptqj8cy9JCCTBMHuybWVKyCieZLwhbCsHYfZ56BhHUIUd/g/F+Gn9Lw8UDCStTOUxGbK8UUI2CDj05ao5JdLgUDccWor0eQA4tzmXaP7NxJLoQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) 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 MN2PR05CA0030.namprd05.prod.outlook.com (2603:10b6:208:c0::43) by DM6PR12MB4909.namprd12.prod.outlook.com (2603:10b6:5:1ba::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.25; Tue, 2 Jan 2024 14:26:11 +0000 Received: from BL02EPF0001A103.namprd05.prod.outlook.com (2603:10b6:208:c0:cafe::9d) by MN2PR05CA0030.outlook.office365.com (2603:10b6:208:c0::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.12 via Frontend Transport; Tue, 2 Jan 2024 14:26:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF0001A103.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.9 via Frontend Transport; Tue, 2 Jan 2024 14:26:10 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:26:00 -0800 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 2 Jan 2024 06:26:00 -0800 Received: from vdi.nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 2 Jan 2024 06:25:59 -0800 From: Liming Sun To: Subject: [PATCH v2 7/7] [SRU][J:linux-bluefield] mmc: sdhci-of-dwcmshc: Add runtime PM operations Date: Tue, 2 Jan 2024 09:21:28 -0500 Message-ID: <20240102142128.157022-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: BL02EPF0001A103:EE_|DM6PR12MB4909:EE_ X-MS-Office365-Filtering-Correlation-Id: e1abb252-b4dc-403f-6f60-08dc0b9ec462 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RP2ToiwF9aQ2TE0eDeEW12VfawaYVFblZXoM9wIqTuqB/0KvujPHvsgm+BGMZQGVcY2M5lR0q+x+sGoDL0agSZ8W5RnJWF6RUCJlNna7UGe1FoeDmVn0PNAgY/VRbHjFLFJ+/5SAIR+7ze8KLJU6ZO+QMByKRLpU1YkbR5Es5x0sKDmNtvx7qHum8ZIDXspycl1K/lG64Y045Z0V3/WT1Unb12X9R9IwvIBBypzUkqA+7oXJ5C8HshPc3n8qg+Yk0fe0G0MebcA2Nkq+RvjLfVRUT5KYaushZLfR3pESKT/T6Inh6vSofb5FrEltXwiulBTv54HSPRE+JtCGQY5eihdPf+hqVf/y7skgvp/jW6FRAvvtq2HSZllfYy8xkcYDM6gcSMMN5+Y3qO+fhkFnLHoKr/ziviIdVaGnKhkI9c0AzECGYOg3AKhQIgoTKkdh+rnLPq9dd8h8OJB8JNBo3RhQs0K88co+mzCZ06MEWrQgpn7fu2HKeqVBXUPYbQFsD7jO3wVGLZPXP9jazA7QcFDWfRKieP/uINBoU7sXff+HhLOkuf4H7K6EFmKZ6xafIqC0ixQyaI01lCXr2Z0c0lzQt/QnMOLvPDX3wE0qSGUAwbpB9BifWIDo1lAA01t2PJ0VnIzFMH4SXDfCBiHf7m57dVCQCFlDxB0YI0h/PFYKk8Ud6EdQulPlHtVWyQcl1d3n8GHxv7JT7Zgr3UBpXvFDPbCU/+bpdAuhMoXJXgaim7p6He1NUXZZr7Te5r/WMhEFgu2qqKdUisFr0HG6EmQAVgOzJgJCwWwmVb6/ciuzF4/9s463BcbzF95tbnKL X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(136003)(376002)(346002)(39860400002)(396003)(230922051799003)(64100799003)(186009)(82310400011)(1800799012)(451199024)(46966006)(36840700001)(40470700004)(70206006)(70586007)(36860700001)(4326008)(6916009)(316002)(8676002)(8936002)(54906003)(2616005)(26005)(1076003)(6666004)(83380400001)(426003)(336012)(478600001)(966005)(47076005)(7696005)(2906002)(41300700001)(5660300002)(36756003)(82740400003)(356005)(7636003)(86362001)(40460700003)(40480700001)(133343001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jan 2024 14:26:10.5260 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1abb252-b4dc-403f-6f60-08dc0b9ec462 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A103.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4909 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 --- 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 = {