Re: [U-Boot] [PATCH v12 01/30] mtd: nand: Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT

2013-04-12 Thread Albert ARIBAUD
Hi Benoît,

On Thu, 11 Apr 2013 21:35:34 +0200, Benoît Thébaudeau
benoit.thebaud...@advansee.com wrote:

 From: Fabio Estevam fabio.este...@freescale.com
 
 Introduce CONFIG_SYS_NAND_BUSWIDTH_16BIT option so that other NAND controller
 drivers could use it when a 16-bit NAND is deployed.
 
 drivers/mtd/nand/ndfc has CONFIG_SYS_NDFC_16BIT, so just rename it, so that
 other NAND drivers could reuse the same symbol.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 Acked-by: Scott Wood scottw...@freescale.com
 Reviewed-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
 ---

Applied to u-boot-arm/master, thanks.

Note: this has been successfully build-tested against ARM and PPC.

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


Re: [U-Boot] [STATUS] v2013.04-rc2 released

2013-04-12 Thread Prafulla Wadaskar


 -Original Message-
 From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
 Sent: 11 April 2013 14:41
 To: Holger Brunck
 Cc: Tom Rini; u-boot@lists.denx.de; Prafulla Wadaskar;
 Falauto, Gerlando
 Subject: Re: [STATUS] v2013.04-rc2 released
 
 Hi Holger,
 
 On Thu, 11 Apr 2013 10:34:09 +0200, Holger Brunck
 holger.bru...@keymile.com wrote:
 
  Hi Albert, Tom,
 
  On 04/04/2013 10:20 AM, Albert ARIBAUD wrote:
  
   Mainly I am waiting for Vincent's V10 to be tested
 a bit, and also I
   am going to post the fix for the __bss_end mixup.
 Anything else for
   2013.04 ARM still missing, people please yell at
 me.
  
 
  I only want to drop a note that there are still some
 ARM related patches pending
  for 2013.04. They should run through the marvell
 tree. Prafulla is already aware
  of this:
  http://lists.denx.de/pipermail/u-boot/2013-
 April/151229.html
 
 Thanks Holger. While Prafulla processes them, I'll
 gather them in a
 temporary branch here and build-test them to speed
 things up when the
 Marvell PR comes in. That would be:
 
 http://patchwork.ozlabs.org/patch/212438/
 http://patchwork.ozlabs.org/patch/212441/
 http://patchwork.ozlabs.org/patch/212439/
 http://patchwork.ozlabs.org/patch/212440/
 
 Let me know (patchwork URLs) if any other patch should
 be considered.

Dear Albert, Holger
I am in process of sending pull request for the same.
I am sorry for the delays since I was OOO.

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


Re: [U-Boot] [ARM] Rollback *again* -- 5 patches

2013-04-12 Thread Albert ARIBAUD
Hi Albert,

On Thu, 11 Apr 2013 20:13:16 +0200, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 Hi Tom,
 
 On Thu, 11 Apr 2013 11:04:44 -0700, Tom Warren
 twarren.nvi...@gmail.com wrote:
 
  Albert,
  
  
  On Thu, Apr 11, 2013 at 11:01 AM, Albert ARIBAUD
  albert.u.b...@aribaud.netwrote:
  
   Hi Tom,
  
   On Thu, 11 Apr 2013 10:59:29 -0700, Tom Warren twar...@nvidia.com
   wrote:
  
Albert,
   
 -Original Message-
 From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
 Sent: Thursday, April 11, 2013 9:38 AM
 To: Stephen Warren
 Cc: U-Boot; Prafulla Wadaskar; Tom Rini; Tom Warren
 Subject: Re: [ARM] Rollback *again* -- 5 patches

 Hi Stephen,

 On Thu, 11 Apr 2013 09:49:45 -0600, Stephen Warren
 swar...@wwwdotorg.org wrote:

  On 04/11/2013 09:25 AM, Albert ARIBAUD wrote:
   Hello,
  
   Older toolchain and PPC incompatibilities appeared in the last two
   additions to ToT ARM. To avoid non-bisectability, ToT has been
   rolled back from abbecf4c87 to ae74b65987. This removes
  
   abbecf4 ARM: Fix __bss_start and __bss_end in linker scripts
  ...
   Stephen, that is an occasion to add your proposal to aad17a2.
 
  Tom Warren as the Tegra maintainer should be taking care of this. I
   am
  simply pointing out that the currently proposed changes to the SPL
  size checking don't fulfil the requirements for Tegra. I don't 
  expect
  to have to fix the patches.

 I did not mean for you to do it, only that there was an opportunity to
   do it. :)
   
Why should I be fixing something I didn't break, and that worked fine
   before your change?
  
   Er...
  
   Was I did not mean for you to do it unclear?
  
  Yes, it was unclear.
 
 Apologies, then. I only meant to say that we had time to discuss and
 incorporate your solution in the SPL max size patch series since it had

*Stephen's* solution.

Sorry, yesterday was kind of hectic.

 just had to be unapplied.
 
  Tom

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


Re: [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment

2013-04-12 Thread Stefan Roese
Hi Joe,

On 12.04.2013 00:26, Tom Rini wrote:
 On Mon, Apr 08, 2013 at 03:32:45PM -0500, Joe Hershberger wrote:
 
 NAND is not good at handling absolute addresses to sectors for storing
 particular data.  The current implementation of the NAND env support
 works around this in several ways such as storing a pointer to the
 sector in the OOB of the first sector (interferes with some CRC) or
 supporting a range of sectors (which unless it is huge is not
 guaranteed to be safe).  None of these options address wear-leveling
 concerns or bad block handling.

 Accessing the u-boot env from UBI eliminates these concerns.  However,
 it does require some of the basic settings for finding the UBI env to
 be in the default u-boot env.

One question: Do you plan to support the fw_env Linux tools with this
env-in-UBI feature as well?

Thanks,
Stefan

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


Re: [U-Boot] [STATUS] v2013.04-rc2 released

2013-04-12 Thread Albert ARIBAUD
Hi Prafulla,

On Thu, 11 Apr 2013 23:12:19 -0700, Prafulla Wadaskar
prafu...@marvell.com wrote:

 
 
  -Original Message-
  From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
  Sent: 11 April 2013 14:41
  To: Holger Brunck
  Cc: Tom Rini; u-boot@lists.denx.de; Prafulla Wadaskar;
  Falauto, Gerlando
  Subject: Re: [STATUS] v2013.04-rc2 released
  
  Hi Holger,
  
  On Thu, 11 Apr 2013 10:34:09 +0200, Holger Brunck
  holger.bru...@keymile.com wrote:
  
   Hi Albert, Tom,
  
   On 04/04/2013 10:20 AM, Albert ARIBAUD wrote:
   
Mainly I am waiting for Vincent's V10 to be tested
  a bit, and also I
am going to post the fix for the __bss_end mixup.
  Anything else for
2013.04 ARM still missing, people please yell at
  me.
   
  
   I only want to drop a note that there are still some
  ARM related patches pending
   for 2013.04. They should run through the marvell
  tree. Prafulla is already aware
   of this:
   http://lists.denx.de/pipermail/u-boot/2013-
  April/151229.html
  
  Thanks Holger. While Prafulla processes them, I'll
  gather them in a
  temporary branch here and build-test them to speed
  things up when the
  Marvell PR comes in. That would be:
  
  http://patchwork.ozlabs.org/patch/212438/
  http://patchwork.ozlabs.org/patch/212441/
  http://patchwork.ozlabs.org/patch/212439/
  http://patchwork.ozlabs.org/patch/212440/
  
  Let me know (patchwork URLs) if any other patch should
  be considered.
 
 Dear Albert, Holger
 I am in process of sending pull request for the same.
 I am sorry for the delays since I was OOO.

Prafulla,

Make sure you base your tree against current ARM ToT. For a few hours,
ARM contained a series which broke PPC, and was rolled back to fix it.

 Regards...
 Prafulla . . .

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


Re: [U-Boot] [STATUS] v2013.04-rc2 released

2013-04-12 Thread Prafulla Wadaskar


 -Original Message-
 From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
 Sent: 12 April 2013 11:57
 To: Prafulla Wadaskar
 Cc: Holger Brunck; Tom Rini; u-boot@lists.denx.de;
 Falauto, Gerlando
 Subject: Re: [STATUS] v2013.04-rc2 released
 
 Hi Prafulla,
 
 On Thu, 11 Apr 2013 23:12:19 -0700, Prafulla Wadaskar
 prafu...@marvell.com wrote:
 
 
 
   -Original Message-
   From: Albert ARIBAUD
 [mailto:albert.u.b...@aribaud.net]
   Sent: 11 April 2013 14:41
   To: Holger Brunck
   Cc: Tom Rini; u-boot@lists.denx.de; Prafulla
 Wadaskar;
   Falauto, Gerlando
   Subject: Re: [STATUS] v2013.04-rc2 released
  
   Hi Holger,
  
   On Thu, 11 Apr 2013 10:34:09 +0200, Holger Brunck
   holger.bru...@keymile.com wrote:
  
Hi Albert, Tom,
   
On 04/04/2013 10:20 AM, Albert ARIBAUD wrote:

 Mainly I am waiting for Vincent's V10 to be
 tested
   a bit, and also I
 am going to post the fix for the __bss_end
 mixup.
   Anything else for
 2013.04 ARM still missing, people please yell
 at
   me.

   
I only want to drop a note that there are still
 some
   ARM related patches pending
for 2013.04. They should run through the marvell
   tree. Prafulla is already aware
of this:
http://lists.denx.de/pipermail/u-boot/2013-
   April/151229.html
  
   Thanks Holger. While Prafulla processes them, I'll
   gather them in a
   temporary branch here and build-test them to speed
   things up when the
   Marvell PR comes in. That would be:
  
   http://patchwork.ozlabs.org/patch/212438/
   http://patchwork.ozlabs.org/patch/212441/
   http://patchwork.ozlabs.org/patch/212439/
   http://patchwork.ozlabs.org/patch/212440/
  
   Let me know (patchwork URLs) if any other patch
 should
   be considered.
 
  Dear Albert, Holger
  I am in process of sending pull request for the same.
  I am sorry for the delays since I was OOO.
 
 Prafulla,
 
 Make sure you base your tree against current ARM ToT.
 For a few hours,
 ARM contained a series which broke PPC, and was rolled
 back to fix it.

Okay Albert,
I will do it.
BTW: what do you mean by few hours?
Shall I rebase after few hours and then post the pull request.
OR
The patches are already in during last few hours?

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


Re: [U-Boot] [PATCH] arm: imx: Change iomux functions to void type

2013-04-12 Thread Marek Vasut
Dear Stefan Roese,

 They never return anything also than 0, so lets change the function
 to void instead.
 
 Signed-off-by: Stefan Roese s...@denx.de

Add my:
Reviewed-by: Marek Vasut ma...@denx.de

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 v2 2/7] pxa_lcd: make lcd_enable() a weak pointer

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 Make lcd_init() a weak pointer so that boards can overload it if necessary.
  The palmtreo680 board needs to wiggle some gpios and configure the pwm
 controller in order to get the lcd and its backlight working.
 
 Signed-off-by: Mike Dunn miked...@newsguy.com

Reviewed-by: Marek Vasut ma...@denx.de

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 v2 1/7] pxa_lcd: add the ACX544AKN lcd device

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 This adds the definitions required to support the LCD device on the Palm
 Treo 680.
 
 Signed-off-by: Mike Dunn miked...@newsguy.com

Reviewed-by: Marek Vasut ma...@denx.de

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 v2 4/7] arm: bootm: call udc_disable()before booting linux

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 On the pxa270, if the udc device is not disabled before jumping to linux,
 the device fails to initialize in linux because it was left in a running
 state, and the linux driver assumes that it is in a disabled state.
 
 Signed-off-by: Mike Dunn miked...@newsguy.com

I hope this won't break other platforms. Tom, can you test?

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 v2 7/7] add support for palm treo 680 board

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 A quick overview of u-boot implementation on the treo 680...
 
 The treo 680 has a Diskonchip G4 nand flash chip.  This device has a 2k
 region that maps to the system bus at the reset vector in a NOR-like
 fashion so that it can be used as the boot device.  The phone is shipped
 with this 2k region configured as write-protected (can't be modified) and
 programmed with an initial program loader (IPL).  At power-up, this IPL
 loads the contents of two flash blocks to SDRAM and jumps to it.  The
 capacity of the two blocks is not large enough to hold all of u-boot, so a
 u-boot SPL is used.  To conserve flash space, these two blocks and the
 necessary number of subsequent blocks are programmed with a concatenated
 spl + u-boot image.  That way, the IPL will also load a portion of u-boot
 proper, and when the spl runs, it relocates the portion of u-boot that the
 IPL has already loaded, and then resumes loading the remaining part of
 u-boot before jumping to it.
 
 The default_environment is used (CONFIG_ENV_IS_NOWHERE) because I didn't
 think that having a writable environment was worth the cost of a flash
 block, although adding it would be straightforward.  I abuse the
 CONFIG_EXTRA_ENV_SETTINGS option to specify the usbtty for the console
 (CONFIG_SYS_CONSOLE_IS_IN_ENV).
 
 Support for the LCD is included, but currently it is only useful for
 displaying the u-boot splash screen.  But if u-boot is built without the
 usbtty console, it does display the auto-boot progress nicely.
 
 Signed-off-by: Mike Dunn miked...@newsguy.com

I think the tool shall really go as a separate patch. Besides, can the tool not 
be implemented as a part of u-boot's mkimage infrastructure?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 5/7] lib: import bitrev library from the linux kernel

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 This patch adds the bitrev library from the linux kernel.  This is a simple
 algorithm that uses an 8 bit look-up table to reverse the bits in data
 types of 8, 16, or 32 bit widths.  The docg4 nand flash driver uses it.
 
 [port from linux kernel 2.6.20 commit
 a5cfc1ec58a07074dacb6aa8c79eff864c966d12]

Why did you port it from such an ancient kernel? Newer version is not an option?

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 v2 6/7] mtd: nand: add driver for diskonchip g4 nand flash

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 This patch adds a driver for the diskonchip G4 nand flash device.  It is
 based on the driver from the linux kernel.
 
 This also includes a separate SPL driver.  A separate SPL driver is used
 because the device operates in a different mode (reliable mode) when
 loading a boot image, and also because the storage format of the boot
 image is different from normal data (pages are stored redundantly).  The
 SPL driver basically mimics how a typical IPL reads data from the device. 
 The special operating mode and storage format are used to compensate for
 the fact that the IPL does not contain the BCH ecc decoding algorithm (due
 to size constraints).  Although the u-boot SPL *could* use ecc, it
 operates like an IPL for the sake of simplicity and uniformity, since the
 IPL and SPL share the task of loading the u-boot image. As a side benefit,
 the SPL driver is very small.
 
 [port from linux kernel 3.4 commit
 570469f3bde7f71cc1ece07a18d54a05b6a8775d]

Scott, this really is your turf.

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 v2 3/7] pxa27x_udc: remove call to unimplemented set_GPIO_mode()

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 If CONFIG_USB_DEV_PULLUP_GPIO is defined, a link error occurs because the
 set_GPIO_mode() helper function is not implemented.  This function doesn't
 do much except make the code a little more readable, so I just manually
 coded its equivalent and removed the prototype from the header file.  It
 is invoked no where else in the code.
 
 While I was at it, I noticed that two other function prototypes in the same
 header file are also neither implemented nor invoked anywhere, so I removed
 them as well.
 
 Signed-off-by: Mike Dunn miked...@newsguy.com

Reviewed-by: Marek Vasut ma...@denx.de

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


Re: [U-Boot] [STATUS] v2013.04-rc2 released

2013-04-12 Thread Albert ARIBAUD
Hi Prafulla,

On Thu, 11 Apr 2013 23:38:06 -0700, Prafulla Wadaskar
prafu...@marvell.com wrote:

 
 
  -Original Message-
  From: Albert ARIBAUD [mailto:albert.u.b...@aribaud.net]
  Sent: 12 April 2013 11:57
  To: Prafulla Wadaskar
  Cc: Holger Brunck; Tom Rini; u-boot@lists.denx.de;
  Falauto, Gerlando
  Subject: Re: [STATUS] v2013.04-rc2 released
  
  Hi Prafulla,
  
  On Thu, 11 Apr 2013 23:12:19 -0700, Prafulla Wadaskar
  prafu...@marvell.com wrote:
  
  
  
-Original Message-
From: Albert ARIBAUD
  [mailto:albert.u.b...@aribaud.net]
Sent: 11 April 2013 14:41
To: Holger Brunck
Cc: Tom Rini; u-boot@lists.denx.de; Prafulla
  Wadaskar;
Falauto, Gerlando
Subject: Re: [STATUS] v2013.04-rc2 released
   
Hi Holger,
   
On Thu, 11 Apr 2013 10:34:09 +0200, Holger Brunck
holger.bru...@keymile.com wrote:
   
 Hi Albert, Tom,

 On 04/04/2013 10:20 AM, Albert ARIBAUD wrote:
 
  Mainly I am waiting for Vincent's V10 to be
  tested
a bit, and also I
  am going to post the fix for the __bss_end
  mixup.
Anything else for
  2013.04 ARM still missing, people please yell
  at
me.
 

 I only want to drop a note that there are still
  some
ARM related patches pending
 for 2013.04. They should run through the marvell
tree. Prafulla is already aware
 of this:
 http://lists.denx.de/pipermail/u-boot/2013-
April/151229.html
   
Thanks Holger. While Prafulla processes them, I'll
gather them in a
temporary branch here and build-test them to speed
things up when the
Marvell PR comes in. That would be:
   
http://patchwork.ozlabs.org/patch/212438/
http://patchwork.ozlabs.org/patch/212441/
http://patchwork.ozlabs.org/patch/212439/
http://patchwork.ozlabs.org/patch/212440/
   
Let me know (patchwork URLs) if any other patch
  should
be considered.
  
   Dear Albert, Holger
   I am in process of sending pull request for the same.
   I am sorry for the delays since I was OOO.
  
  Prafulla,
  
  Make sure you base your tree against current ARM ToT.
  For a few hours,
  ARM contained a series which broke PPC, and was rolled
  back to fix it.
 
 Okay Albert,
 I will do it.
 BTW: what do you mean by few hours?
 Shall I rebase after few hours and then post the pull request.
 OR
 The patches are already in during last few hours?

Details are in my post [ARM] Rollback *again* -- 5 patches

 Regards...
 Prafulla . . .

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


[U-Boot] [PATCH 0/5] vybrid: Add vybrid CPU and vf600 tower board support

2013-04-12 Thread Alison Wang
This series contains the support for vybrid CPU and vf600 tower board.

The Vybrid devices are a family of Freescale's latest Dual Single
Core offering with ARM Cortex A5 and CM4 based processors for
Advanced Connected Radio, Entry Infotainment, and Cluster as well
as high end industrial and general purpose applications.


Alison Wang (5):
  vybrid: add vybrid CPU support
  vybrid: add Freescale vybrid vf600 tower board support
  vybrid: add uart driver support
  vybrid: add eSDHC driver support
  vybrid: add ethernet driver support

 Makefile |   8 ++
 arch/arm/cpu/armv7/vybrid-common/Makefile|  46 +++
 arch/arm/cpu/armv7/vybrid-common/cpu.c   | 127 ++
 arch/arm/cpu/armv7/vybrid-common/speed.c |  37 +
 arch/arm/cpu/armv7/vybrid-common/timer.c | 140 +++
 arch/arm/cpu/armv7/vybrid/Makefile   |  45 +++
 arch/arm/cpu/armv7/vybrid/asm-offsets.c  |  70 ++
 arch/arm/cpu/armv7/vybrid/clock.c| 278 
++
 arch/arm/cpu/armv7/vybrid/iomux.c|  42 ++
 arch/arm/cpu/armv7/vybrid/lowlevel_init.S| 128 ++
 arch/arm/cpu/armv7/vybrid/soc.c  |  42 ++
 arch/arm/include/asm/arch-vybrid/clock.h |  41 ++
 arch/arm/include/asm/arch-vybrid/iomux.h | 323 

 arch/arm/include/asm/arch-vybrid/serial-vybrid.h | 213 
+
 arch/arm/include/asm/arch-vybrid/sys_proto.h |  30 +
 arch/arm/include/asm/arch-vybrid/timer.h | 405 
+++
 arch/arm/include/asm/arch-vybrid/vybrid-pins.h   |  88 
 arch/arm/include/asm/arch-vybrid/vybrid-regs.h   | 735 

 arch/arm/include/asm/fec.h   | 302 
+
 arch/arm/include/asm/global_data.h   |   3 +
 arch/arm/include/asm/mach-types.h|  56 
 arch/arm/include/asm/u-boot.h|   3 +
 board/freescale/vybrid/Makefile  |  40 ++
 board/freescale/vybrid/vybrid.c  | 488 
++
 board/freescale/vybrid/vybridimage.cfg   |  44 ++
 boards.cfg   |   2 +
 drivers/mmc/fsl_esdhc.c  |   4 +-
 drivers/net/mcffec.c |  18 ++-
 drivers/net/mcfmii.c |   5 +-
 drivers/serial/Makefile  |   1 +
 drivers/serial/serial.c  |   2 +
 drivers/serial/serial_vybrid.c   | 129 ++
 include/configs/vybrid.h | 284 
+++
 include/configs/vybrid_iram.h| 284 
+++
 34 files changed, 4455 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/vybrid-common/Makefile
 create mode 100644 arch/arm/cpu/armv7/vybrid-common/cpu.c
 create mode 100644 arch/arm/cpu/armv7/vybrid-common/speed.c
 create mode 100644 arch/arm/cpu/armv7/vybrid-common/timer.c
 create mode 100644 arch/arm/cpu/armv7/vybrid/Makefile
 create mode 100644 arch/arm/cpu/armv7/vybrid/asm-offsets.c
 create mode 100644 arch/arm/cpu/armv7/vybrid/clock.c
 create mode 100644 arch/arm/cpu/armv7/vybrid/iomux.c
 create mode 100644 arch/arm/cpu/armv7/vybrid/lowlevel_init.S
 create mode 100644 arch/arm/cpu/armv7/vybrid/soc.c
 create mode 100644 arch/arm/include/asm/arch-vybrid/clock.h
 create mode 100644 arch/arm/include/asm/arch-vybrid/iomux.h
 create mode 100644 arch/arm/include/asm/arch-vybrid/serial-vybrid.h
 create mode 100644 arch/arm/include/asm/arch-vybrid/sys_proto.h
 create mode 100644 arch/arm/include/asm/arch-vybrid/timer.h
 create mode 100644 arch/arm/include/asm/arch-vybrid/vybrid-pins.h
 create mode 100644 arch/arm/include/asm/arch-vybrid/vybrid-regs.h
 create mode 100644 arch/arm/include/asm/fec.h
 create mode 100644 board/freescale/vybrid/Makefile
 create mode 100644 board/freescale/vybrid/vybrid.c
 create mode 100644 board/freescale/vybrid/vybridimage.cfg
 create mode 100644 drivers/serial/serial_vybrid.c
 create mode 100644 include/configs/vybrid.h
 create mode 100644 include/configs/vybrid_iram.h



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


[U-Boot] [PATCH 2/5] vybrid: add Freescale vybrid vf600 tower board support

2013-04-12 Thread Alison Wang
This patch adds Freescale vybrid vf600 tower board support.

Signed-off-by: TsiChung Liew tsicl...@gmail.com
Signed-off-by: Jason Jin jason@freescale.com
Signed-off-by: Alison Wang b18...@freescale.com
---
 board/freescale/vybrid/Makefile|  40 +++
 board/freescale/vybrid/vybrid.c| 488 +
 board/freescale/vybrid/vybridimage.cfg |  44 +++
 boards.cfg |   2 +
 include/configs/vybrid.h   | 284 +++
 include/configs/vybrid_iram.h  | 284 +++
 6 files changed, 1142 insertions(+)
 create mode 100644 board/freescale/vybrid/Makefile
 create mode 100644 board/freescale/vybrid/vybrid.c
 create mode 100644 board/freescale/vybrid/vybridimage.cfg
 create mode 100644 include/configs/vybrid.h
 create mode 100644 include/configs/vybrid_iram.h

diff --git a/board/freescale/vybrid/Makefile b/board/freescale/vybrid/Makefile
new file mode 100644
index 000..0749b21
--- /dev/null
+++ b/board/freescale/vybrid/Makefile
@@ -0,0 +1,40 @@
+#
+# Copyright 2012-2013 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := $(BOARD).o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/freescale/vybrid/vybrid.c b/board/freescale/vybrid/vybrid.c
new file mode 100644
index 000..c2da1ff
--- /dev/null
+++ b/board/freescale/vybrid/vybrid.c
@@ -0,0 +1,488 @@
+/*
+ * Copyright 2012-2013 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include asm/io.h
+#include asm/fec.h
+#include asm/arch/vybrid-regs.h
+#include asm/arch/vybrid-pins.h
+#include asm/arch/iomux.h
+#include asm/errno.h
+#include asm/arch/sys_proto.h
+#include i2c.h
+#include mmc.h
+#include fsl_esdhc.h
+#include usb/ehci-fsl.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define DDR_IOMUX  0x0180
+#define DDR_IOMUX1 0x00010180
+
+#define PHY_DQ_TIMING  0x2613
+#define PHY_DQS_TIMING 0x2615
+#define PHY_CTRL   0x01210080
+#define PHY_MASTER_CTRL0x0001012a
+#define PHY_SLAVE_CTRL 0x00012020
+
+#ifdef CONFIG_FSL_ESDHC
+struct fsl_esdhc_cfg esdhc_cfg[2] = {
+   {CONFIG_SYS_ESDHC1_BASE, 1},
+   {ESDHC2_BASE_ADDR, 1},
+};
+#endif
+
+void setup_iomux_ddr(void)
+{
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A15);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A14);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A13);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A12);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A11);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A10);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A9);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A8);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A7);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A6);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A5);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A4);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A3);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A2);
+   __raw_writel(DDR_IOMUX, IOMUXC_DDR_A1);
+   

[U-Boot] [PATCH 4/5] vybrid: add eSDHC driver support

2013-04-12 Thread Alison Wang
This patch adds eSDHC driver support for vybrid platform.

Signed-off-by: TsiChung Liew tsicl...@gmail.com
Signed-off-by: Jason Jin jason@freescale.com
Signed-off-by: Alison Wang b18...@freescale.com
---
 drivers/mmc/fsl_esdhc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index 35f879e..f258868 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007, 2010-2011 Freescale Semiconductor, Inc
+ * Copyright 2007, 2010-2013 Freescale Semiconductor, Inc
  * Andy Fleming
  *
  * Based vaguely on the pxa mmc code:
@@ -479,7 +479,7 @@ static int esdhc_init(struct mmc *mmc)
while ((esdhc_read32(regs-sysctl)  SYSCTL_RSTA)  --timeout)
udelay(1000);
 
-#ifndef ARCH_MXC
+#if !defined(ARCH_MXC)  !defined(CONFIG_VYBRID)
/* Enable cache snooping */
esdhc_write32(regs-scr, 0x0040);
 #endif
-- 
1.8.0


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


[U-Boot] [PATCH 3/5] vybrid: add uart driver support

