]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
mmc: sdhci-of-aspeed: Fix clock divider calculation
authorEddie James <eajames@linux.ibm.com>
Thu, 9 Jul 2020 19:57:06 +0000 (14:57 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Sat, 8 Aug 2020 05:53:12 +0000 (01:53 -0400)
commitca625ebbb7a3c67f2c011525fb7b6709e0349e47
tree83a7dc0770e4ffe5e6e474086ed3cbff7261391b
parent5d7ee7fe03ae62260f801a64255c95e9ee093205
mmc: sdhci-of-aspeed: Fix clock divider calculation

BugLink: https://bugs.launchpad.net/bugs/1889669
commit ebd4050c6144b38098d8eed34df461e5e3fa82a9 upstream.

When calculating the clock divider, start dividing at 2 instead of 1.
The divider is divided by two at the end of the calculation, so starting
at 1 may result in a divider of 0, which shouldn't happen.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Acked-by: Joel Stanley <joel@jms.id.au>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20200709195706.12741-3-eajames@linux.ibm.com
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/mmc/host/sdhci-of-aspeed.c