]> git.dujemihanovic.xyz Git - u-boot.git/commit
blackfin: gpio: Use proper mask for comparing function
authorAxel Lin <axel.lin@ingics.com>
Fri, 28 Jun 2013 06:45:06 +0000 (14:45 +0800)
committerSonic Zhang <sonic.zhang@analog.com>
Wed, 31 Jul 2013 08:56:03 +0000 (16:56 +0800)
commit9868b1426315fc5ac4883b5267d5337b2dfcbd95
treeefbdc234058f9534633c840c00db8129f77b02d4
parent2ced773a1ac20de2bf3d642944eb8de028420573
blackfin: gpio: Use proper mask for comparing function

The function return from P_FUNCT2MUX(per) takes 2 bits, however
for BF537_FAMILY with offset != 1 the function is 1 bit.

Also has small refactor for better readability.
In portmux_setup(), it looks odd having "muxreg &= ~(3 << 1);"
while in current code we do muxreg |= (function << offset);.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
arch/blackfin/cpu/gpio.c