2013-04-12 Thread Alison Wang
This patch adds uart driver support for vybrid platform.

Signed-off-by: TsiChung Liew tsicl...@gmail.com
Signed-off-by: Jason Jin jason@freescale.com
Signed-off-by: Alison Wang b18...@freescale.com
---
 drivers/serial/Makefile|   1 +
 drivers/serial/serial.c|   2 +
 drivers/serial/serial_vybrid.c | 129 +
 3 files changed, 132 insertions(+)
 create mode 100644 drivers/serial/serial_vybrid.c

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index de3f471..776e018 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -53,6 +53,7 @@ COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
 COBJS-$(CONFIG_SANDBOX_SERIAL) += sandbox.o
 COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
 COBJS-$(CONFIG_ZYNQ_SERIAL) += serial_zynq.o
+COBJS-$(CONFIG_VYBRID_UART) += serial_vybrid.o
 
 ifndef CONFIG_SPL_BUILD
 COBJS-$(CONFIG_USB_TTY) += usbtty.o
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 7922bf0..903a520 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -178,6 +178,7 @@ serial_initfunc(pl01x_serial_initialize);
 serial_initfunc(s3c44b0_serial_initialize);
 serial_initfunc(sa1100_serial_initialize);
 serial_initfunc(sh_serial_initialize);
+serial_initfunc(vybrid_serial_initialize);
 
 /**
  * serial_register() - Register serial driver with serial driver core
@@ -272,6 +273,7 @@ void serial_initialize(void)
s3c44b0_serial_initialize();
sa1100_serial_initialize();
sh_serial_initialize();
+   vybrid_serial_initialize();
 
serial_assign(default_serial_console()-name);
 }
diff --git a/drivers/serial/serial_vybrid.c b/drivers/serial/serial_vybrid.c
new file mode 100644
index 000..4dd9b52
--- /dev/null
+++ b/drivers/serial/serial_vybrid.c
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2012-2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include common.h
+#include watchdog.h
+#include asm/io.h
+#include serial.h
+#include linux/compiler.h
+#include asm/arch/vybrid-regs.h
+#include asm/arch/serial-vybrid.h
+#include asm/arch/clock.h
+
+#ifndef CONFIG_VYBRID_UART_BASE
+#error define CONFIG_VYBRID_UART_BASE to use the VYBRID UART driver
+#endif
+
+#define UART_CONSOLE   \
+   (CONFIG_VYBRID_UART_BASE + (CONFIG_SYS_UART_PORT * 0x1000))
+
+#ifdef CONFIG_SERIAL_MULTI
+#warning Vybrid driver does not support MULTI serials.
+#endif
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static void vybrid_serial_setbrg(void)
+{
+   u32 clk = vybrid_get_uartclk();
+   u16 sbr;
+
+   if (!gd-baudrate)
+   gd-baudrate = CONFIG_BAUDRATE;
+
+   sbr = (u16)(clk / (16 * gd-baudrate));
+   /* place adjustment later - n/32 BRFA */
+
+   out_8((UART_CONSOLE + UBDH), (sbr  8));
+   out_8((UART_CONSOLE + UBDL), (sbr  0xFF));
+}
+
+static int vybrid_serial_getc(void)
+{
+   while (!(in_8(UART_CONSOLE + US1)  US1_RDRF))
+   WATCHDOG_RESET();
+
+   setbits_8((UART_CONSOLE + US1), US1_RDRF);
+
+   return in_8(UART_CONSOLE + UD);
+}
+
+static void vybrid_serial_putc(const char c)
+{
+   if (c == '\n')
+   serial_putc('\r');
+
+   while (!(in_8(UART_CONSOLE + US1)  US1_TDRE))
+   WATCHDOG_RESET();
+
+   out_8((UART_CONSOLE + UD), c);
+}
+
+/*
+ * Test whether a character is in the RX buffer
+ */
+static int vybrid_serial_tstc(void)
+{
+   if (in_8(UART_CONSOLE + URCFIFO) == 0)
+   return 0;
+
+   return 1;
+}
+
+/*
+ * Initialise the serial port with the given baudrate. The settings
+ * are always 8 data bits, no parity, 1 stop bit, no start bits.
+ */
+static int vybrid_serial_init(void)
+{
+   clrbits_8((UART_CONSOLE + UC2), UC2_RE);
+   clrbits_8((UART_CONSOLE + UC2), UC2_TE);
+
+   out_8((UART_CONSOLE + UMODEM), 0);
+   out_8((UART_CONSOLE + UC1), 0);
+
+   /* provide data bits, parity, stop bit, etc */
+
+   serial_setbrg();
+
+   out_8((UART_CONSOLE + UC2), (UC2_RE | UC2_TE));
+
+   return 0;
+}
+
+static struct serial_device vybrid_serial_drv = {
+   .name = vybrid_serial,
+   .start = vybrid_serial_init,
+   .stop = NULL,
+   .setbrg = vybrid_serial_setbrg,
+   .putc = vybrid_serial_putc,
+   .puts = 

[U-Boot] [PATCH 5/5] vybrid: add ethernet driver support

2013-04-12 Thread Alison Wang
This patch adds ethernet driver support for vybrid platform.

Signed-off-by: TsiChung Liew tsicl...@gmail.com
Signed-off-by: Jason Jin jason@freescale.com
Signed-off-by: Alison Wang b18...@freescale.com
---
 arch/arm/include/asm/fec.h| 302 ++
 arch/arm/include/asm/u-boot.h |   3 +
 drivers/net/mcffec.c  |  18 ++-
 drivers/net/mcfmii.c  |   5 +-
 4 files changed, 322 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/include/asm/fec.h

diff --git a/arch/arm/include/asm/fec.h b/arch/arm/include/asm/fec.h
new file mode 100644
index 000..5bb946e
--- /dev/null
+++ b/arch/arm/include/asm/fec.h
@@ -0,0 +1,302 @@
+/*
+ * fec.h -- Fast Ethernet Controller definitions
+ *
+ * Some definitions copied from commproc.h for MPC8xx:
+ * MPC8xx Communication Processor Module.
+ *
+ * Add FEC Structure and definitions
+ * Copyright 2004-2013 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndeffec_h
+#definefec_h
+
+/* Buffer descriptors used FEC */
+typedef struct cpm_buf_desc {
+   ushort cbd_datlen;  /* Data length in buffer */
+   ushort cbd_sc;  /* Status and Control */
+   uint cbd_bufaddr;   /* Buffer address in host memory */
+} cbd_t;
+
+#define BD_SC_EMPTY((ushort)0x8000) /* Receive is empty */
+#define BD_SC_READY((ushort)0x8000) /* Transmit is ready */
+#define BD_SC_WRAP ((ushort)0x2000) /* Last buffer descriptor */
+#define BD_SC_INTRPT   ((ushort)0x1000) /* Interrupt on change */
+#define BD_SC_LAST ((ushort)0x0800) /* Last buffer in frame */
+#define BD_SC_TC   ((ushort)0x0400) /* Transmit CRC */
+#define BD_SC_CM   ((ushort)0x0200) /* Continous mode */
+#define BD_SC_ID   ((ushort)0x0100) /* Rec'd too many idles */
+#define BD_SC_P((ushort)0x0100) /* xmt preamble */
+#define BD_SC_BR   ((ushort)0x0020) /* Break received */
+#define BD_SC_FR   ((ushort)0x0010) /* Framing error */
+#define BD_SC_PR   ((ushort)0x0008) /* Parity error */
+#define BD_SC_OV   ((ushort)0x0002) /* Overrun */
+#define BD_SC_CD   ((ushort)0x0001) /* Carrier Detect lost */
+
+/* Buffer descriptor control/status used by Ethernet receive */
+#define BD_ENET_RX_EMPTY   ((ushort)0x8000)
+#define BD_ENET_RX_RO1 ((ushort)0x4000)
+#define BD_ENET_RX_WRAP((ushort)0x2000)
+#define BD_ENET_RX_INTR((ushort)0x1000)
+#define BD_ENET_RX_RO2 BD_ENET_RX_INTR
+#define BD_ENET_RX_LAST((ushort)0x0800)
+#define BD_ENET_RX_FIRST   ((ushort)0x0400)
+#define BD_ENET_RX_MISS((ushort)0x0100)
+#define BD_ENET_RX_BC  ((ushort)0x0080)
+#define BD_ENET_RX_MC  ((ushort)0x0040)
+#define BD_ENET_RX_LG  ((ushort)0x0020)
+#define BD_ENET_RX_NO  ((ushort)0x0010)
+#define BD_ENET_RX_SH  ((ushort)0x0008)
+#define BD_ENET_RX_CR  ((ushort)0x0004)
+#define BD_ENET_RX_OV  ((ushort)0x0002)
+#define BD_ENET_RX_CL  ((ushort)0x0001)
+#define BD_ENET_RX_TR  BD_ENET_RX_CL
+#define BD_ENET_RX_STATS   ((ushort)0x013f)/* All status bits */
+
+/* Buffer descriptor control/status used by Ethernet transmit */
+#define BD_ENET_TX_READY   ((ushort)0x8000)
+#define BD_ENET_TX_PAD ((ushort)0x4000)
+#define BD_ENET_TX_TO1 BD_ENET_TX_PAD
+#define BD_ENET_TX_WRAP((ushort)0x2000)
+#define BD_ENET_TX_INTR((ushort)0x1000)
+#define BD_ENET_TX_TO2 BD_ENET_TX_INTR_
+#define BD_ENET_TX_LAST((ushort)0x0800)
+#define BD_ENET_TX_TC  ((ushort)0x0400)
+#define BD_ENET_TX_DEF ((ushort)0x0200)
+#define BD_ENET_TX_ABC BD_ENET_TX_DEF
+#define BD_ENET_TX_HB  ((ushort)0x0100)
+#define BD_ENET_TX_LC  ((ushort)0x0080)
+#define BD_ENET_TX_RL  ((ushort)0x0040)
+#define BD_ENET_TX_RCMASK  ((ushort)0x003c)
+#define BD_ENET_TX_UN  ((ushort)0x0002)
+#define BD_ENET_TX_CSL ((ushort)0x0001)
+#define BD_ENET_TX_STATS   

Re: [U-Boot] [PATCH] net: nfs: add dynamic wait period

2013-04-12 Thread Enric Balletbo Serra
Hi all,

2013/1/26 Matthias Brugger matthias@gmail.com

 2012/12/11 Matthias Brugger matthias@gmail.com:
  This patch tackles the time out problem which leads to break the
  boot process, when loading file over nfs. The patch does two things.
 
  First of all, we just ignore messages that arrive with a rpc_id smaller
  then the client id. We just interpret this messages as answers to
  formaly timed out messages.
 
  Second, when a time out occurs we double the time to wait, so that we
  do not stress the server resending the last message.

 Any comment on the patch?

 
  Signed-off-by: Matthias Brugger matthias@gmail.com
  ---
   net/nfs.c |   73
 +++--
   1 file changed, 52 insertions(+), 21 deletions(-)
 
  diff --git a/net/nfs.c b/net/nfs.c
  index 7f2393f..84aeda1 100644
  --- a/net/nfs.c
  +++ b/net/nfs.c
  @@ -37,10 +37,14 @@
   # define NFS_TIMEOUT CONFIG_NFS_TIMEOUT
   #endif
 
  +#define NFS_RPC_ERR1
  +#define NFS_RPC_DROP   124
  +
   static int fs_mounted;
   static unsigned long rpc_id;
   static int nfs_offset = -1;
   static int nfs_len;
  +static ulong nfs_timeout = NFS_TIMEOUT;
 
   static char dirfh[NFS_FHSIZE]; /* file handle of directory */
   static char filefh[NFS_FHSIZE]; /* file handle of kernel image */
  @@ -399,8 +403,10 @@ rpc_lookup_reply(int prog, uchar *pkt, unsigned len)
 
  debug(%s\n, __func__);
 
  -   if (ntohl(rpc_pkt.u.reply.id) != rpc_id)
  -   return -1;
  +   if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_ERR;
  +   else if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_DROP;
 
  if (rpc_pkt.u.reply.rstatus  ||
  rpc_pkt.u.reply.verifier ||
  @@ -428,8 +434,10 @@ nfs_mount_reply(uchar *pkt, unsigned len)
 
  memcpy((unsigned char *)rpc_pkt, pkt, len);
 
  -   if (ntohl(rpc_pkt.u.reply.id) != rpc_id)
  -   return -1;
  +   if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_ERR;
  +   else if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_DROP;
 
  if (rpc_pkt.u.reply.rstatus  ||
  rpc_pkt.u.reply.verifier ||
  @@ -452,8 +460,10 @@ nfs_umountall_reply(uchar *pkt, unsigned len)
 
  memcpy((unsigned char *)rpc_pkt, pkt, len);
 
  -   if (ntohl(rpc_pkt.u.reply.id) != rpc_id)
  -   return -1;
  +   if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_ERR;
  +   else if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_DROP;
 
  if (rpc_pkt.u.reply.rstatus  ||
  rpc_pkt.u.reply.verifier ||
  @@ -475,8 +485,10 @@ nfs_lookup_reply(uchar *pkt, unsigned len)
 
  memcpy((unsigned char *)rpc_pkt, pkt, len);
 
  -   if (ntohl(rpc_pkt.u.reply.id) != rpc_id)
  -   return -1;
  +   if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_ERR;
  +   else if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_DROP;
 
  if (rpc_pkt.u.reply.rstatus  ||
  rpc_pkt.u.reply.verifier ||
  @@ -499,8 +511,10 @@ nfs_readlink_reply(uchar *pkt, unsigned len)
 
  memcpy((unsigned char *)rpc_pkt, pkt, len);
 
  -   if (ntohl(rpc_pkt.u.reply.id) != rpc_id)
  -   return -1;
  +   if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_ERR;
  +   else if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_DROP;
 
  if (rpc_pkt.u.reply.rstatus  ||
  rpc_pkt.u.reply.verifier ||
  @@ -534,8 +548,10 @@ nfs_read_reply(uchar *pkt, unsigned len)
 
  memcpy((uchar *)rpc_pkt, pkt, sizeof(rpc_pkt.u.reply));
 
  -   if (ntohl(rpc_pkt.u.reply.id) != rpc_id)
  -   return -1;
  +   if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_ERR;
  +   else if (ntohl(rpc_pkt.u.reply.id)  rpc_id)
  +   return -NFS_RPC_DROP;
 
  if (rpc_pkt.u.reply.rstatus  ||
  rpc_pkt.u.reply.verifier ||
  @@ -574,7 +590,7 @@ NfsTimeout(void)
  NetStartAgain();
  } else {
  puts(T );
  -   NetSetTimeout(NFS_TIMEOUT, NfsTimeout);
  +   NetSetTimeout(nfs_timeout + NFS_TIMEOUT *
 NfsTimeoutCount, NfsTimeout);
  NfsSend();
  }
   }
  @@ -583,6 +599,7 @@ static void
   NfsHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
 unsigned len)
   {
  int rlen;
  +   int reply;
 
  debug(%s\n, __func__);
 
  @@ -591,19 +608,24 @@ NfsHandler(uchar *pkt, unsigned dest, IPaddr_t
 sip, unsigned src, unsigned len)
 
  switch (NfsState) {
  case STATE_PRCLOOKUP_PROG_MOUNT_REQ:
  -   rpc_lookup_reply(PROG_MOUNT, pkt, len);
  +   if (rpc_lookup_reply(PROG_MOUNT, pkt, len) ==
 -NFS_RPC_DROP)
  + 

Re: [U-Boot] [ARM] Rollback *again* -- 5 patches PLUS 31 patches... -- FIXED

2013-04-12 Thread Albert ARIBAUD
Hi Albert,

On Thu, 11 Apr 2013 18:30:58 +0200, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 Hi Albert,
 
 On Thu, 11 Apr 2013 17:25:34 +0200, Albert ARIBAUD
 albert.u.b...@aribaud.net wrote:
 
  Hello,
  
  Older toolchain and PPC incompatibilities appeared in the last two
  additions to ToT ARM. To avoid non-bisectability, ToT has been rolled
  back from abbecf4c87 to ae74b65987. This removes
  
  abbecf4 ARM: Fix __bss_start and __bss_end in linker scripts
  
  (HIDDEN not known by most binutils 2.22 or older ones)
  
  aad17a2 ARM: fix CONFIG_SPL_MAX_SIZE semantics
  72c1601 smdk5250, snow: fix CONFIG_SPL_MAX_SIZE semantics
  55e46fc da850evm, da850_am18xxevm: fix CONFIG_SPL_MAX_SIZE semantics
  0502854 cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics
  
  (PPC builds fail because --pad-to receives an expr, not a constant)
 
 Actually, the failure was not due to this series, but to patch
 16/30 of Benoît's series. In agreement with Tom, rolling further back,
 removing the recent TI PR merge and all of Benoît's series.

Status:

- Benoît's series was fixed and build-tested against ARM and PPC.

- Fabio's watchdog removal patch was reapplied.

- Tom's TI PR was re-applied.

ARM Tot (c97b6df1ae92679d67f94c1cfef51323782a506d) can now be used
again for basing PRs and patch submissions.

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


[U-Boot] [PATCH] powpc/mpc85xx: explicit cast the SDRAM size to type phys_size_t

2013-04-12 Thread Mingkai Hu
To avoid sign extension problem, use explicit casting to cast
the SDRAM size to type phys_size_t, or else, if the SDRAM size
is 2G(0x8000), it will be extended to 0x8000
when phys_size_t is type 'unsigned long long'.

Signed-off-by: Mingkai Hu mingkai...@freescale.com
---
Based on master branch of git://git.denx.de/u-boot.git
Also can apply direcly to git://www.denx.de/git/u-boot-mpc85xx.git

 arch/powerpc/cpu/mpc85xx/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index df2ab6d..ee6fac3 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -339,7 +339,7 @@ phys_size_t initdram(int board_type)
 #if defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD)
return fsl_ddr_sdram_size();
 #else
-   return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
+   return (phys_size_t)CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
 #endif
 }
 #else /* CONFIG_SYS_RAMBOOT */
-- 
1.8.0


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


[U-Boot] [PATCH] powerpc/mpc85xx: explicit cast the SDRAM size to type phys_size_t

2013-04-12 Thread Mingkai Hu
To avoid sign extension problem, use explicit casting to cast
the SDRAM size to type phys_size_t, or else, if the SDRAM size
is 2G(0x8000), it will be extended to 0x8000
when phys_size_t is type 'unsigned long long'.

Signed-off-by: Mingkai Hu mingkai...@freescale.com
---

Based on master branch of git://git.denx.de/u-boot.git
Also can apply direcly to git://www.denx.de/git/u-boot-mpc85xx.git

 arch/powerpc/cpu/mpc85xx/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index df2ab6d..ee6fac3 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -339,7 +339,7 @@ phys_size_t initdram(int board_type)
 #if defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD)
return fsl_ddr_sdram_size();
 #else
-   return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
+   return (phys_size_t)CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
 #endif
 }
 #else /* CONFIG_SYS_RAMBOOT */
-- 
1.8.0


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


Re: [U-Boot] Please pull u-boot-cfi-flash/master

2013-04-12 Thread Wolfgang Denk
Dear Tom, Stfan, Aaron,

In message 20130405162807.GH32357@bill-the-cat you wrote:
 
  please pull the updated cfi-flash repository with the build warning fix:
...
  aaron.willi...@caviumnetworks.com (1):
mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support

Hereby I ask to revert the mtd: cfi_flash: Fix CFI flash driver for
8-bit bus support patch,. i. e. Commit 239cb9d.

It breaks the CFI driver on a board here.  The board has two banks of
AMD NOR flash, mapped at F800. and FC00., resp.  With current
code, the flash is not detected.  Here is the debug log:

flash detect cfi
fwc addr f800 cmd f0 f0 8bit x 8 bit
fwc addr f800 cmd ff ff 8bit x 8 bit
fwc addr f8aa cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr f820 is= 31 51
fwc addr f800 cmd f0 f0 8bit x 8 bit
fwc addr f800 cmd ff ff 8bit x 8 bit
fwc addr f8000555 cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr f820 is= 31 51
fwc addr f800 cmd f0 f0f0 16bit x 8 bit
fwc addr f800 cmd ff  16bit x 8 bit
fwc addr f8000154 cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr f840 is= 0051 5151
fwc addr f800 cmd f0 f0f0 16bit x 8 bit
fwc addr f800 cmd ff  16bit x 8 bit
fwc addr f8000aaa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr f840 is=  5151
fwc addr f800 cmd f0 00f0 16bit x 16 bit
fwc addr f800 cmd ff 00ff 16bit x 16 bit
fwc addr f8aa cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr f820 is= 3137 0051
fwc addr f800 cmd f0 00f0 16bit x 16 bit
fwc addr f800 cmd ff 00ff 16bit x 16 bit
fwc addr f8000554 cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr f820 is=  0051
fwc addr f800 cmd f0 f0f0f0f0 32bit x 8 bit
fwc addr f800 cmd ff  32bit x 8 bit
fwc addr f80002a8 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr f880 is= 0004 51515151
fwc addr f800 cmd f0 f0f0f0f0 32bit x 8 bit
fwc addr f800 cmd ff  32bit x 8 bit
fwc addr f8001550 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr f880 is= 0004 51515151
fwc addr f800 cmd f0 00f000f0 32bit x 16 bit
fwc addr f800 cmd ff 00ff00ff 32bit x 16 bit
fwc addr f8000150 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr f840 is=  00510051
fwc addr f800 cmd f0 00f000f0 32bit x 16 bit
fwc addr f800 cmd ff 00ff00ff 32bit x 16 bit
fwc addr f8000aa8 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr f840 is=  00510051
fwc addr f800 cmd f0 00f0 32bit x 32 bit
fwc addr f800 cmd ff 00ff 32bit x 32 bit
fwc addr f8a8 cmd 98 0098 32bit x 32 bit
is= cmd 51(Q) addr f820 is= 31373a33 0051
fwc addr f800 cmd f0 00f0 32bit x 32 bit
fwc addr f800 cmd ff 00ff 32bit x 32 bit
fwc addr f8000550 cmd 98 0098 32bit x 32 bit
is= cmd 51(Q) addr f820 is= 31373a33 0051
fwrite addr f800 cmd f0 f0f0f0f0f0f0f0f0 64 bit x 8 bit
fwrite addr f800 cmd ff  64 bit x 8 bit
fwrite addr f8000500 cmd 98 9898989898989898 64 bit x 8 bit
is= cmd 51(Q) addr f8000100 is=  5151515151515151
fwrite addr f800 cmd f0 f0f0f0f0f0f0f0f0 64 bit x 8 bit
fwrite addr f800 cmd ff  64 bit x 8 bit
fwrite addr f8002a80 cmd 98 9898989898989898 64 bit x 8 bit
is= cmd 51(Q) addr f8000100 is=  5151515151515151
fwrite addr f800 cmd f0 00f000f000f000f0 64 bit x 16 bit
fwrite addr f800 cmd ff 00ff00ff00ff00ff 64 bit x 16 bit
fwrite addr f8000280 cmd 98 0098009800980098 64 bit x 16 bit
is= cmd 51(Q) addr f880 is= 0004 0051005100510051
fwrite addr f800 cmd f0 00f000f000f000f0 64 bit x 16 bit
fwrite addr f800 cmd ff 00ff00ff00ff00ff 64 bit x 16 bit
fwrite addr f8001500 cmd 98 0098009800980098 64 bit x 16 bit
is= cmd 51(Q) addr f880 is= 0004 0051005100510051
fwrite addr f800 cmd f0 00f000f0 64 bit x 32 bit
fwrite addr f800 cmd ff 00ff00ff 64 bit x 32 bit
fwrite addr f8000100 cmd 98 00980098 64 bit x 32 bit
is= cmd 51(Q) addr f800 is= 27051956552d426f 00510051
fwrite addr f800 cmd f0 00f000f0 64 bit x 32 bit
fwrite addr f800 cmd ff 00ff00ff 64 bit x 32 bit
fwrite addr f8000a80 cmd 98 00980098 64 bit x 32 bit
is= cmd 51(Q) addr f800 is= 27051956552d426f 00510051
fwrite addr f800 cmd f0 00f0 64 bit x 64 bit
fwrite addr f800 cmd ff 00ff 64 bit x 64 bit
fwrite addr f880 cmd 98 0098 64 bit x 64 bit
is= cmd 51(Q) addr f800 is= 27051956552d426f 0051
fwrite addr f800 cmd f0 00f0 64 bit x 64 bit
fwrite addr f800 cmd ff 00ff 64 bit x 64 bit
fwrite addr f8000500 cmd 98 0098 64 bit x 64 bit
is= cmd 51(Q) addr f800 is= 27051956552d426f 0051
not found
flash detect cfi
fwc addr fc00 cmd f0 f0 8bit x 8 bit
fwc addr fc00 cmd ff ff 8bit x 8 bit
fwc addr fcaa cmd 98 98 8bit x 8 bit
is= cmd 51(Q) addr fc20 is= 31 51
fwc addr fc00 

Re: [U-Boot] Please pull u-boot-cfi-flash/master

2013-04-12 Thread Stefan Roese
Hi Wolfgang,

On 12.04.2013 11:35, Wolfgang Denk wrote:
 In message 20130405162807.GH32357@bill-the-cat you wrote:

 please pull the updated cfi-flash repository with the build warning fix:
 ...
 aaron.willi...@caviumnetworks.com (1):
   mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support
 
 Hereby I ask to revert the mtd: cfi_flash: Fix CFI flash driver for
 8-bit bus support patch,. i. e. Commit 239cb9d.
 
 It breaks the CFI driver on a board here.  The board has two banks of
 AMD NOR flash, mapped at F800. and FC00., resp.  With current
 code, the flash is not detected.  Here is the debug log:

Yes, please we should revert this patch for this release.

Tom, will you do the revert yourself? Or should I send I PR for this?

Thanks,
Stefan

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


Re: [U-Boot] [PATCH] powpc/mpc85xx: explicit cast the SDRAM size to type phys_size_t

2013-04-12 Thread Hu Mingkai-B21284
Please ignore this patch because there's a typo in title powpc.
Thanks,
Mingkai

-Original Message-
From: Hu Mingkai-B21284 
Sent: Friday, April 12, 2013 3:53 PM
To: u-boot@lists.denx.de
Cc: Fleming Andy-AFLEMING; sun york-R58495; Hu Mingkai-B21284
Subject: [PATCH] powpc/mpc85xx: explicit cast the SDRAM size to type phys_size_t

To avoid sign extension problem, use explicit casting to cast the SDRAM size to 
type phys_size_t, or else, if the SDRAM size is 2G(0x8000), it will be 
extended to 0x8000 when phys_size_t is type 'unsigned long long'.

Signed-off-by: Mingkai Hu mingkai...@freescale.com
---
Based on master branch of git://git.denx.de/u-boot.git Also can apply direcly 
to git://www.denx.de/git/u-boot-mpc85xx.git

 arch/powerpc/cpu/mpc85xx/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c 
index df2ab6d..ee6fac3 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -339,7 +339,7 @@ phys_size_t initdram(int board_type)  #if 
defined(CONFIG_SPD_EEPROM) || defined(CONFIG_DDR_SPD)
return fsl_ddr_sdram_size();
 #else
-   return CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
+   return (phys_size_t)CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
 #endif
 }
 #else /* CONFIG_SYS_RAMBOOT */
--
1.8.0


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


[U-Boot] How do I use AM335x eth1 rather than eth0 ?

2013-04-12 Thread Mark Jackson
We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet 
ports connected.

I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-

static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs  = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
{
.slave_reg_ofs  = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
};

... to ...

static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs  = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
{
.slave_reg_ofs  = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
};

... assuming that eth0 would now be ignored (as only 1 slave is configured).

But (eg) dhcp still only responds on eth0 !?!

What else do I have to change ?

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


Re: [U-Boot] [PATCH v2 0/5] usb: ss: Some fixes and cleanup for USB super-speed support

2013-04-12 Thread Vivek Gautam
On Mon, Apr 8, 2013 at 4:05 PM, Vivek Gautam gautam.vi...@samsung.com wrote:
 Based on 'u-boot-usb' master branch.

 This patch-series includes majorly some clean-up, few fixes and
 then some basic super-speed usb infrastructure addition, to help
 put support for XHCI in near future.

 Changes from v1:
  - Fixing the issue with 'ifno' as well as added 'if_desc'.
  - Instead of turning-on only powered-off hub ports, power-cycle all
the hub ports (aka: turning off and then turning on again power to
all the ports.
  - Fixing commenting style problem in
'usb: Update device class in usb device's descriptor'
  - Fixing typo in commit message for
'usb: hub: Fix enumration timeout'
  - Removing separate definition for 'struct usb_ep_desc'; thereby adding
'struct usb_ss_ep_comp_descriptor' to 'struct usb_interface' only.
As a result modifying the patch accordingly also dropping the patch
'usb: eth: Fix for updated usb interface descriptor structure'
  - Dropping the patch 'usb: hub: Increase device enumeration timeout for 
 broken
drives' for now (will come back with a solution at later point of time).

Re-spinning this patch-series for V3.



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


[U-Boot] How do I use AM335x eth1 rather than eth0 ?

2013-04-12 Thread Mark Jackson
We have a dual Ethernet board (based on the BeagelBone) but with both Ethernet 
ports connected.

I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-

static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs  = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
{
.slave_reg_ofs  = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
};

... to ...

static struct cpsw_slave_data cpsw_slaves[] = {
{
.slave_reg_ofs  = 0x308,
.sliver_reg_ofs = 0xdc0,
.phy_id = 1,
},
{
.slave_reg_ofs  = 0x208,
.sliver_reg_ofs = 0xd80,
.phy_id = 0,
},
};

... assuming that eth0 would now be ignored (as only 1 slave is configured).

But (eg) dhcp still only responds on eth0 !?!

What else do I have to change ?

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


[U-Boot] [PATCH v3 0/8] usb: ss: Some fixes and cleanup for USB super-speed support

2013-04-12 Thread Vivek Gautam
Based on 'u-boot-usb' master branch.

This patch-series includes majorly some clean-up, few fixes and
then some basic super-speed usb infrastructure addition, to help
put support for XHCI in near future.

Changes from v2:
 - Added a patch usb: common: Weed out USB_**_PRINTFs from usb framework
   to replace USB_***_PRINTF with debug() so as to get rid of unnecessary
   DEBUG macros in usb common framework and thereby rebasing other patches
   on top of this so that no USB_PRINTF appears further.
 - Added a patch to reset only USB 2.0 ports, since USB 3.0 protocol ports
   don't require a reset to happen to move to 'enabled' state.
 - Added a patch to move definition of 'min3()' out of ehci-hcd and putting
   the same as macro definition in common header.
 - Using a 'switch-case' in portspeed() in cmd_usb.c

Changes from v1:
 - Fixing the issue with 'ifno' as well as added 'if_desc'.
 - Instead of turning-on only powered-off hub ports, power-cycle all
   the hub ports (aka: turning off and then turning on again power to
   all the ports.
 - Fixing commenting style problem in
   'usb: Update device class in usb device's descriptor'
 - Fixing typo in commit message for
   'usb: hub: Fix enumration timeout'
 - Removing separate definition for 'struct usb_ep_desc'; thereby adding
   'struct usb_ss_ep_comp_descriptor' to 'struct usb_interface' only.
   As a result modifying the patch accordingly also dropping the patch
   'usb: eth: Fix for updated usb interface descriptor structure'
 - Dropping the patch 'usb: hub: Increase device enumeration timeout for broken
   drives' for now (will come back with a solution at later point of time).

Vivek Gautam (8):
  usb: common: Weed out USB_**_PRINTFs from usb framework
  USB: Some cleanup prior to USB 3.0 interface addition
  usb: hub: Power-cycle on root-hub ports
  usb: Update device class in usb device's descriptor
  usb: hub: Fix enumration timeout
  USB: SS: Add support for Super Speed USB interface
  usb: hub: Reset only usb 2.0 ports
  usb: common: Use a global macro for 'min3'

 common/cmd_usb.c|   24 +++-
 common/usb.c|  116 +-
 common/usb_hub.c|  228 ---
 common/usb_kbd.c|   24 ++---
 common/usb_storage.c|  283 +--
 drivers/usb/host/ehci-hcd.c |   10 --
 include/common.h|2 +
 include/usb.h   |6 +
 include/usb_defs.h  |   26 -
 9 files changed, 389 insertions(+), 330 deletions(-)

-- 
1.7.6.5

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


[U-Boot] [PATCH v3 2/8] USB: Some cleanup prior to USB 3.0 interface addition

2013-04-12 Thread Vivek Gautam
Some cleanup in usb framework, nothing much on feature side.

Signed-off-by: Vikas C Sajjan vikas.saj...@samsung.com
Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
---

Changes from v2:
 - none

 common/usb.c |   21 +
 common/usb_storage.c |   30 --
 include/usb_defs.h   |2 +-
 3 files changed, 30 insertions(+), 23 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index 50fa466..8407974 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -348,6 +348,7 @@ static int usb_parse_config(struct usb_device *dev,
struct usb_descriptor_header *head;
int index, ifno, epno, curr_if_num;
u16 ep_wMaxPacketSize;
+   struct usb_interface *if_desc = NULL;
 
ifno = -1;
epno = -1;
@@ -375,23 +376,27 @@ static int usb_parse_config(struct usb_device *dev,
 buffer[index])-bInterfaceNumber != curr_if_num) {
/* this is a new interface, copy new desc */
ifno = dev-config.no_of_if;
+   if_desc = dev-config.if_desc[ifno];
dev-config.no_of_if++;
-   memcpy(dev-config.if_desc[ifno],
-   buffer[index], buffer[index]);
-   dev-config.if_desc[ifno].no_of_ep = 0;
-   dev-config.if_desc[ifno].num_altsetting = 1;
+   memcpy(if_desc, buffer[index], buffer[index]);
+   if_desc-no_of_ep = 0;
+   if_desc-num_altsetting = 1;
curr_if_num =
-
dev-config.if_desc[ifno].desc.bInterfaceNumber;
+if_desc-desc.bInterfaceNumber;
} else {
/* found alternate setting for the interface */
-   dev-config.if_desc[ifno].num_altsetting++;
+   if (ifno = 0) {
+   if_desc = dev-config.if_desc[ifno];
+   if_desc-num_altsetting++;
+   }
}
break;
case USB_DT_ENDPOINT:
epno = dev-config.if_desc[ifno].no_of_ep;
+   if_desc = dev-config.if_desc[ifno];
/* found an endpoint */
-   dev-config.if_desc[ifno].no_of_ep++;
-   memcpy(dev-config.if_desc[ifno].ep_desc[epno],
+   if_desc-no_of_ep++;
+   memcpy(if_desc-ep_desc[epno],
buffer[index], buffer[index]);
ep_wMaxPacketSize = get_unaligned(dev-config.\
if_desc[ifno].\
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 983cbab..2651042 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -269,9 +269,9 @@ int usb_stor_scan(int mode)
 lun++) {
usb_dev_desc[usb_max_devs].lun = lun;
if (usb_stor_get_info(dev, usb_stor[start],
- 
usb_dev_desc[usb_max_devs]) == 1) {
-   usb_max_devs++;
-   }
+   usb_dev_desc[usb_max_devs]) == 1) {
+   usb_max_devs++;
+   }
}
}
/* if storage device */
@@ -504,7 +504,7 @@ static int usb_stor_BBB_comdat(ccb *srb, struct us_data *us)
dir_in = US_DIRECTION(srb-cmd[0]);
 
 #ifdef BBB_COMDAT_TRACE
-   printf(dir %d lun %d cmdlen %d cmd %p datalen %d pdata %p\n,
+   printf(dir %d lun %d cmdlen %d cmd %p datalen %lu pdata %p\n,
dir_in, srb-lun, srb-cmdlen, srb-cmd, srb-datalen,
srb-pdata);
if (srb-cmdlen) {
@@ -1209,6 +1209,7 @@ int usb_storage_probe(struct usb_device *dev, unsigned 
int ifnum,
 {
struct usb_interface *iface;
int i;
+   struct usb_endpoint_descriptor *ep_desc;
unsigned int flags = 0;
 
int protocol = 0;
@@ -1291,24 +1292,25 @@ int usb_storage_probe(struct usb_device *dev, unsigned 
int ifnum,
 * We will ignore any others.
 */
for (i = 0; i  iface-desc.bNumEndpoints; i++) {
+   ep_desc = iface-ep_desc[i];
/* is it an BULK endpoint? */
-   if ((iface-ep_desc[i].bmAttributes 
+   if ((ep_desc-bmAttributes 
 USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK) {
-   if (iface-ep_desc[i].bEndpointAddress  USB_DIR_IN)
-   

[U-Boot] [PATCH v3 1/8] usb: common: Weed out USB_**_PRINTFs from usb framework

2013-04-12 Thread Vivek Gautam
USB_PRINTF, USB_HUB_PRINTF, USB_STOR_PRINTF, USB_KBD_PRINTF
are nothing but conditional debug prints, depending on DEBUG.
So better remove them and use debug() simply.

Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
---

This patch added in V3(current-version) of this patch-series.

 common/usb.c |   85 --
 common/usb_hub.c |  162 +++-
 common/usb_kbd.c |   24 ++---
 common/usb_storage.c |  253 --
 4 files changed, 241 insertions(+), 283 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index 6fc0fc1..50fa466 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -57,17 +57,6 @@
 #include asm/4xx_pci.h
 #endif
 
-#ifdef DEBUG
-#define USB_DEBUG  1
-#define USB_HUB_DEBUG  1
-#else
-#define USB_DEBUG  0
-#define USB_HUB_DEBUG  0
-#endif
-
-#define USB_PRINTF(fmt, args...)   debug_cond(USB_DEBUG, fmt, ##args)
-#define USB_HUB_PRINTF(fmt, args...)   debug_cond(USB_HUB_DEBUG, fmt, ##args)
-
 #define USB_BUFSIZ 512
 
 static struct usb_device usb_dev[USB_MAX_DEVICE];
@@ -130,7 +119,7 @@ int usb_init(void)
usb_started = 1;
}
 
-   USB_PRINTF(scan end\n);
+   debug(scan end\n);
/* if we were not able to find at least one working bus, bail out */
if (!usb_started) {
puts(USB error: all controllers failed lowlevel init\n);
@@ -216,9 +205,9 @@ int usb_control_msg(struct usb_device *dev, unsigned int 
pipe,
setup_packet-value = cpu_to_le16(value);
setup_packet-index = cpu_to_le16(index);
setup_packet-length = cpu_to_le16(size);
-   USB_PRINTF(usb_control_msg: request: 0x%X, requesttype: 0x%X,  \
-  value 0x%X index 0x%X length 0x%X\n,
-  request, requesttype, value, index, size);
+   debug(usb_control_msg: request: 0x%X, requesttype: 0x%X,  \
+ value 0x%X index 0x%X length 0x%X\n,
+ request, requesttype, value, index, size);
dev-status = USB_ST_NOT_PROC; /*not yet processed */
 
if (submit_control_msg(dev, pipe, data, size, setup_packet)  0)
@@ -314,22 +303,22 @@ usb_set_maxpacket_ep(struct usb_device *dev, int if_idx, 
int ep_idx)
/* Control = bidirectional */
dev-epmaxpacketout[b] = ep_wMaxPacketSize;
dev-epmaxpacketin[b] = ep_wMaxPacketSize;
-   USB_PRINTF(##Control EP epmaxpacketout/in[%d] = %d\n,
-  b, dev-epmaxpacketin[b]);
+   debug(##Control EP epmaxpacketout/in[%d] = %d\n,
+ b, dev-epmaxpacketin[b]);
} else {
if ((ep-bEndpointAddress  0x80) == 0) {
/* OUT Endpoint */
if (ep_wMaxPacketSize  dev-epmaxpacketout[b]) {
dev-epmaxpacketout[b] = ep_wMaxPacketSize;
-   USB_PRINTF(##EP epmaxpacketout[%d] = %d\n,
-  b, dev-epmaxpacketout[b]);
+   debug(##EP epmaxpacketout[%d] = %d\n,
+ b, dev-epmaxpacketout[b]);
}
} else {
/* IN Endpoint */
if (ep_wMaxPacketSize  dev-epmaxpacketin[b]) {
dev-epmaxpacketin[b] = ep_wMaxPacketSize;
-   USB_PRINTF(##EP epmaxpacketin[%d] = %d\n,
-  b, dev-epmaxpacketin[b]);
+   debug(##EP epmaxpacketin[%d] = %d\n,
+ b, dev-epmaxpacketin[b]);
}
} /* if out */
} /* if control */
@@ -358,7 +347,6 @@ static int usb_parse_config(struct usb_device *dev,
 {
struct usb_descriptor_header *head;
int index, ifno, epno, curr_if_num;
-   int i;
u16 ep_wMaxPacketSize;
 
ifno = -1;
@@ -414,23 +402,25 @@ static int usb_parse_config(struct usb_device *dev,
if_desc[ifno].\
ep_desc[epno].\
wMaxPacketSize);
-   USB_PRINTF(if %d, ep %d\n, ifno, epno);
+   debug(if %d, ep %d\n, ifno, epno);
break;
default:
if (head-bLength == 0)
return 1;
 
-   USB_PRINTF(unknown Description Type : %x\n,
-  head-bDescriptorType);
+   debug(unknown Description Type : %x\n,
+ head-bDescriptorType);
 
+#ifdef DEBUG
{
-#ifdef USB_DEBUG
unsigned char *ch = (unsigned char *)head;
-#endif
+   int i;
+
for (i 

[U-Boot] [PATCH v3 3/8] usb: hub: Power-cycle on root-hub ports

2013-04-12 Thread Vivek Gautam
XHCI ports are powered on after a H/W reset, however
EHCI ports are not. So disabling and re-enabling power
on all ports invariably.

Signed-off-by: Amar amarendra...@samsung.com
Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
---

Changes from v2:
 - Replaced USB_HUB_PRINTFs to debug()

 common/usb_hub.c |   34 ++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index f2a0285..e4f4e3c 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -100,11 +100,45 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
int i;
struct usb_device *dev;
unsigned pgood_delay = hub-desc.bPwrOn2PwrGood * 2;
+   ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);
+   unsigned short portstatus;
+   int ret;
 
dev = hub-pusb_dev;
/* Enable power to the ports */
debug(enabling power on all ports\n);
for (i = 0; i  dev-maxchild; i++) {
+   /*
+* Power-cycle the ports here: aka,
+* turning them off and turning on again.
+*/
+   usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
+   debug(port %d returns %lX\n, i + 1, dev-status);
+
+   /* Wait at least 2*bPwrOn2PwrGood for PP to change */
+   mdelay(pgood_delay);
+
+   ret = usb_get_port_status(dev, i + 1, portsts);
+   if (ret  0) {
+   debug(port %d: get_port_status failed\n, i + 1);
+   return;
+   }
+
+   /*
+* Check to confirm the state of Port Power:
+* xHCI says After modifying PP, s/w shall read
+* PP and confirm that it has reached the desired state
+* before modifying it again, undefined behavior may occur
+* if this procedure is not followed.
+* EHCI doesn't say anything like this, but no harm in keeping
+* this.
+*/
+   portstatus = le16_to_cpu(portsts-wPortStatus);
+   if (portstatus  (USB_PORT_STAT_POWER  1)) {
+   debug(port %d: Port power change failed\n, i + 1);
+   return;
+   }
+
usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
debug(port %d returns %lX\n, i + 1, dev-status);
}
-- 
1.7.6.5

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


[U-Boot] [PATCH v3 4/8] usb: Update device class in usb device's descriptor

2013-04-12 Thread Vivek Gautam
Fetch the device class into usb device's dwcriptors,
so that the host controller's driver can use this info
to differentiate between HUB and DEVICE.

Signed-off-by: Amar amarendra...@samsung.com
---

Changes from v2:
 - none

 common/usb.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index 8407974..3a96a34 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -879,6 +879,11 @@ int usb_new_device(struct usb_device *dev)
}
 
dev-descriptor.bMaxPacketSize0 = desc-bMaxPacketSize0;
+   /*
+* Fetch the device class, driver can use this info
+* to differentiate between HUB and DEVICE.
+*/
+   dev-descriptor.bDeviceClass = desc-bDeviceClass;
 
/* find the port number we're at */
if (parent) {
-- 
1.7.6.5

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


[U-Boot] [PATCH v3 5/8] usb: hub: Fix enumration timeout

2013-04-12 Thread Vivek Gautam
Patch b6d7852c increases timeout for enumeration, taking
worst case to be 10 sec.
get_timer() api returns timestamp in milliseconds, which is
what we are checking in the do-while() loop in usb_hub_configure()
(get_timer(start)  CONFIG_SYS_HZ * 10).
This should give us a required check for 10 seconds, and thereby
we don't need to add additional mdelay of 100 microseconds in
each cycle.

Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
Reviewed-by: Vipin Kumar vipin.ku...@st.com
---

Changes from v2:
 - none

 common/usb_hub.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index e4f4e3c..ab41943 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -443,7 +443,6 @@ static int usb_hub_configure(struct usb_device *dev)
(portstatus  USB_PORT_STAT_CONNECTION))
break;
 
-   mdelay(100);
} while (get_timer(start)  CONFIG_SYS_HZ * 10);
 
if (ret  0)
-- 
1.7.6.5

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


[U-Boot] [PATCH v3 6/8] USB: SS: Add support for Super Speed USB interface

2013-04-12 Thread Vivek Gautam
This adds usb framework support for super-speed usb, which will
further facilitate to add stack support for xHCI.

Signed-off-by: Vikas C Sajjan vikas.saj...@samsung.com
Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
---

Changes from v2:
 - Replacing if-else with switch-case in portspeed() in cmd_usb.c

 common/cmd_usb.c   |   24 ++--
 common/usb.c   |5 +
 common/usb_hub.c   |8 ++--
 include/usb.h  |6 ++
 include/usb_defs.h |   24 +++-
 5 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index dacdc2d..594385a 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -271,12 +271,24 @@ static void usb_display_config(struct usb_device *dev)
 
 static inline char *portspeed(int speed)
 {
-   if (speed == USB_SPEED_HIGH)
-   return 480 Mb/s;
-   else if (speed == USB_SPEED_LOW)
-   return 1.5 Mb/s;
-   else
-   return 12 Mb/s;
+   char *speed_str;
+
+   switch (speed) {
+   case USB_SPEED_SUPER:
+   speed_str = 5 Gb/s;
+   break;
+   case USB_SPEED_HIGH:
+   speed_str = 480 Mb/s;
+   break;
+   case USB_SPEED_LOW:
+   speed_str = 1.5 Mb/s;
+   break;
+   default:
+   speed_str = 12 Mb/s;
+   break;
+   }
+
+   return speed_str;
 }
 
 /* shows the device tree recursively */
diff --git a/common/usb.c b/common/usb.c
index 3a96a34..55fff5b 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -409,6 +409,11 @@ static int usb_parse_config(struct usb_device *dev,
wMaxPacketSize);
debug(if %d, ep %d\n, ifno, epno);
break;
+   case USB_DT_SS_ENDPOINT_COMP:
+   if_desc = dev-config.if_desc[ifno];
+   memcpy(if_desc-ss_ep_comp_desc[epno],
+   buffer[index], buffer[index]);
+   break;
default:
if (head-bLength == 0)
return 1;
diff --git a/common/usb_hub.c b/common/usb_hub.c
index ab41943..1e225e6 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -165,7 +165,9 @@ static struct usb_hub_device *usb_hub_allocate(void)
 
 static inline char *portspeed(int portstatus)
 {
-   if (portstatus  (1  USB_PORT_FEAT_HIGHSPEED))
+   if (portstatus  (1  USB_PORT_FEAT_SUPERSPEED))
+   return 5 Gb/s;
+   else if (portstatus  (1  USB_PORT_FEAT_HIGHSPEED))
return 480 Mb/s;
else if (portstatus  (1  USB_PORT_FEAT_LOWSPEED))
return 1.5 Mb/s;
@@ -268,7 +270,9 @@ void usb_hub_port_connect_change(struct usb_device *dev, 
int port)
/* Allocate a new device struct for it */
usb = usb_alloc_new_device(dev-controller);
 
-   if (portstatus  USB_PORT_STAT_HIGH_SPEED)
+   if (portstatus  USB_PORT_STAT_SUPER_SPEED)
+   usb-speed = USB_SPEED_SUPER;
+   else if (portstatus  USB_PORT_STAT_HIGH_SPEED)
usb-speed = USB_SPEED_HIGH;
else if (portstatus  USB_PORT_STAT_LOW_SPEED)
usb-speed = USB_SPEED_LOW;
diff --git a/include/usb.h b/include/usb.h
index d79c865..d7b082d 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -76,6 +76,12 @@ struct usb_interface {
unsigned char   act_altsetting;
 
struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS];
+   /*
+* Super Speed Device will have Super Speed Endpoint
+* Companion Descriptor  (section 9.6.7 of usb 3.0 spec)
+* Revision 1.0 June 6th 2011
+*/
+   struct usb_ss_ep_comp_descriptor ss_ep_comp_desc[USB_MAXENDPOINTS];
 } __attribute__ ((packed));
 
 /* Configuration information.. */
diff --git a/include/usb_defs.h b/include/usb_defs.h
index 0c78d9d..e2aaef3 100644
--- a/include/usb_defs.h
+++ b/include/usb_defs.h
@@ -203,6 +203,8 @@
 #define USB_PORT_FEAT_POWER  8
 #define USB_PORT_FEAT_LOWSPEED   9
 #define USB_PORT_FEAT_HIGHSPEED  10
+#define USB_PORT_FEAT_FULLSPEED  11
+#define USB_PORT_FEAT_SUPERSPEED 12
 #define USB_PORT_FEAT_C_CONNECTION   16
 #define USB_PORT_FEAT_C_ENABLE   17
 #define USB_PORT_FEAT_C_SUSPEND  18
@@ -218,8 +220,20 @@
 #define USB_PORT_STAT_POWER 0x0100
 #define USB_PORT_STAT_LOW_SPEED 0x0200
 #define USB_PORT_STAT_HIGH_SPEED0x0400 /* support for EHCI */
+#define USB_PORT_STAT_FULL_SPEED0x0800
+#define USB_PORT_STAT_SUPER_SPEED   0x1000 /* support for XHCI */
 #define USB_PORT_STAT_SPEED\
-   (USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED)
+   (USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED | \
+   USB_PORT_STAT_FULL_SPEED | USB_PORT_STAT_SUPER_SPEED)
+
+/*
+ * Additions to wPortStatus bit field from USB 3.0
+ * See USB 3.0 spec Table 10-10
+ */
+#define 

[U-Boot] [PATCH v3 7/8] usb: hub: Reset only usb 2.0 ports

2013-04-12 Thread Vivek Gautam
As per XHCI specifications USB 3.0 protocol ports attempt
to advance to 'Enabled' state; however USB 2.0 protocol ports
require software reset to advance them to 'Enabled' state.
Thereby, inferring that software need to reset USB 2.0 protocol
ports invariably (as per EHCI spec or xHCI spec).

Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
---

This patch added in V3(current-version) of this patch-series.

 common/usb_hub.c |   23 +++
 1 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/common/usb_hub.c b/common/usb_hub.c
index 1e225e6..eedbcf2 100644
--- a/common/usb_hub.c
+++ b/common/usb_hub.c
@@ -233,6 +233,7 @@ void usb_hub_port_connect_change(struct usb_device *dev, 
int port)
struct usb_device *usb;
ALLOC_CACHE_ALIGN_BUFFER(struct usb_port_status, portsts, 1);
unsigned short portstatus;
+   uint32_t do_port_reset = 1;
 
/* Check status */
if (usb_get_port_status(dev, port + 1, portsts)  0) {
@@ -246,6 +247,9 @@ void usb_hub_port_connect_change(struct usb_device *dev, 
int port)
  le16_to_cpu(portsts-wPortChange),
  portspeed(portstatus));
 
+   if (portstatus  (1  USB_PORT_FEAT_SUPERSPEED))
+   do_port_reset = 0;
+
/* Clear the connection change status */
usb_clear_port_feature(dev, port + 1, USB_PORT_FEAT_C_CONNECTION);
 
@@ -259,10 +263,21 @@ void usb_hub_port_connect_change(struct usb_device *dev, 
int port)
}
mdelay(200);
 
-   /* Reset the port */
-   if (hub_port_reset(dev, port, portstatus)  0) {
-   printf(cannot reset port %i!?\n, port + 1);
-   return;
+   /*
+* Reset the port:
+* As per xHCI protocol, USB 3.0 devices do not require
+* a port reset, however USB 2.0 device do require the same
+* to let ports proceed to 'enabled' state
+*
+* XXX: Will this break EHCI ??
+* probably not, above condition for 'do_port_reset' checks for
+* speed, and for EHCI it can't reach Super speed anyways.
+*/
+   if (do_port_reset) {
+   if (hub_port_reset(dev, port, portstatus)  0) {
+   printf(cannot reset port %i!?\n, port + 1);
+   return;
+   }
}
 
mdelay(200);
-- 
1.7.6.5

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


[U-Boot] [PATCH v3 8/8] usb: common: Use a global macro for 'min3'

2013-04-12 Thread Vivek Gautam
We can use a common global macro for calculating minimum of
3 numbers. Put the same in 'common header' and let 'ehci'
use it.

Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
---

This patch added in V3(current-version) of this patch-series.

 drivers/usb/host/ehci-hcd.c |   10 --
 include/common.h|2 ++
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index c816878..bcecae3 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -587,16 +587,6 @@ fail:
return -1;
 }
 
-static inline int min3(int a, int b, int c)
-{
-
-   if (b  a)
-   a = b;
-   if (c  a)
-   a = c;
-   return a;
-}
-
 int
 ehci_submit_root(struct usb_device *dev, unsigned long pipe, void *buffer,
 int length, struct devrequest *req)
diff --git a/include/common.h b/include/common.h
index d41aeb4..37269c7 100644
--- a/include/common.h
+++ b/include/common.h
@@ -211,6 +211,8 @@ typedef void (interrupt_handler_t)(void *);
 #define MIN(x, y)  min(x, y)
 #define MAX(x, y)  max(x, y)
 
+#define min3(a, b, c)  min(min(a, b), c)
+
 /*
  * Return the absolute value of a number.
  *
-- 
1.7.6.5

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


[U-Boot] CONFIG option for second ethernet phy

2013-04-12 Thread Michal Simek
Hi guys,

I have grepped the u-boot and didn't found any reference how to define
phy addresses for second ethernet device.
Is there any standard CONFIG option for that?
CONFIG_PHY_ADDR1 or so?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP - KeyID:
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

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


Re: [U-Boot] [PATCH 1/5] vybrid: add vybrid CPU support

2013-04-12 Thread Fabio Estevam
On Fri, Apr 12, 2013 at 3:53 AM, Alison Wang b18...@freescale.com wrote:

 +static char *get_reset_cause(void)
 +{
 +   char *resetcause[32] = {POR,
 +   Cortex A5 WDOG Timer Reset,
 +   0,

You mix strings and an integer zero here. Shouldn't you replace the
'0' with unknown or invalid ?

Regards,

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


Re: [U-Boot] [PATCH V8 4/9] EXYNOS5: DWMMC: Added FDT support for DWMMC

2013-04-12 Thread Jaehoon Chung
On 04/10/2013 03:13 PM, Amarendra Reddy wrote:
 Hi Jaehoon,
 
 Please find my responses below.
 
 Thanks  Regards
 Amarendra Reddy
 
 On 9 April 2013 16:23, Jaehoon Chung jh80.ch...@samsung.com wrote:
 
 On 04/03/2013 11:08 PM, Amar wrote:
 This patch adds FDT support for DWMMC, by reading the DWMMC node data
 from the device tree and initialising DWMMC channels as per data
 obtained from the node.

 Signed-off-by: Vivek Gautam gautam.vi...@samsung.com
 Signed-off-by: Amar amarendra...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes since V1:
   1)Updated code to have same signature for the function
   exynos_dwmci_init() for both FDT and non-FDT versions.
   2)Updated code to pass device_id parameter to the function
   exynos5_mmc_set_clk_div() instead of index.
   3)Updated code to decode the value of samsung,width from FDT.
   4)Channel index is computed instead of getting from FDT.

 Changes since V2:
   1)Updation of commit message and resubmition of proper patch set.

 Changes since V3:
   1)Replaced the new function exynos5_mmc_set_clk_div() with the
   existing function set_mmc_clk(). set_mmc_clk() will do the purpose.
   2)Computation of FSYS block clock divisor (pre-ratio) is added.

 Changes since V4:
   1)Replaced unsigned int exynos_dwmmc_init(int index, int
 bus_width) with
   int exynos_dwmci_add_port(int, u32, inth, u32)
   i)exynos_dwmmc_add_port() will be used by non-FDT boards.
   ii)In FDT case, exynos_dwmmc_init(const void *blob) will
 use
   exynos_dwmmc_add_port() for every channel enabled in
 device node.
   2)Changed the computation method of mmc clock divisor.
   3)Updated exynos_dwmmc_init() to compute the 'clksel_val' within
 the function.

 Changes since V5:
   1)Updated in response to review comments and changed the mmc clock
 value
   from 50MHz to 52MHz.

 Changes since V6:
   No change.

 Changes since V7:
   No change.

  arch/arm/include/asm/arch-exynos/dwmmc.h |  11 +--
  drivers/mmc/exynos_dw_mmc.c  | 127
 ---
  include/dwmmc.h  |   3 +
  3 files changed, 124 insertions(+), 17 deletions(-)

 diff --git a/arch/arm/include/asm/arch-exynos/dwmmc.h
 b/arch/arm/include/asm/arch-exynos/dwmmc.h
 index 8acdf9b..3b147b8 100644
 --- a/arch/arm/include/asm/arch-exynos/dwmmc.h
 +++ b/arch/arm/include/asm/arch-exynos/dwmmc.h
 @@ -27,10 +27,7 @@
  #define DWMCI_SET_DRV_CLK(x) ((x)  16)
  #define DWMCI_SET_DIV_RATIO(x)   ((x)  24)

 -int exynos_dwmci_init(u32 regbase, int bus_width, int index);
 -
 -static inline unsigned int exynos_dwmmc_init(int index, int bus_width)
 -{
 - unsigned int base = samsung_get_base_mmc() + (0x1 * index);
 - return exynos_dwmci_init(base, bus_width, index);
 -}
 +#ifdef CONFIG_OF_CONTROL
 +int exynos_dwmmc_init(const void *blob);
 +#endif
 +int exynos_dwmci_add_port(int index, u32 regbase, int bus_width, u32
 clksel);
 diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
 index 72a31b7..4238dd9 100644
 --- a/drivers/mmc/exynos_dw_mmc.c
 +++ b/drivers/mmc/exynos_dw_mmc.c
 @@ -19,39 +19,146 @@
   */

  #include common.h
 -#include malloc.h
  #include dwmmc.h
 +#include fdtdec.h
 +#include libfdt.h
 +#include malloc.h
  #include asm/arch/dwmmc.h
  #include asm/arch/clk.h
 +#include asm/arch/pinmux.h

 -static char *EXYNOS_NAME = EXYNOS DWMMC;
 +#define  DWMMC_MAX_CH_NUM4
 +#define  DWMMC_MAX_FREQ  5200
 +#define  DWMMC_MIN_FREQ  40
 +#define  DWMMC_MMC0_CLKSEL_VAL   0x03030001
 +#define  DWMMC_MMC2_CLKSEL_VAL   0x03020001
 I known that CLKSEL's value is SoC specific.
 All exynos series are working fine? I didn't think so.

 Best Regards,
 Jaehoon Chung

 
 The above values of CLKSEL work fine for Exynos5 (5250  5410) and is
 tested.
 
 The above CLKSEL values donot hold good for Exynos4 series. Exynos4 has
 Mobile Storage Host with only one port.
 But this file 'drivers/mmc/exynos_dw_mmc.c' is specific to Exynos5 series
 and gets compiled only when CONFIG_EXYNOS_DWMMC is defined.
No, driver/mmc/exynos_dw_mmc.c isn't specific to Exynos5 series.
We can use this controller at the exynos4.
Then we need to consider how get the clksel value according to SoC.

Best Regards,
Jaehoon Chung
 

 +/*
 + * Function used as callback function to initialise the
 + * CLKSEL register for every mmc channel.
 + */
  static void exynos_dwmci_clksel(struct dwmci_host *host)
  {
 - u32 val;
 - val = DWMCI_SET_SAMPLE_CLK(DWMCI_SHIFT_0) |
 - DWMCI_SET_DRV_CLK(DWMCI_SHIFT_0) | DWMCI_SET_DIV_RATIO(0);
 + dwmci_writel(host, DWMCI_CLKSEL, host-clksel_val);
 +}

 - dwmci_writel(host, DWMCI_CLKSEL, val);
 +unsigned int exynos_dwmci_get_clk(int dev_index)
 +{
 + return get_mmc_clk(dev_index);
  }

 -int exynos_dwmci_init(u32 regbase, int 

Re: [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment

2013-04-12 Thread Tom Rini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 04/12/2013 02:19 AM, Stefan Roese wrote:
 Hi Joe,
 
 On 12.04.2013 00:26, Tom Rini wrote:
 On Mon, Apr 08, 2013 at 03:32:45PM -0500, Joe Hershberger wrote:
 
 NAND is not good at handling absolute addresses to sectors for
 storing particular data.  The current implementation of the
 NAND env support works around this in several ways such as
 storing a pointer to the sector in the OOB of the first sector
 (interferes with some CRC) or supporting a range of sectors
 (which unless it is huge is not guaranteed to be safe).  None
 of these options address wear-leveling concerns or bad block
 handling.
 
 Accessing the u-boot env from UBI eliminates these concerns.
 However, it does require some of the basic settings for finding
 the UBI env to be in the default u-boot env.
 
 One question: Do you plan to support the fw_env Linux tools with
 this env-in-UBI feature as well?

That is what the 'gluebi' comment is about.  It could however stand to
be documented more explicitly in the README or similar.  You use
CONFIG_MTD_UBI_GLUEBI in the kernel to allow you to map UBI volumes
(which the env(s) are) as regular flash devices.

- -- 
Tom
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRZ/BQAAoJENk4IS6UOR1WVRMP/iCs2le379RI3hjHl96pf9dg
owK56SjtQ1pXAnF15fWYbecMPmkbkqseV3Jcstq0XUvEtCrn6YoLnUMp6Pzm2Gfp
yn5ylFI5ofbHhtvj5l350exsV41lTIEb4qeGXmqsenfJdsxo7ddbhXgs+VULJ3eb
DdBEmCv86LAxmhe4Te7g+/JReF6c6wfgV6vMibR54KI5coRHf/MKxhIO0/d+puGL
V35pcH3lTD3iddhXxPqa5mF8EHHCRed35D/uVkdTKoOJLaIjgsHdHSgvnLnKBoyl
swLq82Et2jKUVf1n/co/fi1WC4ymZ+RaOV/qUT5ca+brzsAg9Es0l+41frkKNBAl
sA4sA6TuFszfNe/JdtUnPnUh3xDA9ruPPeuU3ZotQs81So4zPHapc9dRNR+chZcL
gYHPKoiec/7m/t9ccDILz53OKfCwj7IGEK6Z9oFUn1Hq6pP21UybGTB8wSIUMpXr
py9tmhLCSThMzzqLeo09iUvqOgwKmW9oXH1SNZV/LsK7Xlna1qNZSo/uabuDID/n
Y57XLuUqzvtrK0FMtixA/yfufAWwTpky+0UAGxDqAIjK/9JMZjIgMDbkWs30znh+
t4SQnaf5yoafGHHmabZo2NBAIRQc9FCjMXxfVGF0EW1diw6VZt17z4psemoKKz18
7obHBEsHfMBa455Iwzi5
=woZY
-END PGP SIGNATURE-
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/5] vybrid: add Freescale vybrid vf600 tower board support

2013-04-12 Thread Fabio Estevam
Hi Alison,

On Fri, Apr 12, 2013 at 3:53 AM, Alison Wang b18...@freescale.com wrote:
 This patch adds Freescale vybrid vf600 tower board support.

 Signed-off-by: TsiChung Liew tsicl...@gmail.com
 Signed-off-by: Jason Jin jason@freescale.com
 Signed-off-by: Alison Wang b18...@freescale.com
 ---
  board/freescale/vybrid/Makefile|  40 +++
  board/freescale/vybrid/vybrid.c| 488 
 +

Vybrid is the SoC name and the board name is vf600, right?

Then you should add:

 board/freescale/vf600

Also, please copy Stefano Babic in your future patches, as he is the
U-boot imx maintainer.
  board/freescale/vybrid/vybridimage.cfg |  44 +++
  boards.cfg |   2 +
  include/configs/vybrid.h   | 284 +++
  include/configs/vybrid_iram.h  | 284 +++
  6 files changed, 1142 insertions(+)
  create mode 100644 board/freescale/vybrid/Makefile
  create mode 100644 board/freescale/vybrid/vybrid.c
  create mode 100644 board/freescale/vybrid/vybridimage.cfg
  create mode 100644 include/configs/vybrid.h
  create mode 100644 include/configs/vybrid_iram.h

This patch should be the last of the series.

You add the board support here, but ethernet, serial, esdhc support
comes later in the patch series.

Please add an entry to MAINTAINERS file.


 +#ifdef CONFIG_FSL_ESDHC
 +struct fsl_esdhc_cfg esdhc_cfg[2] = {
 +   {CONFIG_SYS_ESDHC1_BASE, 1},
 +   {ESDHC2_BASE_ADDR, 1},

CONFIG_ESDHC2_BASE_ADDR ?

 +int dram_init(void)
 +{
 +   setup_iomux_ddr();
 +#ifdef CONFIG_SYS_UBOOT_IN_GPURAM

You introduced CONFIG_SYS_UBOOT_IN_GPURAM here and it would be nice to
add an entry into README explaining what it means.

 +   gd-ram_size = 0x8;
 +   ddr_ctrl_init();
 +#else
 +   gd-ram_size = ddr_ctrl_init();
 +#endif
 +   return 0;

Can't you use the standard method?

gd-ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);


 +#ifdef CONFIG_QUAD_SPI

CONFIG_QUAD_SPI does not exist in U-boot. Can't you re-use an existing
SPI config option?


 +#ifdef CONFIG_FSL_ESDHC
 +int board_mmc_getcd(struct mmc *mmc)
 +{
 +   int ret;
 +
 +   __raw_writel(0x005031ef, IOMUXC_PAD_014);   /* clk */
 +   __raw_writel(0x005031ef, IOMUXC_PAD_015);   /* cmd */
 +   __raw_writel(0x005031ef, IOMUXC_PAD_016);   /* dat0 */
 +   __raw_writel(0x005031ef, IOMUXC_PAD_017);   /* dat1 */
 +   __raw_writel(0x005031ef, IOMUXC_PAD_018);   /* dat2 */
 +   __raw_writel(0x005031ef, IOMUXC_PAD_019);   /* dat3 */

This function should basically return the card detect status, please
setup the IOMUX in another place.

 +   ret = 1;
 +   return ret;

In this board you assume that the SD card is always present, right?

You could remove the 'ret' variable.

 diff --git a/board/freescale/vybrid/vybridimage.cfg 
 b/board/freescale/vybrid/vybridimage.cfg
 new file mode 100644
 index 000..5da5659
 --- /dev/null
 +++ b/board/freescale/vybrid/vybridimage.cfg
 @@ -0,0 +1,44 @@
 +#
 +# Copyright 2012-2013 Freescale Semiconductor, Inc.
 +#
 +# See file CREDITS for list of people who contributed to this
 +# project.
 +#
 +# This program is free software; you can redistribute it and/or
 +# modify it under the terms of the GNU General Public License as
 +# published by the Free Software Foundation; either version 2 of
 +# the License or (at your option) any later version.
 +#
 +# This program is distributed in the hope that it will be useful,
 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 +# GNU General Public License for more details.
 +#
 +# You should have received a copy of the GNU General Public License
 +# along with this program; if not write to the Free Software
 +# Foundation Inc. 51 Franklin Street Fifth Floor Boston,
 +# MA 02110-1301 USA
 +#
 +# Refer docs/README.imxmage for more details about how-to configure
 +# and create imximage boot image
 +#
 +# The syntax is taken as close as possible with the kwbimage
 +
 +IMAGE_VERSION  2
 +
 +# Boot Device : one of
 +# spi, sd (the board has no nand neither onenand)
 +
 +BOOT_FROM  sd
 +
 +# Device Configuration Data (DCD)
 +#
 +# Each entry must have the format:
 +# Addr-type   AddressValue
 +#
 +# where:
 +#  Addr-type register length (1,2 or 4 bytes)
 +#  Address   absolute address of the register
 +#  value value to be stored in the register
 +
 +# Setting IOMUXC

This file is suited for imx. If you don't need this for Vybrid, please
remove it.


 diff --git a/boards.cfg b/boards.cfg
 index 7725a15..2700a76 100644
 --- a/boards.cfg
 +++ b/boards.cfg
 @@ -244,6 +244,8 @@ am335x_evm_uart5 arm armv7   
 am335x  ti
  am335x_evm_usbsplarm armv7   am335x  ti  
am33xx  am335x_evm:SERIAL1,CONS_INDEX=1,SPL_USBETH_SUPPORT
  

Re: [U-Boot] [PATCH 3/5] vybrid: add uart driver support

2013-04-12 Thread Fabio Estevam
On Fri, Apr 12, 2013 at 3:53 AM, Alison Wang b18...@freescale.com wrote:
 This patch adds uart driver support for vybrid platform.

 Signed-off-by: TsiChung Liew tsicl...@gmail.com
 Signed-off-by: Jason Jin jason@freescale.com
 Signed-off-by: Alison Wang b18...@freescale.com
 ---
  drivers/serial/Makefile|   1 +
  drivers/serial/serial.c|   2 +
  drivers/serial/serial_vybrid.c | 129 
 +

Do we really need to add a new serial driver?

Can't we re-use the imx serial driver?

Regards,

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


Re: [U-Boot] [PATCH 5/5] vybrid: add ethernet driver support

2013-04-12 Thread Fabio Estevam
On Fri, Apr 12, 2013 at 3:53 AM, Alison Wang b18...@freescale.com wrote:
 This patch adds ethernet driver support for vybrid platform.

 Signed-off-by: TsiChung Liew tsicl...@gmail.com
 Signed-off-by: Jason Jin jason@freescale.com
 Signed-off-by: Alison Wang b18...@freescale.com
 ---
  arch/arm/include/asm/fec.h| 302 
 ++
  arch/arm/include/asm/u-boot.h |   3 +
  drivers/net/mcffec.c  |  18 ++-
  drivers/net/mcfmii.c  |   5 +-

Can't we use the mxc_fec driver here?

In the kernel we have only one FEC driver that is common to Coldfire,
imx and MPC.

Regards,

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


[U-Boot] [PATCH v3 0/4] Homogeneize semantics of CONFIG_SPL_MAX_SIZE

2013-04-12 Thread Albert ARIBAUD
CONFIG_SPL_MAX_SIZE and CONFIG_SPL_BSS_MAX_SIZE did not have constant
semantics across all of U-boot. This patch series aims at fixing this by
splitting the maximum size into separate image (code + data + rodata +
linker list) size on the one hand, and BSS size on the other hand.

Changes in v3:
- introduced CONFIG_SPL_MAX_FOOTPRINT
- fixed typo in BSS size test

Changes in v2:
- brought back total size to 12K
- fixed commit summary typoes
- fixed spacing in commit summary
- removed mmutable in SPL linker file

Albert ARIBAUD (4):
  cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics
  da850evm, da850_am18xxevm: fix CONFIG_SPL_MAX_SIZE semantics
  smdk5250, snow: fix CONFIG_SPL_MAX_SIZE semantics
  ARM: fix CONFIG_SPL_MAX_SIZE semantics

 README |   26 ++--
 arch/arm/cpu/u-boot-spl.lds|   24 --
 arch/arm/cpu/u-boot.lds|4 
 board/ait/cam_enc_4xx/u-boot-spl.lds   |2 +-
 board/davinci/da8xxevm/u-boot-spl-da850evm.lds |2 +-
 board/samsung/smdk5250/smdk5250-uboot-spl.lds  |2 +-
 include/configs/cam_enc_4xx.h  |4 +++-
 include/configs/da850evm.h |4 +++-
 include/configs/exynos5250-dt.h|3 ++-
 include/configs/tegra-common.h |2 +-
 10 files changed, 49 insertions(+), 24 deletions(-)

-- 
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 v2 5/7] lib: import bitrev library from the linux kernel

2013-04-12 Thread Mike Dunn
On 04/11/2013 12:19 PM, Marek Vasut wrote:
 Dear Mike Dunn,
 
 This patch adds the bitrev library from the linux kernel.  This is a simple
 algorithm that uses an 8 bit look-up table to reverse the bits in data
 types of 8, 16, or 32 bit widths.  The docg4 nand flash driver uses it.

 [port from linux kernel 2.6.20 commit
 a5cfc1ec58a07074dacb6aa8c79eff864c966d12]
 
 Why did you port it from such an ancient kernel? Newer version is not an 
 option?


Maybe I misunderstood and gave the wrong information (probably, now that I think
about it).  I took it fom the latest kernel, but reported the commit that added
it to the kernel.

In this case, it's a simple algorithm and only a couple trivial changes were
made since it was first added to the kernel, so the error is probably
inconsequential, but I'll resubmit, reporting the HEAD of the kernel I took it
from if you like.

BTW, I did the same for the docg4 driver, but I did the u-boot port a while ago,
so in that case it's correct, at least practically.  Since I did the port, the
kernel docg4 driver had some enhancements (reliable mode) that still need to be
brought into u-boot.

Thanks Marek,
Mike

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


[U-Boot] [PATCH v3 1/4] cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics

2013-04-12 Thread Albert ARIBAUD
CONFIG_SPL_MAX_SIZE wrongly included BSS size.
Split 12K max size between 10K image (text,rodata,data)
and 2K BSS based on sizes reported for current build:

   textdata bss
   9073 840 500

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
Changes in v3: None
Changes in v2:
- brought back total size to 12K

 board/ait/cam_enc_4xx/u-boot-spl.lds |2 +-
 include/configs/cam_enc_4xx.h|4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/ait/cam_enc_4xx/u-boot-spl.lds 
b/board/ait/cam_enc_4xx/u-boot-spl.lds
index be1027d..18a152d 100644
--- a/board/ait/cam_enc_4xx/u-boot-spl.lds
+++ b/board/ait/cam_enc_4xx/u-boot-spl.lds
@@ -25,7 +25,7 @@
  */
 
 MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
-   LENGTH = CONFIG_SPL_MAX_SIZE }
+   LENGTH = (CONFIG_SPL_MAX_SIZE + CONFIG_SPL_BSS_MAX_SIZE) }
 
 OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
 OUTPUT_ARCH(arm)
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index 56528dd..b73b72c 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -230,7 +230,9 @@
 #define CONFIG_SPL_STACK   (0x0001 + 0x7f00)
 
 #define CONFIG_SPL_TEXT_BASE   0x0020 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE12320
+/* SPL total size is 12K -- but --pad-to requires a single decimal number */
+#define CONFIG_SPL_MAX_SIZE10240
+#define CONFIG_SPL_BSS_MAX_SIZE(2*1024)
 
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_TEXT_BASE   0x8108
-- 
1.7.10.4

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


[U-Boot] [PATCH v3 2/4] da850evm, da850_am18xxevm: fix CONFIG_SPL_MAX_SIZE semantics

2013-04-12 Thread Albert ARIBAUD
CONFIG_SPL_MAX_SIZE wrongly included BSS size.
Split 32K max size between 24K image (text,rodata,data)
and 8K BSS based on sizes reported for current build:

   textdata bss
  156761316 108

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
Changes in v3: None
Changes in v2:
- fixed commit summary typoes

 board/davinci/da8xxevm/u-boot-spl-da850evm.lds |2 +-
 include/configs/da850evm.h |4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds 
b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds
index 2ae5a2c..25d6728 100644
--- a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds
+++ b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds
@@ -25,7 +25,7 @@
  */
 
 MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
-   LENGTH = CONFIG_SPL_MAX_SIZE }
+   LENGTH = (CONFIG_SPL_MAX_SIZE + CONFIG_SPL_BSS_MAX_SIZE) }
 
 OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
 OUTPUT_ARCH(arm)
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 99b4de7..e15c86e 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -399,7 +399,9 @@
 #define CONFIG_SPL_LDSCRIPTboard/$(BOARDDIR)/u-boot-spl-da850evm.lds
 #define CONFIG_SPL_STACK   0x8001ff00
 #define CONFIG_SPL_TEXT_BASE   0x8000
-#define CONFIG_SPL_MAX_SIZE32768
+/* SPL max size is 24K -- but --pad-to requires a single decimal number */
+#define CONFIG_SPL_MAX_SIZE24576
+#define CONFIG_SPL_BSS_MAX_SIZE(8*1024)
 #endif
 
 /* Load U-Boot Image From MMC */
-- 
1.7.10.4

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


[U-Boot] [PATCH v3 3/4] smdk5250, snow: fix CONFIG_SPL_MAX_SIZE semantics

2013-04-12 Thread Albert ARIBAUD
CONFIG_SPL_MAX_SIZE wrongly included BSS size.
Split 14K max size between 10K image (text,rodata,data)
and 4K BSS based on sizes reported for current build:

   textdata bss
   4136 904   0

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
Changes in v3: None
Changes in v2:
- fixed spacing in commit summary

 board/samsung/smdk5250/smdk5250-uboot-spl.lds |2 +-
 include/configs/exynos5250-dt.h   |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/board/samsung/smdk5250/smdk5250-uboot-spl.lds 
b/board/samsung/smdk5250/smdk5250-uboot-spl.lds
index 7df0a1d..c45cc37 100644
--- a/board/samsung/smdk5250/smdk5250-uboot-spl.lds
+++ b/board/samsung/smdk5250/smdk5250-uboot-spl.lds
@@ -26,7 +26,7 @@
  */
 
 MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE, \
-   LENGTH = CONFIG_SPL_MAX_SIZE }
+   LENGTH = (CONFIG_SPL_MAX_SIZE + CONFIG_SPL_BSS_MAX_SIZE) }
 
 OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
 OUTPUT_ARCH(arm)
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index 496a194..372b0b4 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -141,7 +141,8 @@
 /* specific .lds file */
 #define CONFIG_SPL_LDSCRIPTboard/samsung/smdk5250/smdk5250-uboot-spl.lds
 #define CONFIG_SPL_TEXT_BASE   0x02023400
-#define CONFIG_SPL_MAX_SIZE(14 * 1024)
+#define CONFIG_SPL_MAX_SIZE(10 * 1024)
+#define CONFIG_SPL_BSS_MAX_SIZE(4 * 1024)
 
 #define CONFIG_BOOTCOMMAND mmc read 40007000 451 2000; bootm 40007000
 
-- 
1.7.10.4

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


[U-Boot] [PATCH v3 4/4] ARM: fix CONFIG_SPL_MAX_SIZE semantics

2013-04-12 Thread Albert ARIBAUD
Remove SPL-related ASSERT() in arch/arm/cpu/u-boot.lds
as this file is never used for SPL builds.

Rewrite the ASSERT() in arch/arm/cpu/u-boot-spl.lds
to separately test image (text,data,rodata...) size,
BSS size, and full footprint each against its own max,
and make Tegra boards check full footprint.

Also, output section mmutable is not used in SPL builds.
Remove it.

Finally, update README regarding the (now homogeneous)
semantics of CONFIG_SPL_[BSS_]MAX_SIZE and add the new
CONFIG_SPL_MAX_FOOTPRINT macro.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
Reported-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
---
Changes in v3:
- introduced CONFIG_SPL_MAX_FOOTPRINT
- fixed typo in BSS size test

Changes in v2:
- removed mmutable in SPL linker file

 README |   26 --
 arch/arm/cpu/u-boot-spl.lds|   24 +---
 arch/arm/cpu/u-boot.lds|4 
 include/configs/tegra-common.h |2 +-
 4 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/README b/README
index 6272853..c470489 100644
--- a/README
+++ b/README
@@ -2775,8 +2775,24 @@ FIT uImage format:
CONFIG_SPL_LDSCRIPT
LDSCRIPT for linking the SPL binary.
 
+   CONFIG_SPL_MAX_FOOTPRINT
+   Maximum size in memory allocated to the SPL.
+   When defined, linker checks that the actual memory used
+   by SPL size does not exceed it.
+   CONFIG_MAX_FOOTPRINT should always be equal to or greater
+   than CONFIG_SPL_MAX_SIZE, plus CONFIG_SPL_BSS_MAX_SIZE if
+   it exists.
+   Note: image and BSS are disjoint for some targets.
+
CONFIG_SPL_MAX_SIZE
-   Maximum binary size (text, data and rodata) of the SPL binary.
+   Maximum size for the image (sum of the text, data, rodata
+   and linker lists sections) of the SPL executable.
+   When defined, linker checks that the actual image size does
+   not exceed it.
+   CONFIG_MAX_FOOTPRINT should always be equal to or greater
+   than CONFIG_SPL_MAX_SIZE, plus CONFIG_SPL_BSS_MAX_SIZE if
+   it exists.
+   Note: image and BSS are disjoint for some targets.
 
CONFIG_SPL_TEXT_BASE
TEXT_BASE for linking the SPL binary.
@@ -2789,7 +2805,13 @@ FIT uImage format:
Link address for the BSS within the SPL binary.
 
CONFIG_SPL_BSS_MAX_SIZE
-   Maximum binary size of the BSS section of the SPL binary.
+   Maximum size for the BSS section of the SPL executable.
+   When defined, linker checks that the actual BSS size does
+   not exceed it.
+   CONFIG_MAX_FOOTPRINT should always be equal to or greater
+   than CONFIG_SPL_MAX_SIZE, plus CONFIG_SPL_BSS_MAX_SIZE if
+   it exists.
+   Note: image and BSS are disjoint for some targets.
 
CONFIG_SPL_STACK
Adress of the start of the stack SPL will use
diff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds
index 3c0d99c..1408f03 100644
--- a/arch/arm/cpu/u-boot-spl.lds
+++ b/arch/arm/cpu/u-boot-spl.lds
@@ -65,15 +65,6 @@ SECTIONS
 
_end = .;
 
-   /*
-* Deprecated: this MMU section is used by pxa at present but
-* should not be used by new boards/CPUs.
-*/
-   . = ALIGN(4096);
-   .mmutable : {
-   *(.mmutable)
-   }
-
.bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
*(.bss*)
@@ -88,6 +79,17 @@ SECTIONS
/DISCARD/ : { *(.gnu*) }
 }
 
-#if defined(CONFIG_SPL_TEXT_BASE)  defined(CONFIG_SPL_MAX_SIZE)
-ASSERT(__bss_end  (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), SPL image 
too big);
+#if defined(CONFIG_SPL_MAX_SIZE)
+ASSERT(__image_copy_end - __image_copy_start  (CONFIG_SPL_MAX_SIZE), \
+   SPL image too big);
+#endif
+
+#if defined(CONFIG_SPL_BSS_MAX_SIZE)
+ASSERT(__bss_end - __bss_start  (CONFIG_SPL_BSS_MAX_SIZE), \
+   SPL image BSS too big);
+#endif
+
+#if defined(CONFIG_SPL_MAX_FOOTPRINT)
+ASSERT(__bss_end - _start  (CONFIG_SPL_MAX_FOOTPRINT), \
+   SPL image plus BSS too big);
 #endif
diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
index 3a1083d..7bbc4f5 100644
--- a/arch/arm/cpu/u-boot.lds
+++ b/arch/arm/cpu/u-boot.lds
@@ -101,7 +101,3 @@ SECTIONS
/DISCARD/ : { *(.interp*) }
/DISCARD/ : { *(.gnu*) }
 }
-
-#if defined(CONFIG_SPL_TEXT_BASE)  defined(CONFIG_SPL_MAX_SIZE)
-ASSERT(__bss_end  (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), SPL image 
too big);
-#endif
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 036ded0..e9241b8 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -158,7 +158,7 @@
 #define 

[U-Boot] [PATCH v3 0/3] Add TI816X EVM support

2013-04-12 Thread TENART Antoine
This serie introduce the support of the TI816X EVM board.
It applies on top of Matt Porter patches introducing the support of the
TI814X EVM board (Add TI814x EVM Support).

The serie fits into the existing AM33XX SoC support and reuse some definitions
from the TI814X.

Based on the implementation in the TI-PSP-04.00.02.14 vendor tree:
http://arago-project.org/git/projects/?p=u-boot-omap3.git;a=summary

It has been tested booting up a Linux kernel on TI8168 refs F and C cards,
with an MMC. SPL is working fine too.

Changes for v3:
- fix a compile error when using DDR2
- rename misspelled CONFIG_EXTRA_ENV_SETTINGS in ti816x_evm.h
  (was CONFIG_EXTRA_EMV_SETTINGS)

Changes for v2:
- patches 2-7 squashed into a single patch Add TI816X support
- removed all unused definitions
- removed my definition of DMM_BASE and reworked the DMM initialization
  using the common config_dmm() from emif4.c
- fixed coding style problems
- now use the fallback CONFIG_SYS_BAUDRATE_TABLE
- kept LONGHELP support
- removed redefinition of the device type section in cpu_ti816x.h

Antoine Tenart (3):
  Prepare for TI816X : reuse existing code from TI814X
  Add TI816X support
  Add TI816X evm board support

 MAINTAINERS|4 +
 Makefile   |2 +-
 arch/arm/cpu/armv7/Makefile|2 +-
 arch/arm/cpu/armv7/omap-common/Makefile|2 +-
 arch/arm/include/asm/arch-am33xx/clock.h   |4 +
 arch/arm/include/asm/arch-am33xx/clocks_ti816x.h   |  136 +++
 arch/arm/include/asm/arch-am33xx/cpu.h |6 +-
 arch/arm/include/asm/arch-am33xx/cpu_ti816x.h  |  194 +
 arch/arm/include/asm/arch-am33xx/ddr_defs.h|4 +
 arch/arm/include/asm/arch-am33xx/ddr_defs_ti816x.h |  248 ++
 arch/arm/include/asm/arch-am33xx/hardware.h|7 +-
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |5 +
 arch/arm/include/asm/arch-am33xx/hardware_ti814x.h |5 +
 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h |   56 ++
 arch/arm/include/asm/arch-am33xx/mmc_host_def.h|2 +
 arch/arm/include/asm/arch-am33xx/mux.h |2 +
 arch/arm/include/asm/arch-am33xx/mux_ti816x.h  |  363 
 arch/arm/include/asm/arch-am33xx/omap.h|2 +-
 arch/arm/include/asm/arch-am33xx/spl.h |9 +
 board/ti/ti816x/Makefile   |   48 ++
 board/ti/ti816x/evm.c  |  866 
 boards.cfg |1 +
 drivers/serial/ns16550.c   |4 +-
 include/configs/ti816x_evm.h   |  177 
 spl/Makefile   |2 +-
 25 files changed, 2138 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/cpu_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/ddr_defs_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/mux_ti816x.h
 create mode 100644 board/ti/ti816x/Makefile
 create mode 100644 board/ti/ti816x/evm.c
 create mode 100644 include/configs/ti816x_evm.h

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


[U-Boot] [PATCH v3 1/3] Prepare for TI816X : reuse existing code from TI814X

2013-04-12 Thread TENART Antoine
Rename some CONFIG_TI814X to a more generic CONFIG_81XX

Signed-off-by: Antoine Tenart aten...@adeneo-embedded.com
---
 Makefile|2 +-
 arch/arm/cpu/armv7/Makefile |2 +-
 arch/arm/cpu/armv7/omap-common/Makefile |2 +-
 arch/arm/include/asm/arch-am33xx/cpu.h  |2 +-
 arch/arm/include/asm/arch-am33xx/omap.h |2 +-
 drivers/serial/ns16550.c|4 ++--
 spl/Makefile|2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 7273fa4..811e7b6 100644
--- a/Makefile
+++ b/Makefile
@@ -330,7 +330,7 @@ LIBS-y += api/libapi.o
 LIBS-y += post/libpost.o
 LIBS-y += test/libtest.o
 
-ifneq 
($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI814X),)
+ifneq 
($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI81XX),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
index c961247..9bb2837 100644
--- a/arch/arm/cpu/armv7/Makefile
+++ b/arch/arm/cpu/armv7/Makefile
@@ -32,7 +32,7 @@ COBJS += cache_v7.o
 COBJS  += cpu.o
 COBJS  += syslib.o
 
-ifneq 
($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_TI814X),)
+ifneq 
($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TEGRA)$(CONFIG_TI81XX),)
 SOBJS  += lowlevel_init.o
 endif
 
diff --git a/arch/arm/cpu/armv7/omap-common/Makefile 
b/arch/arm/cpu/armv7/omap-common/Makefile
index 55e82ba..8da8f91 100644
--- a/arch/arm/cpu/armv7/omap-common/Makefile
+++ b/arch/arm/cpu/armv7/omap-common/Makefile
@@ -36,7 +36,7 @@ COBJS += emif-common.o
 COBJS  += vc.o
 endif
 
-ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI814X),)
+ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI81XX),)
 COBJS  += boot-common.o
 SOBJS  += lowlevel_init.o
 endif
diff --git a/arch/arm/include/asm/arch-am33xx/cpu.h 
b/arch/arm/include/asm/arch-am33xx/cpu.h
index 3d3a7c8..13c0667 100644
--- a/arch/arm/include/asm/arch-am33xx/cpu.h
+++ b/arch/arm/include/asm/arch-am33xx/cpu.h
@@ -54,7 +54,7 @@
 /* Reset control */
 #ifdef CONFIG_AM33XX
 #define PRM_RSTCTRL(PRCM_BASE + 0x0F00)
-#elif defined(CONFIG_TI814X)
+#elif defined(CONFIG_TI81XX)
 #define PRM_RSTCTRL(PRCM_BASE + 0x00A0)
 #endif
 #define PRM_RSTST  (PRM_RSTCTRL + 8)
diff --git a/arch/arm/include/asm/arch-am33xx/omap.h 
b/arch/arm/include/asm/arch-am33xx/omap.h
index d28f9a8..1a1cc18 100644
--- a/arch/arm/include/asm/arch-am33xx/omap.h
+++ b/arch/arm/include/asm/arch-am33xx/omap.h
@@ -31,7 +31,7 @@
 #ifdef CONFIG_AM33XX
 #define NON_SECURE_SRAM_START  0x40304000
 #define NON_SECURE_SRAM_END0x4030E000
