From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: Re: mmc: tmio: why enable/disable SDIO irq on every transaction with IOMOD? Date: Thu, 01 Dec 2016 21:46:50 +0900 Message-ID: <87y3zzvmth.wl@dns1.atmark-techno.com> References: <87h96qkdn0.wl@dns1.atmark-techno.com> <20161201104622.GA1541@katana> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from p654789.hkidff01.ap.so-net.ne.jp ([121.101.71.137]:57197 "EHLO gw.atmark-techno.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755455AbcLAMq6 (ORCPT ); Thu, 1 Dec 2016 07:46:58 -0500 Received: from mail-pg0-f70.google.com (mail-pg0-f70.google.com [74.125.83.70]) by gw.atmark-techno.com (Postfix) with ESMTPS id 13E1A203D1 for ; Thu, 1 Dec 2016 21:46:55 +0900 (JST) Received: by mail-pg0-f70.google.com with SMTP id x23so92404954pgx.6 for ; Thu, 01 Dec 2016 04:46:55 -0800 (PST) In-Reply-To: <20161201104622.GA1541@katana> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: wsa-dev@sang-engineering.com Cc: ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, wsa+renesas@sang-engineering.com, horms@verge.net.au, linux-renesas-soc@vger.kernel.org Hi Wolfram, On Thu, 01 Dec 2016 19:46:22 +0900, Wolfram Sang wrote: > > > > So my question is that "What is the reason behind to disable IRQ with > > > SDIO_MODE? Is there any situation which masking with SDIO_INFO1_MASK > > > is not enough? > > The code was introduced with 845ecd20239c28 ("mmc: tmio_mmc: implement > SDIO IRQ support") which was in 2010. I don't have that old datasheets > to check if the SCLKDIVEN restriction was already present in the SDHI > cores which were available back then. Is Arnd Hannemann, the author, around these days by any chance? Or does anyone on the list have a shareable old datasheet? The one we have is the one for R-Mobile A1 and has CONFIDENTIAL on it. > My assumption is that it was not, or it was overlooked. So, it might be > just for completeness that not only the individual IRQs have been > disabled but also the big master switch (IOMOD) was turned off. > > My further assumption is that it is very likely good enough to disable > the individual IRQs. If we can't guarantee the conditions to set IOMOD, > it seems okay to me to just leave it. Yes that's what we think and what we see with our test code, which is just the original without IOMOD removed. > Do you have a patch which works for you? We don't have it yet. A question we have is that where should we enable / disable the IOMOD? Do we have to keep it disabled while the controller is in non-SDIO? The spec says that we don't get SDIO irq while in non-SDIO mode. But should we trust? Or, should we disable it when we switch back to non-SDIO mode and enable when we detect SDIO? Please enlighten us this area. We'll submit the proper fix once we know how we should do it. Thanks, -- yashi