diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-10-20 16:08:12 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-10-25 11:25:40 +0200 |
commit | b3222f7147e028d31f965f193b6f995147c64651 (patch) | |
tree | 7f75b5c93892bc59543fed5adcc53e38da6fc502 /drivers/clk/clk-xgene.c | |
parent | d74423687f9d70417bfec68121cbd35f79bb170f (diff) |
gpio: mpc8xxx: Do not reverse bits using bgpio
The MPC8xxx driver is always instantiating its generic GPIO functions
with the flag BGPIOF_BIG_ENDIAN. This means "big-endian bit order"
and means the bits representing the GPIO lines in the registers are
reversed around 31 bits so line 0 is at bit 31 and so forth down to
line 31 in bit 0.
Instead of looping into the generic MMIO gpio to do the simple
calculation of a bitmask, through a vtable call with two parameters
likely using stack frames etc (unless the compiler optimize it)
and obscuring the view for the programmer, let's just open-code
what the call does. This likely executes faster, saves space and
makes the code easier to read.
Cc: Liu Gang <Gang.Liu@nxp.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/clk/clk-xgene.c')
0 files changed, 0 insertions, 0 deletions