-#elif defined(CONFIG_TI814X)
+#elif defined(CONFIG_TI81XX)
 #define NON_SECURE_SRAM_START  0x4030
 #define NON_SECURE_SRAM_END0x4032
 #endif
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 02bc85b..c949423 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -43,7 +43,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
 
serial_out(CONFIG_SYS_NS16550_IER, com_port-ier);
 #if (defined(CONFIG_OMAP)  !defined(CONFIG_OMAP3_ZOOM2)) || \
-   defined(CONFIG_AM33XX) || defined(CONFIG_TI814X)
+   defined(CONFIG_AM33XX) || defined(CONFIG_TI81XX)
serial_out(0x7, com_port-mdr1);   /* mode select reset TL16C750*/
 #endif
serial_out(UART_LCR_BKSE | UART_LCRVAL, (ulong)com_port-lcr);
@@ -58,7 +58,7 @@ void NS16550_init(NS16550_t com_port, int baud_divisor)
serial_out(UART_LCRVAL, com_port-lcr);
 #if (defined(CONFIG_OMAP)  !defined(CONFIG_OMAP3_ZOOM2)) || \
defined(CONFIG_AM33XX) || defined(CONFIG_SOC_DA8XX) || \
-   defined(CONFIG_TI814X)
+   defined(CONFIG_TI81XX)
 
 #if defined(CONFIG_APTIX)
/* /13 mode so Aptix 6MHz can hit 115200 */
diff --git a/spl/Makefile b/spl/Makefile
index c398a5f..8692f30 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -82,7 +82,7 @@ LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/libnet.o
 LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/libnet.o
 LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/libphy.o
 
-ifneq 
($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI814X),)
+ifneq 
($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX)$(CONFIG_TI81XX),)
 LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
 endif
 
-- 
1.7.10.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v3 2/3] Add TI816X support

2013-04-12 Thread TENART Antoine
Signed-off-by: Antoine Tenart aten...@adeneo-embedded.com
---
 arch/arm/include/asm/arch-am33xx/clock.h   |4 +
 arch/arm/include/asm/arch-am33xx/clocks_ti816x.h   |  136 
 arch/arm/include/asm/arch-am33xx/cpu.h |4 +
 arch/arm/include/asm/arch-am33xx/cpu_ti816x.h  |  194 +++
 arch/arm/include/asm/arch-am33xx/ddr_defs.h|4 +
 arch/arm/include/asm/arch-am33xx/ddr_defs_ti816x.h |  248 +
 arch/arm/include/asm/arch-am33xx/hardware.h|7 +-
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |5 +
 arch/arm/include/asm/arch-am33xx/hardware_ti814x.h |5 +
 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h |   56 +++
 arch/arm/include/asm/arch-am33xx/mmc_host_def.h|2 +
 arch/arm/include/asm/arch-am33xx/mux.h |2 +
 arch/arm/include/asm/arch-am33xx/mux_ti816x.h  |  363 
 13 files changed, 1025 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/cpu_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/ddr_defs_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h
 create mode 100644 arch/arm/include/asm/arch-am33xx/mux_ti816x.h

diff --git a/arch/arm/include/asm/arch-am33xx/clock.h 
b/arch/arm/include/asm/arch-am33xx/clock.h
index ecb5901..123cc61 100644
--- a/arch/arm/include/asm/arch-am33xx/clock.h
+++ b/arch/arm/include/asm/arch-am33xx/clock.h
@@ -19,6 +19,10 @@
 #ifndef _CLOCKS_H_
 #define _CLOCKS_H_
 
+#if defined(CONFIG_TI816X)
+#include asm/arch/clocks_ti816x.h
+#else
 #include asm/arch/clocks_am33xx.h
+#endif
 
 #endif
diff --git a/arch/arm/include/asm/arch-am33xx/clocks_ti816x.h 
b/arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
new file mode 100644
index 000..403db33
--- /dev/null
+++ b/arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
@@ -0,0 +1,136 @@
+/*
+ * clocks_ti816x.h
+ *
+ * Copyright (C) 2013, Adeneo Embedded www.adeneo-embedded.com
+ * Antoine Tenart, aten...@adeneo-embedded.com
+ *
+ * Based on TI-PSP-04.00.02.14 :
+ *
+ * (C) Copyright 2006-2008
+ * Texas Instruments, www.ti.com
+ * Richard Woodruff r-woodru...@ti.com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#ifndef _CLOCKS_TI816X_H_
+#define _CLOCKS_TI816X_H_
+
+/*
+ * Values supported 400,531,675,796
+ *
+ * On TI8168 rev C, use 400 or 531 MHz !
+ */
+#define DDR_PLL_400
+
+/* Main PLL */
+#define MAIN_N 64
+#define MAIN_P 0x1
+#define MAIN_INTFREQ1  0x8
+#define MAIN_FRACFREQ1 0x80
+#define MAIN_MDIV1 0x2
+#define MAIN_INTFREQ2  0xE
+#define MAIN_FRACFREQ2 0x0
+#define MAIN_MDIV2 0x1
+#define MAIN_INTFREQ3  0x8
+#define MAIN_FRACFREQ3 0xB0
+#define MAIN_MDIV3 0x3
+#define MAIN_INTFREQ4  0x9
+#define MAIN_FRACFREQ4 0x4F
+#define MAIN_MDIV4 0x3
+#define MAIN_INTFREQ5  0x9
+#define MAIN_FRACFREQ5 0x374BC6
+#define MAIN_MDIV5 0xC
+#define MAIN_MDIV6 0x48
+#define MAIN_MDIV7 0x4
+
+/* DDR PLL */
+/* For 400 MHz */
+#if defined(DDR_PLL_400)
+#define DDR_N  59
+#define DDR_P  0x1
+#define DDR_MDIV1  0x4
+#define DDR_INTFREQ2   0x8
+#define DDR_FRACFREQ2  0xD9
+#define DDR_MDIV2  0x1E
+#define DDR_INTFREQ3   0x8
+#define DDR_FRACFREQ3  0x0
+#define DDR_MDIV3  0x4
+#define DDR_INTFREQ4   0xE /* Expansion DDR clk */
+#define DDR_FRACFREQ4  0x0
+#define DDR_MDIV4  0x4
+#define DDR_INTFREQ5   0xE /* Expansion DDR clk */
+#define DDR_FRACFREQ5  0x0
+#define DDR_MDIV5  0x4
+#endif
+
+/* For 531 MHz */
+#if defined(DDR_PLL_531)
+#define DDR_N  59
+#define DDR_P  0x1
+#define DDR_MDIV1  0x3
+#define DDR_INTFREQ2   0x8
+#define DDR_FRACFREQ2  0xD9
+#define DDR_MDIV2  0x1E
+#define DDR_INTFREQ3   0x8
+#define DDR_FRACFREQ3  0x0
+#define DDR_MDIV3  0x4
+#define DDR_INTFREQ4   0xE /* Expansion DDR clk */
+#define DDR_FRACFREQ4  

[U-Boot] [PATCH v3 3/3] Add TI816X evm board support

2013-04-12 Thread TENART Antoine
Signed-off-by: Antoine Tenart aten...@adeneo-embedded.com
---
 MAINTAINERS|4 +
 arch/arm/include/asm/arch-am33xx/spl.h |9 +
 board/ti/ti816x/Makefile   |   48 ++
 board/ti/ti816x/evm.c  |  866 
 boards.cfg |1 +
 include/configs/ti816x_evm.h   |  177 +++
 6 files changed, 1105 insertions(+)
 create mode 100644 board/ti/ti816x/Makefile
 create mode 100644 board/ti/ti816x/evm.c
 create mode 100644 include/configs/ti816x_evm.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 6b2202c..3aaac7f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -922,6 +922,10 @@ Lucas Stach d...@lynxeye.de
 
colibri_t20_irisTegra20 (ARM7  A9 Dual Core)
 
+Antoine Tenart aten...@adeneo-embedded.com
+
+   TI816X  ARM ARMV7 (TI816x Soc)
+
 Nick Thompson nick.thomp...@gefanuc.com
 
da830evmARM926EJS (DA830/OMAP-L137)
diff --git a/arch/arm/include/asm/arch-am33xx/spl.h 
b/arch/arm/include/asm/arch-am33xx/spl.h
index 9b5fe9e..d0c1ec9 100644
--- a/arch/arm/include/asm/arch-am33xx/spl.h
+++ b/arch/arm/include/asm/arch-am33xx/spl.h
@@ -23,6 +23,14 @@
 #ifndef_ASM_ARCH_SPL_H_
 #define_ASM_SPL_H_
 
+#if defined(CONFIG_TI816X)
+#define BOOT_DEVICE_XIP2
+#define BOOT_DEVICE_NAND   3
+#define BOOT_DEVICE_MMC1   6
+#define BOOT_DEVICE_MMC2   5
+#define BOOT_DEVICE_UART   0x43
+#define BOOT_DEVICE_MMC2_2 0xFF
+#else
 #define BOOT_DEVICE_XIP2
 #define BOOT_DEVICE_NAND   5
 #ifdef CONFIG_AM33XX
@@ -37,3 +45,4 @@
 #define BOOT_DEVICE_CPGMAC 70
 #define BOOT_DEVICE_MMC2_2  0xFF
 #endif
+#endif
diff --git a/board/ti/ti816x/Makefile b/board/ti/ti816x/Makefile
new file mode 100644
index 000..59128ee
--- /dev/null
+++ b/board/ti/ti816x/Makefile
@@ -0,0 +1,48 @@
+#
+# Copyright (C) 2013, Adeneo Embedded www.adeneo-embedded.com
+# Antoine Tenart, aten...@adeneo-embedded.com
+#
+# Based on TI-PSP-04.00.02.14 :
+#
+# Copyright (C) 2009, Texas Instruments, Incorporated
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation version 2.
+#
+# This program is distributed as is WITHOUT ANY WARRANTY of any
+# kind, whether express or implied; without even the implied warranty
+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := evm.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
+
diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
new file mode 100644
index 000..bb9d604
--- /dev/null
+++ b/board/ti/ti816x/evm.c
@@ -0,0 +1,866 @@
+/*
+ * evm.c
+ *
+ * Copyright (C) 2013, Adeneo Embedded www.adeneo-embedded.com
+ * Antoine Tenart, aten...@adeneo-embedded.com
+ *
+ * Based on TI-PSP-04.00.02.14 :
+ *
+ * Copyright (C) 2009, Texas Instruments, Incorporated
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed as is WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include common.h
+#include spl.h
+#include asm/cache.h
+#include asm/io.h
+#include asm/arch/clock.h
+#include asm/arch/cpu.h
+#include asm/arch/ddr_defs.h
+#include asm/arch/hardware.h
+#include asm/arch/sys_proto.h
+#include asm/arch/mmc_host_def.h
+#include asm/arch/mem.h
+#include asm/arch/mux.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifdef CONFIG_TI816X_DDR3_SW_LEVELING
+static void ddr3_sw_levelling(int emif);
+#endif
+
+int board_init(void)
+{
+   gd-bd-bi_boot_params = PHYS_DRAM_1 + 0x100;
+   return 0;
+}
+
+#if defined(CONFIG_SPL_BUILD)
+
+static struct module_pin_mux mmc_pin_mux[] = {
+   { OFFSET(pincntl157), PULLDOWN_EN | PULLUDDIS | MODE(0x0) },
+   { OFFSET(pincntl158), PULLDOWN_EN | PULLUDEN | MODE(0x0) },
+   { OFFSET(pincntl159), PULLUP_EN | PULLUDDIS | MODE(0x0) },
+   { OFFSET(pincntl160), 

Re: [U-Boot] offer: program to deal with kirkwood boot from UART

2013-04-12 Thread JPT

Am 08.04.2013 21:17, schrieb Jason Cooper:

Jan,

On Mon, Apr 08, 2013 at 11:14:25AM +0200, JPT wrote:

during my dealing with the bricked kirkwood board I wrote an app
which automates the process of booting from UART.
It's rather stable now, except right now it doesn't work any more.


Never was a more contradictory sentence uttered ;-)


LOL

 Very nice!  Please take a look at tools/kwboot.c.  It is the current
 in-tree tool doing the job you have set out.  However, it doesn't have
 as many features as your code appears to have.

as soon as I realized Kirkwood boot is integrated into u-boot, I should 
have searched for a kw client... o.O

Well, didn't...

 Could you lay out your patches to add missing features to kwboot?  It
 would facilitate review, and would avoid duplicate tools in the source
 tree.

Well. I am sorry, I wasn't planning integration into u-boot source tree.
- it's pascal (I don't know c/cpp very well)
- it uses a rather fat opensource communication library (synapse, 1.5 MB 
of pascal source)



Since I am done with recovering my NAS, I won't continue work on this.

Any idea where to anyway provide the source?
I could upload it where I wrote the guide on upgrading my Netgear NAS.
http://netgear.nas-central.org/wiki/ReadyNasDUO-200_customisation_guide

But... xmodem boot solves only far less problems than the custom 
emergency boot holding the backup button. So for the Netgear NAS it's 
useless. But maybe it's of use if I put it into a more general section 
on http://www.nas-central.org/


Jan









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


Re: [U-Boot] [PATCH v3 0/4] Homogeneize semantics of CONFIG_SPL_MAX_SIZE

2013-04-12 Thread Tom Rini
On Fri, Apr 12, 2013 at 01:55:39PM +0200, Albert ARIBAUD wrote:

 CONFIG_SPL_MAX_SIZE and CONFIG_SPL_BSS_MAX_SIZE did not have constant
 semantics across all of U-boot. This patch series aims at fixing this by
 splitting the maximum size into separate image (code + data + rodata +
 linker list) size on the one hand, and BSS size on the other hand.
 
 Changes in v3:
 - introduced CONFIG_SPL_MAX_FOOTPRINT
 - fixed typo in BSS size test
 
 Changes in v2:
 - brought back total size to 12K
 - fixed commit summary typoes
 - fixed spacing in commit summary
 - removed mmutable in SPL linker file
 
 Albert ARIBAUD (4):
   cam_enc_4xx: fix CONFIG_SPL_MAX_SIZE semantics
   da850evm, da850_am18xxevm: fix CONFIG_SPL_MAX_SIZE semantics
   smdk5250, snow: fix CONFIG_SPL_MAX_SIZE semantics
   ARM: fix CONFIG_SPL_MAX_SIZE semantics

The problem is that cam_enc_4xx, da850* and quite likely smdk5250 all
want the new CONFIG_SPL_MAX_FOOTPRINT and not an arbitrary split between
BSS and everything else.

-- 
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] fatwrite problem

2013-04-12 Thread Ruud Commandeur
Hi Everyone,

Sinced a few days I noticed some problems writing the uimage to a FAT
partition on my SD-card. At first I was afraid of some (physical)
SD-card problems, but it appears to be related to he size of the uImage.
With some further testing (and adding some debug printing), I could
easily reproduce the problem:

//4K file, result OK
fatwrite mmc 0:1 4200 testfile 1000
writing testfile
set_cluster; clustnum: 5, startsect: 176, size 2048
set_cluster; clustnum: 6, startsect: 180, size 2048
set_cluster; clustnum: -6, startsect: 132, size 2048
4096 bytes written

//512 bytes file, timeout error, file not written
fatwrite mmc 0:1 4200 testfile 200
writing testfile
set_cluster; clustnum: 5, startsect: 176, size 0
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
set_cluster; clustnum: 5, startsect: 176, size 512
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
MMC0: Bus busy timeout!
set_cluster; clustnum: -6, startsect: 132, size 2048
MMC0: Bus busy timeout!
512 bytes written

It seems to be related to he problem reported here:

http://www.mail-archive.com/u-boot@lists.denx.de/msg107212.html

Once the size of the set_cluster call equals 0, the mmc command is
incomplete and times out. In the earlier reported problem, a patch is
mentioned, but not available for dowload here. Also in the latest
versions of the git repository I could not find a patch for this
problem. Can anyone tell me if there is a fix for this problem?

Regards,

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


Re: [U-Boot] [PATCH v2 7/7] add support for palm treo 680 board

2013-04-12 Thread Mike Dunn
On 04/11/2013 12:20 PM, Marek Vasut wrote:
 Dear Mike Dunn,
 
 A quick overview of u-boot implementation on the treo 680...

 The treo 680 has a Diskonchip G4 nand flash chip.  This device has a 2k
 region that maps to the system bus at the reset vector in a NOR-like
 fashion so that it can be used as the boot device.  The phone is shipped
 with this 2k region configured as write-protected (can't be modified) and
 programmed with an initial program loader (IPL).  At power-up, this IPL
 loads the contents of two flash blocks to SDRAM and jumps to it.  The
 capacity of the two blocks is not large enough to hold all of u-boot, so a
 u-boot SPL is used.  To conserve flash space, these two blocks and the
 necessary number of subsequent blocks are programmed with a concatenated
 spl + u-boot image.  That way, the IPL will also load a portion of u-boot
 proper, and when the spl runs, it relocates the portion of u-boot that the
 IPL has already loaded, and then resumes loading the remaining part of
 u-boot before jumping to it.

 The default_environment is used (CONFIG_ENV_IS_NOWHERE) because I didn't
 think that having a writable environment was worth the cost of a flash
 block, although adding it would be straightforward.  I abuse the
 CONFIG_EXTRA_ENV_SETTINGS option to specify the usbtty for the console
 (CONFIG_SYS_CONSOLE_IS_IN_ENV).

 Support for the LCD is included, but currently it is only useful for
 displaying the u-boot splash screen.  But if u-boot is built without the
 usbtty console, it does display the auto-boot progress nicely.

 Signed-off-by: Mike Dunn miked...@newsguy.com
 
 I think the tool shall really go as a separate patch. Besides, can the tool 
 not 
 be implemented as a part of u-boot's mkimage infrastructure?


OK, I can make the flash_u-boot utility (which writes u-boot to the flash boot
blocks) a separate patch.

As for making it part of mkimage...  I didn't really consider that because based
on my (limited) knowledge, I figured they are unrelated.  As I understand it,
mkimage creates an OS image file that u-boot can parse and load.  flash_u-boot
is a utility that performs the task of writing u-boot itself to flash.

I figured that mine was a special case, since u-boot must be written in a
special format (redundant pages) and in a special manner (alternate 4k regions
skipped), with the flash device in a special mode, and so it can not be done in
the normal manner; e.g., 'nandwrite' from mtd-utils, or its u-boot 'nand write'
equivalent, even if you first ran the u-boot image through a separate utility
that simply converted the format of the image.

Hope that makes sense.  Any insight appreciated.  I'll take a look at what's in
the tools directory.

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


Re: [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment

2013-04-12 Thread Joe Hershberger
Hi Stefan,

On Fri, Apr 12, 2013 at 6:30 AM, Tom Rini tr...@ti.com wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 04/12/2013 02:19 AM, Stefan Roese wrote:
 Hi Joe,

 On 12.04.2013 00:26, Tom Rini wrote:
 On Mon, Apr 08, 2013 at 03:32:45PM -0500, Joe Hershberger wrote:

 NAND is not good at handling absolute addresses to sectors for
 storing particular data.  The current implementation of the
 NAND env support works around this in several ways such as
 storing a pointer to the sector in the OOB of the first sector
 (interferes with some CRC) or supporting a range of sectors
 (which unless it is huge is not guaranteed to be safe).  None
 of these options address wear-leveling concerns or bad block
 handling.

 Accessing the u-boot env from UBI eliminates these concerns.
 However, it does require some of the basic settings for finding
 the UBI env to be in the default u-boot env.

 One question: Do you plan to support the fw_env Linux tools with
 this env-in-UBI feature as well?

 That is what the 'gluebi' comment is about.  It could however stand to
 be documented more explicitly in the README or similar.  You use
 CONFIG_MTD_UBI_GLUEBI in the kernel to allow you to map UBI volumes
 (which the env(s) are) as regular flash devices.

Sorry that wasn't clearer.  In the last two patches you can see where
I have to add a few changes to the fw_setenv to make it function
properly on the GLUEBI mtd devices.

I guess I didn't add much to the READMEs about it.  I'll try to
remember to push a patch to comment on it more there.

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


Re: [U-Boot] [PATCH v2 6/7] mtd: nand: add driver for diskonchip g4 nand flash

2013-04-12 Thread Mike Dunn
On 04/11/2013 02:00 PM, Scott Wood wrote:
 On 04/10/2013 07:45:27 PM, Mike Dunn wrote:
 This patch adds a driver for the diskonchip G4 nand flash device.  It is 
 based
 on the driver from the linux kernel.

 This also includes a separate SPL driver.  A separate SPL driver is used 
 because
 the device operates in a different mode (reliable mode) when loading a boot
 image, and also because the storage format of the boot image is different 
 from
 normal data (pages are stored redundantly).  The SPL driver basically mimics 
 how
 a typical IPL reads data from the device.  The special operating mode and
 storage format are used to compensate for the fact that the IPL does not 
 contain
 the BCH ecc decoding algorithm (due to size constraints).  Although the 
 u-boot
 SPL *could* use ecc, it operates like an IPL for the sake of simplicity and
 uniformity, since the IPL and SPL share the task of loading the u-boot image.
 As a side benefit, the SPL driver is very small.

 [port from linux kernel 3.4 commit 570469f3bde7f71cc1ece07a18d54a05b6a8775d]

 Signed-off-by: Mike Dunn miked...@newsguy.com
 ---
  drivers/mtd/nand/Makefile|2 +
  drivers/mtd/nand/docg4.c | 1035 
 ++
  drivers/mtd/nand/docg4_spl.c |  222 +
  include/linux/mtd/docg4.h|  134 ++
  4 files changed, 1393 insertions(+), 0 deletions(-)
  create mode 100644 drivers/mtd/nand/docg4.c
  create mode 100644 drivers/mtd/nand/docg4_spl.c
  create mode 100644 include/linux/mtd/docg4.h
 [snip]
 +#ifdef DEBUG_DOCG4
 +#define dbg(format, arg...) printf(DEBUG:  format, ##arg)
 +#else
 +#define dbg(format, arg...) do {} while (0)
 +#endif
 
 Maybe use MTDDEBUG?


Ok.  Alternatively, I wouldn't mind pulling them out entirely.  It's been
behaving quite nicely, and amyway, in the past I used a JTAG emultor rather than
the printfs.


 
 Otherwise:
 Acked-by: Scott Wood scottw...@freescale.com


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


Re: [U-Boot] [PATCH] net: nfs: add dynamic wait period

2013-04-12 Thread Joe Hershberger
Hi Matthias and Enric,

On Fri, Apr 12, 2013 at 3:08 AM, Enric Balletbo Serra
eballe...@gmail.com wrote:
 Hi all,

 2013/1/26 Matthias Brugger matthias@gmail.com

 2012/12/11 Matthias Brugger matthias@gmail.com:
  This patch tackles the time out problem which leads to break the
  boot process, when loading file over nfs. The patch does two things.
 
  First of all, we just ignore messages that arrive with a rpc_id smaller
  then the client id. We just interpret this messages as answers to
  formaly timed out messages.
 
  Second, when a time out occurs we double the time to wait, so that we
  do not stress the server resending the last message.

 Any comment on the patch?

 Hi Joe and Wolfgang,

 any comment on this?


 I had a problem when I tried to load via NFS. Firstly I tried to load the
 dtb image via NFS, secondly I tried to load the kernel image but if it
 doesn't work and the file is never loaded.

 Applying this patch solved the problem, but seems nobody acked or answered
 Matthias. Is this patch the proper fix ? In that case it's possible to apply
 ? If not, any comments how to solve this problem.

 Best regards,
 Enric

I apologize for the tardiness of dealing with patches this release
cycle.  I've been swamped at work.  I'll get to these soon.

Enric, would you like to send a Tested-by?

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


Re: [U-Boot] [PATCH v2 8/8] ARM: Present a menu of bootable options on boot

2013-04-12 Thread Tom Rini
On Thu, Apr 11, 2013 at 12:51:03PM -0700, Suriyan Ramasami wrote:

 Sounds good to me.
 
 I shall attempt a generic version and call it cmd_bootscan.c in the common
 directory.

A good first pass.  Please keep board/ait/cam_enc_4xx/cam_enc_4xx.c in
mind as that has a similar set of things going on.  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] Pull request for u-boot-marvell.git

2013-04-12 Thread Prafulla Wadaskar
Hi Albert,
Please pull
The following changes since commit c97b6df1ae92679d67f94c1cfef51323782a506d:
  Albert ARIBAUD (1):
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'

are available in the git repository at:

  u-boot-marvell.git master branch.

Gerlando Falauto (1):
  kirkwood_nand: allow usage of NAND_ECC_SOFT_BCH

Holger Brunck (3):
  arm/km: rename BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT
  arm/km: use CONFIG_NAND_ECC_BCH
  arm/km: add support for kmsuv31 board

 boards.cfg   |1 +
 drivers/mtd/nand/kirkwood_nand.c |4 
 include/configs/km/km_arm.h  |5 -
 include/configs/km_kirkwood.h|8 
 4 files changed, 17 insertions(+), 1 deletions(-)

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


Re: [U-Boot] fatwrite problem

2013-04-12 Thread Mats Kärrman
Hi Ruud,

Ruud Commandeur wrote:
 Once the size of the set_cluster call equals 0, the mmc command is
 incomplete and times out. In the earlier reported problem, a patch is
 mentioned, but not available for dowload here. Also in the latest
 versions of the git repository I could not find a patch for this
 problem. Can anyone tell me if there is a fix for this problem?

I asked Damien Huang (back then) and got the following reply (I think there was
some character encoding problem so his mail never was accepted by the list).
I have not further analyzed the contents, anyway it wasn't the solution to my 
problem.
BR // Mats

Damien Huang wrote:
As requested from Mats, I am resending this email. The patch is given below:

diff -cr ./u-boot-original/u-boot/fs/fat/fat_write.c 
./u-boot-test/u-boot/fs/fat/fat_write.c
*** ./u-boot-original/u-boot/fs/fat/fat_write.c2013-02-07 
14:47:33.314732999 +1100
--- ./u-boot-test/u-boot/fs/fat/fat_write.c2013-02-28 15:36:24.551861920 
+1100
***
*** 562,596 
  {
  int idx = 0;
  __u32 startsect;
!
! if (clustnum  0)
! startsect = mydata-data_begin +
! clustnum * mydata-clust_size;
! else
! startsect = mydata-rootdir_sect;
!
! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
!
! if (disk_write(startsect, size / mydata-sect_size, buffer)  0) {
! debug(Error writing data\n);
! return -1;
! }
!
! if (size % mydata-sect_size) {
! __u8 tmpbuf[mydata-sect_size];
!
! idx = size / mydata-sect_size;
! buffer += idx * mydata-sect_size;
! memcpy(tmpbuf, buffer, size % mydata-sect_size);
!
! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
! debug(Error writing data\n);
! return -1;
! }
!
! return 0;
! }
!
  return 0;
  }
 
--- 562,595 
  {
  int idx = 0;
  __u32 startsect;
! if(size) //if there are data to be set
! {
! if (clustnum  0)
! startsect = mydata-data_begin +
! clustnum * mydata-clust_size;
! else
! startsect = mydata-rootdir_sect;
!
! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
!
! if (disk_write(startsect, size / mydata-sect_size, buffer)  0) {
! debug(Error writing data\n);
! return -1;
! }
!
! if (size % mydata-sect_size) {
! __u8 tmpbuf[mydata-sect_size];
!
! idx = size / mydata-sect_size;
! buffer += idx * mydata-sect_size;
! memcpy(tmpbuf, buffer, size % mydata-sect_size);
!
! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
! debug(Error writing data\n);
! return -1;
! }
! }
! }//end if data to be set
  return 0;
  }
 
diff -cr ./u-boot-original/u-boot/include/configs/am335x_evm.h 
./u-boot-test/u-boot/include/configs/am335x_evm.h
*** ./u-boot-original/u-boot/include/configs/am335x_evm.h2013-02-07 
14:47:35.754702325 +1100
--- ./u-boot-test/u-boot/include/configs/am335x_evm.h2013-03-01 
12:25:23.942104474 +1100
***
*** 143,148 
--- 143,149 
  #define CONFIG_CMD_MMC
  #define CONFIG_DOS_PARTITION
  #define CONFIG_FS_FAT
+ #define CONFIG_FAT_WRITE
  #define CONFIG_FS_EXT4
  #define CONFIG_CMD_FAT
  #define CONFIG_CMD_EXT2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] net: nfs: add dynamic wait period

2013-04-12 Thread Enric Balletbo Serra
Hi Joe,

Thanks for answer.


2013/4/12 Joe Hershberger joe.hershber...@gmail.com

 Hi Matthias and Enric,

 On Fri, Apr 12, 2013 at 3:08 AM, Enric Balletbo Serra
 eballe...@gmail.com wrote:
  Hi all,
 
  2013/1/26 Matthias Brugger matthias@gmail.com
 
  2012/12/11 Matthias Brugger matthias@gmail.com:
   This patch tackles the time out problem which leads to break the
   boot process, when loading file over nfs. The patch does two things.
  
   First of all, we just ignore messages that arrive with a rpc_id
 smaller
   then the client id. We just interpret this messages as answers to
   formaly timed out messages.
  
   Second, when a time out occurs we double the time to wait, so that we
   do not stress the server resending the last message.
 
  Any comment on the patch?
 
  Hi Joe and Wolfgang,
 
  any comment on this?
 
 
  I had a problem when I tried to load via NFS. Firstly I tried to load the
  dtb image via NFS, secondly I tried to load the kernel image but if it
  doesn't work and the file is never loaded.
 
  Applying this patch solved the problem, but seems nobody acked or
 answered
  Matthias. Is this patch the proper fix ? In that case it's possible to
 apply
  ? If not, any comments how to solve this problem.
 
  Best regards,
  Enric

 I apologize for the tardiness of dealing with patches this release
 cycle.  I've been swamped at work.  I'll get to these soon.

 Enric, would you like to send a Tested-by?

 Thanks,
 -Joe


I tested this patch with an IGEPv2 board and an IGEP COM AQUILA.

Tested-by: Enric Balletbo i Serra eballe...@gmail.com
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 0/7] Add support for using an UBI volume for environment

2013-04-12 Thread Stefan Roese
Hi Joe,

On 12.04.2013 14:52, Joe Hershberger wrote:
 Sorry that wasn't clearer.  In the last two patches you can see where
 I have to add a few changes to the fw_setenv to make it function
 properly on the GLUEBI mtd devices.
 
 I guess I didn't add much to the READMEs about it.  I'll try to
 remember to push a patch to comment on it more there.

That would be great. Thanks.

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


Re: [U-Boot] Please pull u-boot-cfi-flash/master

2013-04-12 Thread Tom Rini
On Fri, Apr 12, 2013 at 11:43:33AM +0200, Stefan Roese wrote:
 Hi Wolfgang,
 
 On 12.04.2013 11:35, Wolfgang Denk wrote:
  In message 20130405162807.GH32357@bill-the-cat you wrote:
 
  please pull the updated cfi-flash repository with the build warning fix:
  ...
  aaron.willi...@caviumnetworks.com (1):
mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support
  
  Hereby I ask to revert the mtd: cfi_flash: Fix CFI flash driver for
  8-bit bus support patch,. i. e. Commit 239cb9d.
  
  It breaks the CFI driver on a board here.  The board has two banks of
  AMD NOR flash, mapped at F800. and FC00., resp.  With current
  code, the flash is not detected.  Here is the debug log:
 
 Yes, please we should revert this patch for this release.
 
 Tom, will you do the revert yourself? Or should I send I PR for this?

A simple git revert -s 239cb9d shows a conflict to resolve so please
revert and test this and then send a PR, 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] fatwrite problem

2013-04-12 Thread Ruud Commandeur
Hi Mats,

Thanks a lot, this seems to solve my problem. Nothing more actualy than adding 
a if(size) around the code block of set_sector( ). I could have thought of 
that myself, but was not sure if anything else should be done in this case...

Regards,

Ruud 

-Oorspronkelijk bericht-
Van: Mats Kärrman [mailto:mats.karr...@tritech.se] 
Verzonden: vrijdag 12 april 2013 16:11
Aan: Ruud Commandeur
CC: u-boot@lists.denx.de
Onderwerp: RE: fatwrite problem

Hi Ruud,

Ruud Commandeur wrote:
 Once the size of the set_cluster call equals 0, the mmc command is
 incomplete and times out. In the earlier reported problem, a patch is
 mentioned, but not available for dowload here. Also in the latest
 versions of the git repository I could not find a patch for this
 problem. Can anyone tell me if there is a fix for this problem?

I asked Damien Huang (back then) and got the following reply (I think there was
some character encoding problem so his mail never was accepted by the list).
I have not further analyzed the contents, anyway it wasn't the solution to my 
problem.
BR // Mats

Damien Huang wrote:
As requested from Mats, I am resending this email. The patch is given below:

diff -cr ./u-boot-original/u-boot/fs/fat/fat_write.c 
./u-boot-test/u-boot/fs/fat/fat_write.c
*** ./u-boot-original/u-boot/fs/fat/fat_write.c2013-02-07 
14:47:33.314732999 +1100
--- ./u-boot-test/u-boot/fs/fat/fat_write.c2013-02-28 15:36:24.551861920 
+1100
***
*** 562,596 
  {
  int idx = 0;
  __u32 startsect;
!
! if (clustnum  0)
! startsect = mydata-data_begin +
! clustnum * mydata-clust_size;
! else
! startsect = mydata-rootdir_sect;
!
! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
!
! if (disk_write(startsect, size / mydata-sect_size, buffer)  0) {
! debug(Error writing data\n);
! return -1;
! }
!
! if (size % mydata-sect_size) {
! __u8 tmpbuf[mydata-sect_size];
!
! idx = size / mydata-sect_size;
! buffer += idx * mydata-sect_size;
! memcpy(tmpbuf, buffer, size % mydata-sect_size);
!
! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
! debug(Error writing data\n);
! return -1;
! }
!
! return 0;
! }
!
  return 0;
  }
 
--- 562,595 
  {
  int idx = 0;
  __u32 startsect;
! if(size) //if there are data to be set
! {
! if (clustnum  0)
! startsect = mydata-data_begin +
! clustnum * mydata-clust_size;
! else
! startsect = mydata-rootdir_sect;
!
! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
!
! if (disk_write(startsect, size / mydata-sect_size, buffer)  0) {
! debug(Error writing data\n);
! return -1;
! }
!
! if (size % mydata-sect_size) {
! __u8 tmpbuf[mydata-sect_size];
!
! idx = size / mydata-sect_size;
! buffer += idx * mydata-sect_size;
! memcpy(tmpbuf, buffer, size % mydata-sect_size);
!
! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
! debug(Error writing data\n);
! return -1;
! }
! }
! }//end if data to be set
  return 0;
  }
 
diff -cr ./u-boot-original/u-boot/include/configs/am335x_evm.h 
./u-boot-test/u-boot/include/configs/am335x_evm.h
*** ./u-boot-original/u-boot/include/configs/am335x_evm.h2013-02-07 
14:47:35.754702325 +1100
--- ./u-boot-test/u-boot/include/configs/am335x_evm.h2013-03-01 
12:25:23.942104474 +1100
***
*** 143,148 
--- 143,149 
  #define CONFIG_CMD_MMC
  #define CONFIG_DOS_PARTITION
  #define CONFIG_FS_FAT
+ #define CONFIG_FAT_WRITE
  #define CONFIG_FS_EXT4
  #define CONFIG_CMD_FAT
  #define CONFIG_CMD_EXT2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Pull request for u-boot-marvell.git

2013-04-12 Thread Albert ARIBAUD
Hi Prafulla,

On Fri, 12 Apr 2013 06:54:51 -0700, Prafulla Wadaskar
prafu...@marvell.com wrote:

 Hi Albert,
 Please pull
 The following changes since commit c97b6df1ae92679d67f94c1cfef51323782a506d:
   Albert ARIBAUD (1):
 Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
 
 are available in the git repository at:
 
   u-boot-marvell.git master branch.
 
 Gerlando Falauto (1):
   kirkwood_nand: allow usage of NAND_ECC_SOFT_BCH
 
 Holger Brunck (3):
   arm/km: rename BOARD_LATE_INIT to CONFIG_BOARD_LATE_INIT
   arm/km: use CONFIG_NAND_ECC_BCH
   arm/km: add support for kmsuv31 board
 
  boards.cfg   |1 +
  drivers/mtd/nand/kirkwood_nand.c |4 
  include/configs/km/km_arm.h  |5 -
  include/configs/km_kirkwood.h|8 
  4 files changed, 17 insertions(+), 1 deletions(-)
 
 Regards...
 Prafulla . . .

Applied to u-boot-arm/master, thanks!

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


Re: [U-Boot] fatwrite problem

2013-04-12 Thread Tom Rini
On Fri, Apr 12, 2013 at 05:06:35PM +0200, Ruud Commandeur wrote:
 Hi Mats,
 
 Thanks a lot, this seems to solve my problem. Nothing more actualy than 
 adding a if(size) around the code block of set_sector( ). I could have 
 thought of that myself, but was not sure if anything else should be done in 
 this case...

Since your change sounds slightly different, can you confirm that it
also solves the problem and if so post it as patch with Signed-off-by
and so forth?  Thanks!

 
 Regards,
 
 Ruud 
 
 -Oorspronkelijk bericht-
 Van: Mats K?rrman [mailto:mats.karr...@tritech.se] 
 Verzonden: vrijdag 12 april 2013 16:11
 Aan: Ruud Commandeur
 CC: u-boot@lists.denx.de
 Onderwerp: RE: fatwrite problem
 
 Hi Ruud,
 
 Ruud Commandeur wrote:
  Once the size of the set_cluster call equals 0, the mmc command is
  incomplete and times out. In the earlier reported problem, a patch is
  mentioned, but not available for dowload here. Also in the latest
  versions of the git repository I could not find a patch for this
  problem. Can anyone tell me if there is a fix for this problem?
 
 I asked Damien Huang (back then) and got the following reply (I think there 
 was
 some character encoding problem so his mail never was accepted by the list).
 I have not further analyzed the contents, anyway it wasn't the solution to my 
 problem.
 BR // Mats
 
 Damien Huang wrote:
 As requested from Mats, I am resending this email. The patch is given below:
 
 diff -cr ./u-boot-original/u-boot/fs/fat/fat_write.c 
 ./u-boot-test/u-boot/fs/fat/fat_write.c
 *** ./u-boot-original/u-boot/fs/fat/fat_write.c2013-02-07 
 14:47:33.314732999 +1100
 --- ./u-boot-test/u-boot/fs/fat/fat_write.c2013-02-28 15:36:24.551861920 
 +1100
 ***
 *** 562,596 
   {
   int idx = 0;
   __u32 startsect;
 !
 ! if (clustnum  0)
 ! startsect = mydata-data_begin +
 ! clustnum * mydata-clust_size;
 ! else
 ! startsect = mydata-rootdir_sect;
 !
 ! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
 !
 ! if (disk_write(startsect, size / mydata-sect_size, buffer)  0) {
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 !
 ! if (size % mydata-sect_size) {
 ! __u8 tmpbuf[mydata-sect_size];
 !
 ! idx = size / mydata-sect_size;
 ! buffer += idx * mydata-sect_size;
 ! memcpy(tmpbuf, buffer, size % mydata-sect_size);
 !
 ! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 !
 ! return 0;
 ! }
 !
   return 0;
   }
  
 --- 562,595 
   {
   int idx = 0;
   __u32 startsect;
 ! if(size) //if there are data to be set
 ! {
 ! if (clustnum  0)
 ! startsect = mydata-data_begin +
 ! clustnum * mydata-clust_size;
 ! else
 ! startsect = mydata-rootdir_sect;
 !
 ! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
 !
 ! if (disk_write(startsect, size / mydata-sect_size, buffer)  0) {
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 !
 ! if (size % mydata-sect_size) {
 ! __u8 tmpbuf[mydata-sect_size];
 !
 ! idx = size / mydata-sect_size;
 ! buffer += idx * mydata-sect_size;
 ! memcpy(tmpbuf, buffer, size % mydata-sect_size);
 !
 ! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 ! }
 ! }//end if data to be set
   return 0;
   }
  
 diff -cr ./u-boot-original/u-boot/include/configs/am335x_evm.h 
 ./u-boot-test/u-boot/include/configs/am335x_evm.h
 *** ./u-boot-original/u-boot/include/configs/am335x_evm.h2013-02-07 
 14:47:35.754702325 +1100
 --- ./u-boot-test/u-boot/include/configs/am335x_evm.h2013-03-01 
 12:25:23.942104474 +1100
 ***
 *** 143,148 
 --- 143,149 
   #define CONFIG_CMD_MMC
   #define CONFIG_DOS_PARTITION
   #define CONFIG_FS_FAT
 + #define CONFIG_FAT_WRITE
   #define CONFIG_FS_EXT4
   #define CONFIG_CMD_FAT
   #define CONFIG_CMD_EXT2

Benoit, what do you think?  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] [PATCH v4 0/4] Homogeneize semantics of CONFIG_SPL_MAX_SIZE

2013-04-12 Thread Albert ARIBAUD
CONFIG_SPL_MAX_SIZE and CONFIG_SPL_BSS_MAX_SIZE did not have constant
semantics across all of U-boot. This patch series aims at fixing this by
splitting the maximum size into separate image (code + data + rodata +
linker list) size on the one hand, and BSS size on the other hand.

Changes in v4:
- reordered patches so that FOOTPRINT is introduced first,
  then individual boards are switched to using it
- rewrote README entries
- converted to CONFIG_SPL_MAX_FOOTPRINT
- limited SPL size to exactly 6 2K pages
- converted to CONFIG_SPL_MAX_FOOTPRINT
- converted to CONFIG_SPL_MAX_FOOTPRINT

Changes in v3:
- introduced CONFIG_SPL_MAX_FOOTPRINT
- fixed typo in BSS size test

Changes in v2:
- removed mmutable in SPL linker file
- brought back total size to 12K
- fixed commit summary typoes
- fixed spacing in commit summary

Albert ARIBAUD (4):
  ARM: fix CONFIG_SPL_MAX_SIZE semantics
  cam_enc_4xx: convert to CONFIG_SPL_MAX_FOOTPRINT
  da850evm, da850_am18xxevm: convert to CONFIG_SPL_MAX_FOOTPRINT
  smdk5250, snow: convert to CONFIG_SPL_MAX_FOOTPRINT

 README |   18 --
 arch/arm/cpu/u-boot-spl.lds|   24 +---
 arch/arm/cpu/u-boot.lds|4 
 board/ait/cam_enc_4xx/u-boot-spl.lds   |2 +-
 board/davinci/da8xxevm/u-boot-spl-da850evm.lds |2 +-
 board/samsung/smdk5250/smdk5250-uboot-spl.lds  |2 +-
 include/configs/cam_enc_4xx.h  |2 +-
 include/configs/da850evm.h |2 +-
 include/configs/exynos5250-dt.h|2 +-
 include/configs/tegra-common.h |2 +-
 10 files changed, 36 insertions(+), 24 deletions(-)

-- 
1.7.10.4

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


[U-Boot] [PATCH v4 1/4] ARM: fix CONFIG_SPL_MAX_SIZE semantics

2013-04-12 Thread Albert ARIBAUD
Remove SPL-related ASSERT() in arch/arm/cpu/u-boot.lds
as this file is never used for SPL builds.

Rewrite the ASSERT() in arch/arm/cpu/u-boot-spl.lds
to separately test image (text,data,rodata...) size,
BSS size, and full footprint each against its own max,
and make Tegra boards check full footprint.

Also, output section mmutable is not used in SPL builds.
Remove it.

Finally, update README regarding the (now homogeneous)
semantics of CONFIG_SPL_[BSS_]MAX_SIZE and add the new
CONFIG_SPL_MAX_FOOTPRINT macro.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
Reported-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
---
Changes in v4:
- rewrote README entries

Changes in v3:
- introduced CONFIG_SPL_MAX_FOOTPRINT
- fixed typo in BSS size test

Changes in v2:
- removed mmutable in SPL linker file

 README |   18 --
 arch/arm/cpu/u-boot-spl.lds|   24 +---
 arch/arm/cpu/u-boot.lds|4 
 include/configs/tegra-common.h |2 +-
 4 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/README b/README
index 6272853..f544c88 100644
--- a/README
+++ b/README
@@ -2775,8 +2775,18 @@ FIT uImage format:
CONFIG_SPL_LDSCRIPT
LDSCRIPT for linking the SPL binary.
 
+   CONFIG_SPL_MAX_FOOTPRINT
+   Maximum size in memory allocated to the SPL, BSS included.
+   When defined, the linker checks that the actual memory
+   used by SPL from _start to __bss_end does not exceed it.
+   CONFIG_MAX_FOOTPRINT and CONFIG_MAX_BSS_SIZE should not
+   be both defined at the same time.
+
CONFIG_SPL_MAX_SIZE
-   Maximum binary size (text, data and rodata) of the SPL binary.
+   Maximum size of the SPL image (text, data, rodata, and
+   linker lists sections), BSS excluded.
+   When defined, the linker checks that the actual size does
+   not exceed it.
 
CONFIG_SPL_TEXT_BASE
TEXT_BASE for linking the SPL binary.
@@ -2789,7 +2799,11 @@ FIT uImage format:
Link address for the BSS within the SPL binary.
 
CONFIG_SPL_BSS_MAX_SIZE
-   Maximum binary size of the BSS section of the SPL binary.
+   Maximum size in memory allocated to the SPL BSS.
+   When defined, the linker checks that the actual memory used
+   by SPL from __bss_start to __bss_end does not exceed it.
+   CONFIG_MAX_FOOTPRINT and CONFIG_MAX_BSS_SIZE should not
+   be both defined at the same time.
 
CONFIG_SPL_STACK
Adress of the start of the stack SPL will use
diff --git a/arch/arm/cpu/u-boot-spl.lds b/arch/arm/cpu/u-boot-spl.lds
index 3c0d99c..1408f03 100644
--- a/arch/arm/cpu/u-boot-spl.lds
+++ b/arch/arm/cpu/u-boot-spl.lds
@@ -65,15 +65,6 @@ SECTIONS
 
_end = .;
 
-   /*
-* Deprecated: this MMU section is used by pxa at present but
-* should not be used by new boards/CPUs.
-*/
-   . = ALIGN(4096);
-   .mmutable : {
-   *(.mmutable)
-   }
-
.bss __rel_dyn_start (OVERLAY) : {
__bss_start = .;
*(.bss*)
@@ -88,6 +79,17 @@ SECTIONS
/DISCARD/ : { *(.gnu*) }
 }
 
-#if defined(CONFIG_SPL_TEXT_BASE)  defined(CONFIG_SPL_MAX_SIZE)
-ASSERT(__bss_end  (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), SPL image 
too big);
+#if defined(CONFIG_SPL_MAX_SIZE)
+ASSERT(__image_copy_end - __image_copy_start  (CONFIG_SPL_MAX_SIZE), \
+   SPL image too big);
+#endif
+
+#if defined(CONFIG_SPL_BSS_MAX_SIZE)
+ASSERT(__bss_end - __bss_start  (CONFIG_SPL_BSS_MAX_SIZE), \
+   SPL image BSS too big);
+#endif
+
+#if defined(CONFIG_SPL_MAX_FOOTPRINT)
+ASSERT(__bss_end - _start  (CONFIG_SPL_MAX_FOOTPRINT), \
+   SPL image plus BSS too big);
 #endif
diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
index 3a1083d..7bbc4f5 100644
--- a/arch/arm/cpu/u-boot.lds
+++ b/arch/arm/cpu/u-boot.lds
@@ -101,7 +101,3 @@ SECTIONS
/DISCARD/ : { *(.interp*) }
/DISCARD/ : { *(.gnu*) }
 }
-
-#if defined(CONFIG_SPL_TEXT_BASE)  defined(CONFIG_SPL_MAX_SIZE)
-ASSERT(__bss_end  (CONFIG_SPL_TEXT_BASE + CONFIG_SPL_MAX_SIZE), SPL image 
too big);
-#endif
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 036ded0..e9241b8 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -158,7 +158,7 @@
 #define CONFIG_SPL_RAM_DEVICE
 #define CONFIG_SPL_BOARD_INIT
 #define CONFIG_SPL_NAND_SIMPLE
-#define CONFIG_SPL_MAX_SIZE(CONFIG_SYS_TEXT_BASE - \
+#define CONFIG_SPL_MAX_FOOTPRINT   (CONFIG_SYS_TEXT_BASE - \
CONFIG_SPL_TEXT_BASE)
 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x0001
 
-- 
1.7.10.4

___

[U-Boot] [PATCH v4 2/4] cam_enc_4xx: convert to CONFIG_SPL_MAX_FOOTPRINT

2013-04-12 Thread Albert ARIBAUD
This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
Changes in v4:
- converted to CONFIG_SPL_MAX_FOOTPRINT
- limited SPL size to exactly 6 2K pages

Changes in v3: None
Changes in v2:
- brought back total size to 12K

 board/ait/cam_enc_4xx/u-boot-spl.lds |2 +-
 include/configs/cam_enc_4xx.h|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/ait/cam_enc_4xx/u-boot-spl.lds 
b/board/ait/cam_enc_4xx/u-boot-spl.lds
index be1027d..1daa1b3 100644
--- a/board/ait/cam_enc_4xx/u-boot-spl.lds
+++ b/board/ait/cam_enc_4xx/u-boot-spl.lds
@@ -25,7 +25,7 @@
  */
 
 MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
-   LENGTH = CONFIG_SPL_MAX_SIZE }
+   LENGTH = CONFIG_SPL_MAX_FOOTPRINT }
 
 OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
 OUTPUT_ARCH(arm)
diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index 56528dd..b27551d 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -230,7 +230,7 @@
 #define CONFIG_SPL_STACK   (0x0001 + 0x7f00)
 
 #define CONFIG_SPL_TEXT_BASE   0x0020 /*CONFIG_SYS_SRAM_START*/
-#define CONFIG_SPL_MAX_SIZE12320
+#define CONFIG_SPL_MAX_FOOTPRINT   12288
 
 #ifndef CONFIG_SPL_BUILD
 #define CONFIG_SYS_TEXT_BASE   0x8108
-- 
1.7.10.4

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


[U-Boot] [PATCH v4 3/4] da850evm, da850_am18xxevm: convert to CONFIG_SPL_MAX_FOOTPRINT

2013-04-12 Thread Albert ARIBAUD
This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
Changes in v4:
- converted to CONFIG_SPL_MAX_FOOTPRINT

Changes in v3: None
Changes in v2:
- fixed commit summary typoes

 board/davinci/da8xxevm/u-boot-spl-da850evm.lds |2 +-
 include/configs/da850evm.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds 
b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds
index 2ae5a2c..b1b8701 100644
--- a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds
+++ b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds
@@ -25,7 +25,7 @@
  */
 
 MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE,\
-   LENGTH = CONFIG_SPL_MAX_SIZE }
+   LENGTH = CONFIG_SPL_MAX_FOOTPRINT }
 
 OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
 OUTPUT_ARCH(arm)
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 99b4de7..583568d 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -399,7 +399,7 @@
 #define CONFIG_SPL_LDSCRIPTboard/$(BOARDDIR)/u-boot-spl-da850evm.lds
 #define CONFIG_SPL_STACK   0x8001ff00
 #define CONFIG_SPL_TEXT_BASE   0x8000
-#define CONFIG_SPL_MAX_SIZE32768
+#define CONFIG_SPL_MAX_FOOTPRINT   32768
 #endif
 
 /* Load U-Boot Image From MMC */
-- 
1.7.10.4

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


[U-Boot] [PATCH v4 4/4] smdk5250, snow: convert to CONFIG_SPL_MAX_FOOTPRINT

2013-04-12 Thread Albert ARIBAUD
This target wants to check full SPL size, BSS included.
Remove CONFIG_SPL_MAX_SIZE definition and instead define
CONFIG_SPL_MAX_FOOTPRINT.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
Changes in v4:
- converted to CONFIG_SPL_MAX_FOOTPRINT

Changes in v3: None
Changes in v2:
- fixed spacing in commit summary

 board/samsung/smdk5250/smdk5250-uboot-spl.lds |2 +-
 include/configs/exynos5250-dt.h   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/samsung/smdk5250/smdk5250-uboot-spl.lds 
b/board/samsung/smdk5250/smdk5250-uboot-spl.lds
index 7df0a1d..c0a7602 100644
--- a/board/samsung/smdk5250/smdk5250-uboot-spl.lds
+++ b/board/samsung/smdk5250/smdk5250-uboot-spl.lds
@@ -26,7 +26,7 @@
  */
 
 MEMORY { .sram : ORIGIN = CONFIG_SPL_TEXT_BASE, \
-   LENGTH = CONFIG_SPL_MAX_SIZE }
+   LENGTH = CONFIG_SPL_MAX_FOOTPRINT }
 
 OUTPUT_FORMAT(elf32-littlearm, elf32-littlearm, elf32-littlearm)
 OUTPUT_ARCH(arm)
diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
index 496a194..3aed696 100644
--- a/include/configs/exynos5250-dt.h
+++ b/include/configs/exynos5250-dt.h
@@ -141,7 +141,7 @@
 /* specific .lds file */
 #define CONFIG_SPL_LDSCRIPTboard/samsung/smdk5250/smdk5250-uboot-spl.lds
 #define CONFIG_SPL_TEXT_BASE   0x02023400
-#define CONFIG_SPL_MAX_SIZE(14 * 1024)
+#define CONFIG_SPL_MAX_FOOTPRINT   (14 * 1024)
 
 #define CONFIG_BOOTCOMMAND mmc read 40007000 451 2000; bootm 40007000
 
-- 
1.7.10.4

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


Re: [U-Boot] fatwrite problem

2013-04-12 Thread Ruud Commandeur
Hi Tom,

Sorry if I mislead you, but my code change is quite the same as was
posted by Damien. I would be more than happy to send what you ask for,
but I don't think this will add much. And I will have to study a bit
then how to do this

Regards,

Ruud

-Oorspronkelijk bericht-
Van: Tom Rini [mailto:tom.r...@gmail.com] Namens Tom Rini
Verzonden: vrijdag 12 april 2013 17:13
Aan: Ruud Commandeur; Beno??t Th??baudeau
CC: Mats K?rrman; u-boot@lists.denx.de
Onderwerp: Re: [U-Boot] fatwrite problem

On Fri, Apr 12, 2013 at 05:06:35PM +0200, Ruud Commandeur wrote:
 Hi Mats,
 
 Thanks a lot, this seems to solve my problem. Nothing more actualy
than adding a if(size) around the code block of set_sector( ). I could
have thought of that myself, but was not sure if anything else should be
done in this case...

Since your change sounds slightly different, can you confirm that it
also solves the problem and if so post it as patch with Signed-off-by
and so forth?  Thanks!

 
 Regards,
 
 Ruud 
 
 -Oorspronkelijk bericht-
 Van: Mats K?rrman [mailto:mats.karr...@tritech.se] 
 Verzonden: vrijdag 12 april 2013 16:11
 Aan: Ruud Commandeur
 CC: u-boot@lists.denx.de
 Onderwerp: RE: fatwrite problem
 
 Hi Ruud,
 
 Ruud Commandeur wrote:
  Once the size of the set_cluster call equals 0, the mmc command is
  incomplete and times out. In the earlier reported problem, a patch
is
  mentioned, but not available for dowload here. Also in the latest
  versions of the git repository I could not find a patch for this
  problem. Can anyone tell me if there is a fix for this problem?
 
 I asked Damien Huang (back then) and got the following reply (I think
there was
 some character encoding problem so his mail never was accepted by the
list).
 I have not further analyzed the contents, anyway it wasn't the
solution to my problem.
 BR // Mats
 
 Damien Huang wrote:
 As requested from Mats, I am resending this email. The patch is given
below:
 
 diff -cr ./u-boot-original/u-boot/fs/fat/fat_write.c
./u-boot-test/u-boot/fs/fat/fat_write.c
 *** ./u-boot-original/u-boot/fs/fat/fat_write.c2013-02-07
14:47:33.314732999 +1100
 --- ./u-boot-test/u-boot/fs/fat/fat_write.c2013-02-28
15:36:24.551861920 +1100
 ***
 *** 562,596 
   {
   int idx = 0;
   __u32 startsect;
 !
 ! if (clustnum  0)
 ! startsect = mydata-data_begin +
 ! clustnum * mydata-clust_size;
 ! else
 ! startsect = mydata-rootdir_sect;
 !
 ! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
 !
 ! if (disk_write(startsect, size / mydata-sect_size, buffer)  0)
{
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 !
 ! if (size % mydata-sect_size) {
 ! __u8 tmpbuf[mydata-sect_size];
 !
 ! idx = size / mydata-sect_size;
 ! buffer += idx * mydata-sect_size;
 ! memcpy(tmpbuf, buffer, size % mydata-sect_size);
 !
 ! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 !
 ! return 0;
 ! }
 !
   return 0;
   }
  
 --- 562,595 
   {
   int idx = 0;
   __u32 startsect;
 ! if(size) //if there are data to be set
 ! {
 ! if (clustnum  0)
 ! startsect = mydata-data_begin +
 ! clustnum * mydata-clust_size;
 ! else
 ! startsect = mydata-rootdir_sect;
 !
 ! debug(clustnum: %d, startsect: %d\n, clustnum, startsect);
 !
 ! if (disk_write(startsect, size / mydata-sect_size, buffer)
 0) {
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 !
 ! if (size % mydata-sect_size) {
 ! __u8 tmpbuf[mydata-sect_size];
 !
 ! idx = size / mydata-sect_size;
 ! buffer += idx * mydata-sect_size;
 ! memcpy(tmpbuf, buffer, size % mydata-sect_size);
 !
 ! if (disk_write(startsect + idx, 1, tmpbuf)  0) {
 ! debug(Error writing data\n);
 ! return -1;
 ! }
 ! }
 ! }//end if data to be set
   return 0;
   }
  
 diff -cr ./u-boot-original/u-boot/include/configs/am335x_evm.h
./u-boot-test/u-boot/include/configs/am335x_evm.h
 *** ./u-boot-original/u-boot/include/configs/am335x_evm.h
2013-02-07 14:47:35.754702325 +1100
 --- ./u-boot-test/u-boot/include/configs/am335x_evm.h2013-03-01
12:25:23.942104474 +1100
 ***
 *** 143,148 
 --- 143,149 
   #define CONFIG_CMD_MMC
   #define CONFIG_DOS_PARTITION
   #define CONFIG_FS_FAT
 + #define CONFIG_FAT_WRITE
   #define CONFIG_FS_EXT4
   #define CONFIG_CMD_FAT
   #define CONFIG_CMD_EXT2

Benoit, what do you think?  Thanks!

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


Re: [U-Boot] [PATCH v4 1/4] ARM: fix CONFIG_SPL_MAX_SIZE semantics

2013-04-12 Thread Tom Rini
On Fri, Apr 12, 2013 at 05:14:30PM +0200, Albert ARIBAUD wrote:

 + CONFIG_SPL_MAX_FOOTPRINT
 + Maximum size in memory allocated to the SPL, BSS included.
 + When defined, the linker checks that the actual memory
 + used by SPL from _start to __bss_end does not exceed it.
 + CONFIG_MAX_FOOTPRINT and CONFIG_MAX_BSS_SIZE should not

must not, not should not.  And CONFIG_SPL_... for both.  You can just
fix that up when commiting, assuming no other comments require change :)

-- 
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] fatwrite problem

2013-04-12 Thread Tom Rini
On Fri, Apr 12, 2013 at 05:23:35PM +0200, Ruud Commandeur wrote:

 Hi Tom,
 
 Sorry if I mislead you, but my code change is quite the same as was
 posted by Damien. I would be more than happy to send what you ask for,
 but I don't think this will add much. And I will have to study a bit
 then how to do this

Right, but since you had an idea on fixing the problem, and can also
follow the regular patch submission process (with a signed-off-by line),
I can more easily accept that for mainline instead of a privately passed
along patch without one.  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 v3 2/3] Add TI816X support

2013-04-12 Thread Andrew Dyer
On Fri, Apr 12, 2013 at 7:10 AM, TENART Antoine aten...@adeneo-embedded.com
 wrote:

 Signed-off-by: Antoine Tenart aten...@adeneo-embedded.com
 ---
  arch/arm/include/asm/arch-am33xx/clock.h   |4 +
  arch/arm/include/asm/arch-am33xx/clocks_ti816x.h   |  136 
  arch/arm/include/asm/arch-am33xx/cpu.h |4 +
  arch/arm/include/asm/arch-am33xx/cpu_ti816x.h  |  194 +++
  arch/arm/include/asm/arch-am33xx/ddr_defs.h|4 +
  arch/arm/include/asm/arch-am33xx/ddr_defs_ti816x.h |  248 +
  arch/arm/include/asm/arch-am33xx/hardware.h|7 +-
  arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |5 +
  arch/arm/include/asm/arch-am33xx/hardware_ti814x.h |5 +
  arch/arm/include/asm/arch-am33xx/hardware_ti816x.h |   56 +++
  arch/arm/include/asm/arch-am33xx/mmc_host_def.h|2 +
  arch/arm/include/asm/arch-am33xx/mux.h |2 +
  arch/arm/include/asm/arch-am33xx/mux_ti816x.h  |  363
 
  13 files changed, 1025 insertions(+), 5 deletions(-)
  create mode 100644 arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
  create mode 100644 arch/arm/include/asm/arch-am33xx/cpu_ti816x.h
  create mode 100644 arch/arm/include/asm/arch-am33xx/ddr_defs_ti816x.h
  create mode 100644 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h
  create mode 100644 arch/arm/include/asm/arch-am33xx/mux_ti816x.h

 diff --git a/arch/arm/include/asm/arch-am33xx/clock.h
 b/arch/arm/include/asm/arch-am33xx/clock.h
 index ecb5901..123cc61 100644
 --- a/arch/arm/include/asm/arch-am33xx/clock.h
 +++ b/arch/arm/include/asm/arch-am33xx/clock.h
 @@ -19,6 +19,10 @@
  #ifndef _CLOCKS_H_
  #define _CLOCKS_H_

 +#if defined(CONFIG_TI816X)
 +#include asm/arch/clocks_ti816x.h
 +#else
  #include asm/arch/clocks_am33xx.h
 +#endif

  #endif
 diff --git a/arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
 b/arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
 new file mode 100644
 index 000..403db33
 --- /dev/null
 +++ b/arch/arm/include/asm/arch-am33xx/clocks_ti816x.h
 @@ -0,0 +1,136 @@
 +/*
 + * clocks_ti816x.h
 + *
 + * Copyright (C) 2013, Adeneo Embedded www.adeneo-embedded.com
 + * Antoine Tenart, aten...@adeneo-embedded.com
 + *
 + * Based on TI-PSP-04.00.02.14 :
 + *
 + * (C) Copyright 2006-2008
 + * Texas Instruments, www.ti.com
 + * Richard Woodruff r-woodru...@ti.com
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation; either version 2 of
 + * the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR /PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 + * MA 02111-1307 USA
 + */
 +#ifndef _CLOCKS_TI816X_H_
 +#define _CLOCKS_TI816X_H_
 +
 +/*
 + * Values supported 400,531,675,796
 + *
 + * On TI8168 rev C, use 400 or 531 MHz !


Why?  Is it specific to the EVM or is it general for all rev. C parts.  A
pointer to an errata would be good


 + */
 +#define DDR_PLL_400


DDR PLL setup is related to the type of memory used on a particular board.
Seems like it should be set in the board config


 +
 +/* Main PLL */
 +#define MAIN_N 64
 +#define MAIN_P 0x1
 +#define MAIN_INTFREQ1  0x8
 +#define MAIN_FRACFREQ1 0x80
 +#define MAIN_MDIV1 0x2
 +#define MAIN_INTFREQ2  0xE
 +#define MAIN_FRACFREQ2 0x0
 +#define MAIN_MDIV2 0x1
 +#define MAIN_INTFREQ3  0x8
 +#define MAIN_FRACFREQ3 0xB0
 +#define MAIN_MDIV3 0x3
 +#define MAIN_INTFREQ4  0x9
 +#define MAIN_FRACFREQ4 0x4F
 +#define MAIN_MDIV4 0x3
 +#define MAIN_INTFREQ5  0x9
 +#define MAIN_FRACFREQ5 0x374BC6
 +#define MAIN_MDIV5 0xC
 +#define MAIN_MDIV6 0x48
 +#define MAIN_MDIV7 0x4
 +
 +/* DDR PLL */
 +/* For 400 MHz */
 +#if defined(DDR_PLL_400)
 +#define DDR_N  59
 +#define DDR_P  0x1
 +#define DDR_MDIV1  0x4
 +#define DDR_INTFREQ2   0x8
 +#define DDR_FRACFREQ2  0xD9
 +#define DDR_MDIV2  0x1E
 +#define DDR_INTFREQ3   0x8
 +#define DDR_FRACFREQ3  0x0
 +#define DDR_MDIV3  0x4
 +#define DDR_INTFREQ4   0xE /* Expansion DDR clk */
 +#define DDR_FRACFREQ4  0x0
 +#define DDR_MDIV4  0x4
 +#define DDR_INTFREQ5   0xE /* Expansion DDR clk */
 +#define DDR_FRACFREQ5  0x0
 +#define DDR_MDIV5  0x4
 +#endif
 +
 +/* For 531 MHz */
 

Re: [U-Boot] [PATCH 3/5][v3] board/p1010rdb:Add NAND boot support using new SPL format

2013-04-12 Thread Scott Wood

On 04/11/2013 11:12:24 PM, Prabhakar Kushwaha wrote:

On 04/12/2013 01:13 AM, Scott Wood wrote:

On 04/11/2013 02:25:22 AM, Prabhakar Kushwaha wrote:

diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 437ee6e..a6ef276 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -33,6 +33,8 @@

 #ifdef CONFIG_P1010RDB
 #define CONFIG_P1010
+#define CONFIG_E500/* BOOKE e500 family */
+#include asm/config_mpc85xx.h
 #define CONFIG_NAND_FSL_IFC
 #endif


Why is this inside the P1010RDB ifdef?  Why do we even have a  
CONFIG_P1010RDB?  What other boards use this file


I am supposed to put config_mpc85xx.h after  CONFIG_P1010 define.


That doesn't have to mean *immediately* after. :-)


That's why put under CONFIG_P1010RDB.
CONFIG_P1010RDB is not being used for P1010 as no other board using  
this file. It can be removed.


Just to guess may be there were plan to add make target for  
P1014(Personality of P1010). but it never happened as it is taken  
care by reading svr.

I will update it.


OK.

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


Re: [U-Boot] [PATCH v3 3/3] Add TI816X evm board support

2013-04-12 Thread TENART Antoine
[snip]
 these seem more SOC specific than board specific.  Would likely be
 replicated per board, I'd suggest to move out of board specific file.

[snip]

 this function is generic to the SOC, move out of board specific file and
 call with appropriate values or defines

-plus the other ones-

Well there is a SOC specific way to initialize DDR, config_ddr(…).

That was a question I had before sending the first version : whether to 
send a working version early without using this or to send a version 
later. Seems that you prefer the second option :).


 +   /  setup the initial levelinihg ratios /


 typo

Right.


 +#ifdef CONFIG_TI816X_DDR3_SW_LEVELING
 +   ddr3_sw_levelling(0);
 +   ddr3_sw_levelling(1);


 call levelling code on both interfaces if only one EMIF is being used?
   make conditional on USE_EMIF1

I'll do that.

 
 +/**
 + * prcm_init() - inits clocks for PRCM as defined in clocks.h
 +
 
 */
 +void prcm_init(void)
 +{
 +   /* For future */
 +   u32 clk_index = 0, sil_index = 0;
 +
 +   writel(0x2, 0x48200010);


 define a register name please

I'll do that.

 +   /* Enable the control module */
 +   writel(0x2, CM_ALWON_CONTROL_CLKCTRL);
 +
 +   /* Fix ROM code bug */
 +   writel(0x0, 0x48180324);


 what bug?  define a register name

This is imported from implementation in the TI-PSP-04.00.02.14 vendor tree.
I'll find the register name.

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


Re: [U-Boot] How do I use AM335x eth1 rather than eth0 ?

2013-04-12 Thread Tom Rini
On Fri, Apr 12, 2013 at 11:56:57AM +0100, Mark Jackson wrote:

 We have a dual Ethernet board (based on the BeagelBone) but with both 
 Ethernet ports connected.
 
 I'm wanting to use eth1 (rather than eth0), so in my board.c file, I changed:-
 
 static struct cpsw_slave_data cpsw_slaves[] = {
   {
   .slave_reg_ofs  = 0x208,
   .sliver_reg_ofs = 0xd80,
   .phy_id = 0,
   },
   {
   .slave_reg_ofs  = 0x308,
   .sliver_reg_ofs = 0xdc0,
   .phy_id = 1,
   },
 };
 
 ... to ...
 
 static struct cpsw_slave_data cpsw_slaves[] = {
   {
   .slave_reg_ofs  = 0x308,
   .sliver_reg_ofs = 0xdc0,
   .phy_id = 1,
   },
   {
   .slave_reg_ofs  = 0x208,
   .sliver_reg_ofs = 0xd80,
   .phy_id = 0,
   },
 };
 
 ... assuming that eth0 would now be ignored (as only 1 slave is configured).
 
 But (eg) dhcp still only responds on eth0 !?!
 
 What else do I have to change ?

Good question, do you have both ports working in Linux yet?  The EVM-SK
design supports two interfaces and I know the cpsw driver in the kernel
required some changes to support two.  I strongly suspect similar
changes would be required in the U-Boot driver (I don't have any
specific links other than look at the vendor kernel tree).

-- 
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 v3 2/3] Add TI816X support

2013-04-12 Thread TENART Antoine
 +/*
 + * Values supported 400,531,675,796
 + *
 + * On TI8168 rev C, use 400 or 531 MHz !


 Why?  Is it specific to the EVM or is it general for all rev. C parts.
   A pointer to an errata would be good

I don't know if there is an errata, but I couldn't get U-Boot working
with DDR_PLL_675 or DDR_PLL_796 on my rev C. This is only base on my
experience.

 + */
 +#define DDR_PLL_400


 DDR PLL setup is related to the type of memory used on a particular
 board. Seems like it should be set in the board config

I think so too.

 --- /dev/null
 +++ b/arch/arm/include/asm/arch-am33xx/ddr_defs_ti816x.h
[snip]

 Almost everything in this file should be defined on a per board basis,
 not in a generic header file.  Also should combine defines with the PLL
 setup above so there is no possibility of mismatch between the two

Right, it would make sense to move it to board/ti/ti816x.

 +#define PULLDOWN_EN (0x0  4) /* Pull Down Selection */
 +#define PULLUP_EN   (0x1  4) /* Pull Up Selection */
 +#define PULLUDEN(0x0  3) /* Pull up enabled */
 +#define PULLUDDIS   (0x1  3) /* Pull up disabled */
 +#define MODE(val)  val /* used for Readability */


 shouldn't this have parenthesis to protect the parameter like so
 #define MODE(val) (val)

Indeed.

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


Re: [U-Boot] [PATCH v4 1/4] ARM: fix CONFIG_SPL_MAX_SIZE semantics

2013-04-12 Thread Albert ARIBAUD
Hi Tom,

On Fri, 12 Apr 2013 11:30:32 -0400, Tom Rini tr...@ti.com wrote:

 On Fri, Apr 12, 2013 at 05:14:30PM +0200, Albert ARIBAUD wrote:
 
  +   CONFIG_SPL_MAX_FOOTPRINT
  +   Maximum size in memory allocated to the SPL, BSS included.
  +   When defined, the linker checks that the actual memory
  +   used by SPL from _start to __bss_end does not exceed it.
  +   CONFIG_MAX_FOOTPRINT and CONFIG_MAX_BSS_SIZE should not
 
 must not, not should not.  And CONFIG_SPL_... for both.  You can just
 fix that up when commiting, assuming no other comments require change :)

