]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sd: add support for uhs bus speed mode selection
authorArindam Nath <arindam.nath@amd.com>
Thu, 5 May 2011 06:49:01 +0000 (12:19 +0530)
committerChris Ball <cjb@laptop.org>
Wed, 25 May 2011 03:53:45 +0000 (23:53 -0400)
commitde03d902d55099fe6244452507fdfe99d0b4974a
treed8088bf8fb1a011f05ebbdefef49f2a6f4739432
parentd2eb4eec6ca7def14d93a9a9438345b9b379f837
mmc: sd: add support for uhs bus speed mode selection

This patch adds support for setting UHS-I bus speed mode during UHS-I
initialization procedure. Since both the host and card can support
more than one bus speed, we select the highest speed based on both of
their capabilities. First we set the bus speed mode for the card using
CMD6 mode 1, and then we program the host controller to support the
required speed mode. We also set High Speed Enable in case one of the
UHS-I modes is selected. We take care to reset SD clock before setting
UHS mode in the Host Control2 register, and then re-enable it as per
the Host Controller spec v3.00. We then set the clock frequency for
the UHS-I mode selected.

Tested by Zhangfei Gao with a Toshiba uhs card and general hs card,
on mmp2 in SDMA mode.

Signed-off-by: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Philip Rakity <prakity@marvell.com>
Tested-by: Philip Rakity <prakity@marvell.com>
Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/sd.c
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h
include/linux/mmc/card.h
include/linux/mmc/host.h