Skip to contentSkip to conversation

mpc512x: Add esd gmbh mecp5123 board support

PATCH New Stefan Roese 2 participants 5 messages Jun 8, 2009 – Jun 9, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mpc512x: Add esd gmbh mecp5123 board support

MECP5123 is a MPC5121E based module by esd gmbh.

---
 MAINTAINERS                   |    1 +
 MAKEALL                       |    1 +
 Makefile                      |    3 +
 board/esd/mecp5123/Makefile   |   50 +++++
 board/esd/mecp5123/config.mk  |   23 ++
 board/esd/mecp5123/mecp5123.c |  360 ++++++++++++++++++++++++++++++++
 include/configs/mecp5123.h    |  455 +++++++++++++++++++++++++++++++++++++++++
 7 files changed, 893 insertions(+), 0 deletions(-)
 create mode 100644 board/esd/mecp5123/Makefile
 create mode 100644 board/esd/mecp5123/config.mk
 create mode 100644 board/esd/mecp5123/mecp5123.c
 create mode 100644 include/configs/mecp5123.h
MAINTAINERS +1 -0
index bba6ce9..942e9de 100644
@@ -28,6 +28,7 @@ Pantelis Antoniou <[email protected]>
 Reinhard Arlt <[email protected]>
 
 	cpci5200	MPC5200
+	mecp5123	MPC5121
 	mecp5200	MPC5200
 	pf5200		MPC5200
 
MAKEALL +1 -0
index fd31252..f48a08e 100755
@@ -78,6 +78,7 @@ LIST_5xxx="		\
 
 LIST_512x="		\
 	aria		\
+	mecp5123	\
 	mpc5121ads	\
 "
 
Makefile +3 -0
index 034441c..2540f74 100644
@@ -815,6 +815,9 @@ v38b_config: unconfig
 aria_config:	unconfig
 	@$(MKCONFIG) -a aria ppc mpc512x aria davedenx
 
+mecp5123_config:	unconfig
+	@$(MKCONFIG) -a mecp5123 ppc mpc512x mecp5123 esd
+
 mpc5121ads_config \
 mpc5121ads_rev2_config	\
 	: unconfig
board/esd/mecp5123/Makefile new file +50 -0

50 lines not on this page · raw message

board/esd/mecp5123/config.mk new file +23 -0
new file mode 100644
index 0000000..838a018
@@ -0,0 +1,23 @@
+#
+# (C) Copyright 2009 Wolfgang Denk <[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
+#
+
+TEXT_BASE  =   0xFFF00000
board/esd/mecp5123/mecp5123.c new file +360 -0

360 lines not on this page · raw message

include/configs/mecp5123.h new file +455 -0

455 lines not on this page · raw message

Signature · 1 line
1.6.3.2
#1 lore raw

PATCH 1/1 mpc512x: Add esd gmbh mecp5123 board support

Dear Stefan Roese,

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

MECP5123 is a MPC5121E based module by esd gmbh.

...

Quoted 4 lines
board/esd/mecp5123/mecp5123.c new file +4 -0
+int eeprom_write_enable(unsigned dev_addr, int state)
+{
+	volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
+

board/esd/mecp5123/mecp5123.c line 64

Quoted 10 lines
board/esd/mecp5123/mecp5123.c new file +10 -0
+        if (dev_addr != CONFIG_SYS_I2C_EEPROM_ADDR)
+	        return -1;
+
+        if (state == 0)
+		setbits_be32(&im->gpio.gpdat, 0x00100000);
+	else
+		clrbits_be32(&im->gpio.gpdat, 0x00100000);
+
+        return 0;
+}

Please fix indentation - indentation by TAB only, please.

...

Quoted 2 lines
board/esd/mecp5123/mecp5123.c new file +2 -0
+int board_early_init_f(void)
+{

...

Quoted 14 lines
board/esd/mecp5123/mecp5123.c new file +14 -0
+	/* Initialize DDR Priority Manager */
+	out_be32(&im->mddrc.prioman_config1, CONFIG_SYS_MDDRCGRP_PM_CFG1);
+	out_be32(&im->mddrc.prioman_config2, CONFIG_SYS_MDDRCGRP_PM_CFG2);
+	out_be32(&im->mddrc.hiprio_config, CONFIG_SYS_MDDRCGRP_HIPRIO_CFG);
+	out_be32(&im->mddrc.lut_table0_main_upper, CONFIG_SYS_MDDRCGRP_LUT0_MU);
+	out_be32(&im->mddrc.lut_table0_main_lower, CONFIG_SYS_MDDRCGRP_LUT0_ML);
+	out_be32(&im->mddrc.lut_table1_main_upper, CONFIG_SYS_MDDRCGRP_LUT1_MU);
+	out_be32(&im->mddrc.lut_table1_main_lower, CONFIG_SYS_MDDRCGRP_LUT1_ML);
+	out_be32(&im->mddrc.lut_table2_main_upper, CONFIG_SYS_MDDRCGRP_LUT2_MU);
+	out_be32(&im->mddrc.lut_table2_main_lower, CONFIG_SYS_MDDRCGRP_LUT2_ML);
+	out_be32(&im->mddrc.lut_table3_main_upper, CONFIG_SYS_MDDRCGRP_LUT3_MU);
+	out_be32(&im->mddrc.lut_table3_main_lower, CONFIG_SYS_MDDRCGRP_LUT3_ML);
+	out_be32(&im->mddrc.lut_table4_main_upper, CONFIG_SYS_MDDRCGRP_LUT4_MU);
+	out_be32(&im->mddrc.lut_table4_main_lower, CONFIG_SYS_MDDRCGRP_LUT4_ML);

board/esd/mecp5123/mecp5123.c line 197

Quoted 10 lines
board/esd/mecp5123/mecp5123.c new file +10 -0
+	out_be32(&im->mddrc.lut_table0_alternate_upper, CONFIG_SYS_MDDRCGRP_LUT0_AU);
+	out_be32(&im->mddrc.lut_table0_alternate_lower, CONFIG_SYS_MDDRCGRP_LUT0_AL);
+	out_be32(&im->mddrc.lut_table1_alternate_upper, CONFIG_SYS_MDDRCGRP_LUT1_AU);
+	out_be32(&im->mddrc.lut_table1_alternate_lower, CONFIG_SYS_MDDRCGRP_LUT1_AL);
+	out_be32(&im->mddrc.lut_table2_alternate_upper, CONFIG_SYS_MDDRCGRP_LUT2_AU);
+	out_be32(&im->mddrc.lut_table2_alternate_lower, CONFIG_SYS_MDDRCGRP_LUT2_AL);
+	out_be32(&im->mddrc.lut_table3_alternate_upper, CONFIG_SYS_MDDRCGRP_LUT3_AU);
+	out_be32(&im->mddrc.lut_table3_alternate_lower, CONFIG_SYS_MDDRCGRP_LUT3_AL);
+	out_be32(&im->mddrc.lut_table4_alternate_upper, CONFIG_SYS_MDDRCGRP_LUT4_AU);
+	out_be32(&im->mddrc.lut_table4_alternate_lower, CONFIG_SYS_MDDRCGRP_LUT4_AL);

Lines too long.

board/esd/mecp5123/mecp5123.c line 241

Quoted 4 lines
board/esd/mecp5123/mecp5123.c new file +4 -0
+phys_size_t initdram(int board_type)
+{
+	return fixed_sdram();
+}

Use auto-sizing?

board/esd/mecp5123/mecp5123.c line 252

Quoted 10 lines
board/esd/mecp5123/mecp5123.c new file +10 -0
+int misc_init_r(void)
+{
+	volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
+
+	clrbits_be32(&im->clk.scfr[0], 0x00003800);
+	setbits_be32(&im->clk.scfr[0], 0x01 << 11);
+	clrbits_be32(&im->lpc.cs_dccr, 0x000000ff);
+	setbits_be32(&im->lpc.cs_dccr, (0x00 << 4) | (0x01 << 0));
+	clrbits_be32(&im->lpc.cs_hccr, 0x000000ff);
+	setbits_be32(&im->lpc.cs_hccr, (0x00 << 4) | (0x01 << 0));

Please add some comments what you are doing here, and eventually #define the magic constants used.

...

include/configs/mecp5123.h line 2

Quoted 5 lines
include/configs/mecp5123.h new file +2 -0
@@ -0,0 +1,455 @@
+/*
+ * (C) Copyright 2007, 2008 DENX Software Engineering

2009?

...

include/configs/mecp5123.h line 169

Quoted 8 lines
include/configs/mecp5123.h new file +8 -0
+/*
+ * NOR FLASH on the Local Bus
+ */
+#define CONFIG_SYS_FLASH_CFI				/* use the Common Flash Interface */
+#define CONFIG_FLASH_CFI_DRIVER				/* use the CFI driver */
+
+#define CONFIG_SYS_FLASH_BASE		0xFFC00000	/* start of FLASH   */
+#define CONFIG_SYS_FLASH_SIZE		0x00400000	/* max flash size in bytes */

Lines too long (check everywhere!)

...

Quoted 33 lines
include/configs/mecp5123.h new file +33 -0
+#define	CONFIG_EXTRA_ENV_SETTINGS					\
+	"u-boot_addr_r=200000\0"					\
+	"kernel_addr_r=600000\0"					\
+	"fdt_addr_r=880000\0"						\
+	"ramdisk_addr_r=900000\0"					\
+	"u-boot_addr=FFF00000\0"					\
+	"kernel_addr=FFC40000\0"					\
+	"fdt_addr=FFEC0000\0"						\
+	"ramdisk_addr=FC040000\0"					\
+	"ramdiskfile=/tftpboot/mecp512x/uRamdisk\0"			\
+	"u-boot=/tftpboot/mecp512x/u-boot.bin\0"			\
+	"bootfile=/tftpboot/mecp512x/uImage\0"				\
+	"fdtfile=/tftpboot/mecp512x/mecp512x.dtb\0"			\
+	"rootpath=/tftpboot/mecp512x/target_root\n"	      		\
+	"netdev=eth0\0"							\
+	"consdev=ttyPSC0\0"						\
+	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
+		"nfsroot=${serverip}:${rootpath}\0"			\
+	"ramargs=setenv bootargs root=/dev/ram rw\0"			\
+	"addip=setenv bootargs ${bootargs} "				\
+		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
+		":${hostname}:${netdev}:off panic=1\0"			\
+	"addtty=setenv bootargs ${bootargs} "				\
+		"console=${consdev},${baudrate}\0"			\
+	"flash_nfs=run nfsargs addip addtty;"				\
+		"bootm ${kernel_addr} - ${fdt_addr}\0"			\
+	"flash_self=run ramargs addip addtty;"				\
+		"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0"	\
+	"net_nfs=tftp ${kernel_addr_r} ${bootfile};"			\
+		"tftp ${fdt_addr_r} ${fdtfile};"			\
+		"run nfsargs addip addtty;"				\
+		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
+	"net_self=tftp ${kernel_addr_r} ${bootfile};"			\

include/configs/mecp5123.h line 442

Quoted 10 lines
include/configs/mecp5123.h new file +10 -0
+		"tftp ${ramdisk_addr_r} ${ramdiskfile};"		\
+		"tftp ${fdt_addr_r} ${fdtfile};"			\
+		"run ramargs addip addtty;"				\
+		"bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0"\
+	"load=tftp ${u-boot_addr_r} ${u-boot}\0"			\
+	"update=protect off ${u-boot_addr} +${filesize};"		\
+		"era ${u-boot_addr} +${filesize};"			\
+		"cp.b ${u-boot_addr_r} ${u-boot_addr} ${filesize}\0"	\
+	"upd=run load update\0"						\
+	""

How long does it to boot with such an environment in EEPROM?

include/configs/mecp5123.h line 448

Quoted 3 lines
include/configs/mecp5123.h new file +3 -0
+#define CONFIG_OF_LIBFDT	1
+#define CONFIG_OF_BOARD_SETUP	1
+#define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES	1

Do you really need this on a new board?

Best regards,

Wolfgang Denk

Signature · 4 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
"I'm growing older, but not up."                      - Jimmy Buffett
#2 lore raw

PATCH 1/1 mpc512x: Add esd gmbh mecp5123 board support

Hi Wolfgang,

Quoted 8 lines · On Monday 08 June 2009 12:38:18 Wolfgang Denk wrote:
Quoted 8 lines
board/esd/mecp5123/mecp5123.c new file +8 -0
+int eeprom_write_enable(unsigned dev_addr, int state)
+{
+	volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR;
+
+        if (dev_addr != CONFIG_SYS_I2C_EEPROM_ADDR)
+	        return -1;
+
+        if (state == 0)
Quoted 8 lines

board/esd/mecp5123/mecp5123.c line 64

Quoted 6 lines
board/esd/mecp5123/mecp5123.c new file +6 -0
+		setbits_be32(&im->gpio.gpdat, 0x00100000);
+	else
+		clrbits_be32(&im->gpio.gpdat, 0x00100000);
+
+        return 0;
+}

Please fix indentation - indentation by TAB only, please.

OK.

Quoted 45 lines

...

Quoted 2 lines
board/esd/mecp5123/mecp5123.c new file +2 -0
+int board_early_init_f(void)
+{

...

Quoted 38 lines
board/esd/mecp5123/mecp5123.c new file +5 -0
+	/* Initialize DDR Priority Manager */
+	out_be32(&im->mddrc.prioman_config1, CONFIG_SYS_MDDRCGRP_PM_CFG1);
+	out_be32(&im->mddrc.prioman_config2, CONFIG_SYS_MDDRCGRP_PM_CFG2);
+	out_be32(&im->mddrc.hiprio_config, CONFIG_SYS_MDDRCGRP_HIPRIO_CFG);
+	out_be32(&im->mddrc.lut_table0_main_upper,

CONFIG_SYS_MDDRCGRP_LUT0_MU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table0_main_lower,

CONFIG_SYS_MDDRCGRP_LUT0_ML);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table1_main_upper,

CONFIG_SYS_MDDRCGRP_LUT1_MU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table1_main_lower,

CONFIG_SYS_MDDRCGRP_LUT1_ML);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table2_main_upper,

CONFIG_SYS_MDDRCGRP_LUT2_MU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table2_main_lower,

CONFIG_SYS_MDDRCGRP_LUT2_ML);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table3_main_upper,

CONFIG_SYS_MDDRCGRP_LUT3_MU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table3_main_lower,

CONFIG_SYS_MDDRCGRP_LUT3_ML);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_main_upper,

