From patchwork Tue Oct 16 01:38:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10642573 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 452F315E2 for ; Tue, 16 Oct 2018 01:39:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3307629787 for ; Tue, 16 Oct 2018 01:39:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 259EE29740; Tue, 16 Oct 2018 01:39:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A40B129740 for ; Tue, 16 Oct 2018 01:39:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726958AbeJPJ1j (ORCPT ); Tue, 16 Oct 2018 05:27:39 -0400 Received: from bin-mail-out-06.binero.net ([195.74.38.229]:5994 "EHLO bin-mail-out-06.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbeJPJ1j (ORCPT ); Tue, 16 Oct 2018 05:27:39 -0400 X-Halon-ID: 513229af-d0e4-11e8-9adf-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 513229af-d0e4-11e8-9adf-005056917a89; Tue, 16 Oct 2018 03:39:40 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Wolfram Sang , Ulf Hansson , linux-mmc@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH v2 0/3] mmc: tmio: Fix reset operation Date: Tue, 16 Oct 2018 03:38:29 +0200 Message-Id: <20181016013832.2385-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Niklas Söderlund Hi, While looking at the Renesas BSP kernel I found patches which improves the state of the hardware at probe and after runtime resume. Patch 1/3 make sure the module clock is enabled after resuming before register are accessed. Patch 2/3 is the real change in this series and brings in reset of the vendor specific callback when resetting (SCC in the Renesas case). While 3/3 simply make sure that the IRQ mask for Renesas boards (Gen2 and later) are in a good shape after probe (and reset). In addition to addressing the state after resuming it helped unbreak a SD card I have which are very problematic on Koelsch. Without this series inserting the card results in: sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) sh_mobile_sdhi ee100000.sd: Tuning procedure failed mmc0: tuning execution failed: -5 mmc0: error -5 whilst initialising SD card sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) While with this series applied (patch 2/3): sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19) mmc0: new ultra high speed SDR50 SDHC card at address aaaa mmcblk0: mmc0:aaaa SU04G 3.69 GiB mmcblk0: p1 p2 Patch 1/3 was previously part of 2/3 but as it deals with a unrelated issue it's here broken out to a separate patch. Patch 3/3 have once been posted outside this series bit after comments from Wolfram it's brought back as it now deepens on 2/3. Most changes in this series are based on similar work from Masaharu Hayakawa but for this version all changes now differ quiet a lot from his work. All mails sent to him bounce with a "Undelivered Mail Returned to Sender" error. I therefor felt the need to claim authorship as I don't want to post blame of my (potential) mistakes on some else. Niklas Söderlund (3): mmc: tmio: enable module clock before resetting when resuming mmc: tmio: fix reset operation mmc: renesas_sdhi: add initial setting of interrupt mask register drivers/mmc/host/renesas_sdhi_core.c | 4 ++++ drivers/mmc/host/tmio_mmc.h | 1 + drivers/mmc/host/tmio_mmc_core.c | 22 ++++++++++------------ 3 files changed, 15 insertions(+), 12 deletions(-)