Re: [U-Boot] [PATCH] Blackfin: cmd_gpio: allow port pins over 15

2011-04-11 Thread Andreas Pretzsch
Am Freitag, den 08.04.2011, 16:24 -0400 schrieb Mike Frysinger:
 this is obsoleted by my recent patch:
   [U-Boot] [PATCH] gpio: generalize for all generic gpio providers
 -mike

ACK. Thanks very much for your work.


-- 

carpe noctem engineering
Ingenieurbuero fuer Hard-  Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch  Tel. +49-(0)731-5521572
Hahnengasse 3 Fax: +49-(0)731-5521573
89073 Ulm, Germanyemail: a...@cn-eng.de

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Blackfin: cmd_gpio: allow port pins over 15

2011-04-08 Thread Mike Frysinger
this is obsoleted by my recent patch:
[U-Boot] [PATCH] gpio: generalize for all generic gpio providers
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Blackfin: cmd_gpio: allow port pins over 15

2011-01-10 Thread Andreas Pretzsch
The pin portion of the specified GPIO was limited to 0..15.
While this is correct for Blackfins with different bank names (e.g.
BF537 with PF, PG, PH with 16 pins each), it's not sufficient for
Blackfins with linear naming like the BF561 (PF0..PF47).
Therefore check only for a valid GPIO number.

Attn.: Passing a # too high for the port will wrap over to the next
port(s), e.g. PA16 = PB0. Not a problem for correct scripts, though.

Signed-off-by: Andreas Pretzsch a...@cn-eng.de
---
 arch/blackfin/cpu/cmd_gpio.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/blackfin/cpu/cmd_gpio.c b/arch/blackfin/cpu/cmd_gpio.c
index e96413b..9fd5a19 100644
--- a/arch/blackfin/cpu/cmd_gpio.c
+++ b/arch/blackfin/cpu/cmd_gpio.c
@@ -83,7 +83,11 @@ int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * 
const argv[])
 
/* grab the # portion */
ulong pin = simple_strtoul(str_pin + 1, NULL, 10);
-   if (pin  15)
+   /* Attn.: passing a # too high for the port will wrap over to
+* the next port(s), e.g. PA16 = PB0.
+* Check relaxed due to linear ports (e.g. PF0..PF47 @ BF561).
+*/
+   if (!gpio_is_valid(pin))
goto show_usage;
 
/* grab the pin before we tweak it */
-- 
1.7.2.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot