diff options
author | Julius Werner <jwerner@chromium.org> | 2016-09-01 22:55:58 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-10-04 21:17:37 +0200 |
commit | 2768a119ce08893975f3bf6788fd31c7071e7c9a (patch) | |
tree | 3b5d3de92e514a0c2beb7efda9e4bc07414e47dc /src/soc/rockchip/rk3288 | |
parent | 1eb69b4a64b0bd96aa57b0e793667dd36d10ff17 (diff) | |
download | coreboot-2768a119ce08893975f3bf6788fd31c7071e7c9a.tar.xz |
rockchip: Remove pulls for gpio_output(), clean up code
Output GPIOs should never have a pull-up or pull-down resistor attached
since they're actively driven. Since some GPIOs get initialized with a
pull at power-on reset, we should explicitly overwrite that setting.
Most other platforms do this on gpio_output, but Rockchip hadn't yet.
Also, shuffle some code around to make things cleaner and allow for
easier code reuse.
BRANCH=None
BUG=chrome-os-partner:52526
TEST=Booted Kevin.
Change-Id: I1425d074ea1e90f4484e1e84a8002b057192c5f7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: df5b236bfd58b172435043c1cb792b917a4ec4ab
Original-Change-Id: I044266d71ef8bd0518316ff72d829d1ca1e30f35
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/382531
Original-Reviewed-by: Simon Glass <sjg@google.com>
Reviewed-on: https://review.coreboot.org/16710
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/rockchip/rk3288')
-rw-r--r-- | src/soc/rockchip/rk3288/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/rockchip/rk3288/gpio.c b/src/soc/rockchip/rk3288/gpio.c index c6104087e4..41056f8937 100644 --- a/src/soc/rockchip/rk3288/gpio.c +++ b/src/soc/rockchip/rk3288/gpio.c @@ -51,7 +51,7 @@ void *gpio_grf_reg(gpio_t gpio) return &rk3288_grf->gpio1_p[(gpio.port - 1)][gpio.bank]; } -u32 gpio_get_pull_val(gpio_t gpio, u32 pull) +u32 gpio_get_pull_val(gpio_t gpio, enum gpio_pull pull) { /* use the default gpio pull bias setting defined in soc/gpio.h */ return pull; |