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: 13856650 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 74C8DD5CCB7 for ; Wed, 30 Oct 2024 15:01: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=4lEO4hjAlWtTRFTbGG1pUvFkVw1v+dGMUB4J4mUyZVk=; b=qxcyBmTXMwcjGaAdROInnK0VRu /PsdftaQGxaFnsIhmBArnlGbDC2/eCpzjxQDYo4IXNrdvo2qJ0eYUX2HIFlTh3xnM5mhmYagw0v16 3VGxjewksOZm9sBVdm+amLqHmoEqznCCCyyDMWAcQSiLUeAAcKRX3VSYUrFZf8nrGN2UG5FI2ihVt esQ2ssOmScaGCnaRJYQ0T/6haqIyMilCKQ9Ozc6GN/EL6IqQ1c9hW91QHWMjFjz6WJHqlrHPYXTb7 HcPf2tYmA0KgYa/AcvDmoNd229tViGwtNOhTr8hMhqEgtMC7ckGFKmu2pMN6JuRNe/mGr0WVVuBUz HtDk5fsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6ABm-00000000l45-0pkG; Wed, 30 Oct 2024 15:00:50 +0000 Received: from mail-dbaeur03on20720.outbound.protection.outlook.com ([2a01:111:f403:260d::720] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t68tX-00000000V65-1Wph for linux-arm-kernel@lists.infradead.org; Wed, 30 Oct 2024 13:37:57 +0000 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) 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+W2G6PoogpNf1pK?= =?utf-8?q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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/JWeqfP3o?= =?utf-8?q?uojXB0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6bPUyJOQf9h568AvARCSrCn3cS9natEoHa9oTBOFBT9v0fCyR4dYbzPMVzx2qH?= =?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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241030_063755_447412_57DB41AE X-CRM114-Status: UNSURE ( 7.74 ) 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 --- 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,