CONFIG_SYS_MDDRCGRP_LUT4_MU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_main_lower,

CONFIG_SYS_MDDRCGRP_LUT4_ML);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table0_alternate_upper,

CONFIG_SYS_MDDRCGRP_LUT0_AU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table0_alternate_lower,

CONFIG_SYS_MDDRCGRP_LUT0_AL);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table1_alternate_upper,

CONFIG_SYS_MDDRCGRP_LUT1_AU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table1_alternate_lower,

CONFIG_SYS_MDDRCGRP_LUT1_AL);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table2_alternate_upper,

CONFIG_SYS_MDDRCGRP_LUT2_AU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table2_alternate_lower,

CONFIG_SYS_MDDRCGRP_LUT2_AL);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table3_alternate_upper,

CONFIG_SYS_MDDRCGRP_LUT3_AU);

Quoted 8 lines
Quoted 6 lines
(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table3_alternate_lower,

CONFIG_SYS_MDDRCGRP_LUT3_AL);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_alternate_upper,

CONFIG_SYS_MDDRCGRP_LUT4_AU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_alternate_lower,

CONFIG_SYS_MDDRCGRP_LUT4_AL);

Lines too long.

OK. Some is true for aria and mcp5121ads btw. But I'll change it in the next patch version.

Quoted 6 lines

