From 7c5eb073e784a334d295bc533c07df827e47839e Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Thu, 3 Aug 2017 14:51:41 +0800 Subject: 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 Reviewed-on: https://review.coreboot.org/20871 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Julius Werner --- src/soc/rockchip/common/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/soc/rockchip/common/gpio.c b/src/soc/rockchip/common/gpio.c index 952500974e..1d87cf814d 100644 --- a/src/soc/rockchip/common/gpio.c +++ b/src/soc/rockchip/common/gpio.c @@ -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 -- cgit v1.2.3