mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-01 20:11:32 +00:00
gpio: sh-pfc: fix gpio input read
Fix gpio_read: gpio input (INDT) and gpio output (OUTDT) registers have different offset. gpio_read must be performed from INDT. Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
This commit is contained in:
parent
f875bbb491
commit
9035edbae9
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,8 @@ static int gpio_read_bit(struct pinmux_data_reg *dr,
|
||||||
debug("read_bit: addr = %lx, pos = %ld, "
|
debug("read_bit: addr = %lx, pos = %ld, "
|
||||||
"r_width = %ld\n", dr->reg, pos, dr->reg_width);
|
"r_width = %ld\n", dr->reg, pos, dr->reg_width);
|
||||||
|
|
||||||
return (gpio_read_raw_reg(dr->mapped_reg, dr->reg_width) >> pos) & 1;
|
return
|
||||||
|
(gpio_read_raw_reg(dr->mapped_reg + 0x4, dr->reg_width) >> pos) & 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gpio_write_bit(struct pinmux_data_reg *dr,
|
static void gpio_write_bit(struct pinmux_data_reg *dr,
|
||||||
|
|
Loading…
Add table
Reference in a new issue