Skip to contentSkip to conversation

Adding support for DevKit8000

PATCH New Frederik Kriewitz 4 participants 9 messages Aug 17, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Adding support for DevKit8000

This patch adds support for the DevKit8000 board.

---
 Makefile                            |    3 +
 board/omap3/devkit8000/Makefile     |   51 +++++
 board/omap3/devkit8000/config.mk    |   34 +++
 board/omap3/devkit8000/devkit8000.c |  117 +++++++++++
 board/omap3/devkit8000/devkit8000.h |  376 +++++++++++++++++++++++++++++++++++
 doc/README.omap3                    |   11 +
 include/asm-arm/mach-types.h        |   13 ++
 include/configs/omap3_devkit8000.h  |  365 ++++++++++++++++++++++++++++++++++
 8 files changed, 970 insertions(+), 0 deletions(-)
 create mode 100644 board/omap3/devkit8000/Makefile
 create mode 100644 board/omap3/devkit8000/config.mk
 create mode 100644 board/omap3/devkit8000/devkit8000.c
 create mode 100644 board/omap3/devkit8000/devkit8000.h
 create mode 100644 include/configs/omap3_devkit8000.h
Makefile +3 -0
index 329e0f5..a040249 100644
@@ -3084,6 +3084,9 @@ omap3_zoom1_config :	unconfig
 omap3_zoom2_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 omap3 omap3
 
+omap3_devkit8000_config : unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 omap3 omap3
+
 #########################################################################
 ## XScale Systems
 #########################################################################
board/omap3/devkit8000/Makefile new file +51 -0

51 lines not on this page · raw message

board/omap3/devkit8000/config.mk new file +34 -0
new file mode 100644
index 0000000..de973a5
@@ -0,0 +1,34 @@
+#
+# (C) Copyright 2006
+# Texas Instruments, <www.ti.com>
+#
+# Modified by Frederik Kriewitz <[email protected]> 
+#
+# DevKit8000 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:
+# 8000'0000 (bank0)
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
board/omap3/devkit8000/devkit8000.c new file +117 -0

117 lines not on this page · raw message

board/omap3/devkit8000/devkit8000.h new file +376 -0

376 lines not on this page · raw message

doc/README.omap3 +11 -0
index 6227151..e24531c 100644
@@ -21,6 +21,8 @@ Currently the following boards are supported:
 
 * TI/Logic PD Zoom 2 [7]
 
+* DevKit8000 [9]
+
 Toolchain
 =========
 
@@ -61,6 +63,11 @@ make
 make omap3_zoom2_config
 make
 
+* DevKit8000:
+
+make omap3_devkit8000_config
+make
+
 Custom commands
 ===============
 
@@ -156,3 +163,7 @@ http://www.logicpd.com/sites/default/files/1012659A_Zoom_OMAP34x-II_MDP_Brief.pd
 [8] TI OMAP3 U-Boot:
 
 http://beagleboard.googlecode.com/files/u-boot_beagle_revb.tar.gz
+
+[9] DevKit8000:
+
+http://www.embedinfo.com/English/Product/devkit8000.asp
include/asm-arm/mach-types.h +13 -0
index 5293d67..adacc90 100644
@@ -2241,6 +2241,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_OMAP3_WL_FF          2258
 #define MACH_TYPE_SIMCOM               2259
 #define MACH_TYPE_MCWEBIO              2260
+#define MACH_TYPE_OMAP3_DEVKIT8000     2330
 
 #ifdef CONFIG_ARCH_EBSA110
 # ifdef machine_arch_type
@@ -28990,6 +28991,18 @@ extern unsigned int __machine_arch_type;
 # define machine_is_mcwebio()	(0)
 #endif
 
+#ifdef CONFIG_MACH_OMAP3_DEVKIT8000
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type	__machine_arch_type
+# else
+#  define machine_arch_type	MACH_TYPE_OMAP3_DEVKIT8000
+# endif
+# define machine_is_omap3_devkit8000()	(machine_arch_type == MACH_TYPE_OMAP3_DEVKIT8000)
+#else
+# define machine_is_omap3_devkit8000()	(0)
+#endif
+
 /*
  * These have not yet been registered
  */
include/configs/omap3_devkit8000.h new file +365 -0

365 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 Adding support for DevKit8000

Dear Frederik Kriewitz,

Quoted 18 lines · In message <[email protected]> you wrote:

This patch adds support for the DevKit8000 board.

---
 Makefile                            |    3 +
 board/omap3/devkit8000/Makefile     |   51 +++++
 board/omap3/devkit8000/config.mk    |   34 +++
 board/omap3/devkit8000/devkit8000.c |  117 +++++++++++
 board/omap3/devkit8000/devkit8000.h |  376 +++++++++++++++++++++++++++++++++++
 doc/README.omap3                    |   11 +
 include/asm-arm/mach-types.h        |   13 ++
 include/configs/omap3_devkit8000.h  |  365 ++++++++++++++++++++++++++++++++++
 8 files changed, 970 insertions(+), 0 deletions(-)
 create mode 100644 board/omap3/devkit8000/Makefile
 create mode 100644 board/omap3/devkit8000/config.mk
 create mode 100644 board/omap3/devkit8000/devkit8000.c
 create mode 100644 board/omap3/devkit8000/devkit8000.h
 create mode 100644 include/configs/omap3_devkit8000.h

There are some Coding Style issues like trailing white space, vertical alignment by spaces instead of TAB as required, C++ comments etc.

Entry to MAINTAINERS missing.

Makefile omap3_zoom1_config : unconfig · line 3088

Quoted 10 lines
Makefile +2 -0
index 329e0f5..a040249 100644
@@ -3084,6 +3084,9 @@ omap3_zoom1_config :	unconfig
 omap3_zoom2_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 omap3 omap3
 
+omap3_devkit8000_config : unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 omap3 omap3

Please keep list sorted.

board/omap3/devkit8000/Makefile line 5

Quoted 11 lines
board/omap3/devkit8000/Makefile new file +5 -0
new file mode 100644
index 0000000..63e16b0
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# Modified by Frederik Kriewitz <[email protected]>

Please add Copyright and year, then (applies globally).

Quoted 14 lines
doc/README.omap3 +2 -0
index 6227151..e24531c 100644
@@ -21,6 +21,8 @@ Currently the following boards are supported:
 
 * TI/Logic PD Zoom 2 [7]
 
+* DevKit8000 [9]
+
 Toolchain
 =========
 

doc/README.omap3 make · line 69

Quoted 7 lines
doc/README.omap3 +4 -0
@@ -61,6 +63,11 @@ make
 make omap3_zoom2_config
 make
 
+* DevKit8000:
+
+make omap3_devkit8000_config
+make

Please keep list sorted.

include/asm-arm/mach-types.h extern unsigned int __machine_arch_type; · line 2244

Quoted 9 lines
include/asm-arm/mach-types.h +1 -0
index 5293d67..adacc90 100644
@@ -2241,6 +2241,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_OMAP3_WL_FF          2258
 #define MACH_TYPE_SIMCOM               2259
 #define MACH_TYPE_MCWEBIO              2260
+#define MACH_TYPE_OMAP3_DEVKIT8000     2330

Please don't do this. Instead, send a request for an update of the mach-types.h file to the ARM custodian, please.

Quoted 5 lines
include/configs/omap3_devkit8000.h new file +0 -0
new file mode 100644
index 0000000..b2871c8

...

include/configs/omap3_devkit8000.h line 72

Quoted 4 lines
include/configs/omap3_devkit8000.h new file +4 -0
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + SZ_128K)
+#define CONFIG_SYS_GBL_DATA_SIZE	128	/* bytes reserved for */
+						/* initial data */
+

One blank line is enough.

include/configs/omap3_devkit8000.h line 128

Quoted 12 lines
include/configs/omap3_devkit8000.h new file +12 -0
+/* commands to include */
+#include <config_cmd_default.h>
+
+#define CONFIG_CMD_EXT2			/* EXT2 Support			*/
+#define CONFIG_CMD_FAT			/* FAT support			*/
+#define CONFIG_CMD_JFFS2		/* JFFS2 Support		*/
+#define CONFIG_CMD_MTDPARTS		/* Enable MTD parts commands    */
+#define CONFIG_MTD_DEVICE		/* needed for mtdparts commands */ 
+#define MTDIDS_DEFAULT			"nand0=nand"
+#define MTDPARTS_DEFAULT		"mtdparts=nand:512k(x-loader),"\
+					"1920k(u-boot),128k(u-boot-env),"\
+					"4m(kernel),-(fs)"

I recommend not to mix the list of command definitions with other defines.

include/configs/omap3_devkit8000.h line 133

Quoted 4 lines
include/configs/omap3_devkit8000.h new file +4 -0
+#define CONFIG_CMD_I2C			/* I2C serial bus support	*/
+#define CONFIG_CMD_MMC			/* MMC support			*/
+#define CONFIG_CMD_NAND			/* NAND support			*/
+#define CONFIG_CMD_NAND_LOCK_UNLOCK	/* nand (un)lock commands   */

Also, it may make sense to kepp such lists sorted, too.

include/configs/omap3_devkit8000.h line 253

Quoted 11 lines
include/configs/omap3_devkit8000.h new file +11 -0
+#define CONFIG_BOOTCOMMAND \
+	"if mmc init 0; then " \
+		"if run loadbootscript; then " \
+			"run bootscript; " \
+		"else " \
+			"if run loaduimage; then " \
+				"run mmcboot; " \
+			"else run nandboot; " \
+			"fi; " \
+		"fi; " \
+	"else run nandboot; fi"

In my opinion it makes little sense to define such a complex boot command - you will lose the definition if you redefine it for testing. Instead, define a variable containing this script, and use "run variable" as boot command.

include/configs/omap3_devkit8000.h line 276

Quoted 4 lines
include/configs/omap3_devkit8000.h new file +4 -0
+#define CONFIG_SYS_MEMTEST_START	(OMAP34XX_SDRC_CS0)	/* memtest */
+								/* works on */
+#define CONFIG_SYS_MEMTEST_END		(OMAP34XX_SDRC_CS0 + \
+					0x01F00000) /* 31MB */

Did you test that these settings work?

..

include/configs/omap3_devkit8000.h line 330

Quoted 9 lines
include/configs/omap3_devkit8000.h new file +9 -0
+#define CONFIG_SYS_MAX_FLASH_SECT	520	/* max number of sectors on */
+						/* one chip */
+#define CONFIG_SYS_MAX_FLASH_BANKS	2	/* max number of flash banks */
+#define CONFIG_SYS_MONITOR_LEN		SZ_256K	/* Reserve 2 sectors */
+
+#define CONFIG_SYS_FLASH_BASE		boot_flash_base
+
+/* Monitor at start of flash */
+#define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_FLASH_BASE

You seem to have NOR flash, but define NO_FLSH eralier. Is this intentional? What is the rationale behind that?

Best regards,

Wolfgang Denk

Signature · 6 lines
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: wd at denx.de
If programming was easy, they wouldn't need something as  complicated
as a human being to do it, now would they?
                       - L. Wall & R. L. Schwartz, _Programming Perl_
#2 lore raw

PATCH 1/1 Adding support for DevKit8000

Thank you for reviewing my patch.

I've fixed the issues and will submit it again once Jean-Christophe updated the mach-types.h.

Quoted 4 lines · Wolfgang Denk
Quoted 4 lines
(quoted diff) +4 -0
+#define CONFIG_SYS_MAX_FLASH_SECT ? ?520 ? ? /* max number of sectors on */
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* one chip */
+#define CONFIG_SYS_MAX_FLASH_BANKS ? 2 ? ? ? /* max number of flash banks */
+#define CONFIG_SYS_MONITOR_LEN ? ? ? ? ? ? ? SZ_256K /* Reserve 2 sectors */
Quoted 8 lines

include/configs/omap3_devkit8000.h

Quoted 5 lines
include/configs/omap3_devkit8000.h new file +5 -0
+
+#define CONFIG_SYS_FLASH_BASE ? ? ? ? ? ? ? ?boot_flash_base
+
+/* Monitor at start of flash */
+#define CONFIG_SYS_MONITOR_BASE ? ? ? ? ? ? ?CONFIG_SYS_FLASH_BASE

You seem to have NOR flash, but define NO_FLSH eralier. Is this intentional? What is the rationale behind that?

I don't have NOR flash, just NAND. So NO_FLASH is fine.

I'm was confused about the FLASH stuff too.
Other OMAP3 Boards have them too and AFAIK none of them has NOR flash. e.g. CONFIG_SYS_ENV_SECT_SIZE is defined in several configs but never used. I removed them and everything works fine.

#3 lore raw

PATCH 1/1 Adding support for DevKit8000

Quoted 4 lines · Frederik Kriewitz

Thank you for reviewing my patch.

I've fixed the issues and will submit it again once Jean-Christophe updated the mach-types.h.

Please send an official request for this. See

http://lists.denx.de/pipermail/u-boot/2008-September/040553.html

Best regards

Dirk

Quoted 24 lines · Wolfgang Denk
Quoted 11 lines

include/configs/omap3_devkit8000.h line 330

Quoted 9 lines
include/configs/omap3_devkit8000.h new file +9 -0
+#define CONFIG_SYS_MAX_FLASH_SECT    520     /* max number of sectors on */
+                                             /* one chip */
+#define CONFIG_SYS_MAX_FLASH_BANKS   2       /* max number of flash banks */
+#define CONFIG_SYS_MONITOR_LEN               SZ_256K /* Reserve 2 sectors */
+
+#define CONFIG_SYS_FLASH_BASE                boot_flash_base
+
+/* Monitor at start of flash */
+#define CONFIG_SYS_MONITOR_BASE              CONFIG_SYS_FLASH_BASE

You seem to have NOR flash, but define NO_FLSH eralier. Is this intentional? What is the rationale behind that?

I don't have NOR flash, just NAND. So NO_FLASH is fine.

I'm was confused about the FLASH stuff too.
Other OMAP3 Boards have them too and AFAIK none of them has NOR flash. e.g. CONFIG_SYS_ENV_SECT_SIZE is defined in several configs but never used. I removed them and everything works fine.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw

PATCH 1/1 Adding support for DevKit8000

Quoted 9 lines · Dirk Behme
Quoted 4 lines · Frederik Kriewitz

Thank you for reviewing my patch.

I've fixed the issues and will submit it again once Jean-Christophe updated the mach-types.h.

Please send an official request for this. See

http://lists.denx.de/pipermail/u-boot/2008-September/040553.html

While we are talking about DevKit8000 mach-type.h, fyi:

http://marc.info/?l=linux-omap&m=125053205123728&w=2

Best regards

Dirk

#5 lore raw

PATCH 1/1 Adding support for DevKit8000

In reply to Frederik Kriewitz
Quoted 1 line · Frederik Kriewitz

This patch adds support for the DevKit8000 board.

Wolfgang commented already most of the topics.

So, only one comment left for me:

...

Quoted 1 line

+++ b/board/omap3/devkit8000/devkit8000.c

...

Quoted 6 lines
board/omap3/devkit8000/devkit8000.c new file +6 -0
+/*
+ * Routine: misc_init_r
+ * Description: Configure board specific parts
+ */
+int misc_init_r(void)
+{

...

board/omap3/devkit8000/devkit8000.c line 89

Quoted 7 lines
board/omap3/devkit8000/devkit8000.c new file +7 -0
+	/* Use OMAP DIE_ID as MAC address */
+	if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
+		enetaddr[0] = 0x02; /* locally administered */
+		enetaddr[1] = readl(&id_base->die_id_1) & 0xff;
+		*(u32*)&enetaddr[2] = readl(&id_base->die_id_0);
+		eth_setenv_enetaddr("ethaddr", enetaddr);
+	}

With the OMAP DIE_ID thread we know what you are doing here. But do we want to have this really in mainline? It looks to me like a workaround for broken hardware (that is, having no proper MAC address configured)? Or do I miss anything?

Best regards

Dirk

#6 lore raw

PATCH 1/1 Adding support for DevKit8000

Quoted 4 lines · Dirk Behme

With the OMAP DIE_ID thread we know what you are doing here. But do we want to have this really in mainline? It looks to me like a workaround for broken hardware (that is, having no proper MAC address configured)? Or do I miss anything?

I'll ask Embest (manufacturer of the board) to get some real MAC addresses.

Some boards/devices already use random MAC addresses:
drivers/net/kirkwood_egiga.c board/bf518f-ezbrd/bf518f-ezbrd.c board/bf526-ezbrd/bf526-ezbrd.c board/bf527-ezkit/bf527-ezkit.c board/bf537-minotaur/bf537-minotaur.c board/bf537-pnav/bf537-pnav.c board/bf537-srv1/bf537-srv1.c board/bf537-stamp/bf537-stamp.c board/cm-bf527/cm-bf527.c board/cm-bf537e/cm-bf537e.c

#7 lore raw

PATCH 1/1 Adding support for DevKit8000

Quoted 8 lines · Frederik Kriewitz
Quoted 4 lines · Dirk Behme

With the OMAP DIE_ID thread we know what you are doing here. But do we want to have this really in mainline? It looks to me like a workaround for broken hardware (that is, having no proper MAC address configured)? Or do I miss anything?

I'll ask Embest (manufacturer of the board) to get some real MAC addresses.

Quoted 11 lines

Some boards/devices already use random MAC addresses:
drivers/net/kirkwood_egiga.c board/bf518f-ezbrd/bf518f-ezbrd.c board/bf526-ezbrd/bf526-ezbrd.c board/bf527-ezkit/bf527-ezkit.c board/bf537-minotaur/bf537-minotaur.c board/bf537-pnav/bf537-pnav.c board/bf537-srv1/bf537-srv1.c board/bf537-stamp/bf537-stamp.c board/cm-bf527/cm-bf527.c board/cm-bf537e/cm-bf537e.c

Thanks. If everybody is fine with this, I will not object, too ;)

Best regards

Dirk

#8 lore raw

PATCH 1/1 Adding support for DevKit8000

In reply to Dirk Behme

Dear Dirk Behme,

Quoted 2 lines · In message <[email protected]> you wrote:

Wolfgang commented already most of the topics.

:-)

Quoted 1 line

So, only one comment left for me:

But a well spottet one, thanks!

Quoted 5 lines

board/omap3/devkit8000/devkit8000.c line 87

Quoted 5 lines
board/omap3/devkit8000/devkit8000.c new file +5 -0
+	/* Use OMAP DIE_ID as MAC address */
+	if (!eth_getenv_enetaddr("ethaddr", enetaddr)) {
+		enetaddr[0] = 0x02; /* locally administered */
+		enetaddr[1] = readl(&id_base->die_id_1) & 0xff;
+		*(u32*)&enetaddr[2] = readl(&id_base->die_id_0);

Who guarantess that &enetaddr[2] will be 32 bit aligned? And hat does this machine do on unaligned accesses?

Frederik: Please fix this.

Quoted 7 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+		eth_setenv_enetaddr("ethaddr", enetaddr);
+	}

With the OMAP DIE_ID thread we know what you are doing here. But do we want to have this really in mainline? It looks to me like a workaround for broken hardware (that is, having no proper MAC address configured)? Or do I miss anything?

Indeed. It's fishy at best.

Best regards,

Wolfgang Denk

Signature · 7 lines
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: wd at denx.de
When the tide of life turns against you
And the current upsets your boat
Don't waste tears on what might have been
Just lie on your back and float.