linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] MMC: FSL SDHC: Add support for hard-wired (permanent) card. Kernel version 3.4.47
@ 2013-06-02  6:38 Oded Gabbay
  2013-06-10  6:29 ` Dirk Behme
  0 siblings, 1 reply; 4+ messages in thread
From: Oded Gabbay @ 2013-06-02  6:38 UTC (permalink / raw)
  To: gregkh, cjb, grant.likely, rob
  Cc: linux-mmc, linux-kernel, devicetree-discuss, linux-doc, ogabbay

This patch adds support of recognizing hard-wired (permanent) cards
to Freescale's SDHC host driver. This is done by adding the option
"fsl,card-wired" to the SDHC device-tree entry. Detection of this
option is done in the probe function. Update documentation in file
fsl-esdhc.txt

Signed-off-by: Oded Gabbay <ogabbay@advaoptical.com>
---
 Documentation/devicetree/bindings/mmc/fsl-esdhc.txt | 3 +++
 drivers/mmc/host/sdhci-of-esdhc.c                   | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
index 64bcb8b..6f0eefa 100644
--- a/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
+++ b/Documentation/devicetree/bindings/mmc/fsl-esdhc.txt
@@ -16,6 +16,9 @@ Required properties:
     only handle 1-bit data transfers.
   - sdhci,auto-cmd12: (optional) specifies that a controller can
     only handle auto CMD12.
+  - fsl,card-wired : (optional) specifies that the card is
+    a permanent card and should not be detected for insertion or
+    removal
 
 Example:
 
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
index e70f22f..2f79ec2 100644
--- a/drivers/mmc/host/sdhci-of-esdhc.c
+++ b/drivers/mmc/host/sdhci-of-esdhc.c
@@ -222,6 +222,10 @@ static int __devinit sdhci_esdhc_probe(struct platform_device *pdev)
 		host->quirks2 |= SDHCI_QUIRK2_BROKEN_HOST_CONTROL;
 	}
 
+	/* If card is permanent, add capability of non-removable */
+	if (of_get_property(np, "fsl,card-wired", NULL))
+		host->mmc->caps |= MMC_CAP_NONREMOVABLE;
+
 	ret = sdhci_add_host(host);
 	if (ret)
 		sdhci_pltfm_free(pdev);
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] MMC: FSL SDHC: Add support for hard-wired (permanent) card. Kernel version 3.4.47
  2013-06-02  6:38 [PATCH 3/3] MMC: FSL SDHC: Add support for hard-wired (permanent) card. Kernel version 3.4.47 Oded Gabbay
@ 2013-06-10  6:29 ` Dirk Behme
  2013-06-10 13:43   ` Oded Gabbay
  0 siblings, 1 reply; 4+ messages in thread
From: Dirk Behme @ 2013-06-10  6:29 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: gregkh, cjb, grant.likely, rob, linux-mmc, linux-kernel,
	devicetree-discuss, linux-doc

On 02.06.2013 08:38, Oded Gabbay wrote:
> This patch adds support of recognizing hard-wired (permanent) cards
> to Freescale's SDHC host driver. This is done by adding the option
> "fsl,card-wired" to the SDHC device-tree entry. Detection of this
> option is done in the probe function. Update documentation in file
> fsl-esdhc.txt

Why don't you want to introduce "fsl,card-wired"? Why don't you use 
"non-removable"?

To my understanding the patch

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7f217794ffa72f208a250b79ab0b7ea3de19677f

explicitly removed "fsl,card-wired". So I don't think re-introducing it 
is a good idea?

Best regards

Dirk

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] MMC: FSL SDHC: Add support for hard-wired (permanent) card. Kernel version 3.4.47
  2013-06-10  6:29 ` Dirk Behme
@ 2013-06-10 13:43   ` Oded Gabbay
  2013-06-10 16:44     ` Oded Gabbay
  0 siblings, 1 reply; 4+ messages in thread
From: Oded Gabbay @ 2013-06-10 13:43 UTC (permalink / raw)
  To: Dirk Behme
  Cc: gregkh, cjb, grant.likely, rob, linux-mmc, linux-kernel,
	devicetree-discuss, linux-doc

Hi Dirk,

You are absolutely right.
I will revise my patch series to reflect the change.
Basically, I will call the generic mmc_of_parse from the probe function 
of Freescale's driver.
That will handle all the additional capabilities.

Thanks
Oded

On 06/10/2013 09:29 AM, Dirk Behme wrote:
> On 02.06.2013 08:38, Oded Gabbay wrote:
>> This patch adds support of recognizing hard-wired (permanent) cards
>> to Freescale's SDHC host driver. This is done by adding the option
>> "fsl,card-wired" to the SDHC device-tree entry. Detection of this
>> option is done in the probe function. Update documentation in file
>> fsl-esdhc.txt
>
> Why don't you want to introduce "fsl,card-wired"? Why don't you use 
> "non-removable"?
>
> To my understanding the patch
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7f217794ffa72f208a250b79ab0b7ea3de19677f 
>
>
> explicitly removed "fsl,card-wired". So I don't think re-introducing 
> it is a good idea?
>
> Best regards
>
> Dirk


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] MMC: FSL SDHC: Add support for hard-wired (permanent) card. Kernel version 3.4.47
  2013-06-10 13:43   ` Oded Gabbay
@ 2013-06-10 16:44     ` Oded Gabbay
  0 siblings, 0 replies; 4+ messages in thread
From: Oded Gabbay @ 2013-06-10 16:44 UTC (permalink / raw)
  To: Dirk Behme
  Cc: gregkh, cjb, grant.likely, rob, linux-mmc, linux-kernel,
	devicetree-discuss, linux-doc

Hi All,

Just noticed that 3.4.47/8 doesn't have the mmc_of_parse (compared to 
3.9.4).
Therefore, I will not use it and just fix the code to recognize the 
property "non-removable"

Best regards,
Oded

On 06/10/2013 04:43 PM, Oded Gabbay wrote:
> Hi Dirk,
>
> You are absolutely right.
> I will revise my patch series to reflect the change.
> Basically, I will call the generic mmc_of_parse from the probe 
> function of Freescale's driver.
> That will handle all the additional capabilities.
>
> Thanks
> Oded
>
> On 06/10/2013 09:29 AM, Dirk Behme wrote:
>> On 02.06.2013 08:38, Oded Gabbay wrote:
>>> This patch adds support of recognizing hard-wired (permanent) cards
>>> to Freescale's SDHC host driver. This is done by adding the option
>>> "fsl,card-wired" to the SDHC device-tree entry. Detection of this
>>> option is done in the probe function. Update documentation in file
>>> fsl-esdhc.txt
>>
>> Why don't you want to introduce "fsl,card-wired"? Why don't you use 
>> "non-removable"?
>>
>> To my understanding the patch
>>
>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7f217794ffa72f208a250b79ab0b7ea3de19677f 
>>
>>
>> explicitly removed "fsl,card-wired". So I don't think re-introducing 
>> it is a good idea?
>>
>> Best regards
>>
>> Dirk
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-10 16:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-02  6:38 [PATCH 3/3] MMC: FSL SDHC: Add support for hard-wired (permanent) card. Kernel version 3.4.47 Oded Gabbay
2013-06-10  6:29 ` Dirk Behme
2013-06-10 13:43   ` Oded Gabbay
2013-06-10 16:44     ` Oded Gabbay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).