Re: [U-Boot] [PATCH 2/2] net: Add Xilinx LL Temac driver

2009-01-26 Thread Michal Simek
Hi Ben,

Could you check and pull ll temac driver to your net repo.
I prepared net branch in my microblaze repo. (It is based on my master branch
which Wolfgang merged but it hasn't in his branch yet).

Thanks,
Michal


The following changes since commit e7f325be9edeb84bb457301776bbac1f7257dafc:
  Michal Simek (1):
microblaze: Use cache functions (especially cache status)

are available in the git repository at:

  git://git.denx.de/u-boot-microblaze.git net

Michal Simek (1):
  net: Add Xilinx LL Temac driver

 drivers/net/Makefile  |1 +
 drivers/net/xilinx_ll_temac.c |  549 +
 2 files changed, 550 insertions(+), 0 deletions(-)
 create mode 100644 drivers/net/xilinx_ll_temac.c




> From: Michal Simek 
> 
> 
> Signed-off-by: Michal Simek 
> ---
>  drivers/net/Makefile  |1 +
>  drivers/net/xilinx_ll_temac.c |  543 
> +
>  2 files changed, 544 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/net/xilinx_ll_temac.c
> 
> diff --git a/drivers/net/Makefile b/drivers/net/Makefile
> index 128dc11..ed64787 100644
> --- a/drivers/net/Makefile
> +++ b/drivers/net/Makefile
> @@ -69,6 +69,7 @@ COBJS-$(CONFIG_ULI526X) += uli526x.o
>  COBJS-$(CONFIG_VSC7385_ENET) += vsc7385.o
>  COBJS-$(CONFIG_XILINX_EMAC) += xilinx_emac.o
>  COBJS-$(CONFIG_XILINX_EMACLITE) += xilinx_emaclite.o
> +COBJS-$(CONFIG_XILINX_LL_TEMAC) += xilinx_ll_temac.o
>  
>  COBJS:= $(COBJS-y)
>  SRCS := $(COBJS:.o=.c)
> diff --git a/drivers/net/xilinx_ll_temac.c b/drivers/net/xilinx_ll_temac.c
> new file mode 100644
> index 000..d1e63e2
> --- /dev/null
> +++ b/drivers/net/xilinx_ll_temac.c
> @@ -0,0 +1,543 @@
> +/*
> + *
> + * Xilinx xps_ll_temac ethernet driver for u-boot
> + *
> + * Author: Yoshio Kashiwagi kashiw...@co-nss.co.jp
> + *
> + * Copyright (C) 2008 Nissin Systems Co.,Ltd.
> + * March 2008 created
> + *
> + * Copyright (C) 2008 - 2009 Michal Simek 
> + * June 2008 Microblaze optimalization, FIFO mode support
> + *
> + * 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.
> + *
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#ifdef XILINX_LLTEMAC_FIFO_BASEADDR
> +# define FIFO_MODE   1
> +#elif XILINX_LLTEMAC_SDMA_CTRL_BASEADDR
> +# define SDMA_MODE   1
> +#else
> +# error Unsupported mode
> +#endif
> +
> +#undef ETH_HALTING
> +
> +#ifdef SDMA_MODE
> +/* XPS_LL_TEMAC SDMA registers definition */
> +# define TX_NXTDESC_PTR  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x00)
> +# define TX_CURBUF_ADDR  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x04)
> +# define TX_CURBUF_LENGTH(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x08)
> +# define TX_CURDESC_PTR  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x0c)
> +# define TX_TAILDESC_PTR (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x10)
> +# define TX_CHNL_CTRL(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x14)
> +# define TX_IRQ_REG  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x18)
> +# define TX_CHNL_STS (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x1c)
> +
> +# define RX_NXTDESC_PTR  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x20)
> +# define RX_CURBUF_ADDR  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x24)
> +# define RX_CURBUF_LENGTH(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x28)
> +# define RX_CURDESC_PTR  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x2c)
> +# define RX_TAILDESC_PTR (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x30)
> +# define RX_CHNL_CTRL(XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 
> 0x34)
> +# define RX_IRQ_REG  (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x38)
> +# define RX_CHNL_STS (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x3c)
> +
> +# define DMA_CONTROL_REG (XILINX_LLTEMAC_SDMA_CTRL_BASEADDR + 0x40)
> +#endif
> +
> +/* XPS_LL_TEMAC direct registers definition */
> +#define TEMAC_RAF0   (XILINX_LLTEMAC_BASEADDR + 0x00)
> +#define TEMAC_TPF0   (XILINX_LLTEMAC_BASEADDR + 0x04)
> +#define TEMAC_IFGP0  (XILINX_LLTEMAC_BASEADDR + 0x08)
> +#define TEMAC_IS0(XILINX_LLTEMAC_BASEADDR + 0x0c)
> +#define TEMAC_IP0(XILINX_LLTEMAC_BASEADDR + 0x10)
> +#define TEMAC_IE0(XILINX_LLTEMAC_BASEADDR + 0x14)
> +
> +#define TEMAC_MSW0   (XILINX_LLTEMAC_BASEADDR + 0x20)
> +#define TEMAC_LSW0   (XILINX_LLTEMAC_BASEADDR + 0x24)
> +#define TEMAC_CTL0   (XILINX_LLTEMAC_BASEADDR + 0x28)
> +#define TEMAC_RDY0   (XILINX_LLTEMAC_BASEADDR + 0x2c)
> +
> +#define XTE_RSE_MIIM_RR_MASK 0x0002
> +#define XTE_RSE_MIIM_WR_MASK 0x0004
> +#define XTE_RSE_CFG_RR_MASK  0x0020
> +#define XTE_RSE_CFG_WR_MASK  0x0040
> +
> +/* XPS_LL_TEMAC indirect registers offset definitio

[U-Boot] [PATCH] nand_spl: Fix compile problem with board_nand_init() prototype

2009-01-26 Thread Stefan Roese
This patch removes the now obsolete and additionally wrongly defined
board_nand_init() prototype from nand_spl/nand_boot.c.

Signed-off-by: Stefan Roese 
---
 nand_spl/nand_boot.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
index 87c50e1..c7eadad 100644
--- a/nand_spl/nand_boot.c
+++ b/nand_spl/nand_boot.c
@@ -27,8 +27,6 @@
 
 static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
 
-extern void board_nand_init(struct nand_chip *nand);
-
 #if (CONFIG_SYS_NAND_PAGE_SIZE <= 512)
 /*
  * NAND command for small page NAND devices (512)
-- 
1.6.1

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


[U-Boot] [PATCH] jedec_flash: Fix compilation warning in jedec_flash.c

2009-01-26 Thread Stefan Roese
Signed-off-by: Stefan Roese 
---
 drivers/mtd/jedec_flash.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index 2d99d4d..879f25e 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -172,7 +172,7 @@ struct amd_flash_info {
 static const struct amd_flash_info jedec_table[] = {
 #ifdef CONFIG_SYS_FLASH_LEGACY_256Kx8
{
-   .mfr_id = MANUFACTURER_SST,
+   .mfr_id = (u16)MANUFACTURER_SST,
.dev_id = SST39LF020,
.name   = "SST 39LF020",
.uaddr  = {
@@ -188,7 +188,7 @@ static const struct amd_flash_info jedec_table[] = {
 #endif
 #ifdef CONFIG_SYS_FLASH_LEGACY_512Kx8
{
-   .mfr_id = MANUFACTURER_AMD,
+   .mfr_id = (u16)MANUFACTURER_AMD,
.dev_id = AM29LV040B,
.name   = "AMD AM29LV040B",
.uaddr  = {
@@ -202,7 +202,7 @@ static const struct amd_flash_info jedec_table[] = {
}
},
{
-   .mfr_id = MANUFACTURER_SST,
+   .mfr_id = (u16)MANUFACTURER_SST,
.dev_id = SST39LF040,
.name   = "SST 39LF040",
.uaddr  = {
@@ -216,7 +216,7 @@ static const struct amd_flash_info jedec_table[] = {
}
},
{
-   .mfr_id = STM_MANUFACT,
+   .mfr_id = (u16)STM_MANUFACT,
.dev_id = STM_ID_M29W040B,
.name   = "ST Micro M29W040B",
.uaddr  = {
@@ -232,7 +232,7 @@ static const struct amd_flash_info jedec_table[] = {
 #endif
 #ifdef CONFIG_SYS_FLASH_LEGACY_512Kx16
{
-   .mfr_id = MANUFACTURER_AMD,
+   .mfr_id = (u16)MANUFACTURER_AMD,
.dev_id = AM29LV400BB,
.name   = "AMD AM29LV400BB",
.uaddr  = {
@@ -249,7 +249,7 @@ static const struct amd_flash_info jedec_table[] = {
}
},
{
-   .mfr_id = MANUFACTURER_AMD,
+   .mfr_id = (u16)MANUFACTURER_AMD,
.dev_id = AM29LV800BB,
.name   = "AMD AM29LV800BB",
.uaddr  = {
-- 
1.6.1

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


[U-Boot] qemu-mips usage

2009-01-26 Thread Luigi 'Comio' Mantellini
Hi ML,

I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm working 
on the high level booting sequence (linux init scripts), and qemu+uboot should 
be a good choice to emulate a basic system (flash + dram + 4kec cpu).

Furthermore, also following the doc/README.qemu_mips, I'm not able to see the 
u-boot prompt on my qemu because the flash is not recognized. I haven't 
experience with qemu-mips and I don't understand where the flash is placed 
(canonical 0xbf address?) and how it is managed. Reading the 
configs/qemu_mips.h, It seems that the flash is managed as a common CFI flash 
placed to 0xbfc0 address... but u-boot shows always "Unknown FLASH on Bank 
1" on startup.

Has anyone tried to use qemu-mips to boot a standard u-boot image (qemu_mips 
target on u-boot)?


Thanks for any suggestion.

luigi

### Useful Infos 

This is the qemu banner (on Ubuntu 8.10):

EMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard

This is the execution log:

$ cp ../u-boot-vanilla/u-boot.bin mips_bios.bin
$ dd of=flash bs=1k count=4k if=/dev/zero
4096+0 records in
4096+0 records out
4194304 bytes (4,2 MB) copied, 0,046865 s, 89,5 MB/s
$ dd of=flash bs=1k conv=notrunc if=../u-boot-vanilla/u-boot.bin
163+1 records in
163+1 records out
167076 bytes (167 kB) copied, 0,00124954 s, 134 MB/s
$ qemu-system-mips -M mips -pflash flash -monitor null -nographic
qemu: Warning, could not load MIPS bios '/usr/share/qemu/mips_bios.bin'
Terminated

$ qemu-system-mips -L . -M mips -pflash flash -monitor null -nographic


U-Boot 2009.01-00080-g8f86a36 (gen 26 2009 - 09:23:04)

Board: Qemu -M mips CPU: 24Kf proc_id=0x19300
DRAM:  128 MB
## Unknown FLASH on Bank 1 - Size = 0x = 0 MB
Terminated
$



-- 
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4
20068 Peschiera Borromeo (MI), Italy
Tel.:  +39 02 5167 2813
Fax:   +39 02 5167 2459
Email: luigi.mantell...@idf-hit.com

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


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

2009-01-26 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.
>
> Signed-off-by: Dirk Eibach 

Applied to u-boot/master. 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: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2009-01-26 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 

Applied to u-boot/master. 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: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] DM9161 AT91SAM9263

2009-01-26 Thread Josef Baumann
Hi,

i have a little bit of trouble with U-Boot and ATMEL AT91SAM9263.

I made a new board with AT91SAM9263 and DM9161. Starting U-Boot and 
Linux is ok. TFTP on U-Boot is working well. The only problem I have, is 
that the system starts in half duplex mode. How can I change this behavior?

best regards
 

Josef Baumann

 

Prime Mess- und Regeltechnik

Prinz-Eugen-Str. 65

94034 Passau

Tel.: +49-851-41041

Fax.: +49-851-41042

web:  www.prime-micro.de

 

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


Re: [U-Boot] qemu-mips usage

2009-01-26 Thread Nobuhiro Iwamatsu
Hi,

Luigi 'Comio' Mantellini wrote:
> Hi ML,
> 
> I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm working 
> on the high level booting sequence (linux init scripts), and qemu+uboot 
> should 
> be a good choice to emulate a basic system (flash + dram + 4kec cpu).
> 
> Furthermore, also following the doc/README.qemu_mips, I'm not able to see the 
> u-boot prompt on my qemu because the flash is not recognized. I haven't 
> experience with qemu-mips and I don't understand where the flash is placed 
> (canonical 0xbf address?) and how it is managed. Reading the 
> configs/qemu_mips.h, It seems that the flash is managed as a common CFI flash 
> placed to 0xbfc0 address... but u-boot shows always "Unknown FLASH on 
> Bank 
> 1" on startup.
> 
> Has anyone tried to use qemu-mips to boot a standard u-boot image (qemu_mips 
> target on u-boot)?
> 
Please check this thread.
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/42669

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


Re: [U-Boot] [PATCH 10/15] Renamed SC520 configuration options

2009-01-26 Thread Graeme Russ
On Sat, Jan 24, 2009 at 11:18 AM, Wolfgang Denk  wrote:
> Dear Graeme Russ,
>
> In message <1228606151-10839-11-git-send-email-graeme.r...@gmail.com> you 
> wrote:
>> Options are now all uniformly CONFIG_SYS_SC520_
>>
>> Signed-off-by: Graeme Russ 
>> ---

[snip]

>
> Please check the current code as  is  in  mainline  now,  and  repost
> cleaned up patches starting with the current one, i. e. [PATCH 10/15]
> and higher.
>

Thanks Wolfgang - I was actually preparing a brand new patch-set
based on Jean-Christophe's comments which was nearly complete - I should
have sent through a quick message to the list

Oh well - I'll check out the latest mainline and tidy up the loose
ends and send through a new patch-set

Regards,


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


Re: [U-Boot] [PATCH] ppc4xx: Remove CONFIG_SYS_IGNORE_405_UART_ERRATA_59 from config files

2009-01-26 Thread Stefan Roese
On Friday 02 January 2009, Matthias Fuchs wrote:
> Lot's of 405 board config files use CONFIG_SYS_IGNORE_405_UART_ERRATA_59.
> Either they define or undef it. Because it's not used in any source
> files this patch removes any references to it.
>
> Signed-off-by: Matthias Fuchs 

Applied to u-boot/master. 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: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] ppc4xx: Remove compilation warning in gdppc440etc.c

2009-01-26 Thread Stefan Roese
Signed-off-by: Stefan Roese 
---
 board/gdsys/gdppc440etx/gdppc440etx.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/board/gdsys/gdppc440etx/gdppc440etx.c 
b/board/gdsys/gdppc440etx/gdppc440etx.c
index e1890ff..a661057 100644
--- a/board/gdsys/gdppc440etx/gdppc440etx.c
+++ b/board/gdsys/gdppc440etx/gdppc440etx.c
@@ -145,8 +145,6 @@ int misc_init_r(void)
 int checkboard(void)
 {
char *s = getenv("serial#");
-   u8 rev;
-   u8 val;
 
printf("Board: GDPPC440ETX - G&D PPC440EP/GR ETX-module");
 
-- 
1.6.1

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


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

2009-01-26 Thread Stefan Roese
The following changes since commit 8f86a3636ef88427f880610638e80991adc41896:
  Wolfgang Denk (1):
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

are available in the git repository at:

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

Dirk Eibach (2):
  ppc4xx: Improve DDR autodetect
  ppc4xx: Add GDsys PowerPC 440 ETX board support.

Matthias Fuchs (1):
  ppc4xx: Remove CONFIG_SYS_IGNORE_405_UART_ERRATA_59 from config files

Stefan Roese (1):
  ppc4xx: Remove compilation warning in gdppc440etc.c

 MAINTAINERS   |1 +
 MAKEALL   |1 +
 Makefile  |3 +
 board/gdsys/gdppc440etx/Makefile  |   51 +
 board/gdsys/gdppc440etx/config.mk |   44 +
 board/gdsys/gdppc440etx/gdppc440etx.c |  323 +
 board/gdsys/gdppc440etx/init.S|   75 
 board/gdsys/gdppc440etx/u-boot.lds|  144 +++
 cpu/ppc4xx/sdram.c|   55 +-
 include/configs/ASH405.h  |1 -
 include/configs/CATcenter.h   |1 -
 include/configs/CMS700.h  |1 -
 include/configs/CPCI2DP.h |1 -
 include/configs/CPCI405.h |1 -
 include/configs/CPCI4052.h|1 -
 include/configs/CPCI405AB.h   |1 -
 include/configs/CPCI405DT.h   |1 -
 include/configs/DP405.h   |1 -
 include/configs/G2000.h   |1 -
 include/configs/HH405.h   |1 -
 include/configs/HUB405.h  |1 -
 include/configs/OCRTC.h   |1 -
 include/configs/ORSG.h|1 -
 include/configs/PCI405.h  |1 -
 include/configs/PLU405.h  |1 -
 include/configs/PMC405.h  |1 -
 include/configs/PPChameleonEVB.h  |1 -
 include/configs/VOH405.h  |1 -
 include/configs/VOM405.h  |1 -
 include/configs/WUH405.h  |1 -
 include/configs/csb272.h  |1 -
 include/configs/csb472.h  |1 -
 include/configs/gdppc440etx.h |  194 
 include/configs/sbc405.h  |1 -
 34 files changed, 886 insertions(+), 29 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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2] CFI: increase performance

2009-01-26 Thread Stefan Roese
On Tuesday 16 December 2008, Jens Gehrlein wrote:
> The following patches should increase the performance of the CFI driver,
> particularly with regard to single word programming mode.
>
> I tested it on TQM5200S with NOR-Flash Samsung K8P2815UQB, which has no
> write buffer. At least no write buffer, that could be programmed using
> standard commands.
>
> Performance increase on this TQM is about factor 2.6 (37 KiB/s -> 95
> KiB/s). On the same module with Spansion S29GL128N (with write buffer) it
> is about factor 1.2 (455 KiB/s -> 585 KiB/s).
>
> TQM5200 is a bottom boot module with 2x16 Bit Flash connection. Could
> someone test the patches on other HW, particularly top boot, other CPU,
> other flash width, please?

Tested on AMCC Kilauea (PPC405EX, with 1*16bit Spansion S29GL512N.

Patch series applied to u-boot-cfi-flash/master. 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: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] CFI: Add geometry reversal for STMicro M29W320ET

2009-01-26 Thread Stefan Roese
On Wednesday 14 January 2009, Richard Retanubun wrote:
> Added flash_fixup_stm to fix geometry reversal on STMicro M29W320ET flash
> chip.
>
> Modeled after flash_fixup_amd, this patch handles the geometry reversal
> or erase sectors that exist for ST Micro (now Numonyx) M29W320ET flash.
> Since I cannot test all STM's chips, the detection is implemented as
> narrow as possible for now.
>
> Signed-off-by: Richard Retanubun 

Applied to u-boot/master. 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: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 0/2] CFI: increase performance

2009-01-26 Thread Jens Gehrlein
Hi Stefan,

Stefan Roese schrieb:
> On Tuesday 16 December 2008, Jens Gehrlein wrote:
>> The following patches should increase the performance of the CFI driver,
>> particularly with regard to single word programming mode.
>>
>> I tested it on TQM5200S with NOR-Flash Samsung K8P2815UQB, which has no
>> write buffer. At least no write buffer, that could be programmed using
>> standard commands.
>>
>> Performance increase on this TQM is about factor 2.6 (37 KiB/s -> 95
>> KiB/s). On the same module with Spansion S29GL128N (with write buffer) it
>> is about factor 1.2 (455 KiB/s -> 585 KiB/s).
>>
>> TQM5200 is a bottom boot module with 2x16 Bit Flash connection. Could
>> someone test the patches on other HW, particularly top boot, other CPU,
>> other flash width, please?
> 
> Tested on AMCC Kilauea (PPC405EX, with 1*16bit Spansion S29GL512N.

The S29GL512N has a write buffer, AFAIK. Thus, U-Boot chooses another
programming algorithm. Possibly, you only tested patch 2 or did you 
override buffered programming for your test so that patch 1 was
included?

> 
> Patch series applied to u-boot-cfi-flash/master. Thanks.

Nice, thanks.

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


Re: [U-Boot] [PATCH 0/2] CFI: increase performance

2009-01-26 Thread Stefan Roese
Hi Jens,

On Monday 26 January 2009, Jens Gehrlein wrote:
> >> The following patches should increase the performance of the CFI driver,
> >> particularly with regard to single word programming mode.
> >>
> >> I tested it on TQM5200S with NOR-Flash Samsung K8P2815UQB, which has no
> >> write buffer. At least no write buffer, that could be programmed using
> >> standard commands.
> >>
> >> Performance increase on this TQM is about factor 2.6 (37 KiB/s -> 95
> >> KiB/s). On the same module with Spansion S29GL128N (with write buffer)
> >> it is about factor 1.2 (455 KiB/s -> 585 KiB/s).
> >>
> >> TQM5200 is a bottom boot module with 2x16 Bit Flash connection. Could
> >> someone test the patches on other HW, particularly top boot, other CPU,
> >> other flash width, please?
> >
> > Tested on AMCC Kilauea (PPC405EX, with 1*16bit Spansion S29GL512N.
>
> The S29GL512N has a write buffer, AFAIK. Thus, U-Boot chooses another
> programming algorithm. Possibly, you only tested patch 2 or did you
> override buffered programming for your test so that patch 1 was
> included?

No, I tested both your patches with the unchanged kilauea config to see if you 
patch broke this (standard) configuration. Nothing bad happened so I applied 
it to the master branch. Others will surely test it as well when its 
available in mainline.

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


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

2009-01-26 Thread Stefan Roese
The following changes since commit 8f86a3636ef88427f880610638e80991adc41896:
  Wolfgang Denk (1):
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx

are available in the git repository at:

  git://www.denx.de/git/u-boot-cfi-flash.git master

Jens Gehrlein (2):
  CFI: avoid redundant function call in single word programming mode
  CFI: increase performance of function find_sector()

Richard Retanubun (1):
  CFI: Add geometry reversal for STMicro M29W320ET

 drivers/mtd/cfi_flash.c |   50 +-
 1 files changed, 40 insertions(+), 10 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] MIPS: Add flush_dcache_range() and invalidate_dcache_range()

2009-01-26 Thread Shinya Kuribayashi
Stefan Roese wrote:
> This patch adds flush_/invalidate_dcache_range() to the MIPS architecture.
> Those functions are needed for the upcoming dcache support for the USB
> EHCI driver. I chose this API because those cache handling functions are
> already present in the PPC architecture.
> 
> Signed-off-by: Stefan Roese 
> ---
>  cpu/mips/cpu.c   |   28 
>  include/common.h |2 ++
>  2 files changed, 30 insertions(+), 0 deletions(-)

I'm not going to stop your work, applied.

Thanks,

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


Re: [U-Boot] [PATCH 1/3 v3] MIPS: Add VCT board series support (Part 1/3)

2009-01-26 Thread Shinya Kuribayashi
Stefan Roese wrote:
> Signed-off-by: Stefan Roese 
> ---
> v3:
> - Added USB EHCI support
> - Added performance enhanced OneNAND read support
> 
> v2:
> - Fixed issues in u-boot.lds mentioned by Andrew Dyer
> 
>  board/micronas/vct/Makefile|   57 
>  board/micronas/vct/bcu.h   |  170 
>  board/micronas/vct/config.mk   |   31 +
>  board/micronas/vct/dcgu.c  |  258 
> 
>  board/micronas/vct/dcgu.h  |  179 +
>  board/micronas/vct/ebi.c   |   48 +++
>  board/micronas/vct/ebi.h   |   95 +
>  board/micronas/vct/ebi_nor_flash.c |  131 ++
>  board/micronas/vct/ebi_onenand.c   |  198 +++
>  board/micronas/vct/ebi_smc911x.c   |   94 +
>  10 files changed, 1261 insertions(+), 0 deletions(-)
>  create mode 100644 board/micronas/vct/Makefile
>  create mode 100644 board/micronas/vct/bcu.h
>  create mode 100644 board/micronas/vct/config.mk
>  create mode 100644 board/micronas/vct/dcgu.c
>  create mode 100644 board/micronas/vct/dcgu.h
>  create mode 100644 board/micronas/vct/ebi.c
>  create mode 100644 board/micronas/vct/ebi.h
>  create mode 100644 board/micronas/vct/ebi_nor_flash.c
>  create mode 100644 board/micronas/vct/ebi_onenand.c
>  create mode 100644 board/micronas/vct/ebi_smc911x.c

No objection from me, will apply.

Stefan, I'm going to fold all patches into sinble commit, ok?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] qemu-mips usage

2009-01-26 Thread Jean-Christophe PLAGNIOL-VILLARD
On 10:13 Mon 26 Jan , Luigi 'Comio' Mantellini wrote:
> Hi ML,
> 
> I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm working 
> on the high level booting sequence (linux init scripts), and qemu+uboot 
> should 
> be a good choice to emulate a basic system (flash + dram + 4kec cpu).
> 
> Furthermore, also following the doc/README.qemu_mips, I'm not able to see the 
> u-boot prompt on my qemu because the flash is not recognized. I haven't 
> experience with qemu-mips and I don't understand where the flash is placed 
> (canonical 0xbf address?) and how it is managed. Reading the 
> configs/qemu_mips.h, It seems that the flash is managed as a common CFI flash 
> placed to 0xbfc0 address... but u-boot shows always "Unknown FLASH on 
> Bank 
> 1" on startup.
> 
> Has anyone tried to use qemu-mips to boot a standard u-boot image (qemu_mips 
> target on u-boot)?
> 
> 
> Thanks for any suggestion.
> 
> luigi
> 
> ### Useful Infos 
> 
> This is the qemu banner (on Ubuntu 8.10):
> 
> EMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
Please use the SVN version of qemu for the current u-boot version

I'll update the README.qemu_mips to specify the last u-boot version for the
old qemu

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


Re: [U-Boot] [PATCH 1/3 v3] MIPS: Add VCT board series support (Part 1/3)

2009-01-26 Thread Stefan Roese
On Monday 26 January 2009, Shinya Kuribayashi wrote:
> No objection from me, will apply.
>
> Stefan, I'm going to fold all patches into sinble commit, ok?

That's ok with me. Not sure if Wolfgang has an objection though, since he 
might have problems tracking the status of the patches.

Wolfgang, an objections from you?

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


Re: [U-Boot] [PATCH] [REBASED] part_efi: Fix partition size calculation due to inclusive ending LBA.

2009-01-26 Thread Richard Retanubun
The ending LBA is inclusive. Hence, the partition size should be
((ending-LBA + 1) - starting-LBA) to get the proper partition size.

This is confirmed against the results from the parted tool.
(e.g. use parted /dev/sda -s unit S print) and observe the size.

Signed-off-by: Richard Retanubun 
---
Hi Wolfgang,
Here is the patch rebased against commit 
8f86a3636ef88427f880610638e80991adc41896

Thanks for the help
-Richard

  disk/part_efi.c |4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/disk/part_efi.c b/disk/part_efi.c
index cc188ee..d8a8111 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -163,7 +163,9 @@ int get_partition_info_efi(block_dev_desc_t * dev_desc, int 
part,

/* The ulong casting limits the maximum disk size to 2 TB */
info->start = (ulong) le64_to_int((*pgpt_pte)[part - 1].starting_lba);
-   info->size = (ulong) le64_to_int((*pgpt_pte)[part - 1].ending_lba) - 
info->start;
+   /* The ending LBA is inclusive, to calculate size, add 1 to it */
+   info->size = ((ulong)le64_to_int((*pgpt_pte)[part - 1].ending_lba) + 1)
+- info->start;
info->blksz = GPT_BLOCK_SIZE;

sprintf((char *)info->name, "%s%d\n", GPT_ENTRY_NAME, part);
-- 
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 v2 5/9] AVR32: macb - Disable 100mbps if clock is slow

2009-01-26 Thread Gunnar Rangøy
On Fri, Jan 23, 2009 at 4:38 PM, Jean-Christophe PLAGNIOL-VILLARD
 wrote:
> On 12:56 Fri 23 Jan , Gunnar Rangoy wrote:
>> From: Olav Morken 
>>
>> For 100mbps operation, the ethernet controller requires a 25 MHz clock
>> in MII mode, and a 50 MHz clock in RMII mode. If the clock is slower,
>> disable 100 Mbps mode.
>>
>> Signed-off-by: Gunnar Rangoy 
>> Signed-off-by: Paul Driveklepp 
>> Signed-off-by: Olav Morken 
>> ---
>>  drivers/net/macb.c |   12 +++-
>>  1 files changed, 11 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/macb.c b/drivers/net/macb.c
>> index 08bebf7..d47a052 100644
>> --- a/drivers/net/macb.c
>> +++ b/drivers/net/macb.c
>> @@ -297,7 +297,17 @@ static void macb_phy_reset(struct macb_device *macb)
>>   int i;
>>   u16 status, adv;
>>
>> - adv = ADVERTISE_CSMA | ADVERTISE_ALL;
>> + adv = ADVERTISE_CSMA | ADVERTISE_ALL ;
> ??

Oops... Will fix this.

>> +
>> +#ifdef CONFIG_MACB_FORCE10M
>> + printf("%s: 100Mbps is not supported on this board - forcing 
>> 10Mbps.\n",
>> +netdev->name);
>> +
>> + adv &= ~ADVERTISE_100FULL;
>> + adv &= ~ADVERTISE_100HALF;
>> + adv &= ~ADVERTISE_100BASE4;
>> +#endif
>not a fan
>could you be more specific about the problem?
>
> Best Regards,
> J.
>

On the EVK1100 board, the CPU (UC3A0512) is connected to the PHY via an
RMII bus. This requires the CPU clock to be at least 50 MHz.
Unfortunately, the chip on current EVK1100 boards may be unable to run
at more than 50 MHz, and with the oscillator on the board, the closest
frequency we can generate is 48 MHz.

This patch makes it possible to limit the macb to 10 MBit for this
case. We are open for suggestions for other solutions.

-- 
Gunnar Rangøy,
99360699
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] qemu-mips usage

2009-01-26 Thread Luigi 'Comio' Mantellini
Dear All,

thanks for the help.
I used the last svn copy and it works fine:
URL: svn://svn.savannah.nongnu.org/qemu/trunk
Repository Root: svn://svn.savannah.nongnu.org/qemu
Repository UUID: c046a42c-6fe2-441c-8c8c-71466251a162
Revision: 6436

Anyway I created a trivial patch in order to permit to have an arbitrary flash 
size on mips board (I'm need to simulate a board with 32MB instead the usual 
4M). Using the patch, the flash memory placed at the end of 0xbf  
memory space:

4MB flash: start bfc0 -> end bfff
8MB flash: start bf80 -> end bfff
16MB flash: start bf00 -> end bfff
32MB flash: start be00 -> end bfff

The firmware must be placed always at address 0xbfc0. these are the 
relative address on the file:

4MB flash: firmware offset +0
8MB flash: firmware offset +4MB
16MB flash: firmware offset +12MB
32MB flash: firmware offset +28MB

To create the image files, use the following  trivial script:

dd if=/dev/zero of=flash.img bs=$flashsize count=1 conv=sync
dd if=u-boot.bi of=flash.img bs=1 seek=$biosbase conv=notrunc


Thanks again for your support.

luigi


On Monday 26 January 2009 13:53:07 Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 10:13 Mon 26 Jan , Luigi 'Comio' Mantellini wrote:
> > Hi ML,
> >
> > I'm evaluating the qemu-mips to simulate a mips 4kec/24kec board. I'm
> > working on the high level booting sequence (linux init scripts), and
> > qemu+uboot should be a good choice to emulate a basic system (flash +
> > dram + 4kec cpu).
> >
> > Furthermore, also following the doc/README.qemu_mips, I'm not able to see
> > the u-boot prompt on my qemu because the flash is not recognized. I
> > haven't experience with qemu-mips and I don't understand where the flash
> > is placed (canonical 0xbf address?) and how it is managed. Reading
> > the configs/qemu_mips.h, It seems that the flash is managed as a common
> > CFI flash placed to 0xbfc0 address... but u-boot shows always
> > "Unknown FLASH on Bank 1" on startup.
> >
> > Has anyone tried to use qemu-mips to boot a standard u-boot image
> > (qemu_mips target on u-boot)?
> >
> >
> > Thanks for any suggestion.
> >
> > luigi
> >
> > ### Useful Infos 
> >
> > This is the qemu banner (on Ubuntu 8.10):
> >
> > EMU PC emulator version 0.9.1, Copyright (c) 2003-2008 Fabrice Bellard
>
> Please use the SVN version of qemu for the current u-boot version
>
> I'll update the README.qemu_mips to specify the last u-boot version for the
> old qemu
>
> Best Regards,
> J.

-- 
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4
20068 Peschiera Borromeo (MI), Italy
Tel.:  +39 02 5167 2813
Fax:   +39 02 5167 2459
Email: luigi.mantell...@idf-hit.com

Index: hw/mips_r4k.c
===
--- hw/mips_r4k.c	(revision 6436)
+++ hw/mips_r4k.c	(working copy)
@@ -16,7 +16,10 @@
 #include "boards.h"
 #include "flash.h"
 #include "qemu-log.h"
+#include "block_int.h"
 
+#include 
+
 #ifdef TARGET_WORDS_BIGENDIAN
 #define BIOS_FILENAME "mips_bios.bin"
 #else
@@ -205,10 +208,16 @@
 	cpu_register_physical_memory(0x1fc0,
  BIOS_SIZE, bios_offset | IO_MEM_ROM);
 } else if ((index = drive_get_index(IF_PFLASH, 0, 0)) > -1) {
+struct stat infobuf;  /* place to store info */
 uint32_t mips_rom = 0x0040;
-cpu_register_physical_memory(0x1fc0, mips_rom,
+
+if (stat(drives_table[index].bdrv->filename, &infobuf) == 0) {
+mips_rom = infobuf.st_size;
+}
+		
+cpu_register_physical_memory(0x2000 - mips_rom, mips_rom,
 	 qemu_ram_alloc(mips_rom) | IO_MEM_ROM);
-if (!pflash_cfi01_register(0x1fc0, qemu_ram_alloc(mips_rom),
+if (!pflash_cfi01_register(0x2000 - mips_rom, qemu_ram_alloc(mips_rom),
 drives_table[index].bdrv, sector_len, mips_rom / sector_len,
 4, 0, 0, 0, 0)) {
 fprintf(stderr, "qemu: Error registering flash memory.\n");
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 9/9] AVR32: Board support for ATEVK1100

2009-01-26 Thread Gunnar Rangøy
On Fri, Jan 23, 2009 at 4:37 PM, Wolfgang Denk  wrote:
> Dear Gunnar Rangoy,
>
> In message 
> <7d98d3ebed68dfca910943a360d0b8aaa28d9c17.1232710611.git.gun...@rangoy.com> 
> you wrote:
>> This patch adds support for the ATEVK1100 evaluation kit, which contains
>> an AT32UC3A0512ES chip.
> ...
>
> ...
>> --- /dev/null
>> +++ b/board/atmel/atevk1100/atevk1100.c
> ...
>> + /*
>> + .ncs_wr_pulse   = 1,
>> + .ncs_rd_pulse   = 1,
>> + .nwe_pulse  = 1,
>> + .nrd_pulse  = 1,
>> + .nwe_cycle  = 2,
>> + .nrd_cycle  = 2,
>> + */
>
> All this is dead code. Please remove.

Will do that.

> ...
>> +/*
>> + * Command line configuration.
>> + */
>> +#include 
>> +
>> +#define CONFIG_CMD_ASKENV
>> +#define CONFIG_CMD_DHCP
>> +
>> +#undef CONFIG_CMD_AUTOSCRIPT
>
> Is there a specific reason for not allowing to use shell scripts?
>
>
> 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: w...@denx.de
> I'm a programmer: I don't buy software, I write it.
>  -- Tom Christiansen
>

No, not really. We did this because this was done in other AVR32 boards
we used as references.


-- 
Gunnar Rangøy,
99360699
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] is uImage.FIT supported in U-boot 2008.10

2009-01-26 Thread Pieter
I am unable to find the mkimage tool that takes the -f vmlinux.bin.gz
argument. I am using ELDK4.2 compiling U-Boot 2008.10 using ARCH=powerpc
for a MPC8548 board.

is the uImage.FIT currently supported, if so, where can i find the tools
mentions in  /u-boot/doc/uImage.FIT/howto.txt

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


Re: [U-Boot] [PATCH v2 8/9] AVR32: CPU support for AT32UC3A0xxx CPUs

2009-01-26 Thread Gunnar Rangøy
On Fri, Jan 23, 2009 at 5:00 PM, Wolfgang Denk  wrote:
> Dear Gunnar Rangoy,
>
> In message 
>  
> you wrote:
>> This patch adds support for the AT32UC3A0xxx chips.
> ...
>> +++ b/cpu/at32uc/at32uc3a0xxx/portmux.c
>> @@ -0,0 +1,154 @@
> ...
>> + portmux_select_peripheral(PORTMUX_PORT(0),
>> + 0x0003C000 |
>> + 0x1E00, PORTMUX_FUNC_C, 0);
>> + portmux_select_peripheral(PORTMUX_PORT(1),
>> + 0x0010 |
>> + 0x7C00 |
>> + 0x0003 |
>> + 0xE000, PORTMUX_FUNC_C, 0);
>> + portmux_select_peripheral(PORTMUX_PORT(2),
>> + 0xFFC0, PORTMUX_FUNC_A, 0);
>> + portmux_select_peripheral(PORTMUX_PORT(3),
>> + 0x3FFF, PORTMUX_FUNC_A, 0);
>> +}
>
> It would be nice if you used readable names instead of all these
> magic hardcoded constants.

Each bit in the masks represents a single pin on the microcontroller.
The readable names would therefore become something like:
#define EBI_PINS_PORT0 (0x0003C000 | 0x1E00)
#define EBI_PINS_PORT1 (0x0010 | 0x7C00 | ...)
I'm not certain that that would make it much more readable. The
bitmasks are more or less based on reading the datasheet and counting
which pins are used.

Maybe adding a comment before the code would be just as useful?


>> +++ b/cpu/at32uc/at32uc3a0xxx/sm.h
>> @@ -0,0 +1,247 @@
>> +/*
>> + * Register definitions for System Manager
>> + */
>> +#ifndef __CPU_AT32UC_SM_H__
>> +#define __CPU_AT32UC_SM_H__
>> +
>> +/* SM register offsets */
>> +/* PM starts at 0x0C00 */
>> +#define SM_PM_REGS_OFFSET0x0c00
>> +#define SM_PM_MCCTRL (SM_PM_REGS_OFFSET + 0x)
>> +#define SM_PM_CKSEL  (SM_PM_REGS_OFFSET + 0x0004)
>> +#define SM_PM_CPU_MASK   (SM_PM_REGS_OFFSET + 
>> 0x0008)
>> +#define SM_PM_HSB_MASK   (SM_PM_REGS_OFFSET + 
>> 0x000c)
>> +#define SM_PM_PBA_MASK   (SM_PM_REGS_OFFSET + 
>> 0x0010)
>> +#define SM_PM_PBB_MASK   (SM_PM_REGS_OFFSET + 
>> 0x0014)
>> +#define SM_PM_PLL0   (SM_PM_REGS_OFFSET + 0x0020)
>> +#define SM_PM_PLL1   (SM_PM_REGS_OFFSET + 0x0024)
>> +#define SM_PM_OSCCTRL0   (SM_PM_REGS_OFFSET + 
>> 0x0028)
> ...
>
> Instead of using offsets everywhere I would appreciate if the code
> could be changed to use C structs instead (like we do in PPC land).

It was done like this because it was done in the existing AVR32 code
which we based our work on. Since we used parts of that code, it made
most sense to use the same coding style.

We can change it if you think it is necessary.

>
>> +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>> +{
>> + /* This will reset the CPU core, caches, MMU and all internal busses */
>> + __builtin_mtdr(8, 1 << 13); /* set DC:DBE */
>> + __builtin_mtdr(8, 1 << 30); /* set DC:RES */
>> +
>> + /* Flush the pipeline before we declare it a failure */
>> + asm volatile("sub   pc, pc, -4");
>> +
>> + return -1;
>> +}
>
> I read this as if you just reset the CPU "internal" stuff. Sorry for
> asking stupid questions, I don't know this architecture at all, but:
> Will external chips be reset this way, too?  Or how do you make sure
> that external peripherals get properly reset?

As most of the needed functionality is embedded in the microcontroller,
there are very few external peripherals used by U-Boot. Apart from
external memory, and oscillator, and level-shifters for the serial-port,
there is only the ethernet PHY, and that one shouldn't need a reset.


Gunnar Rangøy,
99360699
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] Freescale NFC NAND driver

2009-01-26 Thread Scott Wood
On Sat, Jan 24, 2009 at 12:27:04AM +0100, Wolfgang Denk wrote:
> Dear John Rigby,
> 
> In message <1225850561-751-1-git-send-email-jri...@freescale.com> you wrote:
> > v3: Fixed problem with CFG vs CONFIG_SYS in board/ads5121/ads5121.c
> > 
> > v2: Reworked MPC5121 NAND driver.
> > Attempted to address all the problems listed by Scott Wood.
> > Driver is now board independent.  Will still need more
> > work to be SOC independent.
> > 
> > Driver for the NAND controller on MPC5121.
> 
> I am still waiting for some pull request (including this patch and the
> other 512x specific updates).
> 
> Could you please comment ?

I did comment:
http://lists.denx.de/pipermail/u-boot/2008-November/043065.html

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


[U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

2009-01-26 Thread carolyn.j.smith
This fixes the initialization of the SDRAM_CODT register in the ppc4xx DDR2 
initialization code. The changes were discussed with Stefan Roese and Adam 
Graham and tested by Adam.

Signed-off-by: Carolyn Smith 
---
diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c new/cpu/ppc4xx/44x_spd_ddr2.c
--- old/cpu/ppc4xx/44x_spd_ddr2.c   2009-01-20 13:00:33.0 -0800
+++ new/cpu/ppc4xx/44x_spd_ddr2.c   2009-01-23 16:00:49.0 -0800
@@ -1104,11 +1104,14 @@ static void program_codt(unsigned long *
 * Set the SDRAM Controller On Die Termination Register
 *-*/
mfsdram(SDRAM_CODT, codt);
-   codt |= (SDRAM_CODT_IO_NMODE
-& (~SDRAM_CODT_DQS_SINGLE_END
-   & ~SDRAM_CODT_CKSE_SINGLE_END
-   & ~SDRAM_CODT_FEEBBACK_RCV_SINGLE_END
-   & ~SDRAM_CODT_FEEBBACK_DRV_SINGLE_END));
+
+   codt |= SDRAM_CODT_IO_NMODE;
+
+   codt &= ~(SDRAM_CODT_DQS_SINGLE_END |
+ SDRAM_CODT_CKSE_SINGLE_END |
+ SDRAM_CODT_FEEBBACK_RCV_SINGLE_END |
+ SDRAM_CODT_FEEBBACK_DRV_SINGLE_END);
+

for (dimm_num = 0; dimm_num < num_dimm_banks; dimm_num++) {
if (dimm_populated[dimm_num] != SDRAM_NONE) {

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


[U-Boot] [PATCH 1/1] Bug fix - release env memory.

2009-01-26 Thread derek
This is my first time to create a patch.  Not sure if I have done it right.

Signed-off-by: Derek Ou 
---
 common/env_nand.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/common/env_nand.c b/common/env_nand.c
index 8af9e74..01430cb 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -305,7 +305,11 @@ void env_relocate_spec (void)
crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);

if(!crc1_ok && !crc2_ok)
+   {
+   free(tmp_env1);
+   free(tmp_env2);
return use_default();
+   }
else if(crc1_ok && !crc2_ok)
gd->env_valid = 1;
else if(!crc1_ok && crc2_ok)
-- 
1.5.4.3

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


Re: [U-Boot] nand sector size is zero in jffs2 cmds

2009-01-26 Thread Derek Ou
Hi, Wolfgang,

The following patch was tested some time ago.  I am in the middle of 
another task and can not
verify this patch with the latest code. Should I just reformat my patch 
and submit it or should I
wait till I can test it with the latest code?

Also, I found that jffs2 scanning routine does not skip the bad blocks 
in NAND in my
previous test.  Does anybody else see this behavior?

BTW, what is the best way to submit patches?  I tried git-format-patch 
approach described in
http://www.denx.de/wiki/U-Boot/GnatsEmail
But git-send-email is not easy to use.  I tried just copy and paste but 
thunderbird convert all the
tabs into spaces.  I ended up using copy and paste and webmail interface 
to send out another
patch.  But I will love to hear a better way of doing it.

Thanks,
Derek
Wolfgang Denk wrote:
> Dear Derek Ou,
>
> In message <49515bd6.9030...@siconix.com> you wrote:
>   
>> The "### ERROR ### Please RESET the board ###" error and the zero NAND 
>> sector size problem can be fixed by the following patch.  However, the 
>> jffs2 scanning routine does not skip the bad blocks in NAND though.
>>
>> Derek
>> * patch **
>> index 7866c80..f6966f3 100644
>> --- a/common/cmd_jffs2.c
>> +++ b/common/cmd_jffs2.c
>> @@ -1853,6 +1853,8 @@ int mtdparts_init(void)
>> if (part->size == SIZE_REMAINING)
>> part->size = id->size - part->offset;
>>  
>> +   part->sector_size = nand_info[id->num].erasesize;
>> +
>> DEBUGF("part  : name = %s, size = 0x%08lx, offset = 
>> 0x%08lx\n",
>> part->name, part->size, part->offset);
>> 
> Can you please submit a proper patch (after fixing your mailer
> configuration which wraps long lines, thus corrupting the patch)?
>
> See http://www.denx.de/wiki/U-Boot/Patches for instructions.
>
> Best regards,
> Wolfgang Den
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/6] i.MX31: Add NAND support and new PDK board.

2009-01-26 Thread Magnus Lilja
Wolfgang,

2009/1/24 Wolfgang Denk :
> Dear Jean-Christophe,
>
> in message <1219998982-21289-1-git-send-email-lilja.mag...@gmail.com> Magnus 
> Lilja you wrote:
>>
>> This series of patches adds support for the NAND flash controller in the
>> i.MX31 device and also introduces the Freescale i.MX31 PDK board.
>
> As far as I can see these patches have never been applied.
>
> Will you please have a look? Thanks.


If I remember correctly there were two issues:
1) The patches didn't have support for booting from NAND so it relied
on some other entity to do the booting
2) The NAND driver was not accepted

Regarding 1) other people have posted patches that would allow the PDK
to boot properly from NAND. The last set of patches used the existing
nand_spl framework, however there were some comments on those patches
(minor comments in my opinion) but an updated patch-set that added
NAND-boot hasn't been posted. Last I've noticed in the subject is this
thread:http://lists.denx.de/pipermail/u-boot/2008-December/044266.html
with a followup from me in January.

Regarding 2) there were other attempts at submitting a NAND driver for
the controller that Freescale uses in i.MX31 and some other non-ARM
SoC, but I don't know what happened with that effort. Scott made some
comments as he pointed out a couple of hours ago.


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


Re: [U-Boot] [PATCH 1/1] Bug fix - release env memory.

2009-01-26 Thread Kumar Gala

On Jan 26, 2009, at 11:50 AM, de...@siconix.com wrote:

Looks ok, but

> This is my first time to create a patch.  Not sure if I have done it  
> right.

we normally put a description of the fix, issue, etc in this section.   
(as its the commit message).

>
>
> Signed-off-by: Derek Ou 
> ---
> common/env_nand.c |4 
> 1 files changed, 4 insertions(+), 0 deletions(-)

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


Re: [U-Boot] [PATCH] nand_spl: Fix compile problem with board_nand_init() prototype

2009-01-26 Thread Scott Wood
On Mon, Jan 26, 2009 at 10:05:20AM +0100, Stefan Roese wrote:
> This patch removes the now obsolete and additionally wrongly defined
> board_nand_init() prototype from nand_spl/nand_boot.c.
> 
> Signed-off-by: Stefan Roese 

Applied to u-boot-nand-flash

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


Re: [U-Boot] [PATCH] jedec_flash: Fix compilation warning in jedec_flash.c

2009-01-26 Thread Wolfgang Denk
Dear Stefan Roese,

In message <1232960742-9121-1-git-send-email...@denx.de> you wrote:
> Signed-off-by: Stefan Roese 
> ---
>  drivers/mtd/jedec_flash.c |   12 ++--
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
> index 2d99d4d..879f25e 100644
> --- a/drivers/mtd/jedec_flash.c
> +++ b/drivers/mtd/jedec_flash.c
> @@ -172,7 +172,7 @@ struct amd_flash_info {
>  static const struct amd_flash_info jedec_table[] = {
>  #ifdef CONFIG_SYS_FLASH_LEGACY_256Kx8
>   {
> - .mfr_id = MANUFACTURER_SST,
> + .mfr_id = (u16)MANUFACTURER_SST,

Which toolchain is throwing which exact warnings here? For which
board?

I don't think this should be needed. MANUFACTURER_SST is defined as
0x00BF - this hsould give no conflicts here.

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: w...@denx.de
Never underestimate the power of human stupidity  when  it  comes  to
using technology they don't understand.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3 v3] MIPS: Add VCT board series support (Part 1/3)

2009-01-26 Thread Wolfgang Denk
Dear Stefan Roese,

In message <200901261415.48417...@denx.de> you wrote:
> On Monday 26 January 2009, Shinya Kuribayashi wrote:
> > No objection from me, will apply.
> >
> > Stefan, I'm going to fold all patches into sinble commit, ok?
> 
> That's ok with me. Not sure if Wolfgang has an objection though, since he 
> might have problems tracking the status of the patches.
> 
> Wolfgang, an objections from you?

Yes, indeed. I like to see commits matching patches as posted on  the
mailing list.

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: w...@denx.de
Wisdom is one of the few things that looks bigger the further away it
is.   - Terry Pratchett, _Witches Abroad_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 9/9] AVR32: Board support for ATEVK1100

2009-01-26 Thread Wolfgang Denk
Dear ?ISO-8859-1?Q?Gunnar_Rangøy?,

In message  you 
wrote:
...
> >> +#undef CONFIG_CMD_AUTOSCRIPT
> >
> > Is there a specific reason for not allowing to use shell scripts?
...
> No, not really. We did this because this was done in other AVR32 boards
> we used as references.

Then pleasse don't - let's overcome the bad examples.

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: w...@denx.de
Never put off until tomorrow what you can put off indefinitely.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] is uImage.FIT supported in U-boot 2008.10

2009-01-26 Thread Wolfgang Denk
Dear Pieter,

In message <497dccfa.3070...@vastech.co.za> you wrote:
> I am unable to find the mkimage tool that takes the -f vmlinux.bin.gz
> argument. I am using ELDK4.2 compiling U-Boot 2008.10 using ARCH=powerpc
> for a MPC8548 board.

What about tools/mkimage ?

> is the uImage.FIT currently supported, if so, where can i find the tools
> mentions in  /u-boot/doc/uImage.FIT/howto.txt

As far as U-Boot is concerned, you can find the tools in the tools/
directory. This, um, sounds pretty obvious to me. Or not?

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: w...@denx.de
:   I've tried (in vi) "g/[a-z]\n[a-z]/s//_/"...but that doesn't
: cut it.  Any ideas?  (I take it that it may be a two-pass sort of solution).
In the first pass, install perl. :-) Larry Wall <6...@jpl-devvax.jpl.nasa.gov>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 8/9] AVR32: CPU support for AT32UC3A0xxx CPUs

2009-01-26 Thread Wolfgang Denk
Dear =?ISO-8859-1?Q?Gunnar_Rang=F8y?=,

In message  you 
wrote:
>
> >> + portmux_select_peripheral(PORTMUX_PORT(0),
> >> + 0x0003C000 |
> >> + 0x1E00, PORTMUX_FUNC_C=
> , 0);
> >> + portmux_select_peripheral(PORTMUX_PORT(1),
> >> + 0x0010 |
> >> + 0x7C00 |
> >> + 0x0003 |
> >> + 0xE000, PORTMUX_FUNC_C=
> , 0);
> >> + portmux_select_peripheral(PORTMUX_PORT(2),
> >> + 0xFFC0, PORTMUX_FUNC_A=
> , 0);
> >> + portmux_select_peripheral(PORTMUX_PORT(3),
> >> + 0x3FFF, PORTMUX_FUNC_A=
> , 0);
> >> +}
> >
> > It would be nice if you used readable names instead of all these
> > magic hardcoded constants.
> 
> Each bit in the masks represents a single pin on the microcontroller.
> The readable names would therefore become something like:
> #define EBI_PINS_PORT0 (0x0003C000 | 0x1E00)
> #define EBI_PINS_PORT1 (0x0010 | 0x7C00 | ...)

Um, no. You didn't get it. You use magic numbers again.

That should be some

#define FOO_PIN_XXX 0x0003C000
#define FOO_PIN_YYY 0x1E00
#define BAR_PIN_XXX 0x0010
#DEFINE BAR_PIN_YYY 0x7C00

in one place and

#define EBI_PINS_PORT0 (FOO_PIN_XXX | FOO_PIN_YYY)
#define EBI_PINS_PORT1 ((BAR_PIN_XXX| BAR_PIN_YYY)

elsewhere, using readable names for the defines.

> I'm not certain that that would make it much more readable. The
> bitmasks are more or less based on reading the datasheet and counting
> which pins are used.

This is exactly what should NOT be necessary to read and understand
the code.

If I see a line like

rtx->txbd[txIdx].cbd_sc |= (BD_ENET_TX_READY | BD_ENET_TX_LAST 
|BD_ENET_TX_WRAP);

somewhere in a driver (obviously dealing with ethernet), I don;t have
to look up any specific bits or ping numbers - I can just read it.

If somebody else writes the (computationally equivalent) code

rtx->txbd[txIdx].cbd_sc |= 0xA800;
or even
rtx->txbd[txIdx].cbd_sc |= (0x8000 | 0x0800 | 0x2000);

then I don;t have a clue what's going on, and it takes me precious
time to look this up - me and everybody else, each and every time
again when I'm reading the code.

This is simply not acceptable.

> Maybe adding a comment before the code would be just as useful?

No, a comment can't fix this, especially as you just have to  wait  a
few months to see the comment and the code getting out of sync.

Please fix the code.

> > Instead of using offsets everywhere I would appreciate if the code
> > could be changed to use C structs instead (like we do in PPC land).
> 
> It was done like this because it was done in the existing AVR32 code
> which we based our work on. Since we used parts of that code, it made
> most sense to use the same coding style.
> 
> We can change it if you think it is necessary.

Yes, please change it. And patches to fix the existing code that doe
sthis are welcome, too.

> >> +int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> >> +{
> >> + /* This will reset the CPU core, caches, MMU and all internal buss=
> es */
> >> + __builtin_mtdr(8, 1 << 13); /* set DC:DBE */
> >> + __builtin_mtdr(8, 1 << 30); /* set DC:RES */
> >> +
> >> + /* Flush the pipeline before we declare it a failure */
> >> + asm volatile("sub   pc, pc, -4");
> >> +
> >> + return -1;
> >> +}
> >
> > I read this as if you just reset the CPU "internal" stuff. Sorry for
> > asking stupid questions, I don't know this architecture at all, but:
> > Will external chips be reset this way, too?  Or how do you make sure
> > that external peripherals get properly reset?
> 
> As most of the needed functionality is embedded in the microcontroller,
> there are very few external peripherals used by U-Boot. Apart from
> external memory, and oscillator, and level-shifters for the serial-port,
> there is only the ethernet PHY, and that one shouldn't need a reset.

Famous last words. What if exactrly the PHY is stuck and needs a
reset?

Hmmm... "apart from external memory" ... does  externam  memory  also
include  NOR  flash?  Eventually  the NOR flash you are booting from?
Assume the NOR flash is in query mode when you reset the board -  how
does it get reset, then?


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: w...@denx.de
It is impractical for  the  standard  to  attempt  to  constrain  the
behavior  of code that does not obey the constraints of the standard.
  - Doug Gwyn

[U-Boot] [PATCH 0/5] ADS5121 Backlog of patches

2009-01-26 Thread John Rigby
[PATCH 1/5] ADS5121 DIU Make inclusion of FSL logo optional
This makes including FSL_logo optional since including it
puts the size of u-boot over the current limit of 2 sectors 
[PATCH 2/5] ADS5121 DIU Add diu_bmp_addr env
This adds support for a setting an env variable to the
address in flash of a BMP for the DIU splash screen
[PATCH 3/5] ADS5121 Fix rev2 silicon pci iopad config
This sets up rev2 silicon pci iopads correctly.
The factory defaults are wrong.
[PATCH 4/5] ADS5121 Add IC Ident Module (IIM) support
This adds support for the IIM and adds the fuse
command for displaying, sensing...
[PATCH 5/5] ADS5121 Add PATA support
This adds pata support.  (Updated version of
patch sent out sometime ago by WD)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/5] ADS5121 DIU Make inclusion of FSL logo optional

2009-01-26 Thread John Rigby
Make inclusion of FSL logo optional and
turn it off by default.

Signed-off-by: John Rigby 
---
 board/ads5121/ads5121_diu.c |4 
 include/configs/ads5121.h   |1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/board/ads5121/ads5121_diu.c b/board/ads5121/ads5121_diu.c
index 11450aa..ac7a447 100644
--- a/board/ads5121/ads5121_diu.c
+++ b/board/ads5121/ads5121_diu.c
@@ -37,7 +37,11 @@
 #include 
 #endif
 
+#ifdef CONFIG_FSL_DIU_LOGO_BMP
 extern unsigned int FSL_Logo_BMP[];
+#else
+#define FSL_Logo_BMP NULL
+#endif
 
 static int xres, yres;
 
diff --git a/include/configs/ads5121.h b/include/configs/ads5121.h
index bb3525f..bb38be6 100644
--- a/include/configs/ads5121.h
+++ b/include/configs/ads5121.h
@@ -47,6 +47,7 @@
 #define CONFIG_E3001   /* E300 Family */
 #define CONFIG_MPC512X 1   /* MPC512X family */
 #define CONFIG_FSL_DIU_FB  1   /* FSL DIU */
+#undef CONFIG_FSL_DIU_LOGO_BMP /* Don't include FSL DIU binary bmp */
 
 /* video */
 #undef CONFIG_VIDEO
-- 
1.5.6.2.255.gbed62

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


[U-Boot] [PATCH 3/5] ADS5121 Fix rev2 silicon pci iopad config

2009-01-26 Thread John Rigby
Reset config is not correct

Signed-off-by: John Rigby 
---
 board/ads5121/ads5121.c |   13 -
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index 0610928..8e22719 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -290,17 +290,28 @@ static  iopin_t ioregs_init[] = {
}
 };
 
+static  iopin_t rev2_silicon_pci_ioregs_init[] = {
+   /* FUNC0=PCI Sets next 54 to PCI pads */
+   {
+   IOCTL_PCI_AD31, 54, 0,
+   IO_PIN_FMUX(0) | IO_PIN_HOLD(0) | IO_PIN_DS(0)
+   }
+};
+
 int checkboard (void)
 {
ushort brd_rev = *(vu_short *) (CONFIG_SYS_CPLD_BASE + 0x00);
uchar cpld_rev = *(vu_char *) (CONFIG_SYS_CPLD_BASE + 0x02);
+   volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
 
printf ("Board: ADS5121 rev. 0x%04x (CPLD rev. 0x%02x)\n",
brd_rev, cpld_rev);
/* initialize function mux & slew rate IO inter alia on IO Pins  */
 
-
iopin_initialize(ioregs_init, sizeof(ioregs_init) / 
sizeof(ioregs_init[0]));
+   if (SVR_MJREV (im->sysconf.spridr) >= 2) {
+   iopin_initialize(rev2_silicon_pci_ioregs_init, 1);
+   }
 
return 0;
 }
-- 
1.5.6.2.255.gbed62

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


[U-Boot] [PATCH 5/5] ADS5121 Add PATA support

2009-01-26 Thread John Rigby
From: Ralph Kondziella 

Original patch from Ralph Kondziella
plus clean up by Wolfgang Denk
plus changes by John Rigby
use ips clock not lpc
port forward to current u-boot release

Signed-off-by: Ralph Kondziella 
Signed-off-by: Wolfgang Denk 
Signed-off-by: John Rigby 
---
 board/ads5121/ads5121.c  |  104 ++
 common/cmd_ide.c |4 ++
 include/asm-ppc/immap_512x.h |   29 +++-
 include/configs/ads5121.h|   52 +
 include/mpc512x.h|1 +
 5 files changed, 189 insertions(+), 1 deletions(-)

diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index ae1ccd9..6c40e94 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -31,6 +31,8 @@
 #include 
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* Clocks in use */
 #define SCCR1_CLOCKS_EN(CLOCK_SCCR1_CFG_EN |   
\
 CLOCK_SCCR1_LPC_EN |   \
@@ -38,6 +40,7 @@
 CLOCK_SCCR1_PSCFIFO_EN |   \
 CLOCK_SCCR1_DDR_EN |   \
 CLOCK_SCCR1_FEC_EN |   \
+CLOCK_SCCR1_PATA_EN |  \
 CLOCK_SCCR1_PCI_EN |   \
 CLOCK_SCCR1_TPR_EN)
 
@@ -326,3 +329,104 @@ void ft_board_setup(void *blob, bd_t *bd)
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
 }
 #endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */
+
+#if defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET)
+
+void init_ide_reset (void)
+{
+   volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
+   debug ("init_ide_reset\n");
+
+   /*
+* Clear the reset bit to reset the interface
+* cf. RefMan MPC5121EE: 28.4.1 Resetting the ATA Bus
+*/
+   immr->pata.pata_ata_control = 0;
+   udelay(100);
+   /* Assert the reset bit to enable the interface */
+   immr->pata.pata_ata_control = FSL_ATA_CTRL_ATA_RST_B;
+   udelay(100);
+
+}
+
+void ide_set_reset (int idereset)
+{
+   volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
+   debug ("ide_set_reset(%d)\n", idereset);
+
+   if (idereset) {
+   immr->pata.pata_ata_control = 0;
+   udelay(100);
+   } else {
+   immr->pata.pata_ata_control = FSL_ATA_CTRL_ATA_RST_B;
+   udelay(100);
+   }
+}
+
+#define CALC_TIMING(t) (t + period - 1) / period
+
+int ide_preinit (void)
+{
+   volatile immap_t *immr = (immap_t *) CONFIG_SYS_IMMR;
+   long t;
+   const struct {
+   short t0;
+   short t1;
+   short t2_8;
+   short t2_16;
+   short t2i;
+   short t4;
+   short t9;
+   short tA;
+   } pio_specs = {
+   .t0= 600,
+   .t1=  70,
+   .t2_8  = 290,
+   .t2_16 = 165,
+   .t2i   =   0,
+   .t4=  30,
+   .t9=  20,
+   .tA=  50,
+   };
+   union {
+   u32 config;
+   struct {
+   u8 field1;
+   u8 field2;
+   u8 field3;
+   u8 field4;
+   }bytes;
+   }cfg;
+
+   debug ("IDE preinit using PATA peripheral at IMMR-ADDR %08x\n",
+   (u32)&immr->pata);
+
+   /* Set the reset bit to 1 to enable the interface */
+   immr->pata.pata_ata_control = FSL_ATA_CTRL_ATA_RST_B;
+
+   /* Init timings : we use PIO mode 0 timings */
+   t = 10 / gd->ips_clk;   /* period in ns */
+   cfg.bytes.field1 = 3;
+   cfg.bytes.field2 = 3;
+   cfg.bytes.field3 = (pio_specs.t1 + t) / t;
+   cfg.bytes.field4 = (pio_specs.t2_8 + t) / t;
+
+   immr->pata.pata_time1 = cfg.config;
+
+   cfg.bytes.field1 = (pio_specs.t2_8 + t) / t;
+   cfg.bytes.field2 = (pio_specs.tA + t) / t + 2;
+   cfg.bytes.field3 = 1;
+   cfg.bytes.field4 = (pio_specs.t4 + t) / t;
+
+   immr->pata.pata_time2 = cfg.config;
+
+   cfg.config = immr->pata.pata_time3;
+   cfg.bytes.field1 = (pio_specs.t9 + t) / t;
+
+   immr->pata.pata_time3 = cfg.config;
+   debug ("PATA preinit complete.\n");
+
+   return 0;
+}
+
+#endif /* defined(CONFIG_CMD_IDE) && defined(CONFIG_IDE_RESET) */
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index db05f76..3a12b37 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -45,6 +45,10 @@
 #include 
 #endif
 
+#ifdef CONFIG_MPC512X
+#include 
+#endif
+
 #include 
 #include 
 
diff --git a/include/asm-ppc/immap_512x.h b/include/asm-ppc/immap_512x.h
index 4cef6a8..8087869 100644
--- a/include/asm-ppc/immap_512x.h
+++ b/include/asm-ppc/immap_512x.h
@@ -469,7 +469,34 @@

Re: [U-Boot] [PATCH 1/1] Bug fix - release env memory.

2009-01-26 Thread Wolfgang Denk
Dear Derek,

In message <0bee6c3501ae7b8e2c111bf32219e501.squir...@webmail.siconix.com> you 
wrote:
> This is my first time to create a patch.  Not sure if I have done it right.

Close, but no cigar ;-)

A comment like the line above must go below the "---" line.

> Signed-off-by: Derek Ou 
> ---
 add comments that are not supposed to become art of
the commit message only *after* this line.

>  common/env_nand.c |4 
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/common/env_nand.c b/common/env_nand.c
> index 8af9e74..01430cb 100644
> --- a/common/env_nand.c
> +++ b/common/env_nand.c
> @@ -305,7 +305,11 @@ void env_relocate_spec (void)
>   crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);
> 
>   if(!crc1_ok && !crc2_ok)
> + {

Please put the "{" on the same line with the "if" (see CodingStyle).

> + free(tmp_env1);
> + free(tmp_env2);
>   return use_default();
> + }
>   else if(crc1_ok && !crc2_ok)

And the "}" will go on the same line with the "else", too.

>   gd->env_valid = 1;
>   else if(!crc1_ok && crc2_ok)

Please fix and resubmit.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Nothing is easier than to denounce  the  evildoer;  nothing  is  more
difficult than to understand him. - Fyodor Dostoevski
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/5] ADS5121 Add IC Ident Module (IIM) support

2009-01-26 Thread John Rigby
IIM (IC Identification Module) is the fusebox for the mpc5121.
Use #define CONFIG_IIM to turn on the clock for this module
use #define CONFIG_CMD_FUSE to add fusebox commands.
Fusebox commands include the ability to read
the status, read the register cache, override the register cache,
program the fuses and sense them.

Signed-off-by: Martha Marx 
Signed-off-by: John Rigby 
---
 board/ads5121/ads5121.c  |3 +
 cpu/mpc512x/Makefile |3 +
 cpu/mpc512x/iim.c|  394 ++
 include/asm-ppc/immap_512x.h |   20 ++-
 include/configs/ads5121.h|6 +
 include/mpc512x.h|   24 +++
 6 files changed, 449 insertions(+), 1 deletions(-)
 create mode 100644 cpu/mpc512x/iim.c

diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index 8e22719..ae1ccd9 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -101,6 +101,9 @@ int board_early_init_f (void)
 */
im->clk.sccr[0] = SCCR1_CLOCKS_EN;
im->clk.sccr[1] = SCCR2_CLOCKS_EN;
+#if defined(CONFIG_IIM) || defined(CONFIG_CMD_FUSE)
+   im->clk.sccr[1] |= CLOCK_SCCR2_IIM_EN;
+#endif
 
return 0;
 }
diff --git a/cpu/mpc512x/Makefile b/cpu/mpc512x/Makefile
index e8f1060..e09eb1b 100644
--- a/cpu/mpc512x/Makefile
+++ b/cpu/mpc512x/Makefile
@@ -26,6 +26,9 @@ LIB   = $(obj)lib$(CPU).a
 
 START  = start.o
 COBJS  = traps.o cpu.o cpu_init.o speed.o interrupts.o serial.o i2c.o iopin.o
+ifdef CONFIG_IIM
+COBJS  += iim.o
+endif 
 
 SRCS   := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/cpu/mpc512x/iim.c b/cpu/mpc512x/iim.c
new file mode 100644
index 000..6cdc422
--- /dev/null
+++ b/cpu/mpc512x/iim.c
@@ -0,0 +1,394 @@
+/*
+ * Copyright 2008 Silicon Turnkey Express, Inc.
+ * Martha Marx 
+ *
+ * ADS5121 IIM (Fusebox) Interface
+ *
+ * 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 
+
+#ifdef CONFIG_CMD_FUSE
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static char cur_bank = '1';
+
+char *iim_err_msg(u32 err)
+{
+   static char *IIM_errs[] = {
+   "Parity Error in cache",
+   "Explicit Sense Cycle Error",
+   "Write to Locked Register Error",
+   "Read Protect Error",
+   "Override Protect Error",
+   "Write Protect Error"};
+
+   int i;
+
+   if (!err)
+   return "";
+   for (i = 1; i < 8; i++)
+   if (err & (1 << i))
+   printf("IIM - %s\n", IIM_errs[i-1]);
+   return "";
+}
+
+int in_range(int n, int min, int max, char *err, char *usg)
+{
+   if (n > max || n < min) {
+   printf(err);
+   printf("Usage:\n%s\n", usg);
+   return 0;
+   }
+   return 1;
+}
+
+int ads5121_fuse_read(int bank, int fstart, int num)
+{
+   iim512x_t *iim = &((immap_t *) CONFIG_SYS_IMMR)->iim;
+   u32 *iim_fb, dummy;
+   int f, ctr;
+
+   out_be32(&iim->err, in_be32(&iim->err));
+   if (bank == 0)
+   iim_fb = (u32 *)&(iim->fbac0);
+   else
+   iim_fb = (u32 *)&(iim->fbac1);
+/* try a read to see if Read Protect is set */
+   dummy = in_be32(&iim_fb[0]);
+   if (in_be32(&iim->err) & IIM_ERR_RPE) {
+   printf("\tRead protect fuse is set\n");
+   out_be32(&iim->err, IIM_ERR_RPE);
+   return 0;
+   }
+   printf("Reading Bank %d cache\n", bank);
+   for (f = fstart, ctr = 0; num > 0; ctr++, num--, f++) {
+   if (ctr % 4 == 0)
+   printf("F%2d:", f);
+   printf("\t%#04x", (u8)(iim_fb[f]));
+   if (ctr % 4 == 3)
+   printf("\n");
+   }
+   if (ctr % 4 != 0)
+   printf("\n");
+}
+
+int ads5121_fuse_override(int bank, int f, u8 val)
+{
+   iim512x_t *iim = &((immap_t *) CONFIG_SYS_IMMR)->iim;
+   u32 *iim_fb;
+   u32 iim_stat;
+   int i;
+
+   out_be32(&iim->err, in_be32(&iim->err));
+   if (bank == 0)
+   iim_fb = (u32 *)&(iim->fbac0);
+   else
+   iim_fb = (u32 *)&(iim->fbac1);
+/* try a read to see if Read Protect is set

[U-Boot] [PATCH 2/5] ADS5121 DIU Add diu_bmp_addr env

2009-01-26 Thread John Rigby
Add support for using a bmp other than
FSL_Logo_BMP for the DIU splash screen.

Can now set the env var "diu_bmp_addr" to
the address of a BMP in flash to use instead
of the default FSL_Logo_BMP.

Signed-off-by: Martha Marx 
Signed-off-by: John Rigby 
---
 board/ads5121/ads5121_diu.c |   28 ++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/board/ads5121/ads5121_diu.c b/board/ads5121/ads5121_diu.c
index ac7a447..5112724 100644
--- a/board/ads5121/ads5121_diu.c
+++ b/board/ads5121/ads5121_diu.c
@@ -65,16 +65,40 @@ void diu_set_pixel_clock(unsigned int pixclock)
debug("DIU: Modified value of CLKDVDR = 0x%08x\n", *clkdvdr);
 }
 
+char *valid_bmp(char *addr)
+{
+   unsigned long h_addr;
+
+   h_addr = simple_strtoul(addr, NULL, 16);
+   if (h_addr < CONFIG_SYS_FLASH_BASE ||
+   h_addr >= (CONFIG_SYS_FLASH_BASE + 
CONFIG_SYS_FLASH_SIZE - 1)) {
+   printf("bmp addr %lx is not a valid flash address\n", h_addr);
+   return 0;
+   } else if ((*(char *)(h_addr) != 'B') || (*(char *)(h_addr+1) != 'M')) {
+   printf("bmp addr is not a bmp\n");
+   return 0;
+   } else
+   return (char *)h_addr;
+}
+
 int ads5121_diu_init(void)
 {
unsigned int pixel_format;
+   char *bmp = NULL;
+   char *bmp_env;
 
xres = 1024;
yres = 768;
pixel_format = 0x3316;
 
-   return fsl_diu_init(xres, pixel_format, 0,
-(unsigned char *)FSL_Logo_BMP);
+   debug("ads5121_diu_init\n");
+   bmp_env = getenv("diu_bmp_addr");
+   if (bmp_env) {
+   bmp = valid_bmp(bmp_env);
+   }
+   if (!bmp)
+   bmp = FSL_Logo_BMP;
+   return fsl_diu_init(xres, pixel_format, 0, (unsigned char *)bmp);
 }
 
 int ads5121diu_init_show_bmp(cmd_tbl_t *cmdtp,
-- 
1.5.6.2.255.gbed62

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


[U-Boot] sprintf side effect, a bug?

2009-01-26 Thread E Robertson
Hi,
It seems that sprintf() is modifying at least two bytes from the source and I 
have duplicate this with different varibles.
For instance, I have a mac address defined as unsigned char [6]:
Doing the following sets the environment variable correctly, however bytes [0] 
and [1], are modified at the source.

sprintf(env_ethaddr,"%02X:%02X:%02X:%02X:%02X:%02X", MACAddress[0], 
MACAddress[1],
MACAddress[2], MACAddress[3],   
 
MACAddress[4], MACAddress[5]);

Has anyone noticed this before?
I don't think the machine matters but I am building for an arm at91.



signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] env_nand: fix env memory release

2009-01-26 Thread derek
This fixes a bug that tmp environment memory not being released.

Signed-off-by: Derek Ou 
---
 common/env_nand.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/env_nand.c b/common/env_nand.c
index 8af9e74..e490775 100644
--- a/common/env_nand.c
+++ b/common/env_nand.c
@@ -304,9 +304,11 @@ void env_relocate_spec (void)
crc1_ok = (crc32(0, tmp_env1->data, ENV_SIZE) == tmp_env1->crc);
crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc);

-   if(!crc1_ok && !crc2_ok)
+   if(!crc1_ok && !crc2_ok) {
+   free(tmp_env1);
+   free(tmp_env2);
return use_default();
-   else if(crc1_ok && !crc2_ok)
+   } else if(crc1_ok && !crc2_ok)
gd->env_valid = 1;
else if(!crc1_ok && crc2_ok)
gd->env_valid = 2;
-- 
1.5.4.3

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


Re: [U-Boot] sprintf side effect, a bug?

2009-01-26 Thread Wolfgang Denk
Dear E Robertson,

In message <200901261453.10434.e.robertson@gmail.com> you wrote:
>
> It seems that sprintf() is modifying at least two bytes from the source and I 
> have duplicate this with different varibles.
> For instance, I have a mac address defined as unsigned char [6]:
> Doing the following sets the environment variable correctly, however bytes 
> [0] 
> and [1], are modified at the source.
>
> sprintf(env_ethaddr,"%02X:%02X:%02X:%02X:%02X:%02X", MACAddress[0], 
> MACAddress[1],
> MACAddress[2], MACAddress[3],
> MACAddress[4], MACAddress[5]);
>
> Has anyone noticed this before?
> I don't think the machine matters but I am building for an arm at91.

Hmm... I think I wouldbe surprised. What exactly does your test code
look like?

I tried this one:

...
unsigned char buf[128];
unsigned char a[6] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, };
int i;
...
printf ("Before: "); for (i=0; i<6; ++i) printf (" %02X",a[i]); putc ('\n');
sprintf (buf, "%02X:%02X:%02X:%02X:%02X:%02X", a[0], a[1], a[2], a[3], a[4], 
a[5]);
printf ("After:  "); for (i=0; i<6; ++i) printf (" %02X",a[i]); putc ('\n');
printf ("buf=\"%s\"\n", buf);
...

And this is what I got:

Before:  11 22 33 44 55 66
After:   11 22 33 44 55 66
buf="11:22:33:44:55:66"



Looks sane to me...

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: w...@denx.de
"Anyone attempting to generate random numbers by deterministic  means
is, of course, living in a state of sin."  - John Von Neumann
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] compiling latest U-BOOT under MACOSX

2009-01-26 Thread vibnwis
Hi there,

Having download the latest 2009 version, I made some changes to Makefile,
tools/Makefile. I encouter the following errors. Would someone please help. I
have had compiled successfully on 1.1.6 and 1.2 version of u-boot. But haven't
much luck on 1.3.4 or the latest. 

Thanks in advance.
vib

make all
Generating include/autoconf.mk.dep
for dir in tools examples api_examples ; do make -C $dir _depend ; done
ln -s ../common/env_embedded.c env_embedded.c
ln -s ../include/zlib.h zlib.h
ln -s ../lib_generic/crc32.c crc32.c
ln -s ../lib_generic/md5.c md5.c
ln -s ../lib_generic/sha1.c sha1.c
ln -s ../common/image.c image.c
if [ ! -f mkimage.h ] ; then \
ln -s ../tools/mkimage.h mkimage.h; \
fi
if [ ! -f fdt_host.h ] ; then \
ln -s ../tools/fdt_host.h fdt_host.h; \
fi
In file included from ../include/libfdt.h:54,
 from fdt_host.h:25,
 from mkimage.h:36,
 from image.c:71:
/Users/ibookg4test/Downloads/u-boot-2009.01/include/libfdt_env.h:27:20: error:
endian.h: No such file or directory
/Users/ibookg4test/Downloads/u-boot-2009.01/include/libfdt_env.h:28:22: error:
byteswap.h: No such file or directory
In file included from ../include/libfdt.h:54,
 from fdt_host.h:25,
 from mkimage.h:36,
 from mkimage.c:25:
/Users/ibookg4test/Downloads/u-boot-2009.01/include/libfdt_env.h:27:20: error:
endian.h: No such file or directory
/Users/ibookg4test/Downloads/u-boot-2009.01/include/libfdt_env.h:28:22: error:
byteswap.h: No such file or directory
make[1]: Circular env_embedded.c <- env_embedded.c dependency dropped.
ln -s ../common/env_embedded.c env_embedded.c
make[1]: Circular crc32.c <- crc32.c dependency dropped.
make[1]: Circular md5.c <- md5.c dependency dropped.
make[1]: Circular sha1.c <- sha1.c dependency dropped.
make[1]: Circular img2srec.c <- img2srec.c dependency dropped.
make[1]: Circular envcrc.c <- envcrc.c dependency dropped.
make[1]: Circular ubsha1.c <- ubsha1.c dependency dropped.
make[1]: Circular gen_eth_addr.c <- gen_eth_addr.c dependency dropped.
make[1]: Circular bmp_logo.c <- bmp_logo.c dependency dropped.
make[1]: Nothing to be done for `_depend'.
make[1]: Circular hello_world.c <- hello_world.c dependency dropped.
make[1]: Circular stubs.c <- stubs.c dependency dropped.
make[1]: Nothing to be done for `_depend'.
make[1]: Nothing to be done for `_depend'.
Generating include/autoconf.mk
make -C tools all
make[1]: Circular env_embedded.c <- env_embedded.c dependency dropped.
ln -s ../common/env_embedded.c env_embedded.c
make[1]: Circular crc32.c <- crc32.c dependency dropped.
make[1]: Circular md5.c <- md5.c dependency dropped.
make[1]: Circular sha1.c <- sha1.c dependency dropped.
make[1]: Circular img2srec.c <- img2srec.c dependency dropped.
make[1]: Circular envcrc.c <- envcrc.c dependency dropped.
make[1]: Circular ubsha1.c <- ubsha1.c dependency dropped.
make[1]: Circular gen_eth_addr.c <- gen_eth_addr.c dependency dropped.
make[1]: Circular bmp_logo.c <- bmp_logo.c dependency dropped.
cc -no-cpp-precomp -Wall -idirafter
/Users/ibookg4test/Downloads/u-boot-2009.01/include -idirafter
/Users/ibookg4test/Downloads/u-boot-2009.01/include2 -idirafter
/Users/ibookg4test/Downloads/u-boot-2009.01/include -DTEXT_BASE=0x0CF8
-DUSE_HOSTCC -O -c -o img2srec.o img2srec.c
cc -no-cpp-precomp -Wall -idirafter
/Users/ibookg4test/Downloads/u-boot-2009.01/include -idirafter
/Users/ibookg4test/Downloads/u-boot-2009.01/include2 -idirafter
/Users/ibookg4test/Downloads/u-boot-2009.01/include -DTEXT_BASE=0x0CF8
-DUSE_HOSTCC -O  -o img2srec img2srec.o
strip img2srec
cc -g -Wall -idirafter /Users/ibookg4test/Downloads/u-boot-2009.01/include
-idirafter /Users/ibookg4test/Downloads/u-boot-2009.01/include2 -idirafter
/Users/ibookg4test/Downloads/u-boot-2009.01/include -DTEXT_BASE=0x0CF8
-DUSE_HOSTCC -O -c -o mkimage.o mkimage.c
In file included from ../include/libfdt.h:54,
 from fdt_host.h:25,
 from mkimage.h:36,
 from mkimage.c:25:
/Users/ibookg4test/Downloads/u-boot-2009.01/include/libfdt_env.h:27:20: error:
endian.h: No such file or directory
/Users/ibookg4test/Downloads/u-boot-2009.01/include/libfdt_env.h:28:22: error:
byteswap.h: No such file or directory
In file included from fdt_host.h:25,
 from mkimage.h:36,
 from mkimage.c:25:
../include/libfdt.h: In function ‘fdt_set_magic’:
../include/libfdt.h:162: warning: implicit declaration of function ‘bswap_32’
In file included from mkimage.c:26:
/Users/ibookg4test/Downloads/u-boot-2009.01/include/image.h: At top level:
/Users/ibookg4test/Downloads/u-boot-2009.01/include/image.h:191: error: syntax
error before ‘ulong’
/Users/ibookg4test/Downloads/u-boot-2009.01/include/image.h:193: error: syntax
error before ‘load’
/Users/ibookg4test/Downloads/u-boot-2009.01/include/image.h:195: error: syntax
error before ‘}

[U-Boot] SST39VF1601 flash driver

2009-01-26 Thread Jerry Zhang
hello, all!
  I am porting u-boot to my board. I found it is difficult for me to write
the flash driver ( flash.c) of SST39VF1601 by myself. Has anyone ever
written this driver? Would you please give me a guide?


Thanks in advance!

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


Re: [U-Boot] [PATCH] jedec_flash: Fix compilation warning in jedec_flash.c

2009-01-26 Thread Stefan Roese
Hi Wolfgang,

On Monday 26 January 2009, Wolfgang Denk wrote:
> > diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
> > index 2d99d4d..879f25e 100644
> > --- a/drivers/mtd/jedec_flash.c
> > +++ b/drivers/mtd/jedec_flash.c
> > @@ -172,7 +172,7 @@ struct amd_flash_info {
> >  static const struct amd_flash_info jedec_table[] = {
> >  #ifdef CONFIG_SYS_FLASH_LEGACY_256Kx8
> > {
> > -   .mfr_id = MANUFACTURER_SST,
> > +   .mfr_id = (u16)MANUFACTURER_SST,
>
> Which toolchain is throwing which exact warnings here? For which
> board?
>
> I don't think this should be needed. MANUFACTURER_SST is defined as
> 0x00BF - this hsould give no conflicts here.

Your correct this line doesn't give a waring. The toolchain is ELDK
4.2. But the warning is "only" in line 219:

[ste...@kubuntu u-boot (master)]$ ./MAKEALL hcu4
Configuring for hcu4 board...
jedec_flash.c:219: warning: large integer implicitly truncated to unsigned type

Some of the manufacturer defines are defined (again) 16bit wide
in jedec_flash.c, and one (STM_MANUFACT) is defined 32bit wide
in include/flash.h (0x00200020). 

Perhaps its better to remove those double manufacturer defines from
jedec_flash.c? Just let me know if you would prefer such a version
and I will generate a patch for it.

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


Re: [U-Boot] SST39VF1601 flash driver

2009-01-26 Thread Stefan Roese
Hi Jerry,

On Tuesday 27 January 2009, Jerry Zhang wrote:
>   I am porting u-boot to my board. I found it is difficult for me to write
> the flash driver ( flash.c) of SST39VF1601 by myself. Has anyone ever
> written this driver? Would you please give me a guide?

Sure this device has been supported many times (e.g. 
board/esd/common/flash.c). But I suggest to support it now via the legacy 
infrastructure of the common CFI flash driver. Take a look at the board hcu4 
for example:

/* Use common CFI driver */
#define CONFIG_SYS_FLASH_CFI
#define CONFIG_FLASH_CFI_DRIVER
/* board provides its own flash_init code */
#define CONFIG_FLASH_CFI_LEGACY 1
...

You will need to add a definition for the 39VF1601 to 
drivers/mtd/jedec_flash.c though but this shouldn't be too hard.

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


Re: [U-Boot] [PATCH] ppc4xx: Fix initialization of SDRAM_CODT register in ppc_4xx_ddr2.c

2009-01-26 Thread Stefan Roese
On Monday 26 January 2009, carolyn.j.sm...@tektronix.com wrote:
> This fixes the initialization of the SDRAM_CODT register in the ppc4xx DDR2
> initialization code. The changes were discussed with Stefan Roese and Adam
> Graham and tested by Adam.

General comment: The line "The changes were discussed..." should be placed 
below the "---" since it doesn't really belong to the patch description.

> Signed-off-by: Carolyn Smith 
> ---
> diff -w -uprN old/cpu/ppc4xx/44x_spd_ddr2.c new/cpu/ppc4xx/44x_spd_ddr2.c
> --- old/cpu/ppc4xx/44x_spd_ddr2.c   2009-01-20 13:00:33.0 -0800
> +++ new/cpu/ppc4xx/44x_spd_ddr2.c   2009-01-23 16:00:49.0 -0800
> @@ -1104,11 +1104,14 @@ static void program_codt(unsigned long *
>  * Set the SDRAM Controller On Die Termination Register
> 
> *-*/
> mfsdram(SDRAM_CODT, codt);
> -   codt |= (SDRAM_CODT_IO_NMODE
> -& (~SDRAM_CODT_DQS_SINGLE_END
> -   & ~SDRAM_CODT_CKSE_SINGLE_END
> -   & ~SDRAM_CODT_FEEBBACK_RCV_SINGLE_END
> -   & ~SDRAM_CODT_FEEBBACK_DRV_SINGLE_END));
> +
> +   codt |= SDRAM_CODT_IO_NMODE;
> +
> +   codt &= ~(SDRAM_CODT_DQS_SINGLE_END |
> + SDRAM_CODT_CKSE_SINGLE_END |
> + SDRAM_CODT_FEEBBACK_RCV_SINGLE_END |
> + SDRAM_CODT_FEEBBACK_DRV_SINGLE_END);
> +

I don't think that this is correct. As I understood from Adam, those bits it 
questions are undefined/reserevd on all 4xx PPC's. So we should better remove 
the code referencing those values. Here is what Adam wrote:

> It is in fact the case for all the AMCC 4xx SoC chips that have the IBM
> SDRAM memory controller core IP, the SDRAM_CODT register, bits 29 and 30
> are reserved bits.  Thanks Carolyn for finding this issue.  We will
> update the 44x_spd_ddr2.c file and send out a patch shortly for this
> SDRAM_CODT register bits 29-30 issue.

Adam, do you still plan to send a patch for this? Or did I misunderstand you 
and the patch above 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: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot