From patchwork Tue Nov 10 14:20:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 11894431 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6C91B138B for ; Tue, 10 Nov 2020 14:21:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3F3220809 for ; Tue, 10 Nov 2020 14:21:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="MufCbo9R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730097AbgKJOVK (ORCPT ); Tue, 10 Nov 2020 09:21:10 -0500 Received: from www.zeus03.de ([194.117.254.33]:57698 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgKJOVK (ORCPT ); Tue, 10 Nov 2020 09:21:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=3iJUraYIkjvtGhbxANKV+0boVvw 461uW0A891RGRSao=; b=MufCbo9RRlgXf3vF+FLuvfd/19Jk/XwhyMM8ayHeSc9 U0TkFLtdpuzsFrzFuXj3MKoBs+c/vtfWD0ErILaONNnvVcfxeihkOdelirRKA9kj f8AG+io12W5UIkcP9MLjYvKGx7+xsuZEiitr/zF3xYTnzT9fVEeR8PmhKJ/tr5FI = Received: (qmail 2195567 invoked from network); 10 Nov 2020 15:21:06 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 10 Nov 2020 15:21:06 +0100 X-UD-Smtp-Session: l3s3148p1@xKqyY8GzWsogAwDPXxAvAEQD26z+TKuA From: Wolfram Sang To: linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= , Wolfram Sang Subject: [RFC PATCH 0/4] mmc: renesas_sdhi: reset SCC only when available Date: Tue, 10 Nov 2020 15:20:54 +0100 Message-Id: <20201110142058.36393-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org While working on another improvement for the reset routine, I noted an issue with an old Gen2 SDHI instance which did not have a SCC. It turned out that we never distinguished between the SCC and non-SCC versions on Gen2 when it came to resetting. So far, it went OK but my upcoming change broke. So, this series fixes the underlying issue by only resetting the SCC when one is available. I made very fine-grained patches because this driver is so fragile. Nonetheless, my tests on a Renesas Lager board (R-Car H2) and Salvator-XS (R-Car M3-N) were successful. Debug output showed that proper code paths were taken and checksumming large files worked as well as reinserting cards. The patches are based on mmc/next and 5.11 will do because there seems to be no issue with current kernels. I'd be very happy about further review and testing! Thanks and all the best, Wolfram Wolfram Sang (4): mmc: renesas_sdhi: only reset SCC when its pointer is populated mmc: renesas_sdhi: probe into TMIO after SCC parameters have been setup mmc: renesas_sdhi: populate SCC pointer at the proper place mmc: renesas_sdhi: simplify reset routine a little drivers/mmc/host/renesas_sdhi_core.c | 38 +++++++++++++--------------- 1 file changed, 18 insertions(+), 20 deletions(-) Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda