Skip to contentSkip to conversation

ZOOM2 Add initial support for Zoom2

PATCH New Tom Rix 2 participants 11 messages Apr 28, 2009 – Apr 30, 2009 Kbuild

lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/5 ZOOM2 Add initial support for Zoom2

Zoom2 is a new board from Texas Instruments and LogicPD

The logicpd web site is a good source for general information on this board. Please start looking here if the below links are broken.
http://www.logicpd.com

This is a pdf of the product
http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf
This is the product description web page
http://www.logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp

This patch provides a zoom2 base target by copying zoom1 and by making some obvious changes.

To configure, run
make omap3_zoom2_config

---
 MAINTAINERS                       |    4 +
 MAKEALL                           |    1 +
 Makefile                          |    3 +
 board/omap3/beagle/u-boot.lds     |   63 ----------
 board/omap3/common/Makefile       |    1 +
 board/omap3/evm/u-boot.lds        |   63 ----------
 board/omap3/overo/u-boot.lds      |   63 ----------
 board/omap3/pandora/u-boot.lds    |   63 ----------
 board/omap3/zoom1/u-boot.lds      |   63 ----------
 board/omap3/zoom2/Makefile        |   49 ++++++++
 board/omap3/zoom2/config.mk       |   33 +++++
 board/omap3/zoom2/zoom2.c         |   76 ++++++++++++
 board/omap3/zoom2/zoom2.h         |  151 +++++++++++++++++++++++
 cpu/arm_cortexa8/omap3/config.mk  |    2 +
 cpu/arm_cortexa8/omap3/u-boot.lds |   58 +++++++++
 doc/README.omap3                  |   13 ++
 include/configs/omap3_zoom2.h     |  245 +++++++++++++++++++++++++++++++++++++
 17 files changed, 636 insertions(+), 315 deletions(-)
 delete mode 100644 board/omap3/beagle/u-boot.lds
 delete mode 100644 board/omap3/evm/u-boot.lds
 delete mode 100644 board/omap3/overo/u-boot.lds
 delete mode 100644 board/omap3/pandora/u-boot.lds
 delete mode 100644 board/omap3/zoom1/u-boot.lds
 create mode 100644 board/omap3/zoom2/Makefile
 create mode 100644 board/omap3/zoom2/config.mk
 create mode 100644 board/omap3/zoom2/zoom2.c
 create mode 100644 board/omap3/zoom2/zoom2.h
 create mode 100644 cpu/arm_cortexa8/omap3/u-boot.lds
 create mode 100644 include/configs/omap3_zoom2.h
MAINTAINERS +4 -0
index 6bb03b4..e19fd0f 100644
@@ -615,6 +615,10 @@ Stelian Pop <[email protected]>
 	at91sam9263ek	ARM926EJS (AT91SAM9263 SoC)
 	at91sam9rlek	ARM926EJS (AT91SAM9RL SoC)
 
+Tom Rix <[email protected]>
+
+	omap3_zoom2	ARM CORTEX-A8 (OMAP3xx SoC)
+
 Stefan Roese <[email protected]>
 
 	ixdpg425	xscale
MAKEALL +1 -0
index f13c81a..46a96c0 100755
@@ -561,6 +561,7 @@ LIST_ARM_CORTEX_A8="		\
 	omap3_evm		\
 	omap3_pandora		\
 	omap3_zoom1		\
+	omap3_zoom2		\
 "
 
 #########################################################################
Makefile +3 -0
index c52894c..a9f0d36 100644
@@ -2983,6 +2983,9 @@ omap3_pandora_config :	unconfig
 omap3_zoom1_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom1 omap3 omap3
 
+omap3_zoom2_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 omap3 omap3
+
 #########################################################################
 ## XScale Systems
 #########################################################################
board/omap3/beagle/u-boot.lds deleted +0 -63

63 lines not on this page · raw message

board/omap3/common/Makefile +1 -0
index 7b892fa..b8a0b14 100644
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_OMAP3_BEAGLE) += power.o
 COBJS-$(CONFIG_OMAP3_OVERO) += power.o
 COBJS-$(CONFIG_OMAP3_PANDORA) += power.o
 COBJS-$(CONFIG_OMAP3_ZOOM1) += power.o
+COBJS-$(CONFIG_OMAP3_ZOOM2) += power.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(COBJS:.o=.c)
board/omap3/evm/u-boot.lds deleted +0 -63

63 lines not on this page · raw message

board/omap3/overo/u-boot.lds deleted +0 -63

63 lines not on this page · raw message

board/omap3/pandora/u-boot.lds deleted +0 -63

63 lines not on this page · raw message

board/omap3/zoom1/u-boot.lds deleted +0 -63

63 lines not on this page · raw message

board/omap3/zoom2/Makefile new file +49 -0

49 lines not on this page · raw message

board/omap3/zoom2/config.mk new file +33 -0
new file mode 100644
index 0000000..33f394b
@@ -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
+# 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
+#
+# Physical Address:
+# 0x80000000 (bank0)
+# 0xA0000000 (bank1)
+# Linux-Kernel is expected to be at 0x80008000, entry 0x80008000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
board/omap3/zoom2/zoom2.c new file +76 -0

76 lines not on this page · raw message

board/omap3/zoom2/zoom2.h new file +151 -0

151 lines not on this page · raw message

cpu/arm_cortexa8/omap3/config.mk +2 -0
index fbb753e..7fd364e 100644
@@ -34,3 +34,5 @@ PLATFORM_CPPFLAGS +=$(call cc-option)
 PLATFORM_CPPFLAGS +=$(call cc-option,-mno-thumb-interwork,)
 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\
 		    $(call cc-option,-malignment-traps,))
+
+LDSCRIPT := $(SRCTREE)/cpu/arm_cortexa8/omap3/u-boot.lds
cpu/arm_cortexa8/omap3/u-boot.lds new file +58 -0

58 lines not on this page · raw message

doc/README.omap3 +13 -0
index 1ba307f..0dbae9b 100644
@@ -19,6 +19,8 @@ Currently the following boards are supported:
 
 * TI/Logic PD Zoom MDK [6]
 
+* TI/Logic PD Zoom 2 [8]
+
 Toolchain
 =========
 
@@ -54,6 +56,11 @@ make
 make omap3_zoom1_config
 make
 
+* Zoom 2:
+
+make omap3_zoom2_config
+make
+
 Custom commands
 ===============
 
@@ -114,3 +121,9 @@ http://www.logicpd.com/products/devkit/ti/zoom_mobile_development_kit
 [7] TI OMAP3 U-Boot:
 
 http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz
+
+[8] TI/Logic PD Zoom 2
+
+http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf
+
+
include/configs/omap3_zoom2.h new file +245 -0

245 lines not on this page · raw message

Signature · 1 line
1.6.0.5
author
#1 lore raw

PATCH 2/5 OMAP3 Port kernel omap gpio interface.

Port the linux kernel's omap gpio interface to u-boot. The orignal source is in linux/arch/arm/plat-omap/gpio.c

See doc/README.omap3 for instructions on use.

---
 cpu/arm_cortexa8/omap3/Makefile   |    1 +
 cpu/arm_cortexa8/omap3/gpio.c     |  177 +++++++++++++++++++++++++++++++++++++
 doc/README.omap3                  |   32 +++++++
 include/asm-arm/arch-omap3/gpio.h |   93 +++++++++++++++++++
 4 files changed, 303 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm_cortexa8/omap3/gpio.c
 create mode 100644 include/asm-arm/arch-omap3/gpio.h
cpu/arm_cortexa8/omap3/Makefile +1 -0
index edf5cb2..50176ee 100644
@@ -29,6 +29,7 @@ SOBJS	:= lowlevel_init.o
 
 COBJS	+= board.o
 COBJS	+= clock.o
+COBJS	+= gpio.o
 COBJS	+= mem.o
 COBJS	+= syslib.o
 COBJS	+= sys_info.o
cpu/arm_cortexa8/omap3/gpio.c new file +177 -0

177 lines not on this page · raw message

doc/README.omap3 +32 -0
index 0dbae9b..84fe9b9 100644
@@ -84,6 +84,38 @@ For all other commands see
 
 help
 
+Interfaces
+==========
+
+gpio
+
+To set a bit :
+
+	if (!omap_request_gpio(N)) {
+		omap_set_gpio_direction(N, 0);
+		omap_set_gpio_dataout(N, 1);
+	}
+
+To clear a bit :
+
+	if (!omap_request_gpio(N)) {
+		omap_set_gpio_direction(N, 0);
+		omap_set_gpio_dataout(N, 0);
+	}
+
+To read a bit :
+
+	if (!omap_request_gpio(N)) {
+		omap_set_gpio_direction(NULL, 1);
+		val = omap_get_gpio_datain(N);
+		omap_free_gpio(N);
+	}
+	if (val)
+		printf("GPIO N is set\n");
+	else
+		printf("GPIO N is clear\n");
+
+
 Acknowledgements
 ================
 
include/asm-arm/arch-omap3/gpio.h new file +93 -0

93 lines not on this page · raw message

Signature · 1 line
1.6.0.5
author
#2 lore raw

PATCH 3/5 ZOOM2 Add support for debug board detection.

The logicpd web site is a good source for general information on this board. Please start looking here if the below links are broken.
http://www.logicpd.com

This is a pdf of the product
http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf

This is a pdf of the product quick start guide.
The debug board is described here.
http://support.logicpd.com/downloads/1165/

This is a wiki showing the debug board in use
https://omapzoom.org/gf/project/omapzoom/wiki/?pagename=GettingStartedWithZoomII_AKA_OMAP34XII_MDP

The zoom2 has an auxillary board that contains the serial, net, jtag and battery simulator. This change supports a runtime check if the debug board is connected.

---
 board/omap3/zoom2/Makefile      |    3 +-
 board/omap3/zoom2/debug_board.c |   58 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletions(-)
 create mode 100644 board/omap3/zoom2/debug_board.c
board/omap3/zoom2/Makefile +2 -1
index 088b8cb..b8fa5a7 100644
@@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= zoom2.o
+COBJS	:= zoom2.o \
+	debug_board.o
 
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/omap3/zoom2/debug_board.c new file +58 -0

58 lines not on this page · raw message

Signature · 1 line
1.6.0.5
author
#3 lore raw

PATCH 4/5 ZOOM2 Add serial support.

Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board. The default serial is from the USB connector on left side of the debug board. The USB connector will produce 2 of the 4 UARTS. On your host pick the first enumeration.

The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.

The kernel bootargs are
console=ttyS3,115200n8

---
 board/omap3/zoom2/Makefile       |    3 +-
 board/omap3/zoom2/zoom2.c        |   30 +++++++++
 board/omap3/zoom2/zoom2_serial.c |  130 ++++++++++++++++++++++++++++++++++++++
 board/omap3/zoom2/zoom2_serial.h |   75 ++++++++++++++++++++++
 common/serial.c                  |    2 +
 drivers/serial/ns16550.c         |    4 +-
 include/configs/omap3_zoom2.h    |   28 ++++----
 include/serial.h                 |    7 ++
 8 files changed, 262 insertions(+), 17 deletions(-)
 create mode 100644 board/omap3/zoom2/zoom2_serial.c
 create mode 100644 board/omap3/zoom2/zoom2_serial.h
