Re: [U-Boot] NAND only (no NOR)

2008-12-02 Thread Alessandro Rubini
Disclaimer: I'm not running ppc these days

 However, having no NOR flash means:
   - NAND should be programmable via JTAG (BDI3000 doesn't support
 this, Lauterbach/trace32 does)

My personal preference for bringing up a new board is placing u-boot
in RAM using the available information to setup SDRAM from the jtag
tool (or, better, place the initial boot code the manufacturer give
you in static memory, and jump to is with a breakpoint in the right
place).

While my debugger is able to write flash, I've always found it easier
to do that from u-boot itself. Besides, I can fix my u-boot in RAM
without the lengthy erase-reprogram cycles.

If you work like this, it's irrelevant whether it is nor, nand or dataflash
or whatever, as long as u-boot is able to manage it.

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


Re: [U-Boot] Does u-boot support custom binaries?

2008-12-02 Thread Jean-Christophe PLAGNIOL-VILLARD
On 15:02 Tue 02 Dec , arun c wrote:
 Hi all,
 
 Does u-boot support loading custom binary executables?
 
 I know u-boot supports standalone applications and operating systems.
 
 The scenario is like this.
 
 1) u-boot completes the hardware booting.
 2) It loads the custom binary image(elf file) from flash to SDRAM and pass
 over the control to that binary.
 
 The custom binary is built using code warrior tool(an IDE) and it deals with
 hardware components which are not touched by u-boot(It does not
 reinitialize things done by u-boot and doesn't need a console).
 
 ie. the custom binary application does not use any functions provided by
 u-boot, it just want an environment to execute itself.
 
 Is this possible?

yes, if it's just a booting a elf use bootelf

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


Re: [U-Boot] LXT971 Ethernet problem

2008-12-02 Thread Wolfgang Denk
Dear Tomy,

In message [EMAIL PROTECTED] you wrote:
 
 I am currently working on AT91SAM9260 based board. In this board we
 are using LXT971A as PHY. We are using u-boot version 1.1.5. We have
 connected one Ethernet cross-over cable between the board and my PC. After
 rebooting we are observing the following
...
 So is there any thing to do with the LXT registers or LXT Ethernet driver ?
 . So I request you to give us a work around to solve this issue.

Well, U-Boot 1.1.5 is *very* old.

I strongly recommend to update to recent code (U-Boot-2008.10 or even
better top of tree from the git repository), and then try again.

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 is clear that the individual who persecutes a  man,  his  brother,
because he is not of the same opinion, is a monster.   - Voltaire
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Does u-boot support custom binaries?

2008-12-02 Thread arun c
Hi all,

Does u-boot support loading custom binary executables?

I know u-boot supports standalone applications and operating systems.

The scenario is like this.

1) u-boot completes the hardware booting.
2) It loads the custom binary image(elf file) from flash to SDRAM and pass
over the control to that binary.

The custom binary is built using code warrior tool(an IDE) and it deals with
hardware components which are not touched by u-boot(It does not
reinitialize things done by u-boot and doesn't need a console).

ie. the custom binary application does not use any functions provided by
u-boot, it just want an environment to execute itself.

Is this possible?

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


[U-Boot] [PATCH] UBI: Fix size parsing in ubi create

2008-12-02 Thread Stefan Roese
Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 common/cmd_ubi.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
index 495d71e..fd33a67 100644
--- a/common/cmd_ubi.c
+++ b/common/cmd_ubi.c
@@ -546,7 +546,7 @@ static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, 
char *argv[])
}
/* E.g., create volume size */
if (argc == 4) {
-   addr = simple_strtoul(argv[3], NULL, 16);
+   size = simple_strtoul(argv[3], NULL, 16);
argc--;
}
/* Use maximum available size */
-- 
1.6.0.4

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


[U-Boot] quick easy question (hopefully)

2008-12-02 Thread Jim Don
Hi ... I would like to compile uboot for x86 and run it on qemu (so i
can take a look see at what uboot is all about).

Could someone please recommend which make _config i should use? 

Jim


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


[U-Boot] [PATCH] OneNAND: Additional sync with 2.6.27

2008-12-02 Thread Stefan Roese
- Add subpage write support
- Add onenand_oob_64/32 ecclayout

This has been missing and without it UBI has some incompatibilies issues
with the current (= 2.6.27) Linux kernel version. vid_hdr_offset is
placed differently (2048 instead of 512) without this fix.

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 drivers/mtd/onenand/onenand_base.c |   72 +++-
 include/linux/mtd/onenand.h|1 +
 2 files changed, 72 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c 
b/drivers/mtd/onenand/onenand_base.c
index dcc969f..d482437 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -36,6 +36,35 @@ static inline void *memcpy_16(void *dst, const void *src, 
unsigned int len)
return ret;
 }
 
+/**
+ * onenand_oob_64 - oob info for large (2KB) page
+ */
+static struct nand_ecclayout onenand_oob_64 = {
+   .eccbytes   = 20,
+   .eccpos = {
+   8, 9, 10, 11, 12,
+   24, 25, 26, 27, 28,
+   40, 41, 42, 43, 44,
+   56, 57, 58, 59, 60,
+   },
+   .oobfree= {
+   {2, 3}, {14, 2}, {18, 3}, {30, 2},
+   {34, 3}, {46, 2}, {50, 3}, {62, 2}
+   }
+};
+
+/**
+ * onenand_oob_32 - oob info for middle (1KB) page
+ */
+static struct nand_ecclayout onenand_oob_32 = {
+   .eccbytes   = 10,
+   .eccpos = {
+   8, 9, 10, 11, 12,
+   24, 25, 26, 27, 28,
+   },
+   .oobfree= { {2, 3}, {14, 2}, {18, 3}, {30, 2} }
+};
+
 static const unsigned char ffchars[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 */
@@ -1079,7 +1108,7 @@ static int onenand_verify(struct mtd_info *mtd, const 
u_char *buf, loff_t addr,
 #define onenand_verify_oob(...) (0)
 #endif
 
-#define NOTALIGNED(x)  ((x  (mtd-writesize - 1)) != 0)
+#define NOTALIGNED(x)  ((x  (this-subpagesize - 1)) != 0)
 
 /**
  * onenand_fill_auto_oob - [Internal] oob auto-placement transfer
@@ -2058,6 +2087,7 @@ static int onenand_probe(struct mtd_info *mtd)
  */
 int onenand_scan(struct mtd_info *mtd, int maxchips)
 {
+   int i;
struct onenand_chip *this = mtd-priv;
 
if (!this-read_word)
@@ -2115,6 +2145,46 @@ int onenand_scan(struct mtd_info *mtd, int maxchips)
this-options |= ONENAND_OOBBUF_ALLOC;
}
 
+   this-state = FL_READY;
+
+   /*
+* Allow subpage writes up to oobsize.
+*/
+   switch (mtd-oobsize) {
+   case 64:
+   this-ecclayout = onenand_oob_64;
+   mtd-subpage_sft = 2;
+   break;
+
+   case 32:
+   this-ecclayout = onenand_oob_32;
+   mtd-subpage_sft = 1;
+   break;
+
+   default:
+   printk(KERN_WARNING No OOB scheme defined for oobsize %d\n,
+   mtd-oobsize);
+   mtd-subpage_sft = 0;
+   /* To prevent kernel oops */
+   this-ecclayout = onenand_oob_32;
+   break;
+   }
+
+   this-subpagesize = mtd-writesize  mtd-subpage_sft;
+
+   /*
+* The number of bytes available for a client to place data into
+* the out of band area
+*/
+   this-ecclayout-oobavail = 0;
+   for (i = 0; i  MTD_MAX_OOBFREE_ENTRIES 
+   this-ecclayout-oobfree[i].length; i++)
+   this-ecclayout-oobavail +=
+   this-ecclayout-oobfree[i].length;
+   mtd-oobavail = this-ecclayout-oobavail;
+
+   mtd-ecclayout = this-ecclayout;
+
/* Unlock whole block */
onenand_unlock_all(mtd);
 
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 7547e96..2597e34 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -107,6 +107,7 @@ struct onenand_chip {
unsigned char   *oob_buf;
 
struct nand_oobinfo *autooob;
+   int subpagesize;
struct nand_ecclayout   *ecclayout;
 
void *bbm;
-- 
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] Added support for the Guntermann Drunck PowerPC 440 EP/GR ETX module.

2008-12-02 Thread Matthias Fuchs
On Thursday 27 November 2008 13:36, Dirk Eibach wrote:
 Signed-off-by: Dirk Eibach [EMAIL PROTECTED]
 +int board_early_init_f(void)
 +{
 + register uint reg;
 +
 + /*
 +  * Setup the external bus controller/chip selects
 +  *---*/

I am sure, but didn't we once said that these dashed lines are ugly and 
multiline comments should look like this:

/*
 * bla
 * bla bla
 */

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


[U-Boot] [PATCH] mtd/dataflash.c: fix a problem with the last partition

2008-12-02 Thread Ilko Iliev
This patch fix the problem that only the [NB_DATAFLASH_AREA - 1] dataflash
partition can be defined to use the area to the end of dataflash size.
Now it is possible to have only one dataflash partition from 0 to the end
of of dataflash size.

Signed-off-by: Ilko Iliev [EMAIL PROTECTED]
---
 drivers/mtd/dataflash.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/dataflash.c b/drivers/mtd/dataflash.c
index 58be182..96cd395 100644
--- a/drivers/mtd/dataflash.c
+++ b/drivers/mtd/dataflash.c
@@ -131,7 +131,7 @@ int AT91F_DataflashInit (void)
break;
}
/* set the last area end to the dataflash size*/
-   area_list[NB_DATAFLASH_AREA - 1].end =
+   dataflash_info[i].end_address =
(dataflash_info[i].Device.pages_number *
dataflash_info[i].Device.pages_size) - 1;
 
-- 
1.5.2.2

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


[U-Boot] [PATCH] net: Fix download command parsing

2008-12-02 Thread Peter Tyser
When CONFIG_SYS_HUSH_PARSER is defined network download
commands with 1 argument in the format 'tftp /path/file'
do not work as expected. The hush command parser strips
the quotes from /path/file which causes the network
commands to interpret /path/file as an address
instead of the intended filename.

The previous check for a leading quote in netboot_common()
was replaced with a check which ensures only valid
numbers are treated as addresses.

Signed-off-by: Peter Tyser [EMAIL PROTECTED]
---
 common/cmd_net.c |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/common/cmd_net.c b/common/cmd_net.c
index af691a4..1d297ec 100644
--- a/common/cmd_net.c
+++ b/common/cmd_net.c
@@ -154,8 +154,10 @@ static int
 netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
 {
char *s;
+   char *end;
int   rcode = 0;
int   size;
+   ulong addr;
 
/* pre-set load_addr */
if ((s = getenv(loadaddr)) != NULL) {
@@ -166,15 +168,17 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int 
argc, char *argv[])
case 1:
break;
 
-   case 2: /* only one arg - accept two forms:
-* just load address, or just boot file name.
-* The latter form must be written filename here.
+   case 2: /* 
+* Only one arg - accept two forms:
+* Just load address, or just boot file name. The latter
+* form must be written in a format which can not be
+* mis-interpreted as a valid number.
 */
-   if (argv[1][0] == '') {/* just boot filename */
-   copy_filename (BootFile, argv[1], sizeof(BootFile));
-   } else {/* load address */
-   load_addr = simple_strtoul(argv[1], NULL, 16);
-   }
+   addr = simple_strtoul(argv[1], end, 16);
+   if (end == (argv[1] + strlen(argv[1])))
+   load_addr = addr;
+   else
+   copy_filename(BootFile, argv[1], sizeof(BootFile));
break;
 
case 3: load_addr = simple_strtoul(argv[1], NULL, 16);
-- 
1.6.0.2.GIT

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


Re: [U-Boot] frescale NAND FLASH problems

2008-12-02 Thread Scott Wood
Carlos kescuin wrote:
 Hi, everyone:
 
 I'm working with u-boot 2008 version for a freescale M5329EVB.

Which version?  There were multiple releases in 2008.

 nand.c: In function 'nand_hwcontrol':
 nand.c:50: error: 'NAND_CTL_SETNCE' undeclared (first use in this function)
 nand.c:50: error: (Each undeclared identifier is reported only once
 nand.c:50: error: for each function it appears in.)
 nand.c:51: error: 'NAND_CTL_CLRNCE' undeclared (first use in this function)
 nand.c:53: error: 'NAND_CTL_SETCLE' undeclared (first use in this function)
 nand.c:56: error: 'NAND_CTL_CLRCLE' undeclared (first use in this function)
 nand.c:59: error: 'NAND_CTL_SETALE' undeclared (first use in this function)
 nand.c:62: error: 'NAND_CTL_CLRALE' undeclared (first use in this function)
 nand.c:65: error: 'NAND_CTL_SETWP' undeclared (first use in this function)
 nand.c:68: error: 'NAND_CTL_CLRWP' undeclared (first use in this function)
 nand.c: In function 'board_nand_init':
 nand.c:106: error: 'struct nand_chip' has no member named 'eccmode'
 nand.c:107: error: incompatible types in assignment
 nand.c:109: error: 'struct nand_chip' has no member named 'write_byte'
 make[1]: *** [nand.o] Error 1
 make[1]: se sale del directorio
 `/home/carlos/Escritorio/u-boot-ide-experimental/board/freescale/m5329evb'
 make: *** [board/freescale/m5329evb/libm5329evb.a] Error 2

Please try head-of-tree; this has been fixed.

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


Re: [U-Boot] [PATCH] tools/mkimage: use lseek rather than fstat for file size for -l option

2008-12-02 Thread Peter Korsgaard
 Thomas == Thomas De Schampheleire [EMAIL PROTECTED] writes:

 Thomas I'd change the error message as well, to be independent of the tool
 Thomas used to get the file size. For example:
 Thomas fprintf (stderr, %s: Can't get size of %s: %s\n,

Ahh yes, good idea.

From d7c4cb9f290e22d3fc97e43816158c9fd744200c Mon Sep 17 00:00:00 2001
From: Peter Korsgaard [EMAIL PROTECTED]
Date: Mon, 1 Dec 2008 17:13:17 +0100
Subject: [PATCH] tools/mkimage: use lseek rather than fstat for file size for 
-l option

Use lseek rather than fstat for file size for list mode, so
mkimage -l /dev/mtdblockN works (stat returns st_size == 0 for devices).

Notice that you have to use /dev/mtdblockN and not /dev/mtdN, as the
latter doesn't support mmap.

Signed-off-by: Peter Korsgaard [EMAIL PROTECTED]
---
 tools/mkimage.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 58fd20f..aec74ab 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -205,8 +205,9 @@ NXTARG: ;
/*
 * list header information of existing image
 */
-   if (fstat(ifd, sbuf)  0) {
-   fprintf (stderr, %s: Can't stat %s: %s\n,
+   sbuf.st_size = lseek(ifd, 0, SEEK_END);
+   if (sbuf.st_size == (off_t)-1) {
+   fprintf (stderr, %s: Can't get size of %s: %s\n,
cmdname, imagefile, strerror(errno));
exit (EXIT_FAILURE);
}
-- 
1.5.6.5

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


[U-Boot] [PATCH 2/2] 85xx: seperate FLASH BASE virtual from physical address

2008-12-02 Thread Kumar Gala
Added a CONFIG_SYS_FLASH_BASE_PHYS for use as the physical address and
maintain CONFIG_SYS_FLASH_BASE as the virtual address of the flash.

This allows us to deal with 36-bit phys on these boards in the future.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---

These require the 'FSL: Moved BR_PHYS_ADDR for localbus to common header' patch

- k

 board/freescale/mpc8536ds/law.c   |2 +-
 board/freescale/mpc8536ds/mpc8536ds.c |2 +-
 board/freescale/mpc8536ds/tlb.c   |2 +-
 board/freescale/mpc8572ds/law.c   |2 +-
 board/freescale/mpc8572ds/mpc8572ds.c |2 +-
 board/freescale/mpc8572ds/tlb.c   |2 +-
 include/configs/MPC8536DS.h   |9 +
 include/configs/MPC8572DS.h   |9 +
 8 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/board/freescale/mpc8536ds/law.c b/board/freescale/mpc8536ds/law.c
index caccce4..31614d2 100644
--- a/board/freescale/mpc8536ds/law.c
+++ b/board/freescale/mpc8536ds/law.c
@@ -30,7 +30,7 @@
 struct law_entry law_table[] = {
SET_LAW(CONFIG_SYS_PCI1_MEM_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_PCI),
SET_LAW(CONFIG_SYS_PCI1_IO_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_PCI),
-   SET_LAW(CONFIG_SYS_FLASH_BASE, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+   SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAWAR_SIZE_128M, LAW_TRGT_IF_PCIE_1),
SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_PCIE_1),
SET_LAW(CONFIG_SYS_PCIE2_MEM_PHYS, LAWAR_SIZE_128M, LAW_TRGT_IF_PCIE_2),
diff --git a/board/freescale/mpc8536ds/mpc8536ds.c 
b/board/freescale/mpc8536ds/mpc8536ds.c
index 6fed4ea..b2c37f0 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -445,7 +445,7 @@ int board_early_init_r(void)
/* invalidate existing TLB entry for flash + promjet */
disable_tlb(flash_esel);
 
-   set_tlb(1, flashbase, flashbase,/* tlb, epn, rpn */
+   set_tlb(1, flashbase, CONFIG_SYS_FLASH_BASE_PHYS,   /* tlb, epn, 
rpn */
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, /* perms, wimge */
0, flash_esel, BOOKE_PAGESZ_256M, 1);   /* ts, esel, tsize, 
iprot */
 
diff --git a/board/freescale/mpc8536ds/tlb.c b/board/freescale/mpc8536ds/tlb.c
index 89d5097..f4bab55 100644
--- a/board/freescale/mpc8536ds/tlb.c
+++ b/board/freescale/mpc8536ds/tlb.c
@@ -53,7 +53,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 
/* W**G* - Flash/promjet, localbus */
/* This will be changed to *I*G* after relocation to RAM. */
-   SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE,
+   SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE_PHYS,
  MAS3_SX|MAS3_SR, MAS2_W|MAS2_G,
  0, 1, BOOKE_PAGESZ_256M, 1),
 
diff --git a/board/freescale/mpc8572ds/law.c b/board/freescale/mpc8572ds/law.c
index 9814479..02ea0ec 100644
--- a/board/freescale/mpc8572ds/law.c
+++ b/board/freescale/mpc8572ds/law.c
@@ -28,7 +28,7 @@
 #include asm/mmu.h
 
 struct law_entry law_table[] = {
-   SET_LAW(CONFIG_SYS_FLASH_BASE, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
+   SET_LAW(CONFIG_SYS_FLASH_BASE_PHYS, LAW_SIZE_256M, LAW_TRGT_IF_LBC),
SET_LAW(CONFIG_SYS_PCIE1_MEM_PHYS, LAWAR_SIZE_512M, LAW_TRGT_IF_PCIE_1),
SET_LAW(CONFIG_SYS_PCIE1_IO_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_PCIE_1),
SET_LAW(CONFIG_SYS_PCIE2_MEM_PHYS, LAWAR_SIZE_512M, LAW_TRGT_IF_PCIE_2),
diff --git a/board/freescale/mpc8572ds/mpc8572ds.c 
b/board/freescale/mpc8572ds/mpc8572ds.c
index 3a78c98..3e8052f 100644
--- a/board/freescale/mpc8572ds/mpc8572ds.c
+++ b/board/freescale/mpc8572ds/mpc8572ds.c
@@ -368,7 +368,7 @@ int board_early_init_r(void)
/* invalidate existing TLB entry for flash + promjet */
disable_tlb(flash_esel);
 
-   set_tlb(1, flashbase, flashbase,/* tlb, epn, rpn */
+   set_tlb(1, flashbase, CONFIG_SYS_FLASH_BASE_PHYS,   /* tlb, epn, 
rpn */
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, /* perms, wimge 
*/
0, flash_esel, BOOKE_PAGESZ_256M, 1);   /* ts, esel, 
tsize, iprot */
 
diff --git a/board/freescale/mpc8572ds/tlb.c b/board/freescale/mpc8572ds/tlb.c
index 3832e01..c8ded15 100644
--- a/board/freescale/mpc8572ds/tlb.c
+++ b/board/freescale/mpc8572ds/tlb.c
@@ -58,7 +58,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 
/* W**G* - Flash/promjet, localbus */
/* This will be changed to *I*G* after relocation to RAM. */
-   SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE,
+   SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE_PHYS,
  MAS3_SX|MAS3_SR, MAS2_W|MAS2_G,
  0, 2, BOOKE_PAGESZ_256M, 1),
 
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 136fb48..acd6823 100644
--- a/include/configs/MPC8536DS.h
+++ 

[U-Boot] [PATCH 1/2] 85xx: seperate PIXIS virtual from physical address

2008-12-02 Thread Kumar Gala
Added a PIXIS_BASE_PHYS for use as the physical address and maintain
PIXIS_BASE as the virtual address of the PIXIS fpga registers.

This allows us to deal with 36-bit phys on these boards in the future.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---

These require the 'FSL: Moved BR_PHYS_ADDR for localbus to common header' patch

- k

 board/freescale/mpc8536ds/law.c |2 +-
 board/freescale/mpc8536ds/tlb.c |2 +-
 board/freescale/mpc8572ds/law.c |2 +-
 board/freescale/mpc8572ds/tlb.c |2 +-
 include/configs/MPC8536DS.h |3 ++-
 include/configs/MPC8572DS.h |3 ++-
 6 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/board/freescale/mpc8536ds/law.c b/board/freescale/mpc8536ds/law.c
index 0861fa7..caccce4 100644
--- a/board/freescale/mpc8536ds/law.c
+++ b/board/freescale/mpc8536ds/law.c
@@ -37,7 +37,7 @@ struct law_entry law_table[] = {
SET_LAW(CONFIG_SYS_PCIE2_IO_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_PCIE_2),
SET_LAW(CONFIG_SYS_PCIE3_MEM_PHYS, LAWAR_SIZE_512M, LAW_TRGT_IF_PCIE_3),
SET_LAW(CONFIG_SYS_PCIE3_IO_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_PCIE_3),
-   SET_LAW(PIXIS_BASE, LAW_SIZE_4K, LAW_TRGT_IF_LBC),
+   SET_LAW(PIXIS_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_LBC),
SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
 };
 
diff --git a/board/freescale/mpc8536ds/tlb.c b/board/freescale/mpc8536ds/tlb.c
index c81a959..89d5097 100644
--- a/board/freescale/mpc8536ds/tlb.c
+++ b/board/freescale/mpc8536ds/tlb.c
@@ -41,7 +41,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
  MAS3_SX|MAS3_SW|MAS3_SR, 0,
  0, 0, BOOKE_PAGESZ_4K, 0),
 
-   SET_TLB_ENTRY(0, PIXIS_BASE, PIXIS_BASE,
+   SET_TLB_ENTRY(0, PIXIS_BASE, PIXIS_BASE_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 0, BOOKE_PAGESZ_4K, 0),
 
diff --git a/board/freescale/mpc8572ds/law.c b/board/freescale/mpc8572ds/law.c
index 83eb681..9814479 100644
--- a/board/freescale/mpc8572ds/law.c
+++ b/board/freescale/mpc8572ds/law.c
@@ -35,7 +35,7 @@ struct law_entry law_table[] = {
SET_LAW(CONFIG_SYS_PCIE2_IO_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_PCIE_2),
SET_LAW(CONFIG_SYS_PCIE3_MEM_PHYS, LAWAR_SIZE_512M, LAW_TRGT_IF_PCIE_3),
SET_LAW(CONFIG_SYS_PCIE3_IO_PHYS, LAW_SIZE_64K, LAW_TRGT_IF_PCIE_3),
-   SET_LAW(PIXIS_BASE, LAW_SIZE_4K, LAW_TRGT_IF_LBC),
+   SET_LAW(PIXIS_BASE_PHYS, LAW_SIZE_4K, LAW_TRGT_IF_LBC),
SET_LAW(CONFIG_SYS_NAND_BASE_PHYS, LAW_SIZE_1M, LAW_TRGT_IF_LBC),
 };
 
diff --git a/board/freescale/mpc8572ds/tlb.c b/board/freescale/mpc8572ds/tlb.c
index 8d1f646..3832e01 100644
--- a/board/freescale/mpc8572ds/tlb.c
+++ b/board/freescale/mpc8572ds/tlb.c
@@ -41,7 +41,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
  MAS3_SX|MAS3_SW|MAS3_SR, 0,
  0, 0, BOOKE_PAGESZ_4K, 0),
 
-   SET_TLB_ENTRY(0, PIXIS_BASE, PIXIS_BASE,
+   SET_TLB_ENTRY(0, PIXIS_BASE, PIXIS_BASE_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 0, BOOKE_PAGESZ_4K, 0),
 
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index fff888a..136fb48 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -195,8 +195,9 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 
 #define CONFIG_FSL_PIXIS   1   /* use common PIXIS code */
 #define PIXIS_BASE 0xffdf  /* PIXIS registers */
+#define PIXIS_BASE_PHYSPIXIS_BASE
 
-#define CONFIG_SYS_BR3_PRELIM  (PIXIS_BASE | 0x0801)   /* port size 8bit */
+#define CONFIG_SYS_BR3_PRELIM  (BR_PHYS_ADDR(PIXIS_BASE_PHYS) | BR_PS_8 | BR_V)
 #define CONFIG_SYS_OR3_PRELIM  0xeff7  /* 32KB but only 4k 
mapped */
 
 #define PIXIS_ID   0x0 /* Board ID at offset 0 */
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index c3693b8..f40be92 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -196,8 +196,9 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 
 #define CONFIG_FSL_PIXIS   1   /* use common PIXIS code */
 #define PIXIS_BASE 0xffdf  /* PIXIS registers */
+#define PIXIS_BASE_PHYSPIXIS_BASE
 
-#define CONFIG_SYS_BR3_PRELIM  (PIXIS_BASE | 0x0801)   /* port size 8bit */
+#define CONFIG_SYS_BR3_PRELIM  (BR_PHYS_ADDR(PIXIS_BASE_PHYS) | BR_PS_8 | BR_V)
 #define CONFIG_SYS_OR3_PRELIM  0xeff7  /* 32KB but only 4k 
mapped */
 
 #define PIXIS_ID   0x0 /* Board ID at offset 0 */
-- 
1.5.6.5

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


Re: [U-Boot] [PATCH 1/2] 85xx: seperate PIXIS virtual from physical address

2008-12-02 Thread Jon Loeliger
On Tue, 2008-12-02 at 14:19 -0600, Kumar Gala wrote:
 Added a PIXIS_BASE_PHYS for use as the physical address and maintain
 PIXIS_BASE as the virtual address of the PIXIS fpga registers.
 
 This allows us to deal with 36-bit phys on these boards in the future.
 
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---


Nit:
s/seperate/separate/  here and 2/2.

jdl


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


[U-Boot] [PATCH] AT91: remove non supported board AT91RM9200DF macro

2008-12-02 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 cpu/arm920t/start.S |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpu/arm920t/start.S b/cpu/arm920t/start.S
index 5143cfc..fbcfe6d 100644
--- a/cpu/arm920t/start.S
+++ b/cpu/arm920t/start.S
@@ -118,7 +118,7 @@ start_code:
bl coloured_LED_init
bl red_LED_on
 
-#ifdefined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK) || 
defined(CONFIG_AT91RM9200DF)
+#ifdefined(CONFIG_AT91RM9200DK) || defined(CONFIG_AT91RM9200EK)
/*
 * relocate exception table
 */
@@ -258,7 +258,7 @@ cpu_init_crit:
 * find a lowlevel_init.S in your board directory.
 */
mov ip, lr
-#ifdefined(CONFIG_AT91RM9200EK) || defined(CONFIG_AT91RM9200DF)
+#ifdefined(CONFIG_AT91RM9200EK)
 
 #else
bl  lowlevel_init
-- 
1.5.6.5

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


[U-Boot] [PATCH] usb_kbd: fix usb_kbd_deregister when DEVICE_DEREGISTER not enable

2008-12-02 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 common/usb_kbd.c  |4 
 include/devices.h |2 ++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index cf14560..89e6ee7 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -211,7 +211,11 @@ int drv_usb_kbd_init(void)
 /* deregistering the keyboard */
 int usb_kbd_deregister(void)
 {
+#ifdef CONFIG_SYS_DEVICE_DEREGISTER
return device_deregister(DEVNAME);
+#else
+   return 1;
+#endif
 }
 
 /**
diff --git a/include/devices.h b/include/devices.h
index 6b78d58..20ddfc4 100644
--- a/include/devices.h
+++ b/include/devices.h
@@ -91,7 +91,9 @@ extern char *stdio_names[MAX_FILES];
  */
 intdevice_register (device_t * dev);
 intdevices_init (void);
+#ifdef CONFIG_SYS_DEVICE_DEREGISTER
 intdevice_deregister(char *devname);
+#endif
 struct list_head* device_get_list(void);
 device_t* device_get_by_name(char* name);
 device_t* device_clone(device_t *dev);
-- 
1.5.6.5

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


[U-Boot] [PATCH] at91rm9200dk: Fix typo

2008-12-02 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 include/configs/at91rm9200dk.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/configs/at91rm9200dk.h b/include/configs/at91rm9200dk.h
index 5c239d7..746f0ef 100644
--- a/include/configs/at91rm9200dk.h
+++ b/include/configs/at91rm9200dk.h
@@ -1,7 +1,7 @@
 /*
  * Rick Bronson [EMAIL PROTECTED]
  *
- * Configuation settings for the AT91RM9200DK board.
+ * Configuration settings for the AT91RM9200DK board.
  *
  * See file CREDITS for list of people who contributed to this
  * project.
-- 
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] mtd/dataflash.c: fix a problem with the last partition

2008-12-02 Thread Jean-Christophe PLAGNIOL-VILLARD
On 17:27 Tue 02 Dec , Ilko Iliev wrote:
 This patch fix the problem that only the [NB_DATAFLASH_AREA - 1] dataflash
 partition can be defined to use the area to the end of dataflash size.
 Now it is possible to have only one dataflash partition from 0 to the end
 of of dataflash size.
 
 Signed-off-by: Ilko Iliev [EMAIL PROTECTED]
 ---
  drivers/mtd/dataflash.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
Applied to u-boot-at91

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


Re: [U-Boot] PHY lib

2008-12-02 Thread Andy Fleming
On Tue, Nov 25, 2008 at 12:31 PM, Ben Warren [EMAIL PROTECTED] wrote:
 Hi Michal,
 Michal Simek wrote:
 Hi Ben,

 how does look like your propose work about PHY lib?

 Thanks,
 Michal


 I'd like to have the PHY library included in the 02.2009 release.  One
 of the things I'm struggling with is how so specify MDIO busses and PHY
 addresses.  For example, is it preferable to have a bunch of
 CONFIG_PHY_ADDR_x or a board-code struct?  How to link/register PHYs
 with MDIO buses, since conceivably a board could have hardware MDIO
 and/or bit-banged MDIO, and any PHY could be on any bus.

I think the board-code should pass it in.  Each nic just needs a
pointer to its PHY.  Some boards will have hard-coded addresses, and
some will have addresses that change depending on circumstances (the
DS boards use different PHYs when they are operating in SGMII mode,
for instance).  Some boards will even have set it up so you have to
scan for a PHY.  Many PCI nics seem to require this, despite its
inherent fragility.

So I think if the board code were able to find PHY handles, then we
can let the boards decide how to get that information (and eventually
transition to pulling it out of a device tree)

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


Re: [U-Boot] [PATCH] net: tsec: Fix Marvell 88E1121R phy init

2008-12-02 Thread Andy Fleming
On Tue, Dec 2, 2008 at 3:31 AM, Anatolij Gustschin [EMAIL PROTECTED] wrote:
 This patch tries to ensure that phy interrupt pin
 won't be asserted after booting. We experienced
 following issues with current 88E1121R phy init:

 Marvell 88E1121R phy can be hardware-configured
 to share MDC/MDIO and interrupt pins for both ports
 P0 and P1 (e.g. as configured on socrates board).
 Port 0 interrupt pin will be shared by both ports
 in such configuration. After booting Linux and
 configuring eth0 interface, port 0 phy interrupts
 are enabled. After rebooting without proper eth0
 interface shutdown port 0 phy interrupts remain
 enabled so any change on port 0 (link status, etc.)
 cause assertion of the interrupt. Now booting Linux
 and configuring eth1 interface will cause permanent
 phy interrupt storm as the registered phy 1 interrupt
 handler doesn't acknowledge phy 0 interrupts. This
 of course should be fixed in Linux driver too.

Agreed, and...


 Signed-off-by: Anatolij Gustschin [EMAIL PROTECTED]

Acked-by: Andy Fleming [EMAIL PROTECTED]
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/5] 85xx: Convert CONFIG_SYS_{PCI*, RIO*}_MEM_BASE to _MEM_BUS for FSL boards

2008-12-02 Thread Kumar Gala
Use CONFIG_SYS_{PCI,RIO}_MEM_BUS for the bus relative address instead
of _MEM_BASE so we are more explicit.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 board/freescale/mpc8536ds/mpc8536ds.c   |   20 ++--
 board/freescale/mpc8540ads/law.c|2 +-
 board/freescale/mpc8540ads/tlb.c|4 ++--
 board/freescale/mpc8544ds/mpc8544ds.c   |   26 +-
 board/freescale/mpc8548cds/mpc8548cds.c |4 ++--
 board/freescale/mpc8548cds/tlb.c|4 ++--
 board/freescale/mpc8560ads/law.c|2 +-
 board/freescale/mpc8560ads/tlb.c|4 ++--
 board/freescale/mpc8568mds/law.c|2 +-
 board/freescale/mpc8568mds/mpc8568mds.c |4 ++--
 board/freescale/mpc8572ds/mpc8572ds.c   |6 +++---
 cpu/mpc85xx/pci.c   |   16 
 include/configs/MPC8536DS.h |   16 
 include/configs/MPC8540ADS.h|8 
 include/configs/MPC8541CDS.h|8 
 include/configs/MPC8544DS.h |   20 ++--
 include/configs/MPC8548CDS.h|   14 +++---
 include/configs/MPC8555CDS.h|8 
 include/configs/MPC8560ADS.h|8 
 include/configs/MPC8568MDS.h|   10 +-
 include/configs/MPC8572DS.h |   12 ++--
 21 files changed, 103 insertions(+), 95 deletions(-)

diff --git a/board/freescale/mpc8536ds/mpc8536ds.c 
b/board/freescale/mpc8536ds/mpc8536ds.c
index b2c37f0..1636404 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -204,7 +204,7 @@ pci_init_board(void)
 
/* outbound memory */
pci_set_region(r++,
-  CONFIG_SYS_PCIE3_MEM_BASE,
+  CONFIG_SYS_PCIE3_MEM_BUS,
   CONFIG_SYS_PCIE3_MEM_PHYS,
   CONFIG_SYS_PCIE3_MEM_SIZE,
   PCI_REGION_MEM);
@@ -259,7 +259,7 @@ pci_init_board(void)
 
/* outbound memory */
pci_set_region(r++,
-  CONFIG_SYS_PCIE1_MEM_BASE,
+  CONFIG_SYS_PCIE1_MEM_BUS,
   CONFIG_SYS_PCIE1_MEM_PHYS,
   CONFIG_SYS_PCIE1_MEM_SIZE,
   PCI_REGION_MEM);
@@ -271,10 +271,10 @@ pci_init_board(void)
   CONFIG_SYS_PCIE1_IO_SIZE,
   PCI_REGION_IO);
 
-#ifdef CONFIG_SYS_PCIE1_MEM_BASE2
+#ifdef CONFIG_SYS_PCIE1_MEM_BUS2
/* outbound memory */
pci_set_region(r++,
-  CONFIG_SYS_PCIE1_MEM_BASE2,
+  CONFIG_SYS_PCIE1_MEM_BUS2,
   CONFIG_SYS_PCIE1_MEM_PHYS2,
   CONFIG_SYS_PCIE1_MEM_SIZE2,
   PCI_REGION_MEM);
@@ -322,7 +322,7 @@ pci_init_board(void)
 
/* outbound memory */
pci_set_region(r++,
-  CONFIG_SYS_PCIE2_MEM_BASE,
+  CONFIG_SYS_PCIE2_MEM_BUS,
   CONFIG_SYS_PCIE2_MEM_PHYS,
   CONFIG_SYS_PCIE2_MEM_SIZE,
   PCI_REGION_MEM);
@@ -334,10 +334,10 @@ pci_init_board(void)
   CONFIG_SYS_PCIE2_IO_SIZE,
   PCI_REGION_IO);
 
-#ifdef CONFIG_SYS_PCIE2_MEM_BASE2
+#ifdef CONFIG_SYS_PCIE2_MEM_BUS2
/* outbound memory */
pci_set_region(r++,
-  CONFIG_SYS_PCIE2_MEM_BASE2,
+  CONFIG_SYS_PCIE2_MEM_BUS2,
   CONFIG_SYS_PCIE2_MEM_PHYS2,
   CONFIG_SYS_PCIE2_MEM_SIZE2,
   PCI_REGION_MEM);
@@ -390,7 +390,7 @@ pci_init_board(void)
 
/* outbound memory */
pci_set_region(r++,
-  CONFIG_SYS_PCI1_MEM_BASE,
+  CONFIG_SYS_PCI1_MEM_BUS,
   CONFIG_SYS_PCI1_MEM_PHYS,
   CONFIG_SYS_PCI1_MEM_SIZE,
   PCI_REGION_MEM);
@@ -402,10 +402,10 @@ pci_init_board(void)
   CONFIG_SYS_PCI1_IO_SIZE,
   PCI_REGION_IO);
 
-#ifdef CONFIG_SYS_PCI1_MEM_BASE2
+#ifdef CONFIG_SYS_PCI1_MEM_BUS2
/* outbound memory */
pci_set_region(r++,
-  CONFIG_SYS_PCI1_MEM_BASE2,
+  CONFIG_SYS_PCI1_MEM_BUS2,
   CONFIG_SYS_PCI1_MEM_PHYS2,
   CONFIG_SYS_PCI1_MEM_SIZE2,
   PCI_REGION_MEM);
diff --git a/board/freescale/mpc8540ads/law.c 

[U-Boot] [PATCH 5/5] 85xx: Introduce CONFIG_SYS_PCI*_IO_VIRT for FSL boards

2008-12-02 Thread Kumar Gala
Introduce a new define to seperate out the virtual address that PCI
IO space is at from the physical address.  In most situations these are
mapped 1:1.  However any code accessing the bus should use VIRT.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 board/freescale/mpc8536ds/tlb.c |2 +-
 board/freescale/mpc8572ds/tlb.c |2 +-
 include/configs/MPC8536DS.h |   10 +++---
 include/configs/MPC8540ADS.h|1 +
 include/configs/MPC8541CDS.h|2 ++
 include/configs/MPC8544DS.h |8 ++--
 include/configs/MPC8548CDS.h|3 +++
 include/configs/MPC8555CDS.h|2 ++
 include/configs/MPC8560ADS.h|1 +
 include/configs/MPC8568MDS.h|2 ++
 include/configs/MPC8572DS.h |5 -
 11 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/board/freescale/mpc8536ds/tlb.c b/board/freescale/mpc8536ds/tlb.c
index ec76d5c..35a13d4 100644
--- a/board/freescale/mpc8536ds/tlb.c
+++ b/board/freescale/mpc8536ds/tlb.c
@@ -63,7 +63,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
  0, 2, BOOKE_PAGESZ_1G, 1),
 
/* *I*G* - PCI I/O */
-   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_IO_PHYS, CONFIG_SYS_PCI1_IO_PHYS,
+   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_IO_VIRT, CONFIG_SYS_PCI1_IO_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 3, BOOKE_PAGESZ_256K, 1),
 
diff --git a/board/freescale/mpc8572ds/tlb.c b/board/freescale/mpc8572ds/tlb.c
index f0115f2..2537b94 100644
--- a/board/freescale/mpc8572ds/tlb.c
+++ b/board/freescale/mpc8572ds/tlb.c
@@ -77,7 +77,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
  0, 5, BOOKE_PAGESZ_256M, 1),
 
/* *I*G* - PCI I/O */
-   SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_IO_PHYS, CONFIG_SYS_PCIE3_IO_PHYS,
+   SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_IO_VIRT, CONFIG_SYS_PCIE3_IO_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 6, BOOKE_PAGESZ_256K, 1),
 
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 885fc72..71c1874 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -365,6 +365,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_SYS_PCI1_MEM_BUS0x8000
 #define CONFIG_SYS_PCI1_MEM_PHYS   0x8000
 #define CONFIG_SYS_PCI1_MEM_SIZE   0x1000  /* 256M */
+#define CONFIG_SYS_PCI1_IO_VIRT0xffc0
 #define CONFIG_SYS_PCI1_IO_BUS 0x
 #define CONFIG_SYS_PCI1_IO_PHYS0xffc0
 #define CONFIG_SYS_PCI1_IO_SIZE0x0001  /* 64k */
@@ -374,6 +375,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_SYS_PCIE1_MEM_BUS   0x9000
 #define CONFIG_SYS_PCIE1_MEM_PHYS  0x9000
 #define CONFIG_SYS_PCIE1_MEM_SIZE  0x0800  /* 128M */
+#define CONFIG_SYS_PCIE1_IO_VIRT   0xffc1
 #define CONFIG_SYS_PCIE1_IO_BUS0x
 #define CONFIG_SYS_PCIE1_IO_PHYS   0xffc1
 #define CONFIG_SYS_PCIE1_IO_SIZE   0x0001  /* 64k */
@@ -383,6 +385,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_SYS_PCIE2_MEM_BUS   0x9800
 #define CONFIG_SYS_PCIE2_MEM_PHYS  0x9800
 #define CONFIG_SYS_PCIE2_MEM_SIZE  0x0800  /* 128M */
+#define CONFIG_SYS_PCIE2_IO_VIRT   0xffc2
 #define CONFIG_SYS_PCIE2_IO_BUS0x
 #define CONFIG_SYS_PCIE2_IO_PHYS   0xffc2
 #define CONFIG_SYS_PCIE2_IO_SIZE   0x0001  /* 64k */
@@ -392,6 +395,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_SYS_PCIE3_MEM_BUS   0xa000
 #define CONFIG_SYS_PCIE3_MEM_PHYS  0xa000
 #define CONFIG_SYS_PCIE3_MEM_SIZE  0x2000  /* 512M */
+#define CONFIG_SYS_PCIE3_IO_VIRT   0xffc3
 #define CONFIG_SYS_PCIE3_IO_BUS0x
 #define CONFIG_SYS_PCIE3_IO_PHYS   0xffc3
 #define CONFIG_SYS_PCIE3_IO_SIZE   0x0001  /* 64k */
@@ -402,10 +406,10 @@ extern unsigned long get_board_ddr_clk(unsigned long 
dummy);
 #define CONFIG_PCI_PNP /* do pci plug-and-play */
 
 /*PCIE video card used*/
-#define VIDEO_IO_OFFSETCONFIG_SYS_PCIE3_IO_PHYS
+#define VIDEO_IO_OFFSETCONFIG_SYS_PCIE3_IO_VIRT
 
 /*PCI video card used*/
-/*#define VIDEO_IO_OFFSET  CONFIG_SYS_PCI1_IO_PHYS*/
+/*#define VIDEO_IO_OFFSET  CONFIG_SYS_PCI1_IO_VIRT*/
 
 /* video */
 #define CONFIG_VIDEO
@@ -418,7 +422,7 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);
 #define CONFIG_ATI_RADEON_FB
 #define CONFIG_VIDEO_LOGO
 /*#define CONFIG_CONSOLE_CURSOR*/
-#define CONFIG_SYS_ISA_IO_BASE_ADDRESS CONFIG_SYS_PCIE3_IO_PHYS
+#define CONFIG_SYS_ISA_IO_BASE_ADDRESS CONFIG_SYS_PCIE3_IO_VIRT
 #endif
 
 #undef CONFIG_EEPRO100
diff --git a/include/configs/MPC8540ADS.h b/include/configs/MPC8540ADS.h
index f1167c0..3137222 100644
--- a/include/configs/MPC8540ADS.h
+++ 

[U-Boot] [PATCH 4/5] 85xx: Introduce CONFIG_SYS_PCI*_MEM_VIRT for FSL boards

2008-12-02 Thread Kumar Gala
Introduce a new define to seperate out the virtual address that PCI
memory is at from the physical address.  In most situations these are
mapped 1:1.  However any code accessing the bus should use VIRT.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 board/freescale/mpc8536ds/tlb.c   |2 +-
 board/freescale/mpc8540ads/tlb.c  |8 
 board/freescale/mpc8541cds/tlb.c  |8 
 board/freescale/mpc8544ds/tlb.c   |6 +++---
 board/freescale/mpc8548cds/tlb.c  |6 +++---
 board/freescale/mpc8555cds/tlb.c  |8 
 board/freescale/mpc8560ads/tlb.c  |8 
 board/freescale/mpc8568mds/tlb.c  |2 +-
 board/freescale/mpc8572ds/mpc8572ds.c |2 +-
 board/freescale/mpc8572ds/tlb.c   |6 +++---
 include/configs/MPC8536DS.h   |   14 +-
 include/configs/MPC8540ADS.h  |6 --
 include/configs/MPC8541CDS.h  |6 --
 include/configs/MPC8544DS.h   |   17 -
 include/configs/MPC8548CDS.h  |   11 ---
 include/configs/MPC8555CDS.h  |6 --
 include/configs/MPC8560ADS.h  |6 --
 include/configs/MPC8568MDS.h  |7 +--
 include/configs/MPC8572DS.h   |9 ++---
 19 files changed, 84 insertions(+), 54 deletions(-)

diff --git a/board/freescale/mpc8536ds/tlb.c b/board/freescale/mpc8536ds/tlb.c
index f4bab55..ec76d5c 100644
--- a/board/freescale/mpc8536ds/tlb.c
+++ b/board/freescale/mpc8536ds/tlb.c
@@ -58,7 +58,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
  0, 1, BOOKE_PAGESZ_256M, 1),
 
/* *I*G* - PCI */
-   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS, CONFIG_SYS_PCI1_MEM_PHYS,
+   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_VIRT, CONFIG_SYS_PCI1_MEM_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 2, BOOKE_PAGESZ_1G, 1),
 
diff --git a/board/freescale/mpc8540ads/tlb.c b/board/freescale/mpc8540ads/tlb.c
index 205c06a..a9925d5 100644
--- a/board/freescale/mpc8540ads/tlb.c
+++ b/board/freescale/mpc8540ads/tlb.c
@@ -54,7 +54,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 * TLB 1:   256MNon-cacheable, guarded
 * 0x8000   256MPCI1 MEM First half
 */
-   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS, CONFIG_SYS_PCI1_MEM_PHYS,
+   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_VIRT, CONFIG_SYS_PCI1_MEM_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 1, BOOKE_PAGESZ_256M, 1),
 
@@ -62,7 +62,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 * TLB 2:   256MNon-cacheable, guarded
 * 0x9000   256MPCI1 MEM Second half
 */
-   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS + 0x1000, 
CONFIG_SYS_PCI1_MEM_PHYS + 0x1000,
+   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_VIRT + 0x1000, 
CONFIG_SYS_PCI1_MEM_PHYS + 0x1000,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 2, BOOKE_PAGESZ_256M, 1),
 
@@ -70,7 +70,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 * TLB 3:   256MNon-cacheable, guarded
 * 0xc000   256MRapid IO MEM First half
 */
-   SET_TLB_ENTRY(1, CONFIG_SYS_RIO_MEM_BUS, CONFIG_SYS_RIO_MEM_PHYS,
+   SET_TLB_ENTRY(1, CONFIG_SYS_RIO_MEM_VIRT, CONFIG_SYS_RIO_MEM_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 3, BOOKE_PAGESZ_256M, 1),
 
@@ -78,7 +78,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 * TLB 4:   256MNon-cacheable, guarded
 * 0xd000   256MRapid IO MEM Second half
 */
-   SET_TLB_ENTRY(1, CONFIG_SYS_RIO_MEM_BUS + 0x1000, 
CONFIG_SYS_RIO_MEM_PHYS + 0x1000,
+   SET_TLB_ENTRY(1, CONFIG_SYS_RIO_MEM_VIRT + 0x1000, 
CONFIG_SYS_RIO_MEM_PHYS + 0x1000,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 4, BOOKE_PAGESZ_256M, 1),
 
diff --git a/board/freescale/mpc8541cds/tlb.c b/board/freescale/mpc8541cds/tlb.c
index bf957c0..ae6812f 100644
--- a/board/freescale/mpc8541cds/tlb.c
+++ b/board/freescale/mpc8541cds/tlb.c
@@ -54,7 +54,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 * TLB 1:   256MNon-cacheable, guarded
 * 0x8000   256MPCI1 MEM First half
 */
-   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS, CONFIG_SYS_PCI1_MEM_PHYS,
+   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_VIRT, CONFIG_SYS_PCI1_MEM_PHYS,
  MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
  0, 1, BOOKE_PAGESZ_256M, 1),
 
@@ -62,7 +62,7 @@ struct fsl_e_tlb_entry tlb_table[] = {
 * TLB 2:   256MNon-cacheable, guarded
 * 0x9000   256MPCI1 MEM Second half
 */
-   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS + 0x1000, 
CONFIG_SYS_PCI1_MEM_PHYS + 0x1000,
+   SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_VIRT + 0x1000, 

[U-Boot] [PATCH 2/5] 85xx: Convert CONFIG_SYS_PCI*_IO_BASE to _IO_BUS for FSL boards

2008-12-02 Thread Kumar Gala
Use CONFIG_SYS_PCI*_IO_BUS for the bus relative address instead
of _IO_BASE so we are more explicit.

Signed-off-by: Kumar Gala [EMAIL PROTECTED]
---
 board/freescale/mpc8536ds/mpc8536ds.c   |8 
 board/freescale/mpc8544ds/mpc8544ds.c   |8 
 board/freescale/mpc8548cds/mpc8548cds.c |4 ++--
 board/freescale/mpc8568mds/mpc8568mds.c |4 ++--
 board/freescale/mpc8572ds/mpc8572ds.c   |6 +++---
 cpu/mpc85xx/pci.c   |   16 
 include/configs/MPC8536DS.h |   12 ++--
 include/configs/MPC8540ADS.h|2 +-
 include/configs/MPC8541CDS.h|4 ++--
 include/configs/MPC8544DS.h |   12 ++--
 include/configs/MPC8548CDS.h|6 +++---
 include/configs/MPC8555CDS.h|4 ++--
 include/configs/MPC8560ADS.h|2 +-
 include/configs/MPC8568MDS.h|4 ++--
 include/configs/MPC8572DS.h |   10 +-
 15 files changed, 55 insertions(+), 47 deletions(-)

diff --git a/board/freescale/mpc8536ds/mpc8536ds.c 
b/board/freescale/mpc8536ds/mpc8536ds.c
index 1636404..e6d11d2 100644
--- a/board/freescale/mpc8536ds/mpc8536ds.c
+++ b/board/freescale/mpc8536ds/mpc8536ds.c
@@ -211,7 +211,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCIE3_IO_BASE,
+  CONFIG_SYS_PCIE3_IO_BUS,
   CONFIG_SYS_PCIE3_IO_PHYS,
   CONFIG_SYS_PCIE3_IO_SIZE,
   PCI_REGION_IO);
@@ -266,7 +266,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCIE1_IO_BASE,
+  CONFIG_SYS_PCIE1_IO_BUS,
   CONFIG_SYS_PCIE1_IO_PHYS,
   CONFIG_SYS_PCIE1_IO_SIZE,
   PCI_REGION_IO);
@@ -329,7 +329,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCIE2_IO_BASE,
+  CONFIG_SYS_PCIE2_IO_BUS,
   CONFIG_SYS_PCIE2_IO_PHYS,
   CONFIG_SYS_PCIE2_IO_SIZE,
   PCI_REGION_IO);
@@ -397,7 +397,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCI1_IO_BASE,
+  CONFIG_SYS_PCI1_IO_BUS,
   CONFIG_SYS_PCI1_IO_PHYS,
   CONFIG_SYS_PCI1_IO_SIZE,
   PCI_REGION_IO);
diff --git a/board/freescale/mpc8544ds/mpc8544ds.c 
b/board/freescale/mpc8544ds/mpc8544ds.c
index 17987e5..034881e 100644
--- a/board/freescale/mpc8544ds/mpc8544ds.c
+++ b/board/freescale/mpc8544ds/mpc8544ds.c
@@ -156,7 +156,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCIE3_IO_BASE,
+  CONFIG_SYS_PCIE3_IO_BUS,
   CONFIG_SYS_PCIE3_IO_PHYS,
   CONFIG_SYS_PCIE3_IO_SIZE,
   PCI_REGION_IO);
@@ -223,7 +223,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCIE1_IO_BASE,
+  CONFIG_SYS_PCIE1_IO_BUS,
   CONFIG_SYS_PCIE1_IO_PHYS,
   CONFIG_SYS_PCIE1_IO_SIZE,
   PCI_REGION_IO);
@@ -286,7 +286,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCIE2_IO_BASE,
+  CONFIG_SYS_PCIE2_IO_BUS,
   CONFIG_SYS_PCIE2_IO_PHYS,
   CONFIG_SYS_PCIE2_IO_SIZE,
   PCI_REGION_IO);
@@ -354,7 +354,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCI1_IO_BASE,
+  CONFIG_SYS_PCI1_IO_BUS,
   CONFIG_SYS_PCI1_IO_PHYS,
   CONFIG_SYS_PCI1_IO_SIZE,
   PCI_REGION_IO);
diff --git a/board/freescale/mpc8548cds/mpc8548cds.c 
b/board/freescale/mpc8548cds/mpc8548cds.c
index 1a1e659..24423ff 100644
--- a/board/freescale/mpc8548cds/mpc8548cds.c
+++ b/board/freescale/mpc8548cds/mpc8548cds.c
@@ -336,7 +336,7 @@ pci_init_board(void)
 
/* outbound io */
pci_set_region(r++,
-  CONFIG_SYS_PCI1_IO_BASE,
+  CONFIG_SYS_PCI1_IO_BUS,

Re: [U-Boot] u-boot for ixp425

2008-12-02 Thread Leon Woestenberg
Martijn,

On Fri, Sep 12, 2008 at 8:18 PM, Martijn de Gouw
[EMAIL PROTECTED] wrote:
 We have u-boot running on a ixp425 board (pdnb3), without the intel
 stuff.
 The npe binaries are stored seperated in flash, and loaded by u-boot.
 All the code is now gplv2.

 We tried to get these patches in u-boot, but they where not accepted.

 Maybe you want to take a look at our patches.

I would like to, with the purpose of refitting them into u-boot in
case you have no time to do so.

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


Re: [U-Boot] u-boot for ixp425

2008-12-02 Thread Jean-Christophe PLAGNIOL-VILLARD
On 23:28 Tue 02 Dec , Leon Woestenberg wrote:
 Martijn,
 
 On Fri, Sep 12, 2008 at 8:18 PM, Martijn de Gouw
 [EMAIL PROTECTED] wrote:
  We have u-boot running on a ixp425 board (pdnb3), without the intel
  stuff.
  The npe binaries are stored seperated in flash, and loaded by u-boot.
  All the code is now gplv2.
 
  We tried to get these patches in u-boot, but they where not accepted.
 
  Maybe you want to take a look at our patches.
 
 I would like to, with the purpose of refitting them into u-boot in
 case you have no time to do so.
please take a look in the current code also because it's already allow you to
do this

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/2] 85xx: seperate PIXIS virtual from physical address

2008-12-02 Thread Kumar Gala

On Dec 2, 2008, at 2:29 PM, Jon Loeliger wrote:

 On Tue, 2008-12-02 at 14:19 -0600, Kumar Gala wrote:
 Added a PIXIS_BASE_PHYS for use as the physical address and maintain
 PIXIS_BASE as the virtual address of the PIXIS fpga registers.

 This allows us to deal with 36-bit phys on these boards in the  
 future.

 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---


 Nit:
 s/seperate/separate/  here and 2/2.

I'll leave it to Andy to fix my lack of spelling ability when he  
commits these.

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


Re: [U-Boot] [PATCH 1/2] 85xx: seperate PIXIS virtual from physical address

2008-12-02 Thread Becky Bruce

On Dec 2, 2008, at 4:36 PM, Kumar Gala wrote:


 On Dec 2, 2008, at 2:29 PM, Jon Loeliger wrote:

 On Tue, 2008-12-02 at 14:19 -0600, Kumar Gala wrote:
 Added a PIXIS_BASE_PHYS for use as the physical address and maintain
 PIXIS_BASE as the virtual address of the PIXIS fpga registers.

 This allows us to deal with 36-bit phys on these boards in the
 future.

 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---


 Nit:
 s/seperate/separate/  here and 2/2.

 I'll leave it to Andy to fix my lack of spelling ability when he
 commits these.

I don't know, maybe we should have public floggings for spelling  
mistakes ;-)

FYI, I have a very similar patch series coming for all the 86xx  
platforms.  I've got a bunch of other stuff on tap as well; I expect  
to push everything in the next day or two.

-B

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


Re: [U-Boot] [PATCH] tools/mkimage: use lseek rather than fstat for file size for -l option

2008-12-02 Thread Wolfgang Denk
Dear Peter Korsgaard,

In message [EMAIL PROTECTED] you wrote:
  Thomas == Thomas De Schampheleire [EMAIL PROTECTED] writes:
 
  Thomas I'd change the error message as well, to be independent of the tool
  Thomas used to get the file size. For example:
  Thomas fprintf (stderr, %s: Can't get size of %s: %s\n,
 
 Ahh yes, good idea.
 
 From d7c4cb9f290e22d3fc97e43816158c9fd744200c Mon Sep 17 00:00:00 2001
 From: Peter Korsgaard [EMAIL PROTECTED]
 Date: Mon, 1 Dec 2008 17:13:17 +0100
 Subject: [PATCH] tools/mkimage: use lseek rather than fstat for file size for 
 -l option
 
 Use lseek rather than fstat for file size for list mode, so
 mkimage -l /dev/mtdblockN works (stat returns st_size == 0 for devices).
 
 Notice that you have to use /dev/mtdblockN and not /dev/mtdN, as the
 latter doesn't support mmap.

Hm... but lseek() on /dev/mtdblockN will return the size of the MTD
device, not of the image that may be stored in it, right?

Later, you should get data checksum errors because of  the  incorrect
lenght,  i.  e.  a  ``ERROR:  image  has  corrupted data!'' error
message.

I don't think this works.

 - if (fstat(ifd, sbuf)  0) {
 - fprintf (stderr, %s: Can't stat %s: %s\n,
 + sbuf.st_size = lseek(ifd, 0, SEEK_END);
 + if (sbuf.st_size == (off_t)-1) {
 + fprintf (stderr, %s: Can't get size of %s: %s\n,

If you don't use *stat(), you should not use any struct stat type
either.

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]
Der Horizont vieler Menschen ist ein Kreis mit Radius Null --
und das nennen sie ihren Standpunkt.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net/net.c: correct timeout function

2008-12-02 Thread Daniel Mack
On Fri, Nov 28, 2008 at 05:25:29PM +0100, Daniel Mack wrote:
 the net/net.c implemenation of timeouts assumes that get_timer() returns
 values in milliseconds. As this is true for most platforms, it does not
 apply to PXA3x where the OSCR register increments with more than 3MHz.
 
 The following patch fixes the problem by calculation with the
 CONFIG_SYS_HZ variable.

[...]

Just curious - was this patch taken? Same question for the ones sent in
mails labeled

[PATCH] ne2000: take MAC address from config if available (+follow-ups)
[PATCH] PXA3xx: fix CKEN[AB]

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


Re: [U-Boot] [PATCH] net/net.c: correct timeout function

2008-12-02 Thread Ben Warren
Hi Daniel,

Daniel Mack wrote:
 On Fri, Nov 28, 2008 at 05:25:29PM +0100, Daniel Mack wrote:
   
 the net/net.c implemenation of timeouts assumes that get_timer() returns
 values in milliseconds. As this is true for most platforms, it does not
 apply to PXA3x where the OSCR register increments with more than 3MHz.

 The following patch fixes the problem by calculation with the
 CONFIG_SYS_HZ variable.
 

 [...]

 Just curious - was this patch taken? Same question for the ones sent in
 mails labeled

   [PATCH] ne2000: take MAC address from config if available (+follow-ups)
Sorry, I've been bogged down with other stuff.  Some things are missing 
from your patches, which can mainly be fixed by using 'git format-patch -C':
1. No signed-off-by
2. No diffstat
3. Place text that shouldn't be in the commit message below the '---' line

If you take care of this easy stuff and resubmit I'll take a hard look 
at the content in the next couple of days.  Please understand that the 
merge window is currently closed, so your code won't make it into the 
mainline U-boot until January sometime, although it will go in the net 
tree as soon as it's compliant.

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


Re: [U-Boot] [PATCH] ne2000: take MAC address from config if available

2008-12-02 Thread Daniel Mack
This adds CONFIG_NE2000_NOPROM. If set, the ethernet MAC address is taken
from the environment variable 'ethaddr' and the NIC is configured
accordingly. Needed for boards that don't have an EEPROM to store this
setting permanently.

Signed-off-by: Daniel Mack [EMAIL PROTECTED]

---
 ne2000_base.c |   38 --
  1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ne2000_base.c b/drivers/net/ne2000_base.c
index f93f932..86c1380 100644
--- a/drivers/net/ne2000_base.c
+++ b/drivers/net/ne2000_base.c
@@ -669,7 +669,6 @@ void uboot_push_tx_done(int key, int val) {
 int eth_init(bd_t *bd) {
int r;
u8 dev_addr[6];
-   char ethaddr[20];
 
PRINTK(### eth_init\n);
 
@@ -693,16 +692,35 @@ int eth_init(bd_t *bd) {
 
nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE;
 
-   r = get_prom(dev_addr, nic.base);
-   if (!r)
-   return -1;
+#ifndef CONFIG_NE2000_NOPROM
+   {
+   char ethaddr[20];
+   r = get_prom(dev_addr, nic.base);
+   if (!r)
+   return -1;
+
+   sprintf (ethaddr, %02X:%02X:%02X:%02X:%02X:%02X,
+dev_addr[0], dev_addr[1],
+dev_addr[2], dev_addr[3],
+dev_addr[4], dev_addr[5]) ;
+   PRINTK(Set environment from HW MAC addr = \%s\\n, ethaddr);
+   setenv (ethaddr, ethaddr);
+   }
+#else /* CONFIG_NE2000_NOPROM */
+   {
+   char *s = getenv(ethaddr);
 
-   sprintf (ethaddr, %02X:%02X:%02X:%02X:%02X:%02X,
-dev_addr[0], dev_addr[1],
-dev_addr[2], dev_addr[3],
-dev_addr[4], dev_addr[5]) ;
-   PRINTK(Set environment from HW MAC addr = \%s\\n, ethaddr);
-   setenv (ethaddr, ethaddr);
+   if (!s) {
+   printf (CONFIG_NE2000_NOPROM set but no 
+   ethaddr given in environment.\n);
+   return -1;
+   }
+
+   /* convert the string notation */
+   for (r = 0; r  6; r++)
+   dev_addr[r] = simple_strtol(s + (r * 3), NULL, 16);
+   }
+#endif
 
nic.data = nic.base + DP_DATA;
nic.tx_buf1 = START_PG;
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] bugfix for i.mx31 CCM_UPCTL reg

2008-12-02 Thread Maxim Artamonov
Signed-off-by: Maxim Artamonov scn1874 at yandex.ru

---
Simple bugfix.

 include/asm-arm/arch-mx31/mx31-regs.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-mx31/mx31-regs.h 
b/include/asm-arm/arch-mx31/mx31-regs.h
index 78825f5..7d6bd45 100644
--- a/include/asm-arm/arch-mx31/mx31-regs.h
+++ b/include/asm-arm/arch-mx31/mx31-regs.h
@@ -34,7 +34,7 @@
 #define CCM_PDR1   (CCM_BASE + 0x08)
 #define CCM_RCSR   (CCM_BASE + 0x0c)
 #define CCM_MPCTL  (CCM_BASE + 0x10)
-#define CCM_UPCTL  (CCM_BASE + 0x10)
+#define CCM_UPCTL  (CCM_BASE + 0x14)
 #define CCM_SPCTL  (CCM_BASE + 0x18)
 #define CCM_COSR   (CCM_BASE + 0x1C)
 #define CCM_CGR0   (CCM_BASE + 0x20)
-- 
1.5.2.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] NAND only (no NOR)

2008-12-02 Thread Sean MacLennan
On Tue, 02 Dec 2008 09:55:24 +0100
Norbert van Bolhuis [EMAIL PROTECTED] wrote:

 
 Nowadays, do many (PowerPC) embedded devices already risk omitting
 NOR flash and use a NAND device solely for booting and storing
 images ?
 
 I'm talking about systems with 10 years life-cycle (so no
 MP3-players nor medical systems but somewhere in between).
 
 We have a MPC8313E-RDB and I know booting from NAND is
 possible. U-boot seems to support it well, I assume it can read
 the kernel, ramdisk and dtb from NAND in memory and bootm this.

We use a 256M NAND on the PIKA Warp appliance and where unable to boot
u-boot from the NAND. It worked on a smaller 64M NAND.

So we put our FPGA and u-boot in a small NOR. The kernel, rootfs and
other files are on the NAND.

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


[U-Boot] Is arm-2008-11-24.iso the right image to compile U Boot for ARM ?

2008-12-02 Thread Diptopal Basu
Hi  ,

As suggested I migrated to Fedora  9 . However in the site all examples are
with power PC as reference . I am downloading the arm iso image
arm-2008-11-24.iso and intend to use it to compile U boot . There is no
definition for Cross compile variable for ARM , it talks mostly about Power
PC  , how do I proceed from here ?

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


Re: [U-Boot] NAND only (no NOR)

2008-12-02 Thread Stefan Roese
On Wednesday 03 December 2008, Sean MacLennan wrote:
 We use a 256M NAND on the PIKA Warp appliance and where unable to boot
 u-boot from the NAND. It worked on a smaller 64M NAND.

Currently you need to define the page-size of the NAND used for booting (512 
bytes vs. 2k). The 2k 4xx NAND booting support is was done about 1/2 a year 
ago. So perhaps you tested this when this 2k support was not available yet.

 So we put our FPGA and u-boot in a small NOR. The kernel, rootfs and
 other files are on the NAND.

Yes, I would recommend to do it this way if possible. A small NOR for U-Boot 
and environment and everything else in NAND. This makes things much easier. 
But I understand that this is sometimes a problem with space (2 FLASH chips) 
and costs.

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] how compilor know where .text section starts from?

2008-12-02 Thread hank . peng
Hi, everybody:
I am new to uboot and reading source code, I have a question: how does
compilor know where .text section starts from?
For example, I am using MPC8548CDS, document says .text section begins
from 0xfff8000, but I haven't find this value in u-boot.lds?
So it must be specified in some other place, right?

-- 
The simplest is not all best but the best is surely the simplest!
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] NAND only (no NOR)

2008-12-02 Thread Sean MacLennan
On Wed, 3 Dec 2008 06:48:57 +0100
Stefan Roese [EMAIL PROTECTED] wrote:


 Currently you need to define the page-size of the NAND used for
 booting (512 bytes vs. 2k). The 2k 4xx NAND booting support is was
 done about 1/2 a year ago. So perhaps you tested this when this 2k
 support was not available yet.

We are running 1.3.0, so you are probably right. It may no longer be a
problem.

 Yes, I would recommend to do it this way if possible. A small NOR for
 U-Boot and environment and everything else in NAND. This makes things
 much easier. But I understand that this is sometimes a problem with
 space (2 FLASH chips) and costs.

Mainly cost. We didn't want to pay for a second chip.

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


Re: [U-Boot] NAND only (no NOR)

2008-12-02 Thread Trent Piepho
On Wed, 3 Dec 2008, Sean MacLennan wrote:
 Yes, I would recommend to do it this way if possible. A small NOR for
 U-Boot and environment and everything else in NAND. This makes things
 much easier. But I understand that this is sometimes a problem with
 space (2 FLASH chips) and costs.

 Mainly cost. We didn't want to pay for a second chip.

I think for NAND the latches necessary to de-multiplex the localbus aren't
necessary like they are for NOR?  On our board the latches might even take
more space than the flash chip.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] tools/mkimage: use lseek rather than fstat for file size for -l option

2008-12-02 Thread Peter Korsgaard
 Wolfgang == Wolfgang Denk [EMAIL PROTECTED] writes:

Hi,

 Wolfgang Hm... but lseek() on /dev/mtdblockN will return the size of
 Wolfgang the MTD device, not of the image that may be stored in it,
 Wolfgang right?

Yes.

 Wolfgang Later, you should get data checksum errors because of the
 Wolfgang incorrect lenght, i.  e.  a ``ERROR: image has
 Wolfgang corrupted data!'' error message.

Exactly, hence my other patch (tools/mkimage: ignore trailing garbage)
to only error out if the size is smaller than the size defined in the
header.

 Wolfgang I don't think this works.

  -   if (fstat(ifd, sbuf)  0) {
  -   fprintf (stderr, %s: Can't stat %s: %s\n,
  +   sbuf.st_size = lseek(ifd, 0, SEEK_END);
  +   if (sbuf.st_size == (off_t)-1) {
  +   fprintf (stderr, %s: Can't get size of %s: %s\n,

 Wolfgang If you don't use *stat(), you should not use any struct
 Wolfgang stat type either.

Ok, I kept it like that to keep the patch as minimal as possible -
I'll change it and resend.

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