All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom)
@ 2011-09-05 20:28 Sanjeev Premi
  2011-09-05 20:28 ` [U-Boot] [PATCH 1/3] omap: gpio: Use generic API Sanjeev Premi
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Sanjeev Premi @ 2011-09-05 20:28 UTC (permalink / raw)
  To: u-boot

The OMAP boards use a custom api for GPIO operations. While
it works, it doesn't help when when we don't know existence
of the customization.

I earlier encountered the problem when looking for GPIO
related changes when submitting prev set of patches. Since
the search for gpio_request() in omap sources returned empty,
I had assumed that it isn't supported.

This patchset aims to use generic API instead of custom one.
After making the API level changes, most of the board specific
files were updated via this bash script (to minimize errors).

  [script]
  list=search.lst

  [ -f ${list} ] && \rm -rf ${list}

  grep -l -R "omap_.*_gpio" . > ${list}

  sed -i '/\.sh$/d'    ${list}	# Protect this script

  sed -i '/\.o$/d'     ${list}	# Object files
  sed -i '/\.orig$/d'  ${list}	# ongoing merge
  sed -i '/\.rej$/d'   ${list}	# ongoing merge

  sed -i '/\.git/d'    ${list}	# git packs
  sed -i '/patch/d'    ${list}	# patches
  sed -i '/diff/d'     ${list}	# saved diffs
  sed -i '/save/d'     ${list}	# any specifically saved content

  for f in `cat ${list}` ;
  do
    echo "Fixing $f..."

    sed -r -i 's/omap_request_gpio\s*\((\w+)\)/gpio_request(\1, "")/g' "$f"
    sed -r -i 's/omap_free_gpio/gpio_free/g' "$f"
    sed -r -i 's/omap_set_gpio_direction\s*\((\w+)\s*,\s*1\)/gpio_direction_input(\1)/g' "$f"
    sed -r -i 's/omap_set_gpio_direction\s*\((\w+)\s*,\s*(\w+)\)/gpio_direction_output(\1, \2)/g' "$f"
    sed -r -i 's/omap_set_gpio_dataout/gpio_set_value/g' "$f"
    sed -r -i 's/omap_get_gpio_datain/gpio_get_value/g' "$f"
    sed -r -i 's/omap_get_gpio_dataout/gpio_get_value/g' "$f"
    sed -r -i 's/asm\/arch\/gpio.h/asm\/gpio.h/g' "$f"
  done
  [/script]

Few manual changes were still required to ensure that sources
compile without errors for all these configurations:
 - omap3_evm_config
 - am3517_evm_config
 - am3517_crane_config
 - omap4_panda_config
 - omap3_zoom1_config
 - omap4_sdp4430_config
 - igep0020_config
 - cm_t35_config
 - devkit8000_config
 - igep0030_config
 - dig297_config
 - omap3_beagle_config
 - omap3_pandora_config
 - omap3_sdp3430_config
 - omap3_zoom2_config
 - omap3_overo_config

 All these boards define "CONFIG_OMAP34XX" - therefore likely
 to be impacted with this change. The list was created using:
 grep -l -R "OMAP34XX" include/configs | cut -d "/" -f 3 | sed 's/\.h/_config/g'

 Some additional patches would be required for successful
 build. Some of them are under discussion, but they status
 shouldn't impact the contents of this patch set:
 1) http://marc.info/?l=u-boot&m=131515805732292&w=2
 2) http://marc.info/?l=u-boot&m=131521839308281&w=2

Changes since RFC[1]:
 1) While the original RFC was based against the master of
    u-boot.git. This series is based against master of
    u-boot-arm.git

 2) Used better logic to search and fix 'possibly' impacted
    files i.e. the script embedded above.

 3) In order to avoid rejection of patch series due to long
    recipent list, board maintainers will be sent separate
    (off-the-list) notification.

 [1] http://marc.info/?l=u-boot&m=131473403131657&w=2


Sanjeev Premi (3):
  omap: gpio: Use generic API
  omap: gpio: generic changes after changing API
  omap: gpio: Adapt board files to use generic API

 arch/arm/cpu/armv7/omap-common/gpio.c |  113 ++++++++++++++++++++++++---------
 arch/arm/cpu/armv7/omap4/clocks.c     |    5 +-
 arch/arm/include/asm/omap_gpio.h      |   15 -----
 board/cm_t35/leds.c                   |    6 +-
 board/comelit/dig297/dig297.c         |   12 ++--
 board/isee/igep0020/igep0020.c        |   12 ++--
 board/logicpd/zoom2/debug_board.c     |   10 ++--
 board/logicpd/zoom2/led.c             |   38 ++++++------
 board/logicpd/zoom2/zoom2.c           |   10 ++--
 board/overo/overo.c                   |   54 ++++++++--------
 board/ti/beagle/beagle.c              |   44 +++++++-------
 board/ti/beagle/led.c                 |   22 +++---
 board/ti/evm/evm.c                    |   12 ++--
 doc/README.omap3                      |   20 +++---
 14 files changed, 205 insertions(+), 168 deletions(-)

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

* [U-Boot] [PATCH 1/3] omap: gpio: Use generic API
  2011-09-05 20:28 [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Sanjeev Premi
@ 2011-09-05 20:28 ` Sanjeev Premi
  2011-09-05 20:28 ` [U-Boot] [PATCH 2/3] omap: gpio: generic changes after changing API Sanjeev Premi
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Sanjeev Premi @ 2011-09-05 20:28 UTC (permalink / raw)
  To: u-boot

Convert all OMAP specific functions to use the common API
definitions in include/asm/gpio.h. In the process, made
few additional changes:
 - Use -EINVAL consistently. -1 was used in many places.
 - Removed one-liner static functions that were used only
   once. Replaced the content as necessary.
 - Combines implementation of functions omap_get_gpio_dataout()
   and omap_get_gpio_datain(). To do so, new static function
   _get_gpio_direction() was added.

Signed-off-by: Sanjeev Premi <premi@ti.com>
---

 Changes since RFC:
 - Rebased against u-boot-arm.git
 - Dummy header is no longer necessary due to additional
   changes on the arm tree.
 - Added function _get_gpio_direction().
 - Fold omap_get_gpio_dataout() and omap_get_gpio_datain()
   into single gpio_get_value().

 arch/arm/cpu/armv7/omap-common/gpio.c |  113 ++++++++++++++++++++++++---------
 arch/arm/include/asm/omap_gpio.h      |   15 -----
 2 files changed, 82 insertions(+), 46 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/gpio.c b/arch/arm/cpu/armv7/omap-common/gpio.c
index 4749524..5b14c0f 100644
--- a/arch/arm/cpu/armv7/omap-common/gpio.c
+++ b/arch/arm/cpu/armv7/omap-common/gpio.c
@@ -40,6 +40,9 @@
 #include <asm/io.h>
 #include <asm/errno.h>
 
+#define OMAP_GPIO_DIR_OUT	0
+#define OMAP_GPIO_DIR_IN	1
+
 static inline const struct gpio_bank *get_gpio_bank(int gpio)
 {
 	return &omap_gpio_bank[gpio >> 5];
@@ -53,17 +56,17 @@ static inline int get_gpio_index(int gpio)
 static inline int gpio_valid(int gpio)
 {
 	if (gpio < 0)
-		return -1;
+		return -EINVAL;
 	if (gpio < 192)
 		return 0;
-	return -1;
+	return -EINVAL;
 }
 
 static int check_gpio(int gpio)
 {
 	if (gpio_valid(gpio) < 0) {
 		printf("ERROR : check_gpio: invalid GPIO %d\n", gpio);
-		return -1;
+		return -EINVAL;
 	}
 	return 0;
 }
@@ -89,14 +92,29 @@ static void _set_gpio_direction(const struct gpio_bank *bank, int gpio,
 	__raw_writel(l, reg);
 }
 
-void omap_set_gpio_direction(int gpio, int is_input)
+/**
+ * Get the direction of the GPIO by reading the GPIO_OE register
+ * corresponding to the specified bank.
+ */
+static int _get_gpio_direction(const struct gpio_bank *bank, int gpio)
 {
-	const struct gpio_bank *bank;
+	void *reg = bank->base;
+	u32 v;
 
-	if (check_gpio(gpio) < 0)
-		return;
-	bank = get_gpio_bank(gpio);
-	_set_gpio_direction(bank, get_gpio_index(gpio), is_input);
+	switch (bank->method) {
+	case METHOD_GPIO_24XX:
+		reg += OMAP_GPIO_OE;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	v = __raw_readl(reg);
+
+	if (v & (1 << gpio))
+		return OMAP_GPIO_DIR_IN;
+	else
+		return OMAP_GPIO_DIR_OUT;
 }
 
 static void _set_gpio_dataout(const struct gpio_bank *bank, int gpio,
@@ -121,20 +139,27 @@ static void _set_gpio_dataout(const struct gpio_bank *bank, int gpio,
 	__raw_writel(l, reg);
 }
 
-void omap_set_gpio_dataout(int gpio, int enable)
+/**
+ * Set value of the specified gpio
+ */
+void gpio_set_value(int gpio, int value)
 {
 	const struct gpio_bank *bank;
 
 	if (check_gpio(gpio) < 0)
 		return;
 	bank = get_gpio_bank(gpio);
-	_set_gpio_dataout(bank, get_gpio_index(gpio), enable);
+	_set_gpio_dataout(bank, get_gpio_index(gpio), value);
 }
 
-int omap_get_gpio_datain(int gpio)
+/**
+ * Get value of the specified gpio
+ */
+int gpio_get_value(int gpio)
 {
 	const struct gpio_bank *bank;
 	void *reg;
+	int input;
 
 	if (check_gpio(gpio) < 0)
 		return -EINVAL;
@@ -142,7 +167,17 @@ int omap_get_gpio_datain(int gpio)
 	reg = bank->base;
 	switch (bank->method) {
 	case METHOD_GPIO_24XX:
-		reg += OMAP_GPIO_DATAIN;
+		input = _get_gpio_direction(bank, get_gpio_index(gpio));
+		switch (input) {
+		case OMAP_GPIO_DIR_IN:
+			reg += OMAP_GPIO_DATAIN;
+			break;
+		case OMAP_GPIO_DIR_OUT:
+			reg += OMAP_GPIO_DATAOUT;
+			break;
+		default:
+			return -EINVAL;
+		}
 		break;
 	default:
 		return -EINVAL;
@@ -151,32 +186,45 @@ int omap_get_gpio_datain(int gpio)
 			& (1 << get_gpio_index(gpio))) != 0;
 }
 
-int omap_get_gpio_dataout(int gpio)
+/**
+ * Set gpio direction as input
+ */
+int gpio_direction_input(unsigned gpio)
 {
-	struct gpio_bank *bank;
-	void *reg;
+	const struct gpio_bank *bank;
 
 	if (check_gpio(gpio) < 0)
 		return -EINVAL;
+
 	bank = get_gpio_bank(gpio);
-	reg = bank->base;
-	switch (bank->method) {
-	case METHOD_GPIO_24XX:
-		reg += OMAP_GPIO_DATAOUT;
-		break;
-	default:
-		return -EINVAL;
-	}
-	return (__raw_readl(reg)
-			& (1 << get_gpio_index(gpio))) != 0;
+	_set_gpio_direction(bank, get_gpio_index(gpio), 1);
+
+	return 0;
 }
 
-static void _reset_gpio(const struct gpio_bank *bank, int gpio)
+/**
+ * Set gpio direction as output
+ */
+int gpio_direction_output(unsigned gpio, int value)
 {
-	_set_gpio_direction(bank, get_gpio_index(gpio), 1);
+	const struct gpio_bank *bank;
+
+	if (check_gpio(gpio) < 0)
+		return -EINVAL;
+
+	bank = get_gpio_bank(gpio);
+	_set_gpio_dataout(bank, get_gpio_index(gpio), value);
+	_set_gpio_direction(bank, get_gpio_index(gpio), 0);
+
+	return 0;
 }
 
-int omap_request_gpio(int gpio)
+/**
+ * Request a gpio before using it.
+ *
+ * NOTE: Argument 'label' is unused.
+ */
+int gpio_request(int gpio, const char *label)
 {
 	if (check_gpio(gpio) < 0)
 		return -EINVAL;
@@ -184,7 +232,10 @@ int omap_request_gpio(int gpio)
 	return 0;
 }
 
-void omap_free_gpio(int gpio)
+/**
+ * Reset and free the gpio after using it.
+ */
+void gpio_free(unsigned gpio)
 {
 	const struct gpio_bank *bank;
 
@@ -192,5 +243,5 @@ void omap_free_gpio(int gpio)
 		return;
 	bank = get_gpio_bank(gpio);
 
-	_reset_gpio(bank, gpio);
+	_set_gpio_direction(bank, get_gpio_index(gpio), 1);
 }
diff --git a/arch/arm/include/asm/omap_gpio.h b/arch/arm/include/asm/omap_gpio.h
index 8741572..516cc42 100644
--- a/arch/arm/include/asm/omap_gpio.h
+++ b/arch/arm/include/asm/omap_gpio.h
@@ -49,19 +49,4 @@ extern const struct gpio_bank *const omap_gpio_bank;
 
 #define METHOD_GPIO_24XX	4
 
-/* This is the interface */
-
-/* Request a gpio before using it */
-int omap_request_gpio(int gpio);
-/* Reset and free a gpio after using it */
-void omap_free_gpio(int gpio);
-/* Sets the gpio as input or output */
-void omap_set_gpio_direction(int gpio, int is_input);
-/* Set or clear a gpio output */
-void omap_set_gpio_dataout(int gpio, int enable);
-/* Get the value of a gpio input */
-int omap_get_gpio_datain(int gpio);
-/* Get the value of a gpio output */
-int omap_get_gpio_dataout(int gpio);
-
 #endif /* _GPIO_H_ */
-- 
1.7.0.4

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

* [U-Boot] [PATCH 2/3] omap: gpio: generic changes after changing API
  2011-09-05 20:28 [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Sanjeev Premi
  2011-09-05 20:28 ` [U-Boot] [PATCH 1/3] omap: gpio: Use generic API Sanjeev Premi
@ 2011-09-05 20:28 ` Sanjeev Premi
  2011-09-05 20:28 ` [U-Boot] [PATCH 3/3] omap: gpio: Adapt board files to use generic API Sanjeev Premi
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Sanjeev Premi @ 2011-09-05 20:28 UTC (permalink / raw)
  To: u-boot

This patch contains the generic changes required after
change to generic API in the previous patch.

Signed-off-by: Sanjeev Premi <premi@ti.com>
---

 This patch could have been merged with previous one, but
 has been kept separate to illustrate (and review) the
 changes to generic code.

 arch/arm/cpu/armv7/omap4/clocks.c |    5 +++--
 doc/README.omap3                  |   20 ++++++++++----------
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap4/clocks.c b/arch/arm/cpu/armv7/omap4/clocks.c
index eda960c..4f0e0cd 100644
--- a/arch/arm/cpu/armv7/omap4/clocks.c
+++ b/arch/arm/cpu/armv7/omap4/clocks.c
@@ -31,6 +31,7 @@
  */
 #include <common.h>
 #include <asm/omap_common.h>
+#include <asm/gpio.h>
 #include <asm/arch/clocks.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/utils.h>
@@ -481,8 +482,8 @@ static void do_scale_tps62361(u32 reg, u32 volt_mv)
 	 * VSEL1 is grounded on board. So the following selects
 	 * VSEL1 = 0 and VSEL0 = 1
 	 */
-	omap_set_gpio_direction(TPS62361_VSEL0_GPIO, 0);
-	omap_set_gpio_dataout(TPS62361_VSEL0_GPIO, 1);
+	gpio_direction_output(TPS62361_VSEL0_GPIO, 0);
+	gpio_set_value(TPS62361_VSEL0_GPIO, 1);
 
 	temp = TPS62361_I2C_SLAVE_ADDR |
 	    (reg << PRM_VC_VAL_BYPASS_REGADDR_SHIFT) |
diff --git a/doc/README.omap3 b/doc/README.omap3
index 460950d..1768cdd 100644
--- a/doc/README.omap3
+++ b/doc/README.omap3
@@ -98,24 +98,24 @@ gpio
 
 To set a bit :
 
-	if (!omap_request_gpio(N)) {
-		omap_set_gpio_direction(N, 0);
-		omap_set_gpio_dataout(N, 1);
+	if (!gpio_request(N, "")) {
+		gpio_direction_output(N, 0);
+		gpio_set_value(N, 1);
 	}
 
 To clear a bit :
 
-	if (!omap_request_gpio(N)) {
-		omap_set_gpio_direction(N, 0);
-		omap_set_gpio_dataout(N, 0);
+	if (!gpio_request(N, "")) {
+		gpio_direction_output(N, 0);
+		gpio_set_value(N, 0);
 	}
 
 To read a bit :
 
-	if (!omap_request_gpio(N)) {
-		omap_set_gpio_direction(N, 1);
-		val = omap_get_gpio_datain(N);
-		omap_free_gpio(N);
+	if (!gpio_request(N, "")) {
+		gpio_direction_input(N);
+		val = gpio_get_value(N);
+		gpio_free(N);
 	}
 	if (val)
 		printf("GPIO N is set\n");
-- 
1.7.0.4

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

* [U-Boot] [PATCH 3/3] omap: gpio: Adapt board files to use generic API
  2011-09-05 20:28 [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Sanjeev Premi
  2011-09-05 20:28 ` [U-Boot] [PATCH 1/3] omap: gpio: Use generic API Sanjeev Premi
  2011-09-05 20:28 ` [U-Boot] [PATCH 2/3] omap: gpio: generic changes after changing API Sanjeev Premi
@ 2011-09-05 20:28 ` Sanjeev Premi
  2011-09-05 20:46 ` [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Paulraj, Sandeep
  2011-09-07  9:24 ` Luca Ceresoli
  4 siblings, 0 replies; 9+ messages in thread
From: Sanjeev Premi @ 2011-09-05 20:28 UTC (permalink / raw)
  To: u-boot

This patch contains updates the sources in the board files
to use the generic API.

Signed-off-by: Sanjeev Premi <premi@ti.com>
---

 While most changes were done via script mentioned in the
 patch 0/3, some of the changes were manual - as the script
 failed to match few instances.


 board/cm_t35/leds.c               |   10 +++---
 board/comelit/dig297/dig297.c     |   12 ++++----
 board/isee/igep0020/igep0020.c    |   12 ++++----
 board/logicpd/zoom2/debug_board.c |   10 +++---
 board/logicpd/zoom2/led.c         |   38 +++++++++++++-------------
 board/logicpd/zoom2/zoom2.c       |   10 +++---
 board/overo/overo.c               |   54 ++++++++++++++++++------------------
 board/ti/beagle/beagle.c          |   44 +++++++++++++++---------------
 board/ti/beagle/led.c             |   22 +++++++-------
 board/ti/evm/evm.c                |   12 ++++----
 10 files changed, 112 insertions(+), 112 deletions(-)

diff --git a/board/cm_t35/leds.c b/board/cm_t35/leds.c
index 71c5b0d..48ad598 100644
--- a/board/cm_t35/leds.c
+++ b/board/cm_t35/leds.c
@@ -20,26 +20,26 @@
  */
 #include <common.h>
 #include <status_led.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 
 static unsigned int leds[] = { GREEN_LED_GPIO };
 
 void __led_init(led_id_t mask, int state)
 {
-	if (omap_request_gpio(leds[mask]) != 0) {
+	if (gpio_request(leds[mask], "") != 0) {
 		printf("%s: failed requesting GPIO%u\n", __func__, leds[mask]);
 		return;
 	}
 
-	omap_set_gpio_direction(leds[mask], 0);
+	gpio_direction_output(leds[mask], 0);
 }
 
 void __led_set(led_id_t mask, int state)
 {
-	omap_set_gpio_dataout(leds[mask], state == STATUS_LED_ON);
+	gpio_set_value(leds[mask], state == STATUS_LED_ON);
 }
 
 void __led_toggle(led_id_t mask)
 {
-	omap_set_gpio_dataout(leds[mask], !omap_get_gpio_datain(leds[mask]));
+	gpio_set_value(leds[mask], !gpio_get_value(leds[mask]));
 }
diff --git a/board/comelit/dig297/dig297.c b/board/comelit/dig297/dig297.c
index a7071cd..c81ce58 100644
--- a/board/comelit/dig297/dig297.c
+++ b/board/comelit/dig297/dig297.c
@@ -42,7 +42,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <asm/mach-types.h>
 #include "dig297.h"
 
@@ -177,13 +177,13 @@ static void setup_net_chip(void)
 	       &ctrl_base->gpmc_nadv_ale);
 
 	/* Make GPIO 12 as output pin and send a magic pulse through it */
-	if (!omap_request_gpio(NET_LAN9221_RESET_GPIO)) {
-		omap_set_gpio_direction(NET_LAN9221_RESET_GPIO, 0);
-		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+	if (!gpio_request(NET_LAN9221_RESET_GPIO, "")) {
+		gpio_direction_output(NET_LAN9221_RESET_GPIO, 0);
+		gpio_set_value(NET_LAN9221_RESET_GPIO, 1);
 		udelay(1);
-		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 0);
+		gpio_set_value(NET_LAN9221_RESET_GPIO, 0);
 		udelay(31000);	/* Should be >= 30ms according to datasheet */
-		omap_set_gpio_dataout(NET_LAN9221_RESET_GPIO, 1);
+		gpio_set_value(NET_LAN9221_RESET_GPIO, 1);
 	}
 }
 #endif /* CONFIG_CMD_NET */
diff --git a/board/isee/igep0020/igep0020.c b/board/isee/igep0020/igep0020.c
index 36cc924..2279cc0 100644
--- a/board/isee/igep0020/igep0020.c
+++ b/board/isee/igep0020/igep0020.c
@@ -24,7 +24,7 @@
 #include <netdev.h>
 #include <twl4030.h>
 #include <asm/io.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mux.h>
@@ -81,13 +81,13 @@ static void setup_net_chip(void)
 		&ctrl_base->gpmc_nadv_ale);
 
 	/* Make GPIO 64 as output pin and send a magic pulse through it */
-	if (!omap_request_gpio(64)) {
-		omap_set_gpio_direction(64, 0);
-		omap_set_gpio_dataout(64, 1);
+	if (!gpio_request(64, "")) {
+		gpio_direction_output(64, 0);
+		gpio_set_value(64, 1);
 		udelay(1);
-		omap_set_gpio_dataout(64, 0);
+		gpio_set_value(64, 0);
 		udelay(1);
-		omap_set_gpio_dataout(64, 1);
+		gpio_set_value(64, 1);
 	}
 }
 #endif
diff --git a/board/logicpd/zoom2/debug_board.c b/board/logicpd/zoom2/debug_board.c
index a4ddf29..33aa600 100644
--- a/board/logicpd/zoom2/debug_board.c
+++ b/board/logicpd/zoom2/debug_board.c
@@ -22,7 +22,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/io.h>
 #include <asm/arch/mux.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 
 #define DEBUG_BOARD_CONNECTED		1
 #define DEBUG_BOARD_NOT_CONNECTED	0
@@ -33,14 +33,14 @@ static void zoom2_debug_board_detect (void)
 {
 	int val = 0;
 
-	if (!omap_request_gpio(158)) {
+	if (!gpio_request(158, "")) {
 		/*
 		 * GPIO to query for debug board
 		 * 158 db board query
 		 */
-		omap_set_gpio_direction(158, 1);
-		val = omap_get_gpio_datain(158);
-		omap_free_gpio(158);
+		gpio_direction_input(158);
+		val = gpio_get_value(158);
+		gpio_free(158);
 	}
 
 	if (!val)
diff --git a/board/logicpd/zoom2/led.c b/board/logicpd/zoom2/led.c
index 4e14c58..4255372 100644
--- a/board/logicpd/zoom2/led.c
+++ b/board/logicpd/zoom2/led.c
@@ -22,7 +22,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 
 static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
 
@@ -39,9 +39,9 @@ static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
 void red_LED_off (void)
 {
 	/* red */
-	if (!omap_request_gpio(ZOOM2_LED_RED)) {
-		omap_set_gpio_direction(ZOOM2_LED_RED, 0);
-		omap_set_gpio_dataout(ZOOM2_LED_RED, 0);
+	if (!gpio_request(ZOOM2_LED_RED, "")) {
+		gpio_direction_output(ZOOM2_LED_RED, 0);
+		gpio_set_value(ZOOM2_LED_RED, 0);
 	}
 	saved_state[STATUS_LED_RED] = STATUS_LED_OFF;
 }
@@ -49,15 +49,15 @@ void red_LED_off (void)
 void blue_LED_off (void)
 {
 	/* blue */
-	if (!omap_request_gpio(ZOOM2_LED_BLUE)) {
-		omap_set_gpio_direction(ZOOM2_LED_BLUE, 0);
-		omap_set_gpio_dataout(ZOOM2_LED_BLUE, 0);
+	if (!gpio_request(ZOOM2_LED_BLUE, "")) {
+		gpio_direction_output(ZOOM2_LED_BLUE, 0);
+		gpio_set_value(ZOOM2_LED_BLUE, 0);
 	}
 
 	/* blue 2 */
-	if (!omap_request_gpio(ZOOM2_LED_BLUE2)) {
-		omap_set_gpio_direction(ZOOM2_LED_BLUE2, 0);
-		omap_set_gpio_dataout(ZOOM2_LED_BLUE2, 0);
+	if (!gpio_request(ZOOM2_LED_BLUE2, "")) {
+		gpio_direction_output(ZOOM2_LED_BLUE2, 0);
+		gpio_set_value(ZOOM2_LED_BLUE2, 0);
 	}
 	saved_state[STATUS_LED_BLUE] = STATUS_LED_OFF;
 }
@@ -67,9 +67,9 @@ void red_LED_on (void)
 	blue_LED_off ();
 
 	/* red */
-	if (!omap_request_gpio(ZOOM2_LED_RED)) {
-		omap_set_gpio_direction(ZOOM2_LED_RED, 0);
-		omap_set_gpio_dataout(ZOOM2_LED_RED, 1);
+	if (!gpio_request(ZOOM2_LED_RED, "")) {
+		gpio_direction_output(ZOOM2_LED_RED, 0);
+		gpio_set_value(ZOOM2_LED_RED, 1);
 	}
 	saved_state[STATUS_LED_RED] = STATUS_LED_ON;
 }
@@ -79,15 +79,15 @@ void blue_LED_on (void)
 	red_LED_off ();
 
 	/* blue */
-	if (!omap_request_gpio(ZOOM2_LED_BLUE)) {
-		omap_set_gpio_direction(ZOOM2_LED_BLUE, 0);
-		omap_set_gpio_dataout(ZOOM2_LED_BLUE, 1);
+	if (!gpio_request(ZOOM2_LED_BLUE, "")) {
+		gpio_direction_output(ZOOM2_LED_BLUE, 0);
+		gpio_set_value(ZOOM2_LED_BLUE, 1);
 	}
 
 	/* blue 2 */
-	if (!omap_request_gpio(ZOOM2_LED_BLUE2)) {
-		omap_set_gpio_direction(ZOOM2_LED_BLUE2, 0);
-		omap_set_gpio_dataout(ZOOM2_LED_BLUE2, 1);
+	if (!gpio_request(ZOOM2_LED_BLUE2, "")) {
+		gpio_direction_output(ZOOM2_LED_BLUE2, 0);
+		gpio_set_value(ZOOM2_LED_BLUE2, 1);
 	}
 
 	saved_state[STATUS_LED_BLUE] = STATUS_LED_ON;
diff --git a/board/logicpd/zoom2/zoom2.c b/board/logicpd/zoom2/zoom2.c
index 800113a..21964c2 100644
--- a/board/logicpd/zoom2/zoom2.c
+++ b/board/logicpd/zoom2/zoom2.c
@@ -36,7 +36,7 @@
 #include <twl4030.h>
 #include <asm/io.h>
 #include <asm/arch/mmc_host_def.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
@@ -90,12 +90,12 @@ void zoom2_identify(void)
 	 * and they are not commonly used.  They are mentioned here
 	 * only for completeness.
 	 */
-	if (!omap_request_gpio(94)) {
+	if (!gpio_request(94, "")) {
 		unsigned int val;
 
-		omap_set_gpio_direction(94, 1);
-		val = omap_get_gpio_datain(94);
-		omap_free_gpio(94);
+		gpio_direction_input(94);
+		val = gpio_get_value(94);
+		gpio_free(94);
 
 		if (val)
 			revision = ZOOM2_REVISION_BETA;
diff --git a/board/overo/overo.c b/board/overo/overo.c
index 4eafdb1..4bbe1b8 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -36,7 +36,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <asm/mach-types.h>
 #include "overo.h"
 
@@ -106,21 +106,21 @@ int get_board_revision(void)
 {
 	int revision;
 
-	if (!omap_request_gpio(112) &&
-	    !omap_request_gpio(113) &&
-	    !omap_request_gpio(115)) {
+	if (!gpio_request(112, "") &&
+	    !gpio_request(113, "") &&
+	    !gpio_request(115, "")) {
 
-		omap_set_gpio_direction(112, 1);
-		omap_set_gpio_direction(113, 1);
-		omap_set_gpio_direction(115, 1);
+		gpio_direction_input(112);
+		gpio_direction_input(113);
+		gpio_direction_input(115);
 
-		revision = omap_get_gpio_datain(115) << 2 |
-			   omap_get_gpio_datain(113) << 1 |
-			   omap_get_gpio_datain(112);
+		revision = gpio_get_value(115) << 2 |
+			   gpio_get_value(113) << 1 |
+			   gpio_get_value(112);
 
-		omap_free_gpio(112);
-		omap_free_gpio(113);
-		omap_free_gpio(115);
+		gpio_free(112);
+		gpio_free(113);
+		gpio_free(115);
 	} else {
 		printf("Error: unable to acquire board revision GPIOs\n");
 		revision = -1;
@@ -139,21 +139,21 @@ int get_sdio2_config(void)
 {
 	int sdio_direct;
 
-	if (!omap_request_gpio(130) && !omap_request_gpio(139)) {
+	if (!gpio_request(130, "") && !gpio_request(139, "")) {
 
-		omap_set_gpio_direction(130, 0);
-		omap_set_gpio_direction(139, 1);
+		gpio_direction_output(130, 0);
+		gpio_direction_input(139);
 
 		sdio_direct = 1;
-		omap_set_gpio_dataout(130, 0);
-		if (omap_get_gpio_datain(139) == 0) {
-			omap_set_gpio_dataout(130, 1);
-			if (omap_get_gpio_datain(139) == 1)
+		gpio_set_value(130, 0);
+		if (gpio_get_value(139) == 0) {
+			gpio_set_value(130, 1);
+			if (gpio_get_value(139) == 1)
 				sdio_direct = 0;
 		}
 
-		omap_free_gpio(130);
-		omap_free_gpio(139);
+		gpio_free(130);
+		gpio_free(139);
 	} else {
 		printf("Error: unable to acquire sdio2 clk GPIOs\n");
 		sdio_direct = -1;
@@ -322,13 +322,13 @@ static void setup_net_chip(void)
 		&ctrl_base->gpmc_nadv_ale);
 
 	/* Make GPIO 64 as output pin and send a magic pulse through it */
-	if (!omap_request_gpio(64)) {
-		omap_set_gpio_direction(64, 0);
-		omap_set_gpio_dataout(64, 1);
+	if (!gpio_request(64, "")) {
+		gpio_direction_output(64, 0);
+		gpio_set_value(64, 1);
 		udelay(1);
-		omap_set_gpio_dataout(64, 0);
+		gpio_set_value(64, 0);
 		udelay(1);
-		omap_set_gpio_dataout(64, 1);
+		gpio_set_value(64, 1);
 	}
 }
 #endif
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index e07f1b8..6ffeea3 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -38,7 +38,7 @@
 #include <asm/arch/mmc_host_def.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <asm/mach-types.h>
 #ifdef CONFIG_USB_EHCI
 #include <usb.h>
@@ -116,21 +116,21 @@ int get_board_revision(void)
 {
 	int revision;
 
-	if (!omap_request_gpio(171) &&
-	    !omap_request_gpio(172) &&
-	    !omap_request_gpio(173)) {
+	if (!gpio_request(171, "") &&
+	    !gpio_request(172, "") &&
+	    !gpio_request(173, "")) {
 
-		omap_set_gpio_direction(171, 1);
-		omap_set_gpio_direction(172, 1);
-		omap_set_gpio_direction(173, 1);
+		gpio_direction_input(171);
+		gpio_direction_input(172);
+		gpio_direction_input(173);
 
-		revision = omap_get_gpio_datain(173) << 2 |
-			   omap_get_gpio_datain(172) << 1 |
-			   omap_get_gpio_datain(171);
+		revision = gpio_get_value(173) << 2 |
+			   gpio_get_value(172) << 1 |
+			   gpio_get_value(171);
 
-		omap_free_gpio(171);
-		omap_free_gpio(172);
-		omap_free_gpio(173);
+		gpio_free(171);
+		gpio_free(172);
+		gpio_free(173);
 	} else {
 		printf("Error: unable to acquire board revision GPIOs\n");
 		revision = -1;
@@ -387,7 +387,7 @@ int board_mmc_init(bd_t *bis)
 int ehci_hcd_stop(void)
 {
 	pr_debug("Resetting OMAP3 EHCI\n");
-	omap_set_gpio_dataout(GPIO_PHY_RESET, 0);
+	gpio_set_value(GPIO_PHY_RESET, 0);
 	writel(OMAP_UHH_SYSCONFIG_SOFTRESET, OMAP3_UHH_BASE + OMAP_UHH_SYSCONFIG);
 	/* disable USB clocks */
 	struct prcm *prcm_base = (struct prcm *)PRCM_BASE;
@@ -415,9 +415,9 @@ int ehci_hcd_init(void)
 	pr_debug("Initializing OMAP3 ECHI\n");
 
 	/* Put the PHY in RESET */
-	omap_request_gpio(GPIO_PHY_RESET);
-	omap_set_gpio_direction(GPIO_PHY_RESET, 0);
-	omap_set_gpio_dataout(GPIO_PHY_RESET, 0);
+	gpio_request(GPIO_PHY_RESET, "");
+	gpio_direction_output(GPIO_PHY_RESET, 0);
+	gpio_set_value(GPIO_PHY_RESET, 0);
 
 	/* Hold the PHY in RESET for enough time till DIR is high */
 	/* Refer: ISSUE1 */
@@ -469,7 +469,7 @@ int ehci_hcd_init(void)
 	 * PHY is settled and ready
 	 */
 	udelay(10);
-	omap_set_gpio_dataout(GPIO_PHY_RESET, 1);
+	gpio_set_value(GPIO_PHY_RESET, 1);
 
 	hccr = (struct ehci_hccr *)(OMAP3_EHCI_BASE);
 	hcor = (struct ehci_hcor *)(OMAP3_EHCI_BASE + 0x10);
@@ -508,10 +508,10 @@ int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		gpio = 4;
 		break;
 	}
-	omap_request_gpio(gpio);
-	omap_set_gpio_direction(gpio, 1);
+	gpio_request(gpio, "");
+	gpio_direction_input(gpio);
 	printf("The user button is currently ");
-	if(omap_get_gpio_datain(gpio))
+	if(gpio_get_value(gpio))
 	{
 		button = 1;
 		printf("PRESSED.\n");
@@ -522,7 +522,7 @@ int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		printf("NOT pressed.\n");
 	}
 
-	omap_free_gpio(gpio);
+	gpio_free(gpio);
 
 	return !button;
 }
diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c
index f08c08a..1779242 100644
--- a/board/ti/beagle/led.c
+++ b/board/ti/beagle/led.c
@@ -22,7 +22,7 @@
 #include <asm/arch/cpu.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 
 /* GPIO pins for the LEDs */
 #define BEAGLE_LED_USR0	150
@@ -57,10 +57,10 @@ void __led_toggle (led_id_t mask)
 		toggle_gpio = BEAGLE_LED_USR1;
 #endif
 	if (toggle_gpio) {
-		if (!omap_request_gpio(toggle_gpio)) {
-			omap_set_gpio_direction(toggle_gpio, 0);
-			state = omap_get_gpio_dataout(toggle_gpio);
-			omap_set_gpio_dataout(toggle_gpio, !state);
+		if (!gpio_request(toggle_gpio, "")) {
+			gpio_direction_output(toggle_gpio, 0);
+			state = gpio_get_value(toggle_gpio);
+			gpio_set_value(toggle_gpio, !state);
 		}
 	}
 }
@@ -69,17 +69,17 @@ void __led_set (led_id_t mask, int state)
 {
 #ifdef STATUS_LED_BIT
 	if (STATUS_LED_BIT & mask) {
-		if (!omap_request_gpio(BEAGLE_LED_USR0)) {
-			omap_set_gpio_direction(BEAGLE_LED_USR0, 0);
-			omap_set_gpio_dataout(BEAGLE_LED_USR0, state);
+		if (!gpio_request(BEAGLE_LED_USR0, "")) {
+			gpio_direction_output(BEAGLE_LED_USR0, 0);
+			gpio_set_value(BEAGLE_LED_USR0, state);
 		}
 	}
 #endif
 #ifdef STATUS_LED_BIT1
 	if (STATUS_LED_BIT1 & mask) {
-		if (!omap_request_gpio(BEAGLE_LED_USR1)) {
-			omap_set_gpio_direction(BEAGLE_LED_USR1, 0);
-			omap_set_gpio_dataout(BEAGLE_LED_USR1, state);
+		if (!gpio_request(BEAGLE_LED_USR1, "")) {
+			gpio_direction_output(BEAGLE_LED_USR1, 0);
+			gpio_set_value(BEAGLE_LED_USR1, state);
 		}
 	}
 #endif
diff --git a/board/ti/evm/evm.c b/board/ti/evm/evm.c
index e8360df..b17c0fb 100644
--- a/board/ti/evm/evm.c
+++ b/board/ti/evm/evm.c
@@ -34,7 +34,7 @@
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/mmc_host_def.h>
-#include <asm/arch/gpio.h>
+#include <asm/gpio.h>
 #include <i2c.h>
 #include <asm/mach-types.h>
 #include "evm.h"
@@ -196,21 +196,21 @@ static void reset_net_chip(void)
 		rst_gpio = OMAP3EVM_GPIO_ETH_RST_GEN2;
 	}
 
-	ret = omap_request_gpio(rst_gpio);
+	ret = gpio_request(rst_gpio, "");
 	if (ret < 0) {
 		printf("Unable to get GPIO %d\n", rst_gpio);
 		return ;
 	}
 
 	/* Configure as output */
-	omap_set_gpio_direction(rst_gpio, 0);
+	gpio_direction_output(rst_gpio, 0);
 
 	/* Send a pulse on the GPIO pin */
-	omap_set_gpio_dataout(rst_gpio, 1);
+	gpio_set_value(rst_gpio, 1);
 	udelay(1);
-	omap_set_gpio_dataout(rst_gpio, 0);
+	gpio_set_value(rst_gpio, 0);
 	udelay(1);
-	omap_set_gpio_dataout(rst_gpio, 1);
+	gpio_set_value(rst_gpio, 1);
 }
 
 int board_eth_init(bd_t *bis)
-- 
1.7.0.4

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

* [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom)
  2011-09-05 20:28 [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Sanjeev Premi
                   ` (2 preceding siblings ...)
  2011-09-05 20:28 ` [U-Boot] [PATCH 3/3] omap: gpio: Adapt board files to use generic API Sanjeev Premi
@ 2011-09-05 20:46 ` Paulraj, Sandeep
  2011-09-07  9:24 ` Luca Ceresoli
  4 siblings, 0 replies; 9+ messages in thread
From: Paulraj, Sandeep @ 2011-09-05 20:46 UTC (permalink / raw)
  To: u-boot



> 
> Sanjeev Premi (3):
>   omap: gpio: Use generic API
>   omap: gpio: generic changes after changing API
>   omap: gpio: Adapt board files to use generic API
> 
>  arch/arm/cpu/armv7/omap-common/gpio.c |  113 ++++++++++++++++++++++++----
> -----
>  arch/arm/cpu/armv7/omap4/clocks.c     |    5 +-
>  arch/arm/include/asm/omap_gpio.h      |   15 -----
>  board/cm_t35/leds.c                   |    6 +-
>  board/comelit/dig297/dig297.c         |   12 ++--
>  board/isee/igep0020/igep0020.c        |   12 ++--
>  board/logicpd/zoom2/debug_board.c     |   10 ++--
>  board/logicpd/zoom2/led.c             |   38 ++++++------
>  board/logicpd/zoom2/zoom2.c           |   10 ++--
>  board/overo/overo.c                   |   54 ++++++++--------
>  board/ti/beagle/beagle.c              |   44 +++++++-------
>  board/ti/beagle/led.c                 |   22 +++---
>  board/ti/evm/evm.c                    |   12 ++--
>  doc/README.omap3                      |   20 +++---
>  14 files changed, 205 insertions(+), 168 deletions(-)


Albert, Wolfgang,

After sufficient review, can we perhaps add this patch set to this release?

When I submitted my pull request I know omap3 beagle was compiling. However after I rebased with the mainline, the builds broke.

Regards,
Sandeep

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

* [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom)
  2011-09-05 20:28 [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Sanjeev Premi
                   ` (3 preceding siblings ...)
  2011-09-05 20:46 ` [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Paulraj, Sandeep
@ 2011-09-07  9:24 ` Luca Ceresoli
  2011-09-07  9:39   ` Premi, Sanjeev
  4 siblings, 1 reply; 9+ messages in thread
From: Luca Ceresoli @ 2011-09-07  9:24 UTC (permalink / raw)
  To: u-boot

Hi Sanjeev,

Sanjeev Premi wrote:
> The OMAP boards use a custom api for GPIO operations. While
> it works, it doesn't help when when we don't know existence
> of the customization.
...
> Changes since RFC[1]:
>   1) While the original RFC was based against the master of
>      u-boot.git. This series is based against master of
>      u-boot-arm.git

This patchset does not apply on top of current -arm master:

   commit 1052ea04d60de953f8355eab0e39336974283304
   Author: Sanjeev Premi <premi@ti.com>
   Date:   Mon Sep 5 00:25:53 2011 +0000

     omap3: beagle: Fix build warning

With this message:

   Applying: omap: gpio: Use generic API
   error: patch failed: arch/arm/cpu/armv7/omap-common/gpio.c:151
   error: arch/arm/cpu/armv7/omap-common/gpio.c: patch does not apply
   error: patch failed: arch/arm/include/asm/omap_gpio.h:49
   error: arch/arm/include/asm/omap_gpio.h: patch does not apply
   Patch failed at 0001 omap: gpio: Use generic API

I'm afraid think you need another rebase.

Luca

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

* [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom)
  2011-09-07  9:24 ` Luca Ceresoli
@ 2011-09-07  9:39   ` Premi, Sanjeev
  2011-09-07  9:48     ` Premi, Sanjeev
  0 siblings, 1 reply; 9+ messages in thread
From: Premi, Sanjeev @ 2011-09-07  9:39 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: Luca Ceresoli [mailto:luca.ceresoli at comelit.it] 
> Sent: Wednesday, September 07, 2011 2:54 PM
> To: Premi, Sanjeev
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH 0/3] omap: gpio: Use generic API 
> (instead of custom)
> 
> Hi Sanjeev,
> 
> Sanjeev Premi wrote:
> > The OMAP boards use a custom api for GPIO operations. While
> > it works, it doesn't help when when we don't know existence
> > of the customization.
> ...
> > Changes since RFC[1]:
> >   1) While the original RFC was based against the master of
> >      u-boot.git. This series is based against master of
> >      u-boot-arm.git
> 
> This patchset does not apply on top of current -arm master:
> 
>    commit 1052ea04d60de953f8355eab0e39336974283304
>    Author: Sanjeev Premi <premi@ti.com>
>    Date:   Mon Sep 5 00:25:53 2011 +0000
> 
>      omap3: beagle: Fix build warning
> 
> With this message:
> 
>    Applying: omap: gpio: Use generic API
>    error: patch failed: arch/arm/cpu/armv7/omap-common/gpio.c:151
>    error: arch/arm/cpu/armv7/omap-common/gpio.c: patch does not apply
>    error: patch failed: arch/arm/include/asm/omap_gpio.h:49
>    error: arch/arm/include/asm/omap_gpio.h: patch does not apply
>    Patch failed at 0001 omap: gpio: Use generic API
> 
> I'm afraid think you need another rebase.

When I rebased, arm/master was at:
58c583b : net: Check network device driver name

Anyways, fresh rebase coming in next hour...

~sanjeev

> 
> Luca
> 

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

* [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom)
  2011-09-07  9:39   ` Premi, Sanjeev
@ 2011-09-07  9:48     ` Premi, Sanjeev
  2011-09-08 12:51       ` Luca Ceresoli
  0 siblings, 1 reply; 9+ messages in thread
From: Premi, Sanjeev @ 2011-09-07  9:48 UTC (permalink / raw)
  To: u-boot

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de 
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Premi, Sanjeev
> Sent: Wednesday, September 07, 2011 3:10 PM
> To: Luca Ceresoli
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH 0/3] omap: gpio: Use generic API 
> (instead of custom)
> > -----Original Message-----
> > From: Luca Ceresoli [mailto:luca.ceresoli at comelit.it] 
> > Sent: Wednesday, September 07, 2011 2:54 PM
> > To: Premi, Sanjeev
> > Cc: u-boot at lists.denx.de
> > Subject: Re: [U-Boot] [PATCH 0/3] omap: gpio: Use generic API 
> > (instead of custom)
> > 
> > Hi Sanjeev,
> > 
> > Sanjeev Premi wrote:
> > > The OMAP boards use a custom api for GPIO operations. While
> > > it works, it doesn't help when when we don't know existence
> > > of the customization.
> > ...
> > > Changes since RFC[1]:
> > >   1) While the original RFC was based against the master of
> > >      u-boot.git. This series is based against master of
> > >      u-boot-arm.git
> > 
> > This patchset does not apply on top of current -arm master:
> > 
> >    commit 1052ea04d60de953f8355eab0e39336974283304
> >    Author: Sanjeev Premi <premi@ti.com>
> >    Date:   Mon Sep 5 00:25:53 2011 +0000
> > 
> >      omap3: beagle: Fix build warning
> > 
> > With this message:
> > 
> >    Applying: omap: gpio: Use generic API
> >    error: patch failed: arch/arm/cpu/armv7/omap-common/gpio.c:151
> >    error: arch/arm/cpu/armv7/omap-common/gpio.c: patch does 
> not apply
> >    error: patch failed: arch/arm/include/asm/omap_gpio.h:49
> >    error: arch/arm/include/asm/omap_gpio.h: patch does not apply
> >    Patch failed at 0001 omap: gpio: Use generic API
> > 
> > I'm afraid think you need another rebase.
> 
> When I rebased, arm/master was at:
> 58c583b : net: Check network device driver name
> 
> Anyways, fresh rebase coming in next hour...

[sp] Actually, I realized that PATCH 1 in the series depends upon:
     http://marc.info/?l=u-boot&m=131515805732292&w=2

     I had mentioned 2 patches in the cover letter. Of the two,
     one is already included in u-boot-arm/master. This one is
     still not.

     Can you apply this patch and then try to apply this series?

~sanjeev

> 
> ~sanjeev
> 
> > 
> > Luca
> > 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

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

* [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom)
  2011-09-07  9:48     ` Premi, Sanjeev
@ 2011-09-08 12:51       ` Luca Ceresoli
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Ceresoli @ 2011-09-08 12:51 UTC (permalink / raw)
  To: u-boot

Premi, Sanjeev wrote:
> [sp] Actually, I realized that PATCH 1 in the series depends upon:
>       http://marc.info/?l=u-boot&m=131515805732292&w=2
>
>       I had mentioned 2 patches in the cover letter. Of the two,
>       one is already included in u-boot-arm/master. This one is
>       still not.
>
>       Can you apply this patch and then try to apply this series?

That did work. Compiled and tested on the dig297 board.

Tested-by: Luca Ceresoli <luca.ceresoli@comelit.it>

Luca

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

end of thread, other threads:[~2011-09-08 12:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 20:28 [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Sanjeev Premi
2011-09-05 20:28 ` [U-Boot] [PATCH 1/3] omap: gpio: Use generic API Sanjeev Premi
2011-09-05 20:28 ` [U-Boot] [PATCH 2/3] omap: gpio: generic changes after changing API Sanjeev Premi
2011-09-05 20:28 ` [U-Boot] [PATCH 3/3] omap: gpio: Adapt board files to use generic API Sanjeev Premi
2011-09-05 20:46 ` [U-Boot] [PATCH 0/3] omap: gpio: Use generic API (instead of custom) Paulraj, Sandeep
2011-09-07  9:24 ` Luca Ceresoli
2011-09-07  9:39   ` Premi, Sanjeev
2011-09-07  9:48     ` Premi, Sanjeev
2011-09-08 12:51       ` Luca Ceresoli

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.