board/omap3/zoom2/Makefile +2 -1
index b8fa5a7..d27990c 100644
@@ -26,7 +26,8 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= zoom2.o \
-	debug_board.o
+	debug_board.o \
+	zoom2_serial.o
 
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/omap3/zoom2/zoom2.c +30 -0
index 0700c56..a2a5b5a 100644
@@ -30,10 +30,24 @@
  */
 #include <common.h>
 #include <asm/io.h>
+#include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-types.h>
 #include "zoom2.h"
+#include "zoom2_serial.h"
+
+extern void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base,
+			       u32 base, u32 size);
+
+static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = {
+	0x00011000,
+	0x001F1F01,
+	0x00080803,
+	0x1D091D09,
+	0x041D1F1F,
+	0x1D0904C4, 0
+};
 
 /*
  * Routine: board_init
@@ -42,13 +56,29 @@
 int board_init (void)
 {
 	DECLARE_GLOBAL_DATA_PTR;
+	gpmc_csx_t *serial_cs_base;
+	u32 *gpmc_config;
 
 	gpmc_init ();		/* in SRAM or SDRAM, finish GPMC */
+
+	/* Configure console support on zoom2 */
+	gpmc_config = gpmc_serial_TL16CP754C;
+	serial_cs_base = (gpmc_csx_t *) (GPMC_CONFIG_CS0_BASE +
+					 (3 * GPMC_CONFIG_WIDTH));
+	enable_gpmc_config(gpmc_config,
+			   serial_cs_base,
+			   SERIAL_TL16CP754C_BASE,
+			   GPMC_SIZE_16M);
+
 	/* board id for Linux */
 	gd->bd->bi_arch_number = MACH_TYPE_OMAP_ZOOM2;
 	/* boot param addr */
 	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
 
+#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
+	status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
+#endif
+
 	return 0;
 }
 
board/omap3/zoom2/zoom2_serial.c new file +130 -0

130 lines not on this page · raw message

board/omap3/zoom2/zoom2_serial.h new file +75 -0

75 lines not on this page · raw message

common/serial.c +2 -0
index 09385d0..3e9135b 100644
@@ -68,6 +68,8 @@ struct serial_device *__default_serial_console (void)
 #else
 #error "CONFIG_SERIAL? missing."
 #endif
+#elif defined(CONFIG_OMAP3_ZOOM2)
+		return DEFAULT_ZOOM2_SERIAL_DEVICE;
 #else
 #error No default console
 #endif
drivers/serial/ns16550.c +2 -2
index 657c9da..2fcc8c3 100644
@@ -17,7 +17,7 @@
 void NS16550_init (NS16550_t com_port, int baud_divisor)
 {
 	com_port->ier = 0x00;
-#ifdef CONFIG_OMAP
+#if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 	com_port->mdr1 = 0x7;	/* mode select reset TL16C750*/
 #endif
 	com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
@@ -30,7 +30,7 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)
 	com_port->dll = baud_divisor & 0xff;
 	com_port->dlm = (baud_divisor >> 8) & 0xff;
 	com_port->lcr = UART_LCRVAL;
-#if defined(CONFIG_OMAP)
+#if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 #if defined(CONFIG_APTIX)
 	com_port->mdr1 = 3;	/* /13 mode so Aptix 6MHz can hit 115200 */
 #else
include/configs/omap3_zoom2.h +14 -14
index 1517145..8f09dd8 100644
@@ -69,26 +69,26 @@
 
 /*
  * NS16550 Configuration
+ * Zoom2 uses the TL16CP754C on the debug board
  */
-#define V_NS16550_CLK			48000000	/* 48MHz (APLL96/2) */
-
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
-#define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
-
+#define CONFIG_SERIAL_MULTI      1
 /*
- * select serial console configuration
+ * 0 - 1 : first  USB with respect to the left edge of the debug board
+ * 2 - 3 : second USB with respect to the left edge of the debug board
  */
-#define CONFIG_CONS_INDEX		3
-#define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
-#define CONFIG_SERIAL3			3	/* UART3 */
+#define DEFAULT_ZOOM2_SERIAL_DEVICE (&zoom2_serial_device0)
+
+#define V_NS16550_CLK            (1843200)  /* 1.8432 Mhz */
+
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_REG_SIZE     (-2)
+#define CONFIG_SYS_NS16550_CLK          V_NS16550_CLK
+#define CONFIG_BAUDRATE          115200
+#define CONFIG_SYS_BAUDRATE_TABLE   {115200}
 
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
-#define CONFIG_BAUDRATE			115200
-#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
-					115200}
+
 #define CONFIG_MMC			1
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
include/serial.h +7 -0
index e3d8b36..aca5221 100644
@@ -42,6 +42,13 @@ extern struct serial_device s3c24xx_serial1_device;
 extern struct serial_device s3c24xx_serial2_device;
 #endif
 
+#if defined(CONFIG_OMAP3_ZOOM2)
+extern struct serial_device zoom2_serial_device0;
+extern struct serial_device zoom2_serial_device1;
+extern struct serial_device zoom2_serial_device2;
+extern struct serial_device zoom2_serial_device3;
+#endif
+
 extern struct serial_device serial_ffuart_device;
 extern struct serial_device serial_btuart_device;
 extern struct serial_device serial_stuart_device;
Signature · 1 line
1.6.0.5
author
#4 lore raw

PATCH 5/5 ZOOM2 Add led support.

This patch controls the large LED on the top left of the zoom2.

---
 board/omap3/zoom2/Makefile    |    8 ++-
 board/omap3/zoom2/led.c       |  125 +++++++++++++++++++++++++++++++++++++++++
 board/omap3/zoom2/zoom2.c     |    4 +-
 include/configs/omap3_zoom2.h |   16 +++++
 4 files changed, 149 insertions(+), 4 deletions(-)
 create mode 100644 board/omap3/zoom2/led.c
board/omap3/zoom2/Makefile +5 -3
index d27990c..4a716da 100644
@@ -25,10 +25,12 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= zoom2.o \
-	debug_board.o \
-	zoom2_serial.o
+COBJS-y := $(BOARD).o
+COBJS-y += debug_board.o
+COBJS-y += zoom2_serial.o
+COBJS-${CONFIG_STATUS_LED}   += led.o
 
+COBJS	:= $(sort $(COBJS-y))
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 
board/omap3/zoom2/led.c new file +125 -0

125 lines not on this page · raw message

board/omap3/zoom2/zoom2.c +3 -1
index a2a5b5a..f58c8e6 100644
@@ -29,6 +29,9 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#ifdef CONFIG_STATUS_LED
+#include <status_led.h>
+#endif
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
@@ -78,7 +81,6 @@ int board_init (void)
 #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
 	status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
 #endif
-
 	return 0;
 }
 
include/configs/omap3_zoom2.h +16 -0
index 8f09dd8..a04d1f3 100644
@@ -93,6 +93,22 @@
 #define CONFIG_OMAP3_MMC		1
 #define CONFIG_DOS_PARTITION		1
 
+/* Status LED */
+#define CONFIG_STATUS_LED		1 /* Status LED enabled	*/
+#define CONFIG_BOARD_SPECIFIC_LED	1
+#define STATUS_LED_BLUE			0
+#define STATUS_LED_RED			1
+/* Blue */
+#define STATUS_LED_BIT			STATUS_LED_BLUE
+#define STATUS_LED_STATE		STATUS_LED_ON
+#define STATUS_LED_PERIOD		(CONFIG_SYS_HZ / 2)
+/* Red */
+#define STATUS_LED_BIT1			STATUS_LED_RED
+#define STATUS_LED_STATE1		STATUS_LED_OFF
+#define STATUS_LED_PERIOD1		(CONFIG_SYS_HZ / 2)
+/* Optional value */
+#define STATUS_LED_BOOT			STATUS_LED_BIT
+
 /* commands to include */
 #include <config_cmd_default.h>
 
Signature · 1 line
1.6.0.5
#5 lore raw

PATCH 5/5 ZOOM2 Add led support.

Quoted 16 lines · Tom Rix

This patch controls the large LED on the top left of the zoom2.

---
 board/omap3/zoom2/Makefile    |    8 ++-
 board/omap3/zoom2/led.c       |  125 +++++++++++++++++++++++++++++++++++++++++
 board/omap3/zoom2/zoom2.c     |    4 +-
 include/configs/omap3_zoom2.h |   16 +++++
 4 files changed, 149 insertions(+), 4 deletions(-)
 create mode 100644 board/omap3/zoom2/led.c
board/omap3/zoom2/Makefile +0 -0
index d27990c..4a716da 100644

board/omap3/zoom2/Makefile include $(TOPDIR)/config.mk · line 31

Quoted 10 lines
board/omap3/zoom2/Makefile +4 -3
@@ -25,10 +25,12 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= zoom2.o \
-	debug_board.o \
-	zoom2_serial.o
+COBJS-y := $(BOARD).o
+COBJS-y += debug_board.o
+COBJS-y += zoom2_serial.o
+COBJS-${CONFIG_STATUS_LED}   += led.o

$() please

Quoted 42 lines
board/omap3/zoom2/Makefile +1 -0
+COBJS	:= $(sort $(COBJS-y))
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 
board/omap3/zoom2/led.c new file +31 -0
new file mode 100644
index 0000000..6f25eb7
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2009 Wind River Systems, Inc.
+ * Tom Rix <[email protected]>
+ *
+ * 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 <common.h>
+#include <status_led.h>
+#include <asm/arch/cpu.h>
+#include <asm/io.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/arch/gpio.h>
+
+static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF};
+
+/*
+ * GPIO LEDs
+ * 173 red

board/omap3/zoom2/led.c line 41

Quoted 10 lines
board/omap3/zoom2/led.c new file +10 -0
+ * 154 blue
+ * 61  blue2
+ */
+void red_LED_off (void)
+{
+	/* red */
+	if (!omap_request_gpio(173)) {
+		omap_set_gpio_direction(173, 0);
+		omap_set_gpio_dataout(173, 0);
+	}

it will be better to do this at the init of the led

Quoted 99 lines
board/omap3/zoom2/led.c new file +84 -0
+	saved_state[STATUS_LED_RED] = STATUS_LED_OFF;
+}
+
+void blue_LED_off (void)
+{
+	/* blue */
+	if (!omap_request_gpio(154)) {
+		omap_set_gpio_direction(154, 0);
+		omap_set_gpio_dataout(154, 0);
+	}
+
+	/* blue 2 */
+	if (!omap_request_gpio(61)) {
+		omap_set_gpio_direction(61, 0);
+		omap_set_gpio_dataout(64, 0);
+	}
+	saved_state[STATUS_LED_BLUE] = STATUS_LED_OFF;
+}
+
+void red_LED_on (void)
+{
+	blue_LED_off ();
+
+	/* red */
+	if (!omap_request_gpio(173)) {
+		omap_set_gpio_direction(173, 0);
+		omap_set_gpio_dataout(173, 1);
+	}
+	saved_state[STATUS_LED_RED] = STATUS_LED_ON;
+}
+
+void blue_LED_on (void)
+{
+	red_LED_off ();
+
+	/* blue */
+	if (!omap_request_gpio(154)) {
+		omap_set_gpio_direction(154, 0);
+		omap_set_gpio_dataout(154, 1);
+	}
+
+	/* blue 2 */
+	if (!omap_request_gpio(61)) {
+		omap_set_gpio_direction(61, 0);
+		omap_set_gpio_dataout(64, 1);
+	}
+
+	saved_state[STATUS_LED_BLUE] = STATUS_LED_ON;
+}
+
+void __led_init (led_id_t mask, int state)
+{
+	__led_set (mask, state);
+}
+
+void __led_toggle (led_id_t mask)
+{
+	if (STATUS_LED_BLUE == mask) {
+		if (STATUS_LED_ON == saved_state[STATUS_LED_BLUE])
+			blue_LED_off ();
+		else
+			blue_LED_on ();
+	} else if (STATUS_LED_RED == mask) {
+		if (STATUS_LED_ON == saved_state[STATUS_LED_RED])
+			red_LED_off ();
+		else
+			red_LED_on ();
+	}
+}
+
+void __led_set (led_id_t mask, int state)
+{
+	if (STATUS_LED_BLUE == mask) {
+		if (STATUS_LED_ON == state)
+			blue_LED_on ();
+		else
+			blue_LED_off ();
+	} else if (STATUS_LED_RED == mask) {
+		if (STATUS_LED_ON == state)
+			red_LED_on ();
+		else
+			red_LED_off ();
+	}
+}
board/omap3/zoom2/zoom2.c +3 -0
index a2a5b5a..f58c8e6 100644
@@ -29,6 +29,9 @@
  * MA 02111-1307 USA
  */
 #include <common.h>
+#ifdef CONFIG_STATUS_LED
+#include <status_led.h>
+#endif
 #include <asm/io.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>

board/omap3/zoom2/zoom2.c int board_init (void) · line 81

Quoted 4 lines
board/omap3/zoom2/zoom2.c +0 -1
@@ -78,7 +81,6 @@ int board_init (void)
 #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
 	status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
 #endif
-

please do not do clean up at the same time

otherwise fine

Best Regards,
J.

author
#6 lore raw

PATCH 5/5 ZOOM2 Add led support.

Jean-Christophe PLAGNIOL-VILLARD wrote:

<snip>

Quoted 11 lines

board/omap3/zoom2/led.c line 41

Quoted 8 lines
board/omap3/zoom2/led.c new file +7 -0
+void red_LED_off (void)
+{
+	/* red */
+	if (!omap_request_gpio(173)) {
+		omap_set_gpio_direction(173, 0);
+		omap_set_gpio_dataout(173, 0);
+	}

it will be better to do this at the init of the led

There is no init function.
I did not have one because the init is trivial and the led's are used for early board debugging.

Quoted 6 lines
Quoted 6 lines
board/omap3/zoom2/led.c new file +5 -0
+	saved_state[STATUS_LED_RED] = STATUS_LED_OFF;
+}
+
+void blue_LED_off (void)
+

<snip>

Quoted 11 lines

board/omap3/zoom2/zoom2.c int board_init (void) · line 84

Quoted 8 lines

#include <asm/arch/mem.h>
#include <asm/arch/mux.h>

board/omap3/zoom2/zoom2.c +0 -1
@@ -78,7 +81,6 @@ int board_init (void)
 #if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
 	status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
 #endif
-
 

please do not do clean up at the same time

Please explain.

Tom

#7 lore raw

PATCH 4/5 ZOOM2 Add serial support.

In reply to Tom Rix
Quoted 55 lines · Tom Rix

Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board. The default serial is from the USB connector on left side of the debug board. The USB connector will produce 2 of the 4 UARTS. On your host pick the first enumeration.

The serial port set up is the same with Zoom1.
Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.

The kernel bootargs are
console=ttyS3,115200n8

---
 board/omap3/zoom2/Makefile       |    3 +-
 board/omap3/zoom2/zoom2.c        |   30 +++++++++
 board/omap3/zoom2/zoom2_serial.c |  130 ++++++++++++++++++++++++++++++++++++++
 board/omap3/zoom2/zoom2_serial.h |   75 ++++++++++++++++++++++
 common/serial.c                  |    2 +
 drivers/serial/ns16550.c         |    4 +-
 include/configs/omap3_zoom2.h    |   28 ++++----
 include/serial.h                 |    7 ++
 8 files changed, 262 insertions(+), 17 deletions(-)
 create mode 100644 board/omap3/zoom2/zoom2_serial.c
 create mode 100644 board/omap3/zoom2/zoom2_serial.h
board/omap3/zoom2/Makefile +2 -1
index b8fa5a7..d27990c 100644
@@ -26,7 +26,8 @@ include $(TOPDIR)/config.mk
 LIB	= $(obj)lib$(BOARD).a
 
 COBJS	:= zoom2.o \
-	debug_board.o
+	debug_board.o \
+	zoom2_serial.o
 
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/omap3/zoom2/zoom2.c +4 -0
index 0700c56..a2a5b5a 100644
@@ -30,10 +30,24 @@
  */
 #include <common.h>
 #include <asm/io.h>
+#include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-types.h>
 #include "zoom2.h"
+#include "zoom2_serial.h"
+
+extern void enable_gpmc_config(u32 *gpmc_config, gpmc_csx_t *gpmc_cs_base,

board/omap3/zoom2/zoom2.c line 50

Quoted 10 lines
board/omap3/zoom2/zoom2.c +10 -0
+			       u32 base, u32 size);
+
+static u32 gpmc_serial_TL16CP754C[GPMC_MAX_REG] = {
+	0x00011000,
+	0x001F1F01,
+	0x00080803,
+	0x1D091D09,
+	0x041D1F1F,
+	0x1D0904C4, 0
+};

please add a few comment about this value

Quoted 107 lines
board/omap3/zoom2/zoom2.c +66 -0
 /*
  * Routine: board_init
@@ -42,13 +56,29 @@
 int board_init (void)
 {
 	DECLARE_GLOBAL_DATA_PTR;
+	gpmc_csx_t *serial_cs_base;
+	u32 *gpmc_config;
 
 	gpmc_init ();		/* in SRAM or SDRAM, finish GPMC */
+
+	/* Configure console support on zoom2 */
+	gpmc_config = gpmc_serial_TL16CP754C;
+	serial_cs_base = (gpmc_csx_t *) (GPMC_CONFIG_CS0_BASE +
+					 (3 * GPMC_CONFIG_WIDTH));
+	enable_gpmc_config(gpmc_config,
+			   serial_cs_base,
+			   SERIAL_TL16CP754C_BASE,
+			   GPMC_SIZE_16M);
+
 	/* board id for Linux */
 	gd->bd->bi_arch_number = MACH_TYPE_OMAP_ZOOM2;
 	/* boot param addr */
 	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
 
+#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
+	status_led_set (STATUS_LED_BOOT, STATUS_LED_ON);
+#endif
+
 	return 0;
 }
 
 
+void quad_putc_dev (unsigned long base, const char c)
+{
+	if (zoom2_debug_board_connected ()) {
+
+		if (c == '\n')
+			quad_putc_dev (base, '\r');
+
+		NS16550_putc ((NS16550_t) base, c);
+	}
+}
+
+void quad_puts_dev (unsigned long base, const char *s)
+{
+	if (zoom2_debug_board_connected ()) {
+		while ((s != NULL) && (*s != '\0'))
+			quad_putc_dev (base, *s++);
+	}
+}
+
+int quad_getc_dev (unsigned long base)
+{
+	if (zoom2_debug_board_connected ())
+		return NS16550_getc ((NS16550_t) base);
+	else
+		return 0;
+}
+
+int quad_tstc_dev (unsigned long base)
+{
+	if (zoom2_debug_board_connected ())
+		return NS16550_tstc ((NS16550_t) base);
+	else
+		return 0;
+}
+
+void quad_setbrg_dev (unsigned long base)
+{
+	if (zoom2_debug_board_connected ()) {
+
+		int clock_divisor = CONFIG_SYS_NS16550_CLK / 16 /
+			CONFIG_BAUDRATE;
+
+		NS16550_reinit ((NS16550_t) base, clock_divisor);
+	}
+}
+
+QUAD_INIT (0)
+QUAD_INIT (1)
+QUAD_INIT (2)
+QUAD_INIT (3)
board/omap3/zoom2/zoom2_serial.h new file +17 -0
new file mode 100644
index 0000000..ccd42c9
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2009 Wind River Systems, Inc.
+ * Tom Rix <[email protected]>
+ *
+ * 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,

board/omap3/zoom2/zoom2_serial.h line 27

Quoted 10 lines
board/omap3/zoom2/zoom2_serial.h new file +10 -0
+ * MA 02111-1307 USA
+ *
+ */
+
+#ifndef ZOOM2_SERIAL_H
+#define ZOOM2_SERIAL_H
+
+extern int zoom2_debug_board_connected (void);
+
+#define SERIAL_TL16CP754C_BASE	0x10000000      /* Zoom2 Serial chip address */
						  ^^^^^^

whitespace please fix

board/omap3/zoom2/zoom2_serial.h line 29

Quoted 2 lines
board/omap3/zoom2/zoom2_serial.h new file +2 -0
+
+#define QUAD_BASE_0      SERIAL_TL16CP754C_BASE
		      ^^^^^^

whitespace please fix

board/omap3/zoom2/zoom2_serial.h line 30

Quoted 1 line
board/omap3/zoom2/zoom2_serial.h new file +1 -0
+#define QUAD_BASE_1      (SERIAL_TL16CP754C_BASE + 0x100)
		      ^^^^^^

whitespace please fix

board/omap3/zoom2/zoom2_serial.h line 31

Quoted 1 line
board/omap3/zoom2/zoom2_serial.h new file +1 -0
+#define QUAD_BASE_2      (SERIAL_TL16CP754C_BASE + 0x200)
		      ^^^^^^

whitespace please fix

board/omap3/zoom2/zoom2_serial.h line 32

Quoted 1 line
board/omap3/zoom2/zoom2_serial.h new file +1 -0
+#define QUAD_BASE_3      (SERIAL_TL16CP754C_BASE + 0x300)
		      ^^^^^^

whitespace please fix

Quoted 31 lines
board/omap3/zoom2/zoom2_serial.h new file +31 -0
+
+#define S(a) #a
+#define N(a) S(quad##a)
+#define U(a) S(UART##a)
+
+#define QUAD_INIT(n)				\
+int quad_init_##n(void)				\
+{						\
+	return quad_init_dev(QUAD_BASE_##n);	\
+}						\
+void quad_setbrg_##n(void)			\
+{						\
+	quad_setbrg_dev(QUAD_BASE_##n);		\
+}						\
+void quad_putc_##n(const char c)		\
+{						\
+	quad_putc_dev(QUAD_BASE_##n, c);	\
+}						\
+void quad_puts_##n(const char *s)		\
+{						\
+	quad_puts_dev(QUAD_BASE_##n, s);	\
+}						\
+int quad_getc_##n(void)				\
+{						\
+	return quad_getc_dev(QUAD_BASE_##n);	\
+}						\
+int quad_tstc_##n(void)				\
+{						\
+	return quad_tstc_dev(QUAD_BASE_##n);	\
+}						\
+struct serial_device zoom2_serial_device##n =	\

board/omap3/zoom2/zoom2_serial.h line 73

Quoted 10 lines
board/omap3/zoom2/zoom2_serial.h new file +10 -0
+{						\
+	N(n),					\
+	U(n),					\
+	quad_init_##n,				\
+	quad_setbrg_##n,			\
+	quad_getc_##n,				\
+	quad_tstc_##n,				\
+	quad_putc_##n,				\
+	quad_puts_##n,				\
+};

I'm not a fan of this kind of define
a upgrade of the serial API and console device to allow
to provide a struct pointer will be great so we could merge this 2 API

(change not resquested for this patch)

Quoted 45 lines
board/omap3/zoom2/zoom2_serial.h new file +2 -0
+
+#endif /* ZOOM2_SERIAL_H */
common/serial.c +2 -0
index 09385d0..3e9135b 100644
@@ -68,6 +68,8 @@ struct serial_device *__default_serial_console (void)
 #else
 #error "CONFIG_SERIAL? missing."
 #endif
+#elif defined(CONFIG_OMAP3_ZOOM2)
+		return DEFAULT_ZOOM2_SERIAL_DEVICE;
 #else
 #error No default console
 #endif
drivers/serial/ns16550.c +2 -2
index 657c9da..2fcc8c3 100644
@@ -17,7 +17,7 @@
 void NS16550_init (NS16550_t com_port, int baud_divisor)
 {
 	com_port->ier = 0x00;
-#ifdef CONFIG_OMAP
+#if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 	com_port->mdr1 = 0x7;	/* mode select reset TL16C750*/
 #endif
 	com_port->lcr = UART_LCR_BKSE | UART_LCRVAL;
@@ -30,7 +30,7 @@ void NS16550_init (NS16550_t com_port, int baud_divisor)
 	com_port->dll = baud_divisor & 0xff;
 	com_port->dlm = (baud_divisor >> 8) & 0xff;
 	com_port->lcr = UART_LCRVAL;
-#if defined(CONFIG_OMAP)
+#if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
 #if defined(CONFIG_APTIX)
 	com_port->mdr1 = 3;	/* /13 mode so Aptix 6MHz can hit 115200 */
 #else
include/configs/omap3_zoom2.h +0 -0
index 1517145..8f09dd8 100644
@@ -69,26 +69,26 @@
 
 /*
  * NS16550 Configuration

include/configs/omap3_zoom2.h line 74

Quoted 10 lines
include/configs/omap3_zoom2.h +2 -7
+ * Zoom2 uses the TL16CP754C on the debug board
  */
-#define V_NS16550_CLK			48000000	/* 48MHz (APLL96/2) */
-
-#define CONFIG_SYS_NS16550
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
-#define CONFIG_SYS_NS16550_CLK		V_NS16550_CLK
-
+#define CONFIG_SERIAL_MULTI      1
			      ^^^^^^

whitespace please fix

include/configs/omap3_zoom2.h line 81

Quoted 11 lines
include/configs/omap3_zoom2.h +5 -4
 /*
- * select serial console configuration
+ * 0 - 1 : first  USB with respect to the left edge of the debug board
+ * 2 - 3 : second USB with respect to the left edge of the debug board
  */
-#define CONFIG_CONS_INDEX		3
-#define CONFIG_SYS_NS16550_COM3		OMAP34XX_UART3
-#define CONFIG_SERIAL3			3	/* UART3 */
+#define DEFAULT_ZOOM2_SERIAL_DEVICE (&zoom2_serial_device0)
+
+#define V_NS16550_CLK            (1843200)  /* 1.8432 Mhz */
			^^^^^^^^^^^^

whitespace please fix

include/configs/omap3_zoom2.h line 84

Quoted 3 lines
include/configs/omap3_zoom2.h +3 -0
+
+#define CONFIG_SYS_NS16550
+#define CONFIG_SYS_NS16550_REG_SIZE     (-2)
				      ^^^^^

whitespace please fix

include/configs/omap3_zoom2.h line 85

Quoted 1 line
include/configs/omap3_zoom2.h +1 -0
+#define CONFIG_SYS_NS16550_CLK          V_NS16550_CLK
				 ^^^^^^^^^^

whitespace please fix

include/configs/omap3_zoom2.h line 86

Quoted 1 line
include/configs/omap3_zoom2.h +1 -0
+#define CONFIG_BAUDRATE          115200
			  ^^^^^^^^^^

whitespace please fix

include/configs/omap3_zoom2.h line 87

Quoted 1 line
include/configs/omap3_zoom2.h +1 -0
+#define CONFIG_SYS_BAUDRATE_TABLE   {115200}
				    ^^^

whitespace please fix

include/configs/omap3_zoom2.h line 91

Quoted 7 lines
include/configs/omap3_zoom2.h +1 -3
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
-#define CONFIG_BAUDRATE			115200
-#define CONFIG_SYS_BAUDRATE_TABLE	{4800, 9600, 19200, 38400, 57600,\
-					115200}
+

Best Regards,
J.

#8 lore raw

PATCH 3/5 ZOOM2 Add support for debug board detection.

In reply to Tom Rix
Quoted 62 lines · Tom Rix

The logicpd web site is a good source for general information on this board. Please start looking here if the below links are broken.
http://www.logicpd.com

This is a pdf of the product
http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf

This is a pdf of the product quick start guide.
The debug board is described here.
http://support.logicpd.com/downloads/1165/

This is a wiki showing the debug board in use
https://omapzoom.org/gf/project/omapzoom/wiki/?pagename=GettingStartedWithZoomII_AKA_OMAP34XII_MDP

The zoom2 has an auxillary board that contains the serial, net, jtag and battery simulator. This change supports a runtime check if the debug board is connected.

---
 board/omap3/zoom2/Makefile      |    3 +-
 board/omap3/zoom2/debug_board.c |   58 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 1 deletions(-)
 create mode 100644 board/omap3/zoom2/debug_board.c
board/omap3/zoom2/Makefile +2 -1
index 088b8cb..b8fa5a7 100644
@@ -25,7 +25,8 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= zoom2.o
+COBJS	:= zoom2.o \
+	debug_board.o
 
 SRCS	:= $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
board/omap3/zoom2/debug_board.c new file +17 -0
new file mode 100644
index 0000000..55553c9
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2009 Wind River Systems, Inc.
+ * Tom Rix <[email protected]>
+ *
+ * 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,

board/omap3/zoom2/debug_board.c line 27

Quoted 10 lines
board/omap3/zoom2/debug_board.c new file +10 -0
+ * MA 02111-1307 USA
+ *
+ */
+#include <common.h>
+#include <asm/arch/cpu.h>
+#include <asm/io.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/gpio.h>
+
+#define DEBUG_BOARD_CONNECTED     1
				^^^^^

whitespace please fix

board/omap3/zoom2/debug_board.c line 34

Quoted 7 lines
board/omap3/zoom2/debug_board.c new file +7 -0
+#define DEBUG_BOARD_NOT_CONNECTED 0
+
+static int debug_board_connected = DEBUG_BOARD_CONNECTED;
+
+static void zoom2_debug_board_detect (void)
+{
+	int val = 0;

please add an empty line

board/omap3/zoom2/debug_board.c line 47

Quoted 13 lines
board/omap3/zoom2/debug_board.c new file +13 -0
+	if (!omap_request_gpio(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);
+	}
+
+	if (!val)
+		debug_board_connected = DEBUG_BOARD_NOT_CONNECTED;
+}

Best Regards,
J.

#9 lore raw

PATCH 2/5 OMAP3 Port kernel omap gpio interface.

In reply to Tom Rix
Quoted 2 lines · Tom Rix

Port the linux kernel's omap gpio interface to u-boot. The orignal source is in linux/arch/arm/plat-omap/gpio.c

please specify against which kernel commit you import it

Best Regards,
J.

#10 lore raw

PATCH 1/5 ZOOM2 Add initial support for Zoom2

In reply to Tom Rix
Quoted 40 lines · Tom Rix

Zoom2 is a new board from Texas Instruments and LogicPD

The logicpd web site is a good source for general information on this board. Please start looking here if the below links are broken.
http://www.logicpd.com

This is a pdf of the product
http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pdf
This is the product description web page
http://www.logicpd.com/products/development-kits/texas-instruments-zoom%E2%84%A2-omap34x-ii-mdp

This patch provides a zoom2 base target by copying zoom1 and by making some obvious changes.

To configure, run
make omap3_zoom2_config

---
 MAINTAINERS                       |    4 +
 MAKEALL                           |    1 +
 Makefile                          |    3 +
 board/omap3/beagle/u-boot.lds     |   63 ----------
 board/omap3/common/Makefile       |    1 +
 board/omap3/evm/u-boot.lds        |   63 ----------
 board/omap3/overo/u-boot.lds      |   63 ----------
 board/omap3/pandora/u-boot.lds    |   63 ----------
 board/omap3/zoom1/u-boot.lds      |   63 ----------
 board/omap3/zoom2/Makefile        |   49 ++++++++
 board/omap3/zoom2/config.mk       |   33 +++++
 board/omap3/zoom2/zoom2.c         |   76 ++++++++++++
 board/omap3/zoom2/zoom2.h         |  151 +++++++++++++++++++++++
 cpu/arm_cortexa8/omap3/config.mk  |    2 +
 cpu/arm_cortexa8/omap3/u-boot.lds |   58 +++++++++
 doc/README.omap3                  |   13 ++
 include/configs/omap3_zoom2.h     |  245 +++++++++++++++++++++++++++++++++++++
 17 files changed, 636 insertions(+), 315 deletions(-)
 delete mode 100644 board/omap3/beagle/u-boot.lds
 delete mode 100644 board/omap3/evm/u-boot.lds
 delete mode 100644 board/omap3/overo/u-boot.lds
Quoted 9 lines
 delete mode 100644 board/omap3/pandora/u-boot.lds
 delete mode 100644 board/omap3/zoom1/u-boot.lds
 create mode 100644 board/omap3/zoom2/Makefile
 create mode 100644 board/omap3/zoom2/config.mk
 create mode 100644 board/omap3/zoom2/zoom2.c
 create mode 100644 board/omap3/zoom2/zoom2.h
 create mode 100644 cpu/arm_cortexa8/omap3/u-boot.lds
 create mode 100644 include/configs/omap3_zoom2.h

Please fix the whitespace present on the patch and split the merge of the lds in a seperated patch

Best Regards,
J.