Re: [PATCHv2 2/3] MMC: OMAP: HSMMC: add runtime pm support

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

 



+Rajendra

Balaji T K <balajitk@xxxxxx> writes:

> add runtime pm support to HSMMC host controller
> Use runtime pm API to enable/disable HSMMC clock
> Use runtime autosuspend APIs to enable auto suspend delay
>
> Based on OMAP HSMMC runtime implementation by Kevin Hilman, Kishore Kadiyala
>
> Signed-off-by: Balaji T K <balajitk@xxxxxx>

I tried to test this series along with Benoit's clkdm/modulemode/hwmod
cleanups and something strange is happening on OMAP4.

First, this series by itself is working as I would expect, but testing
in combination with Benoit's series, it's different...

First, I'm using Benoit's branch:

       git://gitorious.org/omap-pm/linux.git for_3.0.1/7_hwmod_modulemode

in combination with your series.

I've also reverted these two commits:

   OMAP4: PM: TEMP: Prevent l3init from idling/force sleep
   OMAP3+: hwmod data: TEMP: Do not idle MMC1 & MMC2 after boot

which are temporary workarounds for not having MMC runtime PM.

I turned the dev_dbg calls in the runtime PM callbacks into dev_info
callbacks to see exactly when the device is enabled/disabled via runtime
PM.

To my surprise, I didn't see the device being enabled/disabled when
writing do the device.

First, I mounted:

root@foo:~# mount /dev/mmcblk0p2 /media/mmc2
[  730.392944] omap_hsmmc omap_hsmmc.0: host: enabled
[  730.445831] EXT3-fs: barriers not enabled
[  730.453124] kjournald starting.  Commit interval 5 seconds
[  730.459045] EXT3-fs (mmcblk0p2): warning: maximal mount count reached, runnid
[  730.474731] EXT3-fs (mmcblk0p2): using internal journal
[  730.480316] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode
[  730.522613] omap_hsmmc omap_hsmmc.0: disabled                                

As expected, the device is enabled for mount, and soon disabled
(presumably after the autosuspend timeout.)

Then, I cd'd to the card:

root@foo:~# cd /media/mmc2/tmp                                                
[  744.350921] omap_hsmmc omap_hsmmc.0: host: enabled                           
[  744.413238] omap_hsmmc omap_hsmmc.0: disabled    

and see a brief enable/disable, probably to get the directory contents.

Now the strange part.  I wrote a chunk of random data to the device,
but didn't see any enable/disable activity until the unmount.  Not even
after I did a sync.

root@foo:/media/mmc2/tmp# dd if=/dev/urandom of=rand.bin bs=1M count=4        
4+0 records in                                                                  
4+0 records out                                                                 
4194304 bytes (4.2 MB) copied, 9.91346 s, 423 kB/s                              
root@foo:/media/mmc2/tmp# sync                                                
root@foo:/media/mmc2/tmp# cd                                                  
root@foo:~# umount /media/mmc2                                                
[ 1026.711578] omap_hsmmc omap_hsmmc.0: host: enabled                           
[ 1026.772918] omap_hsmmc omap_hsmmc.0: disabled                                
root@foo:~# 


Using this series standalone I see a few enable/disable cycles during
the write, presumably as the MMC core buffers and bursts writes.

Any ideas why the same isn't happening when used with Benoit's series?

Kevin

P.S. note that the debug messages don't quite match.  One says 'host:
enabled' the other says 'disabled' (without the host: prefix.)  making
the prefixes match would be more readable.

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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux