Skip to content
Snippets Groups Projects
Commit 9868b142 authored by Axel Lin's avatar Axel Lin Committed by Sonic Zhang
Browse files

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: default avatarAxel Lin <axel.lin@ingics.com>
parent 2ced773a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment