diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-08-23 13:44:20 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-10-08 11:40:43 +0200 |
commit | db4cea918e11d1cd1cb870049b2af17fe99d7b94 (patch) | |
tree | d67c3b45621792fcd0a7e3c8a8680d49867d4f73 /drivers/fpga/xilinx-spi.c | |
parent | 68f83127fe750c8b270361f4353cc9d76b0286d6 (diff) |
mmc: tmio: refactor CLK_CTL bit calculation
for (clk = 0x80000080; new_clock >= (clock << 1); clk >>= 1)
clock <<= 1;
... is too tricky, hence I replaced with
roundup_pow_of_two(divisor) >> 2
'(clk >> 22) & 0x1' is the bit test for the 1/1 divisor, but
it is not clear. 'divisor <= 1' is easier to understand.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
0 files changed, 0 insertions, 0 deletions