All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Zach Brown <zach.brown-acOepvfBmUk@public.gmane.org>
Cc: ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] sdhci: Add quirk and device tree parameter to force SD test mode
Date: Wed, 24 Aug 2016 09:16:48 +0300	[thread overview]
Message-ID: <bd59af70-ebd8-2c92-e6ab-e1f0bf9acce7@intel.com> (raw)
In-Reply-To: <20160823221421.GB20351@zach-desktop>

On 24/08/16 01:14, Zach Brown wrote:
> On Tue, Aug 23, 2016 at 09:22:29AM +0300, Adrian Hunter wrote:
>> On 23/08/16 01:55, Zach Brown wrote:
>>> From: Jaeden Amero <jaeden.amero-acOepvfBmUk@public.gmane.org>
>>>
>>> On some devices, CD is broken so that we must force the SDHCI into test
>>> mode and set CD, so that it always detects an SD card as present.
>>>
>>> In order to get a device with broken CD working, we had previously
>>> always set the SDHCI into test mode. Unfortunately, this had the side
>>> effect of making all SD cards used with our Linux kernels undetectable
>>> and non-removable.
>>>
>>> By making this "SD test mode" setting optional via a quirk, we can avoid
>>> this side effect for devices other than the device with broken CD.
>>> Additionally, we add a device parameter to sdhci-pltfm to allow all
>>> SDHCI drivers to enable this quirk.
>>
>> Generally new quirks are not acceptable, but I don't see how test mode helps
>> very much since you still don't get any card detection events.  If you
>> really need test mode, please explain more about how it helps (as opposed to
>> polling for example).
>>
>>
> 
> Polling doesnt work in our case, since the issue lies with the SD controller
> itself. The SD controller in xilinx zynq devices requires the CDn signal to
> work. http://www.xilinx.com/support/answers/61064.html We have a situation 
> where the controller requires the signal, but we can't use any of our pins to
> supply it. With test mode we can get the controller into a state where it works
> despite not having the signal.
> 

Doesn't sound like something we need in sdhci.c.  Have you considered adding
it to the driver, perhaps using the ->reset() callback?

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Adrian Hunter <adrian.hunter@intel.com>
To: Zach Brown <zach.brown@ni.com>
Cc: ulf.hansson@linaro.org, mark.rutland@arm.com, robh+dt@kernel.org,
	linux-mmc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sdhci: Add quirk and device tree parameter to force SD test mode
Date: Wed, 24 Aug 2016 09:16:48 +0300	[thread overview]
Message-ID: <bd59af70-ebd8-2c92-e6ab-e1f0bf9acce7@intel.com> (raw)
In-Reply-To: <20160823221421.GB20351@zach-desktop>

On 24/08/16 01:14, Zach Brown wrote:
> On Tue, Aug 23, 2016 at 09:22:29AM +0300, Adrian Hunter wrote:
>> On 23/08/16 01:55, Zach Brown wrote:
>>> From: Jaeden Amero <jaeden.amero@ni.com>
>>>
>>> On some devices, CD is broken so that we must force the SDHCI into test
>>> mode and set CD, so that it always detects an SD card as present.
>>>
>>> In order to get a device with broken CD working, we had previously
>>> always set the SDHCI into test mode. Unfortunately, this had the side
>>> effect of making all SD cards used with our Linux kernels undetectable
>>> and non-removable.
>>>
>>> By making this "SD test mode" setting optional via a quirk, we can avoid
>>> this side effect for devices other than the device with broken CD.
>>> Additionally, we add a device parameter to sdhci-pltfm to allow all
>>> SDHCI drivers to enable this quirk.
>>
>> Generally new quirks are not acceptable, but I don't see how test mode helps
>> very much since you still don't get any card detection events.  If you
>> really need test mode, please explain more about how it helps (as opposed to
>> polling for example).
>>
>>
> 
> Polling doesnt work in our case, since the issue lies with the SD controller
> itself. The SD controller in xilinx zynq devices requires the CDn signal to
> work. http://www.xilinx.com/support/answers/61064.html We have a situation 
> where the controller requires the signal, but we can't use any of our pins to
> supply it. With test mode we can get the controller into a state where it works
> despite not having the signal.
> 

Doesn't sound like something we need in sdhci.c.  Have you considered adding
it to the driver, perhaps using the ->reset() callback?

  reply	other threads:[~2016-08-24  6:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-22 22:55 [PATCH] sdhci: Add quirk and device tree parameter to force SD test mode Zach Brown
2016-08-23  2:46 ` Frank Rowand
2016-08-23 22:19   ` Zach Brown
2016-08-23 22:19     ` Zach Brown
     [not found] ` <1471906531-28668-1-git-send-email-zach.brown-acOepvfBmUk@public.gmane.org>
2016-08-23  1:34   ` Haibo Chen
2016-08-23  1:34     ` Haibo Chen
2016-08-23 22:04     ` Zach Brown
2016-08-23  6:22   ` Adrian Hunter
2016-08-23  6:22     ` Adrian Hunter
2016-08-23 22:14     ` Zach Brown
2016-08-23 22:14       ` Zach Brown
2016-08-24  6:16       ` Adrian Hunter [this message]
2016-08-24  6:16         ` Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd59af70-ebd8-2c92-e6ab-e1f0bf9acce7@intel.com \
    --to=adrian.hunter-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=zach.brown-acOepvfBmUk@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.