Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error

2008-11-03 Thread Ricardo
Hello Benny

  I have just checkout the build of the ml507_flash and works ok for me

[EMAIL PROTECTED]:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
Configuring for ml507 board...
   textdata bss dec hex filename
 202132   10476   30032  242640   3b3d0 ./u-boot


  I remember that when I was using another toolchain the final link
failed (but showing different error). Try with another toochain, I am
using one produced by OpenEmbedded, but you will get the same results
with the ELDK


  Best regards



On Mon, Nov 3, 2008 at 07:59, Benny Chen <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I am trying to build a U-Boot image for the ML507 board running from
> FLASH and got the "Not enough room for program headers" error.
>
>
>
> The main difference for my setup is the toolchain.  I am using the
> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
> ml507_flash design for U-Boot.
>
>
>
> I have seen a patch on the linker script for the mpc8555cds board and
> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
> got the "relocation truncated to fit R_PPC_REL24" error.
>
> Before going further with debugging this problem, I would like to check
> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>
>
>
> Thanks for your help.
>
>
>
> Regards,
>
> Benny
>
>
>
> $ ./MAKEALL ml507_flash
>
> Configuring for ml507 board...
>
> powerpc-eabi-ld: u-boot: Not enough room for program headers (allocated
> 2, need 5)
>
> powerpc-eabi-ld: final link failed: Bad value
>
> make: *** [u-boot] Error 1
>
> size: './u-boot': No such file
>
>
>
>
>
>
>
>
> ___
> 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] Initial support for Nomadik 8815 development board

2008-11-03 Thread Alessandro Rubini

> This is the initial port, with basic infrastructure and
> a working serial port.

While rebasing in order to add drivers, I found I have whitespace and
other stilistic errors. I'll post a fixed patch this night with those
details fixed.

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


[U-Boot] MT29F8G08MAAWC support in u-boot

2008-11-03 Thread Dimitar Penev
Hi Guys,

Our Blackfin based system was successfully using MT29F2G08AABWP NAND flash 
and u-boot.
Recently due to the limited availability we decided to migrate to the new 
nand chips from Micron MT29F8G08MAAWC
It uses new technology Multi-Level Cell

However we are still not able to make it working. The capacity, bus width, 
etc are stored in the flash itself.
The u-boot's nand driver however reads the chip ID and recognize this chip 
as 16 bit wide
though from the partnumber it is clear that it is 8 bit device.

Is there someone which know what we need to look at so we make those new 
chips from Micron working with u-boot nand driver.

Thank you for your time!
Dimitar

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


Re: [U-Boot] [patch] U-Boot Firetux board support

2008-11-03 Thread Jürgen Schöw
Hi,

I'm impressed you have been very fast with the comments. I've seen the
comments from Peter Tyson and Jean-Christophe PLAGNIOL-VILLARD as well and it
seem I have a lot to change.

On Fri, 31 Oct 2008 12:09:55 -0500, Scott Wood <[EMAIL PROTECTED]>
wrote:

> On Fri, Oct 31, 2008 at 03:30:33PM +0100, Juergen Schoew wrote:
> > +   *(vu_long *)(PNX8181_REG_EBI1_CS0 + PNX8181_EBI_BURST_OFF) =
> > 0x0CF8; +}
> 
> writel() rather than direct access.

OK, good comment, will rework.
 
> > +   unsigned long IO_ADDR_W = (ulong)chip->IO_ADDR_W;
> > +   if (chip->options & NAND_BUSWIDTH_16)
> > +   writew((unsigned short)dat, IO_ADDR_W);
> > +   else
> > +   writeb((unsigned char)dat, IO_ADDR_W);
> 
> writew/writeb take pointers, not integer addresses.

Will change.

> > +static int firetux_nand_readybusy(struct mtd_info *mtd)
> > +{
> > +   return (int)((readl(CONFIG_SYS_NAND_RB_PORT) >> 18) & 1);
> > +}
> 
> Unnecessary cast.  Pass a pointer to readl().

OK.
 
> > +int board_nand_init(struct nand_chip *nand)
> > +{
> > +   nand->cmd_ctrl   = firetux_nand_hwcontrol;
> > +   nand->dev_ready  = firetux_nand_readybusy;
> > +   nand->chip_delay = 20;
> > +   nand->ecc.mode   = NAND_ECC_SOFT;
> > +   nand->options= NAND_USE_FLASH_BBT | NAND_BBT_CREATE |
> > NAND_BBT_WRITE
> > +| NAND_BBT_VERSION ;
> 
> You cannot pass BBT options as chip options.  Of the above, only
> NAND_USE_FLASH_BBT is a chip option.

You are right. I missed that. I have a 256MByte NAND flash on the board and
tried to reduce the boot time. It seem I have mixed something here.

> Is there any reason you don't use nand_spl?

Hmm, I'm not sure to understand you correct. nand_spl is a new method to
bootstrap the system. From doc/README.nand-boot-ppc440:

b) SPL (Secondary Program Loader)
-
Will load special U-Boot version (NUB) from NAND and execute it. This SPL
has to fit into 4kByte. It sets up the CPU and configures the SDRAM
controller and the NAND controller so that the special U-Boot image can be
loaded from NAND to SDRAM.
This special image is build in the directory "nand_spl".

This seems to be similair to the Steppingstone bootloader from Samsung. This
SPL is already in the eeprom of the system and will be (hopefully) integrated 
in the cpu rom mask for the next revision.

If I see it correct, I have to define the whole parameterset for the NAND
chip in the configfile rather than let the mtd layer detect it. So I do not
see any reason to use SPL. But maybe you can point me to the right direction.

Regards

Jürgen Schöw
-- 
Dipl.-Ing. Jürgen Schöw, emlix GmbH, http://www.emlix.com, mailto:[EMAIL 
PROTECTED]
Fon +49 551 30664-0, Fax -11, Bahnhofsallee 1b, 37081 Göttingen, Germany
Geschäftsführung: Dr. Uwe Kracke, Dr. Cord Seele, Ust-IdNr.: DE 205 198 055
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160

emlix - your embedded linux partner


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


Re: [U-Boot] Building u-boot for the AT91RM9200-EK circa 2008

2008-11-03 Thread Martin Hejnfelt
Wolfgang Denk wrote:
> Dear Martin Hejnfelt,
>
> In message <[EMAIL PROTECTED]> you wrote:
>   
> ...
>   
>> 642D up and running, but the problem relies in the board specific 
>> flash.c file for the DK board. The difference is the ID that the two 
>> 
>
> Why do you have to use this at all? Isn't the flash CFI conformant so
> the generic CFI flash driver would work?
>
> Best regards,
>
> Wolfgang Denk
>   
I must say, I'm still really new to U-boot so I'm not sure if I my 
answer is the best method. The flash circuit is CFI compatible, but 
since I used the already made AT91RM9200 files and modified these, I 
found the problem easily and solved it this way. I will probably hit 
myself in the head in some months when my skills have improved :)

Mvh. / Best Regards

Martin Hejnfelt

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


[U-Boot] [PATCH] lwmon, tqm8xx: Fix build errors

2008-11-03 Thread Anatolij Gustschin
Commit 6b59e03e0237a40a2305ea385defdfd92000978b
lcd: Let the board code show board-specific info

introduced some bugs which prevent U-Boot building
for lwmon board if CONFIG_LCD_INFO_BELOW_LOGO will
be defined in the board configuration.

Also "LCD enabled" building for TQM823L doesn't work
since this commit.

This patch fixes above-mentioned issues.

Signed-off-by: Anatolij Gustschin <[EMAIL PROTECTED]>
---
 board/lwmon/lwmon.c   |2 --
 board/tqc/tqm8xx/tqm8xx.c |5 +++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c
index 9e57246..d062466 100644
--- a/board/lwmon/lwmon.c
+++ b/board/lwmon/lwmon.c
@@ -773,8 +773,6 @@ void lcd_show_board_info(void)
 #ifdef CONFIG_LCD_INFO_BELOW_LOGO
lcd_printf ("MPC823 CPU at %s MHz\n",
strmhz(temp, gd->cpu_clk));
-   lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3,
-   info, strlen(info));
lcd_printf ("  %ld MB RAM, %ld MB Flash\n",
gd->ram_size >> 20,
gd->bd->bi_flashsize >> 20 );
diff --git a/board/tqc/tqm8xx/tqm8xx.c b/board/tqc/tqm8xx/tqm8xx.c
index 928afed..d8a19a4 100644
--- a/board/tqc/tqm8xx/tqm8xx.c
+++ b/board/tqc/tqm8xx/tqm8xx.c
@@ -570,17 +570,18 @@ void ide_led (uchar led, uchar status)
 
 #ifdef CONFIG_LCD_INFO
 #include 
+#include 
 
 void lcd_show_board_info(void)
 {
+   char temp[32];
+
lcd_printf ("%s (%s - %s)\n", U_BOOT_VERSION, __DATE__, __TIME__);
lcd_printf ("(C) 2008 DENX Software Engineering GmbH\n");
lcd_printf ("Wolfgang DENK, [EMAIL PROTECTED]");
 #ifdef CONFIG_LCD_INFO_BELOW_LOGO
lcd_printf ("MPC823 CPU at %s MHz\n",
strmhz(temp, gd->cpu_clk));
-   lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3,
-   info, strlen(info));
lcd_printf ("  %ld MB RAM, %ld MB Flash\n",
gd->ram_size >> 20,
gd->bd->bi_flashsize >> 20 );
-- 
1.5.3.3

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


Re: [U-Boot] new board SDRAM conf

2008-11-03 Thread 조기성
Hi, thanks in your replay.


I create  My own board port(MFT board) . create configuration header and init.S
But In the sdram.c(sdram_init->get_ram_size is 4 thus )func is failed , sdram 
is not founded . 
I think init.S is something wrong or CFG_MONITOR_BASE is  wrong ... . 

maybe you can point me to the right direction.

It's my board init.S

_
tlbtab:
tlbtab_start

/*
 * BOOT_CS (FLASH) must be first. Before relocation SA_I can be off to use 
the
 * speed up boot process. It is patched after relocation to enable SA_I
 */
tlbentry( CFG_BOOT_BASE_ADDR, SZ_256M, CFG_BOOT_BASE_ADDR, 0, 
AC_R|AC_W|AC_X|SA_G/*|SA_I*/)

/* TLB-entry for init-ram in dcache (SA_I must be turned off!) */
tlbentry( CFG_INIT_RAM_ADDR, SZ_64K, CFG_INIT_RAM_ADDR, 0, 
AC_R|AC_W|AC_X|SA_G )

tlbentry( CFG_SDRAM_BASE, SZ_256M, CFG_SDRAM_BASE, 0, 
AC_R|AC_W|AC_X|SA_G|SA_I )
tlbentry( CFG_PCI_BASE, SZ_256M, CFG_PCI_BASE, 0, AC_R|AC_W|SA_G|SA_I )
tlbentry( CFG_NVRAM_BASE_ADDR, SZ_256M, CFG_NVRAM_BASE_ADDR, 0, 
AC_R|AC_W|AC_X|SA_W|SA_I )

/* PCI */
tlbentry( CFG_PCI_MEMBASE, SZ_256M, CFG_PCI_MEMBASE, 0, AC_R|AC_W|SA_G|SA_I 
)
tlbentry( CFG_PCI_MEMBASE1, SZ_256M, CFG_PCI_MEMBASE1, 0, 
AC_R|AC_W|SA_G|SA_I )
tlbentry( CFG_PCI_MEMBASE2, SZ_256M, CFG_PCI_MEMBASE2, 0, 
AC_R|AC_W|SA_G|SA_I )
tlbentry( CFG_PCI_MEMBASE3, SZ_256M, CFG_PCI_MEMBASE3, 0, 
AC_R|AC_W|SA_G|SA_I )

/* USB 2.0 Device */
tlbentry( CFG_USB_DEVICE, SZ_1K, 0x5000, 0, AC_R|AC_W|SA_G|SA_I )

tlbtab_en
_

My SDRAM is  128MB mode 3, 13x10(4) 
And use external DDR_SDRAM Bank_0(BANKSEL_0) 



It's my board configuration header. 

_
Include/configs/mft.h 
#define CONFIG_440EP1   /* Specifc GP support   */
#define CONFIG_440  1   /* ... PPC440 family*/
#define CONFIG_4xx  1   /* ... PPC4xx family*/
#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f  */
#define CONFIG_MISC_INIT_R  1   /* Call misc_init_r */
#define CONFIG_SYS_CLK_FREQ /* external freq to pll *
#define CFG_FLASH_BASE  0xfc00  /* start of FLASH   
*/
#define CFG_MONITOR_BASECFG_FLASH_BASE  /* start of monitor 
*/

/*---
 * Initial RAM & stack pointer (placed in internal SRAM)
 *--*/
#define CFG_INIT_RAM_DCACHE 1   /* d-cache as init ram  */
#define CFG_INIT_RAM_ADDR   0x7000  /* Initial RAM address  */
#define CFG_ISRAM_BASE  CFG_INIT_RAM_ADDR   /* internal SRAM
*/
#define CFG_INIT_RAM_END(4 << 10)   /* End of used area in RAM  
*/
//#define CFG_GBL_DATA_SIZE 256 /* num bytes initial data   */
#define CFG_GBL_DATA_SIZE   128/* num bytes initial data*/

#define CFG_GBL_DATA_OFFSET (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
#define CFG_INIT_SP_OFFSET  CFG_GBL_DATA_OFFSET

#define CFG_MONITOR_LEN (256 * 1024)/* Reserve 256 kB for Mon*/
#define CFG_MALLOC_LEN  (128 * 1024)/* Reserve 128 kB for malloc*/

/*---
 * DDR SDRAM
 *--*/
#undef CONFIG_SPD_EEPROM/* Don't use SPD EEPROM for setup   
*/
#define CONFIG_SDRAM_BANK0  1   /* init onboard DDR SDRAM bank 0*/
#define CFG_SDRAM0_TR0  0x410A4012
#undef CONFIG_SDRAM_ECC /* enable ECC support   */

#if 1
#define CFG_SDRAM_TABLE { \
{(128 << 20), 13, 0x000A4001}, /* 128MB mode 3, 13x10(4)*/ \
{(128 << 20), 12, 0x000A2001}, /* 128MB mode 2, 13x10(4)*/ \
{(64 << 20),  13, 0x00084001}, /* 64MB mode 3, 13x9(4)  */ \
{(64 << 20),  12, 0x00082001}, } /* 64MB mode 2, 13x9(4)
*


/*---
 * External Bus Controller (EBC) Setup
 *--*/
#define CFG_FLASH0  0xFF80
#define CFG_FLASH1  0xFF00
#define CFG_FLASH2  0xFE80
#define CFG_FLASH3  0xFE00
#define CFG_USB 0xF000

/* Memory Bank 0 (Flash Bank 0, NOR-FLASH) initialization   
*/
//#define CFG_EBC_PB0AP 0x03050200
#define CFG_EBC_PB0AP   0x03017300
#define CFG_EBC_PB0CR   (CFG_FLASH0 | 0x7A000) /* 
BAS=0xFF8,BS=8MB,BU

Re: [U-Boot] new board SDRAM conf

2008-11-03 Thread Stefan Roese
On Monday 03 November 2008, 조기성 wrote:
> I create  My own board port(MFT board) . create configuration header and
> init.S But In the sdram.c(sdram_init->get_ram_size is 4 thus )func is
> failed , sdram is not founded . I think init.S is something wrong or
> CFG_MONITOR_BASE is  wrong ... .
>
> maybe you can point me to the right direction.
>
> It's my board init.S

Your init.S is not optimal but at least not the reason for the problem. You 
are programming a 256MB TLB entry for SDRAM. This is more than enough for 
your 128MB. You should fix this at some time but it not the problem right 
now. CFG_MONITOR_BASE is also most likely not the problem.



> My SDRAM is  128MB mode 3, 13x10(4)
> And use external DDR_SDRAM Bank_0(BANKSEL_0)

OK.



> /*---
>  * DDR SDRAM
>  *--*/
> #undef CONFIG_SPD_EEPROM  /* Don't use SPD EEPROM for setup   
> */
> #define CONFIG_SDRAM_BANK01   /* init onboard DDR SDRAM bank 0*/
> #define   CFG_SDRAM0_TR0  0x410A4012
> #undef CONFIG_SDRAM_ECC   /* enable ECC support   */
>
> #if 1
> #define CFG_SDRAM_TABLE   { \
>   {(128 << 20), 13, 0x000A4001}, /* 128MB mode 3, 13x10(4)*/ \
>   {(128 << 20), 12, 0x000A2001}, /* 128MB mode 2, 13x10(4)*/ \
>   {(64 << 20),  13, 0x00084001}, /* 64MB mode 3, 13x9(4)  */ \
>   {(64 << 20),  12, 0x00082001}, } /* 64MB mode 2, 13x9(4)
> *

Why do you define so many entries in this table? One (128MB mode 3) should be 
enough for you. If get_ram_size() doesn't return 128MB in this init function 
then you need to check whether you have a problems with the timings. Use a 
debugger (or test routines) to see if some bits fail etc.

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 v4] Update U-Boot's build timestamp on every compile

2008-11-03 Thread Peter Tyser
On Sat, 2008-11-01 at 03:26 -0700, Trent Piepho wrote:
> On Fri, 31 Oct 2008, Peter Tyser wrote:
> > +$(TIMESTAMP_FILE):
> > +   @( printf '#define U_BOOT_DATE "%s"\n' '$(shell date +"%b %d 
> > %C%y")' \
> > +) > $@
> > +   @( printf '#define U_BOOT_TIME "%s"\n' '$(shell date +"%T")' \
> > +) >> $@
> 
> You could do this:
> 
>   @date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
>   @date +'#define U_BOOT_TIME "%T"' >> $@
> 
> Somewhat shorter and simpler.

Good idea.

> > diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c
> > index 2e6a22a..aa47df7 100644
> > --- a/cpu/mpc8xx/video.c
> > +++ b/cpu/mpc8xx/video.c
> > @@ -32,6 +32,7 @@
> > #include 
> > #include 
> > #include 
> > +#include 
> > #include 
> > #include 
> > #include 
> > @@ -1174,7 +1175,8 @@ static void *video_logo (void)
> > easylogo_plot (VIDEO_LOGO_ADDR, screen, width, 0, 0);
> >
> > #ifdef VIDEO_INFO
> > -   sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__);
> > +   sprintf (info, "%s (%s - %s) ",
> > +U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
> > video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, info);
> 
> If the include of timestamp.h is inside the VIDEO_INFO ifdef, then video.c
> won't gain a timestamp.h dependency when VIDEO_INFO isn't on.  This would
> prevent the file from getting rebuilt on each build if it doesn't need it.

I was following the lead of version.h, which has the same issue you
spotted.  I'll fix both in the next rev.

> > diff --git a/include/configs/NETPHONE.h b/include/configs/NETPHONE.h
> > index a147aff..34de947 100644
> > --- a/include/configs/NETPHONE.h
> > +++ b/include/configs/NETPHONE.h
> > @@ -799,7 +799,7 @@ typedef unsigned int led_id_t;
> > #define CONFIG_CDP_DEVICE_ID_PREFIX "NP"/* netphone */
> > #define CONFIG_CDP_PORT_ID  "eth%d"
> > #define CONFIG_CDP_CAPABILITIES 0x0010
> > -#define CONFIG_CDP_VERSION "u-boot" " " __DATE__ " " __TIME__
> > +#define CONFIG_CDP_VERSION "u-boot" " " U_BOOT_DATE " " U_BOOT_TIME
> 
> This means any file that uses CONFIG_CDP_VERSION will need to include
> timestamp.h, which it didn't before.  You added the includes where needed?

Yes, it is only used in net.c which was updated with:
+#if defined(CONFIG_CDP_VERSION)
+#include 
+#endif

Thanks for the comments Trent.  I'll resubmit v5 shortly.
Peter


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


[U-Boot] [PATCH v5] Update U-Boot's build timestamp on every compile

2008-11-03 Thread Peter Tyser
Use the GNU 'date' command to auto-generate a new U-Boot
timestamp on every compile.

Signed-off-by: Peter Tyser <[EMAIL PROTECTED]>
---
Changes since v1:
* Split up U_BOOT_DATE define (date and time) into
  U_BOOT_DATE (day, month, year) and U_BOOT_TIME (time of day)
  defines
* Updated all architetures/boards

Changes since v2:
* Placed U_BOOT_DATE and U_BOOT_TIME defines in
  timestamp_autogenerated.h.
* Added include/timestamp.h

Changes since v3:
* rebased on TOT
* removed 2 whitespace violations

Changes since v4:
* Simplified timestamp_autogenerated.h creation
* Made timestamp.h and version.h dependent on VIDEO_INFO for
  cpu/mpc8xx/video.c

 Makefile|   17 +++--
 board/bmw/bmw.c |4 ++--
 board/eXalion/eXalion.c |3 ++-
 board/lwmon/lwmon.c |3 ++-
 board/mousse/mousse.c   |3 ++-
 board/netstar/eeprom.c  |3 ++-
 board/sandburst/karef/karef.c   |6 --
 board/sandburst/metrobox/metrobox.c |6 --
 board/tqc/tqm8xx/tqm8xx.c   |3 ++-
 board/trab/trab_fkt.c   |3 ++-
 board/voiceblue/eeprom.c|3 ++-
 cpu/74xx_7xx/start.S|3 ++-
 cpu/leon2/start.S   |3 ++-
 cpu/leon3/start.S   |3 ++-
 cpu/mcf5227x/start.S|3 ++-
 cpu/mcf523x/start.S |3 ++-
 cpu/mcf52x2/start.S |3 ++-
 cpu/mcf532x/start.S |3 ++-
 cpu/mcf5445x/start.S|3 ++-
 cpu/mcf547x_8x/start.S  |3 ++-
 cpu/mpc512x/start.S |3 ++-
 cpu/mpc5xx/start.S  |3 ++-
 cpu/mpc5xxx/start.S |3 ++-
 cpu/mpc8220/start.S |3 ++-
 cpu/mpc824x/start.S |3 ++-
 cpu/mpc8260/start.S |3 ++-
 cpu/mpc83xx/start.S |3 ++-
 cpu/mpc85xx/start.S |3 ++-
 cpu/mpc86xx/start.S |3 ++-
 cpu/mpc8xx/start.S  |3 ++-
 cpu/mpc8xx/video.c  |6 +-
 cpu/nios/start.S|3 ++-
 cpu/nios2/start.S   |3 ++-
 cpu/ppc4xx/start.S  |3 ++-
 include/.gitignore  |1 +
 include/configs/NETPHONE.h  |2 +-
 include/configs/NETTA.h |2 +-
 include/configs/NETTA2.h|2 +-
 include/timestamp.h |   30 ++
 lib_arm/board.c |3 ++-
 lib_avr32/board.c   |3 ++-
 lib_blackfin/board.c|3 ++-
 lib_i386/board.c|3 ++-
 lib_microblaze/board.c  |3 ++-
 lib_mips/board.c|3 ++-
 lib_sh/board.c  |3 ++-
 net/net.c   |3 +++
 47 files changed, 135 insertions(+), 52 deletions(-)
 create mode 100644 include/timestamp.h

diff --git a/Makefile b/Makefile
index d6abb4d..f999a21 100644
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@ U_BOOT_VERSION = 
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 else
 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
 endif
+TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
 VERSION_FILE = $(obj)include/version_autogenerated.h
 
 HOSTARCH := $(shell uname -m | \
@@ -259,7 +260,7 @@ LIBS += api/libapi.a
 LIBS += post/libpost.a
 
 LIBS := $(addprefix $(obj),$(LIBS))
-.PHONY : $(LIBS) $(VERSION_FILE)
+.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE)
 
 LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
 LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
@@ -351,13 +352,13 @@ $(SUBDIRS):   depend $(obj)include/autoconf.mk
 $(LDSCRIPT):   depend $(obj)include/autoconf.mk
$(MAKE) -C $(dir $@) $(notdir $@)
 
-$(NAND_SPL):   $(VERSION_FILE) $(obj)include/autoconf.mk
+$(NAND_SPL):   $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk
$(MAKE) -C nand_spl/board/$(BOARDDIR) all
 
 $(U_BOOT_NAND):$(NAND_SPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > 
$(obj)u-boot-nand.bin
 
-$(ONENAND_IPL):$(VERSION_FILE) $(obj)include/autoconf.mk
+$(ONENAND_IPL):$(TIMESTAMP_FILE) $(VERSION_FILE) 
$(obj)include/autoconf.mk
$(MAKE) -C onenand_ipl/board/$(BOARDDIR) all
 
 $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin 
$(obj)include/autoconf.mk
@@ -370,6 +371,10 @@ $(VERSION_FILE):
 ) > [EMAIL PROTECTED]
@cmp -s $@ [EMAIL PROTECTED] && rm -f [EMAIL PROTECTED] || mv 
-f [EMAIL PROTECTED] $@
 
+$(TIMESTAMP_FILE):
+   @date +'#define U_BOOT_DATE "%b %d %C%y"' > $@
+   @date +'#define U_BOOT_TIME "%T"' >> $@
+
 gdbtools:
$(MAKE) -C tools/gdb all || exit 1
 
@@ -379,7 +384,7 @@ updater:
 env:

Re: [U-Boot] Building u-boot for the AT91RM9200-EK circa 2008

2008-11-03 Thread Wolfgang Denk
Dear Martin Hejnfelt,

In message <[EMAIL PROTECTED]> you wrote:
>
...
> 642D up and running, but the problem relies in the board specific 
> flash.c file for the DK board. The difference is the ID that the two 

Why do you have to use this at all? Isn't the flash CFI conformant so
the generic CFI flash driver would work?

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]
For every complex problem, there is a solution that is simple,  neat,
and wrong.   -- H. L. Mencken
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] lcd: Let the board code show board-specific info cleanup

2008-11-03 Thread Peter Tyser
Hi Wolfgang,

> In message <[EMAIL PROTECTED]> you wrote:
> > Allow tqm8xx.c to cleanly compile when CONFIG_LCD_INFO is
> > defined and remove unneeded version.h from lcd.c
> > 
> > Signed-off-by: Peter Tyser <[EMAIL PROTECTED]>
> > ---
> > I noticed this when adding timestamp.h to tqm8xx.c.
> > The "Update U-Boot's build timestamp on every compile"
> > patch should be applied first.
> 
> Could you please rebase and resubmit that patch? It doesn't apply:

This needs to be applied on top of the "Update U-Boot's build timestamp
on every compile" patch.

Best,
Peter

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


[U-Boot] CFI: flash_write_cfiword() slow

2008-11-03 Thread Jens Gehrlein
Hi list,

having a look at function 
drivers/mtd/cfi_flash.c::flash_write_cfiword(), I found that 
find_sector() is called twice when having AMD standard, extended or 
legacy device. The first time, when writing the command. The second 
time, when calling flash_full_status_check().

Maybe this is the reason, why this programming mode is so slow.
find_sector() loops through the sector table from the last sector to
the current sector. And the more sectors the device has, the slower
the algorithm becomes. And this process for every sector to be 
programmed. And yes, there are still devices around without (standard) 
write buffer, e.g. the Samsung K8P2815UQB.

Before spending time to create a patch, I would like to read your 
opinion about this proposal/question:
Would it be sufficient to just add a flag, that indicates, that the 
sector number has already been calculated for AMD flashes or would it be 
better to pass parameters to flash_full_status_check() dependent on the 
command set?
Other proposals?
Do you see any unwanted side effects?

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


Re: [U-Boot] [PATCH] 86xx: Make dram_size a phys_size_t

2008-11-03 Thread Jon Loeliger
On Fri, 2008-10-31 at 17:13 -0500, Becky Bruce wrote:
> It's currently a long and should be phys_size_t.
> 
> Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>

Applied to u-boot-mpc86xx.

Thanks,
jdl


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


Re: [U-Boot] [PATCH] 8641HPCN: Config file cleanup

2008-11-03 Thread Jon Loeliger
On Fri, 2008-10-31 at 17:13 -0500, Becky Bruce wrote:
> There are several items in the config file that were hardcoded
> but that should really be based on other config options, since
> the regions are contiguous and depend on being so.  This cleans
> that up a bit.  Also, add BR_PHYS_ADDR() macro to convert
> addresses into the proper format for BR registers.
> 
> Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>

Applied to u-boot-mpc86xx.

Thanks,
jdl


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


Re: [U-Boot] [PATCH] mpc8641: Stop supporting non-PCI_PNP configs

2008-11-03 Thread Jon Loeliger
On Fri, 2008-10-31 at 17:14 -0500, Becky Bruce wrote:
> We don't actually ever do this, remove the code so we
> can stop maintaining it.
> 
> Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>

Applied to u-boot-mpc86xx.

Thanks,
jdl


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


Re: [U-Boot] [PATCH] mpc8641: Make PCI and RIO mutually exclusive, fix non-PCI build

2008-11-03 Thread Jon Loeliger
On Fri, 2008-10-31 at 17:14 -0500, Becky Bruce wrote:
> You can't actually have both, and with some coming changes to
> change the memory map for the board and support 36-bit physical,
> we need the extra BAT that is being consumed by having both.
> 
> I also make non-PCI configs build cleanly, for the sake of sanity.
> 
> Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>

Applied to u-boot-mpc86xx.

Thanks,
jdl


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


Re: [U-Boot] [PATCH V2] powerpc 86xx: Handle CCSR relocation earlier

2008-11-03 Thread Jon Loeliger
On Sun, 2008-11-02 at 18:19 -0600, Becky Bruce wrote:
> Currently, the CCSR gets relocated while translation is
> enabled, meaning we need 2 BAT translations to get to both the
> old location and the new location.  Also, the DEFAULT
> CCSR location has a dependency on the BAT that maps the
> FLASH region.  Moving the relocation removes this unnecessary
> dependency. This makes it easier and more intutive to
> modify the board's memory map.
> 
> Swap BATs 3 and 4 on 8610 so that all 86xx boards use the same
> BAT for CCSR space.
> 
> Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>

Applied to u-boot-mpc86xx.

Thanks,
jdl


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


Re: [U-Boot] [PATCH] lib_ppc: Move trap_init to occur earlier

2008-11-03 Thread Jon Loeliger
On Fri, 2008-10-31 at 17:14 -0500, Becky Bruce wrote:
> Doing trap_init immediately once we're running from RAM
> means we're no longer dependent on the physical location of
> the flash on non-BookE platforms. Before trap_init, those
> platforms switch to real mode and go to 0xfff00100 on exception.
> After the switch, they go to 0x0100  This makes it easier to
> move the flash location.
> 
> Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>
> ---
>  lib_ppc/board.c |   10 +-
>  1 files changed, 5 insertions(+), 5 deletions(-)

Wolfgang,

Will you pick this one up?  Or would you like me
to run it through u-boot-mpc86xx with the others?

Thanks,
jdl


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


Re: [U-Boot] [patch] U-Boot Firetux board support

2008-11-03 Thread Jürgen Schöw
Hi,

thanks all for the comments. I will try to fix these.

On Sat, 1 Nov 2008 13:57:25 +0100, Jean-Christophe PLAGNIOL-VILLARD
<[EMAIL PROTECTED]> wrote:

> On 15:30 Fri 31 Oct , Juergen Schoew wrote:
> > Hi U-Boot mailling list,
> > 
> > This patchset adds a new ARM board with the NXP PNX8181 cpu to u-boot.
> > The PNX8181 is an ARM926ej with an internal DSP and a baseband processor
> > (used for DECT). The chip also features dual ethernet, digital to analog
> > interface, spi, i2c and other SOC peripherals. 
> > 
> 
> From here
> > The patch is against u-boot commit
> > 055b12f2ffd7c34eea7e983a0588b24f2e69e0e3 (Date: Sun Oct 19 21:54:30 2008
> > +0200) but should apply to newer commits as well, because the code is
> > mostly seperated.
> > 
> > If you have any comments please email to me.
> > 
> > Is is possible to include that patch in the new version of u-boot?
> > 
> > Regards
> > 
> > Jürgen Schöw
> > 
> > --
> > Dipl.-Ing. Jürgen Schöw, emlix GmbH, http://www.emlix.com,
> > mailto:[EMAIL PROTECTED] Fon +49 551 30664-0, Fax -11, Bahnhofsallee 1b, 
> > 37081
> > Göttingen, Germany Geschäftsführung: Dr. Uwe Kracke, Dr. Cord Seele,
> > Ust-IdNr.: DE 205 198 055 Sitz der Gesellschaft: Göttingen, Amtsgericht
> > Göttingen HR B 3160
> > 
> > emlix - your embedded linux partner
> to here is supposed to be after ---
> > -
> > 
> > Signed-off-by: Jürgen Schöw <[EMAIL PROTECTED]>
> > Signed-off-by: Sebastian Hess <[EMAIL PROTECTED]>
> > Signed-off-by: Matthias Mwenzel <[EMAIL PROTECTED]>
> > Signed-off-by: Dirk Hörner <[EMAIL PROTECTED]>
> > Signed-off-by: Andreas Weißel <[EMAIL PROTECTED]>
> > 
> and sob before

OK. I hope to remember when posting the next cycle.
 
> first a question
> who build this board?

These boards have been build by NXP Semiconductors GmbH, Nuremberg, Germany
and are now build by DSPG Technologies GmbH, Nuremberg, Germany.

> > +++ b/Makefile
> > @@ -2683,6 +2683,13 @@ voiceblue_config:unconfig
> > @$(MKCONFIG) $(@:_config=) arm arm925t voiceblue
> >  
> >  #
> > +## NXP PNX8181 "firetux"
> > +#
> > +
> > +firetux_config:unconfig
> > +   @$(MKCONFIG) $(@:_config=) arm arm926ejs firetux # manufacturer
> > SOC
>  ^^
> please remove

OK

> > +++ b/board/firetux/Makefile
> > +
> > +#ifdef CONFIG_CMD_NAND
> > +COBJS  += nand.o
> > +#endif
> please use COBJS-$(CONFIG_CMD_NAND)

Correct.

> > +++ b/board/firetux/config.mk
> > +
> > +# SDRAM
> > +TEXT_BASE = 0x2078
> > +# mobile pSRAM
> > +#TEXT_BASE = 0x9070
> > +
> could you use a condition

Yes will change.
 
> > +PLATFORM_CPPFLAGS += -fPIC -fPIE -fno-jump-tables # -msingle-pic-base
> > +
> > +ifneq ($(OBJTREE),$(SRCTREE))
> > +# We are building u-boot in a separate directory, use generated
> > +# .lds script from OBJTREE directory.
> > +LDSCRIPT := $(OBJTREE)/board/$(BOARDDIR)/u-boot.lds
> > +endif
> > diff --git a/board/firetux/ethernet.c b/board/firetux/ethernet.c
> please move to drivers/net/

I'm not sure how many SOC will use this IP-Core for ethernet. I think it will
not be too much, but I can move it to drivers/net/.
Should I remove all board specific routines and leave them in the
board/firetux/ directory? (Just to make this driver hardware not depending
on a special board?) What do you suggest?

> > new file mode 100644
> > index 000..866d578
> > --- /dev/null
> > +++ b/board/firetux/ethernet.c
> > +
> > +extern unsigned int boardrevision;
> > +uint16_t ETN1_MADR_PHY_ADDR, ETN2_MADR_PHY_ADDR;
> please do not use uppercase for var name

Will rework.


> > +int firetux_miiphy_initialize(bd_t *bis);
> > +int mii_discover_phy(void);
> > +int mii_negotiate_phy(void);
> > +
> > +#define ALIGN8 static __attribute__ ((aligned(8)))
> > +#define ALIGN4 static __attribute__ ((aligned(4)))
> why static? it should be strange to assume it's static when we read the code

Because these structures are private to the driver.

> please use tab instead of space

Opps, I thought that I found all.

> > +/* which interface to be currently work on   */
> > +/* default can be set by environment variable ethact */
> > +static int firetux_eth = 0;
> > +
> > +/* in the code we use the following descriptors which are either */
> > +/* set to the etn1 or the etn2 descriptors, depending on ethact  */
> > +ALIGN8 rx_descriptor_t *etn_rxdescriptor = etn1_rxdescriptor;
> > +ALIGN8 rx_status_t *etn_rxstatus = etn1_rxstatus;
> > +ALIGN8 tx_descriptor_t *etn_txdescriptor = etn1_txdescriptor;
> > +ALIGN8 tx_status_t *etn_txstatus = etn1_txstatus;
> > +
> > +/* also the base address is switched for etn1 and etn2,  */
> > +/* except for the MII registers etn1_m* which are only available */
> > +/* on etn1 */
> please use this style of comment
> /*
>  *
>  */

Will change.

> > +uint32_t

Re: [U-Boot] new board SDRAM conf

2008-11-03 Thread Stefan Roese
Hi Steven,

On Monday 03 November 2008, 조기성 wrote:
> I Made my board config header, and using yosemite's init.S & u-boot.lds,
> mft.c(Yosemite.c) Only change config header , but it's not working .

You should create your own board port for this custom 440EP board.

> 1. First The difference of my SDRAM configuration is
> ***  (PPC440EP supported four external DDR_SDRAM Banks.) ***
> But Our used only external DDR_SDRAM Bank_0(BANKSEL_0) on the New design
> Board.

Yes. I already described how you should handle this DDR initialization in my 
last mail. Use the common code (cpu/ppc4xx/sdram.c). You probably need to 
change the CONFIG_SYS_SDRAM_TABLE for your board. Take a look at the p3p440.h 
header as an example.

BTW: SDRAM configuration is a complex matter. You definitely need to take a 
look at the PPC users manual and the SDRAM datasheet for this.

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] bootvx: Cleanup & improvements

2008-11-03 Thread Niklaus Giger
The following improvements are made:
- document bootvx in README
- fix size too small by one in sprintf
- changed old (pre 2004) device name ibmEmac to emac
- boot device may be overriden in board config
- servername may be defined in board config
- additional parameters may be defined in board config
- fixed some line wrappings
- changed netstal-common.h to use the new settings

---
 README   |   17 
 common/cmd_elf.c |   80 ++
 include/configs/netstal-common.h |   29 +++---
 3 files changed, 69 insertions(+), 57 deletions(-)

diff --git a/README b/README
index ebee20f..99d2a3d 100644
--- a/README
+++ b/README
@@ -379,6 +379,23 @@ The following options need to be configured:
This define fills in the correct boot CPU in the boot
param header, the default value is zero if undefined.
 
+- vxWorks boot parameters:
+
+   bootvx constructs a valid bootline using the following
+   environments variables: bootfile, ipaddr, serverip, hostname.
+   It loads the vxWorks image pointed bootfile.
+
+   CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name
+   CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address
+   CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server
+
+   CONFIG_SYS_VXWORKS_ADD_PARAMS
+
+   Add it at the end of the bootline. E.g "u=username pw=secret"
+
+   Note: If a "bootargs" environment is defined, it will overwride
+   the defaults discussed just above.
+
 - Serial Ports:
CONFIG_PL010_SERIAL
 
diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index 3ebb6d9..d537478 100644
--- a/common/cmd_elf.c
+++ b/common/cmd_elf.c
@@ -102,10 +102,8 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
unsigned long bootaddr; /* Address to put the bootline */
char *bootline; /* Text of the bootline*/
char *tmp;  /* Temporary char pointer  */
+   char build_buf[128];/* Buffer for building the bootline */
 
-#if defined(CONFIG_4xx) || defined(CONFIG_IOP480)
-   char build_buf[80]; /* Buffer for building the bootline */
-#endif
/* -- */
 
/*
@@ -124,7 +122,8 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
if ((argc == 2) && (strcmp (argv[1], "tftp") == 0)) {
if (NetLoop (TFTP) <= 0)
return 1;
-   printf ("Automatic boot of VxWorks image at address 0x%08lx ... 
\n", addr);
+   printf ("Automatic boot of VxWorks image at address 0x%08lx ... 
\n",
+addr);
}
 #endif
 
@@ -163,54 +162,53 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 */
 
if ((bootline = getenv ("bootargs")) != NULL) {
-   memcpy ((void *) bootaddr, bootline, MAX(strlen(bootline), 
255));
-   flush_cache (bootaddr, MAX(strlen(bootline), 255));
+   memcpy ((void *) bootaddr, bootline,
+   MAX (strlen (bootline), 255));
+   flush_cache (bootaddr, MAX (strlen (bootline), 255));
} else {
+
+#ifndef CONFIG_SYS_VXWORKS_BOOT_DEVICE
 #if defined(CONFIG_4xx)
-   sprintf (build_buf, "ibmEmac(0,0)");
+#defineCONFIG_SYS_VXWORKS_BOOT_DEVICE "emac(0,0)"
+#elif defined(CONFIG_IOP480)
+#defineCONFIG_SYS_VXWORKS_BOOT_DEVICE "dc(0,0)"
+#else
+#defineCONFIG_SYS_VXWORKS_BOOT_DEVICE "eth(0,0)"
+#endif
+#endif
 
-   if ((tmp = getenv ("hostname")) != NULL) {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   "host:%s ", tmp);
+#ifndef CONFIG_SYS_VXWORKS_SERVERNAME
+#define CONFIG_SYS_VXWORKS_SERVERNAME srv
+#endif
+
+   sprintf (build_buf, CONFIG_SYS_VXWORKS_BOOT_DEVICE);
+   if ((tmp = getenv ("bootfile")) != NULL) {
+   sprintf (&build_buf[strlen (build_buf)],
+"%s:%s ", CONFIG_SYS_VXWORKS_SERVERNAME, tmp);
} else {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   ": ");
+   sprintf (&build_buf[strlen (build_buf)],
+"%s:file ", CONFIG_SYS_VXWORKS_SERVERNAME);
}
 
if ((tmp = getenv ("ipaddr")) != NULL) {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   "e=%s ", tmp);
+   sprintf (&build_buf[strlen (build_buf)], "e=%s ", tmp);
}
-   memcpy ((void *)bootaddr, build_buf, MAX(strlen(build_buf), 
255));
-   flush_cache (bootaddr, MAX(strlen(

Re: [U-Boot] [patch] U-Boot Firetux board support

2008-11-03 Thread Jürgen Schöw
Hi Peter,

On Fri, 31 Oct 2008 13:55:53 -0500, Peter Tyser <[EMAIL PROTECTED]> wrote:

> Hi Jürgen,
> 
> > If you have any comments please email to me.
> 
> You should add an entry to the MAINTAINERS file for the Firetux.

OK, will be in the next cycle.

Regards

Jürgen Schöw
-- 
Dipl.-Ing. Jürgen Schöw, emlix GmbH, http://www.emlix.com, mailto:[EMAIL 
PROTECTED]
Fon +49 551 30664-0, Fax -11, Bahnhofsallee 1b, 37081 Göttingen, Germany
Geschäftsführung: Dr. Uwe Kracke, Dr. Cord Seele, Ust-IdNr.: DE 205 198 055
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160

emlix - your embedded linux partner


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


[U-Boot] [U-boot-Users][GIT PULL] Please pull coldfire tree

2008-11-03 Thread John Rigby
Wolfgang,

The following changes since commit 3ec53148eb68ddfb0c3311fb4c06cd2bd0ef3eeb:
   Wolfgang Denk (1):
 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

are available in the git repository at:

   git://git.denx.de/u-boot-coldfire master

TsiChung Liew (9):
   ColdFire: Remove linker file
   ColdFire: Modules header files cleanup
   ColdFire: Remove platforms mii.c file
   ColdFire: Relocate FEC's GPIO and mii functions protocols
   ColdFire: Use CFI driver for M5272C3
   ColdFire: Add SBF support for M52277EVB
   ColdFire: Add MCF5301x CPU and M53017EVB support
   ColdFire: Fix compilation error
   ColdFire: Fix M5329EVB and M5373EVB nand issue

  MAINTAINERS|1 +
  MAKEALL|1 +
  Makefile   |   25 +-
  board/BuS/EB+MCF-EV123/Makefile|2 +-
  board/BuS/EB+MCF-EV123/mii.c   |  304 --
  board/cobra5272/Makefile   |2 +-
  board/cobra5272/mii.c  |  303 --
  board/freescale/m52277evb/config.mk|4 +-
  board/freescale/m52277evb/m52277evb.c  |   26 +-
  .../freescale/m52277evb/{u-boot.lds => u-boot.spa} |0
  .../{m5235evb/u-boot.lds => m52277evb/u-boot.stm}  |   20 +-
  board/freescale/m5235evb/Makefile  |2 +-
  board/freescale/m5235evb/mii.c |  307 --
  board/freescale/m5271evb/Makefile  |2 +-
  board/freescale/m5271evb/mii.c |  303 --
  board/freescale/m5272c3/Makefile   |2 +-
  board/freescale/m5272c3/flash.c|  378 
  board/freescale/m5272c3/mii.c  |  303 --
  board/freescale/m5275evb/Makefile  |2 +-
  board/freescale/m5275evb/mii.c |  319 ---
  board/freescale/m5282evb/Makefile  |2 +-
  board/freescale/m5282evb/mii.c |  304 --
  board/freescale/m53017evb/Makefile |   44 ++
  board/freescale/m53017evb/config.mk|   25 +
  board/freescale/m53017evb/m53017evb.c  |   94 +++
  .../freescale/{m54455evb => m53017evb}/u-boot.lds  |6 +-
  board/freescale/m5329evb/Makefile  |2 +-
  board/freescale/m5329evb/mii.c |  306 --
  board/freescale/m5329evb/nand.c|   57 +--
  board/freescale/m5373evb/Makefile  |2 +-
  board/freescale/m5373evb/mii.c |  306 --
  board/freescale/m5373evb/nand.c|   17 +-
  board/freescale/m54451evb/Makefile |2 +-
  board/freescale/m54451evb/mii.c|  303 --
  board/freescale/m54455evb/Makefile |2 +-
  board/freescale/m54455evb/mii.c|  324 ---
  board/freescale/m547xevb/Makefile  |2 +-
  board/freescale/m547xevb/mii.c |  322 ---
  board/freescale/m548xevb/Makefile  |2 +-
  board/freescale/m548xevb/mii.c |  322 ---
  board/idmr/Makefile|2 +-
  board/idmr/mii.c   |  303 --
  cpu/mcf5227x/Makefile  |2 +-
  cpu/mcf5227x/cpu.c |   10 +-
  cpu/mcf5227x/cpu_init.c|   20 +-
  cpu/mcf5227x/dspi.c|  261 +
  cpu/mcf5227x/speed.c   |   30 +-
  cpu/mcf5227x/start.S   |  245 -
  cpu/mcf523x/cpu.c  |4 +-
  cpu/mcf523x/cpu_init.c |   24 +-
  cpu/mcf52x2/cpu_init.c |  349 +--
  cpu/mcf532x/cpu.c  |   25 +-
  cpu/mcf532x/cpu_init.c |  227 +++-
  cpu/mcf532x/speed.c|  119 +++--
  cpu/mcf532x/start.S|   11 +
  cpu/mcf5445x/cpu_init.c|   34 ++-
  cpu/mcf547x_8x/cpu_init.c  |   27 +
  doc/README.m53017evb   |  181 ++
  include/asm-m68k/coldfire/ata.h|   79 +++
  include/asm-m68k/coldfire/dspi.h   |   15 +-
  include/asm-m68k/coldfire/eport.h  |  139 +
  include/asm-m68k/coldfire/flexbus.h|   96 ++--
  include/asm-m68k/coldfire/flexcan.h|  219 +++
  include/asm-m68k/coldfire/intctrl.h|  246 
  include/asm-m68k/coldfire/mdha.h   |  102 
  include

Re: [U-Boot] [PATCH] bootvx: Cleanup & improvements

2008-11-03 Thread Niklaus Giger
Jean-Christophe PLAGNIOL-VILLARD wrote:

> On 10:54 Mon 03 Nov , Niklaus Giger wrote:
>> The following improvements are made:
>> - document bootvx in README
>> - fix size too small by one in sprintf
>> - changed old (pre 2004) device name ibmEmac to emac
>> - boot device may be overriden in board config
>> - servername may be defined in board config
>> - additional parameters may be defined in board config
>> - fixed some line wrappings
>> - changed netstal-common.h to use the new settings
> Could you split your patch a smallest changeset?
How many changeset do you want? Is it sufficient to make two by just isolating 
the changes in netstal-common.h?
<,,.>
>> +#ifndef CONFIG_SYS_VXWORKS_BOOT_DEVICE
>>  #if defined(CONFIG_4xx)
>> -sprintf (build_buf, "ibmEmac(0,0)");
>> +#define CONFIG_SYS_VXWORKS_BOOT_DEVICE "emac(0,0)"
>> +#elif defined(CONFIG_IOP480)
>> +#define CONFIG_SYS_VXWORKS_BOOT_DEVICE "dc(0,0)"
>> +#else
>> +#define CONFIG_SYS_VXWORKS_BOOT_DEVICE "eth(0,0)"
>> +#endif
>> +#endif
> could we move thie define to an header?
Which header shall I use? Is common.h right?

Mmm. Looking at common.h I found that there max is defined with the same 
meaning as in cmd_elf.h. Probably worth a fix too.

Best regards

Niklaus



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


Re: [U-Boot] [patch] U-Boot Firetux board support

2008-11-03 Thread Scott Wood
Jürgen Schöw wrote:
> This seems to be similair to the Steppingstone bootloader from Samsung. This
> SPL is already in the eeprom of the system and will be (hopefully) integrated 
> in the cpu rom mask for the next revision.
> 
> If I see it correct, I have to define the whole parameterset for the NAND
> chip in the configfile rather than let the mtd layer detect it. So I do not
> see any reason to use SPL. But maybe you can point me to the right direction.

OK, a loader in ROM seems like a valid reason to not use nand_spl. :-)

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


Re: [U-Boot] [PATCH] bootvx: Cleanup & improvements

2008-11-03 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:54 Mon 03 Nov , Niklaus Giger wrote:
> The following improvements are made:
> - document bootvx in README
> - fix size too small by one in sprintf
> - changed old (pre 2004) device name ibmEmac to emac
> - boot device may be overriden in board config
> - servername may be defined in board config
> - additional parameters may be defined in board config
> - fixed some line wrappings
> - changed netstal-common.h to use the new settings
Could you split your patch a smallest changeset?
> 
> ---
>  README   |   17 
>  common/cmd_elf.c |   80 
> ++
>  include/configs/netstal-common.h |   29 +++---
>  3 files changed, 69 insertions(+), 57 deletions(-)
> 
> diff --git a/README b/README
> index ebee20f..99d2a3d 100644
> --- a/README
> +++ b/README
> @@ -379,6 +379,23 @@ The following options need to be configured:
>   This define fills in the correct boot CPU in the boot
>   param header, the default value is zero if undefined.
>  
> +- vxWorks boot parameters:
> +
> + bootvx constructs a valid bootline using the following
> + environments variables: bootfile, ipaddr, serverip, hostname.
> + It loads the vxWorks image pointed bootfile.
> +
> + CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name
> + CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address
> + CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server
> +
> + CONFIG_SYS_VXWORKS_ADD_PARAMS
> +
> + Add it at the end of the bootline. E.g "u=username pw=secret"
> +
> + Note: If a "bootargs" environment is defined, it will overwride
> + the defaults discussed just above.
> +
>  - Serial Ports:
>   CONFIG_PL010_SERIAL
>  
> diff --git a/common/cmd_elf.c b/common/cmd_elf.c
> index 3ebb6d9..d537478 100644
> --- a/common/cmd_elf.c
> +++ b/common/cmd_elf.c
> @@ -102,10 +102,8 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, 
> char *argv[])
>   unsigned long bootaddr; /* Address to put the bootline */
>   char *bootline; /* Text of the bootline*/
>   char *tmp;  /* Temporary char pointer  */
> + char build_buf[128];/* Buffer for building the bootline */
>  
> -#if defined(CONFIG_4xx) || defined(CONFIG_IOP480)
> - char build_buf[80]; /* Buffer for building the bootline */
> -#endif
>   /* -- */
>  
>   /*
> @@ -124,7 +122,8 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
> *argv[])
>   if ((argc == 2) && (strcmp (argv[1], "tftp") == 0)) {
>   if (NetLoop (TFTP) <= 0)
>   return 1;
> - printf ("Automatic boot of VxWorks image at address 0x%08lx ... 
> \n", addr);
> + printf ("Automatic boot of VxWorks image at address 0x%08lx ... 
> \n",
> +  addr);
>   }
>  #endif
>  
> @@ -163,54 +162,53 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, 
> char *argv[])
>*/
>  
>   if ((bootline = getenv ("bootargs")) != NULL) {
> - memcpy ((void *) bootaddr, bootline, MAX(strlen(bootline), 
> 255));
> - flush_cache (bootaddr, MAX(strlen(bootline), 255));
> + memcpy ((void *) bootaddr, bootline,
> + MAX (strlen (bootline), 255));
> + flush_cache (bootaddr, MAX (strlen (bootline), 255));
>   } else {
> +
> +#ifndef CONFIG_SYS_VXWORKS_BOOT_DEVICE
>  #if defined(CONFIG_4xx)
> - sprintf (build_buf, "ibmEmac(0,0)");
> +#define  CONFIG_SYS_VXWORKS_BOOT_DEVICE "emac(0,0)"
> +#elif defined(CONFIG_IOP480)
> +#define  CONFIG_SYS_VXWORKS_BOOT_DEVICE "dc(0,0)"
> +#else
> +#define  CONFIG_SYS_VXWORKS_BOOT_DEVICE "eth(0,0)"
> +#endif
> +#endif
could we move thie define to an header?

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


Re: [U-Boot] new board SDRAM conf

2008-11-03 Thread 조기성
Dear stefan.

I Made my board config header, and using yosemite's init.S & u-boot.lds, 
mft.c(Yosemite.c)
Only change config header , but it's not working . 
 
1. First The difference of my SDRAM configuration is 
***  (PPC440EP supported four external DDR_SDRAM Banks.) ***
But Our used only external DDR_SDRAM Bank_0(BANKSEL_0) on the New design Board.

2. Second my config header is 
Include/configs/mft.h

#define CONFIG_440EP1   /* Specific PPC440EP support*/
#define CONFIG_HOSTNAME mft

#define CONFIG_440  1   /* ... PPC440 family*/
#define CONFIG_4xx  1   /* ... PPC4xx family*/
#define CONFIG_SYS_CLK_FREQ /* external freq to pll */

#define CONFIG_BOARD_EARLY_INIT_F 1 /* Call board_early_init_f  */
#define CONFIG_MISC_INIT_R  1   /* call misc_init_r()   */
#define CONFIG_BOARD_RESET  1   /* call board_reset()   */

/*---
 * Base addresses -- Note these are effective addresses where the
 * actual resources get mapped (not physical addresses)
 *--*/
#define CFG_MONITOR_LEN (512 * 1024)/* Reserve 512 kB for Monitor   
*/
#define CFG_MALLOC_LEN  (256 * 1024)/* Reserve 256 kB for malloc()  
*/
#if 1 //steven
#define CFG_MONITOR_BASE(-CFG_MONITOR_LEN)
#else
#define CFG_MONITOR_BASETEXT_BASE
#define CFG_SDRAM_BASE  0x  /* _must_ be 0  */
#define CFG_FLASH_BASE  0xfc00  /* start of FLASH   *

...
/*---
 * DDR SDRAM
 *--*/
#undef CONFIG_SPD_EEPROM   /* Don't use SPD EEPROM for setup*/
#if 0 //steven
#define CFG_KBYTES_SDRAM(128 * 1024)/* 128MB*/
#else
#define CFG_KBYTES_SDRAM(64 * 1024)/* 128MB */
#endif
#if 1 //steven
#define CFG_SDRAM_BANKS (2)
#else
#define CFG_SDRAM_BANKS (1)
#endif

define CONFIG_SDRAM_BANK0  1
_



The difference of your SDRAM configuration?
>>> 


Best Regards.
Steven

-Original Message-
From: Stefan Roese [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 03, 2008 4:47 PM
To: u-boot@lists.denx.de; [EMAIL PROTECTED]
Subject: Re: [U-Boot] new board SDRAM conf

On Monday 03 November 2008, 조기성 wrote:
> I’m using ppc440Ep and using u-boot1.3.3
>
>  I’m using u-boot1.1.3 with Yosemite configuration.

Please use the latest version from the DENX git repository.

> When I boot with Yosemite conf , it stops SDRAM:256 , it’ shows cpu, pci
> conf

So it most likely crashed upon relocation into SDRAM. So its an SDRAM 
configuration problem.

> My New Board configuration is only different SDRAM Size and Flash Size.
>
>
> Where can I modify my Yosemite configuration.
>
> Init.S and Yosemite.h

Yosemite uses a board specific SDRAM init routine. I suggest that you use the 
common DDR2 init code by enabling it in your board config header 
(include/configs/board.h):

#define CONFIG_SDRAM_BANK0  1   /* init onboard DDR SDRAM bank 0*/

You can also define CONFIG_SYS_SDRAM_TABLE if you have an uncommon SDRAM 
configuration. What's the difference of your SDRAM configuration? 

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] Initial support for Nomadik 8815 development board

2008-11-03 Thread Jean-Christophe PLAGNIOL-VILLARD
On 09:56 Mon 03 Nov , Alessandro Rubini wrote:
> 
> > This is the initial port, with basic infrastructure and
> > a working serial port.
> 
> While rebasing in order to add drivers, I found I have whitespace and
> other stilistic errors. I'll post a fixed patch this night with those
> details fixed.
btw please fix all 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] bootvx: Cleanup & improvements

2008-11-03 Thread Jean-Christophe PLAGNIOL-VILLARD
On 19:59 Mon 03 Nov , Niklaus Giger wrote:
> Jean-Christophe PLAGNIOL-VILLARD wrote:
> 
> > On 10:54 Mon 03 Nov , Niklaus Giger wrote:
> >> The following improvements are made:
> >> - document bootvx in README
> >> - fix size too small by one in sprintf
> >> - changed old (pre 2004) device name ibmEmac to emac
> >> - boot device may be overriden in board config
> >> - servername may be defined in board config
> >> - additional parameters may be defined in board config
> >> - fixed some line wrappings
> >> - changed netstal-common.h to use the new settings
> > Could you split your patch a smallest changeset?
> How many changeset do you want? Is it sufficient to make two by just 
> isolating the changes in netstal-common.h?
> <,,.>
> >> +#ifndef CONFIG_SYS_VXWORKS_BOOT_DEVICE
> >>  #if defined(CONFIG_4xx)
> >> -  sprintf (build_buf, "ibmEmac(0,0)");
> >> +#define   CONFIG_SYS_VXWORKS_BOOT_DEVICE "emac(0,0)"
> >> +#elif defined(CONFIG_IOP480)
> >> +#define   CONFIG_SYS_VXWORKS_BOOT_DEVICE "dc(0,0)"
> >> +#else
> >> +#define   CONFIG_SYS_VXWORKS_BOOT_DEVICE "eth(0,0)"
> >> +#endif
> >> +#endif
> > could we move thie define to an header?
> Which header shall I use? Is common.h right?
> 
> Mmm. Looking at common.h I found that there max is defined with the same 
> meaning as in cmd_elf.h. Probably worth a fix too.
> 
Maybe wxvorks.h

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


Re: [U-Boot] CFI: flash_write_cfiword() slow

2008-11-03 Thread Wolfgang Denk
Dear Jens Gehrlein,

In message <[EMAIL PROTECTED]> you wrote:
> 
> find_sector() loops through the sector table from the last sector to
> the current sector. And the more sectors the device has, the slower
> the algorithm becomes. And this process for every sector to be 
> programmed. And yes, there are still devices around without (standard) 
> write buffer, e.g. the Samsung K8P2815UQB.

A classic (and  trivial  to  implement)  approach  is  not  to  start
searching  at  the  end, but at the last used sector (assuming search
driection and direction of "growth" are  identical).  This  way,  you
will  typically  find  the  match either immediately or with a single
step.

Maybe you want to give that a try...

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 verbal contract isn't worth the paper it's written on.
-- Samuel Goldwyn
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Building u-boot for the AT91RM9200-EK circa 2008

2008-11-03 Thread Wolfgang Denk
Dear Martin Hejnfelt,

In message <[EMAIL PROTECTED]> you wrote:
>
> > Why do you have to use this at all? Isn't the flash CFI conformant so
> > the generic CFI flash driver would work?
...
> I must say, I'm still really new to U-boot so I'm not sure if I my 
> answer is the best method. The flash circuit is CFI compatible, but 
> since I used the already made AT91RM9200 files and modified these, I 
> found the problem easily and solved it this way. I will probably hit 
> myself in the head in some months when my skills have improved :)

The thing is: we will not accept any such (new) code for mainline. Anc
switching to using the CFI driver is trivial.

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]
Just because your doctor has a name for your condition  doesn't  mean
he knows what it is.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] bootvx: Cleanup & improvements

2008-11-03 Thread Wolfgang Denk
Dear Niklaus Giger,

In message <[EMAIL PROTECTED]> you wrote:
>
> >> The following improvements are made:
> >> - document bootvx in README
> >> - fix size too small by one in sprintf
> >> - changed old (pre 2004) device name ibmEmac to emac
> >> - boot device may be overriden in board config
> >> - servername may be defined in board config
> >> - additional parameters may be defined in board config
> >> - fixed some line wrappings
> >> - changed netstal-common.h to use the new settings
> > Could you split your patch a smallest changeset?
> How many changeset do you want? Is it sufficient to make two by just 
> isolating the changes in netstal-common.h?

Please see http://www.denx.de/wiki/U-Boot/Patches:

Changes that contain different, unrelated modifications shall
be submitted as separate patches, one patch per changeset. 

> >> +#ifndef CONFIG_SYS_VXWORKS_BOOT_DEVICE
> >>  #if defined(CONFIG_4xx)
> >> -  sprintf (build_buf, "ibmEmac(0,0)");
> >> +#define   CONFIG_SYS_VXWORKS_BOOT_DEVICE "emac(0,0)"
> >> +#elif defined(CONFIG_IOP480)
> >> +#define   CONFIG_SYS_VXWORKS_BOOT_DEVICE "dc(0,0)"
> >> +#else
> >> +#define   CONFIG_SYS_VXWORKS_BOOT_DEVICE "eth(0,0)"
> >> +#endif
> >> +#endif
> > could we move thie define to an header?
> Which header shall I use? Is common.h right?

For VxWorks boot device names? Not really. vxworks.h ?

> Mmm. Looking at common.h I found that there max is defined with the same 
> meaning as in cmd_elf.h. Probably worth a fix too.

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]
The universe contains any amount of horrible ways  to  be  woken  up,
such as the noise of the mob breaking down the front door, the scream
of fire engines, or the realization that today is the Monday which on
Friday night was a comfortably long way off.
 - Terry Pratchett, _Moving Pictures_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/13 v5] ARM: OMAP3: Add support for some of TIs ARM-Cortex A8 OMAP3 boards

2008-11-03 Thread Dirk Behme
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 19:34 Sun 02 Nov , [EMAIL PROTECTED] wrote:
> 
>>Subject: [PATCH 00/13 v5] ARM: OMAP3: Add support for some of TIs ARM-Cortex 
>>A8 OMAP3 boards
>>
>>This patch series adds U-Boot v1 support for some of TI's ARM-Cortex A8 based 
>>OMAP3 boards. These are BeagleBoard [1][2], EVM [3] and Overo [4].
>>
>>The patch series is based on U-Boot tar ball [5] for BeagleBoard and EVM done 
>>by several TI employees.
>>
>>To be able to easily add new boards, most of the code is common for all 
>>boards. After the header files (patches 1-2) and the common code for ARM 
>>Cortex A8 (patch 3) and OMAP3 SoC (patches 4-6), support and drivers for 
>>NAND, MMC and I2C is added (patches 7-9). Patches 10-12 introduce the 
>>individual board support for Beagle, EVM and Overo, and last patch 13 the 
>>config files for these boards. 
>>
>>As discussed earlier on this list, we compile for armv5 to be compatible with 
>>existing toolchains.
>>
>>This patch adds ~300k of new code.
>>
>>Thanks to
>>
>>Steve Sakoman <[EMAIL PROTECTED]>
>>Pillai, Manikandan <[EMAIL PROTECTED]>
>>Syed Mohammed, Khasim <[EMAIL PROTECTED]>
>>Nishanth Menon <[EMAIL PROTECTED]>
>>
>>and all others who helped with this.
> 
> 
> As planned patch set applied to omap3 branch

Thanks!

Will start the next days to send style patches for the old and new 
comments (thanks!). I heard that some people prepare patches for fixes 
and new features, too.

Regards

Dirk

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


Re: [U-Boot] [PATCH 09/13 v5] ARM: OMAP3: Add I2C support

2008-11-03 Thread Dirk Behme
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 19:38 Sun 02 Nov , [EMAIL PROTECTED] wrote:
> 
>>Subject: [PATCH 09/13 v5] ARM: OMAP3: Add I2C support
>>
>>From: Dirk Behme <[EMAIL PROTECTED]>
>>
>>Add I2C support
>>
>>Signed-off-by: Dirk Behme <[EMAIL PROTECTED]>
>>
>>---
>>Changes in version v5:
>>
>>- Split functional changes and coding style clean up as proposed by 
>>Jean-Christophe PLAGNIOL-VILLARD.
>>
>>Changes in version v2:
>>
>>- Remove SMC911X network init as proposed by Ben Warren. Thanks!
>>
>> drivers/i2c/Makefile   |1 +
>> drivers/i2c/omap24xx_i2c.c |   24 
>> 2 files changed, 25 insertions(+)
>>
>>Index: u-boot-main/drivers/i2c/Makefile
>>===
>>--- u-boot-main.orig/drivers/i2c/Makefile
>>+++ u-boot-main/drivers/i2c/Makefile
>>@@ -29,6 +29,7 @@ COBJS-$(CONFIG_FSL_I2C) += fsl_i2c.o
>> COBJS-$(CONFIG_I2C_MXC) += mxc_i2c.o
>> COBJS-$(CONFIG_DRIVER_OMAP1510_I2C) += omap1510_i2c.o
>> COBJS-$(CONFIG_DRIVER_OMAP24XX_I2C) += omap24xx_i2c.o
>>+COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += omap24xx_i2c.o
>> COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
>> COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
>> 
>>Index: u-boot-main/drivers/i2c/omap24xx_i2c.c
>>===
>>--- u-boot-main.orig/drivers/i2c/omap24xx_i2c.c
>>+++ u-boot-main/drivers/i2c/omap24xx_i2c.c
>>@@ -25,6 +25,8 @@
>> #include 
>> #include 
>> 
>>+#define inb(a) __raw_readb(a)
>>+#define outb(a, v) __raw_writeb(a, v)
>> #define inw(a) __raw_readw(a)
>> #define outw(a,v) __raw_writew(a,v)
> 
> This 4 macro is supposed to be defined in io.h

Even if I have to touch a global/common file for this?

>> 
>>@@ -112,7 +114,11 @@ static int i2c_read_byte (u8 devaddr, u8
>> 
>>  status = wait_for_pin ();
>>  if (status & I2C_STAT_RRDY) {
>>+#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
>>+ *value = inb(I2C_DATA);
> 
> please respect the file style, add a space before '('
> and so on

You prefer file style over global coding style? As I understand it 
"inb(" is global coding style, and I tried to be in sync with global 
coding style at least with code I add.

>>+#else
>>  *value = inw (I2C_DATA);
>>+#endif
>>  udelay (2);
> 
> Best Regards,
> J.
> 

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


Re: [U-Boot] [PATCH 03/13 v5] ARM: OMAP3: Add ARM Cortex A8 common directory

2008-11-03 Thread Dirk Behme
Wolfgang Denk wrote:
> Dear [EMAIL PROTECTED],
> 
> In message <[EMAIL PROTECTED]> you wrote:
> 
>>--===1314021165==
>>
>>From: Dirk Behme <[EMAIL PROTECTED]>
>>
>>Add ARM Cortex A8 common directory
>>
>>Signed-off-by: Dirk Behme <[EMAIL PROTECTED]>
> 
> ...
> 
> 
>>+static void cp_delay(void)
>>+{
>>+ volatile int i;
>>+
>>+ /* Many OMAP regs need at least 2 nops */
>>+ for (i = 0; i < 100; i++) ;
> 
> 
> There is not much reason for the compiler not to optimize  this  code
> away.
> 
> 
>>+void icache_disable(void)
>>+{
>>+ ulong reg;
>>+
>>+ reg = read_p15_c1();
>>+ cp_delay();
>>+ write_p15_c1(reg & ~C1_IC);
>>+}
>>+
>>+void dcache_disable (void)
>>+{
>>+ ulong reg;
>>+
>>+ reg = read_p15_c1 ();
>>+ cp_delay ();
>>+ write_p15_c1 (reg & ~C1_DC);
>>+}
> 
> 
> Would it make sense to flush caches before disbling?

Basically yes. But regarding the logic used in existing code, e.g.

cpu/arm1176/cpu.c (cleanup_before_linux())

I'm not sure about this. The logic seems to be to provide single 
functions for each cache operation and then call the functions in the 
correct order.

>>+ /* someone ought to write a more effiction fiq_save_user_regs */
> 
> 
> effiction ? 
> 
> 
> Best regards,
> 
> Wolfgang Denk
> 

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


[U-Boot] [PATCH 1/4]v2: Document CONFIG_SYS parameters for vxworks

2008-11-03 Thread Niklaus Giger
The following improvements are made and tested on my HCUx boards:

README
- document bootvx and CONFIG_SYS_VXWORKS parameters

vxworks.h
- add new vxworks.h with some default definitions

cmd_elf.c
- fix size too small by one in sprintf
- changed old (pre 2004) device name ibmEmac to emac
- boot device may be overriden in board config
- servername may be defined in board config
- additional parameters may be defined in board config
- fixed some line wrappings
- replaced  redundant MAX define by max

netstal-common.h
use new  CONFIG_SYS_VXWORKS parameters

Signed-off-by: Niklaus Giger <[EMAIL PROTECTED]>
---
 README |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/README b/README
index ebee20f..10c2cec 100644
--- a/README
+++ b/README
@@ -379,6 +379,24 @@ The following options need to be configured:
This define fills in the correct boot CPU in the boot
param header, the default value is zero if undefined.

+- vxWorks boot parameters:
+
+   bootvx constructs a valid bootline using the following
+   environments variables: bootfile, ipaddr, serverip, hostname.
+   It loads the vxWorks image pointed bootfile.
+
+   CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name
+   CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address
+   CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server
+   CONFIG_SYS_VXWORKS_BOOT_ADDR - Address of boot parameters
+
+   CONFIG_SYS_VXWORKS_ADD_PARAMS
+
+   Add it at the end of the bootline. E.g "u=username pw=secret"
+
+   Note: If a "bootargs" environment is defined, it will overwride
+   the defaults discussed just above.
+
 - Serial Ports:
CONFIG_PL010_SERIAL

--
1.6.0.2


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


[U-Boot] [PATCH 2/4]v2: Add vxworks.h to handle CONFIG_SYS_VXWORKS parameters

2008-11-03 Thread Niklaus Giger

Signed-off-by: Niklaus Giger <[EMAIL PROTECTED]>
---
 include/vxworks.h |   53 
+
 1 files changed, 53 insertions(+), 0 deletions(-)
 create mode 100644 include/vxworks.h

diff --git a/include/vxworks.h b/include/vxworks.h
new file mode 100644
index 000..548e8e8
--- /dev/null
+++ b/include/vxworks.h
@@ -0,0 +1,53 @@
+/*
+ * (C) Copyright 2008
+ * Niklaus Giger, [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
+ */
+
+#ifndef _VXWORKS_H_
+#define _VXWORKS_H_
+
+int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+
+/*
+ * Use bootaddr to find the location in memory that VxWorks
+ * will look for the bootline string. The default value for
+ * PowerPC is LOCAL_MEM_LOCAL_ADRS + BOOT_LINE_OFFSET which
+ * defaults to 0x4200
+ */
+#ifndef CONFIG_SYS_VXWORKS_BOOT_ADDR
+#define CONFIG_SYS_VXWORKS_BOOT_ADDR 0x4200
+#endif
+
+#ifndef CONFIG_SYS_VXWORKS_BOOT_DEVICE
+#if defined(CONFIG_4xx)
+#defineCONFIG_SYS_VXWORKS_BOOT_DEVICE "emac(0,0)"
+#elif defined(CONFIG_IOP480)
+#defineCONFIG_SYS_VXWORKS_BOOT_DEVICE "dc(0,0)"
+#else
+#defineCONFIG_SYS_VXWORKS_BOOT_DEVICE "eth(0,0)"
+#endif
+#endif
+
+#ifndef CONFIG_SYS_VXWORKS_SERVERNAME
+#define CONFIG_SYS_VXWORKS_SERVERNAME srv
+#endif
+
+#endif
--
1.6.0.2


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


[U-Boot] [PATCH 3/4]v2: Cleanup bootvx and handle new CONFIG_SYS_VXWORKS parameters

2008-11-03 Thread Niklaus Giger
Signed-off-by: Niklaus Giger <[EMAIL PROTECTED]>
---
 common/cmd_elf.c |   81 --
 1 files changed, 30 insertions(+), 51 deletions(-)

diff --git a/common/cmd_elf.c b/common/cmd_elf.c
index 3ebb6d9..27a4b73 100644
--- a/common/cmd_elf.c
+++ b/common/cmd_elf.c
@@ -18,15 +18,12 @@
 #include 
 #include 
 #include 
+#include 

 #if defined(CONFIG_WALNUT) || defined(CONFIG_SYS_VXWORKS_MAC_PTR)
 DECLARE_GLOBAL_DATA_PTR;
 #endif

-#ifndef MAX
-#define MAX(a,b) ((a) > (b) ? (a) : (b))
-#endif
-
 int valid_elf_image (unsigned long addr);
 unsigned long load_elf_image (unsigned long addr);

@@ -102,13 +99,10 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
unsigned long bootaddr; /* Address to put the bootline */
char *bootline; /* Text of the bootline*/
char *tmp;  /* Temporary char pointer  */
+   char build_buf[128];/* Buffer for building the bootline */

-#if defined(CONFIG_4xx) || defined(CONFIG_IOP480)
-   char build_buf[80]; /* Buffer for building the bootline */
-#endif
-   /* -- */
-
-   /*
+   /* ---
+*
 * Check the loadaddr variable.
 * If we don't know where the image is then we're done.
 */
@@ -124,7 +118,8 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
if ((argc == 2) && (strcmp (argv[1], "tftp") == 0)) {
if (NetLoop (TFTP) <= 0)
return 1;
-   printf ("Automatic boot of VxWorks image at address 0x%08lx ... 
\n", addr);
+   printf ("Automatic boot of VxWorks image at address 0x%08lx ... 
\n",
+addr);
}
 #endif

@@ -152,7 +147,7 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 */

if ((tmp = getenv ("bootaddr")) == NULL)
-   bootaddr = 0x4200;
+   bootaddr = CONFIG_SYS_VXWORKS_BOOT_ADDR;
else
bootaddr = simple_strtoul (tmp, NULL, 16);

@@ -163,54 +158,40 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[])
 */

if ((bootline = getenv ("bootargs")) != NULL) {
-   memcpy ((void *) bootaddr, bootline, MAX(strlen(bootline), 
255));
-   flush_cache (bootaddr, MAX(strlen(bootline), 255));
+   memcpy ((void *) bootaddr, bootline,
+   max (strlen (bootline), 255));
+   flush_cache (bootaddr, max (strlen (bootline), 255));
} else {
-#if defined(CONFIG_4xx)
-   sprintf (build_buf, "ibmEmac(0,0)");

-   if ((tmp = getenv ("hostname")) != NULL) {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   "host:%s ", tmp);
+
+   sprintf (build_buf, CONFIG_SYS_VXWORKS_BOOT_DEVICE);
+   if ((tmp = getenv ("bootfile")) != NULL) {
+   sprintf (&build_buf[strlen (build_buf)],
+"%s:%s ", CONFIG_SYS_VXWORKS_SERVERNAME, tmp);
} else {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   ": ");
+   sprintf (&build_buf[strlen (build_buf)],
+"%s:file ", CONFIG_SYS_VXWORKS_SERVERNAME);
}

if ((tmp = getenv ("ipaddr")) != NULL) {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   "e=%s ", tmp);
+   sprintf (&build_buf[strlen (build_buf)], "e=%s ", tmp);
}
-   memcpy ((void *)bootaddr, build_buf, MAX(strlen(build_buf), 
255));
-   flush_cache (bootaddr, MAX(strlen(build_buf), 255));
-#elif defined(CONFIG_IOP480)
-   sprintf (build_buf, "dc(0,0)");

-   if ((tmp = getenv ("hostname")) != NULL) {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   "host:%s ", tmp);
-   } else {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   ": ");
+   if ((tmp = getenv ("serverip")) != NULL) {
+   sprintf (&build_buf[strlen (build_buf)], "h=%s ", tmp);
}

-   if ((tmp = getenv ("ipaddr")) != NULL) {
-   sprintf (&build_buf[strlen (build_buf - 1)],
-   "e=%s ", tmp);
+   if ((tmp = getenv ("hostname")) != NULL) {
+   sprintf (&build_buf[strlen (build_buf)], "tn=%s ", tmp);
}
-   memcpy ((void *) bootaddr, build_buf, MAX(strlen(build_buf), 
255));
-   flush_cache (bootaddr, MAX(strlen(build_buf), 255));
-#else
-

[U-Boot] Undefined reference to `boot_relocate_fdt'

2008-11-03 Thread Juan Pablo Gómez
His I'm trying to build u-boot for a xupv2p board, but with the newest
version this is appearing during the make :
*
$make xupv2p_config
$make*

-Map u-boot.map -o u-boot
common/libcommon.a(cmd_bootm.o): In function `do_bootm_subcommand':
/home/juanwalker/software/projects/u-boot/common/cmd_bootm.c:505: undefined
reference to `boot_relocate_fdt'
make: *** [u-boot] Error 1



-- 
Regards, Juan Pablo

Muchas gracias.

Atentamente, Juan Pablo Gómez
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/4]v2: Use new CONFIG_SYS_VXWORKS parameters for Netstal boards

2008-11-03 Thread Niklaus Giger

Signed-off-by: Niklaus Giger <[EMAIL PROTECTED]>
---
 include/configs/netstal-common.h |   29 ++---
 1 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/include/configs/netstal-common.h b/include/configs/netstal-common.h
index 1fa4b00..7f2b015 100644
--- a/include/configs/netstal-common.h
+++ b/include/configs/netstal-common.h
@@ -201,8 +201,9 @@
 #define CONFIG_ETHADDR  00:60:13:00:00:00   /* Netstal Machines AG MAC */
 #define CONFIG_OVERWRITE_ETHADDR_ONCE

-#define CONFIG_SYS_TFTP_LOADADDR 0x0100
-
+#define CONFIG_SYS_TFTP_LOADADDR   0x0100
+#define CONFIG_SYS_VXWORKS_ADD_PARAMS  "u=dpu pw=netstal8752"
+#define CONFIG_SYS_VXWORKS_SERVERNAME  "c"
 /*
  * General common environment variables shared by all boards produced by 
Netstal Maschinen
  */
@@ -222,19 +223,17 @@
"fdt_addr_r=80\0"   \
"hostname=" xstr(CONFIG_HOSTNAME) "\0"  \
"bootfile=" xstr(CONFIG_HOSTNAME) "/uImage\0"   \
-   "load=tftp 20 " xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"   \
-   "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " ;"
\
-   "era " xstr(CONFIG_SYS_MONITOR_BASE) " ;"   
\
-   "cp.b ${fileaddr} " xstr(CONFIG_SYS_MONITOR_BASE) " 
${filesize};" \
-   "setenv filesize\0" \
-   "upd=run load update\0" \
-   "vx_rom=" xstr(CONFIG_HOSTNAME) "/" \
-   xstr(CONFIG_HOSTNAME) "_vx_rom\0"   \
-   "vx=tftp " xstr(CONFIG_SYS_TFTP_LOADADDR) " ${vx_rom};run vxargs;"  
\
-   "bootvx\0"  \
-   "vxargs=setenv bootargs emac(0,0)c:${vx_rom} e=${ipaddr}"   \
-   " h=${serverip} u=dpu pw=netstal8752 "  \
-   "tn=" xstr(CONFIG_HOSTNAME) " f=0x3008\0"   \
+   "uload=tftp " xstr(CONFIG_SYS_TFTP_LOADADDR) " "\
+   xstr(CONFIG_HOSTNAME) "/u-boot.bin\0"   \
+   "vx_rom=" xstr(CONFIG_HOSTNAME) "/" \
+   xstr(CONFIG_HOSTNAME) "_vx_rom\0"   \
+   "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE) " ;"\
+   "era " xstr(CONFIG_SYS_MONITOR_BASE) " ;"   \
+   "cp.b ${fileaddr} "xstr(CONFIG_SYS_MONITOR_BASE)\
+   " ${filesize}; setenv filesize\0"   \
+   "upd=run uload update\0"\
+   "vx=setenv bootfile ${vx_rom}; tftp "   \
+   xstr(CONFIG_SYS_TFTP_LOADADDR) "; bootvx\0" \
CONFIG_NETSTAL_DEF_ENV_ROOTPATH

 /*
--
1.6.0.2


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


Re: [U-Boot] Building u-boot for the AT91RM9200-EK circa 2008

2008-11-03 Thread Pink Boy

Wolfgang Denk sez,

> The thing is: we will not accept any such (new) code for
> mainline. And switching to using the CFI driver is trivial.

Okay so what I've learned.

1)You can build the AT91RM9200DK version of u-boot with u-boot-1.3.4
and it works.  At least I got a prompt.  So one can use the 
AT91RM9200DK as a starting point for the AT91RM9200EK.

2) At this point I think relying on any older patched version of
u-boot that supports the AT91RM9200EK is probably not workable and
not worth doing.

3) Anyone starting a project based on the AT91RM9200EK is making 
big mistake because the AT91RM9200 chip has been abandoned by its
mother.

At least I have I have some sort of peg in the ground to
start with.  Right now I worry about trying to get the CFI to
work because as a noob I'm in the dark on a lot of things 

1) How to port the CFI to the AT91RM9200DK.
2) Create a board support for the AT91RM9200EK based on that.
3) Generate patches that are acceptable.

Personally I think that Atmel is doing people a disservice by 
not classifying the AT91RM9200 as not for new designs since 
there is no current support for it.

Matthew Harper.
Tehama Wireless.

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


[U-Boot] [PATCH] powerpc: change 86xx SMP boot method

2008-11-03 Thread Becky Bruce
We put the bootpg for the secondary cpus into memory and use
BPTR to get to it.  This is a step towards converting to the
ePAPR boot methodology.  Also, the code is written to
deal properly with more than 4GB of RAM.

Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>
---
 cpu/mpc86xx/Makefile  |4 +
 cpu/mpc86xx/cpu_init.c|4 +
 cpu/mpc86xx/fdt.c |   21 +
 cpu/mpc86xx/mp.c  |   68 
 cpu/mpc86xx/mp.h  |7 ++
 cpu/mpc86xx/release.S |  169 +
 cpu/mpc86xx/start.S   |   77 +--
 include/configs/MPC8610HPCD.h |7 ++
 include/configs/MPC8641HPCN.h |7 ++
 include/configs/sbc8641d.h|7 ++
 10 files changed, 298 insertions(+), 73 deletions(-)
 create mode 100644 cpu/mpc86xx/mp.c
 create mode 100644 cpu/mpc86xx/mp.h
 create mode 100644 cpu/mpc86xx/release.S

diff --git a/cpu/mpc86xx/Makefile b/cpu/mpc86xx/Makefile
index a9767ad..34a9755 100644
--- a/cpu/mpc86xx/Makefile
+++ b/cpu/mpc86xx/Makefile
@@ -31,6 +31,10 @@ LIB  = $(obj)lib$(CPU).a
 START  = start.o
 SOBJS  = cache.o
 
+ifneq ($(CONFIG_NUM_CPUS),1)
+COBJS-y += mp.o
+SOBJS += release.o
+endif
 COBJS-y+= traps.o
 COBJS-y+= cpu.o
 COBJS-y+= cpu_init.o
diff --git a/cpu/mpc86xx/cpu_init.c b/cpu/mpc86xx/cpu_init.c
index 4ab88f0..06f179c 100644
--- a/cpu/mpc86xx/cpu_init.c
+++ b/cpu/mpc86xx/cpu_init.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include "mp.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -121,6 +122,9 @@ void cpu_init_f(void)
  */
 int cpu_init_r(void)
 {
+#if (CONFIG_NUM_CPUS > 1)
+   setup_mp();
+#endif
return 0;
 }
 
diff --git a/cpu/mpc86xx/fdt.c b/cpu/mpc86xx/fdt.c
index 1fef94f..3adfad9 100644
--- a/cpu/mpc86xx/fdt.c
+++ b/cpu/mpc86xx/fdt.c
@@ -9,9 +9,17 @@
 #include 
 #include 
 #include 
+#include "mp.h"
+
+DECLARE_GLOBAL_DATA_PTR;
 
 void ft_cpu_setup(void *blob, bd_t *bd)
 {
+#if (CONFIG_NUM_CPUS > 1)
+   int off;
+   u32 bootpg;
+#endif
+
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
 "timebase-frequency", bd->bi_busfreq / 4, 1);
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
@@ -32,4 +40,17 @@ void ft_cpu_setup(void *blob, bd_t *bd)
do_fixup_by_compat_u32(blob, "ns16550",
   "clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
 #endif
+
+#if (CONFIG_NUM_CPUS > 1)
+   /* if we have 4G or more of memory, put the boot page at 4Gb-1M */
+   if (gd->ram_size > 0xf000)
+   bootpg = 0xfff0;
+   else
+   bootpg = gd->ram_size - (1024 * 1024);
+
+   /* Reserve the boot page so OSes dont use it */
+   off = fdt_add_mem_rsv(blob, bootpg, (u64)4096);
+   if (off < 0)
+   printf("%s: %s\n", __FUNCTION__, fdt_strerror(off));
+#endif
 }
diff --git a/cpu/mpc86xx/mp.c b/cpu/mpc86xx/mp.c
new file mode 100644
index 000..5014401
--- /dev/null
+++ b/cpu/mpc86xx/mp.c
@@ -0,0 +1,68 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "mp.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#if (CONFIG_NUM_CPUS > 1)
+void cpu_mp_lmb_reserve(struct lmb *lmb)
+{
+   u32 bootpg;
+
+   /* if we have 4G or more of memory, put the boot page at 4Gb-1M */
+   if ((u64)gd->ram_size > 0xf000)
+   bootpg = 0xfff0;
+   else
+   bootpg = gd->ram_size - (1024 * 1024);
+
+   /* tell u-boot we stole a page */
+   lmb_reserve(lmb, bootpg, 4096);
+}
+
+/*
+ * Copy the code for other cpus to execute into an
+ * aligned location accessible via BPTR
+ */
+void setup_mp(void)
+{
+   extern ulong __secondary_start_page;
+   ulong fixup = (ulong)&__secondary_start_page;
+   u32 bootpg;
+   u32 bootpg_va;
+
+   /*
+* If we have 4G or more of memory, put the boot page at 4Gb-1M.
+* Otherwise, put it at the very end of RAM.
+*/
+   if (gd->ram_size > 0xf000)
+   bootpg = 0xfff0;
+   else
+   bootpg = gd->ram_size - (1024 * 1024);
+
+   if (bootpg >= CONFIG_SYS_MAX_DDR_BAT_SIZE) {
+   /* We're not covered by the DDR mapping, set up BAT  */
+   write_bat(DBAT7, CONFIG_SYS_SCRATCH_VA | BATU_BL_128K |
+ BATU_VS | BATU_VP,
+ bootpg | BATL_PP_RW | BATL_MEMCOHERENCE);
+   bootpg_va = CONFIG_SYS_SCRATCH_VA;
+   } else {
+   bootpg_va = bootpg;
+   }
+
+   memcpy((void *)bootpg_va, (void *)fixup, 4096);
+   flush_cache(bootpg_va, 4096);
+
+   /* remove the temporary BAT mapping */
+   if (bootpg >= CONFIG_SYS_MAX_DDR_BAT_SIZE)
+   write_bat(DBAT7, 0, 0);
+
+   /* If the physical location of bootpg is not at fff0, set BPTR */
+   if (bootpg != 0xfff0)
+   out_be32((uint *)(CONFIG_SYS_CCSRBAR + 0x20), 0x8000 |
+(

[U-Boot] [PATCH V2] powerpc: change 86xx SMP boot method

2008-11-03 Thread Becky Bruce
We put the bootpg for the secondary cpus into memory and use
BPTR to get to it.  This is a step towards converting to the
ePAPR boot methodology.  Also, the code is written to
deal properly with more than 4GB of RAM.

Signed-off-by: Becky Bruce <[EMAIL PROTECTED]>
---
 cpu/mpc86xx/Makefile  |4 +
 cpu/mpc86xx/cpu_init.c|4 +
 cpu/mpc86xx/fdt.c |   21 +
 cpu/mpc86xx/mp.c  |   68 
 cpu/mpc86xx/mp.h  |7 ++
 cpu/mpc86xx/release.S |  169 +
 cpu/mpc86xx/start.S   |   77 +--
 include/configs/MPC8610HPCD.h |7 ++
 include/configs/MPC8641HPCN.h |7 ++
 include/configs/sbc8641d.h|7 ++
 10 files changed, 298 insertions(+), 73 deletions(-)
 create mode 100644 cpu/mpc86xx/mp.c
 create mode 100644 cpu/mpc86xx/mp.h
 create mode 100644 cpu/mpc86xx/release.S

diff --git a/cpu/mpc86xx/Makefile b/cpu/mpc86xx/Makefile
index a9767ad..34a9755 100644
--- a/cpu/mpc86xx/Makefile
+++ b/cpu/mpc86xx/Makefile
@@ -31,6 +31,10 @@ LIB  = $(obj)lib$(CPU).a
 START  = start.o
 SOBJS  = cache.o
 
+ifneq ($(CONFIG_NUM_CPUS),1)
+COBJS-y += mp.o
+SOBJS += release.o
+endif
 COBJS-y+= traps.o
 COBJS-y+= cpu.o
 COBJS-y+= cpu_init.o
diff --git a/cpu/mpc86xx/cpu_init.c b/cpu/mpc86xx/cpu_init.c
index 4ab88f0..06f179c 100644
--- a/cpu/mpc86xx/cpu_init.c
+++ b/cpu/mpc86xx/cpu_init.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include "mp.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -121,6 +122,9 @@ void cpu_init_f(void)
  */
 int cpu_init_r(void)
 {
+#if (CONFIG_NUM_CPUS > 1)
+   setup_mp();
+#endif
return 0;
 }
 
diff --git a/cpu/mpc86xx/fdt.c b/cpu/mpc86xx/fdt.c
index 1fef94f..3adfad9 100644
--- a/cpu/mpc86xx/fdt.c
+++ b/cpu/mpc86xx/fdt.c
@@ -9,9 +9,17 @@
 #include 
 #include 
 #include 
+#include "mp.h"
+
+DECLARE_GLOBAL_DATA_PTR;
 
 void ft_cpu_setup(void *blob, bd_t *bd)
 {
+#if (CONFIG_NUM_CPUS > 1)
+   int off;
+   u32 bootpg;
+#endif
+
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
 "timebase-frequency", bd->bi_busfreq / 4, 1);
do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
@@ -32,4 +40,17 @@ void ft_cpu_setup(void *blob, bd_t *bd)
do_fixup_by_compat_u32(blob, "ns16550",
   "clock-frequency", CONFIG_SYS_NS16550_CLK, 1);
 #endif
+
+#if (CONFIG_NUM_CPUS > 1)
+   /* if we have 4G or more of memory, put the boot page at 4Gb-1M */
+   if (gd->ram_size > 0xf000)
+   bootpg = 0xfff0;
+   else
+   bootpg = gd->ram_size - (1024 * 1024);
+
+   /* Reserve the boot page so OSes dont use it */
+   off = fdt_add_mem_rsv(blob, bootpg, (u64)4096);
+   if (off < 0)
+   printf("%s: %s\n", __FUNCTION__, fdt_strerror(off));
+#endif
 }
diff --git a/cpu/mpc86xx/mp.c b/cpu/mpc86xx/mp.c
new file mode 100644
index 000..5014401
--- /dev/null
+++ b/cpu/mpc86xx/mp.c
@@ -0,0 +1,68 @@
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "mp.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#if (CONFIG_NUM_CPUS > 1)
+void cpu_mp_lmb_reserve(struct lmb *lmb)
+{
+   u32 bootpg;
+
+   /* if we have 4G or more of memory, put the boot page at 4Gb-1M */
+   if ((u64)gd->ram_size > 0xf000)
+   bootpg = 0xfff0;
+   else
+   bootpg = gd->ram_size - (1024 * 1024);
+
+   /* tell u-boot we stole a page */
+   lmb_reserve(lmb, bootpg, 4096);
+}
+
+/*
+ * Copy the code for other cpus to execute into an
+ * aligned location accessible via BPTR
+ */
+void setup_mp(void)
+{
+   extern ulong __secondary_start_page;
+   ulong fixup = (ulong)&__secondary_start_page;
+   u32 bootpg;
+   u32 bootpg_va;
+
+   /*
+* If we have 4G or more of memory, put the boot page at 4Gb-1M.
+* Otherwise, put it at the very end of RAM.
+*/
+   if (gd->ram_size > 0xf000)
+   bootpg = 0xfff0;
+   else
+   bootpg = gd->ram_size - (1024 * 1024);
+
+   if (bootpg >= CONFIG_SYS_MAX_DDR_BAT_SIZE) {
+   /* We're not covered by the DDR mapping, set up BAT  */
+   write_bat(DBAT7, CONFIG_SYS_SCRATCH_VA | BATU_BL_128K |
+ BATU_VS | BATU_VP,
+ bootpg | BATL_PP_RW | BATL_MEMCOHERENCE);
+   bootpg_va = CONFIG_SYS_SCRATCH_VA;
+   } else {
+   bootpg_va = bootpg;
+   }
+
+   memcpy((void *)bootpg_va, (void *)fixup, 4096);
+   flush_cache(bootpg_va, 4096);
+
+   /* remove the temporary BAT mapping */
+   if (bootpg >= CONFIG_SYS_MAX_DDR_BAT_SIZE)
+   write_bat(DBAT7, 0, 0);
+
+   /* If the physical location of bootpg is not at fff0, set BPTR */
+   if (bootpg != 0xfff0)
+   out_be32((uint *)(CONFIG_SYS_CCSRBAR + 0x20), 0x8000 |
+(

Re: [U-Boot] Building u-boot for the AT91RM9200-EK circa 2008

2008-11-03 Thread James Black
I just checked the ATMEL website and it appears to me that the
AT91RM9200 is alive and well. Distributors are maintainig stock...

Why do you say that the Chip has been abandoned?

On Mon, Nov 3, 2008 at 2:40 PM, Pink Boy <[EMAIL PROTECTED]> wrote:
>
> Wolfgang Denk sez,
>
>> The thing is: we will not accept any such (new) code for
>> mainline. And switching to using the CFI driver is trivial.
>
> Okay so what I've learned.
>
> 1)You can build the AT91RM9200DK version of u-boot with u-boot-1.3.4
> and it works.  At least I got a prompt.  So one can use the
> AT91RM9200DK as a starting point for the AT91RM9200EK.
>
> 2) At this point I think relying on any older patched version of
> u-boot that supports the AT91RM9200EK is probably not workable and
> not worth doing.
>
> 3) Anyone starting a project based on the AT91RM9200EK is making
> big mistake because the AT91RM9200 chip has been abandoned by its
> mother.
>
> At least I have I have some sort of peg in the ground to
> start with.  Right now I worry about trying to get the CFI to
> work because as a noob I'm in the dark on a lot of things
>
> 1) How to port the CFI to the AT91RM9200DK.
> 2) Create a board support for the AT91RM9200EK based on that.
> 3) Generate patches that are acceptable.
>
> Personally I think that Atmel is doing people a disservice by
> not classifying the AT91RM9200 as not for new designs since
> there is no current support for it.
>
> Matthew Harper.
> Tehama Wireless.
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>



-- 
Jim Black
Senior Software Engineer
Aztek Networks, Inc.
2477 55th Street, Suite 202
Boulder, CO 80301
www.azteknetworks.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 09/13 v5] ARM: OMAP3: Add I2C support

2008-11-03 Thread Wolfgang Denk
Dear Dirk Behme,

In message <[EMAIL PROTECTED]> you wrote:
>
> >>+#define inb(a) __raw_readb(a)
> >>+#define outb(a, v) __raw_writeb(a, v)
> >> #define inw(a) __raw_readw(a)
> >> #define outw(a,v) __raw_writew(a,v)
> > 
> > This 4 macro is supposed to be defined in io.h
> 
> Even if I have to touch a global/common file for this?

If they are missing in io.h, this should be fixed, indeed.

> >>status = wait_for_pin ();
> >>if (status & I2C_STAT_RRDY) {
> >>+#if defined(CONFIG_OMAP243X) || defined(CONFIG_OMAP34XX)
> >>+   *value = inb(I2C_DATA);
> > 
> > please respect the file style, add a space before '('
> > and so on
> 
> You prefer file style over global coding style? As I understand it 
> "inb(" is global coding style, and I tried to be in sync with global 
> coding style at least with code I add.

It is more important to use a consistent style in a single source file,
indeed.

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 seems intuitively obvious to me, which  means  that  it  might  be
wrong. -- Chris Torek
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Building u-boot for the AT91RM9200-EK circa 2008

2008-11-03 Thread Wolfgang Denk
Dear Pink Boy,

In message <[EMAIL PROTECTED]> you wrote:
> 
> At least I have I have some sort of peg in the ground to
> start with.  Right now I worry about trying to get the CFI to
> work because as a noob I'm in the dark on a lot of things 

If you're in the dark, you can still  admire  the  many,  many  small
stars that shine on you, while others who walk in the bright sunlight
may feel warm and comfortable, but actually live in a somewhat poorer
world :-)

> 1) How to port the CFI to the AT91RM9200DK.

There is nothing to port. You just enable  it  in  the  board  config
file.  See for example the recent patch for the TQM8260 board. That's
all you need to do.

> 2) Create a board support for the AT91RM9200EK based on that.
> 3) Generate patches that are acceptable.

If you use git, then all you need to do is using git-format-patch and
git-send-email :-)

> Personally I think that Atmel is doing people a disservice by 
> not classifying the AT91RM9200 as not for new designs since 
> there is no current support for it.

Well, they still want to sell those chips. 

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]
If there was anything that depressed him more than his own  cynicism,
it was that quite often it still wasn't as cynical as real life.
 - Terry Pratchett, _Guards! Guards!_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] [OneNAND] bad block aware read/write support

2008-11-03 Thread Kyungmin Park
Update OneNAND command to support bad block awareness
Also change the OneNAND command styel like NAND

Signed-off-by: Kyungmin Park <[EMAIL PROTECTED]>
---
diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index 8d87b78..1eca9b0 100644
--- a/common/cmd_onenand.c
+++ b/common/cmd_onenand.c
@@ -1,7 +1,7 @@
 /*
  *  U-Boot command for OneNAND support
  *
- *  Copyright (C) 2005-2007 Samsung Electronics
+ *  Copyright (C) 2005-2008 Samsung Electronics
  *  Kyungmin Park <[EMAIL PROTECTED]>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -18,12 +18,245 @@
 
 #include 
 
-extern struct mtd_info onenand_mtd;
-extern struct onenand_chip onenand_chip;
+static struct mtd_info *mtd = &onenand_mtd;
+
+static loff_t next_ofs;
+static loff_t skip_ofs;
+
+static int onenand_block_read(loff_t from, size_t len,
+   size_t *retlen, u_char *buf, int oob)
+{
+   struct onenand_chip *this = mtd->priv;
+   int blocks = (int) len >> this->erase_shift;
+   int blocksize = (1 << this->erase_shift);
+   loff_t ofs = from;
+   struct mtd_oob_ops ops = {
+   .retlen = 0,
+   };
+   int ret, dump = 0;
+
+   if (buf == NULL) {
+   buf = (u_char *) CONFIG_SYS_LOAD_ADDR;
+   dump = 1;
+   }
+
+   if (oob)
+   ops.ooblen = blocksize;
+   else
+   ops.len = blocksize;
+   
+   while (blocks) {
+   ret = mtd->block_isbad(mtd, ofs);
+   if (ret) {
+   printk("Bad blocks %d at 0x%x\n", (unsigned int) ofs >> 
this->erase_shift, (unsigned int) ofs);
+   ofs += blocksize;
+   continue;
+   }
+
+   if (oob) 
+   ops.oobbuf = buf;
+   else
+   ops.datbuf = buf;
+
+   ops.retlen = 0;
+   ret = mtd->read_oob(mtd, ofs, &ops);
+   if (ret) {
+   printk("Read failed 0x%x, %d", (unsigned int) ofs, ret);
+   mtd->block_markbad(mtd, ofs);
+   ofs += blocksize;
+   continue;
+   }
+   ofs += blocksize;
+   buf += blocksize;
+   blocks--;
+   *retlen += ops.retlen;
+
+   if (dump) {
+   int i;
+   unsigned int *p = (unsigned int *) CONFIG_SYS_LOAD_ADDR;
+   printf("Dump offset 0x%x (%d)\n", (unsigned int) ofs, 
(int) ofs >> this->erase_shift);
+   for (i = 0; i < 32; i++) {
+   printf("0x%08x ", *p++);
+   if (((i + 1) & (4 - 1)) == 0)
+   printf("\n");
+   }
+   buf = (u_char *) CONFIG_SYS_LOAD_ADDR;
+   }
+   }
+
+   printf("Read from 0x%x to 0x%x (%d + %d blocks)\n", (unsigned int) 
from, (unsigned int) ofs, (int) len >> this->erase_shift, (int) ((ofs - from) - 
len) >> this->erase_shift);
+
+   return 0;
+}
+
+static int onenand_block_write(loff_t to, size_t len,
+ size_t *retlen, const u_char * buf)
+{
+   struct onenand_chip *this = mtd->priv;
+   int blocks = len >> this->erase_shift;
+   int blocksize = (1 << this->erase_shift);
+   loff_t ofs;
+   size_t _retlen = 0;
+   int ret;
+
+   if (to == next_ofs) {
+   next_ofs = to + len;
+   to += skip_ofs;
+   } else {
+   next_ofs = to + len;
+   skip_ofs = 0;
+   }
+   ofs = to;
+
+   while (blocks) {
+   ret = mtd->block_isbad(mtd, ofs);
+   if (ret) {
+   printk("Bad blocks %d at 0x%x\n", (unsigned int) ofs >> 
this->erase_shift, (unsigned int) ofs);
+   skip_ofs += blocksize;
+   goto next;
+   }
+#ifdef USE_ERASEWRITE
+   if ((ofs & (blocksize - 1)) == 0) {
+   struct erase_info instr = {
+   .callback   = NULL,
+   .addr   = ofs,
+   .len= blocksize,
+   .priv   = 0,
+   };
+   ret = mtd->erase(mtd, &instr);
+   if (ret) {
+   printk("Erase failed 0x%x, %d", (unsigned int) 
ofs, ret);
+   mtd->block_markbad(mtd, ofs);
+   skip_ofs += blocksize;
+   goto next;
+   }
+   }
+#endif
+   ret = mtd->write(mtd, ofs, blocksize, &_retlen, buf);
+   if (ret) {
+   printk("Write failed 0x%x, %d", (unsigned int) ofs, 
ret);
+   

[U-Boot] [PATCH] [OneNAND] Sync with 2.6.27

2008-11-03 Thread Kyungmin Park
Sync with OneNAND kernel codes

Signed-off-by: Kyungmin Park <[EMAIL PROTECTED]>
---
diff --git a/drivers/mtd/onenand/onenand_base.c 
b/drivers/mtd/onenand/onenand_base.c
index 9b7bf3a..66214e8 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -78,20 +78,11 @@ static void onenand_writew(unsigned short value, void 
__iomem * addr)
  *
  * Setup Start Address 1 Register (F100h)
  */
-static int onenand_block_address(int device, int block)
+static int onenand_block_address(struct onenand_chip *this, int block)
 {
-   if (device & ONENAND_DEVICE_IS_DDP) {
-   /* Device Flash Core select, NAND Flash Block Address */
-   int dfs = 0, density, mask;
-
-   density = device >> ONENAND_DEVICE_DENSITY_SHIFT;
-   mask = (1 << (density + 6));
-
-   if (block & mask)
-   dfs = 1;
-
-   return (dfs << ONENAND_DDP_SHIFT) | (block & (mask - 1));
-   }
+   /* Device Flash Core select, NAND Flash Block Address */
+   if (block & this->density_mask)
+   return ONENAND_DDP_CHIP1 | (block ^ this->density_mask);
 
return block;
 }
@@ -104,22 +95,13 @@ static int onenand_block_address(int device, int block)
  *
  * Setup Start Address 2 Register (F101h) for DDP
  */
-static int onenand_bufferram_address(int device, int block)
+static int onenand_bufferram_address(struct onenand_chip *this, int block)
 {
-   if (device & ONENAND_DEVICE_IS_DDP) {
-   /* Device BufferRAM Select */
-   int dbs = 0, density, mask;
-
-   density = device >> ONENAND_DEVICE_DENSITY_SHIFT;
-   mask = (1 << (density + 6));
-
-   if (block & mask)
-   dbs = 1;
+   /* Device BufferRAM Select */
+   if (block & this->density_mask)
+   return ONENAND_DDP_CHIP1;
 
-   return (dbs << ONENAND_DDP_SHIFT);
-   }
-
-   return 0;
+   return ONENAND_DDP_CHIP0;
 }
 
 /**
@@ -169,6 +151,18 @@ static int onenand_buffer_address(int dataram1, int 
sectors, int count)
 }
 
 /**
+ * onenand_get_density - [DEFAULT] Get OneNAND density
+ * @param dev_idOneNAND device ID
+ *
+ * Get OneNAND density from device ID
+ */
+static inline int onenand_get_density(int dev_id)
+{
+   int density = dev_id >> ONENAND_DEVICE_DENSITY_SHIFT;
+   return (density & ONENAND_DEVICE_DENSITY_MASK);
+}
+
+/**
  * onenand_command - [DEFAULT] Send command to OneNAND device
  * @param mtd  MTD device structure
  * @param cmd  the command to be sent
@@ -192,6 +186,7 @@ static int onenand_command(struct mtd_info *mtd, int cmd, 
loff_t addr,
case ONENAND_CMD_UNLOCK:
case ONENAND_CMD_LOCK:
case ONENAND_CMD_LOCK_TIGHT:
+   case ONENAND_CMD_UNLOCK_ALL:
block = -1;
page = -1;
break;
@@ -212,7 +207,7 @@ static int onenand_command(struct mtd_info *mtd, int cmd, 
loff_t addr,
/* NOTE: The setting order of the registers is very important! */
if (cmd == ONENAND_CMD_BUFFERRAM) {
/* Select DataRAM for DDP */
-   value = onenand_bufferram_address(this->device_id, block);
+   value = onenand_bufferram_address(this, block);
this->write_word(value,
 this->base + ONENAND_REG_START_ADDRESS2);
 
@@ -224,9 +219,14 @@ static int onenand_command(struct mtd_info *mtd, int cmd, 
loff_t addr,
 
if (block != -1) {
/* Write 'DFS, FBA' of Flash */
-   value = onenand_block_address(this->device_id, block);
+   value = onenand_block_address(this, block);
this->write_word(value,
 this->base + ONENAND_REG_START_ADDRESS1);
+
+   /* Write 'DFS, FBA' of Flash */
+   value = onenand_bufferram_address(this, block);
+   this->write_word(value,
+this->base + ONENAND_REG_START_ADDRESS2);
}
 
if (page != -1) {
@@ -252,15 +252,6 @@ static int onenand_command(struct mtd_info *mtd, int cmd, 
loff_t addr,
/* Write 'BSA, BSC' of DataRAM */
value = onenand_buffer_address(dataram, sectors, count);
this->write_word(value, this->base + ONENAND_REG_START_BUFFER);
-
-   if (readcmd) {
-   /* Select DataRAM for DDP */
-   value =
-   onenand_bufferram_address(this->device_id, block);
-   this->write_word(value,
-this->base +
-ONENAND_REG_START_ADDRESS2);
-   }
}
 
/* Interrupt clear */
@@ -296,14 +287,11 @@ static int onenand_wait(struct mtd_info *mtd, int state)
ctrl = this->read_word(this->base + ONENAND_REG_CTRL_STATUS);

Re: [U-Boot] Undefined reference to `boot_relocate_fdt'

2008-11-03 Thread Jerry Van Baren
Juan Pablo Gómez wrote:
> His I'm trying to build u-boot for a xupv2p board, but with the newest
> version this is appearing during the make :
> *
> $make xupv2p_config
> $make*
> 
> -Map u-boot.map -o u-boot
> common/libcommon.a(cmd_bootm.o): In function `do_bootm_subcommand':
> /home/juanwalker/software/projects/u-boot/common/cmd_bootm.c:505: undefined
> reference to `boot_relocate_fdt'
> make: *** [u-boot] Error 1

Hi Juan,

That is odd.  It works for me on a PowerPC target (I don't have 
microblaze support set up).  Your config has CONFIG_LIBFDT enabled, 
which is why do_bootm_subcommand is calling boot_relocate_fdt.  I don't 
see any obvious reason why boot_relocate_fdt isn't in your build (it is 
defined in common/image.c and enabled by CONFIG_LIBFDT).

One thing you could do is to save your make output into a log file
   make > make.log
and then find the line that compiles image.c (it likely will be the 
*second* time, the first time is making host tools).  Cut and paste it 
onto the command line (in the common/ subdirectory) BUT CHANGE the flags 
at the end of the gcc command from:
   -c -o image.o image.c
to:
   -C -E -o image.pp image.c
This stops after running the preprocessor and puts the result in 
"image.pp".  Maybe you can get a clue what happened to your 
boot_relocate_fdt() from that???

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


[U-Boot] [PATCH] sh: Migo-R: Update BSC value

2008-11-03 Thread Nobuhiro Iwamatsu
A value of BSC CS4 was wrong, Fixed it.

Signed-off-by: Nobuhiro Iwamatsu <[EMAIL PROTECTED]>
---
 board/renesas/MigoR/lowlevel_init.S |   32 
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/board/renesas/MigoR/lowlevel_init.S 
b/board/renesas/MigoR/lowlevel_init.S
index e48f7b3..4c1900e 100644
--- a/board/renesas/MigoR/lowlevel_init.S
+++ b/board/renesas/MigoR/lowlevel_init.S
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007
+ * Copyright (C) 2007-2008
  * Nobuhiro Iwamatsu <[EMAIL PROTECTED]>
  *
  * Copyright (C) 2007
@@ -211,25 +211,25 @@ PFC_PULCR_D:  .long   0x6000
 PFC_DRVCR_D:   .long   0x0464
 FRQCR_D:   .long   0x07033639
 PLLCR_D:   .long   0x5000
-DLLFRQ_D:  .long   0x04F6  ! 20080115
+DLLFRQ_D:  .long   0x04F6

 CMNCR_A:   .long   CMNCR
-CMNCR_D:   .long   0x001B  ! 20080115
-CS0BCR_A:  .long   CS0BCR  ! Flash bank 1
+CMNCR_D:   .long   0x001B
+CS0BCR_A:  .long   CS0BCR
 CS0BCR_D:  .long   0x24920400
-CS4BCR_A:  .long   CS4BCR  !
-CS4BCR_D:  .long   0x10003400  ! 20080115
-CS5ABCR_A: .long   CS5ABCR !
+CS4BCR_A:  .long   CS4BCR
+CS4BCR_D:  .long   0x3400
+CS5ABCR_A: .long   CS5ABCR
 CS5ABCR_D: .long   0x24920400
-CS5BBCR_A: .long   CS5BBCR !
+CS5BBCR_A: .long   CS5BBCR
 CS5BBCR_D: .long   0x24920400
-CS6ABCR_A: .long   CS6ABCR !
+CS6ABCR_A: .long   CS6ABCR
 CS6ABCR_D: .long   0x24920400

 CS0WCR_A:  .long   CS0WCR
 CS0WCR_D:  .long   0x0380
 CS4WCR_A:  .long   CS4WCR
-CS4WCR_D:  .long   0x00100A81  ! 20080115
+CS4WCR_D:  .long   0x00110080
 CS5AWCR_A: .long   CS5AWCR
 CS5AWCR_D: .long   0x0300
 CS5BWCR_A: .long   CS5BWCR
@@ -238,20 +238,20 @@ CS6AWCR_A:.long   CS6AWCR
 CS6AWCR_D: .long   0x0300

 SDCR_A:.long   SBSC_SDCR
-SDCR_D:.long   0x80160809  ! 20080115
+SDCR_D:.long   0x80160809
 SDWCR_A:   .long   SBSC_SDWCR
-SDWCR_D:   .long   0x0014450C  ! 20080115
+SDWCR_D:   .long   0x0014450C
 SDPCR_A:   .long   SBSC_SDPCR
 SDPCR_D:   .long   0x0087
 RTCOR_A:   .long   SBSC_RTCOR
 RTCNT_A:   .long   SBSC_RTCNT
 RTCNT_D:   .long   0xA55A0012
-RTCOR_D:   .long   0xA55A001C  ! 20080115
+RTCOR_D:   .long   0xA55A001C
 RTCSR_A:   .long   SBSC_RTCSR
 RFCR_A:.long   SBSC_RFCR
 RFCR_D:.long   0xA55A0221
-RTCSR_D:   .long   0xA55A009a  ! 20080115
-SDMR3_A:   .long   0xFE581180  ! 20080115
+RTCSR_D:   .long   0xA55A009a
+SDMR3_A:   .long   0xFE581180

 SR_MASK_D: .long   0xEF0F

@@ -260,5 +260,5 @@ SR_MASK_D:  .long   0xEF0F
 SBSCR_D:   .word   0x0044
 PSCR_D:.word   0x
 RWTCSR_D_1:.word   0xA507
-RWTCSR_D_2:.word   0xA504  ! 20080115
+RWTCSR_D_2:.word   0xA504
 RWTCNT_D:  .word   0x5A00
-- 1.5.6.5
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for programheaders" error

2008-11-03 Thread Benny Chen
Hi Ricardo,
Changing my tool chain to the ELDK 4.2 ppc-linux-x86 does build the
default ml507_flash project.  However, because my hardware design does
not map the FLASH chip to 0xFE00 but to 0x8600 the build failed
with the following error.

/**/
cpu/ppc4xx/start.o: In function `rsttlb':

/usr/local/groundprobe/src/Bootloader/u-boot/cpu/ppc4xx/start.S:493:
relocation truncated to fit: R_PPC_REL24 against symbol `_start' defined
in .text section in cpu/ppc4xx/start.o
/*/

I think this issue maybe to do with the 24bit branch address limit with
the PPC440x5 core. Here the _start_440 function calls a "b _start" and
in this case the _start is mapped to flash in address 0x8600.
Meaning we now need to branch from 0xFxxx to 0x8600.  I think
this is why the linker failed at the last stage.

Does anyone have any idea with this issue?

Regards,
Benny

-Original Message-
From: Ricardo [mailto:[EMAIL PROTECTED] 
Sent: Monday, 3 November 2008 6:26 PM
To: Benny Chen
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] MAKEALL ml507_flash return "Not enough room for
programheaders" error

Hello Benny

  I have just checkout the build of the ml507_flash and works ok for me

[EMAIL PROTECTED]:~/curro/qtec/u-boot$ ./MAKEALL ml507_flash
Configuring for ml507 board...
   textdata bss dec hex filename
 202132   10476   30032  242640   3b3d0 ./u-boot


  I remember that when I was using another toolchain the final link
failed (but showing different error). Try with another toochain, I am
using one produced by OpenEmbedded, but you will get the same results
with the ELDK


  Best regards



On Mon, Nov 3, 2008 at 07:59, Benny Chen <[EMAIL PROTECTED]>
wrote:
> Hi there,
>
> I am trying to build a U-Boot image for the ML507 board running from
> FLASH and got the "Not enough room for program headers" error.
>
>
>
> The main difference for my setup is the toolchain.  I am using the
> powerpc-eabi-ld linker from Xilinx's EDK tool chain to build the
> ml507_flash design for U-Boot.
>
>
>
> I have seen a patch on the linker script for the mpc8555cds board and
> tried adding the patch to the Xilinx/ppc440-generic/u-boot-rom.lds but
> got the "relocation truncated to fit R_PPC_REL24" error.
>
> Before going further with debugging this problem, I would like to
check
> if this problem is due to the powerpc-eabi tool chain from Xilinx?
>
>
>
> Thanks for your help.
>
>
>
> Regards,
>
> Benny
>
>
>
> $ ./MAKEALL ml507_flash
>
> Configuring for ml507 board...
>
> powerpc-eabi-ld: u-boot: Not enough room for program headers
(allocated
> 2, need 5)
>
> powerpc-eabi-ld: final link failed: Bad value
>
> make: *** [u-boot] Error 1
>
> size: './u-boot': No such file
>
>
>
>
>
>
>
>
> ___
> 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] U-boot support for Non Console board

2008-11-03 Thread rajeev s
hi Ira Snyder,
Thanks for the respone. The solution mentioned looks feasible..

Could you please send the U-boot patch in the current shape .. Shall test the 
same patch with modifications as required to support our board.

Thanks again .
Rajeev S


Ira Snyder <[EMAIL PROTECTED]> wrote: On Fri, Oct 31, 2008 at 01:25:14PM +0100, 
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 08:06 Fri 31 Oct , Jerry Van Baren wrote:
> > Wolfgang Denk wrote:
> > > Dear rajeev s,
> > > 
> > > In message <[EMAIL PROTECTED]> you wrote:
> > >> We have a custom board based on coldfire (MCF5484) Similar to MCF5484 
> > >> Kitlite
> > >> The board runs Coldfire as PCI agent , 64MB of SDRAM, 4 MB of Bootflash 
> > >> and the PCI bus as a slave (no serial
> > >> port->no console) 
> > >> I can flash U-boot using the JTAG . Can you let know how can i pass the 
> > >> Commands over PCI .
> > >> I do not have a Console to do that ?

[snip]

> > 
> > I have not googled, I'm sure many people have done this before.  Maybe 
> > you will get lucky and someone will have published source under a GPL 
> > (compatible) license.
> IIRC I've seen this in the Prism54 driver
> 

I'm currently working on a custom board based on MPC8349EMDS. It works
in PCI agent mode.

I have written a Linux driver that implements both ethernet and a uart
over the PCI bus. I don't think it would be hard to port to your board.
Search the linuxppc-dev or LKML archives for the patch. The subject is
"net: add PCINet driver".

I'm currently trying to get the driver merged into Linux. I have also
written U-Boot drivers that offer the same functionality. I can "see"
the U-Boot prompt over PCI, and tftp + nfs boot over PCI. It is very
convenient.

I was going to post up the U-Boot drivers after I get the Linux driver
merged, just in case there are changes. I've inlined the patches below.
The first adds ethernet, the second adds a serial port.

Please note that they are MPC8349EMDS specific right now, but they might
provide inspiration. Showing your support of the PCINet driver on LKML
might help get it reviewed. Noone has taken much interest.

Ira




>From 356297a295bb2a5ee7c0bc736b838f144939376d Mon Sep 17 00:00:00 2001
From: Ira W. Snyder 
Date: Mon, 18 Aug 2008 15:40:40 -0700
Subject: [PATCH] Add PCINet Driver

This adds a virtual network interface that uses the PCI bus for
communication. This is extremely useful for boards in PCISLAVE mode, so you
do not need extra cables to communicate with them.

There is a corresponding Linux driver to be run on the host system.

Signed-off-by: Ira W. Snyder 
---
 cpu/mpc83xx/cpu.c|4 +-
 drivers/net/Makefile |1 +
 drivers/net/pcinet.c |  503 ++
 drivers/net/pcinet.h |   73 
 4 files changed, 580 insertions(+), 1 deletions(-)
 create mode 100644 drivers/net/pcinet.c
 create mode 100644 drivers/net/pcinet.h

diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c
index aa9b18d..79c0363 100644
--- a/cpu/mpc83xx/cpu.c
+++ b/cpu/mpc83xx/cpu.c
@@ -364,6 +364,8 @@ int cpu_eth_init(bd_t *bis)
 #if defined(CONFIG_TSEC_ENET)
  tsec_standard_init(bis);
 #endif
-
+#ifdef CONFIG_PCINET_ETHERNET
+ pcinet_initialize(bis, 0, "PCINET");
+#endif
  return 0;
 }
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 439c354..2435e63 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -52,6 +52,7 @@ COBJS-$(CONFIG_NETCONSOLE) += netconsole.o
 COBJS-$(CONFIG_DRIVER_NS7520_ETHERNET) += ns7520_eth.o
 COBJS-$(CONFIG_NS8382X) += ns8382x.o
 COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o
+COBJS-$(CONFIG_PCINET_ETHERNET) += pcinet.o
 COBJS-$(CONFIG_PCNET) += pcnet.o
 COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o
 COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
diff --git a/drivers/net/pcinet.c b/drivers/net/pcinet.c
new file mode 100644
index 000..b86383f
--- /dev/null
+++ b/drivers/net/pcinet.c
@@ -0,0 +1,503 @@
+/*
+ * PCINet Virtual Ethernet over PCI driver
+ *
+ * This software may be used and distributed according to the
+ * terms of the GNU General Public License, Version 2, incorporated
+ * herein by reference.
+ *
+ * Copyright (c) 2008, Ira W. Snyder 
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include "pcinet.h"
+
+struct wqt_dev;
+typedef void (*wqt_irqhandler_t)(struct wqt_dev *);
+
+struct wqt_dev {
+ wqt_irqhandler_t net_rx_packet_handler;
+ wqt_irqhandler_t net_tx_complete_handler;
+ int state;
+
+ void *netregs;
+
+ cbd_t *rx_base;
+ cbd_t *tx_base;
+
+ cbd_t *cur_rx;
+ cbd_t *cur_tx;
+ cbd_t *dirty_tx;
+ int tx_free;
+};
+
+#define W32(addr, b) out_le32((volatile u32 *)(addr), (b))
+#define R32(addr) in_le32((volatile u32 *)(addr))
+
+#define W32BE(addr, b) out_be32((volatile u32 *)(addr), (b))
+#define R32BE(addr) in_be32((volatile u32 *)(addr))
+
+/**/
+/* Status Bits   

[U-Boot] [PATCH 1/3][ppc4xx] Changed PPC4xx EMAC driver to require CONFIG_PPC4xx_EMAC

2008-11-03 Thread Ben Warren
All in-tree IBM/AMCC PPC4xx boards using the EMAC get this new CONFIG

Signed-off-by: Ben Warren <[EMAIL PROTECTED]>
---

Rebased against 4xx tree.  Please test and ACK/NAK.

 cpu/ppc4xx/4xx_enet.c|9 -
 cpu/ppc4xx/Makefile  |1 +
 include/configs/AR405.h  |1 +
 include/configs/ASH405.h |1 +
 include/configs/CMS700.h |1 +
 include/configs/CPCI405.h|1 +
 include/configs/CPCI4052.h   |1 +
 include/configs/CPCI405AB.h  |1 +
 include/configs/CPCI405DT.h  |1 +
 include/configs/CPCIISER4.h  |1 +
 include/configs/CRAYL1.h |2 ++
 include/configs/DP405.h  |1 +
 include/configs/DU405.h  |1 +
 include/configs/DU440.h  |1 +
 include/configs/ERIC.h   |1 +
 include/configs/EXBITGEN.h   |1 +
 include/configs/G2000.h  |1 +
 include/configs/HH405.h  |1 +
 include/configs/HUB405.h |1 +
 include/configs/JSE.h|1 +
 include/configs/KAREF.h  |1 +
 include/configs/METROBOX.h   |1 +
 include/configs/MIP405.h |1 +
 include/configs/OCRTC.h  |1 +
 include/configs/ORSG.h   |1 +
 include/configs/PCI405.h |1 +
 include/configs/PIP405.h |1 +
 include/configs/PLU405.h |1 +
 include/configs/PMC405.h |1 +
 include/configs/PMC440.h |1 +
 include/configs/PPChameleonEVB.h |1 +
 include/configs/VOH405.h |1 +
 include/configs/VOM405.h |1 +
 include/configs/W7OLMC.h |1 +
 include/configs/W7OLMG.h |1 +
 include/configs/WUH405.h |1 +
 include/configs/XPEDITE1K.h  |1 +
 include/configs/alpr.h   |1 +
 include/configs/amcc-common.h|1 +
 include/configs/csb272.h |1 +
 include/configs/csb472.h |1 +
 include/configs/korat.h  |1 +
 include/configs/lwmon5.h |1 +
 include/configs/netstal-common.h |1 +
 include/configs/p3p440.h |1 +
 include/configs/pcs440ep.h   |1 +
 include/configs/quad100hd.h  |1 +
 include/configs/sbc405.h |1 +
 include/configs/sc3.h|2 ++
 include/configs/zeus.h   |1 +
 net/eth.c|5 ++---
 51 files changed, 53 insertions(+), 12 deletions(-)

diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
index d7b16da..1978269 100644
--- a/cpu/ppc4xx/4xx_enet.c
+++ b/cpu/ppc4xx/4xx_enet.c
@@ -91,13 +91,6 @@
 #include 
 #include 
 
-/*
- * Only compile for platform with AMCC EMAC ethernet controller and
- * network support enabled.
- * Remark: CONFIG_405 describes Xilinx PPC405 FPGA without EMAC controller!
- */
-#if defined(CONFIG_CMD_NET) && !defined(CONFIG_405) && !defined(CONFIG_IOP480)
-
 #if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII))
 #error "CONFIG_MII has to be defined!"
 #endif
@@ -2131,5 +2124,3 @@ int emac4xx_miiphy_initialize (bd_t * bis)
return 0;
 }
 #endif /* !defined(CONFIG_NET_MULTI) */
-
-#endif
diff --git a/cpu/ppc4xx/Makefile b/cpu/ppc4xx/Makefile
index 463b575..adfe13c 100644
--- a/cpu/ppc4xx/Makefile
+++ b/cpu/ppc4xx/Makefile
@@ -38,6 +38,7 @@ COBJS += 44x_spd_ddr2.o
 ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION
 COBJS  += 4xx_ibm_ddr2_autocalib.o
 endif
+COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o
 COBJS  += 4xx_pci.o
 COBJS  += 4xx_pcie.o
 COBJS  += bedbug_405.o
diff --git a/include/configs/AR405.h b/include/configs/AR405.h
index 864774c..9f19269 100644
--- a/include/configs/AR405.h
+++ b/include/configs/AR405.h
@@ -67,6 +67,7 @@
 #define CONFIG_LOADS_ECHO  1   /* echo on for serial download  */
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   1   /* allow baudrate change
*/
 
+#define CONFIG_PPC4xx_EMAC
 #define CONFIG_MII 1   /* MII PHY management   */
 #define CONFIG_PHY_ADDR0   /* PHY address  
*/
 #define CONFIG_LXT971_NO_SLEEP  1   /* disable sleep mode in LXT971 */
diff --git a/include/configs/ASH405.h b/include/configs/ASH405.h
index bcc85ee..a694083 100644
--- a/include/configs/ASH405.h
+++ b/include/configs/ASH405.h
@@ -56,6 +56,7 @@
 #define CONFIG_NET_MULTI   1
 #undef  CONFIG_HAS_ETH1
 
+#define CONFIG_PPC4xx_EMAC
 #define CONFIG_MII 1   /* MII PHY management   */
 #define CONFIG_PHY_ADDR0   /* PHY address  
*/
 #define CONFIG_LXT971_NO_SLEEP  1   /* disable sleep mode in LXT971 */
diff --git a/include/configs/CMS700.h b/include/configs/CMS700.h
index d58f508..d0e2464 100644
--- a/include/configs/CMS700.h
+++ b/include/configs/CMS700.h
@@ -52,6 +52,7 @@
 
 #define CONFIG_SYS_LOADS_BAUD_CHANGE   1   /* allow baudrate change
*/
 
+#define CONFIG_PPC4xx_EMAC
 #define CONFIG_NET_MULTI   1
 #undef  CONFIG_HAS_ETH1
 
diff --git a/include/configs/CPCI405.h b/include/c

Re: [U-Boot] [PATCH v2 5/9] ColdFire: Add mii driver in drivers/net

2008-11-03 Thread Ben Warren
Tsi-Chung Liew wrote:
> From: TsiChung Liew <[EMAIL PROTECTED]>
>
> All CF platforms' mii.c are consolidated into one
>
> Signed-off-by: TsiChung Liew <[EMAIL PROTECTED]>
> ---
>  drivers/net/Makefile |4 +-
>  drivers/net/mcffec.c |   18 +---
>  drivers/net/mcfmii.c |  321 
> ++
>  3 files changed, 326 insertions(+), 17 deletions(-)
>  create mode 100644 drivers/net/mcfmii.c
>
>   


Applied to net repo.

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


[U-Boot] [PATCH] mpc83xx: Improve the performance of DDR memory

2008-11-03 Thread Dave Liu
From: Howard Gregory <[EMAIL PROTECTED]>

modify the CAS timings. my understanding is that these
settings decrease various wait times in the DDR interface.
Because these wait times are in clock cycles, and the DDR
clock on the 8315 RDB runs slower than on some other 83xx
platforms, we can dial down these values without a problem,
thereby decreasing the latency of memory a little.

Signed-off-by: Howard Gregory <[EMAIL PROTECTED]>
Signed-off-by: Dave Liu <[EMAIL PROTECTED]>
---
 include/configs/MPC8315ERDB.h |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index 64bb62a..48043c4 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -118,23 +118,23 @@
| ( 8 << TIMING_CFG0_ODT_PD_EXIT_SHIFT ) \
| ( 2 << TIMING_CFG0_MRS_CYC_SHIFT ) )
/* 0x00220802 */
-#define CONFIG_SYS_DDR_TIMING_1( ( 3 << TIMING_CFG1_PRETOACT_SHIFT ) \
-   | ( 9 << TIMING_CFG1_ACTTOPRE_SHIFT ) \
-   | ( 3 << TIMING_CFG1_ACTTORW_SHIFT ) \
+#define CONFIG_SYS_DDR_TIMING_1( ( 2 << TIMING_CFG1_PRETOACT_SHIFT ) \
+   | ( 7 << TIMING_CFG1_ACTTOPRE_SHIFT ) \
+   | ( 2 << TIMING_CFG1_ACTTORW_SHIFT ) \
| ( 5 << TIMING_CFG1_CASLAT_SHIFT ) \
| ( 6 << TIMING_CFG1_REFREC_SHIFT ) \
| ( 2 << TIMING_CFG1_WRREC_SHIFT ) \
| ( 2 << TIMING_CFG1_ACTTOACT_SHIFT ) \
| ( 2 << TIMING_CFG1_WRTORD_SHIFT ) )
-   /* 0x39356222 */
+   /* 0x27256222 */
 #define CONFIG_SYS_DDR_TIMING_2( ( 1 << TIMING_CFG2_ADD_LAT_SHIFT ) \
| ( 4 << TIMING_CFG2_CPO_SHIFT ) \
| ( 2 << TIMING_CFG2_WR_LAT_DELAY_SHIFT ) \
| ( 2 << TIMING_CFG2_RD_TO_PRE_SHIFT ) \
| ( 2 << TIMING_CFG2_WR_DATA_DELAY_SHIFT ) \
| ( 3 << TIMING_CFG2_CKE_PLS_SHIFT ) \
-   | ( 7 << TIMING_CFG2_FOUR_ACT_SHIFT) )
-   /* 0x121048c7 */
+   | ( 5 << TIMING_CFG2_FOUR_ACT_SHIFT) )
+   /* 0x121048c5 */
 #define CONFIG_SYS_DDR_INTERVAL( ( 0x0360 << 
SDRAM_INTERVAL_REFINT_SHIFT ) \
| ( 0x0100 << SDRAM_INTERVAL_BSTOPRE_SHIFT ) )
/* 0x03600100 */
-- 
1.5.5.1.248.g4b17

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


[U-Boot] mini-pci wireless driver

2008-11-03 Thread Lance Zhang
Hi,

 

I am going to write a mini-pci driver (GIGABYTE MiniPCI Wireless
Adapter: GN-WI01GS) for u-boot(sc520),

Currently, I have Linux driver source code (downloaded from
http://web.ralinktech.com/ralink/Home/Support/Linux.html  RT61
 ), 

Anyone knows how I can port the Linux driver to u-boot driver

 

Appreciate it if someone can give me some links/hints...

 

Thanks

Lance Zhang

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


[U-Boot] [PATCH] mpc83xx: enable eLBC NAND support for MPC8315ERDB board

2008-11-03 Thread Dave Liu
Signed-off-by: Dave Liu <[EMAIL PROTECTED]>
---
 include/configs/MPC8315ERDB.h |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/include/configs/MPC8315ERDB.h b/include/configs/MPC8315ERDB.h
index 1225270..64bb62a 100644
--- a/include/configs/MPC8315ERDB.h
+++ b/include/configs/MPC8315ERDB.h
@@ -166,7 +166,7 @@
 #undef CONFIG_SYS_RAMBOOT
 #endif
 
-#define CONFIG_SYS_MONITOR_LEN (256 * 1024) /* Reserve 256 kB for Mon 
*/
+#define CONFIG_SYS_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Mon 
*/
 #define CONFIG_SYS_MALLOC_LEN  (512 * 1024) /* Reserved for malloc */
 
 /*
@@ -223,15 +223,17 @@
  */
 #define CONFIG_SYS_NAND_BASE   0xE060  /* 0xE060 */
 #define CONFIG_SYS_MAX_NAND_DEVICE 1
-#define NAND_MAX_CHIPS 1
-#define CONFIG_MTD_NAND_VERIFY_WRITE
+#define NAND_MAX_CHIPS 1
+#define CONFIG_MTD_NAND_VERIFY_WRITE   1
+#define CONFIG_CMD_NAND1
+#define CONFIG_NAND_FSL_ELBC   1
 
-#define CONFIG_SYS_BR1_PRELIM  ( CONFIG_SYS_NAND_BASE \
+#define CONFIG_SYS_BR1_PRELIM  ( CONFIG_SYS_NAND_BASE \
| (2

Re: [U-Boot] [PATCH] drivers/qe/uec_phy.c: Added PHY-less (fixed PHY) driver.

2008-11-03 Thread Ben Warren
Richard Retanubun wrote:
> Copied over the fixed PHY driver as used in pp4xx/4xx_enet.c.
> This adds support for PHY-less MAC connections to the UEC.
>
> Signed-off-by: Richard Retanubun <[EMAIL PROTECTED]>
> ---
>  drivers/qe/uec_phy.c |   79 
> ++
>  1 files changed, 79 insertions(+), 0 deletions(-)
>
>   


Applied to net repo.

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


[U-Boot] [PATCH 2/3][ppc4xx] Moved PPC4xx EMAC driver to drivers/net

2008-11-03 Thread Ben Warren
Signed-off-by: Ben Warren <[EMAIL PROTECTED]>
---
Rebased against 4xx tree.  Please test and ACK/NAK.

 cpu/ppc4xx/Makefile|1 -
 {cpu/ppc4xx => drivers/net}/4xx_enet.c |0 
 drivers/net/Makefile   |1 +
 3 files changed, 1 insertions(+), 1 deletions(-)
 rename {cpu/ppc4xx => drivers/net}/4xx_enet.c (100%)

diff --git a/cpu/ppc4xx/Makefile b/cpu/ppc4xx/Makefile
index adfe13c..463b575 100644
--- a/cpu/ppc4xx/Makefile
+++ b/cpu/ppc4xx/Makefile
@@ -38,7 +38,6 @@ COBJS += 44x_spd_ddr2.o
 ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION
 COBJS  += 4xx_ibm_ddr2_autocalib.o
 endif
-COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o
 COBJS  += 4xx_pci.o
 COBJS  += 4xx_pcie.o
 COBJS  += bedbug_405.o
diff --git a/cpu/ppc4xx/4xx_enet.c b/drivers/net/4xx_enet.c
similarity index 100%
rename from cpu/ppc4xx/4xx_enet.c
rename to drivers/net/4xx_enet.c
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 439c354..9e4a854 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -54,6 +54,7 @@ COBJS-$(CONFIG_NS8382X) += ns8382x.o
 COBJS-$(CONFIG_DRIVER_NS9750_ETHERNET) += ns9750_eth.o
 COBJS-$(CONFIG_PCNET) += pcnet.o
 COBJS-$(CONFIG_PLB2800_ETHER) += plb2800_eth.o
+COBJS-$(CONFIG_PPC4xx_EMAC) += 4xx_enet.o
 COBJS-$(CONFIG_DRIVER_RTL8019) += rtl8019.o
 COBJS-$(CONFIG_RTL8139) += rtl8139.o
 COBJS-$(CONFIG_RTL8169) += rtl8169.o
-- 
1.5.4.3

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


[U-Boot] [PATCH 3/3][ppc4xx] Moved initialization of PPC4xx EMAC to cpu_eth_init()

2008-11-03 Thread Ben Warren
Removed initialization of the driver from net/eth.c

Signed-off-by: Ben Warren <[EMAIL PROTECTED]>
---
Rebased against 4xx tree.  Please test and ACK/NAK.

 cpu/ppc4xx/cpu.c |   14 ++
 include/netdev.h |1 +
 net/eth.c|4 
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/cpu/ppc4xx/cpu.c b/cpu/ppc4xx/cpu.c
index a676b30..1f0b56c 100644
--- a/cpu/ppc4xx/cpu.c
+++ b/cpu/ppc4xx/cpu.c
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -693,3 +694,16 @@ void reset_4xx_watchdog(void)
mtspr(tsr, 0x4000);
 }
 #endif /* CONFIG_WATCHDOG */
+
+/*
+ * Initializes on-chip ethernet controllers.
+ * to override, implement board_eth_init()
+ */
+int cpu_eth_init(bd_t *bis)
+{
+#if defined(CONFIG_PPC4xx_EMAC)
+   ppc_4xx_eth_initialize(bis);
+#endif
+   return 0;
+}
+
diff --git a/include/netdev.h b/include/netdev.h
index 87d578c..620f9d6 100644
--- a/include/netdev.h
+++ b/include/netdev.h
@@ -58,6 +58,7 @@ int natsemi_initialize(bd_t *bis);
 int ns8382x_initialize(bd_t *bis);
 int pcnet_initialize(bd_t *bis);
 int plb2800_eth_initialize(bd_t *bis);
+int ppc_4xx_eth_initialize (bd_t *bis);
 int rtl8139_initialize(bd_t *bis);
 int rtl8169_initialize(bd_t *bis);
 int skge_initialize(bd_t *bis);
diff --git a/net/eth.c b/net/eth.c
index a354e76..c4534d0 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -44,7 +44,6 @@ extern int fec_initialize(bd_t*);
 extern int mpc8220_fec_initialize(bd_t*);
 extern int mv6436x_eth_initialize(bd_t *);
 extern int mv6446x_eth_initialize(bd_t *);
-extern int ppc_4xx_eth_initialize(bd_t *);
 extern int scc_initialize(bd_t*);
 extern int npe_initialize(bd_t *);
 extern int uec_initialize(int);
@@ -159,9 +158,6 @@ int eth_initialize(bd_t *bis)
 #if defined(CONFIG_DB64460) || defined(CONFIG_P3Mx)
mv6446x_eth_initialize(bis);
 #endif
-#if defined(CONFIG_PPC4xx_EMAC)
-   ppc_4xx_eth_initialize(bis);
-#endif
 #ifdef SCC_ENET
scc_initialize(bis);
 #endif
-- 
1.5.4.3

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