Skip to contentSkip to conversation

gpio: da8xx: Add k2g compatible

PATCH New Keerthy 2 participants 5 messages Oct 3, 2018 – Oct 11, 2018

Subsystems (4)
lore
Share & tools
lore

Keerthy

author
#0 lore raw

PATCH v2 1/2 gpio: da8xx: Add k2g compatible

Add k2g compatible so that k3 SoCs can be supported

---
 drivers/gpio/da8xx_gpio.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/da8xx_gpio.c +1 -0
index b0d49cb..494fc5f 100644
@@ -530,6 +530,7 @@ static int davinci_gpio_probe(struct udevice *dev)
 
 static const struct udevice_id davinci_gpio_ids[] = {
 	{ .compatible = "ti,dm6441-gpio" },
+	{ .compatible = "ti,k2g-gpio" },
 	{ }
 };
 
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v2 2/2 gpio: da8xx: Push generic defines of gpio.h out of mach-davinci

Push generic defines of gpio.h out of mach-davinci to drivers/gpio now that non-davinci architectures are beginning to use this IP.

---

Changes in v2:

* Corrected the SPDX format

 arch/arm/mach-davinci/include/mach/gpio.h | 32 ------------------------
 drivers/gpio/da8xx_gpio.c                 |  7 ++++--
 drivers/gpio/da8xx_gpio.h                 | 41 +++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 34 deletions(-)
 create mode 100644 drivers/gpio/da8xx_gpio.h
arch/arm/mach-davinci/include/mach/gpio.h +0 -32
index d4b25c3..3981978 100644
@@ -21,27 +21,6 @@
 #define DAVINCI_GPIO_BANK8	0x01E260B0
 #endif /* CONFIG_SOC_DA8XX */
 
-struct davinci_gpio {
-	unsigned int dir;
-	unsigned int out_data;
-	unsigned int set_data;
-	unsigned int clr_data;
-	unsigned int in_data;
-	unsigned int set_rising;
-	unsigned int clr_rising;
-	unsigned int set_falling;
-	unsigned int clr_falling;
-	unsigned int intstat;
-};
-
-struct davinci_gpio_bank {
-	int num_gpio;
-	unsigned int irq_num;
-	unsigned int irq_mask;
-	unsigned long *in_use;
-	struct davinci_gpio *base;
-};
-
 #define davinci_gpio_bank01 ((struct davinci_gpio *)DAVINCI_GPIO_BANK01)
 #define davinci_gpio_bank23 ((struct davinci_gpio *)DAVINCI_GPIO_BANK23)
 #define davinci_gpio_bank45 ((struct davinci_gpio *)DAVINCI_GPIO_BANK45)
@@ -61,18 +40,7 @@ struct davinci_gpio_bank {
 #define MAX_NUM_GPIOS		144
 #endif
 #define GPIO_BANK(gp)		(davinci_gpio_bank01 + ((gp) >> 5))
-#define GPIO_BIT(gp)		((gp) & 0x1F)
 
 void gpio_info(void);
 
-#ifdef CONFIG_DM_GPIO
-
-/* Information about a GPIO bank */
-struct davinci_gpio_platdata {
-	int bank_index;
-	ulong base;	/* address of registers in physical memory */
-	const char *port_name;
-};
-#endif
-
 #endif
drivers/gpio/da8xx_gpio.c +5 -2
index 494fc5f..bd79448 100644
@@ -11,11 +11,14 @@
 #include <fdtdec.h>
 #include <asm/io.h>
 #include <asm/gpio.h>
-#include <asm/arch/hardware.h>
-#include <asm/arch/davinci_misc.h>
 #include <dt-bindings/gpio/gpio.h>
 
+#include "da8xx_gpio.h"
+
 #ifndef CONFIG_DM_GPIO
+#include <asm/arch/hardware.h>
+#include <asm/arch/davinci_misc.h>
+
 static struct gpio_registry {
 	int is_registered;
 	char name[GPIO_NAME_SIZE];
drivers/gpio/da8xx_gpio.h new file +41 -0

41 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH v2 2/2 gpio: da8xx: Push generic defines of gpio.h out of mach-davinci

Quoted 4 lines · Keerthy

Push generic defines of gpio.h out of mach-davinci to drivers/gpio now that non-davinci architectures are beginning to use this IP.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181003/21a47d62/attachment.sig>
#3 lore raw

PATCH v2 2/2 gpio: da8xx: Push generic defines of gpio.h out of mach-davinci

In reply to Keerthy
Quoted 5 lines · Keerthy

Push generic defines of gpio.h out of mach-davinci to drivers/gpio now that non-davinci architectures are beginning to use this IP.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181011/010ab332/attachment.sig>
#4 lore raw

PATCH v2 1/2 gpio: da8xx: Add k2g compatible

In reply to Keerthy
Quoted 4 lines · Keerthy

Add k2g compatible so that k3 SoCs can be supported

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181011/11d8f17c/attachment.sig>