Re: [U-Boot] [PATCH 00/11] ks8695 (cm4008, cm41xx) bugfixes, constant removals, configuration generalized (repost)

2012-11-10 Thread Albert ARIBAUD
Hi Yann,

On Fri,  5 Oct 2012 14:09:47 +0200, Yann Vernier
 wrote:

> On Thu, 4 Oct 2012 11:15:06 +0200
> Albert ARIBAUD  wrote:
> > Sorry it took me so long to crawl my backlog... This series was posted
> > with long lines folded apparently, which makes it impossible to process
> > and explains why patchwork did not have all of it. Can you please
> > repost it, this time using 'git send-email'?
> 
> Terribly sorry. This should fix that problem.
> In the meantime, work on our board progresses nicely, and we plan to
> submit it after registering a machine ID. We have u-boot support for
> PCI, FPGA configuration, and I2C for power control working, the
> latter two via GPIO.

There were several comments on this series, but I haven't seen any
V2 for it. Did I miss it?

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


Re: [U-Boot] [PULL] : Please pull u-boot-imx

2012-11-10 Thread Albert ARIBAUD
Hi Stefano,

On Sat, 10 Nov 2012 08:55:03 +0100, Stefano Babic 
wrote:

> Hi Albert,
> 
> please pull from u-boot-imx, thanks.
> 
> The following changes since commit 59852d03867108217fe88e3bfc3e1e9cedfe63c5:
> 
>   Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
> (2012-11-09 08:47:25 -0700)
> 
> are available in the git repository at:
> 
> 
>   git://www.denx.de/git/u-boot-imx.git master
> 
> for you to fetch changes up to 34275d70fec6cc369a931090ebb686bc213bb80d:
> 
>   arch-mx6: add mx6dl_pins.h (2012-11-10 08:15:40 +0100)
> 
> 
> Fabio Estevam (11):
>   mx25pdk: Include CONFIG_MX25
>   mx25pdk: Add esdhc support
>   pmic_fsl: Introduce FSL_PMIC_I2C_LENGTH
>   mx25: Place common functions into sys_proto.h
>   pmic: Add support for mc34704
>   mx25pdk: Add Ethernet support
>   mx53loco: Allow booting a zImage kernel
>   mx25pdk: Allow booting a zImage kernel
>   mx51evk: Allow booting a zImage kernel
>   mx35pdk: Allow booting a zImage kernel
>   mx6qsabre_common: Allow booting a zImage kernel
> 
> Stefano Babic (8):
>   ARM: Fix start.S when used with SPL in arm1136
>   MX35: add LOW_LEVEL_SRAM_STACK to use SPL_FRAMEWORK
>   MX35: Add soc_boot_mode and soc_boot_device to MX35
>   SPL: Added SPL target for mx35 SOC to SPL Makefile
>   ARM: Add SPL target to arm1136
>   MX35: add support for woodburn board
>   MX5: added CONFIG_PMIC_FSL_MC13892 to mx53evk
>   Merge git://git.denx.de/u-boot
> 
> Troy Kisky (4):
>   mx6: soc: update get_cpu_rev and get_imx_type for mx6solo/sololite
>   mx6: use CONFIG_MX6 instead of CONFIG_MX6Q
>   imx-common: cpu: add imx_ddr_size
>   arch-mx6: add mx6dl_pins.h
> 
>  MAINTAINERS   |1 +
>  Makefile  |1 +
>  arch/arm/cpu/arm1136/config.mk|3 +
>  arch/arm/cpu/arm1136/mx35/Makefile|1 +
>  arch/arm/cpu/arm1136/mx35/generic.c   |   75 ++
>  arch/arm/cpu/arm1136/mx35/mx35_sdram.c|  137 +++
>  arch/arm/cpu/arm1136/start.S  |   31 ++-
>  arch/arm/cpu/arm1136/u-boot-spl.lds   |   62 +
>  arch/arm/cpu/armv7/mx6/soc.c  |   32 ++-
>  arch/arm/imx-common/cpu.c |   66 +-
>  arch/arm/include/asm/arch-mx25/imx-regs.h |4 -
>  arch/arm/include/asm/arch-mx25/sys_proto.h|3 +
>  arch/arm/include/asm/arch-mx35/imx-regs.h |2 +
>  arch/arm/include/asm/arch-mx35/mmc_host_def.h |   31 +++
>  arch/arm/include/asm/arch-mx35/spl.h  |   38 +++
>  arch/arm/include/asm/arch-mx35/sys_proto.h|2 +
>  arch/arm/include/asm/arch-mx5/sys_proto.h |   10 +-
>  arch/arm/include/asm/arch-mx6/imx-regs.h  |2 +
>  arch/arm/include/asm/arch-mx6/mx6dl_pins.h|  149 
>  arch/arm/include/asm/arch-mx6/sys_proto.h |   10 +-
>  board/freescale/mx25pdk/mx25pdk.c |  114 +
>  board/freescale/mx31ads/u-boot.lds|2 +
>  board/syteco/zmx25/zmx25.c|1 +
>  board/woodburn/Makefile   |   43 
>  board/woodburn/imximage.cfg   |4 +
>  board/woodburn/lowlevel_init.S|   38 +++
>  board/woodburn/woodburn.c |  261 +
>  boards.cfg|2 +
>  drivers/gpio/mxc_gpio.c   |6 +-
>  drivers/misc/pmic_fsl.c   |8 +-
>  drivers/video/ipu_regs.h  |2 +-
>  include/configs/mx25pdk.h |   40 +++-
>  include/configs/mx35pdk.h |2 +
>  include/configs/mx51evk.h |2 +-
>  include/configs/mx53evk.h |1 +
>  include/configs/mx53loco.h|2 +
>  include/configs/mx6qarm2.h|1 +
>  include/configs/mx6qsabre_common.h|2 +
>  include/configs/mx6qsabrelite.h   |1 +
>  include/configs/woodburn.h|   34 +++
>  include/configs/woodburn_common.h |  313
> +
>  include/configs/woodburn_sd.h |   60 +
>  include/mc34704.h |   49 
>  nand_spl/board/freescale/mx31pdk/u-boot.lds   |2 +
>  spl/Makefile  |6 +
>  45 files changed, 1617 insertions(+), 39 deletions(-)
>  create mode 100644 arch/arm/cpu/arm1136/mx35/mx35_sdram.c
>  create mode 100644 arch/arm/cpu/arm1136/u-boot-spl.lds
>  create mode 100644 arch/arm/include/asm/arch-mx35/mmc_host_def.h
>  create mode 100644 arch/arm/include/asm/arch-mx35/spl.h
>  create mode 100644 arch/arm/include/asm/arch-mx6/mx6dl_pins.h
>  create mode 100644 board/woodburn/Makefile
>  create mode 100644 board/woodburn/imximage.cfg
>  cre

Re: [U-Boot] [PATCH 00/46] Enhance spear support

2012-11-10 Thread Albert ARIBAUD
Hi Stefan,

On Fri, 09 Nov 2012 12:56:42 +0100, Stefan Roese  wrote:

> On 11/09/2012 10:49 AM, Armando Visconti wrote:
> > Ciao Stefan, Vipin,
> > 
> >>>
> >>> Vipin, would you "volunteer" to eventually become this SPEAr U-Boot
> >>> custodian? Or someone else?
> >>>
> >>
> >> Yes, I volunteer to be the SPEAr U-Boot custodian..
> >>
> > 
> > I think that no one else could to this custodian job
> > better than Vipin...
> > 
> > Guaranteed!
> 
> I'm all for it. Lets see what Albert has to say here.
> 
> Albert, whats your opinion here? Would you also like to see an SPEAr
> custodian to offload your patch-queue a but? Or would you prefer to
> handle SPEAr related patches yourself in the future?

I heartily welcome specialized ARM repositories and custodians. :)

> Thanks,
> Stefan

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


Re: [U-Boot] [PATCH V2 1/2] mmc: add bcm2835 driver

2012-11-10 Thread Albert ARIBAUD
Hi Stephen,

>  arch/arm/include/asm/arch-bcm2835/sdhci.h |   24 
>  drivers/mmc/Makefile  |1 +
>  drivers/mmc/bcm2835_sdhci.c   |  177 
> +
>  3 files changed, 202 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-bcm2835/sdhci.h
>  create mode 100644 drivers/mmc/bcm2835_sdhci.c

Actually the patch is essentially an MMC driver one, with the ARM
file touched only to add a base address. I have reassigned the patch to
Andy.

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


Re: [U-Boot] [PATCH 2/2] socfpga/spl: Remove malloc.h

2012-11-10 Thread Albert ARIBAUD
Hi Vikram,

On Tue, 23 Oct 2012 15:52:53 +0530, Vikram Narayanan
 wrote:

> Remove unused header
> 
> Signed-off-by: Vikram Narayanan 
> ---
>  arch/arm/cpu/armv7/socfpga/spl.c |1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/socfpga/spl.c 
> b/arch/arm/cpu/armv7/socfpga/spl.c
> index 23053fd..84216eb 100644
> --- a/arch/arm/cpu/armv7/socfpga/spl.c
> +++ b/arch/arm/cpu/armv7/socfpga/spl.c
> @@ -21,7 +21,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  

Note: this was applied to u-boot-arm/master along with 1/2.

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


Re: [U-Boot] [PATCH] common/command.c: revert chanches from commit 199adb60

2012-11-10 Thread Albert ARIBAUD
Hi Anatolij,

On Thu, 8 Nov 2012 13:42:14 +0100, Anatolij Gustschin 
wrote:

> On Thu,  8 Nov 2012 12:52:13 +0100
> Anatolij Gustschin  wrote:
> 
> > commit 199adb601ff34bdbbd0667fac80dfe0a87bffc2b "common/misc: sparse
> > fixes" broke the help command trying to fix the sparse error
> > "command.c:44:38: error: bad constant expression".
> > 
> > As Henrik points out, the fix was bad because the commit used
> > CONFIG_SYS_MAXARGS whereas the code intended to use the maximum
> > number of commands (not arguments to a command).
> > 
> > Revert command.c changes to the original code as asked by Wolfgang.
> > 
> > Reported-by: Henrik Nordström 
> > Signed-off-by: Anatolij Gustschin 
> > ---
> >  common/command.c |9 +
> >  1 files changed, 1 insertions(+), 8 deletions(-)
> 
> Applied to u-boot-staging/ag...@denx.de-urgent.

Did you fix the typo in the commit summary/subject on the fly?

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


Re: [U-Boot] analyze/change assembly code

2012-11-10 Thread Albert ARIBAUD
Hi Gerlando,

On Tue, 30 Oct 2012 12:08:01 +0100, Gerlando Falauto
 wrote:

> Hi all,
> 
> we recently to had face some nasty issues, where for some reason two 
> (functionally identical) versions of some code behave very differently. 
> Namely, one version works and the other doesn't always work.
> It was clear from the beginning this was because of HW- (or compiler-) 
> related issues.
> I thought it would then be useful to have a peek at what the compiler is 
> doing behind the scenes, and possibly make some simple changes to the 
> code. For instance, inserting some nops here and there, or reordering 
> some instructions, may help in tracking down these different behaviors.
> 
> I know the easiest way to LOOK at the file is simply to use objdump to 
> disassemble an .o file. In the end I somehow managed to tamper with the 
> makefiles so to get what I wanted for a given file, by adding a fake new 
> ".s" target with the recipe to build it, and having the .o file depend 
> on a ".S" file (which would be a manual/changed copy of the generated 
> ".s" file) instead of the original ".c" file.
> This is however not linear and nice at all. So I was wondering whether 
> there already is a well-established way of having the make process 
> create (and keep) assembly files which can be then manually changed.
> 
> Does my question make any sense at all? Any ideas?

Add -save-temps to the gcc arguments? Watch out for parallel build
issues, though.

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


Re: [U-Boot] [PATCH v2] arm1136: Fix enable_caches()

2012-11-10 Thread Albert ARIBAUD
Hi Benoît,

On Wed, 31 Oct 2012 15:41:02 +0100 (CET), Benoît Thébaudeau
 wrote:

> Hi Albert,
> 
> On Friday, October 5, 2012 8:23:14 PM, Albert ARIBAUD wrote;
> > On Thu, 4 Oct 2012 22:04:02 +0200 (CEST), Benoît Thébaudeau
> >  wrote:
> > 
> > > enable_caches() did not enable icache if CONFIG_SYS_ICACHE_OFF was
> > > not defined
> > > but CONFIG_SYS_DCACHE_OFF was.
> > > 
> > > Signed-off-by: Benoît Thébaudeau 
> > > Cc: Albert Aribaud 
> > > ---
> > > This patch supersedes http://patchwork.ozlabs.org/patch/177263/ .
> > > 
> > > Changes for v2:
> > >  - Move enable_caches() outside of the main #if in order to fix
> > >  this icache
> > >issue rather than doing only #if cosmetic cleanup.
> > > 
> > >  .../arch/arm/cpu/arm1136/cpu.c |   22
> > >  +++-
> > >  1 file changed, 12 insertions(+), 10 deletions(-)
> > > 
> > > diff --git u-boot-arm-1dfc916.orig/arch/arm/cpu/arm1136/cpu.c
> > > u-boot-arm-1dfc916/arch/arm/cpu/arm1136/cpu.c
> > > index b98e3d9..32a4c24 100644
> > > --- u-boot-arm-1dfc916.orig/arch/arm/cpu/arm1136/cpu.c
> > > +++ u-boot-arm-1dfc916/arch/arm/cpu/arm1136/cpu.c
> > > @@ -141,16 +141,6 @@ void flush_cache(unsigned long start, unsigned
> > > long size)
> > >   flush_dcache_range(start, start + size);
> > >  }
> > >  
> > > -void enable_caches(void)
> > > -{
> > > -#ifndef CONFIG_SYS_ICACHE_OFF
> > > - icache_enable();
> > > -#endif
> > > -#ifndef CONFIG_SYS_DCACHE_OFF
> > > - dcache_enable();
> > > -#endif
> > > -}
> > > -
> > >  #else /* #ifndef CONFIG_SYS_DCACHE_OFF */
> > >  void invalidate_dcache_all(void)
> > >  {
> > > @@ -172,3 +162,15 @@ void flush_cache(unsigned long start, unsigned
> > > long size)
> > >  {
> > >  }
> > >  #endif /* #ifndef CONFIG_SYS_DCACHE_OFF */
> > > +
> > > +#if !defined(CONFIG_SYS_ICACHE_OFF) ||
> > > !defined(CONFIG_SYS_DCACHE_OFF)
> > > +void enable_caches(void)
> > > +{
> > > +#ifndef CONFIG_SYS_ICACHE_OFF
> > > + icache_enable();
> > > +#endif
> > > +#ifndef CONFIG_SYS_DCACHE_OFF
> > > + dcache_enable();
> > > +#endif
> > > +}
> > > +#endif
> > > 
> > 
> > Applied to u-boot-arm/next, thanks!
> 
> I know that's true (I had seen it applied), but it has vanished since then. 
> Now,
> I can't find it in u-boot-arm/next nor in u-boot-arm/master. This is perhaps
> related to the rebase that you had to do at some point.
> 
> Best regards,
> Benoît

RE-applied to u-boot-arm/master, thanks for pointing this out and
apologies for the temporary disappearance.

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


Re: [U-Boot] [PATCH] common/command.c: revert chanches from commit 199adb60

2012-11-10 Thread Anatolij Gustschin
Hi Albert,

On Sat, 10 Nov 2012 12:21:55 +0100
Albert ARIBAUD  wrote:
...
> > 
> > Applied to u-boot-staging/ag...@denx.de-urgent.
> 
> Did you fix the typo in the commit summary/subject on the fly?

yes, I noticed it when applying, it wasn't worth it to resubmit the patch.

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


[U-Boot] Pull request: u-boot-nios/master

2012-11-10 Thread Thomas Chou
Hi Tom,

Please add these patches to fix the compilation error of nios2 arch
after v2013.01-rc1.

Best regards,
Thomas


The following changes since commit 59852d03867108217fe88e3bfc3e1e9cedfe63c5:

  Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze (2012-11-09 
08:47:25 -0700)

are available in the git repository at:


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

for you to fetch changes up to db71964235c1dfa13ec398da483b0bdbbf31d5b7:

  nios2: remove asm/status_led.h (2012-11-10 19:45:58 +0800)


Thomas Chou (2):
  nios2: use builtin functions for control registers access
  nios2: remove asm/status_led.h

 arch/nios2/include/asm/status_led.h | 31 ---
 include/configs/PK1C20.h|  1 +
 include/configs/nios2-generic.h |  1 +
 include/nios2.h | 12 ++--
 include/status_led.h|  3 ---
 5 files changed, 4 insertions(+), 44 deletions(-)
 delete mode 100644 arch/nios2/include/asm/status_led.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 01/13] mx31: Move EHCI definitions to ehci-fsl.h

2012-11-10 Thread Benoît Thébaudeau
Hi Stefano,

On Saturday, November 10, 2012 8:42:24 AM, Stefano Babic wrote:
> On 08/11/2012 21:27, Benoît Thébaudeau wrote:
> > The EHCI definitions in i.MX31's imx-regs.h are MXC-generic, so
> > move them to
> > ehci-fsl.h so that all MXC SoCs can use them.
> > 
> > Signed-off-by: Benoît Thébaudeau 
> > Cc: Marek Vasut 
> > Cc: Stefano Babic 
> > ---
> 
> Hi Benoît,
> 
> > Changes for v2: None.
> > 
> >  .../arch/arm/include/asm/arch-mx31/imx-regs.h  |   26
> >  
> >  .../include/usb/ehci-fsl.h |   22
> >  +
> >  2 files changed, 22 insertions(+), 26 deletions(-)
> > 
> 
> By applying this patchset I see several minor issues reported by
> checkpatch:
> 
> WARNING: line over 80 characters
> #303: FILE: drivers/usb/host/ehci-mx5.c:43:
> +#define MXC_OTG_UCTRL_OWIE_BIT   (1 << 27)   /* OTG wakeup 
> intr enable
> */
> 
> WARNING: line over 80 characters
> #305: FILE: drivers/usb/host/ehci-mx5.c:45:
> +#define MXC_H1_UCTRL_H1UIE_BIT   (1 << 12)   /* Host1 ULPI 
> interrupt
> enable */
> 
> WARNING: line over 80 characters
> #306: FILE: drivers/usb/host/ehci-mx5.c:46:
> +#define MXC_H1_UCTRL_H1WIE_BIT   (1 << 11)   /* HOST1 wakeup 
> intr
> enable */
> 
> WARNING: line over 80 characters
> #312: FILE: drivers/usb/host/ehci-mx5.c:50:
> +#define MXC_OTG_PHYCTRL_OC_DIS_BIT   (1 << 8)/* OTG Disable
> Overcurrent
> Event */
> 
> WARNING: line over 80 characters
> #313: FILE: drivers/usb/host/ehci-mx5.c:51:
> +#define MXC_H1_OC_DIS_BIT(1 << 5)/* UH1 Disable 
> Overcurrent Event
> */
> 
> WARNING: line over 80 characters
> #343: FILE: drivers/usb/host/ehci-mx5.c:174:
> + v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask unused 
> */
> 
> WARNING: line over 80 characters
> #352: FILE: drivers/usb/host/ehci-mx5.c:190:
> + v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask unused 
> */
> 
> WARNING: line over 80 characters
> #641: FILE: drivers/usb/host/ehci-mx5.c:47:
> +#define MXC_OTG_UCTRL_O_PWR_POL_BIT  (1 << 24)   /* OTG power pin
> polarity */
> 
> WARNING: line over 80 characters
> #645: FILE: drivers/usb/host/ehci-mx5.c:51:
> +#define MXC_H1_UCTRL_H1_PWR_POL_BIT  (1 << 8)/* HOST1 power pin
> polarity */
> 
> WARNING: line over 80 characters
> #648: FILE: drivers/usb/host/ehci-mx5.c:54:
> +#define MXC_OTG_PHYCTRL_OC_POL_BIT   (1 << 9)/* OTG Polarity of
> Overcurrent */
> 
> WARNING: line over 80 characters
> #650: FILE: drivers/usb/host/ehci-mx5.c:56:
> +#define MXC_H1_OC_POL_BIT(1 << 6)/* UH1 Polarity of 
> Overcurrent
> */
> 
> WARNING: line over 80 characters
> #652: FILE: drivers/usb/host/ehci-mx5.c:58:
> +#define MXC_OTG_PHYCTRL_PWR_POL_BIT  (1 << 3)/* OTG Power Pin
> Polarity */
> 
> WARNING: line over 80 characters
> #873: FILE: drivers/usb/host/ehci-mxc.c:85:
> + MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT | MX25_H1_USBTE_BIT 
> |
> 
> WARNING: line over 80 characters
> #1078: FILE: drivers/usb/host/ehci-mxc.c:184:
> + MX35_H1_OCPOL_BIT | MX35_H1_TLL_BIT | MX35_H1_USBTE_BIT 
> |
> 
> WARNING: line over 80 characters
> #1179: FILE: board/freescale/mx35pdk/mx35pdk.c:105:
> + mxc_request_iomux(MX35_PIN_USBOTG_PWR, MUX_CONFIG_SION |
> MUX_CONFIG_FUNC);
> 
> WARNING: line over 80 characters
> #1180: FILE: board/freescale/mx35pdk/mx35pdk.c:106:
> + mxc_request_iomux(MX35_PIN_USBOTG_OC, MUX_CONFIG_SION |
> MUX_CONFIG_FUNC);
> 
> total: 0 errors, 16 warnings, 810 lines checked
> 
> Can you fix them ? Thanks !

OK, I'll do that. For the #define-s, do you prefer that I move the comment to
the previous line, or that I split the end of the comment to the next line?

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


[U-Boot] [PATCH v2] mx51evk: Fix build error when CONFIG_VIDEO is disabled

2012-11-10 Thread Anatolij Gustschin
From: Vikram Narayanan 

The inclusion of LCD patch into mx51evk breaks the build when
CONFIG_VIDEO is disabled. Fix this by splitting the video related
stuff to a new file.

Also rename the function lcd_iomux to setup_iomux_lcd to make the
namings aligned with the other iomux functions.

Signed-off-by: Vikram Narayanan 
Signed-off-by: Anatolij Gustschin 
Cc: Fabio Estevam 
Cc: Stefano Babic 
---
Changes in v2:
 - rebased on current master
 - added common file mx5_video.h for function prorotypes

 arch/arm/include/asm/imx-common/mx5_video.h |   21 +++
 board/freescale/mx51evk/Makefile|4 +-
 board/freescale/mx51evk/mx51evk.c   |   57 +--
 board/freescale/mx51evk/mx51evk_video.c |   81 +++
 4 files changed, 107 insertions(+), 56 deletions(-)
 create mode 100644 arch/arm/include/asm/imx-common/mx5_video.h
 create mode 100644 board/freescale/mx51evk/mx51evk_video.c

diff --git a/arch/arm/include/asm/imx-common/mx5_video.h 
b/arch/arm/include/asm/imx-common/mx5_video.h
new file mode 100644
index 000..e54c25a
--- /dev/null
+++ b/arch/arm/include/asm/imx-common/mx5_video.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012
+ * Anatolij Gustschin, DENX Software Engineering, 
+ *
+ * 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.
+ */
+#ifndef __MX5_VIDEO_H
+#define __MX5_VIDEO_H
+
+#ifdef CONFIG_VIDEO
+void lcd_enable(void);
+void setup_iomux_lcd(void);
+#else
+static inline void lcd_enable(void) { }
+static inline void setup_iomux_lcd(void) { }
+#endif
+
+#endif
diff --git a/board/freescale/mx51evk/Makefile b/board/freescale/mx51evk/Makefile
index 224eaa3..2310fe1 100644
--- a/board/freescale/mx51evk/Makefile
+++ b/board/freescale/mx51evk/Makefile
@@ -23,8 +23,10 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).o
 
-COBJS  := mx51evk.o
+COBJS-y+= mx51evk.o
+COBJS-$(CONFIG_VIDEO)  += mx51evk_video.o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
diff --git a/board/freescale/mx51evk/mx51evk.c 
b/board/freescale/mx51evk/mx51evk.c
index 421d8c2..bc9d966 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -37,12 +38,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-
-#define MX51EVK_LCD_3V3IMX_GPIO_NR(4, 9)
-#define MX51EVK_LCD_5V IMX_GPIO_NR(4, 10)
-#define MX51EVK_LCD_BACKLIGHT  IMX_GPIO_NR(3, 4)
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -471,54 +466,6 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-static struct fb_videomode const claa_wvga = {
-   .name   = "CLAA07LC0ACW",
-   .refresh= 57,
-   .xres   = 800,
-   .yres   = 480,
-   .pixclock   = 37037,
-   .left_margin= 40,
-   .right_margin   = 60,
-   .upper_margin   = 10,
-   .lower_margin   = 10,
-   .hsync_len  = 20,
-   .vsync_len  = 10,
-   .sync   = 0,
-   .vmode  = FB_VMODE_NONINTERLACED
-};
-
-void lcd_iomux(void)
-{
-   /* DI2_PIN15 */
-   mxc_request_iomux(MX51_PIN_DI_GP4, IOMUX_CONFIG_ALT4);
-
-   /* Pad settings for MX51_PIN_DI2_DISP_CLK */
-   mxc_iomux_set_pad(MX51_PIN_DI2_DISP_CLK, PAD_CTL_HYS_NONE |
- PAD_CTL_PKE_ENABLE | PAD_CTL_PUE_KEEPER |
- PAD_CTL_DRV_MAX | PAD_CTL_SRE_SLOW);
-
-   /* Turn on 3.3V voltage for LCD */
-   mxc_request_iomux(MX51_PIN_CSI2_D12, IOMUX_CONFIG_ALT3);
-   gpio_direction_output(MX51EVK_LCD_3V3, 1);
-
-   /* Turn on 5V voltage for LCD */
-   mxc_request_iomux(MX51_PIN_CSI2_D13, IOMUX_CONFIG_ALT3);
-   gpio_direction_output(MX51EVK_LCD_5V, 1);
-
-   /* Turn on GPIO backlight */
-   mxc_request_iomux(MX51_PIN_DI1_D1_CS, IOMUX_CONFIG_ALT4);
-   mxc_iomux_set_input(MX51_GPIO3_IPP_IND_G_IN_4_SELECT_INPUT,
-   INPUT_CTL_PATH1);
-   gpio_direction_output(MX51EVK_LCD_BACKLIGHT, 1);
-}
-
-void lcd_enable(void)
-{
-   int ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565);
-   if (ret)
-   printf("LCD cannot be configured: %d\n", ret);
-}
-
 int board_early_init_f(void)
 {
setup_iomux_uart();
@@ -526,7 +473,7 @@ int board_early_init_f(void)
 #ifdef CONFIG_USB_EHCI_MX5
setup_usb_h1();
 #endif
-   lcd_iomux();
+   setup_iomux_lcd();
 
return 0;
 }
diff --git a/board/freescale/mx51evk/mx51evk_video.c 
b/board/freescale/mx51evk/mx51evk_video.c
new file mode 100644
index 000..f036cf7
--- /dev/null
+++ b/board/freescale/mx51evk/mx51evk_video.c
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2012 Freescale Semicondu

[U-Boot] [PATCH v2] mx53loco: Fix build error when CONFIG_VIDEO is disabled

2012-11-10 Thread Anatolij Gustschin
From: Vikram Narayanan 

The inclusion of LCD patch into mx53loco breaks the build when
CONFIG_VIDEO is disabled. Fix this by splitting the video
related stuff to a new file.

Also rename the function lcd_iomux to setup_iomux_lcd to make the
namings aligned with the other iomux functions.

Signed-off-by: Vikram Narayanan 
Signed-off-by: Anatolij Gustschin 
Cc: Fabio Estevam 
Cc: Stefano Babic 
---
Changes in v2:
 - rebased on current master
 - revised commit log

 board/freescale/mx53loco/Makefile |4 +-
 board/freescale/mx53loco/mx53loco.c   |   66 +---
 board/freescale/mx53loco/mx53loco_video.c |   94 +
 3 files changed, 99 insertions(+), 65 deletions(-)
 create mode 100644 board/freescale/mx53loco/mx53loco_video.c

diff --git a/board/freescale/mx53loco/Makefile 
b/board/freescale/mx53loco/Makefile
index 8bc69a9..3be17c5 100644
--- a/board/freescale/mx53loco/Makefile
+++ b/board/freescale/mx53loco/Makefile
@@ -22,8 +22,10 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).o
 
-COBJS  := mx53loco.o
+COBJS-y+= mx53loco.o
+COBJS-$(CONFIG_VIDEO)  += mx53loco_video.o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
diff --git a/board/freescale/mx53loco/mx53loco.c 
b/board/freescale/mx53loco/mx53loco.c
index a11e883..f8f0503 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -412,74 +413,11 @@ static void clock_1GHz(void)
printf("CPU:   Switch DDR clock to 400MHz failed\n");
 }
 
-static struct fb_videomode const claa_wvga = {
-   .name   = "CLAA07LC0ACW",
-   .refresh= 57,
-   .xres   = 800,
-   .yres   = 480,
-   .pixclock   = 37037,
-   .left_margin= 40,
-   .right_margin   = 60,
-   .upper_margin   = 10,
-   .lower_margin   = 10,
-   .hsync_len  = 20,
-   .vsync_len  = 10,
-   .sync   = 0,
-   .vmode  = FB_VMODE_NONINTERLACED
-};
-
-void lcd_iomux(void)
-{
-   mxc_request_iomux(MX53_PIN_DI0_DISP_CLK, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DI0_PIN15, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DI0_PIN2, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DI0_PIN3, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT0, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT1, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT2, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT3, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT4, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT5, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT6, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT7, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT8, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT9, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT10, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT11, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT12, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT13, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT14, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT15, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT16, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT17, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT18, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT19, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT20, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT21, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT22, IOMUX_CONFIG_ALT0);
-   mxc_request_iomux(MX53_PIN_DISP0_DAT23, IOMUX_CONFIG_ALT0);
-
-   /* Turn on GPIO backlight */
-   mxc_request_iomux(MX53_PIN_EIM_D24, IOMUX_CONFIG_ALT1);
-   gpio_direction_output(MX53LOCO_LCD_POWER, 1);
-
-   /* Turn on display contrast */
-   mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
-   gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_GPIO_1), 1);
-}
-
-void lcd_enable(void)
-{
-   int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565);
-   if (ret)
-   printf("LCD cannot be configured: %d\n", ret);
-}
-
 int board_early_init_f(void)
 {
setup_iomux_uart();
setup_iomux_fec();
-   lcd_iomux();
+   setup_iomux_lcd();
 
return 0;
 }
diff --git a/board/freescale/mx53loco/mx53loco_video.c 
b/board/freescale/mx53loco/mx53loco_video.c
new file mode 100644
index 000..69991e8
--- /dev/null
+++ b/board/freescale/mx53loco/mx53loco_video.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2012

[U-Boot] [PATCH v2] mx51evk: Fix build error when CONFIG_VIDEO is disabled

2012-11-10 Thread Anatolij Gustschin
From: Vikram Narayanan 

The inclusion of LCD patch into mx51evk breaks the build when
CONFIG_VIDEO is disabled. Fix this by splitting the video related
stuff to a new file.

Also rename the function lcd_iomux to setup_iomux_lcd to make the
namings aligned with the other iomux functions.

Signed-off-by: Vikram Narayanan 
Signed-off-by: Anatolij Gustschin 
Cc: Fabio Estevam 
Cc: Stefano Babic 
---
Changes in v2:
 - rebased on current master
 - added common file mx5_video.h for function prorotypes

 arch/arm/include/asm/imx-common/mx5_video.h |   21 +++
 board/freescale/mx51evk/Makefile|4 +-
 board/freescale/mx51evk/mx51evk.c   |   57 +--
 board/freescale/mx51evk/mx51evk_video.c |   81 +++
 4 files changed, 107 insertions(+), 56 deletions(-)
 create mode 100644 arch/arm/include/asm/imx-common/mx5_video.h
 create mode 100644 board/freescale/mx51evk/mx51evk_video.c

diff --git a/arch/arm/include/asm/imx-common/mx5_video.h 
b/arch/arm/include/asm/imx-common/mx5_video.h
new file mode 100644
index 000..e54c25a
--- /dev/null
+++ b/arch/arm/include/asm/imx-common/mx5_video.h
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2012
+ * Anatolij Gustschin, DENX Software Engineering, 
+ *
+ * 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.
+ */
+#ifndef __MX5_VIDEO_H
+#define __MX5_VIDEO_H
+
+#ifdef CONFIG_VIDEO
+void lcd_enable(void);
+void setup_iomux_lcd(void);
+#else
+static inline void lcd_enable(void) { }
+static inline void setup_iomux_lcd(void) { }
+#endif
+
+#endif
diff --git a/board/freescale/mx51evk/Makefile b/board/freescale/mx51evk/Makefile
index 224eaa3..2310fe1 100644
--- a/board/freescale/mx51evk/Makefile
+++ b/board/freescale/mx51evk/Makefile
@@ -23,8 +23,10 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(BOARD).o
 
-COBJS  := mx51evk.o
+COBJS-y+= mx51evk.o
+COBJS-$(CONFIG_VIDEO)  += mx51evk_video.o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
diff --git a/board/freescale/mx51evk/mx51evk.c 
b/board/freescale/mx51evk/mx51evk.c
index 421d8c2..bc9d966 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -37,12 +38,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-
-#define MX51EVK_LCD_3V3IMX_GPIO_NR(4, 9)
-#define MX51EVK_LCD_5V IMX_GPIO_NR(4, 10)
-#define MX51EVK_LCD_BACKLIGHT  IMX_GPIO_NR(3, 4)
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -471,54 +466,6 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-static struct fb_videomode const claa_wvga = {
-   .name   = "CLAA07LC0ACW",
-   .refresh= 57,
-   .xres   = 800,
-   .yres   = 480,
-   .pixclock   = 37037,
-   .left_margin= 40,
-   .right_margin   = 60,
-   .upper_margin   = 10,
-   .lower_margin   = 10,
-   .hsync_len  = 20,
-   .vsync_len  = 10,
-   .sync   = 0,
-   .vmode  = FB_VMODE_NONINTERLACED
-};
-
-void lcd_iomux(void)
-{
-   /* DI2_PIN15 */
-   mxc_request_iomux(MX51_PIN_DI_GP4, IOMUX_CONFIG_ALT4);
-
-   /* Pad settings for MX51_PIN_DI2_DISP_CLK */
-   mxc_iomux_set_pad(MX51_PIN_DI2_DISP_CLK, PAD_CTL_HYS_NONE |
- PAD_CTL_PKE_ENABLE | PAD_CTL_PUE_KEEPER |
- PAD_CTL_DRV_MAX | PAD_CTL_SRE_SLOW);
-
-   /* Turn on 3.3V voltage for LCD */
-   mxc_request_iomux(MX51_PIN_CSI2_D12, IOMUX_CONFIG_ALT3);
-   gpio_direction_output(MX51EVK_LCD_3V3, 1);
-
-   /* Turn on 5V voltage for LCD */
-   mxc_request_iomux(MX51_PIN_CSI2_D13, IOMUX_CONFIG_ALT3);
-   gpio_direction_output(MX51EVK_LCD_5V, 1);
-
-   /* Turn on GPIO backlight */
-   mxc_request_iomux(MX51_PIN_DI1_D1_CS, IOMUX_CONFIG_ALT4);
-   mxc_iomux_set_input(MX51_GPIO3_IPP_IND_G_IN_4_SELECT_INPUT,
-   INPUT_CTL_PATH1);
-   gpio_direction_output(MX51EVK_LCD_BACKLIGHT, 1);
-}
-
-void lcd_enable(void)
-{
-   int ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565);
-   if (ret)
-   printf("LCD cannot be configured: %d\n", ret);
-}
-
 int board_early_init_f(void)
 {
setup_iomux_uart();
@@ -526,7 +473,7 @@ int board_early_init_f(void)
 #ifdef CONFIG_USB_EHCI_MX5
setup_usb_h1();
 #endif
-   lcd_iomux();
+   setup_iomux_lcd();
 
return 0;
 }
diff --git a/board/freescale/mx51evk/mx51evk_video.c 
b/board/freescale/mx51evk/mx51evk_video.c
new file mode 100644
index 000..f036cf7
--- /dev/null
+++ b/board/freescale/mx51evk/mx51evk_video.c
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2012 Freescale Semicondu

Re: [U-Boot] [PATCH v2 01/13] mx31: Move EHCI definitions to ehci-fsl.h

2012-11-10 Thread Albert ARIBAUD
Hi Benoît,

On Sat, 10 Nov 2012 13:37:12 +0100 (CET), Benoît Thébaudeau
 wrote:

> Hi Stefano,
> 
> On Saturday, November 10, 2012 8:42:24 AM, Stefano Babic wrote:
> > On 08/11/2012 21:27, Benoît Thébaudeau wrote:
> > > The EHCI definitions in i.MX31's imx-regs.h are MXC-generic, so
> > > move them to
> > > ehci-fsl.h so that all MXC SoCs can use them.
> > > 
> > > Signed-off-by: Benoît Thébaudeau 
> > > Cc: Marek Vasut 
> > > Cc: Stefano Babic 
> > > ---
> > 
> > Hi Benoît,
> > 
> > > Changes for v2: None.
> > > 
> > >  .../arch/arm/include/asm/arch-mx31/imx-regs.h  |   26
> > >  
> > >  .../include/usb/ehci-fsl.h |   22
> > >  +
> > >  2 files changed, 22 insertions(+), 26 deletions(-)
> > > 
> > 
> > By applying this patchset I see several minor issues reported by
> > checkpatch:
> > 
> > WARNING: line over 80 characters
> > #303: FILE: drivers/usb/host/ehci-mx5.c:43:
> > +#define MXC_OTG_UCTRL_OWIE_BIT (1 << 27)   /* OTG wakeup 
> > intr enable
> > */
> > 
> > WARNING: line over 80 characters
> > #305: FILE: drivers/usb/host/ehci-mx5.c:45:
> > +#define MXC_H1_UCTRL_H1UIE_BIT (1 << 12)   /* Host1 ULPI 
> > interrupt
> > enable */
> > 
> > WARNING: line over 80 characters
> > #306: FILE: drivers/usb/host/ehci-mx5.c:46:
> > +#define MXC_H1_UCTRL_H1WIE_BIT (1 << 11)   /* HOST1 wakeup 
> > intr
> > enable */
> > 
> > WARNING: line over 80 characters
> > #312: FILE: drivers/usb/host/ehci-mx5.c:50:
> > +#define MXC_OTG_PHYCTRL_OC_DIS_BIT (1 << 8)/* OTG Disable
> > Overcurrent
> > Event */
> > 
> > WARNING: line over 80 characters
> > #313: FILE: drivers/usb/host/ehci-mx5.c:51:
> > +#define MXC_H1_OC_DIS_BIT  (1 << 5)/* UH1 Disable 
> > Overcurrent Event
> > */
> > 
> > WARNING: line over 80 characters
> > #343: FILE: drivers/usb/host/ehci-mx5.c:174:
> > +   v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask unused 
> > */
> > 
> > WARNING: line over 80 characters
> > #352: FILE: drivers/usb/host/ehci-mx5.c:190:
> > +   v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask unused 
> > */
> > 
> > WARNING: line over 80 characters
> > #641: FILE: drivers/usb/host/ehci-mx5.c:47:
> > +#define MXC_OTG_UCTRL_O_PWR_POL_BIT(1 << 24)   /* OTG power pin
> > polarity */
> > 
> > WARNING: line over 80 characters
> > #645: FILE: drivers/usb/host/ehci-mx5.c:51:
> > +#define MXC_H1_UCTRL_H1_PWR_POL_BIT(1 << 8)/* HOST1 power 
> > pin
> > polarity */
> > 
> > WARNING: line over 80 characters
> > #648: FILE: drivers/usb/host/ehci-mx5.c:54:
> > +#define MXC_OTG_PHYCTRL_OC_POL_BIT (1 << 9)/* OTG Polarity of
> > Overcurrent */
> > 
> > WARNING: line over 80 characters
> > #650: FILE: drivers/usb/host/ehci-mx5.c:56:
> > +#define MXC_H1_OC_POL_BIT  (1 << 6)/* UH1 Polarity of 
> > Overcurrent
> > */
> > 
> > WARNING: line over 80 characters
> > #652: FILE: drivers/usb/host/ehci-mx5.c:58:
> > +#define MXC_OTG_PHYCTRL_PWR_POL_BIT(1 << 3)/* OTG Power Pin
> > Polarity */
> > 
> > WARNING: line over 80 characters
> > #873: FILE: drivers/usb/host/ehci-mxc.c:85:
> > +   MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT | MX25_H1_USBTE_BIT 
> > |
> > 
> > WARNING: line over 80 characters
> > #1078: FILE: drivers/usb/host/ehci-mxc.c:184:
> > +   MX35_H1_OCPOL_BIT | MX35_H1_TLL_BIT | MX35_H1_USBTE_BIT 
> > |
> > 
> > WARNING: line over 80 characters
> > #1179: FILE: board/freescale/mx35pdk/mx35pdk.c:105:
> > +   mxc_request_iomux(MX35_PIN_USBOTG_PWR, MUX_CONFIG_SION |
> > MUX_CONFIG_FUNC);
> > 
> > WARNING: line over 80 characters
> > #1180: FILE: board/freescale/mx35pdk/mx35pdk.c:106:
> > +   mxc_request_iomux(MX35_PIN_USBOTG_OC, MUX_CONFIG_SION |
> > MUX_CONFIG_FUNC);
> > 
> > total: 0 errors, 16 warnings, 810 lines checked
> > 
> > Can you fix them ? Thanks !
> 
> OK, I'll do that. For the #define-s, do you prefer that I move the comment to
> the previous line, or that I split the end of the comment to the next line?

I'll let Stefano give a definitive answer of course, but I personally
prefer that comments be moved before the defines.

> Best regards,
> Benoît

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


Re: [U-Boot] [PATCH v2] mx51evk: Fix build error when CONFIG_VIDEO is disabled

2012-11-10 Thread Anatolij Gustschin
Hi,

please ignore this patch, it was sent by accident. Sorry  about that.

On Sat, 10 Nov 2012 13:32:00 +0100
Anatolij Gustschin  wrote:

> From: Vikram Narayanan 
> 
> The inclusion of LCD patch into mx51evk breaks the build when
> CONFIG_VIDEO is disabled. Fix this by splitting the video related
> stuff to a new file.

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


Re: [U-Boot] [PATCH v2 01/13] mx31: Move EHCI definitions to ehci-fsl.h

2012-11-10 Thread Albert ARIBAUD
> I'll let Stefano give a definitive answer of course, but I personally
> prefer that comments be moved before the defines.

Note: I mean that each comment should precede its corresponding define,
of course; I don't want all these comments lumped together in a single
block.

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


Re: [U-Boot] [Patch v5] video: atmel: implement lcd_setcolreg function

2012-11-10 Thread Anatolij Gustschin
Hi,

On Fri,  9 Nov 2012 11:49:14 +0800
Bo Shen  wrote:

> implement the common api lce_setcolreg in include/lcd.h
> 
> Signed-off-by: Bo Shen 
> ---
> since v4:
>   * using define for these magic number
> since v3:
>   * add magic number
> since v2:
>   * add this single patch
> ---
>  drivers/video/atmel_hlcdfb.c |   12 
>  include/atmel_hlcdc.h|7 +++
>  2 files changed, 19 insertions(+)

Applied to video/master after fixing commit log and gcc 4.6 warnings.

Thanks!

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


[U-Boot] common/xyzmodem.c, ymodem, slow behavior receiving bytes

2012-11-10 Thread Angelo Dureghello
Dear all,

i am experiencing a strange behavior on the u-boot ymodem protocol.
I am running u-boot, (pulled from origin/head yesterday) on a mcf5307 based 
board. I am currently working to include this board/cpu as supported into 
u-boot.

cpu runs at 90Mhz (bus clock@45), baud rate 115200.

On an older u-boot (2011.09.00122), i was able to upload files through ymodem 
at 115200 without any issue.

Once pulled yesterday head, and installed on the board, i am no more able to
upload files. U-boot times out when the first 128 bytes block is sent, and
sends SYN (C) again, so i started some debugging on xyzmodem.c:

Protocol times-out here, from line 434

  
  xyz.len = (c == SOH) ? 128 : 1024;
  xyz.bufp = xyz.pkt;
  for (i = 0; i < xyz.len; i++)
{
  res = CYGACC_COMM_IF_GETC_TIMEOUT (*xyz.__chan, &c);
  ZM_DEBUG (zm_save (c));
  if (res)
{
  xyz.pkt[i] = c;
}
  else
{
  ZM_DEBUG (zm_dump (__LINE__));
>>return xyzModem_timeout;
}
}


Echoing received char back to PC, i see about 1 every 3 received chars seems 
lost somewhere, so the first 128bytes block is never completely received 
(time out).

I measured baudrate through oscilloscope, 
from PC to u-boot board, i have 115600
from u-boot board to PC, i have 117180 (still inside 2% tolerance)

Also verified timer/delay functions works properly in new u-boot build.
As clients i used minicom and other, and have the same result.

So from a first look, seems the receive routine from line 434 is no more fast 
enough to receive the whole block. I moved speed down to 57600, upload works 
fine again.

What do you think about ?

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


Re: [U-Boot] [PATCH v2 01/13] mx31: Move EHCI definitions to ehci-fsl.h

2012-11-10 Thread Benoît Thébaudeau
On Saturday, November 10, 2012 1:47:51 PM, Albert ARIBAUD wrote:
> > I'll let Stefano give a definitive answer of course, but I
> > personally
> > prefer that comments be moved before the defines.
> 
> Note: I mean that each comment should precede its corresponding
> define,
> of course; I don't want all these comments lumped together in a
> single
> block.

Sure. And if some comments fit at the end of the line, but not all, do you
prefer to also move these fitting comments to the previous line for more
consistency?

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


Re: [U-Boot] [PATCH v2 0/2] Factorize ARM startup code as mush as possible.

2012-11-10 Thread Albert ARIBAUD
Hi Sughosh,

On Thu, 8 Nov 2012 19:50:28 +0530, Sughosh Ganu
 wrote:

> hi Albert,
> 
> On Mon Nov 05, 2012 at 01:09:25PM +0530, Sughosh Ganu wrote:
> > On Sun Nov 04, 2012 at 10:38:32AM -0700, Tom Rini wrote:
> > > On Sun, Nov 04, 2012 at 12:43:12PM +0100, Albert ARIBAUD wrote:
> > > 
> > > > Hi Tom,
> > > > 
> > > > On Sun,  4 Nov 2012 12:32:03 +0100, Albert ARIBAUD
> > > >  wrote:
> > > > 
> > > > > The goal of this series is to scrub the start.S files
> > > > > which have proliferated across arch/arm and eliminate
> > > > > code redundancy.
> > > > 
> > > > I know this came a bit late in early nov 4th, but I really would like
> > > > it to be considered for 2013.01. Would you agree to make an exception
> > > > for it? Thanks in advance.
> > > 
> > > If you can collect a diverse set of Tested-by's, yes.
> > 
> > I have not gone through the patch, but will test it in a day or two on
> > the hawkboard, and report the findings.
> > 
> > The hawkboard comes with the arm926ejs core, so that part of the code
> > would be tested.
> 
> I tried the 1st patch of the series, and with that u-boot does not
> come up on the board. It is also printing out some random values for
> the dram and nand sizes.
> 
> The patch was applied on top of commit 1cc619be8b7. Also, with the
> mentioned commit, u-boot boots up fine on the board. Also to be noted
> is that the spl image compiled with these changes is booting up fine,
> loading the main u-boot image, and jumping to it -- the issue is with
> booting the main u-boot image.

Thanks Sughosh. Can you build an U-Boot with the following defined
in the hawkboard.h config file?

#define DEBUG
#if defined(CONFIG_SPL_BUILD) && ! defined (__ASSEMBLY__)
static inline int printf(const char *fmt, ...)
{
return 0;
}
#endif

Note: only the #define DEBUG matter to me, but with it alone, SPL build
fails due to some code now requiring printf(). This is why I add a
dummy printf definition for C code during SPL build -- ASM code does not
need printf() and actually chokes on the definition, hence the
condition on __ASSEMBLY__.

This debug U-Boot should print a lot more info. Can you please try it
and copy/paste its output here? Thanks in advance.

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


Re: [U-Boot] [PATCH v2 01/13] mx31: Move EHCI definitions to ehci-fsl.h

2012-11-10 Thread stefano babic
Am 10/11/2012 13:37, schrieb Benoît Thébaudeau:
> Hi Stefano,
> 
> On Saturday, November 10, 2012 8:42:24 AM, Stefano Babic wrote:
>> On 08/11/2012 21:27, Benoît Thébaudeau wrote:
>>> The EHCI definitions in i.MX31's imx-regs.h are MXC-generic, so
>>> move them to
>>> ehci-fsl.h so that all MXC SoCs can use them.
>>>
>>> Signed-off-by: Benoît Thébaudeau 
>>> Cc: Marek Vasut 
>>> Cc: Stefano Babic 
>>> ---
>>
>> Hi Benoît,
>>
>>> Changes for v2: None.
>>>
>>>  .../arch/arm/include/asm/arch-mx31/imx-regs.h  |   26
>>>  
>>>  .../include/usb/ehci-fsl.h |   22
>>>  +
>>>  2 files changed, 22 insertions(+), 26 deletions(-)
>>>
>>
>> By applying this patchset I see several minor issues reported by
>> checkpatch:
>>
>> WARNING: line over 80 characters
>> #303: FILE: drivers/usb/host/ehci-mx5.c:43:
>> +#define MXC_OTG_UCTRL_OWIE_BIT  (1 << 27)   /* OTG wakeup 
>> intr enable
>> */
>>
>> WARNING: line over 80 characters
>> #305: FILE: drivers/usb/host/ehci-mx5.c:45:
>> +#define MXC_H1_UCTRL_H1UIE_BIT  (1 << 12)   /* Host1 ULPI 
>> interrupt
>> enable */
>>
>> WARNING: line over 80 characters
>> #306: FILE: drivers/usb/host/ehci-mx5.c:46:
>> +#define MXC_H1_UCTRL_H1WIE_BIT  (1 << 11)   /* HOST1 wakeup 
>> intr
>> enable */
>>
>> WARNING: line over 80 characters
>> #312: FILE: drivers/usb/host/ehci-mx5.c:50:
>> +#define MXC_OTG_PHYCTRL_OC_DIS_BIT  (1 << 8)/* OTG Disable
>> Overcurrent
>> Event */
>>
>> WARNING: line over 80 characters
>> #313: FILE: drivers/usb/host/ehci-mx5.c:51:
>> +#define MXC_H1_OC_DIS_BIT   (1 << 5)/* UH1 Disable 
>> Overcurrent Event
>> */
>>
>> WARNING: line over 80 characters
>> #343: FILE: drivers/usb/host/ehci-mx5.c:174:
>> +v &= ~MXC_H1_UCTRL_H1PM_BIT; /* HOST1 power mask unused 
>> */
>>
>> WARNING: line over 80 characters
>> #352: FILE: drivers/usb/host/ehci-mx5.c:190:
>> +v &= ~MXC_H2_UCTRL_H2PM_BIT; /* HOST2 power mask unused 
>> */
>>
>> WARNING: line over 80 characters
>> #641: FILE: drivers/usb/host/ehci-mx5.c:47:
>> +#define MXC_OTG_UCTRL_O_PWR_POL_BIT (1 << 24)   /* OTG power pin
>> polarity */
>>
>> WARNING: line over 80 characters
>> #645: FILE: drivers/usb/host/ehci-mx5.c:51:
>> +#define MXC_H1_UCTRL_H1_PWR_POL_BIT (1 << 8)/* HOST1 power pin
>> polarity */
>>
>> WARNING: line over 80 characters
>> #648: FILE: drivers/usb/host/ehci-mx5.c:54:
>> +#define MXC_OTG_PHYCTRL_OC_POL_BIT  (1 << 9)/* OTG Polarity of
>> Overcurrent */
>>
>> WARNING: line over 80 characters
>> #650: FILE: drivers/usb/host/ehci-mx5.c:56:
>> +#define MXC_H1_OC_POL_BIT   (1 << 6)/* UH1 Polarity of 
>> Overcurrent
>> */
>>
>> WARNING: line over 80 characters
>> #652: FILE: drivers/usb/host/ehci-mx5.c:58:
>> +#define MXC_OTG_PHYCTRL_PWR_POL_BIT (1 << 3)/* OTG Power Pin
>> Polarity */
>>
>> WARNING: line over 80 characters
>> #873: FILE: drivers/usb/host/ehci-mxc.c:85:
>> +MX25_H1_OCPOL_BIT | MX25_H1_TLL_BIT | MX25_H1_USBTE_BIT 
>> |
>>
>> WARNING: line over 80 characters
>> #1078: FILE: drivers/usb/host/ehci-mxc.c:184:
>> +MX35_H1_OCPOL_BIT | MX35_H1_TLL_BIT | MX35_H1_USBTE_BIT 
>> |
>>
>> WARNING: line over 80 characters
>> #1179: FILE: board/freescale/mx35pdk/mx35pdk.c:105:
>> +mxc_request_iomux(MX35_PIN_USBOTG_PWR, MUX_CONFIG_SION |
>> MUX_CONFIG_FUNC);
>>
>> WARNING: line over 80 characters
>> #1180: FILE: board/freescale/mx35pdk/mx35pdk.c:106:
>> +mxc_request_iomux(MX35_PIN_USBOTG_OC, MUX_CONFIG_SION |
>> MUX_CONFIG_FUNC);
>>
>> total: 0 errors, 16 warnings, 810 lines checked
>>
>> Can you fix them ? Thanks !
> 
> OK, I'll do that. For the #define-s, do you prefer that I move the comment to
> the previous line, or that I split the end of the comment to the next line?

I have no preference, I usually move the comment to the previous line,
but it is a question of taste ;-)

Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/2] arm: move C runtime setup code in crt0.S

2012-11-10 Thread Albert ARIBAUD
Hi Andreas,

On Mon, 05 Nov 2012 09:31:55 +0100, "Andreas Bießmann"
 wrote:

> Dear Albert Aribaud,

> DDR means DRAM in general?

Yes -- but DRAM is no better, as it still describes a technology
(class). I'm going tu use "system RAM" to describe it.

> > + *must use GD to store any data which must be passed on to later,
> ---^

Fixed.

> > + *stages, including the reloction destination and the new stack
> > + *pointer address, below which the stack resides and above it the
> ^
> Full stop? The rest of the sentence makes no sense to me.

Rewritten.

> > +#if defined(CONFIG_NAND_SPL)
> > +   /* deprecated, use instead CONFIG_SPL_BUILD */
> I wonder if we can emit a #warning here

Hmm... Will test and let people know how many boards stop compiling
cleanly.

> > +#ifdef CONFIG_SPL_BUILD
> 
> I think this should be negated. The coloured LED stuff was enabled for
> non SPL builds before!

Correct.

> > +
> > +   bl coloured_LED_init
> > +   bl red_led_on
> > +
> > +#endif
> > +
> > +   /* call board_init_r(gd_t *id, ulong dest_addr) */
> Shouldn't this move down in the #elif path?

Moved.

> Best regards
> 
> Andreas Bießmann

Thanks a lot for your review!

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


Re: [U-Boot] [PATCH v2 1/2] arm: move C runtime setup code in crt0.S

2012-11-10 Thread Albert ARIBAUD
Reviewing myself:

On Sun,  4 Nov 2012 12:32:04 +0100, Albert ARIBAUD
 wrote:

> diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
> new file mode 100644
> index 000..fd6bd92
> --- /dev/null
> +++ b/arch/arm/lib/crt0.S

> +clbss_l:cmp  r0, r1  /* while not at end of BSS */
> + strlo   r2, [r0]/* clear 32-bit BSS word */
> + addlo   r0, r0, #4  /* move to next

Unclosed comment here. This causes the following code to be ignored:

> + bhs clbss_l
> +
> +#ifdef CONFIG_SPL_BUILD
> +
> + bl coloured_LED_init
> + bl red_led_on
> +
> +#endif
> +
> + /* call board_init_r(gd_t *id, ulong dest_addr) */

Which might explain why SPL builds did not complain about LED calls and
why some boards failed.

Also:

> +#if defined(CONFIG_NAND_SPL)
> + ldr pc, _nand_boot
> +
> +#elif ! defined(CONFIG_SPL_BUILD)
> +
> + /* setup parameters for board_init_r */
> + mov r0, r8  /* gd_t */
> + ldr r1, [r8, #GD_RELOCADDR] /* dest_addr */
> + /* call board_init_r */
> + ldr pc, _board_init_r   /* this is auto-relocated! */
> +
> +#endif

The #elif is wrong, as it causes CONFIG_SPL_BUILD builds to not call
board_init_f() at all; actually, they overrun into whatever follows.
This might have been what Sughosh (Cc:) hit with the hawkboard.

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


[U-Boot] [PATCH v3 0/2] Factorize ARM startup code as mush as possible.

2012-11-10 Thread Albert ARIBAUD
The goal of this series is to scrub the start.S files
which have proliferated across arch/arm and eliminate
code redundancy.

Currently this series only factorizes the C runtime
framework, that is, the assembly code responsible for
setting up the C environments needed by board_init_*()
and relocate_code().

Further factorization is possible: relocate_code() can
be moved out and possibly rewritten in C now that it
has plain C function semantics; exception handlers
should also be pretty much cpu-independent.

Eventually, start.S files should disappear or contain
CPU-specific code only.

The new C runtime setup sequence has been validated step by
step on target versatileqemu using toolchain ELDK4.2.

The whole changes have been build-tested across all ARM
targets using MAKEALL -a arm.

Changes in v3:
- various clarifications and typo fixes
- fixed wrong LED calls conditional
- fixed open comment eating some code
- fixed code overrun in SPL case
Series-changes: 2
- moved description from cover letter to patch commit msg
- added note about tests in the cover letter
- fixed baords with CONFIG_SPL but not CONFIG_SPL_STACK
- no change

Changes in v2:
- introduced in V2

Albert ARIBAUD (2):
  arm: move C runtime setup code in crt0.S
  arm: remove useless code in start.S files

 arch/arm/cpu/arm1136/start.S  |   69 +++
 arch/arm/cpu/arm1176/start.S  |   62 ++
 arch/arm/cpu/arm720t/start.S  |   53 ++---
 arch/arm/cpu/arm920t/start.S  |   61 ++
 arch/arm/cpu/arm925t/start.S  |   65 ++-
 arch/arm/cpu/arm926ejs/start.S|   86 ++
 arch/arm/cpu/arm946es/start.S |   56 ++---
 arch/arm/cpu/arm_intcm/start.S|   63 ++
 arch/arm/cpu/armv7/start.S|   58 +++---
 arch/arm/cpu/ixp/start.S  |   55 ++---
 arch/arm/cpu/pxa/start.S  |   63 ++
 arch/arm/cpu/s3c44b0/start.S  |   55 ++---
 arch/arm/cpu/sa1100/start.S   |   50 ++--
 arch/arm/lib/Makefile |2 +
 arch/arm/lib/board.c  |   11 --
 arch/arm/lib/crt0.S   |  180 +
 include/common.h  |2 +-
 include/configs/socfpga_cyclone5.h|2 +-
 lib/asm-offsets.c |   10 ++
 nand_spl/board/freescale/mx31pdk/Makefile |6 +-
 nand_spl/board/karo/tx25/Makefile |6 +-
 21 files changed, 329 insertions(+), 686 deletions(-)
 create mode 100644 arch/arm/lib/crt0.S

-- 
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/2] arm: move C runtime setup code in crt0.S

2012-11-10 Thread Albert ARIBAUD
Move all the C runtime setup code from every start.S
in arch/arm into arch/arm/lib/crt0.S. This covers
the code sequence from isetting up the initial stack
to calling into board_init_r().

Also, rewrite the C runtime setup and make functions
board_init_*() and relocate_code() behave according to
normal C semantics (no jumping across the C stack any
more, etc).

Some SPL targets had to be touched because they use
start.S exolicitly or for some reason; the relevant
maintainers and custodians are cc:ed.

Signed-off-by: Albert ARIBAUD 
---
Changes in v3:
- various clarifications and typo fixes
- fixed wrong LED calls conditional
- fixed open comment eating some code
- fixed code overrun in SPL case
Series-changes: 2
- moved description from cover letter to patch commit msg
- added note about tests in the cover letter
- fixed baords with CONFIG_SPL but not CONFIG_SPL_STACK

 arch/arm/cpu/arm1136/start.S  |   69 +++
 arch/arm/cpu/arm1176/start.S  |   62 ++
 arch/arm/cpu/arm720t/start.S  |   53 ++---
 arch/arm/cpu/arm920t/start.S  |   61 ++
 arch/arm/cpu/arm925t/start.S  |   61 ++
 arch/arm/cpu/arm926ejs/start.S|   80 ++---
 arch/arm/cpu/arm946es/start.S |   56 ++---
 arch/arm/cpu/arm_intcm/start.S|   63 ++
 arch/arm/cpu/armv7/start.S|   58 +++---
 arch/arm/cpu/ixp/start.S  |   55 ++---
 arch/arm/cpu/pxa/start.S  |   63 ++
 arch/arm/cpu/s3c44b0/start.S  |   55 ++---
 arch/arm/cpu/sa1100/start.S   |   50 ++--
 arch/arm/lib/Makefile |2 +
 arch/arm/lib/board.c  |   11 --
 arch/arm/lib/crt0.S   |  180 +
 include/common.h  |2 +-
 include/configs/socfpga_cyclone5.h|2 +-
 lib/asm-offsets.c |   10 ++
 nand_spl/board/freescale/mx31pdk/Makefile |6 +-
 nand_spl/board/karo/tx25/Makefile |6 +-
 21 files changed, 329 insertions(+), 676 deletions(-)
 create mode 100644 arch/arm/lib/crt0.S

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index 5d3b4c2..d19c1ed 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -165,13 +165,7 @@ next:
bl  cpu_init_crit
 #endif
 
-/* Set stackpointer in internal RAM to call board_init_f */
-call_board_init_f:
-   ldr sp, =(CONFIG_SYS_INIT_SP_ADDR)
-   bic sp, sp, #7 /* 8-byte alignment for ABI compliance */
-   ldr r0,=0x
-
-   bl  board_init_f
+   bl  _main
 
 
/*--*/
 
@@ -188,14 +182,10 @@ relocate_code:
mov r5, r1  /* save addr of gd */
mov r6, r2  /* save addr of destination */
 
-   /* Set up the stack */
-stack_setup:
-   mov sp, r4
-
adr r0, _start
cmp r0, r6
moveq   r9, #0  /* no relocation. relocation offset(r9) = 0 */
-   beq clear_bss   /* skip relocation */
+   beq relocate_done   /* skip relocation */
mov r1, r6  /* r1 <- scratch for copy_loop */
ldr r3, _image_copy_end_ofs
add r2, r0, r3  /* r2 <- source end address */
@@ -255,52 +245,21 @@ _dynsym_start_ofs:
.word __dynsym_start - _start
 #endif
 
-clear_bss:
-#ifdef CONFIG_SPL_BUILD
-   /* No relocation for SPL */
-   ldr r0, =__bss_start
-   ldr r1, =__bss_end__
-#else
-   ldr r0, _bss_start_ofs
-   ldr r1, _bss_end_ofs
-   mov r4, r6  /* reloc addr */
-   add r0, r0, r4
-   add r1, r1, r4
-#endif
-   mov r2, #0x /* clear*/
+relocate_done:
 
-clbss_l:cmpr0, r1  /* clear loop... */
-   bhs clbss_e /* if reached end of bss, exit */
-   str r2, [r0]
-   add r0, r0, #4
-   b   clbss_l
-clbss_e:
+   bx  lr
 
-/*
- * We are done. Do not return, instead branch to second part of board
- * initialization, now running from RAM.
- */
-#ifdef CONFIG_NAND_SPL
-   ldr r0, _nand_boot_ofs
-   mov pc, r0
+_rel_dyn_start_ofs:
+   .word __rel_dyn_start - _start
+_rel_dyn_end_ofs:
+   .word __rel_dyn_end - _start
+_dynsym_start_ofs:
+   .word __dynsym_start - _start
 
