[U-Boot] [PATCH V5 25/31] gpio: mxc: add i.MX8M support
Stefano Babic
sbabic at denx.de
Sun Jan 21 16:33:58 UTC 2018
On 10/01/2018 06:20, Peng Fan wrote:
> Add i.MX8M GPIO support.
> There are 4 GPIO banks on i.MX8M.
>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> Reviewed-by: Fabio Estevam <fabio.estevam at nxp.com>
> Cc: Stefano Babic <sbabic at denx.de>
> ---
> drivers/gpio/mxc_gpio.c | 22 +++++++++++++++-------
> 1 file changed, 15 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
> index cfa620bceb..d0e365a54b 100644
> --- a/drivers/gpio/mxc_gpio.c
> +++ b/drivers/gpio/mxc_gpio.c
> @@ -41,13 +41,13 @@ static unsigned long gpio_ports[] = {
> [2] = GPIO3_BASE_ADDR,
> #if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX51) || \
> defined(CONFIG_MX53) || defined(CONFIG_MX6) || \
> - defined(CONFIG_MX7)
> + defined(CONFIG_MX7) || defined(CONFIG_MX8M)
> [3] = GPIO4_BASE_ADDR,
> #endif
> #if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6) || \
> - defined(CONFIG_MX7)
> + defined(CONFIG_MX7) || defined(CONFIG_MX8M)
> [4] = GPIO5_BASE_ADDR,
> -#if !(defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
> +#if !(defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) || defined(CONFIG_MX8M))
> [5] = GPIO6_BASE_ADDR,
> #endif
> #endif
> @@ -349,13 +349,17 @@ static const struct mxc_gpio_plat mxc_plat[] = {
> { 1, (struct gpio_regs *)GPIO2_BASE_ADDR },
> { 2, (struct gpio_regs *)GPIO3_BASE_ADDR },
> #if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX51) || \
> - defined(CONFIG_MX53) || defined(CONFIG_MX6)
> + defined(CONFIG_MX53) || defined(CONFIG_MX6) || \
> + defined(CONFIG_MX8M)
> { 3, (struct gpio_regs *)GPIO4_BASE_ADDR },
> #endif
> -#if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6)
> +#if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6) || \
> + defined(CONFIG_MX8M)
> { 4, (struct gpio_regs *)GPIO5_BASE_ADDR },
> +#ifndef CONFIG_MX8M
> { 5, (struct gpio_regs *)GPIO6_BASE_ADDR },
> #endif
> +#endif
> #if defined(CONFIG_MX53) || defined(CONFIG_MX6)
> { 6, (struct gpio_regs *)GPIO7_BASE_ADDR },
> #endif
> @@ -366,13 +370,17 @@ U_BOOT_DEVICES(mxc_gpios) = {
> { "gpio_mxc", &mxc_plat[1] },
> { "gpio_mxc", &mxc_plat[2] },
> #if defined(CONFIG_MX25) || defined(CONFIG_MX27) || defined(CONFIG_MX51) || \
> - defined(CONFIG_MX53) || defined(CONFIG_MX6)
> + defined(CONFIG_MX53) || defined(CONFIG_MX6) || \
> + defined(CONFIG_MX8M)
> { "gpio_mxc", &mxc_plat[3] },
> #endif
> -#if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6)
> +#if defined(CONFIG_MX27) || defined(CONFIG_MX53) || defined(CONFIG_MX6) || \
> + defined(CONFIG_MX8M)
> { "gpio_mxc", &mxc_plat[4] },
> +#ifndef CONFIG_MX8M
> { "gpio_mxc", &mxc_plat[5] },
> #endif
> +#endif
> #if defined(CONFIG_MX53) || defined(CONFIG_MX6)
> { "gpio_mxc", &mxc_plat[6] },
> #endif
>
Reviewed-by: Stefano Babic <sbabic at denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
More information about the U-Boot
mailing list