Will do; I'll just wait for 24 hours, to make sure no other change is
requested.

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


Re: [U-Boot] [PATCH v2 6/7] mtd: nand: add driver for diskonchip g4 nand flash

2013-04-12 Thread Scott Wood

On 04/11/2013 02:19:37 PM, Marek Vasut wrote:

Dear Mike Dunn,

 This patch adds a driver for the diskonchip G4 nand flash device.   
It is

 based on the driver from the linux kernel.

 This also includes a separate SPL driver.  A separate SPL driver is  
used

 because the device operates in a different mode (reliable mode) when
 loading a boot image, and also because the storage format of the  
boot
 image is different from normal data (pages are stored  
redundantly).  The
 SPL driver basically mimics how a typical IPL reads data from the  
device.
 The special operating mode and storage format are used to  
compensate for
 the fact that the IPL does not contain the BCH ecc decoding  
algorithm (due

 to size constraints).  Although the u-boot SPL *could* use ecc, it
 operates like an IPL for the sake of simplicity and uniformity,  
since the
 IPL and SPL share the task of loading the u-boot image. As a side  
benefit,

 the SPL driver is very small.

 [port from linux kernel 3.4 commit
 570469f3bde7f71cc1ece07a18d54a05b6a8775d]

Scott, this really is your turf.


I already acked it (it's up to Mike what he wants to do with dbg).   
Feel free to pick it up as part of the larger patchset -- it's a  
dependency for patch 7/7 that adds the board support.


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


Re: [U-Boot] [PATCH V2] ARM: Fix __bss_start and __bss_end in linker scripts

2013-04-12 Thread Albert ARIBAUD
Hi Albert,

On Thu, 11 Apr 2013 17:43:21 +0200, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 Commit 3ebd1cbc introduced compiler-generated __bss_start
 and __bss_end__ and commit c23561e7 rewrote all __bss_end__
 as __bss_end. Their merge caused silent and harmless but
 potentially bug-inducing clashes between compiler- and linker-
 enerated __bss_end symbols.
 
 Make __bss_end and __bss_start compiler-only, and create
 __bss_base and __bss_limit for linker-only use.
 
 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
 Reported-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
 ---
 Changes in v2:
 - remove HIDDEN(), not supported by binutils  2.23

Any comments on this one? If not, I'll apply it to u-boot-arm/master
within a few hours.

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


Re: [U-Boot] Please pull u-boot-cfi-flash/master

2013-04-12 Thread Stefan Roese
On 12.04.2013 16:37, Tom Rini wrote:
 Hereby I ask to revert the mtd: cfi_flash: Fix CFI flash driver for
 8-bit bus support patch,. i. e. Commit 239cb9d.

 It breaks the CFI driver on a board here.  The board has two banks of
 AMD NOR flash, mapped at F800. and FC00., resp.  With current
 code, the flash is not detected.  Here is the debug log:

 Yes, please we should revert this patch for this release.

 Tom, will you do the revert yourself? Or should I send I PR for this?
 
 A simple git revert -s 239cb9d shows a conflict to resolve so please
 revert and test this and then send a PR, thanks!

Okay, will do...

Thanks,
Stefan


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


[U-Boot] Please pull u-boot-cfi-flash/master

2013-04-12 Thread Stefan Roese
Hi Tom!

Here the pull request with the revert of the patch that causes
problems with some non-8bit flash chips. I also reverted another
small (compilation warning) patch. Otherwise the 8-bit support
patch could not be reverted (as you noticed). So please pull
for this release:

The following changes since commit 785881f775252940185e10fbb2d5299c9ffa6bce:

  env: Add redundant env support to UBI env (2013-04-11 15:52:55 -0400)

are available in the git repository at:

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

for you to fetch changes up to e303be2d2819699a443b5eece5a04ecc380a9b61:

  Revert mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support 
(2013-04-12 19:04:54 +0200)


Stefan Roese (2):
  Revert cfi_flash: Use uintptr_t for casts from u32 to void *
  Revert mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support

 drivers/mtd/cfi_flash.c | 78 +++--
 include/mtd/cfi_flash.h | 41 +-
 2 files changed, 43 insertions(+), 76 deletions(-)


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


Re: [U-Boot] [PATCH v2 7/7] add support for palm treo 680 board

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 On 04/11/2013 12:20 PM, Marek Vasut wrote:
  Dear Mike Dunn,
  
  A quick overview of u-boot implementation on the treo 680...
  
  The treo 680 has a Diskonchip G4 nand flash chip.  This device has a 2k
  region that maps to the system bus at the reset vector in a NOR-like
  fashion so that it can be used as the boot device.  The phone is shipped
  with this 2k region configured as write-protected (can't be modified)
  and programmed with an initial program loader (IPL).  At power-up, this
  IPL loads the contents of two flash blocks to SDRAM and jumps to it. 
  The capacity of the two blocks is not large enough to hold all of
  u-boot, so a u-boot SPL is used.  To conserve flash space, these two
  blocks and the necessary number of subsequent blocks are programmed
  with a concatenated spl + u-boot image.  That way, the IPL will also
  load a portion of u-boot proper, and when the spl runs, it relocates
  the portion of u-boot that the IPL has already loaded, and then resumes
  loading the remaining part of u-boot before jumping to it.
  
  The default_environment is used (CONFIG_ENV_IS_NOWHERE) because I didn't
  think that having a writable environment was worth the cost of a flash
  block, although adding it would be straightforward.  I abuse the
  CONFIG_EXTRA_ENV_SETTINGS option to specify the usbtty for the console
  (CONFIG_SYS_CONSOLE_IS_IN_ENV).
  
  Support for the LCD is included, but currently it is only useful for
  displaying the u-boot splash screen.  But if u-boot is built without the
  usbtty console, it does display the auto-boot progress nicely.
  
  Signed-off-by: Mike Dunn miked...@newsguy.com
  
  I think the tool shall really go as a separate patch. Besides, can the
  tool not be implemented as a part of u-boot's mkimage infrastructure?
 
 OK, I can make the flash_u-boot utility (which writes u-boot to the flash
 boot blocks) a separate patch.
 
 As for making it part of mkimage...  I didn't really consider that because
 based on my (limited) knowledge, I figured they are unrelated.  As I
 understand it, mkimage creates an OS image file that u-boot can parse and
 load.  flash_u-boot is a utility that performs the task of writing u-boot
 itself to flash.

It can create an bootloader image that can be written to flash using standard 
mtd utilities. Does this not cut it for you? Why do you need a separate 
flasher, 
because the G4 is special ?

 I figured that mine was a special case, since u-boot must be written in a
 special format (redundant pages) and in a special manner (alternate 4k
 regions skipped), with the flash device in a special mode, and so it can
 not be done in the normal manner; e.g., 'nandwrite' from mtd-utils, or its
 u-boot 'nand write' equivalent, even if you first ran the u-boot image
 through a separate utility that simply converted the format of the image.
 
 Hope that makes sense.  Any insight appreciated.  I'll take a look at
 what's in the tools directory.

I see ... so the G4 is such a horrible beast :( OK

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 v2 6/7] mtd: nand: add driver for diskonchip g4 nand flash

2013-04-12 Thread Marek Vasut
Dear Scott Wood,

[...]
 
 [snip]
 
  +#ifdef DEBUG_DOCG4
  +#define dbg(format, arg...) printf(DEBUG:  format, ##arg)
  +#else
  +#define dbg(format, arg...) do {} while (0)
  +#endif

There already is a debugging facility in include/common.h too. And it does the 
same thing too. MTDDEBUG might work as well.

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 v2 5/7] lib: import bitrev library from the linux kernel

2013-04-12 Thread Marek Vasut
Dear Mike Dunn,

 On 04/11/2013 12:19 PM, Marek Vasut wrote:
  Dear Mike Dunn,
  
  This patch adds the bitrev library from the linux kernel.  This is a
  simple algorithm that uses an 8 bit look-up table to reverse the bits
  in data types of 8, 16, or 32 bit widths.  The docg4 nand flash driver
  uses it.
  
  [port from linux kernel 2.6.20 commit
  a5cfc1ec58a07074dacb6aa8c79eff864c966d12]
  
  Why did you port it from such an ancient kernel? Newer version is not an
  option?
 
 Maybe I misunderstood and gave the wrong information (probably, now that I
 think about it).  I took it fom the latest kernel, but reported the commit
 that added it to the kernel.
 
 In this case, it's a simple algorithm and only a couple trivial changes
 were made since it was first added to the kernel, so the error is probably
 inconsequential, but I'll resubmit, reporting the HEAD of the kernel I
 took it from if you like.
 
 BTW, I did the same for the docg4 driver, but I did the u-boot port a while
 ago, so in that case it's correct, at least practically.  Since I did the
 port, the kernel docg4 driver had some enhancements (reliable mode) that

Knowing which tag in linux-stable you pulled it from is a good information too, 
yes.

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 v2 6/7] mtd: nand: add driver for diskonchip g4 nand flash

2013-04-12 Thread Scott Wood

On 04/12/2013 12:27:09 PM, Marek Vasut wrote:

Dear Scott Wood,

[...]

 [snip]

  +#ifdef DEBUG_DOCG4
  +#define dbg(format, arg...) printf(DEBUG:  format, ##arg)
  +#else
  +#define dbg(format, arg...) do {} while (0)
  +#endif

There already is a debugging facility in include/common.h too. And it  
does the

same thing too. MTDDEBUG might work as well.


I already pointed out MTDDEBUG, though debug() may be a better fit as  
it doesn't require adding debug levels, and since this driver's usage  
doesn't correspond to CONFIG_MTD_DEBUG in Linux (which appears to have  
been removed from Linux -- removal from U-Boot should likely follow).


Mike said he may just remove the debug messages entirely (maybe also  
from the Linux driver?), making it moot.


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


Re: [U-Boot] [PATCH v3 3/3] Add TI816X evm board support

2013-04-12 Thread Andrew Dyer
On Fri, Apr 12, 2013 at 7:10 AM, TENART Antoine aten...@adeneo-embedded.com
 wrote:

 Signed-off-by: Antoine Tenart aten...@adeneo-embedded.com
 ---
  MAINTAINERS|4 +
  arch/arm/include/asm/arch-am33xx/spl.h |9 +
  board/ti/ti816x/Makefile   |   48 ++
  board/ti/ti816x/evm.c  |  866
 
  boards.cfg |1 +
  include/configs/ti816x_evm.h   |  177 +++
  6 files changed, 1105 insertions(+)
  create mode 100644 board/ti/ti816x/Makefile
  create mode 100644 board/ti/ti816x/evm.c
  create mode 100644 include/configs/ti816x_evm.h

 diff --git a/MAINTAINERS b/MAINTAINERS
 index 6b2202c..3aaac7f 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -922,6 +922,10 @@ Lucas Stach d...@lynxeye.de

 colibri_t20_irisTegra20 (ARM7  A9 Dual Core)

 +Antoine Tenart aten...@adeneo-embedded.com
 +
 +   TI816X  ARM ARMV7 (TI816x Soc)
 +
  Nick Thompson nick.thomp...@gefanuc.com

 da830evmARM926EJS (DA830/OMAP-L137)
 diff --git a/arch/arm/include/asm/arch-am33xx/spl.h
 b/arch/arm/include/asm/arch-am33xx/spl.h
 index 9b5fe9e..d0c1ec9 100644
 --- a/arch/arm/include/asm/arch-am33xx/spl.h
 +++ b/arch/arm/include/asm/arch-am33xx/spl.h
 @@ -23,6 +23,14 @@
  #ifndef_ASM_ARCH_SPL_H_
  #define_ASM_SPL_H_

 +#if defined(CONFIG_TI816X)
 +#define BOOT_DEVICE_XIP2
 +#define BOOT_DEVICE_NAND   3
 +#define BOOT_DEVICE_MMC1   6
 +#define BOOT_DEVICE_MMC2   5
 +#define BOOT_DEVICE_UART   0x43
 +#define BOOT_DEVICE_MMC2_2 0xFF
 +#else
  #define BOOT_DEVICE_XIP2
  #define BOOT_DEVICE_NAND   5
  #ifdef CONFIG_AM33XX
 @@ -37,3 +45,4 @@
  #define BOOT_DEVICE_CPGMAC 70
  #define BOOT_DEVICE_MMC2_2  0xFF
  #endif
 +#endif
 diff --git a/board/ti/ti816x/Makefile b/board/ti/ti816x/Makefile
 new file mode 100644
 index 000..59128ee
 --- /dev/null
 +++ b/board/ti/ti816x/Makefile
 @@ -0,0 +1,48 @@
 +#
 +# Copyright (C) 2013, Adeneo Embedded www.adeneo-embedded.com
 +# Antoine Tenart, aten...@adeneo-embedded.com
 +#
 +# Based on TI-PSP-04.00.02.14 :
 +#
 +# Copyright (C) 2009, Texas Instruments, Incorporated
 +#
 +# See file CREDITS for list of people who contributed to this
 +# project.
 +#
 +# This program is free software; you can redistribute it and/or
 +# modify it under the terms of the GNU General Public License as
 +# published by the Free Software Foundation version 2.
 +#
 +# This program is distributed as is WITHOUT ANY WARRANTY of any
 +# kind, whether express or implied; without even the implied warranty
 +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +# GNU General Public License for more details.
 +#
 +
 +include $(TOPDIR)/config.mk
 +
 +LIB= $(obj)lib$(BOARD).o
 +
 +COBJS  := evm.o
 +
 +SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 +OBJS   := $(addprefix $(obj),$(COBJS))
 +
 +$(LIB):$(obj).depend $(OBJS)
 +   $(call cmd_link_o_target, $(OBJS))
 +
 +clean:
 +   rm -f $(OBJS)
 +
 +distclean: clean
 +   rm -f $(LIB) core *.bak $(obj).depend
 +
 +#
 +
 +# defines $(obj).depend target
 +include $(SRCTREE)/rules.mk
 +
 +sinclude $(obj).depend
 +
 +#
 +
 diff --git a/board/ti/ti816x/evm.c b/board/ti/ti816x/evm.c
 new file mode 100644
 index 000..bb9d604
 --- /dev/null
 +++ b/board/ti/ti816x/evm.c
 @@ -0,0 +1,866 @@
 +/*
 + * evm.c
 + *
 + * Copyright (C) 2013, Adeneo Embedded www.adeneo-embedded.com
 + * Antoine Tenart, aten...@adeneo-embedded.com
 + *
 + * Based on TI-PSP-04.00.02.14 :
 + *
 + * Copyright (C) 2009, Texas Instruments, Incorporated
 + *
 + * See file CREDITS for list of people who contributed to this
 + * project.
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License as
 + * published by the Free Software Foundation version 2.
 + *
 + * This program is distributed as is WITHOUT ANY WARRANTY of any
 + * kind, whether express or implied; without even the implied warranty
 + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +
 +#include common.h
 +#include spl.h
 +#include asm/cache.h
 +#include asm/io.h
 +#include asm/arch/clock.h
 +#include asm/arch/cpu.h
 +#include asm/arch/ddr_defs.h
 +#include asm/arch/hardware.h
 +#include asm/arch/sys_proto.h
 +#include asm/arch/mmc_host_def.h
 +#include asm/arch/mem.h
 +#include asm/arch/mux.h
 +
 +DECLARE_GLOBAL_DATA_PTR;
 +
 +#ifdef CONFIG_TI816X_DDR3_SW_LEVELING
 +static void ddr3_sw_levelling(int emif);
 +#endif
 +
 +int board_init(void)
 +{
 +   gd-bd-bi_boot_params = PHYS_DRAM_1 + 0x100;
 +   return 0;
 +}
 +
 +#if defined(CONFIG_SPL_BUILD)
 +
 +static struct module_pin_mux mmc_pin_mux[] = 

Re: [U-Boot] Please pull u-boot-cfi-flash/master

2013-04-12 Thread Tom Rini
On Fri, Apr 12, 2013 at 07:13:28PM +0200, Stefan Roese wrote:
 Hi Tom!
 
 Here the pull request with the revert of the patch that causes
 problems with some non-8bit flash chips. I also reverted another
 small (compilation warning) patch. Otherwise the 8-bit support
 patch could not be reverted (as you noticed). So please pull
 for this release:
 
 The following changes since commit 785881f775252940185e10fbb2d5299c9ffa6bce:
 
   env: Add redundant env support to UBI env (2013-04-11 15:52:55 -0400)
 
 are available in the git repository at:
 
   git://www.denx.de/git/u-boot-cfi-flash.git master
 
 for you to fetch changes up to e303be2d2819699a443b5eece5a04ecc380a9b61:
 
   Revert mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support 
 (2013-04-12 19:04:54 +0200)
 
 
 Stefan Roese (2):
   Revert cfi_flash: Use uintptr_t for casts from u32 to void *
   Revert mtd: cfi_flash: Fix CFI flash driver for 8-bit bus support
 
  drivers/mtd/cfi_flash.c | 78 
 +++--
  include/mtd/cfi_flash.h | 41 +-
  2 files changed, 43 insertions(+), 76 deletions(-)

Applied to u-boot/master, 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] [PULL] u-boot-usb/master

2013-04-12 Thread Tom Rini
On Wed, Apr 10, 2013 at 07:05:02PM +0200, Marek Vasut wrote:

 The following changes since commit 645b271a6039e79b368f027a5624dc0820441733:
 
   patman: Add Series-process-log tag to sort/uniq change logs (2013-04-08 
 15:21:22 -0700)
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-usb.git master
 
 for you to fetch changes up to dda48e8efff878e51e986befd9c6c3780b4757a7:
 
   powerpc/usb: Fix usb device-tree fix-up (2013-04-10 15:22:25 +0200)
 
 
 Pantelis Antoniou (4):
   dfu: Support larger than memory transfers.
   dfu: NAND specific routines for DFU operation
   am335x_evm: Define CONFIG_SYS_CACHELINE_SIZE
   am335x_evm: Enable DFU for NAND and MMC, provide example alt_infos
 
 Tom Rini (5):
   README: Document current DFU CONFIG options
   dfu: Change indentation of defines in dfu.h
   nand: Extend nand_(read|write)_skip_bad with *actual and limit 
 parameters
   cmd_nand.c: Fix CONFIG_CMD_NAND_YAFFS
   am335x_evm: Add CONFIG_CMD_MTDPARTS and relevant defaults
 
 ramneek mehresh (1):
   powerpc/usb: Fix usb device-tree fix-up
 
  README |   23 +
  arch/powerpc/cpu/mpc8xxx/fdt.c |5 ++
  board/cm_t35/cm_t35.c  |2 +
  common/cmd_nand.c  |   55 +++-
  common/env_nand.c  |3 +-
  drivers/dfu/Makefile   |1 +
  drivers/dfu/dfu.c  |  249 
 ++---
  drivers/dfu/dfu_mmc.c  |  108 ++-
  drivers/dfu/dfu_nand.c |  187 
 +++
  drivers/mtd/nand/nand_util.c   |   68 ++---
  include/configs/am335x_evm.h   |   52 ++-
  include/dfu.h  |   53 +--
  include/nand.h |4 +-
  13 files changed, 681 insertions(+), 129 deletions(-)
  create mode 100644 drivers/dfu/dfu_nand.c

For the record, applied to u-boot/master, 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] [PATCH] am335x: Really correct DDR timings on new BeagleBone part

2013-04-12 Thread Tom Rini
The previous timings were done on the internal-only A1 board which has
different DDR part than all later revs.  The timings need a slight
adjustment to be correct in all cases with later revs.

Signed-off-by: Tom Rini tr...@ti.com
---
 arch/arm/include/asm/arch-am33xx/ddr_defs.h |   14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/include/asm/arch-am33xx/ddr_defs.h 
b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
index 914df01..fb4e78e 100644
--- a/arch/arm/include/asm/arch-am33xx/ddr_defs.h
+++ b/arch/arm/include/asm/arch-am33xx/ddr_defs.h
@@ -86,18 +86,18 @@
 /* Micron MT41K256M16HA-125E */
 #define MT41K256M16HA125E_EMIF_READ_LATENCY0x17
 #define MT41K256M16HA125E_EMIF_TIM10x0AAAD4DB
-#define MT41K256M16HA125E_EMIF_TIM20x26437FDA
-#define MT41K256M16HA125E_EMIF_TIM30x501F83FF
-#define MT41K256M16HA125E_EMIF_SDCFG   0x61C052B2
+#define MT41K256M16HA125E_EMIF_TIM20x266B7FDA
+#define MT41K256M16HA125E_EMIF_TIM30x501F867F
+#define MT41K256M16HA125E_EMIF_SDCFG   0x61C05332
 #define MT41K256M16HA125E_EMIF_SDREF   0xC30
 #define MT41K256M16HA125E_ZQ_CFG   0x50074BE4
 #define MT41K256M16HA125E_DLL_LOCK_DIFF0x1
 #define MT41K256M16HA125E_RATIO0x80
 #define MT41K256M16HA125E_INVERT_CLKOUT0x0
-#define MT41K256M16HA125E_RD_DQS   0x3A
-#define MT41K256M16HA125E_WR_DQS   0x42
-#define MT41K256M16HA125E_PHY_WR_DATA  0x7E
-#define MT41K256M16HA125E_PHY_FIFO_WE  0x9B
+#define MT41K256M16HA125E_RD_DQS   0x38
+#define MT41K256M16HA125E_WR_DQS   0x44
+#define MT41K256M16HA125E_PHY_WR_DATA  0x7D
+#define MT41K256M16HA125E_PHY_FIFO_WE  0x94
 #define MT41K256M16HA125E_IOCTRL_VALUE 0x18B
 
 /* Micron MT41J512M8RH-125 on EVM v1.5 */
-- 
1.7.9.5

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


[U-Boot] [PATCH v3 1/8] pxa_lcd: add the ACX544AKN lcd device

2013-04-12 Thread Mike Dunn
This adds the definitions required to support the LCD device on the Palm Treo
680.

Signed-off-by: Mike Dunn miked...@newsguy.com
---
Changelog:
v3: no change
v2: no change

 drivers/video/pxa_lcd.c |   32 
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/drivers/video/pxa_lcd.c b/drivers/video/pxa_lcd.c
index b40ec36..d5fbe7b 100644
--- a/drivers/video/pxa_lcd.c
+++ b/drivers/video/pxa_lcd.c
@@ -248,6 +248,38 @@ vidinfo_t panel_info = {
 };
 #endif /* CONFIG_ACX517AKN */
 
+#ifdef CONFIG_ACX544AKN
+
+# define LCD_BPP   LCD_COLOR16
+
+/* you have to set lccr0 and lccr3 (including pcd) */
+# define REG_LCCR0 0x003008f9
+# define REG_LCCR3 0x0477 /* 16bpp */
+
+vidinfo_t panel_info = {
+   .vl_col = 320,
+   .vl_row = 320,
+   .vl_width   = 320,
+   .vl_height  = 320,
+   .vl_clkp= CONFIG_SYS_LOW,
+   .vl_oep = CONFIG_SYS_LOW,
+   .vl_hsp = CONFIG_SYS_LOW,
+   .vl_vsp = CONFIG_SYS_LOW,
+   .vl_dp  = CONFIG_SYS_LOW,
+   .vl_bpix= LCD_BPP,
+   .vl_lbw = 0,
+   .vl_splt= 0,
+   .vl_clor= 1,
+   .vl_tft = 1,
+   .vl_hpw = 0x05,
+   .vl_blw = 0x13,
+   .vl_elw = 0x08,
+   .vl_vpw = 0x02,
+   .vl_bfw = 0x07,
+   .vl_efw = 0x05,
+};
+#endif /* CONFIG_ACX544AKN */
+
 /*--*/
 
 #ifdef CONFIG_LQ038J7DH53
-- 
1.7.8.6

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


[U-Boot] [PATCH v3 0/8] palm treo 680 smartphone board support

2013-04-12 Thread Mike Dunn
This patchset adds support for the Palm Treo 680 smartphone.  I had to make some
minor tweaks to u-boot to get things working.  Most of these changes are small,
and most only touch the pxa arch.

Thanks for looking.

Changelog:
v3:
  - changed commit message for patch that adds bitrev library to specify the
HEAD commit of the linux kernel that the library was taken from, not only
the commit that added it to the kernel
  - in docg4 driver patch, replaced dbg macro with MTDDEBUG
  - put flash_u-boot utility in a separate patch

v2:
  - tabs removed in #defines in palmtreo680.h
  - use '__weak' macro in pxa_lcd
  - remove externs from function prototypes in bitrev.h
  - remove commented-out code from docg4.c
  - the CONFIG_SYS_LCD_PXA_NO_L_BIAS patch was removed; the same result
is accomplished by re-configuring the L_BIAS gpio in the board-specific
lcd_enable(), which runs after the driver initialization
  - userland utility for programming u-boot to flash moved to tools/palmtreo680
  - commit message for patches that add bitrev library and docg4 driver contain
the commit and linux version for when the code was added to linux

Mike Dunn (8):
  pxa_lcd: add the ACX544AKN lcd device
  pxa_lcd: make lcd_enable() a weak pointer
  pxa27x_udc: remove call to unimplemented set_GPIO_mode()
  arm: bootm: call udc_disable() before booting linux
  lib: import bitrev library from the linux kernel
  mtd: nand: add driver for diskonchip g4 nand flash
  add support for palm treo 680 board
  palmtreo680: add utility that writes u-boot to flash

 CREDITS  |4 +
 MAINTAINERS  |3 +
 arch/arm/include/asm/arch-pxa/hardware.h |   11 -
 arch/arm/include/asm/bootm.h |1 +
 arch/arm/lib/bootm.c |1 +
 board/palmtreo680/Makefile   |   34 +
 board/palmtreo680/palmtreo680.c  |  179 ++
 board/palmtreo680/palmtreo680_spl.lds|   51 ++
 boards.cfg   |1 +
 doc/README.palmtreo680   |  570 +
 drivers/mtd/nand/Makefile|2 +
 drivers/mtd/nand/docg4.c | 1028 ++
 drivers/mtd/nand/docg4_spl.c |  222 +++
 drivers/usb/gadget/pxa27x_udc.c  |4 +-
 drivers/video/pxa_lcd.c  |   34 +-
 include/configs/palmtreo680.h|  295 +
 include/linux/bitrev.h   |   23 +
 include/linux/mtd/docg4.h|  134 
 lib/Makefile |1 +
 lib/bitrev.c |   59 ++
 tools/palmtreo680/flash_u-boot.c |  167 +
 21 files changed, 2811 insertions(+), 13 deletions(-)
 create mode 100644 board/palmtreo680/Makefile
 create mode 100644 board/palmtreo680/palmtreo680.c
 create mode 100644 board/palmtreo680/palmtreo680_spl.lds
 create mode 100644 doc/README.palmtreo680
 create mode 100644 drivers/mtd/nand/docg4.c
 create mode 100644 drivers/mtd/nand/docg4_spl.c
 create mode 100644 include/configs/palmtreo680.h
 create mode 100644 include/linux/bitrev.h
 create mode 100644 include/linux/mtd/docg4.h
 create mode 100644 lib/bitrev.c
 create mode 100644 tools/palmtreo680/flash_u-boot.c

-- 
1.7.8.6

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


  1   2   >