All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 05/07] Coldfire: M5271EVB: Board header update (has dependencies)
@ 2009-01-23 22:08 Richard Retanubun
  2009-02-04 15:10 ` [U-Boot] [PATCH 05/07 V2] Coldfire: M5271EVB: Board header update (dependencies) Richard Retanubun
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Retanubun @ 2009-01-23 22:08 UTC (permalink / raw)
  To: u-boot

Cleanup for M5271EVB:
Added clarification on the use of CONFIG_SYS_CLOCK.
Modified to use u-boot's HUSH parser.
Cleanup on environment settings.

Dependencies:
Added the use of CONFIG_SYS_MCF_SYNCR for clock multiplier.
This depends on a patch to include/asm-m68k/m5271.h
that defines the multiplier and divider ratios.

Removed the definition of CONFIG_SYS_FECI2C.
This depends on a patch that removes the use of it in
cpu/mcf52x2/cpu_init.c

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
---
This patch depends on:
Added the use of CONFIG_SYS_MCF_SYNCR for clock multiplier.
This depends on a patch to include/asm-m68k/m5271.h
that defines the multiplier and divider ratios.

Removed the definition of CONFIG_SYS_FECI2C.
This depends on a patch that removes the use of it in
cpu/mcf52x2/cpu_init.c

  include/configs/M5271EVB.h |   35 +++++++++++++++++++++++------------
  1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/include/configs/M5271EVB.h b/include/configs/M5271EVB.h
index 7ddeb55..b8eb156 100644
--- a/include/configs/M5271EVB.h
+++ b/include/configs/M5271EVB.h
@@ -82,11 +82,14 @@
  #define CONFIG_CMD_MISC

  #undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_LOADB
+#define CONFIG_CMD_LOADB
+#define CONFIG_CMDLINE_EDITING	1 /* enables command line history */
+#define CONFIG_SYS_HUSH_PARSER /* Use the HUSH parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "

  #define CONFIG_MCFFEC
  #ifdef CONFIG_MCFFEC
-#	define CONFIG_NET_MULTI		1
+#	define CONFIG_NET_MULTI		0
  #	define CONFIG_MII		1
  #	define CONFIG_MII_INIT		1
  #	define CONFIG_SYS_DISCOVER_PHY
@@ -116,7 +119,7 @@
  #define CONFIG_SYS_I2C_OFFSET		0x00000300
  #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR

-#define CONFIG_BOOTDELAY	1	/* autoboot after 5 seconds */
+#define CONFIG_BOOTDELAY	1	/* autoboot after 1 seconds */
  #define CONFIG_BOOTFILE		"u-boot.bin"
  #ifdef CONFIG_MCFFEC
  #	define CONFIG_NET_RETRY_COUNT	5
@@ -128,16 +131,16 @@
  #	define CONFIG_OVERWRITE_ETHADDR_ONCE
  #endif				/* FEC_ENET */

-#define CONFIG_HOSTNAME		M5235EVB
+#define CONFIG_HOSTNAME		M5271EVB
  #define CONFIG_EXTRA_ENV_SETTINGS		\
  	"netdev=eth0\0"				\
  	"loadaddr=10000\0"			\
-	"u-boot=u-boot.bin\0"			\
-	"load=tftp ${loadaddr) ${u-boot}\0"	\
+	"uboot=u-boot.bin\0"		\
+	"load=tftp $loadaddr $uboot\0"	\
  	"upd=run load; run prog\0"		\
-	"prog=prot off ffe00000 ffe2ffff;"		\
-	"era ffe00000 ffe2ffff;"				\
-	"cp.b ${loadaddr} 0 ${filesize};"	\
+	"prog=prot off ffe00000 ffe3ffff;"	\
+	"era ffe00000 ffe3ffff;"		\
+	"cp.b $loadaddr ffe00000 $filesize;"	\
  	"save\0"				\
  	""

@@ -159,7 +162,18 @@
  #define CONFIG_SYS_MEMTEST_END		0x380000

  #define CONFIG_SYS_HZ			1000000
+
+/* Clock configuration
+ * The external oscillator is a 25.000 MHz
+ * CONFIG_SYS_CLK for ColdFire V2 sets cpu_clk (not bus_clk)
+ * bus_clk = (cpu_clk/2) (fixed ratio)
+ *
+ * If CONFIG_SYS_CLK is changed. the CONFIG_SYS_MCF_SYNCR must be updated to
+ * match the new clock speed. Max cpu_clk is 150 MHz.
+ */
  #define CONFIG_SYS_CLK			100000000
+#define CONFIG_SYS_MCF_SYNCR 	(CONFIG_SYS_MCF_SYNCR_MFD_4X | \
+				CONFIG_SYS_MCF_SYNCR_RFD_DIV1)

  /*
   * Low Level Configuration Settings
@@ -216,7 +230,4 @@
  /* Cache Configuration */
  #define CONFIG_SYS_CACHELINE_SIZE	16

-/* Port configuration */
-#define CONFIG_SYS_FECI2C		0xF0
-
  #endif				/* _M5271EVB_H */
-- 
1.5.6.5

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

* [U-Boot] [PATCH 05/07 V2] Coldfire: M5271EVB: Board header update (dependencies)
  2009-01-23 22:08 [U-Boot] [PATCH 05/07] Coldfire: M5271EVB: Board header update (has dependencies) Richard Retanubun
@ 2009-02-04 15:10 ` Richard Retanubun
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Retanubun @ 2009-02-04 15:10 UTC (permalink / raw)
  To: u-boot

Cleanup for M5271EVB:
Added clarification on the use of CONFIG_SYS_CLOCK.
Modified to use u-boot's HUSH parser.
Cleanup on environment settings.
Removed compiler warning by defining CONFIG_SYS_CS0_*

Dependencies:
Added the use of CONFIG_SYS_MCF_SYNCR for clock multiplier.
This depends on a patch to include/asm-m68k/m5271.h
that defines the multiplier and divider ratios.

Removed the definition of CONFIG_SYS_FECI2C.
This depends on a patch that removes the use of it in
cpu/mcf52x2/cpu_init.c

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
---
V2: Added CONFIG_SYS_CS0_* and CONFIG_SYS_CS1_* #defines to remove
     compiler warnings.

Based in git commit index:

commit 9d8811c5bd2b7dd6307742cf22fbdb7953b6f816
Merge: 716ebf4... bd99ec1...
Author: Wolfgang Denk <wd@denx.de>
Date:   Tue Feb 3 23:16:15 2009 +0100

     Merge branch 'master' of git://git.denx.de/u-boot-usb


  include/configs/M5271EVB.h |   40 ++++++++++++++++++++++++++++++----------
  1 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/include/configs/M5271EVB.h b/include/configs/M5271EVB.h
index 7ddeb55..50b3ab2 100644
--- a/include/configs/M5271EVB.h
+++ b/include/configs/M5271EVB.h
@@ -82,7 +82,10 @@
  #define CONFIG_CMD_MISC

  #undef CONFIG_CMD_LOADS
-#undef CONFIG_CMD_LOADB
+#define CONFIG_CMD_LOADB
+#define CONFIG_CMDLINE_EDITING	1 /* enables command line history */
+#define CONFIG_SYS_HUSH_PARSER /* Use the HUSH parser */
+#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "

  #define CONFIG_MCFFEC
  #ifdef CONFIG_MCFFEC
@@ -116,7 +119,7 @@
  #define CONFIG_SYS_I2C_OFFSET		0x00000300
  #define CONFIG_SYS_IMMR		CONFIG_SYS_MBAR

-#define CONFIG_BOOTDELAY	1	/* autoboot after 5 seconds */
+#define CONFIG_BOOTDELAY	1	/* autoboot after 1 seconds */
  #define CONFIG_BOOTFILE		"u-boot.bin"
  #ifdef CONFIG_MCFFEC
  #	define CONFIG_NET_RETRY_COUNT	5
@@ -128,16 +131,16 @@
  #	define CONFIG_OVERWRITE_ETHADDR_ONCE
  #endif				/* FEC_ENET */

-#define CONFIG_HOSTNAME		M5235EVB
+#define CONFIG_HOSTNAME		M5271EVB
  #define CONFIG_EXTRA_ENV_SETTINGS		\
  	"netdev=eth0\0"				\
  	"loadaddr=10000\0"			\
-	"u-boot=u-boot.bin\0"			\
-	"load=tftp ${loadaddr) ${u-boot}\0"	\
+	"uboot=u-boot.bin\0"		\
+	"load=tftp $loadaddr $uboot\0"	\
  	"upd=run load; run prog\0"		\
-	"prog=prot off ffe00000 ffe2ffff;"		\
-	"era ffe00000 ffe2ffff;"				\
-	"cp.b ${loadaddr} 0 ${filesize};"	\
+	"prog=prot off ffe00000 ffe3ffff;"	\
+	"era ffe00000 ffe3ffff;"		\
+	"cp.b $loadaddr ffe00000 $filesize;"	\
  	"save\0"				\
  	""

@@ -159,7 +162,17 @@
  #define CONFIG_SYS_MEMTEST_END		0x380000

  #define CONFIG_SYS_HZ			1000000
+
+/* Clock configuration
+ * The external oscillator is a 25.000 MHz
+ * CONFIG_SYS_CLK for ColdFire V2 sets cpu_clk (not bus_clk)
+ * bus_clk = (cpu_clk/2) (fixed ratio)
+ *
+ * If CONFIG_SYS_CLK is changed. the CONFIG_SYS_MCF_SYNCR must be updated to
+ * match the new clock speed. Max cpu_clk is 150 MHz.
+ */
  #define CONFIG_SYS_CLK			100000000
+#define CONFIG_SYS_MCF_SYNCR 	(MCF_SYNCR_MFD_4X | MCF_SYNCR_RFD_DIV1)

  /*
   * Low Level Configuration Settings
@@ -216,7 +229,14 @@
  /* Cache Configuration */
  #define CONFIG_SYS_CACHELINE_SIZE	16

-/* Port configuration */
-#define CONFIG_SYS_FECI2C		0xF0
+/* Chip Select 0  : Boot Flash */
+#define CONFIG_SYS_CS0_BASE	0xFFE00000
+#define CONFIG_SYS_CS0_MASK	0x001F0001
+#define CONFIG_SYS_CS0_CTRL	0x00001980
+
+/* Chip Select 1 : External SRAM */
+#define CONFIG_SYS_CS1_BASE	0x30000000
+#define CONFIG_SYS_CS1_MASK	0x00070001
+#define CONFIG_SYS_CS1_CTRL	0x00001900

  #endif				/* _M5271EVB_H */
-- 
1.5.6.5

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

end of thread, other threads:[~2009-02-04 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 22:08 [U-Boot] [PATCH 05/07] Coldfire: M5271EVB: Board header update (has dependencies) Richard Retanubun
2009-02-04 15:10 ` [U-Boot] [PATCH 05/07 V2] Coldfire: M5271EVB: Board header update (dependencies) Richard Retanubun

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.