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 <ye.li@nxp.com>
This commit is contained in:
parent
9e406ea46a
commit
81154aed77
|
|
@ -40,11 +40,7 @@ struct mxc_bank_info {
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef CONFIG_DM_GPIO
|
#ifndef CONFIG_DM_GPIO
|
||||||
#if defined(CONFIG_IMX8)
|
|
||||||
#define GPIO_TO_PORT(n) ((n / 32) - 1)
|
|
||||||
#else
|
|
||||||
#define GPIO_TO_PORT(n) (n / 32)
|
#define GPIO_TO_PORT(n) (n / 32)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* GPIO port description */
|
/* GPIO port description */
|
||||||
static unsigned long gpio_ports[] = {
|
static unsigned long gpio_ports[] = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue