[U-Boot] [PATCH v4] [U-BOOT] Zoom3: Add support for OMAP3630 Zoom3 board.

2010-07-15 Thread Aldo Cedillo
From: Aldo Brett Cedillo Martinez aldo.cedi...@ti.com

This patch gives basic functionality to OMAP3630 Zoom3 board.

This version has been rebased againts u-boot-ti

Signed-off-by: Aldo Brett Cedillo Martinez aldo.cedi...@ti.com
---
 MAINTAINERS|4 +
 MAKEALL|1 +
 board/logicpd/zoom3/Makefile   |   54 +++
 board/logicpd/zoom3/config.mk  |   33 +
 board/logicpd/zoom3/debug_board.c  |   66 +
 board/logicpd/zoom3/led.c  |  133 +
 board/logicpd/zoom3/zoom3.c|  201 ++
 board/logicpd/zoom3/zoom3.h|  164 +
 board/logicpd/zoom3/zoom3_serial.c |  132 +
 board/logicpd/zoom3/zoom3_serial.h |   76 ++
 boards.cfg |1 +
 common/serial.c|2 +
 include/configs/omap3_zoom3.h  |  274 
 include/serial.h   |7 +
 14 files changed, 1148 insertions(+), 0 deletions(-)
 create mode 100644 board/logicpd/zoom3/Makefile
 create mode 100644 board/logicpd/zoom3/config.mk
 create mode 100644 board/logicpd/zoom3/debug_board.c
 create mode 100644 board/logicpd/zoom3/led.c
 create mode 100644 board/logicpd/zoom3/zoom3.c
 create mode 100644 board/logicpd/zoom3/zoom3.h
 create mode 100644 board/logicpd/zoom3/zoom3_serial.c
 create mode 100644 board/logicpd/zoom3/zoom3_serial.h
 create mode 100644 include/configs/omap3_zoom3.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 1520312..260fda3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -813,6 +813,10 @@ Alex Z
lartSA1100
dnp1110 SA1110
 
+Aldo Brett Cedillo Martinez aldo.cedi...@ti.com
+
+   omap3_zoom3 ARM CORTEX-A8 (OMAP3xx SoC)
+
 -
 
 Unknown / orphaned boards:
diff --git a/MAKEALL b/MAKEALL
index 2e98b6c..4254a5c 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -657,6 +657,7 @@ LIST_ARMV7=\
omap3_sdp3430   \
omap3_zoom1 \
omap3_zoom2 \
+   omap3_zoom3 \
omap4_panda \
omap4_sdp4430   \
s5p_goni\
diff --git a/board/logicpd/zoom3/Makefile b/board/logicpd/zoom3/Makefile
new file mode 100644
index 000..79c02ab
--- /dev/null
+++ b/board/logicpd/zoom3/Makefile
@@ -0,0 +1,54 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+# Aldo Cedillo aldo.cedi...@ti.com
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS-y := $(BOARD).o
+COBJS-y += debug_board.o
+COBJS-y += zoom3_serial.o
+COBJS-$(CONFIG_STATUS_LED) += led.o
+
+COBJS  := $(sort $(COBJS-y))
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+#defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/logicpd/zoom3/config.mk b/board/logicpd/zoom3/config.mk
new file mode 100644
index 000..33f394b
--- /dev/null
+++ b/board/logicpd/zoom3/config.mk
@@ -0,0 +1,33 @@
+#
+# (C) Copyright 2009
+# Texas Instruments, www.ti.com
+#
+# Zoom II uses OMAP3 (ARM-CortexA8) CPU
+# see http://www.ti.com/ for more information on Texas Instruments
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# 

Re: [U-Boot] [PATCH v4] [U-BOOT] Zoom3: Add support for OMAP3630 Zoom3 board.

2010-07-15 Thread Wolfgang Denk
Dear Aldo Cedillo,

