diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2019-10-04 15:32:06 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2020-01-08 13:35:12 +0100 |
commit | 3c64ed74d619c25c65abb1fcafcb1aff835867d5 (patch) | |
tree | ae8772eeac8e186dbc916dcfef04a2fae3fc77b1 /drivers/clk/meson/meson-eeclk.h | |
parent | 366486e0afaa115ec456db124fc07d824a1c1fb1 (diff) |
pwm: mxs: Avoid a division in mxs_pwm_apply()
Since the divisor is not a compile-time constant (unless gcc somehow
decided to unroll the loop PERIOD_CDIV_MAX times), this does a
somewhat expensive 32/32 division. Replace that with a right shift.
We still have a 64/32 division just below, but at least in that
case the divisor is compile-time constant.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/clk/meson/meson-eeclk.h')
0 files changed, 0 insertions, 0 deletions