From 81154aed77d78140a2a18555f6e3acebb8a86377 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Wed, 26 Dec 2018 00:48:26 -0800 Subject: [PATCH] MLK-20655-1 mxc_gpio: Fix non-DM driver issue for iMX8 platforms The port index is not calculated correctly. It should not be descreased, because the gpio number is from 0 on imx8 platform. Otherwise we will access wrong registers. Signed-off-by: Ye Li --- drivers/gpio/mxc_gpio.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 3b163cb47a..2353b50b2a 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -40,11 +40,7 @@ struct mxc_bank_info { }; #ifndef CONFIG_DM_GPIO -#if defined(CONFIG_IMX8) -#define GPIO_TO_PORT(n) ((n / 32) - 1) -#else #define GPIO_TO_PORT(n) (n / 32) -#endif /* GPIO port description */ static unsigned long gpio_ports[] = {