]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r338261, r338512
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 13 Sep 2018 09:20:07 +0000 (09:20 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 13 Sep 2018 09:20:07 +0000 (09:20 +0000)
commit0bbf6f46ebc63a117fcf7db2ab4fe98172f7d59a
treea12014d2ca9c8490811a551ef77af572ee3f165e
parentf75d7b581aa31589d6e255aeb14f163dc8b2bc6a
MFC: r338261, r338512

- According to section 2.2.5 of the SDHCI specification version 4.20,
  SDHCI_TRNS_ACMD12 is to be set only for multiple-block read/write
  commands without data length information, so don't unconditionally
  set this bit. The result matches what e. g. Linux does.
- Section 2.2.19 of the SDHCI specification version 4.20 states that
  SDHCI_ACMD12_ERR should be only valid if SDHCI_INT_ACMD12ERR is set
  and hardware may clear SDHCI_ACMD12_ERR when SDHCI_INT_ACMD12ERR is
  cleared (differing silicon behavior is specifically allowed, though).
  Thus, read SDHCI_ACMD12_ERR before clearing SDHCI_INT_ACMD12ERR.
  While at it, use the 16-bit accessor rather than the 32-bit one for
  reading the 16-bit SDHCI_ACMD12_ERR.
- SDHCI_INT_TUNEERR isn't one of the ROC bits in SDHCI_INT_STATUS so
  clear it explicitly.
- Add missing prototypes and sort them.
- Explicitly compare a pointer to NULL. The __builtin_expect() of clang
  3.4.1 otherwise isn't able to cope with the expression.

git-svn-id: svn://svn.freebsd.org/base/stable/10@338634 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/sdhci/sdhci.c