Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1248012 > unrolled thread

[PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2015-10-15 19:00 +0200
Last post2015-10-17 01:50 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach Javier Martinez Canillas <javier@osg.samsung.com> - 2015-10-15 19:00 +0200
    [RFT PATCH v2 6/6] ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common Javier Martinez Canillas <javier@osg.samsung.com> - 2015-10-15 19:00 +0200
      Re: [RFT PATCH v2 6/6] ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common Tomeu Vizoso <tomeu.vizoso@collabora.com> - 2015-10-16 14:40 +0200
    Re: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and  eMMC in Snow and Peach Alim Akhtar <alim.akhtar@samsung.com> - 2015-10-16 13:50 +0200
      Re: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and  eMMC in Snow and Peach Javier Martinez Canillas <javier@osg.samsung.com> - 2015-10-16 15:50 +0200
        Re: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and  eMMC in Snow and Peach Kukjin Kim <kgene@kernel.org> - 2015-10-17 01:50 +0200

#1248012 — [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2015-10-15 19:00 +0200
Subject[PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach
Message-ID<qjU2K-3Ul-13@gated-at.bofh.it>
Hello,

The Exynos Chromebooks DTS don't use the correct card detection properties
since these were carried from the vendor tree that had a reason to do so.

There are two things that I noticed:

1) The Marvell WiFi SDIO is marked as broken-cd instead of non-removable:

This causes the device to be removed when the system enters into a suspend
state which leads to the following warning when the system is resumed:

[  181.944636] mmc2: error -2 during resume (card was removed?)

The rationale for using broken-cd is explained in downstream commit [0] and
was that using the non-removable property caused issues with the mwifiex
driver since the reset logic called the mmc_{remove,add}_host() functions.

But the reset logic in the mwifiex mainline driver has changed and this is
no longer the case so it's safe to use the non-removable property AFAICT.

2) The eMMC node has both broken-cd and non-removable but the MMC DT binding
doc (Documentation/devicetree/bindings/mmc/mmc.txt) mentions that only one
of these card detection properties should be used.

So this series change both the SDIO WiFi and eMMC device nodes in the Snow,
Peach Pi and Peach Pit boards DTS to use the non-removable property.

To test, I've cherry picked commit [1] from the vendor tree that adds a
debugfs entry to force a card reset and after the reset, the WiFi card still
works correctly:

$ echo 1 > /sys/kernel/debug/mwifiex/mlan0/reset

And also tested that both eMMC and WiFi are working correctly after a S2R.

The test were made on an Exynos5800 Peach Pi but I don't have access to a
Snow anymore so testing patch 3/6 and 6/6 on that board will be appreciated.

v1 of the series was [2] and this version fixes issues pointed out by Tomeu.

Changes since v1:
 - Replace broken-cd for non-removable in the correct mmc node for Snow.
 - Correct the card detetion properties for eMMC in Snow, Pit and Pi.
 - Also remove the card-detect-delay property when using non-removable.

[0]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ad348e1e2381
[1]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5995363523de
[2]: https://lkml.org/lkml/2015/10/15/294

Best regards,
Javier


Javier Martinez Canillas (6):
  ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi
  ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit
  ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common
  ARM: dts: Remove broken-cd from eMMC node in exynos5800-peach-pi
  ARM: dts: Remove broken-cd from eMMC node in exynos5420-peach-pi
  ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common

 arch/arm/boot/dts/exynos5250-snow-common.dtsi | 6 ++----
 arch/arm/boot/dts/exynos5420-peach-pit.dts    | 5 +----
 arch/arm/boot/dts/exynos5800-peach-pi.dts     | 5 +----
 3 files changed, 4 insertions(+), 12 deletions(-)

-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1248013 — [RFT PATCH v2 6/6] ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2015-10-15 19:00 +0200
Subject[RFT PATCH v2 6/6] ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common
Message-ID<qjU2L-3Ul-39@gated-at.bofh.it>
In reply to#1248012
The eMMC is non-removable so mark it using the non-removable DT
property to avoid having to redetect it after a suspend/resume.

Also remove the card-detect-delay property that is not needed with
non-removable.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

Changes since v1:
- None, new patch.

 arch/arm/boot/dts/exynos5250-snow-common.dtsi | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
