Update some comments; no functional changes. Some historical old comments
in this driver indicate that the SD_CAPA register is write-once and after being set one time the values in it cannot be changed. That turns out not to be the case -- the values written to it survive a reset, but they can be rewritten/changed at any time.
This commit is contained in:
parent
d436d6e96f
commit
caf894f793
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353653
@ -481,10 +481,10 @@ ti_sdhci_hw_init(device_t dev)
|
||||
/*
|
||||
* The attach() routine has examined fdt data and set flags in
|
||||
* slot.host.caps to reflect what voltages we can handle. Set those
|
||||
* values in the CAPA register. The manual says that these values can
|
||||
* only be set once, "before initialization" whatever that means, and
|
||||
* that they survive a reset. So maybe doing this will be a no-op if
|
||||
* u-boot has already initialized the hardware.
|
||||
* values in the CAPA register. Empirical testing shows that the
|
||||
* values in this register can be overwritten at any time, but the
|
||||
* manual says that these values should only be set once, "before
|
||||
* initialization" whatever that means, and that they survive a reset.
|
||||
*/
|
||||
regval = ti_mmchs_read_4(sc, MMCHS_SD_CAPA);
|
||||
if (sc->slot.host.caps & MMC_OCR_LOW_VOLTAGE)
|
||||
@ -528,8 +528,7 @@ ti_sdhci_attach(device_t dev)
|
||||
* device, and only 1p8v on other devices unless an external transceiver
|
||||
* is used. The only way we could know about a transceiver is fdt data.
|
||||
* Note that we have to do this before calling ti_sdhci_hw_init() so
|
||||
* that it can set the right values in the CAPA register, which can only
|
||||
* be done once and never reset.
|
||||
* that it can set the right values in the CAPA register.
|
||||
*/
|
||||
sc->slot.host.caps |= MMC_OCR_LOW_VOLTAGE;
|
||||
if (sc->mmchs_clk_id == MMC1_CLK || OF_hasprop(node, "ti,dual-volt")) {
|
||||
|
Loading…
Reference in New Issue
Block a user