Re: [U-Boot] [PATCH 1/1] Make FAT code comply to coding rules.

2008-12-09 Thread Remy Bohmer
Hello Wolfgang,

> ...but your new code has new issues, too.

Nothing is perfect... Making this code perfect would require a
complete rewrite... ;-)
The (original) code is buggy too, because I have discovered a strange
bug which is causing me quite some headaches last week... ;-)
(I have a usb stick here which shows different contents in U-boot than
on Linux/Windows, U-boot shows the contents that was on the stick a
long time ago, and what it reads is even valid...)

At least formatting/whitespaces/tabs is better now.
Long indentations and similar code has been moved into separate
routines and so on.

> And this...
>> - actsize=bytesperclust;
>> - endclust=curclust;
>> - do {
>> + actsize = bytesperclust;
>> + endclust = curclust;
>> + for (;;) {
>>   /* search for consecutive clusters */
>> - while(actsize < filesize) {
>> + while (actsize < filesize) {
>>   newclust = get_fatent(mydata, endclust);
>> - if((newclust -1)!=endclust)
>> - goto getit;
>> + if ((newclust - 1) != endclust) {
>> + if (get_cluster(mydata, curclust, buffer,
>> +(int)actsize) != 0) 
>> {
>> + FAT_ERROR("Error reading cluster\n");
>> + return -1;
>> + }
>> + gotsize += (int)actsize;
>> + filesize -= actsize;
>> + buffer += actsize;
>> + curclust = get_fatent(mydata, endclust);
>> + if (CHECK_CLUST(curclust, mydata->fatsize)) {
>> + FAT_DPRINT("curclust: 0x%x\n",
>> +curclust);
>> + FAT_ERROR("Invalid FAT entry\n");
>> + return gotsize;
>> + }
>> + actsize = bytesperclust;
>> + endclust = curclust;
>> + continue;
>> + }
>
> ...looks like a massive code change, not only a coding style cleanup.

No, I just reordered a strange construction, by moved a piece of code
that could only be reached by goto to a label to the place where the
goto was listed.
This made the code more readable. To me this is still just coding style.

> Please submit as two separate patches.

There are a few little things that could be put into a separate patch.
I will see what I can do...

Kind regards,

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


[U-Boot] [PATCH v3] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Dirk Eibach
Board support for the Guntermann & Drunck PowerPC 440 ETX module.
Based on the AMCC Yosemite board support by Stefan Roese.

Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
---

 Cleaned up copyright and whitespace issues.
 Depends on [PATCH v2] ppc4xx-Improve-DDR-autodetect.

 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/gdsys/gdppc440etx/Makefile  |   51 +
 board/gdsys/gdppc440etx/config.mk |   44 +
 board/gdsys/gdppc440etx/gdppc440etx.c |  331 +
 board/gdsys/gdppc440etx/init.S|   75 
 board/gdsys/gdppc440etx/u-boot.lds|  144 ++
 include/configs/gdppc440etx.h |  203 
 9 files changed, 853 insertions(+), 0 deletions(-)
 create mode 100644 board/gdsys/gdppc440etx/Makefile
 create mode 100644 board/gdsys/gdppc440etx/config.mk
 create mode 100644 board/gdsys/gdppc440etx/gdppc440etx.c
 create mode 100644 board/gdsys/gdppc440etx/init.S
 create mode 100644 board/gdsys/gdppc440etx/u-boot.lds
 create mode 100644 include/configs/gdppc440etx.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 127604b..b836263 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -132,6 +132,7 @@ Jon Diekema <[EMAIL PROTECTED]>
 
 Dirk Eibach <[EMAIL PROTECTED]>
 
+   gdppc440etx PPC440EP/GR
neo PPC405EP
 
 Dave Ellis <[EMAIL PROTECTED]>
diff --git a/MAKEALL b/MAKEALL
index dbed268..3789bb9 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -188,6 +188,7 @@ LIST_4xx="  \
EXBITGEN\
fx12mm  \
G2000   \
+   gdppc440etx \
glacier \
haleakala   \
haleakala_nand  \
diff --git a/Makefile b/Makefile
index befb608..d77ab3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1315,6 +1315,9 @@ fx12mm_config: unconfig
 G2000_config:  unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000
 
+gdppc440etx_config:unconfig
+   @$(MKCONFIG) $(@:_config=) ppc ppc4xx gdppc440etx gdsys
+
 hcu4_config:   unconfig
@mkdir -p $(obj)board/netstal/common
@$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu4 netstal
diff --git a/board/gdsys/gdppc440etx/Makefile b/board/gdsys/gdppc440etx/Makefile
new file mode 100644
index 000..b93f2c3
--- /dev/null
+++ b/board/gdsys/gdppc440etx/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2002-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o
+SOBJS  = init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/gdsys/gdppc440etx/config.mk 
b/board/gdsys/gdppc440etx/config.mk
new file mode 100644
index 000..045f3e9
--- /dev/null
+++ b/board/gdsys/gdppc440etx/config.mk
@@ -0,0 +1,44 @@
+#
+# (C) Copyright 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Su

[U-Boot] [PATCH v2] ppc4xx: Improve DDR autodetect

2008-12-09 Thread Dirk Eibach
Added support for a second memory bank to DDR autodetection for 440
platforms.
Made hardcoded values configurable.

Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
---

 Cleaned up whitespace issues

 cpu/ppc4xx/sdram.c |   55 +++
 1 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/cpu/ppc4xx/sdram.c b/cpu/ppc4xx/sdram.c
index 6d5f8d6..b1d82f8 100644
--- a/cpu/ppc4xx/sdram.c
+++ b/cpu/ppc4xx/sdram.c
@@ -259,6 +259,7 @@ phys_size_t initdram(int board_type)
 #ifndef CONFIG_SYS_SDRAM_TABLE
 sdram_conf_t mb0cf[] = {
{(256 << 20), 13, 0x000C4001},  /* 256MB mode 3, 13x10(4)   */
+   {(128 << 20), 13, 0x000A4001},  /* 128MB mode 3, 13x10(4)   */
{(64 << 20),  12, 0x00082001}   /* 64MB mode 2, 12x9(4) */
 };
 #else
@@ -269,6 +270,18 @@ sdram_conf_t mb0cf[] = CONFIG_SYS_SDRAM_TABLE;
 #defineCONFIG_SYS_SDRAM0_TR0   0x41094012
 #endif
 
+#ifndef CONFIG_SYS_SDRAM0_WDDCTR
+#defineCONFIG_SYS_SDRAM0_WDDCTR0x  /* wrcp=0 dcd=0 
*/
+#endif
+
+#ifndef CONFIG_SYS_SDRAM0_RTR
+#define CONFIG_SYS_SDRAM0_RTR  0x0410 /* 7.8us @ 133MHz PLB */
+#endif
+
+#ifndef CONFIG_SYS_SDRAM0_CFG0
+#define CONFIG_SYS_SDRAM0_CFG0 0x8200 /* DCEN=1, PMUD=0, 64-bit */
+#endif
+
 #define N_MB0CF (sizeof(mb0cf) / sizeof(mb0cf[0]))
 
 #define NUM_TRIES 64
@@ -378,7 +391,7 @@ phys_size_t initdram(int board_type)
mtsdram(mem_uabba, 0x); /* ubba=0 (default) 
*/
mtsdram(mem_slio, 0x);  /* rdre=0 wrre=0 rarw=0 
*/
mtsdram(mem_devopt, 0x); /* dll=0 ds=0 (normal) 
*/
-   mtsdram(mem_wddctr, 0x); /* wrcp=0 dcd=0
*/
+   mtsdram(mem_wddctr, CONFIG_SYS_SDRAM0_WDDCTR);
mtsdram(mem_clktr, 0x4000); /* clkp=1 (90 deg wr) dcdt=0
*/
 
/*
@@ -387,31 +400,63 @@ phys_size_t initdram(int board_type)
mtsdram(mem_b0cr, mb0cf[i].reg);
mtsdram(mem_tr0, CONFIG_SYS_SDRAM0_TR0);
mtsdram(mem_tr1, 0x80800800);   /* SS=T2 SL=STAGE 3 CD=1 
CT=0x00*/
-   mtsdram(mem_rtr, 0x0410);   /* Interval 7.8µs @ 133MHz PLB  
*/
+   mtsdram(mem_rtr, CONFIG_SYS_SDRAM0_RTR);
mtsdram(mem_cfg1, 0x);  /* Self-refresh exit, disable 
PM*/
udelay(400);/* Delay 200 usecs (min)
*/
 
/*
 * Enable the controller, then wait for DCEN to complete
 */
-   mtsdram(mem_cfg0, 0x8200);  /* DCEN=1, PMUD=0, 64-bit   
*/
+   mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
udelay(1);
 
if (get_ram_size(0, mb0cf[i].size) == mb0cf[i].size) {
+   phys_size_t size = mb0cf[i].size;
/*
 * Optimize TR1 to current hardware environment
 */
sdram_tr1_set(0x, &tr1_bank1);
mtsdram(mem_tr1, (tr1_bank1 | 0x80800800));
 
+
+   /*
+* OK, size detected.  Enable second bank if
+* defined (assumes same type as bank 0)
+*/
+#ifdef CONFIG_SDRAM_BANK1
+   mtsdram(mem_cfg0, 0);
+   mtsdram(mem_b1cr, mb0cf[i].size | mb0cf[i].reg);
+   mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
+   udelay(1);
+
+   /*
+* Check if 2nd bank is really available.
+* If the size not equal to the size of the first
+* bank, then disable the 2nd bank completely.
+*/
+   if (get_ram_size((long *)mb0cf[i].size, mb0cf[i].size)
+   != mb0cf[i].size) {
+   mtsdram(mem_cfg0, 0);
+   mtsdram(mem_b1cr, 0);
+   mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
+   udelay(1);
+   } else {
+   /*
+* We have two identical banks, so the size
+* is twice the bank size
+*/
+   size = 2 * size;
+   }
+#endif
+
 #ifdef CONFIG_SDRAM_ECC
-   ecc_init(0, mb0cf[i].size);
+   ecc_init(0, size);
 #endif
 
/*
 * OK, size detected -> all done
 */
-   return mb0cf[i].size;
+   return size;
}
}
 
-- 
1.5.6.5

___

Re: [U-Boot] [PATCH v3] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Stefan Roese
On Tuesday 09 December 2008, Dirk Eibach wrote:
> Board support for the Guntermann & Drunck PowerPC 440 ETX module.
> Based on the AMCC Yosemite board support by Stefan Roese.

Looks good. Please find some furthe comments below though.



> diff --git a/board/gdsys/gdppc440etx/gdppc440etx.c
> b/board/gdsys/gdppc440etx/gdppc440etx.c new file mode 100644
> index 000..d9982cd
> --- /dev/null
> +++ b/board/gdsys/gdppc440etx/gdppc440etx.c
> @@ -0,0 +1,331 @@
> +/*
> + * (C) Copyright 2008
> + * Dirk Eibach,  Guntermann & Drunck GmbH, [EMAIL PROTECTED]
> + *
> + * Based on board/amcc/yosemite/yosemite.c
> + * (C) Copyright 2006-2007
> + * Stefan Roese, DENX Software Engineering, [EMAIL PROTECTED]
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 

Is this include needed?

> +#include 
> +#include 

And the fdt includes as well?

> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +/* info for FLASH chips */
> +extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
> +
> +int board_early_init_f(void)
> +{
> + register uint reg;
> +
> + /*
> +  * Setup the external bus controller/chip selects
> +  */
> + mtdcr(ebccfga, xbcfg);
> + reg = mfdcr(ebccfgd);

How about using the mfebc macro:

mfebc(xbcfg, reg);

> + mtdcr(ebccfgd, reg | 0x0400);   /* Set ATC */

mtebc()

> +
> + /*
> +  * Setup the GPIO pins
> +  */
> +
> + /* setup Address lines for flash size 64Meg. */
> + out32(GPIO0_OSRL, in32(GPIO0_OSRL) | 0x5400);
> + out32(GPIO0_TSRL, in32(GPIO0_TSRL) | 0x5400);
> + out32(GPIO0_ISR1L, in32(GPIO0_ISR1L) | 0x5400);
> +
> + /* setup emac */
> + out32(GPIO0_TCR, in32(GPIO0_TCR) | 0xC080);
> + out32(GPIO0_TSRL, in32(GPIO0_TSRL) | 0x40);
> + out32(GPIO0_ISR1L, in32(GPIO0_ISR1L) | 0x55);
> + out32(GPIO0_OSRH, in32(GPIO0_OSRH) | 0x50004000);
> + out32(GPIO0_ISR1H, in32(GPIO0_ISR1H) | 0x0044);
> +
> + /*UART0 and UART1*/
> + out32(GPIO1_TCR, in32(GPIO1_TCR) | 0x1600);
> + out32(GPIO1_OSRL, in32(GPIO1_OSRL)   | 0x0218);
> + out32(GPIO1_ISR1L, in32(GPIO1_ISR1L) | 0x0040);
> + out32(GPIO1_ISR2L, in32(GPIO1_ISR2L) | 0x0401);
> +
> + /* disable boot-eeprom WP */
> + out32(GPIO0_OSRL, in32(GPIO0_OSRL) & ~0x00C0);
> + out32(GPIO0_TSRL, in32(GPIO0_TSRL) & ~0x00C0);
> + out32(GPIO0_ISR1L, in32(GPIO0_ISR1L) & ~0x00C0);
> + out32(GPIO0_TCR, in32(GPIO0_TCR) | 0x0800);
> + out32(GPIO0_OR, in32(GPIO0_OR) & ~0x0800);
> +
> + /* external interrupts IRQ0...3 */
> + out32(GPIO1_TCR, in32(GPIO1_TCR) & ~0x00f0);
> + out32(GPIO1_TSRL, in32(GPIO1_TSRL) & ~0x5500);
> + out32(GPIO1_ISR1L, in32(GPIO1_ISR1L) | 0x5500);
> +
> +
> + /*
> +  * Setup the interrupt controller polarities, triggers, etc.
> +  */
> + mtdcr(uic0sr, 0x);  /* clear all */
> + mtdcr(uic0er, 0x);  /* disable all */
> + mtdcr(uic0cr, 0x0009);  /* ATI & UIC1 crit are critical */
> + mtdcr(uic0pr, 0xfe13);  /* per ref-board manual */
> + mtdcr(uic0tr, 0x01c8);  /* per ref-board manual */
> + mtdcr(uic0vr, 0x0001);  /* int31 highest, base=0x000 */
> + mtdcr(uic0sr, 0x);  /* clear all */
> +
> + mtdcr(uic1sr, 0x);  /* clear all */
> + mtdcr(uic1er, 0x);  /* disable all */
> + mtdcr(uic1cr, 0x);  /* all non-critical */
> + mtdcr(uic1pr, 0xe0ff);  /* per ref-board manual */
> + mtdcr(uic1tr, 0x00ffc000);  /* per ref-board manual */
> + mtdcr(uic1vr, 0x0001);  /* int31 highest, base=0x000 */
> + mtdcr(uic1sr, 0x);  /* clear all */
> +
> + /*
> +  * Setup other serial configuration
> +  */
> + mfsdr(sdr_pci0, reg);
> + mtsdr(sdr_pci0, 0x8000 | reg);  /* PCI arbiter enabled */
> + mtsdr(sdr_pfc0, 0x3e00);/* Pin function */
> + mtsdr(sdr_pfc1, 0x00048000);/* Pin function: UART0 has 4 pins */
> +
> + return 0;
> +}
> +
> +int misc_init_r(void)
> +{
> + 

Re: [U-Boot] [PATCH v2] ppc4xx: Improve DDR autodetect

2008-12-09 Thread Stefan Roese
On Tuesday 09 December 2008, Dirk Eibach wrote:
> Added support for a second memory bank to DDR autodetection for 440
> platforms.
> Made hardcoded values configurable.

Looks good. Only nitpicking comments below.

> Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
> ---
>
>  Cleaned up whitespace issues
>
>  cpu/ppc4xx/sdram.c |   55
> +++ 1 files changed, 50
> insertions(+), 5 deletions(-)
>
> diff --git a/cpu/ppc4xx/sdram.c b/cpu/ppc4xx/sdram.c
> index 6d5f8d6..b1d82f8 100644
> --- a/cpu/ppc4xx/sdram.c
> +++ b/cpu/ppc4xx/sdram.c
> @@ -259,6 +259,7 @@ phys_size_t initdram(int board_type)
>  #ifndef CONFIG_SYS_SDRAM_TABLE
>  sdram_conf_t mb0cf[] = {
>   {(256 << 20), 13, 0x000C4001},  /* 256MB mode 3, 13x10(4)   */
> + {(128 << 20), 13, 0x000A4001},  /* 128MB mode 3, 13x10(4)   */
>   {(64 << 20),  12, 0x00082001}   /* 64MB mode 2, 12x9(4) */
>  };
>  #else
> @@ -269,6 +270,18 @@ sdram_conf_t mb0cf[] = CONFIG_SYS_SDRAM_TABLE;
>  #define  CONFIG_SYS_SDRAM0_TR0   0x41094012
>  #endif
>
> +#ifndef CONFIG_SYS_SDRAM0_WDDCTR
> +#define  CONFIG_SYS_SDRAM0_WDDCTR0x  /* wrcp=0 dcd=0 
> */

Use space after "#define" instead of tab please.

> +#endif
> +
> +#ifndef CONFIG_SYS_SDRAM0_RTR
> +#define CONFIG_SYS_SDRAM0_RTR0x0410 /* 7.8us @ 133MHz 
> PLB */
> +#endif
> +
> +#ifndef CONFIG_SYS_SDRAM0_CFG0
> +#define CONFIG_SYS_SDRAM0_CFG0   0x8200 /* DCEN=1, PMUD=0, 
> 64-bit */
> +#endif
> +
>  #define N_MB0CF (sizeof(mb0cf) / sizeof(mb0cf[0]))
>
>  #define NUM_TRIES 64
> @@ -378,7 +391,7 @@ phys_size_t initdram(int board_type)
>   mtsdram(mem_uabba, 0x); /* ubba=0 (default) 
> */
>   mtsdram(mem_slio, 0x);  /* rdre=0 wrre=0 rarw=0 
> */
>   mtsdram(mem_devopt, 0x); /* dll=0 ds=0 (normal) 
> */
> - mtsdram(mem_wddctr, 0x); /* wrcp=0 dcd=0
> */
> + mtsdram(mem_wddctr, CONFIG_SYS_SDRAM0_WDDCTR);
>   mtsdram(mem_clktr, 0x4000); /* clkp=1 (90 deg wr) dcdt=0
> */
>
>   /*
> @@ -387,31 +400,63 @@ phys_size_t initdram(int board_type)
>   mtsdram(mem_b0cr, mb0cf[i].reg);
>   mtsdram(mem_tr0, CONFIG_SYS_SDRAM0_TR0);
>   mtsdram(mem_tr1, 0x80800800);   /* SS=T2 SL=STAGE 3 CD=1 
> CT=0x00*/
> - mtsdram(mem_rtr, 0x0410);   /* Interval 7.8µs @ 133MHz PLB  
> */
> + mtsdram(mem_rtr, CONFIG_SYS_SDRAM0_RTR);
>   mtsdram(mem_cfg1, 0x);  /* Self-refresh exit, disable 
> PM*/
>   udelay(400);/* Delay 200 usecs (min)
> */
>
>   /*
>* Enable the controller, then wait for DCEN to complete
>*/
> - mtsdram(mem_cfg0, 0x8200);  /* DCEN=1, PMUD=0, 64-bit   
> */
> + mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
>   udelay(1);
>
>   if (get_ram_size(0, mb0cf[i].size) == mb0cf[i].size) {
> + phys_size_t size = mb0cf[i].size;
>   /*
>* Optimize TR1 to current hardware environment
>*/
>   sdram_tr1_set(0x, &tr1_bank1);
>   mtsdram(mem_tr1, (tr1_bank1 | 0x80800800));
>
> +
> + /*
> +  * OK, size detected.  Enable second bank if
> +  * defined (assumes same type as bank 0)
> +  */
> +#ifdef CONFIG_SDRAM_BANK1
> + mtsdram(mem_cfg0, 0);
> + mtsdram(mem_b1cr, mb0cf[i].size | mb0cf[i].reg);
> + mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
> + udelay(1);
> +
> + /*
> +  * Check if 2nd bank is really available.
> +  * If the size not equal to the size of the first
> +  * bank, then disable the 2nd bank completely.
> +  */
> + if (get_ram_size((long *)mb0cf[i].size, mb0cf[i].size)
> + != mb0cf[i].size) {
> + mtsdram(mem_cfg0, 0);
> + mtsdram(mem_b1cr, 0);
> + mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
> + udelay(1);
> + } else {
> + /*
> +  * We have two identical banks, so the size
> +  * is twice the bank size
> +  */
> + size = 2 * size;
> + }
> +#endif
> +
>  #ifdef CONFIG_SDRAM_ECC
> - ecc_init(0, mb0cf[i].size);
> + ecc_init(0, size);
>  #endif
>
>   

Re: [U-Boot] [PATCH v2] mgcoge make ether_scc.c work with CONFIG_NET_MULTI

2008-12-09 Thread Gary Jennejohn
On Mon, 08 Dec 2008 14:05:22 -0800
Ben Warren <[EMAIL PROTECTED]> wrote:

> Wolfgang Denk wrote:
> > Dear Ben,
> >
> > In message <[EMAIL PROTECTED]> Gary Jennejohn wrote:
> >   
> >> This change is needed for mgcoge because it uses two ethernet drivers.
> >>
> >> Add a check for the presence of the PIGGY board on mgcoge.  Without this
> >> board networking cannot work and the initialization must be aborted.
> >>
> >> Only allocate rtx once to prevent DPRAM exhaustion.
> >>
> >> Initialize ether_scc.c and the keymile-specific HDLC driver (to be added
> >> soon) in eth.c.
> >>
> >> Signed-off-by: Gary Jennejohn <[EMAIL PROTECTED]>
> >> 
> >
> > Any comments on this?
> >
> > Best regards,
> >
> > Wolfgang Denk
> >
> >   
> Looks like I pulled it into the 'next' branch and forgot to tell anyone 
> :-(  Do you want it in the current release?
> 

You told me :-)

---
Gary Jennejohn
*
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] OneNAND: Fix compiler warnings

2008-12-09 Thread Amit Kumar Sharma
HI
- Original Message - 
From: "Stefan Roese" <[EMAIL PROTECTED]>
To: "Kyungmin Park" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; 
Sent: Tuesday, December 09, 2008 11:57 AM
Subject: Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings


> On Tuesday 09 December 2008, Kyungmin Park wrote:
>> > In short: we need a OneNAND custodian, and we need him 
>> > badly.
>> >
I would  like to work as OneNAND custodian ,Our team is 
already working for FlexOneNAND related parts , what is 
opinion of you guys.
>> > Is any of you volunteering, or knows of a potential 
>> > candidate?
>>
>> Stefan,
>>
>> Even though It's some difficult to access the external 
>> server, I can
>> access http protocol. So I can pull the git. So if you 
>> control the git
>> then I generate and send a patch against the OneNAND 
>> tree.
>>
>> Or other ideas?
>
> Till now Scott has takes care of the OneNAND related 
> patches in his NAND
> repository. The latest patches are already present in his 
> next branch, IIRC.
>
> I'm not sure how you feel about this Scott. Are you 
> willing to officially
> handle this OneNAND stuff further?
>
> 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 mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-12-09 Thread Stefan Roese
The following changes since commit 13d36ec849785453953d00220b2c7dc66644a3c2:
  Wolfgang Denk (1):
Merge branch 'master' of git://git.denx.de/u-boot-at91

are available in the git repository at:

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

Stefan Roese (3):
  MTD: Fix problem based on non-working relocation (list head 
mtd_partitions)
  UBI: Enable re-initializing of the "ubi part" command
  UBI: Fix size parsing in "ubi create"

 common/cmd_ubi.c|   13 -
 drivers/mtd/mtdpart.c   |   10 +-
 drivers/mtd/ubi/build.c |1 +
 include/ubi_uboot.h |1 +
 4 files changed, 23 insertions(+), 2 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings

2008-12-09 Thread Stefan Roese
Hi Amit,

On Tuesday 09 December 2008, Amit Kumar Sharma wrote:
> >> > In short: we need a OneNAND custodian, and we need him
> >> > badly.
>
> I would  like to work as OneNAND custodian ,Our team is
> already working for FlexOneNAND related parts , what is
> opinion of you guys.

Guessing from your email address, you are a co-worker of Kyungmin. Correct? 
Don't you have the same problems accessing the DENX git repositories as 
Kyungmin has?

Please don't get me wrong. I would really appreciate if you (and/or Kyungmin) 
would become the OneNAND custodian (if we really decide that we should create 
such a custodianship). Just checking if the infrastructure if working for 
you.

Thanks.

Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Dirk Eibach
Board support for the Guntermann & Drunck PowerPC 440 ETX module.
Based on the AMCC Yosemite board support by Stefan Roese.

Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
---

 Depends on [PATCH v3] ppc4xx: Improve DDR autodetect

 Removed legacy includes in board/gdsys/gdppc440etx/gdppc440etx.c.
 Used mfebc()/mtebc() in board/gdsys/gdppc440etx/gdppc440etx.c.
 Identation with tabs instead of spaces in include/configs/gdppc440etx.h.

 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/gdsys/gdppc440etx/Makefile  |   51 +
 board/gdsys/gdppc440etx/config.mk |   44 +
 board/gdsys/gdppc440etx/gdppc440etx.c |  325 +
 board/gdsys/gdppc440etx/init.S|   75 
 board/gdsys/gdppc440etx/u-boot.lds|  144 +++
 include/configs/gdppc440etx.h |  194 
 9 files changed, 838 insertions(+), 0 deletions(-)
 create mode 100644 Makefile
 create mode 100644 board/gdsys/gdppc440etx/config.mk
 create mode 100644 board/gdsys/gdppc440etx/gdppc440etx.c
 create mode 100644 board/gdsys/gdppc440etx/init.S
 create mode 100644 board/gdsys/gdppc440etx/u-boot.lds
 create mode 100644 include/configs/gdppc440etx.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 127604b..b836263 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -132,6 +132,7 @@ Jon Diekema <[EMAIL PROTECTED]>
 
 Dirk Eibach <[EMAIL PROTECTED]>
 
+   gdppc440etx PPC440EP/GR
neo PPC405EP
 
 Dave Ellis <[EMAIL PROTECTED]>
diff --git a/MAKEALL b/MAKEALL
index dbed268..3789bb9 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -188,6 +188,7 @@ LIST_4xx="  \
EXBITGEN\
fx12mm  \
G2000   \
+   gdppc440etx \
glacier \
haleakala   \
haleakala_nand  \
diff --git a/Makefile b/Makefile
index befb608..d77ab3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1315,6 +1315,9 @@ fx12mm_config: unconfig
 G2000_config:  unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000
 
+gdppc440etx_config:unconfig
+   @$(MKCONFIG) $(@:_config=) ppc ppc4xx gdppc440etx gdsys
+
 hcu4_config:   unconfig
@mkdir -p $(obj)board/netstal/common
@$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu4 netstal
diff --git a/board/gdsys/gdppc440etx/Makefile b/board/gdsys/gdppc440etx/Makefile
new file mode 100644
index 000..b93f2c3
--- /dev/null
+++ b/board/gdsys/gdppc440etx/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2002-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o
+SOBJS  = init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/gdsys/gdppc440etx/config.mk 
b/board/gdsys/gdppc440etx/config.mk
new file mode 100644
index 000..045f3e9
--- /dev/null
+++ b/board/gdsys/gdppc440etx/config.mk
@@ -0,0 +1,44 @@
+#
+# (C) Copyright 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy

[U-Boot] [PATCH v5] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Dirk Eibach
Board support for the Guntermann & Drunck PowerPC 440 ETX module.
Based on the AMCC Yosemite board support by Stefan Roese.

Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
---

 Depends on [PATCH v3] ppc4xx: Improve DDR autodetect

 More whitespace rework.

 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/gdsys/gdppc440etx/Makefile  |   51 +
 board/gdsys/gdppc440etx/config.mk |   44 +
 board/gdsys/gdppc440etx/gdppc440etx.c |  325 +
 board/gdsys/gdppc440etx/init.S|   75 
 board/gdsys/gdppc440etx/u-boot.lds|  144 +++
 include/configs/gdppc440etx.h |  194 
 9 files changed, 838 insertions(+), 0 deletions(-)
 create mode 100644 board/gdsys/gdppc440etx/Makefile
 create mode 100644 board/gdsys/gdppc440etx/config.mk
 create mode 100644 board/gdsys/gdppc440etx/gdppc440etx.c
 create mode 100644 board/gdsys/gdppc440etx/init.S
 create mode 100644 board/gdsys/gdppc440etx/u-boot.lds
 create mode 100644 include/configs/gdppc440etx.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 127604b..b836263 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -132,6 +132,7 @@ Jon Diekema <[EMAIL PROTECTED]>
 
 Dirk Eibach <[EMAIL PROTECTED]>
 
+   gdppc440etx PPC440EP/GR
neo PPC405EP
 
 Dave Ellis <[EMAIL PROTECTED]>
diff --git a/MAKEALL b/MAKEALL
index dbed268..3789bb9 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -188,6 +188,7 @@ LIST_4xx="  \
EXBITGEN\
fx12mm  \
G2000   \
+   gdppc440etx \
glacier \
haleakala   \
haleakala_nand  \
diff --git a/Makefile b/Makefile
index befb608..d77ab3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1315,6 +1315,9 @@ fx12mm_config: unconfig
 G2000_config:  unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000
 
+gdppc440etx_config:unconfig
+   @$(MKCONFIG) $(@:_config=) ppc ppc4xx gdppc440etx gdsys
+
 hcu4_config:   unconfig
@mkdir -p $(obj)board/netstal/common
@$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu4 netstal
diff --git a/board/gdsys/gdppc440etx/Makefile b/board/gdsys/gdppc440etx/Makefile
new file mode 100644
index 000..b93f2c3
--- /dev/null
+++ b/board/gdsys/gdppc440etx/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2002-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o
+SOBJS  = init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/gdsys/gdppc440etx/config.mk 
b/board/gdsys/gdppc440etx/config.mk
new file mode 100644
index 000..045f3e9
--- /dev/null
+++ b/board/gdsys/gdppc440etx/config.mk
@@ -0,0 +1,44 @@
+#
+# (C) Copyright 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+

Re: [U-Boot] [PATCH v5] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Stefan Roese
Hi Dirk,

On Tuesday 09 December 2008, Dirk Eibach wrote:
> Board support for the Guntermann & Drunck PowerPC 440 ETX module.
> Based on the AMCC Yosemite board support by Stefan Roese.
>
> Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
> ---
>
>  Depends on [PATCH v3] ppc4xx: Improve DDR autodetect
>
>  More whitespace rework.

It's really not a big deal, but since I addressed these issues in my last mail 
again, I noticed them in this version as well.



> +#define  CONFIG_SYS_SDRAM0_TR0   0x410a4012
> +#define  CONFIG_SYS_SDRAM0_WDDCTR0x4000

Tab after #define! You seem to have missed this one. Did you ever try running 
checkpatch on your patch? This should spot such problems.

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] show_boot_progess @ ppc not working

2008-12-09 Thread Heiko Schocher
Hello Andre,

Andre Schwarz schrieb:
> All,
>
> can someone tell me why the board specific function "void
> show_boot_progress(int arg)"
> is no longer called (at least on MPC5200).
>
> Of course this line is present in the board config :
>
> #define CONFIG_SHOW_BOOT_PROGRESS 1
>
>
> What have I missed ?
>   
The show_boot_progress () function was changed in a weak function,
see commit:

make show_boot_progress () weak.

authorHeiko Schocher <[EMAIL PROTECTED]>
 Fri, 13 Jul 2007 07:54:17 + (09:54 +0200)
committerHeiko Schocher <[EMAIL PROTECTED]>
 Fri, 13 Jul 2007 07:54:17 + (09:54 +0200)
commitfad63407154f46246ce80d53a9c669a44362ac67

For what board exactly is it not working?

Maybe a problem with your compiler?

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


Re: [U-Boot] show_boot_progess @ ppc not working

2008-12-09 Thread Andre Schwarz
Heiko Schocher schrieb:
> Hello Andre,
>
> Andre Schwarz schrieb:
>   
>> All,
>>
>> can someone tell me why the board specific function "void
>> show_boot_progress(int arg)"
>> is no longer called (at least on MPC5200).
>>
>> Of course this line is present in the board config :
>>
>> #define CONFIG_SHOW_BOOT_PROGRESS 1
>>
>>
>> What have I missed ?
>>   
>> 
> The show_boot_progress () function was changed in a weak function,
> see commit:
>
> make show_boot_progress () weak.
>
> authorHeiko Schocher <[EMAIL PROTECTED]>
>  Fri, 13 Jul 2007 07:54:17 + (09:54 +0200)
> committerHeiko Schocher <[EMAIL PROTECTED]>
>  Fri, 13 Jul 2007 07:54:17 + (09:54 +0200)
> commitfad63407154f46246ce80d53a9c669a44362ac67
>
> For what board exactly is it not working?
>   
mvBC-P (5200 based) -> board/matrix_vision/mvbc_p
> Maybe a problem with your compiler?
>   
Don't know - it's ELDK-4.2 :

ppc_6xx-gcc -v gives :

Reading specs from
/home/eldk-4.2/usr/bin/../lib/gcc/powerpc-linux/4.2.2/specs
Target: powerpc-linux
Configured with:
/opt/eldk/build/ppc-2008-04-01/work/usr/src/denx/BUILD/crosstool-0.43/build/gcc-4.2.2-glibc-20070515T2025-eldk/powerpc-linux/gcc-4.2.2/configure
--target=powerpc-linux --host=i686-host_pc-linux-gnu
--prefix=/var/tmp/eldk.UZpAG7/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/powerpc-linux
--disable-hosted-libstdcxx
--with-headers=/var/tmp/eldk.UZpAG7/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/powerpc-linux/powerpc-linux/include
--with-local-prefix=/var/tmp/eldk.UZpAG7/usr/crosstool/gcc-4.2.2-glibc-20070515T2025-eldk/powerpc-linux/powerpc-linux
--disable-nls --enable-threads=posix --enable-symvers=gnu
--enable-__cxa_atexit --enable-languages=c,c++,java --enable-shared
--enable-c99 --enable-long-long --without-x
Thread model: posix
gcc version 4.2.2

> bye
> Heiko
>   


MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Increase command line size

2008-12-09 Thread Paulo Flabiano Smorigo
Hi everybody,

I want to know how to increase the command line size to more than 255
characters. I want to set the bootargs parameter with more than 300 chars...

Thanks in advance,
Paulo Flabiano Smorigo
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] FSL DDR @ 83xx

2008-12-09 Thread Andre Schwarz
Kim Phillips schrieb:
> On Mon, 08 Dec 2008 18:02:02 +0100
> Andre Schwarz <[EMAIL PROTECTED]> wrote:
>
>   
>> I'd like to change my DDR setup code since it looks like my computed
>> values are not perfectly stable on our 8343 based board.
>>
>> This implies using a fake SPD and the related code to set up the controller.
>>
>> Is the "new" common FSL DDR setup code (cpu/mpc8xxx/ddr/*) stable for
>> 83xx or shall I stick to cpu/mpc83xx/spd_sdram.c for a while ?
>> 
>
> I haven't taken a look at the "new" common ddr code, and there are no
> current 83xx users that I know of, but if you're willing to port it
> over to 83xx, it should work better for you than the current 83xx spd
> code, and give us a basis to work on to move the rest of the 83xx boards
> over.
>
> Kim
>   
ok - thanks. That's why I'm asking ... no 83xx yet.
I'll try the default spd driver with fake EEPROM then.


regards,
André

MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v6] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Dirk Eibach
Board support for the Guntermann & Drunck PowerPC 440 ETX module.
Based on the AMCC Yosemite board support by Stefan Roese.

Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
---

 Depends on [PATCH v3] ppc4xx: Improve DDR autodetect

 More whitespace rework. checkpatch does not find tab after define. Grrr.

 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/gdsys/gdppc440etx/Makefile  |   51 +
 board/gdsys/gdppc440etx/config.mk |   44 +
 board/gdsys/gdppc440etx/gdppc440etx.c |  325 +
 board/gdsys/gdppc440etx/init.S|   75 
 board/gdsys/gdppc440etx/u-boot.lds|  144 +++
 include/configs/gdppc440etx.h |  194 
 9 files changed, 838 insertions(+), 0 deletions(-)
 create mode 100644 board/gdsys/gdppc440etx/Makefile
 create mode 100644 board/gdsys/gdppc440etx/config.mk
 create mode 100644 board/gdsys/gdppc440etx/gdppc440etx.c
 create mode 100644 board/gdsys/gdppc440etx/init.S
 create mode 100644 board/gdsys/gdppc440etx/u-boot.lds
 create mode 100644 include/configs/gdppc440etx.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 127604b..b836263 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -132,6 +132,7 @@ Jon Diekema <[EMAIL PROTECTED]>
 
 Dirk Eibach <[EMAIL PROTECTED]>
 
+   gdppc440etx PPC440EP/GR
neo PPC405EP
 
 Dave Ellis <[EMAIL PROTECTED]>
diff --git a/MAKEALL b/MAKEALL
index dbed268..3789bb9 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -188,6 +188,7 @@ LIST_4xx="  \
EXBITGEN\
fx12mm  \
G2000   \
+   gdppc440etx \
glacier \
haleakala   \
haleakala_nand  \
diff --git a/Makefile b/Makefile
index befb608..d77ab3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1315,6 +1315,9 @@ fx12mm_config: unconfig
 G2000_config:  unconfig
@$(MKCONFIG) $(@:_config=) ppc ppc4xx g2000
 
+gdppc440etx_config:unconfig
+   @$(MKCONFIG) $(@:_config=) ppc ppc4xx gdppc440etx gdsys
+
 hcu4_config:   unconfig
@mkdir -p $(obj)board/netstal/common
@$(MKCONFIG) $(@:_config=) ppc ppc4xx hcu4 netstal
diff --git a/board/gdsys/gdppc440etx/Makefile b/board/gdsys/gdppc440etx/Makefile
new file mode 100644
index 000..b93f2c3
--- /dev/null
+++ b/board/gdsys/gdppc440etx/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2002-2006
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).a
+
+COBJS  = $(BOARD).o
+SOBJS  = init.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(OBJS) $(SOBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/gdsys/gdppc440etx/config.mk 
b/board/gdsys/gdppc440etx/config.mk
new file mode 100644
index 000..045f3e9
--- /dev/null
+++ b/board/gdsys/gdppc440etx/config.mk
@@ -0,0 +1,44 @@
+#
+# (C) Copyright 2002
+# Wolfgang Denk, DENX Software Engineering, [EMAIL PROTECTED]
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Founda

Re: [U-Boot] [PATCH v5] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Eibach, Dirk
Hi Stefan, 

> It's really not a big deal, but since I addressed these 
> issues in my last mail again, I noticed them in this version as well.
> 
> 
> 
> > +#defineCONFIG_SYS_SDRAM0_TR0   0x410a4012
> > +#defineCONFIG_SYS_SDRAM0_WDDCTR0x4000

Oops. Sorry. I thought I had eliminated all of those nasty buggers. 
If I ever get to talk to the person I copied that stuff from... :)
 
> Tab after #define! You seem to have missed this one. Did you 
> ever try running checkpatch on your patch? This should spot 
> such problems.

In fact my version of checkpatch (linux 2.6.27) does not :(
That is why the last one slipped through.
Which version of checkpatch are you using?

Cheers
Dirk

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


Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings

2008-12-09 Thread Amit Kumar Sharma
Hi Stefan,


> Hi Amit,
>
> On Tuesday 09 December 2008, Amit Kumar Sharma wrote:
>> >> > In short: we need a OneNAND custodian, and we need 
>> >> > him
>> >> > badly.
>>
>> I would  like to work as OneNAND custodian ,Our team is
>> already working for FlexOneNAND related parts , what is
>> opinion of you guys.
>
> Guessing from your email address, you are a co-worker of 
> Kyungmin. Correct?
> Don't you have the same problems accessing the DENX git 
> repositories as
> Kyungmin has?
>
Kyungmin and my team part of Samsung but in different 
divisions, I will check in my company about accessing DENX 
git reposotories,Let you know hope we can find some solution 
here.

> Please don't get me wrong. I would really appreciate if 
> you (and/or Kyungmin)
> would become the OneNAND custodian (if we really decide 
> that we should create
> such a custodianship). Just checking if the infrastructure 
> if working for
> you.
 regarding cowork kyungmin can take call , we have no 
problem as cowork or working independent.
I  show our interest because I feel by kyungmin mail , he 
has difficulty and busy with many other activities.


 Thanks.

 Best regards,
Amit Kumar Sharma

> =
> 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] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Stefan Roese
On Tuesday 09 December 2008, Dirk Eibach wrote:
> Board support for the Guntermann & Drunck PowerPC 440 ETX module.
> Based on the AMCC Yosemite board support by Stefan Roese.
>
> Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
> ---
>
>  Depends on [PATCH v3] ppc4xx: Improve DDR autodetect
>
>  Removed legacy includes in board/gdsys/gdppc440etx/gdppc440etx.c.
>  Used mfebc()/mtebc() in board/gdsys/gdppc440etx/gdppc440etx.c.
>  Identation with tabs instead of spaces in include/configs/gdppc440etx.h.

Still some nitpicking comments below.



> diff --git a/include/configs/gdppc440etx.h b/include/configs/gdppc440etx.h
> new file mode 100644
> index 000..edee177
> --- /dev/null
> +++ b/include/configs/gdppc440etx.h
> @@ -0,0 +1,194 @@
> +/*
> + * (C) Copyright 2008
> + * Dirk Eibach,  Guntermann & Drunck GmbH, [EMAIL PROTECTED]
> + *
> + * Based on include/configs/yosemite.h
> + * (C) Copyright 2005-2007
> + * Stefan Roese, DENX Software Engineering, [EMAIL PROTECTED]
> + *
> + * See file CREDITS for list of people who contributed to this
> + * project.
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License as
> + * published by the Free Software Foundation; either version 2 of
> + * the License, or (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.   See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> + * MA 02111-1307 USA
> + */
> +
> +/*
> + * gdppc440etx.h - configuration for G&D 440EP/GR ETX-Module
> + */
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +/*
> + * High Level Configuration Options
> + */
> +#define CONFIG_440GR 1  /* Specific PPC440GR support */
> +#define CONFIG_HOSTNAME  gdppc440etx
> +#define CONFIG_440   1  /* ... PPC440 family */
> +#define CONFIG_4xx   1  /* ... PPC4xx family */
> +#define CONFIG_SYS_CLK_FREQ     /* external freq to pll  */

Please use tab to indent to the comment column as well. 

> +
> +/*
> + * Include common defines/options for all AMCC eval boards
> + */
> +#include "amcc-common.h"
> +
> +#define CONFIG_BOARD_EARLY_INIT_F1 /* call board_early_init_f*/
> +#define CONFIG_MISC_INIT_R   1 /* call misc_init_r() */
> +
> +/*
> + * Base addresses -- Note these are effective addresses where the
> + * actual resources get mapped (not physical addresses)
> + */
> +#define CONFIG_SYS_FLASH_BASE0xfc00  /* start of FLASH   
>  */
> +#define CONFIG_SYS_PCI_MEMBASE   0xa000  /* mapped pci 
> memory */
> +#define CONFIG_SYS_PCI_MEMBASE1  CONFIG_SYS_PCI_MEMBASE  + 
> 0x1000
> +#define CONFIG_SYS_PCI_MEMBASE2  CONFIG_SYS_PCI_MEMBASE1 + 
> 0x1000
> +#define CONFIG_SYS_PCI_MEMBASE3  CONFIG_SYS_PCI_MEMBASE2 + 
> 0x1000
> +
> +/*Don't change either of these*/
> +#define CONFIG_SYS_PERIPHERAL_BASE   0xef60  /* internal peripherals */
> +#define CONFIG_SYS_PCI_BASE  0xe000  /* internal PCI regs */
> +/*Don't change either of these*/
> +
> +#define CONFIG_SYS_USB_DEVICE0x5000
> +#define CONFIG_SYS_BOOT_BASE_ADDR0xf000
> +
> +/*
> + * Initial RAM & stack pointer (placed in SDRAM)
> + */
> +#define CONFIG_SYS_INIT_RAM_DCACHE   1 /* d-cache as init ram*/
> +#define CONFIG_SYS_INIT_RAM_ADDR 0x7000 /* DCache*/
> +#define CONFIG_SYS_INIT_RAM_END  (4 << 10)
> +#define CONFIG_SYS_GBL_DATA_SIZE 256   /* num bytes initial data */
> +#define CONFIG_SYS_GBL_DATA_OFFSET   (CONFIG_SYS_INIT_RAM_END \
> +  - CONFIG_SYS_GBL_DATA_SIZE)
> +#define CONFIG_SYS_INIT_SP_OFFSETCONFIG_SYS_GBL_DATA_OFFSET
> +
> +/*
> + * Serial Port
> + */
> +#define CONFIG_SYS_EXT_SERIAL_CLOCK  11059200 /* use ext. 11.059MHz clk */
> +#define CONFIG_UART1_CONSOLE
> +
> +/*
> + * Environment
> + * Define here the location of the environment variables (FLASH or
> EEPROM). + * Note: DENX encourages to use redundant environment in FLASH.
> + */
> +#define CONFIG_ENV_IS_IN_FLASH   1  /* use FLASH for environment 
> vars */
> +
> +/*
> + * FLASH related
> + */
> +#define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible*/
> +#define CONFIG_FLASH_CFI_DRIVER  /* Use common CFI driver
> */
> +#define CONFIG_SYS_FLASH_CFI_AMD_RESET   1   /* AMD RESET for STM
> 29W320DB!*/ +
> +#define CONFIG_SYS_MAX_FLASH_BANKS   1   /* max number of memory banks  */
> +#define CONFIG_SYS_MAX_FLASH_SEC

Re: [U-Boot] [PATCH v5] ppc4xx: Add GDsys PowerPC 440 ETX board support.

2008-12-09 Thread Stefan Roese
On Tuesday 09 December 2008, Eibach, Dirk wrote:
> > It's really not a big deal, but since I addressed these
> > issues in my last mail again, I noticed them in this version as well.
> >
> > 
> >
> > > +#define  CONFIG_SYS_SDRAM0_TR0   0x410a4012
> > > +#define  CONFIG_SYS_SDRAM0_WDDCTR0x4000
>
> Oops. Sorry. I thought I had eliminated all of those nasty buggers.
> If I ever get to talk to the person I copied that stuff from... :)

Heh. OK, got me. I most likely copied this stuff from another config as well. 
Only the review process was much more superficially at that time, so it must 
have slipped though. Please feel free to submit another patch to clean up 
other config headers as well. :)

> > Tab after #define! You seem to have missed this one. Did you
> > ever try running checkpatch on your patch? This should spot
> > such problems.
>
> In fact my version of checkpatch (linux 2.6.27) does not :(
> That is why the last one slipped through.
> Which version of checkpatch are you using?

I didn't really check if checkpatch complains about this. I only thought it 
does. Must have been mistaken though.

Thanks.

Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3] ppc4xx: Improve DDR autodetect

2008-12-09 Thread Dirk Eibach
Added support for a second memory bank to DDR autodetection for 440
platforms.
Made hardcoded values configurable.

Signed-off-by: Dirk Eibach <[EMAIL PROTECTED]>
---

 Whitespace fix.

 cpu/ppc4xx/sdram.c |   55 +++
 1 files changed, 50 insertions(+), 5 deletions(-)

diff --git a/cpu/ppc4xx/sdram.c b/cpu/ppc4xx/sdram.c
index 6d5f8d6..4365df9 100644
--- a/cpu/ppc4xx/sdram.c
+++ b/cpu/ppc4xx/sdram.c
@@ -259,6 +259,7 @@ phys_size_t initdram(int board_type)
 #ifndef CONFIG_SYS_SDRAM_TABLE
 sdram_conf_t mb0cf[] = {
{(256 << 20), 13, 0x000C4001},  /* 256MB mode 3, 13x10(4)   */
+   {(128 << 20), 13, 0x000A4001},  /* 128MB mode 3, 13x10(4)   */
{(64 << 20),  12, 0x00082001}   /* 64MB mode 2, 12x9(4) */
 };
 #else
@@ -269,6 +270,18 @@ sdram_conf_t mb0cf[] = CONFIG_SYS_SDRAM_TABLE;
 #defineCONFIG_SYS_SDRAM0_TR0   0x41094012
 #endif
 
+#ifndef CONFIG_SYS_SDRAM0_WDDCTR
+#define CONFIG_SYS_SDRAM0_WDDCTR   0x  /* wrcp=0 dcd=0 */
+#endif
+
+#ifndef CONFIG_SYS_SDRAM0_RTR
+#define CONFIG_SYS_SDRAM0_RTR  0x0410 /* 7.8us @ 133MHz PLB */
+#endif
+
+#ifndef CONFIG_SYS_SDRAM0_CFG0
+#define CONFIG_SYS_SDRAM0_CFG0 0x8200 /* DCEN=1, PMUD=0, 64-bit */
+#endif
+
 #define N_MB0CF (sizeof(mb0cf) / sizeof(mb0cf[0]))
 
 #define NUM_TRIES 64
@@ -378,7 +391,7 @@ phys_size_t initdram(int board_type)
mtsdram(mem_uabba, 0x); /* ubba=0 (default) 
*/
mtsdram(mem_slio, 0x);  /* rdre=0 wrre=0 rarw=0 
*/
mtsdram(mem_devopt, 0x); /* dll=0 ds=0 (normal) 
*/
-   mtsdram(mem_wddctr, 0x); /* wrcp=0 dcd=0
*/
+   mtsdram(mem_wddctr, CONFIG_SYS_SDRAM0_WDDCTR);
mtsdram(mem_clktr, 0x4000); /* clkp=1 (90 deg wr) dcdt=0
*/
 
/*
@@ -387,31 +400,63 @@ phys_size_t initdram(int board_type)
mtsdram(mem_b0cr, mb0cf[i].reg);
mtsdram(mem_tr0, CONFIG_SYS_SDRAM0_TR0);
mtsdram(mem_tr1, 0x80800800);   /* SS=T2 SL=STAGE 3 CD=1 
CT=0x00*/
-   mtsdram(mem_rtr, 0x0410);   /* Interval 7.8µs @ 133MHz PLB  
*/
+   mtsdram(mem_rtr, CONFIG_SYS_SDRAM0_RTR);
mtsdram(mem_cfg1, 0x);  /* Self-refresh exit, disable 
PM*/
udelay(400);/* Delay 200 usecs (min)
*/
 
/*
 * Enable the controller, then wait for DCEN to complete
 */
-   mtsdram(mem_cfg0, 0x8200);  /* DCEN=1, PMUD=0, 64-bit   
*/
+   mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
udelay(1);
 
if (get_ram_size(0, mb0cf[i].size) == mb0cf[i].size) {
+   phys_size_t size = mb0cf[i].size;
/*
 * Optimize TR1 to current hardware environment
 */
sdram_tr1_set(0x, &tr1_bank1);
mtsdram(mem_tr1, (tr1_bank1 | 0x80800800));
 
+
+   /*
+* OK, size detected.  Enable second bank if
+* defined (assumes same type as bank 0)
+*/
+#ifdef CONFIG_SDRAM_BANK1
+   mtsdram(mem_cfg0, 0);
+   mtsdram(mem_b1cr, mb0cf[i].size | mb0cf[i].reg);
+   mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
+   udelay(1);
+
+   /*
+* Check if 2nd bank is really available.
+* If the size not equal to the size of the first
+* bank, then disable the 2nd bank completely.
+*/
+   if (get_ram_size((long *)mb0cf[i].size, mb0cf[i].size)
+   != mb0cf[i].size) {
+   mtsdram(mem_cfg0, 0);
+   mtsdram(mem_b1cr, 0);
+   mtsdram(mem_cfg0, CONFIG_SYS_SDRAM0_CFG0);
+   udelay(1);
+   } else {
+   /*
+* We have two identical banks, so the size
+* is twice the bank size
+*/
+   size = 2 * size;
+   }
+#endif
+
 #ifdef CONFIG_SDRAM_ECC
-   ecc_init(0, mb0cf[i].size);
+   ecc_init(0, size);
 #endif
 
/*
 * OK, size detected -> all done
 */
-   return mb0cf[i].size;
+   return size;
}
}
 
-- 
1.5.6.5

___
U-Boot mailing list
U-

Re: [U-Boot] [PATCH 1/1] Make FAT code comply to coding rules.

2008-12-09 Thread Wolfgang Denk
Dear Remy,

In message <[EMAIL PROTECTED]> you wrote:
> 
> > ...but your new code has new issues, too.
> 
> Nothing is perfect... Making this code perfect would require a
> complete rewrite... ;-)

;-)

> The (original) code is buggy too, because I have discovered a strange
> bug which is causing me quite some headaches last week... ;-)

Maybe - but please let's be strict and keep reformatting, code
reorganization and bug fixing all separate.

> At least formatting/whitespaces/tabs is better now.
> Long indentations and similar code has been moved into separate
> routines and so on.

This is code reorganization, not mere reformatting.

> > ...looks like a massive code change, not only a coding style cleanup.
> 
> No, I just reordered a strange construction, by moved a piece of code
> that could only be reached by goto to a label to the place where the
> goto was listed.
> This made the code more readable. To me this is still just coding style.

Ok, then let's use clear terminology.

> > Please submit as two separate patches.
> 
> There are a few little things that could be put into a separate patch.

Please  split  such  that  reformatting   is   separate   from   code
reorganization,  and any code changes/bug fixes is a third (group of)
patch(es).

> I will see what I can do...

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]
An armed society is a polite society.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] show_boot_progess @ ppc not working

2008-12-09 Thread Andre Schwarz
All,

can someone tell me why the board specific function "void
show_boot_progress(int arg)"
is no longer called (at least on MPC5200).

Of course this line is present in the board config :

#define CONFIG_SHOW_BOOT_PROGRESS 1


What have I missed ?


regards,
André

MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Increase command line size

2008-12-09 Thread Wolfgang Denk
Dear "Paulo Flabiano Smorigo",

In message <[EMAIL PROTECTED]> you wrote:
>
> I want to know how to increase the command line size to more than 255

I recommend you start reading the documentation. For example, the file
README explains which configuration settings are responsible for
console buffer sizes.

You know that you are supposed to read the docs *before* posting,
aren't you?

> characters. I want to set the bootargs parameter with more than 300 chars...

This makes no sense. You should really study the documentation  -  in
this  case the manual, hich explains in detail how you can create the
boot arguments dynamically from smaller building  blocks  -  this  is
much  more  flexible  and easier to handle in case you need to change
anything.

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]
As usual, this being a 1.3.x release, I haven't  even  compiled  this
kernel yet. So if it works, you should be doubly impressed.
  - Linus Torvalds in <[EMAIL PROTECTED]>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2008-12-09 Thread Shinya Kuribayashi
Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 22:27 Mon 08 Sep , Jean-Christophe PLAGNIOL-VILLARD wrote:
>> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[EMAIL PROTECTED]>
>> ---
>>  doc/README.qemu_mips |   67 
>> +++--
>>  1 files changed, 58 insertions(+), 9 deletions(-)
>>
> ping

Hmm, the patch above can't be applied to the current git.  Could you
confirm it?

> diff --git a/doc/README.qemu_mips b/doc/README.qemu_mips
> index 2a6f1cf..13c98b9 100644
> --- a/doc/README.qemu_mips
> +++ b/doc/README.qemu_mips
> @@ -17,7 +17,28 @@ create image:
>  start it:
>  # qemu-system-mips -M mips -pflash flash -monitor null -nographic
>  
> -Ide Disk

For example, where does this "-Ide Disk" come from?

> +2) Download kernel + initrd
> +
> +On ftp://ftp.denx.de/pub/contrib/Jean-Christophe_Plagniol-Villard/qemu_mips/
> +you can downland
> +
> +#config to build the kernel
> +qemu_mips_defconfig

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


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

2008-12-09 Thread Shinya Kuribayashi
Jean-Christophe PLAGNIOL-VILLARD wrote:
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[EMAIL PROTECTED]>
> ---
> Use CFG_MONITOR_LEN instead of value
>  include/configs/qemu-mips.h |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h
> index faaa889..4f02425 100644
> --- a/include/configs/qemu-mips.h
> +++ b/include/configs/qemu-mips.h
> @@ -150,7 +150,7 @@
>  #define CFG_FLASH_USE_BUFFER_WRITE   1
>  
>  #define CONFIG_ENV_IS_IN_FLASH   1
> -#define CONFIG_ENV_ADDR  (CFG_FLASH_BASE + 0x4)
> +#define CONFIG_ENV_ADDR  (CFG_FLASH_BASE + CFG_MONITOR_LEN)

Now we have CONFIG_SYS_* instead of CFG_* in this area.  Could you
update and re-send the patch, please?

Thanks in advance,

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


[U-Boot] Lost of data in board info before relocating U-Boot in SDRAM

2008-12-09 Thread Gregory Medwed
Hi everybody,
I'm porting U-Boot 2008.10 to a new board based on AMCC PPC460EX processor.
I took AMCC canyonlands board as starting point.
I port U-Boot and have the prompt and most basic commands are working fine.

But, all info passed to bd_t (board info) before relocation of U-Boot are
lost.

Any advices ?

Best regards

Gregory Medwed

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


[U-Boot] CPCI405 doesn't build anymore

2008-12-09 Thread Stefan Roese
Hi Matthias,

the CPCI405 U-Boot Image doesn't build anymore. Most likely too big (again). 
Could you please submit a patch to fix this?

Thanks.

Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] alpr U-Boot image too big

2008-12-09 Thread Stefan Roese
Hi Pieter,

On Friday 21 November 2008, Stefan Roese wrote:
> I just noticed that the alpr doesn't build anymore in the current U-Boot
> version (main and 4xx). The image size (256k) is exceeded because of
> general code growth. We either need to remove some features/commands from
> the alpr target or increase the image size. Please advise how to fix this.
> A patch would be most welcome.

Any news on this?

Thanks.

Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Increase command line size

2008-12-09 Thread Paulo Flabiano Smorigo
Hi Wolfgang,

I got a board that uses u-boot to load the system. The u-boot is installed
and already working. Now I want to configure u-boot to load another rootfs
through nfs. The original bootargs variable has less than 255 characters but
with the new configuration the variable will be more than that. I just want
to know if it's just a configuration that I have to setup or I have the
recompile u-boot...

Sorry to bother, I will search at the docs for this...

Thanks for the reply,
Paulo Flabiano Smorigo

On Tue, Dec 9, 2008 at 12:25, Wolfgang Denk <[EMAIL PROTECTED]> wrote:

> Dear "Paulo Flabiano Smorigo",
>
> In message <[EMAIL PROTECTED]>
> you wrote:
> >
> > I want to know how to increase the command line size to more than 255
>
> I recommend you start reading the documentation. For example, the file
> README explains which configuration settings are responsible for
> console buffer sizes.
>
> You know that you are supposed to read the docs *before* posting,
> aren't you?
>
> > characters. I want to set the bootargs parameter with more than 300
> chars...
>
> This makes no sense. You should really study the documentation  -  in
> this  case the manual, hich explains in detail how you can create the
> boot arguments dynamically from smaller building  blocks  -  this  is
> much  more  flexible  and easier to handle in case you need to change
> anything.
>
> 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]
> As usual, this being a 1.3.x release, I haven't  even  compiled  this
> kernel yet. So if it works, you should be doubly impressed.
>  - Linus Torvalds in <[EMAIL PROTECTED]>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 1/2] ppc4xx: Add PPC4xx SPI driver

2008-12-09 Thread Steven A. Falco
This patch adds an SPI driver for the 440EPx processor.

Tested on Sequoia.

Signed-off-by: Steven A. Falco <[EMAIL PROTECTED]>
---
Thanks for the comments.

I've added the in/out accessors, and included the other comments made by
reviewers (inlines, etc).  The patch passes a checkpatch test.

 drivers/spi/Makefile |1 +
 drivers/spi/ppc4xx_spi.c |  141 ++
 include/asm-ppc/ppc4xx_spi.h |   58 +
 3 files changed, 200 insertions(+), 0 deletions(-)
 create mode 100644 drivers/spi/ppc4xx_spi.c
 create mode 100644 include/asm-ppc/ppc4xx_spi.h

diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index 15e0f7a..a699760 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -28,6 +28,7 @@ LIB   := $(obj)libspi.a
 COBJS-$(CONFIG_ATMEL_SPI) += atmel_spi.o
 COBJS-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o
 COBJS-$(CONFIG_MXC_SPI) += mxc_spi.o
+COBJS-$(CONFIG_PPC4xx_SPI) += ppc4xx_spi.o
 COBJS-$(CONFIG_SOFT_SPI) += soft_spi.o
 
 COBJS  := $(COBJS-y)
diff --git a/drivers/spi/ppc4xx_spi.c b/drivers/spi/ppc4xx_spi.c
new file mode 100644
index 000..273f8c4
--- /dev/null
+++ b/drivers/spi/ppc4xx_spi.c
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2008 Harris Corporation
+ * Author: Steven A. Falco <[EMAIL PROTECTED]>
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+void spi_init(void)
+{
+   spi4xx_t *spi = (spi4xx_t *) SPI_BASE_ADDR;
+
+   out_8(&spi->cdm, 0); /* Default to the highest speed */
+   out_8(&spi->mode, SPI_MODE_SPE); /* Enable the port */
+}
+
+struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
+   unsigned int max_hz, unsigned int mode)
+{
+   spi4xx_t *spi = (spi4xx_t *) SPI_BASE_ADDR;
+
+   ulong opb = get_OPB_freq();
+   ulong divisor;
+   struct spi_slave *s;
+
+   if (!spi_cs_is_valid(bus, cs))
+   return NULL;
+
+   divisor = ((opb + (max_hz * 4) - 1) / (max_hz * 4)) - 1;
+   if (divisor > 255)
+   return NULL;
+
+   out_8(&spi->cdm, divisor);
+
+   s = malloc(sizeof(struct spi_slave));
+   if (!s)
+   return NULL;
+
+   if (mode & SPI_CPHA)
+   clrbits_8(&spi->mode, SPI_MODE_SCP);
+   else
+   setbits_8(&spi->mode, SPI_MODE_SCP);
+
+   if (mode & SPI_CPOL)
+   setbits_8(&spi->mode, SPI_MODE_CI);
+   else
+   clrbits_8(&spi->mode, SPI_MODE_CI);
+
+   s->bus = bus;
+   s->cs = cs;
+
+   return s;
+}
+
+void spi_free_slave(struct spi_slave *slave)
+{
+   free(slave);
+}
+
+int spi_claim_bus(struct spi_slave *slave)
+{
+   return 0;
+}
+
+void spi_release_bus(struct spi_slave *slave)
+{
+}
+
+/* Start an 8-bit transaction. */
+static inline void spi_start(spi4xx_t *spi)
+{
+   out_8(&spi->cr, SPI_CR_STR);
+}
+
+/* Wait for the TX to be empty. */
+static inline void spi_tx_wait(spi4xx_t *spi)
+{
+   while (in_8(&spi->sr) & SPI_SR_BSY)
+   ;
+}
+
+/* Wait for the RX to have data. */
+static inline void spi_rx_wait(spi4xx_t *spi)
+{
+   while (!(in_8(&spi->sr) & SPI_SR_RBR))
+   ;
+}
+
+int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
+   const void *dout, void *din, unsigned long flags)
+{
+   spi4xx_t *spi = (spi4xx_t *) SPI_BASE_ADDR;
+
+   const u8 *txd = dout;
+   u8 *rxd = din;
+   int ii;
+
+   if (flags & SPI_XFER_BEGIN)
+   spi_cs_activate(slave);
+
+   /* Do a byte at a time */
+   for (ii = 0; ii < ((bitlen + 7) / 8); ii++) {
+   /* Wait for room, then load the next byte. */
+   spi_tx_wait(spi);
+   out_8(&spi->txd, *txd++);
+
+   /* Send/receive 8 bits. */
+   spi_start(spi);
+
+   /* Wait for the incoming byte, then store it. */
+   spi_rx_wait(spi);
+   *rxd++ = in_8(&spi->rxd);
+   }
+
+   if (flags & SPI_XFER_END)
+   spi_cs_deactivate(slave);
+
+   return 0;
+}
diff --git a/include/asm-ppc/ppc4xx_spi.h b/include/asm-ppc/ppc4xx_spi.h
new file mode 100644
index 000..f908ef8
-

[U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Steven A. Falco
This patch adds helper routines needed in support of the PPC4xx SPI driver.

Signed-off-by: Steven A. Falco <[EMAIL PROTECTED]>
---

Changed CONFIG constant to CONFIG_PPC4xx_SPI.

 board/amcc/sequoia/sequoia.c |   20 
 include/configs/sequoia.h|4 
 2 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
index d6668e2..080ee1e 100644
--- a/board/amcc/sequoia/sequoia.c
+++ b/board/amcc/sequoia/sequoia.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -513,3 +514,22 @@ int post_hotkeys_pressed(void)
return 0;   /* No hotkeys supported */
 }
 #endif /* CONFIG_POST */
+
+#if defined(CONFIG_PPC4xx_SPI)
+int spi_cs_is_valid(unsigned int bus, unsigned int cs)
+{
+   return bus == 0 && cs >= 0 && cs < 64;
+}
+
+void spi_cs_activate(struct spi_slave *slave)
+{
+   /* Assumes chip-selects are active-low. */
+   gpio_write_bit(slave->cs, 0);
+}
+
+void spi_cs_deactivate(struct spi_slave *slave)
+{
+   gpio_write_bit(slave->cs, 1);
+}
+#endif /* CONFIG_PPC4xx_SPI */
+
diff --git a/include/configs/sequoia.h b/include/configs/sequoia.h
index 9321bdc..417fda1 100644
--- a/include/configs/sequoia.h
+++ b/include/configs/sequoia.h
@@ -236,6 +236,10 @@
 #define CONFIG_SYS_DTT_LOW_TEMP-30
 #define CONFIG_SYS_DTT_HYSTERESIS  3
 
+/* Define these if you are using the SPI port. */
+#undef CONFIG_HARD_SPI
+#undef CONFIG_PPC4xx_SPI
+
 /*
  * Default environment variables
  */
-- 
1.6.0.2

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


[U-Boot] [PATCH] drivers/fsl_pci_init: Fix compile warning

2008-12-09 Thread Kumar Gala
fsl_pci_init.c: In function 'fsl_pci_setup_inbound_windows':
fsl_pci_init.c:122: warning: comparison is always true due to limited range of 
data type

The check only makes sense if we are CONFIG_PHYS_64BIT

Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 drivers/pci/fsl_pci_init.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index e57acba..1db42fd 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -119,9 +119,11 @@ int fsl_pci_setup_inbound_windows(struct pci_region *r)
}
 #endif
 
+#ifdef CONFIG_PHYS_64BIT
if (sz && (((u64)gd->ram_size) < (1ull << 32)))
printf("Was not able to map all of memory via "
"inbound windows -- %lld remaining\n", sz);
+#endif
 
return r - rgn_base;
 }
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH v3 1/2] ppc4xx: Add PPC4xx SPI driver

2008-12-09 Thread Wolfgang Denk
Dear "Steven A. Falco",

In message <[EMAIL PROTECTED]> you wrote:
> This patch adds an SPI driver for the 440EPx processor.
> 
> Tested on Sequoia.
> 
> Signed-off-by: Steven A. Falco <[EMAIL PROTECTED]>

Stefan, I vote to put this driver on hold until there are any users
for it.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Do not simplify the design of a program if a way can be found to make
it complex and wonderful.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Increase command line size

2008-12-09 Thread Wolfgang Denk
Dear Paulo,

A: Because it messes up the order in which people normally read text.

Q: Why is it such a bad thing?

A: Top-posting.

Q: What is the most annoying thing on usenet and in e-mail?


And you not only top-post, you also full-quote. And you post HTML,
even though this is strictly forbidden on this list.

You are ignoring Netiquette more or less completely, are you aware of
this?

I think you should read
http://www.netmeister.org/news/learn2quote.html
really carefully.


In message <[EMAIL PROTECTED]> you wrote:
>
> I got a board that uses u-boot to load the system. The u-boot is installed
> and already working. Now I want to configure u-boot to load another rootfs
> through nfs. The original bootargs variable has less than 255 characters but
> with the new configuration the variable will be more than that. I just want
> to know if it's just a configuration that I have to setup or I have the
> recompile u-boot...

There is no inherent limit on the length of an environment variable.
It can grow as long as you have memory for it.

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]
"There is nothing new under the sun, but there are lots of old things
we don't know yet."  - Ambrose Bierce
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Wolfgang Denk
Dear "Steven A. Falco",

In message <[EMAIL PROTECTED]> you wrote:
> This patch adds helper routines needed in support of the PPC4xx SPI driver.
> 
> Signed-off-by: Steven A. Falco <[EMAIL PROTECTED]>
> ---
> 
> Changed CONFIG constant to CONFIG_PPC4xx_SPI.
> 
>  board/amcc/sequoia/sequoia.c |   20 
>  include/configs/sequoia.h|4 
>  2 files changed, 24 insertions(+), 0 deletions(-)

Stefan, same as for the SPI driver itself: I vote to put this on hold
until there are any actual users of that code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
If ignorance is bliss, why aren't there more happy people?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] ppc4xx: Add PPC4xx SPI driver

2008-12-09 Thread Stefan Roese
On Tuesday 09 December 2008, Wolfgang Denk wrote:
> > This patch adds an SPI driver for the 440EPx processor.
> >
> > Tested on Sequoia.
> >
> > Signed-off-by: Steven A. Falco <[EMAIL PROTECTED]>
>
> Stefan, I vote to put this driver on hold until there are any users
> for it.

I would prefer to include it now (next merge window) since it *can* be used on 
Sequoia actually. So it may serve as an example for other 4xx boards as well.

But it's your decision in the end.

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] Increase command line size

2008-12-09 Thread Paulo Flabiano Smorigo
Hello again Wolfgang,

Sorry! I was not aware of this. I use gmail to post the messages and
not notice this rules...

My apologies to the people in this list.

Sorry again,
Paulo Flabiano Smorigo
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Ben Warren
Hi Steven,

Steven A. Falco wrote:
> This patch adds helper routines needed in support of the PPC4xx SPI driver.
>
> Signed-off-by: Steven A. Falco <[EMAIL PROTECTED]>
> ---
>
> Changed CONFIG constant to CONFIG_PPC4xx_SPI.
>
>  board/amcc/sequoia/sequoia.c |   20 
>  include/configs/sequoia.h|4 
>  2 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
> index d6668e2..080ee1e 100644
> --- a/board/amcc/sequoia/sequoia.c
> +++ b/board/amcc/sequoia/sequoia.c
> @@ -26,6 +26,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -513,3 +514,22 @@ int post_hotkeys_pressed(void)
>   return 0;   /* No hotkeys supported */
>  }
>  #endif /* CONFIG_POST */
> +
> +#if defined(CONFIG_PPC4xx_SPI)
> +int spi_cs_is_valid(unsigned int bus, unsigned int cs)
> +{
> + return bus == 0 && cs >= 0 && cs < 64;
> +}
> +
> +void spi_cs_activate(struct spi_slave *slave)
> +{
> + /* Assumes chip-selects are active-low. */
> + gpio_write_bit(slave->cs, 0);
> +}
> +
> +void spi_cs_deactivate(struct spi_slave *slave)
> +{
> + gpio_write_bit(slave->cs, 1);
> +}
> +#endif /* CONFIG_PPC4xx_SPI */
> +
> diff --git a/include/configs/sequoia.h b/include/configs/sequoia.h
> index 9321bdc..417fda1 100644
> --- a/include/configs/sequoia.h
> +++ b/include/configs/sequoia.h
> @@ -236,6 +236,10 @@
>  #define CONFIG_SYS_DTT_LOW_TEMP  -30
>  #define CONFIG_SYS_DTT_HYSTERESIS3
>  
> +/* Define these if you are using the SPI port. */
> +#undef CONFIG_HARD_SPI
> +#undef CONFIG_PPC4xx_SPI
> +
>   
Why not enable this feature on Sequoia?  Wolfgang's argument for keeping 
the patch out then goes away.  IMHO, eval boards should have as many 
options enabled by default as possible, and the user then has the option 
to opt out.
>  /*
>   * Default environment variables
>   */
>   
regards,
Ben
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] video: fix FADS823 and RRvision compiling issues

2008-12-09 Thread Anatolij Gustschin
Since commit 561858ee building for FADS823 and RRvision
doesn't work. Let's include version.h and timestamp.h
unconditionally to fix the problem.

Signed-off-by: Anatolij Gustschin <[EMAIL PROTECTED]>
---
 cpu/mpc8xx/video.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c
index 5479644..4a59927 100644
--- a/cpu/mpc8xx/video.c
+++ b/cpu/mpc8xx/video.c
@@ -32,10 +32,8 @@
 #include 
 #include 
 #include 
-#ifdef VIDEO_INFO
 #include 
 #include 
-#endif
 #include 
 #include 
 #include 
-- 
1.5.3.3

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


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Steven A. Falco
Ben Warren wrote:
> 

... snip ...

>>   
> Why not enable this feature on Sequoia?  Wolfgang's argument for keeping
> the patch out then goes away.  IMHO, eval boards should have as many
> options enabled by default as possible, and the user then has the option
> to opt out.

I can do that if Stefan and Wolfgang find it acceptable.  Just let me know.

>>  /*
>>   * Default environment variables
>>   */
>>   
> regards,
> Ben
> 

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


Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings

2008-12-09 Thread Scott Wood
On Tue, Dec 09, 2008 at 07:27:30AM +0100, Stefan Roese wrote:
> Till now Scott has takes care of the OneNAND related patches in his NAND 
> repository. The latest patches are already present in his next branch, IIRC.
> 
> I'm not sure how you feel about this Scott. Are you willing to officially 
> handle this OneNAND stuff further?

I'm willing to continue, though if someone more familiar with OneNAND and
with access to hardware wanted to take it over I'd be fine with that too.

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


[U-Boot] Pull request: u-boot-video

2008-12-09 Thread Anatolij Gustschin
Dear Wolfgang,

The following changes since commit 13d36ec849785453953d00220b2c7dc66644a3c2:
  Wolfgang Denk (1):
Merge branch 'master' of git://git.denx.de/u-boot-at91

are available in the git repository at:

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

Anatolij Gustschin (1):
  video: fix FADS823 and RRvision compiling issues

 cpu/mpc8xx/video.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Best regards,
Anatolij

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


[U-Boot] mtd partitions

2008-12-09 Thread Carlos kescuin
Hi,

I'm using a Coldfire m5329EVB and I would like to make some partitions (one
for kernel and one for filsystem) on my NAND FLASH (16Mb). I've tryied to
search the u-boot options (u-boo 2008.10) but it doesn't work at all.

Does anybody know the configure options or at least how to succeed in
partitioning my NAND Flash?

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


Re: [U-Boot] FSL DDR @ 83xx

2008-12-09 Thread Andre Schwarz
Jon Loeliger schrieb:
> On Mon, 2008-12-08 at 18:02 +0100, Andre Schwarz wrote:
>   
>> Kim,
>>
>> I'd like to change my DDR setup code since it looks like my computed
>> values are not perfectly stable on our 8343 based board.
>>
>> This implies using a fake SPD and the related code to set up the controller.
>>
>> Is the "new" common FSL DDR setup code (cpu/mpc8xxx/ddr/*) stable for
>> 83xx or shall I stick to cpu/mpc83xx/spd_sdram.c for a while ?
>> 
>
> The new, common DDR code in use by the FSL boards does not
> yet cover the 83xx family, though the plan is to eventually
> do so.
>
> Patches in that direction, are, naturally, welcome... :-)
>
> jdl
>
>
>   
Is anybody working on this ?
The spd_sdram code lacks support for 3 bank adress bits and various
termination schemes which
are essential for tiny boards with soldered memory.

Of course I could contribute for the 8343.
But I don't now about the "others" (85xx/86x) in detail and don't want
to scatter #ifdefs all over the code ...

regards,
André

MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] alpr U-Boot image too big

2008-12-09 Thread Pieter Voorthuijsen
Hi Stefan,

I think I missed the previous mail during my holiday. I quickly checked the 
header file, here what can be undefined from the CONFIG_CMD_xx's:

#define CONFIG_CMD_REGINFO
#define CONFIG_CMD_NFS
#define CONFIG_CMD_PCI

I also believe CMD_ELF is not needed for only booting a kernel, but not sure.

I'm sure that disabling these will save enough kilobytes to make it fit

Best regards, Pieter


> -Original Message-
> From: Stefan Roese [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 9 december 2008 17:16
> To: u-boot@lists.denx.de
> Cc: Pieter Voorthuijsen
> Subject: Re: [U-Boot] alpr U-Boot image too big
> 
> Hi Pieter,
> 
> On Friday 21 November 2008, Stefan Roese wrote:
> > I just noticed that the alpr doesn't build anymore in the current 
> > U-Boot version (main and 4xx). The image size (256k) is exceeded 
> > because of general code growth. We either need to remove some 
> > features/commands from the alpr target or increase the 
> image size. Please advise how to fix this.
> > A patch would be most welcome.
> 
> Any news on this?
> 
> Thanks.
> 
> Best regards,
> Stefan
> 
> =
> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: 
> [EMAIL PROTECTED] 
> =
> 

Disclaimer: The information contained in this email, including any attachments 
is 
confidential and is for the sole use of the intended recipient(s). Any 
unauthorized 
review, use, disclosure or distribution is prohibited. If you are not the 
intended 
recipient, please notify the sender immediately by replying to this message and 
destroy all copies of this message and any attachments.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Wolfgang Denk
Dear Ben Warren,

In message <[EMAIL PROTECTED]> you wrote:
> 
> Why not enable this feature on Sequoia?  Wolfgang's argument for keeping 
> the patch out then goes away.  IMHO, eval boards should have as many 
> options enabled by default as possible, and the user then has the option 
> to opt out.

But there is not a single SPI device on the Sequoia board, and if you
attach one, you have to write driver code for it that implements  the
chip  select handling and the specific device protocol. We would have
a driver included, without any  "users"  (code  that  actually  calls
these functions).

In other words, this driver is a prerequisite for  other  SPI  device
drivers  that  might  follow  later,  but as is, it's just a waste of
memory.

It would just waste memory to enable it.

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]
Women are more easily and more deeply terrified ...  generating  more
sheer horror than the male of the species.
-- Spock, "Wolf in the Fold", stardate 3615.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] vxworks.h: Fix build problem introduced by commits 29a4c24d/e9084b23

2008-12-09 Thread Niklaus Giger
Hi Wolfgang

Thanks for fixing my mistake. Forgot compiled all boards.Will try do do better 
next time.

Best regards

Nioklaus
Am Dienstag 09 Dezember 2008 00.28:48 schrieb Wolfgang Denk:
> Signed-off-by: Wolfgang Denk <[EMAIL PROTECTED]>
> ---
>  include/vxworks.h |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/include/vxworks.h b/include/vxworks.h
> index 548e8e8..1633904 100644
> --- a/include/vxworks.h
> +++ b/include/vxworks.h
> @@ -47,7 +47,7 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char
> *argv[]); #endif
>
>  #ifndef CONFIG_SYS_VXWORKS_SERVERNAME
> -#define CONFIG_SYS_VXWORKS_SERVERNAME srv
> +#define CONFIG_SYS_VXWORKS_SERVERNAME"srv"
>  #endif
>
>  #endif

-- 

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


Re: [U-Boot] alpr U-Boot image too big

2008-12-09 Thread Stefan Roese
Hi Pieter,

On Tuesday 09 December 2008, Pieter Voorthuijsen wrote:
> I think I missed the previous mail during my holiday. I quickly checked the
> header file, here what can be undefined from the CONFIG_CMD_xx's:
>
> #define CONFIG_CMD_REGINFO
> #define CONFIG_CMD_NFS
> #define CONFIG_CMD_PCI

Are you really sure that you want to drop the PCI commands? IIRC then the ALPR 
has some PCI devices and it might be handy to access them from within U-Boot 
(for debugging etc).

> I also believe CMD_ELF is not needed for only booting a kernel, but not
> sure.

Yes, CMD_ELF is not needed for Linux kernel booting.

> I'm sure that disabling these will save enough kilobytes to make it fit

I just checked and by disabling these features we fit into the 256k again:

#undef CONFIG_CMD_NFS
#undef CONFIG_CMD_REGINFO
#undef CONFIG_CMD_ELF

I'll submit a patch in a sec. Please send your ack if you think this is ok.

Thanks.

Best regards,
Stefan

=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] FSL DDR @ 83xx

2008-12-09 Thread Kumar Gala

On Dec 9, 2008, at 12:01 PM, Andre Schwarz wrote:

> Jon Loeliger schrieb:
>> On Mon, 2008-12-08 at 18:02 +0100, Andre Schwarz wrote:
>>
>>> Kim,
>>>
>>> I'd like to change my DDR setup code since it looks like my computed
>>> values are not perfectly stable on our 8343 based board.
>>>
>>> This implies using a fake SPD and the related code to set up the  
>>> controller.
>>>
>>> Is the "new" common FSL DDR setup code (cpu/mpc8xxx/ddr/*) stable  
>>> for
>>> 83xx or shall I stick to cpu/mpc83xx/spd_sdram.c for a while ?
>>>
>>
>> The new, common DDR code in use by the FSL boards does not
>> yet cover the 83xx family, though the plan is to eventually
>> do so.
>>
>> Patches in that direction, are, naturally, welcome... :-)
>>
>> jdl
>>
>>
>>
> Is anybody working on this ?
> The spd_sdram code lacks support for 3 bank adress bits and various
> termination schemes which
> are essential for tiny boards with soldered memory.
>
> Of course I could contribute for the 8343.
> But I don't now about the "others" (85xx/86x) in detail and don't want
> to scatter #ifdefs all over the code ...
>
> regards,
> André

I don't believe anyone is currently working on getting the new ddr  
code to be used w/83xx.  Feel free to submit patches that does this  
and we will review them as they are posted.

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


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Steven A. Falco
Wolfgang Denk wrote:
> Dear Ben Warren,
> 
> In message <[EMAIL PROTECTED]> you wrote:
>> Why not enable this feature on Sequoia?  Wolfgang's argument for keeping 
>> the patch out then goes away.  IMHO, eval boards should have as many 
>> options enabled by default as possible, and the user then has the option 
>> to opt out.
> 
> But there is not a single SPI device on the Sequoia board, and if you
> attach one, you have to write driver code for it that implements  the
> chip  select handling and the specific device protocol. We would have
> a driver included, without any  "users"  (code  that  actually  calls
> these functions).
> 
> In other words, this driver is a prerequisite for  other  SPI  device
> drivers  that  might  follow  later,  but as is, it's just a waste of
> memory.
> 
> It would just waste memory to enable it.
Makes sense.
> 
> Best regards,
> 
> Wolfgang Denk
> 
The problem is that if it isn't accepted now, nobody is likely to remember
that it is available, and so they will have to re-write it.  Also, it will
suffer from bit-rot, if just left as a loose patch.

Steve

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


[U-Boot] [PATCH] ppc4xx: Remove some features from ALPR to fit into 256k again

2008-12-09 Thread Stefan Roese
Signed-off-by: Stefan Roese <[EMAIL PROTECTED]>
---
 include/configs/alpr.h |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/include/configs/alpr.h b/include/configs/alpr.h
index 6e9f5e5..7ce8205 100644
--- a/include/configs/alpr.h
+++ b/include/configs/alpr.h
@@ -235,18 +235,15 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_DIAG
 #define CONFIG_CMD_EEPROM
-#define CONFIG_CMD_ELF
 #define CONFIG_CMD_FPGA
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_NET
-#define CONFIG_CMD_NFS
 #define CONFIG_CMD_PCI
 #define CONFIG_CMD_PING
-#define CONFIG_CMD_REGINFO
-
+#undef CONFIG_CMD_NFS
 
 #undef CONFIG_WATCHDOG /* watchdog disabled*/
 
-- 
1.6.0.5

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


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Ben Warren
Hi Wolfgang,

Wolfgang Denk wrote:
> Dear Ben Warren,
>
> In message <[EMAIL PROTECTED]> you wrote:
>   
>> Why not enable this feature on Sequoia?  Wolfgang's argument for keeping 
>> the patch out then goes away.  IMHO, eval boards should have as many 
>> options enabled by default as possible, and the user then has the option 
>> to opt out.
>> 
>
> But there is not a single SPI device on the Sequoia board, and if you
> attach one, you have to write driver code for it that implements  the
> chip  select handling and the specific device protocol. We would have
> a driver included, without any  "users"  (code  that  actually  calls
> these functions).
>
>   
Sure.  Ignorant assumption on my part that the eval board had something 
like a SPI EEPROM, but it looks like there's just a header.  In that 
case, the only advantage to including it is to ensure the driver keeps 
up with any API changes.
> In other words, this driver is a prerequisite for  other  SPI  device
> drivers  that  might  follow  later,  but as is, it's just a waste of
> memory.
>
> It would just waste memory to enable it.
>
>   
OK, but who cares about memory on an evaluation board?  Their entire 
raison-d'etre is to serve as a starting point for custom boards.  I know 
if I was building a board with this CPU and planned on using SPI, it 
would be much nicer if the driver was included than having to search the 
message boards.  Just my 2c.
> Best regards,
>
> Wolfgang Denk
>
>   
regards,
Ben
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Stefan Roese
On Tuesday 09 December 2008, Steven A. Falco wrote:
> The problem is that if it isn't accepted now, nobody is likely to remember
> that it is available, and so they will have to re-write it.  Also, it will
> suffer from bit-rot, if just left as a loose patch.

Full ack from me on 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


Re: [U-Boot] mtd partitions

2008-12-09 Thread Scott Wood
On Tue, Dec 09, 2008 at 06:09:08PM +0100, Carlos kescuin wrote:
> I'm using a Coldfire m5329EVB and I would like to make some partitions (one
> for kernel and one for filsystem) on my NAND FLASH (16Mb). I've tryied to
> search the u-boot options (u-boo 2008.10) but it doesn't work at all.
> 
> Does anybody know the configure options or at least how to succeed in
> partitioning my NAND Flash?

U-boot doesn't currently support NAND partitions, though the mtdpart code
that was added for UBI could conceivably be hooked up to NAND in the
future.

For now, just pass the right addresses to u-boot for loading the kernel,
burning the filesystem, etc, and configure matching partitions in the OS.

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


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Wolfgang Denk
Dear "Steven A. Falco",

In message <[EMAIL PROTECTED]> you wrote:
>
> The problem is that if it isn't accepted now, nobody is likely to remember
> that it is available, and so they will have to re-write it.  Also, it will
> suffer from bit-rot, if just left as a loose patch.

It will bit-rot as well if it's added - if no configuration enables it
it will not even be compiled.

I recommend you keep it in your queue, and submit it again  with  the
board that will actually use it.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Every program has at least one bug and can be shortened by  at  least
one instruction - from which, by induction, one can deduce that every
program can be reduced to one instruction which doesn't work.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 1/2] ppc4xx: Add PPC4xx SPI driver

2008-12-09 Thread Wolfgang Denk
Dear Stefan,

In message <[EMAIL PROTECTED]> you wrote:
>
> I would prefer to include it now (next merge window) since it *can* be used 
> on 
> Sequoia actually. So it may serve as an example for other 4xx boards as well.

Well, we had similar examples before - things that can  be  used  but
did not get checked in (for example the dummy EEPROM driver, etc. The
policy so far has always been not to add dead code.

> But it's your decision in the end.

Well, you are the 4xx custodian, and if you really think it's  useful
to add such dead code...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
I perceive a possibility of an immediate  chronological  sequence  of
events which includes a violence.
- Terry Pratchett, _The Dark Side of the Sun_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Wolfgang Denk
Dear Stefan,

In message <[EMAIL PROTECTED]> you wrote:
> On Tuesday 09 December 2008, Steven A. Falco wrote:
> > The problem is that if it isn't accepted now, nobody is likely to remember
> > that it is available, and so they will have to re-write it.  Also, it will
> > suffer from bit-rot, if just left as a loose patch.
> 
> Full ack from me on this.

I agree - but what is a dead driver without users good for? 

What was it written for? ... obviously for some specific  application
on  some real board. I recommend to submit this driver as part of the
patch series that adds this board support to  U-Boot.  Then  we  will
also have at least one real user of that code, i. e. we can make sure
that it at least compiles.

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 value of marriage is not that adults produce children, but  that
children produce adults."- Peter De Vries
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] drivers/fsl_pci_init: Fix compile warning

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

In message <[EMAIL PROTECTED]> you wrote:
> fsl_pci_init.c: In function 'fsl_pci_setup_inbound_windows':
> fsl_pci_init.c:122: warning: comparison is always true due to limited range 
> of data type
> 
> The check only makes sense if we are CONFIG_PHYS_64BIT
> 
> Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
> ---
>  drivers/pci/fsl_pci_init.c |2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
8 Catfish   = 1 Octo-puss
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] video: fix FADS823 and RRvision compiling issues

2008-12-09 Thread Wolfgang Denk
Dear Anatolij,

In message <[EMAIL PROTECTED]> you wrote:
> Since commit 561858ee building for FADS823 and RRvision
> doesn't work. Let's include version.h and timestamp.h
> unconditionally to fix the problem.
> 
> Signed-off-by: Anatolij Gustschin <[EMAIL PROTECTED]>
> ---
>  cpu/mpc8xx/video.c |2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Madness takes its toll. Please have exact change.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings

2008-12-09 Thread Wolfgang Denk
Dear Scott,

In message <[EMAIL PROTECTED]> you wrote:
> On Tue, Dec 09, 2008 at 07:27:30AM +0100, Stefan Roese wrote:
> > Till now Scott has takes care of the OneNAND related patches in his NAND 
> > repository. The latest patches are already present in his next branch, IIRC.
> > 
> > I'm not sure how you feel about this Scott. Are you willing to officially 
> > handle this OneNAND stuff further?
> 
> I'm willing to continue, though if someone more familiar with OneNAND and
> with access to hardware wanted to take it over I'd be fine with that too.

Thanks for the clarification.

I have this patch marked as open, and cannot find any comments for
it in the archive:

11/10 Kyungmin Park  [U-Boot] [PATCH] [ONENAND] Reduce OneNAND IPL code 
size v2

Could you please have a look?  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]
It's all Klatchian to me.
- Terry Pratchett & Stephen Briggs, _The Discworld Companion_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 2/2] ppc4xx: Add PPC4xx SPI helpers to Sequoia

2008-12-09 Thread Steven A. Falco
Ben Warren wrote:
> 
> Hi Wolfgang,
> 
> Wolfgang Denk wrote:
>> Dear Ben Warren,
>>
>> In message <[EMAIL PROTECTED]> you wrote:
>>  
>>> Why not enable this feature on Sequoia?  Wolfgang's argument for
>>> keeping the patch out then goes away.  IMHO, eval boards should have
>>> as many options enabled by default as possible, and the user then has
>>> the option to opt out.
>>> 
>>
>> But there is not a single SPI device on the Sequoia board, and if you
>> attach one, you have to write driver code for it that implements  the
>> chip  select handling and the specific device protocol. We would have
>> a driver included, without any  "users"  (code  that  actually  calls
>> these functions).
>>
>>   
> Sure.  Ignorant assumption on my part that the eval board had something
> like a SPI EEPROM, but it looks like there's just a header.  In that
> case, the only advantage to including it is to ensure the driver keeps
> up with any API changes.
>> In other words, this driver is a prerequisite for  other  SPI  device
>> drivers  that  might  follow  later,  but as is, it's just a waste of
>> memory.
>>
>> It would just waste memory to enable it.
>>
>>   
> OK, but who cares about memory on an evaluation board?  Their entire
> raison-d'etre is to serve as a starting point for custom boards.  I know
> if I was building a board with this CPU and planned on using SPI, it
> would be much nicer if the driver was included than having to search the
> message boards.  Just my 2c.

I agree with this position.  I use U-Boot for two purposes - booting a
kernel, and experimenting with hardware.  Given that I am currently
in the design phase of a project, I am prototyping things on an evaluation
board, to see what works and what doesn't.  Having U-Boot support all the
interfaces of a SOC like the PPC440EPx is very useful to me.  Much easier
and quicker to do prototyping in U-Boot than in Linux.

But again, you guys can decide the philosophical issues.  I'm just the code
monkey...

Steve


>> Best regards,
>>
>> Wolfgang Denk
>>
>>   
> regards,
> Ben
> 

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


Re: [U-Boot] [PATCH] [ONENAND] Reduce OneNAND IPL code size v2

2008-12-09 Thread Scott Wood
On Mon, Nov 10, 2008 at 01:53:46PM +0900, Kyungmin Park wrote:
> OneNAND IPL has common codes for RAM init, load data, and jump to 2nd
> bootloader, but it's common code used about 300~400 bytes. So board
> specific codes, such as lowlevel_init, can't has enough code. It make
> a difficult to implement OneNAND IPL.
> 
> This patch make this common code as small as possible. and give
> lowlevel_init can have more codes.

Sorry for the delay; I missed this patch earlier.

> Signed-off-by: Kyungmin Park <[EMAIL PROTECTED]>
> ---
> diff --git a/cpu/arm1136/start.S b/cpu/arm1136/start.S
> index e622338..132cc4a 100644
> --- a/cpu/arm1136/start.S
> +++ b/cpu/arm1136/start.S
> @@ -33,23 +33,7 @@
>  .globl _start
>  _start: breset
>  #ifdef CONFIG_ONENAND_IPL
> - ldr pc, _hang
> - ldr pc, _hang
> - ldr pc, _hang
> - ldr pc, _hang
> - ldr pc, _hang
> - ldr pc, _hang
> - ldr pc, _hang
> -
> -_hang:
> - .word   do_hang
> - .word   0x12345678
> - .word   0x12345678
> - .word   0x12345678
> - .word   0x12345678
> - .word   0x12345678
> - .word   0x12345678
> - .word   0x12345678  /* now 16*4=64 */
> + . = _start + 64 /* now 16*4=64 */
>  #else

Can you do a branch-to-self here that will accomplish the same thing,
without needing do_hang later?

> diff --git a/onenand_ipl/onenand_boot.c b/onenand_ipl/onenand_boot.c
> index aff62d2..2440d8b 100644
> --- a/onenand_ipl/onenand_boot.c
> +++ b/onenand_ipl/onenand_boot.c
> @@ -39,6 +39,7 @@ int print_info(void)
>  
>  typedef int (init_fnc_t)(void);
>  
> +#ifdef CONFIG_USE_ONENAND_INIT
>  init_fnc_t *init_sequence[] = {

Is there anything that's going to use this?  If not, just remove the
code.

> +#ifdef CONFIG_USE_ONENAND_INIT
>  void hang(void)
>  {
>   /* if board_hang() returns, hange here */
>   printf("X-Loader hangs\n");
>   for (;;);
>  }
> +#endif

X-Loader?

> diff --git a/onenand_ipl/onenand_ipl.h b/onenand_ipl/onenand_ipl.h
> index 3387998..438e58c 100644
> --- a/onenand_ipl/onenand_ipl.h
> +++ b/onenand_ipl/onenand_ipl.h
> @@ -23,7 +23,7 @@
>  
>  #include 
>  
> -#define ONENAND_BLOCK_SIZE  2048
> +#define ONENAND_BLOCK_SIZE  0x2

This doesn't seem to be referenced at all any more.  Was the old value
simply wrong?

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


[U-Boot] [PATCH] evb64260: fix "cast to pointer from integer of different size" warnings

2008-12-09 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk <[EMAIL PROTECTED]>
---
 board/evb64260/zuma_pbb.c  |6 --
 board/evb64260/zuma_pbb_mbox.c |4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/board/evb64260/zuma_pbb.c b/board/evb64260/zuma_pbb.c
index 296e461..1d03570 100644
--- a/board/evb64260/zuma_pbb.c
+++ b/board/evb64260/zuma_pbb.c
@@ -149,8 +149,10 @@ void zuma_init_pbb (void)
 
pci_read_config_dword (dev, PCI_BASE_ADDRESS_0, &iobase);
 
-   zuma_pbb_reg =
-   (PBB_DMA_REG_MAP *) (iobase & 
PCI_BASE_ADDRESS_MEM_MASK);
+   iobase &= PCI_BASE_ADDRESS_MEM_MASK;
+
+   zuma_pbb_reg = (PBB_DMA_REG_MAP *)iobase;
+
 
if (!zuma_pbb_reg) {
printf ("zuma pbb bar none! (hah hah, get it?)\n");
diff --git a/board/evb64260/zuma_pbb_mbox.c b/board/evb64260/zuma_pbb_mbox.c
index 6f5df6e..8e38102 100644
--- a/board/evb64260/zuma_pbb_mbox.c
+++ b/board/evb64260/zuma_pbb_mbox.c
@@ -165,7 +165,9 @@ int zuma_mbox_init(void)
 
   pci_read_config_dword(zuma_mbox_dev.dev, PCI_BASE_ADDRESS_0, &iobase);
 
-  zuma_mbox_dev.sip = (PBB_DMA_REG_MAP *) (iobase & PCI_BASE_ADDRESS_MEM_MASK);
+  iobase &= PCI_BASE_ADDRESS_MEM_MASK;
+
+  zuma_mbox_dev.sip = (PBB_DMA_REG_MAP *)iobase;
 
   zuma_mbox_dev.sip->int_mask.word=0;
 
-- 
1.5.6.5

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


[U-Boot] Commit 9eb79bd8 breaks building for MBX860T board

2008-12-09 Thread Wolfgang Denk
Dear Ben,

your commit 9eb79bd8 breaks building for the MBX860T board:

$ MAKEALL MBX860T
Configuring for MBX860T board...
cpu/mpc8xx/libmpc8xx.a(cpu.o): In function `cpu_eth_init':
/home/wd/git/u-boot/work/cpu/mpc8xx/cpu.c:648: undefined reference to 
`scc_initialize'


git-bisect points at:

9eb79bd8856bcab896ed5e1f1bca159807a124dd is first bad commit
commit 9eb79bd8856bcab896ed5e1f1bca159807a124dd
Author: Ben Warren <[EMAIL PROTECTED]>
Date:   Thu Oct 23 22:02:49 2008 -0700

Moved initialization of MPC8XX SCC to cpu_eth_init()

Removed initialization of the driver from net/eth.c

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

:04 04 081647cb0fda3e58461b8db01d2e87e95cede51c 
467c4f71e241449ed19f149d14c39762d57bbe1f M   cpu
:04 04 c6a3a3a86c4377efcbc9834439b8efaf7a5204c2 
683f0cc5822f2389e597e33d75544d10f5e27cff M   include
:04 04 6c0f127b95964a201601a16c0450fd00472117d9 
c34f8e7c0d9d956b04055771355317a5a852 M   net


Can you please have a look at this?

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]
Backed up the system lately?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request: u-boot-SUBREPO

2008-12-09 Thread Wolfgang Denk
Dear "Remy Bohmer",

In message <[EMAIL PROTECTED]> you wrote:
> The following changes since commit 13d36ec849785453953d00220b2c7dc66644a3c2:
>   Wolfgang Denk (1):
> Merge branch 'master' of git://git.denx.de/u-boot-at91
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-usb.git master
> 
> Jean-Christophe PLAGNIOL-VILLARD (1):
>   usbtty/omap: update to current API
> 
> Stefan Althoefer (1):
>   USB: descriptor handling
> 
>  drivers/serial/usbtty.c |6 ++
>  drivers/serial/usbtty.h |   31 +--
>  drivers/usb/usbdcore_omap1510.c |4 +++-
>  include/usb.h   |2 +-
>  include/usbdcore_omap1510.h |6 +++---
>  5 files changed, 30 insertions(+), 19 deletions(-)

Applied, thanks.

Next time, please edit the Subject: line ("SUBREPO")

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
I thought my people would grow tired of killing. But you were  right,
they  see it is easier than trading. And it has its pleasures. I feel
it myself. Like the hunt, but with richer rewards.
-- Apella, "A Private Little War", stardate 4211.8
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/6] jffs2: fix searching for latest version in jffs2_1pass_list_inodes()

2008-12-09 Thread Wolfgang Denk
Dear Ilya Yanok,

In message <[EMAIL PROTECTED]> you wrote:
> We need to update i_version inside cycle to find really latest version
> inside jffs2_1pass_list_inodes(). With that fixed we can use isize inside
> dump_inode() instead of calling expensive jffs2_1pass_read_inode().
> 
> Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
> Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>
> ---
>  fs/jffs2/jffs2_1pass.c |5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Testing can show the presense of bugs, but not their absence.
   -- Edsger Dijkstra
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/6] jffs2: add sector_size field to part_info structure

2008-12-09 Thread Wolfgang Denk
Dear Ilya Yanok,

In message <[EMAIL PROTECTED]> you wrote:
> This patch adds sector_size field to part_info structure (used
> by new JFFS2 code).
> 
> Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>
> ---
>  common/cmd_jffs2.c  |   20 +---
>  include/jffs2/load_kernel.h |1 +
>  2 files changed, 18 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
They say a little knowledge is a dangerous thing,  but it is not  one
half so bad as a lot of ignorance.   - Terry Pratchett, _Equal Rites_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] jffs2: rewrite jffs2 scanning code based on Linux one

2008-12-09 Thread Wolfgang Denk
Dear Ilya Yanok,

In message <[EMAIL PROTECTED]> you wrote:
> Rewrites jffs2_1pass_build_lists() function in style of Linux's
> jffs2_scan_medium() and jffs2_scan_eraseblock().
> This includes:
>  - Caching flash acceses
>  - Smart dealing with free space
> 
> Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
> Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>
> ---
>  fs/jffs2/jffs2_1pass.c |  227 
> 
>  1 files changed, 171 insertions(+), 56 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Documentation is the castor oil of programming.
Managers know it must be good because the programmers hate it so much.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/6] jffs2: add buffer to cache flash accesses

2008-12-09 Thread Wolfgang Denk
Dear Ilya Yanok,

In message <[EMAIL PROTECTED]> you wrote:
> With this patch JFFS2 code allocates memory buffer of max_totlen size
> (size of the largest node, calculated during scan time) and uses it to
> store entire node. Speeds up loading. If malloc fails we use old ways
> to do things.
> 
> Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
> Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>
> ---
>  fs/jffs2/jffs2_1pass.c   |  116 -
>  fs/jffs2/jffs2_private.h |2 +-
>  2 files changed, 73 insertions(+), 45 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
The Gates in my computer are AND, OR and NOT; they are not Bill.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/6] jffs2: summary support

2008-12-09 Thread Wolfgang Denk
Dear Ilya Yanok,

In message <[EMAIL PROTECTED]> you wrote:
> This patch adds support for reading fs information from summary
> node instead of scanning full eraseblock.
> 
> Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>
> ---
>  fs/jffs2/jffs2_1pass.c |  187 
> +++-
>  fs/jffs2/summary.h |  163 +
>  include/jffs2/jffs2.h  |   19 +
>  3 files changed, 368 insertions(+), 1 deletions(-)
>  create mode 100644 fs/jffs2/summary.h

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Humans do claim a great deal for that particular emotion (love).
-- Spock, "The Lights of Zetar", stardate 5725.6
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 6/6] jffs2: cache data_crc results

2008-12-09 Thread Wolfgang Denk
Dear Ilya Yanok,

In message <[EMAIL PROTECTED]> you wrote:
> As we moved data_crc() invocation from jffs2_1pass_build_lists() to
> jffs2_1pass_read_inode() data_crc is going to be calculated on each
> inode access. This patch adds caching of data_crc() results. There
> is no significant improvement in speed (because of flash access
> caching added in previous patch I think, crc in RAM is really fast)
> but this patch impacts memory usage -- every b_node structure uses
> 12 bytes instead of 8.
> 
> Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
> Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>
> ---
>  fs/jffs2/jffs2_1pass.c   |5 -
>  fs/jffs2/jffs2_private.h |1 +
>  2 files changed, 5 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Power is danger.
-- The Centurion, "Balance of Terror", stardate 1709.2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] mtd partitions (Carlos kescuin)

2008-12-09 Thread Tom Evans
"Carlos kescuin" <[EMAIL PROTECTED]> wrote:
> 
> I'm using a Coldfire m5329EVB and I would like to make some
 > partitions (one for kernel and one for filsystem) on my NAND
 > FLASH (16Mb). I've tryied to search the u-boot options
 > (u-boo 2008.10) but it doesn't work at all.
> 
> Does anybody know the configure options or at least how
 > to succeed in partitioning my NAND Flash?

What we do is to load u-boot via JTAG, then boot the OS (Linux in our 
case) using TFTP with the filesystem mounted over NFS. That gives us all 
the drivers and programs required to then partition the NAND and burn 
U-Boot into it. We then partition and format an SD card for the 
filesystem into a SD card, but we have the option of putting it into 
NAND, and have done so.

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


Re: [U-Boot] Commit 9eb79bd8 breaks building for MBX860T board

2008-12-09 Thread Ben Warren
Hi Wolfgang,

Wolfgang Denk wrote:
> Dear Ben,
>
> your commit 9eb79bd8 breaks building for the MBX860T board:
>
> $ MAKEALL MBX860T
> Configuring for MBX860T board...
> cpu/mpc8xx/libmpc8xx.a(cpu.o): In function `cpu_eth_init':
> /home/wd/git/u-boot/work/cpu/mpc8xx/cpu.c:648: undefined reference to 
> `scc_initialize'
>
>
>   
ouch
> git-bisect points at:
>
> 9eb79bd8856bcab896ed5e1f1bca159807a124dd is first bad commit
> commit 9eb79bd8856bcab896ed5e1f1bca159807a124dd
> Author: Ben Warren <[EMAIL PROTECTED]>
> Date:   Thu Oct 23 22:02:49 2008 -0700
>
> Moved initialization of MPC8XX SCC to cpu_eth_init()
> 
> Removed initialization of the driver from net/eth.c
> 
> Signed-off-by: Ben Warren <[EMAIL PROTECTED]>
>
> :04 04 081647cb0fda3e58461b8db01d2e87e95cede51c 
> 467c4f71e241449ed19f149d14c39762d57bbe1f M   cpu
> :04 04 c6a3a3a86c4377efcbc9834439b8efaf7a5204c2 
> 683f0cc5822f2389e597e33d75544d10f5e27cff M   include
> :04 04 6c0f127b95964a201601a16c0450fd00472117d9 
> c34f8e7c0d9d956b04055771355317a5a852 M   net
>
>
> Can you please have a look at this?
>
>   
Sure.  I'll figure it out tonight and will post a patch.
> Thanks.
>
> Best regards,
>
> Wolfgang Denk
>
>   
regards,
Ben


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


Re: [U-Boot] add usb_system_autoupdate command.

2008-12-09 Thread Wolfgang Denk
Dear Matteo,

In message <[EMAIL PROTECTED]> you wrote:
> 
> I looked updater.c and and I take that code as example.
> 
> I removed all function as same as do_... (do_fat_fsload, do_protect, 
> do_flerase, do_mem_cp).
> In this way, I could remove also strcpy() and sprintf() needed to made 
> their parameters and the result is that I cleaned and emproved all code.
> 
> Now all works correctly.

Hm... it may work for you, but it's mostly unusable by anybody else
given the complete lack of documentation.

> In attach, the code...
> and if anyone try it, I'm interesting to feedback or opinions.

Here a general comment first: we already have quitre a number of such
auto-update mechanisms in U-Boot, including  updates  from  USB  mass
storage device (like yours, or board/trab/auto_update.c or
board/mcc200/auto_update.c or board/esd/common/auto_update.c), and
updates over TFTP (see doc/README.update).

In my opinion, the code described in doc/README.update is probably the
most advanced and powerful, as it moves the description of the update
files from the code into the download image (using FIT image format).

So instead of adding yet another highly specific implementation for a
pretty common task, I'd much rather see patches that come up  with  a
generalization of this feature, i. e. something that allows reuse for
other systems, eventually even replacing (parts of) the old, existing
code.


Now for your patch:

* The Signed-off-by line is missing.
* You exceed the maximum line length in many places.
* You use an incorrect brace style.
* There is lots of trailing white space.
* It is not configurable (i.e. cannot be removed for boards that don't
  need it / don't want it.
* And it has some pretty strange parts, like this error "handling":

> error_exit:
>   udelay(1000*1000*5);
>   return 1;

I'm sorry, but this patch would  need  a  major  rework  to  make  it
acceptable  for  mainline, but as mentioned above, such efforts would
(in my opinion) be better invested in designing  and  implementing  a
more general solution.

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]
Our management frequently gets lost in thought.   That's because it's
unfamiliar territory.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add support for boards where the NOR FLASH is not memory-mapped

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

Sorry for the late review...

In message <[EMAIL PROTECTED]> you wrote:
> This patch adds the CONFIG_FLASH_NOT_MEM_MAPPED define which can be
> used on boards where the NOR FLASH is not memory-mapped and
> special accessor functions are needed to access the NOR FLASH.
> This affects the memory commands (cmd_mem.c) and the environment
> (env_flash.c).
> 
> Boards using CONFIG_FLASH_NOT_MEM_MAPPED need to additionally specify
> CONFIG_FLASH_BASE and CONFIG_FLASH_END so that the NOR FLASH region
> can be detected.

You have to document this (at least in the README).

But there is a general problem with this approach: U-Boot is based on
the design that the actual flash size is auto-detected, i. e.  it  is
always  assumed  to  be  unknown  at  compile  time.  Therefore it is
impossible to set something like CONFIG_FLASH_END at compile time.


> +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED)
> + if (((u32)addr >= CONFIG_FLASH_BASE) && ((u32)addr < CONFIG_FLASH_END))

And this looks as if CONFIG_FLASH_END was not the "FLASH_END" address,
i. e. the last address in flash, but "FLASH_END" + 1 ?

> +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED)
> +#define FLASH_READ_MEMCPY(d, s, n)   board_flash_read_memcpy(d, s, n)
> +#else
> +#define FLASH_READ_MEMCPY(d, s, n)   memcpy(d, s, n);
> +#endif /* CONFIG_FLASH_NOT_MEM_MAPPED */

This is really, really ugly - and error prone, as you must be
extremely careful which of the functions you may call might use
memcpy() or similar internally.

You know that I know of the specific problems of this hardware, but
anyway - I really dislike having to add such code.

> +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED)
> +u8 flash_read8(void *addr);
> +#define DO1(buf) \
> + if (((u32)buf >= CONFIG_FLASH_BASE) && ((u32)buf < CONFIG_FLASH_END)) { 
> \
> + crc = crc_table[((int)crc ^ (flash_read8((void *)buf++))) & 
> 0xff] ^ \
> + (crc >> 8); \
> + } else { \
> + crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); \
> + }
> +#else
>  #define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
> +#endif
>  #define DO2(buf)  DO1(buf); DO1(buf);
>  #define DO4(buf)  DO2(buf); DO2(buf);
>  #define DO8(buf)  DO4(buf); DO4(buf);

Please wrap all such macros in the usual "do { ... } while (0)"
wrappers.

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]
There is nothing in this world constant but inconstancy.  - Swift
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] PATCH: mpc8xx PLPRCR (init_pll_866)

2008-12-09 Thread Wolfgang Denk
Dear Spencer Putt,

In message <[EMAIL PROTECTED]> you wrote:
> 
> Signed-off-by:
> Spencer Putt
> Raytheon Company
> 
> The current init_pll_866 makes a bad assumption for the oscillator.  A
> board with a slower oscillator may lead to PLPRCR fields overflowing their
> bounds and making the board not boot.  This patch should more accurately
> set the PLPRCR regardless of the oscillator, and will increase the
> probability a board will boot by doing some bounds checking.
> 
> --- cpu_mpc8xx_speed.c 2008-10-16 15:37:10.0 -0400
> +++ speed.c 2008-10-16 15:35:44.0 -0400
> @@ -313,56 +313,60 @@
> }
> /* Configure PLL for MPC866/859/885 CPU series
> - * PLL multiplication factor is set to the value nearest to the desired
> clk,
> - * assuming a oscclk of 10 MHz.
> + * PLL multiplication factor is set to the value nearest to the desired
> clk
> + * If the clk is unattainable, it is set to the highest possible, OSCLK*16
> */
> static long init_pll_866 (long clk)
> {
> extern void plprcr_write_866 (long);
> volatile immap_t *immr = (immap_t *) CFG_IMMR;
> - long n, plprcr;
> - char mfi, mfn, mfd, s, pdf;
> - long step_mfi, step_mfn;
> -
> - if (clk < 2000) {
> - clk *= 2;
> - pdf = 1;
> - } else {
> - pdf = 0;
> - }

Your patch is completely white-space corrupted, probably by your Lotus
mailer.

Please retry sending after fixing your mail configuration. It is best
when you use git-format-patch to create the patch and  git-send-email
to send it.

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]
Q: What do you get when you cross an ethernet with an income statement?
A: A local area networth.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] serial: Add vcth UART driver

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

In message <[EMAIL PROTECTED]> you wrote:
> This patch adds the UART driver for the upcoming VCTH board support.
> 
> Signed-off-by: Stefan Roese <[EMAIL PROTECTED]>
> ---
>  drivers/serial/Makefile |1 +
>  drivers/serial/vcth.c   |  121 
> +++
>  2 files changed, 122 insertions(+), 0 deletions(-)
>  create mode 100755 drivers/serial/vcth.c

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
We are all agreed that your  theory  is  crazy.  The  question  which
divides  us  is  whether it is crazy enough to have a chance of being
correct. My own feeling is that it is not crazy enough.  - Niels Bohr
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] Fixed build error due to #define of _LINUX_STRING_H_ in 82559_eeprom.c

2008-12-09 Thread Wolfgang Denk
Dear Graeme Russ,

In message <[EMAIL PROTECTED]> you wrote:
> Signed-off-by: Graeme Russ <[EMAIL PROTECTED]>
> ---
> 
> 82559_eeprom.c is only compiled for i386 arch's (see /examples/Makefile lines
> 92-94). This modification should only impact sc520_cdp and sc520_spunk which
> need this define removed in order to compile
> 
>  examples/82559_eeprom.c |1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
The use of anthropomorphic terminology when  dealing  with  computing
systems is a symptom of professional immaturity.   -- Edsger Dijkstra
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] Minor changes to allow clean creation of new i386/sc520 boards

2008-12-09 Thread Wolfgang Denk
Dear Graeme Russ,

In message <[EMAIL PROTECTED]> you wrote:
> Signed-off-by: Graeme Russ <[EMAIL PROTECTED]>
> ---
> 
> Moved PCI specific definitions out of sc520.h into a new file plus fixed
> include path to ssi.h
> 
>  cpu/i386/sc520.c|2 +-
>  include/asm-i386/ic/pci.h   |   52 +++=
> 
>  include/asm-i386/ic/sc520.h |   22 --
>  3 files changed, 53 insertions(+), 23 deletions(-)
>  create mode 100644 include/asm-i386/ic/pci.h

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
Of all the things I've lost, I miss my mind the most.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] inka4x0: hardware diagnosis and RTC.

2008-12-09 Thread Wolfgang Denk
Dear [EMAIL PROTECTED],

In message <[EMAIL PROTECTED]> you wrote:
> RnJvbTogQW5kcmVhcyBQZmVmZmVybGUgPGFwQGRlbnguZGU+CgpUaGlzIHBhdGNoIHN1cHBvcnRz
> IGFkZGVkIGRpYWdub3NpcyBmdW5jdGlvbnMgYW5kIHRoZQp1c2Ugb2YgdGhlIGV4dGVybmFsIFJU
> Qy4KwqAgwqAKU2lnbmVkLW9mZi1ieTogQW5kcmVhcyBQZmVmZmVybGUgPGFwQGRlbnguZGU+Ci0t
> LQogaW5jbHVkZS9jb25maWdzL2lua2E0eDAuaCB8ICAgIDcgKysrKy0tLQogMSBmaWxlcyBjaGFu
> Z2VkLCA0IGluc2VydGlvbnMoKyksIDMgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvaW5jbHVk
> ZS9jb25maWdzL2lua2E0eDAuaCBiL2luY2x1ZGUvY29uZmlncy9pbmthNHgwLmgKaW5kZXggNDA1
> MjM0Yy4uNWNhYTQwNSAxMDA2NDQKLS0tIGEvaW5jbHVkZS9jb25maWdzL2lua2E0eDAuaAorKysg
> Yi9pbmNsdWRlL2NvbmZpZ3MvaW5rYTR4MC5oCkBAIC05Nyw3ICs5Nyw4IEBACiAjZGVmaW5lIENP
> TkZJR19DTURfUENJCiAjZGVmaW5lIENPTkZJR19DTURfU05UUAogI2RlZmluZSBDT05GSUdfQ01E
> X1VTQgotCisjZGVmaW5lIENPTkZJR19DTURfREFURQorI2RlZmluZSBDT05GSUdfQ01EX1BJTkcK
> IAogI2RlZmluZQlDT05GSUdfVElNRVNUQU1QCTEJLyogUHJpbnQgaW1hZ2UgaW5mbyB3aXRoIHRp
> bWVzdGFtcCAqLwogCkBAIC0yNDEsMTMgKzI0MiwxMyBAQAogICogdXNlIFBTQzZfMSBhbmQgUFND
> Nl8zIGFzIEdQSU86IEJpdHMgOToxMSAobWFzazogMHgwNzAwMDAwMCk6CiAgKgkwMTEgLT4gUFND
> NiBjb3VsZCBub3QgYmUgdXNlZCBhcyBVQVJUIG9yIENPREVDLiBJckRBIHN0aWxsIHBvc3NpYmxl
> LgogICovCi0jZGVmaW5lIENPTkZJR19TWVNfR1BTX1BPUlRfQ09ORklHCTB4MDEwMDEwMDQKKyNk
> ZWZpbmUgQ09ORklHX1NZU19HUFNfUE9SVF9DT05GSUcJMHgwMTUwMTQ0NAogCiAvKgogICogUlRD
> IGNvbmZpZ3VyYXRpb24KICAqLwotI2RlZmluZSBDT05GSUdfUlRDX01QQzUyMDAJMQkvKiB1c2Ug
> aW50ZXJuYWwgTVBDNTIwMCBSVEMgKi8KIAorI2RlZmluZSBDT05GSUdfUlRDX1JUQzQ1NDMgCTEJ
> LyogdXNlIGV4dGVybmFsIFJUQyAqLwogLyoKICAqIE1pc2NlbGxhbmVvdXMgY29uZmlndXJhYmxl
> IG9wdGlvbnMKICAqLwotLSAKMS42LjAuNAoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
> X19fX19fX19fX19fX19fX18KVS1Cb290IG1haWxpbmcgbGlzdApVLUJvb3RAbGlzdHMuZGVueC5k
> ZQpodHRwOi8vbGlzdHMuZGVueC5kZS9tYWlsbWFuL2xpc3RpbmZvL3UtYm9vdAo=

Please do not send base64 encoded messages.


> diff --git a/include/configs/inka4x0.h b/include/configs/inka4x0.h
> index 405234c..5caa405 100644
> --- a/include/configs/inka4x0.h
> +++ b/include/configs/inka4x0.h
> @@ -97,7 +97,8 @@
>  #define CONFIG_CMD_PCI
>  #define CONFIG_CMD_SNTP
>  #define CONFIG_CMD_USB
> -
> +#define CONFIG_CMD_DATE
> +#define CONFIG_CMD_PING

Please keep lists sorted.


> @@ -241,13 +242,13 @@
>   * use PSC6_1 and PSC6_3 as GPIO: Bits 9:11 (mask: 0x0700):
>   *   011 -> PSC6 could not be used as UART or CODEC. IrDA still possible.
>   */
> -#define CONFIG_SYS_GPS_PORT_CONFIG   0x01001004
> +#define CONFIG_SYS_GPS_PORT_CONFIG   0x01501444

Don't we need a change to the comments above, too?

>  /*
>   * RTC configuration
>   */
> -#define CONFIG_RTC_MPC5200   1   /* use internal MPC5200 RTC */
>  
> +#define CONFIG_RTC_RTC4543   1   /* use external RTC */
>  /*
>   * Miscellaneous configurable options
>   */

Please keep white space as it was before. 

There is no such thing as CONFIG_RTC_RTC4543  in  U-Boot.  Eventually
your  patch depends on othere patches that need to be applied before?
You should then mark this by submitting a numbered series of patches.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
"I think trash is the most important manifestation of culture we have
in my lifetime."  - Johnny Legend
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] inka4x0: board specific RTC support.

2008-12-09 Thread Wolfgang Denk
Dear [EMAIL PROTECTED],

In message <[EMAIL PROTECTED]> you wrote:
> From: Andreas Pfefferle <[EMAIL PROTECTED]>
> 
> This patch adds the board specific communication routines needed
> by the external 4543 RTC.

No, that's broken by design. An RTC is  not  board-dependent,  but  a
generic  piece  of  hardware.  Code  for  it does not belong into any
board-specific file, but into drivers/rtc/



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]
Wenn das dann in die Hose geht, nehme ich es auf meine Kappe.
 -- Rudi Völler, 15. Nov 2003
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Hardware diagnosis for inka4x0 boards.

2008-12-09 Thread Wolfgang Denk
Dear [EMAIL PROTECTED],

In message <[EMAIL PROTECTED]> you wrote:
> RnJvbTogQW5kcmVhcyBQZmVmZmVybGUgPGFwQGRlbnguZGU+CgpUaGlzIHBhdGNoIGFkZHMgZGlh
> Z25vc2lzIGZ1bmN0aW9ucyBmb3IgdGhlIGJ1enplciwgVUFSVHMgYW5kIGRpZ2l0YWwKSU9zIG9u
> IGlua2E0eDAgaGFyZHdhcmUuCsKgIMKgClNpZ25lZC1vZmYtYnk6IEFuZHJlYXMgUGZlZmZlcmxl
> IDxhcEBkZW54LmRlPgotLS0KIGJvYXJkL2lua2E0eDAvTWFrZWZpbGUgICB8ICAgIDIgKy0KIGJv
> YXJkL2lua2E0eDAvaW5rYWRpYWcuYyB8ICA1MTUgKysrKysrKysrKysrKysrKysrKysrKysrKysr
> KysrKysrKysrKysrKysrKysrKwogMiBmaWxlcyBjaGFuZ2VkLCA1MTYgaW5zZXJ0aW9ucygrKSwg
> MSBkZWxldGlvbnMoLSkKIGNyZWF0ZSBtb2RlIDEwMDY0NCBib2FyZC9pbmthNHgwL2lua2FkaWFn
> LmMKCmRpZmYgLS1naXQgYS9ib2FyZC9pbmthNHgwL01ha2VmaWxlIGIvYm9hcmQvaW5rYTR4MC9N
> YWtlZmlsZQppbmRleCA0NDJlMmQwLi4yMjY0ZGFlIDEwMDY0NAotLS0gYS9ib2FyZC9pbmthNHgw
> L01ha2VmaWxlCisrKyBiL2JvYXJkL2lua2E0eDAvTWFrZWZpbGUKQEAgLTI1LDcgKzI1LDcgQEAg
> aW5jbHVkZSAkKFRPUERJUikvY29uZmlnLm1rCiAKIExJQgk9ICQob2JqKWxpYiQoQk9BUkQpLmEK
> IAotQ09CSlMJOj0gJChCT0FSRCkubworQ09CSlMJOj0gJChCT0FSRCkubyAgaW5rYWRpYWcubwog
> CiBTUkNTCTo9ICQoU09CSlM6Lm89LlMpICQoQ09CSlM6Lm89LmMpCiBPQkpTCTo9ICQoYWRkcHJl
> Zml4ICQob2JqKSwkKENPQkpTKSkKZGlmZiAtLWdpdCBhL2JvYXJkL2lua2E0eDAvaW5rYWRpYWcu
...

Please do not post base64 encoded messages!

Any further such postings will be ignored.


> This patch adds diagnosis functions for the buzzer, UARTs and digital

Such hardware test code should be implemented as part of the POST
system, i. e. please create a post/board/inka4x0/ directory for it,
and make it part of the POST.

> diff --git a/board/inka4x0/inkadiag.c b/board/inka4x0/inkadiag.c
> new file mode 100644
> index 000..6194b58
> --- /dev/null
> +++ b/board/inka4x0/inkadiag.c
...
> +#define LED_HIGH(NUM)\
> +out_be32((unsigned *)MPC5XXX_GPT##NUM##_ENABLE,\
> +   in_be32((unsigned *)MPC5XXX_GPT##NUM##_ENABLE) | 0x10)
> +
> +#define LED_LOW(NUM)\
> +out_be32((unsigned *)MPC5XXX_GPT##NUM##_ENABLE,\
> +   in_be32((unsigned *)MPC5XXX_GPT##NUM##_ENABLE) & ~0x10)

Please use "do { ...} while (0)" wrappers for these macros.

> +static int io_helper(int argc, char *argv[])
> +{
> + unsigned int state = inka_digin_get_input();
> + if (strcmp(argv[1], "drawer1") == 0) {
> + printf("exit code: 0x%X\n",
> + (state & DIGIN_DRAWER_SW1) >> (ffs(DIGIN_DRAWER_SW1) - 1));
> + } else if (strcmp(argv[1], "drawer2") == 0) {
> + printf("exit code: 0x%X\n",
> + (state & DIGIN_DRAWER_SW2) >> (ffs(DIGIN_DRAWER_SW2) - 1));
> + } else if (strcmp(argv[1], "other") == 0) {
> + printf("exit code: 0x%X\n",
> +   ((state & DIGIN_KEYB_MASK) >> (ffs(DIGIN_KEYB_MASK) - 1))
> +   | ((state & DIGIN_TOUCHSCR_MASK) >>
> +   (ffs(DIGIN_TOUCHSCR_MASK) - 2)));
> + } else {
> + printf("Invalid argument: %s\n", argv[1]);
> + return -1;
> + }
> + return 0;

Please use the existing command parser code here and below.

> +DECLARE_GLOBAL_DATA_PTR;
> +
> +static int ser_init(volatile struct mpc5xxx_psc *psc, int baudrate)
> +{

Maybe there should be some comments what these functions are doing?

> +static void ser_putc(volatile struct mpc5xxx_psc *psc, const char c)
> +{
> + /* Wait for last character to go. */
> + int i = 0;
> + while (!(psc->psc_status & PSC_SR_TXEMP) && (i++ < CONFIG_SYS_HZ))
> + udelay(10);
> + psc->psc_buffer_8 = c;

What exactly has CONFIG_SYS_HZ to do with that? I cannot understand
this sort of magic.

> +static int ser_getc(volatile struct mpc5xxx_psc *psc)
> +{
> + /* Wait for a character to arrive. */
> + int i = 0;
> + while (!(psc->psc_status & PSC_SR_RXRDY) && (i++ < CONFIG_SYS_HZ))
> + udelay(10);

Ditto here.

> + return psc->psc_buffer_8;
> +}
> +
> +#define SERIAL_PORT_BASE (u_char *)0x8000
> +
> +#define UART_RX  0   /* In:  Receive buffer (DLAB=0) */
> +#define UART_TX  0   /* Out: Transmit buffer (DLAB=0) */
> +#define UART_DLL 0   /* Out: Divisor Latch Low (DLAB=1) */
> +
> +#define UART_LCR 3   /* Out: Line Control Register */
> +#define UART_MCR 4   /* Out: Modem Control Register */
...

Lots of #defines right in the middle of a C file? That's uygly. Please
move these in a separate header file (or at least at the begin of the
C file).

> +static unsigned char serial_in(unsigned char num, int offset)
> +{
> + return in_8(SERIAL_PORT_BASE + (num << 3) + offset);
> +}
> +
> +static void serial_out(unsigned char num, int offset, unsigned char value)
> +{
> + out_8(SERIAL_PORT_BASE + (num << 3) + offset, value);
> +}

The amount of comments in this file sucessfully avoids all  risks  of
fatiguing the reader...

> + if (strcmp(argv[2], "115200") == 0)
> + combrd = 1;
> + else if (strcmp(argv[2], "57600") == 0)
> + combrd = 2;
> + else if (strcmp(argv[2], "38400") == 0)
> + combrd = 3;
> + else if (strcmp(ar

Re: [U-Boot] [PATCH] libfdt: Fix redefined uintptr_t warning for USE_HOSTCC

2008-12-09 Thread Wolfgang Denk
Dear Jerry Van Baren,

In message <[EMAIL PROTECTED]> you wrote:
> Compiling U-Boot in an old OS environment (RedHat-7.3  :-)  gives the
> following warnings from FDT:
> 
> include/libfdt_env.h:50: warning: redefinition of 'uintptr_t'
> /usr/include/stdint.h:129: warning: 'uintptr_t' previously declared here
> 
> Fix: Protect the definition of uintptr_t when compiling on the host
> system.
> 
> Signed-off-by: Gerald Van Baren <[EMAIL PROTECTED]>

Appied, 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]
An expert is a person who avoids the small errors while  sweeping  on
to the grand fallacy.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] mkimage warning: ISO C99 requires ...

2008-12-09 Thread Wolfgang Denk
Dear Bartek,

in message <[EMAIL PROTECTED]> I wrote:
> 
> compiling U-Boot in an old OS environment (RedHat-7.3 :-) gives the
> following warnigns from mkimage.[ch]:
> 
> In file included from image.c:71:
> mkimage.h:41:23: warning: ISO C does not permit named variadic macros
> image.c:2422:54: warning: ISO C99 requires rest arguments to be used
> image.c:2840:60: warning: ISO C99 requires rest arguments to be used
> image.c:2847:60: warning: ISO C99 requires rest arguments to be used
> image.c:2854:67: warning: ISO C99 requires rest arguments to be used
> image.c:2892:73: warning: ISO C99 requires rest arguments to be used
> In file included from mkimage.c:25:
> mkimage.h:41:23: warning: ISO C does not permit named variadic macros
> mkimage.c:243:47: warning: ISO C99 requires rest arguments to be used
> mkimage.c:622:48: warning: ISO C99 requires rest arguments to be used
> 
> 
> Could you please have a look?  Thanks.
> 
> Best regards,
> 
> Wolfgang Denk

Seems you missed that message. Could you please have a look?  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]
Worlds are conquered, galaxies destroyed -- but a woman is  always  a
woman.
-- Kirk, "Conscience of the King", stardate unknown
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Microblaze patches

2008-12-09 Thread Wolfgang Denk
Dear Michal Simek,

In message <[EMAIL PROTECTED]> you wrote:
> 
> here are 4 microblaze patches. All patches are in microblaze custodian
> repository - master branch.

But you did not send any pull request yet. Will you do this any time
soon?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
You could end up being oddly sad and full of a strange, diffuse  com-
passion  which would lead you to believe that it might be a good idea
to wipe out the whole human race and start again with amoebas.
 - Terry Pratchett, _Guards! Guards!_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] [ONENAND] Reduce OneNAND IPL code size v2

2008-12-09 Thread Kyungmin Park
On Wed, Dec 10, 2008 at 5:50 AM, Scott Wood <[EMAIL PROTECTED]> wrote:
> On Mon, Nov 10, 2008 at 01:53:46PM +0900, Kyungmin Park wrote:
>> OneNAND IPL has common codes for RAM init, load data, and jump to 2nd
>> bootloader, but it's common code used about 300~400 bytes. So board
>> specific codes, such as lowlevel_init, can't has enough code. It make
>> a difficult to implement OneNAND IPL.
>>
>> This patch make this common code as small as possible. and give
>> lowlevel_init can have more codes.
>
> Sorry for the delay; I missed this patch earlier.
>
>> Signed-off-by: Kyungmin Park <[EMAIL PROTECTED]>
>> ---
>> diff --git a/cpu/arm1136/start.S b/cpu/arm1136/start.S
>> index e622338..132cc4a 100644
>> --- a/cpu/arm1136/start.S
>> +++ b/cpu/arm1136/start.S
>> @@ -33,23 +33,7 @@
>>  .globl _start
>>  _start: breset
>>  #ifdef CONFIG_ONENAND_IPL
>> - ldr pc, _hang
>> - ldr pc, _hang
>> - ldr pc, _hang
>> - ldr pc, _hang
>> - ldr pc, _hang
>> - ldr pc, _hang
>> - ldr pc, _hang
>> -
>> -_hang:
>> - .word   do_hang
>> - .word   0x12345678
>> - .word   0x12345678
>> - .word   0x12345678
>> - .word   0x12345678
>> - .word   0x12345678
>> - .word   0x12345678
>> - .word   0x12345678  /* now 16*4=64 */
>> + . = _start + 64 /* now 16*4=64 */
>>  #else
>
> Can you do a branch-to-self here that will accomplish the same thing,
> without needing do_hang later?

So I don't understand the meaning. In general in restricted
environment, 1KiB bootloader.
There's no room to handle exception.

>
>> diff --git a/onenand_ipl/onenand_boot.c b/onenand_ipl/onenand_boot.c
>> index aff62d2..2440d8b 100644
>> --- a/onenand_ipl/onenand_boot.c
>> +++ b/onenand_ipl/onenand_boot.c
>> @@ -39,6 +39,7 @@ int print_info(void)
>>
>>  typedef int (init_fnc_t)(void);
>>
>> +#ifdef CONFIG_USE_ONENAND_INIT
>>  init_fnc_t *init_sequence[] = {
>
> Is there anything that's going to use this?  If not, just remove the
> code.

I just wonder if there are some user to use. If not no problem to remove.

>
>> +#ifdef CONFIG_USE_ONENAND_INIT
>>  void hang(void)
>>  {
>>   /* if board_hang() returns, hange here */
>>   printf("X-Loader hangs\n");
>>   for (;;);
>>  }
>> +#endif
>
> X-Loader?

It's code used at x-loader (cross nand bootloader).

>
>> diff --git a/onenand_ipl/onenand_ipl.h b/onenand_ipl/onenand_ipl.h
>> index 3387998..438e58c 100644
>> --- a/onenand_ipl/onenand_ipl.h
>> +++ b/onenand_ipl/onenand_ipl.h
>> @@ -23,7 +23,7 @@
>>
>>  #include 
>>
>> -#define ONENAND_BLOCK_SIZE  2048
>> +#define ONENAND_BLOCK_SIZE  0x2
>
> This doesn't seem to be referenced at all any more.  Was the old value
> simply wrong?

It's used at onenand_boot.c but now it's not. It's also no problem to remove.

Thank you,
Kyungmin Park
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] sh: Update sh timer function

2008-12-09 Thread Wolfgang Denk
Dear Nobuhiro Iwamatsu,

In message <[EMAIL PROTECTED]> you wrote:
> Change to write/readX fcuntion and fix timer bug.
> 
> Signed-off-by: Nobuhiro Iwamatsu <[EMAIL PROTECTED]>

It seems there are some SH related patches in your  queue  which  did
not  make it into mainline yet? Doi you intend to send a pull request
any time soon?

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]
"No matter where you go, there you are..."  - Buckaroo Banzai
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] scan jffs2 NAND slow and bad block

2008-12-09 Thread Derek Ou
Dear all,

I just enabled CMD_JFFS2 and JFFS2_NAND in the uboot 1.3.4 for my 
at91sam9263 based board.  In general,  it works in loading the jffs2 
file system and loading files from it.  However, it takes almost an hour 
to scan the jffs2 partition, which is 512 MiB.  Is it because of the 
size of the partition?  Linux loads and starts within a minute.  How 
come it takes so long for u-boot?

Also, it seems that fsload/scanning FS routine does not skip the bad 
blocks in NAND.  So it complains about "read_nand_cached: error reading 
nand off 0x", with the address within bad blocks reported by 
"nand bad".  Did I forget something in the configuration?

Thanks,
Derek

 my related configuration 
#undef CONFIG_CMD_FLASH
#define CONFIG_CMD_NAND1
#define CONFIG_CMD_JFFS2
#define NAND_MAX_CHIPS1
#define CFG_MAX_NAND_DEVICE1
#define CFG_NAND_BASE0x4000
#define CFG_NAND_DBW_81
#undef CONFIG_JFFS2_CMDLINE
#define CONFIG_JFFS2_NAND1
#define CONFIG_JFFS2_DEV"nand0"
#define CONFIG_JFFS2_PART_SIZE0x2000
#define CONFIG_JFFS2_PART_OFFSET0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] scan jffs2 NAND slow and bad block

2008-12-09 Thread Wolfgang Denk
Dear Derek Ou,

In message <[EMAIL PROTECTED]> you wrote:
> 
> I just enabled CMD_JFFS2 and JFFS2_NAND in the uboot 1.3.4 for my 
> at91sam9263 based board.  In general,  it works in loading the jffs2 
> file system and loading files from it.  However, it takes almost an hour 
> to scan the jffs2 partition, which is 512 MiB.  Is it because of the 
> size of the partition?  Linux loads and starts within a minute.  How 
> come it takes so long for u-boot?

You may want to try top of tree from the git repository instead.

See the patch series just checked in:

...
commit 142a80ffc3b537a9c45acd2444a42a77f147c602
Author: Ilya Yanok <[EMAIL PROTECTED]>
Date:   Thu Nov 13 19:49:36 2008 +0300

jffs2: cache data_crc results

As we moved data_crc() invocation from jffs2_1pass_build_lists() to
jffs2_1pass_read_inode() data_crc is going to be calculated on each
inode access. This patch adds caching of data_crc() results. There
is no significant improvement in speed (because of flash access
caching added in previous patch I think, crc in RAM is really fast)
but this patch impacts memory usage -- every b_node structure uses
12 bytes instead of 8.

Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>

commit 9b7076229ec6a958bd835ab70745f7676297ce82
Author: Ilya Yanok <[EMAIL PROTECTED]>
Date:   Thu Nov 13 19:49:35 2008 +0300

jffs2: summary support

This patch adds support for reading fs information from summary
node instead of scanning full eraseblock.

Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>

commit 70741004dc28946cd82c7af6789c4ddb3fc94526
Author: Ilya Yanok <[EMAIL PROTECTED]>
Date:   Thu Nov 13 19:49:34 2008 +0300

jffs2: add buffer to cache flash accesses

With this patch JFFS2 code allocates memory buffer of max_totlen size
(size of the largest node, calculated during scan time) and uses it to
store entire node. Speeds up loading. If malloc fails we use old ways
to do things.

Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>

commit 8a36d31f72411144ac0412ee7e1880e801acd754
Author: Ilya Yanok <[EMAIL PROTECTED]>
Date:   Thu Nov 13 19:49:33 2008 +0300

jffs2: rewrite jffs2 scanning code based on Linux one

Rewrites jffs2_1pass_build_lists() function in style of Linux's
jffs2_scan_medium() and jffs2_scan_eraseblock().
This includes:
 - Caching flash acceses
 - Smart dealing with free space

Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>

commit e0b5532579eda8b4629f1b4f6e49c3cc60f52237
Author: Ilya Yanok <[EMAIL PROTECTED]>
Date:   Thu Nov 13 19:49:32 2008 +0300

jffs2: add sector_size field to part_info structure

This patch adds sector_size field to part_info structure (used
by new JFFS2 code).

Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>

commit f73846956778a7dfee83403ef9747aff77198848
Author: Ilya Yanok <[EMAIL PROTECTED]>
Date:   Thu Nov 13 19:49:31 2008 +0300

jffs2: fix searching for latest version in jffs2_1pass_list_inodes()

We need to update i_version inside cycle to find really latest version
inside jffs2_1pass_list_inodes(). With that fixed we can use isize inside
dump_inode() instead of calling expensive jffs2_1pass_read_inode().

Signed-off-by: Alexey Neyman <[EMAIL PROTECTED]>
Signed-off-by: Ilya Yanok <[EMAIL PROTECTED]>




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]
There are three things I always forget. Names, faces -  the  third  I
can't remember. - Italo Svevo
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] We have data for Physicians, Chiropractors, Physicians etc..

2008-12-09 Thread Genevieve clue


Currently Practicing Doctors in the US 

788,324 in total <> 17,750 emails

Data for the many various medical specialties

you can sort by many different fields like primary or secondary specialty

Cost just slashed -  $390


{}{}{} A gift to you when you  purchase, receive these 4 databases below {}{}{}

US Pharmaceutical Company Executives Contact List
47,000 names and emails of the major positions

Complete Marketing List of Hospitals in the USA
complete contact information for CEO's, CFO's, Directors and more - over 23,000 
listings in total for more than 7,000 hospitals in the USA

Directory of American Dentists
Practically every dentist in the United States is listed here

American Chiropractors Mailing List
100,000 Chiropractors in the USA (worth $250 alone)

send email to:  [EMAIL PROTECTED]

  

during this week only


By emailing [EMAIL PROTECTED] you will have your email taken off


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


Re: [U-Boot] [PATCH] OneNAND: Fix compiler warnings

2008-12-09 Thread Kyungmin Park
On Wed, Dec 10, 2008 at 5:25 AM, Wolfgang Denk <[EMAIL PROTECTED]> wrote:
> Dear Scott,
>
> In message <[EMAIL PROTECTED]> you wrote:
>> On Tue, Dec 09, 2008 at 07:27:30AM +0100, Stefan Roese wrote:
>> > Till now Scott has takes care of the OneNAND related patches in his NAND
>> > repository. The latest patches are already present in his next branch, 
>> > IIRC.
>> >
>> > I'm not sure how you feel about this Scott. Are you willing to officially
>> > handle this OneNAND stuff further?
>>
>> I'm willing to continue, though if someone more familiar with OneNAND and
>> with access to hardware wanted to take it over I'd be fine with that too.
>
> Thanks for the clarification.
>
> I have this patch marked as open, and cannot find any comments for
> it in the archive:
>
> 11/10 Kyungmin Park  [U-Boot] [PATCH] [ONENAND] Reduce OneNAND IPL code 
> size v2
>
> Could you please have a look?  THanks.
>

Thank you for Scott

Continue to work with Scott as before and make a custodian if it's needed.
I will send OneNAND and IPL codes for merge tomorrow.

Plan: I worked OneNAND on several platform, S3C6410, PXA3xx, OMAP3
with different u-boot code base. So I want to merge this just one
tree. actually PXA3xx and OMAP3 has same interface but s3c6410
doesn't. it has own OneNAND controller and difficult to use it.

Thank you,
Kyungmin Park
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] fs/fat: handle FAT on SATA

2008-12-09 Thread Mike Frysinger
From: Sonic Zhang <[EMAIL PROTECTED]>

The FAT file system driver should also handle FAT on SATA devices.

Signed-off-by: Sonic Zhang <[EMAIL PROTECTED]>
Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>
---
 fs/fat/fat.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 06eabc3..a9dde7d 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -84,6 +84,7 @@ fat_register_device(block_dev_desc_t *dev_desc, int part_no)
return -1;
}
 #if (defined(CONFIG_CMD_IDE) || \
+ defined(CONFIG_CMD_SATA) || \
  defined(CONFIG_CMD_SCSI) || \
  defined(CONFIG_CMD_USB) || \
  defined(CONFIG_MMC) || \
@@ -980,12 +981,14 @@ file_fat_detectfs(void)
return 1;
}
 #if defined(CONFIG_CMD_IDE) || \
+defined(CONFIG_CMD_SATA) || \
 defined(CONFIG_CMD_SCSI) || \
 defined(CONFIG_CMD_USB) || \
 defined(CONFIG_MMC)
printf("Interface:  ");
switch(cur_dev->if_type) {
case IF_TYPE_IDE :  printf("IDE"); break;
+   case IF_TYPE_SATA : printf("SATA"); break;
case IF_TYPE_SCSI : printf("SCSI"); break;
case IF_TYPE_ATAPI :printf("ATAPI"); break;
case IF_TYPE_USB :  printf("USB"); break;
-- 
1.6.0.4

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


[U-Boot] [PATCH] tools/netconsole: new script for working with netconsole over UDP

2008-12-09 Thread Mike Frysinger
While the doc/README.NetConsole does have a snippet for people to create
their own netcat script, it's a lot easier to make a simple dedicated script
and tell people to use it.

Also spruce it up a bit to make it user friendly.

Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>
---
 doc/README.NetConsole |   18 --
 tools/netconsole  |   42 ++
 2 files changed, 46 insertions(+), 14 deletions(-)
 create mode 100755 tools/netconsole

diff --git a/doc/README.NetConsole b/doc/README.NetConsole
index fea8e33..94c8816 100644
--- a/doc/README.NetConsole
+++ b/doc/README.NetConsole
@@ -22,21 +22,11 @@ For example, if your server IP is 192.168.1.1, you could 
use:
 
 On the host side, please use this script to access the console:
 
-+++
-#! /bin/bash
-
-[ $# = 1 ] || { echo "Usage: $0 target_ip" >&2 ; exit 1 ; }
-TARGET_IP=$1
+   tools/netconsole  [port]
 
-stty -icanon -echo intr ^T
-nc -u -l -p  < /dev/null &
-nc -u ${TARGET_IP} 
-stty icanon echo intr ^C
-+++
-
-The script expects exactly one argument, which is interpreted as  the
-target IP address (or host name, assuming DNS is working). The script
-can be interrupted by pressing ^T (CTRL-T).
+The script uses netcat to talk to the board over UDP.  It requires you to
+specify the target IP address (or host name, assuming DNS is working). The
+script can be interrupted by pressing ^T (CTRL-T).
 
 Be aware that in some distributives (Fedora Core 5 at least)
 usage of nc has been changed and -l and -p options are considered
diff --git a/tools/netconsole b/tools/netconsole
new file mode 100755
index 000..09c8981
--- /dev/null
+++ b/tools/netconsole
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+usage() {
+   (
+   echo "Usage: $0  [board port]"
+   echo ""
+   echo "If port is not specified, '' will be used"
+   [ -z "$*" ] && exit 0
+   echo ""
+   echo "ERROR: $*"
+   exit 1
+   ) 1>&2
+   exit $?
+}
+
+while [ -n "$1" ] ; do
+   case $1 in
+   -h|--help) usage;;
+   --)break;;
+   -*)usage "Invalid option $1";;
+   *) break;;
+   esac
+   shift
+done
+
+ip=$1
+port=${2:-}
+
+if [ -z "${ip}" ] || [ -n "$3" ] ; then
+   usage "Invalid number of arguments"
+fi
+
+for nc in netcat nc ; do
+   type ${nc} >/dev/null && break
+done
+
+trap "stty icanon echo intr ^C" 0 2 3 5 10 13 15
+echo "NOTE: the interrupt signal (normally ^C) has been remapped to ^T"
+
+stty -icanon -echo intr ^T
+${nc} -u -l -p ${port} < /dev/null &
+exec ${nc} -u ${ip} ${port}
-- 
1.6.0.4

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


[U-Boot] [PATCH] easylogo: add optional gzip support

2008-12-09 Thread Mike Frysinger
Some images can be quite large, so add an option to compress the image data
with gzip in the U-Boot image.  Then at runtime, the board can decompress it
with the normal zlib functions.

Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]>
---
 tools/easylogo/easylogo.c |   47 ++--
 1 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/tools/easylogo/easylogo.c b/tools/easylogo/easylogo.c
index 00a1e4e..05214aa 100644
--- a/tools/easylogo/easylogo.c
+++ b/tools/easylogo/easylogo.c
@@ -12,6 +12,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #pragma pack(1)
 
@@ -261,6 +263,8 @@ int image_rgb_to_yuyv (image_t * rgb_image, image_t * 
yuyv_image)
return 0;
 }
 
+int use_gzip = 0;
+
 int image_save_header (image_t * image, char *filename, char *varname)
 {
FILE *file = fopen (filename, "w");
@@ -283,6 +287,33 @@ int image_save_header (image_t * image, char *filename, 
char *varname)
fprintf (file, " *\t\t'x'\t\tis the horizontal position\n");
fprintf (file, " *\t\t'y'\t\tis the vertical position\n */\n\n");
 
+   /*  gzip compress */
+   if (use_gzip & 0x1) {
+   unsigned char *compressed;
+   struct stat st;
+   FILE *gz;
+
+   sprintf (str, "%s.gz", filename);
+   sprintf (app, "gzip > %s", str);
+   gz = popen (app, "w");
+   fwrite (image->data, image->size, 1, gz);
+   pclose (gz);
+
+   gz = fopen (str, "r");
+   stat (str, &st);
+   compressed = malloc (st.st_size);
+   fread (compressed, st.st_size, 1, gz);
+   fclose (gz);
+
+   unlink (str);
+
+   dataptr = compressed;
+   count = st.st_size;
+   fprintf (file, "#define EASYLOGO_ENABLE_GZIP %i\n\n", count);
+   if (use_gzip & 0x2)
+   fprintf (file, "static unsigned char 
EASYLOGO_DECOMP_BUFFER[%i];\n\n", image->size);
+   }
+
/*  Headers */
fprintf (file, "#include \n\n");
/*  Macros */
@@ -300,8 +331,8 @@ int image_save_header (image_t * image, char *filename, 
char *varname)
fprintf (file, "#define DEF_%s_SIZE\t\t%d\n\n", def_name,
 image->size);
/*  Declaration */
-   fprintf (file, "unsigned char DEF_%s_DATA[DEF_%s_SIZE] = {\n",
-def_name, def_name);
+   fprintf (file, "unsigned char DEF_%s_DATA[] = {\n",
+def_name);
 
/*  Data */
while (count)
@@ -359,6 +390,8 @@ static void usage (int exit_status)
"\n"
"Options:\n"
"  -r Output RGB instead of YUYV\n"
+   "  -g Compress with gzip\n"
+   "  -b Preallocate space in bss for decompressing image\n"
"  -h Help output\n"
"\n"
"Where: 'inputfile'   is the TGA image to load\n"
@@ -377,7 +410,7 @@ int main (int argc, char *argv[])
 
image_t rgb_logo, yuyv_logo;
 
-   while ((c = getopt(argc, argv, "hr")) > 0) {
+   while ((c = getopt(argc, argv, "hrgb")) > 0) {
switch (c) {
case 'h':
usage (0);
@@ -386,6 +419,14 @@ int main (int argc, char *argv[])
use_rgb = true;
puts ("Using 24-bit RGB Output Fromat");
break;
+   case 'g':
+   use_gzip |= 0x1;
+   puts ("Compressing with gzip");
+   break;
+   case 'b':
+   use_gzip |= 0x2;
+   puts ("Preallocating bss space for decompressing 
image");
+   break;
default:
usage (1);
break;
-- 
1.6.0.4

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


Re: [U-Boot] [PATCH] Add support for boards where the NOR FLASH is not memory-mapped

2008-12-09 Thread Stefan Roese
Hi Wolfgang,

On Wednesday 10 December 2008, Wolfgang Denk wrote:
> Sorry for the late review...
>
> In message <[EMAIL PROTECTED]> you wrote:
> > This patch adds the CONFIG_FLASH_NOT_MEM_MAPPED define which can be
> > used on boards where the NOR FLASH is not memory-mapped and
> > special accessor functions are needed to access the NOR FLASH.
> > This affects the memory commands (cmd_mem.c) and the environment
> > (env_flash.c).
> >
> > Boards using CONFIG_FLASH_NOT_MEM_MAPPED need to additionally specify
> > CONFIG_FLASH_BASE and CONFIG_FLASH_END so that the NOR FLASH region
> > can be detected.
>
> You have to document this (at least in the README).

No, I missed it. I'll send an updated patch later this week.

> But there is a general problem with this approach: U-Boot is based on
> the design that the actual flash size is auto-detected, i. e.  it  is
> always  assumed  to  be  unknown  at  compile  time.  Therefore it is
> impossible to set something like CONFIG_FLASH_END at compile time.

Yes, this approach is not optimal but I found no other way to work with the 
CFI driver and especially the environment in NOR without such an "extension". 
But CONFIG_FLASH_END doesn't have point to the real end of the NOR FLASH but 
the highest possible address. So auto-detection should still be possible in 
such an area. Here an example from the VCTH board port:

/*
 * For the non-memory-mapped NOR FLASH, we need to define the
 * NOR FLASH area. This can't be detected via the addr2info()
 * function, since we check for flash access in the very early
 * U-Boot code, before the NOR FLASH is detected.
 */
#define CONFIG_FLASH_BASE   0xb000
#define CONFIG_FLASH_END0xbfff

So the FLASH size could be a maximum of 256MB in this case. Not optimal but at 
least not totally fixed.

> > +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED)
> > +   if (((u32)addr >= CONFIG_FLASH_BASE) && ((u32)addr < CONFIG_FLASH_END))
>
> And this looks as if CONFIG_FLASH_END was not the "FLASH_END" address,
> i. e. the last address in flash, but "FLASH_END" + 1 ?

Good catch. I'll fix this to "((u32)addr <= CONFIG_FLASH_END).

> > +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED)
> > +#define FLASH_READ_MEMCPY(d, s, n) board_flash_read_memcpy(d, s, n)
> > +#else
> > +#define FLASH_READ_MEMCPY(d, s, n) memcpy(d, s, n);
> > +#endif /* CONFIG_FLASH_NOT_MEM_MAPPED */
>
> This is really, really ugly - and error prone, as you must be
> extremely careful which of the functions you may call might use
> memcpy() or similar internally.
>
> You know that I know of the specific problems of this hardware, but
> anyway - I really dislike having to add such code.

Yes, we agree that this is not a "nice" solution. But this is the best I could 
come up after several approaches. I'm open to better suggestions.

> > +#if defined(CONFIG_FLASH_NOT_MEM_MAPPED)
> > +u8 flash_read8(void *addr);
> > +#define DO1(buf) \
> > +   if (((u32)buf >= CONFIG_FLASH_BASE) && ((u32)buf < CONFIG_FLASH_END)) {
> > \ + crc = crc_table[((int)crc ^ (flash_read8((void *)buf++))) & 
> > 0xff] ^
> > \ + (crc >> 8); \
> > +   } else { \
> > +   crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8); \
> > +   }
> > +#else
> >  #define DO1(buf) crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >>
> > 8); +#endif
> >  #define DO2(buf)  DO1(buf); DO1(buf);
> >  #define DO4(buf)  DO2(buf); DO2(buf);
> >  #define DO8(buf)  DO4(buf); DO4(buf);
>
> Please wrap all such macros in the usual "do { ... } while (0)"
> wrappers.

OK, will do in the next version.

Thanks for the review.

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] confirm ab7aa8d57acab3af6153abdd3ca6718a0607f956

2008-12-09 Thread Uday Pavadshetty
Mailing list subscription confirmation notice for mailing list
U-Boot-Users

We have received a request from 172.29.29.1 for subscription of your
email address, "[EMAIL PROTECTED]", to the
[EMAIL PROTECTED] mailing list.  To confirm that you
want to be added to this mailing list, simply reply to this message,
keeping the Subject: header intact.  Or visit this web page:


https://lists.sourceforge.net/lists/confirm/u-boot-users/ab7aa8d57acab3af6153abdd3ca6718a0607f956


Or include the following line -- and only the following line -- in a
message to [EMAIL PROTECTED]:

   confirm ab7aa8d57acab3af6153abdd3ca6718a0607f956

Note that simply sending a `reply' to this message should work from
most mail readers, since that usually leaves the Subject: line in the
right form (additional "Re:" text in the Subject: is okay).

If you do not wish to be subscribed to this list, please simply
disregard this message.  If you think you are being maliciously
subscribed to the list, or have any other questions, send them to
[EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] show_boot_progess @ ppc not working

2008-12-09 Thread Heiko Schocher
Hello Andre,

Andre Schwarz wrote:
> All,
>
> can someone tell me why the board specific function "void
> show_boot_progress(int arg)"
> is no longer called (at least on MPC5200).
>
> Of course this line is present in the board config :
>
> #define CONFIG_SHOW_BOOT_PROGRESS 1
>
>
> What have I missed ?
>   

Nothing! Good catch. I tried it on a mpc8xx and
on a mpx82xx based board and it also didnt worked :-(

Can you try the following patch? (This patch solved it
on my boards ...)

thanks,
Heiko

[PATCH] all platforms: make show_boot_progress () again working.

Signed-off-by: Heiko Schocher <[EMAIL PROTECTED]>
---
 include/common.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/common.h b/include/common.h
index 5968036..6583f00 100644
--- a/include/common.h
+++ b/include/common.h
@@ -693,7 +693,7 @@ intpcmcia_init (void);
 /*
  * Board-specific Platform code can reimplement show_boot_progress ()
if needed
  */
-void __attribute__((weak)) show_boot_progress (int val);
+void show_boot_progress (int val);
 
 #ifdef CONFIG_INIT_CRITICAL
 #error CONFIG_INIT_CRITICAL is deprecated!
-- 
1.5.6.1

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


[U-Boot] [PATCH] Fix compile error in building MBX860T.

2008-12-09 Thread Ben Warren
Signed-off-by: Ben Warren <[EMAIL PROTECTED]>
---
 cpu/mpc8xx/cpu.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpu/mpc8xx/cpu.c b/cpu/mpc8xx/cpu.c
index 40f81ef..2eb848b 100644
--- a/cpu/mpc8xx/cpu.c
+++ b/cpu/mpc8xx/cpu.c
@@ -644,7 +644,7 @@ void reset_8xx_watchdog (volatile immap_t * immr)
  */
 int cpu_eth_init(bd_t *bis)
 {
-#if defined(SCC_ENET)
+#if defined(SCC_ENET) && defined(CONFIG_CMD_NET)
scc_initialize(bis);
 #endif
 #if defined(FEC_ENET)
-- 
1.5.4.3

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


  1   2   >