mmc: implement Driver Stage Register handling
Some eMMC and SD cards implement a DSR register that allows to tune raise/fall times and drive strength of the CMD and DATA outputs. The values to use depend on the card in use and the host. It might be needed to reduce the drive strength to prevent voltage peaks above the host's specification. Implement a 'dsr' devicetree property that allows to specify the value to set the DSR to. For non-dt setups the new members of mmc_host can be set by board code. This patch was initially authored by Sascha Hauer. It contains improvements authored by Markus Niebel and Uwe Kleine-König. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:

committed by
Ulf Hansson

parent
b315376573
commit
3d705d14fe
@@ -42,7 +42,8 @@ struct mmc_csd {
|
||||
unsigned int read_partial:1,
|
||||
read_misalign:1,
|
||||
write_partial:1,
|
||||
write_misalign:1;
|
||||
write_misalign:1,
|
||||
dsr_imp:1;
|
||||
};
|
||||
|
||||
struct mmc_ext_csd {
|
||||
|
@@ -365,6 +365,9 @@ struct mmc_host {
|
||||
|
||||
unsigned int slotno; /* used for sdio acpi binding */
|
||||
|
||||
int dsr_req; /* DSR value is valid */
|
||||
u32 dsr; /* optional driver stage (DSR) value */
|
||||
|
||||
unsigned long private[0] ____cacheline_aligned;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user