In message 1279231344-16448-1-git-send-email-aldo.cedi...@ti.com you wrote:
 From: Aldo Brett Cedillo Martinez aldo.cedi...@ti.com
 
 This patch gives basic functionality to OMAP3630 Zoom3 board.
 
 This version has been rebased againts u-boot-ti
 
 Signed-off-by: Aldo Brett Cedillo Martinez aldo.cedi...@ti.com
 ---
  MAINTAINERS|4 +
  MAKEALL|1 +
  board/logicpd/zoom3/Makefile   |   54 +++
  board/logicpd/zoom3/config.mk  |   33 +
  board/logicpd/zoom3/debug_board.c  |   66 +
  board/logicpd/zoom3/led.c  |  133 +
  board/logicpd/zoom3/zoom3.c|  201 ++
  board/logicpd/zoom3/zoom3.h|  164 +
  board/logicpd/zoom3/zoom3_serial.c |  132 +
  board/logicpd/zoom3/zoom3_serial.h |   76 ++
  boards.cfg |1 +
  common/serial.c|2 +
  include/configs/omap3_zoom3.h  |  274 
 
  include/serial.h   |7 +
  14 files changed, 1148 insertions(+), 0 deletions(-)
  create mode 100644 board/logicpd/zoom3/Makefile
  create mode 100644 board/logicpd/zoom3/config.mk
  create mode 100644 board/logicpd/zoom3/debug_board.c
  create mode 100644 board/logicpd/zoom3/led.c
  create mode 100644 board/logicpd/zoom3/zoom3.c
  create mode 100644 board/logicpd/zoom3/zoom3.h
  create mode 100644 board/logicpd/zoom3/zoom3_serial.c
  create mode 100644 board/logicpd/zoom3/zoom3_serial.h
  create mode 100644 include/configs/omap3_zoom3.h
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index 1520312..260fda3 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -813,6 +813,10 @@ Alex Z
   lartSA1100
   dnp1110 SA1110
  
 +Aldo Brett Cedillo Martinez aldo.cedi...@ti.com
 +
 + omap3_zoom3 ARM CORTEX-A8 (OMAP3xx SoC)
 +

Please keep list sorted. Martinez goes between Lapin and Menon,
it seems.


 +static void zoom3_debug_board_detect(void)
 +{
 + int val = 0;
 +
 + /*
 +  * TODO gpio 158 is UART1_RX, should we make a macro of this
 +  * instead of the raw number?
 +  */

What a question - yes, you should!

...
 +#include common.h
 +#include netdev.h
 +#ifdef CONFIG_STATUS_LED
 +#include status_led.h
 +#endif

Would it hurt to include status_led.h unconditionally?


 +int misc_init_r(void)
 +{
 + zoom3_identify();
 + #if (CONFIG_TWL4030_POWER)
 + twl4030_power_init();
 + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
 + #endif

Please unindent the preprocessor statements.  Check and fix globally,
please.

...
 +#define CONFIG_SYS_TIMERBASE (OMAP36XX_GPT2)
 +#define CONFIG_SYS_PTV   7   /* 2^(PTV+1) */
 +#define CONFIG_SYS_HZ((V_SCLK) / (2  
 CONFIG_SYS_PTV))

NAK!!!

CONFIG_SYS_HZ is a constant and must always be 1000.


...
 diff --git a/include/serial.h b/include/serial.h
 index 6513d8e..236e5d1 100644
 --- a/include/serial.h
 +++ b/include/serial.h
 @@ -66,6 +66,13 @@ extern struct serial_device zoom2_serial_device2;
  extern struct serial_device zoom2_serial_device3;
  #endif
  
 +#if defined(CONFIG_OMAP3_ZOOM3)
 +extern struct serial_device zoom3_serial_device0;
 +extern struct serial_device zoom3_serial_device1;
 +extern struct serial_device zoom3_serial_device2;
 +extern struct serial_device zoom3_serial_device3;
 +#endif
 +
  extern struct serial_device serial_ffuart_device;
  extern struct serial_device serial_btuart_device;
  extern struct serial_device serial_stuart_device;

This is becoming a serious mess. Isn't there a way to avoid this?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
People are always a lot more complicated than you  think.  It's  very
important to remember that. - Terry Pratchett, _Truckers_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot