All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: atmel_pio4: add support for PIO_PORTE on sama7g5
@ 2022-06-14 12:05 Eugen Hristev
  2022-06-30 12:52 ` Eugen.Hristev
  0 siblings, 1 reply; 2+ messages in thread
From: Eugen Hristev @ 2022-06-14 12:05 UTC (permalink / raw)
  To: u-boot; +Cc: eugen.hristev, Mihai Sain

From: Mihai Sain <mihai.sain@microchip.com>

Add support for gpio PORT E on sama7g5 soc.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
---
 arch/arm/mach-at91/include/mach/atmel_pio4.h | 1 +
 drivers/gpio/atmel_pio4.c                    | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/arch/arm/mach-at91/include/mach/atmel_pio4.h b/arch/arm/mach-at91/include/mach/atmel_pio4.h
index c3bd9140df..b712be8051 100644
--- a/arch/arm/mach-at91/include/mach/atmel_pio4.h
+++ b/arch/arm/mach-at91/include/mach/atmel_pio4.h
@@ -74,6 +74,7 @@ struct atmel_pio4_port {
 #define AT91_PIO_PORTB		0x1
 #define AT91_PIO_PORTC		0x2
 #define AT91_PIO_PORTD		0x3
+#define AT91_PIO_PORTE		0x4
 
 int atmel_pio4_set_gpio(u32 port, u32 pin, u32 config);
 int atmel_pio4_set_a_periph(u32 port, u32 pin, u32 config);
diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c
index bea609db9d..77a76c1d50 100644
--- a/drivers/gpio/atmel_pio4.c
+++ b/drivers/gpio/atmel_pio4.c
@@ -36,6 +36,11 @@ static struct atmel_pio4_port *atmel_pio4_port_base(u32 port)
 	case AT91_PIO_PORTD:
 		base = (struct atmel_pio4_port *)ATMEL_BASE_PIOD;
 		break;
+#if (ATMEL_PIO_PORTS > 4)
+	case AT91_PIO_PORTE:
+		base = (struct atmel_pio4_port *)ATMEL_BASE_PIOE;
+		break;
+#endif
 	default:
 		printf("Error: Atmel PIO4: Failed to get PIO base of port#%d!\n",
 		       port);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpio: atmel_pio4: add support for PIO_PORTE on sama7g5
  2022-06-14 12:05 [PATCH] gpio: atmel_pio4: add support for PIO_PORTE on sama7g5 Eugen Hristev
@ 2022-06-30 12:52 ` Eugen.Hristev
  0 siblings, 0 replies; 2+ messages in thread
From: Eugen.Hristev @ 2022-06-30 12:52 UTC (permalink / raw)
  To: u-boot, Mihai.Sain

On 6/14/22 3:05 PM, Eugen Hristev wrote:
> From: Mihai Sain <mihai.sain@microchip.com>
> 
> Add support for gpio PORT E on sama7g5 soc.
> 
> Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
> ---

Applied to u-boot-at91/next with minor commit message edit. Thanks !


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-30 12:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-14 12:05 [PATCH] gpio: atmel_pio4: add support for PIO_PORTE on sama7g5 Eugen Hristev
2022-06-30 12:52 ` Eugen.Hristev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.