[U-Boot] Problem in writing jffs2 fiesystem

2008-09-08 Thread navin karnam
Hi all,

I am running u-b00t-1.6.6 on custom at91sam9263 board.
Now i am able to boot, jffs2 filesystem with linux-2.6.20 kernel.
but the procedure i am using to burn is jffs2 is :
1)boot the linux kernel with ramdisk
2)erase the flash partition using $flasheraseall -j /dev/mtd1
3)writing the image using $nandwrite -p /dev/mtd1 rootfs.jffs2

The above procedure works well for me. But when i try writing the jffs2
filesytem in uboot prompt its not booting (kernel panic).
In uboot i did this way:

1) tftp 2110 rootfs.jffs2
2)nand write.jffs2 2110 0x20 0x(hex add of displayed by tftp)


What is the write  of doing this?
-
Regards,
Naveen
Application Engineer
Innovate Software Solutions Pvt Ltd.,
Bengalooru
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc4xx: Fix compilation warning for PIP405

2008-09-08 Thread Stefan Roese
Hi Denis,

On Monday 08 September 2008, Denis Peter wrote:
  Denis, could you please take a look at this patch and let me know if
  this
  is ok? Or if the define and #ifdef can be removed completely?
 
  Thanks.

 The PIP405 is a dead board. Only some prototypes have been produced.
 Currently I don't have a board to test it, but since I don't think
 that the PIP405 will ever become active again, I think it is save
 to remove the #ifdef completely.

OK, I'll remove it then. This will make the code a little bit more readable.

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: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc4xx: Fix compilation warning for PIP405

2008-09-08 Thread Denis Peter
Hello Stefan,

Stefan Roese [EMAIL PROTECTED] wrote on 05.09.2008 14:15:10:

 This patch fixes a compilation warning for the PIP405 board. It moves 
the
 #ifndef CONFIG_CS8952_PHY define a little so that the warning doesn't
 occur anymore. I am a little unsure if this #ifdef is at the correct
 place now or if it could be removed completely. This needs to get
 tested on the PIP405 board.
 
 Signed-off-by: Stefan Roese [EMAIL PROTECTED]
 ---
 Denis, could you please take a look at this patch and let me know if 
this
 is ok? Or if the define and #ifdef can be removed completely?
 
 Thanks.
 

The PIP405 is a dead board. Only some prototypes have been produced.
Currently I don't have a board to test it, but since I don't think
that the PIP405 will ever become active again, I think it is save
to remove the #ifdef completely.

With best regards,

Denis

 
  cpu/ppc4xx/4xx_enet.c |   11 +--
  1 files changed, 5 insertions(+), 6 deletions(-)
 
 diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
 index 071ac0a..52486fd 100644
 --- a/cpu/ppc4xx/4xx_enet.c
 +++ b/cpu/ppc4xx/4xx_enet.c
 @@ -1061,7 +1061,6 @@ static int ppc_4xx_eth_init (struct eth_device
 *dev, bd_t * bis)
 
 /* wait for PHY to complete auto negotiation */
 reg_short = 0;
 -#ifndef CONFIG_CS8952_PHY
 switch (devnum) {
 case 0:
reg = CONFIG_PHY_ADDR;
 @@ -1160,7 +1159,7 @@ static int ppc_4xx_eth_init (struct eth_device
 *dev, bd_t * bis)
   miiphy_write (dev-name, reg, 0x1f, 0x);
   /* end Vitesse/Cicada errata */
}
 -#endif
 +#endif /* defined(CONFIG_CIS8201_PHY) */
 
  #if defined(CONFIG_ET1011C_PHY)
/*
 @@ -1179,15 +1178,16 @@ static int ppc_4xx_eth_init (struct 
 eth_device *dev, bd_t * bis)
 
   miiphy_write(dev-name, reg, 0x1c, 0x74f0);
}
 -#endif
 +#endif /* defined(CONFIG_ET1011C_PHY) */
 
 -#endif
 +#endif /* defined(CONFIG_440GX) ... */
/* Start/Restart autonegotiation */
phy_setup_aneg (dev-name, reg);
udelay (1000);
 }
  #endif /* defined(CONFIG_PHY_RESET) */
 
 +#if !defined(CONFIG_CS8952_PHY)
 miiphy_read (dev-name, reg, PHY_BMSR, reg_short);
 
 /*
 @@ -1211,12 +1211,11 @@ static int ppc_4xx_eth_init (struct 
 eth_device *dev, bd_t * bis)
   }
   udelay (1000);   /* 1 ms */
   miiphy_read (dev-name, reg, PHY_BMSR, reg_short);
 -
}
puts ( done\n);
udelay (50);   /* another 500 ms (results in faster booting) 
*/
 }
 -#endif /* #ifndef CONFIG_CS8952_PHY */
 +#endif /* !defined(CONFIG_CS8952_PHY) */
 
  get_speed:
 if (reg == CONFIG_FIXED_PHY) {
 -- 
 1.5.6.5
 

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


Re: [U-Boot] [PATCH] Add MTD core partition

2008-09-08 Thread Stefan Roese
Kyungmi,

On Monday 08 September 2008, Kyungmin Park wrote:
  It's preparation for UBI codes.
  UBI uses partition and get  put mtd devices
 
  Please co-ordinate any UBI-related work with Stefan Roese.
 
  I will not apply any UBI related patches unless I have his ACK.

I have no objections to this patch. So here my:

Acked-by: Stefan Roese [EMAIL PROTECTED]

But I think it would be a good idea if Scott Wood could also take a look at 
this patch (and the whole UBI integration) since this UBI integration also 
touches his NAND infrastructure.

Scott, any comments?

 Sure, I agreed your opinions.
 Then how about to crate u-boot-ubi tree for others?

Good idea. Please see below.

 Now we are using UBI both NAND and OneNAND. To do this, we also change
 OneNAND command to support UBI fully. but previous patch it doesn't
 have.

 I want to share our works at least UBI.

We really appreciate this. Thanks a lot.

 If you have more opinions please let me know.

We will add an new u-boot-ubi repository and would like you to become the 
custodian. Would you accept this? Do you (or anybody else) have other 
volunteers for this job?

If you accept this and nobody objects, please send your public SSH key to 
Wolfgang in a private mail, so that he can create the new repository for you.

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: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TQM5200 HIGHBOOT Makefile patch

2008-09-08 Thread Pedro Luis D. L.

 On Sun, 7 Sep 2008 01:10:15 +0200 Wolfgang wrote:
 
 Dear Pedro Luis D. L.,
 
 In message [EMAIL PROTECTED] you wrote:
  
  I don't know the normal procedure, if I should send the patch to Wolfgang o=
  r someone else, but I found a problem with Makefile and TQM5200 HIGHBOOT co=
  nfig in Makefile. I think this problem is also in previous versions since t=
  qm boards where moved under tqc folder.
 
 Please use a line length not longer than some 70+ characters.
 

Sorry, you told me before and I forgot. I use web email and can not 
change this option, so I have to do it manually.

  The patch is:
  
  --- a/Makefile  2008-09-04 14:55:05.0 +0200
  +++ b/Makefile  2008-09-04 14:56:14.0 +0200
  @@ -755,7 +755,7 @@
echo #define CONFIG_TQM5200_B   
  $(obj)include/config.h ; \
  }
  @[ -z $(findstring HIGHBOOT,$@) ] || \
  -   { echo TEXT_BASE =3D 
  0xFFF0$(obj)board/tqm5200/config.tmp ; \
  +   { echo TEXT_BASE =3D 
  0xFFF0$(obj)board/tqc/tqm5200/config.tmp ; \
  }
  @$(MKCONFIG) -n $@ -a TQM5200 ppc mpc5xxx tqm5200 tqc
 
 Please re-submit after adding your Signed-off-by:  line  (and  please
 follow the other instructions Detlev sent you).
 

I'll do it as fast as I can. I can't submit from my office, so I need
to do it from home and had no time these days.

Regards,

Pedro.


_
Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo
http://estilo.es.msn.com/moda/___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] CFG_64BIT_xxx and friends

2008-09-08 Thread Stefan Roese
On Sunday 07 September 2008, Wolfgang Denk wrote:
   5) Delete al references to CFG_64BIT_VSPRINTF and CFG_64BIT_STRTOUL
   and unconditionally enable it for all boards.
  
   Any takers to submit a patch?
 
  If possible not because it will increase the size of u-boot for board
  which not need it. When we will have kconfig it will be simple to
  activated it for ppc and other board automaticly.

 You try to beat me on being the guard dog of memory footprint? That'll
 be a hard job ;-)

 Seriously: How much of code size are we talking about? And activating
 / deactivation the feature is  not  so  trivial  as  it  affects  the
 printf() format specifiers we have to use.

I'm with Wolfgang here and think it would be best to unconditionally support 
the 64bit printf format too.

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: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc4xx: Remove CONFIG_CS8952_PHY define

2008-09-08 Thread Stefan Roese
Since this define is only used on one board that was never really in
production, removing this compile time option doesn't hurt and makes
the code more readable.

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 cpu/ppc4xx/4xx_enet.c|2 --
 include/configs/PIP405.h |1 -
 2 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
index 52486fd..6d4d043 100644
--- a/cpu/ppc4xx/4xx_enet.c
+++ b/cpu/ppc4xx/4xx_enet.c
@@ -1187,7 +1187,6 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t 
* bis)
}
 #endif /* defined(CONFIG_PHY_RESET) */
 
-#if !defined(CONFIG_CS8952_PHY)
miiphy_read (dev-name, reg, PHY_BMSR, reg_short);
 
/*
@@ -1215,7 +1214,6 @@ static int ppc_4xx_eth_init (struct eth_device *dev, bd_t 
* bis)
puts ( done\n);
udelay (50);/* another 500 ms (results in faster 
booting) */
}
-#endif /* !defined(CONFIG_CS8952_PHY) */
 
 get_speed:
if (reg == CONFIG_FIXED_PHY) {
diff --git a/include/configs/PIP405.h b/include/configs/PIP405.h
index 2ceda00..86ea6c6 100644
--- a/include/configs/PIP405.h
+++ b/include/configs/PIP405.h
@@ -281,7 +281,6 @@
  ***/
 #define CONFIG_MII 1   /* MII PHY management   */
 #define CONFIG_PHY_ADDR1   /* PHY address  
*/
-#define CONFIG_CS8952_PHY  1   /* its a CS8952 PHY */
 /
  * RTC
  ***/
-- 
1.5.6.5

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


[U-Boot] [PATCH] [UPDATE #2] Merged serial_pl010.c and serial_pl011.c.

2008-09-08 Thread Andreas Engel
They only differ in the init function.
This also adds the missing watchdog support for the PL011.

Signed-off-by: Andreas Engel [EMAIL PROTECTED]
---

 Updated patch to the current git head as of today.

 drivers/serial/Makefile   |3 +-
 drivers/serial/serial_pl011.c |  161 -
 drivers/serial/{serial_pl010.c = serial_pl01x.c} |   83 +--
 drivers/serial/{serial_pl011.h = serial_pl01x.h} |0
 4 files changed, 69 insertions(+), 178 deletions(-)
 delete mode 100644 drivers/serial/serial_pl011.c
 rename drivers/serial/{serial_pl010.c = serial_pl01x.c} (66%)
 rename drivers/serial/{serial_pl011.h = serial_pl01x.h} (100%)

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index f30014d..3cc1999 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -33,8 +33,7 @@ COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-y += serial.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
-COBJS-y += serial_pl010.o
-COBJS-y += serial_pl011.o
+COBJS-y += serial_pl01x.o
 COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
 COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
 COBJS-$(CONFIG_USB_TTY) += usbtty.o
diff --git a/drivers/serial/serial_pl011.c b/drivers/serial/serial_pl011.c
deleted file mode 100644
index 4d35fe5..000
--- a/drivers/serial/serial_pl011.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * (C) Copyright 2000
- * Rob Taylor, Flying Pig Systems. [EMAIL PROTECTED]
- *
- * (C) Copyright 2004
- * ARM Ltd.
- * Philippe Robin, [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
- */
-
-/* Simple U-Boot driver for the PrimeCell PL011 UARTs on the IntegratorCP */
-/* Should be fairly simple to make it work with the PL010 as well */
-
-#include common.h
-
-#ifdef CFG_PL011_SERIAL
-
-#include serial_pl011.h
-
-#define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
-#define IO_READ(addr) (*(volatile unsigned int *)(addr))
-
-/*
- * IntegratorCP has two UARTs, use the first one, at 38400-8-N-1
- * Versatile PB has four UARTs.
- */
-
-#define CONSOLE_PORT CONFIG_CONS_INDEX
-#define baudRate CONFIG_BAUDRATE
-static volatile unsigned char *const port[] = CONFIG_PL01x_PORTS;
-#define NUM_PORTS (sizeof(port)/sizeof(port[0]))
-
-static void pl011_putc (int portnum, char c);
-static int pl011_getc (int portnum);
-static int pl011_tstc (int portnum);
-
-
-int serial_init (void)
-{
-   unsigned int temp;
-   unsigned int divider;
-   unsigned int remainder;
-   unsigned int fraction;
-
-   /*
-** First, disable everything.
-*/
-   IO_WRITE (port[CONSOLE_PORT] + UART_PL011_CR, 0x0);
-
-   /*
-** Set baud rate
-**
-** IBRD = UART_CLK / (16 * BAUD_RATE)
-** FBRD = ROUND((64 * MOD(UART_CLK,(16 * BAUD_RATE))) / (16 * 
BAUD_RATE))
-*/
-   temp = 16 * baudRate;
-   divider = CONFIG_PL011_CLOCK / temp;
-   remainder = CONFIG_PL011_CLOCK % temp;
-   temp = (8 * remainder) / baudRate;
-   fraction = (temp  1) + (temp  1);
-
-   IO_WRITE (port[CONSOLE_PORT] + UART_PL011_IBRD, divider);
-   IO_WRITE (port[CONSOLE_PORT] + UART_PL011_FBRD, fraction);
-
-   /*
-** Set the UART to be 8 bits, 1 stop bit, no parity, fifo enabled.
-*/
-   IO_WRITE (port[CONSOLE_PORT] + UART_PL011_LCRH,
- (UART_PL011_LCRH_WLEN_8 | UART_PL011_LCRH_FEN));
-
-   /*
-** Finally, enable the UART
-*/
-   IO_WRITE (port[CONSOLE_PORT] + UART_PL011_CR,
- (UART_PL011_CR_UARTEN | UART_PL011_CR_TXE |
-  UART_PL011_CR_RXE));
-
-   return 0;
-}
-
-void serial_putc (const char c)
-{
-   if (c == '\n')
-   pl011_putc (CONSOLE_PORT, '\r');
-
-   pl011_putc (CONSOLE_PORT, c);
-}
-
-void serial_puts (const char *s)
-{
-   while (*s) {
-   serial_putc (*s++);
-   }
-}
-
-int serial_getc (void)
-{
-   return pl011_getc (CONSOLE_PORT);
-}
-
-int serial_tstc (void)
-{
-   return pl011_tstc (CONSOLE_PORT);
-}
-
-void serial_setbrg (void)
-{
-}
-
-static void pl011_putc (int portnum, char c)
-{
-   /* Wait 

[U-Boot] [POWERPC] muas3001: activate WDT for the muas3001 board.

2008-09-08 Thread Heiko Schocher
[POWERPC] muas3001: activate WDT for the muas3001 board.

Signed-off-by: Heiko Schocher [EMAIL PROTECTED]
---
 include/configs/muas3001.h |   20 +---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index 5d157b6..55f7b1e 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -38,6 +38,9 @@
 /* Do boardspecific init */
 #define CONFIG_BOARD_EARLY_INIT_R   1

+/* enable Watchdog */
+#define CONFIG_WATCHDOG1
+
 /*
  * Select serial console configuration
  *
@@ -181,8 +184,6 @@
 #define CONFIG_BOOTCOMMAND run net_nfs
 #define CONFIG_BOOTDELAY   5   /* autoboot after 5 seconds */

-#undef CONFIG_WATCHDOG /* disable platform specific watchdog */
-
 /*
  * Miscellaneous configurable options
  */
@@ -277,11 +278,24 @@
 #define CFG_HID2   0

 #define CFG_SIUMCR 0x0020
-#define CFG_SYPCR  0xFFC3
 #define CFG_BCR0x004c
 #define CFG_SCCR   0x0

 /*---
+ * SYPCR - System Protection Control 4-35
+ * SYPCR can only be written once after reset!
+ *---
+ * Watchdog  Bus Monitor Timer max, 60x Bus Monitor enable
+ */
+#if defined(CONFIG_WATCHDOG)
+#define CFG_SYPCR   (SYPCR_SWTC|SYPCR_BMT|SYPCR_PBME|SYPCR_LBME|\
+SYPCR_SWRI|SYPCR_SWP|SYPCR_SWE)
+#else
+#define CFG_SYPCR   (SYPCR_SWTC|SYPCR_BMT|SYPCR_PBME|SYPCR_LBME|\
+SYPCR_SWRI|SYPCR_SWP)
+#endif /* CONFIG_WATCHDOG */
+
+/*---
  * RMR - Reset Mode Register 5-5
  *---
  * turn on Checkstop Reset Enable
-- 
1.5.6.1

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [POWERPC] muas3001: added support for the LM75 sensor.

2008-09-08 Thread Heiko Schocher
[POWERPC] 82xx: added support for the LM75 Temp.
 sensor on the muas3001 board.

Signed-off-by: Heiko Schocher [EMAIL PROTECTED]
---
 include/configs/muas3001.h |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/configs/muas3001.h b/include/configs/muas3001.h
index 55f7b1e..bc085b8 100644
--- a/include/configs/muas3001.h
+++ b/include/configs/muas3001.h
@@ -127,6 +127,7 @@
  */
 #include config_cmd_default.h

+#define CONFIG_CMD_DTT
 #define CONFIG_CMD_ECHO
 #define CONFIG_CMD_IMMAP
 #define CONFIG_CMD_MII
@@ -240,6 +241,15 @@
 #define CFG_I2C_SPEED  10  /* I2C speed and slave address  */
 #define CFG_I2C_SLAVE  0x7F

+#defineCFG_EEPROM_PAGE_WRITE_ENABLE
+#defineCFG_EEPROM_PAGE_WRITE_BITS 3
+/* I2C SYSMON (LM75, AD7414 is almost compatible)   */
+#defineCONFIG_DTT_LM75 1   /* ON Semi's LM75   
*/
+#defineCONFIG_DTT_SENSORS  {0} /* Sensor addresses 
*/
+#defineCFG_DTT_MAX_TEMP70
+#defineCFG_DTT_LOW_TEMP-30
+#defineCFG_DTT_HYSTERESIS  3
+
 #define CFG_IMMR   0xF000
 #define CFG_DEFAULT_IMMR   0x0F01

-- 
1.5.6.1

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH RFC] mpc8572ds relocatable

2008-09-08 Thread Ed Swarthout
Fixes boot crash from bad string pointers in get_table_entry_name
when flash is erased or differs from current u-boot image.

Signed-off-by: Ed Swarthout [EMAIL PROTECTED]
---

Fix was pointed out by Peter Tyser in Image.c get_table_entry_name thread.

This redoes Grant Likey's relocation change, but leaves control to each board.
This also fixes the mii dump command when flash is erased.
Tested with gcc 4.2

 board/freescale/mpc8572ds/config.mk  |1 +
 board/freescale/mpc8572ds/u-boot.lds |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mpc8572ds/config.mk 
b/board/freescale/mpc8572ds/config.mk
index 5b32186..8b3651b 100644
--- a/board/freescale/mpc8572ds/config.mk
+++ b/board/freescale/mpc8572ds/config.mk
@@ -30,3 +30,4 @@ endif
 PLATFORM_CPPFLAGS += -DCONFIG_E500=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
 PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1
+PLATFORM_CPPFLAGS += -mrelocatable -DCONFIG_RELOC_FIXUP_WORKS
diff --git a/board/freescale/mpc8572ds/u-boot.lds 
b/board/freescale/mpc8572ds/u-boot.lds
index a05ece5..79fb41f 100644
--- a/board/freescale/mpc8572ds/u-boot.lds
+++ b/board/freescale/mpc8572ds/u-boot.lds
@@ -58,7 +58,7 @@ SECTIONS
   .text  :
   {
 *(.text)
-*(.fixup)
+/*  *(.fixup)*/
 *(.got1)
} :text
 _etext = .;
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH 1/3] ppc4xx: Update CPCI405 variants handling

2008-09-08 Thread Stefan Roese
On Friday 05 September 2008, [EMAIL PROTECTED] wrote:
 From: Matthias Fuchs [EMAIL PROTECTED]

 This patch replaces the BOARD_REVISION variable in include/config.mk
 by a using a temporary include file in the platform directory.

 The former way does not work anymore and the latter is alos used by
 some other boards.

Applied to u-boot-ppc4xx (all 3 patches from this series). 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: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [UPDATE #2] Merged serial_pl010.c and serial_pl011.c.

2008-09-08 Thread Wolfgang Denk
Dear Andreas Engel,

In message [EMAIL PROTECTED] you wrote:
 Jean-Christophe PLAGNIOL-VILLARD wrote:
  On 10:17 Mon 08 Sep , Andreas Engel wrote:
  [...]
 
  -#ifdef CFG_PL010_SERIAL
  +#if defined(CFG_PL010_SERIAL) || defined(CFG_PL011_SERIAL)
  Please move this to the Makefile
 
 Shouldn't this better be a separate patch?

Yes, indeed.

Thanks in advance.

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: [EMAIL PROTECTED]
You have the capacity to learn from  mistakes.  You'll  learn  a  lot
today.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] CFG_64BIT_xxx and friends

2008-09-08 Thread Haavard Skinnemoen
Matthias Fuchs [EMAIL PROTECTED] wrote:
 Here is the U-Boot size for the PLU405 board (405EP-based) with
 and without
 
 #define CFG_64BIT_VSPRINTF
 #define CFG_64BIT_STRTOUL
 .
 
 without:
 # ppc_4xx-size u-boot
textdata bss dec hex filename
  289568   17532  301312  608412   9489c u-boot
 
 with 64bit format handling:
 # ppc_4xx-size u-boot
textdata bss dec hex filename
  291368   17532  301312  610212   94fa4 u-boot
 
 So the difference is 1800 bytes on this architecture.

Thanks.

That's a bit more than expected. Is this with or without --gc-sections?
Linking with --gc-sections should make simple_strtoull() go away unless
it's actually used.

Another thing that might hurt is that lib_generic/vsprintf.c reinvents
do_div() without the out-of-line __div_64_32() bit. Converting it to
use do_div() from include/div64.h should help.

In fact, enabling CFG_64BIT_VSPRINTF unconditionally without fixing
this first will probably break all architectures that don't link with
libgcc.

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


Re: [U-Boot] CFG_64BIT_xxx and friends

2008-09-08 Thread Haavard Skinnemoen
Haavard Skinnemoen [EMAIL PROTECTED] wrote:
 That's a bit more than expected. Is this with or without --gc-sections?
 Linking with --gc-sections should make simple_strtoull() go away unless
 it's actually used.

That's assuming the fdt and image code doesn't interpret
CFG_64BIT_VSPRINTF as CFG_BLOAT_ME_HARDER, which it does. So enabling
CFG_64BIT_VSPRINTF does increase the code size even with --gc-sections.

I think fdt and common/image.c should stop abusing CFG_64BIT_VSPRINTF
and get its own symbol instead, e.g. CFG_64BIT_PHYS_ADDR, and perhaps a
nice str_to_addr() wrapper which selects between strtoul and strtoull
based on this symbol.

 Another thing that might hurt is that lib_generic/vsprintf.c reinvents
 do_div() without the out-of-line __div_64_32() bit. Converting it to
 use do_div() from include/div64.h should help.

It does. A lot. Here are some numbers from avr32:

vanilla:
   textdata bss dec hex filename
  962327528  216208  319968   4e1e0 ./u-boot

with CFG_64BIT_VSPRINTF:
   textdata bss dec hex filename
  981007528  216208  321836   4e92c ./u-boot

with CFG_64BIT_VSPRINTF and generic do_div():
   textdata bss dec hex filename
  963967528  216208  320132   4e284 ./u-boot

So I highly recommend applying the patch below before killing
CFG_64BIT_VSPRINTF.

 In fact, enabling CFG_64BIT_VSPRINTF unconditionally without fixing
 this first will probably break all architectures that don't link with
 libgcc.

I was sort of expecting avr32 to break because of this, but it didn't.
Apparently, the top-level Makefile adds -lgcc unconditionally...which
makes it quite hard to catch undesired bloat like this.

Haavard

From: Haavard Skinnemoen [EMAIL PROTECTED]
Subject: vsprintf: Use generic do_div()

lib_generic/vsprintf.c uses its own reimplementation of do_div().
Switch it over to use the generic implementation from include/div64.h.
This saves 2K of .text on avr32 with CFG_64BIT_VSPRINTF enabled.

Signed-off-by: Haavard Skinnemoen [EMAIL PROTECTED]

diff --git a/lib_generic/vsprintf.c b/lib_generic/vsprintf.c
index 7c9cfe1..a4f8a83 100644
--- a/lib_generic/vsprintf.c
+++ b/lib_generic/vsprintf.c
@@ -15,6 +15,7 @@
 #include linux/ctype.h
 
 #include common.h
+#include div64.h
 #if !defined (CONFIG_PANIC_HANG)
 #include command.h
 /*cmd_boot.c*/
@@ -106,22 +107,6 @@ static int skip_atoi(const char **s)
 #define LARGE  64  /* use 'ABCDEF' instead of 'abcdef' */
 
 #ifdef CFG_64BIT_VSPRINTF
-#define do_div(n,base) ({ \
-   unsigned int __res; \
-   __res = ((unsigned long long) n) % base; \
-   n = ((unsigned long long) n) / base; \
-   __res; \
-})
-#else
-#define do_div(n,base) ({ \
-   int __res; \
-   __res = ((unsigned long) n) % base; \
-   n = ((unsigned long) n) / base; \
-   __res; \
-})
-#endif
-
-#ifdef CFG_64BIT_VSPRINTF
 static char * number(char * str, long long num, unsigned int base, int size, 
int precision ,int type)
 #else
 static char * number(char * str, long num, unsigned int base, int size, int 
precision ,int type)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] [ARM] Moved conditional compile into Makefile

2008-09-08 Thread Andreas Engel

Signed-off-by: Andreas Engel [EMAIL PROTECTED]
---
 README |4 ++--
 drivers/serial/Makefile|3 ++-
 drivers/serial/serial_pl01x.c  |   15 +--
 include/configs/integratorap.h |2 +-
 include/configs/integratorcp.h |2 +-
 include/configs/versatile.h|2 +-
 6 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/README b/README
index 37449d1..4daff33 100644
--- a/README
+++ b/README
@@ -380,11 +380,11 @@ The following options need to be configured:
param header, the default value is zero if undefined.

 - Serial Ports:
-   CFG_PL010_SERIAL
+   CONFIG_PL010_SERIAL

Define this if you want support for Amba PrimeCell PL010 UARTs.

-   CFG_PL011_SERIAL
+   CONFIG_PL011_SERIAL

Define this if you want support for Amba PrimeCell PL011 UARTs.

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 3cc1999..b370828 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -33,7 +33,8 @@ COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
 COBJS-y += serial.o
 COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
-COBJS-y += serial_pl01x.o
+COBJS-$(CONFIG_PL010_SERIAL) += serial_pl01x.o
+COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
 COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
 COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
 COBJS-$(CONFIG_USB_TTY) += usbtty.o
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index d0497ec..c645cef 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -25,14 +25,11 @@
  * MA 02111-1307 USA
  */

-/* Simple U-Boot driver for the PrimeCell PL011 UARTs on the IntegratorCP */
-/* Should be fairly simple to make it work with the PL010 as well */
+/* Simple U-Boot driver for the PrimeCell PL010/PL011 UARTs */

 #include common.h
 #include watchdog.h

-#if defined(CFG_PL010_SERIAL) || defined(CFG_PL011_SERIAL)
-
 #include serial_pl01x.h

 #define IO_WRITE(addr, val) (*(volatile unsigned int *)(addr) = (val))
@@ -52,7 +49,7 @@ static void pl01x_putc (int portnum, char c);
 static int pl01x_getc (int portnum);
 static int pl01x_tstc (int portnum);

-#ifdef CFG_PL010_SERIAL
+#ifdef CONFIG_PL010_SERIAL

 int serial_init (void)
 {
@@ -110,9 +107,9 @@ int serial_init (void)
return 0;
 }

-#endif /* CFG_PL010_SERIAL */
+#endif /* CONFIG_PL010_SERIAL */

-#ifdef CFG_PL011_SERIAL
+#ifdef CONFIG_PL011_SERIAL

 int serial_init (void)
 {
@@ -157,7 +154,7 @@ int serial_init (void)
return 0;
 }

-#endif /* CFG_PL011_SERIAL */
+#endif /* CONFIG_PL011_SERIAL */

 void serial_putc (const char c)
 {
@@ -224,5 +221,3 @@ static int pl01x_tstc (int portnum)
return !(IO_READ (port[portnum] + UART_PL01x_FR) 
 UART_PL01x_FR_RXFE);
 }
-
-#endif
diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h
index 1452bf2..ba3c531 100644
--- a/include/configs/integratorap.h
+++ b/include/configs/integratorap.h
@@ -58,7 +58,7 @@
 /*
  * PL010 Configuration
  */
-#define CFG_PL010_SERIAL
+#define CONFIG_PL010_SERIAL
 #define CONFIG_CONS_INDEX  0
 #define CONFIG_BAUDRATE38400
 #define CONFIG_PL01x_PORTS { (void *) (CFG_SERIAL0), (void *) 
(CFG_SERIAL1) }
diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
index 347fa02..5340f7c 100644
--- a/include/configs/integratorcp.h
+++ b/include/configs/integratorcp.h
@@ -61,7 +61,7 @@
 /*
  * NS16550 Configuration
  */
-#define CFG_PL011_SERIAL
+#define CONFIG_PL011_SERIAL
 #define CONFIG_PL011_CLOCK 14745600
 #define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
 #define CONFIG_CONS_INDEX  0
diff --git a/include/configs/versatile.h b/include/configs/versatile.h
index a88d356..c18a248 100644
--- a/include/configs/versatile.h
+++ b/include/configs/versatile.h
@@ -86,7 +86,7 @@
 /*
  * NS16550 Configuration
  */
-#define CFG_PL011_SERIAL
+#define CONFIG_PL011_SERIAL
 #define CONFIG_PL011_CLOCK 2400
 #define CONFIG_PL01x_PORTS { (void *)CFG_SERIAL0, (void *)CFG_SERIAL1 }
 #define CONFIG_CONS_INDEX  0
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH 2/3] fix checkpatch errors

2008-09-08 Thread Wolfgang Denk
Dear JerryVanBaren,

In message [EMAIL PROTECTED] you wrote:
 Georg Schardt wrote:
...
  -#define RM_SYSTEMACE_CMDS   | CFG_CMD_FAT
  +#define RM_SYSTEMACE_CMDS   ( | CFG_CMD_FAT )
...

 Philosophical question: is it better to put silly parenthesis around 
 #defines to make checkpatch shut up or to accept that checkpatch isn't 
 perfect and let it bitch about things that were done intentionally and 
 make sense per their usage?

Well, the most important thin is actually that the code is correct,
and the second important thing is that it can be compiled.

With above definitions of ( | CFG_CMD_FAT ) and  similar,  I  think
that  the code would NOT compile; instead, I expect GCC to issue some
error: expected expression before '|' token  error  messages  (most
probably  followed by some other error: called object 'foo' is not a
function erros.

 (Yes, I see the first one already had () and the change is just fixing 
 the spacing.)

No matter if it fixes spacing or not - it breaks the code.


 I'm serious about this question: in my day job I see a lot of mechanical 

OK, here is a serious anser: no. Such changes as suggested above make
zero sense even if they don't effect correctness of code.

See my previous discussion with Guennadi - changing all return (1);
into return 1; makes no sense to me when it's done just to silence
checkpatch.pl.

 It is WRONG to let our tools rule us.[1]

Agreed 100%.


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: [EMAIL PROTECTED]
Do not underestimate the value of print statements for debugging.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc4xx: Move ppc4xx specific prototypes to ppc4xx header

2008-09-08 Thread Stefan Roese
This patch moves some 4xx specific prototypes out of include common.h
to a ppc4xx specific header.

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
This patch is based on the u-boot-ppc4xx repository. It can't be applied
directly to the master repository. It's needed to clean up some 4xx
specific stuff that I missed in on of the ppc4xx SDRAM related patches.
I didn't want to rebase my repository so this additional patch is needed.


 board/netstal/hcu5/sdram.c |2 +-
 include/asm-ppc/ppc4xx-sdram.h |   14 ++
 include/common.h   |   21 -
 3 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/board/netstal/hcu5/sdram.c b/board/netstal/hcu5/sdram.c
index 66a958c..e5df62e 100644
--- a/board/netstal/hcu5/sdram.c
+++ b/board/netstal/hcu5/sdram.c
@@ -122,7 +122,7 @@ void sdram_panic(const char *reason)
 }
 
 #ifdef CONFIG_DDR_ECC
-static void blank_string(int size)
+void blank_string(int size)
 {
int i;
 
diff --git a/include/asm-ppc/ppc4xx-sdram.h b/include/asm-ppc/ppc4xx-sdram.h
index a1ef029..8efa557 100644
--- a/include/asm-ppc/ppc4xx-sdram.h
+++ b/include/asm-ppc/ppc4xx-sdram.h
@@ -1402,4 +1402,18 @@
 
 #endif /* CONFIG_SDRAM_PPC4xx_DENALI_DDR2 */
 
+#ifndef __ASSEMBLY__
+/*
+ * Prototypes
+ */
+void inline blank_string(int size);
+inline void ppc4xx_ibm_ddr2_register_dump(void);
+u32 mfdcr_any(u32);
+void mtdcr_any(u32, u32);
+u32 ddr_wrdtr(u32);
+u32 ddr_clktr(u32);
+void spd_ddr_init_hang(void);
+u32 DQS_autocalibration(void);
+#endif /* __ASSEMBLY__ */
+
 #endif /* _PPC4xx_SDRAM_H_ */
diff --git a/include/common.h b/include/common.h
index 2516bfd..a394988 100644
--- a/include/common.h
+++ b/include/common.h
@@ -287,27 +287,6 @@ void   pciinfo   (int, int);
 #endif
 #endif
 
-/*
- * Prototypes
- */
-#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2)
-void blank_string(int);
-inline void ppc4xx_ibm_ddr2_register_dump(void);
-#if defined(CONFIG_440)
-u32 mfdcr_any(u32);
-void mtdcr_any(u32, u32);
-#endif
-#if defined(CONFIG_SPD_EEPROM)
-u32 ddr_wrdtr(u32);
-u32 ddr_clktr(u32);
-void spd_ddr_init_hang(void);
-#endif
-#endif /* defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2) */
-
-#if defined(CONFIG_PPC4xx_DDR_AUTOCALIBRATION)
-u32 DQS_autocalibration(void);
-#endif /* CONFIG_PPC4xx_DDR_AUTOCALIBRATION */
-
 intmisc_init_f   (void);
 intmisc_init_r   (void);
 
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH] ppc440: ml507: Add .gitignore

2008-09-08 Thread Stefan Roese
On Friday 22 August 2008, Ricardo Ribalda Delgado wrote:
 Signed-off-by: Ricardo Ribalda Delgado [EMAIL PROTECTED]

Does not apply anymore. Please rebase against current u-boot-ppc4xx repository 
and resubmit.

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: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [UPDATE #2] Merged serial_pl010.c and serial_pl011.c.

2008-09-08 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:17 Mon 08 Sep , Andreas Engel wrote:
 They only differ in the init function.
 This also adds the missing watchdog support for the PL011.
 
 Signed-off-by: Andreas Engel [EMAIL PROTECTED]
 ---
 
  Updated patch to the current git head as of today.
 
  drivers/serial/Makefile   |3 +-
  drivers/serial/serial_pl011.c |  161 
 -
  drivers/serial/{serial_pl010.c = serial_pl01x.c} |   83 +--
  drivers/serial/{serial_pl011.h = serial_pl01x.h} |0
  4 files changed, 69 insertions(+), 178 deletions(-)
  delete mode 100644 drivers/serial/serial_pl011.c
  rename drivers/serial/{serial_pl010.c = serial_pl01x.c} (66%)
  rename drivers/serial/{serial_pl011.h = serial_pl01x.h} (100%)
 
 diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
 index f30014d..3cc1999 100644
 --- a/drivers/serial/Makefile
 +++ b/drivers/serial/Makefile
 @@ -33,8 +33,7 @@ COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
  COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
  COBJS-y += serial.o
  COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 -COBJS-y += serial_pl010.o
 -COBJS-y += serial_pl011.o
 +COBJS-y += serial_pl01x.o
  COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
  COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
  COBJS-$(CONFIG_USB_TTY) += usbtty.o
 diff --git a/drivers/serial/serial_pl011.c b/drivers/serial/serial_pl011.c
 deleted file mode 100644
 index 4d35fe5..000
 --- a/drivers/serial/serial_pl011.c
 +++ /dev/null
 @@ -1,161 +0,0 @@
 -/*
 - * (C) Copyright 2000
 - * Rob Taylor, Flying Pig Systems. [EMAIL PROTECTED]
 - *
 - * (C) Copyright 2004
 - * ARM Ltd.
 - * Philippe Robin, [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.
 +++ b/drivers/serial/serial_pl01x.c
 @@ -31,24 +31,28 @@
  #include common.h
  #include watchdog.h
 
 -#ifdef CFG_PL010_SERIAL
 +#if defined(CFG_PL010_SERIAL) || defined(CFG_PL011_SERIAL)
Please move this to the Makefile

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


Re: [U-Boot] [PATCH 2/3] fix checkpatch errors

2008-09-08 Thread Haavard Skinnemoen
JerryVanBaren [EMAIL PROTECTED] wrote:
 Georg Schardt wrote:
  ---
   include/configs/FX12MM.h |   12 ++--
   1 files changed, 6 insertions(+), 6 deletions(-)
  
  diff --git a/include/configs/FX12MM.h b/include/configs/FX12MM.h
  index b47e403..8b8d41c 100644
  --- a/include/configs/FX12MM.h
  +++ b/include/configs/FX12MM.h
  @@ -15,28 +15,28 @@
   #define CONFIG_DOS_PARTITION1
   #define CFG_SYSTEMACE_BASE  XPAR_SYSACE_0_BASEADDR
   #define CFG_SYSTEMACE_WIDTH XPAR_SYSACE_0_MEM_WIDTH
  -#define ADD_SYSTEMACE_CMDS  (| CFG_CMD_FAT)
  +#define ADD_SYSTEMACE_CMDS  ( | CFG_CMD_FAT )
   #define RM_SYSTEMACE_CMDS
   #else
   #define ADD_SYSTEMACE_CMDS
  -#define RM_SYSTEMACE_CMDS   | CFG_CMD_FAT
  +#define RM_SYSTEMACE_CMDS   ( | CFG_CMD_FAT )
 
 Dear List,
 
 Philosophical question: is it better to put silly parenthesis around 
 #defines to make checkpatch shut up or to accept that checkpatch isn't 
 perfect and let it bitch about things that were done intentionally and 
 make sense per their usage?

In this particular case, I'd recommend not starting the macro with a
binary operator in the first place. That's just _wrong_.

Better define ADD_SYSTEMACE_CMDS etc. as 0 if no flags are to be
added/removed, and add the operator at the callsite.

 (Yes, I see the first one already had () and the change is just fixing 
 the spacing.)

The checkpatch author probably never considered that anyone would
actually define a macro beginning with a binary operator, so it's no
surprise that it comes up with strange suggestions.

That said, putting parentheses around macro contents is a good rule in
general since it might avoid quite a few surprises. E.g.

#define FOO -1

bar = 2FOO; /* should give a compile error, but doesn't */

 I'm serious about this question: in my day job I see a lot of mechanical 
 praying to the god of miserableC (MISRA-C) adding a HUGE amount of 
 unnecessary syntax noise such that it becomes hard to read the code 
 because of all the noise.  I've had people at work ask me why we 
 cannot write code that is as easy to understand as the linux kernel. 
 The answer is simple: we are slavishly and mechanically following the 
 god of if it was good practice somewhere, sometime, it must always be a 
 good practice and not applying good engineering judgment and experience.

I'm not particularly familiar with MISRA-C, but from what I've seen of
it, it's a particularly horrible example of following rules just for
the sake of the rules.

 It is WRONG to let our tools rule us.[1]

Agreed.

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


Re: [U-Boot] [PATCH 1/2] Update i386 code (sc520_cdp)

2008-09-08 Thread JerryVanBaren
Graeme Russ wrote:
 Third time lucky maybe - ditched Evolution (can't adjust line wrap
 width) for Thunderbird. I don't have git-send-email installed - will
 investigate

Read the kernel Documentation/email-clients.txt:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/email-clients.txt;h=2ebb94d6ed8e547d5cb84cdc6feeba126388baf3;hb=HEAD

Evolution and Tbird reportedly can work if you jump the right hoops. 
Maybe.  It's the clicky-gooey curse.[1]

See also my previous diatribe about letting our tools rule us.
   http://lists.denx.de/pipermail/u-boot/2008-September/040195.html

Curmudgeonly yours,
gvb


[1] The Hitchhiker's Guide to the Galaxy, in a moment of reasoned 
lucidity which is almost unique among its current tally of five million, 
nine hundred and seventy-three thousand, five hundred and nine pages, 
says of the Sirius Cybernetics Corporation products that it is very 
easy to be blinded to the essential uselessness of them by the sense of 
achievement you get from getting them to work at all. In other words, - 
and this is the rock-solid principle on which the whole of the 
Corporation's Galaxywide success is founded - their fundamental design 
flaws are completely hidden by their superficial design flaws.

- The Hitchhiker's Guide to the Galaxy / Douglas Adams (1952 - 2001). 
1st American ed. New York : Harmony Books, 1980, c1979
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [UPDATE #2] Merged serial_pl010.c and serial_pl011.c.

2008-09-08 Thread Andreas Engel
Jean-Christophe PLAGNIOL-VILLARD wrote:
 On 10:17 Mon 08 Sep , Andreas Engel wrote:
 [...]

 -#ifdef CFG_PL010_SERIAL
 +#if defined(CFG_PL010_SERIAL) || defined(CFG_PL011_SERIAL)
 Please move this to the Makefile

Shouldn't this better be a separate patch?

Regards,
  Andreas

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


Re: [U-Boot] CFG_64BIT_xxx and friends

2008-09-08 Thread Matthias Fuchs
Here is the U-Boot size for the PLU405 board (405EP-based) with
and without

#define CFG_64BIT_VSPRINTF
#define CFG_64BIT_STRTOUL
.

without:
# ppc_4xx-size u-boot
   textdata bss dec hex filename
 289568   17532  301312  608412   9489c u-boot

with 64bit format handling:
# ppc_4xx-size u-boot
   textdata bss dec hex filename
 291368   17532  301312  610212   94fa4 u-boot

So the difference is 1800 bytes on this architecture.

Matthias

On Monday 08 September 2008 13:00, Haavard Skinnemoen wrote:
 Stefan Roese [EMAIL PROTECTED] wrote:
   Seriously: How much of code size are we talking about? And activating
   / deactivation the feature is  not  so  trivial  as  it  affects  the
   printf() format specifiers we have to use.  
  
  I'm with Wolfgang here and think it would be best to unconditionally 
  support 
  the 64bit printf format too.
 
 Would be nice to see some numbers first though. I suspect there won't
 be much difference, but it could be the printf() implementation does
 something stupid, and it's much easier to tell when the config symbol
 is still in place.
 
 Haavard
 
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ppc440: ml507: Add .gitignore

2008-09-08 Thread Ricardo Ribalda Delgado
Hello Stefan

You can forget about this patch.

With the commit e07f4a8033b6270b8103049adb6456f660ff4a89 it is not again needed


 Best regards

On Mon, Sep 8, 2008 at 08:56, Stefan Roese [EMAIL PROTECTED] wrote:
 On Friday 22 August 2008, Ricardo Ribalda Delgado wrote:
 Signed-off-by: Ricardo Ribalda Delgado [EMAIL PROTECTED]

 Does not apply anymore. Please rebase against current u-boot-ppc4xx repository
 and resubmit.

 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: [EMAIL PROTECTED]
 =




-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [ppc4xx] Please pull git://www.denx.de/git/u-boot-ppc4xx.git

2008-09-08 Thread Stefan Roese
The following changes since commit f158c3d51838474c4c36af365af145fbaf92b694:
  Wolfgang Denk (1):
Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/master

are available in the git repository at:

  git://www.denx.de/git/u-boot-ppc4xx.git master

Adam Graham (2):
  ppc4xx: IBM Memory Controller DDR autocalibration routines
  ppc4xx: Update Kilauea to use PPC4xx DDR autocalibration routines

Matthias Fuchs (3):
  ppc4xx: Update CPCI405 variants handling
  ppc4xx: Cleanup CPCI405 linker script
  ppc4xx: Update CPCI405(AB) configuration

Ricardo Ribalda Delgado (1):
  ppc44x: Unification of virtex5 pp440 boards

Stefan Roese (4):
  ppc4xx: Fix compilation warning for canyonlands  glacier
  ppc4xx: Fix compilation warning for PIP405
  ppc4xx: Remove CONFIG_CS8952_PHY define
  ppc4xx: Move ppc4xx specific prototypes to ppc4xx header

Victor Gallardo (1):
  ppc4xx: Add support for GPCS, SGMII and M88E1112 PHY

 CREDITS|3 +-
 MAINTAINERS|2 +
 MAKEALL|4 +
 Makefile   |   47 +-
 board/avnet/v5fx30teval/.gitignore |1 +
 .../ml507/config.mk = avnet/v5fx30teval/Makefile} |   12 +-
 board/avnet/v5fx30teval/v5fx30teval.c  |   28 +
 board/avnet/v5fx30teval/xparameters.h  |   33 +
 board/esd/cpci405/config.mk|   16 +-
 board/esd/cpci405/u-boot.lds   |   15 -
 board/xilinx/ml507/.gitignore  |1 +
 board/xilinx/ml507/Makefile|   41 +-
 board/xilinx/ml507/init.S  |   53 -
 board/xilinx/ml507/ml507.c |   21 +-
 board/xilinx/ml507/xparameters.h   |   17 +-
 board/xilinx/ppc440-generic/.gitignore |1 +
 board/xilinx/ppc440-generic/Makefile   |   62 +
 board/xilinx/ppc440-generic/init.S |   45 +
 .../{ml507 = ppc440-generic}/u-boot-ram.lds   |0 
 .../{ml507 = ppc440-generic}/u-boot-rom.lds   |0 
 .../xilinx/ppc440-generic/xilinx_ppc440_generic.c  |   52 +
 board/xilinx/ppc440-generic/xparameters.h  |   34 +
 cpu/ppc4xx/44x_spd_ddr2.c  |  158 ++-
 cpu/ppc4xx/4xx_enet.c  |  168 +++-
 cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c| 1212 
 cpu/ppc4xx/Makefile|3 +
 cpu/ppc4xx/miiphy.c|   37 +-
 include/asm-ppc/ppc4xx-sdram.h |3 +-
 include/configs/CPCI4052.h |6 +
 include/configs/CPCI405AB.h|6 +
 include/configs/PIP405.h   |1 -
 include/configs/kilauea.h  |   19 +
 include/configs/ml507.h|   91 +--
 include/configs/v5fx30teval.h  |   49 +
 include/configs/xilinx-ppc440-generic.h|   49 +
 include/configs/xilinx-ppc440.h|  106 ++
 include/ppc440.h   |   13 -
 include/ppc4xx.h   |   13 +
 include/ppc4xx_enet.h  |3 +
 41 files changed, 2112 insertions(+), 336 deletions(-)
 create mode 100644 board/avnet/v5fx30teval/.gitignore
 rename board/{xilinx/ml507/config.mk = avnet/v5fx30teval/Makefile} (76%)
 create mode 100644 board/avnet/v5fx30teval/v5fx30teval.c
 create mode 100644 board/avnet/v5fx30teval/xparameters.h
 create mode 100644 board/xilinx/ml507/.gitignore
 delete mode 100644 board/xilinx/ml507/init.S
 create mode 100644 board/xilinx/ppc440-generic/.gitignore
 create mode 100644 board/xilinx/ppc440-generic/Makefile
 create mode 100644 board/xilinx/ppc440-generic/init.S
 rename board/xilinx/{ml507 = ppc440-generic}/u-boot-ram.lds (100%)
 rename board/xilinx/{ml507 = ppc440-generic}/u-boot-rom.lds (100%)
 create mode 100644 board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
 create mode 100644 board/xilinx/ppc440-generic/xparameters.h
 create mode 100644 cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
 create mode 100644 include/configs/v5fx30teval.h
 create mode 100644 include/configs/xilinx-ppc440-generic.h
 create mode 100644 include/configs/xilinx-ppc440.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] PPC4xx unapplied patches

2008-09-08 Thread Stefan Roese
Hi Wolfgang,

On Sunday 07 September 2008, Wolfgang Denk wrote:
 I have a an unapplied patch in my list which seem to fall into your
 area of responsibility. Can you please have a look at this:

  6385  08/22 Ricardo Ribalda D  [U-Boot] [PATCH] ppc440: ml507: Add
 .gitignore

Not needed anymore. Its included in one other patch from Ricardo which is 
included in my pull request sent a few minutes ago.

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: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] MPC85xx unapplied patches

2008-09-08 Thread Kumar Gala

On Sep 6, 2008, at 6:38 PM, Wolfgang Denk wrote:

 Dear Andy,

 I have a couple of unapplied patches in my list which seem to fall
 into your area of responsibility. Can you please have a look at
 these:

 4316  07/18 Timur Tabi [U-Boot-Users] [PATCH] Update  
 Freescale 85xx boards to sys_eeprom.c
   - see http://bugs.denx.de/databases/u-boot/prs/14
 5974  08/15 [EMAIL PROTECTED]  [U-Boot] unassigned-patches/22:  
 [PATCH] Removed hardcoded MxMR loop v
   - see http://bugs.denx.de/databases/u-boot/prs/22
 5978  08/15 [EMAIL PROTECTED]  [U-Boot] unassigned-patches/26:  
 [PATCH] 85xx: socrates: Enable Lime s
   - see http://bugs.denx.de/databases/u-boot/prs/26
 5979  08/15 [EMAIL PROTECTED]  [U-Boot] unassigned-patches/27:  
 [PATCH] 85xx: Socrates: Major code up
   - see http://bugs.denx.de/databases/u-boot/prs/27
 6184  08/19 Kumar Gala [U-Boot] [PATCH v2] 85xx: remove  
 redudant code with lib_ppc/interrupt

This has been applied.

However:
85xx: Ensure timebase is zero on secondary cores

hasn't been.

- k

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


Re: [U-Boot] [PATCH] [ARM] Moved conditional compile into Makefile

2008-09-08 Thread Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,

In message [EMAIL PROTECTED] you wrote:

 what append if CONFIG_PL010_SERIAL and CONFIG_PL011_SERIAL is active at the
 same time?

Then something is missing.

 serial_pl01x.c will be compile twice
 
 so please move to 
 +COBJS-$(CONFIG_PL010_SERIAL)$(CONFIG_PL011_SERIAL) += serial_pl01x.o

This alone is not sufficient, since then you need to add a  rule  for
the resulting COBJS-yy.

But as I learned all of this is completely unnecessary.

As Detlev Zundel pointed out, just doing COBJS-y = $(sort COBJS-y)
would fix any such problems in a clean and readable way.

I recommend to add such a statement instead.

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: [EMAIL PROTECTED]
Do you know about being with somebody? Wanting to be? If  I  had  the
whole  universe,  I'd  give it to you, Janice. When I see you, I feel
like I'm hungry all over. Do you know how that feels?
-- Charlie Evans, Charlie X, stardate 1535.8
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] u-boot 1.2.0 - 1.3.4 migration

2008-09-08 Thread Alexander Danilov
My bsp for u-boot 1.2.0 for AMCC PPC440EPx custom board works. I've
moved all bsp code to current u-boot version (1.3.4). All works fine
but I am getting program check exception when sending or receiving
packet over ethernet (EMAC0).
I've tryed to debug it but ethernet works when bdm connected.
What was changed in ethernet code for ppc4xx after 1.2.0?

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


Re: [U-Boot] [PATCH][for 1.3.5] Fix handling of mem reserves for ramdisk

2008-09-08 Thread Wolfgang Denk
Dear Kumar Gala,

In message [EMAIL PROTECTED] you wrote:

 The reason we had the code before was to try and make sure the size of  
 the fdt was as close to its final size as possible before we dealt  
 with the ramdisk relocation (boot_ramdisk_high()) that included the  
 properties and the memreserve in the fdt.  Step's a)-c) are there to  
 make sure the size is correct.

Well, but the size needed for this should be a constant, so it should
be sufficioent to determine  it  once  and  then  use  a  hard  coded
constant; eventually add some padding.

Doing this in runtime is a waste of resources (flash memory, RAM, and
time - not to mention human time for maintaining the code).

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: [EMAIL PROTECTED]
Let the programmers be many and the managers few -- then all will  be
productive.   -- Geoffrey James, The Tao of Programming
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [ARM] Moved conditional compile into Makefile

2008-09-08 Thread Andreas Engel
Wolfgang Denk schrieb:
 Dear Jean-Christophe PLAGNIOL-VILLARD,
 
 In message [EMAIL PROTECTED] you wrote:
 what append if CONFIG_PL010_SERIAL and CONFIG_PL011_SERIAL is active at the
 same time?
 
 Then something is missing.

In this particular case, this will not work anyway. The driver is not prepared
to support both a PL010 and a PL011 at the same time. And I doubt that there's
some real hardware out there which actually contains both types of uarts.

 serial_pl01x.c will be compile twice

 so please move to 
 +COBJS-$(CONFIG_PL010_SERIAL)$(CONFIG_PL011_SERIAL) += serial_pl01x.o
 
 This alone is not sufficient, since then you need to add a  rule  for
 the resulting COBJS-yy.

There's already such a rule in common/Makefile.

 But as I learned all of this is completely unnecessary.
 
 As Detlev Zundel pointed out, just doing COBJS-y = $(sort COBJS-y)
 would fix any such problems in a clean and readable way.
 
 I recommend to add such a statement instead.

Yes, that's definitely better, as it also catches cases with more than
two y's.

Regards,
  Andreas

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


[U-Boot] FW: Fwd: Problem in writing jffs2 fiesystem

2008-09-08 Thread Pedro Luis D. L.








On Mon, 8 Sep 2008 19:51:59 +0530 Navin wrote:

Hi all,

I am running u-b00t-1.6.6 on custom at91sam9263 board.

Are you sure it is u-boot-1.6.6? The latest u-boot in repository is
1.3.4.

Now i am able to boot, jffs2 filesystem with linux-2.6.20 kernel.
but the procedure i am using to burn is jffs2 is :

1)boot the linux kernel with ramdisk

2)erase the flash partition using $flasheraseall -j /dev/mtd1
3)writing the image using $nandwrite -p /dev/mtd1 rootfs.jffs2


You should be able to flash the jffs2 file sytem from u-boot.
No need to do it from linux.

The above procedure works well for me. But when i try writing the jffs2 
filesytem in uboot prompt its not booting (kernel panic).


In uboot i did this way:

1) tftp 2110 rootfs.jffs2
2)nand write.jffs2 2110 0x20 0x(hex add of displayed by tftp)


Which command is nand write.jffs2? Maybe you're using a version which
is modified by the board supplier. 
A normal way to flash it would be:

cp.b 2110 $(destiny_addr) $(filesize)

Cheers.

Pedro L.


What is the write  of doing this?
- 
Regards,
Naveen




Juega a las preguntas de Live Quiz con tus contactos de Messenger ¡Empieza 
ahora!

_
¿Sigue el calor? Consulta MSN El tiempo
http://eltiempo.es.msn.com/___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [POWERPC] [BUG?] ppc4xx: PCIX0_STS versus PCIX0_STATUS in 4xx_pci.c

2008-09-08 Thread Stefan Roese
Carolyn,

On Friday 05 September 2008, [EMAIL PROTECTED] wrote:
 In the pci_440_init function in cpu/ppc4xx/4xx_pci.c, shouldn't this

 out32r( PCIX0_STS, in32r( PCIX0_STS )  ~0xfff8 );

 really be this?

 out32r( PCIX0_STATUS, in32r( PCIX0_STATUS )  ~0xfff8 );

Could you please explain, why you think this is the case? Are you seeing 
problems with this code? And are they solved when you use the other register 
instead?

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: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH RFC] mpc8572ds relocatable

2008-09-08 Thread JerryVanBaren
Ed Swarthout wrote:
 Fixes boot crash from bad string pointers in get_table_entry_name
 when flash is erased or differs from current u-boot image.
 
 Signed-off-by: Ed Swarthout [EMAIL PROTECTED]
 ---
 
 Fix was pointed out by Peter Tyser in Image.c get_table_entry_name thread.
 
 This redoes Grant Likey's relocation change, but leaves control to each board.
 This also fixes the mii dump command when flash is erased.
 Tested with gcc 4.2
 
  board/freescale/mpc8572ds/config.mk  |1 +
  board/freescale/mpc8572ds/u-boot.lds |2 +-
  2 files changed, 2 insertions(+), 1 deletions(-)
 
 diff --git a/board/freescale/mpc8572ds/config.mk 
 b/board/freescale/mpc8572ds/config.mk
 index 5b32186..8b3651b 100644
 --- a/board/freescale/mpc8572ds/config.mk
 +++ b/board/freescale/mpc8572ds/config.mk
 @@ -30,3 +30,4 @@ endif
  PLATFORM_CPPFLAGS += -DCONFIG_E500=1
  PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx=1
  PLATFORM_CPPFLAGS += -DCONFIG_MPC8572=1
 +PLATFORM_CPPFLAGS += -mrelocatable -DCONFIG_RELOC_FIXUP_WORKS
 diff --git a/board/freescale/mpc8572ds/u-boot.lds 
 b/board/freescale/mpc8572ds/u-boot.lds
 index a05ece5..79fb41f 100644
 --- a/board/freescale/mpc8572ds/u-boot.lds
 +++ b/board/freescale/mpc8572ds/u-boot.lds
 @@ -58,7 +58,7 @@ SECTIONS
.text  :
{
  *(.text)
 -*(.fixup)
 +/*  *(.fixup)*/

Please don't (just) comment this out.

Preferably your commit message would have enough information to answer 
the question of why .fixup was removed and no comment in the linker 
control file would be necessary.

In some cases it is worth adding a comment to the code as to why .fixup 
was removed so that someone that doesn't know the background doesn't add 
it back in.  Something like this hand generated pseudo patch:

+/*
+ * Note: The *(.fixup) section is unnecessary because the
+ * CONFIG_RELOC_FIXUP_WORKS method is being used to do the relocation.
+ */

.text  :
{
  *(.text)
-*(.fixup)
  *(.got1)
 } :text


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


Re: [U-Boot] [PATCH][for 1.3.5] Fix handling of mem reserves for ramdisk

2008-09-08 Thread Kumar Gala

On Sep 8, 2008, at 9:10 AM, Wolfgang Denk wrote:

 Dear Kumar Gala,

 In message 6E892604-9B2A-4338-8DF7- 
 [EMAIL PROTECTED] you wrote:

 The reason we had the code before was to try and make sure the size  
 of
 the fdt was as close to its final size as possible before we dealt
 with the ramdisk relocation (boot_ramdisk_high()) that included the
 properties and the memreserve in the fdt.  Step's a)-c) are there to
 make sure the size is correct.

 Well, but the size needed for this should be a constant, so it should
 be sufficioent to determine  it  once  and  then  use  a  hard  coded
 constant; eventually add some padding.

 Doing this in runtime is a waste of resources (flash memory, RAM, and
 time - not to mention human time for maintaining the code).

I'm ok with determining the size bump and doing it that way.

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


Re: [U-Boot] FW: Fwd: Problem in writing jffs2 fiesystem

2008-09-08 Thread Scott Wood
On Mon, Sep 08, 2008 at 04:54:03PM +0200, Pedro Luis D. L. wrote:
 On Mon, 8 Sep 2008 19:51:59 +0530 Navin wrote:
 
 Hi all,
 
 I am running u-b00t-1.6.6 on custom at91sam9263 board.
 
 Are you sure it is u-boot-1.6.6? The latest u-boot in repository is
 1.3.4.

I'm guessing he meant 1.1.6, which is quite old (and apparently old
enough to suffer l33tsp34k bitrot).

 Now i am able to boot, jffs2 filesystem with linux-2.6.20 kernel.

Especially since he's also using a kernel that is quite old. :-)

 but the procedure i am using to burn is jffs2 is :
 
 1)boot the linux kernel with ramdisk
 
 2)erase the flash partition using $flasheraseall -j /dev/mtd1
 3)writing the image using $nandwrite -p /dev/mtd1 rootfs.jffs2
 
 
 You should be able to flash the jffs2 file sytem from u-boot.
 No need to do it from linux.

I think that's the point, that it should work from u-boot but doesn't.

There's probably either something wrong with the u-boot NAND driver being
used, or the ECC layout doesn't match the kernel's.

 In uboot i did this way:
 
 1) tftp 2110 rootfs.jffs2
 2)nand write.jffs2 2110 0x20 0x(hex add of displayed by tftp)
 
 
 Which command is nand write.jffs2?

It's a perfectly normal u-boot command.

 Maybe you're using a version which
 is modified by the board supplier. 
 A normal way to flash it would be:
 
 cp.b 2110 $(destiny_addr) $(filesize)

That's for NOR flash.  It does not work for NAND.

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


Re: [U-Boot] [PATCH] ppc4xx: Fix compilation warning for canyonlands glacier

2008-09-08 Thread Victor Gallardo

Oops, Sorry Stefan my fault for introducing this. 

Thanks for fixing this.

Regards

Victor Gallardo

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Stefan Roese
Sent: Friday, September 05, 2008 5:13 AM
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ppc4xx: Fix compilation warning for
canyonlands glacier

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 cpu/ppc4xx/miiphy.c |   10 +++---
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/cpu/ppc4xx/miiphy.c b/cpu/ppc4xx/miiphy.c index
d303598..84b1bbe 100644
--- a/cpu/ppc4xx/miiphy.c
+++ b/cpu/ppc4xx/miiphy.c
@@ -236,28 +236,24 @@ unsigned int miiphy_getemac_offset(u8 addr)
#endif
 
 #if defined(CONFIG_460EX) || defined(CONFIG_460GT)
-   u32 mode_reg;
u32 eoffset = 0;
 
switch (addr) {
 #if defined(CONFIG_HAS_ETH1)  defined(CONFIG_GPCS_PHY1_ADDR)
case CONFIG_GPCS_PHY1_ADDR:
-   mode_reg = in_be32((void *)EMAC_M1 + 0x100);
-   if (addr == EMAC_M1_IPPA_GET(mode_reg))
+   if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
0x100)))
eoffset = 0x100;
break;
 #endif
 #if defined(CONFIG_HAS_ETH2)  defined(CONFIG_GPCS_PHY2_ADDR)
case CONFIG_GPCS_PHY2_ADDR:
-   mode_reg = in_be32((void *)EMAC_M1 + 0x300);
-   if (addr == EMAC_M1_IPPA_GET(mode_reg))
+   if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
0x300)))
eoffset = 0x300;
break;
 #endif
 #if defined(CONFIG_HAS_ETH3)  defined(CONFIG_GPCS_PHY3_ADDR)
case CONFIG_GPCS_PHY3_ADDR:
-   mode_reg = in_be32((void *)EMAC_M1 + 0x400);
-   if (addr == EMAC_M1_IPPA_GET(mode_reg))
+   if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
0x400)))
eoffset = 0x400;
break;
 #endif
--
1.5.6.5

___
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


Re: [U-Boot] [PATCH] Remove support for booting ARTOS images

2008-09-08 Thread Peter Tyser
Hello Kumar,

On Mon, 2008-09-08 at 08:41 -0500, Kumar Gala wrote:
 Pantelis Antoniou stated:
   AFAIK, it is still used but the products using PPC are long gone.
   Nuke it plz (from orbit).
 
 So remove it since it cleans up a usage of env_get_char outside of
 the environment code.
 
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---
  common/cmd_bootm.c |   99 
 
  common/image.c |3 -
  include/configs/NETPHONE.h |2 -
  include/configs/NETTA.h|2 -
  include/configs/NETTA2.h   |2 -
  include/configs/NETVIA.h   |2 -
  6 files changed, 0 insertions(+), 110 deletions(-)

ARTOS references in the following 2 files could also be cleaned up:
./README
./doc/uImage.FIT/source_file_format.txt

Peter

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


Re: [U-Boot] [PATCH] cmd_mem.c: Fix help message alignment

2008-09-08 Thread Peter Tyser
  What is the preferred command indentation in general?
  
  - Tabs or spaces? eg:
  dhcp\t- invoke DHCP client to obtain IP/boot params\n
  exit- exit script\n
 
 TABs are preferred, as they save  memory  footprint  for  the  U-Boot
 image. But for the help textx, this often makes the code hard to read
 and difficult to edit, so spaces are accepted here as well.
 
  - What about commands that exceed the soft limit of 8 characters?  Are
  they acceptable?  Should there be a space between the command and the -?
  eg I currently see both:
  interrupts - enable or disable interrupts\n
  reiserload- load binary file from a Reiser filesystem\n
 
 Long command names should be avoided  in  general.  If  the  name  is
 exactly  8  characters,  so  that the '-' would align without a space
 between the name and the '-', then omit it; otherwise add it.
 
  I'd be happy to post these patches if desired.  If so, I'll wait till I
  hear back about the preferred indentation method.
 
 Well, try and post them; probably on the next merge window.

Will do, thanks for the feedback,
Peter

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


Re: [U-Boot] [PATCH] ARM DaVinci: Fix broken HW ECC for large page NAND.

2008-09-08 Thread Scott Wood
On Sat, Aug 30, 2008 at 05:06:55PM -0400, Hugo Villeneuve wrote:
 ARM DaVinci: Fix broken HW ECC for large page NAND.
 
 Signed-off-by: Hugo Villeneuve [EMAIL PROTECTED]
 
 ---
 
 Based on original patch by Bernard Blackham [EMAIL PROTECTED]
 
 U-boot's HW ECC support for large page NAND on Davinci is completely
 broken.  Some kernels, such as the 2.6.10 one supported by
 MontaVista for DaVinci, rely upon this broken behaviour as they
 share the same code for ECCs. In the existing scheme, error
 detection *might* work on large page, but error correction
 definitely does not.  Small page ECC correction works, but the
 format is not compatible with the mainline git kernel.
 
 This patch adds ECC code that matches what is currently in the
 Davinci git repository (since NAND support was added in 2.6.24).
 This makes the ECC and OOB layout written by u-boot compatible with
 Linux for both small page and large page devices and fixes ECC
 correction for large page devices.
 
 The old behaviour can be restored by defining the macro
 CFG_DAVINCI_BROKEN_ECC, which is undefined by default.

Applied to u-boot-nand-flash.  Next time, please put the commit message
above the ---, except for extra commentary that isn't intended to go
into the git history.

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


Re: [U-Boot] [PATCH] Add support for booting of INTEGRITY operating system uImages

2008-09-08 Thread Peter Tyser
Hello,

 In message [EMAIL PROTECTED] you wrote:
  Signed-off-by: Peter Tyser [EMAIL PROTECTED]
  ---
   README |5 +++--
   common/cmd_bootm.c |   39 +++
   common/image.c |3 +++
   include/image.h|1 +
   4 files changed, 46 insertions(+), 2 deletions(-)
 
 Can you please rebase your patch against current top of tree, and
 resubmit?   Thanks.

Sure.  I'll post after Kumar re-submits his removal of ARTOS support
patches as the INTEGRITY patch touches the same files.  I made a
aesthetic comment on his patchset and will base the INTEGRITY change on
top of his changes.

Kumar, if you don't plan on resubmitting the ARTOS support patches let
me know and I'll go ahead and send my rebased patch now.

Thanks,
Peter

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


[U-Boot] [PATCH] add board support for virtex4fx12 minimodul

2008-09-08 Thread schardt
From: schardt [EMAIL PROTECTED](none)

---
 Makefile  |3 +
 board/xilinx/fx12mm/Makefile  |   63 
 board/xilinx/fx12mm/config.mk |   28 +++
 board/xilinx/fx12mm/fx12mm.c  |   67 +
 board/xilinx/fx12mm/init.S|   32 
 board/xilinx/fx12mm/u-boot.lds|  149 +
 board/xilinx/fx12mm/xparameters.h |   40 ++
 include/configs/FX12MM.h  |  127 +++
 8 files changed, 509 insertions(+), 0 deletions(-)
 create mode 100644 board/xilinx/fx12mm/Makefile
 create mode 100644 board/xilinx/fx12mm/config.mk
 create mode 100644 board/xilinx/fx12mm/fx12mm.c
 create mode 100644 board/xilinx/fx12mm/init.S
 create mode 100644 board/xilinx/fx12mm/u-boot.lds
 create mode 100644 board/xilinx/fx12mm/xparameters.h
 create mode 100644 include/configs/FX12MM.h

diff --git a/Makefile b/Makefile
index 8d82ef5..1fc476d 100644
--- a/Makefile
+++ b/Makefile
@@ -1282,6 +1282,9 @@ ERIC_config:  unconfig
 EXBITGEN_config:   unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx exbitgen
 
+FX12MM_config: unconfig
+   @$(MKCONFIG) $(@:_config=) ppc ppc4xx fx12mm xilinx
+
 G2000_config:  unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000
 
diff --git a/board/xilinx/fx12mm/Makefile b/board/xilinx/fx12mm/Makefile
new file mode 100644
index 000..aed47ef
--- /dev/null
+++ b/board/xilinx/fx12mm/Makefile
@@ -0,0 +1,63 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)../common)
+$(shell mkdir -p $(obj)../xilinx_iic)
+endif
+
+INCS   := -I../common  -I../xilinx_iic 
+CFLAGS += $(INCS)
+HOST_CFLAGS+= $(INCS)
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o \
+ ../common/xbasic_types.o ../common/xdma_channel.o \
+ ../common/xdma_channel_sg.o \
+ ../common/xversion.o \
+
+SOBJS   = init.o 
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $^
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/xilinx/fx12mm/config.mk b/board/xilinx/fx12mm/config.mk
new file mode 100644
index 000..69490fb
--- /dev/null
+++ b/board/xilinx/fx12mm/config.mk
@@ -0,0 +1,28 @@
+#
+# (C) Copyright 2000
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+#
+# Memec/Avnet Virtex4FX12 MiniModul
+# Standard EDK 10.1 Flash Address
+#
+TEXT_BASE = 0xFF80
diff --git a/board/xilinx/fx12mm/fx12mm.c b/board/xilinx/fx12mm/fx12mm.c
new file mode 100644
index 000..66adde9
--- /dev/null
+++ b/board/xilinx/fx12mm/fx12mm.c
@@ -0,0 +1,67 @@
+/*
+ * (C) Copyright 2008
+ *
+ * Georg Schardt [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 

Re: [U-Boot] [PATCH] ppc4xx: Fix compilation warning for canyonlands glacier

2008-09-08 Thread Wolfgang Denk
Dear Victor Gallardo,

In message [EMAIL PROTECTED] you wrote:
 
 Oops, Sorry Stefan my fault for introducing this. 
...
  #if defined(CONFIG_HAS_ETH1)  defined(CONFIG_GPCS_PHY1_ADDR)
   case CONFIG_GPCS_PHY1_ADDR:
 - mode_reg = in_be32((void *)EMAC_M1 + 0x100);
 - if (addr == EMAC_M1_IPPA_GET(mode_reg))
 + if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
 0x100)))
^^
Line wrapped.

  #if defined(CONFIG_HAS_ETH2)  defined(CONFIG_GPCS_PHY2_ADDR)
   case CONFIG_GPCS_PHY2_ADDR:
 - mode_reg = in_be32((void *)EMAC_M1 + 0x300);
 - if (addr == EMAC_M1_IPPA_GET(mode_reg))
 + if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
 0x300)))
^^
Line wrapped.

  #if defined(CONFIG_HAS_ETH3)  defined(CONFIG_GPCS_PHY3_ADDR)
   case CONFIG_GPCS_PHY3_ADDR:
 - mode_reg = in_be32((void *)EMAC_M1 + 0x400);
 - if (addr == EMAC_M1_IPPA_GET(mode_reg))
 + if (addr == EMAC_M1_IPPA_GET(in_be32((void *)EMAC_M1 +
 0x400)))
^^
Line wrapped.

Please fix your mailer setup and resubmit.

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: [EMAIL PROTECTED]
I have never understood the female capacity to avoid a direct  answer
to any question.
-- Spock, This Side of Paradise, stardate 3417.3
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] add reboot as a synonym for reset

2008-09-08 Thread Wolfgang Denk
Dear Andrew Dyer,

In message [EMAIL PROTECTED] you wrote:
 Add 'reboot' as a synonym for 'reset' at the u-boot command line.

I tend to reject this change, because I think it is  actually  wrong.
'reboot'  and  'reset' are two different things - the former includes
an ordered shut-down  of  running  services  while  the  latter  just
performs what the name says: a hardware reset.

This is a difference which some may consider small, but I think it is
important enough not to confuse terminology.

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: [EMAIL PROTECTED]
It's hard to make a program foolproof because fools are so ingenious.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] Remove support for booting ARTOS images

2008-09-08 Thread Kumar Gala
Pantelis Antoniou stated:
AFAIK, it is still used but the products using PPC are long gone.
Nuke it plz (from orbit).

So remove it since it cleans up a usage of env_get_char outside of
the environment code.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 README|4 +-
 common/cmd_bootm.c|   99 -
 common/image.c|3 -
 doc/uImage.FIT/source_file_format.txt |2 +-
 include/configs/NETPHONE.h|2 -
 include/configs/NETTA.h   |2 -
 include/configs/NETTA2.h  |2 -
 include/configs/NETVIA.h  |2 -
 8 files changed, 3 insertions(+), 113 deletions(-)

diff --git a/README b/README
index 37449d1..d138c43 100644
--- a/README
+++ b/README
@@ -3030,8 +3030,8 @@ details; basically, the header defines the following 
image properties:
 
 * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD,
   4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
-  LynxOS, pSOS, QNX, RTEMS, ARTOS;
-  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, ARTOS, LynxOS).
+  LynxOS, pSOS, QNX, RTEMS;
+  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS).
 * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86,
   IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
   Currently supported: ARM, AVR32, Intel x86, MIPS, NIOS, PowerPC).
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 751f5b9..1880bc3 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -108,9 +108,6 @@ static boot_os_fn do_bootm_qnxelf;
 int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 #endif
-#if defined(CONFIG_ARTOS)  defined(CONFIG_PPC)
-static boot_os_fn do_bootm_artos;
-#endif
 
 ulong load_addr = CFG_LOAD_ADDR;   /* Default Load Address */
 static bootm_headers_t images; /* pointers to os/initrd/fdt images */
@@ -455,11 +452,6 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
break;
 #endif
 
-#ifdef CONFIG_ARTOS
-   case IH_OS_ARTOS:
-   do_bootm_artos (0, argc, argv, images);
-   break;
-#endif
}
 
show_boot_progress (-9);
@@ -1152,94 +1144,3 @@ static int do_bootm_qnxelf(int flag, int argc, char 
*argv[],
return 1;
 }
 #endif
-
-#if defined(CONFIG_ARTOS)  defined(CONFIG_PPC)
-static int do_bootm_artos (int flag, int argc, char *argv[],
-  bootm_headers_t *images)
-{
-   ulong top;
-   char *s, *cmdline;
-   char **fwenv, **ss;
-   int i, j, nxt, len, envno, envsz;
-   bd_t *kbd;
-   void (*entry)(bd_t *bd, char *cmdline, char **fwenv, ulong top);
-
-#if defined(CONFIG_FIT)
-   if (!images-legacy_hdr_valid) {
-   fit_unsupported_reset (ARTOS);
-   return 1;
-   }
-#endif
-
-   /*
-* Booting an ARTOS kernel image + application
-*/
-
-   /* this used to be the top of memory, but was wrong... */
-#ifdef CONFIG_PPC
-   /* get stack pointer */
-   asm volatile (mr %0,1 : =r(top) );
-#endif
-   debug (## Current stack ends at 0x%08lX , top);
-
-   top -= 2048;/* just to be sure */
-   if (top  CFG_BOOTMAPSZ)
-   top = CFG_BOOTMAPSZ;
-   top = ~0xF;
-
-   debug (= set upper limit to 0x%08lX\n, top);
-
-   /* first check the artos specific boot args, then the linux args*/
-   if ((s = getenv( abootargs)) == NULL  (s = getenv (bootargs)) == 
NULL)
-   s = ;
-
-   /* get length of cmdline, and place it */
-   len = strlen (s);
-   top = (top - (len + 1))  ~0xF;
-   cmdline = (char *)top;
-   debug (## cmdline at 0x%08lX , top);
-   strcpy (cmdline, s);
-
-   /* copy bdinfo */
-   top = (top - sizeof (bd_t))  ~0xF;
-   debug (## bd at 0x%08lX , top);
-   kbd = (bd_t *)top;
-   memcpy (kbd, gd-bd, sizeof (bd_t));
-
-   /* first find number of env entries, and their size */
-   envno = 0;
-   envsz = 0;
-   for (i = 0; env_get_char (i) != '\0'; i = nxt + 1) {
-   for (nxt = i; env_get_char (nxt) != '\0'; ++nxt)
-   ;
-   envno++;
-   envsz += (nxt - i) + 1; /* plus trailing zero */
-   }
-   envno++;/* plus the terminating zero */
-   debug (## %u envvars total size %u , envno, envsz);
-
-   top = (top - sizeof (char **) * envno)  ~0xF;
-   fwenv = (char **)top;
-   debug (## fwenv at 0x%08lX , top);
-
-   top = (top - envsz)  ~0xF;
-   s = (char *)top;
-   ss = fwenv;
-
-   /* now copy them */
-   for (i = 0; env_get_char (i) != '\0'; i = nxt + 1) {
-   for (nxt = i; env_get_char (nxt) != '\0'; ++nxt)
-   ;
-   *ss++ = s;
-   for (j = 

[U-Boot] [PATCH 1/1] mips/bootm: Fix typo in commit c4f9419c, initrd_start replaced by images-rd_start

2008-09-08 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 lib_mips/bootm.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c
index c1bf21e..dced28c 100644
--- a/lib_mips/bootm.c
+++ b/lib_mips/bootm.c
@@ -73,7 +73,7 @@ int do_bootm_linux(int flag, int argc, char *argv[], 
bootm_headers_t *images)
linux_env_set (memsize, env_buf);
 
sprintf (env_buf, 0x%08X, (uint) UNCACHED_SDRAM (images-rd_start));
-   linux_env_set (images-rd_start, env_buf);
+   linux_env_set (initrd_start, env_buf);
 
sprintf (env_buf, 0x%X, (uint) (images-rd_end - images-rd_start));
linux_env_set (initrd_size, env_buf);
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH] Add MTD core partition

2008-09-08 Thread Scott Wood
On Fri, Aug 29, 2008 at 05:13:23PM +0900, Kyungmin Park wrote:
 It's preparation for UBI codes.
 UBI uses partition and get  put mtd devices

Please import the latest MTD code; there have been several cleanups/fixes
in mtdpart.c recently (in particular, the patches from Atsushi Nemoto
dated Jul 19).

As for the #if 0 blocks, I'd rather leave them out entirely -- I think
the increased readability would be worth the occasional extra merge
conflict when importing new upstream code.

 Signed-off-by: Kyungmin Park [EMAIL PROTECTED]
 ---
 diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
 index 6538f7a..d225a68 100644
 --- a/drivers/mtd/Makefile
 +++ b/drivers/mtd/Makefile
 @@ -25,6 +25,7 @@ include $(TOPDIR)/config.mk
  
  LIB  := $(obj)libmtd.a
  
 +COBJS-$(CONFIG_CMD_UBI) += mtdcore.o mtdpart.o

Is UBI the only case where we want the generic MTD infrastructure?  Maybe
we can remove some duplication and/or add partition support elsewhere.

  COBJS-$(CONFIG_HAS_DATAFLASH) += at45.o
  COBJS-$(CONFIG_FLASH_CFI_DRIVER) += cfi_flash.o
  COBJS-$(CONFIG_HAS_DATAFLASH) += dataflash.o
 diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
 new file mode 100644
 index 000..2fb6099
 --- /dev/null
 +++ b/drivers/mtd/mtdcore.c
 @@ -0,0 +1,142 @@
 +/*
 + * $Id: mtdcore.c,v 1.47 2005/11/07 11:14:20 gleixner Exp $
 + *
 + * Core registration and callback routines for MTD
 + * drivers and users.
 + */
 +
 +#include linux/mtd/mtd.h
 +#include mtd_uboot.h
 +#include ubi_uboot.h

I don't see mtd_uboot.h or ubi_uboot.h in the current tree, nor are they
added by this patch.

Is this patch supposed to depend on the giant UBI patch (I'd think not,
since the changelog says it's preparing for UBI)?

 +/**
 + *  del_mtd_device - unregister an MTD device
 + *  @mtd: pointer to MTD device info structure
 + *
 + *  Remove a device from the list of MTD devices present in the system,
 + *  and notify each currently active MTD 'user' of its departure.
 + *  Returns zero on success or 1 on failure, which currently will happen
 + *  if the requested device does not appear to be present in the list.
 + */
 +int del_mtd_device (struct mtd_info *mtd)
 +{
 + int ret;
 +
 + if (mtd_table[mtd-index] != mtd) {
 + ret = -ENODEV;
 + } else if (mtd-usecount) {
 + printk(KERN_NOTICE Removing MTD device #%d (%s) with use count 
 %d\n,
 + mtd-index, mtd-name, mtd-usecount);
 + ret = -EBUSY;
 + } else {
 + /* No need to get a refcount on the module containing
 +  *the notifier, since we hold the 
 mtd_table_mutex */
 + mtd_table[mtd-index] = NULL;
 +
 + ret = 0;
 + }
 +
 + return ret;
 +}

We should remove all the refcounting/removal stuff -- it's just bloat in
u-boot.

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


[U-Boot] [PATCH V2] qemu_mips: Update linux bootm to support dynamic cmdline

2008-09-08 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
Fix e-mail in copyright
 lib_mips/Makefile  |4 ++
 lib_mips/bootm_qemu_mips.c |   76 
 2 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 lib_mips/bootm_qemu_mips.c

diff --git a/lib_mips/Makefile b/lib_mips/Makefile
index 8176437..7967e58 100644
--- a/lib_mips/Makefile
+++ b/lib_mips/Makefile
@@ -28,7 +28,11 @@ LIB  = $(obj)lib$(ARCH).a
 SOBJS-y+=
 
 COBJS-y+= board.o
+ifeq ($(CONFIG_QEMU_MIPS),y)
+COBJS-y+= bootm_qemu_mips.o
+else
 COBJS-y+= bootm.o
+endif
 COBJS-y+= time.o
 
 SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
diff --git a/lib_mips/bootm_qemu_mips.c b/lib_mips/bootm_qemu_mips.c
new file mode 100644
index 000..cc70fa9
--- /dev/null
+++ b/lib_mips/bootm_qemu_mips.c
@@ -0,0 +1,76 @@
+/*
+ * (C) Copyright 2008
+ * Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include common.h
+#include command.h
+#include image.h
+#include asm/byteorder.h
+#include asm/addrspace.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
+{
+   void(*theKernel) (int, char **, char **, int *);
+   char*bootargs = getenv (bootargs);
+   char*start;
+   uintlen;
+
+   /* find kernel entry point */
+   theKernel = (void (*)(int, char **, char **, int *))images-ep;
+
+   show_boot_progress (15);
+
+   debug (## Transferring control to Linux (at address %08lx) ...\n,
+   (ulong) theKernel);
+
+   gd-bd-bi_boot_params = gd-bd-bi_memstart + (16  20) - 256;
+   debug (%-12s= 0x%08lX\n, boot_params, 
(ulong)gd-bd-bi_boot_params);
+
+   /* set Magic */
+   *(int32_t *)(gd-bd-bi_boot_params - 4) = 0x12345678;
+   /* set ram_size */
+   *(int32_t *)(gd-bd-bi_boot_params - 8) = gd-ram_size;
+
+   start = (char*)gd-bd-bi_boot_params;
+
+   len = strlen(bootargs);
+
+   strncpy(start, bootargs, len + 1);
+
+   start += len;
+
+   len = images-rd_end - images-rd_start;
+   if (len  0) {
+   start += sprintf(start, rd_start=0x%08X rd_size=0x%0X,
+   (uint) UNCACHED_SDRAM (images-rd_start),
+   (uint) len);
+   }
+
+   /* we assume that the kernel is in place */
+   printf (\nStarting kernel ...\n\n);
+
+   theKernel (0, NULL, NULL, 0);
+   /* does not return */
+   return 1;
+}
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH] add reboot as a synonym for reset

2008-09-08 Thread Andrew Dyer
On Mon, Sep 8, 2008 at 1:43 PM, Wolfgang Denk [EMAIL PROTECTED] wrote:
 Dear Andrew Dyer,

 In message [EMAIL PROTECTED] you wrote:
 Add 'reboot' as a synonym for 'reset' at the u-boot command line.

 I tend to reject this change, because I think it is  actually  wrong.
 'reboot'  and  'reset' are two different things - the former includes
 an ordered shut-down  of  running  services  while  the  latter  just
 performs what the name says: a hardware reset.

I'm fine with your decision, it was just a convenience for me, so I'll
keep it in my local tree, but I would ask in the context of u-boot
where there are essentially no 'services' or state that needs to be
saved, what's the real difference?

For a hypothetical do_reboot(), I suppose one could extract some of
the code of do_bootm() (shut off interrupts, usb, maybe caches) into a
common function, run an optional platform hook and then do_reset(),
but it doesn't seem like it would make much difference for the vast
majority of cases, once the hardware reset comes through.

-- 
Hardware, n.:
 The parts of a computer system that can be kicked.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] Add support for booting of INTEGRITY operating system uImages

2008-09-08 Thread Peter Tyser
Signed-off-by: Peter Tyser [EMAIL PROTECTED]
---

This should be applied after [PATCH v2] Remove support for booting ARTOS 
images.

 README|5 ++-
 common/cmd_bootm.c|   38 +
 common/image.c|3 ++
 doc/uImage.FIT/source_file_format.txt |2 +-
 include/image.h   |1 +
 5 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/README b/README
index d138c43..f44fb68 100644
--- a/README
+++ b/README
@@ -3030,8 +3030,9 @@ details; basically, the header defines the following 
image properties:
 
 * Target Operating System (Provisions for OpenBSD, NetBSD, FreeBSD,
   4.4BSD, Linux, SVR4, Esix, Solaris, Irix, SCO, Dell, NCR, VxWorks,
-  LynxOS, pSOS, QNX, RTEMS;
-  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS).
+  LynxOS, pSOS, QNX, RTEMS, INTEGRITY;
+  Currently supported: Linux, NetBSD, VxWorks, QNX, RTEMS, LynxOS,
+  INTEGRITY).
 * Target CPU Architecture (Provisions for Alpha, ARM, AVR32, Intel x86,
   IA64, MIPS, NIOS, PowerPC, IBM S390, SuperH, Sparc, Sparc 64 Bit;
   Currently supported: ARM, AVR32, Intel x86, MIPS, NIOS, PowerPC).
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 1880bc3..f7cbc9e 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -108,6 +108,9 @@ static boot_os_fn do_bootm_qnxelf;
 int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 #endif
+#if defined(CONFIG_INTEGRITY)
+static boot_os_fn do_bootm_integrity;
+#endif
 
 ulong load_addr = CFG_LOAD_ADDR;   /* Default Load Address */
 static bootm_headers_t images; /* pointers to os/initrd/fdt images */
@@ -452,6 +455,11 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
break;
 #endif
 
+#ifdef CONFIG_INTEGRITY
+   case IH_OS_INTEGRITY:
+   do_bootm_integrity (0, argc, argv, images);
+   break;
+#endif
}
 
show_boot_progress (-9);
@@ -1144,3 +1152,33 @@ static int do_bootm_qnxelf(int flag, int argc, char 
*argv[],
return 1;
 }
 #endif
+
+#ifdef CONFIG_INTEGRITY
+static int do_bootm_integrity (int flag, int argc, char *argv[],
+  bootm_headers_t *images)
+{
+   void (*entry_point)(void);
+
+#if defined(CONFIG_FIT)
+   if (!images-legacy_hdr_valid) {
+   fit_unsupported_reset (INTEGRITY);
+   return 1;
+   }
+#endif
+
+   entry_point = (void (*)(void))images-ep;
+
+   printf (## Transferring control to INTEGRITY (at address %08lx) ...\n,
+   (ulong)entry_point);
+
+   show_boot_progress (15);
+
+   /*
+* INTEGRITY Parameters:
+*   None
+*/
+   (*entry_point)();
+
+   return 1;
+}
+#endif
diff --git a/common/image.c b/common/image.c
index 78efe2e..b011932 100644
--- a/common/image.c
+++ b/common/image.c
@@ -116,6 +116,9 @@ static table_entry_t uimage_os[] = {
{   IH_OS_QNX,  qnx,  QNX,  },
{   IH_OS_VXWORKS,  vxworks,  VxWorks,  },
 #endif
+#if defined(CONFIG_INTEGRITY) || defined(USE_HOSTCC)
+   {   IH_OS_INTEGRITY,integrity,INTEGRITY,},
+#endif
 #ifdef USE_HOSTCC
{   IH_OS_4_4BSD,   4_4bsd,   4_4BSD,   },
{   IH_OS_DELL, dell, Dell, },
diff --git a/doc/uImage.FIT/source_file_format.txt 
b/doc/uImage.FIT/source_file_format.txt
index 1e30d22..157936e 100644
--- a/doc/uImage.FIT/source_file_format.txt
+++ b/doc/uImage.FIT/source_file_format.txt
@@ -169,7 +169,7 @@ the '/images' node should have the following layout:
   - os : OS name, mandatory for type=kernel, valid OS names are: openbsd,
 netbsd, freebsd, 4_4bsd, linux, svr4, esix, solaris, irix,
 sco, dell, ncr, lynxos, vxworks, psos, qnx, u_boot,
-rtems, unity.
+rtems, unity, integrity.
   - arch : Architecture name, mandatory for types: standalone, kernel,
 firmware, ramdisk and fdt. Valid architecture names are: alpha,
 arm, i386, ia64, mips, mips64, ppc, s390, sh, sparc,
diff --git a/include/image.h b/include/image.h
index 9be806e..4654485 100644
--- a/include/image.h
+++ b/include/image.h
@@ -85,6 +85,7 @@
 #define IH_OS_RTEMS18  /* RTEMS*/
 #define IH_OS_ARTOS19  /* ARTOS*/
 #define IH_OS_UNITY20  /* Unity OS */
+#define IH_OS_INTEGRITY21  /* INTEGRITY*/
 
 /*
  * CPU Architecture Codes (supported by Linux)
-- 
1.5.4.3

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


Re: [U-Boot] [PATCH] add board support for virtex4fx12 minimodul

2008-09-08 Thread Ricardo
Hello again

  Some comments:

1) The board is manufactured by avnet, you must create it under the
folder boards/avnet/fx12mm
2) Try to unificate the fx12mm board under a more global board, like
the ml507 with is now in mainstream
3) Add your boad to the MAKEALL script and yourself to the MAINTAINERS
4) There are some object that are not used (or I don't see where are
they used) in your makefile. (../common/*)
5) You can obtain CONFIG_SYS_CLK_FREQ from the xparameters (it is
adjustable by the suer)

Best regards


On Mon, Sep 8, 2008 at 14:07, schardt [EMAIL PROTECTED] wrote:
 From: schardt [EMAIL PROTECTED](none)

 ---
  Makefile  |3 +
  board/xilinx/fx12mm/Makefile  |   63 
  board/xilinx/fx12mm/config.mk |   28 +++
  board/xilinx/fx12mm/fx12mm.c  |   67 +
  board/xilinx/fx12mm/init.S|   32 
  board/xilinx/fx12mm/u-boot.lds|  149 
 +
  board/xilinx/fx12mm/xparameters.h |   40 ++
  include/configs/FX12MM.h  |  127 +++
  8 files changed, 509 insertions(+), 0 deletions(-)
  create mode 100644 board/xilinx/fx12mm/Makefile
  create mode 100644 board/xilinx/fx12mm/config.mk
  create mode 100644 board/xilinx/fx12mm/fx12mm.c
  create mode 100644 board/xilinx/fx12mm/init.S
  create mode 100644 board/xilinx/fx12mm/u-boot.lds
  create mode 100644 board/xilinx/fx12mm/xparameters.h
  create mode 100644 include/configs/FX12MM.h

 diff --git a/Makefile b/Makefile
 index 8d82ef5..1fc476d 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -1282,6 +1282,9 @@ ERIC_config:  unconfig
  EXBITGEN_config:   unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx exbitgen

 +FX12MM_config: unconfig
 +   @$(MKCONFIG) $(@:_config=) ppc ppc4xx fx12mm xilinx
 +
  G2000_config:  unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000

 diff --git a/board/xilinx/fx12mm/Makefile b/board/xilinx/fx12mm/Makefile
 new file mode 100644
 index 000..aed47ef
 --- /dev/null
 +++ b/board/xilinx/fx12mm/Makefile
 @@ -0,0 +1,63 @@
 +#
 +# (C) Copyright 2000-2006
 +# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
 +#
 +# See file CREDITS for list of people who contributed to this
 +# project.
 +#
 +# This program is free software; you can redistribute it and/or
 +# modify it under the terms of the GNU General Public License as
 +# published by the Free Software Foundation; either version 2 of
 +# the License, or (at your option) any later version.
 +#
 +# This program is distributed in the hope that it will be useful,
 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +# GNU General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not, write to the Free Software
 +# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 +# MA 02111-1307 USA
 +#
 +
 +include $(TOPDIR)/config.mk
 +ifneq ($(OBJTREE),$(SRCTREE))
 +$(shell mkdir -p $(obj)../common)
 +$(shell mkdir -p $(obj)../xilinx_iic)
 +endif
 +
 +INCS   := -I../common  -I../xilinx_iic
 +CFLAGS += $(INCS)
 +HOST_CFLAGS+= $(INCS)
 +
 +LIB= $(obj)lib$(BOARD).a
 +
 +COBJS  = $(BOARD).o \
 + ../common/xbasic_types.o ../common/xdma_channel.o \
 + ../common/xdma_channel_sg.o \
 + ../common/xversion.o \
 +
 +SOBJS   = init.o
 +
 +SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 +OBJS   := $(addprefix $(obj),$(COBJS))
 +SOBJS  := $(addprefix $(obj),$(SOBJS))
 +
 +$(LIB):$(OBJS) $(SOBJS)
 +   $(AR) $(ARFLAGS) $@ $^
 +
 +clean:
 +   rm -f $(SOBJS) $(OBJS)
 +
 +distclean: clean
 +   rm -f $(LIB) core *.bak .depend
 +
 +#
 +
 +# defines $(obj).depend target
 +include $(SRCTREE)/rules.mk
 +
 +sinclude $(obj).depend
 +
 +#
 diff --git a/board/xilinx/fx12mm/config.mk b/board/xilinx/fx12mm/config.mk
 new file mode 100644
 index 000..69490fb
 --- /dev/null
 +++ b/board/xilinx/fx12mm/config.mk
 @@ -0,0 +1,28 @@
 +#
 +# (C) Copyright 2000
 +# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
 +#
 +# See file CREDITS for list of people who contributed to this
 +# project.
 +#
 +# This program is free software; you can redistribute it and/or
 +# modify it under the terms of the GNU General Public License as
 +# published by the Free Software Foundation; either version 2 of
 +# the License, or (at your option) any later version.
 +#
 +# This program is distributed in the hope that it will be useful,
 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +# GNU General Public License for more details.
 +#
 +# You should have received a copy of the GNU General 

[U-Boot] [PATCH 1/1] qemu_mips: update doc to generate and to use qemu flash, ide file

2008-09-08 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 doc/README.qemu_mips |   67 +++--
 1 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/doc/README.qemu_mips b/doc/README.qemu_mips
index 2a6f1cf..13c98b9 100644
--- a/doc/README.qemu_mips
+++ b/doc/README.qemu_mips
@@ -17,7 +17,28 @@ create image:
 start it:
 # qemu-system-mips -M mips -pflash flash -monitor null -nographic
 
-Ide Disk
+2) Download kernel + initrd
+
+On ftp://ftp.denx.de/pub/contrib/Jean-Christophe_Plagniol-Villard/qemu_mips/
+you can downland
+
+#config to build the kernel
+qemu_mips_defconfig
+#patch to fix mips interupt init on 2.6.24.y kernel
+qemu_mips_kernel.patch
+initrd.gz
+vmlinux
+vmlinux.bin
+System.map
+
+4) Generate uImage
+
+# tools/mkimage -A mips -O linux -T kernel -C gzip -a 0x8001 -e 0x80245650 
-n Linux 2.6.24.y -d vmlinux.bin.gz uImage
+
+5) Copy uImage to Flash
+# dd if=uImage bs=1k conv=notrunc seek=224 of=flash
+
+6) Generate Ide Disk
 
 # dd of=ide bs=1k cout=100k if=/dev/zero
 
@@ -30,14 +51,12 @@ unit: sectors
  ide3 : start=64260, size=  4128705, Id=83
  ide4 : start=0, size=0, Id= 0
 
-# Generate uImage
-# tools/mkimage -A mips -O linux -T kernel -C gzip -a 0x8001 -e 0x80245650 
-n Linux 2.6.24.y -d vmlinux.bin.gz uImage
-# Copy to Flash
-# dd if=uImage bs=1k conv=notrunc seek=224 of=flash
-# Copy to ide
+7) Copy to ide
+
 # dd if=uImage bs=512 conv=notrunc seek=63 of=ide
 
-# Generate ext2 on part 2
+8) Generate ext2 on part 2 on Copy uImage and initrd.gz
+
 # Attached as loop device ide offset = 32130 * 512
 # losetup -o 16450560 -f ide
 # Format as ext2 ( arg2 : nb blocks)
@@ -45,10 +64,40 @@ unit: sectors
 # losetup -d /dev/loop0
 # Mount and copy uImage and initrd.gz to it
 # mount -o loop,offset=16450560 -t ext2 ide /mnt
+# mkdir /mnt/boot
+# cp {initrd.gz,uImage} /mnt/boot/
 # Umount it
 # umount /mnt
 
-Now you can boot from flash, ide, ide+ext2 and tfp
+9) Set Environment
+
+setenv rd_start 0x8080
+setenv rd_size 2663940
+setenv kernel BFC38000
+setenv oad_addr 8050
+setenv load_addr2 80F0
+setenv kernel_flash BFC38000
+setenv load_addr_hello 8020
+setenv bootargs 'root=/dev/ram0 init=/bin/sh'
+setenv load_rd_ext2 'ide res; ext2load ide 0:2 ${rd_start} /boot/initrd.gz'
+setenv load_rd_tftp 'tftp ${rd_start} /initrd.gz'
+setenv load_kernel_hda 'ide res; diskboot ${load_addr} 0:2'
+setenv load_kernel_ext2 'ide res; ext2load ide 0:2 ${load_addr} /boot/uImage'
+setenv load_kernel_tftp 'tftp ${load_addr} /qemu_mips/uImage'
+setenv boot_ext2_ext2 'run load_rd_ext2; run load_kernel_ext2; run addmisc; 
bootm ${load_addr}'
+setenv boot_ext2_flash 'run load_rd_ext2; run addmisc; bootm ${kernel_flash}'
+setenv boot_ext2_hda 'run load_rd_ext2; run load_kernel_hda; run addmisc; 
bootm ${load_addr}'
+setenv boot_ext2_tftp 'run load_rd_ext2; run load_kernel_tftp; run addmisc; 
bootm ${load_addr}'
+setenv boot_tftp_hda 'run load_rd_tftp; run load_kernel_hda; run addmisc; 
bootm ${load_addr}'
+setenv boot_tftp_ext2 'run load_rd_tftp; run load_kernel_ext2; run addmisc; 
bootm ${load_addr}'
+setenv boot_tftp_flash 'run load_rd_tftp; run addmisc; bootm ${kernel_flash}'
+setenv boot_tftp_tftp 'run load_rd_tftp; run load_kernel_tftp; run addmisc; 
bootm ${load_addr}'
+setenv load_hello_tftp 'tftp ${load_addr_hello} /examples/hello_world.bin'
+setenv go_tftp 'run load_hello_tftp; go ${load_addr_hello}'
+setenv addmisc 'setenv bootargs ${bootargs} console=ttyS0,${baudrate} 
rd_start=${rd_start} rd_size=${rd_size} ethaddr=${ethaddr}'
+setenv bootcmd 'run boot_tftp_flash'
+
+10) Now you can boot from flash, ide, ide+ext2 and tfp
 
 # qemu-system-mips -M mips -pflash flash -monitor null -nographic -net nic 
-net user -tftp `pwd` -hda ide
 
@@ -64,7 +113,7 @@ in an other console you start gdb
 1) Debugging of U-Boot Before Relocation
 
 Before relocation, the addresses in the ELF file can be used without any 
problems
-buy connecting to the gdb server localhost:1234
+by connecting to the gdb server localhost:1234
 
 # mipsel-unknown-linux-gnu-gdb u-boot
 GNU gdb 6.6
-- 
1.5.6.5

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


[U-Boot] [PATCH] BMW, PCIPPC2, PCIPPC6, RBC82: fix compile warnings

2008-09-08 Thread Wolfgang Denk
missing doc_probe() prototype.

Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
---
 include/common.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/common.h b/include/common.h
index a394988..33c6e10 100644
--- a/include/common.h
+++ b/include/common.h
@@ -236,6 +236,9 @@ int autoscript (ulong addr, const char *fit_uname);
 
 extern ulong load_addr;/* Default Load Address */
 
+/* common/cmd_doc.c */
+void   doc_probe(unsigned long physadr);
+
 /* common/cmd_nvedit.c */
 intenv_init (void);
 void   env_relocate (void);
-- 
1.5.6.1

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


[U-Boot] [PATCH] mk48t59: fix compile problem introduced by commit d1e23194

2008-09-08 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
---
 drivers/rtc/mk48t59.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/rtc/mk48t59.c b/drivers/rtc/mk48t59.c
index b6c234e..dabf322 100644
--- a/drivers/rtc/mk48t59.c
+++ b/drivers/rtc/mk48t59.c
@@ -227,7 +227,7 @@ void rtc_reset (void)
rtc_write(RTC_CONTROLB, control_b);
 }
 
-int rtc_set_watchdog(short multi, short res)
+void rtc_set_watchdog(short multi, short res)
 {
uchar wd_value;
 
-- 
1.5.6.1

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


[U-Boot] [PATCH] common/cmd_bootm.c: fix printf() format warnings

2008-09-08 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
---
 common/cmd_bootm.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 751f5b9..8dbab02 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -337,13 +337,13 @@ static int bootm_load_os(image_info_t os, ulong 
*load_end, int boot_progress)
return BOOTM_ERR_UNIMPLEMENTED;
}
puts (OK\n);
-   debug (   kernel loaded at 0x%08lx, end = 0x%08lx\n, load, load_end);
+   debug (   kernel loaded at 0x%08lx, end = 0x%8p\n, load, load_end);
if (boot_progress)
show_boot_progress (7);
 
if ((load  blob_end)  (*load_end  blob_start)) {
debug (images.os.start = 0x%lX, images.os.end = 0x%lx\n, 
blob_start, blob_end);
-   debug (images.os.load = 0x%lx, load_end = 0x%lx\n, load, 
load_end);
+   debug (images.os.load = 0x%lx, load_end = 0x%p\n, load, 
load_end);
 
return BOOTM_ERR_OVERLAP;
}
-- 
1.5.6.1

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


Re: [U-Boot] [PATCH] add reboot as a synonym for reset

2008-09-08 Thread Wolfgang Denk
Dear Andrew,

In message [EMAIL PROTECTED] you wrote:
 
 I'm fine with your decision, it was just a convenience for me, so I'll
 keep it in my local tree, but I would ask in the context of u-boot
 where there are essentially no 'services' or state that needs to be
 saved, what's the real difference?

For U-Boot,it makes no difference. The problem is  with  Linux,  when
you get used to using an incorrect or at least imprecise terminology.
When  I ask: Is it OK to reset the server? that is pretty different
from Is it OK to reboot the server?.

My motivation was purely educational :-)

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: [EMAIL PROTECTED]
...when fits of creativity run strong, more than  one  programmer  or
writer  has  been  known to abandon the desktop for the more spacious
floor. - Fred Brooks, Jr.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] qemu_mips: move env storage just after u-boot

2008-09-08 Thread Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,

In message [EMAIL PROTECTED] you wrote:
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
 ---
  include/configs/qemu-mips.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h
 index faaa889..e46976d 100644
 --- a/include/configs/qemu-mips.h
 +++ b/include/configs/qemu-mips.h
 @@ -150,7 +150,7 @@
  #define CFG_FLASH_USE_BUFFER_WRITE   1
  
  #define CONFIG_ENV_IS_IN_FLASH   1
 -#define CONFIG_ENV_ADDR  (CFG_FLASH_BASE + 0x4)
 +#define CONFIG_ENV_ADDR  (CFG_FLASH_BASE + 0x3)

Wouldn't it make sense to use something like

(CFG_FLASH_BASE + CFG_MONITOR_LEN)

instead?

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: [EMAIL PROTECTED]
An optimist believes we live in the best world possible; a  pessimist
fears this is true.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] qemu_mips: update doc to generate and to use qemu flash, ide file

2008-09-08 Thread Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,

In message [EMAIL PROTECTED] you wrote:

 Subject: [PATCH 1/1] 

Could you please omit the 1/1 part is this is a single patch that
does not belong to some series?

[On the other hand, I kind of feel that this *is* actually part of
your qemu series ?]

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: [EMAIL PROTECTED]
A fail-safe circuit will destroy others. -- Klipstein
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] FSBBP: uboot Programming on to the flash for MPC8548 for bootup

2008-09-08 Thread Andy Fleming
On Wed, Aug 27, 2008 at 12:16 AM, Ajeesh Kumar [EMAIL PROTECTED] wrote:
 hi sir/madam,

 I'm using a MPC8548E processor(power pc) also, i've interfaced a nor flash
 of 128 MB to the processor.
 i've read few documents and got to know that the uboot.bin should be
 programmed at 0xfff8.
 Also, when i saw the uboot.bin size it was 512K. so, it could fit between
 0xfff8 - 0x.
 I 'M USING ABATRON BDI2000/BDI3000 FOR THIS.
 Now my question is:
 1) If i'm making changes(addition/deletion of code) to the bootloader(uboot
 1.2) and re compile it, i believe that the size of the uboot.bin will get
 changed i.e / 512K. NOW AT WHICH LOCATION I SHOULD FLASH THE
 UBOOT.BIN(SIZE IS NOT EQUAL TO 512)
 FOR Eg.  If my uboot.bin size is 512K ?


Well, it's not likely you will change the size of the binary.  You
see, the 512K size is a result of a quirk of the 85xx platform.  The
reset vector is at 0xfffc, but we define the base address to be
0xfff8, so we fill in the space between, and it's 512K.

The result is, you don't need to mind the size, unless you grow the
compiled output by over 200K.  Try to avoid that ;)

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


Re: [U-Boot] [PATCH] ml507: fix out of tree build problem

2008-09-08 Thread Ricardo
Hello Wolfgang

  This problem is solved in Unification of virtex5 pp440 boards,
which is ready to be merged in mainline (Today's pullgit by Stefan),
Please revert this patch in order to have less problems merging
Stefan's ppc4xx branch.

Regards


On Mon, Sep 8, 2008 at 16:50, Wolfgang Denk [EMAIL PROTECTED] wrote:
 Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
 ---
  Makefile |4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

 diff --git a/Makefile b/Makefile
 index 8d82ef5..91f542e 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -1358,13 +1358,13 @@ ml300_config:   unconfig

  ml507_flash_config:unconfig
@mkdir -p $(obj)include $(obj)board/xilinx/ml507
 -   @cp $(obj)board/xilinx/ml507/u-boot-rom.lds  
 $(obj)board/xilinx/ml507/u-boot.lds
 +   @cp board/xilinx/ml507/u-boot-rom.lds  
 $(obj)board/xilinx/ml507/u-boot.lds
@echo TEXT_BASE = 0xFE36  $(obj)board/xilinx/ml507/config.tmp
@$(MKCONFIG) $(@:_flash_config=) ppc ppc4xx ml507 xilinx

  ml507_config:  unconfig
@mkdir -p $(obj)include $(obj)board/xilinx/ml507
 -   @cp $(obj)board/xilinx/ml507/u-boot-ram.lds  
 $(obj)board/xilinx/ml507/u-boot.lds
 +   @cp board/xilinx/ml507/u-boot-ram.lds  
 $(obj)board/xilinx/ml507/u-boot.lds
@$(MKCONFIG) $(@:_config=) ppc ppc4xx ml507 xilinx

  ocotea_config: unconfig
 --
 1.5.6.1

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




-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ml507: fix out of tree build problem

2008-09-08 Thread Wolfgang Denk
Dear Ricardo,

In message [EMAIL PROTECTED] you wrote:
 
   This problem is solved in Unification of virtex5 pp440 boards,
 which is ready to be merged in mainline (Today's pullgit by Stefan),
 Please revert this patch in order to have less problems merging
 Stefan's ppc4xx branch.

If your fix is the same, then git will sort it out with no problem.

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: [EMAIL PROTECTED]
Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160)
O, throw away the worser part of it,
And live the purer with the other half.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] rs5c372: fix rtc_set prototype

2008-09-08 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 drivers/rtc/rs5c372.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rs5c372.c b/drivers/rtc/rs5c372.c
index 34514d0..82dd969 100644
--- a/drivers/rtc/rs5c372.c
+++ b/drivers/rtc/rs5c372.c
@@ -195,8 +195,7 @@ rtc_get (struct rtc_time *tmp)
 /*
  * Set the RTC
  */
-void
-rtc_set (struct rtc_time *tmp)
+int rtc_set (struct rtc_time *tmp)
 {
unsigned char buf[8], reg15;
int ret;
-- 
1.5.6.5

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


[U-Boot] [PATCH] onenand_uboot: fix warning: 'struct mtd_oob_ops' declared inside parameter list

2008-09-08 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 include/onenand_uboot.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/onenand_uboot.h b/include/onenand_uboot.h
index 6605e4f..e960257 100644
--- a/include/onenand_uboot.h
+++ b/include/onenand_uboot.h
@@ -15,6 +15,7 @@
 #define __UBOOT_ONENAND_H
 
 #include linux/types.h
+#include linux/mtd/mtd.h
 
 struct mtd_info;
 struct erase_info;
-- 
1.5.6.5

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


[U-Boot] [PATCH] Support multiple SGMII/TBI interfaces for TSEC ethernet

2008-09-08 Thread Peter Tyser
The original code only supported using 1 TSEC port in SGMII mode using an
internal TBI PHY.  Additionally, the TBI internal PHY was being accessed
at the same register offset as the external PHY for the given TSEC port.
This hardwiring of the TBI PHY register address based on external PHY
address will break in many hardware configurations.

Signed-off-by: Peter Tyser [EMAIL PROTECTED]
---

The above limitations were noticed on an mpc8572-based board with 2 sgmii
interfaces with external PHYs.  Both external PHYs are connected to the
MDIO interface of TSEC1 which caused TSEC2 to be non functional since
writes to TSEC2's TBI PHY were actually going to TSEC1's TBI PHY.

Due to a hardware limitations I've only been able to test TSEC2's
functionality for what its worth.

 drivers/net/tsec.c |   15 +--
 include/tsec.h |2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index f81211a..38d4214 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -283,11 +283,13 @@ uint tsec_local_mdio_read(volatile tsec_t *phyregs, uint 
phyid, uint regnum)
 /* Configure the TBI for SGMII operation */
 static void tsec_configure_serdes(struct tsec_private *priv)
 {
-   tsec_local_mdio_write(priv-phyregs, CFG_TBIPA_VALUE, TBI_ANA,
+   /* Access TBI PHY registers at given TSEC register offset as opposed to 
the
+* offset used for external PHY/MII accesses */
+   tsec_local_mdio_write(priv-regs, priv-regs-tbipa, TBI_ANA,
TBIANA_SETTINGS);
-   tsec_local_mdio_write(priv-phyregs, CFG_TBIPA_VALUE, TBI_TBICON,
+   tsec_local_mdio_write(priv-regs, priv-regs-tbipa, TBI_TBICON,
TBICON_CLK_SELECT);
-   tsec_local_mdio_write(priv-phyregs, CFG_TBIPA_VALUE, TBI_CR,
+   tsec_local_mdio_write(priv-regs, priv-regs-tbipa, TBI_CR,
TBICR_SETTINGS);
 }
 
@@ -301,11 +303,12 @@ static int init_phy(struct eth_device *dev)
struct phy_info *curphy;
volatile tsec_t *phyregs = priv-phyregs;
volatile tsec_t *regs = priv-regs;
+   static int tbi_offset = 0;
 
-   /* Assign a Physical address to the TBI */
-   regs-tbipa = CFG_TBIPA_VALUE;
-   phyregs-tbipa = CFG_TBIPA_VALUE;
+   /* Assign a unique physical address to the internal TBI PHY */
+   regs-tbipa = CFG_TBIPA_VALUE + tbi_offset;
asm(sync);
+   tbi_offset++;
 
/* Reset MII (due to new addresses) */
priv-phyregs-miimcfg = MIIMCFG_RESET;
diff --git a/include/tsec.h b/include/tsec.h
index 2db4deb..69f068e 100644
--- a/include/tsec.h
+++ b/include/tsec.h
@@ -110,7 +110,7 @@
 #define miim_read -1
 
 #ifndef CFG_TBIPA_VALUE
-#define CFG_TBIPA_VALUE0x1f
+#define CFG_TBIPA_VALUE0x10
 #endif
 #define MIIMCFG_INIT_VALUE 0x0003
 #define MIIMCFG_RESET  0x8000
-- 
1.5.4.3

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


[U-Boot] [PATCH] disk-on-chip: remove duplicate doc_probe declaration

2008-09-08 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 board/atc/atc.c|1 -
 board/cpu86/cpu86.c|1 -
 board/cpu87/cpu87.c|1 -
 board/gen860t/gen860t.c|2 --
 board/mcc200/mcc200.c  |1 -
 board/mpl/common/common_util.c |1 -
 board/pm520/pm520.c|1 -
 board/pm826/pm826.c|1 -
 board/pm828/pm828.c|1 -
 board/svm_sc8xx/svm_sc8xx.c|1 -
 10 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/board/atc/atc.c b/board/atc/atc.c
index 79527f4..b627c1c 100644
--- a/board/atc/atc.c
+++ b/board/atc/atc.c
@@ -380,7 +380,6 @@ phys_size_t initdram (int board_type)
 }
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
diff --git a/board/cpu86/cpu86.c b/board/cpu86/cpu86.c
index 9e76c72..23ec283 100644
--- a/board/cpu86/cpu86.c
+++ b/board/cpu86/cpu86.c
@@ -313,7 +313,6 @@ phys_size_t initdram (int board_type)
 }
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
diff --git a/board/cpu87/cpu87.c b/board/cpu87/cpu87.c
index f5a5de5..bb8be6b 100644
--- a/board/cpu87/cpu87.c
+++ b/board/cpu87/cpu87.c
@@ -322,7 +322,6 @@ phys_size_t initdram (int board_type)
 }
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
diff --git a/board/gen860t/gen860t.c b/board/gen860t/gen860t.c
index e3d0e43..5c497b6 100644
--- a/board/gen860t/gen860t.c
+++ b/board/gen860t/gen860t.c
@@ -223,8 +223,6 @@ phys_size_t initdram (int board_type)
  * The DOC lives in the CS2* space
  */
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
-
 void doc_init (void)
 {
printf (Probing at 0x%.8x: , DOC_BASE);
diff --git a/board/mcc200/mcc200.c b/board/mcc200/mcc200.c
index 8eb0649..65b8184 100644
--- a/board/mcc200/mcc200.c
+++ b/board/mcc200/mcc200.c
@@ -323,7 +323,6 @@ void ide_set_reset (int idereset)
 #endif
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index 88b864c..8454420 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -565,7 +565,6 @@ int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe(ulong physadr);
 void doc_init (void)
 {
   doc_probe(MULTI_PURPOSE_SOCKET_ADDR);
diff --git a/board/pm520/pm520.c b/board/pm520/pm520.c
index 83d9bcd..e00e2d8 100644
--- a/board/pm520/pm520.c
+++ b/board/pm520/pm520.c
@@ -315,7 +315,6 @@ void ide_set_reset (int idereset)
 #endif
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
diff --git a/board/pm826/pm826.c b/board/pm826/pm826.c
index 7ee3ab6..58914b4 100644
--- a/board/pm826/pm826.c
+++ b/board/pm826/pm826.c
@@ -311,7 +311,6 @@ phys_size_t initdram (int board_type)
 }
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
diff --git a/board/pm828/pm828.c b/board/pm828/pm828.c
index 6038e97..e1a7d57 100644
--- a/board/pm828/pm828.c
+++ b/board/pm828/pm828.c
@@ -344,7 +344,6 @@ phys_size_t initdram (int board_type)
 }
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
diff --git a/board/svm_sc8xx/svm_sc8xx.c b/board/svm_sc8xx/svm_sc8xx.c
index 06fb18b..48e05b8 100644
--- a/board/svm_sc8xx/svm_sc8xx.c
+++ b/board/svm_sc8xx/svm_sc8xx.c
@@ -154,7 +154,6 @@ phys_size_t initdram (int board_type)
 }
 
 #if defined(CONFIG_CMD_DOC)
-extern void doc_probe (ulong physadr);
 void doc_init (void)
 {
doc_probe (CFG_DOC_BASE);
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH] ml507: fix out of tree build problem

2008-09-08 Thread Ricardo
Hello again

  It has change, there is no more copies. Instead of that I used the
method that you sugggested for re-using linking scripts. If you keep
you patch you will have a conflict merging.

Regards  Thanks


On Mon, Sep 8, 2008 at 19:19, Wolfgang Denk [EMAIL PROTECTED] wrote:
 Dear Ricardo,

 In message [EMAIL PROTECTED] you wrote:

   This problem is solved in Unification of virtex5 pp440 boards,
 which is ready to be merged in mainline (Today's pullgit by Stefan),
 Please revert this patch in order to have less problems merging
 Stefan's ppc4xx branch.

 If your fix is the same, then git will sort it out with no problem.

 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: [EMAIL PROTECTED]
 Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160)
O, throw away the worser part of it,
And live the purer with the other half.




-- 
Ricardo Ribalda
http://www.eps.uam.es/~rribalda/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: Use do_div() instead of division for long long

2008-09-08 Thread Gururaja Hebbar K R
 Hmm,

Interestingly i had sent a patch for the same for both
integrator[ap/cp].
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/46044. 

i had sent it to Jean-Christophe PLAGNIOL-VILLARD  Peter Pearse  also
to U-Boot user list. 

Don't know y it didn't reach there.

Regards
Gururaja

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


[U-Boot] [PATCH] ARM: fix warning: target CPU does not support interworking

2008-09-08 Thread Wolfgang Denk
From: Sergei Poselenov [EMAIL PROTECTED]

This patch fixes warnings like this:

start.S:0: warning: target CPU does not support interworking

which come from some ARM cross compilers and are caused by hard-coded
(with --with-cpu=arm9 configuration option) ARM targets (which
support ARM Thumb instructions), while the ARM target selected from
the command line (with -march=armv4) doesn't support Thumb
instructions.

This warning is issued by the compiler regardless of the real use of
the Thumb instructions in code.

To fix this problem, we use options according to compiler version
being used.

Signed-off-by: Sergei Poselenov [EMAIL PROTECTED]
Signed-off-by: Wolfgang Denk [EMAIL PROTECTED]
---

 cpu/arm946es/config.mk  |7 +++
 cpu/arm_intcm/config.mk |7 +++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/cpu/arm946es/config.mk b/cpu/arm946es/config.mk
index 81ca288..f774c7e 100644
--- a/cpu/arm946es/config.mk
+++ b/cpu/arm946es/config.mk
@@ -25,3 +25,10 @@ PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common 
-ffixed-r8 \
 -msoft-float
 
 PLATFORM_CPPFLAGS +=  -march=armv4
+# =
+#
+# Supply options according to compiler version
+#
+# =
+PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call 
cc-option,-malignment-traps,))
diff --git a/cpu/arm_intcm/config.mk b/cpu/arm_intcm/config.mk
index 81ca288..f774c7e 100644
--- a/cpu/arm_intcm/config.mk
+++ b/cpu/arm_intcm/config.mk
@@ -25,3 +25,10 @@ PLATFORM_RELFLAGS += -fno-strict-aliasing  -fno-common 
-ffixed-r8 \
 -msoft-float
 
 PLATFORM_CPPFLAGS +=  -march=armv4
+# =
+#
+# Supply options according to compiler version
+#
+# =
+PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
+PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call 
cc-option,-malignment-traps,))
-- 
1.5.4.2

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


Re: [U-Boot] [PATCH] rs5c372: fix rtc_set prototype

2008-09-08 Thread Wolfgang Denk
Dear Jean-Christophe PLAGNIOL-VILLARD,

In message [EMAIL PROTECTED] you wrote:
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
 ---
  drivers/rtc/rs5c372.c |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

Applied, thanks.

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: [EMAIL PROTECTED]
Every revolutionary idea - in science, politics, art, or  whatever  -
evokes three stages of reaction in a hearer:
  1. It is completely impossible - don't waste my time.
  2. It is possible, but it is not worth doing.
  3. I said it was a good idea all along.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [ppc4xx] Please pull git://www.denx.de/git/u-boot-ppc4xx.git

2008-09-08 Thread Wolfgang Denk
Dear Stefan Roese,

In message [EMAIL PROTECTED] you wrote:
 The following changes since commit f158c3d51838474c4c36af365af145fbaf92b694:
   Wolfgang Denk (1):
 Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/master
 
 are available in the git repository at:
 
   git://www.denx.de/git/u-boot-ppc4xx.git master
 
 Adam Graham (2):
   ppc4xx: IBM Memory Controller DDR autocalibration routines
   ppc4xx: Update Kilauea to use PPC4xx DDR autocalibration routines
 
 Matthias Fuchs (3):
   ppc4xx: Update CPCI405 variants handling
   ppc4xx: Cleanup CPCI405 linker script
   ppc4xx: Update CPCI405(AB) configuration
 
 Ricardo Ribalda Delgado (1):
   ppc44x: Unification of virtex5 pp440 boards
 
 Stefan Roese (4):
   ppc4xx: Fix compilation warning for canyonlands  glacier
   ppc4xx: Fix compilation warning for PIP405
   ppc4xx: Remove CONFIG_CS8952_PHY define
   ppc4xx: Move ppc4xx specific prototypes to ppc4xx header
 
 Victor Gallardo (1):
   ppc4xx: Add support for GPCS, SGMII and M88E1112 PHY
 
  CREDITS|3 +-
  MAINTAINERS|2 +
  MAKEALL|4 +
  Makefile   |   47 +-
  board/avnet/v5fx30teval/.gitignore |1 +
  .../ml507/config.mk = avnet/v5fx30teval/Makefile} |   12 +-
  board/avnet/v5fx30teval/v5fx30teval.c  |   28 +
  board/avnet/v5fx30teval/xparameters.h  |   33 +
  board/esd/cpci405/config.mk|   16 +-
  board/esd/cpci405/u-boot.lds   |   15 -
  board/xilinx/ml507/.gitignore  |1 +
  board/xilinx/ml507/Makefile|   41 +-
  board/xilinx/ml507/init.S  |   53 -
  board/xilinx/ml507/ml507.c |   21 +-
  board/xilinx/ml507/xparameters.h   |   17 +-
  board/xilinx/ppc440-generic/.gitignore |1 +
  board/xilinx/ppc440-generic/Makefile   |   62 +
  board/xilinx/ppc440-generic/init.S |   45 +
  .../{ml507 = ppc440-generic}/u-boot-ram.lds   |0 
  .../{ml507 = ppc440-generic}/u-boot-rom.lds   |0 
  .../xilinx/ppc440-generic/xilinx_ppc440_generic.c  |   52 +
  board/xilinx/ppc440-generic/xparameters.h  |   34 +
  cpu/ppc4xx/44x_spd_ddr2.c  |  158 ++-
  cpu/ppc4xx/4xx_enet.c  |  168 +++-
  cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c| 1212 
 
  cpu/ppc4xx/Makefile|3 +
  cpu/ppc4xx/miiphy.c|   37 +-
  include/asm-ppc/ppc4xx-sdram.h |3 +-
  include/configs/CPCI4052.h |6 +
  include/configs/CPCI405AB.h|6 +
  include/configs/PIP405.h   |1 -
  include/configs/kilauea.h  |   19 +
  include/configs/ml507.h|   91 +--
  include/configs/v5fx30teval.h  |   49 +
  include/configs/xilinx-ppc440-generic.h|   49 +
  include/configs/xilinx-ppc440.h|  106 ++
  include/ppc440.h   |   13 -
  include/ppc4xx.h   |   13 +
  include/ppc4xx_enet.h  |3 +
  41 files changed, 2112 insertions(+), 336 deletions(-)
  create mode 100644 board/avnet/v5fx30teval/.gitignore
  rename board/{xilinx/ml507/config.mk = avnet/v5fx30teval/Makefile} (76%)
  create mode 100644 board/avnet/v5fx30teval/v5fx30teval.c
  create mode 100644 board/avnet/v5fx30teval/xparameters.h
  create mode 100644 board/xilinx/ml507/.gitignore
  delete mode 100644 board/xilinx/ml507/init.S
  create mode 100644 board/xilinx/ppc440-generic/.gitignore
  create mode 100644 board/xilinx/ppc440-generic/Makefile
  create mode 100644 board/xilinx/ppc440-generic/init.S
  rename board/xilinx/{ml507 = ppc440-generic}/u-boot-ram.lds (100%)
  rename board/xilinx/{ml507 = ppc440-generic}/u-boot-rom.lds (100%)
  create mode 100644 board/xilinx/ppc440-generic/xilinx_ppc440_generic.c
  create mode 100644 board/xilinx/ppc440-generic/xparameters.h
  create mode 100644 cpu/ppc4xx/4xx_ibm_ddr2_autocalib.c
  create mode 100644 include/configs/v5fx30teval.h
  create mode 100644 include/configs/xilinx-ppc440-generic.h
  create mode 100644 include/configs/xilinx-ppc440.h

Applied, thanks.

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: [EMAIL PROTECTED]
I knew then (in 1970) that a 4-kbyte minicomputer would cost as much
as a house. So I reasoned  that  after  college,  I'd  have  to  

[U-Boot] Please pull u-boot-mpc85xx.git

2008-09-08 Thread Andy Fleming
are available in the git repository at:

  git://www.denx.de/git/u-boot-mpc85xx.git master

Anatolij Gustschin (1):
  85xx: socrates: Enable Lime support.

Andy Fleming (1):
  Remove CONFIG_SHOW_ACTIVITY from stx boards which don't support it

Detlev Zundel (1):
  85xx: Socrates: Major code update.

Sergei Poselenov (1):
  Removed hardcoded MxMR loop value from upmconfig() for MPC85xx.

Timur Tabi (1):
  Update Freescale 85xx boards to sys_eeprom.c

 board/freescale/common/Makefile |1 -
 board/freescale/common/cds_eeprom.c |   60 
 board/socrates/law.c|4 +-
 board/socrates/socrates.c   |  280 ++
 board/socrates/tlb.c|   13 ++-
 board/socrates/upm_table.h  |   52 +--
 cpu/mpc85xx/cpu.c   |   15 +-
 drivers/video/mb862xx.c |3 +-
 include/configs/MPC8541CDS.h|9 +-
 include/configs/MPC8548CDS.h|9 +-
 include/configs/MPC8555CDS.h|   10 +-
 include/configs/socrates.h  |  134 +++--
 include/configs/stxgp3.h|4 -
 include/configs/stxssa.h|4 -
 14 files changed, 420 insertions(+), 178 deletions(-)
 delete mode 100644 board/freescale/common/cds_eeprom.c
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] mpc85xx/14

2008-09-08 Thread u-boot
Synopsis: [U-Boot-Users] [PATCH] Update Freescale 85xx boards to sys_eeprom.c

State-Changed-From-To: open-closed
State-Changed-By: AndyFleming
State-Changed-When: Tue, 09 Sep 2008 03:53:16 +0200
State-Changed-Why:
Applied




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


Re: [U-Boot] mpc85xx/27

2008-09-08 Thread u-boot
Synopsis: [PATCH] 85xx: Socrates: Major code update.

State-Changed-From-To: open-closed
State-Changed-By: AndyFleming
State-Changed-When: Tue, 09 Sep 2008 03:55:20 +0200
State-Changed-Why:
applied, thanks




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


Re: [U-Boot] FSBBP: uboot Programming on to the flash for MPC8548 for bootup

2008-09-08 Thread Ajeesh Kumar
Hi Andy,

Thank you for your Info, so if my compiled output is 200k, my .bin file
will easily fit into the boundary?

Regards,
   AJEESH KUMAR


-Original Message-
From: Andy Fleming [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 09, 2008 3:16 AM
To: [EMAIL PROTECTED]
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] FSBBP: uboot Programming on to the flash for MPC8548
for bootup

On Wed, Aug 27, 2008 at 12:16 AM, Ajeesh Kumar [EMAIL PROTECTED]
wrote:
 hi sir/madam,

 I'm using a MPC8548E processor(power pc) also, i've interfaced a nor 
 flash of 128 MB to the processor.
 i've read few documents and got to know that the uboot.bin should be 
 programmed at 0xfff8.
 Also, when i saw the uboot.bin size it was 512K. so, it could fit 
 between 0xfff8 - 0x.
 I 'M USING ABATRON BDI2000/BDI3000 FOR THIS.
 Now my question is:
 1) If i'm making changes(addition/deletion of code) to the 
 bootloader(uboot
 1.2) and re compile it, i believe that the size of the uboot.bin will 
 get changed i.e / 512K. NOW AT WHICH LOCATION I SHOULD FLASH THE 
 UBOOT.BIN(SIZE IS NOT EQUAL TO 512) FOR Eg.  If my uboot.bin size is 
 512K ?


Well, it's not likely you will change the size of the binary.  You see, the
512K size is a result of a quirk of the 85xx platform.  The reset vector is
at 0xfffc, but we define the base address to be 0xfff8, so we fill
in the space between, and it's 512K.

The result is, you don't need to mind the size, unless you grow the compiled
output by over 200K.  Try to avoid that ;)

Andy


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments contained in it.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] Add support for KMC KZM-ARM11-01 board

2008-09-08 Thread Atsuo Igarashi
Hi,

I've fixed which Jean-Christophe pointed out.

Regards,
Atsuo
---
This patch adds support for KMC KZM-ARM11-01 board.

Signed-off-by Atsuo Igarashi [EMAIL PROTECTED]
 MAKEALL |1 +
 Makefile|3 +
 board/kzm_arm11/Makefile|   49 +++
 board/kzm_arm11/config.mk   |1 +
 board/kzm_arm11/kzm_arm11.c |  108 +++
 board/kzm_arm11/lowlevel_init.S |  287 +++
 board/kzm_arm11/u-boot.lds  |   72 ++
 include/asm-arm/mach-types.h|   13 ++
 include/configs/kzm_arm11.h |  192 ++
 9 files changed, 726 insertions(+), 0 deletions(-)
 create mode 100644 board/kzm_arm11/Makefile
 create mode 100644 board/kzm_arm11/config.mk
 create mode 100644 board/kzm_arm11/kzm_arm11.c
 create mode 100644 board/kzm_arm11/lowlevel_init.S
 create mode 100644 board/kzm_arm11/u-boot.lds
 create mode 100644 include/configs/kzm_arm11.h

diff --git a/MAKEALL b/MAKEALL
index 9ccb9ac..ab40abc 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -522,6 +522,7 @@ LIST_ARM11=		\
 	apollon		\
 	imx31_litekit	\
 	imx31_phycore	\
+	kzm_arm11	\
 	mx31ads		\
 	smdk6400	\
 
diff --git a/Makefile b/Makefile
index a342a88..6c80b64 100644
--- a/Makefile
+++ b/Makefile
@@ -2785,6 +2785,9 @@ imx31_litekit_config	: unconfig
 imx31_phycore_config	: unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm1136 imx31_phycore NULL mx31
 
+kzm_arm11_config	: unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm1136 kzm_arm11 NULL mx31
+
 mx31ads_config		: unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm1136 mx31ads freescale mx31
 
diff --git a/board/kzm_arm11/Makefile b/board/kzm_arm11/Makefile
new file mode 100644
index 000..dda48ea
--- /dev/null
+++ b/board/kzm_arm11/Makefile
@@ -0,0 +1,49 @@
+#
+# Derived from mx31ads
+#
+# Copyright (C) 2008, Guennadi Liakhovetski [EMAIL PROTECTED]
+#
+# 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	:= kzm_arm11.o
+SOBJS	:= lowlevel_init.o
+
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
+
+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/kzm_arm11/config.mk b/board/kzm_arm11/config.mk
new file mode 100644
index 000..d34dc02
--- /dev/null
+++ b/board/kzm_arm11/config.mk
@@ -0,0 +1 @@
+TEXT_BASE = 0x87f0
diff --git a/board/kzm_arm11/kzm_arm11.c b/board/kzm_arm11/kzm_arm11.c
new file mode 100644
index 000..39e39b7
--- /dev/null
+++ b/board/kzm_arm11/kzm_arm11.c
@@ -0,0 +1,108 @@
+/*
+ * Derived from mx31ads
+ *
+ * Copyright (C) 2008, Guennadi Liakhovetski [EMAIL PROTECTED]
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include asm/io.h
+#include asm/arch/mx31.h
+#include asm/arch/mx31-regs.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init (void)
+{
+	gd-bd-bi_dram[0].start = PHYS_SDRAM_1;
+	gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE;
+
+	return 0;
+}
+
+int board_init (void)
+{
+	int i;
+
+	/* CS0  CS1: Nor Flash */
+	/*
+	 * CS0L, CS0A and CS0U values are from the RedBoot sources.
+	 */
+	__REG(CSCR_U(0)) = 0x1801;
+	__REG(CSCR_L(0))