aboutsummaryrefslogtreecommitdiff
path: root/post/Makefile
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2018-11-15 22:01:33 +0100
committerMarek Vasut <marex@denx.de>2018-12-03 12:51:16 +0100
commited427dab2ece45fd8921353c74a32c543d9f31eb (patch)
treeceaf8eb2340f219a590f801145e5fe743ef01420 /post/Makefile
parent59d529afdc869b158ccf2b8c6e3b9bdb41becb8b (diff)
downloadu-boot-ed427dab2ece45fd8921353c74a32c543d9f31eb.zip
u-boot-ed427dab2ece45fd8921353c74a32c543d9f31eb.tar.gz
u-boot-ed427dab2ece45fd8921353c74a32c543d9f31eb.tar.bz2
mmc: tmio: Reorder TMIO clock handling
Reorder the tmio_sd_set_clk_rate() function such that it handles all of the clock requiests correctly. Specifically, before this patch, clock request with (mmc->clock == 0 && mmc->clk_disable) could leave the clock enabled, as the function would exit on if (!mmc->clock) condition on top and will not handle the mmc->clk_disable at all. Rather than band-aid fixing just that particular problem, reorder the entire function to make it easier to understand and verify that all the cases are covered. The function has three sections now: First, if mmc->clock != 0, we calculate divider for the SD block. Second, if mmc->clock != 0 and SD block clock are enabled and current divider is not equal to the new divider, then stop the clock and update the divider. Third, if mmc->clk_disable is set, disable the clock, otherwise enable the clock. This happens independently of divider update now. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'post/Makefile')
0 files changed, 0 insertions, 0 deletions