index 1822c502a25a..5cb33ba5e296 100644
--- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
+++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
@@ -520,8 +520,7 @@
 &mmc_0 {
 	status = "okay";
 	num-slots = <1>;
-	broken-cd;
-	card-detect-delay = <200>;
+	non-removable;
 	samsung,dw-mshc-ciu-div = <3>;
 	samsung,dw-mshc-sdr-timing = <2 3>;
 	samsung,dw-mshc-ddr-timing = <1 2>;
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248706 — Re: [RFT PATCH v2 6/6] ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common

FromTomeu Vizoso <tomeu.vizoso@collabora.com>
Date2015-10-16 14:40 +0200
SubjectRe: [RFT PATCH v2 6/6] ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common
Message-ID<qkcsG-6ob-17@gated-at.bofh.it>
In reply to#1248013
On 15 October 2015 at 18:51, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> The eMMC is non-removable so mark it using the non-removable DT
> property to avoid having to redetect it after a suspend/resume.
>
> Also remove the card-detect-delay property that is not needed with
> non-removable.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Tested-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>

Thanks,

Tomeu

> ---
>
> Changes since v1:
> - None, new patch.
>
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> index 1822c502a25a..5cb33ba5e296 100644
> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> @@ -520,8 +520,7 @@
>  &mmc_0 {
>         status = "okay";
>         num-slots = <1>;
> -       broken-cd;
> -       card-detect-delay = <200>;
> +       non-removable;
>         samsung,dw-mshc-ciu-div = <3>;
>         samsung,dw-mshc-sdr-timing = <2 3>;
>         samsung,dw-mshc-ddr-timing = <1 2>;
> --
> 2.4.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248666 — Re: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach

FromAlim Akhtar <alim.akhtar@samsung.com>
Date2015-10-16 13:50 +0200
SubjectRe: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach
Message-ID<qkbGi-5bI-15@gated-at.bofh.it>
In reply to#1248012
Hi Javier,

On 10/15/2015 10:21 PM, Javier Martinez Canillas wrote:
> Hello,
>
> The Exynos Chromebooks DTS don't use the correct card detection properties
> since these were carried from the vendor tree that had a reason to do so.
>
> There are two things that I noticed:
>
> 1) The Marvell WiFi SDIO is marked as broken-cd instead of non-removable:
>
> This causes the device to be removed when the system enters into a suspend
> state which leads to the following warning when the system is resumed:
>
> [  181.944636] mmc2: error -2 during resume (card was removed?)
>
> The rationale for using broken-cd is explained in downstream commit [0] and
> was that using the non-removable property caused issues with the mwifiex
> driver since the reset logic called the mmc_{remove,add}_host() functions.
>
> But the reset logic in the mwifiex mainline driver has changed and this is
> no longer the case so it's safe to use the non-removable property AFAICT.
>
Good to know it is fixed now. This is fixed in firmware or in the driver?

> 2) The eMMC node has both broken-cd and non-removable but the MMC DT binding
> doc (Documentation/devicetree/bindings/mmc/mmc.txt) mentions that only one
> of these card detection properties should be used.
>
This change looks ok, will take a closer look once I am back to my work 
station.

> So this series change both the SDIO WiFi and eMMC device nodes in the Snow,
> Peach Pi and Peach Pit boards DTS to use the non-removable property.
>
> To test, I've cherry picked commit [1] from the vendor tree that adds a
> debugfs entry to force a card reset and after the reset, the WiFi card still
> works correctly:
>
> $ echo 1 > /sys/kernel/debug/mwifiex/mlan0/reset
>
> And also tested that both eMMC and WiFi are working correctly after a S2R.
>
> The test were made on an Exynos5800 Peach Pi but I don't have access to a
> Snow anymore so testing patch 3/6 and 6/6 on that board will be appreciated.
>
> v1 of the series was [2] and this version fixes issues pointed out by Tomeu.
>
> Changes since v1:
>   - Replace broken-cd for non-removable in the correct mmc node for Snow.
>   - Correct the card detetion properties for eMMC in Snow, Pit and Pi.
>   - Also remove the card-detect-delay property when using non-removable.
>
> [0]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ad348e1e2381
> [1]: https://chromium.googlesource.com/chromiumos/third_party/kernel/+/5995363523de
> [2]: https://lkml.org/lkml/2015/10/15/294
>
> Best regards,
> Javier
>
>
> Javier Martinez Canillas (6):
>    ARM: dts: Mark SDIO as non-removable in exynos5800-peach-pi
>    ARM: dts: Mark SDIO as non-removable in exynos5420-peach-pit
>    ARM: dts: Mark SDIO as non-removable in exynos5250-snow-common
>    ARM: dts: Remove broken-cd from eMMC node in exynos5800-peach-pi
>    ARM: dts: Remove broken-cd from eMMC node in exynos5420-peach-pi
>    ARM: dts: Mark eMMC as non-removable in exynos5250-snow-common
>
>   arch/arm/boot/dts/exynos5250-snow-common.dtsi | 6 ++----
>   arch/arm/boot/dts/exynos5420-peach-pit.dts    | 5 +----
>   arch/arm/boot/dts/exynos5800-peach-pi.dts     | 5 +----
>   3 files changed, 4 insertions(+), 12 deletions(-)
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1248769 — Re: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2015-10-16 15:50 +0200
SubjectRe: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach
Message-ID<qkdyp-7XP-7@gated-at.bofh.it>
In reply to#1248666
Hello Alim,

On 10/16/2015 01:37 PM, Alim Akhtar wrote:
> Hi Javier,
> 
> On 10/15/2015 10:21 PM, Javier Martinez Canillas wrote:
>> Hello,
>>
>> The Exynos Chromebooks DTS don't use the correct card detection properties
>> since these were carried from the vendor tree that had a reason to do so.
>>
>> There are two things that I noticed:
>>
>> 1) The Marvell WiFi SDIO is marked as broken-cd instead of non-removable:
>>
>> This causes the device to be removed when the system enters into a suspend
>> state which leads to the following warning when the system is resumed:
>>
>> [  181.944636] mmc2: error -2 during resume (card was removed?)
>>
>> The rationale for using broken-cd is explained in downstream commit [0] and
>> was that using the non-removable property caused issues with the mwifiex
>> driver since the reset logic called the mmc_{remove,add}_host() functions.
>>
>> But the reset logic in the mwifiex mainline driver has changed and this is
>> no longer the case so it's safe to use the non-removable property AFAICT.
>>
> Good to know it is fixed now. This is fixed in firmware or in the driver?
>

The fix is only in the driver. In fact, I'm using the same firmware from
the ChromeOS rootfs for both the v3.8 vendor tree and mainline.

So IIUC, the problem with the vendor tree was that the mwifiex SDIO driver
mwifiex_sdio_reset_work() function did a card reset by calling the functions
mmc_remove_host() and then mmc_add_host().

But this didn't play nice with MMC_CAP_NONREMOVABLE since mmc_rescan() just
returns if the flag is set so the card wouldn't be tried to be detected again.

After commit ("b4336a282db8 mwifiex: sdio: reset adapter using mmc_hw_reset"),
the card is reset by doing a power cycle so that's why "non-removable" can be
used now instead of "broken-cd".

>> 2) The eMMC node has both broken-cd and non-removable but the MMC DT binding
>> doc (Documentation/devicetree/bindings/mmc/mmc.txt) mentions that only one
>> of these card detection properties should be used.
>>
> This change looks ok, will take a closer look once I am back to my work station.
>

Thanks a lot for taking a look.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1249221 — Re: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach

FromKukjin Kim <kgene@kernel.org>
Date2015-10-17 01:50 +0200
SubjectRe: [PATCH v2 0/6] ARM: dts: Use correct CD properties for SDIO and eMMC in Snow and Peach
Message-ID<qkmV3-4R4-11@gated-at.bofh.it>
In reply to#1248769
On 10/16/15 22:48, Javier Martinez Canillas wrote:
> Hello Alim,
> 
> On 10/16/2015 01:37 PM, Alim Akhtar wrote:
>> Hi Javier,
>>
>> On 10/15/2015 10:21 PM, Javier Martinez Canillas wrote:
>>> Hello,
>>>
>>> The Exynos Chromebooks DTS don't use the correct card detection properties
>>> since these were carried from the vendor tree that had a reason to do so.
>>>
>>> There are two things that I noticed:
>>>
>>> 1) The Marvell WiFi SDIO is marked as broken-cd instead of non-removable:
>>>
>>> This causes the device to be removed when the system enters into a suspend
>>> state which leads to the following warning when the system is resumed:
>>>
>>> [  181.944636] mmc2: error -2 during resume (card was removed?)
>>>
>>> The rationale for using broken-cd is explained in downstream commit [0] and
>>> was that using the non-removable property caused issues with the mwifiex
>>> driver since the reset logic called the mmc_{remove,add}_host() functions.
>>>
>>> But the reset logic in the mwifiex mainline driver has changed and this is
>>> no longer the case so it's safe to use the non-removable property AFAICT.
>>>
>> Good to know it is fixed now. This is fixed in firmware or in the driver?
>>
> 
> The fix is only in the driver. In fact, I'm using the same firmware from
> the ChromeOS rootfs for both the v3.8 vendor tree and mainline.
> 
> So IIUC, the problem with the vendor tree was that the mwifiex SDIO driver
> mwifiex_sdio_reset_work() function did a card reset by calling the functions
> mmc_remove_host() and then mmc_add_host().
> 
> But this didn't play nice with MMC_CAP_NONREMOVABLE since mmc_rescan() just
> returns if the flag is set so the card wouldn't be tried to be detected again.
> 
> After commit ("b4336a282db8 mwifiex: sdio: reset adapter using mmc_hw_reset"),
> the card is reset by doing a power cycle so that's why "non-removable" can be
> used now instead of "broken-cd".
> 
>>> 2) The eMMC node has both broken-cd and non-removable but the MMC DT binding
>>> doc (Documentation/devicetree/bindings/mmc/mmc.txt) mentions that only one
>>> of these card detection properties should be used.
>>>
>> This change looks ok, will take a closer look once I am back to my work station.
>>
Actually, looks good to me +1.
Let me take this series once get the feedback from Alim.

Thanks,
Kukjin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web