Re: [U-Boot] [PATCH] rtc: pcf8563: Make century compatible with Linux

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 4, 2012 at 01:06:16 AM, Benoît Thébaudeau wrote:
 On Fri, Jul 20, 2012 at 04:05:36 PM, Benoît Thébaudeau wrote:
  This driver uses the century bit of this RTC in the opposite way
  Linux does.
  From Linux's rtc-pcf8563.c:
  /*
   * The meaning of MO_C bit varies by the chip type.
   * From PCF8563 datasheet: this bit is toggled when the years
   * register overflows from 99 to 00
   *   0 indicates the century is 20xx
   *   1 indicates the century is 19xx
   * From RTC8564 datasheet: this bit indicates change of
   * century. When the year digit data overflows from 99 to 00,
   * this bit is set. By presetting it to 0 while still in the
   * 20th century, it will be set in year 2000, ...
   * There seems no reliable way to know how the system use this
   * bit.  So let's do it heuristically, assuming we are live in
   * 1970...2069.
   */
  
  As U-Boot's PCF8563 driver does not say it is supposed to support
  the
  RTC8564,
  make this driver compatible with Linux's by giving the opposite
  meaning to the
  century bit.
  
  Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
  Cc: Wolfgang Denk w...@denx.de
  ---
   .../drivers/rtc/pcf8563.c  |4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
  
  diff --git u-boot-66714b1.orig/drivers/rtc/pcf8563.c
  u-boot-66714b1/drivers/rtc/pcf8563.c
  index 339e5f6..a028533 100644
  --- u-boot-66714b1.orig/drivers/rtc/pcf8563.c
  +++ u-boot-66714b1/drivers/rtc/pcf8563.c
  @@ -72,7 +72,7 @@ int rtc_get (struct rtc_time *tmp)
  tmp-tm_hour = bcd2bin (hour  0x3F);
  tmp-tm_mday = bcd2bin (mday  0x3F);
  tmp-tm_mon  = bcd2bin (mon_cent  0x1F);
  -   tmp-tm_year = bcd2bin (year) + ((mon_cent  0x80) ? 2000 :
  1900);
  +   tmp-tm_year = bcd2bin (year) + ((mon_cent  0x80) ? 1900 :
  2000);
  tmp-tm_wday = bcd2bin (wday  0x07);
  tmp-tm_yday = 0;
  tmp-tm_isdst= 0;
  @@ -94,7 +94,7 @@ int rtc_set (struct rtc_time *tmp)
   
  rtc_write (0x08, bin2bcd(tmp-tm_year % 100));
   
  -   century = (tmp-tm_year = 2000) ? 0x80 : 0;
  +   century = (tmp-tm_year = 2000) ? 0 : 0x80;
  rtc_write (0x07, bin2bcd(tmp-tm_mon) | century);
   
  rtc_write (0x06, bin2bcd(tmp-tm_wday));
  
 
 Ping?

Can someone answer, please?

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


Re: [U-Boot] [PATCH] md5: Export step-by-step API

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 4, 2012 at 01:09:02 AM, Benoît Thébaudeau wrote:
 Dear Wolfgang Denk,
 
 On Fri, Jul 20, 2012 at 04:44:03 PM, Mike Frysinger wrote:
  Acked-by: Mike Frysinger vap...@gentoo.org
  -mike
 
 Can you apply it now that the merge window is open?
 
 Thanks in advance.

Can someone answer, please?

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


Re: [U-Boot] [PATCH v2 1/9] FAT: cosmetic: Remove extra spaces

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 4, 2012 at 01:11:16 AM, Benoît Thébaudeau wrote:
 Dear Wolfgang Denk,
 
 On Fri, Jul 27, 2012 at 04:29:41 PM, Wolfgang Denk wrote:
  Dear =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?=,
  
  In message
  845266616.705298.1343398892482.javamail.r...@advansee.com you
  wrote:
   
   On Sat, Jul 21, 2012 at 07:23:57 PM, Mike Frysinger wrote:
Acked-by: Mike Frysinger vap...@gentoo.org
   
   If it's ack'ed, why does nobody apply it? What is the normal life
   cycle of
   patches like these that don't have a custodian?
  
  They end on my table, and probably get merged when the next merge
  window opens.  See http://www.denx.de/wiki/U-Boot/ReleaseCycle
 
 Can you apply it now that the merge window is open?
 
 Thanks in advance.

Can someone answer, please?

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


Re: [U-Boot] [PATCH 2/2] rmobile: Add README

2012-08-10 Thread Tom Rini
On 08/10/2012 12:19 AM, Nobuhiro Iwamatsu wrote:
 Hi,
 
 On Fri, Aug 10, 2012 at 2:03 AM, Tom Rini tr...@ti.com wrote:
 On Thu, Aug 09, 2012 at 11:30:24PM +0900, Nobuhiro Iwamatsu wrote:
 This add README of Renesas RMOBILE.
 Based doc/README.omap3.

 Signed-off-by: Nobuhiro Iwamatsu iwama...@nigauri.org
 ---
  doc/README.rmobile |   46 ++
  1 file changed, 46 insertions(+)
  create mode 100644 doc/README.rmobile

 diff --git a/doc/README.rmobile b/doc/README.rmobile
 new file mode 100644
 index 000..b6acb28
 --- /dev/null
 +++ b/doc/README.rmobile
 @@ -0,0 +1,46 @@
 +Summary
 +===
 +
 +This README is about U-Boot support for Renesas's ARM Cortex-A9 based 
 RMOBILE[1]
 +family of SoCs. Renesas's RMOBILE SoC family contains an ARM Cortex-A9.
 +
 +Currently the following boards are supported:
 +
 +* KMC KZM-A9-GT [2]
 +
 +* Atmark-Techno Armadillo-800-EVA [3]
 +
 +Toolchain
 +=
 +
 +While ARM Cortex-A9 support ARM v7 instruction set (-march=armv7a) we 
 compile
 +with -march=armv5 to allow more compilers to work. For U-Boot code this has
 +no performance impact.

 Is this really an issue today?  Between ELDK, Linaro and CodeSourcey
 (and many other options too) it's really easy to get a v7 toolchain.

 
 You are right. I will fix this sentence.

Was the doc wrong or do you mean you'll change the Makefile as well? :)
 Thanks!

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


Re: [U-Boot] [PATCH] sf: stmicro: Add support for N25Q128A

2012-08-10 Thread Mike Frysinger
On Friday 10 August 2012 08:21:46 Michal Simek wrote:
 Add support for Numonyx N25Q128A SPI flash.

thanks, merged into my sf branch
-mike


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


Re: [U-Boot] [PATCH v3] arm: rmobile: Add support Renesas SH73A0

2012-08-10 Thread Mike Frysinger
On Friday 10 August 2012 03:41:17 Nobuhiro Iwamatsu wrote:
 --- a/arch/arm/cpu/armv7/rmobile/Makefile
 +++ b/arch/arm/cpu/armv7/rmobile/Makefile
 
 +clean:
 + rm -f $(SOBJS) $(OBJS)
 +

dead code - delete
-mike


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


Re: [U-Boot] [PATCH] serial: CONSOLE macro is not used

2012-08-10 Thread Mike Frysinger
Acked-by: Mike Frysinger vap...@gentoo.org
-mike


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


Re: [U-Boot] Why no cache flushing in do_go_exec()

2012-08-10 Thread Mike Frysinger
On Thursday 09 August 2012 22:38:09 Charles Manning wrote:
 I'm helping to work through an issue where some code is loaded into RAM

this is generally where cache is supposed to be flushed.  you didn't describe 
how exactly the code is being loaded into RAM though.

 and go xxx is issued to then launch the code.
 
 Sometimes this works and sometimes it does not, which makes me suspect that
 there might be a cache flushing issue.
 
 I looked at do_exec_go() and it does not flush caches before jumping to the
 entry point.
 
 Is there a good reason for this or is it an oversight?

the caches should generally be in sync before you get a chance to execute 
`go`, so the current behavior is as designed.

 Would it help to add a call to cleanup_before_linux() to do_go_exec() to
 make sure the right thing is happening?

you cannot assume go is being used to execute Linux, so that would obviously 
be wrong.  the assumption on the list is that go is really only used for u-
boot standalone applications.
-mike


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


Re: [U-Boot] [PATCH 2/2] powerpc/mpc85xx/p1_p2_rdb: add all LAWs during SPL

2012-08-10 Thread Scott Wood
On 08/10/2012 01:54 AM, Huang Changming-R66093 wrote:
 This maybe cause the overlap error:

 powerpc-linux-gnu-ld: section .resetvec loaded at
 [ff800ffc,ff800fff] overlaps section .data loaded at
 [ff800ec8,ff80102f]

What tree and toolchain are you using?  Did you apply patch 1/2 as well?
 Did it build OK for you before these two patches?

 maybe we can think about to remove or modify Kumar's patch:
 
 commit 7639675131673e8f1582d760203a9af34fba9e79
 Author: Kumar Gala ga...@kernel.crashing.org
 Date:   Thu Feb 3 09:02:13 2011 -0600
 
 powerpc/8xxx: Fix LAW init to respect pre-initialized entries
 
 If some pre-boot or earlier stage bootloader (NAND SPL) has setup LAW
 entries consider them good and mark them used.
 
 In the NAND SPL case we skip re-initializing based on the law_table
 since the SPL phase already did that.
 
 Signed-off-by: Kumar Gala ga...@kernel.crashing.org

Kumar, was this patch to fix a bug (e.g. was one of the LAWs actually in
use at the time?) or just seemed nice?

-Scott


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


Re: [U-Boot] [PATCH V4 1/4] README: fix references to config_cmd_default.h

2012-08-10 Thread Tom Rini
On Sun, Aug 05, 2012 at 08:07:19PM -0600, Stephen Warren wrote:

 All usage of config_cmd_default.h uses  for the include statement.
 Update the README to do the same, rather than using .
 
 Signed-off-by: Stephen Warren swar...@wwwdotorg.org

I've applied the whole series to u-boot-staging/tr...@ti.com, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v2 1/1] USB: EHCI: Initialize multiple USB controllers at once

2012-08-10 Thread Stephen Warren
On 08/10/2012 03:36 AM, Jim Lin wrote:
 Add support for command line usb reset or usb start to initialize
 , usb stop to stop multiple USB controllers at once.
 Other command like usb tree also supports multiple controllers.

I assume these were reposted because you rebased on the latest
u-boot-tegra/master branch. It's usual to includes details of why you're
reposting.

I applied these two patches, without changing the Seaboard config file,
and built. I got the following warnings:

ehci-hcd.c: In function 'ehci_submit_async':
ehci-hcd.c:250:6: warning: assignment from incompatible pointer type
ehci-hcd.c: In function 'usb_lowlevel_multi_init':
ehci-hcd.c:800:20: warning: assignment discards qualifiers from pointer
target type

I tested the patches in this case and found no regressions on a regular
Seaboard.

I get slightly different warnings if I do enable the feature in the
Seaboard config file:

ehci-hcd.c: In function 'ehci_submit_async':
ehci-hcd.c:250:6: warning: assignment from incompatible pointer type
ehci-hcd.c: In function 'usb_lowlevel_multi_init':
ehci-hcd.c:800:20: warning: assignment discards qualifiers from pointer
target type
ehci-tegra.c: In function 'ehci_hcd_init':
ehci-tegra.c:56:2: warning: passing argument 2 of 'tegrausb_start_port'
from incompatible pointer type
/home/swarren/shared/git_wa/u-boot/include/asm/arch/usb.h:243:5: note:
expected 'u32 *' but argument is of type 'struct ehci_hccr **'
ehci-tegra.c:56:2: warning: passing argument 3 of 'tegrausb_start_port'
from incompatible pointer type
/home/swarren/shared/git_wa/u-boot/include/asm/arch/usb.h:243:5: note:
expected 'u32 *' but argument is of type 'struct ehci_hcor **'

I tested the patches on a regular Seaboard, and found that both USB
ports now work (great!).

However, this patch breaks the enterrcm command if usb start has
been run, I assume since the VBUS GPIO is asserted to USB port 1. Can we
add some hook into that command to shut down the USB1 VBUS GPIO? I can
live with this patch being applied before that's fixed though.

I also tested Springbank, and found that this also enables the USB port
there, but strangely enterrcm following usb start does still seem to
work on that board!

So overall, once the warnings are fixed, I'm OK with these patches,
assuming some followup work on enterrcm will happen.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 07/11] u8500: Moving processor-specific functions to cpu area.

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:29PM -0600, mathieu.poir...@linaro.org wrote:
 From: Mathieu J. Poirier mathieu.poir...@linaro.org
 
 Functions such as providing power to the MMC device and reading
 the processor version register should be in the cpu area for
 access by multiple u8500-based boards.
 
 Signed-off-by: Mathieu Poirier mathieu.poir...@linaro.org
 Signed-off-by: John Rigby john.ri...@linaro.org
[snip]
 +static int cpu_is_u8500v2(void)
 +{
 + return read_cpuid() == CPUID_DB8500V2;
 +}

This isn't used yet, so causes a new warning.  I'm moving this (and the
define) to the next patch, where they are used.  With that change and my
Signed-off-by, applied to u-boot-staging/tr...@ti.com

-- 
Tom


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


Re: [U-Boot] [PATCH 08/11] u8500: Enabling power to MMC device on AB8500 V2

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:30PM -0600, mathieu.poir...@linaro.org wrote:

 From: Mathieu J. Poirier mathieu.poir...@linaro.org
 
 Register mapping has changed on power control chip between
 the first and second revision.
 
 Signed-off-by: Mathieu Poirier mathieu.poir...@linaro.org
 Signed-off-by: John Rigby john.ri...@linaro.org

I've added in the cpu_is_u8500v2 from the previous patch in the series
here, added my Signed-off-by and merged to u-boot-staging/tr...@ti.com,
thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH 09/11] u8500: Separating mmc config parameters from driver

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:31PM -0600, mathieu.poir...@linaro.org wrote:

 From: John Rigby john.ri...@linaro.org
 
 Configuration in vexpress and u8500.v1 is different from what
 is needed in u8500.v2.  As such, card configuration specifics need
 to reside in the board file rather than the driver.
 
 Signed-off-by: John Rigby john.ri...@linaro.org
 Signed-off-by: Mathieu Poirier mathieu.poir...@linaro.org
[snip]
 diff --git a/board/st-ericsson/snowball/snowball.c 
 b/board/st-ericsson/snowball/snowball.c
 index 32c343f..7a52de6 100644
 --- a/board/st-ericsson/snowball/snowball.c
 +++ b/board/st-ericsson/snowball/snowball.c
[snip]
 @@ -80,7 +76,8 @@ static int do_command(struct mmc *dev, struct mmc_cmd *cmd)
  {
   int result;
   u32 sdi_cmd = 0;
 - struct mmc_host *host = dev-priv;
 + struct pl180_mmc_host *host = dev-priv;
 + u32 lap = 0;

lap is unused.  Removing.

This patch has been applied to u-boot-staging/tr...@ti.com with the
above change and a Signed-off-by from me.

-- 
Tom


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


Re: [U-Boot] [PATCH 00/11] Support for ST-Ericsson snowball board

2012-08-10 Thread Tom Rini
On Tue, Jul 31, 2012 at 12:59:22PM -0600, mathieu.poir...@linaro.org wrote:

 From: Mathieu J. Poirier mathieu.poir...@linaro.org
 
 This set adds support for the ST-Ericsson u8500 based
 snowball board.  Doing so it moves u8500-href code around
 to allow for code reuse between boards.
 
 It was sent out during the 12.07 cycle but never received
 an official ACK.
 
 John Rigby (1):
   u8500: Separating mmc config parameters from driver
 
 Mathieu J. Poirier (10):
   snowball: Add support for ux500 based snowball board
   u8500: Moving prcmu to cpu directory
   snowball: Adding architecture dependent initialisation
   snowball: Adding CPU clock initialisation
   snowball: Moving to ux500.v2 addess scheme for PRCMU access
   snowball: applying power to LAN and GBF controllers
   u8500: Moving processor-specific functions to cpu area.
   u8500: Enabling power to MMC device on AB8500 V2
   armv7: Adding cpu specific cache managmenent
   snowball: Adding board specific cache cleanup routine
 
  MAINTAINERS |4 +
  arch/arm/cpu/armv7/cpu.c|8 +
  arch/arm/cpu/armv7/u8500/Makefile   |2 +-
  arch/arm/cpu/armv7/u8500/clock.c|   34 +
  arch/arm/cpu/armv7/u8500/cpu.c  |  192 ++
  arch/arm/cpu/armv7/u8500/prcmu.c|  229 +++
  arch/arm/include/asm/arch-u8500/clock.h |5 +-
  arch/arm/include/asm/arch-u8500/db8500_gpio.h   |   42 ++
  arch/arm/include/asm/arch-u8500/db8500_pincfg.h |  170 +
  arch/arm/include/asm/arch-u8500/hardware.h  |   33 +-
  arch/arm/include/asm/arch-u8500/prcmu.h |   76 +++
  arch/arm/include/asm/arch-u8500/sys_proto.h |1 +
  board/armltd/vexpress/ca9x4_ct_vxp.c|   21 +-
  board/st-ericsson/snowball/Makefile |   51 ++
  board/st-ericsson/snowball/db8500_pins.h|  745 
 +++
  board/st-ericsson/snowball/snowball.c   |  367 +++
  board/st-ericsson/u8500/Makefile|2 +-
  board/st-ericsson/u8500/prcmu-fw.h  |   55 --
  board/st-ericsson/u8500/prcmu.c |  165 -
  board/st-ericsson/u8500/u8500_href.c|   99 +---
  boards.cfg  |1 +
  drivers/gpio/Makefile   |1 +
  drivers/gpio/db8500_gpio.c  |  225 +++
  drivers/mmc/arm_pl180_mmci.c|  132 ++---
  drivers/mmc/arm_pl180_mmci.h|   27 +-
  drivers/serial/serial_pl01x.c   |2 +
  include/configs/snowball.h  |  268 
  27 files changed, 2566 insertions(+), 391 deletions(-)
  create mode 100644 arch/arm/cpu/armv7/u8500/cpu.c
  create mode 100644 arch/arm/cpu/armv7/u8500/prcmu.c
  create mode 100644 arch/arm/include/asm/arch-u8500/db8500_gpio.h
  create mode 100644 arch/arm/include/asm/arch-u8500/db8500_pincfg.h
  create mode 100644 arch/arm/include/asm/arch-u8500/prcmu.h
  create mode 100644 board/st-ericsson/snowball/Makefile
  create mode 100644 board/st-ericsson/snowball/db8500_pins.h
  create mode 100644 board/st-ericsson/snowball/snowball.c
  delete mode 100644 board/st-ericsson/u8500/prcmu-fw.h
  delete mode 100644 board/st-ericsson/u8500/prcmu.c
  create mode 100644 drivers/gpio/db8500_gpio.c
  create mode 100644 include/configs/snowball.h

With a few very minor changes that I've sent to the list, I've applied
this to u-boot-staging/tr...@ti.com, thanks for your patience!

-- 
Tom


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


Re: [U-Boot] [PATCH 01/11 v2] snowball: Add support for ux500 based snowball board

2012-08-10 Thread Tom Rini
On Fri, Aug 03, 2012 at 03:05:12PM -0600, mathieu.poir...@linaro.org wrote:

 From: Mathieu J. Poirier mathieu.poir...@linaro.org
 
 Signed-off-by: Mathieu Poirier mathieu.poir...@linaro.org
 Signed-off-by: John Rigby john.ri...@linaro.org
[snip]
 diff --git a/MAINTAINERS b/MAINTAINERS
 index fd0c65c..8a16b12 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -959,6 +959,10 @@ Vladimir Zapolskiy v...@mleia.com
  
   devkit3250  lpc32xx
  
 +Mathieu Poirier mathieu.poir...@linaro.org
 +
 + snowballARM ARMV7 (u8500 SoC)

This list is supposed to be sorted by name.  I've sorted it and applied
to u-boot-staging/tr...@ti.com, thanks!

-- 
Tom


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


[U-Boot] Please pull u-boot-staging/tr...@ti.com

2012-08-10 Thread Tom Rini
Hello Albert and Wolfgang,

To try and ease the backlog of ARM changes, I've taken the liberty of
grabbing the Snowball and Raspberry Pi model B board support patches and
putting them into the staging tree.  Both of these series have been
posted for some time and been reviewed.  Wolfgang, if you would like to
wait for Albert to pick up this request, that's fine.  I just wanted to
make sure the submitters weren't left waiting.  Thanks!

The following changes since commit 4d3c95f5ea7c737a21cd6b9c59435ee693b3f127:

  zfs: Add ZFS filesystem support (2012-08-09 23:42:20 +0200)

are available in the git repository at:

  git://git.denx.de/u-boot-staging tr...@ti.com

for you to fetch changes up to bcf2c9ef2877440033e3032fbd597be32728020c:

  ARM: add Raspberry Pi model B board, using BCM2835 SoC (2012-08-10 08:57:29 
-0700)


John Rigby (1):
  u8500: Separating mmc config parameters from driver

Mathieu J. Poirier (10):
  snowball: Add support for ux500 based snowball board
  u8500: Moving prcmu to cpu directory
  snowball: Adding architecture dependent initialisation
  snowball: Adding CPU clock initialisation
  snowball: Moving to ux500.v2 addess scheme for PRCMU access
  snowball: applying power to LAN and GBF controllers
  u8500: Moving processor-specific functions to cpu area.
  u8500: Enabling power to MMC device on AB8500 V2
  armv7: Adding cpu specific cache managmenent
  snowball: Adding board specific cache cleanup routine

Stephen Warren (4):
  README: fix references to config_cmd_default.h
  ARM: arm1176: enable instruction cache in arch_cpu_init()
  ARM: add basic support for the Broadcom BCM2835 SoC
  ARM: add Raspberry Pi model B board, using BCM2835 SoC

 MAINTAINERS|8 +
 README |4 +-
 arch/arm/cpu/arm1176/bcm2835/Makefile  |   37 +
 arch/arm/cpu/arm1176/bcm2835/config.mk |   19 +
 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S   |   19 +
 arch/arm/cpu/arm1176/bcm2835/reset.c   |   35 +
 arch/arm/cpu/arm1176/bcm2835/timer.c   |   55 ++
 arch/arm/cpu/arm1176/cpu.c |7 +
 arch/arm/cpu/armv7/cpu.c   |8 +
 arch/arm/cpu/armv7/u8500/Makefile  |2 +-
 arch/arm/cpu/armv7/u8500/clock.c   |   34 +
 arch/arm/cpu/armv7/u8500/cpu.c |  192 +
 .../arm/cpu/armv7}/u8500/prcmu.c   |  128 +++-
 arch/arm/include/asm/arch-bcm2835/gpio.h   |   66 ++
 arch/arm/include/asm/arch-bcm2835/timer.h  |   37 +
 arch/arm/include/asm/arch-bcm2835/wdog.h   |   36 +
 arch/arm/include/asm/arch-u8500/clock.h|5 +-
 arch/arm/include/asm/arch-u8500/db8500_gpio.h  |   42 ++
 arch/arm/include/asm/arch-u8500/db8500_pincfg.h|  170 +
 arch/arm/include/asm/arch-u8500/hardware.h |   33 +-
 .../arm/include/asm/arch-u8500/prcmu.h |   35 +-
 arch/arm/include/asm/arch-u8500/sys_proto.h|1 +
 board/armltd/vexpress/ca9x4_ct_vxp.c   |   21 +-
 board/raspberrypi/rpi_b/Makefile   |   34 +
 board/raspberrypi/rpi_b/rpi_b.c|   34 +
 board/st-ericsson/snowball/Makefile|   49 ++
 board/st-ericsson/snowball/db8500_pins.h   |  745 
 board/st-ericsson/snowball/snowball.c  |  348 +
 board/st-ericsson/u8500/Makefile   |2 +-
 board/st-ericsson/u8500/u8500_href.c   |   99 +--
 boards.cfg |2 +
 drivers/gpio/Makefile  |2 +
 drivers/gpio/bcm2835_gpio.c|   89 +++
 drivers/gpio/db8500_gpio.c |  221 ++
 drivers/mmc/arm_pl180_mmci.c   |  131 ++--
 drivers/mmc/arm_pl180_mmci.h   |   27 +-
 drivers/serial/serial_pl01x.c  |2 +
 include/configs/rpi_b.h|  104 +++
 include/configs/snowball.h |  266 +++
 39 files changed, 2937 insertions(+), 212 deletions(-)
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/Makefile
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/config.mk
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/reset.c
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/timer.c
 create mode 100644 arch/arm/cpu/armv7/u8500/cpu.c
 rename {board/st-ericsson = arch/arm/cpu/armv7}/u8500/prcmu.c (58%)
 create mode 100644 arch/arm/include/asm/arch-bcm2835/gpio.h
 create mode 100644 arch/arm/include/asm/arch-bcm2835/timer.h
 create mode 100644 arch/arm/include/asm/arch-bcm2835/wdog.h
 create mode 100644 arch/arm/include/asm/arch-u8500/db8500_gpio.h
 create 

[U-Boot] [PATCH v4 0/7] ehci: Improve performance

2012-08-10 Thread Benoît Thébaudeau
Hi all,

This series aims at improving EHCI performance. There is also some code cleanup
BTW.

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


Re: [U-Boot] [PATCH] microblaze: Call spi_init function

2012-08-10 Thread Stephan Linz
Am Freitag, den 10.08.2012, 09:09 +0200 schrieb Michal Simek: 
 Initialization spi.
 
 Signed-off-by: Michal Simek mon...@monstr.eu

Acked-by: Stephan Linz l...@li-pro.net

 ---
  arch/microblaze/lib/board.c |5 +
  1 files changed, 5 insertions(+), 0 deletions(-)
 
 diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
 index 674b573..ef4bac4 100644
 --- a/arch/microblaze/lib/board.c
 +++ b/arch/microblaze/lib/board.c
 @@ -32,6 +32,7 @@
  #include stdio_dev.h
  #include serial.h
  #include net.h
 +#include spi.h
  #include linux/compiler.h
  #include asm/processor.h
  #include asm/microblaze_intc.h
 @@ -166,6 +167,10 @@ void board_init_f(ulong not_used)
   }
  #endif
  
 +#ifdef CONFIG_SPI
 + spi_init();
 +#endif
 +
   /* relocate environment function pointers etc. */
   env_relocate ();
  

-- 
Viele Grüße,
Stephan Linz
__
MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start
OpenDCC: http://www.li-pro.net/opendcc.phtml
PC/M: http://www.li-pro.net/pcm.phtml
Sourceforge: http://sourceforge.net/users/slz
Gitorious: https://gitorious.org/~slz

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


[U-Boot] [PATCH v4 1/7] ehci: cosmetic: Define used constants

2012-08-10 Thread Benoît Thébaudeau
Make some light cosmetic code cleanup by the way.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Marek Vasut ma...@denx.de
Cc: Ilya Yanok ilya.ya...@cogentembedded.com
Cc: Stefan Herbrechtsmeier ste...@herbrechtsmeier.net
---
Changes for v2: N/A.
Changes for v3:
 - New patch.
Changes for v4:
 - Use accessor macros rather than offsets and masks.
 - More code cleanup.

 .../drivers/usb/host/ehci-hcd.c|  138 ++--
 .../drivers/usb/host/ehci.h|   49 ++-
 2 files changed, 118 insertions(+), 69 deletions(-)

diff --git u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c 
u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
index 2a00389..00a155b 100644
--- u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c
+++ u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
@@ -163,7 +163,7 @@ static int ehci_reset(void)
 
 #ifdef CONFIG_USB_EHCI_TXFIFO_THRESH
cmd = ehci_readl(hcor-or_txfilltuning);
-   cmd = ~TXFIFO_THRESH(0x3f);
+   cmd = ~TXFIFO_THRESH_MASK;
cmd |= TXFIFO_THRESH(CONFIG_USB_EHCI_TXFIFO_THRESH);
ehci_writel(hcor-or_txfilltuning, cmd);
 #endif
@@ -186,7 +186,7 @@ static int ehci_td_buffer(struct qTD *td, void *buf, size_t 
sz)
while (idx  QT_BUFFER_CNT) {
td-qt_buffer[idx] = cpu_to_hc32(addr);
td-qt_buffer_hi[idx] = 0;
-   next = (addr + 4096)  ~4095;
+   next = (addr + EHCI_PAGE_SIZE)  ~(EHCI_PAGE_SIZE - 1);
delta = next - addr;
if (delta = sz)
break;
@@ -208,7 +208,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
   int length, struct devrequest *req)
 {
ALLOC_ALIGN_BUFFER(struct QH, qh, 1, USB_DMA_MINALIGN);
-   ALLOC_ALIGN_BUFFER(struct qTD, qtd, 3, USB_DMA_MINALIGN);
+#define QTD_COUNT  3
+   ALLOC_ALIGN_BUFFER(struct qTD, qtd, QTD_COUNT, USB_DMA_MINALIGN);
int qtd_counter = 0;
 
volatile struct qTD *vtd;
@@ -230,7 +231,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
  le16_to_cpu(req-index));
 
memset(qh, 0, sizeof(struct QH));
-   memset(qtd, 0, 3 * sizeof(*qtd));
+   memset(qtd, 0, QTD_COUNT * sizeof(*qtd));
 
toggle = usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe));
 
@@ -245,20 +246,17 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
 * - qh_overlay.qt_altnext
 */
qh-qh_link = cpu_to_hc32((uint32_t)qh_list | QH_LINK_TYPE_QH);
-   c = (usb_pipespeed(pipe) != USB_SPEED_HIGH 
-usb_pipeendpoint(pipe) == 0) ? 1 : 0;
-   endpt = (8  28) |
-   (c  27) |
-   (usb_maxpacket(dev, pipe)  16) |
-   (0  15) |
-   (1  14) |
-   (usb_pipespeed(pipe)  12) |
-   (usb_pipeendpoint(pipe)  8) |
-   (0  7) | (usb_pipedevice(pipe)  0);
+   c = usb_pipespeed(pipe) != USB_SPEED_HIGH  !usb_pipeendpoint(pipe);
+   endpt = QH_ENDPT1_RL(8) | QH_ENDPT1_C(c) |
+   QH_ENDPT1_MAXPKTLEN(usb_maxpacket(dev, pipe)) | QH_ENDPT1_H(0) |
+   QH_ENDPT1_DTC(QH_ENDPT1_DTC_DT_FROM_QTD) |
+   QH_ENDPT1_EPS(usb_pipespeed(pipe)) |
+   QH_ENDPT1_ENDPT(usb_pipeendpoint(pipe)) | QH_ENDPT1_I(0) |
+   QH_ENDPT1_DEVADDR(usb_pipedevice(pipe));
qh-qh_endpt1 = cpu_to_hc32(endpt);
-   endpt = (1  30) |
-   (dev-portnr  23) |
-   (dev-parent-devnum  16) | (0  8) | (0  0);
+   endpt = QH_ENDPT2_MULT(1) | QH_ENDPT2_PORTNUM(dev-portnr) |
+   QH_ENDPT2_HUBADDR(dev-parent-devnum) |
+   QH_ENDPT2_UFCMASK(0) | QH_ENDPT2_UFSMASK(0);
qh-qh_endpt2 = cpu_to_hc32(endpt);
qh-qh_overlay.qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
 
@@ -276,12 +274,13 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
 */
qtd[qtd_counter].qt_next = cpu_to_hc32(QT_NEXT_TERMINATE);
qtd[qtd_counter].qt_altnext = cpu_to_hc32(QT_NEXT_TERMINATE);
-   token = (0  31) |
-   (sizeof(*req)  16) |
-   (0  15) | (0  12) | (3  10) | (2  8) | (0x80  0);
+   token = QT_TOKEN_DT(0) | QT_TOKEN_TOTALBYTES(sizeof(*req)) |
+   QT_TOKEN_IOC(0) | QT_TOKEN_CPAGE(0) | QT_TOKEN_CERR(3) |
+   QT_TOKEN_PID(QT_TOKEN_PID_SETUP) |
+   QT_TOKEN_STATUS(QT_TOKEN_STATUS_ACTIVE);
qtd[qtd_counter].qt_token = cpu_to_hc32(token);
-   if (ehci_td_buffer(qtd[qtd_counter], req, sizeof(*req)) != 0) {
-   printf(unable construct SETUP td\n);
+   if (ehci_td_buffer(qtd[qtd_counter], req, sizeof(*req))) {
+   printf(unable to construct SETUP TD\n);
goto fail;
}
  

[U-Boot] [PATCH v4 2/7] ehci-hcd: Boost transfer speed

2012-08-10 Thread Benoît Thébaudeau
This patch takes advantage of the hardware EHCI qTD queuing mechanism to avoid
software and transfer splitting overhead so as to make transfers as fast as
possible.

The only drawback is a call to memalign. However, this is fast compared to the
transfer timings, and the heap size to allocate is small, e.g. 128 kiB in the
worst case for a transfer length of 65535 packets of 512 bytes.

Tested on i.MX25, i.MX35 and i.MX51. In my test conditions, the speed gain was
very significant (several times faster), which is really appreciable when
accessing large files.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Marek Vasut ma...@denx.de
Cc: Ilya Yanok ilya.ya...@cogentembedded.com
Cc: Stefan Herbrechtsmeier ste...@herbrechtsmeier.net
---
Changes for v2:
 - Use DIV_ROUND_UP to make code more readable.
Changes for v3:
 - Remove extra unalignment term in the computation of qtd_count.
 - Fix ZLP support.
 - Add #warning if CONFIG_SYS_MALLOC_LEN is likely to be too small.
 - Make code more readable.
 - Add comments.
Changes for v4: None.

 .../drivers/usb/host/ehci-hcd.c|  167 
 1 file changed, 138 insertions(+), 29 deletions(-)

diff --git u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c 
u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
index 00a155b..a0ef5db 100644
--- u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c
+++ u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
@@ -208,8 +208,8 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
   int length, struct devrequest *req)
 {
ALLOC_ALIGN_BUFFER(struct QH, qh, 1, USB_DMA_MINALIGN);
-#define QTD_COUNT  3
-   ALLOC_ALIGN_BUFFER(struct qTD, qtd, QTD_COUNT, USB_DMA_MINALIGN);
+   struct qTD *qtd;
+   int qtd_count = 0;
int qtd_counter = 0;
 
volatile struct qTD *vtd;
@@ -230,8 +230,74 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
  le16_to_cpu(req-value), le16_to_cpu(req-value),
  le16_to_cpu(req-index));
 
+   /*
+* The USB transfer is split into qTD transfers. Eeach qTD transfer is
+* described by a transfer descriptor (the qTD). The qTDs form a linked
+* list with a queue head (QH).
+*
+* Each qTD transfer starts with a new USB packet, i.e. a packet cannot
+* have its beginning in a qTD transfer and its end in the following
+* one, so the qTD transfer lengths have to be chosen accordingly.
+*
+* Each qTD transfer uses up to QT_BUFFER_CNT data buffers, mapped to
+* single pages. The first data buffer can start at any offset within a
+* page (not considering the cache-line alignment issues), while the
+* following buffers must be page-aligned. There is no alignment
+* constraint on the size of a qTD transfer.
+*/
+   if (req != NULL)
+   /* 1 qTD will be needed for SETUP, and 1 for ACK. */
+   qtd_count += 1 + 1;
+   if (length  0 || req == NULL) {
+   /*
+* Determine the qTD transfer size that will be used for the
+* data payload (not considering the final qTD transfer, which
+* may be shorter).
+*
+* In order to keep each packet within a qTD transfer, the qTD
+* transfer size is aligned to EHCI_PAGE_SIZE, which is a
+* multiple of wMaxPacketSize (except in some cases for
+* interrupt transfers, see comment in submit_int_msg()).
+*
+* By default, i.e. if the input buffer is page-aligned,
+* QT_BUFFER_CNT full pages will be used.
+*/
+   int xfr_sz = QT_BUFFER_CNT;
+   /*
+* However, if the input buffer is not page-aligned, the qTD
+* transfer size will be one page shorter, and the first qTD
+* data buffer of each transfer will be page-unaligned.
+*/
+   if ((uint32_t)buffer  (EHCI_PAGE_SIZE - 1))
+   xfr_sz--;
+   /* Convert the qTD transfer size to bytes. */
+   xfr_sz *= EHCI_PAGE_SIZE;
+   /*
+* Determine the number of qTDs that will be required for the
+* data payload. This value has to be rounded up since the final
+* qTD transfer may be shorter than the regular qTD transfer
+* size that has just been computed.
+*/
+   qtd_count += DIV_ROUND_UP(length, xfr_sz);
+   /* ZLPs also need a qTD. */
+   if (!qtd_count)
+   qtd_count++;
+   }
+/*
+ * Threshold value based on the worst-case total size of the qTDs to allocate
+ * for a mass-storage transfer of 65535 blocks of 512 bytes.
+ */
+#if CONFIG_SYS_MALLOC_LEN 

Re: [U-Boot] [PATCH v4 0/7] ehci: Improve performance

2012-08-10 Thread Benoît Thébaudeau


Benoît Thébaudeau
Application Engineer
benoit.thebaud...@advansee.com
+33 2 40 50 21 73
ADVANSEE SARL
9, rue Alfred Kastler
CS 30750
44307 Nantes CEDEX 3
France

- Original Message -
 From: Benoît Thébaudeau benoit.thebaud...@advansee.com
 To: u-boot@lists.denx.de
 Cc: Marek Vasut ma...@denx.de, Ilya Yanok 
 ilya.ya...@cogentembedded.com, Stefan Herbrechtsmeier
 ste...@herbrechtsmeier.net
 Sent: Friday, August 10, 2012 6:21:37 PM
 Subject: [PATCH v4 0/7] ehci: Improve performance
 
 Hi all,
 
 This series aims at improving EHCI performance. There is also some
 code cleanup
 BTW.
 
 Best regards,
 Benoît
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Benoît Thébaudeau
Now that the EHCI driver allocates its qTDs from the heap, the MSC driver is
only limited by the SCSI commands it uses.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Marek Vasut ma...@denx.de
Cc: Ilya Yanok ilya.ya...@cogentembedded.com
Cc: Stefan Herbrechtsmeier ste...@herbrechtsmeier.net
---
Changes for v2: None.
Changes for v3:
 - Patch swapped with the currently preceding one.
