Re: [U-Boot] [PATCH 1/2] gpio: Add driver for Altera's PIO core

2011-10-21 Thread Thomas Chou
On 10/17/2011 11:36 PM, Joachim Foerster wrote:
 This driver may handle multiple PIO cores and thus needs to be
 setup by calling the altera_pio_init() function within the early
 board setup routine.

 The driver comes with some extras, see below the copyleft header.

 Signed-off-by: Joachim Foersterjoachim.foers...@missinglinkelectronics.com
 ---
   arch/nios2/include/asm/gpio.h  |   13 +-
   board/altera/nios2-generic/custom_fpga.h   |1 +
   board/altera/nios2-generic/nios2-generic.c |8 +
   drivers/gpio/Makefile  |1 +
   drivers/gpio/altera_pio.c  |  299 
 
   5 files changed, 320 insertions(+), 2 deletions(-)
   create mode 100644 drivers/gpio/altera_pio.c

Hi Joachim,

Please fix these warning. Thanks.

$ ./MAKEALL nios2-generic
Configuring for nios2-generic board...
altera_pio.c: In function `altera_pio_info':
altera_pio.c:189: warning: ` ' flag used with `%u' printf format

checkpatch.pl

ERROR: do not initialise statics to 0 or NULL
#209: FILE: drivers/gpio/altera_pio.c:71:
+static int pio_num = 0;

ERROR: do not initialise statics to 0 or NULL
#217: FILE: drivers/gpio/altera_pio.c:79:
+static int pio_gpio_num = 0;


Otherwise,
Tested-by: Thomas Chou tho...@wytron.com.tw

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


Re: [U-Boot] [PATCH 1/2] gpio: Add driver for Altera's PIO core

2011-10-21 Thread Joachim Foerster
On 10/21/2011 09:21 AM, Thomas Chou wrote:
 On 10/17/2011 11:36 PM, Joachim Foerster wrote:
 This driver may handle multiple PIO cores and thus needs to be
 setup by calling the altera_pio_init() function within the early
 board setup routine.

 The driver comes with some extras, see below the copyleft header.

 Signed-off-by: Joachim
 Foersterjoachim.foers...@missinglinkelectronics.com
 ---
 arch/nios2/include/asm/gpio.h | 13 +-
 board/altera/nios2-generic/custom_fpga.h | 1 +
 board/altera/nios2-generic/nios2-generic.c | 8 +
 drivers/gpio/Makefile | 1 +
 drivers/gpio/altera_pio.c | 299 
 5 files changed, 320 insertions(+), 2 deletions(-)
 create mode 100644 drivers/gpio/altera_pio.c

 Hi Joachim,

 Please fix these warning. Thanks.

 $ ./MAKEALL nios2-generic
 Configuring for nios2-generic board...
 altera_pio.c: In function `altera_pio_info':
 altera_pio.c:189: warning: ` ' flag used with `%u' printf format

Ok, I'll use %d - in this case it is the same. Does anybody know why %u 
warns about space-flag usage? Is space-flag + %u indeed evil ?

 Otherwise,
 Tested-by: Thomas Chou tho...@wytron.com.tw

 Best regards,
 Thomas

Thanks for reviewing.

-- 
Joachim Foerster

Missing Link Electronics
http://www.missinglinkelectronics.com
Office EU: +49 (731) 141-149-0
Office US: +1  (408) 457-0700
email: joachim.foers...@missinglinkelectronics.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot