rockchip: gpio: Correct rk3399 pmu gpio pull setting

Starting with RK3399, PMUGPIO pull registers use the same write mask
format as normal GRF registers, so they need to use RK_CLRSETBITS()
rather than clrsetbits_le32().

BRANCH=None
BUG=None
TEST=boot from scarlet

Change-Id: Ibe391273d58ab35df993e149187d67497fcf2acc
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://review.coreboot.org/20871
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Lin Huang 2017-08-03 14:51:41 +08:00 committed by Martin Roth
parent 589474fec7
commit 7c5eb073e7
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ static void gpio_set_dir(gpio_t gpio, enum gpio_dir dir)
static void gpio_set_pull(gpio_t gpio, enum gpio_pull pull)
{
u32 pull_val = gpio_get_pull_val(gpio, pull);
if (is_pmu_gpio(gpio))
if (is_pmu_gpio(gpio) && IS_ENABLED(CONFIG_SOC_ROCKCHIP_RK3288))
clrsetbits_le32(gpio_grf_reg(gpio), 3 << (gpio.idx * 2),
pull_val << (gpio.idx * 2));
else