Changes for v4: None.

 .../common/usb_storage.c   |   33 +---
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index 0cd6399..822bd64 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -157,12 +157,13 @@ struct us_data {
 
 #ifdef CONFIG_USB_EHCI
 /*
- * The U-Boot EHCI driver cannot handle more than 5 page aligned buffers
- * of 4096 bytes in a transfer without running itself out of qt_buffers
+ * The U-Boot EHCI driver can handle any transfer length as long as there is
+ * enough free heap space left, but the SCSI READ(10) and WRITE(10) commands 
are
+ * limited to 65535 bytes.
  */
-#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start % 4096)) / blksz)
+#define USB_MAX_XFER_BLK   65535
 #else
-#define USB_MAX_XFER_BLK(start, blksz) 20
+#define USB_MAX_XFER_BLK   20
 #endif
 
 static struct us_data usb_stor[USB_MAX_STOR_DEV];
@@ -1050,7 +1051,7 @@ static void usb_bin_fixup(struct usb_device_descriptor 
descriptor,
 unsigned long usb_stor_read(int device, unsigned long blknr,
unsigned long blkcnt, void *buffer)
 {
-   unsigned long start, blks, buf_addr, max_xfer_blk;
+   unsigned long start, blks, buf_addr;
unsigned short smallblks;
struct usb_device *dev;
struct us_data *ss;
@@ -1092,14 +1093,12 @@ unsigned long usb_stor_read(int device, unsigned long 
blknr,
/* XXX need some comment here */
retry = 2;
srb-pdata = (unsigned char *)buf_addr;
-   max_xfer_blk = USB_MAX_XFER_BLK(buf_addr,
-   usb_dev_desc[device].blksz);
-   if (blks  max_xfer_blk)
-   smallblks = (unsigned short) max_xfer_blk;
+   if (blks  USB_MAX_XFER_BLK)
+   smallblks = USB_MAX_XFER_BLK;
else
smallblks = (unsigned short) blks;
 retry_it:
-   if (smallblks == max_xfer_blk)
+   if (smallblks == USB_MAX_XFER_BLK)
usb_show_progress();
srb-datalen = usb_dev_desc[device].blksz * smallblks;
srb-pdata = (unsigned char *)buf_addr;
@@ -1120,7 +1119,7 @@ retry_it:
start, smallblks, buf_addr);
 
usb_disable_asynch(0); /* asynch transfer allowed */
-   if (blkcnt = max_xfer_blk)
+   if (blkcnt = USB_MAX_XFER_BLK)
debug(\n);
return blkcnt;
 }
@@ -1128,7 +1127,7 @@ retry_it:
 unsigned long usb_stor_write(int device, unsigned long blknr,
unsigned long blkcnt, const void *buffer)
 {
-   unsigned long start, blks, buf_addr, max_xfer_blk;
+   unsigned long start, blks, buf_addr;
unsigned short smallblks;
struct usb_device *dev;
struct us_data *ss;
@@ -1173,14 +1172,12 @@ unsigned long usb_stor_write(int device, unsigned long 
blknr,
 */
retry = 2;
srb-pdata = (unsigned char *)buf_addr;
-   max_xfer_blk = USB_MAX_XFER_BLK(buf_addr,
-   usb_dev_desc[device].blksz);
-   if (blks  max_xfer_blk)
-   smallblks = (unsigned short) max_xfer_blk;
+   if (blks  USB_MAX_XFER_BLK)
+   smallblks = USB_MAX_XFER_BLK;
else
smallblks = (unsigned short) blks;
 retry_it:
-   if (smallblks == max_xfer_blk)
+   if (smallblks == USB_MAX_XFER_BLK)
usb_show_progress();
srb-datalen = usb_dev_desc[device].blksz * smallblks;
srb-pdata = (unsigned char *)buf_addr;
@@ -1201,7 +1198,7 @@ retry_it:
start, smallblks, buf_addr);
 
usb_disable_asynch(0); /* asynch transfer allowed */
-   if (blkcnt = max_xfer_blk)
+   if (blkcnt = USB_MAX_XFER_BLK)
debug(\n);
return blkcnt;
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 5/7] usb_storage: Adjust time-outs

2012-08-10 Thread Benoît Thébaudeau
Adjust time-out value for the new EHCI mechanism.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Marek Vasut ma...@denx.de
Cc: Ilya Yanok ilya.ya...@cogentembedded.com
Cc: Stefan Herbrechtsmeier ste...@herbrechtsmeier.net
---
Changes for v2: None.
Changes for v3: None.
Changes for v4: None.

 .../common/usb_storage.c   |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index 822bd64..f0798b2 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -712,7 +712,7 @@ int usb_stor_BBB_transport(ccb *srb, struct us_data *us)
else
pipe = pipeout;
result = usb_bulk_msg(us-pusb_dev, pipe, srb-pdata, srb-datalen,
- data_actlen, USB_CNTL_TIMEOUT * 5);
+ data_actlen, USB_CNTL_TIMEOUT * 100);
/* special handling of STALL in DATA phase */
if ((result  0)  (us-pusb_dev-status  USB_ST_STALLED)) {
USB_STOR_PRINTF(DATA:stall\n);
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 3/7] usb_storage: Restore non-EHCI support

2012-08-10 Thread Benoît Thébaudeau
The commit 5dd95cf made the MSC driver EHCI-specific. This patch restores a
basic support of non-EHCI HCDs, like before that commit.

The fallback transfer size is certainly not optimal, but at least it should work
like before.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Marek Vasut ma...@denx.de
Cc: Ilya Yanok ilya.ya...@cogentembedded.com
Cc: Stefan Herbrechtsmeier ste...@herbrechtsmeier.net
---
Changes for v2: None.
Changes for v3:
 - Patch swapped with the currently following one.
Changes for v4: None.

 .../common/usb_storage.c   |4 
 1 file changed, 4 insertions(+)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index bdc306f..0cd6399 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -155,11 +155,15 @@ struct us_data {
trans_cmnd  transport;  /* transport routine */
 };
 
+#ifdef CONFIG_USB_EHCI
 /*
  * The U-Boot EHCI driver cannot handle more than 5 page aligned buffers
  * of 4096 bytes in a transfer without running itself out of qt_buffers
  */
 #define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start % 4096)) / blksz)
+#else
+#define USB_MAX_XFER_BLK(start, blksz) 20
+#endif
 
 static struct us_data usb_stor[USB_MAX_STOR_DEV];
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 6/7] usb_stor_BBB_transport: Do not delay when not required

2012-08-10 Thread Benoît Thébaudeau
There is a 5-ms delay in usb_stor_BBB_transport, which occurs every 10 kiB of
data for fragmented fatload usb, i.e. roughly 500 ms of delay per MiB. This adds
up to quite a bit of delay if you're loading a large ramdisk.

The purpose of this delay should be to debounce the 5-V/100-mA USB power up.
This patch skips the delay if the device has already been queried as ready.

Signed-off-by: Jim Shimer mgi2...@motorola.com

Rework following the review:
 - Rebase against the latest u-boot-usb master.
 - Replace typedef with #define.
 - Use the existing flags struct field instead of adding a new field.
 - Remove the setter function.
 - Remove the typecasts.
Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com

Cc: Marek Vasut ma...@denx.de
Cc: Ilya Yanok ilya.ya...@cogentembedded.com
Cc: Stefan Herbrechtsmeier ste...@herbrechtsmeier.net
Cc: Jim Shimer mgi2...@motorola.com
---
Changes for v2: N/A.
Changes for v3:
 - New patch.
Changes for v4: None.

 .../common/usb_storage.c   |   11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c 
u-boot-usb-4f8254e/common/usb_storage.c
index f0798b2..b000f09 100644
--- u-boot-usb-4f8254e.orig/common/usb_storage.c
+++ u-boot-usb-4f8254e/common/usb_storage.c
@@ -136,6 +136,7 @@ struct us_data {
struct usb_device *pusb_dev; /* this usb_device */
 
unsigned intflags;  /* from filter initially */
+#  define USB_READY(1  0)
unsigned char   ifnum;  /* interface number */
unsigned char   ep_in;  /* in endpoint */
unsigned char   ep_out; /* out ... */
@@ -698,7 +699,8 @@ int usb_stor_BBB_transport(ccb *srb, struct us_data *us)
usb_stor_BBB_reset(us);
return USB_STOR_TRANSPORT_FAILED;
}
-   mdelay(5);
+   if (!(us-flags  USB_READY))
+   mdelay(5);
pipein = usb_rcvbulkpipe(us-pusb_dev, us-ep_in);
pipeout = usb_sndbulkpipe(us-pusb_dev, us-ep_out);
/* DATA phase + error handling */
@@ -963,8 +965,10 @@ static int usb_test_unit_ready(ccb *srb, struct us_data 
*ss)
srb-cmd[1] = srb-lun  5;
srb-datalen = 0;
srb-cmdlen = 12;
-   if (ss-transport(srb, ss) == USB_STOR_TRANSPORT_GOOD)
+   if (ss-transport(srb, ss) == USB_STOR_TRANSPORT_GOOD) {
+   ss-flags |= USB_READY;
return 0;
+   }
usb_request_sense(srb, ss);
mdelay(100);
} while (retries--);
@@ -1114,6 +1118,7 @@ retry_it:
blks -= smallblks;
buf_addr += srb-datalen;
} while (blks != 0);
+   ss-flags = ~USB_READY;
 
USB_STOR_PRINTF(usb_read: end startblk %lx, blccnt %x buffer %lx\n,
start, smallblks, buf_addr);
@@ -1193,6 +1198,7 @@ retry_it:
blks -= smallblks;
buf_addr += srb-datalen;
} while (blks != 0);
+   ss-flags = ~USB_READY;
 
USB_STOR_PRINTF(usb_write: end startblk %lx, blccnt %x buffer %lx\n,
start, smallblks, buf_addr);
@@ -1404,6 +1410,7 @@ int usb_stor_get_info(struct usb_device *dev, struct 
us_data *ss,
cap[0] = 2880;
cap[1] = 0x200;
}
+   ss-flags = ~USB_READY;
USB_STOR_PRINTF(Read Capacity returns: 0x%lx, 0x%lx\n, cap[0],
cap[1]);
 #if 0
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 7/7] ehci: Optimize qTD allocations

2012-08-10 Thread Benoît Thébaudeau
Relax the qTD transfer alignment constraints in order to need less qTDs for
buffers that are aligned to 512 bytes but not to pages.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Marek Vasut ma...@denx.de
Cc: Ilya Yanok ilya.ya...@cogentembedded.com
Cc: Stefan Herbrechtsmeier ste...@herbrechtsmeier.net
---
Changes for v2: N/A.
Changes for v3:
 - New patch.
Changes for v4:
 - Optimize away the qtd_toggle variable.

 .../drivers/usb/host/ehci-hcd.c|   67 +++-
 1 file changed, 37 insertions(+), 30 deletions(-)

diff --git u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c 
u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
index a0ef5db..18b4bc6 100644
--- u-boot-usb-4f8254e.orig/drivers/usb/host/ehci-hcd.c
+++ u-boot-usb-4f8254e/drivers/usb/host/ehci-hcd.c
@@ -215,7 +215,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
volatile struct qTD *vtd;
unsigned long ts;
uint32_t *tdp;
-   uint32_t endpt, token, usbsts;
+   uint32_t endpt, maxpacket, token, usbsts;
uint32_t c, toggle;
uint32_t cmd;
int timeout;
@@ -230,6 +230,7 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
  le16_to_cpu(req-value), le16_to_cpu(req-value),
  le16_to_cpu(req-index));
 
+#define PKT_ALIGN  512
/*
 * The USB transfer is split into qTD transfers. Eeach qTD transfer is
 * described by a transfer descriptor (the qTD). The qTDs form a linked
@@ -251,43 +252,41 @@ ehci_submit_async(struct usb_device *dev, unsigned long 
pipe, void *buffer,
if (length  0 || req == NULL) {
/*
 * Determine the qTD transfer size that will be used for the
-* data payload (not considering the final qTD transfer, which
-* may be shorter).
+* data payload (not considering the first qTD transfer, which
+* may be longer or shorter, and the final one, which may be
+* shorter).
 *
 * In order to keep each packet within a qTD transfer, the qTD
-* transfer size is aligned to EHCI_PAGE_SIZE, which is a
-* multiple of wMaxPacketSize (except in some cases for
-* interrupt transfers, see comment in submit_int_msg()).
+* transfer size is aligned to PKT_ALIGN, which is a multiple of
+* wMaxPacketSize (except in some cases for interrupt transfers,
+* see comment in submit_int_msg()).
 *
-* By default, i.e. if the input buffer is page-aligned,
+* By default, i.e. if the input buffer is aligned to PKT_ALIGN,
 * QT_BUFFER_CNT full pages will be used.
 */
int xfr_sz = QT_BUFFER_CNT;
/*
-* However, if the input buffer is not page-aligned, the qTD
-* transfer size will be one page shorter, and the first qTD
+* However, if the input buffer is not aligned to PKT_ALIGN, the
+* qTD transfer size will be one page shorter, and the first qTD
 * data buffer of each transfer will be page-unaligned.
 */
-   if ((uint32_t)buffer  (EHCI_PAGE_SIZE - 1))
+   if ((uint32_t)buffer  (PKT_ALIGN - 1))
xfr_sz--;
/* Convert the qTD transfer size to bytes. */
xfr_sz *= EHCI_PAGE_SIZE;
/*
-* Determine the number of qTDs that will be required for the
-* data payload. This value has to be rounded up since the final
-* qTD transfer may be shorter than the regular qTD transfer
-* size that has just been computed.
+* Approximate by excess the number of qTDs that will be
+* required for the data payload. The exact formula is way more
+* complicated and saves at most 2 qTDs, i.e. a total of 128
+* bytes.
 */
-   qtd_count += DIV_ROUND_UP(length, xfr_sz);
-   /* ZLPs also need a qTD. */
-   if (!qtd_count)
-   qtd_count++;
+   qtd_count += 2 + length / xfr_sz;
}
 /*
- * Threshold value based on the worst-case total size of the qTDs to allocate
- * for a mass-storage transfer of 65535 blocks of 512 bytes.
+ * Threshold value based on the worst-case total size of the allocated qTDs for
+ * a mass-storage transfer of 65535 blocks of 512 bytes.
  */
-#if CONFIG_SYS_MALLOC_LEN = 128 * 1024
+#if CONFIG_SYS_MALLOC_LEN = 64 + 128 * 1024
 #warning CONFIG_SYS_MALLOC_LEN may be too small for EHCI
 #endif
qtd = memalign(USB_DMA_MINALIGN, qtd_count * sizeof(struct qTD));
@@ -313,8 +312,9 @@ ehci_submit_async(struct 

Re: [U-Boot] [PATCH v2] net: Improve the speed of netconsole

2012-08-10 Thread Stefano Babic
On 03/08/2012 22:59, Joe Hershberger wrote:
 Previously u-boot would initialize the network interface for every
 network operation and then shut it down again.  This makes sense for
 most operations where the network in not known to be needed soon after
 the operation is complete.  In the case of netconsole, it will use the
 network for every interaction with the shell or every printf.  This
 means that the network is being reinitialized very often.  On many
 devices, this intialization is very slow.
 
 This patch checks for consecutive netconsole actions and leaves the
 ethernet hardware initialized between them.  It will still behave the
 same old way for all other network operations and any time another
 network operation happens between netconsole operations.
 

Hi Joe,

 Signed-off-by: Joe Hershberger joe.hershber...@ni.com
 Cc: Stefano Babic sba...@denx.de
 ---
  common/cmd_bootm.c   |   17 +
  drivers/net/netconsole.c |   22 ++
  include/net.h|   42 +-
  net/eth.c|8 ++--
  net/net.c|   26 --
  5 files changed, 98 insertions(+), 17 deletions(-)
 
 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
 index 45e726a..83fa5d7 100644
 --- a/common/cmd_bootm.c
 +++ b/common/cmd_bootm.c
 @@ -564,6 +564,13 @@ int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int 
 argc,
   break;
   case BOOTM_STATE_OS_GO:
   disable_interrupts();
 +#ifdef CONFIG_NETCONSOLE
 + /*
 +  * Stop the ethernet stack if NetConsole could have
 +  * left it up
 +  */
 + eth_halt();
 +#endif
   arch_preboot_os();
   boot_fn(BOOTM_STATE_OS_GO, argc, argv, images);
   break;
 @@ -622,6 +629,11 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char 
 * const argv[])
*/
   iflag = disable_interrupts();
  
 +#ifdef CONFIG_NETCONSOLE
 + /* Stop the ethernet stack if NetConsole could have left it up */
 + eth_halt();
 +#endif
 +
  #if defined(CONFIG_CMD_USB)
   /*
* turn off USB to prevent the host controller from writing to the
 @@ -1599,6 +1611,11 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int 
 argc, char * const argv[])
*/
   disable_interrupts();
  
 +#ifdef CONFIG_NETCONSOLE
 + /* Stop the ethernet stack if NetConsole could have left it up */
 + eth_halt();
 +#endif
 +
  #if defined(CONFIG_CMD_USB)
   /*
* turn off USB to prevent the host controller from writing to the
 diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
 index 14243b8..069ad87 100644
 --- a/drivers/net/netconsole.c
 +++ b/drivers/net/netconsole.c
 @@ -39,6 +39,11 @@ static IPaddr_t nc_ip; /* server ip */
  static short nc_port; /* source/target port */
  static const char *output_packet; /* used by first send udp */
  static int output_packet_len;
 +/*
 + * Start with a default last protocol.
 + * We are only interested in NETCONS or not.
 + */
 +enum proto_t net_loop_last_protocol = BOOTP;
  
  static void nc_wait_arp_handler(uchar *pkt, unsigned dest,
IPaddr_t sip, unsigned src,
 @@ -131,8 +136,13 @@ static void nc_send_packet(const char *buf, int len)
   }
  
   if (eth-state != ETH_STATE_ACTIVE) {
 - if (eth_init(gd-bd)  0)
 - return;
 + if (eth_is_on_demand_init()) {
 + if (eth_init(gd-bd)  0)
 + return;
 + eth_set_last_protocol(NETCONS);
 + } else
 + eth_init_state_only(gd-bd);
 +
   inited = 1;
   }
   pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE;
 @@ -141,8 +151,12 @@ static void nc_send_packet(const char *buf, int len)
   ip = nc_ip;
   NetSendUDPPacket(ether, ip, nc_port, nc_port, len);
  
 - if (inited)
 - eth_halt();
 + if (inited) {
 + if (eth_is_on_demand_init())
 + eth_halt();
 + else
 + eth_halt_state_only();
 + }
  }
  
  static int nc_start(void)
 diff --git a/include/net.h b/include/net.h
 index 6d2d6cd..e193b7b 100644
 --- a/include/net.h
 +++ b/include/net.h
 @@ -102,7 +102,14 @@ extern int eth_register(struct eth_device* dev);/* 
 Register network device */
  extern int eth_unregister(struct eth_device *dev);/* Remove network device */
  extern void eth_try_another(int first_restart);  /* Change the device */
  extern void eth_set_current(void);   /* set nterface to ethcur var */
 -extern struct eth_device *eth_get_dev(void); /* get the current device MAC */
 +/* get the current device MAC */
 +static inline __attribute__((always_inline))
 +struct eth_device 

Re: [U-Boot] [PATCH 1/3] nds32: drop bi_enetaddr from global data

2012-08-10 Thread Macpaul Lin
Hi Mike,

2012/8/7 Mike Frysinger vap...@gentoo.org:
 Nothing is using this, so punt it from the gd.  Seems to just be a copy
  paste wart from the initial port.

 Signed-off-by: Mike Frysinger vap...@gentoo.org
 ---
  arch/nds32/include/asm/u-boot.h |1 -
  1 file changed, 1 deletion(-)

Applied to u-boot-nds32.git/master
Thanks.

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


Re: [U-Boot] [PATCH 2/3] nds32: delete unused local variable

2012-08-10 Thread Macpaul Lin
Hi Mike,

2012/8/7 Mike Frysinger vap...@gentoo.org:
 Fixes the build-time warning:
 board.c: In function 'board_init_r':
 board.c:304: warning: unused variable 's'

 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied to u-boot-nds32.git/master
Thanks.

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


Re: [U-Boot] [PATCH 3/3] nds32: fix unused pmu_init warning

2012-08-10 Thread Macpaul Lin
Hi Mike,

2012/8/7 Mike Frysinger vap...@gentoo.org:
 Fixes the build-time warning:
 board.c: At top level:
 board.c:106: warning: 'pmu_init' defined but not used

 This makes the ifdef logic at the call site match the logic at the
 function definition.

 Signed-off-by: Mike Frysinger vap...@gentoo.org

Applied to u-boot-nds32.git/master
Thanks.

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


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

2012-08-10 Thread Macpaul Lin
Dear Wolfgang,

Please pull the following 3 patches from u-boot-nds32 into your tree.

Thanks!
Macpaul Lin.

The following changes since commit 4d3c95f5ea7c737a21cd6b9c59435ee693b3f127:

  zfs: Add ZFS filesystem support (2012-08-09 23:42:20 +0200)

are available in the git repository at:

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

for you to fetch changes up to 11a05fbde76765e4b256b86aa3b82ea3184e3c08:

  nds32: fix unused pmu_init warning (2012-08-11 00:43:28 +0800)


Mike Frysinger (3):
  nds32: drop bi_enetaddr from global data
  nds32: delete unused local variable
  nds32: fix unused pmu_init warning

 arch/nds32/include/asm/u-boot.h | 1 -
 arch/nds32/lib/board.c  | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 0/5] Cleanup and extend env vars

2012-08-10 Thread Benoît Thébaudeau
Hi all,

This series does some cleanup regarding env vars, and it adds a new env var for
the board revision.

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


[U-Boot] [PATCH 1/5] fw_env: Add env vars describing U-Boot target board

2012-08-10 Thread Benoît Thébaudeau
Commit 5e724ca did the same thing for env_common and env_embedded, but forgot
fw_env.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Wolfgang Denk w...@denx.de
---
 .../tools/env/fw_env.c |   11 +++
 1 file changed, 11 insertions(+)

diff --git u-boot-4d3c95f.orig/tools/env/fw_env.c 
u-boot-4d3c95f/tools/env/fw_env.c
index e292d2b..1a2c227 100644
--- u-boot-4d3c95f.orig/tools/env/fw_env.c
+++ u-boot-4d3c95f/tools/env/fw_env.c
@@ -203,6 +203,17 @@ static char default_environment[] = {
 #if defined(CONFIG_PCI_BOOTDELAY)  (CONFIG_PCI_BOOTDELAY  0)
pcidelay= MK_STR (CONFIG_PCI_BOOTDELAY) \0
 #endif
+#ifdef CONFIG_ENV_VARS_UBOOT_CONFIG
+   arch= CONFIG_SYS_ARCH \0
+   cpu= CONFIG_SYS_CPU \0
+   board= CONFIG_SYS_BOARD \0
+#ifdef CONFIG_SYS_VENDOR
+   vendor= CONFIG_SYS_VENDOR \0
+#endif
+#ifdef CONFIG_SYS_SOC
+   soc= CONFIG_SYS_SOC \0
+#endif
+#endif
 #ifdef  CONFIG_EXTRA_ENV_SETTINGS
CONFIG_EXTRA_ENV_SETTINGS
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/5] env_common: Add missing ethprime

2012-08-10 Thread Benoît Thébaudeau
The ethprime env var was missing from env_common.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Wolfgang Denk w...@denx.de
---
 .../common/env_common.c|3 +++
 1 file changed, 3 insertions(+)

diff --git u-boot-4d3c95f.orig/common/env_common.c 
u-boot-4d3c95f/common/env_common.c
index d9e990d..911a6af 100644
--- u-boot-4d3c95f.orig/common/env_common.c
+++ u-boot-4d3c95f/common/env_common.c
@@ -80,6 +80,9 @@ const uchar default_environment[] = {
 #ifdef CONFIG_ETH5ADDR
eth5addr= MK_STR(CONFIG_ETH5ADDR) \0
 #endif
+#ifdef CONFIG_ETHPRIME
+   ethprime= CONFIG_ETHPRIME \0
+#endif
 #ifdef CONFIG_IPADDR
ipaddr=   MK_STR(CONFIG_IPADDR)   \0
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/5] env import/export: Remove from help if disabled

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Wolfgang Denk w...@denx.de
---
 .../common/cmd_nvedit.c|4 
 1 file changed, 4 insertions(+)

diff --git u-boot-4d3c95f.orig/common/cmd_nvedit.c 
u-boot-4d3c95f/common/cmd_nvedit.c
index fd05e72..0f320cc 100644
--- u-boot-4d3c95f.orig/common/cmd_nvedit.c
+++ u-boot-4d3c95f/common/cmd_nvedit.c
@@ -954,11 +954,15 @@ U_BOOT_CMD(
 #if defined(CONFIG_CMD_EDITENV)
env edit name - edit environment variable\n
 #endif
+#if defined(CONFIG_CMD_EXPORTENV)
env export [-t | -b | -c] [-s size] addr [var ...] - export 
environment\n
+#endif
 #if defined(CONFIG_CMD_GREPENV)
env grep string [...] - search environment\n
 #endif
+#if defined(CONFIG_CMD_IMPORTENV)
env import [-d] [-t | -b | -c] addr [size] - import environment\n
+#endif
env print [name ...] - print environment\n
 #if defined(CONFIG_CMD_RUN)
env run var [...] - run commands in an environment variable\n
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 4/5] README: The ver env var is not read-only

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Wolfgang Denk w...@denx.de
---
 {u-boot-4d3c95f.orig = u-boot-4d3c95f}/README |1 -
 1 file changed, 1 deletion(-)

diff --git u-boot-4d3c95f.orig/README u-boot-4d3c95f/README
index fb9d904..369ea9c 100644
--- u-boot-4d3c95f.orig/README
+++ u-boot-4d3c95f/README
@@ -907,7 +907,6 @@ The following options need to be configured:
If this variable is defined, an environment variable
named ver is created by U-Boot showing the U-Boot
version as printed by the version command.
-   This variable is readonly.
 
 - Real-Time Clock:
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/5] Add env var giving the board revision

2012-08-10 Thread Benoît Thébaudeau
The board revision can be a useful env var, like its serial number.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Wolfgang Denk w...@denx.de
---
 {u-boot-4d3c95f.orig = u-boot-4d3c95f}/README |   21 ++--
 .../common/cmd_nvedit.c|5 +++--
 .../tools/env/fw_env.c |5 +++--
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git u-boot-4d3c95f.orig/README u-boot-4d3c95f/README
index 369ea9c..2ea48cf 100644
--- u-boot-4d3c95f.orig/README
+++ u-boot-4d3c95f/README
@@ -2073,13 +2073,13 @@ The following options need to be configured:
 - Vendor Parameter Protection:
 
U-Boot considers the values of the environment
-   variables serial# (Board Serial Number) and
-   ethaddr (Ethernet Address) to be parameters that
-   are set once by the board vendor / manufacturer, and
-   protects these variables from casual modification by
-   the user. Once set, these variables are read-only,
-   and write or delete attempts are rejected. You can
-   change this behaviour:
+   variables serial# (Board Serial Number), rev
+   (Board Revision) and ethaddr (Ethernet Address)
+   to be parameters that are set once by the board
+   vendor / manufacturer, and protects these variables
+   from casual modification by the user. Once set,
+   these variables are read-only, and write or delete
+   attempts are rejected. You can change this behaviour:
 
If CONFIG_ENV_OVERWRITE is #defined in your config
file, the write protection for vendor parameters is
@@ -2090,8 +2090,8 @@ The following options need to be configured:
_and_ CONFIG_OVERWRITE_ETHADDR_ONCE, a default
Ethernet address is installed in the environment,
which can be changed exactly ONCE by the user. [The
-   serial# is unaffected by this, i. e. it remains
-   read-only.]
+   serial# and rev are unaffected by this, i. e. they
+   remain read-only.]
 
 - Protected RAM:
CONFIG_PRAM
@@ -3968,10 +3968,11 @@ depending the information provided by your boot server:
   serverip - see above
 
 
-There are two special Environment Variables:
+There are three special Environment Variables:
 
   serial#  - contains hardware identification information such
  as type string and/or serial number
+  rev  - hardware revision
   ethaddr  - Ethernet address
 
 These variables can be set only once (usually during manufacturing of
diff --git u-boot-4d3c95f.orig/common/cmd_nvedit.c 
u-boot-4d3c95f/common/cmd_nvedit.c
index 0f320cc..d16aeb6 100644
--- u-boot-4d3c95f.orig/common/cmd_nvedit.c
+++ u-boot-4d3c95f/common/cmd_nvedit.c
@@ -255,12 +255,13 @@ int _do_env_set(int flag, int argc, char * const argv[])
}
 
/*
-* Some variables like ethaddr and serial# can be set only
-* once and cannot be deleted; also, ver is readonly.
+* Some variables like ethaddr, serial# and rev can be set only
+* once and cannot be deleted.
 */
if (ep) {   /* variable exists */
 #ifndef CONFIG_ENV_OVERWRITE
if (strcmp(name, serial#) == 0 ||
+   strcmp(name, rev) == 0 ||
(strcmp(name, ethaddr) == 0
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE)  defined(CONFIG_ETHADDR)
  strcmp(ep-data, MK_STR(CONFIG_ETHADDR)) != 0
diff --git u-boot-4d3c95f.orig/tools/env/fw_env.c 
u-boot-4d3c95f/tools/env/fw_env.c
index 1a2c227..b5aa3aa 100644
--- u-boot-4d3c95f.orig/tools/env/fw_env.c
+++ u-boot-4d3c95f/tools/env/fw_env.c
@@ -405,10 +405,11 @@ int fw_env_write(char *name, char *value)
if (oldval) {
 #ifndef CONFIG_ENV_OVERWRITE
/*
-* Ethernet Address and serial# can be set only once
+* Ethernet Address, serial# and rev can be set only once
 */
if (
(strcmp(name, serial#) == 0) ||
+   (strcmp (name, rev) == 0) ||
((strcmp(name, ethaddr) == 0)
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE)  defined(CONFIG_ETHADDR)
 (strcmp(oldval, MK_STR(CONFIG_ETHADDR)) != 0)
@@ -474,7 +475,7 @@ int fw_env_write(char *name, char *value)
  * Deletes or sets environment variables. Returns -1 and sets errno error 
codes:
  * 0 - OK
  * EINVAL - need at least 1 argument
- * EROFS  - certain variables (ethaddr, serial#) cannot be
+ * EROFS  - certain variables (ethaddr, serial#, rev) cannot be
  * modified or deleted
  *
  */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] eth_write_hwaddr: Return error for invalid MACs

2012-08-10 Thread Benoît Thébaudeau
If dev-enetaddr was supposed to be set with dev-write_hwaddr() but the MAC
address was not valid, return an error.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Joe Hershberger joe.hershber...@gmail.com
---
 {u-boot-4d3c95f.orig = u-boot-4d3c95f}/net/eth.c |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/net/eth.c u-boot-4d3c95f/net/eth.c
index 1a11ce1..174361f 100644
--- u-boot-4d3c95f.orig/net/eth.c
+++ u-boot-4d3c95f/net/eth.c
@@ -222,9 +222,12 @@ int eth_write_hwaddr(struct eth_device *dev, const char 
*base_name,
}
 
if (dev-write_hwaddr 
-   !eth_mac_skip(eth_number) 
-   is_valid_ether_addr(dev-enetaddr))
+   !eth_mac_skip(eth_number)) {
+   if (!is_valid_ether_addr(dev-enetaddr))
+   return -1;
+
ret = dev-write_hwaddr(dev);
+   }
 
return ret;
 }
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RFC PATCH 0/5] Port of MUSB gadget driver from Linux

2012-08-10 Thread Ilya Yanok
Dear Marek, Wolfgang,

On Thu, Aug 9, 2012 at 11:23 PM, Wolfgang Denk w...@denx.de wrote:


  I hate to say it ... but given that this will cause duplication of code,
 I'm
  somehow inclined to push you to do a complete replacement of the old
 musb code,
  remove it and add this.


 Agreed, we should avoid such duplication.


I agree with you generally. But I fear I won't have enough time now to port
the host part too. Also please note that usbtty works only with the old API
now.

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


Re: [U-Boot] [PATCH v4 1/5] net/bootp: add VCI support for BOOTP also

2012-08-10 Thread Ilya Yanok
Hi Joe,

On Mon, Aug 6, 2012 at 1:21 AM, Ilya Yanok ilya.ya...@cogentembedded.comwrote:

 Vendor Class Identifier option is common to BOOTP and DHCP and
 can be useful without PXE. So send VCI in both BOOTP and DHCP
 requests if CONFIG_BOOTP_VCI_STRING is defined.

 Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com

 ---
 Changes in v4:
  - moved vci_strlen var inside macro
  - used strlen instead of sizeof


Is it ok now? What about the rest of the series?

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


Re: [U-Boot] [PATCH v4 5/7] usb_storage: Adjust time-outs

2012-08-10 Thread Ilya Yanok
Hi Benoit,

On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau 
benoit.thebaud...@advansee.com wrote:

 Adjust time-out value for the new EHCI mechanism.


Could you please be a bit more specific? ;)

How this timeout is related to the new mechanism? Is it really EHCI
specific? If it is, that's hardcoding of lower layer details again, I think
that's undesirable...

But generally this series looks really good. Thanks a lot!

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


Re: [U-Boot] [PATCH v3 0/6] env: handle special variables and selective env default

2012-08-10 Thread Wolfgang Denk
Dear Holger,

In message 5024cc15.8010...@keymile.com you wrote:
 
 due to the fact that Gerlando is in his vacations and has therefore only 
 little
 time to do updates here I propose the following. I could prepare a branch as 
 you
 suggested based on current denx master with this changeset. But where and how
 should I push it to git.denx.de? Or will you prepare this branch?

I already did.

I guess we will not have -rc1 before end of week 36, if not even
later, so this should work out nicely.

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
There are two ways to write error-free programs. Only the  third  one
works.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5 1/1] zfs: Add ZFS filesystem support

2012-08-10 Thread Wolfgang Denk
Dear Jorgen Lundman,

In message 5024f981.2040...@lundman.net you wrote:

 That is the best news ever, thanks! Also thanks to Graeme for all the help.

Thanks for your hard work, it's highly appreciated (even though it
sometimes doesn't look like that - it really is).

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
Advice is seldom welcome; and those who want it the most always like
it the least. -- Philip Earl of Chesterfield
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 5/7] usb_storage: Adjust time-outs

2012-08-10 Thread Benoît Thébaudeau
Hi Ilya,

On Fri, Aug 10, 2012 at 8:03:12 PM, Ilya Yanok wrote:
 Hi Benoit,

 On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau 
 benoit.thebaud...@advansee.com  wrote:

  Adjust time-out value for the new EHCI mechanism.
 

 Could you please be a bit more specific? ;)

 How this timeout is related to the new mechanism? Is it really EHCI
 specific? If it is, that's hardcoding of lower layer details again,
 I think that's undesirable...

Well, I did this specific patch a very long time ago, and I don't remember the
details. I know that things did not work without it in my test conditions at
that time. I've just run again all my tests with the current code on all my
platforms without this patch, and everything works fine. So it was perhaps a
device-related issue rather than an EHCI-related one. Since the rationale for
this patch is no longer clear and things work fine without it, we can probably
drop it. I let you and Marek decide.

 But generally this series looks really good. Thanks a lot!

Great. You're welcome.

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


Re: [U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Ilya Yanok
Hi Benoit,

On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau 
benoit.thebaud...@advansee.com wrote:

 diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c
 u-boot-usb-4f8254e/common/usb_storage.c
 index 0cd6399..822bd64 100644
 --- u-boot-usb-4f8254e.orig/common/usb_storage.c
 +++ u-boot-usb-4f8254e/common/usb_storage.c
 @@ -157,12 +157,13 @@ struct us_data {

  #ifdef CONFIG_USB_EHCI
  /*
 - * The U-Boot EHCI driver cannot handle more than 5 page aligned buffers
 - * of 4096 bytes in a transfer without running itself out of qt_buffers
 + * The U-Boot EHCI driver can handle any transfer length as long as there
 is
 + * enough free heap space left, but the SCSI READ(10) and WRITE(10)
 commands are
 + * limited to 65535 bytes.


bytes?


   */
 -#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start % 4096)) /
 blksz)
 +#define USB_MAX_XFER_BLK   65535


But here you limit it to 65535 _blocks_, right? One of the two should be
wrong ;)

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


Re: [U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Benoît Thébaudeau
Hi Ilya,

On Fri, Aug 10, 2012 at 8:34:14 PM, Ilya Yanok wrote:
 Hi Benoit,

 On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau 
 benoit.thebaud...@advansee.com  wrote:

  diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c
  u-boot-usb-4f8254e/common/usb_storage.c
 
  index 0cd6399..822bd64 100644
 
  --- u-boot-usb-4f8254e.orig/common/usb_storage.c
 
  +++ u-boot-usb-4f8254e/common/usb_storage.c
 
  @@ -157,12 +157,13 @@ struct us_data {
 

  #ifdef CONFIG_USB_EHCI
 
  /*
 
  - * The U-Boot EHCI driver cannot handle more than 5 page aligned
  buffers
 
  - * of 4096 bytes in a transfer without running itself out of
  qt_buffers
 
  + * The U-Boot EHCI driver can handle any transfer length as long
  as
  there is
 
  + * enough free heap space left, but the SCSI READ(10) and
  WRITE(10)
  commands are
 
  + * limited to 65535 bytes.
 

 bytes?

  */
 
  -#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start %
  4096)) / blksz)
 
  +#define USB_MAX_XFER_BLK 65535
 

 But here you limit it to 65535 _blocks_, right? One of the two should
 be wrong ;)

Argh, it was a typo in the comment. Thanks for catching this. I meant blocks
of course. Marek, can you fix this comment on-the-fly when applying?

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


[U-Boot] [PATCH] mxc_spi: Round up clock divider

2012-08-10 Thread Benoît Thébaudeau
Since the input frequency of the API is a maximum that should not be exceeded in
order for the devices to operate properly, the SPI clock divider should be
rounded up, not truncated.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Wolfgang Denk w...@denx.de
Cc: Stefano Babic sba...@denx.de
---
 .../drivers/spi/mxc_spi.c  |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/drivers/spi/mxc_spi.c 
u-boot-4d3c95f/drivers/spi/mxc_spi.c
index 2e15318..cf1462f 100644
--- u-boot-4d3c95f.orig/drivers/spi/mxc_spi.c
+++ u-boot-4d3c95f/drivers/spi/mxc_spi.c
@@ -96,7 +96,7 @@ static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned 
int cs,
 
clk_src = mxc_get_clock(MXC_CSPI_CLK);
 
-   div = clk_src / max_hz;
+   div = DIV_ROUND_UP(clk_src, max_hz);
div = get_cspi_div(div);
 
debug(clk %d Hz, div %d, real clk %d Hz\n,
@@ -147,7 +147,7 @@ static s32 spi_cfg_mxc(struct mxc_spi_slave *mxcs, unsigned 
int cs,
 * The following computation is taken directly from Freescale's code.
 */
if (clk_src  max_hz) {
-   pre_div = clk_src / max_hz;
+   pre_div = DIV_ROUND_UP(clk_src, max_hz);
if (pre_div  16) {
post_div = pre_div / 16;
pre_div = 15;
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] mmc_get_dev: Return error if mmc_init fails

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Andy Fleming aflem...@gmail.com
---
 .../drivers/mmc/mmc.c  |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/drivers/mmc/mmc.c 
u-boot-4d3c95f/drivers/mmc/mmc.c
index c1c2862..c0b969c 100644
--- u-boot-4d3c95f.orig/drivers/mmc/mmc.c
+++ u-boot-4d3c95f/drivers/mmc/mmc.c
@@ -1311,10 +1311,9 @@ int mmc_register(struct mmc *mmc)
 block_dev_desc_t *mmc_get_dev(int dev)
 {
struct mmc *mmc = find_mmc_device(dev);
-   if (!mmc)
+   if (!mmc || mmc_init(mmc))
return NULL;
 
-   mmc_init(mmc);
return mmc-block_dev;
 }
 #endif
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Fail to compile a DEBUG version of u-boot.bin for Freescale MPC8536DS

2012-08-10 Thread Yuming Chen
Hi,
   I tried to build a u-boot.bin for Freescale MPC8526DS with original
version 2010.12 source code, it succeeds if I do not define DEBUG in
the MPC8536DS.h file.  But after I added #define DEBUG in
include/configs/MPC8536DS.h to turn on many printf, the build of the
uboot fails as follows,

/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: section .bootpg [e000 -
e22f] overlaps section .data [efffec1c - f0006caf]
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: section .resetvec [effc -
efff] overlaps section .data [efffec1c - f0006caf]
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: u-boot: section .bootpg lma
0xe000 overlaps previous sections
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: u-boot: section .resetvec lma
0xeffc overlaps previous sections
/eldk/eldk-4.1/usr/bin/ppc_85xx-ld: u-boot: section .u_boot_cmd lma
0xf0006cb0 overlaps previous sections
make: *** [u-boot] Error 1

Is there an easy solution?  How can I adjust the space usage to build
a debug version of u-boot.bin?

Thanks.






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


Re: [U-Boot] [RFC PATCH 0/5] Port of MUSB gadget driver from Linux

2012-08-10 Thread Ilya Yanok
Marek, Wolfgang,

On Fri, Aug 10, 2012 at 9:56 PM, Ilya Yanok
ilya.ya...@cogentembedded.comwrote:

 Dear Marek, Wolfgang,

 On Thu, Aug 9, 2012 at 11:23 PM, Wolfgang Denk w...@denx.de wrote:


  I hate to say it ... but given that this will cause duplication of
 code, I'm
  somehow inclined to push you to do a complete replacement of the old
 musb code,
  remove it and add this.


 Agreed, we should avoid such duplication.


 I agree with you generally. But I fear I won't have enough time now to
 port the host part too. Also please note that usbtty works only with the
 old API now.


Also current MUSB code supports a number of systems, I could add support
for all these to the new code (I just don't have the hardware). So I think
it's better to allow the two versions coexist for some time.

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


Re: [U-Boot] [RFC PATCH 0/5] Port of MUSB gadget driver from Linux

2012-08-10 Thread Ilya Yanok
Argh, sorry. could = could not.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] mmcinfo: Fix help message

2012-08-10 Thread Benoît Thébaudeau
Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Andy Fleming aflem...@gmail.com
---
 .../common/cmd_mmc.c   |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git u-boot-4d3c95f.orig/common/cmd_mmc.c u-boot-4d3c95f/common/cmd_mmc.c
index 750509d..79a1088 100644
--- u-boot-4d3c95f.orig/common/cmd_mmc.c
+++ u-boot-4d3c95f/common/cmd_mmc.c
@@ -144,8 +144,7 @@ int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char 
* const argv[])
 U_BOOT_CMD(
mmcinfo, 1, 0, do_mmcinfo,
display MMC info,
-   - device number of the device to dislay info of\n
-   
+   - dislay info of the current MMC device
 );
 
 int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] net: Improve the speed of netconsole

2012-08-10 Thread Joe Hershberger
Hi Mike,

On Fri, Aug 3, 2012 at 3:59 PM, Joe Hershberger joe.hershber...@ni.com wrote:
 Previously u-boot would initialize the network interface for every
 network operation and then shut it down again.  This makes sense for
 most operations where the network in not known to be needed soon after
 the operation is complete.  In the case of netconsole, it will use the
 network for every interaction with the shell or every printf.  This
 means that the network is being reinitialized very often.  On many
 devices, this intialization is very slow.

 This patch checks for consecutive netconsole actions and leaves the
 ethernet hardware initialized between them.  It will still behave the
 same old way for all other network operations and any time another
 network operation happens between netconsole operations.

 Signed-off-by: Joe Hershberger joe.hershber...@ni.com
 Cc: Stefano Babic sba...@denx.de

Sorry I forgot to Cc you on the update... I also forgot the revision notes...

Changes since v1:
 - Halt Ethernet stack before booting Linux
 - Clean up CPP guard noise
 - Reduce overhead of no-re-init case

 ---
  common/cmd_bootm.c   |   17 +
  drivers/net/netconsole.c |   22 ++
  include/net.h|   42 +-
  net/eth.c|8 ++--
  net/net.c|   26 --
  5 files changed, 98 insertions(+), 17 deletions(-)

 diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
 index 45e726a..83fa5d7 100644
 --- a/common/cmd_bootm.c
 +++ b/common/cmd_bootm.c
 @@ -564,6 +564,13 @@ int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int 
 argc,
 break;
 case BOOTM_STATE_OS_GO:
 disable_interrupts();
 +#ifdef CONFIG_NETCONSOLE
 +   /*
 +* Stop the ethernet stack if NetConsole could have
 +* left it up
 +*/
 +   eth_halt();
 +#endif
 arch_preboot_os();
 boot_fn(BOOTM_STATE_OS_GO, argc, argv, images);
 break;
 @@ -622,6 +629,11 @@ int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char 
 * const argv[])
  */
 iflag = disable_interrupts();

 +#ifdef CONFIG_NETCONSOLE
 +   /* Stop the ethernet stack if NetConsole could have left it up */
 +   eth_halt();
 +#endif
 +
  #if defined(CONFIG_CMD_USB)
 /*
  * turn off USB to prevent the host controller from writing to the
 @@ -1599,6 +1611,11 @@ static int do_bootz(cmd_tbl_t *cmdtp, int flag, int 
 argc, char * const argv[])
  */
 disable_interrupts();

 +#ifdef CONFIG_NETCONSOLE
 +   /* Stop the ethernet stack if NetConsole could have left it up */
 +   eth_halt();
 +#endif
 +
  #if defined(CONFIG_CMD_USB)
 /*
  * turn off USB to prevent the host controller from writing to the
 diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
 index 14243b8..069ad87 100644
 --- a/drivers/net/netconsole.c
 +++ b/drivers/net/netconsole.c
 @@ -39,6 +39,11 @@ static IPaddr_t nc_ip; /* server ip */
  static short nc_port; /* source/target port */
  static const char *output_packet; /* used by first send udp */
  static int output_packet_len;
 +/*
 + * Start with a default last protocol.
 + * We are only interested in NETCONS or not.
 + */
 +enum proto_t net_loop_last_protocol = BOOTP;

  static void nc_wait_arp_handler(uchar *pkt, unsigned dest,
  IPaddr_t sip, unsigned src,
 @@ -131,8 +136,13 @@ static void nc_send_packet(const char *buf, int len)
 }

 if (eth-state != ETH_STATE_ACTIVE) {
 -   if (eth_init(gd-bd)  0)
 -   return;
 +   if (eth_is_on_demand_init()) {
 +   if (eth_init(gd-bd)  0)
 +   return;
 +   eth_set_last_protocol(NETCONS);
 +   } else
 +   eth_init_state_only(gd-bd);
 +
 inited = 1;
 }
 pkt = (uchar *)NetTxPacket + NetEthHdrSize() + IP_UDP_HDR_SIZE;
 @@ -141,8 +151,12 @@ static void nc_send_packet(const char *buf, int len)
 ip = nc_ip;
 NetSendUDPPacket(ether, ip, nc_port, nc_port, len);

 -   if (inited)
 -   eth_halt();
 +   if (inited) {
 +   if (eth_is_on_demand_init())
 +   eth_halt();
 +   else
 +   eth_halt_state_only();
 +   }
  }

  static int nc_start(void)
 diff --git a/include/net.h b/include/net.h
 index 6d2d6cd..e193b7b 100644
 --- a/include/net.h
 +++ b/include/net.h
 @@ -102,7 +102,14 @@ extern int eth_register(struct eth_device* dev);/* 
 Register network device */
  extern int eth_unregister(struct eth_device *dev);/* Remove network device */
  extern void 

[U-Boot] [PATCH] mtest: Disable dcache during test

2012-08-10 Thread Benoît Thébaudeau
mtest is supposed to test many types of memory accesses in many different
conditions. If dcache is enabled, memory accesses are likely bursts, and some
memory accesses are simply skipped. Hence, dcache should be disabled during
mtest operation so that what mtest actually tests is not masked by dcache.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Wolfgang Denk w...@denx.de
---
 .../common/cmd_mem.c   |   39 ++--
 1 file changed, 27 insertions(+), 12 deletions(-)

diff --git u-boot-4d3c95f.orig/common/cmd_mem.c u-boot-4d3c95f/common/cmd_mem.c
index 18f0a3f..5d2b735 100644
--- u-boot-4d3c95f.orig/common/cmd_mem.c
+++ u-boot-4d3c95f/common/cmd_mem.c
@@ -600,6 +600,8 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
ulong   errs = 0;
int iterations = 1;
int iteration_limit;
+   int dcache;
+   int ret = 1;
 
 #if defined(CONFIG_SYS_ALT_MEMTEST)
vu_long len;
@@ -651,6 +653,13 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
else
iteration_limit = 0;
 
+   /* Perform tests on the underlying memory rather than on the D-cache. */
+   dcache = dcache_status();
+   if (dcache) {
+   dcache_disable();
+   invalidate_dcache_all();
+   }
+
 #if defined(CONFIG_SYS_ALT_MEMTEST)
printf (Testing %08x ... %08x:\n, (uint)start, (uint)end);
debug(%s:%d: start 0x%p end 0x%p\n,
@@ -659,14 +668,15 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
for (;;) {
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
 
 
if (iteration_limit  iterations  iteration_limit) {
printf(Tested %d iteration(s) with %lu errors.\n,
iterations-1, errs);
-   return errs != 0;
+   ret = errs != 0;
+   goto end;
}
 
printf(Iteration: %6d\r, iterations);
@@ -704,7 +714,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
*addr  = ~val;
@@ -717,7 +727,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
}
@@ -787,7 +797,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
}
@@ -809,7 +819,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
}
@@ -851,7 +861,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
 
@@ -873,7 +883,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
errs++;
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
}
start[offset] = 0;
@@ -885,13 +895,14 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
for (;;) {
if (ctrlc()) {
putc ('\n');
-   return 1;
+   goto end;
}
 
if (iteration_limit  iterations  iteration_limit) {
printf(Tested %d iteration(s) with %lu errors.\n,
iterations-1, errs);
-   return errs != 0;
+   ret = errs != 0;
+   

Re: [U-Boot] [PATCH v4 4/7] usb_storage: Remove EHCI constraints

2012-08-10 Thread Marek Vasut
Dear Benoît Thébaudeau,

 Hi Ilya,
 
 On Fri, Aug 10, 2012 at 8:34:14 PM, Ilya Yanok wrote:
  Hi Benoit,
  
  On Fri, Aug 10, 2012 at 8:23 PM, Benoît Thébaudeau 
  
  benoit.thebaud...@advansee.com  wrote:
   diff --git u-boot-usb-4f8254e.orig/common/usb_storage.c
   u-boot-usb-4f8254e/common/usb_storage.c
   
   index 0cd6399..822bd64 100644
   
   --- u-boot-usb-4f8254e.orig/common/usb_storage.c
   
   +++ u-boot-usb-4f8254e/common/usb_storage.c
   
   @@ -157,12 +157,13 @@ struct us_data {
   
   
   #ifdef CONFIG_USB_EHCI
   
   /*
   
   - * The U-Boot EHCI driver cannot handle more than 5 page aligned
   buffers
   
   - * of 4096 bytes in a transfer without running itself out of
   qt_buffers
   
   + * The U-Boot EHCI driver can handle any transfer length as long
   as
   there is
   
   + * enough free heap space left, but the SCSI READ(10) and
   WRITE(10)
   commands are
   
   + * limited to 65535 bytes.
  
  bytes?
  
   */
   
   -#define USB_MAX_XFER_BLK(start, blksz) (((4096 * 5) - (start %
   4096)) / blksz)
   
   +#define USB_MAX_XFER_BLK 65535
  
  But here you limit it to 65535 _blocks_, right? One of the two should
  be wrong ;)
 
 Argh, it was a typo in the comment. Thanks for catching this. I meant
 blocks of course. Marek, can you fix this comment on-the-fly when
 applying?

Roger, will do!

 Best regards,
 Benoît

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


Re: [U-Boot] [PATCH] serial: CONSOLE macro is not used

2012-08-10 Thread Anatolij Gustschin
Hi,

On Fri, 10 Aug 2012 09:04:28 +0200
Michal Simek mon...@monstr.eu wrote:

 Signed-off-by: Michal Simek mon...@monstr.eu
 ---
  drivers/serial/serial.c |3 ---
  1 files changed, 0 insertions(+), 3 deletions(-)

Applied to my staging branch, thanks!

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


[U-Boot] [PATCH] avr32: Remove redundant LDSCRIPT definition

2012-08-10 Thread Benoît Thébaudeau
AVR32's LD script uses a standard location that is now automatically detected by
the main Makefile, so its definition in AVR32's config.mk is now obsolete and
redundant.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Andreas Bießmann andreas.de...@googlemail.com
---
 .../arch/avr32/config.mk   |2 --
 1 file changed, 2 deletions(-)

diff --git u-boot-4d3c95f.orig/arch/avr32/config.mk 
u-boot-4d3c95f/arch/avr32/config.mk
index d8e7ebb..a751a3d 100644
--- u-boot-4d3c95f.orig/arch/avr32/config.mk
+++ u-boot-4d3c95f/arch/avr32/config.mk
@@ -29,5 +29,3 @@ PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got 
-mrelax
 PLATFORM_RELFLAGS  += -ffunction-sections -fdata-sections
 
 LDFLAGS_u-boot = --gc-sections --relax
-
-LDSCRIPT   = $(SRCTREE)/$(CPUDIR)/u-boot.lds
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] fdt: Include arch specific gpio.h instead of asm-generic/gpio.h

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed, 11 Jul 2012 14:26:38 +0200
Michal Simek mon...@monstr.eu wrote:

 Include arch specific gpio.h instead of asm-generic/gpio.h
 because several architectures (Microblaze, Blackfin, Nios2, OpenRISC)
 define gpio functions in header file.
 asm-generic/gpio.h can be included in arch specific gpio.h
 (For example: ARM)
 
 Signed-off-by: Michal Simek mon...@monstr.eu
 CC: Simon Glass s...@chromium.org
 
 ---
 v2: Use only arch specific gpio.h
 Remove commentary
 ---
  lib/fdtdec.c |3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)

applied to my staging branch, thanks!

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


Re: [U-Boot] Please pull u-boot-staging/tr...@ti.com

2012-08-10 Thread Wolfgang Denk
Dear Tom,

In message 20120810161021.GG3306@bill-the-cat you wrote:
 
 To try and ease the backlog of ARM changes, I've taken the liberty of
 grabbing the Snowball and Raspberry Pi model B board support patches and
 putting them into the staging tree.  Both of these series have been
 posted for some time and been reviewed.  Wolfgang, if you would like to
 wait for Albert to pick up this request, that's fine.  I just wanted to
 make sure the submitters weren't left waiting.  Thanks!

Thanks, highly appreciated.

As this contains a lot of ARM, indeed I would like to wait for
Albert's ACK or pulling (whichever he prefers).

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
Politics:  A  strife  of  interests  masquerading  as  a  contest  of
principles. The conduct of public affairs for private advantage.
- Ambrose Bierce
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 0/7] ehci: Improve performance

2012-08-10 Thread Marek Vasut
Dear Benoît Thébaudeau,

 Hi all,
 
 This series aims at improving EHCI performance. There is also some code
 cleanup BTW.
 
 Best regards,
 Benoît

Applied all but 5/7 and pushed. Since we all have vacations etc etc, this will 
appear in the mainline around start of september.

Thanks a lot for this awesome patchset! _Great_ work guys!

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


Re: [U-Boot] [PATCH] tools: add kwboot binary to .gitignore file

2012-08-10 Thread Anatolij Gustschin
Hi,

On Sun, 15 Jul 2012 18:29:38 +0200
Luka Perkov ub...@lukaperkov.net wrote:

 
 Signed-off-by: Luka Perkov ub...@lukaperkov.net
 ---
 
  tools/.gitignore |1 +
  1 file changed, 1 insertion(+)

applied to my staging branch, thanks!

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


[U-Boot] arm: omap: Fix switching back to nandecc sw.

2012-08-10 Thread Jeroen Hofstee

Switching back to nandecc sw fails to write correctly. A fix for this is
already mentioned in the thread below, lets fix it.

mentioned in http://lists.denx.de/pipermail/u-boot/2012-February/119002.html

Signed-off-by: Jeroen Hofstee jhofs...@victronenergy.com
---
 drivers/mtd/nand/omap_gpmc.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/omap_gpmc.c b/drivers/mtd/nand/omap_gpmc.c
index ca868ef..71aec1a 100644
--- a/drivers/mtd/nand/omap_gpmc.c
+++ b/drivers/mtd/nand/omap_gpmc.c
@@ -280,6 +280,7 @@ void omap_nand_switch_ecc(int32_t hardware)
 omap_hwecc_init(nand);
 printf(HW ECC selected\n);
 } else {
+nand-ecc.size = 0;
 nand-ecc.mode = NAND_ECC_SOFT;
 /* Use mtd default settings */
 nand-ecc.layout = NULL;
--
1.7.9.5

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


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

2012-08-10 Thread Wolfgang Denk
Dear Macpaul Lin,

In message CACCg+XP0dPFjnCovFqo=hd3ddnb5cjke5uvawijgeyxj2ux...@mail.gmail.com 
you wrote:
 Dear Wolfgang,
 
 Please pull the following 3 patches from u-boot-nds32 into your tree.
 
 Thanks!
 Macpaul Lin.
 
 The following changes since commit 4d3c95f5ea7c737a21cd6b9c59435ee693b3f127:
 
   zfs: Add ZFS filesystem support (2012-08-09 23:42:20 +0200)
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-nds32.git master
 
 for you to fetch changes up to 11a05fbde76765e4b256b86aa3b82ea3184e3c08:
 
   nds32: fix unused pmu_init warning (2012-08-11 00:43:28 +0800)
 
 
 Mike Frysinger (3):
   nds32: drop bi_enetaddr from global data
   nds32: delete unused local variable
   nds32: fix unused pmu_init warning
 
  arch/nds32/include/asm/u-boot.h | 1 -
  arch/nds32/lib/board.c  | 3 ++-
  2 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
We fight only when there is no other choice. We prefer  the  ways  of
peaceful contact.
-- Kirk, Spectre of the Gun, stardate 4385.3
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed,  8 Aug 2012 12:52:17 +0200
Marek Vasut ma...@denx.de wrote:

 This function converts static number to string in preprocessor.
 This is useful as it allows higher usage of puts() in favour of printf()
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Wolfgang Denk w...@denx.de
 ---
  include/common.h  |1 +
  include/linux/stringify.h |   12 
  2 files changed, 13 insertions(+)
  create mode 100644 include/linux/stringify.h

applied to my staging branch, thanks!

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


Re: [U-Boot] [PATCH 2/3] COMMON: Use __stringify() instead of xstr()

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed,  8 Aug 2012 12:52:18 +0200
Marek Vasut ma...@denx.de wrote:

 Kill multiple occurances and redeclaration of xstr in favor of __stringify().
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Wolfgang Denk w...@denx.de
 ---
  include/configs/MPC8308RDB.h|9 +++--
  include/configs/amcc-common.h   |   25 +++-
  include/configs/at91sam9263ek.h |5 +
  include/configs/cam_enc_4xx.h   |   36 
 +--
  include/configs/ea20.h  |   11 ---
  include/configs/enbw_cmc.h  |   19 --
  include/configs/flea3.h |   14 ++
  include/configs/ima3-mx53.h |   10 --
  include/configs/imx27lite-common.h  |   15 ++-
  include/configs/km/keymile-common.h |   13 +
  include/configs/km/km-powerpc.h |   12 ++--
  include/configs/km/km_arm.h |   14 +++---
  include/configs/manroland/common.h  |   21 +---
  include/configs/mpc8308_p1m.h   |9 +++--
  include/configs/mx35pdk.h   |   14 ++
  include/configs/qong.h  |9 +++--
  include/configs/tam3517-common.h|   11 ---
  include/configs/tx25.h  |5 +
  18 files changed, 104 insertions(+), 148 deletions(-)

applied, thanks!

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


Re: [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()

2012-08-10 Thread Anatolij Gustschin
Hi,

On Wed,  8 Aug 2012 12:52:19 +0200
Marek Vasut ma...@denx.de wrote:

 Kill multiple occurances and redeclaration of MK_STR
 in favor of __stringify().
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Wolfgang Denk w...@denx.de
 ---
  arch/blackfin/include/asm/config-pre.h |2 -
  arch/blackfin/lib/board.c  |2 +-
  board/w7o/w7o.c|9 +---
  common/cmd_nvedit.c|5 +-
  common/env_common.c|   34 ++--
  common/env_embedded.c  |   39 ++
  include/configs/M52277EVB.h|   18 +++
  include/configs/M5253DEMO.h|2 +-
  include/configs/M5373EVB.h |2 +-
  include/configs/M54451EVB.h|   10 ++--
  include/configs/M54455EVB.h|   16 +++---
  include/configs/MERGERBOX.h|   24 -
  include/configs/MPC8260ADS.h   |   22 
  include/configs/MPC8313ERDB.h  |   21 
  include/configs/MPC8323ERDB.h  |   21 
  include/configs/MPC8349ITX.h   |   33 ++--
  include/configs/MPC837XERDB.h  |   21 
  include/configs/MPC8536DS.h|   35 ++--
  include/configs/MPC8544DS.h|   33 +++-
  include/configs/MPC8548CDS.h   |   17 +++---
  include/configs/MPC8572DS.h|   35 ++--
  include/configs/MPC8610HPCD.h  |   93 
 +---
  include/configs/MPC8641HPCN.h  |   17 +++---
  include/configs/MVBC_P.h   |   38 ++---
  include/configs/MVBLM7.h   |   26 -
  include/configs/MVSMR.h|   30 +--
  include/configs/P1010RDB.h |4 +-
  include/configs/P1022DS.h  |4 +-
  include/configs/P1_P2_RDB.h|   19 ---
  include/configs/P2020DS.h  |   36 ++---
  include/configs/P2041RDB.h |6 +--
  include/configs/SIMPC8313.h|   21 
  include/configs/TQM85xx.h  |   12 +++--
  include/configs/bf537-minotaur.h   |2 +-
  include/configs/bf537-srv1.h   |2 +-
  include/configs/bfin_adi_common.h  |   13 ++---
  include/configs/blackstamp.h   |   10 ++--
  include/configs/blackvme.h |6 +--
  include/configs/corenet_ds.h   |6 +--
  include/configs/linkstation.h  |9 ++--
  include/configs/lsxl.h |4 +-
  include/configs/mcc200.h   |9 +---
  include/configs/p1_p2_rdb_pc.h |   22 
  include/configs/sbc8548.h  |   26 -
  include/configs/ve8313.h   |   21 +++-
  include/configs/xpedite1000.h  |6 +--
  include/configs/xpedite517x.h  |   12 ++---
  include/configs/xpedite520x.h  |   12 ++---
  include/configs/xpedite537x.h  |   12 ++---
  include/configs/xpedite550x.h  |   12 ++---
  tools/env/fw_env.c |   37 ++---
  51 files changed, 453 insertions(+), 475 deletions(-)

applied to my staging branch, thanks!

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


Re: [U-Boot] [PATCH v3] Consolidate bootcount code into drivers/bootcount

2012-08-10 Thread Wolfgang Denk
Dear Stefan Roese,

In message 1338878275-1918-1-git-send-email...@denx.de you wrote:
 This patch moves all bootcount implementations into a common
 directory: drivers/bootcount. The generic bootcount driver
 is now usable not only by powerpc platforms, but others as well.
 
 Signed-off-by: Stefan Roese s...@denx.de
 Cc: Heiko Schocher h...@denx.de
 Cc: Valentin Longchamp valentin.longch...@keymile.com
 Cc: Christian Riesch christian.rie...@omicron.at
 Cc: Manfred Rudigier manfred.rudig...@omicron.at
 Cc: Mike Frysinger vap...@gentoo.org
 Cc: Rob Herring rob.herr...@calxeda.com
 Cc: Reinhard Meyer reinhard.me...@emk-elektronik.de
 Tested-by: Valentin Longchamp valentin.longch...@keymile.com
 Tested-by: Christian Riesch christian.rie...@omicron.at

Sorry, this does not apply any more:

Applying patch #163024 to current directory
Description: [U-Boot,v3] Consolidate bootcount code into
drivers/bootcount
Applying: Consolidate bootcount code into drivers/bootcount
fatal: sha1 information is lacking or useless (Makefile).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Consolidate bootcount code into drivers/bootcount


Can you please rebase?  Thanks!

Best regards,

Wolfgang Denk

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


Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function

2012-08-10 Thread Wolfgang Denk
Dear Anatolij Gustschin,

In message 20120810222104.1e6c4afc@wker you wrote:
 Hi,
 
 On Wed,  8 Aug 2012 12:52:17 +0200
 Marek Vasut ma...@denx.de wrote:
 
  This function converts static number to string in preprocessor.
  This is useful as it allows higher usage of puts() in favour of printf()
  
  Signed-off-by: Marek Vasut ma...@denx.de
  Cc: Wolfgang Denk w...@denx.de
  ---
   include/common.h  |1 +
   include/linux/stringify.h |   12 
   2 files changed, 13 insertions(+)
   create mode 100644 include/linux/stringify.h
 
 applied to my staging branch, thanks!

Please undo.  This patch does not meet formal requirements.  It
contains code copied from Linux without sufficient attribution.

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
Even if you can deceive people about  a  product  through  misleading
statements, sooner or later the product will speak for itself.
- Hajime Karatsu
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] config: Always use GNU ld

2012-08-10 Thread Anatolij Gustschin
Hi,

On Thu,  2 Aug 2012 13:19:34 -0300
Otavio Salvador ota...@ossystems.com.br wrote:

 From: Khem Raj raj.k...@gmail.com
 
 This patch makes sure that we always use the GNU ld. U-Boot uses certain
 construct e.g. OVERLAY which are not implemented in gold therefore it
 always needs GNU ld for linking.
 
 It works well if default linker in toolchain is GNU ld but in some
 cases we can have gold to be the default linker and also ship GNU ld
 but not as default in such cases its called $(PREFIX)ld.bfd, with this
 patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
 our ld.
 
 This way it does not matter what the default ld is.
 
 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 Signed-off-by: Khem Raj raj.k...@gmail.com
 ---
  config.mk |6 +-
  1 file changed, 5 insertions(+), 1 deletion(-)

applied to my staging branch, thanks!

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


[U-Boot] [PATCH 1/3 V2] COMMON: Add __stringify() function

2012-08-10 Thread Marek Vasut
Copied from Linux kernel include/linux/stringify.h:
commit 8f7c2c37319a81ef4c2bfdec67b1ccd5744d97e4
Date:   Wed Apr 8 16:58:57 2009 +0800

This function converts static number to string in preprocessor.
This is useful as it allows higher usage of puts() in favour of printf()

Signed-off-by: Marek Vasut ma...@denx.de
Cc: Wolfgang Denk w...@denx.de
---
 include/common.h  |1 +
 include/linux/stringify.h |   12 
 2 files changed, 13 insertions(+)
 create mode 100644 include/linux/stringify.h

V2: Add proper attribution

diff --git a/include/common.h b/include/common.h
index 39859d3..8f596ec 100644
--- a/include/common.h
+++ b/include/common.h
@@ -39,6 +39,7 @@ typedef volatile unsigned charvu_char;
 #include linux/bitops.h
 #include linux/types.h
 #include linux/string.h
+#include linux/stringify.h
 #include asm/ptrace.h
 #include stdarg.h
 #if defined(CONFIG_PCI)  (defined(CONFIG_4xx)  !defined(CONFIG_AP1000))
diff --git a/include/linux/stringify.h b/include/linux/stringify.h
new file mode 100644
index 000..841cec8
--- /dev/null
+++ b/include/linux/stringify.h
@@ -0,0 +1,12 @@
+#ifndef __LINUX_STRINGIFY_H
+#define __LINUX_STRINGIFY_H
+
+/* Indirect stringification.  Doing two levels allows the parameter to be a
+ * macro itself.  For example, compile with -DFOO=bar, __stringify(FOO)
+ * converts to bar.
+ */
+
+#define __stringify_1(x...)#x
+#define __stringify(x...)  __stringify_1(x)
+
+#endif /* !__LINUX_STRINGIFY_H */
-- 
1.7.10.4

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


Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function

2012-08-10 Thread Marek Vasut
Dear Wolfgang Denk,

 Dear Anatolij Gustschin,
 
 In message 20120810222104.1e6c4afc@wker you wrote:
  Hi,
  
  On Wed,  8 Aug 2012 12:52:17 +0200
  
  Marek Vasut ma...@denx.de wrote:
   This function converts static number to string in preprocessor.
   This is useful as it allows higher usage of puts() in favour of
   printf()
   
   Signed-off-by: Marek Vasut ma...@denx.de
   Cc: Wolfgang Denk w...@denx.de
   ---
   
include/common.h  |1 +
include/linux/stringify.h |   12 
2 files changed, 13 insertions(+)
create mode 100644 include/linux/stringify.h
  
  applied to my staging branch, thanks!
 
 Please undo.  This patch does not meet formal requirements.  It
 contains code copied from Linux without sufficient attribution.

Definitelly agree with this one ... I should be more careful with this. V2 
submitted.

 Best regards,
 
 Wolfgang Denk

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


Re: [U-Boot] [PATCH v3 4/4] c6x: Add support c6745-som board

2012-08-10 Thread Wolfgang Denk
Dear Dmitry Bondar,

In message 1340647361-23387-5-git-send-email-b...@inmys.ru you wrote:
 Add support board c6745-som (http://inmys.ru/?_=/products/som_c6745) with 
 C6745 cpu.
 
 Signed-off-by: Dmitry Bondar b...@inmys.ru
 Cc: Tom Rini tr...@ti.com
...
 +#define LINUX_BOOT_PARAM_ADDR(PHYS_SDRAM_1 + 0x100)
 +#define CONFIG_CMDLINE_TAG
 +#define CONFIG_SETUP_MEMORY_TAGS
 +#define CONFIG_BOOTARGS  mem=32M console=ttyS2,115200n8 
 root=/dev/mtdblock/2 rw noinitrd ip=dhcp

WARNING: line over 80 characters

Please fix.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Never ascribe to malice that which can  adequately  be  explained  by
stupidity.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] powerpc/mpc8xxx: Remove P1015 and P1016 from CPU list

2012-08-10 Thread York Sun
P1015 is the same as P1011 and P1016 is the same as P1012 from software
point of view. They have different packages but share SVRs.

Signed-off-by: York Sun york...@freescale.com
---
 arch/powerpc/cpu/mpc85xx/Makefile |4 
 arch/powerpc/cpu/mpc85xx/speed.c  |3 +--
 arch/powerpc/cpu/mpc8xxx/cpu.c|2 --
 arch/powerpc/include/asm/config_mpc85xx.h |   27 ---
 arch/powerpc/include/asm/immap_85xx.h |3 +--
 arch/powerpc/include/asm/processor.h  |2 --
 drivers/qe/uec.c  |   15 +--
 7 files changed, 7 insertions(+), 49 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/Makefile 
b/arch/powerpc/cpu/mpc85xx/Makefile
index 34f6c54..2f79a03 100644
--- a/arch/powerpc/cpu/mpc85xx/Makefile
+++ b/arch/powerpc/cpu/mpc85xx/Makefile
@@ -55,8 +55,6 @@ COBJS-$(CONFIG_P1011) += ddr-gen3.o
 COBJS-$(CONFIG_P1012)  += ddr-gen3.o
 COBJS-$(CONFIG_P1013)  += ddr-gen3.o
 COBJS-$(CONFIG_P1014)  += ddr-gen3.o
-COBJS-$(CONFIG_P1015)  += ddr-gen3.o
-COBJS-$(CONFIG_P1016)  += ddr-gen3.o
 COBJS-$(CONFIG_P1020)  += ddr-gen3.o
 COBJS-$(CONFIG_P1021)  += ddr-gen3.o
 COBJS-$(CONFIG_P1022)  += ddr-gen3.o
@@ -103,8 +101,6 @@ COBJS-$(CONFIG_P1011)   += p1021_serdes.o
 COBJS-$(CONFIG_P1012)  += p1021_serdes.o
 COBJS-$(CONFIG_P1013)  += p1022_serdes.o
 COBJS-$(CONFIG_P1014)  += p1010_serdes.o
-COBJS-$(CONFIG_P1015)  += p1021_serdes.o
-COBJS-$(CONFIG_P1016)  += p1021_serdes.o
 COBJS-$(CONFIG_P1017)  += p1023_serdes.o
 COBJS-$(CONFIG_P1020)  += p1021_serdes.o
 COBJS-$(CONFIG_P1021)  += p1021_serdes.o
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index ce47532..abfeb26 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -186,8 +186,7 @@ void get_sys_info (sys_info_t * sysInfo)
 #endif
 
 #ifdef CONFIG_QE
-#if defined(CONFIG_P1012) || defined(CONFIG_P1016) || \
-defined(CONFIG_P1021) || defined(CONFIG_P1025)
+#if defined(CONFIG_P1012) || defined(CONFIG_P1021) || defined(CONFIG_P1025)
sysInfo-freqQE =  sysInfo-freqSystemBus;
 #else
qe_ratio = ((gur-porpllsr)  MPC85xx_PORPLLSR_QE_RATIO)
diff --git a/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index cbc6742..1c615d0 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -57,8 +57,6 @@ struct cpu_type cpu_type_list [] = {
CPU_TYPE_ENTRY(P1012, P1012, 1),
CPU_TYPE_ENTRY(P1013, P1013, 1),
CPU_TYPE_ENTRY(P1014, P1014, 1),
-   CPU_TYPE_ENTRY(P1015, P1015, 1),
-   CPU_TYPE_ENTRY(P1016, P1016, 1),
CPU_TYPE_ENTRY(P1017, P1017, 1),
CPU_TYPE_ENTRY(P1020, P1020, 2),
CPU_TYPE_ENTRY(P1021, P1021, 2),
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h 
b/arch/powerpc/include/asm/config_mpc85xx.h
index 7e61f71..0a780d7 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -191,33 +191,6 @@
 #define CONFIG_SYS_FSL_ERRATUM_P1010_A003549
 #define CONFIG_SYS_FSL_ERRATUM_IFC_A003399
 
-/* P1015 is single core version of P1024 */
-#elif defined(CONFIG_P1015)
-#define CONFIG_MAX_CPUS1
-#define CONFIG_SYS_FSL_NUM_LAWS12
-#define CONFIG_SYS_PPC_E500_DEBUG_TLB  2
-#define CONFIG_TSECV2
-#define CONFIG_FSL_PCIE_DISABLE_ASPM
-#define CONFIG_SYS_FSL_SEC_COMPAT  2
-#define CONFIG_SYS_CCSRBAR_DEFAULT 0xff70
-#define CONFIG_SYS_FSL_ERRATUM_ELBC_A001
-#define CONFIG_SYS_FSL_ERRATUM_ESDHC111
-
-/* P1016 is single core version of P1025 */
-#elif defined(CONFIG_P1016)
-#define CONFIG_MAX_CPUS1
-#define CONFIG_SYS_FSL_NUM_LAWS12
-#define CONFIG_SYS_PPC_E500_DEBUG_TLB  2
-#define CONFIG_TSECV2
-#define CONFIG_FSL_PCIE_DISABLE_ASPM
-#define CONFIG_SYS_FSL_SEC_COMPAT  2
-#define CONFIG_SYS_FSL_ERRATUM_ELBC_A001
-#define CONFIG_SYS_FSL_ERRATUM_ESDHC111
-#define QE_MURAM_SIZE  0x6000UL
-#define MAX_QE_RISC1
-#define QE_NUM_OF_SNUM 28
-#define CONFIG_SYS_CCSRBAR_DEFAULT 0xff70
-
 /* P1017 is single core version of P1023 */
 #elif defined(CONFIG_P1017)
 #define CONFIG_MAX_CPUS1
diff --git a/arch/powerpc/include/asm/immap_85xx.h 
b/arch/powerpc/include/asm/immap_85xx.h
index 53d563e..1050d61 100644
--- a/arch/powerpc/include/asm/immap_85xx.h
+++ b/arch/powerpc/include/asm/immap_85xx.h
@@ -2259,8 +2259,7 @@ typedef struct ccsr_gur {
u8  res11a[76];
par_io_t qe_par_io[7];
u8  res11b[1600];
-#elif defined(CONFIG_P1012) || defined(CONFIG_P1016) || \
-  defined(CONFIG_P1021) || defined(CONFIG_P1025)
+#elif defined(CONFIG_P1012) || defined(CONFIG_P1021) || defined(CONFIG_P1025)
u8  res11a[12];
u32 iovselsr;
u8  res11b[60];
diff --git a/arch/powerpc/include/asm/processor.h 
b/arch/powerpc/include/asm/processor.h
index 4eb88e9..ee57af1 100644

[U-Boot] [PATCH] fsl_esdhc: Add no-snoop config for default init

2012-08-10 Thread Benoît Thébaudeau
cfg-no_snoop was available only through custom fsl_esdhc_mmc init functions.
Add a config options to make it available also through the default init.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Andy Fleming aflem...@gmail.com
Cc: Stefano Babic sba...@denx.de
Cc: Kim Phillips kim.phill...@freescale.com
---
 .../drivers/mmc/fsl_esdhc.c|3 +++
 1 file changed, 3 insertions(+)

diff --git u-boot-4d3c95f.orig/drivers/mmc/fsl_esdhc.c 
u-boot-4d3c95f/drivers/mmc/fsl_esdhc.c
index b6c969d..21154e5 100644
--- u-boot-4d3c95f.orig/drivers/mmc/fsl_esdhc.c
+++ u-boot-4d3c95f/drivers/mmc/fsl_esdhc.c
@@ -597,6 +597,9 @@ int fsl_esdhc_mmc_init(bd_t *bis)
cfg = malloc(sizeof(struct fsl_esdhc_cfg));
memset(cfg, 0, sizeof(struct fsl_esdhc_cfg));
cfg-esdhc_base = CONFIG_SYS_FSL_ESDHC_ADDR;
+#ifdef CONFIG_SYS_FSL_ESDHC_NO_SNOOP
+   cfg-no_snoop = 1;
+#endif
return fsl_esdhc_initialize(bis, cfg);
 }
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] Makefile: allow appending to LIB in sub-makefiles

2012-08-10 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message 1340901921-9868-2-git-send-email-daniel.schwierz...@gmail.com you 
wrote:
 The top Makefile and the SPL Makefile have lines like those:
 
 ifneq 
 ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
 LIBS += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
 ifeq ($(SOC),mx5)
 LIBS += $(CPUDIR)/imx-common/libimx-common.o
 endif
 
 This should be done in the arch/CPU/SoC specific sub-makefiles to
 keep the top Makefiles clean. This patch also allows adding of new
 arch/CPU/SoC specific libraries in the future without touching
 the top Makefiles.
 
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com
 ---
  Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Mandrell: You know what I think?
Doctor:   Ah, ah that's a catch question. With a brain your size you
  don't think, right?
- Dr. Who
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] Makefile: replace LIBS by LIBS-y

2012-08-10 Thread Wolfgang Denk
Dear Daniel Schwierzeck,

In message 1340901921-9868-3-git-send-email-daniel.schwierz...@gmail.com you 
wrote:
 Synchronize with ALL-y handling and code in spl/Makefile.
 
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com
 ---
  Makefile | 134 
 +++
  1 file changed, 67 insertions(+), 67 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You got to learn three things. What's  real,  what's  not  real,  and
what's the difference.   - Terry Pratchett, _Witches Abroad_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()

2012-08-10 Thread Anatolij Gustschin
Hi Marek,

On Wed,  8 Aug 2012 12:52:19 +0200
Marek Vasut ma...@denx.de wrote:
...
 diff --git a/common/env_common.c b/common/env_common.c
 index d9e990d..39e1792 100644
 --- a/common/env_common.c
 +++ b/common/env_common.c
 @@ -37,8 +37,6 @@ DECLARE_GLOBAL_DATA_PTR;
  /
   * Default settings to be used when no valid environment is found
   */
 -#define XMK_STR(x)   #x
 -#define MK_STR(x)XMK_STR(x)

including linux/stringify.h here is needed. It doesn't build
otherwise, since this file doesn't include common.h:
...
Configuring for actux1_4_16 - Board: actux1, Options: FLASH2X2
/home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ‘}’ before 
‘__stringify’
make[1]: *** [env_embedded.o] Error 1
make: *** [tools] Error 2
arm-linux-gnueabi-size: './u-boot': No such file
/home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ‘}’ before 
‘__stringify’
make[1]: *** [env_embedded.o] Error 1
make[1]: *** Waiting for unfinished jobs
make[1]: *** wait: No child processes.  Stop.
make: *** [tools] Error 2

Please fix. Thanks!

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


Re: [U-Boot] [PATCH v2 3/3] Makefile: cosmetic: optimize usage of LIBS-y

2012-08-10 Thread Wolfgang Denk
Dear daniel.schwierz...@gmail.com,

In message 1342741198-9105-1-git-send-email-daniel.schwierz...@gmail.com you 
wrote:
 From: Daniel Schwierzeck daniel.schwierz...@gmail.com
 
 Signed-off-by: Daniel Schwierzeck daniel.schwierz...@gmail.com
 
 ---
 Changes for v2:
 - optimized HAVE_VENDOR_COMMON_LIB macro as suggested by Mike
 - optimized HAVE_VENDOR_COMMON_LIB macro also in spl/Makefile
 ---
  Makefile | 17 ++---
  spl/Makefile |  3 +--
  2 files changed, 7 insertions(+), 13 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Each team building another component has been using the  most  recent
tested  version  of the integrated system as a test bed for debugging
its piece. Their work will be set back by having that test bed change
under them. Of course it must. But the changes need to be  quantized.
Then  each  user  has periods of productive stability, interrupted by
bursts of test-bed change. This seems to be much less disruptive than
a constant rippling and trembling.
 - Frederick Brooks Jr., The Mythical Man Month
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] COMMON: Use __stringify() instead of MK_STR()

2012-08-10 Thread Marek Vasut
Dear Anatolij Gustschin,

 Hi Marek,
 
 On Wed,  8 Aug 2012 12:52:19 +0200
 Marek Vasut ma...@denx.de wrote:
 ...
 
  diff --git a/common/env_common.c b/common/env_common.c
  index d9e990d..39e1792 100644
  --- a/common/env_common.c
  +++ b/common/env_common.c
  @@ -37,8 +37,6 @@ DECLARE_GLOBAL_DATA_PTR;
  
   /***
   *
   
* Default settings to be used when no valid environment is found
*/
  
  -#define XMK_STR(x) #x
  -#define MK_STR(x)  XMK_STR(x)
 
 including linux/stringify.h here is needed. It doesn't build
 otherwise, since this file doesn't include common.h:
 ...
 Configuring for actux1_4_16 - Board: actux1, Options: FLASH2X2
 /home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ‘}’
 before ‘__stringify’ make[1]: *** [env_embedded.o] Error 1
 make: *** [tools] Error 2
 arm-linux-gnueabi-size: './u-boot': No such file
 /home/ag/git/u-boot/common/env_embedded.c:110:15: error: expected ‘}’
 before ‘__stringify’ make[1]: *** [env_embedded.o] Error 1
 make[1]: *** Waiting for unfinished jobs
 make[1]: *** wait: No child processes.  Stop.
 make: *** [tools] Error 2

Will do a full rebuild again. Sorry for the crap.

 Please fix. Thanks!
 
 Anatolij

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


Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function

2012-08-10 Thread Anatolij Gustschin
Hello Wolfgang,

On Fri, 10 Aug 2012 22:45:54 +0200
Wolfgang Denk w...@denx.de wrote:
...
  applied to my staging branch, thanks!
 
 Please undo.  This patch does not meet formal requirements.  It
 contains code copied from Linux without sufficient attribution.

OK, dropped for now. This series also needs more build-testing, it seems.

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


Re: [U-Boot] [PATCH 1/3] COMMON: Add __stringify() function

2012-08-10 Thread Marek Vasut
Dear Anatolij Gustschin,

 Hello Wolfgang,
 
 On Fri, 10 Aug 2012 22:45:54 +0200
 Wolfgang Denk w...@denx.de wrote:
 ...
 
   applied to my staging branch, thanks!
  
  Please undo.  This patch does not meet formal requirements.  It
  contains code copied from Linux without sufficient attribution.
 
 OK, dropped for now. This series also needs more build-testing, it seems.

Yes, and I'll also fix the request from Mike while at that. I won't be 
resubmitting it tonight as the build tests will take a bit more time.

 Thanks,
 Anatolij

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


Re: [U-Boot] [PATCH] dts/Makefile: Check for empty $(LDSCRIPT)

2012-08-10 Thread Wolfgang Denk
Dear Horst Kronstorfer,

In message 1342097912-8652-1-git-send-email-hkron...@frequentis.com you wrote:
 Make sure that $(LDSCRIPT) is not empty before calling process_lds
 with 'cat $(LDSCRIPT)' else cat will block waiting for input from
 stdin.
 
 Signed-off-by: Horst Kronstorfer hkron...@frequentis.com
 ---
  dts/Makefile | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Leave bigotry in your quarters; there's no room for it on the bridge.
-- Kirk, Balance of Terror, stardate 1709.2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add support for DS1388.

2012-08-10 Thread Wolfgang Denk
Dear Kenth Eriksson,

In message 1342159184-16651-1-git-send-email-kenth.eriks...@transmode.com you 
wrote:
 Support for DS1388 is added by extending the DS1337 driver. DS1388 is similar 
 to DS1337. The time registers are offset by 1 (due to support for hundreds of 
 seconds), and there is no century bit. The configuration and trickle charge 
 registers are also di
 fferent. Tested on hardware with Freescale P2010 and DS1388.
 
 Signed-off-by: Kenth Eriksson kenth.eriks...@transmode.com
 ---
  drivers/rtc/Makefile |1 +
  drivers/rtc/ds1337.c |   26 ++
  2 files changed, 27 insertions(+), 0 deletions(-)

Applied, thanks.

PLEASE: keep the line length in the commit message  70 characters!!!

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
Drawing on my fine command of language, I said nothing.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] dts/Makefile: Turn off system-/gcc-specific predefined macros

2012-08-10 Thread Wolfgang Denk
Dear Horst Kronstorfer,

In message 1342184620-31448-1-git-send-email-hkron...@frequentis.com you 
wrote:
 Add '-undef' to DTS_CPPFLAGS to avoid unwanted expansion of dts content
 that matches system-specific or gcc-specific predefined macros.
 
 Example: A number of PowerPC related *.dts files in the kernel define a
 property named 'linux,network-index' which (w/o '-undef') is expanded to
 '1,network-index' by the preprocessor because of '#define linux 1.'
 
 With '-undef' in place only the standard predefined macros are visible:
 
  $ gcc -dM -E -undef - /dev/null
  #define __STDC_HOSTED__ 1
  #define __STDC__ 1
 
 Signed-off-by: Horst Kronstorfer hkron...@frequentis.com
 ---
  dts/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
I object to intellect without discipline;  I object to power without
constructive purpose.
-- Spock, The Squire of Gothos, stardate 2124.5
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] armv7: Move save_boot_params_default() to start.S

2012-08-10 Thread Benoît Thébaudeau
save_boot_params() is called by start.S, so move its default implementation to
this file too. This is also useful for boards willing to use nand_spl since
cpu.c is not built in this case.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Albert Aribaud albert.u.b...@aribaud.net
---
 .../arch/arm/cpu/armv7/cpu.c   |7 ---
 .../arch/arm/cpu/armv7/start.S |7 +++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git u-boot-4d3c95f.orig/arch/arm/cpu/armv7/cpu.c 
u-boot-4d3c95f/arch/arm/cpu/armv7/cpu.c
index c6fa8ef..b0677f4 100644
--- u-boot-4d3c95f.orig/arch/arm/cpu/armv7/cpu.c
+++ u-boot-4d3c95f/arch/arm/cpu/armv7/cpu.c
@@ -37,13 +37,6 @@
 #include asm/cache.h
 #include asm/armv7.h
 
-void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
-{
-}
-
-void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
-   __attribute__((weak, alias(save_boot_params_default)));
-
 int cleanup_before_linux(void)
 {
/*
diff --git u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S 
u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
index aee27fd..6df9c91 100644
--- u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S
+++ u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
@@ -119,6 +119,13 @@ FIQ_STACK_START:
 IRQ_STACK_START_IN:
.word   0x0badc0de
 
+.globl save_boot_params_default
+save_boot_params_default:
+   mov pc, lr
+
+.weak save_boot_params
+save_boot_params = save_boot_params_default
+
 /*
  * the actual reset code
  */
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH, v2] dts/Makefile: Turn off some predefined macros

2012-08-10 Thread Wolfgang Denk
Dear Horst Kronstorfer,

In message 1343337995-1291-1-git-send-email-hkron...@frequentis.com you wrote:
 Add '-ansi' to DTS_CPPFLAGS to avoid unwanted expansion of dts content
 that matches some predefined macros.
 
 Example: A number of PowerPC related *.dts files in the kernel define a
 property named 'linux,network-index' which (w/o '-ansi') is expanded to
 '1,network-index' by the preprocessor because of '#define linux 1.'
 
 Signed-off-by: Horst Kronstorfer hkron...@frequentis.com
 ---
 Changes in v2:
   - Use '-ansi' instead of '-undef.'
 
  dts/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Applied this one instead, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Overflow on /dev/null, please empty the bit bucket.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] armv7 cpu_init_crit: Simplify code

2012-08-10 Thread Benoît Thébaudeau
We don't need to return to cpu_init_crit after calling lowlevel_init, so
lowlevel_init can directly return to the caller of cpu_init_crit.

Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
Cc: Albert Aribaud albert.u.b...@aribaud.net
---
 .../arch/arm/cpu/armv7/start.S |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S 
u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
index aee27fd..e8e533e 100644
--- u-boot-4d3c95f.orig/arch/arm/cpu/armv7/start.S
+++ u-boot-4d3c95f/arch/arm/cpu/armv7/start.S
@@ -357,10 +357,7 @@ ENTRY(cpu_init_crit)
 * basic memory. Go here to bump up clock rate and handle
 * wake up conditions.
 */
-   mov ip, lr  @ persevere link reg across call
-   bl  lowlevel_init   @ go setup pll,mux,memory
-   mov lr, ip  @ restore link
-   mov pc, lr  @ back to my caller
+   b   lowlevel_init   @ go setup pll,mux,memory
 ENDPROC(cpu_init_crit)
 #endif
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/6] fm-eth: add function fm_info_get_phy_address()

2012-08-10 Thread Timur Tabi
Function fm_info_get_phy_address() returns the PHY address for a given
Fman port.  This is handy when the MDIO code needs to fixup the Ethernet
nodes in the device tree to point to PHY nodes for a specific PHY address.

Signed-off-by: Timur Tabi ti...@freescale.com
---
 drivers/net/fm/init.c |   16 
 include/fm_eth.h  |1 +
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 9834cd9..8a5311c 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -155,6 +155,22 @@ void fm_info_set_phy_address(enum fm_port port, int 
address)
 }
 
 /*
+ * Returns the PHY address for a given Fman port
+ *
+ * The port must be set via a prior call to fm_info_set_phy_address().
+ * A negative error code is returned if the port is invalid.
+ */
+int fm_info_get_phy_address(enum fm_port port)
+{
+   int i = fm_port_to_index(port);
+
+   if (i == -1)
+   return -1;
+
+   return fm_info[i].phy_addr;
+}
+
+/*
  * Returns the type of the data interface between the given MAC and its PHY.
  * This is typically determined by the RCW.
  */
diff --git a/include/fm_eth.h b/include/fm_eth.h
index 05121ea..e56541d 100644
--- a/include/fm_eth.h
+++ b/include/fm_eth.h
@@ -110,6 +110,7 @@ void fman_enet_init(void);
 void fdt_fixup_fman_ethernet(void *fdt);
 phy_interface_t fm_info_get_enet_if(enum fm_port port);
 void fm_info_set_phy_address(enum fm_port port, int address);
+int fm_info_get_phy_address(enum fm_port port);
 void fm_info_set_mdio(enum fm_port port, struct mii_dev *bus);
 void fm_disable_port(enum fm_port port);
 
-- 
1.7.3.4


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


[U-Boot] [PATCH 1/6] powerpc/85xx: add support for FM2 DTSEC5

2012-08-10 Thread Timur Tabi
Unlike previous SOCs, the Freescale P5040 has a fifth DTSEC on the second
Fman, so add the Fman and SerDes macros for that DTSEC.

Signed-off-by: Timur Tabi ti...@freescale.com
---
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c |6 ++
 arch/powerpc/include/asm/fsl_serdes.h |1 +
 arch/powerpc/include/asm/immap_85xx.h |1 +
 drivers/net/fm/init.c |3 +++
 include/fm_eth.h  |1 +
 5 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c 
b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
index 4b52dad..8aac1de 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c
@@ -68,6 +68,7 @@ static const char *serdes_prtcl_str[] = {
[SGMII_FM2_DTSEC2] = SGMII_FM2_DTSEC2,
[SGMII_FM2_DTSEC3] = SGMII_FM2_DTSEC3,
[SGMII_FM2_DTSEC4] = SGMII_FM2_DTSEC4,
+   [SGMII_FM2_DTSEC5] = SGMII_FM2_DTSEC5,
[XAUI_FM1] = XAUI_FM1,
[XAUI_FM2] = XAUI_FM2,
[AURORA] = DEBUG,
@@ -658,6 +659,7 @@ void fsl_serdes_init(void)
case SGMII_FM2_DTSEC2:
case SGMII_FM2_DTSEC3:
case SGMII_FM2_DTSEC4:
+   case SGMII_FM2_DTSEC5:
case XAUI_FM1:
case XAUI_FM2:
case SRIO1:
@@ -717,6 +719,10 @@ void fsl_serdes_init(void)
serdes8_devdisr2 |= FSL_CORENET_DEVDISR2_FM2 |
FSL_CORENET_DEVDISR2_DTSEC2_4;
break;
+   case SGMII_FM2_DTSEC5:
+   serdes8_devdisr2 |= FSL_CORENET_DEVDISR2_FM2 |
+   FSL_CORENET_DEVDISR2_DTSEC2_5;
+   break;
case XAUI_FM1:
serdes8_devdisr2 |= FSL_CORENET_DEVDISR2_FM1|
FSL_CORENET_DEVDISR2_10GEC1;
diff --git a/arch/powerpc/include/asm/fsl_serdes.h 
b/arch/powerpc/include/asm/fsl_serdes.h
index 0f31af1..22525f1 100644
--- a/arch/powerpc/include/asm/fsl_serdes.h
+++ b/arch/powerpc/include/asm/fsl_serdes.h
@@ -41,6 +41,7 @@ enum srds_prtcl {
SGMII_FM2_DTSEC2,
SGMII_FM2_DTSEC3,
SGMII_FM2_DTSEC4,
+   SGMII_FM2_DTSEC5,
SGMII_TSEC1,
SGMII_TSEC2,
SGMII_TSEC3,
diff --git a/arch/powerpc/include/asm/immap_85xx.h 
b/arch/powerpc/include/asm/immap_85xx.h
index 53d563e..42dd89c 100644
--- a/arch/powerpc/include/asm/immap_85xx.h
+++ b/arch/powerpc/include/asm/immap_85xx.h
@@ -1729,6 +1729,7 @@ typedef struct ccsr_gur {
 #define FSL_CORENET_DEVDISR2_DTSEC2_2  0x4000
 #define FSL_CORENET_DEVDISR2_DTSEC2_3  0x2000
 #define FSL_CORENET_DEVDISR2_DTSEC2_4  0x1000
+#define FSL_CORENET_DEVDISR2_DTSEC2_5  0x0800
 #define FSL_CORENET_NUM_DEVDISR2
u8  res7[8];
u32 powmgtcsr;  /* Power management status  control */
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 953c359..9834cd9 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -50,6 +50,9 @@ struct fm_eth_info fm_info[] = {
 #if (CONFIG_SYS_NUM_FM2_DTSEC = 4)
FM_DTSEC_INFO_INITIALIZER(2, 4),
 #endif
+#if (CONFIG_SYS_NUM_FM2_DTSEC = 5)
+   FM_DTSEC_INFO_INITIALIZER(2, 5),
+#endif
 #if (CONFIG_SYS_NUM_FM1_10GEC = 1)
FM_TGEC_INFO_INITIALIZER(1, 1),
 #endif
diff --git a/include/fm_eth.h b/include/fm_eth.h
index c7c6882..05121ea 100644
--- a/include/fm_eth.h
+++ b/include/fm_eth.h
@@ -35,6 +35,7 @@ enum fm_port {
FM2_DTSEC2,
FM2_DTSEC3,
FM2_DTSEC4,
+   FM2_DTSEC5,
FM2_10GEC1,
NUM_FM_PORTS,
 };
-- 
1.7.3.4


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


[U-Boot] [PATCH 6/6] powerpc/85xx: update P4080DS MDIO bus multiplexer support

2012-08-10 Thread Timur Tabi
The Freescale P4080DS has a complex multiplexed MDIO bus, where the
muxing varies per SerDes protocol.  This is because the protocol
determines in which PCI slot the various SGMII and XGMII interface
cards belong, as well as whether the RGMII ports are enabled.

The Freescale SDK includes support for MDIO bus multiplexing, but the
upstream Linux kernel uses David Daney's (Cavium) method instead.
Therefore, the P4080 code needs to be migrated to the new method.

The device tree contains two top-level mdio-mux nodes, one for EMI1
(RGMII and SGMII) and the other for EMI2 (XGMII).  The U-boot code
depends on several device tree aliases to help it find the nodes that
need to be updated.

Signed-off-by: Timur Tabi ti...@freescale.com
---
 board/freescale/corenet_ds/eth_p4080.c |  172 
 1 files changed, 129 insertions(+), 43 deletions(-)

diff --git a/board/freescale/corenet_ds/eth_p4080.c 
b/board/freescale/corenet_ds/eth_p4080.c
index 2c69c51..3c1c3a1 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -53,7 +53,7 @@
 #define EMI1_MASK  0xc000
 #define EMI2_MASK  0x3000
 
-static int mdio_mux[NUM_FM_PORTS];
+static u32 mdio_mux[NUM_FM_PORTS];
 
 static char *mdio_names[16] = {
P4080DS_MDIO0,
@@ -232,73 +232,159 @@ static int p4080ds_mdio_init(char *realbusname, u32 
muxval)
return mdio_register(bus);
 }
 
-void board_ft_fman_fixup_port(void *blob, char * prop, phys_addr_t pa,
-   enum fm_port port, int offset)
+/*
+ * Given the following ...
+ *
+ * 1) A pointer to an Fman Ethernet node (as identified by the 'compat'
+ * compatible string and 'addr' physical address)
+ *
+ * 2) An Fman port
+ *
+ * ... update the phy-handle property of the Ethernet node to point to the
+ * right PHY.  This assumes that we already know the PHY for each port.
+ *
+ * The PHY type (RGMII, SGMII, XGMII) is already set via a prior call to
+ * fdt_fixup_phy_connection().  The parent mdio-mux node will be enabled later
+ * in fdt_fixup_board_enet().
+ *
+ * Note that what we call Fman ports (enum fm_port) is really an Fman MAC.
+ * Inside the Fman, ports are things that connect to MACs.  We only call
+ * them ports in U-Boot because on previous Ethernet devices (e.g. Gianfar),
+ * MACs and ports are the same thing.
+ *
+ * XGMII Ethernet nodes are already mapped correctly, so we ignore those.
+ */
+void board_ft_fman_fixup_port(void *fdt, char *compat, phys_addr_t addr,
+ enum fm_port port, int offset)
 {
-   if (mdio_mux[port] == EMI1_RGMII)
-   fdt_set_phy_handle(blob, prop, pa, phy_rgmii);
-
-   if (mdio_mux[port] == EMI1_SLOT3) {
-   int idx = port - FM2_DTSEC1 + 5;
-   char phy[16];
+   phy_interface_t phyc = fm_info_get_enet_if(port);
+   enum srds_prtcl device;
+   int lane;
+   int ret = 0;
+
+   switch (phyc) {
+   case PHY_INTERFACE_MODE_RGMII:
+   debug(Setting phy-handle for ethernet@%llx to RGMII\n, addr);
+   ret = fdt_set_phy_handle(fdt, compat, addr, phy_rgmii);
+   break;
+
+   case PHY_INTERFACE_MODE_SGMII:
+   device = serdes_device_from_fm_port(port);
+   lane = serdes_get_first_lane(device);
+
+   if (lane = 0) {
+   unsigned int slot = lane_to_slot[lane];
+   int phy = fm_info_get_phy_address(port);
+   char alias[32];
+
+   debug(Setting phy-handle for ethernet@%llx to slot %u,
+  addr %x\n, addr, slot, phy);
+   sprintf(alias, phy_sgmii_slot%u_%x, slot, phy);
+   ret = fdt_set_phy_handle(fdt, compat, addr, alias);
+   }
+   break;
 
-   sprintf(phy, phy%d_slot3, idx);
+   default:
+   /* XGMII nodes are already linked in the DTS */
+   debug(Skipping phy-handle setup for %s ethernet@%llx\n,
+ phy_interface_strings[phyc], addr);
+   break;
+   }
 
-   fdt_set_phy_handle(blob, prop, pa, phy);
+   if (ret  0) {
+   printf(Fman: could not set phy-handle for ethernet@%llx 
+  (%s)\n, addr, fdt_strerror(ret));
}
 }
 
 void fdt_fixup_board_enet(void *fdt)
 {
-   int i;
-
-   /*
-* P4080DS can be configured in many different ways, supporting a number
-* of combinations of ethernet devices and phy types.  In order to
-* have just one device tree for all of those configurations, we fix up
-* the tree here.  By default, the device tree configures FM1 and FM2
-* for SGMII, and configures XAUI on both 10G interfaces.  So we have
-* a number of different variables to track:
-*
-* 1) Whether the device is configured at all.  Whichever devices are
-   

Re: [U-Boot] [PATCH v4] tx25: Use generic gpio_* calls

2012-08-10 Thread Anatolij Gustschin
Hi,

On Sat, 16 Jun 2012 22:46:17 +0530
Vikram Narayanan vikram...@gmail.com wrote:

 Instead of manipulating gpio registers directly, use the calls
 from the gpio library.
 
 Signed-off-by: Vikram Narayanan vikram...@gmail.com
 Acked-by: Stefano Babic sba...@denx.de
 Cc: John Rigby jcri...@gmail.com
 Cc: Fabio Estevam fabio.este...@freescale.com
 ---
 Changes from v3:
 Use gpio_set_value instead of gpio_direction_output
 (Ahh. Missed it again!!. Very bad)
 
 Changes from v2:
 Swap the place of the change log and commit message.
 
 Changes from v1:
 Used appropriate gpio_* lib calls.
 
  board/karo/tx25/tx25.c |   25 +
  1 files changed, 9 insertions(+), 16 deletions(-)

applied to my staging branch, thanks!

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


[U-Boot] [PATCH 4/6] fm-eth: use fdt_status_disabled() function in ft_fixup_port()

2012-08-10 Thread Timur Tabi
We have a dedicated function for setting the node status now, so use it.
Also improve a comment and fix the type of the phandle variable.

Signed-off-by: Timur Tabi ti...@freescale.com
---
 drivers/net/fm/init.c |   11 +--
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 8a5311c..736b8b9 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -200,7 +200,8 @@ void board_ft_fman_fixup_port(void *blob, char * prop, 
phys_addr_t pa,
 
 static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop)
 {
-   int off, ph;
+   int off;
+   uint32_t ph;
phys_addr_t paddr = CONFIG_SYS_CCSRBAR_PHYS + info-compat_offset;
u64 dtsec1_addr = (u64)CONFIG_SYS_CCSRBAR_PHYS +
CONFIG_SYS_FSL_FM1_DTSEC1_OFFSET;
@@ -217,12 +218,10 @@ static void ft_fixup_port(void *blob, struct fm_eth_info 
*info, char *prop)
off = fdt_node_offset_by_compat_reg(blob, prop, paddr);
 
/* Don't disable FM1-DTSEC1 MAC as its used for MDIO */
-   if (paddr != dtsec1_addr) {
-   /* disable the mac node */
-   fdt_setprop_string(blob, off, status, disabled);
-   }
+   if (paddr != dtsec1_addr)
+   fdt_status_disabled(blob, off); /* disable the MAC node */
 
-   /* disable the node point to the mac */
+   /* disable the fsl,dpa-ethernet node that points to the MAC */
ph = fdt_get_phandle(blob, off);
do_fixup_by_prop(blob, fsl,fman-mac, ph, sizeof(ph),
status, disabled, strlen(disabled) + 1, 1);
-- 
1.7.3.4


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


[U-Boot] [PATCH 5/6] powerpc/85xx: get rid of enum board_slots in P4080 MDIO driver

2012-08-10 Thread Timur Tabi
enum board_slots contained six values, where SLOT1 == 1, SLOT2 == 2, and
so on.  This is pointless, so remove it.  Also move the lane_to_slot[]
array to the top of the file so that it can be used by other functions.

Signed-off-by: Timur Tabi ti...@freescale.com
---
 board/freescale/corenet_ds/eth_p4080.c |   59 ++-
 1 files changed, 19 insertions(+), 40 deletions(-)

diff --git a/board/freescale/corenet_ds/eth_p4080.c 
b/board/freescale/corenet_ds/eth_p4080.c
index b87b092..2c69c51 100644
--- a/board/freescale/corenet_ds/eth_p4080.c
+++ b/board/freescale/corenet_ds/eth_p4080.c
@@ -68,6 +68,15 @@ static char *mdio_names[16] = {
NULL, NULL, NULL,
 };
 
+/*
+ * Mapping of all 18 SERDES lanes to board slots. A value of '0' here means
+ * that the mapping must be determined dynamically, or that the lane maps to
+ * something other than a board slot.
+ */
+static u8 lane_to_slot[] = {
+   1, 1, 2, 2, 3, 3, 3, 3, 6, 6, 4, 4, 4, 4, 5, 5, 5, 5
+};
+
 static char *p4080ds_mdio_name_for_muxval(u32 muxval)
 {
return mdio_names[(muxval  EMI_MASK)  28];
@@ -290,15 +299,6 @@ void fdt_fixup_board_enet(void *fdt)
}
 }
 
-enum board_slots {
-   SLOT1 = 1,
-   SLOT2,
-   SLOT3,
-   SLOT4,
-   SLOT5,
-   SLOT6,
-};
-
 int board_eth_init(bd_t *bis)
 {
 #ifdef CONFIG_FMAN_ENET
@@ -307,27 +307,6 @@ int board_eth_init(bd_t *bis)
struct fsl_pq_mdio_info dtsec_mdio_info;
struct tgec_mdio_info tgec_mdio_info;
 
-   u8 lane_to_slot[] = {
-   SLOT1, /* 0 - Bank 1:A */
-   SLOT1, /* 1 - Bank 1:B */
-   SLOT2, /* 2 - Bank 1:C */
-   SLOT2, /* 3 - Bank 1:D */
-   SLOT3, /* 4 - Bank 1:E */
-   SLOT3, /* 5 - Bank 1:F */
-   SLOT3, /* 6 - Bank 1:G */
-   SLOT3, /* 7 - Bank 1:H */
-   SLOT6, /* 8 - Bank 1:I */
-   SLOT6, /* 9 - Bank 1:J */
-   SLOT4, /* 10 - Bank 2:A */
-   SLOT4, /* 11 - Bank 2:B */
-   SLOT4, /* 12 - Bank 2:C */
-   SLOT4, /* 13 - Bank 2:D */
-   SLOT5, /* 14 - Bank 3:A */
-   SLOT5, /* 15 - Bank 3:B */
-   SLOT5, /* 16 - Bank 3:C */
-   SLOT5, /* 17 - Bank 3:D */
-   };
-
/* Initialize the mdio_mux array so we can recognize empty elements */
for (i = 0; i  NUM_FM_PORTS; i++)
mdio_mux[i] = EMI_NONE;
@@ -380,17 +359,17 @@ int board_eth_init(bd_t *bis)
break;
slot = lane_to_slot[lane];
switch (slot) {
-   case SLOT3:
+   case 3:
mdio_mux[i] = EMI1_SLOT3;
fm_info_set_mdio(i,
mii_dev_for_muxval(mdio_mux[i]));
break;
-   case SLOT4:
+   case 4:
mdio_mux[i] = EMI1_SLOT4;
fm_info_set_mdio(i,
mii_dev_for_muxval(mdio_mux[i]));
break;
-   case SLOT5:
+   case 5:
mdio_mux[i] = EMI1_SLOT5;
fm_info_set_mdio(i,
mii_dev_for_muxval(mdio_mux[i]));
@@ -417,12 +396,12 @@ int board_eth_init(bd_t *bis)
break;
slot = lane_to_slot[lane];
switch (slot) {
-   case SLOT4:
+   case 4:
mdio_mux[i] = EMI2_SLOT4;
fm_info_set_mdio(i,
mii_dev_for_muxval(mdio_mux[i]));
break;
-   case SLOT5:
+   case 5:
mdio_mux[i] = EMI2_SLOT5;
fm_info_set_mdio(i,
mii_dev_for_muxval(mdio_mux[i]));
@@ -444,17 +423,17 @@ int board_eth_init(bd_t *bis)
break;
slot = lane_to_slot[lane];
switch (slot) {
-   case SLOT3:
+   case 3:
mdio_mux[i] = EMI1_SLOT3;
fm_info_set_mdio(i,
mii_dev_for_muxval(mdio_mux[i]));
break;
-   case SLOT4:
+   case 4:
mdio_mux[i] = EMI1_SLOT4;
fm_info_set_mdio(i,
mii_dev_for_muxval(mdio_mux[i]));
break;
-

[U-Boot] [PATCH 3/6] powerpc/85xx: introduce function serdes_device_from_fm_port()

2012-08-10 Thread Timur Tabi
In order to figure out which SerDes lane a given Fman port is connected
to, we need a function that maps the fm_port namespace to the srds_prtcl
namespace.

Signed-off-by: Timur Tabi ti...@freescale.com
---
 board/freescale/common/fman.c |   40 
 board/freescale/common/fman.h |2 ++
 2 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/board/freescale/common/fman.c b/board/freescale/common/fman.c
index 6ddf816..58b7c44 100644
--- a/board/freescale/common/fman.c
+++ b/board/freescale/common/fman.c
@@ -25,6 +25,9 @@
 #include libfdt_env.h
 #include fdt_support.h
 
+#include fm_eth.h
+#include asm/fsl_serdes.h
+
 /*
  * Given the following ...
  *
@@ -67,3 +70,40 @@ int fdt_set_phy_handle(void *fdt, char *compat, phys_addr_t 
addr,
 
return fdt_setprop(fdt, offset, phy-handle, ph, sizeof(ph));
 }
+
+/*
+ * Return the SerDes device enum for a given Fman port
+ *
+ * This function just maps the fm_port namespace to the srds_prtcl namespace.
+ */
+enum srds_prtcl serdes_device_from_fm_port(enum fm_port port)
+{
+   switch (port) {
+   case FM1_DTSEC1:
+   return SGMII_FM1_DTSEC1;
+   case FM1_DTSEC2:
+   return SGMII_FM1_DTSEC2;
+   case FM1_DTSEC3:
+   return SGMII_FM1_DTSEC3;
+   case FM1_DTSEC4:
+   return SGMII_FM1_DTSEC4;
+   case FM1_DTSEC5:
+   return SGMII_FM1_DTSEC5;
+   case FM1_10GEC1:
+   return XAUI_FM1;
+   case FM2_DTSEC1:
+   return SGMII_FM2_DTSEC1;
+   case FM2_DTSEC2:
+   return SGMII_FM2_DTSEC2;
+   case FM2_DTSEC3:
+   return SGMII_FM2_DTSEC3;
+   case FM2_DTSEC4:
+   return SGMII_FM2_DTSEC4;
+   case FM2_DTSEC5:
+   return SGMII_FM2_DTSEC5;
+   case FM2_10GEC1:
+   return XAUI_FM2;
+   default:
+   return NONE;
+   }
+}
diff --git a/board/freescale/common/fman.h b/board/freescale/common/fman.h
index d39ef08..734b1da 100644
--- a/board/freescale/common/fman.h
+++ b/board/freescale/common/fman.h
@@ -23,4 +23,6 @@
 int fdt_set_phy_handle(void *fdt, char *compat, phys_addr_t addr,
const char *alias);
 
+enum srds_prtcl serdes_device_from_fm_port(enum fm_port port);
+
 #endif
-- 
1.7.3.4


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


Re: [U-Boot] [PATCH] u-boot: Update yaffs2 file system

2012-08-10 Thread Wolfgang Denk
Dear Charles,

In message 20120809213931.755ad204...@gemini.denx.de I wrote:
 
 In message 1336618517-2947-1-git-send-email-cdhmann...@gmail.com you wrote:
  This patch updates the yaffs2 in u-boot to correspond to
  git://www.aleph1.co.uk/yaffs2
  commit id 9ee5d0643e559568dbe62215f76e0a7bd5a63d93
...
 Applied, thanks.

Unfortunately, this code causes a TON of errors and warnings, like
these:

In file included from yportenv.h:80:0,
 from yaffs_guts.h:19,
 from yaffs_allocator.h:19,
 from yaffs_allocator.c:14:
ydirectenv.h:31:0: warning: BUG redefined [enabled by default]
/work/wd/u-boot/include/common.h:160:0: note: this is the location of the 
previous definition
ydirectenv.h:50:0: warning: hweight8 redefined [enabled by default]
/work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the 
previous definition
ydirectenv.h:51:0: warning: hweight32 redefined [enabled by default]
/work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the 
previous definition

In file included from yportenv.h:80:0,
 from yaffscfg.h:26,
 from yaffs_uboot_glue.c:26:
ydirectenv.h:31:0: warning: BUG redefined [enabled by default]
/work/wd/u-boot/include/common.h:160:0: note: this is the location of the 
previous definition
ydirectenv.h:50:0: warning: hweight8 redefined [enabled by default]
/work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the 
previous definition
ydirectenv.h:51:0: warning: hweight32 redefined [enabled by default]
/work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the 
previous definition
ydirectenv.h:66:0: warning: kmalloc redefined [enabled by default]
/work/wd/u-boot/include/linux/compat.h:20:0: note: this is the location of the 
previous definition
ydirectenv.h:67:0: warning: kfree redefined [enabled by default]
/work/wd/u-boot/include/linux/compat.h:23:0: note: this is the location of the 
previous definition
ydirectenv.h:68:0: warning: vmalloc redefined [enabled by default]
/work/wd/u-boot/include/linux/compat.h:22:0: note: this is the location of the 
previous definition
ydirectenv.h:69:0: warning: vfree redefined [enabled by default]
/work/wd/u-boot/include/linux/compat.h:24:0: note: this is the location of the 
previous definition

In file included from yportenv.h:80:0,
 from yaffs_guts.c:14:
ydirectenv.h:31:0: warning: BUG redefined [enabled by default]
/work/wd/u-boot/include/common.h:160:0: note: this is the location of the 
previous definition
ydirectenv.h:50:0: warning: hweight8 redefined [enabled by default]
/work/wd/tmp-arm/include2/asm/bitops.h:139:0: note: this is the location of the 
previous definition
ydirectenv.h:51:0: warning: hweight32 redefined [enabled by default]
/work/wd/tmp-arm/include2/asm/bitops.h:137:0: note: this is the location of the 
previous definition
yaffs_guts.c: In function 'yaffs_check_chunk_erased':
yaffs_guts.c:324:6: warning: variable 'result' set but not used 
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_verify_chunk_written':
yaffs_guts.c:352:6: warning: variable 'result' set but not used 
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_grab_chunk_cache':
yaffs_guts.c:1488:6: warning: variable 'pushout' set but not used 
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_check_obj_details_loaded':
yaffs_guts.c:3180:6: warning: variable 'alloc_failed' set but not used 
[-Wunused-but-set-variable]
yaffs_guts.c:3179:6: warning: variable 'result' set but not used 
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_update_oh':
yaffs_guts.c:3288:6: warning: variable 'result' set but not used 
[-Wunused-but-set-variable]
yaffs_guts.c: In function 'yaffs_get_obj_name':
yaffs_guts.c:4447:7: warning: variable 'result' set but not used 
[-Wunused-but-set-variable]


and so on and on.


Please provide a fix, ideally soon, as this breaking builds!  Thanks!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You can't have everything... where would you put it?  - Steven Wright
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] armv7: Move save_boot_params_default() to start.S

2012-08-10 Thread Tom Rini
On Fri, Aug 10, 2012 at 11:59:09PM +0200, Beno??t Th??baudeau wrote:

 save_boot_params() is called by start.S, so move its default implementation to
 this file too. This is also useful for boards willing to use nand_spl since
 cpu.c is not built in this case.
 
 Signed-off-by: Beno??t Th??baudeau benoit.thebaud...@advansee.com
 Cc: Albert Aribaud albert.u.b...@aribaud.net

We should pick up http://patchwork.ozlabs.org/patch/169561/ instead as
yours is missing START/ENDPROC and doesn't just declare the initial
implementation weak.

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


Re: [U-Boot] [PATCH] armv7: Move save_boot_params_default() to start.S

2012-08-10 Thread Benoît Thébaudeau
On Sat, Aug 11, 2012 at 12:44:34 AM +0200, Tom Rini wrote:
 On Fri, Aug 10, 2012 at 11:59:09PM +0200, Benoît Thébaudeau wrote:
 
  save_boot_params() is called by start.S, so move its default
  implementation to
  this file too. This is also useful for boards willing to use
  nand_spl since
  cpu.c is not built in this case.
  
  Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
  Cc: Albert Aribaud albert.u.b...@aribaud.net
 
 We should pick up http://patchwork.ozlabs.org/patch/169561/ instead
 as
 yours is missing START/ENDPROC

Yes.

 and doesn't just declare the initial
 implementation weak.

What do you mean? It does:
+.weak save_boot_params

One version or the other, I don't care as long as one of them is applied. Why
has Tetsuyuki's patch still not been applied? You've ack'ed it on 7/9.

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


Re: [U-Boot] Using u-boot to update the kernel and root-file system on NAND chip on imx28evk from USB memory stick

2012-08-10 Thread Scott Wood
On 08/08/2012 04:33 PM, Bill wrote:
 All,
 
 I'm needing the ability to upgrade the kernel and root-filesystem on
 the NAND chip on the imx28evk from new files that reside on a USB memory
 stick.  That is I want to partition the NAND (mtd) into 3 sections that
 contain  u-boot, kernel, rootfs.  Then whenever the system is booted,
 u-boot will probe the USB memory stick (using fatls and looking for a 
 kernel file and rootfs file)  If the files exist on the USB memory
 stick, uboot will automatically (first it will verify a CRC/Checksum)
 erase the kernel and rootfs sections on the NAND chip, and then copy the
 new kernel and rootfs from the USB stick to their respective sections in
 the flash chip (I think using fatload)?.  It will never write a new u-boot.
 
I've also seen where u-boot can define the NAND flash partitions
 using the mtdparts command and pass these along to the kernel via
 command line args?
 
Can u-boot write/erase to a nand partition (i.e. /dev/mtd0) instead
 of using absolute memory addresses?

If you use U-Boot's mtdparts support, you can reference partitions by
name (mtdparts name, not Linux device node name) in NAND commands.

-Scott


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


Re: [U-Boot] [V3 08/15] S3C6400: Adopt SPL framwork to support spl for nand flash

2012-08-10 Thread Scott Wood
On 07/28/2012 04:35 AM, Zhong Hongbo wrote:
 From: Zhong Hongbo bocui...@gmail.com
 
 Adopt the new SPL framework to implement the SPL booting of
 the nand flash for S3C6400.
 
 Signed-off-by: Zhong Hongbo bocui...@gmail.com
 ---
 Change for V3:
   - None.
 Change for V2:
   - seprate some code.
 ---

This breaks bisectability -- you should make the new SPL work before or
at the same time as you eliminate the old SPL.

-Scott


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


  1   2   >