Skip to contentSkip to conversation

Board support series for the eXMeritus HWW-1U-1A

PATCH New Kyle Moffett 2 participants 9 messages Mar 28, 2011 – Oct 16, 2011 PowerPC

lore
Share & tools
lore
#0 lore raw

v7 cover Board support series for the eXMeritus HWW-1U-1A

This is the final respin of the eXMeritus HWW-1U-1A board support patches, rebased onto the 'next' branch of git://git.denx.de/u-boot-mpc85xx.git

This code conforms to the Linux kernel coding style. It passes checkpatch with only a few false positives.

I believe these 4 patches are ready to be merged.

Cheers,
Kyle Moffett

#1 lore raw

PATCH v7 1/4 mpc8xxx: DDR2/DDR3: Clean up DIMM-type switch statements

The numeric constants in the switch statements are replaced by #defines added to the common ddr_spd.h header. This dramatically improves the readability of the switch statments.

In addition, a few of the longer lines were cleaned up, and the DDR2 type for an SO-RDIMM module was added to the DDR2 switch statement.

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Kim Phillips <[email protected]>

--
Changelog:
v2: Moved the constants to include/ddr_spd.h and also fixed DDR3
v4: Fixed up excessively long lines
v6: Rebased onto the 'next' branch of git://git.denx.de/u-boot-mpc85xx.git

 arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c |   23 +++++++-----
 arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c |   43 ++++++++++------------
 common/ddr_spd.c                                |    2 +-
 include/ddr_spd.h                               |   28 ++++++++++-----
 4 files changed, 53 insertions(+), 43 deletions(-)
arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c +13 -10
index dcb37ce..b565e33 100644
@@ -250,24 +250,27 @@ ddr_compute_dimm_parameters(const ddr2_spd_eeprom_t *spd,
 	pdimm->primary_sdram_width = spd->primw;
 	pdimm->ec_sdram_width = spd->ecw;
 
-	/* FIXME: what about registered SO-DIMM? */
+	/* These are all the types defined by the JEDEC DDR2 SPD 1.3 spec */
 	switch (spd->dimm_type) {
-	case 0x01:	/* RDIMM */
-	case 0x10:	/* Mini-RDIMM */
-		pdimm->registered_dimm = 1; /* register buffered */
+	case DDR2_SPD_DIMMTYPE_RDIMM:
+	case DDR2_SPD_DIMMTYPE_72B_SO_RDIMM:
+	case DDR2_SPD_DIMMTYPE_MINI_RDIMM:
+		/* Registered/buffered DIMMs */
+		pdimm->registered_dimm = 1;
 		break;
 
-	case 0x02:	/* UDIMM */
-	case 0x04:	/* SO-DIMM */
-	case 0x08:	/* Micro-DIMM */
-	case 0x20:	/* Mini-UDIMM */
-		pdimm->registered_dimm = 0;	/* unbuffered */
+	case DDR2_SPD_DIMMTYPE_UDIMM:
+	case DDR2_SPD_DIMMTYPE_SO_DIMM:
+	case DDR2_SPD_DIMMTYPE_MICRO_DIMM:
+	case DDR2_SPD_DIMMTYPE_MINI_UDIMM:
+		/* Unbuffered DIMMs */
+		pdimm->registered_dimm = 0;
 		break;
 
+	case DDR2_SPD_DIMMTYPE_72B_SO_CDIMM:
 	default:
 		printf("unknown dimm_type 0x%02X\n", spd->dimm_type);
 		return 1;
-		break;
 	}
 
 	/* SDRAM device parameters */
arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c +20 -23

60 lines not on this page · raw message

common/ddr_spd.c +1 -1
index a7a30de..7a388bb 100644
@@ -18,7 +18,7 @@ spd_check(const u8 *buf, u8 spd_rev, u8 spd_cksum)
 
 	/*
 	 * Check SPD revision supported
-	 * Rev 1.2 or less supported by this code
+	 * Rev 1.X or less supported by this code
 	 */
 	if (spd_rev >= 0x20) {
 		printf("SPD revision %02X not supported by this code\n",
include/ddr_spd.h +19 -9
index 710e528..e895d61 100644
@@ -304,14 +304,24 @@ extern unsigned int ddr3_spd_check(const ddr3_spd_eeprom_t *spd);
 #define SPD_MEMTYPE_DDR2_FBDIMM_PROBE	(0x0A)
 #define SPD_MEMTYPE_DDR3	(0x0B)
 
-/*
- * Byte 3 Key Byte / Module Type for DDR3 SPD
- */
-#define SPD_MODULETYPE_RDIMM		(0x01)
-#define SPD_MODULETYPE_UDIMM		(0x02)
-#define SPD_MODULETYPE_SODIMM		(0x03)
-#define SPD_MODULETYPE_MICRODIMM	(0x04)
-#define SPD_MODULETYPE_MINIRDIMM	(0x05)
-#define SPD_MODULETYPE_MINIUDIMM	(0x06)
+/* DIMM Type for DDR2 SPD (according to v1.3) */
+#define DDR2_SPD_DIMMTYPE_UNDEFINED	(0x00)
+#define DDR2_SPD_DIMMTYPE_RDIMM		(0x01)
+#define DDR2_SPD_DIMMTYPE_UDIMM		(0x02)
+#define DDR2_SPD_DIMMTYPE_SO_DIMM	(0x04)
+#define DDR2_SPD_DIMMTYPE_72B_SO_CDIMM	(0x06)
+#define DDR2_SPD_DIMMTYPE_72B_SO_RDIMM	(0x07)
+#define DDR2_SPD_DIMMTYPE_MICRO_DIMM	(0x08)
+#define DDR2_SPD_DIMMTYPE_MINI_RDIMM	(0x10)
+#define DDR2_SPD_DIMMTYPE_MINI_UDIMM	(0x20)
+
+/* Byte 3 Key Byte / Module Type for DDR3 SPD */
+#define DDR3_SPD_MODULETYPE_MASK	(0x0f)
+#define DDR3_SPD_MODULETYPE_RDIMM	(0x01)
+#define DDR3_SPD_MODULETYPE_UDIMM	(0x02)
+#define DDR3_SPD_MODULETYPE_SO_DIMM	(0x03)
+#define DDR3_SPD_MODULETYPE_MICRO_DIMM	(0x04)
+#define DDR3_SPD_MODULETYPE_MINI_RDIMM	(0x05)
+#define DDR3_SPD_MODULETYPE_MINI_UDIMM	(0x06)
 
 #endif /* _DDR_SPD_H_ */
Signature · 1 line
1.7.2.5
Applied
#2 lore raw

PATCH v7 1/4 mpc8xxx: DDR2/DDR3: Clean up DIMM-type switch statements

Quoted 18 lines · Kyle Moffett

The numeric constants in the switch statements are replaced by #defines added to the common ddr_spd.h header. This dramatically improves the readability of the switch statments.

In addition, a few of the longer lines were cleaned up, and the DDR2 type for an SO-RDIMM module was added to the DDR2 switch statement.

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Kim Phillips <[email protected]>

--
Changelog:
v2: Moved the constants to include/ddr_spd.h and also fixed DDR3
v4: Fixed up excessively long lines
v6: Rebased onto the 'next' branch of git://git.denx.de/u-boot-mpc85xx.git

Quoted 5 lines
arch/powerpc/cpu/mpc8xxx/ddr/ddr2_dimm_params.c |   23 +++++++-----
arch/powerpc/cpu/mpc8xxx/ddr/ddr3_dimm_params.c |   43 ++++++++++------------
common/ddr_spd.c                                |    2 +-
include/ddr_spd.h                               |   28 ++++++++++-----
4 files changed, 53 insertions(+), 43 deletions(-)

applied to 85xx next

- k

#3 lore raw

PATCH v7 2/4 mpc85xx: Add inline GPIO acessor functions

In reply to Kyle Moffett

To ease the implementation of other MPC85xx board ports, several common GPIO helpers are added to <asm/mpc85xx_gpio.h>.

Since each of these compiles to no more than 4-5 instructions it would be very inefficient to call them out of line, therefore we put them entirely in the header file.

The HWW-1U-1A board port which these were written for strongly prefers to set multiple GPIOs as a single batch operation, so the API is designed around that basis.

To assist other board ports, a small set of wrappers are used which provides a standard gpio_request() interface around the MPC85xx-specific functions. This can be enabled with CONFIG_MPC85XX_GENERIC_GPIO.

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Peter Tyser <[email protected]>

--
Changelog:
v2: Moved the inline functions to a non-board-specific header
v3: Added generic Linux-standard GPIO wrappers
v4: Improved comments and fixed minor bugs in the wrapper functions
v6: Rebased onto the 'next' branch of git://git.denx.de/u-boot-mpc85xx.git

 arch/powerpc/include/asm/mpc85xx_gpio.h |  120 +++++++++++++++++++++++++++++++
 1 files changed, 120 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/include/asm/mpc85xx_gpio.h
arch/powerpc/include/asm/mpc85xx_gpio.h new file +120 -0
new file mode 100644
index 0000000..ad54b4e
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2010 eXMeritus, A Boeing Company
+ *
+ * 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 <asm/immap_85xx.h>
+
+/*
+ * The following internal functions are an MPC85XX-specific GPIO API which
+ * allows setting and querying multiple GPIOs in a single operation.
+ *
+ * All of these look relatively large, but the arguments are almost always
+ * constants, so they compile down to just a few instructions and a
+ * memory-mapped IO operation or two.
+ */
+static inline void mpc85xx_gpio_set(unsigned int mask,
+		unsigned int dir, unsigned int val)
+{
+	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR + 0xc00);
+
+	/* First mask off the unwanted parts of "dir" and "val" */
+	dir &= mask;
+	val &= mask;
+
+	/* Now read in the values we're supposed to preserve */
+	dir |= (in_be32(&gpio->gpdir) & ~mask);
+	val |= (in_be32(&gpio->gpdat) & ~mask);
+
+	/*
+	 * Poke the new output values first, then set the direction.  This
+	 * helps to avoid transient data when switching from input to output
+	 * and vice versa.
+	 */
+	out_be32(&gpio->gpdat, val);
+	out_be32(&gpio->gpdir, dir);
+}
+
+static inline void mpc85xx_gpio_set_in(unsigned int gpios)
+{
+	mpc85xx_gpio_set(gpios, 0x00000000, 0x00000000);
+}
+
+static inline void mpc85xx_gpio_set_low(unsigned int gpios)
+{
+	mpc85xx_gpio_set(gpios, 0xFFFFFFFF, 0x00000000);
+}
+
+static inline void mpc85xx_gpio_set_high(unsigned int gpios)
+{
+	mpc85xx_gpio_set(gpios, 0xFFFFFFFF, 0xFFFFFFFF);
+}
+
+static inline unsigned int mpc85xx_gpio_get(unsigned int mask)
+{
+	ccsr_gpio_t *gpio = (void *)(CONFIG_SYS_MPC85xx_GPIO_ADDR + 0xc00);
+
+	/* Read the requested values */
+	return in_be32(&gpio->gpdat) & mask;
+}
+
+/*
+ * These implement the generic Linux GPIO API on top of the other functions
+ * in this header.
+ */
+#ifdef CONFIG_MPC85XX_GENERIC_GPIO
+static inline int gpio_request(unsigned gpio, const char *label)
+{
+	/* Compatibility shim */
+	return 0;
+}
+
+static inline void gpio_free(unsigned gpio)
+{
+	/* Compatibility shim */
+}
+
+static inline int gpio_direction_input(unsigned gpio)
+{
+	mpc85xx_gpio_set_in(1U << gpio);
+	return 0;
+}
+
+static inline int gpio_direction_output(unsigned gpio, int value)
+{
+	mpc85xx_gpio_set_low(1U << gpio);
+	return 0;
+}
+
+static inline int gpio_get_value(unsigned gpio)
+{
+	return !!mpc85xx_gpio_get(1U << gpio)
+}
+
+static inline void gpio_set_value(unsigned gpio, int value)
+{
+	if (value)
+		mpc85xx_gpio_set_high(1U << gpio);
+	else
+		mpc85xx_gpio_set_low(1U << gpio);
+}
+
+static inline int gpio_is_valid(int gpio)
+{
+	return (gpio >= 0) && (gpio < 32);
+}
+#endif /* CONFIG_MPC85XX_GENERIC_GPIO */
Signature · 1 line
1.7.2.5
#4 lore raw

PATCH v7 2/4 mpc85xx: Add inline GPIO acessor functions

Quoted 27 lines · Kyle Moffett

To ease the implementation of other MPC85xx board ports, several common GPIO helpers are added to <asm/mpc85xx_gpio.h>.

Since each of these compiles to no more than 4-5 instructions it would be very inefficient to call them out of line, therefore we put them entirely in the header file.

The HWW-1U-1A board port which these were written for strongly prefers to set multiple GPIOs as a single batch operation, so the API is designed around that basis.

To assist other board ports, a small set of wrappers are used which provides a standard gpio_request() interface around the MPC85xx-specific functions. This can be enabled with CONFIG_MPC85XX_GENERIC_GPIO.

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>
Cc Peter Tyser <[email protected]>

--
Changelog:
v2: Moved the inline functions to a non-board-specific header
v3: Added generic Linux-standard GPIO wrappers
v4: Improved comments and fixed minor bugs in the wrapper functions
v6: Rebased onto the 'next' branch of git://git.denx.de/u-boot-mpc85xx.git

Quoted 3 lines

arch/powerpc/include/asm/mpc85xx_gpio.h | 120 +++++++++++++++++++++++++++++++

1 files changed, 120 insertions(+), 0 deletions(-)

create mode 100644 arch/powerpc/include/asm/mpc85xx_gpio.h

Please update the README for new #define

- k

#5 lore raw

PATCH v7 3/4 mpc85xx: Add a board-specific restart hook

In reply to Kyle Moffett

The HWW-1U-1A board needs to be able to override the "reset" command due to hardware design limitations.

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>

--
Changelog:
v2: Removed in favor of more involved reset rework
v6: Resurrected again (the more involved rework was NAKed)
v7: Fixed remaining checkpatch errors

 arch/powerpc/cpu/mpc85xx/cpu.c |   27 ++++++++++++++++++++++-----
 1 files changed, 22 insertions(+), 5 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +22 -5
index 49ea6cc..6776468 100644
@@ -203,11 +203,17 @@ int checkcpu (void)
 
 /* ------------------------------------------------------------------------- */
 
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+/* Board-specific reset stub */
+__attribute__((__weak__))
+int __board_restart(void)
 {
-/* Everything after the first generation of PQ3 parts has RSTCR */
+	return 0;
+}
+
 #if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \
     defined(CONFIG_MPC8555) || defined(CONFIG_MPC8560)
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
 	unsigned long val, msr;
 
 	/*
@@ -221,14 +227,25 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	val = mfspr(DBCR0);
 	val |= 0x70000000;
 	mtspr(DBCR0,val);
+}
 #else
-	volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	/* Everything after the first generation of PQ3 parts has RSTCR */
+	ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+
+	/* Allow boards to override the reset */
+	int err = __board_restart();
+	if (err)
+		return err;
+
 	out_be32(&gur->rstcr, 0x2);	/* HRESET_REQ */
 	udelay(100);
-#endif
-
 	return 1;
 }
+#endif
+
+
 
 
 /*
Signature · 1 line
1.7.2.5
#6 lore raw

PATCH v7 3/4 mpc85xx: Add a board-specific restart hook

Quoted 7 lines · Kyle Moffett

The HWW-1U-1A board needs to be able to override the "reset" command due to hardware design limitations.

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>
Quoted 8 lines

--
Changelog:
v2: Removed in favor of more involved reset rework
v6: Resurrected again (the more involved rework was NAKed)
v7: Fixed remaining checkpatch errors

arch/powerpc/cpu/mpc85xx/cpu.c | 27 ++++++++++++++++++++++-----

1 files changed, 22 insertions(+), 5 deletions(-)

What happened to more generic reset cleanup?

Quoted 14 lines
arch/powerpc/cpu/mpc85xx/cpu.c +3 -1
index 49ea6cc..6776468 100644
@@ -203,11 +203,17 @@ int checkcpu (void)
 
 /* ------------------------------------------------------------------------- */
 
-int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+/* Board-specific reset stub */
+__attribute__((__weak__))
+int __board_restart(void)
 {

arch/powerpc/cpu/mpc85xx/cpu.c int checkcpu (void) · line 218

Quoted 10 lines
arch/powerpc/cpu/mpc85xx/cpu.c +5 -1
-/* Everything after the first generation of PQ3 parts has RSTCR */
+	return 0;
+}
+
 #if defined(CONFIG_MPC8540) || defined(CONFIG_MPC8541) || \
    defined(CONFIG_MPC8555) || defined(CONFIG_MPC8560)
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
 	unsigned long val, msr;
 

This concerns me because it means those cpu's don't support __board_restart(), we should be consistent.

Quoted 37 lines
arch/powerpc/cpu/mpc85xx/cpu.c +14 -3
 	/*
@@ -221,14 +227,25 @@ int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	val = mfspr(DBCR0);
 	val |= 0x70000000;
 	mtspr(DBCR0,val);
+}
 #else
-	volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	/* Everything after the first generation of PQ3 parts has RSTCR */
+	ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+
+	/* Allow boards to override the reset */
+	int err = __board_restart();
+	if (err)
+		return err;
+
 	out_be32(&gur->rstcr, 0x2);	/* HRESET_REQ */
 	udelay(100);
-#endif
-
 	return 1;
 }
+#endif
+
+
 
 
 /*
Signature · 6 lines
1.7.2.5

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
#7 lore raw

PATCH v7 4/4 mpc85xx: Add board support for the eXMeritus HWW-1U-1A devices

In reply to Kyle Moffett

The eXMeritus HWW-1U-1A unit is a DO-160-certified 13lb 1U chassis with 3 independent TEMPEST zones. Two independent P2020 computers may be found inside each zone. Complete hardware support is included.

High-level hardware overview:
* DO-160 certified for passenger aircraft (noncritical)
* TEMPEST ceritified for RED/BLACK separation
* 3 zones per chassis, 2 computers per zone (total of 6)
* Dual-core 1.066GHz P2020 per computer
* One 2GB DDR2 SO-RDIMM module per computer (upgradable to 4GB)
* Removable 80GB or 160GB Intel X18-M SSD per computer
* Front-accessible dual-port E1000E per computer
* Front-accessible serial console per computer
* Front-accessible USB port per computer
* Internal Gigabit crossover within each TEMPEST zone
* Internal unidirectional fiber links across TEMPEST zones
* Battery-backed DS1339 I2C RTC on each CPU.

Combined, each 13lb 1U chassis contains 12GB RAM, 12 cores @ 1.066GHz, 12 front-accessible Gigabit Ethernet ports and 960GB of solid-state storage with a total power consumption of ~200W.

Additional notes:
* SPD detection is only known to work with the DO-160-certified DIMMs

* A U-Boot built with 36-bit address-space seems to work, but I don't yet have a usable 36-bit kernel or DTB, so it's mostly untested.

* CPU reset is a little quirky due to hardware misfeature, see the extensive comments in the board_reset() function in hww1u1a.c

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>

---
Changes since v6:
Moved a #define to the hww1u1a/gpios.h header.
Removed an unnecessary empty comment.
Added braces for a multiline statement.
Converted an infinite loop into a hang().
Disabled buggy memtest.

 MAINTAINERS                       |    4 +
 board/exmeritus/hww1u1a/Makefile  |   54 ++++
 board/exmeritus/hww1u1a/ddr.c     |   34 +++
 board/exmeritus/hww1u1a/gpios.h   |   69 +++++
 board/exmeritus/hww1u1a/hww1u1a.c |  543 +++++++++++++++++++++++++++++++++++++
 board/exmeritus/hww1u1a/law.c     |   34 +++
 board/exmeritus/hww1u1a/tlb.c     |  106 +++++++
 boards.cfg                        |    2 +
 include/configs/HWW1U1A.h         |  470 ++++++++++++++++++++++++++++++++
 9 files changed, 1316 insertions(+), 0 deletions(-)
 create mode 100644 board/exmeritus/hww1u1a/Makefile
 create mode 100644 board/exmeritus/hww1u1a/ddr.c
 create mode 100644 board/exmeritus/hww1u1a/gpios.h
 create mode 100644 board/exmeritus/hww1u1a/hww1u1a.c
 create mode 100644 board/exmeritus/hww1u1a/law.c
 create mode 100644 board/exmeritus/hww1u1a/tlb.c
 create mode 100644 include/configs/HWW1U1A.h
MAINTAINERS +4 -0
index 4756f14..6644baf 100644
@@ -320,6 +320,10 @@ Reinhard Meyer <[email protected]>
 	TOP5200		MPC5200
 	TOP9000		ARM926EJS (AT91SAM9xxx SoC)
 
+Kyle Moffett <[email protected]>
+
+	HWW1U1A		P2020
+
 Tolunay Orkun <[email protected]>
 
 	csb272		PPC405GP
board/exmeritus/hww1u1a/Makefile new file +54 -0

54 lines not on this page · raw message

board/exmeritus/hww1u1a/ddr.c new file +34 -0
new file mode 100644
index 0000000..36d02ad
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2009-2010 eXMeritus, A Boeing Company
+ * Copyright 2008-2009 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * Version 2 as published by the Free Software Foundation.
+ */
+
+#include <common.h>
+
+#include <asm/fsl_ddr_sdram.h>
+#include <asm/fsl_ddr_dimm_params.h>
+
+void fsl_ddr_board_options(memctl_options_t *popts,
+				dimm_params_t *pdimm,
+				unsigned int ctrl_num)
+{
+	/*
+	 * We only support one DIMM, so according to the P2020 docs we should
+	 * set the options as follows:
+	 */
+	popts->cs_local_opts[0].odt_rd_cfg = 0;
+	popts->cs_local_opts[0].odt_wr_cfg = 4;
+	popts->cs_local_opts[1].odt_rd_cfg = 0;
+	popts->cs_local_opts[1].odt_wr_cfg = 0;
+	popts->half_strength_driver_enable = 0;
+
+	/* Manually configured for our static clock rate */
+	popts->clk_adjust = 4;
+	popts->cpo_override = 4;
+	popts->write_data_delay = 2;
+	popts->twoT_en = 0;
+}
board/exmeritus/hww1u1a/gpios.h new file +69 -0

69 lines not on this page · raw message

board/exmeritus/hww1u1a/hww1u1a.c new file +542 -0

542 lines not on this page · raw message

board/exmeritus/hww1u1a/law.c new file +34 -0
new file mode 100644
index 0000000..1281c56
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2008-2009 Freescale Semiconductor, Inc.
+ *
+ * (C) Copyright 2000
+ * Wolfgang Denk, DENX Software Engineering, [email protected].
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <asm/fsl_law.h>
+#include <asm/mmu.h>
+
+struct law_entry law_table[] = {
+	SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+};
+
+int num_law_entries = ARRAY_SIZE(law_table);
board/exmeritus/hww1u1a/tlb.c new file +106 -0

106 lines not on this page · raw message

boards.cfg +2 -0
index 45c3102..743e016 100644
@@ -487,6 +487,8 @@ sbc8560                      powerpc     mpc85xx     sbc8560             -
 sbc8560_33                   powerpc     mpc85xx     sbc8560             -              -           sbc8560
 sbc8560_66                   powerpc     mpc85xx     sbc8560             -              -           sbc8560
 socrates                     powerpc     mpc85xx     socrates
+HWW1U1A                      powerpc     mpc85xx     hww1u1a             exmeritus
+HWW1U1A_36BIT                powerpc     mpc85xx     hww1u1a             exmeritus      -           HWW1U1A:36BIT
 MPC8536DS                    powerpc     mpc85xx     mpc8536ds           freescale      -           MPC8536DS
 MPC8536DS_36BIT              powerpc     mpc85xx     mpc8536ds           freescale      -           MPC8536DS:36BIT
 MPC8536DS_NAND               powerpc     mpc85xx     mpc8536ds           freescale      -           MPC8536DS:NAND
include/configs/HWW1U1A.h new file +470 -0

470 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#8 lore raw

PATCH v7 4/4 mpc85xx: Add board support for the eXMeritus HWW-1U-1A devices

Quoted 52 lines · Kyle Moffett

The eXMeritus HWW-1U-1A unit is a DO-160-certified 13lb 1U chassis with 3 independent TEMPEST zones. Two independent P2020 computers may be found inside each zone. Complete hardware support is included.

High-level hardware overview:
* DO-160 certified for passenger aircraft (noncritical)
* TEMPEST ceritified for RED/BLACK separation
* 3 zones per chassis, 2 computers per zone (total of 6)
* Dual-core 1.066GHz P2020 per computer
* One 2GB DDR2 SO-RDIMM module per computer (upgradable to 4GB)
* Removable 80GB or 160GB Intel X18-M SSD per computer
* Front-accessible dual-port E1000E per computer
* Front-accessible serial console per computer
* Front-accessible USB port per computer
* Internal Gigabit crossover within each TEMPEST zone
* Internal unidirectional fiber links across TEMPEST zones
* Battery-backed DS1339 I2C RTC on each CPU.

Combined, each 13lb 1U chassis contains 12GB RAM, 12 cores @ 1.066GHz, 12 front-accessible Gigabit Ethernet ports and 960GB of solid-state storage with a total power consumption of ~200W.

Additional notes:
* SPD detection is only known to work with the DO-160-certified DIMMs

* A U-Boot built with 36-bit address-space seems to work, but I don't yet have a usable 36-bit kernel or DTB, so it's mostly untested.

* CPU reset is a little quirky due to hardware misfeature, see the extensive comments in the board_reset() function in hww1u1a.c

Cc Andy Fleming <[email protected]>
Cc Kumar Gala <[email protected]>

---
Changes since v6:
Moved a #define to the hww1u1a/gpios.h header.
Removed an unnecessary empty comment.
Added braces for a multiline statement.
Converted an infinite loop into a hang().
Disabled buggy memtest.

MAINTAINERS                       |    4 +
board/exmeritus/hww1u1a/Makefile  |   54 ++++
board/exmeritus/hww1u1a/ddr.c     |   34 +++
board/exmeritus/hww1u1a/gpios.h   |   69 +++++
board/exmeritus/hww1u1a/hww1u1a.c |  543 +++++++++++++++++++++++++++++++++++++
board/exmeritus/hww1u1a/law.c     |   34 +++
board/exmeritus/hww1u1a/tlb.c     |  106 +++++++
boards.cfg                        |    2 +
include/configs/HWW1U1A.h         |  470 ++++++++++++++++++++++++++++++++
9 files changed, 1316 insertions(+), 0 deletions(-)
Quoted 7 lines

create mode 100644 board/exmeritus/hww1u1a/Makefile create mode 100644 board/exmeritus/hww1u1a/ddr.c create mode 100644 board/exmeritus/hww1u1a/gpios.h create mode 100644 board/exmeritus/hww1u1a/hww1u1a.c create mode 100644 board/exmeritus/hww1u1a/law.c create mode 100644 board/exmeritus/hww1u1a/tlb.c create mode 100644 include/configs/HWW1U1A.h

1. pending other dependent patches
2. re-spin against latest HEAD

- k