[U-Boot] [PATCH] galaxy5200: Add default environment variables

2009-10-28 Thread Eric Millbrandt
Extend bootdelay to 10 seconds.  Set boot retry time to 120 seconds and use
reset to retry.  Define default bootcommand and bootargs for production.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 include/configs/galaxy5200.h |   10 --
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index 931acfb..4be28b2 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -88,15 +88,21 @@
 /*
  * Autobooting
  */
-#define CONFIG_BOOTDELAY   3   /* autoboot after 3 seconds */
+#define CONFIG_BOOTDELAY   10  /* autoboot after 10 seconds */
 #define CONFIG_ZERO_BOOTDELAY_CHECK/* allow stopping of boot process */
/* even with bootdelay=0 */
-#undef CONFIG_BOOTARGS
+#define CONFIG_BOOT_RETRY_TIME 120 /* Reset if no command is entered  */
+#define CONFIG_RESET_TO_RETRY
 
 #define CONFIG_PREBOOT echo; \
echo Welcome to U-Boot;\
echo
 
+#define CONFIG_BOOTCOMMAND go ff34 0; go ff34 2 2; \
+   bootm ff04 ff90 fffc
+#define CONFIG_BOOTARGSconsole=ttyPSC0,115200
+#define CONFIG_EXTRA_ENV_SETTINGS epson=yes\0
+
 /*
  * IPB Bus clocking configuration.
  */
-- 
1.6.3.1


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] galaxy5200: change cs1 configuration

2009-10-14 Thread Eric Millbrandt
Hello Wolfgang,

This patch, from Sept. 25, seems to have gotten lost in the din.  Could you
please pick up this patch?

Thanks
Eric

On Wed, 14 Oct 2009 09:31:45 -0400, Eric Millbrandt wrote
 -Original Message-
 From: u-boot-boun...@lists.denx.de [mailto:u-boot-
 boun...@lists.denx.de] On Behalf Of Eric Millbrandt Sent: Friday,
  September 25, 2009 18:48 To: Wolfgang Denk; Grant Likey Cc:
u-boot@lists.denx.de
 Subject: [U-Boot] [PATCH] galaxy5200: change cs1 configuration
 
 Correct the chip select configuration for the nand flash chip select.
 
 Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
 ---
  include/configs/galaxy5200.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
 index 3b67ea9..931acfb 100644
 --- a/include/configs/galaxy5200.h
 +++ b/include/configs/galaxy5200.h
 @@ -210,7 +210,7 @@
  /* Chip Select configuration for NAND flash */
  #define CONFIG_SYS_CS1_START   0x2000
  #define CONFIG_SYS_CS1_SIZE0x9
 -#define CONFIG_SYS_CS1_CFG 0x0002d900
 +#define CONFIG_SYS_CS1_CFG 0x00025b00
 
  /* Chip Select configuration for Epson S1D13513 */
  #define CONFIG_SYS_CS3_START   0x1000
 --
 1.6.3.1
 
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
 
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] galaxy5200: change cs1 configuration

2009-09-25 Thread Eric Millbrandt
Correct the chip select configuration for the nand flash chip select.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 include/configs/galaxy5200.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index 3b67ea9..931acfb 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -210,7 +210,7 @@
 /* Chip Select configuration for NAND flash */
 #define CONFIG_SYS_CS1_START   0x2000
 #define CONFIG_SYS_CS1_SIZE0x9
-#define CONFIG_SYS_CS1_CFG 0x0002d900
+#define CONFIG_SYS_CS1_CFG 0x00025b00
 
 /* Chip Select configuration for Epson S1D13513 */
 #define CONFIG_SYS_CS3_START   0x1000
-- 
1.6.3.1


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Add version variable to the galaxy5200 board.

2009-09-21 Thread Eric Millbrandt
Add version environment variable to the galaxy5200 board header file.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 include/configs/galaxy5200.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index f4b520d..3b67ea9 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -367,6 +367,8 @@
 CONFIG_BOOTP_DNS2 | \
 CONFIG_BOOTP_SEND_HOSTNAME )
 
+#define CONFIG_VERSION_VARIABLE 1
+
 /*
  * Various low-level settings
  */
-- 
1.6.3.1


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] Reset i2c slave devices during init on mpc5xxx cpus

2009-09-03 Thread Eric Millbrandt
Reset any i2c devices that may have been interrupted during a system reset.
Normally this would be accomplished by clocking the line until SCL and SDA
are released and then sending a start condtiion (From an Atmel datasheet).
There is no direct access to the i2c pins so instead create start commands
through the i2c interface.  Send a start command then delay for the SDA Hold
time, repeat this by disabling/enabling the bus a total of 9 times.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---

changes since v1
- Fixed compiler warning

 README   |7 ++
 cpu/mpc5xxx/i2c.c|   49 ++
 include/configs/galaxy5200.h |1 +
 3 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/README b/README
index 246ae2b..6ccb2fe 100644
--- a/README
+++ b/README
@@ -1366,6 +1366,13 @@ The following options need to be configured:
therefore be cleared to 0 (See, eg, MPC823e User's Manual
p.16-473). So, set CONFIG_SYS_I2C_SLAVE to 0.
 
+   CONFIG_SYS_I2C_INIT_MPC5XXX
+
+   When a board is reset during an i2c bus transfer
+   chips might think that the current transfer is still
+   in progress.  Reset the slave devices by sending start
+   commands until the slave device responds.
+
That's all that's required for CONFIG_HARD_I2C.
 
If you use the software i2c interface (CONFIG_SOFT_I2C)
diff --git a/cpu/mpc5xxx/i2c.c b/cpu/mpc5xxx/i2c.c
index 2341932..4f7f716 100644
--- a/cpu/mpc5xxx/i2c.c
+++ b/cpu/mpc5xxx/i2c.c
@@ -207,6 +207,52 @@ static int receive_bytes(uchar chip, char *buf, int len)
return 0;
 }
 
+#if defined(CONFIG_SYS_I2C_INIT_MPC5XXX)
+
+#define FDR510(x) (u8) (((x  0x20)  3) | (x  0x3))
+#define FDR432(x) (u8) ((x  0x1C)  2)
+/*
+ * Reset any i2c devices that may have been interrupted during a system reset.
+ * Normally this would be accomplished by clocking the line until SCL and SDA
+ * are released and then sending a start condtiion (From an Atmel datasheet).
+ * There is no direct access to the i2c pins so instead create start commands
+ * through the i2c interface.  Send a start command then delay for the SDA Hold
+ * time, repeat this by disabling/enabling the bus a total of 9 times.
+ */
+static void send_reset(void)
+{
+   struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;
+   int i;
+   u32 delay;
+   u8 fdr;
+   int SDA_Tap[] = { 3, 3, 4, 4, 1, 1, 2, 2};
+   struct mpc5xxx_i2c_tap scltap[] = {
+   {4, 1},
+   {4, 2},
+   {6, 4},
+   {6, 8},
+   {14, 16},
+   {30, 32},
+   {62, 64},
+   {126, 128}
+   };
+
+   fdr = (u8)mpc_reg_in(regs-mfdr);
+
+   delay = scltap[FDR432(fdr)].scl2tap + ((SDA_Tap[FDR510(fdr)] - 1) * \
+   scltap[FDR432(fdr)].tap2tap) + 3;
+
+   for (i = 0; i  9; i++) {
+   mpc_reg_out(regs-mcr, I2C_EN|I2C_STA|I2C_TX, I2C_INIT_MASK);
+   udelay(delay);
+   mpc_reg_out(regs-mcr, 0, I2C_INIT_MASK);
+   udelay(delay);
+   }
+
+   mpc_reg_out(regs-mcr, I2C_EN, I2C_INIT_MASK);
+}
+#endif /* CONFIG_SYS_I2c_INIT_MPC5XXX */
+
 / I2C API /
 
 void i2c_init(int speed, int saddr)
@@ -225,6 +271,9 @@ void i2c_init(int speed, int saddr)
mpc_reg_out(regs-mcr, I2C_EN, I2C_INIT_MASK);
mpc_reg_out(regs-msr, 0, I2C_IF);
 
+#if defined(CONFIG_SYS_I2C_INIT_MPC5XXX)
+   send_reset();
+#endif
return;
 }
 
diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index 8d530d8..2ba5f0f 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -110,6 +110,7 @@
 #define CONFIG_SYS_I2C_MODULE 2/* Select I2C module #1 or #2 */
 #define CONFIG_SYS_I2C_SPEED 10/* 100 kHz */
 #define CONFIG_SYS_I2C_SLAVE 0x7F
+#define CONFIG_SYS_I2C_INIT_MPC5XXX/* Reset devices on i2c bus */
 
 /*
  * EEPROM CAT24WC32 configuration
-- 
1.6.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add chip select region to galaxy5200

2009-08-28 Thread Eric Millbrandt
On Thu, 27 Aug 2009 17:46:03 -0600, Grant Likely wrote
 On Thu, Aug 27, 2009 at 4:11 PM, Eric
 Millbrandtemillbra...@coldhaus.com wrote:
  Add chip select region for an Epson S1D15313.
 
  Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
  ---
   include/configs/galaxy5200.h |    5 +
   1 files changed, 5 insertions(+), 0 deletions(-)
 
  diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
  index eb2cae6..54c6b80 100644
  --- a/include/configs/galaxy5200.h
  +++ b/include/configs/galaxy5200.h
  @@ -212,6 +212,11 @@
   #define CONFIG_SYS_CS1_SIZE            0x9
   #define CONFIG_SYS_CS1_CFG             0x0002d900
 
  +/* Chip Select configuration for Epson S1D13513 */
  +#define CONFIG_SYS_CS3_START           0x1000
  +#define CONFIG_SYS_CS3_SIZE            0x103f
  +#define CONFIG_SYS_CS3_CFG             0x3d10
 
 This doesn't look right.  Shouldn't CONFIG_SYS_CS3_SIZE be 0x0040?
 (Compare with SYS_CS1 above)
 
Yes, you are correct.  I must have been thinking of the STOP location instead
of the size of the region.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Reset i2c slave devices during init on mpc5xxx cpus

2009-08-27 Thread Eric Millbrandt
Reset any i2c devices that may have been interrupted during a system reset.
Normally this would be accomplished by clocking the line until SCL and SDA
are released and then sending a start condtiion (From an Atmel datasheet).
There is no direct access to the i2c pins so instead create start commands
through the i2c interface.  Send a start command then delay for the SDA Hold
time, repeat this by disabling/enabling the bus a total of 9 times.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---

Heiko,

I was able to implement a i2c reset function with features common to all
mpc5xxx cpu.  Nothing was left from the first implementation, so I am
submitting this as a new patch.

Thanks
Eric

 README   |7 ++
 cpu/mpc5xxx/i2c.c|   49 ++
 include/configs/galaxy5200.h |1 +
 3 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/README b/README
index 246ae2b..6ccb2fe 100644
--- a/README
+++ b/README
@@ -1366,6 +1366,13 @@ The following options need to be configured:
therefore be cleared to 0 (See, eg, MPC823e User's Manual
p.16-473). So, set CONFIG_SYS_I2C_SLAVE to 0.
 
+   CONFIG_SYS_I2C_INIT_MPC5XXX
+
+   When a board is reset during an i2c bus transfer
+   chips might think that the current transfer is still
+   in progress.  Reset the slave devices by sending start
+   commands until the slave device responds.
+
That's all that's required for CONFIG_HARD_I2C.
 
If you use the software i2c interface (CONFIG_SOFT_I2C)
diff --git a/cpu/mpc5xxx/i2c.c b/cpu/mpc5xxx/i2c.c
index 2341932..70a46be 100644
--- a/cpu/mpc5xxx/i2c.c
+++ b/cpu/mpc5xxx/i2c.c
@@ -207,6 +207,52 @@ static int receive_bytes(uchar chip, char *buf, int len)
return 0;
 }
 
+#if defined(CONFIG_SYS_I2C_INIT_MPC5XXX)
+
+#define FDR510(x) (u8) (((x  0x20)  3) | (x  0x3))
+#define FDR432(x) (u8) ((x  0x1C)  2)
+/*
+ * Reset any i2c devices that may have been interrupted during a system reset.
+ * Normally this would be accomplished by clocking the line until SCL and SDA
+ * are released and then sending a start condtiion (From an Atmel datasheet).
+ * There is no direct access to the i2c pins so instead create start commands
+ * through the i2c interface.  Send a start command then delay for the SDA Hold
+ * time, repeat this by disabling/enabling the bus a total of 9 times.
+ */
+static void send_reset()
+{
+   struct mpc5xxx_i2c *regs = (struct mpc5xxx_i2c *)I2C_BASE;
+   int i;
+   u32 delay;
+   u8 fdr;
+   int SDA_Tap[] = { 3, 3, 4, 4, 1, 1, 2, 2};
+   struct mpc5xxx_i2c_tap scltap[] = {
+   {4, 1},
+   {4, 2},
+   {6, 4},
+   {6, 8},
+   {14, 16},
+   {30, 32},
+   {62, 64},
+   {126, 128}
+   };
+
+   fdr = (u8)mpc_reg_in(regs-mfdr);
+
+   delay = scltap[FDR432(fdr)].scl2tap + ((SDA_Tap[FDR510(fdr)] - 1) * \
+   scltap[FDR432(fdr)].tap2tap) + 3;
+
+   for (i = 0; i  9; i++) {
+   mpc_reg_out(regs-mcr, I2C_EN|I2C_STA|I2C_TX, I2C_INIT_MASK);
+   udelay(delay);
+   mpc_reg_out(regs-mcr, 0, I2C_INIT_MASK);
+   udelay(delay);
+   }
+
+   mpc_reg_out(regs-mcr, I2C_EN, I2C_INIT_MASK);
+}
+#endif /* CONFIG_SYS_I2c_INIT_MPC5XXX */
+
 / I2C API /
 
 void i2c_init(int speed, int saddr)
@@ -225,6 +271,9 @@ void i2c_init(int speed, int saddr)
mpc_reg_out(regs-mcr, I2C_EN, I2C_INIT_MASK);
mpc_reg_out(regs-msr, 0, I2C_IF);
 
+#if defined(CONFIG_SYS_I2C_INIT_MPC5XXX)
+   send_reset();
+#endif
return;
 }
 
diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index 8d530d8..2ba5f0f 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -110,6 +110,7 @@
 #define CONFIG_SYS_I2C_MODULE 2/* Select I2C module #1 or #2 */
 #define CONFIG_SYS_I2C_SPEED 10/* 100 kHz */
 #define CONFIG_SYS_I2C_SLAVE 0x7F
+#define CONFIG_SYS_I2C_INIT_MPC5XXX/* Reset devices on i2c bus */
 
 /*
  * EEPROM CAT24WC32 configuration
-- 
1.6.3.1


http://openwebmail.org - eem

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Add chip select region to galaxy5200

2009-08-27 Thread Eric Millbrandt
Add chip select region for an Epson S1D15313.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 include/configs/galaxy5200.h |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index eb2cae6..54c6b80 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -212,6 +212,11 @@
 #define CONFIG_SYS_CS1_SIZE0x9
 #define CONFIG_SYS_CS1_CFG 0x0002d900
 
+/* Chip Select configuration for Epson S1D13513 */
+#define CONFIG_SYS_CS3_START   0x1000
+#define CONFIG_SYS_CS3_SIZE0x103f
+#define CONFIG_SYS_CS3_CFG 0x3d10
+
 /*
  * Ethernet configuration
  */
-- 
1.6.3.1


http://openwebmail.org - eem

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/3] Reset interrupted i2c slaves (galaxy5200)

2009-08-26 Thread Eric Millbrandt
Hi Heiko,

On Wed, 26 Aug 2009 08:57:46 +0200, Heiko Schocher wrote
 Hello Eric,
 
 Eric Millbrandt wrote:
  Reset any i2c devices that may have been interrupted by a system reset.
  Normally this would be accomplished by clocking the line until SCL and SDA
  are released and then sending a start condtiion (From an Atmel datasheet).
  But since there is only write access to these lines on the MPC5200 we can
  only attempt to reset any slave devices by sending more start commands than
  bits the slave is attempting to transmit.
  
  Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
  ---
  
  Changes since v1:
  - Remove non-related modifications to a different patch per Peter's 
  suggestion
 
 one common comment:
 
 Can you please use in_*/out_* accessors for accessing mpc52xx registers.

Ok.  I will do that.
  
   board/galaxy5200/galaxy5200.c |   41
+
   include/configs/galaxy5200.h  |1 +
   2 files changed, 42 insertions(+), 0 deletions(-)
  
  diff --git a/board/galaxy5200/galaxy5200.c b/board/galaxy5200/galaxy5200.c
  index 5aa9d3a..c38e7de 100644
  --- a/board/galaxy5200/galaxy5200.c
  +++ b/board/galaxy5200/galaxy5200.c
  @@ -155,6 +155,47 @@ phys_size_t initdram(int board_type)
  return dramsize + dramsize2;
   }
   
  +/*
  + * Reset any i2c devices that may have been interrupted by a system reset.
  + * Normally this would be accomplished by clocking the line until SCL and 
  SDA
  + * are released and then sending a start condtiion (From an Atmel 
  datasheet).
  + * But since there is only write access to these lines on the MPC5200 we 
  can
  + * only attempt to reset any slave devices by sending more start commands
than
  + * bits the slave is attempting to transmit.
  + */
  +int misc_init_f(void)
 
 Hmm.. why in misc_init_f? Can you move this function to the mpc52xx i2c
 driver, and add this in a manner like the send_reset() function
 in drivers/i2c/soft_i2c.c? And call this send_reset() in the
 i2c_init() from the mpc52xx i2c driver. As I don;t know, if this
 is valid for all mpc52xx boards, it should be then also per
 CONFIG_SYS_* define selectable.

The i2c registers that I used are only on the MPC5200B, not the MPC5200.  I
put the reset function under misc_init_f for that reason.  Is adding a single
cpu dependent function appropriate for the entire cpu/5xxx family branch?  If
it is then I will move the reset function to the mpc5xxx i2c driver.

Thanks

http://openwebmail.org - eem

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/3] Reset interrupted i2c slaves (galaxy5200)

2009-08-25 Thread Eric Millbrandt
Reset any i2c devices that may have been interrupted by a system reset.
Normally this would be accomplished by clocking the line until SCL and SDA
are released and then sending a start condtiion (From an Atmel datasheet).
But since there is only write access to these lines on the MPC5200 we can
only attempt to reset any slave devices by sending more start commands than
bits the slave is attempting to transmit.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 Some whitespace cleanup and typos are included in this patch

 board/galaxy5200/galaxy5200.c |   41 +
 include/configs/galaxy5200.h  |9 +
 2 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/board/galaxy5200/galaxy5200.c b/board/galaxy5200/galaxy5200.c
index 5aa9d3a..c38e7de 100644
--- a/board/galaxy5200/galaxy5200.c
+++ b/board/galaxy5200/galaxy5200.c
@@ -155,6 +155,47 @@ phys_size_t initdram(int board_type)
return dramsize + dramsize2;
 }
 
+/*
+ * Reset any i2c devices that may have been interrupted by a system reset.
+ * Normally this would be accomplished by clocking the line until SCL and SDA
+ * are released and then sending a start condtiion (From an Atmel datasheet).
+ * But since there is only write access to these lines on the MPC5200 we can
+ * only attempt to reset any slave devices by sending more start commands than
+ * bits the slave is attempting to transmit.
+ */
+int misc_init_f(void)
+{
+   volatile struct mpc5xxx_gpio *gpio =
+   (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+   int i;
+   u16 state;
+
+   state = gpio-outo_gpioe;
+
+   /* Enable gpio on i2c1 and i2c2 */
+   gpio-outo_gpioe |= 0xf;
+
+   /*
+* Send an i2c start command 16 times to reset the state machines on
+* any slave devices transmitting on the bus.
+*/
+   for (i = 0; i  16; i++) {
+   gpio-outo_dvo = 0x5;
+   udelay(5);
+   gpio-outo_dvo |= 0xa;
+   udelay(5);
+   gpio-outo_dvo = 0xa;
+   udelay(5);
+   gpio-outo_dvo = 0x0;
+   udelay(5);
+   }
+
+   /* Return control of i2c1 and i2c2 */
+   gpio-outo_gpioe = state;
+
+   return 0;
+}
+
 int checkboard(void)
 {
puts(Board: galaxy5200\n);
diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index e9a4569..eb2cae6 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -81,8 +81,8 @@
 #endif
 /* RAMBOOT will be defined automatically in memory section */
 
-#define MTDIDS_DEFAULT nor0=physmap-flash.0
-#define MTDPARTS_DEFAULT   mtdparts=physmap-flash.0:256k(ubootl), \
+#define MTDIDS_DEFAULT nor0=physmap-flash.0
+#define MTDPARTS_DEFAULT   mtdparts=physmap-flash.0:256k(ubootl), \
1792k(kernel),13312k(jffs2),256k(uboot)ro,256k(oftree),-(space)
 
 /*
@@ -94,7 +94,7 @@
 #undef CONFIG_BOOTARGS
 
 #define CONFIG_PREBOOT echo; \
-   echo Welcome to U-Boot\
+   echo Welcome to U-Boot;\
echo
 
 /*
@@ -110,6 +110,7 @@
 #define CONFIG_SYS_I2C_MODULE 2/* Select I2C module #1 or #2 */
 #define CONFIG_SYS_I2C_SPEED 10/* 100 kHz */
 #define CONFIG_SYS_I2C_SLAVE 0x7F
+#define CONFIG_MISC_INIT_F 1   /* Reset i2c busses */
 
 /*
  * EEPROM CAT24WC32 configuration
@@ -376,7 +377,7 @@
 #define CONFIG_SYS_BOOTCS_STARTCONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE
 
-#define CONFIG_SYS_RESET_ADDRESS   0xff00
+#define CONFIG_SYS_RESET_ADDRESS   0xff00
 
 /*
  * USB settings
-- 
1.6.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/3] Add chip select region to galaxy5200

2009-08-25 Thread Eric Millbrandt
Add chip select region for an Epson S1D15313.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 include/configs/galaxy5200.h |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index eb2cae6..54c6b80 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -212,6 +212,11 @@
 #define CONFIG_SYS_CS1_SIZE0x9
 #define CONFIG_SYS_CS1_CFG 0x0002d900
 
+/* Chip Select configuration for Epson S1D13513 */
+#define CONFIG_SYS_CS3_START   0x1000
+#define CONFIG_SYS_CS3_SIZE0x103f
+#define CONFIG_SYS_CS3_CFG 0x3d10
+
 /*
  * Ethernet configuration
  */
-- 
1.6.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] Modify mpc5xxx_gpio to include i2c registers

2009-08-25 Thread Eric Millbrandt
 Modify mpc5xxx_gpio structure to include the i2c output-only enable
 and data value out registers.

 Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 A quick string search shows that no in-tree code is currently using any of
the modified fields and the structure size does not change.

 include/mpc5xxx.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/mpc5xxx.h b/include/mpc5xxx.h
index 476d149..4a642a4 100644
--- a/include/mpc5xxx.h
+++ b/include/mpc5xxx.h
@@ -691,10 +691,10 @@ struct mpc5xxx_gpio {
volatile u32 simple_ddr;/* GPIO + 0x0c */
volatile u32 simple_dvo;/* GPIO + 0x10 */
volatile u32 simple_ival;   /* GPIO + 0x14 */
-   volatile u8 outo_gpioe; /* GPIO + 0x18 */
-   volatile u8 reserved1[3];   /* GPIO + 0x19 */
-   volatile u8 outo_dvo;   /* GPIO + 0x1c */
-   volatile u8 reserved2[3];   /* GPIO + 0x1d */
+   volatile u16 outo_gpioe;/* GPIO + 0x18 */
+   volatile u8 reserved1[2];   /* GPIO + 0x1a */
+   volatile u16 outo_dvo;  /* GPIO + 0x1c */
+   volatile u8 reserved2[2];   /* GPIO + 0x1e */
volatile u8 sint_gpioe; /* GPIO + 0x20 */
volatile u8 reserved3[3];   /* GPIO + 0x21 */
volatile u8 sint_ode;   /* GPIO + 0x24 */
-- 
1.6.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 2/3] Reset interrupted i2c slaves (galaxy5200)

2009-08-25 Thread Eric Millbrandt
Reset any i2c devices that may have been interrupted by a system reset.
Normally this would be accomplished by clocking the line until SCL and SDA
are released and then sending a start condtiion (From an Atmel datasheet).
But since there is only write access to these lines on the MPC5200 we can
only attempt to reset any slave devices by sending more start commands than
bits the slave is attempting to transmit.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---

Changes since v1:
- Remove non-related modifications to a different patch per Peter's suggestion

 board/galaxy5200/galaxy5200.c |   41 +
 include/configs/galaxy5200.h  |1 +
 2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/board/galaxy5200/galaxy5200.c b/board/galaxy5200/galaxy5200.c
index 5aa9d3a..c38e7de 100644
--- a/board/galaxy5200/galaxy5200.c
+++ b/board/galaxy5200/galaxy5200.c
@@ -155,6 +155,47 @@ phys_size_t initdram(int board_type)
return dramsize + dramsize2;
 }
 
+/*
+ * Reset any i2c devices that may have been interrupted by a system reset.
+ * Normally this would be accomplished by clocking the line until SCL and SDA
+ * are released and then sending a start condtiion (From an Atmel datasheet).
+ * But since there is only write access to these lines on the MPC5200 we can
+ * only attempt to reset any slave devices by sending more start commands than
+ * bits the slave is attempting to transmit.
+ */
+int misc_init_f(void)
+{
+   volatile struct mpc5xxx_gpio *gpio =
+   (struct mpc5xxx_gpio *)MPC5XXX_GPIO;
+   int i;
+   u16 state;
+
+   state = gpio-outo_gpioe;
+
+   /* Enable gpio on i2c1 and i2c2 */
+   gpio-outo_gpioe |= 0xf;
+
+   /*
+* Send an i2c start command 16 times to reset the state machines on
+* any slave devices transmitting on the bus.
+*/
+   for (i = 0; i  16; i++) {
+   gpio-outo_dvo = 0x5;
+   udelay(5);
+   gpio-outo_dvo |= 0xa;
+   udelay(5);
+   gpio-outo_dvo = 0xa;
+   udelay(5);
+   gpio-outo_dvo = 0x0;
+   udelay(5);
+   }
+
+   /* Return control of i2c1 and i2c2 */
+   gpio-outo_gpioe = state;
+
+   return 0;
+}
+
 int checkboard(void)
 {
puts(Board: galaxy5200\n);
diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index 8d530d8..eb2cae6 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -110,6 +110,7 @@
 #define CONFIG_SYS_I2C_MODULE 2/* Select I2C module #1 or #2 */
 #define CONFIG_SYS_I2C_SPEED 10/* 100 kHz */
 #define CONFIG_SYS_I2C_SLAVE 0x7F
+#define CONFIG_MISC_INIT_F 1   /* Reset i2c busses */
 
 /*
  * EEPROM CAT24WC32 configuration
-- 
1.6.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Cleanup typo and trailing whitespace

2009-08-25 Thread Eric Millbrandt
Cleanup typo and trailing whitespace from galaxy5200.h

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 include/configs/galaxy5200.h |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/galaxy5200.h b/include/configs/galaxy5200.h
index e9a4569..8d530d8 100644
--- a/include/configs/galaxy5200.h
+++ b/include/configs/galaxy5200.h
@@ -81,8 +81,8 @@
 #endif
 /* RAMBOOT will be defined automatically in memory section */
 
-#define MTDIDS_DEFAULT nor0=physmap-flash.0
-#define MTDPARTS_DEFAULT   mtdparts=physmap-flash.0:256k(ubootl), \
+#define MTDIDS_DEFAULT nor0=physmap-flash.0
+#define MTDPARTS_DEFAULT   mtdparts=physmap-flash.0:256k(ubootl), \
1792k(kernel),13312k(jffs2),256k(uboot)ro,256k(oftree),-(space)
 
 /*
@@ -94,7 +94,7 @@
 #undef CONFIG_BOOTARGS
 
 #define CONFIG_PREBOOT echo; \
-   echo Welcome to U-Boot\
+   echo Welcome to U-Boot;\
echo
 
 /*
@@ -376,7 +376,7 @@
 #define CONFIG_SYS_BOOTCS_STARTCONFIG_SYS_FLASH_BASE
 #define CONFIG_SYS_BOOTCS_SIZE CONFIG_SYS_FLASH_SIZE
 
-#define CONFIG_SYS_RESET_ADDRESS   0xff00
+#define CONFIG_SYS_RESET_ADDRESS   0xff00
 
 /*
  * USB settings
-- 
1.6.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] V3 Add support for the galaxy5200

2009-08-13 Thread Eric Millbrandt
Removed trailing whitespace introduced in V2 to conform with U-Boot coding 
style.
Defined additional chip select region.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 MAINTAINERS   |4 +
 MAKEALL   |1 +
 Makefile  |6 +
 board/galaxy5200/Makefile |   50 +
 board/galaxy5200/config.mk|   45 +
 board/galaxy5200/galaxy5200.c |  199 +++
 include/configs/galaxy5200.h  |  428 +
 7 files changed, 733 insertions(+), 0 deletions(-)
 create mode 100644 board/galaxy5200/Makefile
 create mode 100644 board/galaxy5200/config.mk
 create mode 100644 board/galaxy5200/galaxy5200.c
 create mode 100644 include/configs/galaxy5200.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 620604c..85ba8d2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -616,6 +616,10 @@ David M
smdk2410ARM920T
VCMA9   ARM920T
 
+Eric Millbrandt emillbra...@dekaresearch.com
+
+   galaxy5200  mpc5200
+
 Rolf Offermanns r...@sysgo.de
 
shannon SA1100
diff --git a/MAKEALL b/MAKEALL
index edebaea..65cd6d0 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -50,6 +50,7 @@ LIST_5xxx=   \
digsy_mtc   \
EVAL5200\
fo300   \
+   galaxy5200  \
icecube_5100\
icecube_5200\
inka4x0 \
diff --git a/Makefile b/Makefile
index 329e0f5..569549c 100644
--- a/Makefile
+++ b/Makefile
@@ -531,6 +531,12 @@ digsy_mtc_RAMBOOT_config:  unconfig
}
@$(MKCONFIG) -a digsy_mtc  ppc mpc5xxx digsy_mtc
 
+galaxy5200_LOWBOOT_config \
+galaxy5200_config: unconfig
+   @mkdir -p $(obj)include
+   @echo #define CONFIG_$(@:_config=) 1 $(obj)include/config.h
+   @$(MKCONFIG) -a galaxy5200 ppc mpc5xxx galaxy5200
+
 hmi1001_config:unconfig
@$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
 
diff --git a/board/galaxy5200/Makefile b/board/galaxy5200/Makefile
new file mode 100644
index 000..22ce8e6
--- /dev/null
+++ b/board/galaxy5200/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2003-2007
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/galaxy5200/config.mk b/board/galaxy5200/config.mk
new file mode 100644
index 000..c6398b2
--- /dev/null
+++ b/board/galaxy5200/config.mk
@@ -0,0 +1,45 @@
+#
+# (C) Copyright 2003
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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
+#
+
+#
+# galaxy5200 board:
+#
+#  Valid values for TEXT_BASE are:
+#
+#  0xFFF0   boot high (standard configuration)
+#  0xFE00   boot low
+#  0x0010   boot from RAM (for testing only) does not work
+#
+
+sinclude $(TOPDIR)/board/$(BOARDDIR

[U-Boot] [PATCH] Add support for USB on PSC3 for the mpc5200

2009-08-13 Thread Eric Millbrandt
Support USB on PSC3 on the mpc5200.  Before this patch, enabling USB support
would reconfigure PSC4 and PSC5 to USB.  The mpc5200 does not support USB
enabled on both the standard USB port and PSC3.  This patch masks the
appropriate bits when enabling USB.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 README |4 
 cpu/mpc5xxx/usb.c  |6 +-
 cpu/mpc5xxx/usb_ohci.c |6 +-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 9071472..a8dc1cd 100644
--- a/README
+++ b/README
@@ -854,9 +854,13 @@ The following options need to be configured:
MPC5200 USB requires additional defines:
CONFIG_USB_CLOCK
for 528 MHz Clock: 0x0001
+   CONFIG_PSC3_USB
+   for USB on PSC3
CONFIG_USB_CONFIG
for differential drivers: 0x1000
for single ended drivers: 0x5000
+   for differential drivers on PSC3: 0x0100
+   for single ended drivers on PSC3: 0x4100
CONFIG_SYS_USB_EVENT_POLL
May be defined to allow interrupt polling
instead of using asynchronous interrupts
diff --git a/cpu/mpc5xxx/usb.c b/cpu/mpc5xxx/usb.c
index 8f2b66a..bec7da3 100644
--- a/cpu/mpc5xxx/usb.c
+++ b/cpu/mpc5xxx/usb.c
@@ -32,9 +32,13 @@ int usb_cpu_init(void)
/* Set the USB Clock */
*(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CLOCK;
 
+#ifdef CONFIG_PSC3_USB /* USB is using the alternate configuration */
+   /* remove all PSC3 USB bits first before ORing in ours */
+   *(vu_long *)MPC5XXX_GPS_PORT_CONFIG = ~0x00804f00;
+#else
/* remove all USB bits first before ORing in ours */
*(vu_long *)MPC5XXX_GPS_PORT_CONFIG = ~0x00807000;
-
+#endif
/* Activate USB port */
*(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_CONFIG;
 
diff --git a/cpu/mpc5xxx/usb_ohci.c b/cpu/mpc5xxx/usb_ohci.c
index 61a4e3f..66a4af8 100644
--- a/cpu/mpc5xxx/usb_ohci.c
+++ b/cpu/mpc5xxx/usb_ohci.c
@@ -1576,9 +1576,13 @@ int usb_lowlevel_init(void)
/* Set the USB Clock */
*(vu_long *)MPC5XXX_CDM_48_FDC = CONFIG_USB_CLOCK;
 
+#ifdef CONFIG_PSC3_USB /* USB is using the alternate configuration */
+   /* remove all PSC3 USB bits first before ORing in ours */
+   *(vu_long *)MPC5XXX_GPS_PORT_CONFIG = ~0x00804f00;
+#else
/* remove all USB bits first before ORing in ours */
*(vu_long *)MPC5XXX_GPS_PORT_CONFIG = ~0x00807000;
-
+#endif
/* Activate USB port */
*(vu_long *)MPC5XXX_GPS_PORT_CONFIG |= CONFIG_USB_CONFIG;
 
-- 
1.6.3.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V4] Add support for the galaxy5200

2009-08-13 Thread Eric Millbrandt
Add support for the DEKA Research and Development galaxy5200 board

The galaxy5200 is an Freescale mpc5200 based embedded industrial control board.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---

Changes since v1:
- Amended with comments from Wolfgang
- Make change to top level makefile per Wolfgang's suggestion.

Changes since v2:
- Defined additional chip select region.

Changes since v3:
- Fixed up patch title and commit message per Peter's suggestion.

 MAINTAINERS   |4 +
 MAKEALL   |1 +
 Makefile  |6 +
 board/galaxy5200/Makefile |   50 +
 board/galaxy5200/config.mk|   45 +
 board/galaxy5200/galaxy5200.c |  199 +++
 include/configs/galaxy5200.h  |  428 +
 7 files changed, 733 insertions(+), 0 deletions(-)
 create mode 100644 board/galaxy5200/Makefile
 create mode 100644 board/galaxy5200/config.mk
 create mode 100644 board/galaxy5200/galaxy5200.c
 create mode 100644 include/configs/galaxy5200.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 620604c..85ba8d2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -616,6 +616,10 @@ David M
smdk2410ARM920T
VCMA9   ARM920T
 
+Eric Millbrandt emillbra...@dekaresearch.com
+
+   galaxy5200  mpc5200
+
 Rolf Offermanns r...@sysgo.de
 
shannon SA1100
diff --git a/MAKEALL b/MAKEALL
index edebaea..65cd6d0 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -50,6 +50,7 @@ LIST_5xxx=   \
digsy_mtc   \
EVAL5200\
fo300   \
+   galaxy5200  \
icecube_5100\
icecube_5200\
inka4x0 \
diff --git a/Makefile b/Makefile
index 329e0f5..569549c 100644
--- a/Makefile
+++ b/Makefile
@@ -531,6 +531,12 @@ digsy_mtc_RAMBOOT_config:  unconfig
}
@$(MKCONFIG) -a digsy_mtc  ppc mpc5xxx digsy_mtc
 
+galaxy5200_LOWBOOT_config \
+galaxy5200_config: unconfig
+   @mkdir -p $(obj)include
+   @echo #define CONFIG_$(@:_config=) 1 $(obj)include/config.h
+   @$(MKCONFIG) -a galaxy5200 ppc mpc5xxx galaxy5200
+
 hmi1001_config:unconfig
@$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
 
diff --git a/board/galaxy5200/Makefile b/board/galaxy5200/Makefile
new file mode 100644
index 000..22ce8e6
--- /dev/null
+++ b/board/galaxy5200/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2003-2007
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/galaxy5200/config.mk b/board/galaxy5200/config.mk
new file mode 100644
index 000..c6398b2
--- /dev/null
+++ b/board/galaxy5200/config.mk
@@ -0,0 +1,45 @@
+#
+# (C) Copyright 2003
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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

[U-Boot] [PATCH] Add support for the galaxy5200 board.

2009-08-12 Thread Eric Millbrandt
Add support for the DEKA RD galaxy5200 board.
The patch is based off of the mpc5xxx branch.


_

This e-mail and the information, including any attachments, it contains are 
intended to be a confidential communication only to the person or entity to 
whom it is addressed and may contain information that is privileged. If the 
reader of this message is not the intended recipient, you are hereby notified 
that any dissemination, distribution or copying of this communication is 
strictly prohibited. If you have received this communication in error, please 
immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.


V1-Add-support-for-the-galaxy5200.patch
Description: V1-Add-support-for-the-galaxy5200.patch
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] V2 Add Support for the galaxy5200

2009-08-12 Thread Eric Millbrandt
Add support for the DEKA Research and Development galaxy5200 board.
Amended with comments from Wolfgang.
Make change to top level makefile per Wolfgang's suggestion.

Signed-off-by: Eric Millbrandt emillbra...@dekaresearch.com
---
 MAINTAINERS   |4 +
 MAKEALL   |1 +
 Makefile  |6 +
 board/galaxy5200/Makefile |   50 +
 board/galaxy5200/config.mk|   45 +
 board/galaxy5200/galaxy5200.c |  199 +++
 include/configs/galaxy5200.h  |  428 +
 7 files changed, 733 insertions(+), 0 deletions(-)
 create mode 100644 board/galaxy5200/Makefile
 create mode 100644 board/galaxy5200/config.mk
 create mode 100644 board/galaxy5200/galaxy5200.c
 create mode 100644 include/configs/galaxy5200.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 620604c..85ba8d2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -616,6 +616,10 @@ David M
smdk2410ARM920T
VCMA9   ARM920T
 
+Eric Millbrandt emillbra...@dekaresearch.com
+
+   galaxy5200  mpc5200
+
 Rolf Offermanns r...@sysgo.de
 
shannon SA1100
diff --git a/MAKEALL b/MAKEALL
index edebaea..65cd6d0 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -50,6 +50,7 @@ LIST_5xxx=   \
digsy_mtc   \
EVAL5200\
fo300   \
+   galaxy5200  \
icecube_5100\
icecube_5200\
inka4x0 \
diff --git a/Makefile b/Makefile
index 329e0f5..569549c 100644
--- a/Makefile
+++ b/Makefile
@@ -531,6 +531,12 @@ digsy_mtc_RAMBOOT_config:  unconfig
}
@$(MKCONFIG) -a digsy_mtc  ppc mpc5xxx digsy_mtc
 
+galaxy5200_LOWBOOT_config \
+galaxy5200_config: unconfig
+   @mkdir -p $(obj)include
+   @echo #define CONFIG_$(@:_config=) 1 $(obj)include/config.h
+   @$(MKCONFIG) -a galaxy5200 ppc mpc5xxx galaxy5200
+
 hmi1001_config:unconfig
@$(MKCONFIG) hmi1001 ppc mpc5xxx hmi1001
 
diff --git a/board/galaxy5200/Makefile b/board/galaxy5200/Makefile
new file mode 100644
index 000..22ce8e6
--- /dev/null
+++ b/board/galaxy5200/Makefile
@@ -0,0 +1,50 @@
+#
+# (C) Copyright 2003-2007
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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 $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  := $(BOARD).o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/galaxy5200/config.mk b/board/galaxy5200/config.mk
new file mode 100644
index 000..c6398b2
--- /dev/null
+++ b/board/galaxy5200/config.mk
@@ -0,0 +1,45 @@
+#
+# (C) Copyright 2003
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# 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
+#
+
+#
+# galaxy5200 board:
+#
+#  Valid values for TEXT_BASE are:
+#
+#  0xFFF0   boot high (standard configuration)
+#  0xFE00   boot low
+#  0x0010   boot from RAM (for testing only) does not work