]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: renesas_sdhi: refactor calculation of best TAP
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 8 Apr 2020 09:46:36 +0000 (11:46 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 28 May 2020 09:20:57 +0000 (11:20 +0200)
commitd560b38880b5e930b8dd107dd6ecfa204e9f76e8
treeacb992bb8becbd78a0df9d3841879603e1c3ef52
parent96dc6eafd827e5e94ef8ce12fde93fda8cd4d53e
mmc: renesas_sdhi: refactor calculation of best TAP

To select the best TAP, we need to find the longest stream of set bits
in a bit field. There is now a helper function for bitmaps which
iterates over all region of set bits. Using it makes the code much more
concise and easier to understand. Double so, because we need to handle
two bitmaps in the near future. Remove a superfluous comment while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20200408094638.10375-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_core.c