Author: ian
Date: Wed Oct 16 16:26:35 2019
New Revision: 353653
URL: https://svnweb.freebsd.org/changeset/base/353653

Log:
  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.

Modified:
  head/sys/arm/ti/ti_sdhci.c

Modified: head/sys/arm/ti/ti_sdhci.c
==============================================================================
--- head/sys/arm/ti/ti_sdhci.c  Wed Oct 16 16:19:21 2019        (r353652)
+++ head/sys/arm/ti/ti_sdhci.c  Wed Oct 16 16:26:35 2019        (r353653)
@@ -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")) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to