All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] am33xx/am43xx: Add platform data for GPIOs
@ 2016-01-05 17:17 Tom Rini
  2016-01-09  3:35 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2016-01-05 17:17 UTC (permalink / raw)
  To: u-boot

On these platforms we have many cases of boards that enable device model
and GPIO support but do not enable OF_CONTROL and pass in a device tree
with the binary.  We need to bring in the platform data here as well.

Tested on Beaglebone Black.

Reported-by: Robert Nelson <robertcnelson@gmail.com>
Reported-by: Francisco Aguerre <franciscoaguerre@gmail.com>
Reported-by: Jason Kridner <jkridner@beagleboard.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 arch/arm/cpu/armv7/am33xx/board.c |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c
index 466348f..e8d5be3 100644
--- a/arch/arm/cpu/armv7/am33xx/board.c
+++ b/arch/arm/cpu/armv7/am33xx/board.c
@@ -64,8 +64,31 @@ U_BOOT_DEVICES(am33xx_uarts) = {
 #   endif
 #  endif
 };
+
+#ifdef CONFIG_DM_GPIO
+static const struct omap_gpio_platdata am33xx_gpio[] = {
+	{ 0, AM33XX_GPIO0_BASE },
+	{ 1, AM33XX_GPIO1_BASE },
+	{ 2, AM33XX_GPIO2_BASE },
+	{ 3, AM33XX_GPIO3_BASE },
+#ifdef CONFIG_AM43XX
+	{ 4, AM33XX_GPIO4_BASE },
+	{ 5, AM33XX_GPIO5_BASE },
 #endif
+};
 
+U_BOOT_DEVICES(am33xx_gpios) = {
+	{ "gpio_omap", &am33xx_gpio[0] },
+	{ "gpio_omap", &am33xx_gpio[1] },
+	{ "gpio_omap", &am33xx_gpio[2] },
+	{ "gpio_omap", &am33xx_gpio[3] },
+#ifdef CONFIG_AM43XX
+	{ "gpio_omap", &am33xx_gpio[4] },
+	{ "gpio_omap", &am33xx_gpio[5] },
+#endif
+};
+#endif
+#endif
 
 #ifndef CONFIG_DM_GPIO
 static const struct gpio_bank gpio_bank_am33xx[] = {
-- 
1.7.9.5

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

* [U-Boot] am33xx/am43xx: Add platform data for GPIOs
  2016-01-05 17:17 [U-Boot] [PATCH] am33xx/am43xx: Add platform data for GPIOs Tom Rini
@ 2016-01-09  3:35 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2016-01-09  3:35 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 05, 2016 at 12:17:15PM -0500, Tom Rini wrote:

> On these platforms we have many cases of boards that enable device model
> and GPIO support but do not enable OF_CONTROL and pass in a device tree
> with the binary.  We need to bring in the platform data here as well.
> 
> Tested on Beaglebone Black.
> 
> Reported-by: Robert Nelson <robertcnelson@gmail.com>
> Reported-by: Francisco Aguerre <franciscoaguerre@gmail.com>
> Reported-by: Jason Kridner <jkridner@beagleboard.org>
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160108/0b46d58d/attachment.sig>

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

end of thread, other threads:[~2016-01-09  3:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 17:17 [U-Boot] [PATCH] am33xx/am43xx: Add platform data for GPIOs Tom Rini
2016-01-09  3:35 ` [U-Boot] " Tom Rini

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.