-_nand_boot_ofs:
-   .word nand_boot
-#else
-jump_2_ram:
-   ldr r0, _board_init_r_ofs
-   adr r1, _start
-   add lr, r0, r1
-   add lr, lr, r9
-   /* setup parameters for board_init_r */
-   mov r0, r5  /* gd_t */
-   mov r1, r6  /* dest_addr */
-   /* 

Re: [U-Boot] Documentation about Falcon Mode

2012-11-10 Thread Marek Vasut
Dear Stefano Babic,

> On 09/11/2012 23:41, Otavio Salvador wrote:
> > Hello,
> 
> Hi Otavio,
> 
> > During the last U-Boot meeting they "Falcon Mode" has been showed and
> > I'd like to have more details about it. Where I can find the
> > documentation, example code and slides?
> 
> You can find the slides of the presentation at the last RMLL in Geneva
> here:
> 
> http://schedule2012.rmll.info/IMG/pdf/LSM2012_UbootFalconMode_Babic.pdf
> 
> As example code, you can look at the twister board in mainline. I see
> that also the devkit8000 support it.

Guys ... this is not _the_ _problem_ ... :-C

The people at ELCE were really excited by this Falcon mode, it's really the 
next 
big thing in U-Boot.

But the people were severely disappointed that there is no concise 
documentation 
for it. So I'm asking you guys who do understand it, can you put together some 
good howto so we can properly advertise this feature? Please!

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


[U-Boot] [PATCH v3 2/2] arm: remove useless code in start.S files

2012-11-10 Thread Albert ARIBAUD
Remove code such as unneeded includes or labels.
These removals have no functional effect.

Signed-off-by: Albert ARIBAUD 
---
Changes in v3:
- no change

Changes in v2:
- introduced in V2

 arch/arm/cpu/arm925t/start.S   |4 
 arch/arm/cpu/arm926ejs/start.S |6 --
 2 files changed, 10 deletions(-)

diff --git a/arch/arm/cpu/arm925t/start.S b/arch/arm/cpu/arm925t/start.S
index 82f5b8b..e8d6d71 100644
--- a/arch/arm/cpu/arm925t/start.S
+++ b/arch/arm/cpu/arm925t/start.S
@@ -34,10 +34,6 @@
 #include 
 #include 
 
-#if defined(CONFIG_OMAP1510)
-#include <./configs/omap1510.h>
-#endif
-
 /*
  *
  *
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 5dfd49a..6b91535 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -36,12 +36,6 @@
 #include 
 #include 
 
-#if defined(CONFIG_OMAP1610)
-#include <./configs/omap1510.h>
-#elif defined(CONFIG_OMAP730)
-#include <./configs/omap730.h>
-#endif
-
 /*
  *
  *
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH v3 0/2] Factorize ARM startup code as mush as possible.

2012-11-10 Thread Albert ARIBAUD
Hi Albert,

On Sat, 10 Nov 2012 18:00:11 +0100, Albert ARIBAUD
 wrote:

> The goal of this series is to scrub the start.S files
> which have proliferated across arch/arm and eliminate
> code redundancy.
> 
> Currently this series only factorizes the C runtime
> framework, that is, the assembly code responsible for
> setting up the C environments needed by board_init_*()
> and relocate_code().
> 
> Further factorization is possible: relocate_code() can
> be moved out and possibly rewritten in C now that it
> has plain C function semantics; exception handlers
> should also be pretty much cpu-independent.
> 
> Eventually, start.S files should disappear or contain
> CPU-specific code only.
> 
> The new C runtime setup sequence has been validated step by
> step on target versatileqemu using toolchain ELDK4.2.
> 
> The whole changes have been build-tested across all ARM
> targets using MAKEALL -a arm.
> 
> Changes in v3:
> - various clarifications and typo fixes
> - fixed wrong LED calls conditional
> - fixed open comment eating some code
> - fixed code overrun in SPL case

Note there is no warning for using 'deprecated' NAND_SPL yet. I'm
running full MAKEALL -a arm on this and it'll be added in v4 depending
on results.

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


Re: [U-Boot] Documentation about Falcon Mode

2012-11-10 Thread Henrik Nordström
lör 2012-11-10 klockan 00:25 +0100 skrev Anatolij Gustschin:

> Some documentation is in README (SPL framework) and doc/README.SPL, example
> code is in mainline (see i.e. twister board). For slides see [1]. Links to
> the videos mentioned in the slides can be found here [2].

The piece I am missing is how to use u-boot to prepare the saved boot
information used when loading the kernel directly from SPL.

How to make the SPL framework load a kernel image is quite obvious. But
not how to have the right parameters sent to the kernel.

Regards
Henrik

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


[U-Boot] [PATCH 1/3] fw_env: fix type of len

2012-11-10 Thread Mike Frysinger
This variable is assigned by a size_t, and is printed that way, but is
incorrectly declared as an int.  Which means we get warnings:
fw_env.c: In function 'fw_setenv':
fw_env.c:409:5: warning: format '%zu' expects argument of type 'size_t',
but argument 3 has type 'int' [-Wformat]

Signed-off-by: Mike Frysinger 
---
 tools/env/fw_env.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 9b023e8..02f97c0 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -379,7 +379,8 @@ int fw_env_write(char *name, char *value)
  */
 int fw_setenv(int argc, char *argv[])
 {
-   int i, len;
+   int i;
+   size_t len;
char *name;
char *value = NULL;
 
-- 
1.7.12.4

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


[U-Boot] [PATCH 3/3] fw_env: fix building w/out a config.h

2012-11-10 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 tools/env/Makefile | 11 ++-
 tools/env/fw_env.h | 25 -
 2 files changed, 10 insertions(+), 26 deletions(-)

diff --git a/tools/env/Makefile b/tools/env/Makefile
index ab73c8c..62a113a 100644
--- a/tools/env/Makefile
+++ b/tools/env/Makefile
@@ -24,7 +24,7 @@
 include $(TOPDIR)/config.mk
 
 HOSTSRCS := $(SRCTREE)/lib/crc32.c  fw_env.c  fw_env_main.c
-HEADERS:= fw_env.h $(OBJTREE)/include/config.h
+HEADERS:= fw_env.h
 
 # Compile for a hosted environment on the target
 HOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
@@ -33,6 +33,15 @@ HOSTCPPFLAGS  = -idirafter $(SRCTREE)/include \
-DUSE_HOSTCC \
-DTEXT_BASE=$(TEXT_BASE)
 
+# Pass CONFIG_xxx settings via the command line so that we can build w/out
+# a config.h file existing in the first place.  Useful for generic builds.
+CONFIG_VARS_TO_PASS = \
+   ENV_OVERWRITE \
+   OVERWRITE_ETHADDR_ONCE \
+   ETHADDR
+HOSTCPPFLAGS += \
+   $(foreach x,$(CONFIG_VARS_TO_PASS),$(if 
$(CONFIG_$(x)),-DCONFIG_$(x)=$(CONFIG_$(x
+
 ifeq ($(MTD_VERSION),old)
 HOSTCPPFLAGS += -DMTD_OLD
 endif
diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h
index a1a6807..19703c7 100644
--- a/tools/env/fw_env.h
+++ b/tools/env/fw_env.h
@@ -21,15 +21,6 @@
  * MA 02111-1307 USA
  */
 
-/* Pull in the current config to define the default environment */
-#ifndef __ASSEMBLY__
-#define __ASSEMBLY__ /* get only #defines from config.h */
-#include 
-#undef __ASSEMBLY__
-#else
-#include 
-#endif
-
 /*
  * To build the utility with the static configuration
  * comment out the next line.
@@ -52,22 +43,6 @@
 #define DEVICE2_ENVSECTORS 2
 #endif
 
-#ifndef CONFIG_BAUDRATE
-#define CONFIG_BAUDRATE115200
-#endif
-
-#ifndef CONFIG_BOOTDELAY
-#define CONFIG_BOOTDELAY   5   /* autoboot after 5 seconds */
-#endif
-
-#ifndef CONFIG_BOOTCOMMAND
-#define CONFIG_BOOTCOMMAND 
\
-   "bootp; "   
\
-   "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} "
\
-   "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; "   
\
-   "bootm"
-#endif
-
 extern int   fw_printenv(int argc, char *argv[]);
 extern char *fw_getenv  (char *name);
 extern int fw_setenv  (int argc, char *argv[]);
-- 
1.7.12.4

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


[U-Boot] [PATCH 2/3] fw_env: fix incorrect usage of open(O_CREAT)

2012-11-10 Thread Mike Frysinger
When using open(), the O_CREAT flag must be given a mode, otherwise it
uses random garbage from the stack.  Also, it can fail to build:

In file included from /usr/include/fcntl.h:290:0,
 from fw_env_main.c:42:
In function 'open',
inlined from 'main' at fw_env_main.c:97:9:
/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared
with attribute error: open with O_CREAT in second argument needs 3 
arguments

Signed-off-by: Mike Frysinger 
---
 tools/env/fw_env_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c
index c855f4c..40ea3f6 100644
--- a/tools/env/fw_env_main.c
+++ b/tools/env/fw_env_main.c
@@ -94,7 +94,7 @@ int main(int argc, char *argv[])
int lockfd = -1;
int retval = EXIT_SUCCESS;
 
-   lockfd = open(lockname, O_WRONLY | O_CREAT | O_TRUNC);
+   lockfd = open(lockname, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (-1 == lockfd) {
fprintf(stderr, "Error opening lock file %s\n", lockname);
return EXIT_FAILURE;
-- 
1.7.12.4

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


Re: [U-Boot] [PATCH 00/46] Enhance spear support

2012-11-10 Thread Stefan Roese
On 11/10/2012 09:48 AM, Albert ARIBAUD wrote:
 Yes, I volunteer to be the SPEAr U-Boot custodian..

>>>
>>> I think that no one else could to this custodian job
>>> better than Vipin...
>>>
>>> Guaranteed!
>>
>> I'm all for it. Lets see what Albert has to say here.
>>
>> Albert, whats your opinion here? Would you also like to see an SPEAr
>> custodian to offload your patch-queue a but? Or would you prefer to
>> handle SPEAr related patches yourself in the future?
> 
> I heartily welcome specialized ARM repositories and custodians. :)

Okay, its decided then. :)

Vipin, please send your public ssh key to Wolfgang so that we can create
the new "spear" U-Boot git repository for you.

Thanks,
Stefan



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


Re: [U-Boot] kwboot: Boot Marvell Kirkwood SoCs over a serial link.

2012-11-10 Thread Sam Bulka
I understand the advantage of the tool when installed on a PC. But not
the advantage of adding it to Uboot, since the tool is needed when
Uboot is broken and doesn't work anymore. How would you use this tool
from within Uboot, if you can't access Uboot prompt? :) And if you can
access the prompt, then you can reflash Uboot or change its
environment without this tool.

On 11/10/12, Prafulla Wadaskar  wrote:
>
>
>> -Original Message-
>> From: u-boot-boun...@lists.denx.de [mailto:u-boot-
>> boun...@lists.denx.de] On Behalf Of Sambul
>> Sent: 04 November 2012 18:28
>> To: u-boot@lists.denx.de
>> Subject: Re: [U-Boot] kwboot: Boot Marvell Kirkwood SoCs over a serial
>> link.
>>
>> Wolfgang Denk  denx.de> writes:
>>
>> >
>> > Please see http://www.denx.de/wiki/U-Boot/Patches and post proper
>> > patch(es).
>> >
>> > Thanks.
>> >
>> > Best regards,
>> >
>> > Wolfgang Denk
>> >
>>
>> I assume that tool is needed to boot a Plug via Serial instead of
>> using more
>> complex Jtag restore of Uboot, when Uboot is broken. So, what's the
>> advantage of
>> adding this tool to Uboot?
>
> Answer is within your question, let's say someone don't have jtag tool, and
> bricked the board, this tool enables to bring up board back to functional
> state (just need a serial console).
>
> Actually it can be used effectively for new board bring up without using
> JTAG.
>
> Regards...
> Prafulla . . .
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/46] Enhance spear support

2012-11-10 Thread Wolfgang Denk
Dear Stefan,

In message <509f4194.9070...@denx.de> you wrote:
>
> Vipin, please send your public ssh key to Wolfgang so that we can create
> the new "spear" U-Boot git repository for you.

Will this be only SPEAr, or should we expect other chips fromSTM to go
though it, too (so a more generic name like u-boot-stm would be
better) ?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You said you  didn't  want  to  use  CGI.pm,  but  methinks  you  are
needlessly reinventing the wheel, one spoke at a time. Either you are
masochistic,  or  you  just haven't seen enough of what CGI.pm can do
for you. -- Randal L. Schwartz in <8cyb81rg81@gadget.cscaper.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot