From patchwork Fri Nov 1 11:42:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josua Mayer X-Patchwork-Id: 13859282 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48DC5E6B243 for ; Fri, 1 Nov 2024 11:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: Content-Transfer-Encoding:Content-Type:Message-Id:Date:Subject:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=jvBP7CSrYKKIJZ66d82Bpeh6FY6ZJ6q7LwGPGbdGz6w=; b=botDRMiPXm423MkLyiQ7Bp/olw DcTM7sFywU86WAeqISDqUzMOqoag/yw/vT46JRlJ4eshFMvvMNQdKNmmHnkYIiH/hDR0+PcejXeRt Ff5DxbJHyffKzoPpIlena65L/CPfZu1qNMOETdAofy5Sgc8fAg/pJWgaZaUNmGDQ7oSdVvwVrIHSh NDoiPP9dBza+sdlmWHIQGoU0FCUQsKZeIROrHt8SSpPXeKAbuVF9JlMgOFKLnn9BpDdiw0OKa/Huw T72Zhszg6MyOHxFLKjHYSJHavzluGo+rvJRgpizrmWZ1CBwwP+Elkqxbd6K4IJFB6odFtNAEtWMIN FaLQPCWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6qA7-00000006o79-3Zmc; Fri, 01 Nov 2024 11:49:55 +0000 Received: from mail-db8eur05on20725.outbound.protection.outlook.com ([2a01:111:f403:2614::725] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6q3D-00000006mdv-1gXr for linux-arm-kernel@lists.infradead.org; Fri, 01 Nov 2024 11:42:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Eobjx7Uqq0b/NbYs8iNjXev6r8xzOn4HcnuyjAnVGLT1mkDUOutW3cNAN3qJgNgI38Bm3j5hdYn6VVbL5k0GmJvHKlyW985csZ5REusScGhFQF+K6dLH1/irEPwUYPr1ZsBYhX3pe+N8uz1EaL5UA6eqmRGo6gHmvKDZeDfsDLi4DQt8ukKyVkGeXAK3ramEuIdPWzrvOSOfOzztLFAKbswlDyMFUcGpy/Szf/LPAvK5r41FIg7aRkixav3gDee74MlYJbJBySNB2StQBN9Rs6rDuQ79pEawr/7f6BVIO1wMqutaa2rSk2FN9aYojoBDFhX6PJzsYEgLq7EPCje/Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=jvBP7CSrYKKIJZ66d82Bpeh6FY6ZJ6q7LwGPGbdGz6w=; b=f+ZraaFWBQg/qxHr/nL4aKcD7w+5ZGveBLOyI9gL3G0euSXl4Yu21HIGKxtRpR5LvTfYsQzDC+1UH2LJ1zZHzV21wpIGqUawEpWGFzGfQ+2u0ccH0020D00KEVTJjBoDlnHxp2wsMEPweVvQXp8/4lE/Kb3ykLs72bUImiyNc3rHEXaFaMmB8dntkZxzt/xXgVAQF3jnCCtWQK7GhLHPxFBqnf0X5Rs3o2klKYV60JAE30dRHxa6gibguqGFneBli/AiLQQz776QONBD0Xj0TbvPqDJmCRMJE+1S9TuTdNOEl2DgJ+DRNKn+YVfrFHX58PS9gTiLGs6JBvmxDOYBnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=solid-run.com; dmarc=pass action=none header.from=solid-run.com; dkim=pass header.d=solid-run.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=solidrn.onmicrosoft.com; s=selector1-solidrn-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jvBP7CSrYKKIJZ66d82Bpeh6FY6ZJ6q7LwGPGbdGz6w=; b=oH8IQttbkBs34FxRv3KKKQvC5CTZlhL6GCYacGQ1AJI0sDhqWe2V5iSPGjQcUNRK4x+KlZu+tXeJnYtLtr/RrSEBTi1E31TmoamuEw+vJFnSnajcBU9k9xDRUzcHLa2aBsxa4XrNph+3MsIdrnUSO2VDt9I6oePnYtPES1vqsHU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=solid-run.com; Received: from AM9PR04MB7586.eurprd04.prod.outlook.com (2603:10a6:20b:2d5::17) by GVXPR04MB10519.eurprd04.prod.outlook.com (2603:10a6:150:1dc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Fri, 1 Nov 2024 11:42:28 +0000 Received: from AM9PR04MB7586.eurprd04.prod.outlook.com ([fe80::c04e:8a97:516c:5529]) by AM9PR04MB7586.eurprd04.prod.outlook.com ([fe80::c04e:8a97:516c:5529%4]) with mapi id 15.20.8093.027; Fri, 1 Nov 2024 11:42:28 +0000 From: Josua Mayer Subject: [PATCH v3 0/2] mmc: host: sdhci-esdhc-imx: implement emmc hardware reset Date: Fri, 01 Nov 2024 12:42:24 +0100 Message-Id: <20241101-imx-emmc-reset-v3-0-184965eed476@solid-run.com> X-B4-Tracking: v=1; b=H4sIAKC+JGcC/3XMQQ7CIBCF4asY1o5hAEvrynsYFxXQTiLFQCU1T e8u7cpoXP4ved/EkovkEjtsJhZdpkShLyG3G2a6tr85IFuaCS4UcqGB/AjOewPRJTeARqGtRES tDCunR3RXGlfwdC7dURpCfK1+xmX9S2UEBLu33FRa1JVqjyncyUJ89jsTPFu4LD4IyX8IARwus q2FlI1stPom5nl+A0MwD1fzAAAA X-Change-ID: 20241027-imx-emmc-reset-7127d311174c To: Adrian Hunter , Haibo Chen , Ulf Hansson , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: Mikhail Anikin , Jon Nettleton , Yazan Shhady , Rabeeh Khoury , imx@lists.linux.dev, linux-mmc@vger.kernel.org, s32@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Josua Mayer X-Mailer: b4 0.14.2 X-ClientProxiedBy: FR0P281CA0198.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ad::8) To AM9PR04MB7586.eurprd04.prod.outlook.com (2603:10a6:20b:2d5::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB7586:EE_|GVXPR04MB10519:EE_ X-MS-Office365-Filtering-Correlation-Id: 029fcba8-39e7-44b7-d156-08dcfa6a4358 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|52116014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?p2VBAPMG5CKu7wfpntSDWLNpWrDXEXu?= =?utf-8?q?CPH1BKc2XG08OcuTs/XZQplidFQ5LIobDr2ohvG9MF6NeKJP+QjJr9xdZTmCEMEXZ?= =?utf-8?q?tyzDewmmtZTv3HPUqvqf1KBe/h+tzf8rAslD8yprMssw2GlUbFLuzvrW2hkb63HDs?= =?utf-8?q?DzcNfEaHqPsaiEo5AEZLFPZf8p5xvrLQcNYz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Ax3HMsqpsqKekyyWw3s/CpQQ?= =?utf-8?q?XZdtttUmh4FZTP6Me2CgQ4/VZ3ltW2kNsYdAI5adFYWEH8IBGF1Mib32+GGZaQYlC?= =?utf-8?q?nHrReUkR3vnh9gESHPzw5v4FDuoDyaw2C8dYorcQlzgq5IpKWuGjrqwSr4SBFARbL?= =?utf-8?q?eZth0x3NyJ/rWFDlf1oPjE6Fp8YsFV0uQbDhIQ0uru7ov4LbU/5UNL7t0uTSQGcwX?= =?utf-8?q?C0PHzxACqr3Dnq/FbOua1LUq9O1mBADSE5x5ZIX2oEDPL6B1uoQi/18Xb3oeb8BAI?= =?utf-8?q?AChvBahQH7yh?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB7586.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(52116014)(1800799024)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?1PtEpNAp4u19ABOwUYTBiMdMP1Su?= =?utf-8?q?XIHqS5nJnTCeLu2T/k/bT03Bk8wyss+uSk1INgzR1HlFTNGdBqbi40qAs9R9erpFu?= =?utf-8?q?vZfX3lDWzWijbWe5/A+ZzBVsphKUdWydnvCGstUds+29h6MUPnyQVCzZMg2THMVvM?= =?utf-8?q?tbdIrb54RCZl4Hu5jFQOQuGeHPKRiDttUSDD8ukMlO9IiHRSHpFFGChsLNtg9JVv4?= =?utf-8?q?n3iFfBlRkMxDPydpNcY7Ul4QOCJwPuzEUvj0wCm17XPF7/PYguoan5NGCA0cP/0C7?= =?utf-8?q?BXn2am3zR/uMZzN4vLtrYZoStjUoK6B8SuGlPtz+hrnRGoWnXXW82vBV29MuESyQC?= =?utf-8?q?tvm41a13dzLDf9gCIicxv/8dmz1IbAvRnSJARCI6O6+rldabY9Ssl+uEj4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XwbGUjhWA?= =?utf-8?q?8jTRCl7BQHXPG24DQlgovFHv0qzvmyAsQVzSMSpOXQ/RsFcE8tpVG3Bx0B5tuEJGL?= =?utf-8?q?zJYYvpSCZ9qtf6UL+ns2yVWjqbJMTbx7GxwiR6hiz/hK6CgyRV1JNVknGHQcIILiN?= =?utf-8?q?SWEWuG4WhhhjEobsfAWZuarhcos3Fd4v0zuPW4LM7sTuLlbv2IQC3esj8sHCig0Ia?= =?utf-8?q?zuXTP9d1PjD3U79S1XH2xXTV356nUruTMRZK0uwtIXjRlVZ32kTHdZ2MdmtA9DpTw?= =?utf-8?q?j36OvS9T/qSA?= X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: 029fcba8-39e7-44b7-d156-08dcfa6a4358 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB7586.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 11:42:28.4468 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a4a8aaf3-fd27-4e27-add2-604707ce5b82 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5ipKh3Ax+Gw13YO8ku5pneFsByUEezj0sXxUbjyR93uWO4W1VcR7GAvbTI9PtW8FZDuB74y7WEishvbtwuy/DA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10519 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241101_044247_485730_60F02838 X-CRM114-Status: UNSURE ( 7.35 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Signed-off-by: Josua Mayer Acked-by: Adrian Hunter --- Changes in v3: - reused existing control register definition from sdhci-esdhc.h (Reported-by: Bough Chen ) - placed both control register mask definitions next to each other - fixed timeout write register name - Link to v2: https://lore.kernel.org/r/20241030-imx-emmc-reset-v2-0-b3a823393974@solid-run.com Changes in v2: - replaced udelay with usleep_range (Reported-by: Adrian Hunter ) - added comments for delay values (Reported-by: Peng Fan ) - delay values based on JEDEC Standard No. 84-B51, 6.15.10 H/W Reset Operation, on page 159 (Thanks to Bough Chen ) - added a second patch demonstrating a cosmetic issue revealed by first patch - it bothered me during development but is not important - Link to v1: https://lore.kernel.org/r/20241027-imx-emmc-reset-v1-1-d5d0c672864a@solid-run.com --- Josua Mayer (2): mmc: host: sdhci-esdhc-imx: implement emmc hardware reset mmc: host: sdhci-esdhc-imx: update esdhc sysctl dtocv bitmask drivers/mmc/host/sdhci-esdhc-imx.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) --- base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc change-id: 20241027-imx-emmc-reset-7127d311174c Best regards,