From patchwork Wed Oct 30 13:37:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josua Mayer X-Patchwork-Id: 13856526 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2121.outbound.protection.outlook.com [40.107.103.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A7401EB9ED for ; Wed, 30 Oct 2024 13:37:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.121 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730295478; cv=fail; b=pGoMlAnwbyq50LHDh1J6WFSgqdSjwG6j0R9lVay9d9Kj1VKlySelciDS6IUsvhhRE/+BeAIXRobvKku+XDO+wL5dDCWCDMGclamztO/ISfqbe0Lizm0sDvlbEdif3BSWpro5bMSVyMSk8adIbWyS+pWFW5tUeZVSzCMhlpmHR78= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730295478; c=relaxed/simple; bh=TMTmDtTrIE5XYrnaluqWSY+5uSEIVV2vk0YCboy5OcY=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=SPrPAYtg5J6FHP492gfaax7j6yBZRmnVWlw2QsEk3xkX3ESCmEP1DrdJYyvkuNyNIuVZOiEXnLCDkY8eoRDO0VTg7uBTBNSTXdAzjoJi3rMFbC4SG/DRKaRtlK+CHY2uJQTP+lxjN5TnBioZM51ZHr2XMTg43zj3VsuINlwz6p8= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=solid-run.com; spf=pass smtp.mailfrom=solid-run.com; dkim=pass (1024-bit key) header.d=solidrn.onmicrosoft.com header.i=@solidrn.onmicrosoft.com header.b=NCxFuHP4; arc=fail smtp.client-ip=40.107.103.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=solid-run.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=solid-run.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=solidrn.onmicrosoft.com header.i=@solidrn.onmicrosoft.com header.b="NCxFuHP4" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tYp6xBSRVB4JOLcYdzTCHFMIgZO49OrUnXwwORAJNSF3lmrIVac7zma9jqOW6LpbRM2464ekbsJYrIu+k4h7YnQW/9Nj9JJ7siYHXPOO3uHiOPezZlV8B94RC762OI+nHggVripSdReJTECd6zj/8yiSm9JYatlu3wkK2ALRa2w+ObB128y0NIbLZpzsGI/+dfSCMRVcpyobYfm0OIIB4A8OzQ6QJVogKA2Zty78A7fSaqPgq53Dwr1zBjMus2DIaDXX/arMX8Bn6CNyStv8GwaHBsXdr2gsN7a+V1dfk38NNZSnhg4UCyBJ6Nmr5T4XuRo8mwOfSnonNt1YcS++Rg== 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=4lEO4hjAlWtTRFTbGG1pUvFkVw1v+dGMUB4J4mUyZVk=; b=ldStGnjJfiH2JaUPmuQ0dG2MaoE1KwdYb8Pw/LWlcMBarpxSPivRlLSug9UCe6mHY33BpZPozCt4BtDnibqUPmdoq2eOVBwnOCc25tooFupQCFcISbGxpV3SRRlDzUVYNrPqm/XFoLw9xBOV36FWTyja6uLCnwa2kRBTskZOXhrSF3r5PvBG3EwEU8sXMePKRbS914kldtmmsHNub/pHxSMJhlHkuHJYoviwecR4gEsu7DLTUNU7Vgc7IkrgH6Lo47FdE9w+cmCEdcHdWj5gTZtomiI0jmZmfB+odpKpHVBbHzI8a0zkTcxO8AHbhpuXR3198Kg7ZGqi+2MONzHRjw== 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=4lEO4hjAlWtTRFTbGG1pUvFkVw1v+dGMUB4J4mUyZVk=; b=NCxFuHP4jRZmoc3xUcp30yADQvVpw/eYVbha6sHUnYZT8WwusA909e7BEReJm1hpdH/8Hc/jTllXMTf3MdNMfvv+QMljqvQb2DNS0Nwdu/0axrTor+/VGYg3aQVdTwIqoTEv4XxqUE3Rxbl0ug+Zf1azt05bQrHtv3snfJq+fnM= 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 DU2PR04MB9097.eurprd04.prod.outlook.com (2603:10a6:10:2f0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Wed, 30 Oct 2024 13:37:48 +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; Wed, 30 Oct 2024 13:37:48 +0000 From: Josua Mayer Subject: [PATCH v2 0/2] mmc: host: sdhci-esdhc-imx: implement emmc hardware reset Date: Wed, 30 Oct 2024 14:37:42 +0100 Message-Id: <20241030-imx-emmc-reset-v2-0-b3a823393974@solid-run.com> X-B4-Tracking: v=1; b=H4sIAKY2ImcC/3XMQQrCMBCF4auUWTvSibERV72HdFGS0Q6YRpIaK iV3N3bv8n/wvg0SR+EE12aDyFmShLmGOjRgp3F+MIqrDapVmlplUPyK7L3FyIkXNKSMOxGR0Rb q6RX5LusO3obak6QlxM/uZ/qtf6lMSOjOrrWdUZdOj30KT3EY3/PRBg9DKeULn/t3kbAAAAA= 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: FR0P281CA0165.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b3::13) To AM9PR04MB7586.eurprd04.prod.outlook.com (2603:10a6:20b:2d5::17) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB7586:EE_|DU2PR04MB9097:EE_ X-MS-Office365-Filtering-Correlation-Id: 31b693cb-b4c9-4799-1a74-08dcf8e80b02 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?hKigAhSKPajPVrowUO0nQg/z0Jxn+UL?= =?utf-8?q?VNwxMZ8ORzquO0Hvukdo/gW/17hxPNJcUE330ZLIvVd47ckw03VTptH3JUMWnlZvQ?= =?utf-8?q?/XQSLq47CpvweDIkq53IAc41VnHOPL2DDIqz4maddveal8eKBxHBK2MlusgAzP3HV?= =?utf-8?q?DRo5VVQRf5eDCew+sgvOCcM7LjYkfYevCkEULQ6vWrOA3Wccoj+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X8YzMfu2MogGc6Iv?= =?utf-8?q?zPdUOt6DeFYZ7x/fGU3eiwXZMuy4nBs4qhVTCFtDsNKRTYZ14dmdlg1pi9gTfZrPH?= =?utf-8?q?YykDvND2mA2poaUqqpRkXuoDlI8eUXn2xd6e2+Te+uRPUhjSn0NGm9Vkl8SwHDyJD?= =?utf-8?q?wtO0b+OkNLgr/DY4MLd4UqZSk5hCeJ7SQzFHGVue1OXYCzmFQczVYxE35lFLqq1ct?= =?utf-8?q?LzmZjbbo/hoaVJcPesnksQf5qUMYq/vwyHAneIIUdP0q0BFGoI/fzyvQI/xyZ9UYc?= =?utf-8?q?pAvKQcXQqgIU?= 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)(366016)(1800799024)(52116014)(7416014)(376014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?jiVRAnp7nxe0/Gwp9VYxlRAkNJX+?= =?utf-8?q?OwqYKfq041TTnyQ9mqROR2QpA6kEFyxgUnzYkupCwcvAPoCHM5VBPyJThQY79+DTD?= =?utf-8?q?S8XLGLALMfH4C8zqVbNWDnJVsIQ0gdMkcBMIrFhPZ9KxSBcUj9ehMe+lTx6F+H3oD?= =?utf-8?q?jMYNaLksJvRkSQcLZyKR48MGensJKa7rwoBb5/dnpeY/UrHsBTS+hMhP1NKDCAlmi?= =?utf-8?q?bR9YbevG6ZHiVKmMdAW0WyxJzZgvwR4OfbVdz0wsmbmo2d//p14308M//gNhLLDgM?= =?utf-8?q?cy89kOJpr7sMA4FQYe7jgexLB11M2dGxzYlJxEBvKC2voCrbH6dILCljeLubm+Bcv?= =?utf-8?q?5zrI+5tVrLgAOisPDHVIVj7xJKD1KKLe5uh4SbbBsegbEWnb3tIbCSSp/J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jwtx5fR88O?= =?utf-8?q?NvE6bPUyJOQf9h568AvARCSrCn3cS9natEoHa9oTBOFBT9v0fCyR4dYbzPMVzx2qH?= =?utf-8?q?v42qv6MT6ihIHdWhsqrVWPCJ1KhJYr9BveN8Ag6A3JHENzMxxDCYtxtQt9ircDPpZ?= =?utf-8?q?9LA/jpokeHWHpvFfV/wDFzCcYTFfXxKLOPzrXq4tV+gj/U7RhbXA1PzVR0ju6uMhl?= =?utf-8?q?UIwl2DG7PWZd2jINQTyhVrjES2QkevTEOn1GTWkiWANXbKC0mEuiQ3cnH3/VDgMI1?= =?utf-8?q?YFU9qAsFR/cS?= X-OriginatorOrg: solid-run.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31b693cb-b4c9-4799-1a74-08dcf8e80b02 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB7586.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Oct 2024 13:37:48.4608 (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: 8LdJjk4ZbXvL+12oGpV38g6QjWJaqPlyfkObwa4WoLfX0gf6MQk+2ncQtV4rQgxLAegfiH41MV+lYKrWqpLh3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9097 Signed-off-by: Josua Mayer --- 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 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) --- base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc change-id: 20241027-imx-emmc-reset-7127d311174c Best regards,