board/esd/mecp5123/mecp5123.c line 241

Quoted 4 lines
board/esd/mecp5123/mecp5123.c new file +4 -0
+phys_size_t initdram(int board_type)
+{
+	return fixed_sdram();
+}

Use auto-sizing?

You refer to using get_ram_size()? I'm no big fan of using this routine in a fixed environment (only one soldering possibility). But ok, I can change this too.

BTW, again this is the same code as in aria.

Quoted 5 lines
Quoted 5 lines
board/esd/mecp5123/mecp5123.c new file +5 -0
+int misc_init_r(void)
+{
+	volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
+
+	clrbits_be32(&im->clk.scfr[0], 0x00003800);
Quoted 8 lines

board/esd/mecp5123/mecp5123.c line 252

Quoted 5 lines
board/esd/mecp5123/mecp5123.c new file +5 -0
+	setbits_be32(&im->clk.scfr[0], 0x01 << 11);
+	clrbits_be32(&im->lpc.cs_dccr, 0x000000ff);
+	setbits_be32(&im->lpc.cs_dccr, (0x00 << 4) | (0x01 << 0));
+	clrbits_be32(&im->lpc.cs_hccr, 0x000000ff);
+	setbits_be32(&im->lpc.cs_hccr, (0x00 << 4) | (0x01 << 0));

Please add some comments what you are doing here, and eventually #define the magic constants used.

OK.

Quoted 7 lines

include/configs/mecp5123.h line 2

Quoted 5 lines
include/configs/mecp5123.h new file +2 -0
@@ -0,0 +1,455 @@
+/*
+ * (C) Copyright 2007, 2008 DENX Software Engineering

2009?

OK.

Quoted 4 lines

include/configs/mecp5123.h

Quoted 4 lines
include/configs/mecp5123.h new file +4 -0
+/*
+ * NOR FLASH on the Local Bus
+ */
+#define CONFIG_SYS_FLASH_CFI				/* use the Common 

Flash Interface */

Quoted 1 line

include/configs/mecp5123.h line 7

Quoted 1 line
include/configs/mecp5123.h new file +1 -0
+#define CONFIG_FLASH_CFI_DRIVER				/* use the CFI 

driver */

Quoted 2 lines

include/configs/mecp5123.h line 9

Quoted 2 lines
include/configs/mecp5123.h new file +2 -0
+
+#define CONFIG_SYS_FLASH_BASE		0xFFC00000	/* start of FLASH   

*/

Quoted 1 line

include/configs/mecp5123.h line 10

Quoted 1 line
include/configs/mecp5123.h new file +1 -0
+#define CONFIG_SYS_FLASH_SIZE		0x00400000	/* max flash size 

in bytes */

Quoted 2 lines

Lines too long (check everywhere!)

OK.

Quoted 37 lines
Quoted 37 lines
include/configs/mecp5123.h new file +37 -0
+#define	CONFIG_EXTRA_ENV_SETTINGS					\
+	"u-boot_addr_r=200000\0"					\
+	"kernel_addr_r=600000\0"					\
+	"fdt_addr_r=880000\0"						\
+	"ramdisk_addr_r=900000\0"					\
+	"u-boot_addr=FFF00000\0"					\
+	"kernel_addr=FFC40000\0"					\
+	"fdt_addr=FFEC0000\0"						\
+	"ramdisk_addr=FC040000\0"					\
+	"ramdiskfile=/tftpboot/mecp512x/uRamdisk\0"			\
+	"u-boot=/tftpboot/mecp512x/u-boot.bin\0"			\
+	"bootfile=/tftpboot/mecp512x/uImage\0"				\
+	"fdtfile=/tftpboot/mecp512x/mecp512x.dtb\0"			\
+	"rootpath=/tftpboot/mecp512x/target_root\n"	      		\
+	"netdev=eth0\0"							\
+	"consdev=ttyPSC0\0"						\
+	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
+		"nfsroot=${serverip}:${rootpath}\0"			\
+	"ramargs=setenv bootargs root=/dev/ram rw\0"			\
+	"addip=setenv bootargs ${bootargs} "				\
+		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
+		":${hostname}:${netdev}:off panic=1\0"			\
+	"addtty=setenv bootargs ${bootargs} "				\
+		"console=${consdev},${baudrate}\0"			\
+	"flash_nfs=run nfsargs addip addtty;"				\
+		"bootm ${kernel_addr} - ${fdt_addr}\0"			\
+	"flash_self=run ramargs addip addtty;"				\
+		"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0"	\
+	"net_nfs=tftp ${kernel_addr_r} ${bootfile};"			\
+		"tftp ${fdt_addr_r} ${fdtfile};"			\
+		"run nfsargs addip addtty;"				\
+		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
+	"net_self=tftp ${kernel_addr_r} ${bootfile};"			\
+		"tftp ${ramdisk_addr_r} ${ramdiskfile};"		\
+		"tftp ${fdt_addr_r} ${fdtfile};"			\
+		"run ramargs addip addtty;"				\
+		"bootm ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}\0"\
Quoted 8 lines

include/configs/mecp5123.h line 442

Quoted 6 lines
include/configs/mecp5123.h new file +6 -0
+	"load=tftp ${u-boot_addr_r} ${u-boot}\0"			\
+	"update=protect off ${u-boot_addr} +${filesize};"		\
+		"era ${u-boot_addr} +${filesize};"			\
+		"cp.b ${u-boot_addr_r} ${u-boot_addr} ${filesize}\0"	\
+	"upd=run load update\0"						\
+	""

How long does it to boot with such an environment in EEPROM?

Quite long. About 10 seconds to the U-Boot prompt.

Quoted 5 lines

include/configs/mecp5123.h line 448

Quoted 3 lines
include/configs/mecp5123.h new file +3 -0
+#define CONFIG_OF_LIBFDT	1
+#define CONFIG_OF_BOARD_SETUP	1
+#define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES	1

Do you really need this on a new board?

Probably not. Again this is just a copy from aria. I'll remove it in the next patch version.

Thanks.

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/1 mpc512x: Add esd gmbh mecp5123 board support

Dear Stefan,

Quoted 10 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 5 lines
(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_alternate_upper,

CONFIG_SYS_MDDRCGRP_LUT4_AU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_alternate_lower,

CONFIG_SYS_MDDRCGRP_LUT4_AL);

Lines too long.

OK. Some is true for aria and mcp5121ads btw. But I'll change it in the next patch version.

If you argument that the too long lines are easier to read then the wrapped ones, I will not fight about this :-)

Quoted 10 lines
Quoted 6 lines

board/esd/mecp5123/mecp5123.c line 241

Quoted 4 lines
board/esd/mecp5123/mecp5123.c new file +4 -0
+phys_size_t initdram(int board_type)
+{
+	return fixed_sdram();
+}

Use auto-sizing?

You refer to using get_ram_size()? I'm no big fan of using this routine in a fixed environment (only one soldering possibility). But ok, I can change this too.

Yes, I stronlgy recommend to use this even on fixed configurations. Keep in mind that it includes a very fast yet pretty efficient memory test that will catch 95% of all RAM issues. It's a great help not only for the board bringup, but also for diabnosing problems in the field. If I could, I would like to make the use of get_ram_size() mandatory :-)

Quoted 1 line

BTW, again this is the same code as in aria.

I know. It's on my list of things to iron out in this port.

Quoted 3 lines
Quoted 1 line

How long does it to boot with such an environment in EEPROM?

Quite long. About 10 seconds to the U-Boot prompt.

He. And then try "setenv baudrate 115200 ; saveenv" and measure again.

Does your customer really want to release such a product to his customers? Other boards boot in a fraction of that time.

Quoted 8 lines
Quoted 5 lines

include/configs/mecp5123.h line 448

Quoted 3 lines
include/configs/mecp5123.h new file +3 -0
+#define CONFIG_OF_LIBFDT	1
+#define CONFIG_OF_BOARD_SETUP	1
+#define CONFIG_OF_SUPPORT_OLD_DEVICE_TREES	1

Do you really need this on a new board?

Probably not. Again this is just a copy from aria. I'll remove it in the next patch version.

Thanks for pointing out. I put it on my cleanup list, too.

Best regards,

Wolfgang Denk

Signature · 4 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
Include the success of others in your dreams for your own success.
#4 lore raw

PATCH 1/1 mpc512x: Add esd gmbh mecp5123 board support

Hi Wolfgang,

Quoted 10 lines · On Monday 08 June 2009 20:14:33 Wolfgang Denk wrote:

Dear Stefan,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 6 lines
Quoted 4 lines
(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_alternate_upper,

CONFIG_SYS_MDDRCGRP_LUT4_AU);

(quoted diff) +1 -0
+	out_be32(&im->mddrc.lut_table4_alternate_lower,

CONFIG_SYS_MDDRCGRP_LUT4_AL);

Lines too long.

Quoted 5 lines
Quoted 2 lines

OK. Some is true for aria and mcp5121ads btw. But I'll change it in the next patch version.

If you argument that the too long lines are easier to read then the wrapped ones, I will not fight about this :-)

Yes, sometimes I really prefer these "too long lines" because it's just better readable. I'll keep this code part as is then. :)

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

How long does it to boot with such an environment in EEPROM?

Quite long. About 10 seconds to the U-Boot prompt.

He. And then try "setenv baudrate 115200 ; saveenv" and measure again.

About 6 seconds.

Quoted 2 lines

Does your customer really want to release such a product to his customers? Other boards boot in a fraction of that time.

I know. I asked again. Please accept the EEPROM decision for now.

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
=====================================================================