All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] TQM834x: configuration update
@ 2009-05-14 21:18 Wolfgang Denk
  2009-05-14 21:18 ` [U-Boot] [PATCH 1/3] TQM834x: fix environment size; add redundant env Wolfgang Denk
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-05-14 21:18 UTC (permalink / raw)
  To: u-boot

The following 3 patches update the configuration for the TQM834x
board:

Wolfgang Denk (3):
      TQM834x: fix environment size; add redundant env.
      TQM834x: add FDT support
      TQM834x: use buffered writes to accelerate writing to flash

Signed-off-by: Wolfgang Denk <wd@denx.de>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/3] TQM834x: fix environment size; add redundant env.
  2009-05-14 21:18 [U-Boot] [PATCH 0/3] TQM834x: configuration update Wolfgang Denk
@ 2009-05-14 21:18 ` Wolfgang Denk
  2009-05-14 21:18 ` [U-Boot] [PATCH 2/3] TQM834x: add FDT support Wolfgang Denk
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-05-14 21:18 UTC (permalink / raw)
  To: u-boot

Also reserve more space for U-Boot as it will probably grow soon.

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 include/configs/TQM834x.h |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h
index b74b404..0cecf3f 100644
--- a/include/configs/TQM834x.h
+++ b/include/configs/TQM834x.h
@@ -179,8 +179,8 @@ extern int tqm834x_num_flash_banks;
 #define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
 #define CONFIG_SYS_INIT_SP_OFFSET	CONFIG_SYS_GBL_DATA_OFFSET
 
-#define CONFIG_SYS_MONITOR_LEN		(256 * 1024) /* Reserve 256 kB for Mon */
-#define CONFIG_SYS_MALLOC_LEN		(256 * 1024) /* Reserve 256 kB for malloc */
+#define CONFIG_SYS_MONITOR_LEN		(384 * 1024) /* Reserve 384 kB = 3 sect. for Mon */
+#define CONFIG_SYS_MALLOC_LEN		(512 * 1024) /* Reserve 512 kB for malloc */
 
 /*
  * Serial Port
@@ -295,22 +295,20 @@ extern int tqm834x_num_flash_banks;
 /*
  * Environment
  */
-#define CONFIG_ENV_OVERWRITE
-
-#ifndef CONFIG_SYS_RAMBOOT
-	#define CONFIG_ENV_IS_IN_FLASH	1
-	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + 0x40000)
-	#define CONFIG_ENV_SECT_SIZE	0x40000	/* 256K(one sector) for env */
-	#define CONFIG_ENV_SIZE		0x2000
+#ifdef CONFIG_SYS_RAMBOOT
+# define CONFIG_SYS_NO_FLASH		1	/* Flash is not usable now */
 #else
-	#define CONFIG_SYS_NO_FLASH		1	/* Flash is not usable now */
-	#define CONFIG_ENV_IS_NOWHERE	1	/* Store ENV in memory only */
-	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - 0x1000)
-	#define CONFIG_ENV_SIZE		0x2000
+# define CONFIG_ENV_IS_IN_FLASH		1
 #endif
 
+#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
+#define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K (one sector) for env */
+#define CONFIG_ENV_SIZE			0x8000	/*  32K max size */
+#define CONFIG_ENV_ADDR_REDUND	(CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
+#define CONFIG_ENV_SIZE_REDUND	(CONFIG_ENV_SIZE)
+
 #define CONFIG_LOADS_ECHO		1	/* echo on for serial download */
-#define CONFIG_SYS_LOADS_BAUD_CHANGE		1	/* allow baudrate change */
+#define CONFIG_SYS_LOADS_BAUD_CHANGE	1	/* allow baudrate change */
 
 /*
  * BOOTP options
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/3] TQM834x: add FDT support
  2009-05-14 21:18 [U-Boot] [PATCH 0/3] TQM834x: configuration update Wolfgang Denk
  2009-05-14 21:18 ` [U-Boot] [PATCH 1/3] TQM834x: fix environment size; add redundant env Wolfgang Denk
@ 2009-05-14 21:18 ` Wolfgang Denk
  2009-05-14 21:18 ` [U-Boot] [PATCH 3/3] TQM834x: use buffered writes to accelerate writing to flash Wolfgang Denk
  2009-05-19 15:51 ` [U-Boot] [PATCH 0/3] TQM834x: configuration update Kim Phillips
  3 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-05-14 21:18 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 board/tqc/tqm834x/pci.c     |   45 ++++++++++++++++++++++++++++++++
 board/tqc/tqm834x/tqm834x.c |   11 ++++++++
 include/configs/TQM834x.h   |   59 ++++++++++++++++++++++++++++--------------
 3 files changed, 95 insertions(+), 20 deletions(-)

diff --git a/board/tqc/tqm834x/pci.c b/board/tqc/tqm834x/pci.c
index cb2cb8d..6c113e3 100644
--- a/board/tqc/tqm834x/pci.c
+++ b/board/tqc/tqm834x/pci.c
@@ -24,7 +24,15 @@
 
 #include <asm/mmu.h>
 #include <common.h>
+#include <asm/global_data.h>
 #include <pci.h>
+#include <asm/mpc8349_pci.h>
+#if defined(CONFIG_OF_LIBFDT)
+#include <libfdt.h>
+#include <fdt_support.h>
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
 
 #ifdef CONFIG_PCI
 
@@ -217,4 +225,41 @@ pci_init_board(void)
 	 */
 	hose->last_busno = pci_hose_scan(hose);
 }
+
+#if defined(CONFIG_OF_LIBFDT)
+void ft_pci_setup(void *blob, bd_t *bd)
+{
+	int nodeoffset;
+	int tmp[2];
+	const char *path;
+
+	nodeoffset = fdt_path_offset(blob, "/aliases");
+	if (nodeoffset >= 0) {
+		path = fdt_getprop(blob, nodeoffset, "pci0", NULL);
+		if (path) {
+			tmp[0] = cpu_to_be32(pci1_hose.first_busno);
+			tmp[1] = cpu_to_be32(pci1_hose.last_busno);
+			do_fixup_by_path(blob, path, "bus-range",
+				&tmp, sizeof(tmp), 1);
+
+			tmp[0] = cpu_to_be32(gd->pci_clk);
+			do_fixup_by_path(blob, path, "clock-frequency",
+				&tmp, sizeof(tmp[0]), 1);
+		}
+#ifdef CONFIG_MPC83XX_PCI2
+		path = fdt_getprop(blob, nodeoffset, "pci1", NULL);
+		if (path) {
+			tmp[0] = cpu_to_be32(pci2_hose.first_busno);
+			tmp[1] = cpu_to_be32(pci2_hose.last_busno);
+			do_fixup_by_path(blob, path, "bus-range",
+				&tmp, sizeof(tmp), 1);
+
+			tmp[0] = cpu_to_be32(gd->pci_clk);
+			do_fixup_by_path(blob, path, "clock-frequency",
+				&tmp, sizeof(tmp[0]), 1);
+		}
+#endif
+	}
+}
+#endif /* CONFIG_OF_LIBFDT */
 #endif /* CONFIG_PCI */
diff --git a/board/tqc/tqm834x/tqm834x.c b/board/tqc/tqm834x/tqm834x.c
index 106cac2..4fd8cd6 100644
--- a/board/tqc/tqm834x/tqm834x.c
+++ b/board/tqc/tqm834x/tqm834x.c
@@ -431,3 +431,14 @@ static void set_ddr_config(void) {
 #endif
 	}
 }
+
+#ifdef CONFIG_OF_BOARD_SETUP
+void ft_board_setup(void *blob, bd_t *bd)
+{
+	ft_cpu_setup(blob, bd);
+
+#ifdef CONFIG_PCI
+	ft_pci_setup(blob, bd);
+#endif	/* CONFIG_PCI */
+}
+#endif	/* CONFIG_OF_BOARD_SETUP */
diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h
index 0cecf3f..5590d2e 100644
--- a/include/configs/TQM834x.h
+++ b/include/configs/TQM834x.h
@@ -166,9 +166,9 @@ extern int tqm834x_num_flash_banks;
 #define CONFIG_SYS_MONITOR_BASE	TEXT_BASE	/* start of monitor */
 
 #if (CONFIG_SYS_MONITOR_BASE < CONFIG_SYS_FLASH_BASE)
-#define CONFIG_SYS_RAMBOOT
+# define CONFIG_SYS_RAMBOOT
 #else
-#undef  CONFIG_SYS_RAMBOOT
+# undef  CONFIG_SYS_RAMBOOT
 #endif
 
 #define CONFIG_SYS_INIT_RAM_LOCK	1
@@ -295,12 +295,7 @@ extern int tqm834x_num_flash_banks;
 /*
  * Environment
  */
-#ifdef CONFIG_SYS_RAMBOOT
-# define CONFIG_SYS_NO_FLASH		1	/* Flash is not usable now */
-#else
-# define CONFIG_ENV_IS_IN_FLASH		1
-#endif
-
+#define CONFIG_ENV_IS_IN_FLASH		1
 #define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
 #define CONFIG_ENV_SECT_SIZE		0x20000	/* 128K (one sector) for env */
 #define CONFIG_ENV_SIZE			0x8000	/*  32K max size */
@@ -324,14 +319,18 @@ extern int tqm834x_num_flash_banks;
  */
 #include <config_cmd_default.h>
 
+#define CONFIG_CMD_ASKENV
 #define CONFIG_CMD_DATE
+#define CONFIG_CMD_DHCP
 #define CONFIG_CMD_DTT
 #define CONFIG_CMD_EEPROM
 #define CONFIG_CMD_I2C
+#define CONFIG_CMD_NFS
 #define CONFIG_CMD_JFFS2
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_PING
-#define CONFIG_CMD_DHCP
+#define CONFIG_CMD_REGINFO
+#define CONFIG_CMD_SNTP
 
 #if defined(CONFIG_PCI)
     #define CONFIG_CMD_PCI
@@ -368,6 +367,11 @@ extern int tqm834x_num_flash_banks;
 
 #undef CONFIG_WATCHDOG				/* watchdog disabled */
 
+/* pass open firmware flat tree */
+#define CONFIG_OF_LIBFDT	1
+#define CONFIG_OF_BOARD_SETUP	1
+#define CONFIG_OF_STDOUT_VIA_ALIAS	1
+
 /*
  * For booting Linux, the board info and command line data
  * have to be in the first 8 MB of memory, since this is
@@ -512,20 +516,35 @@ extern int tqm834x_num_flash_banks;
 	"addip=setenv bootargs ${bootargs} "				\
 		"ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}"	\
 		":${hostname}:${netdev}:off panic=1\0"			\
-	"addtty=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
-	"flash_nfs=run nfsargs addip addtty;"				\
+	"addcons=setenv bootargs ${bootargs} console=ttyS0,${baudrate}\0"\
+	"flash_nfs_old=run nfsargs addip addcons;"			\
 		"bootm ${kernel_addr}\0"				\
-	"flash_self=run ramargs addip addtty;"				\
+	"flash_nfs=run nfsargs addip addcons;"				\
+		"bootm ${kernel_addr} - ${fdt_addr}\0"			\
+	"flash_self_old=run ramargs addip addcons;"			\
 		"bootm ${kernel_addr} ${ramdisk_addr}\0"		\
-	"net_nfs=tftp 400000 ${bootfile};run nfsargs addip addtty;"     \
-		"bootm\0"						\
+	"flash_self=run ramargs addip addcons;"				\
+		"bootm ${kernel_addr} ${ramdisk_addr} ${fdt_addr}\0"	\
+	"net_nfs_old=tftp 400000 ${bootfile};"				\
+		"run nfsargs addip addcons;bootm\0"			\
+	"net_nfs=tftp ${kernel_addr_r} ${bootfile}; "			\
+		"tftp ${fdt_addr_r} ${fdt_file}; "			\
+		"run nfsargs addip addcons; "				\
+		"bootm ${kernel_addr_r} - ${fdt_addr_r}\0"		\
 	"rootpath=/opt/eldk/ppc_6xx\0"					\
-	"bootfile=/tftpboot/tqm834x/uImage\0"				\
-	"kernel_addr=80060000\0"					\
-	"ramdisk_addr=80160000\0"					\
-	"load=tftp 100000 /tftpboot/tqm834x/u-boot.bin\0"		\
-	"update=protect off 80000000 8003ffff; "			\
-		"era 80000000 8003ffff; cp.b 100000 80000000 40000\0"	\
+	"bootfile=tqm834x/uImage\0"					\
+	"fdtfile=tqm834x/tqm834x.dtb\0"					\
+	"kernel_addr_r=400000\0"					\
+	"fdt_addr_r=600000\0"						\
+	"ramdisk_addr_r=800000\0"					\
+	"kernel_addr=800C0000\0"					\
+	"fdt_addr=800A0000\0"						\
+	"ramdisk_addr=80300000\0"					\
+	"u-boot=tqm834x/u-boot.bin\0"					\
+	"load=tftp 200000 ${u-boot}\0"					\
+	"update=protect off 80000000 +${filesize};"			\
+		"era 80000000 +${filesize};"				\
+		"cp.b 200000 80000000 ${filesize}\0"			\
 	"upd=run load update\0"						\
 	""
 
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 3/3] TQM834x: use buffered writes to accelerate writing to flash
  2009-05-14 21:18 [U-Boot] [PATCH 0/3] TQM834x: configuration update Wolfgang Denk
  2009-05-14 21:18 ` [U-Boot] [PATCH 1/3] TQM834x: fix environment size; add redundant env Wolfgang Denk
  2009-05-14 21:18 ` [U-Boot] [PATCH 2/3] TQM834x: add FDT support Wolfgang Denk
@ 2009-05-14 21:18 ` Wolfgang Denk
  2009-05-15  4:08   ` Stefan Roese
  2009-05-19 15:51 ` [U-Boot] [PATCH 0/3] TQM834x: configuration update Kim Phillips
  3 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2009-05-14 21:18 UTC (permalink / raw)
  To: u-boot

Also enable display of 'E'mpty sectors in "lsinfo" output.

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
 include/configs/TQM834x.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h
index 5590d2e..c504ecb 100644
--- a/include/configs/TQM834x.h
+++ b/include/configs/TQM834x.h
@@ -78,13 +78,12 @@
  * 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_FLASH_CFI_DRIVER				/* use the CFI driver */
 #undef CONFIG_SYS_FLASH_CHECKSUM
 #define CONFIG_SYS_FLASH_BASE		0x80000000	/* start of FLASH   */
 #define CONFIG_SYS_FLASH_SIZE		8		/* FLASH size in MB */
-
-/* buffered writes in the AMD chip set is not supported yet */
-#undef CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_EMPTY_INFO			/* print 'E' for empty sectors */
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
 
 /*
  * FLASH bank number detection
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 3/3] TQM834x: use buffered writes to accelerate writing to flash
  2009-05-14 21:18 ` [U-Boot] [PATCH 3/3] TQM834x: use buffered writes to accelerate writing to flash Wolfgang Denk
@ 2009-05-15  4:08   ` Stefan Roese
  2009-05-15  7:19     ` [U-Boot] [PATCH 3/3 v2] " Wolfgang Denk
  2009-05-15  7:20     ` [U-Boot] [PATCH 3/3] " Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Roese @ 2009-05-15  4:08 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Thursday 14 May 2009 23:18:35 Wolfgang Denk wrote:
> Also enable display of 'E'mpty sectors in "lsinfo" output.

s lsinfo/flinfo.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 3/3 v2] TQM834x: use buffered writes to accelerate writing to flash
  2009-05-15  4:08   ` Stefan Roese
@ 2009-05-15  7:19     ` Wolfgang Denk
  2009-05-15  7:20     ` [U-Boot] [PATCH 3/3] " Wolfgang Denk
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-05-15  7:19 UTC (permalink / raw)
  To: u-boot

Also enable display of 'E'mpty sectors in "flinfo" output.

Signed-off-by: Wolfgang Denk <wd@denx.de>
---
v2: fix "flinfo" misspelling

 include/configs/TQM834x.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h
index 5590d2e..c504ecb 100644
--- a/include/configs/TQM834x.h
+++ b/include/configs/TQM834x.h
@@ -78,13 +78,12 @@
  * 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_FLASH_CFI_DRIVER				/* use the CFI driver */
 #undef CONFIG_SYS_FLASH_CHECKSUM
 #define CONFIG_SYS_FLASH_BASE		0x80000000	/* start of FLASH   */
 #define CONFIG_SYS_FLASH_SIZE		8		/* FLASH size in MB */
-
-/* buffered writes in the AMD chip set is not supported yet */
-#undef CONFIG_SYS_FLASH_USE_BUFFER_WRITE
+#define CONFIG_SYS_FLASH_EMPTY_INFO			/* print 'E' for empty sectors */
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE
 
 /*
  * FLASH bank number detection
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 3/3] TQM834x: use buffered writes to accelerate writing to flash
  2009-05-15  4:08   ` Stefan Roese
  2009-05-15  7:19     ` [U-Boot] [PATCH 3/3 v2] " Wolfgang Denk
@ 2009-05-15  7:20     ` Wolfgang Denk
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2009-05-15  7:20 UTC (permalink / raw)
  To: u-boot

Dear Stefan Roese,

In message <200905150608.13837.sr@denx.de> you wrote:
> Hi Wolfgang,
> 
> On Thursday 14 May 2009 23:18:35 Wolfgang Denk wrote:
> > Also enable display of 'E'mpty sectors in "lsinfo" output.
> 
> s lsinfo/flinfo.

Thanks for catching this. Will fix.

Best regards,

Wolfgang Denk

-- 
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 number you have dialed is imaginary. Please divide by 0  and  try
again.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 0/3] TQM834x: configuration update
  2009-05-14 21:18 [U-Boot] [PATCH 0/3] TQM834x: configuration update Wolfgang Denk
                   ` (2 preceding siblings ...)
  2009-05-14 21:18 ` [U-Boot] [PATCH 3/3] TQM834x: use buffered writes to accelerate writing to flash Wolfgang Denk
@ 2009-05-19 15:51 ` Kim Phillips
  3 siblings, 0 replies; 8+ messages in thread
From: Kim Phillips @ 2009-05-19 15:51 UTC (permalink / raw)
  To: u-boot

On Thu, 14 May 2009 23:18:32 +0200
Wolfgang Denk <wd@denx.de> wrote:

> The following 3 patches update the configuration for the TQM834x
> board:
> 
> Wolfgang Denk (3):
>       TQM834x: fix environment size; add redundant env.
>       TQM834x: add FDT support
>       TQM834x: use buffered writes to accelerate writing to flash

applied 1-3/3 to u-boot-mpc83xx next branch.

Kim

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-05-19 15:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-14 21:18 [U-Boot] [PATCH 0/3] TQM834x: configuration update Wolfgang Denk
2009-05-14 21:18 ` [U-Boot] [PATCH 1/3] TQM834x: fix environment size; add redundant env Wolfgang Denk
2009-05-14 21:18 ` [U-Boot] [PATCH 2/3] TQM834x: add FDT support Wolfgang Denk
2009-05-14 21:18 ` [U-Boot] [PATCH 3/3] TQM834x: use buffered writes to accelerate writing to flash Wolfgang Denk
2009-05-15  4:08   ` Stefan Roese
2009-05-15  7:19     ` [U-Boot] [PATCH 3/3 v2] " Wolfgang Denk
2009-05-15  7:20     ` [U-Boot] [PATCH 3/3] " Wolfgang Denk
2009-05-19 15:51 ` [U-Boot] [PATCH 0/3] TQM834x: configuration update Kim Phillips

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.