Re: [PATCH] mmc: sdio: reset card during power_restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9 June 2011 16:59, Ohad Ben-Cohen <ohad@xxxxxxxxxx> wrote:
> Now can you please repeat this, but this time add your original patch
> (which only added the CMD5 arg=0 cmd, no sdio reset yet) ?

With this version of the patch:
http://dev.laptop.org/~dsd/20110609/sd-pwr-debug2.patch

bash-4.1# mount -t debugfs none /sys/kernel/debug
bash-4.1# cat /sys/kernel/debug/mmc1/ios
clock:		0 Hz
vdd:		0 (invalid)
bus mode:	1 (open drain)
chip select:	0 (don't care)
power mode:	0 (off)
bus width:	0 (1 bits)
timing spec:	0 (legacy)
bash-4.1#
bash-4.1# insmod /media/4E11-1D7C/libertas_sdio.ko
[   53.917466] libertas_sdio: Libertas SDIO driver
[   53.922718] libertas_sdio: Copyright Pierre Ossman
[   54.839032] libertas_sdio mmc1:0001:1: (unregistered net_device):
00:17:c4:a7:50:57, fw 9.70.3p36, cap 0x000003a3
[   54.855479] libertas_sdio mmc1:0001:1: wlan0: Marvell WLAN 802.11 adapter
bash-4.1# [   54.941099] udev[985]: renamed network interface wlan0 to eth0
[   54.997656] ieee80211 phy0: assoc: bss   (null) not in scan results
[   56.310846] ieee80211 phy0: assoc: bss   (null) not in scan results
[   56.360840] cfg80211: Calling CRDA for country: EU

bash-4.1#
bash-4.1# cat /sys/kernel/debug/mmc1/ios
clock:		25000000 Hz
vdd:		20 (3.2 ~ 3.3 V)
bus mode:	2 (push-pull)
chip select:	0 (don't care)
power mode:	2 (on)
bus width:	2 (4 bits)
timing spec:	0 (legacy)

Full log: http://dev.laptop.org/~dsd/20110609/sd-pwr-debug2.txt

Note that the patch includes the mmc_select_voltage() call that I was
originally unsure about, and later did decide that equivalent code was
already being called elsewhere, thats why it was removed from the most
recent revision of the patch.



With a version of the patch that just does the reset, the post-powerup
"vdd" figure does change:
http://dev.laptop.org/~dsd/20110609/sd-pwr-debug3.patch

bash-4.1# cat /sys/kernel/debug/mmc1/ios
clock:		0 Hz
vdd:		0 (invalid)
bus mode:	1 (open drain)
chip select:	0 (don't care)
power mode:	0 (off)
bus width:	0 (1 bits)
timing spec:	0 (legacy)
bash-4.1#
bash-4.1# insmod /media/4E11-1D7C/libertas_sdio.ko
[   64.947624] libertas_sdio: Libertas SDIO driver
[   64.952866] libertas_sdio: Copyright Pierre Ossman
[   65.878171] libertas_sdio mmc1:0001:1: (unregistered net_device):
00:17:c4:a7:50:57, fw 9.70.3p36, cap 0x000003a3
[   65.896642] libertas_sdio mmc1:0001:1: wlan0: Marvell WLAN 802.11 adapter
bash-4.1# [   65.991205] udev[984]: renamed network interface wlan0 to eth0
[   66.048887] ieee80211 phy0: assoc: bss   (null) not in scan results
[   67.373572] ieee80211 phy0: assoc: bss   (null) not in scan results
[   67.423422] cfg80211: Calling CRDA for country: EU

bash-4.1# cat /sys/kernel/debug/mmc1/ios
clock:		25000000 Hz
vdd:		21 (3.3 ~ 3.4 V)
bus mode:	2 (push-pull)
chip select:	0 (don't care)
power mode:	2 (on)
bus width:	2 (4 bits)
timing spec:	0 (legacy)

Full log: http://dev.laptop.org/~dsd/20110609/sd-pwr-debug3.txt



For reference, here is the equivalent test performed without runtime
PM enabled (i.e. all changes reverted)

bash-4.1# mount -t debugfs none /sys/kernel/debug
bash-4.1# cat /sys/kernel/debug/mmc1/ios
clock:		25000000 Hz
vdd:		20 (3.2 ~ 3.3 V)
bus mode:	2 (push-pull)
chip select:	0 (don't care)
power mode:	2 (on)
bus width:	2 (4 bits)
timing spec:	0 (legacy)
bash-4.1#
bash-4.1# insmod /media/4E11-1D7C/libertas_sdio.ko
[   69.067761] libertas_sdio: Libertas SDIO driver
[   69.072995] libertas_sdio: Copyright Pierre Ossman
[   69.919033] libertas_sdio mmc1:0001:1: (unregistered net_device):
00:17:c4:a7:50:57, fw 9.70.3p36, cap 0x000003a3
[   69.935429] libertas_sdio mmc1:0001:1: wlan0: Marvell WLAN 802.11 adapter
[   70.021111] udev[991]: renamed network interface wlan0 to eth0
[   70.075870] ieee80211 phy0: assoc: bss   (null) not in scan results
[   71.460776] ieee80211 phy0: assoc: bss   (null) not in scan results
[   71.509660] cfg80211: Calling CRDA for country: EU
bash-4.1# cat /sys/kernel/debug/mmc1/ios
clock:		25000000 Hz
vdd:		20 (3.2 ~ 3.3 V)
bus mode:	2 (push-pull)
chip select:	0 (don't care)
power mode:	2 (on)
bus width:	2 (4 bits)
timing spec:	0 (legacy)

Full log: http://dev.laptop.org/~dsd/20110609/sd-pwr-debug0.txt


What next?

Thanks,
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux