Re: [U-Boot] [PATCH-V2 2/2] at91: reworked support for otc570 board

2011-04-19 Thread Daniel Gorsulowski
Hello Reinhard,

Reinhard Meyer wrote:
> Am 18.04.2011 16:15, schrieb Daniel Gorsulowski:
>> The otc570 board support was broken. Within this opportunity, I completely
>> reworked the board files.
>>
>> Signed-off-by: Daniel Gorsulowski 
>> ---
>>
>> This patch is based on u-boot-atmel/rework101229 branch (minus the last 5
>> patches) plus the 'at91: fixed at91sam9263 system file' patch in
>> u-boot-atmel/next branch.
>>
>> V2: -fixed commit description
>>
>>  board/esd/otc570/config.mk |1 -
>>  board/esd/otc570/otc570.c  |  106 ++
>>  boards.cfg |3 +-
>>  include/configs/otc570.h   |  265 
>> +---
>>  4 files changed, 211 insertions(+), 164 deletions(-)
>>  delete mode 100644 board/esd/otc570/config.mk
> 
> This patch had several places with  or .
> 
> I removed them manually. Please, next time run your patches through
> /scripts/checkpatch.pl. Thanks.

Sorry, but I checked my patches by checkpatch.pl. Maybe you can explain
me, what I did wrong?

danielg@debby:~/git/u-boot-atmel$
../linux/linux-2.6/scripts/checkpatch.pl
0002-at91-reworked-support-for-otc570-board.patch
WARNING: Use #include  instead of 
#48: FILE: board/esd/otc570/otc570.c:30:
+#include 

ERROR: Macros with complex values should be enclosed in parenthesis
#578: FILE: include/configs/otc570.h:209:
+# define CONFIG_SYS_NAND_ENABLE_PINAT91_PIO_PORTD, 15

ERROR: Macros with complex values should be enclosed in parenthesis
#579: FILE: include/configs/otc570.h:210:
+# define CONFIG_SYS_NAND_READY_PIN AT91_PIO_PORTA, 22

total: 2 errors, 1 warnings, 610 lines checked

0002-at91-reworked-support-for-otc570-board.patch has style problems,
please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

> 
> Applied to u-boot-atmel/next.

Thank you!

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

-- 
Mit freundlichen Grüßen
Daniel Gorsulowski

-
B.Eng. Daniel Gorsulowski
System-Design

esd electronic system design gmbh
Vahrenwalder Str. 207 - 30165 Hannover - GERMANY
Telefon: 0511-37298-192 - Fax: 0511-37298-68
Bitte besuchen Sie uns im Internet unter http://www.esd.eu
Quality Products - Made in Germany
-
Geschäftsführer: Klaus Detering
Amtsgericht Hannover HRB 51373 - VAT-ID DE 115672832
-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Fix for overlapping sections?

2011-04-19 Thread Wolfgang Denk
Dear "Larry",

In message 
 you 
wrote:
> 
> A while back there was a fix for the overlapping section link problem
> (see below) involving changing some sort of global.  Does anyone have a
> pointer to the change.  I'm using a fairly old uboot for AMCC
> Canyonlands/460Ex and can't easily upgrade to a newer uboot build.

I don't understand what you mean.  Why exactly can you not upgrade to
a recent version of U-Boot?  All it takes to get a current version of
U-Boot for the Canyonlands board is to type "./MAKEALL canyonlands".



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


Re: [U-Boot] UEC phy not working on first try

2011-04-19 Thread DUNDA Matthias
> > I am using u-boot.2010.09 on a MPC8568-based board.
> >
> > When trying to boot over one of the UEC network interfaces, it is not
> > working instantly. The cable is connected from the beginning, but I
> > have to issue a manual 'boot' command, sometimes even multiple times
> > before the link is correct. This is the output:
>
> Do all the UEC interfaces show the same symptoms?

Yes, this happens for all UECs. And I think it worked until we switched from 
u-boot 2009.11.1 to 2010.09 - but there's so much change that I didn't find the 
reason for it, yet.


> The driver "thinks" the link went away again.  When the cable is
> connected all the time, then this is an indication of something going
> wrong.  You should try to diagnose, why the software gets this link
> change and if it really is an information that the phy provides, if the
> physical path to the phy is stable.

Well, the software runs though uec_init (the_first_run is zero) and gets a 
positive link state in the do-while-loop instantly. Afterwards adjust_link is 
called - and there it fails. Strange thing - I guess I need to dig a little 
deeper...

Code hints are very appreciated! ;-)


> Best wishes
>   Detlev Zundel
Thanks!
Matthias


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


Re: [U-Boot] [PATCH V2 0/3] Fix hang when loading U-Boot from SPI or NAND

2011-04-19 Thread Albert ARIBAUD
Hi Tom,

Le 15/04/2011 00:09, Tom Warren a écrit :
> This series of patches fixes a hang seen when loading U-Boot from SPI
> or NAND on Seaboard and Harmony due to a missing PLLX init. It also
> corrects a UARTD bit error in clk_rst.h, and adds rudimentary GPIO
> support so that the UART on Seaboard can be used by U-Boot (UARTD&
> SPIFLASH are muxed, and the default POR setting is for SPI access, so
> GPIO_PI3 has to be driven low to enable serial console I/O over UARTD).
> Harmony has no SPIFLASH, so the issue doesn't exist there.
>
> With these changes, I can write U-Boot to SPI on Seaboard and boot with
> it to the U-Boot cmd prompt. This should also apply to loading from NAND
> on Seaboard and Harmony - testing to follow.
>
> Changes in V2:
>   - Change 2nd patch's description to 'Add basic GPIO definitions'
>   - Add more descriptive comment for CPCON use in init_pllx
>
> Tom Warren (3):
>arm: Tegra2: Add missing PLLX init
>arm: Tegra2: GPIO: Add basic GPIO definitions
>arm: Tegra2: Move clk/mux init to board_early_init_f, add GPIO init
>
>   arch/arm/cpu/armv7/tegra2/ap20.c   |   29 ++
>   arch/arm/include/asm/arch-tegra2/clk_rst.h |6 ++-
>   arch/arm/include/asm/arch-tegra2/gpio.h|   59 
> 
>   arch/arm/include/asm/arch-tegra2/tegra2.h  |1 +
>   board/nvidia/common/board.c|   32 ++-
>   board/nvidia/common/board.h|4 ++
>   board/nvidia/harmony/Makefile  |1 +
>   board/nvidia/harmony/harmony.c |   34 
>   board/nvidia/seaboard/Makefile |1 +
>   board/nvidia/seaboard/seaboard.c   |   52 
>   10 files changed, 206 insertions(+), 13 deletions(-)
>   create mode 100644 arch/arm/include/asm/arch-tegra2/gpio.h
>   create mode 100644 board/nvidia/harmony/harmony.c
>   create mode 100644 board/nvidia/seaboard/seaboard.c

Applied to u-boot-arm, thanks.

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


Re: [U-Boot] [PATCH] ARM: fix stack pointer adjustment in board_init_f()

2011-04-19 Thread Albert ARIBAUD
Hi Eric,

Le 15/04/2011 10:42, Wolfgang Denk a écrit :
> Dear Eric Cooper,
>
> In message<1302820357-30318-1-git-send-email-...@cmu.edu>  you wrote:
>> Since addr_sp is a byte address, it should be adjusted by 12 here.
>>
>> Signed-off-by: Eric Cooper
>> Cc: Albert ARIBAUD
>> ---
>>   arch/arm/lib/board.c |2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> Acked-by: Wolfgang Denk
>
> Best regards,
>
> Wolfgang Denk

Applied to u-boot-arm, thanks.

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


Re: [U-Boot] How does u-boot know where to put its start code?

2011-04-19 Thread Albert ARIBAUD
Le 20/04/2011 04:23, Hebbar, Gururaja a écrit :
> Hi,
>
> On Wed, Apr 20, 2011 at 02:43:23, Rogan Dawes wrote:
>> Hi folks,
>>
>> I'm trying to understand a bit more about how u-boot creates the image, such 
>> that the CPU reset vector is pointing to the right piece of code when it is 
>> reset.
>>
>> i.e. my DNS323 (Orion5x) has a reset vector of 0x. But for the life 
>> of me, I can't find anywhere that actually references that value to place 
>> the start code at that point.
>>
>
> Placing the final boot image is left to user who flashes/burns it board. But 
> it should be same as _TEXT_BASE (this is being removed now. Orion5x is arm 
> based). Also look at\arch\arm\cpu\arm926ejs\start.S&  
> \arch\arm\cpu\arm926ejs\u-boot.lds for more info on how linker is 
> instructed to place the starting code at predefined address.
>
>> I'm basically trying to make sure that my CONFIG_SYS_TEXT_BASE is correct 
>> (the address in the flash to which I write the whole u-boot.bin file, right?.
>>
> This is passed to linker as the entry point.

There is another point re: orion5x based boards: often, their designers 
preferred generating a linear image for U-Boot, but the fact that the 
vector address is at  makes it impossible to directly the image 
there because it is always greater than 64K. So the designers put some 
"pseudo-rom boot code" at  that will finally jump to an address 
lower in FLASH; for ED Mini V2 it is FFF9, and that's where the 
U-Boot image is supposed to be flashed.

Rogan, I bet in the DNS323 case, the same applies modulo your Flash 
size. Try tracing through the  code, it should not last more 
than a few tens of instructions before it jumps to some absolute address.

>> Thanks
>>
>> Rogan

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


Re: [U-Boot] [PATCH V5] arm: Tegra2: add support for A9 CPU init

2011-04-19 Thread Albert ARIBAUD
Hi Tom,

Le 15/04/2011 00:18, Tom Warren a écrit :
> Signed-off-by: Tom Warren
> ---
> Changes for V2:
>  - Remove returns in void functions
>  - Move inline assembly code to .S file
>  - Simplify some if/else code, break out common code
>  - Minimize the use of local vars
>  - Inline some single-instance functions
>  - Remove TRUE/FALSE define, use 1/0 instead
>  - Replace memset of mem-mapped regs w/loop of writel's
> Changes for V3:
> - Fix C-style comments in lowlevel_init.S cache_configure
> Changes for V4:
> - Move cold_boot() from C to assembly
> - Fix spacing in cache_configure
> Changes for V5:
>   - Add a timeout and printf msg if CPU never powers up
>   - Remove redundant is_cpu_powered in start_cpu
>
>   arch/arm/cpu/armv7/start.S |   12 +
>   arch/arm/cpu/armv7/tegra2/Makefile |2 +-
>   arch/arm/cpu/armv7/tegra2/ap20.c   |  329 
> 
>   arch/arm/cpu/armv7/tegra2/ap20.h   |  104 +
>   arch/arm/cpu/armv7/tegra2/lowlevel_init.S  |   94 
>   arch/arm/include/asm/arch-tegra2/clk_rst.h |   27 +++
>   arch/arm/include/asm/arch-tegra2/pmc.h |8 +
>   arch/arm/include/asm/arch-tegra2/scu.h |   43 
>   arch/arm/include/asm/arch-tegra2/tegra2.h  |8 +
>   board/nvidia/common/board.c|   10 +
>   board/nvidia/common/board.h|   29 +++
>   include/configs/harmony.h  |1 +
>   include/configs/seaboard.h |1 +
>   include/configs/tegra2-common.h|2 +
>   14 files changed, 669 insertions(+), 1 deletions(-)
>   create mode 100644 arch/arm/cpu/armv7/tegra2/ap20.c
>   create mode 100644 arch/arm/cpu/armv7/tegra2/ap20.h
>   create mode 100644 arch/arm/include/asm/arch-tegra2/scu.h
>   create mode 100644 board/nvidia/common/board.h

Applied to u-boot-arm, thanks.

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


[U-Boot] [PATCH] Strip dead code on omap3 devices

2011-04-19 Thread Charles Manning

Garbage collect code that isn't used.

Saves a good few kbytes.

Signed-off-by: Charles Manning 
---
 Makefile  |2 +-
 arch/arm/config.mk|6 ++
 arch/arm/cpu/armv7/u-boot.lds |6 +++---
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 713dba1..1ba3e3a 100644
--- a/Makefile
+++ b/Makefile
@@ -368,7 +368,7 @@ $(obj)u-boot.dis:   $(obj)u-boot
 GEN_UBOOT = \
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed  -n -e 
's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
-   cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM 
$(__OBJS) \
+   cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGSFINAL) 
$(LDFLAGS_$(@F)) 
$$UNDEF_SYM $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
 $(obj)u-boot:  depend \
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index fcc26a2..02cc9b2 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -67,3 +67,9 @@ LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
 ifndef CONFIG_NAND_SPL
 LDFLAGS_u-boot += -pie
 endif
+
+# Dead code stripping
+CFLAGS += -ffunction-sections
+CFLAGS += -fdata-sections
+LDFLAGS += --cref
+LDFLAGSFINAL += --cref --gc-sections
diff --git a/arch/arm/cpu/armv7/u-boot.lds b/arch/arm/cpu/armv7/u-boot.lds
index dbae54d..f1267b5 100644
--- a/arch/arm/cpu/armv7/u-boot.lds
+++ b/arch/arm/cpu/armv7/u-boot.lds
@@ -34,8 +34,8 @@ SECTIONS
. = ALIGN(4);
.text   :
{
-   arch/arm/cpu/armv7/start.o  (.text)
-   *(.text)
+   KEEP(arch/arm/cpu/armv7/start.o (.text*))
+   *(.text*)
}
 
. = ALIGN(4);
@@ -70,7 +70,7 @@ SECTIONS
 
.bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
-   *(.bss)
+   *(.bss*)
 . = ALIGN(4);
__bss_end__ = .;
}
-- 
1.7.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v5 4/5] Put common autoload code into auto_load() function

2011-04-19 Thread Simon Glass
This is a small clean-up patch.

TEST=Build U-Boot, try bootp and check it auto-loads.

Signed-off-by: Simon Glass 
---
 net/bootp.c |   76 +-
 1 files changed, 33 insertions(+), 43 deletions(-)

diff --git a/net/bootp.c b/net/bootp.c
index 1a71786..a3d0e63 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -137,6 +137,36 @@ static int truncate_sz (const char *name, int maxlen, int 
curlen)
return (curlen);
 }
 
+/*
+ * Check if autoload is enabled. If so, use either NFS or TFTP to download
+ * the boot file.
+ */
+static void auto_load(void)
+{
+   char *s = getenv("autoload");
+
+   if (s != NULL) {
+   if (*s == 'n') {
+   /*
+* Just use BOOTP to configure system;
+* Do not use TFTP to load the bootfile.
+*/
+   NetState = NETLOOP_SUCCESS;
+   return;
+#if defined(CONFIG_CMD_NFS)
+   } else if (strcmp(s, "NFS") == 0) {
+   /*
+* Use NFS to load the bootfile.
+*/
+   NfsStart();
+   return;
+#endif
+   }
+   }
+
+   TftpStart();
+}
+
 #if !defined(CONFIG_CMD_DHCP)
 
 static void BootpVendorFieldProcess (u8 * ext)
@@ -278,6 +308,7 @@ static void BootpVendorProcess (u8 * ext, int size)
if (NetBootFileSize)
debug("NetBootFileSize: %d\n", NetBootFileSize);
 }
+
 /*
  * Handle a BOOTP received packet.
  */
@@ -285,7 +316,6 @@ static void
 BootpHandler(uchar * pkt, unsigned dest, unsigned src, unsigned len)
 {
Bootp_t *bp;
-   char*s;
 
debug("got BOOTP packet (src=%d, dst=%d, len=%d want_len=%zu)\n",
src, dest, len, sizeof (Bootp_t));
@@ -312,26 +342,7 @@ BootpHandler(uchar * pkt, unsigned dest, unsigned src, 
unsigned len)
 
debug("Got good BOOTP\n");
 
-   if ((s = getenv("autoload")) != NULL) {
-   if (*s == 'n') {
-   /*
-* Just use BOOTP to configure system;
-* Do not use TFTP to load the bootfile.
-*/
-   NetState = NETLOOP_SUCCESS;
-   return;
-#if defined(CONFIG_CMD_NFS)
-   } else if (strcmp(s, "NFS") == 0) {
-   /*
-* Use NFS to load the bootfile.
-*/
-   NfsStart();
-   return;
-#endif
-   }
-   }
-
-   TftpStart();
+   auto_load();
 }
 #endif
 
@@ -904,34 +915,13 @@ DhcpHandler(uchar * pkt, unsigned dest, unsigned src, 
unsigned len)
debug("DHCP State: REQUESTING\n");
 
if ( DhcpMessageType((u8 *)bp->bp_vend) == DHCP_ACK ) {
-   char *s;
-
if (NetReadLong((ulong*)&bp->bp_vend[0]) == 
htonl(BOOTP_VENDOR_MAGIC))
DhcpOptionsProcess((u8 *)&bp->bp_vend[4], bp);
BootpCopyNetParams(bp); /* Store net params from reply 
*/
dhcp_state = BOUND;
printf ("DHCP client bound to address %pI4\n", 
&NetOurIP);
 
-   /* Obey the 'autoload' setting */
-   if ((s = getenv("autoload")) != NULL) {
-   if (*s == 'n') {
-   /*
-* Just use BOOTP to configure system;
-* Do not use TFTP to load the bootfile.
-*/
-   NetState = NETLOOP_SUCCESS;
-   return;
-#if defined(CONFIG_CMD_NFS)
-   } else if (strcmp(s, "NFS") == 0) {
-   /*
-* Use NFS to load the bootfile.
-*/
-   NfsStart();
-   return;
-#endif
-   }
-   }
-   TftpStart();
+   auto_load();
return;
}
break;
-- 
1.7.3.1

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


[U-Boot] [PATCH v5 2/5] Add Ethernet hardware MAC address framework to usbnet

2011-04-19 Thread Simon Glass
Built-in Ethernet adapters support setting the mac address by means of a
ethaddr environment variable for each interface (ethaddr, eth1addr, eth2addr).

This adds similar support to the USB network side, using the names
usbethaddr, usbeth1addr, etc. They are kept separate since we don't want
a USB device taking the MAC address of a built-in device or vice versa.

TEST=build, test on harmony, with setenv usbethaddr c0:c1:c0:13:0b:b8, bootp, 
tftp ...

Signed-off-by: Simon Glass 
---
 board/davinci/common/misc.c |2 +-
 drivers/net/designware.c|2 +-
 drivers/usb/eth/usb_ether.c |9 +-
 include/net.h   |   25 -
 net/eth.c   |   64 ++-
 5 files changed, 72 insertions(+), 30 deletions(-)

diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c
index 2bfdf23..53d6aa1 100644
--- a/board/davinci/common/misc.c
+++ b/board/davinci/common/misc.c
@@ -101,7 +101,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr)
 {
uint8_t env_enetaddr[6];
 
-   eth_getenv_enetaddr_by_index(0, env_enetaddr);
+   eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr);
if (!memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) {
/* There is no MAC address in the environment, so we initialize
 * it from the value in the EEPROM. */
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 3f5eeb7..02ba393 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -500,7 +500,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 
phy_addr)
dev->iobase = (int)base_addr;
dev->priv = priv;
 
-   eth_getenv_enetaddr_by_index(id, &dev->enetaddr[0]);
+   eth_getenv_enetaddr_by_index("eth", id, &dev->enetaddr[0]);
 
priv->dev = dev;
priv->mac_regs_p = (struct eth_mac_regs *)base_addr;
diff --git a/drivers/usb/eth/usb_ether.c b/drivers/usb/eth/usb_ether.c
index 7b55da3..6565ea5 100644
--- a/drivers/usb/eth/usb_ether.c
+++ b/drivers/usb/eth/usb_ether.c
@@ -80,6 +80,7 @@ int is_eth_dev_on_usb_host(void)
  */
 static void probe_valid_drivers(struct usb_device *dev)
 {
+   struct eth_device *eth;
int j;
 
for (j = 0; prob_dev[j].probe && prob_dev[j].get_info; j++) {
@@ -88,9 +89,10 @@ static void probe_valid_drivers(struct usb_device *dev)
/*
 * ok, it is a supported eth device. Get info and fill it in
 */
+   eth = &usb_eth[usb_max_eth_dev].eth_dev;
if (prob_dev[j].get_info(dev,
&usb_eth[usb_max_eth_dev],
-   &usb_eth[usb_max_eth_dev].eth_dev)) {
+   eth)) {
/* found proper driver */
/* register with networking stack */
usb_max_eth_dev++;
@@ -100,7 +102,10 @@ static void probe_valid_drivers(struct usb_device *dev)
 * call since eth_current_changed (internally called)
 * relies on it
 */
-   eth_register(&usb_eth[usb_max_eth_dev - 1].eth_dev);
+   eth_register(eth);
+   if (eth_write_hwaddr(eth, "usbeth",
+   usb_max_eth_dev - 1))
+   puts("Warning: failed to set MAC address\n");
break;
}
}
diff --git a/include/net.h b/include/net.h
index 95ef8ab..842a017 100644
--- a/include/net.h
+++ b/include/net.h
@@ -123,7 +123,18 @@ extern int eth_get_dev_index (void);   /* get 
the device index */
 extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
 extern int eth_getenv_enetaddr(char *name, uchar *enetaddr);
 extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr);
-extern int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr);
+
+/*
+ * Get the hardware address for an ethernet interface .
+ * Args:
+ * base_name - base name for device (normally "eth")
+ * index - device index number (0 for first)
+ * enetaddr - returns 6 byte hardware address
+ * Returns:
+ * Return true if the address is valid.
+ */
+extern int eth_getenv_enetaddr_by_index(const char *base_name, int index,
+   uchar *enetaddr);
 
 extern int usb_eth_initialize(bd_t *bi);
 extern int eth_init(bd_t *bis);/* Initialize the 
device */
@@ -136,6 +147,18 @@ extern int eth_rx(void);   /* Check for 
received packets */
 extern void eth_halt(void);/* stop SCC */
 extern char *eth_get_name(void);   /* get name of current device */
 
+/*
+ * Set the hardware address for an ethernet interface based on 'eth%daddr'
+ * environment variable (or just 'ethaddr' if eth_number is 0).
+ * Args:
+ * base_name - base name for dev

[U-Boot] [PATCH v5 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter

2011-04-19 Thread Simon Glass
The SMSC95XX is a USB hub with a built-in Ethernet adapter. This adds support
for this, using the USB host network framework.

TEST=usb start; bootp; tftp ...

Changes for v2:
   - Coding style cleanup
   - Changed some comments as suggested
   - eth_set_hwaddr -> eth_write_hwaddr
   - tided up other users of eth_getenv_enetaddr_by_index()

Changes for v3:
   - Drop tfpserverip patch
   - Change turbo_mode to #define
   - Fix tfpserverip patch bleed

Changes for v4:
  - Dropped Tegra2 specific bit
  - Added patch in place of tftpserverip patch, to speed up successive network 
commands on asix
  - Fixed a few broken bits in SMSC from my testing

Changes for v5:
  - Code style clean-ups in SMSC
  - Cleaned up debugging of errors in SMSC driver
  - Changed NULL to "eth" in eth_getenv_enetaddr_by_index() API

Signed-off-by: Simon Glass 
---
 drivers/usb/eth/Makefile|1 +
 drivers/usb/eth/smsc95xx.c  |  879 +++
 drivers/usb/eth/usb_ether.c |7 +
 include/usb_ether.h |   13 +
 4 files changed, 900 insertions(+), 0 deletions(-)
 create mode 100644 drivers/usb/eth/smsc95xx.c

diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile
index 6a5f25a..e28793d 100644
--- a/drivers/usb/eth/Makefile
+++ b/drivers/usb/eth/Makefile
@@ -28,6 +28,7 @@ COBJS-$(CONFIG_USB_HOST_ETHER) += usb_ether.o
 ifdef CONFIG_USB_ETHER_ASIX
 COBJS-y += asix.o
 endif
+COBJS-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
new file mode 100644
index 000..6e35a6d
--- /dev/null
+++ b/drivers/usb/eth/smsc95xx.c
@@ -0,0 +1,879 @@
+/*
+ * Copyright (c) 2011 The Chromium OS Authors.
+ * Copyright (C) 2009 NVIDIA, Corporation
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include 
+#include 
+#include 
+#include "usb_ether.h"
+
+/* SMSC LAN95xx based USB 2.0 Ethernet Devices */
+
+/* Tx command words */
+#define TX_CMD_A_FIRST_SEG_0x2000
+#define TX_CMD_A_LAST_SEG_ 0x1000
+
+/* Rx status word */
+#define RX_STS_FL_ 0x3FFF  /* Frame Length */
+#define RX_STS_ES_ 0x8000  /* Error Summary */
+
+/* SCSRs */
+#define ID_REV 0x00
+
+#define INT_STS0x08
+
+#define TX_CFG 0x10
+#define TX_CFG_ON_ 0x0004
+
+#define HW_CFG 0x14
+#define HW_CFG_BIR_0x1000
+#define HW_CFG_RXDOFF_ 0x0600
+#define HW_CFG_MEF_0x0020
+#define HW_CFG_BCE_0x0002
+#define HW_CFG_LRST_   0x0008
+
+#define PM_CTRL0x20
+#define PM_CTL_PHY_RST_0x0010
+
+#define AFC_CFG0x2C
+
+/*
+ * Hi watermark = 15.5Kb (~10 mtu pkts)
+ * low watermark = 3k (~2 mtu pkts)
+ * backpressure duration = ~ 350us
+ * Apply FC on any frame.
+ */
+#define AFC_CFG_DEFAULT0x00F830A1
+
+#define E2P_CMD0x30
+#define E2P_CMD_BUSY_  0x8000
+#define E2P_CMD_READ_  0x
+#define E2P_CMD_TIMEOUT_   0x0400
+#define E2P_CMD_LOADED_0x0200
+#define E2P_CMD_ADDR_  0x01FF
+
+#define E2P_DATA   0x34
+
+#define BURST_CAP  0x38
+
+#define INT_EP_CTL 0x68
+#define INT_EP_CTL_PHY_INT_0x8000
+
+#define BULK_IN_DLY0x6C
+
+/* MAC CSRs */
+#define MAC_CR 0x100
+#define MAC_CR_MCPAS_  0x0008
+#define MAC_CR_PRMS_   0x0004
+#define MAC_CR_HPFILT_ 0x2000
+#define MAC_CR_TXEN_   0x0008
+#define MAC_CR_RXEN_   0x0004
+
+#define ADDRH  0x104
+
+#define ADDRL  0x108
+
+#define MII_ADDR   0x114
+#define MII_WRITE_ 0x02
+#define MII_BUSY_ 

[U-Boot] [PATCH v5 3/5] Add documentation for USB Host Networking

2011-04-19 Thread Simon Glass
This describes what it is for, devices supported, how to enable for your
board in U-Boot, setting up the server, and notes about MAC addresses.

Signed-off-by: Simon Glass 
---
 doc/README.usb |  164 +++-
 1 files changed, 163 insertions(+), 1 deletions(-)

diff --git a/doc/README.usb b/doc/README.usb
index 9aa4f62..d30e696 100644
--- a/doc/README.usb
+++ b/doc/README.usb
@@ -79,4 +79,166 @@ CONFIG_USB_UHCI defines the lowlevel part.A 
lowlevel part must be defined
if using CONFIG_CMD_USB
 CONFIG_USB_KEYBOARD enables the USB Keyboard
 CONFIG_USB_STORAGE  enables the USB storage devices
-CONFIG_USB_HOST_ETHER  enables USB ethernet dongle support
+CONFIG_USB_HOST_ETHER  enables USB ethernet adapter support
+
+
+USB Host Networking
+===
+
+If you have a supported USB Ethernet adapter you can use it in U-Boot
+to obtain an IP address and load a kernel from a network server.
+
+USB Host Networking is different from making your board act as a USB
+client. In that case your board is pretending to be an Ethernet adapter
+and will appear as a network interface to an attached computer. The
+connection is via a USB cable with the computer acting as the host.
+
+With USB Host Networking, your board is the USB host. It controls the
+Ethernet adapter to which it is directly connected and the connection to
+the outside world is your adapter's Ethernet cable. Your board becomes a
+first class network device, able to connect and perform network
+operations independently of your computer.
+
+
+Device support
+--
+
+Currently supported devices are listed in the drivers according to
+their vendor and product IDs. You can check your device by connecting it
+to a Linux machine and typing 'lsusb'. The drivers are in
+drivers/usb/eth.
+
+For example this lsusb output line shows a device with Vendor ID 0x0x95
+and product ID 0x7720:
+
+Bus 002 Device 010: ID 0b95:7720 ASIX Electronics Corp. AX88772
+
+If you look at drivers/usb/eth/asix.c you will see this line within the
+supported device list, so we know this adapter is supported.
+
+{ 0x0b95, 0x7720 }, /* Trendnet TU2-ET100 V3.0R */
+
+If your adapter is not listed there is a still a chance that it will
+work. Try looking up the manufacturer of the chip inside your adapter.
+or take the adapter apart and look for chip markings. Then add a line
+for your vendor/product ID into the table of the appropriate driver,
+build U-Boot and see if it works. If not then there might be differences
+between the chip in your adapter and the driver. You could try to get a
+datasheet for your device and add support for it to U-Boot. This is not
+particularly difficult - you only need to provide support for four basic
+functions: init, halt, send and recv.
+
+
+Enabling USB Host Networking
+
+
+The normal U-Boot commands are used with USB networking, but you must
+start USB first. For example:
+
+usb start
+setenv bootfile /tftpboot/uImage
+setenv autoload y
+bootp
+
+
+(The autoload option makes bootp automatically load the boot file.)
+
+To enable USB Host Ethernet in U-Boot, your platform must of course
+support USB with CONFIG_CMD_USB enabled and working. You will need to
+add some config settings to your board header file:
+
+#define CONFIG_USB_HOST_ETHER   /* Enable USB Ethernet adapters */
+#define CONFIG_USB_ETHER_ASIX   /* Asix, or whatever driver(s) you want */
+
+You will also want to enable the network commands:
+
+#define CONFIG_CMD_NET
+#define CONFIG_NET_MULTI
+#define CONFIG_CMD_PING
+#define CONFIG_CMD_DHCP
+
+and some bootp options, which tell your board to obtain its subnet,
+gateway IP, host name and boot path from the bootp/dhcp server:
+
+#define CONFIG_BOOTP_SUBNETMASK
+#define CONFIG_BOOTP_GATEWAY
+#define CONFIG_BOOTP_HOSTNAME
+#define CONFIG_BOOTP_BOOTPATH
+
+You should also set the default IP address of your board and the server
+as well as the default file to load when a 'bootp' command is issued.
+
+#define CONFIG_IPADDR   10.0.0.2
+#define CONFIG_SERVERIP 10.0.0.1
+#define CONFIG_BOOTFILE uImage
+
+
+The 'usb start' command should identify the adapter something like this:
+
+CrOS> usb start
+(Re)start USB...
+USB EHCI 1.00
+scanning bus for devices... 3 USB Device(s) found
+   scanning bus for storage devices... 0 Storage Device(s) found
+   scanning bus for ethernet devices... 1 Ethernet Device(s) found
+CrOS> print ethact
+ethact=asx0
+
+You can see that it found an ethernet device and we can print out the
+device name (asx0 in this case).
+
+Then 'bootp' should use it to obtain an IP address from DHCP, perhaps
+something like this:
+
+CrOS> bootp
+Waiting for Ethernet connection... done.
+BOOTP broadcast 1
+BOOTP broadcast 2
+DHCP client bound to address 172.22.73.81
+Using asx0 device
+TFTP from server 172.22.72.144; our IP address is 172.22.73.81
+Filename '/tftpboot/uImage-sjg-seaboa

[U-Boot] [PATCH v5 5/5] usbeth: asix: Do a fast init if link already established

2011-04-19 Thread Simon Glass
The Asix driver takes the link down during init() and then brings it back up.
This commit changes this so that if a link has already been established
successfully we simply check that the link is still good.

This reduces the delay between successive network commands.

TEST=bootp; tftp ...  - see that delay is now shorter than before.

Signed-off-by: Simon Glass 
---
 drivers/usb/eth/asix.c |   36 +++-
 include/usb_ether.h|5 +++--
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 9b012e4..18e5457 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -307,20 +307,12 @@ static int mii_nway_restart(struct ueth_data *dev)
return r;
 }
 
-/*
- * Asix callbacks
- */
-static int asix_init(struct eth_device *eth, bd_t *bd)
+static int full_init(struct eth_device *eth)
 {
+   struct ueth_data *dev = (struct ueth_data *)eth->priv;
int embd_phy;
unsigned char buf[ETH_ALEN];
u16 rx_ctl;
-   struct ueth_data*dev = (struct ueth_data *)eth->priv;
-   int timeout = 0;
-#define TIMEOUT_RESOLUTION 50  /* ms */
-   int link_detected;
-
-   debug("** %s()\n", __func__);
 
if (asix_write_gpio(dev,
AX_GPIO_RSE | AX_GPIO_GPO_2 | AX_GPIO_GPO2EN, 5) < 0)
@@ -395,6 +387,25 @@ static int asix_init(struct eth_device *eth, bd_t *bd)
 
if (asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL) < 0)
goto out_err;
+   return 0;
+out_err:
+   return -1;
+}
+
+/*
+ * Asix callbacks
+ */
+static int asix_init(struct eth_device *eth, bd_t *bd)
+{
+   struct ueth_data *dev = (struct ueth_data *)eth->priv;
+   int timeout = 0;
+#define TIMEOUT_RESOLUTION 50  /* ms */
+   int link_detected;
+
+   debug("** %s()\n", __func__);
+
+   if (!dev->has_been_running && full_init(eth))
+   return -1;
 
do {
link_detected = asix_mdio_read(dev, dev->phy_id, MII_BMSR) &
@@ -411,12 +422,11 @@ static int asix_init(struct eth_device *eth, bd_t *bd)
printf("done.\n");
} else {
printf("unable to connect.\n");
-   goto out_err;
+   return -1;
}
 
+   dev->has_been_running = 1;
return 0;
-out_err:
-   return -1;
 }
 
 static int asix_send(struct eth_device *eth, volatile void *packet, int length)
diff --git a/include/usb_ether.h b/include/usb_ether.h
index a7fb26b..73b085d 100644
--- a/include/usb_ether.h
+++ b/include/usb_ether.h
@@ -37,8 +37,9 @@
 
 struct ueth_data {
/* eth info */
-   struct eth_device eth_dev;  /* used with eth_register */
-   int phy_id; /* mii phy id */
+   struct eth_device eth_dev;  /* used with eth_register */
+   int phy_id; /* mii phy id */
+   int has_been_running;   /* 1 if we have had a link up */
 
/* usb info */
struct usb_device *pusb_dev;/* this usb_device */
-- 
1.7.3.1

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


Re: [U-Boot] How does u-boot know where to put its start code?

2011-04-19 Thread Hebbar, Gururaja
Hi,

On Wed, Apr 20, 2011 at 02:43:23, Rogan Dawes wrote:
> Hi folks,
> 
> I'm trying to understand a bit more about how u-boot creates the image, such 
> that the CPU reset vector is pointing to the right piece of code when it is 
> reset.
> 
> i.e. my DNS323 (Orion5x) has a reset vector of 0x. But for the life 
> of me, I can't find anywhere that actually references that value to place the 
> start code at that point.
> 

Placing the final boot image is left to user who flashes/burns it board. But it 
should be same as _TEXT_BASE (this is being removed now. Orion5x is arm based). 
Also look at \arch\arm\cpu\arm926ejs\start.S & 
\arch\arm\cpu\arm926ejs\u-boot.lds for more info on how linker is 
instructed to place the starting code at predefined address.

> I'm basically trying to make sure that my CONFIG_SYS_TEXT_BASE is correct 
> (the address in the flash to which I write the whole u-boot.bin file, right?.
> 
This is passed to linker as the entry point.

> Thanks
> 
> Rogan


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


Re: [U-Boot] [PATCH v4 2/5] Add Ethernet hardware MAC address framework to usbnet

2011-04-19 Thread Simon Glass
On Mon, Apr 18, 2011 at 12:04 PM, Wolfgang Denk  wrote:
> Dear Simon Glass,
>
> In message <1302748176-4324-2-git-send-email-...@chromium.org> you wrote:
>> @@ -88,9 +89,10 @@ static void probe_valid_drivers(struct usb_device *dev)
>>               /*
>>                * ok, it is a supported eth device. Get info and fill it in
>>                */
>> +             eth = &usb_eth[usb_max_eth_dev].eth_dev;
>
> Index for eth is usb_max_eth_dev.
>
>> @@ -100,7 +102,10 @@ static void probe_valid_drivers(struct usb_device *dev)
>>                        * call since eth_current_changed (internally called)
>>                        * relies on it
>>                        */
>> -                     eth_register(&usb_eth[usb_max_eth_dev - 1].eth_dev);
>> +                     eth_register(eth);
>
> You change the behaviour here.  Please confirmt his is really
> intentional.

Yes. Since I am using an 'eth' pointer I don't need to index the array
again. The behaviour is the same as before.

>
>> diff --git a/include/net.h b/include/net.h

>> @@ -123,7 +123,18 @@ extern int eth_get_dev_index (void);             /* get 
>> the device index */

>> +/*
>> + * Get the hardware address for an ethernet interface .
>> + * Args:
>> + *   base_name - base name for device (NULL for "eth")
>
> This is an atitifical decision for the API which is difficult to
> understand.  It just makes the code and understanding it more
> difficult.  Just pass "eth" when you mean it.

The intention was to avoid everyone having to pass the correct value -
potential for error, etc. I could have created a #define, but decided
on this.

I have changed it as you request.

>
>> +int eth_write_hwaddr(struct eth_device *dev, const char *base_name,
>> +                int eth_number)
>> +{
>> +     unsigned char env_enetaddr[6];
>> +     int ret = 0;
>> +
>> +     eth_getenv_enetaddr_by_index(base_name, eth_number, env_enetaddr);
>
> Add error handling, or write
>
>        (void)eth_getenv_enetaddr_by_index(...);
>
> to indicate that you intentionally ignore the return value.

Done

>
> Best regards,
>
> Wolfgang Denk

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


Re: [U-Boot] [PATCH v4 1/5] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter

2011-04-19 Thread Simon Glass
On Mon, Apr 18, 2011 at 11:51 AM, Wolfgang Denk  wrote:
> Dear Simon Glass,
>
>> +/* Rx status word */
>> +#define RX_STS_FL_                   (0x3FFF)    /* Frame Length */
>> +#define RX_STS_ES_                   (0x8000)    /* Error Summary */
> ...
>
> Please drop the parens around all these constants.  Please fix
> globally.

Done


>> +     ret = smsc95xx_write_reg(dev, HW_CFG, read_buf);
>> +     if (ret < 0) {
>> +             debug("Failed to write HW_CFG_BIR_ bit in HW_CFG "
>> +                     "register, ret = %d\n", ret);
>> +             return ret;
>> +     }
>
> You repeat these sequences of smsc95xx_read_reg() resp.
> smsc95xx_write_reg() followed by the "if (ret < 0)" part about 20
> times.
>
> Please move the respective debug() message for the failure case into
> the functions, and consider using a loop here instead.

I have moved the debug messages into the routines. Not sure what you
mean by a loop.

>
>> +     read_buf = DEFAULT_BULK_IN_DELAY;
>> +     ret = smsc95xx_write_reg(dev, BULK_IN_DLY, read_buf);
>> +     if (ret < 0) {
>> +             debug("ret = %d", ret);
>> +             return ret;
>> +     }
>
> Is it intentional to use the read_buf with a smsc95xx_write_reg()
> call?

It doesn't need to - I have changed it to use the value directly.

>> +     ret = smsc95xx_write_reg(dev, HW_CFG, read_buf);
>> +     if (ret < 0) {
>> +             debug("Failed to write HW_CFG register, ret=%d\n", ret);
>> +             return ret;
>> +     }
>
> Ditto here?

This is updating a register. It reads the value, modifies it and writes it back.
>
>> +     ret = smsc95xx_write_reg(dev, AFC_CFG, read_buf);
>> +     if (ret < 0) {
>> +             debug("Failed to write AFC_CFG: %d\n", ret);
>> +             return ret;
>> +     }
>
> And here?

Same as above.
>
>> +     ret = smsc95xx_read_reg(dev, INT_EP_CTL, &read_buf);
>> +     if (ret < 0) {
>> +             debug("Failed to read INT_EP_CTL: %d", ret);
>> +             return ret;
>> +     }
>
> And here we have &read_buf while everywhere else we have read_buf
> only?

That's because it is reading the value here. The read routine needs an
address of a variable to put the value into.

>
>
>
> Best regards,
>
> Wolfgang Denk

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


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Joakim Tjernlund
Wolfgang Denk  wrote on 2011/04/20 00:41:01:
>
> Dear Joakim Tjernlund,
>
> In message 
>  you 
> wrote:
> >
> > > Yes, but you yorself pointed out that commit 337f5f5 missed a large
> > > number of boards, leaving the tree in a inconsistent state. Should we
> > > not revert that one as well?
> >
> > It is not too bad, just not complete yet. Reverting all just makes
> > it harder to get it all done.
> > I still don't get why it broke really.
> > hmm, did you by any chance include my patches to gcc too?
> > if so I you should only have to fixup arch/powerpc/config.mk:
> > - PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections 
> > -fdata-sections
> > - PLATFORM_RELFLAGS += $(call cc-option,-msingle-pic-base,)
> > + PLATFORM_RELFLAGS += -fPIC -mrelocatable -ffunction-sections 
> > -fdata-sections
>
> Can you please have a look at this yourslef?  You understand much
> better than me which of your patches are doing what, and how they
> might interact.

Tell me this first:
 "hmm, did you by any chance include my patches to gcc too?"
and I might have a fix for you. tmw, need to sleep now

>
> I don't have the time to dig into this any deeper.  If we cannot find
> a quick solution, I suggest to back out all this stuff and redo once
> the problems have been sorted out.  Sorry for applying the stuff to
> mainline without more thorough testing, I should have noticed these
> issues earlier and never checked in all that stuff.
>
> 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
> Another megabytes the dust.

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


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message 
 you 
wrote:
> 
> > Yes, but you yorself pointed out that commit 337f5f5 missed a large
> > number of boards, leaving the tree in a inconsistent state. Should we
> > not revert that one as well?
> 
> It is not too bad, just not complete yet. Reverting all just makes
> it harder to get it all done.
> I still don't get why it broke really.
> hmm, did you by any chance include my patches to gcc too?
> if so I you should only have to fixup arch/powerpc/config.mk:
> - PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
> - PLATFORM_RELFLAGS += $(call cc-option,-msingle-pic-base,)
> + PLATFORM_RELFLAGS += -fPIC -mrelocatable -ffunction-sections -fdata-sections

Can you please have a look at this yourslef?  You understand much
better than me which of your patches are doing what, and how they
might interact.

I don't have the time to dig into this any deeper.  If we cannot find
a quick solution, I suggest to back out all this stuff and redo once
the problems have been sorted out.  Sorry for applying the stuff to
mainline without more thorough testing, I should have noticed these
issues earlier and never checked in all that stuff.

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


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Joakim Tjernlund


Wolfgang Denk  wrote on 2011/04/20 00:05:27:

> From: Wolfgang Denk 
> To: Joakim Tjernlund 
> Cc: u-boot@lists.denx.de
> Date: 2011/04/20 00:05
> Subject: Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place
>
> Dear Joakim Tjernlund,
>
> In message 
>  you 
> wrote:
> >
> > > That means I will revert the two commits?
> >
> > One, you only claimed that:
> > > The -fPIC flag belongs with -mrelocatable, move it there.
> > > Also change -fPIC to -fpic as this produces smaller
> > > binaries.
> > > However, currently -mrelocatable promotes -fpic to -fPIC, a
> > > fix for this is in upcoming gcc 4.6 or you can apply this small
> > > patch to gcc:
> > Broke all those 8xx boards.
>
> Yes, but you yorself pointed out that commit 337f5f5 missed a large
> number of boards, leaving the tree in a inconsistent state. Should we
> not revert that one as well?

It is not too bad, just not complete yet. Reverting all just makes
it harder to get it all done.
I still don't get why it broke really.
hmm, did you by any chance include my patches to gcc too?
if so I you should only have to fixup arch/powerpc/config.mk:
- PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections
- PLATFORM_RELFLAGS += $(call cc-option,-msingle-pic-base,)
+ PLATFORM_RELFLAGS += -fPIC -mrelocatable -ffunction-sections -fdata-sections

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


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message 
 you 
wrote:
>
> > That means I will revert the two commits?
> 
> One, you only claimed that:
> > The -fPIC flag belongs with -mrelocatable, move it there.
> > Also change -fPIC to -fpic as this produces smaller
> > binaries.
> > However, currently -mrelocatable promotes -fpic to -fPIC, a
> > fix for this is in upcoming gcc 4.6 or you can apply this small
> > patch to gcc:
> Broke all those 8xx boards.

Yes, but you yorself pointed out that commit 337f5f5 missed a large
number of boards, leaving the tree in a inconsistent state. Should we
not revert that one as well?

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
Alles Gescheite ist schon gedacht worden, man muß nur versuchen,
es noch einmal zu denken.  -- Goethe, Maximen und Reflexionen
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] (no subject)

2011-04-19 Thread jeffhemstreet
http://nova-logic.ch/cool01.11.php?SID=460
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Joakim Tjernlund
Wolfgang Denk  wrote on 2011/04/19 23:35:40:
>
> Dear Joakim Tjernlund,
>
> In message 
>  you 
> wrote:
> >
> > > Can you please provide a fix?  I'd like to get rid of this build error
> > > ASAP.  We could, of course, simply revert these commits.
> >
> > Grepping shows a boat load of u-boot.lds files under board.  I don't
> > have time to patch them all ATM. They really needs to be consolidated
> > somehow but that is over my head.
>
> That means I will revert the two commits?

One, you only claimed that:
> The -fPIC flag belongs with -mrelocatable, move it there.
> Also change -fPIC to -fpic as this produces smaller
> binaries.
> However, currently -mrelocatable promotes -fpic to -fPIC, a
> fix for this is in upcoming gcc 4.6 or you can apply this small
> patch to gcc:
Broke all those 8xx boards.

  Jocke

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


Re: [U-Boot] [PATCH v2 3/6] TFTP: rename "server" to "remote"

2011-04-19 Thread Luca Ceresoli
Hi,

just a few e-mails ago along this thread Albert Aribaud wrote:

>  My opinion is that you should make sure that at least the code you touch
>  is checkpatch-clean, so yes, you should fix that; but there is no need
>  to submit 'checkpatch-compliance' patches. Just fix the line here so
>  that checkpatch does not complain.


So I proceeded along that way.

Now Detlev Zundel wrote:
> ...
> Hm, I see.  Still, can we have one commit (with "cosmetic" in the
> changelog) that silences checkpatch but does not have any functional
> changes?  We really try hard to separate cosmetic from functional
> changes.  This makes reviewing (and debugging) so much easier.

While I appreciate the careful review of my patches, I cannot hide
that it is discouraging for new contributors to be requested for
contradictory modifications.

There should be one precise policy, and that should be clearly documented.

http://www.denx.de/wiki/U-Boot/CodingStyle is the place where I would
expect to find it.

Luca

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


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message 
 you 
wrote:
>
> > Can you please provide a fix?  I'd like to get rid of this build error
> > ASAP.  We could, of course, simply revert these commits.
> 
> Grepping shows a boat load of u-boot.lds files under board.  I don't
> have time to patch them all ATM. They really needs to be consolidated
> somehow but that is over my head.

That means I will revert the two commits?

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
In the future, you're going to get computers as prizes  in  breakfast
cereals.  You'll  throw  them out because your house will be littered
with them. - Robert Lucky
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] How does u-boot know where to put its start code?

2011-04-19 Thread Rogan Dawes
Hi folks,

I'm trying to understand a bit more about how u-boot creates the image,
such that the CPU reset vector is pointing to the right piece of code
when it is reset.

i.e. my DNS323 (Orion5x) has a reset vector of 0x. But for the
life of me, I can't find anywhere that actually references that value to
place the start code at that point.

I'm basically trying to make sure that my CONFIG_SYS_TEXT_BASE is
correct (the address in the flash to which I write the whole u-boot.bin
file, right?.

Thanks

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


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Joakim Tjernlund
Wolfgang Denk  wrote on 2011/04/19 22:25:25:
>
> Dear Joakim Tjernlund,
>
> In message 
>  you 
> wrote:
> >
> > > It seems this change increases the code size somehow - which I would
> > > not expect from your comment above.  Please have a look.
> >
> > Very strange, I had a quick look(that is all I can do ATM). It appers
> > that 8xx is the only ppc arch which doesn't have its own u-boot.lds under
> > arch/powerpc/cpu/mpc8xx, is that intentional? Is it only 8xx that has this
> > problem?
>
> I did not look closer, but it appears that these boards are all boards
> that use an embedded environment, and thus their own, usually manually
> tuned linker script.
>
> > My guess would be that 8xx missed out on an earlier patch
> > http://git.denx.de/?p=u-boot.git;a=commitdiff;h=337f5f50f539cc1ea1e0533c096e237228f12cae
>
> Or, more correctly, that this patch failed to patch these boards.
>
> Can you please provide a fix?  I'd like to get rid of this build error
> ASAP.  We could, of course, simply revert these commits.

Grepping shows a boat load of u-boot.lds files under board.  I don't
have time to patch them all ATM. They really needs to be consolidated
somehow but that is over my head.

  Jocke

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


Re: [U-Boot] trigger automatic update (FIT image) from prompt instead of "updatefile" env variable

2011-04-19 Thread Andreas Pretzsch
Am Mittwoch, den 13.04.2011, 21:47 +0200 schrieb Andreas Pretzsch:
> Am Montag, den 11.04.2011, 23:11 +0200 schrieb Wolfgang Denk:
> > In message <1302554333.13241.158.ca...@ws-apr.office.loc> you wrote:
> > > Is there a way to manually trigger an automatic update using a FIT
> > > image, based on the way described in doc/README.update ?
> > 
> > Yes, there is.
> 
> I suppose you meant as soon as there is a new command ?
> 
> 
> > > I mean beside setting "updatefile" environment variable, saveenv and
> > > reboot, but trigger it from U-Boot prompt resp. script ?
> > > 
> > > As far as I can see, update_tftp() is only called once during the
> > > startup, but not referenced by any command.
> > 
> > It requires a two-step approach.  In the first step, implement such a
> > command - patches welcome :-)
> 
> Ok, let's see what I can squeeze in before the merge window closes.
> 
> Browsing the code, I see four ways to implement this, with #1 being my
> favorite. Straightforward and no risk of side effects.
> In all variants, I'm unsure about the command name and hope for
> suggestions.
> 
> 1.) new command calling update_tftp(), optionally with address
> parameter to omit the tftp load

Took this approach, as most easy and non-intrusive. Named the new
command "fitupd", sounds appropriate to me. Feel free to still request a
name change.
See patch series "update from FIT image: add optional address, new
command fitupd".


-- 

carpe noctem engineering
Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch  Tel. +49-(0)731-5521572
Hahnengasse 3 Fax: +49-(0)731-5521573
89073 Ulm, Germanyemail: a...@cn-eng.de

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


[U-Boot] [PATCH 2/2] add command fitupd to run an update from a FIT image

2011-04-19 Thread Andreas Pretzsch
Command calls update_tftp() analogous to automatic update described
in doc/README.update.

Usage:
fitupd [addr]
- run update from FIT image at addr
  or from tftp 'updatefile'

Signed-off-by: Andreas Pretzsch 
---
 common/Makefile |1 +
 common/cmd_fitupd.c |   37 +
 doc/README.update   |5 +
 3 files changed, 43 insertions(+), 0 deletions(-)
 create mode 100644 common/cmd_fitupd.c

diff --git a/common/Makefile b/common/Makefile
index 4555716..4b81edc 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -94,6 +94,7 @@ COBJS-$(CONFIG_CMD_FAT) += cmd_fat.o
 COBJS-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o
 COBJS-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o
 COBJS-$(CONFIG_CMD_FDOS) += cmd_fdos.o
+COBJS-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o
 COBJS-$(CONFIG_CMD_FLASH) += cmd_flash.o
 ifdef CONFIG_FPGA
 COBJS-$(CONFIG_CMD_FPGA) += cmd_fpga.o
diff --git a/common/cmd_fitupd.c b/common/cmd_fitupd.c
new file mode 100644
index 000..7da3199
--- /dev/null
+++ b/common/cmd_fitupd.c
@@ -0,0 +1,37 @@
+/*
+ * (C) Copyright 2011
+ * Andreas Pretzsch, carpe noctem engineering, a...@cn-eng.de
+ *
+ * This file is released under the terms of GPL v2 and any later version.
+ * See the file COPYING in the root directory of the source tree for details.
+ */
+
+#include 
+#include 
+
+#if !defined(CONFIG_UPDATE_TFTP)
+#error "CONFIG_UPDATE_TFTP required"
+#endif
+
+extern void update_tftp(ulong addr);
+
+static int do_fitupd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+   ulong addr = 0UL;
+
+   if (argc > 2)
+   return cmd_usage(cmdtp);
+
+   if (argc == 2)
+   addr = simple_strtoul(argv[1], NULL, 16);
+
+   update_tftp(addr);
+   return 0;
+}
+
+U_BOOT_CMD(fitupd, 2, 0, do_fitupd,
+   "update from FIT image",
+   "[addr]\n"
+   "\t- run update from FIT image at addr\n"
+   "\t  or from tftp 'updatefile'"
+);
diff --git a/doc/README.update b/doc/README.update
index 48f03b7..a7f4d9e 100644
--- a/doc/README.update
+++ b/doc/README.update
@@ -51,6 +51,11 @@ the mkimage tool. dtc tool with support for binary includes, 
e.g. in version
 to be prepared. Refer to the doc/uImage.FIT/ directory for more details on FIT
 images.
 
+This mechanism can be also triggered by the commmand "fitupd".
+If an optional, non-zero address is provided as argument, the TFTP transfer
+is skipped and the image at this address is used.
+The fitupd command is enabled by CONFIG_CMD_FITUPD.
+
 
 Example .its files
 --
-- 
1.7.4.1

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


[U-Boot] [PATCH 1/2] automatic update from FIT image: add optional address parameter

2011-04-19 Thread Andreas Pretzsch
Current update_tftp() flow:
  1.) fetch "updatefile" from defined TFTP server
  2.) check if FIT format
  3.) flash contained images

Add an address parameter to update_tftp(). If this address is non-zero,
skip the TFTP transfer and use the image at this address.

Signed-off-by: Andreas Pretzsch 
---
 common/main.c   |4 ++--
 common/update.c |8 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/common/main.c b/common/main.c
index dcbacc9..9b86934 100644
--- a/common/main.c
+++ b/common/main.c
@@ -51,7 +51,7 @@ void inline __show_boot_progress (int val) {}
 void show_boot_progress (int val) __attribute__((weak, 
alias("__show_boot_progress")));
 
 #if defined(CONFIG_UPDATE_TFTP)
-void update_tftp (void);
+void update_tftp (ulong addr);
 #endif /* CONFIG_UPDATE_TFTP */
 
 #define MAX_DELAY_STOP_STR 32
@@ -356,7 +356,7 @@ void main_loop (void)
 #endif /* CONFIG_PREBOOT */
 
 #if defined(CONFIG_UPDATE_TFTP)
-   update_tftp ();
+   update_tftp (0UL);
 #endif /* CONFIG_UPDATE_TFTP */
 
 #if defined(CONFIG_BOOTDELAY) && (CONFIG_BOOTDELAY >= 0)
diff --git a/common/update.c b/common/update.c
index 7528474..531c7d6 100644
--- a/common/update.c
+++ b/common/update.c
@@ -238,14 +238,17 @@ static int update_fit_getparams(const void *fit, int 
noffset, ulong *addr,
return 0;
 }
 
-void update_tftp(void)
+void update_tftp(ulong addr)
 {
char *filename, *env_addr;
int images_noffset, ndepth, noffset;
ulong update_addr, update_fladdr, update_size;
-   ulong addr;
void *fit;
 
+   /* use already present image */
+   if (addr)
+   goto got_update_file;
+
printf("Auto-update from TFTP: ");
 
/* get the file name of the update file */
@@ -271,6 +274,7 @@ void update_tftp(void)
return;
}
 
+got_update_file:
fit = (void *)addr;
 
if (!fit_check_format((void *)fit)) {
-- 
1.7.4.1

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


[U-Boot] [PATCH 0/2] update from FIT image: add optional address, new command fitupd

2011-04-19 Thread Andreas Pretzsch
Create new command "fitupd", so an update from a FIT-image can also be
triggered from U-Boot shell, in addition to the automatic update after
bootup when 'updatefile' is set.
Also provide a way to use a FIT image in memory (e.g. loaded from MMC)
instead of always load from a TFTP server.
See doc/README.update for more information.

Adhere to present coding style => checkpatch warnings discarded.

Andreas Pretzsch (2):
  automatic update from FIT image: add optional address parameter
  add command fitupd to run an update from a FIT image

 common/Makefile |1 +
 common/cmd_fitupd.c |   37 +
 common/main.c   |4 ++--
 common/update.c |8 ++--
 doc/README.update   |5 +
 5 files changed, 51 insertions(+), 4 deletions(-)
 create mode 100644 common/cmd_fitupd.c

-- 
1.7.4.1

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


Re: [U-Boot] [PATCHv4 1/4] Serial: p1011: new vendor init options

2011-04-19 Thread Kumar Gala

On Apr 19, 2011, at 3:42 PM, John Rigby wrote:

> Two new options:
> 
> CONFIG_PL011_SERIAL_RLCR
> 
> Some vendor versions of PL011 serial ports (e.g. ST-Ericsson U8500)
> have separate receive and transmit line control registers.  Set
> this variable to initialize the extra register.
> 
> CONFIG_PL011_SERIAL_FLUSH_ON_INIT
> 
> On some platforms (e.g. U8500) U-Boot is loaded by a second stage
> boot loader that has already initialized the UART.  Define this
> variable to flush the UART at init time.
> empty fifo on init
> 
> Signed-off-by: John Rigby 
> Signed-off-by: Rabin Vincent 
> ---
> v2: No changes
> v3: Enable changes with new CONFIG_* options instead of platform.
> Document new CONFIG_* options in README.
> v4: Added delay before writing to RLCR.
> Removed Rabin as author at his request.
> 
> README|   12 
> drivers/serial/serial_pl01x.c |   30 +++---
> drivers/serial/serial_pl01x.h |4 
> 3 files changed, 43 insertions(+), 3 deletions(-)

Just a nit, but the subject appears to be 'p1' not 'pl'.

(that is a one, not the letter L)

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


[U-Boot] [PATCHv4 4/4] armv7: Add support for ST-Ericsson U8500 href platform

2011-04-19 Thread John Rigby
Minimal platform support to boot linux from SD.

Supported devices/hw limited to external MMC/SD slot,
GPIO, I2C and minimal PRCMU.

Signed-off-by: John Rigby 
CC: Albert Aribaud 
---
This board support requires mmc driver patch set from Matt Waddel.
v2: cleanup, mostly removal of unused defines and include files
v3: incorporate changes suggested by Wolfgang including:
   better commit message
   get arm_pl180_mmci_init prototype from driver .h file
   don't ignore value from arm_pl180_mmci_init
   optimize printf's in u8500_href.c
   use plain #define CONFIG_BLAH for feature enabling
v4: no changes, just rebased to latest upstream and included for completness
 board/st-ericsson/u8500/Makefile |   50 +++
 board/st-ericsson/u8500/gpio.c   |  347 +
 board/st-ericsson/u8500/prcmu-fw.h   |   55 
 board/st-ericsson/u8500/prcmu.c  |  165 ++
 board/st-ericsson/u8500/u8500_href.c |  546 ++
 boards.cfg   |1 +
 include/configs/u8500_href.h |  245 +++
 7 files changed, 1409 insertions(+), 0 deletions(-)
 create mode 100644 board/st-ericsson/u8500/Makefile
 create mode 100644 board/st-ericsson/u8500/gpio.c
 create mode 100644 board/st-ericsson/u8500/prcmu-fw.h
 create mode 100644 board/st-ericsson/u8500/prcmu.c
 create mode 100644 board/st-ericsson/u8500/u8500_href.c
 create mode 100644 include/configs/u8500_href.h

diff --git a/board/st-ericsson/u8500/Makefile b/board/st-ericsson/u8500/Makefile
new file mode 100644
index 000..91c2abf
--- /dev/null
+++ b/board/st-ericsson/u8500/Makefile
@@ -0,0 +1,50 @@
+#
+# Copyright (C) ST-Ericsson SA 2009
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+CFLAGS += -D__RELEASE -D__STN_8500
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := u8500_href.o gpio.o prcmu.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB): $(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/st-ericsson/u8500/gpio.c b/board/st-ericsson/u8500/gpio.c
new file mode 100644
index 000..96b2461
--- /dev/null
+++ b/board/st-ericsson/u8500/gpio.c
@@ -0,0 +1,347 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2009
+ *
+ * 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 
+
+static struct gpio_register *addr_gpio_register[] = {
+   (void *)U8500_GPIO_0_BASE,
+   (void *)U8500_GPIO_1_BASE,
+   (void *)U8500_GPIO_2_BASE,
+   (void *)U8500_GPIO_3_BASE,
+   (void *)U8500_GPIO_4_BASE,
+   (void *)U8500_GPIO_5_BASE,
+   (void *)U8500_GPIO_6_BASE,
+   (void *)U8500_GPIO_7_BASE,
+   (void *)U8500_GPIO_8_BASE,
+};
+
+struct gpio_altfun_data altfun_table[] = {
+   {
+   .altfun = GPIO_ALT_I2C_0,
+   .start = 147,
+   .end = 148,
+   .cont = 0,
+   .type = GPIO_ALTF_A,
+   },
+   {
+   .altfun = GPIO_ALT_I2C_1,
+   .start = 16,
+   .end = 17,
+   

[U-Boot] [PATCHv4 2/4] armv7: Add ST-Ericsson u8500 arch

2011-04-19 Thread John Rigby
Based on ST-Ericsson internal git repo.

Signed-off-by: Mathieu Poirier 
Signed-off-by: John Rigby 
CC: Albert Aribaud 
---
v2: cleanup, mostly removal of unused defines
v3: remove prototype from sys_proto.h as suggested by Wolfgang
v4: incorporate changes suggested by Albert:
  Add copyright to arch/arm/cpu/armv7/u8500/lowlevel.S
  Remove confusing/incorrect timer comment in arch/arm/cpu/armv7/u8500/timer.c
  Remove reset timer functions from /timer.c

 arch/arm/cpu/armv7/u8500/Makefile   |   46 +
 arch/arm/cpu/armv7/u8500/clock.c|   56 ++
 arch/arm/cpu/armv7/u8500/lowlevel.S |   35 
 arch/arm/cpu/armv7/u8500/timer.c|  154 +
 arch/arm/include/asm/arch-u8500/clock.h |   72 
 arch/arm/include/asm/arch-u8500/gpio.h  |  247 +++
 arch/arm/include/asm/arch-u8500/hardware.h  |   83 +
 arch/arm/include/asm/arch-u8500/sys_proto.h |   27 +++
 arch/arm/include/asm/arch-u8500/u8500.h |   47 +
 9 files changed, 767 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/u8500/Makefile
 create mode 100644 arch/arm/cpu/armv7/u8500/clock.c
 create mode 100644 arch/arm/cpu/armv7/u8500/lowlevel.S
 create mode 100644 arch/arm/cpu/armv7/u8500/timer.c
 create mode 100644 arch/arm/include/asm/arch-u8500/clock.h
 create mode 100644 arch/arm/include/asm/arch-u8500/gpio.h
 create mode 100644 arch/arm/include/asm/arch-u8500/hardware.h
 create mode 100644 arch/arm/include/asm/arch-u8500/sys_proto.h
 create mode 100644 arch/arm/include/asm/arch-u8500/u8500.h

diff --git a/arch/arm/cpu/armv7/u8500/Makefile 
b/arch/arm/cpu/armv7/u8500/Makefile
new file mode 100644
index 000..270aa40
--- /dev/null
+++ b/arch/arm/cpu/armv7/u8500/Makefile
@@ -0,0 +1,46 @@
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).o
+
+COBJS  = timer.o clock.o
+SOBJS  = lowlevel.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/arch/arm/cpu/armv7/u8500/clock.c b/arch/arm/cpu/armv7/u8500/clock.c
new file mode 100644
index 000..9e3b873
--- /dev/null
+++ b/arch/arm/cpu/armv7/u8500/clock.c
@@ -0,0 +1,56 @@
+/*
+ * (C) Copyright 2009 ST-Ericsson
+ *
+ * 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 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+struct clkrst {
+   unsigned int pcken;
+   unsigned int pckdis;
+   unsigned int kcken;
+   unsigned int kckdis;
+};
+
+static unsigned int clkrst_base[] = {
+   U8500_CLKRST1_BASE,
+   U8500_CLKRST2_BASE,
+   U8500_CLKRST3_BASE,
+   0,
+   U8500_CLKRST5_BASE,
+   U8500_CLKRST6_BASE,
+   U8500_CLKRST7_BASE, /* ED only */
+};
+
+/* Turn on peripheral clock at PRCC level */
+void u8500_clock_enable(int periph, int cluster, int kern)
+{
+   struct clkrst *clkrst = (struct clkrst *) clkrst_base[periph - 1];
+
+   if (kern != -1)
+   writel(1 << kern, &clkrst->kcken);
+
+   if 

[U-Boot] [PATCHv4 3/4] I2C: Add driver for ST-Ericsson U8500 i2c

2011-04-19 Thread John Rigby
From: Michael Brandt 

Signed-off-by: John Rigby 
CC: Heiko Schocher 
---
v2: Incorporate suggestions from Heiko Schocher
v3: Fix line length problem reported by Heiko Schocher
v4: No changes just rebased to latest and included for completeness
 drivers/i2c/Makefile|1 +
 drivers/i2c/u8500_i2c.c |  613 +++
 drivers/i2c/u8500_i2c.h |  194 +++
 3 files changed, 808 insertions(+), 0 deletions(-)
 create mode 100644 drivers/i2c/u8500_i2c.c
 create mode 100644 drivers/i2c/u8500_i2c.h

diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 052fe36..43507fc 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -40,6 +40,7 @@ COBJS-$(CONFIG_S3C44B0_I2C) += s3c44b0_i2c.o
 COBJS-$(CONFIG_SOFT_I2C) += soft_i2c.o
 COBJS-$(CONFIG_SPEAR_I2C) += spr_i2c.o
 COBJS-$(CONFIG_TSI108_I2C) += tsi108_i2c.o
+COBJS-$(CONFIG_U8500_I2C) += u8500_i2c.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/i2c/u8500_i2c.c b/drivers/i2c/u8500_i2c.c
new file mode 100644
index 000..ea8a71d
--- /dev/null
+++ b/drivers/i2c/u8500_i2c.c
@@ -0,0 +1,613 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2010
+ *
+ * Basic U-Boot I2C interface for STn8500/DB8500
+ * Author: Michael Brandt  for ST-Ericsson
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/*
+ * Only 7-bit I2C device addresses are supported.
+ */
+
+#include 
+#include 
+
+#include "u8500_i2c.h"
+#include 
+#include 
+
+#define U8500_I2C_ENDAD_COUNTER(CONFIG_SYS_HZ/100) /* I2C bus 
timeout */
+#define U8500_I2C_FIFO_FLUSH_COUNTER   50  /* flush "timeout" */
+#define U8500_I2C_SCL_FREQ 10  /* I2C bus clock freq */
+#define U8500_I2C_INPUT_FREQ   4800/* Input clock freq */
+#define TX_FIFO_THRESHOLD  0x4
+#define RX_FIFO_THRESHOLD  0x4
+#define SLAVE_SETUP_TIME 14 /* Slave data setup time, 250ns for 48MHz i2c_clk 
*/
+
+#define WRITE_FIELD(var, mask, shift, value) \
+   (var = ((var & ~(mask)) | ((value) << (shift
+
+static unsigned int bus_initialized[CONFIG_SYS_U8500_I2C_BUS_MAX];
+static unsigned int i2c_bus_num;
+static unsigned int i2c_bus_speed[] = {
+   CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SPEED,
+   CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SPEED
+};
+static struct u8500_i2c_regs *i2c_dev[] = {
+   (struct u8500_i2c_regs *)CONFIG_SYS_U8500_I2C0_BASE,
+   (struct u8500_i2c_regs *)CONFIG_SYS_U8500_I2C1_BASE,
+   (struct u8500_i2c_regs *)CONFIG_SYS_U8500_I2C2_BASE,
+   (struct u8500_i2c_regs *)CONFIG_SYS_U8500_I2C3_BASE,
+};
+
+static struct {
+   int periph;
+   int pcken;
+   int kcken;
+} i2c_clock_bits[] = {
+   {3, 3, 3}, /* I2C0 */
+   {1, 2, 2}, /* I2C1 */
+   {1, 6, 6}, /* I2C2 */
+   {2, 0, 0}, /* I2C3 */
+};
+
+static void i2c_set_bit(void *reg, u32 mask)
+{
+   writel(readl(reg) | mask, reg);
+}
+
+static void i2c_clr_bit(void *reg, u32 mask)
+{
+   writel(readl(reg) & ~mask, reg);
+}
+
+static void i2c_write_field(void *reg, u32 mask, uint shift, u32 value)
+{
+   writel((readl(reg) & ~mask) | (value << shift), reg);
+}
+
+static int __i2c_set_bus_speed(unsigned int speed)
+{
+   u32 value;
+   struct u8500_i2c_regs *i2c_regs;
+
+   i2c_regs = i2c_dev[i2c_bus_num];
+
+   /* Select standard (100 kbps) speed mode */
+   i2c_write_field(&i2c_regs->cr, U8500_I2C_CR_SM,
+   U8500_I2C_CR_SHIFT_SM, 0x0);
+
+   /*
+* Set the Baud Rate Counter 2 value
+* Baud rate (standard) = fi2cclk / ( (BRCNT2 x 2) + Foncycle )
+* Foncycle = 0 (no digital filtering)
+*/
+   value = (u32) (U8500_I2C_INPUT_FREQ / (speed * 2));
+   i2c_write_field(&i2c_regs->brcr, U8500_I2C_BRCR_BRCNT2,
+   U8500_I2C_BRCR_SHIFT_BRCNT2, value);
+
+   /* ensure that BRCNT value is zero */
+   i2c_write_field(&i2c_regs->brcr, U8500_I2C_BRCR_BRCNT1,
+   U8500_I2C_BRCR_SHIFT_BRCNT1, 0);
+
+   return U8500_I2C_INPUT_FREQ/(value * 2);
+}
+
+/*
+ * i2c_init - initialize the i2c bus
+ *
+ * speed: bus speed (in HZ)
+ * slaveaddr: address of device in slave mode
+ *
+ * Slave mode is not implemented.
+ */
+void i2c_init(int speed, int slaveaddr)
+{
+   struct u85

[U-Boot] [PATCHv4 1/4] Serial: p1011: new vendor init options

2011-04-19 Thread John Rigby
Two new options:

CONFIG_PL011_SERIAL_RLCR

Some vendor versions of PL011 serial ports (e.g. ST-Ericsson U8500)
have separate receive and transmit line control registers.  Set
this variable to initialize the extra register.

CONFIG_PL011_SERIAL_FLUSH_ON_INIT

On some platforms (e.g. U8500) U-Boot is loaded by a second stage
boot loader that has already initialized the UART.  Define this
variable to flush the UART at init time.
empty fifo on init

Signed-off-by: John Rigby 
Signed-off-by: Rabin Vincent 
---
v2: No changes
v3: Enable changes with new CONFIG_* options instead of platform.
Document new CONFIG_* options in README.
v4: Added delay before writing to RLCR.
Removed Rabin as author at his request.

 README|   12 
 drivers/serial/serial_pl01x.c |   30 +++---
 drivers/serial/serial_pl01x.h |4 
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/README b/README
index 4917e26..496a428 100644
--- a/README
+++ b/README
@@ -468,6 +468,18 @@ The following options need to be configured:
define this to a list of base addresses for each (supported)
port. See e.g. include/configs/versatile.h
 
+   CONFIG_PL011_SERIAL_RLCR
+
+   Some vendor versions of PL011 serial ports (e.g. ST-Ericsson 
U8500)
+   have separate receive and transmit line control registers.  Set
+   this variable to initialize the extra register.
+
+   CONFIG_PL011_SERIAL_FLUSH_ON_INIT
+
+   On some platforms (e.g. U8500) U-Boot is loaded by a second 
stage
+   boot loader that has already initialized the UART.  Define this
+   variable to flush the UART at init time.
+
 
 - Console Interface:
Depending on board, define exactly one serial port
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 5dfcde8..7a064ff 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -111,6 +111,15 @@ int serial_init (void)
unsigned int divider;
unsigned int remainder;
unsigned int fraction;
+   unsigned int lcr;
+
+#ifdef CONFIG_PL011_SERIAL_FLUSH_ON_INIT
+   /* Empty RX fifo if necessary */
+   if (readl(®s->pl011_cr) & UART_PL011_CR_UARTEN) {
+   while (!(readl(®s->fr) & UART_PL01x_FR_RXFE))
+   readl(®s->dr);
+   }
+#endif
 
/* First, disable everything */
writel(0, ®s->pl011_cr);
@@ -131,9 +140,24 @@ int serial_init (void)
writel(fraction, ®s->pl011_fbrd);
 
/* Set the UART to be 8 bits, 1 stop bit, no parity, fifo enabled */
-   writel(UART_PL011_LCRH_WLEN_8 | UART_PL011_LCRH_FEN,
-  ®s->pl011_lcrh);
-
+   lcr = UART_PL011_LCRH_WLEN_8 | UART_PL011_LCRH_FEN;
+   writel(lcr, ®s->pl011_lcrh);
+
+#ifdef CONFIG_PL011_SERIAL_RLCR
+   {
+   int i;
+
+   /*
+* Program receive line control register after waiting
+* 10 bus cycles.  Delay be writing to readonly register
+* 10 times
+*/
+   for (i = 0; i < 10; i++)
+   writel(lcr, ®s->fr);
+
+   writel(lcr, ®s->pl011_rlcr);
+   }
+#endif
/* Finally, enable the UART */
writel(UART_PL011_CR_UARTEN | UART_PL011_CR_TXE | UART_PL011_CR_RXE,
   ®s->pl011_cr);
diff --git a/drivers/serial/serial_pl01x.h b/drivers/serial/serial_pl01x.h
index b670c24..96ee381 100644
--- a/drivers/serial/serial_pl01x.h
+++ b/drivers/serial/serial_pl01x.h
@@ -43,7 +43,11 @@ struct pl01x_regs {
u32 pl010_lcrl; /* 0x10 Line control register, low byte */
u32 pl010_cr;   /* 0x14 Control register */
u32 fr; /* 0x18 Flag register (Read only) */
+#ifdef CONFIG_PL011_SERIAL_RLCR
+   u32 pl011_rlcr; /* 0x1c Receive line control register */
+#else
u32 reserved;
+#endif
u32 ilpr;   /* 0x20 IrDA low-power counter register */
u32 pl011_ibrd; /* 0x24 Integer baud rate register */
u32 pl011_fbrd; /* 0x28 Fractional baud rate register */
-- 
1.7.1

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


Re: [U-Boot] [PATCH] PowerPC: Move -fPIC flag to common place

2011-04-19 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message 
 you 
wrote:
>
> > It seems this change increases the code size somehow - which I would
> > not expect from your comment above.  Please have a look.
> 
> Very strange, I had a quick look(that is all I can do ATM). It appers
> that 8xx is the only ppc arch which doesn't have its own u-boot.lds under
> arch/powerpc/cpu/mpc8xx, is that intentional? Is it only 8xx that has this
> problem?

I did not look closer, but it appears that these boards are all boards
that use an embedded environment, and thus their own, usually manually
tuned linker script.

> My guess would be that 8xx missed out on an earlier patch
> http://git.denx.de/?p=u-boot.git;a=commitdiff;h=337f5f50f539cc1ea1e0533c096e237228f12cae

Or, more correctly, that this patch failed to patch these boards.

Can you please provide a fix?  I'd like to get rid of this build error
ASAP.  We could, of course, simply revert these commits.

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
If God had a beard, he'd be a UNIX programmer.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/4] ARMV7: OMAP3: Add support for Comelit DIG297 board

2011-04-19 Thread Paulraj, Sandeep


> 
> Paulraj, Sandeep wrote:
> 
> >> Board support for the DIG297 board manufactured by Comelit Group SpA.
> >> It is a custom board based on the BeagleBoard
> by
> >> Texas Instruments.
> >> ...
> >
> > I'll apply this after you resend the patch
> >
> > ARMV7: OMAP3: Cleanup extern variables in mem.c
> >
> > --Sandeep
> Ok, but while rebasing these two patches, I'll have to re-add
> MACH_TYPE_OMAP3_CPS to
> mach-types.h, as it has just been removed.

I don't think you should modify the mach-types.h.


The mach types patch has not been formally accepted or rejected by Wolfgang or 
Albert.
As Wolfgang suggested for the time being you can send a dummy value like 0.

Or define something like CONFIG_MACH_TYPE_OMAP3_CPS in your config header and 
then use this value. 

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


Re: [U-Boot] [PATCH 00/15] [REWORK AVR32/AT91] additional changes for avr32

2011-04-19 Thread Reinhard Meyer
Dear Andreas Bießmann,
> Am 19.04.2011 um 17:49 schrieb Reinhard Meyer:
>
>> Dear Andreas Bießmann,
 Some of the patches did not apply. What did apply is now found in 
 u-boot-atmel/next2.

 I have no idea why they do not apply, since the AVR32 part has not changed 
 since 110202.
>>>
>>> I can check that and will rebase on u-boot-atmel/next.
>>
>> Applied to u-boot-atmel/next.
>>
>>> BTW I personally dislike your inflationary creation of new branches. The
>>> last days I could not understand why there are that much reworkXXX
>>> branches for AT91 stuff.
>>
>> Those have a date which reflect the u-boot-arm/master they were rebased 
>> onto. I rather only
>> remove them if and when all patches have been pulled into u-boot-arm (just 
>> in case).
>
> Ok, but changes to origin/master from 20101209 in rework101209 are not 
> included in rework101217? This would not make sense to me.

I said nothing like that.

>
>>> I hope only the one with latest timestamp is
>>> worth to work with. Isn't that reworked stuff already in next branch? Or
>>> are there some tasks not yet in next branch?
>>
>> Not all is in next, all changes I did to at9sam9260/9XE/9G20-ek and out own 
>> board (TOP9000)
>> are not yet in next, I had problems rebasing them to current 
>> u-boot-arm/master and not enough
>> time yet to fix that.
>
> Ok, I've got an at91sam9260ek here and like to get it working with current 
> mainline (plus the reworking stuff for at91 devices). Which branch should I 
> take? Which changes are worth to look at for 2011.06 regarding sam9260 
> devices or is it too late for that?

Top 2 patches in rework110202 should do the trick, once they are made to apply 
to current next.

best regards

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


Re: [U-Boot] Update and Cut down mach types

2011-04-19 Thread Michael Schwingen
Am 04/19/2011 04:21 PM, schrieb Wolfgang Denk:
> Dear =?ISO-8859-1?Q?Matthias_Wei=DFer?=,
>
> In message <4dad90af.2080...@arcor.de> you wrote:
>> This will break a least jadecpu. We don't use Linux on this board. When 
>> porting I was requested to reserve an MACH_ID just in case the board 
>> will ever be used with Linux. This has not been the case for this board. 
>> But I would like to have this board in the u-boot tree. What will be the 
>> solution for ARM but non-Linux u-boot ports then? What should be passed 
>> to gd->bd->bi_arch_number?
> I think you have two options:
>
> 1) Complain with RMK about the removal of yoru MACH_ID.  Explain to
>him that you use this elsewhere and ash to re-add it.

I did that and got the following reply (without quotes due to cut-and-paste)

cu
Michael


From: Russell King - ARM Linux

To: Michael Schwingen
  
Subject: Re: [U-Boot] Update and Cut down mach types - ACTUX* and
DVLHOST  
machines
removed   

What makes it into the kernel is determined by a script which is
based 
upon a couple of simple
rules:  
   


   

1. If the entry appears in a MACHINE_START() declaration in Linus'
kernel  
   tree (evaluated on a daily basis), it is kept in the
file.  
2. If the entry was created or modified in the database within the
last
   12
months. 
 


   

(2) gives people a way to refresh their entry to ensure that it stays
in   
the list in the mainline
kernel. 
  


[...]

The normal URL which you fetch the file from (as contained within the
file)
will give you the full listing rather than the cut-down version. 
There
really is no need for uboot to go picking the copy up from the
mainline
kernel. 


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


Re: [U-Boot] Update and Cut down mach types

2011-04-19 Thread Matthias Weisser
Hello Wolfgang

Am 19.04.2011 16:21, schrieb Wolfgang Denk:
> Dear =?ISO-8859-1?Q?Matthias_Wei=DFer?=,
>> solution for ARM but non-Linux u-boot ports then? What should be passed 
>> to gd->bd->bi_arch_number?
> 
> I think you have two options:
> 
> 1) Complain with RMK about the removal of yoru MACH_ID.  Explain to
>him that you use this elsewhere and ash to re-add it.

The point it that it makes no sense to add an MACH_ID to the database
for a board that probably will never run Linux.

> 2) If you don;t use Linux on that board, there will be no code who
>ever looks at bi_arch_number, so just pass a random number (like 0)
>there.

This approach was rejected in 2009 when I initially send patches for
this board. But I would like to go that way (adding a comment so that it
is clear what is going on) So, I expect that this is OK and I send a
patch then when time permits.

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


Re: [U-Boot] [PATCH 00/15] [REWORK AVR32/AT91] additional changes for avr32

2011-04-19 Thread Andreas Bießmann
Dear Reinhard Meyer,

Am 19.04.2011 um 17:49 schrieb Reinhard Meyer:

> Dear Andreas Bießmann,
>>> Some of the patches did not apply. What did apply is now found in 
>>> u-boot-atmel/next2.
>>> 
>>> I have no idea why they do not apply, since the AVR32 part has not changed 
>>> since 110202.
>> 
>> I can check that and will rebase on u-boot-atmel/next.
> 
> Applied to u-boot-atmel/next.
> 
>> BTW I personally dislike your inflationary creation of new branches. The
>> last days I could not understand why there are that much reworkXXX
>> branches for AT91 stuff.
> 
> Those have a date which reflect the u-boot-arm/master they were rebased onto. 
> I rather only
> remove them if and when all patches have been pulled into u-boot-arm (just in 
> case).

Ok, but changes to origin/master from 20101209 in rework101209 are not included 
in rework101217? This would not make sense to me.

>> I hope only the one with latest timestamp is
>> worth to work with. Isn't that reworked stuff already in next branch? Or
>> are there some tasks not yet in next branch?
> 
> Not all is in next, all changes I did to at9sam9260/9XE/9G20-ek and out own 
> board (TOP9000)
> are not yet in next, I had problems rebasing them to current 
> u-boot-arm/master and not enough
> time yet to fix that.

Ok, I've got an at91sam9260ek here and like to get it working with current 
mainline (plus the reworking stuff for at91 devices). Which branch should I 
take? Which changes are worth to look at for 2011.06 regarding sam9260 devices 
or is it too late for that?

best regards

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


Re: [U-Boot] [PATCH] avr32: add ATAG_BOARDINFO

2011-04-19 Thread Reinhard Meyer
Dear Wolfgang Denk,
> Dear Reinhard Meyer,
> 
> In message <4da6edab.8040...@emk-elektronik.de> you wrote:
>>
>>> Guess I have no other choice now, but you owe me a new keyboard.
>> I'm busy right now, but I will take this (and other stuff) in during the 
>> upcoming weekend.

Applied to u-boot-atmel/next.

Best Regards,

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


Re: [U-Boot] [PATCH v2 3/6] TFTP: rename "server" to "remote"

2011-04-19 Thread Detlev Zundel
Hi Luca,

[...]

>> Whitespace fix.
>
> checkpatch again.

Hm, I see.  Still, can we have one commit (with "cosmetic" in the
changelog) that silences checkpatch but does not have any functional
changes?  We really try hard to separate cosmetic from functional
changes.  This makes reviewing (and debugging) so much easier.

This is the second time that I personally encounter that problem and I
still don't see an automated way to take care of this.  This simply is
the result that checkpatch will flag only new errors when there are no
_old_ ones.  The reality of course looks different:

  [dzu@pollux u-boot-testing (master)]$ ../linux/scripts/checkpatch.pl -f 
net/net.c
  
  [...]
  
  total: 76 errors, 193 warnings, 1934 lines checked
  
  net/net.c has style problems, please review.  If any of these errors
  are false positives report them to the maintainer, see
  CHECKPATCH in MAINTAINERS.

If we strictly do require checkpatch cleanliness, maybe we should start
cleaning up the code base as is first with only cosmetic changes.  Do I
see volunteers? ;)

Cheers
  Detlev

-- 
Life is complex. It has real and imaginary components.
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH-V2 2/2] at91: reworked support for otc570 board

2011-04-19 Thread Reinhard Meyer
Am 18.04.2011 16:15, schrieb Daniel Gorsulowski:
> The otc570 board support was broken. Within this opportunity, I completely
> reworked the board files.
> 
> Signed-off-by: Daniel Gorsulowski 
> ---
> 
> This patch is based on u-boot-atmel/rework101229 branch (minus the last 5
> patches) plus the 'at91: fixed at91sam9263 system file' patch in
> u-boot-atmel/next branch.
> 
> V2: -fixed commit description
> 
>  board/esd/otc570/config.mk |1 -
>  board/esd/otc570/otc570.c  |  106 ++
>  boards.cfg |3 +-
>  include/configs/otc570.h   |  265 
> +---
>  4 files changed, 211 insertions(+), 164 deletions(-)
>  delete mode 100644 board/esd/otc570/config.mk

This patch had several places with  or .

I removed them manually. Please, next time run your patches through
/scripts/checkpatch.pl. Thanks.

Applied to u-boot-atmel/next.

Best Regards,

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


Re: [U-Boot] [PATCH-V2 1/2] at91: reworked support for meesc board

2011-04-19 Thread Reinhard Meyer
Dear Daniel Gorsulowski,
> The meesc board support was broken. Within this opportunity, I completely
> reworked the board files.
> 
> Signed-off-by: Daniel Gorsulowski 
> ---
> 
> This patch is based on u-boot-atmel/rework101229 branch (minus the last 5
> patches) plus the 'at91: fixed at91sam9263 system file' patch in
> u-boot-atmel/next branch.
> 
> V2: -fixed commit description
> 
>  board/esd/meesc/config.mk |1 -
>  board/esd/meesc/meesc.c   |   49 ++-
>  boards.cfg|3 +-
>  include/configs/meesc.h   |  208 
> ++---
>  4 files changed, 149 insertions(+), 112 deletions(-)
>  delete mode 100644 board/esd/meesc/config.mk

This patch had several places with  or .

I removed them manually. Please, next time run your patches through
/scripts/checkpatch.pl. Thanks.

Applied to u-boot-atmel/next.

Best Regards,

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


[U-Boot] [PATCHv3 2/2] MMC: omap_hsmmc.c: disable multiblock rw on old rev omap34xx silicon

2011-04-19 Thread John Rigby
Signed-off-by: John Rigby 
---
V3: use get_cpu_family and get_cpu_rev in test, previous patch also disabled
multiblock on beagle-xm

 drivers/mmc/omap_hsmmc.c |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index dcbde89..957b987 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -467,6 +467,14 @@ int omap_mmc_init(int dev_index)
 
mmc->b_max = 0;
 
+#if defined(CONFIG_OMAP34XX)
+   /*
+* Silicon revs 2.1 and older do not support multiblock transfers.
+*/
+   if ((get_cpu_family() == CPU_OMAP34XX) && (get_cpu_rev() <= 
CPU_3XX_ES21))
+   mmc->b_max = 1;
+#endif
+
mmc_register(mmc);
 
return 0;
-- 
1.7.1

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


Re: [U-Boot] [PATCH 00/15] [REWORK AVR32/AT91] additional changes for avr32

2011-04-19 Thread Reinhard Meyer
Dear Andreas Bießmann,
>> Some of the patches did not apply. What did apply is now found in 
>> u-boot-atmel/next2.
>>
>> I have no idea why they do not apply, since the AVR32 part has not changed 
>> since 110202.
> 
> I can check that and will rebase on u-boot-atmel/next.

Applied to u-boot-atmel/next.

> BTW I personally dislike your inflationary creation of new branches. The
> last days I could not understand why there are that much reworkXXX
> branches for AT91 stuff.

Those have a date which reflect the u-boot-arm/master they were rebased onto. I 
rather only
remove them if and when all patches have been pulled into u-boot-arm (just in 
case).

> I hope only the one with latest timestamp is
> worth to work with. Isn't that reworked stuff already in next branch? Or
> are there some tasks not yet in next branch?

Not all is in next, all changes I did to at9sam9260/9XE/9G20-ek and out own 
board (TOP9000)
are not yet in next, I had problems rebasing them to current u-boot-arm/master 
and not enough
time yet to fix that.

> I will rebase on u-boot-atmel/next, you can delete next2 branch, it
> makes no sense to me.

next2 is always temporary until next is moved to next2.

Best Regards,

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


Re: [U-Boot] [PATCH v2 3/6] TFTP: rename "server" to "remote"

2011-04-19 Thread Luca Ceresoli
Il 19/04/2011 16:18, Detlev Zundel ha scritto:
> Hi Luca,
>
>> With the upcoming TFTP server implementation, the remote node can be
>> either a client or a server, so avoid ambiguities.
>>
>> Signed-off-by: Luca Ceresoli
>> Cc: Wolfgang Denk
>> ---
>> Changes in v2:
>>   - fixed checkpatch issues.
>>
>>   net/tftp.c |   42 +-
>>   1 files changed, 21 insertions(+), 21 deletions(-)
>>
>> diff --git a/net/tftp.c b/net/tftp.c
>> index 00abec3..da545c6 100644
>> --- a/net/tftp.c
>> +++ b/net/tftp.c
>> @@ -55,18 +55,18 @@ enum {
>>  TFTP_ERR_FILE_ALREADY_EXISTS = 6,
>>   };
>>
>> -static IPaddr_t TftpServerIP;
>> -static int  TftpServerPort; /* The UDP port at their end
>> */
>> -static int  TftpOurPort;/* The UDP port at our end  
>> */
>> +static IPaddr_t TftpRemoteIP;
>> +static int  TftpRemotePort; /* The UDP port at their end*/
>> +static int  TftpOurPort;/* The UDP port at our end  */
>>   static int TftpTimeoutCount;
>> -static ulongTftpBlock;  /* packet sequence number   
>> */
>> -static ulongTftpLastBlock;  /* last packet sequence number 
>> received */
>> -static ulongTftpBlockWrap;  /* count of sequence number 
>> wraparounds */
>> -static ulongTftpBlockWrapOffset;/* memory offset due to 
>> wrapping*/
>> +static ulongTftpBlock;  /* packet sequence number   
>> */
>> +static ulongTftpLastBlock;  /* last packet sequence number received 
>> */
>> +static ulongTftpBlockWrap;  /* count of sequence number wraparounds 
>> */
>> +static ulongTftpBlockWrapOffset; /* memory offset due to wrapping   
>> */
> These changes are indentation only changes, so they should be in a
> separate patch.

It's needed for checkpatch compliance.


>>   static int TftpState;
>>   #ifdef CONFIG_TFTP_TSIZE
>> -static int  TftpTsize;  /* The file size reported by the server 
>> */
>> -static shortTftpNumchars;   /* The number of hashes we 
>> printed  */
>> +static int  TftpTsize;  /* The file size reported by the server */
>> +static shortTftpNumchars;   /* The number of hashes we printed  
>> */
> dito.
>
> [...]
>
>> @@ -421,7 +421,7 @@ TftpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, 
>> unsigned src,
>>
>>  /*
>>   *  Acknoledge the block just received, which will prompt
>> - *  the server for the next one.
>> + *  the remote for the next one.
> Hey, while you're at it, please fix the "Acknoledge" typo ;)

Will do.

> [...]
>
>> @@ -568,7 +568,7 @@ TftpStart (void)
>>  strncpy(tftp_filename, BootFile, MAX_LEN);
>>  tftp_filename[MAX_LEN-1] = 0;
>>  } else {
>> -TftpServerIP = string_to_ip (BootFile);
>> +TftpRemoteIP = string_to_ip(BootFile);
> Whitespace fix.

checkpatch again.

Luca

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


Re: [U-Boot] [PATCH v2 2/6] NET: pass source IP address to packet handlers

2011-04-19 Thread Luca Ceresoli
Il 19/04/2011 16:15, Detlev Zundel ha scritto:
> Hi Luca,
>
>> This is needed for the upcoming TFTP server implementation.
>>
>> This also simplifies PingHandler() and fixes rxhand_f documentation.
>>
>> Signed-off-by: Luca Ceresoli
>> Cc: Wolfgang Denk
>> ---
>> Changes in v2:
>>   - fixed checkpatch issues.
>>
>>   drivers/net/netconsole.c |5 +++--
>>   include/net.h|   15 ++-
>>   net/bootp.c  |9 ++---
>>   net/dns.c|2 +-
>>   net/net.c|   30 +-
>>   net/nfs.c|2 +-
>>   net/rarp.c   |3 ++-
>>   net/sntp.c   |3 ++-
>>   net/tftp.c   |3 ++-
>>   9 files changed, 44 insertions(+), 28 deletions(-)
>>
> [...]
>
>> diff --git a/net/net.c b/net/net.c
>> index a609632..132f99b 100644
>> --- a/net/net.c
>> +++ b/net/net.c
> [...]
>
>> @@ -1596,11 +1598,12 @@ NetReceive(volatile uchar * inpkt, int len)
>>   *  IP header OK.  Pass the packet to the 
>> current handler.
>>   */
>>  /* XXX point to ip packet */
>> -(*packetHandler)((uchar *)ip, 0, 0, 0);
>> +(*packetHandler)((uchar *)ip, 0, src_ip, 0, 0);
>>  return;
>>  case ICMP_ECHO_REQUEST:
>> -debug("Got ICMP ECHO REQUEST, return %d bytes 
>> \n",
>> -ETHER_HDR_SIZE + len);
>> +debug("Got ICMP ECHO REQUEST, "
>> +  "return %d bytes\n",
>> +  ETHER_HDR_SIZE + len);
>>
>>  memcpy (&et->et_dest[0],&et->et_src[0], 6);
>>  memcpy (&et->et_src[ 0], NetOurEther, 6);
> This second hunk is not related to the patch at hand, so strictly
> speaking it should not be in here.  It's not enough to NAK the patch
> however, just something to look out for in the future.

Yep, but it's needed for checkpatch compliance.

Luca


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


Re: [U-Boot] UEC phy not working on first try

2011-04-19 Thread Detlev Zundel
Hi,

> Hi all-
>
> I am using u-boot.2010.09 on a MPC8568-based board.
>
> When trying to boot over one of the UEC network interfaces, it is not
> working instantly. The cable is connected from the beginning, but I
> have to issue a manual 'boot' command, sometimes even multiple times
> before the link is correct. This is the output:

Do all the UEC interfaces show the same symptoms?

>
> [- snip -]
> Net:   UEC0, UEC1, UEC3 [PRIME], eTSEC0, eTSEC1
> Hit any key to stop autoboot:  0
> UEC: PHY is Generic MII (70431)
> UEC3: Full Duplex
> switching to rgmii 100
> UEC3: Speed 100BT
> UEC3: Link is up
> UEC3: Link is down


The driver "thinks" the link went away again.  When the cable is
connected all the time, then this is an indication of something going
wrong.  You should try to diagnose, why the software gets this link
change and if it really is an information that the phy provides, if the
physical path to the phy is stable.

Best wishes
  Detlev Zundel

-- 
 Those who do not understand Unix are condemned to reinvent it,
 poorly.
 - Henry Spencer, University of Toronto Unix hack
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/4] ARMV7: OMAP3: Add support for Comelit DIG297 board

2011-04-19 Thread Luca Ceresoli
Paulraj, Sandeep wrote:

>> Board support for the DIG297 board manufactured by Comelit Group SpA.
>> It is a custom board based on the BeagleBoard  by
>> Texas Instruments.
>> ...
>
> I'll apply this after you resend the patch
>
> ARMV7: OMAP3: Cleanup extern variables in mem.c
>
> --Sandeep
Ok, but while rebasing these two patches, I'll have to re-add 
MACH_TYPE_OMAP3_CPS to
mach-types.h, as it has just been removed.

Luca


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


Re: [U-Boot] [PATCH v5] MX31: Introduce get_reset_cause()

2011-04-19 Thread Detlev Zundel
Hi Fabio,

> Signed-off-by: Fabio Estevam 
> ---
> Changes since v4:
> - Make get_reset_cause CPU specific code and no need to
> add any board specific call.
>
>  arch/arm/cpu/arm1136/mx31/generic.c |   29 -
>  1 files changed, 28 insertions(+), 1 deletions(-)

Thanks, this looks good.  Now all i.MX31 boards profit!

Acked-by: Detlev Zundel 

-- 
config LGUEST
If unsure, say N.  If curious, say M.  If masochistic, say Y.
 -- linux/drivers/lguest/Kconfig
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH,V2] JFFS2: accelerate scanning.

2011-04-19 Thread Detlev Zundel
Hi Baidu,

>  Syncs up with jffs2 in the linux kernel:
>  1/ Change DEFAULT_EMPTY_SCAN_SIZE from 4KB to 256 Bytes.
>  2/ If the 1KB data is 0xFF after the cleanmarker, skip
>  and scan the next sector.
>  3/ Change the buffer size from 4KB to 128KB which is the
>  common size of erase block.

There is no "common size of erase block".  Looking into the Linux code,
it uses "max(erase block size, 128k)" for its buffer to speed up reading
from NAND and the 128k seem to be a kmalloc limit.

So maybe a "increase buffer size from 4KiB to 128KiB to reduce number of
read operations" would be more fitting.  By the way, does this change
contribute to the performance increase at all, or is the increase simply
due to DEFAULT_EMPTY_SCAN_SIZE?

Also as for the other patch, can you split the commit into the
individual changes corresponding to the list items?  In this way, one
could also easily measure which change really speeds up the operation...

Thanks!
  Detlev

-- 
It is practically impossible to teach good programming to students that have
had a  prior exposure to BASIC:  as potential  programmers they are mentally
mutilated beyond hope of regeneration.-- Edsger Dijkstra 
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V2] JFFS2: bug fix for summary support.

2011-04-19 Thread Detlev Zundel
Hi Baidu,

>  This patch fixes some issues with JFFS2 summary support in U-Boot.
>  1/ Bug fix for summary support: we need to get the latest DIRENT.
>  For example, if you create a file in linux jffs2 which config summary
>  support, then you delete the file , you will not see the file  in
>  linux jffs2. But you can also see this file in uboot after you reset
>  the system. That is because all the nodes in jffs2 which config summary
>  will not be marked as obsolete. The deleted file's DIRENT node will be
>  seen in uboot. So what we need to do is to get the latest DIRENT whose
>  ino in DIRENT is 0. Than we will not see this file in uboot which is
>  what we want.
>  2/ Add CONFIG_SYS_JFFS2_SORT_FRAGMENTS definition,if we config jffs2
>  summary in uboot.
>  3/ Avoid allocate too big memory if the biggest file in JFFS2 is too
>  long. We only allocate one node size for pL->readbuf.
>  For example, if the biggest file in the jffs2 is 15MB in the 16MB jffs2
>  system. Our previous code will allocate a buffer(pL->readbuf) as 15MB
>  length.
>  4/ Improve error checking in the scanning.

I missed saying this explicitely in my first review that we should
strive to isolate changes into single commits.  As you have added even
more changes into a single commit this has now become somewhat
untolerable.  Please split into individual functional changes (git add
-i can work wonders here), i.e. the list items in the changelog should
become individual commits.

This also includes the added WATCHDOG_RESET not mentioned in the
changelog at all ;)

> Changes for v2:
>   - Add detail description for the patch.

Are you sure you only changed the description?  The diffstat from this
and the last time disagree - this time:

> ---
>  fs/jffs2/jffs2_1pass.c  |   60 +-
>  fs/jffs2/jffs2_nand_1pass.c |   28 +++-
>  include/jffs2/jffs2.h   |   10 +++
>  3 files changed, 67 insertions(+), 31 deletions(-)

Last time:

>  fs/jffs2/jffs2_1pass.c  |   53 +-
>  fs/jffs2/jffs2_nand_1pass.c |   24 ++-
>  include/jffs2/jffs2.h   |   11 +
>  3 files changed, 60 insertions(+), 28 deletions(-)

Looking over the changes, I do _see_ changes in code, so you should tell
us about them.

> [...]

> diff --git a/include/jffs2/jffs2.h b/include/jffs2/jffs2.h
> index 651f94c..5b006c0 100644
> --- a/include/jffs2/jffs2.h
> +++ b/include/jffs2/jffs2.h
> @@ -41,6 +41,16 @@
>  #include 
>  #include 
>  
> +#ifdef CONFIG_JFFS2_SUMMARY
> +#ifndef CONFIG_SYS_JFFS2_SORT_FRAGMENTS
> +/*
> +we should define CONFIG_SYS_JFFS2_SORT_FRAGMENTS,if
> +CONFIG_JFFS2_SUMMARY is enabled.
> +*/
> +#define CONFIG_SYS_JFFS2_SORT_FRAGMENTS
> +#endif
> +#endif
> +
>  #define JFFS2_SUPER_MAGIC 0x72b6
>  
>  /* Values we may expect to find in the 'magic' field */

I liked the previous version better:

> diff --git a/include/jffs2/jffs2.h b/include/jffs2/jffs2.h
> index 651f94c..c01a76e 100644
> --- a/include/jffs2/jffs2.h
> +++ b/include/jffs2/jffs2.h
> @@ -41,6 +41,17 @@
>  #include 
>  #include 
>  
> +#ifdef CONFIG_JFFS2_SUMMARY
> +#ifndef CONFIG_SYS_JFFS2_SORT_FRAGMENTS
> +/*
> + *   if we define summary in jffs2, we also need to define 
> + *   CONFIG_SYS_JFFS2_SORT_FRAGMENTS. If not, the data in latest inode may 
> be 
> + *  overwritten by the old one.
> +*/
> +#error "need to define CONFIG_SYS_JFFS2_SORT_FRAGMENTS,if summary is enabled"
> +#endif
> +#endif
> +
>  #define JFFS2_SUPER_MAGIC 0x72b6

Why did you change this to the worse?

Cheers
  Detlev

-- 
Q: Why did the chicken cross the Moebius strip?
A: To get to the other ... er, um ...
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 6/6] TFTP: add tftpsrv command

2011-04-19 Thread Detlev Zundel
Hi Luca,

> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2: none.

Acked-by: Detlev Zundel 

-- 
I have always observed that the pretensions of all people are in
exact inverse ratio to their merits; this is one of the axioms of
morals.-- Joseph Lagrange
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 5/6] TFTP: net/tftp.c: add server mode receive

2011-04-19 Thread Detlev Zundel
Hi Luca,

> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2: none.

Only one comment below

>
>  net/tftp.c |   72 ---
>  net/tftp.h |6 +
>  2 files changed, 74 insertions(+), 4 deletions(-)
>
> diff --git a/net/tftp.c b/net/tftp.c
> index e166a63..87eb0b8 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -2,6 +2,8 @@
>   *   Copyright 1994, 1995, 2000 Neil Russell.
>   *   (See License)
>   *   Copyright 2000, 2001 DENX Software Engineering, Wolfgang Denk, 
> w...@denx.de
> + *   Copyright 2011 Comelit Group SpA,
> + *  Luca Ceresoli 
>   */
>  
>  #include 
> @@ -74,6 +76,7 @@ static shortTftpNumchars;   /* The number of hashes 
> we printed  */
>  #define STATE_TOO_LARGE  3
>  #define STATE_BAD_MAGIC  4
>  #define STATE_OACK   5
> +#define STATE_RECV_WRQ   6
>  
>  #define TFTP_BLOCK_SIZE  512 /* default TFTP 
> block size  */
>  #define TFTP_SEQUENCE_SIZE   ((ulong)(1<<16))/* sequence number is 16 
> bit */
> @@ -241,6 +244,10 @@ TftpSend (void)
>   TftpBlock=ext2_find_next_zero_bit(Bitmap,(Mapsize*8),0);
>   /*..falling..*/
>  #endif
> +
> +#ifdef CONFIG_CMD_TFTPSRV
> + case STATE_RECV_WRQ:
> +#endif
>   case STATE_DATA:
>   xp = pkt;
>   s = (ushort *)pkt;
> @@ -293,7 +300,11 @@ TftpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, 
> unsigned src,
>  #endif
>   return;
>   }
> - if (TftpState != STATE_SEND_RRQ && src != TftpRemotePort)
> + if (TftpState != STATE_SEND_RRQ &&
> +#ifdef CONFIG_CMD_TFTPSRV
> + TftpState != STATE_RECV_WRQ &&
> +#endif
> + src != TftpRemotePort)
>   return;

Hm, I have to admit that I do not really like adding so many ifdefs into
the tftp code and even into the state machine code.  Can you give me a
number on how much larger u-boot gets on your platform with and without
the server support?  If this is not too much, maybe we should include
support always.  If it is too much, maybe we can at least keep the state
machine without ifdefs - if I see it correctly, this will only add at
maximum a few bytes and STATE_RECW_WRQ will simply never be entered,
correct?

Cheers
  Detlev

-- 
Zivilisation ist der Zaubertrick, der uns unsere wahre Natur verbirgt.
-- Salman Rushdie
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 4/6] TFTP: rename STATE_RRQ to STATE_SEND_RRQ

2011-04-19 Thread Detlev Zundel
Hi Luca,

> With the upcoming TFTP server implementation, requests can be either
> outgoing or incoming, so avoid ambiguities.
>
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2: none.

Acked-by: Detlev Zundel 

-- 
We can forgive a man for making a useful thing as long as he does not
admire it.  The only excuse  for making  a useless  thing is that one
admires it intensely.
--- Oscar Wilde
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Update and Cut down mach types

2011-04-19 Thread Wolfgang Denk
Dear =?ISO-8859-1?Q?Matthias_Wei=DFer?=,

In message <4dad90af.2080...@arcor.de> you wrote:
>
> This will break a least jadecpu. We don't use Linux on this board. When 
> porting I was requested to reserve an MACH_ID just in case the board 
> will ever be used with Linux. This has not been the case for this board. 
> But I would like to have this board in the u-boot tree. What will be the 
> solution for ARM but non-Linux u-boot ports then? What should be passed 
> to gd->bd->bi_arch_number?

I think you have two options:

1) Complain with RMK about the removal of yoru MACH_ID.  Explain to
   him that you use this elsewhere and ash to re-add it.

2) If you don;t use Linux on that board, there will be no code who
   ever looks at bi_arch_number, so just pass a random number (like 0)
   there.

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 became apparent that one reason why the Ice Giants were  known  as
the  Ice  Giants  was  because they were, well, giants. The other was
that they were made of ice.  -Terry Pratchett, _Sourcery_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 3/6] TFTP: rename "server" to "remote"

2011-04-19 Thread Detlev Zundel
Hi Luca,

> With the upcoming TFTP server implementation, the remote node can be
> either a client or a server, so avoid ambiguities.
>
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2:
>  - fixed checkpatch issues.
>
>  net/tftp.c |   42 +-
>  1 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/net/tftp.c b/net/tftp.c
> index 00abec3..da545c6 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -55,18 +55,18 @@ enum {
>   TFTP_ERR_FILE_ALREADY_EXISTS = 6,
>  };
>  
> -static IPaddr_t TftpServerIP;
> -static int   TftpServerPort; /* The UDP port at their end
> */
> -static int   TftpOurPort;/* The UDP port at our end  
> */
> +static IPaddr_t TftpRemoteIP;
> +static int   TftpRemotePort; /* The UDP port at their end*/
> +static int   TftpOurPort;/* The UDP port at our end  */
>  static int   TftpTimeoutCount;
> -static ulong TftpBlock;  /* packet sequence number   
> */
> -static ulong TftpLastBlock;  /* last packet sequence number received 
> */
> -static ulong TftpBlockWrap;  /* count of sequence number wraparounds 
> */
> -static ulong TftpBlockWrapOffset;/* memory offset due to wrapping
> */
> +static ulong TftpBlock;  /* packet sequence number   */
> +static ulong TftpLastBlock;  /* last packet sequence number received */
> +static ulong TftpBlockWrap;  /* count of sequence number wraparounds */
> +static ulong TftpBlockWrapOffset; /* memory offset due to wrapping   */

These changes are indentation only changes, so they should be in a
separate patch.

>  static int   TftpState;
>  #ifdef CONFIG_TFTP_TSIZE
> -static int   TftpTsize;  /* The file size reported by the server 
> */
> -static short TftpNumchars;   /* The number of hashes we printed  
> */
> +static int   TftpTsize;  /* The file size reported by the server */
> +static short TftpNumchars;   /* The number of hashes we printed  */

dito.

[...]

> @@ -421,7 +421,7 @@ TftpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, 
> unsigned src,
>  
>   /*
>*  Acknoledge the block just received, which will prompt
> -  *  the server for the next one.
> +  *  the remote for the next one.

Hey, while you're at it, please fix the "Acknoledge" typo ;)

[...]

> @@ -568,7 +568,7 @@ TftpStart (void)
>   strncpy(tftp_filename, BootFile, MAX_LEN);
>   tftp_filename[MAX_LEN-1] = 0;
>   } else {
> - TftpServerIP = string_to_ip (BootFile);
> + TftpRemoteIP = string_to_ip(BootFile);

Whitespace fix.

Apart from that, patch looks simple enough, so

Acked-by: Detlev Zundel 

-- 
14474011154664524427946373126085988481573677491474835889066354349131199152128
If you know why this number is perfect - you're probably a mathematician...
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 2/6] NET: pass source IP address to packet handlers

2011-04-19 Thread Detlev Zundel
Hi Luca,

> This is needed for the upcoming TFTP server implementation.
>
> This also simplifies PingHandler() and fixes rxhand_f documentation.
>
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2:
>  - fixed checkpatch issues.
>
>  drivers/net/netconsole.c |5 +++--
>  include/net.h|   15 ++-
>  net/bootp.c  |9 ++---
>  net/dns.c|2 +-
>  net/net.c|   30 +-
>  net/nfs.c|2 +-
>  net/rarp.c   |3 ++-
>  net/sntp.c   |3 ++-
>  net/tftp.c   |3 ++-
>  9 files changed, 44 insertions(+), 28 deletions(-)
>

[...]

> diff --git a/net/net.c b/net/net.c
> index a609632..132f99b 100644
> --- a/net/net.c
> +++ b/net/net.c

[...]

> @@ -1596,11 +1598,12 @@ NetReceive(volatile uchar * inpkt, int len)
>*  IP header OK.  Pass the packet to the 
> current handler.
>*/
>   /* XXX point to ip packet */
> - (*packetHandler)((uchar *)ip, 0, 0, 0);
> + (*packetHandler)((uchar *)ip, 0, src_ip, 0, 0);
>   return;
>   case ICMP_ECHO_REQUEST:
> - debug("Got ICMP ECHO REQUEST, return %d bytes 
> \n",
> - ETHER_HDR_SIZE + len);
> + debug("Got ICMP ECHO REQUEST, "
> +   "return %d bytes\n",
> +   ETHER_HDR_SIZE + len);
>  
>   memcpy (&et->et_dest[0], &et->et_src[0], 6);
>   memcpy (&et->et_src[ 0], NetOurEther, 6);

This second hunk is not related to the patch at hand, so strictly
speaking it should not be in here.  It's not enough to NAK the patch
however, just something to look out for in the future.

Apart from that the changes look good, so

Acked-by: Detlev Zundel 

-- 
LISP has  jokingly been  described as  "the most  intelligent way to  misuse a
computer".  I think that  description a great  compliment because it transmits
the full  flavour of  liberation:  it has assisted a number of our most gifted
fellow humans in thinking previously impossible thoughts. - Edsger W. Dijkstra
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/6] README: remove spurious line

2011-04-19 Thread Detlev Zundel
Hi Luca,

> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> ---
> Changes in v2: none.
>
>  README |1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/README b/README
> index 4917e26..b9b0fcb 100644
> --- a/README
> +++ b/README
> @@ -1299,7 +1299,6 @@ The following options need to be configured:
>   driver in use must provide a function: mcast() to join/leave a
>   multicast group.
>  
> - CONFIG_BOOTP_RANDOM_DELAY
>  - BOOTP Recovery Mode:
>   CONFIG_BOOTP_RANDOM_DELAY

Acked-by: Detlev Zundel 

-- 
debian is a prototype for a future version of emacs.
 -- Thien-Thi Nguyen in <7eekubiffq@ada2.unipv.it>
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 0/6] TFTP server

2011-04-19 Thread Detlev Zundel
Hi Luca,

> Hi,
> here's the tftpsrv patch series, with checkpatch warnings fixed.
> Only patches 2 and 3 are actually changed. Patch 1 is unchanged and patches 
> 4-6
> have been simply rebased.
>
> There are still a few checkpatch issues (!), though, that I think can be 
> ignored
> and I'm not going to fix unless there's a specific request.
>
> Here they are:
>
>> WARNING: consider using kstrto* in preference to simple_strtol
>> #125: FILE: net/tftp.c:619:
>> +TftpRemotePort = simple_strtol(ep, NULL, 10);
> Which is Linux-only
>
>> WARNING: do not add new typedefs
>> #61: FILE: include/net.h:367:
>> +typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, 
>> SNTP,
> Is a typedef *enum* considered bad in U-Boot?

For new code yes.  We (well at least I) much rather prefer to see what
type a variable is without looking up the typedef for it.

Cheers
  Detlev

-- 
Für jemanden, der in eine Religion geboren wurde, in der das Ringen um eine
einzige Seele ein Stafettenlauf über viele Jahrhunderte sein kann [..], hat
das Tempo des Christentums etwas Schwindelerregendes.   Wenn der Hinduismus
friedlich dahinfließt wie der Ganges,  dann ist das  Christentum Toronto in
der Rushhour.-- Yann Martel
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Please pull u-boot-ti/master

2011-04-19 Thread s-paulraj
The following changes since commit 75cb6fbe7293fbde04662124bf8f4dbef0dbce44:
  Albert Aribaud (1):
Merge remote-tracking branch 'u-boot-ti/master'

are available in the git repository at:

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

Alexander Holler (3):
  OMAP3: Change some USB related MUX values
  OMAP3: Add support for DPLL5 (usbhost)
  omap3_beagle: enable EHCI and USB storage.

Enric Balletbo i Serra (2):
  ARM: OMAP3: Revamp IGEP v2 default
  ARM: OMAP3: Revamp IGEP module default configuration

Luca Ceresoli (2):
  ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX
  ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions

 arch/arm/cpu/armv7/omap3/clock.c   |   20 +
 arch/arm/cpu/armv7/omap3/lowlevel_init.S   |   22 +
 arch/arm/cpu/armv7/start.S |2 +-
 arch/arm/include/asm/arch-omap3/clocks.h   |1 +
 arch/arm/include/asm/arch-omap3/clocks_omap3.h |   26 ++
 arch/arm/include/asm/arch-omap3/cpu.h  |   21 -
 arch/arm/include/asm/arch-omap3/ehci_omap3.h   |   58 +
 arch/arm/include/asm/arch-omap3/omap3-regs.h   |   95 +
 board/ti/beagle/beagle.c   |  106 
 board/ti/beagle/beagle.h   |   27 +++---
 include/configs/igep0020.h |   57 -
 include/configs/igep0030.h |   57 -
 include/configs/omap3_beagle.h |6 ++
 13 files changed, 469 insertions(+), 29 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-omap3/ehci_omap3.h
 create mode 100644 arch/arm/include/asm/arch-omap3/omap3-regs.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 4/4] ARMV7: OMAP3: Add support for Comelit DIG297 board

2011-04-19 Thread Paulraj, Sandeep


> 
> Board support for the DIG297 board manufactured by Comelit Group SpA.
> It is a custom board based on the BeagleBoard  by
> Texas Instruments.
> 
> The board support is based on the BeagleBoard implementation.
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> Cc: Albert Aribaud 
> Cc: Sandeep Paulraj 
> ---
> Changes in v2:
>  - renamed board from CPS to DIG297;
>  - fixed all (relevant) issues raised by checkpatch.pl;
>  - removed config.mk from board dir;
>  - fixed coding style;
>  - minor cleanups.
> 
> Changes in v3: none.
> 
> Changes in v4:
>  - MAKEALL: keep it sorted alphabetically;
>  - Fixed multiline comments;
>  - Use enable_gpmc_cs_config() to initialize GPMC for the LAN chip;
>  - Remove useless #ifdef CONFIG_SMC911X;
>  - Fixed english translation;
>  - Removed "ro" flag from mtdparts;
>  - Updated prompt to board name ("DIG297# ").


I'll apply this after you resend the patch

ARMV7: OMAP3: Cleanup extern variables in mem.c

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


Re: [U-Boot] [PATCH v4 2/4] ARMV7: OMAP3: Cleanup extern variables in mem.c

2011-04-19 Thread Paulraj, Sandeep


> 
> Removed boot_flash_* extern variables.
> boot_flash_type was totally unused. The other ones were actually constants,
> so
> they have been replaced with #defines in the board config files.
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> Cc: Albert Aribaud 
> Cc: Sandeep Paulraj 
> ---
> Changes in v4:
>  - this patch is new in v4.
> 
>  arch/arm/cpu/armv7/omap3/mem.c  |   32 
>  include/configs/am3517_evm.h|   18 ++
>  include/configs/cm_t35.h|   16 +---
>  include/configs/devkit8000.h|   10 +-
>  include/configs/omap3_beagle.h  |   16 +---
>  include/configs/omap3_evm.h |   26 --
>  include/configs/omap3_overo.h   |   16 +---
>  include/configs/omap3_pandora.h |   16 +---
>  include/configs/omap3_sdp3430.h |   10 --
>  include/configs/omap3_zoom1.h   |   16 +---
>  include/configs/omap3_zoom2.h   |   16 +---
>  11 files changed, 49 insertions(+), 143 deletions(-)
> 


Can you please rebase with u-boot-ti?

Also there is a new board am 3517 crane

http://git.denx.de/?p=u-boot/u-boot-ti.git;a=commitdiff;h=29ffd724e25f0cf456d1971e8c1c6567ebbd4818

Can you include this in your patch as well?

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


Re: [U-Boot] [PATCH v4 3/4] ARMV7: OMAP3: Add GPMC_CONFIGx register value definitions

2011-04-19 Thread Paulraj, Sandeep


> 
> Signed-off-by: Luca Ceresoli 
> ---
> Changes in v4:
>  - this patch is new in v4.
> 
>  arch/arm/include/asm/arch-omap3/omap3-regs.h |   95
> ++
>  1 files changed, 95 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/include/asm/arch-omap3/omap3-regs.h
> 

Thanks

Pushed to u-boot-ti

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


[U-Boot] [PATCH 1/2] mmc: coding style fix and tabify of mmc.h

2011-04-19 Thread Thomas Chou
Signed-off-by: Thomas Chou 
---
for u-boot

 include/mmc.h |   44 ++--
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/include/mmc.h b/include/mmc.h
index e0a56d9..1a0d00a 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -14,7 +14,7 @@
  *
  * 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
+ * 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
@@ -94,14 +94,14 @@
 #define MMC_HS_TIMING  0x0100
 #define MMC_HS_52MHZ   0x2
 
-#define OCR_BUSY   0x8000
-#define OCR_HCS0x4000
+#define OCR_BUSY   0x8000
+#define OCR_HCS0x4000
 #define OCR_VOLTAGE_MASK   0x007FFF80
 #define OCR_ACCESS_MODE0x6000
 
 #define MMC_STATUS_MASK(~0x0206BF7F)
-#define MMC_STATUS_RDY_FOR_DATA (1<<8)
-#define MMC_STATUS_CURR_STATE  (0xf<<9)
+#define MMC_STATUS_RDY_FOR_DATA (1 << 8)
+#define MMC_STATUS_CURR_STATE  (0xf << 9)
 
 #define MMC_VDD_165_1950x0080  /* VDD voltage 1.65 - 
1.95 */
 #define MMC_VDD_20_21  0x0100  /* VDD voltage 2.0 ~ 2.1 */
@@ -147,12 +147,12 @@
  * EXT_CSD field definitions
  */
 
-#define EXT_CSD_CMD_SET_NORMAL (1<<0)
-#define EXT_CSD_CMD_SET_SECURE (1<<1)
-#define EXT_CSD_CMD_SET_CPSECURE   (1<<2)
+#define EXT_CSD_CMD_SET_NORMAL (1 << 0)
+#define EXT_CSD_CMD_SET_SECURE (1 << 1)
+#define EXT_CSD_CMD_SET_CPSECURE   (1 << 2)
 
-#define EXT_CSD_CARD_TYPE_26   (1<<0)  /* Card can run at 26MHz */
-#define EXT_CSD_CARD_TYPE_52   (1<<1)  /* Card can run at 52MHz */
+#define EXT_CSD_CARD_TYPE_26   (1 << 0)/* Card can run at 26MHz */
+#define EXT_CSD_CARD_TYPE_52   (1 << 1)/* Card can run at 52MHz */
 
 #define EXT_CSD_BUS_WIDTH_10   /* Card is in 1 bit mode */
 #define EXT_CSD_BUS_WIDTH_41   /* Card is in 4 bit mode */
@@ -162,21 +162,21 @@
 #define R1_APP_CMD (1 << 5)
 
 #define MMC_RSP_PRESENT (1 << 0)
-#define MMC_RSP_136 (1 << 1)/* 136 bit response */
-#define MMC_RSP_CRC (1 << 2)/* expect valid crc */
-#define MMC_RSP_BUSY(1 << 3)/* card may send busy */
-#define MMC_RSP_OPCODE  (1 << 4)/* response contains opcode */
+#define MMC_RSP_136(1 << 1)/* 136 bit response */
+#define MMC_RSP_CRC(1 << 2)/* expect valid crc */
+#define MMC_RSP_BUSY   (1 << 3)/* card may send busy */
+#define MMC_RSP_OPCODE (1 << 4)/* response contains opcode */
 
-#define MMC_RSP_NONE(0)
-#define MMC_RSP_R1  (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_NONE   (0)
+#define MMC_RSP_R1 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
 #define MMC_RSP_R1b(MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE| \
MMC_RSP_BUSY)
-#define MMC_RSP_R2  (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
-#define MMC_RSP_R3  (MMC_RSP_PRESENT)
-#define MMC_RSP_R4  (MMC_RSP_PRESENT)
-#define MMC_RSP_R5  (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
-#define MMC_RSP_R6  (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
-#define MMC_RSP_R7  (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R2 (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC)
+#define MMC_RSP_R3 (MMC_RSP_PRESENT)
+#define MMC_RSP_R4 (MMC_RSP_PRESENT)
+#define MMC_RSP_R5 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
 
 
 struct mmc_cid {
-- 
1.7.1.86.g0e460

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


[U-Boot] [PATCH 2/2] mmc_spi: generate response for send status command

2011-04-19 Thread Thomas Chou
A "send status" command is added with the commit "mmc: checking
status after commands with R1b response". But the status register
returned from send status command of SPI protocol is different from
that of MMC/SD protocol. We do a simple test and generate a response
in stead of full bit-by-bit translation.

Signed-off-by: Thomas Chou 
---
for u-boot

 drivers/mmc/mmc_spi.c |5 +
 include/mmc.h |1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index dc7574c..49fb9e0 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -208,6 +208,11 @@ static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd 
*cmd,
cmd->response[0] = swab32(cmd->response[0]);
debug("r32 %x\n", cmd->response[0]);
break;
+   case MMC_CMD_SEND_STATUS:
+   spi_xfer(spi, 1 * 8, NULL, cmd->response, 0);
+   cmd->response[0] = (cmd->response[0] & 0xff) ?
+   MMC_STATUS_ERROR : MMC_STATUS_RDY_FOR_DATA;
+   break;
}
} else {
debug("%s:data %x %x %x\n", __func__,
diff --git a/include/mmc.h b/include/mmc.h
index 1a0d00a..f502d86 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -102,6 +102,7 @@
 #define MMC_STATUS_MASK(~0x0206BF7F)
 #define MMC_STATUS_RDY_FOR_DATA (1 << 8)
 #define MMC_STATUS_CURR_STATE  (0xf << 9)
+#define MMC_STATUS_ERROR   (1 << 19)
 
 #define MMC_VDD_165_1950x0080  /* VDD voltage 1.65 - 
1.95 */
 #define MMC_VDD_20_21  0x0100  /* VDD voltage 2.0 ~ 2.1 */
-- 
1.7.1.86.g0e460

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


Re: [U-Boot] [PATCH v4 1/4] ARMV7: OMAP3: Fix preprocessor check for CONFIG_OMAP34XX

2011-04-19 Thread Paulraj, Sandeep


> 
> CONFIG_OMAP34XX must be checked for existence, not value.
> 
> Signed-off-by: Luca Ceresoli 
> Cc: Wolfgang Denk 
> Cc: Albert Aribaud 
> Cc: Sandeep Paulraj 
> ---
Thanks

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


Re: [U-Boot] Update and Cut down mach types

2011-04-19 Thread Paulraj, Sandeep


> 
> Hello Sandeep, Wolfgang
> 
> Am 19.04.2011 14:42, schrieb Paulraj, Sandeep:
> > Wolfgang, Albert,
> >
> > Russell King sent some updates to the linux kernel for mach-types.
> >
> > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-
> 2.6.git;a=commitdiff;h=6f82f4db80189281a8ac42f2e72396accb719b57
> >
> >  He also removed a lot of entries which never made it to mainline.
> >
> > I have a patch and it is the branch below
> >
> > http://git.denx.de/?p=u-boot/u-boot-
> ti.git;a=shortlog;h=refs/heads/update-mach-types
> >
> > Please review and if it is acceptable to everyone then we should
> > apply this patch to remain in sync with the mainline kernel.
> 
> This will break a least jadecpu.
> We don't use Linux on this board. When
> porting I was requested to reserve an MACH_ID just in case the board
> will ever be used with Linux. This has not been the case for this board.
> But I would like to have this board in the u-boot tree.

We are not removing this board from u-boot

> What will be the
> solution for ARM but non-Linux u-boot ports then? What should be passed
> to gd->bd->bi_arch_number?

I'll defer to Wolfgang and Albert on this issue.

There are new boards and hence mach types being added.
Russell sent a patch that both added new mach IDs and removed many others.


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


Re: [U-Boot] Update and Cut down mach types

2011-04-19 Thread Matthias Weißer
Hello Sandeep, Wolfgang

Am 19.04.2011 14:42, schrieb Paulraj, Sandeep:
> Wolfgang, Albert,
>
> Russell King sent some updates to the linux kernel for mach-types.
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6f82f4db80189281a8ac42f2e72396accb719b57
>
>  He also removed a lot of entries which never made it to mainline.
>
> I have a patch and it is the branch below
>
> http://git.denx.de/?p=u-boot/u-boot-ti.git;a=shortlog;h=refs/heads/update-mach-types
>
> Please review and if it is acceptable to everyone then we should
> apply this patch to remain in sync with the mainline kernel.

This will break a least jadecpu. We don't use Linux on this board. When 
porting I was requested to reserve an MACH_ID just in case the board 
will ever be used with Linux. This has not been the case for this board. 
But I would like to have this board in the u-boot tree. What will be the 
solution for ARM but non-Linux u-boot ports then? What should be passed 
to gd->bd->bi_arch_number?

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


Re: [U-Boot] [PATCH 3/3] omap3_beagle: enable EHCI and USB storage.

2011-04-19 Thread Paulraj, Sandeep


> 
> The reset sequence/configuration for ehci is highly board specific,
> so this will be done in the source for the board, instead of
> introducing several CONFIG_* which would be needed to make those
> few lines in beagle.c usable across different OMAP boards.
> 
> Signed-off-by: Alexander Holler 
> ---

Thanks

Pushed to u-boot-ti.

In one patch I changed the patch subject line as it was too long.

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


Re: [U-Boot] [PATCHv2 0/2] ARM: OMAP3: Revamp IGEP default configuration

2011-04-19 Thread Paulraj, Sandeep


> 
> Hi,
> 
> This is the second version of patch series to revamp the default
> configuration
> for all IGEP boards. The purpose of these patches is use the boot script
> used
> in others OMAP3-based boards.
> 
> Tested on IGEP v2 board and IGEP module.
> 
> * changes since version 1:
>   * Fix nandboot: should be 'onenand read' instead of 'nand read'
>   * Also revamp default configuration on IGEP module
> 
> Enric Balletbo i Serra (2):
>   ARM: OMAP3: Revamp IGEP v2 default configuration
>   ARM: OMAP3: Revamp IGEP module default configuration

Thanks

Pushed to u-boot-ti

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


[U-Boot] Update and Cut down mach types

2011-04-19 Thread Paulraj, Sandeep

Wolfgang, Albert,

Russell King sent some updates to the linux kernel for mach-types.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6f82f4db80189281a8ac42f2e72396accb719b57

He also removed a lot of entries which never made it to mainline.

I have a patch and it is the branch below

http://git.denx.de/?p=u-boot/u-boot-ti.git;a=shortlog;h=refs/heads/update-mach-types


Please review and if it is acceptable to everyone then we should apply this 
patch to remain in sync with the mainline kernel.

Regards,
Sandeep

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


Re: [U-Boot] U-Boot Digest, Vol 35, Issue 28

2011-04-19 Thread ByteLee


于 4/19/11 4:25 PM, u-boot-requ...@lists.denx.de 写道:
> Send U-Boot mailing list submissions to
>   u-boot@lists.denx.de
>
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://lists.denx.de/mailman/listinfo/u-boot
> or, via email, send a message with subject or body 'help' to
>   u-boot-requ...@lists.denx.de
>
> You can reach the person managing the list at
>   u-boot-ow...@lists.denx.de
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of U-Boot digest..."
>
>
> Today's Topics:
>
> 1. [PATCH v2] S5P: GPIO Macro Values Corrected. (Chander Kashyap)
> 2. Ticket number: YG764T 854R (coca-c...@une-pmta04.une.net.co)
> 3. Re: [PATCH 1/2] Fix timer usage of the Atmel SPI dataflash
>driver (Reinhard Meyer)
> 4. Re: [PATCH 1/4] atmel_dataflash: remove use of
>get_timer_masked (Reinhard Meyer)
> 5. Re: [PATCH 2/3] avr32: fix linking (Reinhard Meyer)
> 6. Beagle mux config: nCS5 vs. DMAREQ2? (Orjan Friberg)
> 7. Re: [PATCH 1/3] ARM: don't panic if no flash is there
>(Albert ARIBAUD)
> 8. subscribe me to this list (Ratheendran R)
> 9. Re: subscribe me to this list (Anatolij Gustschin)
>10. Re: [PATCH 00/15] [REWORK AVR32/AT91] additional changes   for
>avr32 (Reinhard Meyer)
>11. Re: [PATCH 00/15] [REWORK AVR32/AT91] additional changes   for
>avr32 (Andreas Bie?mann)
>12. [PATCH V2 01/15] avr32/config.mk: simplify PLATFORM_RELFLAGS
>(Andreas Bie?mann)
>13. [PATCH V2 11/15] atngw100: move CONFIG_SYS_TEXT_BASE to
>header (Andreas Bie?mann)
>14. [PATCH V2 13/15] favr-32-ezkit: move CONFIG_SYS_TEXT_BASE  to
>header (Andreas Bie?mann)
>15. [PATCH V2 08/15] favr-32-ezkit: fix "#define  1"
>(Andreas Bie?mann)
>16. [PATCH V2 15/15] hammerhead: move CONFIG_SYS_TEXT_BASE to
>header (Andreas Bie?mann)
>17. [PATCH V2 07/15] atstk1006: fix "#define  1"
>(Andreas Bie?mann)
>18. [PATCH-V2 1/2] at91: reworked support for meesc board
>(Daniel Gorsulowski)
>19. [PATCH V2 09/15] hammerhead: fix "#define  1"
>(Andreas Bie?mann)
>20. [PATCH V2 03/15] atngw100: fix "#define  1" (Andreas Bie?mann)
>21. [PATCH V2 00/15] *** SUBJECT HERE *** (Andreas Bie?mann)
>22. [PATCH V2 04/15] atstk1002: fix "#define  1"
>(Andreas Bie?mann)
>23. [PATCH V2 10/15] mimc200: fix "#define  1" (Andreas Bie?mann)
>24. [PATCH V2 12/15] atstk100x: move CONFIG_SYS_TEXT_BASE to
>header (Andreas Bie?mann)
>25. [PATCH V2 05/15] atstk1003: fix "#define  1"
>(Andreas Bie?mann)
>26. [PATCH V2 06/15] atstk1004: fix "#define  1"
>(Andreas Bie?mann)
>27. [PATCH V2 14/15] mimc200: move CONFIG_SYS_TEXT_BASE to header
>(Andreas Bie?mann)
>28. [PATCH V2 02/15] avr32: use single linker script
>(Andreas Bie?mann)
>29. [PATCH-V2 2/2] at91: reworked support for otc570 board
>(Daniel Gorsulowski)
>30. Re: [Patch v1] ARMV7: AM3517/05: Add support for   CraneBoard.
>(Srinath R)
>31. [PATCHv2 1/2] MMC: make b_max unconditional (John Rigby)
>32. [PATCHv2 2/2] mmc: omap_hsmmc.c: disable multiblock rw on  old
>rev omap34xx silicon (John Rigby)
>33. [PATCH v2 0/6] TFTP server (Luca Ceresoli)
>34. [PATCH v2 1/6] README: remove spurious line (Luca Ceresoli)
>35. [PATCH v2 2/6] NET: pass source IP address to packet   handlers
>(Luca Ceresoli)
>36. [PATCH v2 3/6] TFTP: rename "server" to "remote" (Luca Ceresoli)
>37. [PATCH v2 4/6] TFTP: rename STATE_RRQ to STATE_SEND_RRQ
>(Luca Ceresoli)
>38. [PATCH v2 6/6] TFTP: add tftpsrv command (Luca Ceresoli)
>39. [PATCH v2 5/6] TFTP: net/tftp.c: add server mode receive
>(Luca Ceresoli)
>40. [PATCH] MX31: mx31pdk: Make the board name simpler.
>(Fabio Estevam)
>41. [PATCH v5] MX31: Introduce get_reset_cause() (Fabio Estevam)
>42. Re: [PATCH v4 2/5] Add Ethernet hardware MAC address
>framework to usbnet (Remy Bohmer)
>43. Loan Offer... (Norton Finance Loan)
>44. Re: [PATCH v4 1/5] Add support for SMSC95XX USB 2.0
>10/100MBit Ethernet Adapter (Wolfgang Denk)
>45. Re: [PATCH v4 2/5] Add Ethernet hardware MAC address
>framework to usbnet (Wolfgang Denk)
>46. Re: [PATCH v4 2/5] Add Ethernet hardware MAC address
>framework to usbnet (Wolfgang Denk)
>47. [PATCH] GPIO: Tegra2: add GPIO driver for Seaboard and
>Harmony (Tom Warren)
>48. Re: [PATCH] BeagleBoard: Added LED driver (Paulraj, Sandeep)
>49. Re: [PATCH v3] omap3_beagle: enable the use of a plain text
>file named uEnv.txt instead of boot.scr (Paulraj, Sandeep)
>50. Re: [PATCH v3] OMAP3: BeagleBoard: Enable pullups on i2c2.
>(Paulraj, Sandeep)
>51. Re: [PATCH v2] OMAP3: BeagleBoard: add xM rev B to ID table
> 

Re: [U-Boot] [PATCH v2] S5P: GPIO Macro Values Corrected.

2011-04-19 Thread Minkyu Kang
Dear Chander Kashyap,

On 18 April 2011 19:08, Chander Kashyap  wrote:
> S5PC2XX: Macro values for Pull Up and Driver Strength were wrong.
> S5PC1XX: Macro values for Driver Strength were wrong.
>
> Signed-off-by: Chander Kashyap 
> ---
>
> Changes for V2:
>        - Macro value order fixed.
>        - Added Changes for S5PC1XX.
>
>  arch/arm/include/asm/arch-s5pc1xx/gpio.h |    4 ++--
>  arch/arm/include/asm/arch-s5pc2xx/gpio.h |    7 +++
>  2 files changed, 5 insertions(+), 6 deletions(-)
>

applied to u-boot-samsung

Thanks
Minkyu Kang.
-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] S5P:SROM config code moved to s5p-common directory

2011-04-19 Thread Minkyu Kang
Dear Chander Kashyap

On 15 April 2011 14:05, Chander Kashyap  wrote:
> SROM config code is made common for S5P series of boards.
> smdkc100.c now refers to s5p-common/sromc.c for SROM related
> subroutines.
>
> Signed-off-by: Chander Kashyap 
> ---
>  arch/arm/cpu/armv7/s5p-common/Makefile    |    3 +-
>  arch/arm/cpu/armv7/s5p-common/sromc.c     |   49 ++
>  arch/arm/cpu/armv7/s5pc1xx/Makefile       |    1 -
>  arch/arm/cpu/armv7/s5pc1xx/sromc.c        |   49 --
>  arch/arm/include/asm/arch-s5pc1xx/smc.h   |   53 
> -
>  arch/arm/include/asm/arch-s5pc1xx/sromc.h |   53 
> +
>  board/samsung/smdkc100/smdkc100.c         |    4 +-
>  7 files changed, 106 insertions(+), 106 deletions(-)
>  create mode 100644 arch/arm/cpu/armv7/s5p-common/sromc.c
>  delete mode 100644 arch/arm/cpu/armv7/s5pc1xx/sromc.c
>  delete mode 100644 arch/arm/include/asm/arch-s5pc1xx/smc.h
>  create mode 100644 arch/arm/include/asm/arch-s5pc1xx/sromc.h
>

applied to u-boot-samsung

Thanks
Minkyu Kang.
-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] Remove remnants of obsolete CONFIG_SYS_GBL_DATA_SIZE comments

2011-04-19 Thread Michael Jones
commit 25ddd1fb0a2281b182529afbc8fda5de2dc16d96 left remnants of
many comments about CONFIG_SYS_GBL_DATA_SIZE.

Signed-off-by: Michael Jones 
---
 include/configs/CPC45.h|3 ---
 include/configs/CU824.h|3 ---
 include/configs/MigoR.h|1 -
 include/configs/PCIPPC2.h  |3 ---
 include/configs/PCIPPC6.h  |3 ---
 include/configs/PMC405.h   |1 -
 include/configs/a320evb.h  |4 
 include/configs/actux1.h   |1 -
 include/configs/actux2.h   |1 -
 include/configs/actux3.h   |1 -
 include/configs/actux4.h   |1 -
 include/configs/am3517_evm.h   |1 -
 include/configs/ap325rxa.h |1 -
 include/configs/apollon.h  |1 -
 include/configs/at91rm9200ek.h |1 -
 include/configs/cm_t35.h   |1 -
 include/configs/devkit8000.h   |1 -
 include/configs/edminiv2.h |1 -
 include/configs/espt.h |1 -
 include/configs/galaxy5200.h   |2 --
 include/configs/imx27lite-common.h |1 -
 include/configs/ipek01.h   |2 --
 include/configs/km_arm.h   |2 --
 include/configs/mv-common.h|1 -
 include/configs/mx31pdk.h  |1 -
 include/configs/ns9750dev.h|1 -
 include/configs/omap3_beagle.h |1 -
 include/configs/omap3_evm.h|1 -
 include/configs/omap3_overo.h  |1 -
 include/configs/omap3_sdp3430.h|1 -
 include/configs/omap3_zoom1.h  |1 -
 include/configs/omap3_zoom2.h  |1 -
 include/configs/omap4_panda.h  |1 -
 include/configs/omap4_sdp4430.h|1 -
 include/configs/pcm030.h   |1 -
 include/configs/qong.h |1 -
 include/configs/r2dplus.h  |1 -
 include/configs/r7780mp.h  |1 -
 include/configs/s5p_goni.h |1 -
 include/configs/sbc8240.h  |3 ---
 include/configs/sc3.h  |1 -
 include/configs/sh7763rdp.h|1 -
 include/configs/smdkc100.h |1 -
 include/configs/tx25.h |1 -
 include/configs/versatile.h|1 -
 include/configs/vision2.h  |2 --
 46 files changed, 0 insertions(+), 63 deletions(-)

diff --git a/include/configs/CPC45.h b/include/configs/CPC45.h
index 6a88d26..17282aa 100644
--- a/include/configs/CPC45.h
+++ b/include/configs/CPC45.h
@@ -151,9 +151,6 @@
  * Definitions for initial stack pointer and data area
  */
 
-/* Size in bytes reserved for initial data
- */
-
 #define CONFIG_SYS_INIT_RAM_ADDR   0x4000
 #define CONFIG_SYS_INIT_RAM_SIZE   0x1000
 #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - 
GENERATED_GBL_DATA_SIZE)
diff --git a/include/configs/CU824.h b/include/configs/CU824.h
index a5c2ce5..e2229b0 100644
--- a/include/configs/CU824.h
+++ b/include/configs/CU824.h
@@ -139,9 +139,6 @@
  * Definitions for initial stack pointer and data area
  */
 
-   /* Size in bytes reserved for initial data
-*/
-
 #define CONFIG_SYS_INIT_RAM_ADDR 0x4000
 #define CONFIG_SYS_INIT_RAM_SIZE  0x1000
 #define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - 
GENERATED_GBL_DATA_SIZE)
diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h
index 7d9368c..812759d 100644
--- a/include/configs/MigoR.h
+++ b/include/configs/MigoR.h
@@ -99,7 +99,6 @@
 #define CONFIG_SYS_MONITOR_LEN (128 * 1024)
 /* Size of DRAM reserved for malloc() use */
 #define CONFIG_SYS_MALLOC_LEN  (256 * 1024)
-/* size in bytes reserved for initial data */
 #define CONFIG_SYS_BOOTMAPSZ   (8 * 1024 * 1024)
 
 /* FLASH */
diff --git a/include/configs/PCIPPC2.h b/include/configs/PCIPPC2.h
index e778c59..b2b94b4 100644
--- a/include/configs/PCIPPC2.h
+++ b/include/configs/PCIPPC2.h
@@ -138,9 +138,6 @@
  * Definitions for initial stack pointer and data area
  */
 
-/* Size in bytes reserved for initial data
- */
-
 #define CONFIG_SYS_INIT_RAM_ADDR 0x4000
 #define CONFIG_SYS_INIT_RAM_SIZE  0x8000
 #define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - 
GENERATED_GBL_DATA_SIZE)
diff --git a/include/configs/PCIPPC6.h b/include/configs/PCIPPC6.h
index 48911b7..c126605 100644
--- a/include/configs/PCIPPC6.h
+++ b/include/configs/PCIPPC6.h
@@ -140,9 +140,6 @@
  * Definitions for initial stack pointer and data area
  */
 
-/* Size in bytes reserved for initial data
- */
-
 #define CONFIG_SYS_INIT_RAM_ADDR 0x4000
 #define CONFIG_SYS_INIT_RAM_SIZE  0x8000
 #define CONFIG_SYS_GBL_DATA_OFFSET  (CONFIG_SYS_INIT_RAM_SIZE - 
GENERATED_GBL_DATA_SIZE)
diff --git a/include/configs/PMC405.h b/include/configs/PMC405.h
index c2db5ea..0f44e64 100644
--- a/include/configs/PMC405.h
+++ b/include/configs/PMC405.h
@@ -330,7 +330,6 @@
 /* End of used area in RAM */
 #define CONFIG_SYS_INIT_RAM_SIZE   CONFIG_SYS_OCM_DATA_SIZE
 
-/* size in bytes reserved for initial data */
 #define CONFIG_SYS_GBL_DATA_OFFSET 

[U-Boot] UEC phy not working on first try

2011-04-19 Thread DUNDA Matthias
Hi all-

I am using u-boot.2010.09 on a MPC8568-based board.

When trying to boot over one of the UEC network interfaces, it is not working 
instantly. The cable is connected from the beginning, but I have to issue a 
manual 'boot' command, sometimes even multiple times before the link is 
correct. This is the output:

[- snip -]
Net:   UEC0, UEC1, UEC3 [PRIME], eTSEC0, eTSEC1
Hit any key to stop autoboot:  0
UEC: PHY is Generic MII (70431)
UEC3: Full Duplex
switching to rgmii 100
UEC3: Speed 100BT
UEC3: Link is up
UEC3: Link is down
WARNING: adjusting available memory to 3000
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> boot
UEC3: Full Duplex
switching to rgmii 100
UEC3: Speed 100BT
UEC3: Link is up
Using UEC3 device
TFTP from server 10.169.15.10; our IP address is 10.169.15.9
Filename 'uImage'.
Load address: 0x2000
Loading: T #
 #
 ###
done
[...]
[- snip -]

Booting over the TSEC interfaces works without problems. Any idea what might be 
the problem?

Thanks
Matthias

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


[U-Boot] Status of ethernet support for Beagleboard xM ?

2011-04-19 Thread Bids O'Bids
Hi,

After browsing through the mailing list archives, I would like to know the
latest status for the (upcoming ?) support of ethernet on the Beagleboard
xM, to enable loading uimages through tftp.
As far as I understood, it was not yet supported as of February 2011,
potentially planned as part of GSoC this year, and some people potentially
had partial patches for this.

Any info on this topic would be greatly appreciated.

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


[U-Boot] Status of ethernet support for Beagleboard xM ?

2011-04-19 Thread Bids O'Bids
Hi,

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


[U-Boot] [PATCH 9/9] sync the buffer descriptor IO for coldfire FEC

2011-04-19 Thread Jason Jin
Some low-end ColdFire chip such as 5208 need more io sync
for FEC to work.

Signed-off-by: Jason Jin 
---
 drivers/net/mcffec.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index a08ff27..666b24e 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -160,6 +160,8 @@ int fec_send(struct eth_device *dev, volatile void *packet, 
int length)
info->txbd[info->txIdx].cbd_datlen = length;
info->txbd[info->txIdx].cbd_sc |= BD_ENET_TX_RDY_LST;
 
+   __asm__("tpf");
+
/* Activate transmit Buffer Descriptor polling */
fecp->tdar = 0x0100;/* Descriptor polling active*/
 
-- 
1.6.4


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


[U-Boot] [PATCH 8/9] Change the env settings for u-boot update

2011-04-19 Thread Jason Jin
The u-boot image size increased and the u-boot udpate
command should be adjusted to fit larger image.

Signed-off-by: Jason Jin 
---
 include/configs/M5329EVB.h |4 ++--
 include/configs/M5373EVB.h |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h
index 7ae0fad..3adcf4d 100644
--- a/include/configs/M5329EVB.h
+++ b/include/configs/M5329EVB.h
@@ -124,8 +124,8 @@
"u-boot=u-boot.bin\0"   \
"load=tftp ${loadaddr) ${u-boot}\0" \
"upd=run load; run prog\0"  \
-   "prog=prot off 0 2;"\
-   "era 0 2;"  \
+   "prog=prot off 0 3;"\
+   "era 0 3;"  \
"cp.b ${loadaddr} 0 ${filesize};"   \
"save\0"\
""
diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h
index 7086a1b..71b5af6 100644
--- a/include/configs/M5373EVB.h
+++ b/include/configs/M5373EVB.h
@@ -124,8 +124,8 @@
"u-boot=u-boot.bin\0"   \
"load=tftp ${loadaddr) ${u-boot}\0" \
"upd=run load; run prog\0"  \
-   "prog=prot off 0 2;"\
-   "era 0 2;"  \
+   "prog=prot off 0 3;"\
+   "era 0 3;"  \
"cp.b ${loadaddr} 0 ${filesize};"   \
"save\0"\
""
-- 
1.6.4


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


[U-Boot] [PATCH 7/9] ColdFire:Add mb for 5253 dram initialization

2011-04-19 Thread Jason Jin
The dram initialization sequence should be in order.
This patch add mb for the dram intialization code to make
sure the compiler do not disorder the code.

Signed-off-by: Jason Jin 
---
 arch/m68k/include/asm/io.h|2 ++
 board/freescale/m5253demo/m5253demo.c |4 
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h
index 531f420..d86eaf9 100644
--- a/arch/m68k/include/asm/io.h
+++ b/arch/m68k/include/asm/io.h
@@ -81,6 +81,8 @@
 #define outl(val, port)out_le32((u32 *)((port)+_IO_BASE), 
(val))
 #endif
 
+#define mb() __asm__ __volatile__ ("" : : : "memory")
+
 extern inline void _insb(volatile u8 * port, void *buf, int ns)
 {
u8 *data = (u8 *) buf;
diff --git a/board/freescale/m5253demo/m5253demo.c 
b/board/freescale/m5253demo/m5253demo.c
index 4772074..8ffb2cc 100644
--- a/board/freescale/m5253demo/m5253demo.c
+++ b/board/freescale/m5253demo/m5253demo.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 int checkboard(void)
 {
@@ -63,10 +64,12 @@ phys_size_t initdram(int board_type)
__asm__("nop");
 
mbar_writeLong(MCFSIM_DACR0, 0x322c);
+   mb();
__asm__("nop");
 
/* Write to this block to initiate precharge */
*(u32 *) (CONFIG_SYS_SDRAM_BASE) = 0xa5a5a5a5;
+   mb();
__asm__("nop");
 
/* Set RE bit in DACR */
@@ -83,6 +86,7 @@ phys_size_t initdram(int board_type)
__asm__("nop");
 
*(u32 *) (CONFIG_SYS_SDRAM_BASE + 0x800) = 0xa5a5a5a5;
+   mb();
}
 
return dramsize;
-- 
1.6.4


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


[U-Boot] [PATCH V2 5/9] Enable the dm9000 on ColdFire 5253DEMO board.

2011-04-19 Thread Jason Jin
commit a45dde2293c816138e53c26eca6fd0322583f9a6 changed the dm9000
direct register access to standard IO. This should work
on the ColdFire platform as there are corresponding macros for
the LE devices. But the hardware settings on M5253DEMO board had
swapped the byte order which make the original macros such as out_le16
cannot work. To avoid changing the common io access code on ColdFire
platform, the DM9000_BYTE_SWAPPED define added to make the dm9000 use
__raw* IO access on ColdFire M5253DEMO board.

Signed-off-by: Jason Jin 
---
 drivers/net/dm9000x.c   |   10 +-
 include/configs/M5253DEMO.h |1 +
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index 709f67a..22158de 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -116,13 +116,21 @@ static u8 DM9000_ior(int);
 static void DM9000_iow(int reg, u8 value);
 
 /* DM9000 network board routine  */
-
+#ifndef DM9000_BYTE_SWAPPED
 #define DM9000_outb(d,r) writeb(d, (volatile u8 *)(r))
 #define DM9000_outw(d,r) writew(d, (volatile u16 *)(r))
 #define DM9000_outl(d,r) writel(d, (volatile u32 *)(r))
 #define DM9000_inb(r) readb((volatile u8 *)(r))
 #define DM9000_inw(r) readw((volatile u16 *)(r))
 #define DM9000_inl(r) readl((volatile u32 *)(r))
+#else
+#define DM9000_outb(d, r) __raw_writeb(d, r)
+#define DM9000_outw(d, r) __raw_writew(d, r)
+#define DM9000_outl(d, r) __raw_writel(d, r)
+#define DM9000_inb(r) __raw_readb(r)
+#define DM9000_inw(r) __raw_readw(r)
+#define DM9000_inl(r) __raw_readl(r)
+#endif
 
 #ifdef CONFIG_DM9000_DEBUG
 static void
diff --git a/include/configs/M5253DEMO.h b/include/configs/M5253DEMO.h
index f2f3159..8120b68 100644
--- a/include/configs/M5253DEMO.h
+++ b/include/configs/M5253DEMO.h
@@ -95,6 +95,7 @@
 #  define DM9000_IOCONFIG_DM9000_BASE
 #  define DM9000_DATA  (CONFIG_DM9000_BASE + 4)
 #  undef CONFIG_DM9000_DEBUG
+#  define DM9000_BYTE_SWAPPED
 
 #  define CONFIG_OVERWRITE_ETHADDR_ONCE
 
-- 
1.6.4


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


[U-Boot] [PATCH 4/9] Clean up lds files for some ColdFire nommu chips

2011-04-19 Thread Jason Jin
The lds file for ColdFire boards need to clean up since commit
6d8962e814c15807dd6ac5757904be2a02d187b8 'Switch from archive
libraries to partial linking'.

Signed-off-by: Jason Jin 
---
 board/freescale/m5208evbe/u-boot.lds |3 ---
 board/freescale/m52277evb/u-boot.spa |3 ---
 board/freescale/m5253demo/u-boot.lds |4 
 board/freescale/m53017evb/u-boot.lds |2 --
 board/freescale/m5329evb/u-boot.lds  |4 
 board/freescale/m5373evb/u-boot.lds  |4 
 6 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/board/freescale/m5208evbe/u-boot.lds 
b/board/freescale/m5208evbe/u-boot.lds
index e5011a6..2bac566 100644
--- a/board/freescale/m5208evbe/u-boot.lds
+++ b/board/freescale/m5208evbe/u-boot.lds
@@ -56,9 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf52x2/start.o  (.text)
-arch/m68k/cpu/mcf52x2/libmcf52x2.o (.text)
-arch/m68k/lib/libm68k.o(.text)
-common/dlmalloc.o  (.text)
 
 . = DEFINED(env_offset) ? env_offset : .;
 common/env_embedded.o  (.text)
diff --git a/board/freescale/m52277evb/u-boot.spa 
b/board/freescale/m52277evb/u-boot.spa
index 4b710be..2872250 100644
--- a/board/freescale/m52277evb/u-boot.spa
+++ b/board/freescale/m52277evb/u-boot.spa
@@ -58,9 +58,6 @@ SECTIONS
 arch/m68k/cpu/mcf5227x/start.o (.text)
 arch/m68k/cpu/mcf5227x/libmcf5227x.o   (.text)
 arch/m68k/lib/libm68k.o(.text)
-lib/libgeneric.o   (.text)
-common/cmd_mem.o   (.text)
-common/main.o  (.text)
 
 . = DEFINED(env_offset) ? env_offset : .;
 common/env_embedded.o  (.text)
diff --git a/board/freescale/m5253demo/u-boot.lds 
b/board/freescale/m5253demo/u-boot.lds
index 3644838..279c5b9 100644
--- a/board/freescale/m5253demo/u-boot.lds
+++ b/board/freescale/m5253demo/u-boot.lds
@@ -56,10 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf52x2/start.o  (.text)
-arch/m68k/lib/traps.o  (.text)
-arch/m68k/cpu/mcf52x2/interrupts.o (.text)
-common/dlmalloc.o  (.text)
-lib/zlib.o (.text)
 
 . = DEFINED(env_offset) ? env_offset : .;
 common/env_embedded.o  (.text)
diff --git a/board/freescale/m53017evb/u-boot.lds 
b/board/freescale/m53017evb/u-boot.lds
index 445566b..69b57c5 100644
--- a/board/freescale/m53017evb/u-boot.lds
+++ b/board/freescale/m53017evb/u-boot.lds
@@ -58,8 +58,6 @@ SECTIONS
 arch/m68k/cpu/mcf532x/start.o  (.text)
 arch/m68k/cpu/mcf532x/libmcf532x.o (.text)
 arch/m68k/lib/libm68k.o(.text)
-common/dlmalloc.o  (.text)
-lib/zlib.o (.text)
 
 . = DEFINED(env_offset) ? env_offset : .;
 common/env_embedded.o  (.text)
diff --git a/board/freescale/m5329evb/u-boot.lds 
b/board/freescale/m5329evb/u-boot.lds
index 4375342..f267609 100644
--- a/board/freescale/m5329evb/u-boot.lds
+++ b/board/freescale/m5329evb/u-boot.lds
@@ -56,10 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf532x/start.o  (.text)
-arch/m68k/lib/traps.o  (.text)
-arch/m68k/lib/interrupts.o (.text)
-common/dlmalloc.o  (.text)
-lib/zlib.o (.text)
 
 . = DEFINED(env_offset) ? env_offset : .;
 common/env_embedded.o  (.text)
diff --git a/board/freescale/m5373evb/u-boot.lds 
b/board/freescale/m5373evb/u-boot.lds
index f3acfc7..ee2e5a3 100644
--- a/board/freescale/m5373evb/u-boot.lds
+++ b/board/freescale/m5373evb/u-boot.lds
@@ -56,10 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf532x/start.o  (.text)
-arch/m68k/lib/traps.o  (.text)
-arch/m68k/lib/interrupts.o (.text)
-common/dlmalloc.o  (.text)
-lib/zlib.o (.text)
 
 . = DEFINED(env_offset) ? env_offset : .;
 common/env_embedded.o  (.text)
-- 
1.6.4


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


[U-Boot] [PATCH 6/9] Disable the NFS define for 52277 board.

2011-04-19 Thread Jason Jin
There is no network device on ColdFire 52277EVB board.But the default
cmd include NFS define which make the build error.

Signed-off-by: Jason Jin 
---
 include/configs/M52277EVB.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/M52277EVB.h b/include/configs/M52277EVB.h
index bb3b474..5722544 100644
--- a/include/configs/M52277EVB.h
+++ b/include/configs/M52277EVB.h
@@ -69,6 +69,7 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_MISC
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #define CONFIG_CMD_REGINFO
 #undef CONFIG_CMD_USB
 #undef CONFIG_CMD_BMP
-- 
1.6.4


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


[U-Boot] [PATCH V2 3/9] Env and lds file clean up for ColdFire M5445x and M547x/8x boards.

2011-04-19 Thread Jason Jin
Move the environment outside the u-boot image, leave more
space for the text to avoid the possible PC truncate issue.

The lds file for ColdFire need to clean up since commit
6d8962e814c15807dd6ac5757904be2a02d187b8 'Switch from archive
libraries to partial linking'.

Signed-off-by: Jason Jin 
---
 board/freescale/m54451evb/u-boot.spa |   10 --
 board/freescale/m54451evb/u-boot.stm |   13 -
 board/freescale/m54455evb/u-boot.atm |7 ---
 board/freescale/m54455evb/u-boot.int |4 
 board/freescale/m547xevb/u-boot.lds  |6 --
 board/freescale/m548xevb/u-boot.lds  |6 --
 include/configs/M54451EVB.h  |   10 ++
 include/configs/M54455EVB.h  |   12 
 include/configs/M5475EVB.h   |   11 +++
 include/configs/M5485EVB.h   |   10 ++
 10 files changed, 27 insertions(+), 62 deletions(-)

diff --git a/board/freescale/m54451evb/u-boot.spa 
b/board/freescale/m54451evb/u-boot.spa
index e1bacd3..03d8e52 100644
--- a/board/freescale/m54451evb/u-boot.spa
+++ b/board/freescale/m54451evb/u-boot.spa
@@ -56,16 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf5445x/start.o (.text)
-arch/m68k/cpu/mcf5445x/libmcf5445x.o   (.text)
-arch/m68k/lib/libm68k.o(.text)
-common/cmd_flash.o (.text)
-common/dlmalloc.o  (.text)
-common/main.o  (.text)
-common/image.o (.text)
-lib/libgeneric.o   (.text)
-
-. = DEFINED(env_offset) ? env_offset : .;
-common/env_embedded.o  (.text)
 
 *(.text)
 *(.fixup)
diff --git a/board/freescale/m54451evb/u-boot.stm 
b/board/freescale/m54451evb/u-boot.stm
index 1c6979f..46773d0 100644
--- a/board/freescale/m54451evb/u-boot.stm
+++ b/board/freescale/m54451evb/u-boot.stm
@@ -56,20 +56,7 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf5445x/start.o (.text)
-/*arch/m68k/cpu/mcf5445x/cpu_init.o(.text)
-arch/m68k/cpu/mcf5445x/cpu.o   (.text)
-arch/m68k/cpu/mcf5445x/dspi.o  (.text)
-arch/m68k/cpu/mcf5445x/interrupt.o (.text)
-arch/m68k/cpu/mcf5445x/speed.o (.text)
-arch/m68k/lib/board.o  (.text)
-common/serial.o(.text)
-common/console.o   (.text)
-lib/display_options.o  (.text)
-board/freescale/m54455evb/m54455evb.o  (.text)
 
-. = DEFINED(env_offset) ? env_offset : .;
-common/env_embedded.o  (.text)
-*/
 *(.text)
 *(.fixup)
 *(.got1)
diff --git a/board/freescale/m54455evb/u-boot.atm 
b/board/freescale/m54455evb/u-boot.atm
index cf4650e..03d8e52 100644
--- a/board/freescale/m54455evb/u-boot.atm
+++ b/board/freescale/m54455evb/u-boot.atm
@@ -56,13 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf5445x/start.o (.text)
-arch/m68k/lib/traps.o  (.text)
-arch/m68k/lib/interrupts.o (.text)
-common/dlmalloc.o  (.text)
-lib/zlib.o (.text)
-
-. = DEFINED(env_offset) ? env_offset : .;
-common/env_embedded.o  (.text)
 
 *(.text)
 *(.fixup)
diff --git a/board/freescale/m54455evb/u-boot.int 
b/board/freescale/m54455evb/u-boot.int
index 79e64a2..03d8e52 100644
--- a/board/freescale/m54455evb/u-boot.int
+++ b/board/freescale/m54455evb/u-boot.int
@@ -56,10 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf5445x/start.o (.text)
-arch/m68k/lib/traps.o  (.text)
-arch/m68k/lib/interrupts.o (.text)
-common/dlmalloc.o  (.text)
-lib/zlib.o (.text)
 
 *(.text)
 *(.fixup)
diff --git a/board/freescale/m547xevb/u-boot.lds 
b/board/freescale/m547xevb/u-boot.lds
index a4e4d5a..a5b1c1a 100644
--- a/board/freescale/m547xevb/u-boot.lds
+++ b/board/freescale/m547xevb/u-boot.lds
@@ -56,12 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf547x_8x/start.o   (.text)
-arch/m68k/lib/traps.o  (.text)
-arch/m68k/lib/interrupts.o (.text)
-common/dlmalloc.o  (.text)
-
-. = DEFINED(env_offset) ? env_offset : .;
-common/env_embedded.o  (.text)
 
 *(.text)
 *(.fixup)
diff --git a/board/freescale/m548xevb/u-boot.lds 
b/board/freescale/m548xevb/u-boot.lds
index a4e4d5a..a5b1c1a 100644
--- a/board/freescale/m548xevb/u-boot.lds
+++ b/board/freescale/m548xevb/u-boot.lds
@@ -56,12 +56,6 @@ SECTIONS
 /* the sector layout of our flash chips!   XXX FIXME XXX   */
 
 arch/m68k/cpu/mcf547x_8x/start.o   (.text)
-arch/m68k/lib/traps.o  (.text)
-arch/m68k/lib/interrupts.o (.text)
-common/dlmalloc.o  (.text)