Skip to contentSkip to conversation

ppc4xx: Initial support of the AMCC dual PPC460GT Arches reference board.

PATCH New Adam Graham 3 participants 5 messages Sep 24, 2008 – Sep 25, 2008 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ppc4xx: Initial support of the AMCC dual PPC460GT Arches reference board.

These are the initial support files for the AMCC dual PPC460GT Arches reference board.

---
 Makefile                      |    3 +
 board/amcc/arches/Makefile    |   51 ++++
 board/amcc/arches/arches.c    |  356 +++++++++++++++++++++++++++++
 board/amcc/arches/config.mk   |   41 ++++
 board/amcc/arches/init.S      |  110 +++++++++
 board/amcc/arches/u-boot.lds  |  143 ++++++++++++
 include/configs/amcc-common.h |   20 ++-
 include/configs/arches.h      |  505 +++++++++++++++++++++++++++++++++++++++++
 include/ppc440.h              |    3 +
 9 files changed, 1231 insertions(+), 1 deletions(-)
 create mode 100644 board/amcc/arches/Makefile
 create mode 100644 board/amcc/arches/arches.c
 create mode 100644 board/amcc/arches/config.mk
 create mode 100644 board/amcc/arches/init.S
 create mode 100644 board/amcc/arches/u-boot.lds
 create mode 100644 include/configs/arches.h
Makefile +3 -0
index 7c13ce8..2241290 100644
@@ -1186,6 +1186,9 @@ APC405_config:	unconfig
 AR405_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ar405 esd
 
+arches_config:	unconfig
+	@$(MKCONFIG) $(@:_config=) ppc ppc4xx arches amcc
+
 ASH405_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) ppc ppc4xx ash405 esd
 
board/amcc/arches/Makefile new file +51 -0

51 lines not on this page · raw message

board/amcc/arches/arches.c new file +356 -0

356 lines not on this page · raw message

board/amcc/arches/config.mk new file +41 -0

41 lines not on this page · raw message

board/amcc/arches/init.S new file +110 -0

110 lines not on this page · raw message

board/amcc/arches/u-boot.lds new file +143 -0

143 lines not on this page · raw message

include/configs/amcc-common.h +19 -1
index 1f27d78..fb19e0d 100644
@@ -55,6 +55,14 @@
 #endif
 
 /*
+ * Only very few boards have default netdev not set to eth0 (like Arches)
+ */
+#if !defined(CONFIG_NETDEV)
+#define CONFIG_NETDEV             eth0
+#endif
+
+
+/*
  * Commands
  */
 #include <config_cmd_default.h>
@@ -147,9 +155,11 @@
 /*
  * Booting and default environment
  */
+#if !defined(CONFIG_PREBOOT)
 #define CONFIG_PREBOOT	"echo;"	\
 	"echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \
 	"echo"
+#endif
 #define CONFIG_BOOTCOMMAND	"run flash_self"
 
 /*
@@ -184,7 +194,7 @@
  * General common environment variables shared on all AMCC eval boards
  */
 #define CONFIG_AMCC_DEF_ENV						\
-	"netdev=eth0\0"							\
+	"netdev=" xstr(CONFIG_NETDEV) "\0"				\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=${serverip}:${rootpath}\0"			\
 	"ramargs=setenv bootargs root=/dev/ram rw\0"			\
@@ -197,8 +207,10 @@
 	"initrd_high=30000000\0"					\
 	"kernel_addr_r=400000\0"					\
 	"fdt_addr_r=800000\0"						\
+	"ramdisk_addr_r=C00000\0"					\
 	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
 	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
+	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\
 	CONFIG_AMCC_DEF_ENV_ROOTPATH
 
 /*
@@ -214,6 +226,12 @@
 		"tftp ${fdt_addr_r} ${fdt_file}; "			\
 		"run nfsargs addip addtty addmisc;"			\
 		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
+	"net_self_load=tftp ${kernel_addr_r} ${bootfile};"		\
+		"tftp ${fdt_addr_r} ${fdt_file};"			\
+		"tftp ${ramdisk_addr_r} ${ramdisk_file};\0"		\
+	"net_self=run net_self_load;"					\
+		"run ramargs addip addtty addmisc;"			\
+		"bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
 	"fdt_file=" xstr(CONFIG_HOSTNAME) "/" xstr(CONFIG_HOSTNAME) ".dtb\0"
 
 /*
include/configs/arches.h new file +505 -0

505 lines not on this page · raw message

include/ppc440.h +3 -0
index be8d3ff..7ffc640 100644
@@ -1349,6 +1349,9 @@
 #define SDR0_ETH_CFG_ZMII_RMII_MODE_10M		0x10
 #define SDR0_ETH_CFG_ZMII_RMII_MODE_100M	0x11
 
+/* Ethernet Status Register */
+#define SDR0_ETH_STS		0x4104
+
 /* Miscealleneaous Function Reg. (SDR0_MFR) */
 #define SDR0_MFR		0x4300
 #define SDR0_MFR_T0TxFL		0x00800000	/* force parity error TAHOE0 Tx FIFO bits 0:63 */
Signature · 1 line
1.5.5
#1 lore raw

PATCH 1/3 ppc4xx: Initial support of the AMCC dual PPC460GT Arches reference board.

Dear Adam Graham,

Quoted 8 lines · In message <[email protected]> you wrote:
board/amcc/arches/arches.c new file +7 -0
+/*
+ * FPGA read/write helper macros
+ */
+#define FPGA_READ(offset) ({				\
+	in_8((void *)(CFG_FPGA_BASE + offset)); })
+#define FPGA_WRITE(offset, data) ({			\
+	out_8((void *)(CFG_FPGA_BASE + offset), data); })

board/amcc/arches/arches.c line 46

Quoted 10 lines
board/amcc/arches/arches.c new file +10 -0
+
+/*
+ * CPLD read/write helper macros
+ */
+#define CPLD_READ(offset) ({ 				\
+	out_8((void *)(CFG_CPLD_ADDR), offset);		\
+	in_8((void *)(CFG_CPLD_DATA)); })
+#define CPLD_WRITE(offset, data) ({			\
+	out_8((void *)(CFG_CPLD_ADDR), offset);		\
+	out_8((void *)(CFG_CPLD_DATA), data); })

Please make these inline functions instead. (See CodingStyle
document: "Generally, inline functions are preferable to macros resembling functions.").

board/amcc/arches/arches.c line 57

Quoted 1 line
board/amcc/arches/arches.c new file +1 -0
+	mtdcr(uic0cr, 0x00000005);	/* ATI & UIC1 crit are critical */

It would be nice to use symbolic constatnts instead of hardcoded numeric valies here.

board/amcc/arches/arches.c line 91

Quoted 5 lines
board/amcc/arches/arches.c new file +5 -0
+	/*
+	 * Configure PFC (Pin Function Control) registers
+	 * UART0: 4 pins
+	 */
+	mtsdr(SDR0_PFC1, 0x00040000);

Ditto.

board/amcc/arches/arches.c line 94

Quoted 2 lines
board/amcc/arches/arches.c new file +2 -0
+	/* Enable PCI host functionality in SDR0_PCI0 */
+	mtsdr(SDR0_PCI0, 0xe0000000);

Ditto.

Review

Quoted 2 lines
(quoted diff) +2 -0
+	return 0;
+}

Hm... most of this code looks suspiciously similar to what we have in "board/amcc/canyonlands/canyonlands.c" - which is not a big surprise, given the fact how closely related these two boards are.

Do we really need a separate board directory for arches?

Wouldn't it make more sense to use a common source tree for both, like we do in Linux, too?

Quoted 123 lines
board/amcc/arches/arches.c new file +123 -0
+/*
+ *  pci_target_init
+ *
+ *	The bootstrap configuration provides default settings for the pci
+ *	inbound map (PIM). But the bootstrap config choices are limited and
+ *	may not be sufficient for a given board.
+ */
+#if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT)
+void pci_target_init(struct pci_controller *hose)
+{
+	/*
+	 * Disable everything
+	 */
+	out_le32((void *)PCIX0_PIM0SA, 0);	/* disable */
+	out_le32((void *)PCIX0_PIM1SA, 0);	/* disable */
+	out_le32((void *)PCIX0_PIM2SA, 0);	/* disable */
+	out_le32((void *)PCIX0_EROMBA, 0);	/* disable expansion rom */
+
+	/*
+	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440
+	 * strapping options to not support sizes such as 128/256 MB.
+	 */
+	out_le32((void *)PCIX0_PIM0LAL, CFG_SDRAM_BASE);
+	out_le32((void *)PCIX0_PIM0LAH, 0);
+	out_le32((void *)PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1);
+	out_le32((void *)PCIX0_BAR0, 0);
+
+	/*
+	 * Program the board's subsystem id/vendor id
+	 */
+	out_le16((void *)PCIX0_SBSYSVID, CFG_PCI_SUBSYS_VENDORID);
+	out_le16((void *)PCIX0_SBSYSID, CFG_PCI_SUBSYS_DEVICEID);
+
+	out_le16((void *)PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY);
+}
+#endif	/* defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) */
+
+#if defined(CONFIG_PCI)
+/*
+ * is_pci_host
+ *
+ * This routine is called to determine if a pci scan should be
+ * performed. With various hardware environments (especially cPCI and
+ * PPMC) it's insufficient to depend on the state of the arbiter enable
+ * bit in the strap register, or generic host/adapter assumptions.
+ *
+ * Rather than hard-code a bad assumption in the general 440 code, the
+ * 440 pci code requires the board to decide at runtime.
+ *
+ * Return 0 for adapter mode, non-zero for host (monarch) mode.
+ */
+int is_pci_host(struct pci_controller *hose)
+{
+	/* Board is always configured as host. */
+	return 1;
+}
+
+static struct pci_controller pcie_hose[2] = { {0}, {0} };
+
+void pcie_setup_hoses(int busno)
+{
+	struct pci_controller *hose;
+	int i, bus;
+	int ret = 0;
+	char *env;
+	unsigned int delay;
+	int end;
+
+	/*
+	 * assume we're called after the PCIX hose is initialized, which takes
+	 * bus ID 0 and therefore start numbering PCIe's from 1.
+	 */
+	bus = busno;
+
+#if defined(CONFIG_RAPIDIO)
+	end = 0;
+#else
+	end = 1;
+#endif
+
+	for (i = 0; i <= end; i++) {
+
+		if (is_end_point(i))
+			ret = ppc4xx_init_pcie_endport(i);
+		else
+			ret = ppc4xx_init_pcie_rootport(i);
+		if (ret) {
+			printf("PCIE%d: initialization as %s failed\n", i,
+			       is_end_point(i) ? "endpoint" : "root-complex");
+			continue;
+		}
+
+		hose = &pcie_hose[i];
+		hose->first_busno = bus;
+		hose->last_busno = bus;
+		hose->current_busno = bus;
+
+		/* setup mem resource */
+		pci_set_region(hose->regions + 0,
+			       CFG_PCIE_MEMBASE + i * CFG_PCIE_MEMSIZE,
+			       CFG_PCIE_MEMBASE + i * CFG_PCIE_MEMSIZE,
+			       CFG_PCIE_MEMSIZE,
+			       PCI_REGION_MEM);
+		hose->region_count = 1;
+		pci_register_hose(hose);
+
+		if (is_end_point(i)) {
+			ppc4xx_setup_pcie_endpoint(hose, i);
+			/*
+			 * Reson for no scanning is endpoint can not generate
+			 * upstream configuration accesses.
+			 */
+		} else {
+			ppc4xx_setup_pcie_rootpoint(hose, i);
+			env = getenv("pciscandelay");
+			if (env != NULL) {
+				delay = simple_strtoul(env, NULL, 10);
+				if (delay > 5)
+					printf("Warning, expect noticable "
+						"delay before PCIe scan due "
+						"to 'pciscandelay' value!\n");
+				mdelay(delay * 1000);
+			}

board/amcc/arches/arches.c line 255

Quoted 10 lines
board/amcc/arches/arches.c new file +10 -0
+
+			/*
+			 * Config access can only go down stream
+			 */
+			hose->last_busno = pci_hose_scan(hose);
+			bus = hose->last_busno + 1;
+		}
+	}
+}
+#endif /* CONFIG_PCI */

All this looks liek verbatim copies of the canyonlands code.

Similar for the rest of the code.

I think we should avoid such an extensive code duplication.

NAK.

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
"There's always been Tower of Babel sort of  bickering  inside  Unix,
but  this  is the most extreme form ever. This means at least several
years of confusion." - Bill Gates, founder and chairman of Microsoft,
about the Open Systems Foundation
#2 lore raw

PATCH 1/3 ppc4xx: Initial support of the AMCC dual PPC460GT Arches reference board.

Quoted 13 lines · Wolfgang Denk
Quoted 13 lines
board/amcc/arches/arches.c new file +13 -0
+/*
+ * FPGA read/write helper macros
+ */
+#define FPGA_READ(offset) ({				\
+	in_8((void *)(CFG_FPGA_BASE + offset)); })
+#define FPGA_WRITE(offset, data) ({			\
+	out_8((void *)(CFG_FPGA_BASE + offset), data); })
+
+/*
+ * CPLD read/write helper macros
+ */
+#define CPLD_READ(offset) ({ 				\
+	out_8((void *)(CFG_CPLD_ADDR), offset);		\
Quoted 8 lines

board/amcc/arches/arches.c line 46

Quoted 4 lines
board/amcc/arches/arches.c new file +4 -0
+	in_8((void *)(CFG_CPLD_DATA)); })
+#define CPLD_WRITE(offset, data) ({			\
+	out_8((void *)(CFG_CPLD_ADDR), offset);		\
+	out_8((void *)(CFG_CPLD_DATA), data); })

Please make these inline functions instead. (See CodingStyle
document: "Generally, inline functions are preferable to macros resembling functions.").

ACK.

Quoted 4 lines

board/amcc/arches/arches.c line 57

Quoted 1 line
board/amcc/arches/arches.c new file +1 -0
+	mtdcr(uic0cr, 0x00000005);	/* ATI & UIC1 crit are critical */

It would be nice to use symbolic constatnts instead of hardcoded numeric valies here.

I don't think that this makes sense here. We would need to add 32 defines times the number of UIC's available to make it possible to configure this with symbolic constants. That's 128 in the 460EX/GT case. So I vote for leaving it as is here.

Quoted 7 lines

board/amcc/arches/arches.c line 91

Quoted 5 lines
board/amcc/arches/arches.c new file +5 -0
+	/*
+	 * Configure PFC (Pin Function Control) registers
+	 * UART0: 4 pins
+	 */
+	mtsdr(SDR0_PFC1, 0x00040000);

Ditto.

ACK. Adam just copied the hardcoded value from Canyonlands, but it is a good idea to use a define for this PFCx configuration.

Quoted 4 lines

board/amcc/arches/arches.c line 94

Quoted 2 lines
board/amcc/arches/arches.c new file +2 -0
+	/* Enable PCI host functionality in SDR0_PCI0 */
+	mtsdr(SDR0_PCI0, 0xe0000000);

Ditto.

ACK.

Quoted 11 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+	return 0;
+}

Hm... most of this code looks suspiciously similar to what we have in "board/amcc/canyonlands/canyonlands.c" - which is not a big surprise, given the fact how closely related these two boards are.

Do we really need a separate board directory for arches?

Wouldn't it make more sense to use a common source tree for both, like we do in Linux, too?

I'm not so sure here. In Linux it is different. All the 4xx platforms files were 100% identical. So it really made no sense to have multiple incarnations there. In U-Boot we have some differences. I'm not sure if it makes sense to try to move the common code into a separate place and reuse it there. We would have to introduce even more #ifdef's in the resulting code to make it work on Canyonlands, Glacier & Arches.

OK, functions that are 100% identical between multiple boards are probably better moved into such a common directory (perhaps board/amcc/common). The PCI(e) related functions come to my mind first.

Quoted 127 lines
Quoted 127 lines
board/amcc/arches/arches.c new file +127 -0
+/*
+ *  pci_target_init
+ *
+ *	The bootstrap configuration provides default settings for the pci
+ *	inbound map (PIM). But the bootstrap config choices are limited and
+ *	may not be sufficient for a given board.
+ */
+#if defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT)
+void pci_target_init(struct pci_controller *hose)
+{
+	/*
+	 * Disable everything
+	 */
+	out_le32((void *)PCIX0_PIM0SA, 0);	/* disable */
+	out_le32((void *)PCIX0_PIM1SA, 0);	/* disable */
+	out_le32((void *)PCIX0_PIM2SA, 0);	/* disable */
+	out_le32((void *)PCIX0_EROMBA, 0);	/* disable expansion rom */
+
+	/*
+	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440
+	 * strapping options to not support sizes such as 128/256 MB.
+	 */
+	out_le32((void *)PCIX0_PIM0LAL, CFG_SDRAM_BASE);
+	out_le32((void *)PCIX0_PIM0LAH, 0);
+	out_le32((void *)PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1);
+	out_le32((void *)PCIX0_BAR0, 0);
+
+	/*
+	 * Program the board's subsystem id/vendor id
+	 */
+	out_le16((void *)PCIX0_SBSYSVID, CFG_PCI_SUBSYS_VENDORID);
+	out_le16((void *)PCIX0_SBSYSID, CFG_PCI_SUBSYS_DEVICEID);
+
+	out_le16((void *)PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY);
+}
+#endif	/* defined(CONFIG_PCI) && defined(CFG_PCI_TARGET_INIT) */
+
+#if defined(CONFIG_PCI)
+/*
+ * is_pci_host
+ *
+ * This routine is called to determine if a pci scan should be
+ * performed. With various hardware environments (especially cPCI and
+ * PPMC) it's insufficient to depend on the state of the arbiter enable
+ * bit in the strap register, or generic host/adapter assumptions.
+ *
+ * Rather than hard-code a bad assumption in the general 440 code, the
+ * 440 pci code requires the board to decide at runtime.
+ *
+ * Return 0 for adapter mode, non-zero for host (monarch) mode.
+ */
+int is_pci_host(struct pci_controller *hose)
+{
+	/* Board is always configured as host. */
+	return 1;
+}
+
+static struct pci_controller pcie_hose[2] = { {0}, {0} };
+
+void pcie_setup_hoses(int busno)
+{
+	struct pci_controller *hose;
+	int i, bus;
+	int ret = 0;
+	char *env;
+	unsigned int delay;
+	int end;
+
+	/*
+	 * assume we're called after the PCIX hose is initialized, which takes
+	 * bus ID 0 and therefore start numbering PCIe's from 1.
+	 */
+	bus = busno;
+
+#if defined(CONFIG_RAPIDIO)
+	end = 0;
+#else
+	end = 1;
+#endif
+
+	for (i = 0; i <= end; i++) {
+
+		if (is_end_point(i))
+			ret = ppc4xx_init_pcie_endport(i);
+		else
+			ret = ppc4xx_init_pcie_rootport(i);
+		if (ret) {
+			printf("PCIE%d: initialization as %s failed\n", i,
+			       is_end_point(i) ? "endpoint" : "root-complex");
+			continue;
+		}
+
+		hose = &pcie_hose[i];
+		hose->first_busno = bus;
+		hose->last_busno = bus;
+		hose->current_busno = bus;
+
+		/* setup mem resource */
+		pci_set_region(hose->regions + 0,
+			       CFG_PCIE_MEMBASE + i * CFG_PCIE_MEMSIZE,
+			       CFG_PCIE_MEMBASE + i * CFG_PCIE_MEMSIZE,
+			       CFG_PCIE_MEMSIZE,
+			       PCI_REGION_MEM);
+		hose->region_count = 1;
+		pci_register_hose(hose);
+
+		if (is_end_point(i)) {
+			ppc4xx_setup_pcie_endpoint(hose, i);
+			/*
+			 * Reson for no scanning is endpoint can not generate
+			 * upstream configuration accesses.
+			 */
+		} else {
+			ppc4xx_setup_pcie_rootpoint(hose, i);
+			env = getenv("pciscandelay");
+			if (env != NULL) {
+				delay = simple_strtoul(env, NULL, 10);
+				if (delay > 5)
+					printf("Warning, expect noticable "
+						"delay before PCIe scan due "
+						"to 'pciscandelay' value!\n");
+				mdelay(delay * 1000);
+			}
+
+			/*
+			 * Config access can only go down stream
+			 */
Quoted 8 lines

board/amcc/arches/arches.c line 255

Quoted 6 lines
board/amcc/arches/arches.c new file +6 -0
+			hose->last_busno = pci_hose_scan(hose);
+			bus = hose->last_busno + 1;
+		}
+	}
+}
+#endif /* CONFIG_PCI */

All this looks liek verbatim copies of the canyonlands code.

No, not 100% I'm afraid. There are subtile differences here with respect to RAPIDIO and the Canyonlands/Glacier distinction in the Canyonlands version.

Quoted 3 lines

Similar for the rest of the code.

I think we should avoid such an extensive code duplication.

Sure, it is always good to not duplicate code. But if the code is not 100% identical then I'm unsure what's better. Using more common board code has the following advantages and disadvantages:

+ Less code duplication
+ Easier to maintain
- Resulting code is "uglier" by using more #ifdef's
- Makes it harder for custom board ports, since the code needed is scattered in more directories

Not sure where to go here. Wolfgang, your call.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

#3 lore raw

PATCH 1/3 ppc4xx: Initial support of the AMCC dual PPC460GT Arches reference board.

Dear Stefan Roese,

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

Wouldn't it make more sense to use a common source tree for both, like we do in Linux, too?

I'm not so sure here. In Linux it is different. All the 4xx platforms files were 100% identical. So it really made no sense to have multiple incarnations there. In U-Boot we have some differences. I'm not sure if it makes sense to try to move the common code into a separate place and reuse it there. We would have to introduce even more #ifdef's in the resulting code to make it work on Canyonlands, Glacier & Arches.

I think it definitely makes sense at least to extract common or at least very similar code.

Quoted 3 lines

OK, functions that are 100% identical between multiple boards are probably better moved into such a common directory (perhaps board/amcc/common). The PCI(e) related functions come to my mind first.

Not only that - already now the Arches code contains improvements (like changing hard-coded numbers into much easier readbale symbolic constants) that would make sense to go to Canyonlands and Glacier, too, but as is the existing code does not benefit from the new patches, i. e. the improvments get lost and the copied code diverges.

Quoted 4 lines
Quoted 1 line

All this looks liek verbatim copies of the canyonlands code.

No, not 100% I'm afraid. There are subtile differences here with respect to RAPIDIO and the Canyonlands/Glacier distinction in the Canyonlands version.

Ineed. But the differences arre minimal compared to the amount of copied code.

Quoted 6 lines

Sure, it is always good to not duplicate code. But if the code is not 100% identical then I'm unsure what's better. Using more common board code has the following advantages and disadvantages:

+ Less code duplication
+ Easier to maintain

This entry alone is worth the effort. We have already too many pieces of rotting code.

Quoted 1 line

- Resulting code is "uglier" by using more #ifdef's

This may or may not be the case. We have developed quite a few methods to avoid #ifdef's. And we already support Canyonlands and Glacier in one file, so why not add Arches?

Quoted 2 lines

- Makes it harder for custom board ports, since the code needed is scattered in more directories

On contrary: if we factor out common code now, it will be much easier for following custom ports to see which parts need to be adapted.

Quoted 1 line

Not sure where to go here. Wolfgang, your call.

I think the advantages outweight the additional effort.

Best regards,

Wolfgang Denk

Signature · 5 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
The only way to get rid of a temptation is to yield to it.
                                                        - Oscar Wilde
#4 lore raw

PATCH 1/3 ppc4xx: Initial support of the AMCC dual PPC460GT Arches reference board.

In reply to Adam Graham
Quoted 2 lines · Adam Graham

These are the initial support files for the AMCC dual PPC460GT Arches reference board.

I suggest that you add a small description about this board this the commit log here.

Please find some comments below.

<snip>

Quoted 5 lines
include/configs/amcc-common.h +0 -0
index 1f27d78..fb19e0d 100644

include/configs/amcc-common.h line 64

Quoted 10 lines
include/configs/amcc-common.h +7 -0
@@ -55,6 +55,14 @@
 #endif
 
 /*
+ * Only very few boards have default netdev not set to eth0 (like Arches)
+ */
+#if !defined(CONFIG_NETDEV)
+#define CONFIG_NETDEV             eth0
+#endif
+
+

Nitpick: Don't add two empty lines please.

Quoted 416 lines
include/configs/amcc-common.h +12 -1
+/*
  * Commands
  */
 #include <config_cmd_default.h>
@@ -147,9 +155,11 @@
 /*
  * Booting and default environment
  */
+#if !defined(CONFIG_PREBOOT)
 #define CONFIG_PREBOOT	"echo;"	\
 	"echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \
 	"echo"
+#endif
 #define CONFIG_BOOTCOMMAND	"run flash_self"
 
 /*
@@ -184,7 +194,7 @@
  * General common environment variables shared on all AMCC eval boards
  */
 #define CONFIG_AMCC_DEF_ENV						\
-	"netdev=eth0\0"							\
+	"netdev=" xstr(CONFIG_NETDEV) "\0"				\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
 		"nfsroot=${serverip}:${rootpath}\0"			\
 	"ramargs=setenv bootargs root=/dev/ram rw\0"			\
@@ -197,8 +207,10 @@
 	"initrd_high=30000000\0"					\
 	"kernel_addr_r=400000\0"					\
 	"fdt_addr_r=800000\0"						\
+	"ramdisk_addr_r=C00000\0"					\
 	"hostname=" xstr(CONFIG_HOSTNAME) "\0"				\
 	"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"			\
+	"ramdisk_file=" xstr(CONFIG_HOSTNAME) "/uRamdisk\0"		\
 	CONFIG_AMCC_DEF_ENV_ROOTPATH
 
 /*
@@ -214,6 +226,12 @@
 		"tftp ${fdt_addr_r} ${fdt_file}; "			\
 		"run nfsargs addip addtty addmisc;"			\
 		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
+	"net_self_load=tftp ${kernel_addr_r} ${bootfile};"		\
+		"tftp ${fdt_addr_r} ${fdt_file};"			\
+		"tftp ${ramdisk_addr_r} ${ramdisk_file};\0"		\
+	"net_self=run net_self_load;"					\
+		"run ramargs addip addtty addmisc;"			\
+		"bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0" \
 	"fdt_file=" xstr(CONFIG_HOSTNAME) "/" xstr(CONFIG_HOSTNAME) ".dtb\0"
 
 /*
include/configs/arches.h new file +144 -0
new file mode 100644
index 0000000..6ad862f
@@ -0,0 +1,505 @@
+/*
+ * (C) Copyright 2008
+ * Adam Graham, Applied Micro Circuits Corp., agraham at amcc.com.
+ * Victor Gallardo, Applied Micro Circuits Corp., agraham at amcc.com.
+ *
+ * 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
+ */
+
+/************************************************************************
+ * arches.h - configuration for Arches (460GT)
+ ***********************************************************************/
+#ifndef __CONFIG_H
+#define __CONFIG_H
+
+/*-----------------------------------------------------------------------
+ * High Level Configuration Options
+ *----------------------------------------------------------------------*/
+/* This config file is used for Arches (460GT)	*/
+#define CONFIG_ARCHES		1	/* Board is Arches		*/
+#define CONFIG_460GT		1	/* Specific PPC460GT		*/
+#define CONFIG_440		1
+#define CONFIG_4xx		1	/* ... PPC4xx family */
+#define CONFIG_NETDEV           eth1
+
+/*
+ * Update default PREBOOT environment variables
+ * defined in amcc-common.h
+ */
+#define CONFIG_PREBOOT \
+	"setenv ethact ppc_4xx_eth1;" \
+	"echo;" \
+	"echo Type \"run flash_nfs\" to mount root filesystem over NFS;" \
+	"echo;"
+
+/*
+ * Include common defines/options for all AMCC eval boards
+ */
+#define CONFIG_HOSTNAME		arches
+#include "amcc-common.h"
+
+#define CONFIG_SYS_CLK_FREQ	66666667	/* external freq to pll	*/
+
+#define CONFIG_BOARD_EARLY_INIT_F	1	/* Call board_early_init_f */
+#define CONFIG_BOARD_EARLY_INIT_R	1	/* Call board_early_init_r */
+#define CONFIG_MISC_INIT_R		1	/* Call misc_init_r */
+#define CONFIG_BOARD_TYPES		1	/* support board types */
+
+/*-----------------------------------------------------------------------
+ * RapidIO I/O and Registers
+ *----------------------------------------------------------------------*/
+
+#define CONFIG_RAPIDIO
+#define CFG_460GT_SRIO_ERRATA_1
+
+#define SRGPL0_REG_BAR        0x0000000DAA000000ull /*  16MB */
+#define SRGPL0_CFG_BAR        0x0000000DAB000000ull /*  16MB */
+#define SRGPL0_MNT_BAR        0x0000000DAC000000ull /*  16MB */
+#define SRGPL0_MSG_BAR        0x0000000DAD000000ull /*  16MB */
+#define SRGPL0_OUT_BAR        0x0000000DB0000000ull /* 256MB */
+
+#define CFG_SRGPL0_REG_BAR    0xAA000000 /*  16MB */
+#define CFG_SRGPL0_CFG_BAR    0xAB000000 /*  16MB */
+#define CFG_SRGPL0_MNT_BAR    0xAC000000 /*  16MB */
+#define CFG_SRGPL0_MSG_BAR    0xAD000000 /*  16MB */
+
+#define CFG_I2ODMA_BASE       0xCF000000
+#define CFG_I2ODMA_PHYS_ADDR  0x0000000400100000ull
+
+#define CONFIG_PPC4XX_RAPIDIO_PROMISCUOUS_MODE
+#undef  CONFIG_PPC4XX_RAPIDIO_DEBUG
+#undef  CONFIG_PPC4XX_RAPIDIO_IN_BAR_USE_OCM
+#define CONFIG_PPC4XX_RAPIDIO_USE_HB_PLB
+#undef  CONFIG_PPC4XX_RAPIDIO_LOOPBACK
+
+/* EBC stuff */
+#define CFG_NAND_ADDR		0xE0000000
+#define CFG_FPGA_BASE		0xE1000000
+#define CFG_CPLD_ADDR		(CFG_FPGA_BASE + 0x00080000)
+#define CFG_CPLD_DATA		(CFG_FPGA_BASE + 0x00080002)
+#define CFG_BOOT_BASE_ADDR	0xFF000000	/* EBC Boot Space: 0xFF000000 */
+#define CFG_FLASH_BASE		0xFE000000	/* later mapped to this addr  */
+#define CFG_FLASH_BASE_PHYS_H	0x4
+#define CFG_FLASH_BASE_PHYS_L	0xCE000000
+#define CFG_FLASH_BASE_PHYS	(((u64)CFG_FLASH_BASE_PHYS_H << 32) | \
+				 (u64)CFG_FLASH_BASE_PHYS_L)
+#define CFG_FLASH_SIZE		(32 << 20)
+
+#define CFG_OCM_BASE		0xE3000000	/* OCM: 64k		*/
+#define CFG_OCM_PHYS_ADDR       0x0000000400040000ull
+
+#define CFG_SRAM_BASE		0xE8000000	/* SRAM: 256k		*/
+#define CFG_LOCAL_CONF_REGS	0xEF000000
+
+#define CFG_PERIPHERAL_BASE	0xEF600000	/* internal peripherals */
+
+#define CFG_AHB_BASE		0xE2000000	/* internal AHB peripherals */
+
+/*-----------------------------------------------------------------------
+ * Initial RAM & stack pointer (placed in OCM)
+ *----------------------------------------------------------------------*/
+#define CFG_INIT_RAM_ADDR	CFG_OCM_BASE	/* OCM			*/
+#define CFG_INIT_RAM_END	(4 << 10)
+#define CFG_GBL_DATA_SIZE	256		/* num bytes initial data */
+#define CFG_GBL_DATA_OFFSET	(CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+#define CFG_INIT_SP_OFFSET	CFG_GBL_DATA_OFFSET
+
+/*-----------------------------------------------------------------------
+ * Serial Port
+ *----------------------------------------------------------------------*/
+#undef CONFIG_UART1_CONSOLE	/* define this if you want console on UART1 */
+
+/*-----------------------------------------------------------------------
+ * Environment
+ *----------------------------------------------------------------------*/
+/*
+ * Define here the location of the environment variables (FLASH).
+ */
+#define	CONFIG_ENV_IS_IN_FLASH	1	/* use FLASH for environment vars */
+
+/*-----------------------------------------------------------------------
+ * FLASH related
+ *----------------------------------------------------------------------*/
+#define CFG_FLASH_CFI			/* The flash is CFI compatible	*/
+#define CONFIG_FLASH_CFI_DRIVER		/* Use common CFI driver	*/
+#define CFG_FLASH_CFI_AMD_RESET	1	/* Use AMD (Spansion) reset cmd */
+
+#define CFG_FLASH_BANKS_LIST    {CFG_FLASH_BASE}
+#define CFG_MAX_FLASH_BANKS	1	/* max number of memory banks	     */
+#define CFG_MAX_FLASH_SECT	512	/* max number of sectors on one chip */
+
+#define CFG_FLASH_ERASE_TOUT	120000	/* Timeout for Flash Erase (in ms)  

*/ +#define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms)
*/ +
+#define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster)
*/ +#define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector flinfo */ +

include/configs/arches.h new file +12 -1
+#ifdef CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_SECT_SIZE	0x20000		/* size of 1 complete sector */
+#define CONFIG_ENV_ADDR		(CFG_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
+#define	CONFIG_ENV_SIZE		0x4000	/* Total Size of Environment Sector  */
+
+/* Address and size of Redundant Environment Sector	*/
+#define CONFIG_ENV_ADDR_REDUND	(CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SIZE)
+#endif /* CFG_ENV_IS_IN_FLASH */
+
+/*------------------------------------------------------------------------
---- + * DDR SDRAM
+

*--------------------------------------------------------------------------

include/configs/arches.h new file +198 -1
-*/ +#define CONFIG_AUTOCALIB	"silent\0"	/* default is non-verbose    */ +
+#define	CONFIG_PPC4xx_DDR_AUTOCALIBRATION	/* IBM DDR autocalibration   */
+#define	DEBUG_PPC4xx_DDR_AUTOCALIBRATION	/* dynamic DDR autocal debug */
+#undef	CONFIG_PPC4xx_DDR_METHOD_A
+
+#define CFG_MBYTES_SDRAM	512
+
+/* DDR1/2 SDRAM Device Control Register Data Values */
+/* Memory Queue */
+#define	CFG_SDRAM_R0BAS			0x0000f000
+#define	CFG_SDRAM_R1BAS			0x00000000
+#define	CFG_SDRAM_R2BAS			0x00000000
+#define	CFG_SDRAM_R3BAS			0x00000000
+#define CFG_SDRAM_PLBADDULL		0x00000000
+#define CFG_SDRAM_PLBADDUHB		0x00000008
+#define CFG_SDRAM_CONF1LL		0x00001080
+#define CFG_SDRAM_CONF1HB		0x00001080
+#define CFG_SDRAM_CONFPATHB		0x10a68000
+
+/* SDRAM Controller */
+#define CFG_SDRAM0_MB0CF		0x00000701
+#define CFG_SDRAM0_MB1CF		0x00000000
+#define CFG_SDRAM0_MB2CF		0x00000000
+#define CFG_SDRAM0_MB3CF		0x00000000
+#define CFG_SDRAM0_MCOPT1		0x05322000
+#define CFG_SDRAM0_MCOPT2		0x00000000
+#define CFG_SDRAM0_MODT0		0x01000000
+#define CFG_SDRAM0_MODT1		0x00000000
+#define CFG_SDRAM0_MODT2		0x00000000
+#define CFG_SDRAM0_MODT3		0x00000000
+#define CFG_SDRAM0_CODT			0x00800021
+#define CFG_SDRAM0_RTR			0x06180000
+#define CFG_SDRAM0_INITPLR0		0xb5380000
+#define CFG_SDRAM0_INITPLR1		0x82100400
+#define CFG_SDRAM0_INITPLR2		0x80820000
+#define CFG_SDRAM0_INITPLR3		0x80830000
+#define CFG_SDRAM0_INITPLR4		0x80810040
+#define CFG_SDRAM0_INITPLR5		0x80800532
+#define CFG_SDRAM0_INITPLR6		0x82100400
+#define CFG_SDRAM0_INITPLR7		0x8a080000
+#define CFG_SDRAM0_INITPLR8		0x8a080000
+#define CFG_SDRAM0_INITPLR9		0x8a080000
+#define CFG_SDRAM0_INITPLR10		0x8a080000
+#define CFG_SDRAM0_INITPLR11		0x80000432
+#define CFG_SDRAM0_INITPLR12		0x808103c0
+#define CFG_SDRAM0_INITPLR13		0x80810040
+#define CFG_SDRAM0_INITPLR14		0x00000000
+#define CFG_SDRAM0_INITPLR15		0x00000000
+#define CFG_SDRAM0_RQDC			0x80000038
+#define CFG_SDRAM0_RFDC			0x00000257
+#define CFG_SDRAM0_RDCC			0x40000000
+#define CFG_SDRAM0_DLCR			0x03000091
+#define CFG_SDRAM0_CLKTR		0x40000000
+#define CFG_SDRAM0_WRDTR		0x82000823
+#define CFG_SDRAM0_SDTR1		0x80201000
+#define CFG_SDRAM0_SDTR2		0x42204243
+#define CFG_SDRAM0_SDTR3		0x090c0d1a
+#define CFG_SDRAM0_MMODE		0x00000432
+#define CFG_SDRAM0_MEMODE		0x00000004
+
+/*-----------------------------------------------------------------------
+ * I2C
+ *----------------------------------------------------------------------*/
+#define CFG_I2C_SPEED		400000	/* I2C speed			*/
+
+#define CFG_I2C_MULTI_EEPROMS
+#define CFG_I2C_EEPROM_ADDR		(0xa8>>1)
+#define CFG_I2C_EEPROM_ADDR_LEN		1
+#define CFG_EEPROM_PAGE_WRITE_ENABLE
+#define CFG_EEPROM_PAGE_WRITE_BITS	3
+#define CFG_EEPROM_PAGE_WRITE_DELAY_MS	10
+
+/* I2C SYSMON (LM75, AD7414 is almost compatible)			*/
+#define CONFIG_DTT_LM75		1		/* ON Semi's LM75	*/
+#define CONFIG_DTT_AD7414	1		/* use AD7414		*/
+#define CFG_I2C_DTT_ADDR	0x4a		/* AD7414 I2C address	*/
+#define CONFIG_DTT_SENSORS	{ 0 }		/* Sensor addresses	*/
+#define CFG_DTT_MAX_TEMP	70
+#define CFG_DTT_LOW_TEMP	-30
+#define CFG_DTT_HYSTERESIS	3
+
+/*-----------------------------------------------------------------------
+ * Ethernet
+ *----------------------------------------------------------------------*/
+#define CONFIG_FIXED_PHY	0xFFFFFFFF
+#define CONFIG_IBM_EMAC4_V4	1
+#define CONFIG_PHY_ADDR		CONFIG_FIXED_PHY
+#define CONFIG_PHY1_ADDR	0
+#define CONFIG_PHY2_ADDR	1
+#define CONFIG_HAS_ETH0
+#define CONFIG_HAS_ETH1
+#define CONFIG_HAS_ETH2
+
+#define CFG_FIXED_PHY_PORT(devnum, speed, duplex) \
+		{devnum, speed, duplex},
+#define CFG_FIXED_PHY_PORTS \
+		CFG_FIXED_PHY_PORT(0, 1000, FULL) \
+
+#define CONFIG_M88E1112_PHY
+#define CONFIG_PHY_RESET	1	/* reset phy upon startup	*/
+#define CONFIG_PHY_GIGE		1	/* Include GbE speed/duplex detection */
+#define CONFIG_PHY_DYNAMIC_ANEG	1
+
+/*
+ * The following PHY addresses 0xB,0xC,0xD are reserved
+ * in M88E1112 so use these for GPCS PHY addresses
+ */
+#define CONFIG_GPCS_PHY_ADDR    0xB
+#define CONFIG_GPCS_PHY1_ADDR   0xC
+#define CONFIG_GPCS_PHY2_ADDR   0xD
+
+/*
+ * Default environment variables
+ */
+#define	CONFIG_EXTRA_ENV_SETTINGS					\
+	CONFIG_AMCC_DEF_ENV						\
+	CONFIG_AMCC_DEF_ENV_POWERPC					\
+	CONFIG_AMCC_DEF_ENV_NOR_UPD					\
+	"kernel_addr=fe000000\0"					\
+	"fdt_addr=fe1e0000\0"						\
+	"ramdisk_addr=fe200000\0"					\
+	"pciconfighost=1\0"						\
+	"pcie_mode=RP:RP\0"						\
+	""
+
+/*
+ * Commands additional to the ones defined in amcc-common.h
+ */
+#define CONFIG_CMD_DTT
+#define CONFIG_CMD_PCI
+
+/* Partitions */
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
+#define CONFIG_ISO_PARTITION
+
+/*-----------------------------------------------------------------------
+ * PCI stuff
+ *----------------------------------------------------------------------*/
+/* General PCI */
+#define CONFIG_PCI			/* include pci support	        */
+#undef  CONFIG_PCI_PNP			/* do pci plug-and-play   */
+#define CONFIG_PCI_SCAN_SHOW		/* show pci devices on startup  */
+#define CONFIG_PCI_CONFIG_HOST_BRIDGE
+
+/* Board-specific PCI */
+#define CFG_PCI_TARGET_INIT		/* let board init pci target    */
+#undef	CFG_PCI_MASTER_INIT
+
+#define CFG_PCI_SUBSYS_VENDORID 0x1014	/* IBM				*/
+#define CFG_PCI_SUBSYS_DEVICEID 0xcafe	/* Whatever			*/
+
+/*-----------------------------------------------------------------------
+ * Base addresses -- Note these are effective addresses where the
+ * actual resources get mapped (not physical addresses)
+ *----------------------------------------------------------------------*/
+#define CFG_PCI_MEMBASE		0x80000000	/* mapped PCI memory	*/
+#define CFG_PCI_BASE		0xd0000000	/* internal PCI regs	*/
+#define CFG_PCI_TARGBASE	CFG_PCI_MEMBASE
+
+#define CFG_PCIE_MEMBASE	0xb0000000	/* mapped PCIe memory	*/
+#define CFG_PCIE_MEMSIZE	0x08000000	/* smallest inc for PCIe port */
+#define CFG_PCIE_BASE		0xc4000000	/* PCIe UTL regs */
+
+#define CFG_PCIE0_CFGBASE	0xc0000000
+#define CFG_PCIE1_CFGBASE	0xc1000000
+#define CFG_PCIE0_XCFGBASE	0xc3000000
+#define CFG_PCIE1_XCFGBASE	0xc3001000
+
+#define	CFG_PCIE0_UTLBASE	0xc08010000ULL	/* 36bit physical addr	*/
+
+/* base address of inbound PCIe window */
+#define CFG_PCIE_INBOUND_BASE	0x000000000ULL	/* 36bit physical addr	*/
+
+/*-----------------------------------------------------------------------
+ * External Bus Controller (EBC) Setup
+ *----------------------------------------------------------------------*/
+
+/*
+ * Arches has 32MBytes of NOR FLASH (Spansion 29GL256), but the
+ * boot EBC mapping only supports a maximum of 16MBytes
+ * (4.ff00.0000 - 4.ffff.ffff).
+ * To solve this problem, the FLASH has to get remapped to another
+ * EBC address which accepts bigger regions:
+ *
+ * 0xfe00.0000 -> 4.ce00.0000
+ */
+
+/* Memory Bank 0 (NOR-FLASH) initialization */
+#define CFG_EBC_PB0AP		0x10055e00
+#define CFG_EBC_PB0CR		(CFG_BOOT_BASE_ADDR | 0x9a000)
+
+/* Memory Bank 1 (FPGA) initialization	*/
+#define CFG_EBC_PB1AP		0x7f8ffe80
+#define CFG_EBC_PB1CR		(CFG_FPGA_BASE | 0x3a000)
+/* BAS=FPGA,BS=2MB,BU=R/W,BW=16bit*/
+
+#define CFG_EBC_CFG		0xB8400000		/*  EBC0_CFG */
+

include/configs/arches.h line 372

Quoted 10 lines
include/configs/arches.h new file +10 -0
+/*
+ * PPC4xx GPIO Configuration
+ */
+/* 460GT: Use EMAC2+3 configuration */
+#define CFG_4xx_GPIO_TABLE {						\
+/*  Out		  GPIO	Alternate1	Alternate2	Alternate3 */ 	\
+	{								\
+	/* GPIO Core 0 */						\
+		{GPIO0_BASE, GPIO_OUT, GPIO_ALT1, GPIO_OUT_0},		\
+		/* GPIO0	GMC1TxD(0)	USB2HostD(0)	*/	\

You wrapped the line here. I know that the original CFG_4xx_GPIO_TABLE implementation on some other boards uses too longs lines. But it makes the code better readable this way. So I think it makes sense to break the 80 chars per line rule in this case.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================