Re: [U-Boot] [PULL] u-boot-pxa.git/master

2013-05-11 Thread Albert ARIBAUD
Hi Marek,

On Mon, 6 May 2013 03:11:44 +0200, Marek Vasut ma...@denx.de wrote:

 The following changes since commit 5ed6f447af60aabd2669d913f673793c1ce48f47:
 
   P1022DS: Set CONFIG_SPL_MAX_SIZE directly (2013-05-03 09:19:43 -0400)
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-pxa.git master
 
 for you to fetch changes up to 66a62ce0dc48d2319938c72f34a562f519c5d5c2:
 
   h2200: Add board reset support (2013-05-05 23:47:05 +0200)
 
 
 Mike Dunn (5):
   lib: import bitrev library from the linux kernel
   pxa_lcd: add the ACX544AKN lcd device
   pxa_lcd: make lcd_enable() a weak pointer
   pxa27x_udc: remove call to unimplemented set_GPIO_mode()
   mtd: nand: add driver for diskonchip g4 nand flash
 
 Łukasz Dałek (2):
   pxa: Add weak attribute to reset_cpu() function
   h2200: Add board reset support
 
  arch/arm/cpu/pxa/pxa2xx.c|2 +-
  arch/arm/include/asm/arch-pxa/hardware.h |   11 --
  board/h2200/h2200.c  |9 ++
  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/linux/bitrev.h   |   23 +++
  include/linux/mtd/docg4.h|  134 +
  lib/Makefile |1 +
  lib/bitrev.c |   59 
  12 files changed, 1515 insertions(+), 14 deletions(-)
  create mode 100644 drivers/mtd/nand/docg4.c
  create mode 100644 drivers/mtd/nand/docg4_spl.c
  create mode 100644 include/linux/bitrev.h
  create mode 100644 include/linux/mtd/docg4.h
  create mode 100644 lib/bitrev.c
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

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] [PULL] : Please pull u-boot-imx

2013-05-11 Thread Albert ARIBAUD
Hi Stefano,

On Tue, 07 May 2013 09:55:08 +0200, Stefano Babic sba...@denx.de
wrote:

 Hi Albert,
 
 please pull from u-boot-imx, thanks !
 
 The following changes since commit f2e8a87305a55652488af140adcf65b1e688f287:
 
   exynos: fdt: Add TMU node for snow (2013-04-17 10:00:44 +0900)
 
 are available in the git repository at:
 
   git://www.denx.de/git/u-boot-imx.git master
 
 for you to fetch changes up to d782c1fe7246301143ed78c0d86ea6c81f9325f9:
 
   arm: mxs: video: Enable MXS LCDIF on M28EVK (2013-05-06 17:40:23 +0200)
 
 
 Benoît Thébaudeau (40):
   imx: Homogenize and fix fuse register definitions
   imx: Add useful fuse definitions
   Add fuse API and commands
   Add fsl_iim driver
   mpc: iim: Switch to common fsl_iim
   mx51evk: Enable support for iim
   Add mxc_ocotp driver
   mx6qsabrelite: Enable support for ocotp
   nitrogen6x: Enable support for ocotp
   imx: Document fuse assignments for MAC addresses
   imx: iomux-v3: Fix common pad control definitions
   imx: iomux-v3: cosmetic: Reorganize definitions
   imx: iomux-v3: Restore Linux's NEW_PAD_CTRL() macro
   imx: iomux-v3: Include PKE and PUE to pad control pull definitions
   imx: iomux-v3: Add iomux-mx25.h
   imx: mx25pdk: Convert to iomux-v3
   imx: mx25pdk: Fix GPIO assignments
   imx: tx25: Convert to iomux-v3
   imx: zmx25: Convert to iomux-v3
   imx: mx25: Remove legacy iomux support
   imx: iomux-v3: Add iomux-mx35.h
   imx: flea3: Convert to iomux-v3
   imx: mx35pdk: Fix WDOG_RST iomux function
   imx: mx35pdk: Convert to iomux-v3
   imx: woodburn: Convert to iomux-v3
   imx: mx35: Remove legacy iomux support
   imx: iomux-mx51: Fix MX51_PAD_EIM_CS2__GPIO2_27
   imx: iomux-v3: Add missing definitions to iomux-mx51.h
   imx: mx51evk: Convert to iomux-v3
   imx: mx51_efikamx/sb: Convert to iomux-v3
   imx: vision2: Convert to iomux-v3
   imx: iomux-v3: Add iomux-mx53.h
   imx: ima3-mx53: Convert to iomux-v3
   imx: mx53ard: Convert to iomux-v3
   imx: mx53evk: Convert to iomux-v3
   imx: mx53loco: Convert to iomux-v3
   imx: mx53smd: Convert to iomux-v3
   imx: m53evk: Convert to iomux-v3
   imx: mx5: Remove legacy iomux support
   imx: mx35pdk: Fix MUX2_CTR GPIO
 
 Eric Benard (1):
   mx28evk: add trimffs to nand command
 
 Fabio Estevam (22):
   iomux-v3: Place pad control definitions into common file
   mx6: Add solo-lite variant support
   mx6sl: Add initial support for mx6slevk board
   imx: mx6q_4x_mt41j128.cfg: Setup CCM_CCOSR register
   nitrogen6x: Setup CCM_CCOSR register
   mx51evk: Update environment in order to allow booting a dt kernel
   mx51evk: Do not force the rootfs type
   mx5: Define a common get_board_rev()
   mx5: Select CONFIG_REVISION_TAG
   mx53ard: Move register masks into imx-regs.h
   mx23: Put back RAM voltage level to its original value
   mx23: Fix pad voltage selection bit
   mx23evk: Fix DDR pin iomux settings
   mx23_olinuxino: Fix DDR pin iomux settings
   mxs: spl_mem_init: Fix comment about start bit
   mxs: spl_mem_init: Remove erroneous DDR setting
   mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers
   mxs: spl_mem_init: Change EMI port priority
   mx23: Operate DDR voltage supply at 2.5V
   mx23evk: Do not set voltage selection bit for SSP pads
   mx23_olinuxino: Do not set voltage selection bit for SSP pads
   mxs: Explain why some mx23 DDR registers are not configured
 
 Marek Vasut (13):
   tools: arm: imx: Implement BOOT_OFFSET command for imximage
   imx: Align the imximage header and payload to multiples of 4k
   nand: Add SPL_NAND support to mxc_nand_spl
   arm: imx: Pack u-boot.bin into uImage for SPL
   arm: mx5: Add SPL support code to MX5
   arm: mx5: Add NAND clock handling
   arm: mx5: Add support for DENX M53EVK
   arm: mx23: Fix VDDMEM misconfiguration
   arm: mxs: Preprocess u-boot.bd so they contain full path
   arm: mxs: Add LCDIF clock configuration function
   arm: mxs: Add LCDIF registers for i.MX233
   arm: mxs: Add MXS LCDIF driver
   arm: mxs: video: Enable MXS LCDIF on M28EVK
 
 Otavio Salvador (9):
   mx6qsabre{sd, auto}: Add update_sd_firmware support
   mx6qsabresd: Return status when initializing MMC
   wandboard: Use env storage info for mmcdev/mmcpart
   wandboard: Add update_sd_firmware support
   wandboard: Add card detection for SOM MicroSD card
   wandboard: Add support for Carrier Board MicroSD card
   wandboard: Add boot selection support
   mxs: mxsboot: Move sdcard BCB header to 4 sectors offset
   mx53ard: Rework default environment to support FDT, MMC and netboot
 
 Philip Paeps (2):
   mx35 iomux: correct offsets of IOMUX 

Re: [U-Boot] [PATCH 4/4] arm: factorize relocate_code routine

2013-05-11 Thread Albert ARIBAUD
Hi Benoît,

On Sat, 11 May 2013 04:04:09 +0200 (CEST), Benoît Thébaudeau
benoit.thebaud...@advansee.com wrote:

 Hi Albert,
 
 On Friday, May 10, 2013 11:56:52 PM, Albert ARIBAUD wrote:
  Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net

  diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
  index ada91a6..3078bec 100644
  --- a/arch/arm/cpu/pxa/start.S
  +++ b/arch/arm/cpu/pxa/start.S
  @@ -170,90 +170,6 @@ reset:
   
  bl  _main
   
  -/*--*/
  -#ifndef CONFIG_SPL_BUILD
  -/*
  - * void relocate_code(addr_moni)
  - *
  - * This function relocates the monitor code.
  - */
  -   .globl  relocate_code
  -relocate_code:
  -   mov r6, r0  /* save addr of destination */
  -
  -/* Disable the Dcache RAM lock for stack now */
  -#ifdef CONFIG_CPU_PXA25X
  -   mov r12, lr
  -   bl  cpu_init_crit
  -   mov lr, r12
  -#endif  
 
 What about this thing that you silently drop?

Overlook on my side, and PXA is not one of my test vehicles so I
missed it while testing. Will 'undrop' in V2.

  diff --git a/arch/arm/lib/relocate.S b/arch/arm/lib/relocate.S
  new file mode 100644
  index 000..ce533ca
  --- /dev/null
  +++ b/arch/arm/lib/relocate.S
  @@ -0,0 +1,100 @@
  +/*
  + *  relocate - common relocation function for ARM U-Boot
  + *
  + *  Copyright (c) 2013  Albert ARIBAUD albert.u.b...@aribaud.net
  + *
  + * 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
  + */
  +
  +/*
  + * These are defined in the board-specific linker script.
  + * Subtracting _start from them lets the linker put their
  + * relative position in the executable instead of leaving
  + * them null.
  + */
  +
  +   .globl  __image_copy_start
  +   .globl  __image_copy_end
  +   .globl  __rel_dyn_start
  +   .globl  __rel_dyn_end
  +   .globl  __dynsym_start
 
 .globl is for exporting symbols to the linker, not importing, so the lines 
 above
 should be removed.

correct. Will drop in V2.

  +
  +/*--*/
  +
  +/*
  + * void relocate_code(addr_moni)
  + *
  + * This function relocates the monitor code.
  + */
  +   .globl  relocate_code
  +relocate_code:
 
 Or ENTRY(relocate_code) instead of the two lines above.

I'd gone for just moving code around rather than cosmetic, but I can do
the cosmetic change at the end of the patch too.

  +   mov r6, r0  /* save addr of destination */
  +
  +   ldr r0, =_start
 
 This is wrong. Here, r0 will get _start link-time address, while with 'adr' in
 the original code, r0 was getting _start runtime address, which is not the 
 same
 for all boards. relocate_code() is and must stay position-independent code, at
 least for SPL.
 
 E.g., for mx31pdk or tx25, the SPL is first loaded by the boot ROM
in the NAND
 Flash controller buffer, then executed from there. The SPL then has to use
 relocate_code() to relocate itself to CONFIG_SPL_TEXT_BASE in order to free 
 the
 NFC buffer to load U-Boot from NAND Flash. This means that 'ldr r0, =_start'
 would set r0 to CONFIG_SPL_TEXT_BASE, while 'adr r0, _start' sets r0 to the
 address of the NFC buffer. Since the SPL calls relocate_code() with
 CONFIG_SPL_TEXT_BASE, the 'ldr' choice would just result in a branch to
 relocate_done below, which would abort the relocation and break the boot on
 those boards.
 
 The issue is that 'adr' requires that _start be defined in the same file and
 section. That's why my patch 31/31 was using a macro to define relocate_code()
 in the start.S files. Perhaps some other constructs like
 'sub r0, pc, . - _start' would work, but I doubt it if _start is not in the 
 same
 file and section since this is exactly how 'adr' is translated.

Alright, so -- formally, there is no assumption that code running before
relocation must be position-independent, as far as I remember. The
assumption is that it is designed to run at the link-time location, and
that it is responsible for making sure that the rest of the code is
properly relocated and thus will run at whatever location it was moved
to.

In the case you mention, SPL does not relocate itself: it only *moves*

Re: [U-Boot] Beagle-XM: u-boot SPL fat support (was Re: [opensuse-arm] Beagleboard Xm CPU speed)

2013-05-11 Thread Alexander Graf


Am 11.05.2013 um 02:08 schrieb Wolfgang Denk w...@denx.de:

 Dear Alexander,
 
 In message 154a1277-6344-4ab8-9d98-58bbcc38c...@suse.de you wrote:
 
 Well, that would make the situation on OMAP slightly better, but
 wouldn't help on other SoCs. I think we should rather try and get a
 reasonably unified boot environment up across the board first :).
 
 Well, this all depends on which resources are available on the SoC
 in question.  If all you have is 4 kB on chip memory, then you will
 not be able to load the file system code at all.

Sure, and different boards also have different IO channels. But couldn't we 
define at least some tiers, with capable enough boards to run standard distros 
at least getting unified?

If you need to tailor the OS you want to execute there's little point in 
unifying the boot method for it. It's very valuable to have defaults across the 
board once you can run the same kernel and user space though.


Alex

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


Re: [U-Boot] [PATCH 2/4] arm: make __image_copy_{start, end} compiler-generated

2013-05-11 Thread Albert ARIBAUD
Hi Benoît,

On Sat, 11 May 2013 02:25:02 +0200 (CEST), Benoît Thébaudeau
benoit.thebaud...@advansee.com wrote:

 Hi Albert,

  diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
  index ccea2d5..ab8fd56 100644
  --- a/arch/arm/cpu/arm1136/start.S
  +++ b/arch/arm/cpu/arm1136/start.S
  @@ -104,10 +104,6 @@ _TEXT_BASE:
   _bss_start_ofs:
  .word __bss_start - _start
   
  -.globl _image_copy_end_ofs
 
 Wasn't _image_copy_end_ofs used outside of start.S? Same question for all the
 start.S files.

No -- and the build would have failed if it was. The only user of
__image_copy_end_ofs is the start.S which defines it, and only for the
purpose of preventing the assembler from generating an R_ARM_ABS32
relocation to __image_copy_end.

  diff --git a/arch/arm/cpu/arm1136/u-boot-spl.lds
  b/arch/arm/cpu/arm1136/u-boot-spl.lds
  index 8296e5d..04fc881 100644
  --- a/arch/arm/cpu/arm1136/u-boot-spl.lds
  +++ b/arch/arm/cpu/arm1136/u-boot-spl.lds
  @@ -37,7 +37,6 @@ SECTIONS
   {
  .text  :
  {
  -   __start = .;
arch/arm/cpu/arm1136/start.o  (.text*)
*(.text*)
  } .sram
  @@ -48,7 +47,9 @@ SECTIONS
  . = ALIGN(4);
  .data : { *(SORT_BY_ALIGNMENT(.data*)) } .sram
  . = ALIGN(4);
  +
  __image_copy_end = .;
 
 Why aren't all linker scripts treated equally?
 
 Here, start.S is still used, so '*(.__image_copy_end)' and the related stuff
 should be like what you did for arch/arm/cpu/u-boot.lds below. Or am I missing
 something?
 
 Same question for several other linker scripts below.

Not all SPLs use relocation -- actually, most SPLs do not use
relocation, and thus do not need image and relocaton section symbols.

  diff --git a/arch/arm/cpu/u-boot.lds b/arch/arm/cpu/u-boot.lds
  index d9bbee3..5b43621 100644
  --- a/arch/arm/cpu/u-boot.lds
  +++ b/arch/arm/cpu/u-boot.lds
  @@ -33,7 +33,7 @@ SECTIONS
  . = ALIGN(4);
  .text :
  {
  -   __image_copy_start = .;
  +   *(.__image_copy_start)
 
 Are there any users of __image_copy_start?

(see below)

  diff --git a/arch/arm/lib/sections.c b/arch/arm/lib/sections.c
  index 99eda59..80a0c38 100644
  --- a/arch/arm/lib/sections.c
 +++ b/arch/arm/lib/sections.c

  @@ -37,3 +37,5 @@
   
   char __bss_start[0] __attribute__((used, section(.__bss_start)));
   char __bss_end[0] __attribute__((used, section(.__bss_end)));
  +char __image_copy_start[0] __attribute__((used,
  section(.__image_copy_start)));
 
 Ditto.

The only user of __image_copy_start is the relocation routine which
uses _start but should actually use __image_copy_start (will fix in V2),
to match with the semantics introduced when fixing CONFIG_SPL_MAX_SIZE
semantics in 6ebc3461.
 
 Best regards,
 Benoît

Thanks 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] [PULL] : Please pull u-boot-imx - correction

2013-05-11 Thread Albert ARIBAUD
On Sat, 11 May 2013 09:30:57 +0200, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 Hi Stefano,
 
 On Tue, 07 May 2013 09:55:08 +0200, Stefano Babic sba...@denx.de
 wrote:
 
  Hi Albert,
  
  please pull from u-boot-imx, thanks !
  
  The following changes since commit f2e8a87305a55652488af140adcf65b1e688f287:
  
exynos: fdt: Add TMU node for snow (2013-04-17 10:00:44 +0900)
  
  are available in the git repository at:
  
git://www.denx.de/git/u-boot-imx.git master
  
  for you to fetch changes up to d782c1fe7246301143ed78c0d86ea6c81f9325f9:
  
arm: mxs: video: Enable MXS LCDIF on M28EVK (2013-05-06 17:40:23 +0200)
  
  
  Benoît Thébaudeau (40):
imx: Homogenize and fix fuse register definitions
imx: Add useful fuse definitions
Add fuse API and commands
Add fsl_iim driver
mpc: iim: Switch to common fsl_iim
mx51evk: Enable support for iim
Add mxc_ocotp driver
mx6qsabrelite: Enable support for ocotp
nitrogen6x: Enable support for ocotp
imx: Document fuse assignments for MAC addresses
imx: iomux-v3: Fix common pad control definitions
imx: iomux-v3: cosmetic: Reorganize definitions
imx: iomux-v3: Restore Linux's NEW_PAD_CTRL() macro
imx: iomux-v3: Include PKE and PUE to pad control pull definitions
imx: iomux-v3: Add iomux-mx25.h
imx: mx25pdk: Convert to iomux-v3
imx: mx25pdk: Fix GPIO assignments
imx: tx25: Convert to iomux-v3
imx: zmx25: Convert to iomux-v3
imx: mx25: Remove legacy iomux support
imx: iomux-v3: Add iomux-mx35.h
imx: flea3: Convert to iomux-v3
imx: mx35pdk: Fix WDOG_RST iomux function
imx: mx35pdk: Convert to iomux-v3
imx: woodburn: Convert to iomux-v3
imx: mx35: Remove legacy iomux support
imx: iomux-mx51: Fix MX51_PAD_EIM_CS2__GPIO2_27
imx: iomux-v3: Add missing definitions to iomux-mx51.h
imx: mx51evk: Convert to iomux-v3
imx: mx51_efikamx/sb: Convert to iomux-v3
imx: vision2: Convert to iomux-v3
imx: iomux-v3: Add iomux-mx53.h
imx: ima3-mx53: Convert to iomux-v3
imx: mx53ard: Convert to iomux-v3
imx: mx53evk: Convert to iomux-v3
imx: mx53loco: Convert to iomux-v3
imx: mx53smd: Convert to iomux-v3
imx: m53evk: Convert to iomux-v3
imx: mx5: Remove legacy iomux support
imx: mx35pdk: Fix MUX2_CTR GPIO
  
  Eric Benard (1):
mx28evk: add trimffs to nand command
  
  Fabio Estevam (22):
iomux-v3: Place pad control definitions into common file
mx6: Add solo-lite variant support
mx6sl: Add initial support for mx6slevk board
imx: mx6q_4x_mt41j128.cfg: Setup CCM_CCOSR register
nitrogen6x: Setup CCM_CCOSR register
mx51evk: Update environment in order to allow booting a dt kernel
mx51evk: Do not force the rootfs type
mx5: Define a common get_board_rev()
mx5: Select CONFIG_REVISION_TAG
mx53ard: Move register masks into imx-regs.h
mx23: Put back RAM voltage level to its original value
mx23: Fix pad voltage selection bit
mx23evk: Fix DDR pin iomux settings
mx23_olinuxino: Fix DDR pin iomux settings
mxs: spl_mem_init: Fix comment about start bit
mxs: spl_mem_init: Remove erroneous DDR setting
mxs: spl_mem_init: Skip the initialization of some DRAM_CTL registers
mxs: spl_mem_init: Change EMI port priority
mx23: Operate DDR voltage supply at 2.5V
mx23evk: Do not set voltage selection bit for SSP pads
mx23_olinuxino: Do not set voltage selection bit for SSP pads
mxs: Explain why some mx23 DDR registers are not configured
  
  Marek Vasut (13):
tools: arm: imx: Implement BOOT_OFFSET command for imximage
imx: Align the imximage header and payload to multiples of 4k
nand: Add SPL_NAND support to mxc_nand_spl
arm: imx: Pack u-boot.bin into uImage for SPL
arm: mx5: Add SPL support code to MX5
arm: mx5: Add NAND clock handling
arm: mx5: Add support for DENX M53EVK
arm: mx23: Fix VDDMEM misconfiguration
arm: mxs: Preprocess u-boot.bd so they contain full path
arm: mxs: Add LCDIF clock configuration function
arm: mxs: Add LCDIF registers for i.MX233
arm: mxs: Add MXS LCDIF driver
arm: mxs: video: Enable MXS LCDIF on M28EVK
  
  Otavio Salvador (9):
mx6qsabre{sd, auto}: Add update_sd_firmware support
mx6qsabresd: Return status when initializing MMC
wandboard: Use env storage info for mmcdev/mmcpart
wandboard: Add update_sd_firmware support
wandboard: Add card detection for SOM MicroSD card
wandboard: Add support for Carrier Board MicroSD card
wandboard: Add boot selection support

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

2013-05-11 Thread Stefano Babic
On 11/05/2013 11:15, Albert ARIBAUD wrote:

Hi Albert,

 Applied to u-boot-arm/master (with two trivial merge resolutions),
 thanks!
 
 Seems like the trivial merge resolution was less trivial than I thought
 it was -- I accidentally removed from drivers/mtd/nand/mxc_nand_spl.c
 the definitions for nand_init() and nand_deselect(). For some reason
 I missed it in the MAKEALL -a arm I did. Rolling back and fixing this.

Please make modifications on top of your current tree - after your first
e-mail, I have already pulled from u-boot-arm and pushed to the server.
If you go back, I had to rebase my tree.

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
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 - correction

2013-05-11 Thread Albert ARIBAUD
Hi Stefano,

On Sat, 11 May 2013 11:39:58 +0200, Stefano Babic sba...@denx.de
wrote:

 On 11/05/2013 11:15, Albert ARIBAUD wrote:
 
 Hi Albert,
 
  Applied to u-boot-arm/master (with two trivial merge resolutions),
  thanks!
  
  Seems like the trivial merge resolution was less trivial than I thought
  it was -- I accidentally removed from drivers/mtd/nand/mxc_nand_spl.c
  the definitions for nand_init() and nand_deselect(). For some reason
  I missed it in the MAKEALL -a arm I did. Rolling back and fixing this.
 
 Please make modifications on top of your current tree - after your first
 e-mail, I have already pulled from u-boot-arm and pushed to the server.
 If you go back, I had to rebase my tree.

Argh! I had already had rolled back and have just finished testing.

I can roll forward again if you confirm that the u-boot-arm/master
branch you have is commit ec7023d.

Otherwise, please push the u-boot-arm/master your are based on onto the 
u-boot-imx repo under a new branch name, e.g.

git push ssh://gu-...@git.denx.de/u-boot-imx
u-boot-arm/master:master-aa

 Best regards,
 Stefano

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 - correction

2013-05-11 Thread Albert ARIBAUD
Hi Stefano,

On Sat, 11 May 2013 11:39:58 +0200, Stefano Babic sba...@denx.de
wrote:

 On 11/05/2013 11:15, Albert ARIBAUD wrote:
 
 Hi Albert,
 
  Applied to u-boot-arm/master (with two trivial merge resolutions),
  thanks!
  
  Seems like the trivial merge resolution was less trivial than I thought
  it was -- I accidentally removed from drivers/mtd/nand/mxc_nand_spl.c
  the definitions for nand_init() and nand_deselect(). For some reason
  I missed it in the MAKEALL -a arm I did. Rolling back and fixing this.
 
 Please make modifications on top of your current tree - after your first
 e-mail, I have already pulled from u-boot-arm and pushed to the server.
 If you go back, I had to rebase my tree.

Argh! I had already had rolled back and have just finished testing.

I can roll forward again if you confirm that the u-boot-arm/master
branch you have is commit ec7023d.

Otherwise, please push the u-boot-arm/master your are based on onto the 
u-boot-imx repo under a new branch name, e.g.

git push ssh://gu-...@git.denx.de/u-boot-imx
u-boot-arm/master:master-aa

 Best regards,
 Stefano

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 - correction

2013-05-11 Thread Stefano Babic
On 11/05/2013 11:47, Albert ARIBAUD wrote:
 Hi Stefano,
 

Hi Albert,

 Argh! I had already had rolled back and have just finished testing.
 
 I can roll forward again if you confirm that the u-boot-arm/master
 branch you have is commit ec7023d.

It is !

commit ec7023db8dc95966919589541f1ca09355a3f7a5
Merge: e825b10 d782c1f
Author: Albert ARIBAUD albert.u.b...@aribaud.net
Date:   Sat May 11 09:25:36 2013 +0200

Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

Best regards,
Stefano

-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
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 - correction

2013-05-11 Thread Stefano Babic
On 11/05/2013 12:50, Stefano Babic wrote:
 On 11/05/2013 11:47, Albert ARIBAUD wrote:
 Hi Stefano,

 
 Hi Albert,
 
 Argh! I had already had rolled back and have just finished testing.

 I can roll forward again if you confirm that the u-boot-arm/master
 branch you have is commit ec7023d.
 
 It is !
 
 commit ec7023db8dc95966919589541f1ca09355a3f7a5
 Merge: e825b10 d782c1f
 Author: Albert ARIBAUD albert.u.b...@aribaud.net
 Date:   Sat May 11 09:25:36 2013 +0200
 
 Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
 

I have also pushed u-boot-arm as you suggest with the name uboot_arm on
u-boot-imx.

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
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 - correction

2013-05-11 Thread Albert ARIBAUD
Hi Stefano,

On Sat, 11 May 2013 12:50:24 +0200, Stefano Babic sba...@denx.de
wrote:

 On 11/05/2013 11:47, Albert ARIBAUD wrote:
  Hi Stefano,
  
 
 Hi Albert,
 
  Argh! I had already had rolled back and have just finished testing.
  
  I can roll forward again if you confirm that the u-boot-arm/master
  branch you have is commit ec7023d.
 
 It is !

Ok, but just a sec. If I put a commit above this, you'll *also* have to
rebase, won't you?

(BTW, I thought rebasing was frowned upon and we should merge instead.)

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 - correction

2013-05-11 Thread Albert ARIBAUD
Hi Stefano,

On Sat, 11 May 2013 12:58:56 +0200, Stefano Babic sba...@denx.de
wrote:

 On 11/05/2013 12:50, Stefano Babic wrote:
  On 11/05/2013 11:47, Albert ARIBAUD wrote:
  Hi Stefano,
 
  
  Hi Albert,
  
  Argh! I had already had rolled back and have just finished testing.
 
  I can roll forward again if you confirm that the u-boot-arm/master
  branch you have is commit ec7023d.
  
  It is !
  
  commit ec7023db8dc95966919589541f1ca09355a3f7a5
  Merge: e825b10 d782c1f
  Author: Albert ARIBAUD albert.u.b...@aribaud.net
  Date:   Sat May 11 09:25:36 2013 +0200
  
  Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
  
 
 I have also pushed u-boot-arm as you suggest with the name uboot_arm on
 u-boot-imx.

Er... Seems like arm_master is exactly the same as u-boot-imx/master. I
thought your master was rebased upon my master?

 Best regards,
 Stefano

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 - correction

2013-05-11 Thread Stefano Babic
On 11/05/2013 13:01, Albert ARIBAUD wrote:

 It is !
 
 Ok, but just a sec. If I put a commit above this, you'll *also* have to
 rebase, won't you?

Well, I have not yet published any iMX patches after merging u-boot-arm
this morning. At this point, u-boot-imx is equal to u-boot-arm at commit
commit ec7023, after you pulled u-boot-imx. There is no iMX patches
after that, and that is the reason why it should work.

See u-boot-imx, master: last commit is ec7023.

If you put a commit above, I should merge again your u-boot-arm/master
(and this should go flawless) and only after that I can apply iMX
patches, that I have not yet published.

 
 (BTW, I thought rebasing was frowned upon and we should merge instead.)

Of course ! We should only merge

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
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 - correction

2013-05-11 Thread Stefano Babic
On 11/05/2013 13:07, Albert ARIBAUD wrote:
 Hi Stefano,
 

Hi Albert,

 
 Er... Seems like arm_master is exactly the same as u-boot-imx/master. I
 thought your master was rebased upon my master?

I haved pulled your master this morning, and there are not new iMX patches.

Best regards,
Stefano


-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
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 - correction

2013-05-11 Thread Albert ARIBAUD
Hi Stefano,

On Sat, 11 May 2013 13:15:37 +0200, Stefano Babic sba...@denx.de
wrote:

 On 11/05/2013 13:01, Albert ARIBAUD wrote:
 
  It is !
  
  Ok, but just a sec. If I put a commit above this, you'll *also* have to
  rebase, won't you?
 
 Well, I have not yet published any iMX patches after merging u-boot-arm
 this morning. At this point, u-boot-imx is equal to u-boot-arm at commit
 commit ec7023, after you pulled u-boot-imx. There is no iMX patches
 after that, and that is the reason why it should work.
 
 See u-boot-imx, master: last commit is ec7023.
 
 If you put a commit above, I should merge again your u-boot-arm/master
 (and this should go flawless) and only after that I can apply iMX
 patches, that I have not yet published.
 
  
  (BTW, I thought rebasing was frowned upon and we should merge instead.)
 
 Of course ! We should only merge

Ok, so I prefer getting things right before I proceed: after I merged
your PR, you did not rebase your master, you (fast-forward) merged my
master to it. What you have rebased is your next branch, right?

 Best regards,
 Stefano

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 - correction

2013-05-11 Thread Stefano Babic
On 11/05/2013 13:26, Albert ARIBAUD wrote:

 Of course ! We should only merge
 
 Ok, so I prefer getting things right before I proceed: after I merged
 your PR, you did not rebase your master,

Right ! Never !

 you (fast-forward) merged my
 master to it.

Correct !

 What you have rebased is your next branch, right?

Right !

Best regards,
Stefano

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


Re: [U-Boot] [v2] Please pull u-boot-mpc85xx.git

2013-05-11 Thread Tom Rini
On Fri, May 10, 2013 at 02:26:35PM -0500, Andy Fleming wrote:

 The following changes since commit 4e779ad2e54e39d5343c8c83b4fc686a7bb16859:
 
   gpio: Add support for microblaze xilinx GPIO (2013-05-09 11:20:08 +0200)
 
 are available in the git repository at:
 
   git://www.denx.de/git/u-boot-mpc85xx.git master
 
 for you to fetch changes up to 65744debd1763f7499b11f7566615926adcae53b:
 
   powerpc: Add T4160QDS (2013-05-10 14:14:08 -0500)
 
 
 Andy Fleming (2):
   powerpc/mpc85xx: Add definitions for HDBCR registers
   e6500: Move L1 enablement after L2 enablement
 
 Roy ZANG (1):
   powerpc/pcie: add PCIe version 3.x support
 [fixed this by adding #include asm/fsl_pci.h to 83xx pcie.c file]

Still blowing some stuff up:
Configuring for mpc8308_p1m board...
/home/trini/work/u-boot/u-boot/mpc8308_p1m/include2/asm/fsl_pci.h:299:2:
error: 
#error FT_FSL_PCI_SETUP not defined
/home/trini/work/u-boot/u-boot/mpc8308_p1m/include2/asm/fsl_pci.h:71:16:
error: 
redefinition of 'struct pci_outbound_window'

- SUMMARY 
Boards compiled: 636
Boards with errors: 7 ( mpc8308_p1m MPC8315ERDB_NAND MPC8315ERDB
MPC837XERDB MPC837XEMDS_HOST MERGERBOX MPC8308RDB )

-- 
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 1/2] doc/README.scrapyard: add missing commit IDs

2013-05-11 Thread Wolfgang Denk
Signed-off-by: Wolfgang Denk w...@denx.de
---
 doc/README.scrapyard | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/README.scrapyard b/doc/README.scrapyard
index 2cdb8a9..48c7e4a 100644
--- a/doc/README.scrapyard
+++ b/doc/README.scrapyard
@@ -11,8 +11,8 @@ easily if here is something they might want to dig for...
 
 BoardArchCPUCommit  Removed Last known 
maintainer/contact
 
=
-smdk6400 arm arm1176-   -   Zhong 
Hongbo bocui...@gmail.com
-ns9750devarm arm926ejs  -   -   Markus 
Pietrek mpiet...@fsforth.de
+smdk6400 arm arm117652587f12013-04-12  Zhong 
Hongbo bocui...@gmail.com
+ns9750devarm arm926ejs  4cfc6112013-02-28  Markus 
Pietrek mpiet...@fsforth.de
 AMX860   powerpc mpc860 1b0757e 2012-10-28  Wolfgang 
Denk w...@denx.de
 c2monpowerpc mpc855 1b0757e 2012-10-28  Wolfgang 
Denk w...@denx.de
 ETX094   powerpc mpc850 1b0757e 2012-10-28  Wolfgang 
Denk w...@denx.de
-- 
1.8.1.4

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


[U-Boot] [PATCH 0/2] Power: remove support for Freescale MPC8220

2013-05-11 Thread Wolfgang Denk
The Freescale MPC8220 Power Architecture processors have long reached
EOL; Freescale does not even list these any more on their web site.

Remove the code to avoid wasting maitaining efforts on dead stuff.

Wolfgang Denk (2):
  doc/README.scrapyard: add missing commit IDs
  Power: remove support for Freescale MPC8220

 MAKEALL  |   7 -
 README   |   1 -
 api/api_platform-powerpc.c   |   2 -
 arch/powerpc/cpu/mpc8220/Makefile|  50 --
 arch/powerpc/cpu/mpc8220/config.mk   |  27 -
 arch/powerpc/cpu/mpc8220/cpu.c   | 104 
 arch/powerpc/cpu/mpc8220/cpu_init.c  | 136 -
 arch/powerpc/cpu/mpc8220/dma.h   |  68 ---
 arch/powerpc/cpu/mpc8220/dramSetup.c | 752 
 arch/powerpc/cpu/mpc8220/dramSetup.h | 108 
 arch/powerpc/cpu/mpc8220/fec.c   | 961 ---
 arch/powerpc/cpu/mpc8220/fec.h   | 283 -
 arch/powerpc/cpu/mpc8220/fec_dma_tasks.S | 363 
 arch/powerpc/cpu/mpc8220/i2c.c   | 388 -
 arch/powerpc/cpu/mpc8220/i2cCore.c   | 627 
 arch/powerpc/cpu/mpc8220/i2cCore.h   | 103 
 arch/powerpc/cpu/mpc8220/interrupts.c|  80 ---
 arch/powerpc/cpu/mpc8220/io.S| 128 
 arch/powerpc/cpu/mpc8220/loadtask.c  |  78 ---
 arch/powerpc/cpu/mpc8220/pci.c   | 191 --
 arch/powerpc/cpu/mpc8220/speed.c | 125 
 arch/powerpc/cpu/mpc8220/start.S | 734 ---
 arch/powerpc/cpu/mpc8220/traps.c | 231 
 arch/powerpc/cpu/mpc8220/u-boot.lds  |  91 ---
 arch/powerpc/cpu/mpc8220/uart.c  | 142 -
 arch/powerpc/include/asm/global_data.h   |   6 -
 arch/powerpc/include/asm/immap_8220.h| 246 
 arch/powerpc/include/asm/u-boot.h|   8 -
 arch/powerpc/lib/board.c |  24 -
 arch/powerpc/lib/bootm.c |   7 -
 board/alaska/Makefile|  44 --
 board/alaska/README  | 482 
 board/alaska/alaska.c| 153 -
 board/alaska/flash.c | 945 --
 board/sorcery/Makefile   |  44 --
 board/sorcery/sorcery.c  |  68 ---
 boards.cfg   |   3 -
 common/board_f.c |  24 -
 common/cmd_bdinfo.c  |   7 -
 doc/README.scrapyard |   7 +-
 doc/driver-model/UDM-pci.txt |   6 +-
 drivers/serial/serial.c  |   2 -
 include/asm-generic/u-boot.h |   8 -
 include/common.h |   6 -
 include/configs/Alaska8220.h | 334 ---
 include/configs/Yukon8220.h  | 326 ---
 include/configs/sorcery.h| 298 --
 include/mpc8220.h| 717 ---
 include/netdev.h |   1 -
 include/ppc_asm.tmpl |   2 +-
 50 files changed, 7 insertions(+), 9541 deletions(-)
 delete mode 100644 arch/powerpc/cpu/mpc8220/Makefile
 delete mode 100644 arch/powerpc/cpu/mpc8220/config.mk
 delete mode 100644 arch/powerpc/cpu/mpc8220/cpu.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/cpu_init.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/dma.h
 delete mode 100644 arch/powerpc/cpu/mpc8220/dramSetup.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/dramSetup.h
 delete mode 100644 arch/powerpc/cpu/mpc8220/fec.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/fec.h
 delete mode 100644 arch/powerpc/cpu/mpc8220/fec_dma_tasks.S
 delete mode 100644 arch/powerpc/cpu/mpc8220/i2c.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/i2cCore.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/i2cCore.h
 delete mode 100644 arch/powerpc/cpu/mpc8220/interrupts.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/io.S
 delete mode 100644 arch/powerpc/cpu/mpc8220/loadtask.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/pci.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/speed.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/start.S
 delete mode 100644 arch/powerpc/cpu/mpc8220/traps.c
 delete mode 100644 arch/powerpc/cpu/mpc8220/u-boot.lds
 delete mode 100644 arch/powerpc/cpu/mpc8220/uart.c
 delete mode 100644 arch/powerpc/include/asm/immap_8220.h
 delete mode 100644 board/alaska/Makefile
 delete mode 100644 board/alaska/README
 delete mode 100644 board/alaska/alaska.c
 delete mode 100644 board/alaska/flash.c
 delete mode 100644 board/sorcery/Makefile
 delete mode 100644 board/sorcery/sorcery.c
 delete mode 100644 include/configs/Alaska8220.h
 delete mode 100644 include/configs/Yukon8220.h
 delete mode 100644 include/configs/sorcery.h
 delete mode 100644 include/mpc8220.h

-- 
Cc: Andy Fleming aflem...@gmail.com
Cc: Tom Rini tr...@ti.com
1.8.1.4

___
U-Boot mailing list
U-Boot@lists.denx.de

Re: [U-Boot] [PATCH 4/4] arm: factorize relocate_code routine

2013-05-11 Thread Benoît Thébaudeau
Hi Albert,

On Saturday, May 11, 2013 9:40:02 AM, Albert ARIBAUD wrote:
 Hi Benoît,
 
 On Sat, 11 May 2013 04:04:09 +0200 (CEST), Benoît Thébaudeau
 benoit.thebaud...@advansee.com wrote:
 
  Hi Albert,
  
  On Friday, May 10, 2013 11:56:52 PM, Albert ARIBAUD wrote:
   Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net

[...]

   + mov r6, r0  /* save addr of destination */
   +
   + ldr r0, =_start
  
  This is wrong. Here, r0 will get _start link-time address, while with 'adr'
  in
  the original code, r0 was getting _start runtime address, which is not the
  same
  for all boards. relocate_code() is and must stay position-independent code,
  at
  least for SPL.
  
  E.g., for mx31pdk or tx25, the SPL is first loaded by the boot ROM
 in the NAND
  Flash controller buffer, then executed from there. The SPL then has to use
  relocate_code() to relocate itself to CONFIG_SPL_TEXT_BASE in order to free
  the
  NFC buffer to load U-Boot from NAND Flash. This means that 'ldr r0,
  =_start'
  would set r0 to CONFIG_SPL_TEXT_BASE, while 'adr r0, _start' sets r0 to the
  address of the NFC buffer. Since the SPL calls relocate_code() with
  CONFIG_SPL_TEXT_BASE, the 'ldr' choice would just result in a branch to
  relocate_done below, which would abort the relocation and break the boot on
  those boards.
  
  The issue is that 'adr' requires that _start be defined in the same file
  and
  section. That's why my patch 31/31 was using a macro to define
  relocate_code()
  in the start.S files. Perhaps some other constructs like
  'sub r0, pc, . - _start' would work, but I doubt it if _start is not in the
  same
  file and section since this is exactly how 'adr' is translated.
 
 Alright, so -- formally, there is no assumption that code running before
 relocation must be position-independent, as far as I remember. The
 assumption is that it is designed to run at the link-time location, and
 that it is responsible for making sure that the rest of the code is
 properly relocated and thus will run at whatever location it was moved
 to.
 
 In the case you mention, SPL does not relocate itself: it only *moves*
 itself, skipping the actual relocation (reference fixing part) -- it
 could havdoe so with a short ad hoc loop instead of relocate_code, and
 thus not impose a specific requirement on relocate_code that was not
 initially there. I'd be happier with a preprocessor conditional at the
 crt0.S stage to choose between relocate_code and a new, short,
 move_code routine depending on whether we are building SPL or not.
 
 That being said, I am fine with trying to make the code before
 relocation as position-independent as possible anyway; let me see how
 this can be done.

OK, I let you try something. Otherwise, I agree with what you say above. The
original code for the non-SPL part below is not position-independent, so it is
safe to assume that only the beginning of relocate_code() (before
'#ifndef CONFIG_SPL_BUILD') should be position-independent, and only for SPL. It
is also probably true that the initial runtime address of all SPLs is known at
build time, so a new CONFIG_SPL_ could be created for that purpose and used in a
dedicated small SPL copy routine, which would also make the need for SPL move
testable at build time, and solve the 'adr' vs. 'ldr' issue.

   + subsr9, r6, r0  /* r9 - relocation offset */
   + beq relocate_done   /* skip relocation */
   + mov r1, r6  /* r1 - scratch for copy_loop */
   + ldr r2, =__image_copy_end
   +
   +copy_loop:
   + ldmia   r0!, {r10-r11}  /* copy from source address [r0]*/
   + stmia   r1!, {r10-r11}  /* copy to   target address [r1]*/
   + cmp r0, r2  /* until source end address [r2]*/
   + blo copy_loop
   +
   +#ifndef CONFIG_SPL_BUILD
   + /*
   +  * fix .rel.dyn relocations
   +  */
   + ldr r0, =_TEXT_BASE /* r0 - Text base */
  
  The value you load above into r0 then gets overwritten prior to having been
  used, so you can drop this line, all the more it is wrong, loading the
  address
  of _TEXT_BASE instead of its value.
 
 Correct. Will fix in V2.
 
   + ldr r10, =__dynsym_start/* r10 - sym table ofs */
   + ldr r2, =__rel_dyn_start/* r2 - rel dyn start ofs */
   + ldr r3, =__rel_dyn_end  /* r3 - rel dyn end ofs */
  
  'ofs' should be replaced with 'in FLASH' in the comments above.
  
  Contrary to above, this construct works here because this can't be SPL
  code.
 
 Actually, this would not work either if used by non-SPL code as SPL code
 expects to use it, e.g. by loading U-Boot at another address -- the
 issue is in the use scenario, not in the requirements for SPL vs.
 U-Boot.

Right, but this new code behaves exactly in the same way as the original code,
so it is safe to assume that there is no such use scenario. This new code just
can't introduce a regression.

   +relocate_done:
   +
   + bx  lr
  
  

[U-Boot] [PATCH] Revert wrong removal of nand_init and nand_deselect

2013-05-11 Thread Albert ARIBAUD
The manual resolution in commit ec7023db wrongly removed functions
nand_init and nand_deselect from file drivers/mtd/nand/mxc_nand_spl.c.
Revert this removal.

Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
---
 drivers/mtd/nand/mxc_nand_spl.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c
index f13d5fc..ba725e9 100644
--- a/drivers/mtd/nand/mxc_nand_spl.c
+++ b/drivers/mtd/nand/mxc_nand_spl.c
@@ -359,3 +359,6 @@ void nand_boot(void)
}
 }
 #endif
+
+void nand_init(void) {}
+void nand_deselect(void) {}
-- 
1.7.10.4

___
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 - correction

2013-05-11 Thread Albert ARIBAUD
Hi Stefano,

On Sat, 11 May 2013 13:36:45 +0200, Stefano Babic sba...@denx.de
wrote:

 Correct !

Ok - ARM repo rolled forward to ec7023db and patch sent to the list. Ack
it and I'll apply it onto ARM repo.

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] EXYNOS: SPI: Support SPI_PREAMBLE mode

2013-05-11 Thread Simon Glass
Hi,

On Thu, May 2, 2013 at 7:28 PM, Vadim Bendebury vben...@chromium.org wrote:
 On Thu, Mar 21, 2013 at 11:29 PM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 Support interfaces with a preamble before each received message.

 We handle this when the client has requested a SPI_XFER_END, meaning
 that we must close of the transaction. In this case we read until we
 see the preamble (or a timeout occurs), skipping all data before and
 including the preamble. The client will receive only data bytes after
 the preamble.

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  drivers/spi/exynos_spi.c |   62 
 --
  1 files changed, 54 insertions(+), 8 deletions(-)

 diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
 index be60ada..09e88d5 100644
 --- a/drivers/spi/exynos_spi.c
 +++ b/drivers/spi/exynos_spi.c
 @@ -51,6 +51,7 @@ struct exynos_spi_slave {
 unsigned int mode;
 enum periph_id periph_id;   /* Peripheral ID for this device */
 unsigned int fifo_size;
 +   int skip_preamble;
  };

  static struct spi_bus *spi_get_bus(unsigned dev_index)
 @@ -107,6 +108,8 @@ struct spi_slave *spi_setup_slave(unsigned int busnum, 
 unsigned int cs,
 else
 spi_slave-fifo_size = 256;

 +   spi_slave-skip_preamble = 0;
 +
 spi_slave-freq = bus-frequency;
 if (max_hz)
 spi_slave-freq = min(max_hz, spi_slave-freq);
 @@ -219,17 +222,23 @@ static void spi_request_bytes(struct exynos_spi *regs, 
 int count)
 writel(count | SPI_PACKET_CNT_EN, regs-pkt_cnt);
  }

 -static void spi_rx_tx(struct exynos_spi_slave *spi_slave, int todo,
 -   void **dinp, void const **doutp)
 +static int spi_rx_tx(struct exynos_spi_slave *spi_slave, int todo,
 +   void **dinp, void const **doutp, unsigned long flags)
  {
 struct exynos_spi *regs = spi_slave-regs;
 uchar *rxp = *dinp;
 const uchar *txp = *doutp;
 int rx_lvl, tx_lvl;
 uint out_bytes, in_bytes;
 +   int toread, preamable_count = 0;

 preamable_count: the name is misspelled, and the variable is never modified.

Yes, it is supposed to count the number of bytes before the preamble,
in the event of an error, but it isn't really needed. I will resend
the patch with it removed.

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


Re: [U-Boot] [PATCH 1/2] SPI: Add support for preamble bytes

2013-05-11 Thread Simon Glass
On Fri, Mar 22, 2013 at 12:29 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 A SPI slave may take time to react to a request. For SPI flash devices
 this time is defined as one bit time, or a whole byte for 'fast read'
 mode.

 If the SPI slave is another CPU, then the time it takes to react may
 vary. It is convenient to allow the slave device to tag the start of
 the actual reply so that the host can determine when this 'preamble'
 finishes and the actual message starts.

 Add a preamble flag to the available SPI flags. If supported by the
 driver then it will ignore any received bytes before the preamble
 on each transaction. This ensures that reliable communication with
 the slave is possible.

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v1 2/2] blackfin: bf609: add softswitch config command

2013-05-11 Thread Sonic Zhang
Hi Tom


On Wed, Feb 27, 2013 at 4:37 PM, Sonic Zhang sonic@gmail.com wrote:
 From: Bob Liu lliu...@gmail.com

 Add softswitch_output command for bf609-ezkit to enable softswitches.

 Signed-off-by: Bob Liu lliu...@gmail.com
 Signed-off-by: Sonic Zhang sonic.zh...@analog.com
 ---
  arch/blackfin/include/asm/soft_switch.h |   18 +
  board/bf609-ezkit/soft_switch.c |   11 +---
  board/bf609-ezkit/soft_switch.h |   25 +--
  common/Makefile |1 +
  common/cmd_softswitch.c |   41 
 +++
  include/configs/bf609-ezkit.h   |1 +
  6 files changed, 79 insertions(+), 18 deletions(-)
  create mode 100644 arch/blackfin/include/asm/soft_switch.h
  create mode 100644 common/cmd_softswitch.c

 diff --git a/arch/blackfin/include/asm/soft_switch.h 
 b/arch/blackfin/include/asm/soft_switch.h
 new file mode 100644
 index 000..ff8e44d
 --- /dev/null
 +++ b/arch/blackfin/include/asm/soft_switch.h
 @@ -0,0 +1,18 @@
 +/*
 + * U-boot - main board file
 + *
 + * Copyright (c) 2008-2012 Analog Devices Inc.
 + *
 + * Licensed under the GPL-2 or later.
 + */
 +
 +#ifndef __SOFT_SWITCH_H__
 +#define __SOFT_SWITCH_H__
 +
 +#define IO_PORT_A  0
 +#define IO_PORT_B  1
 +#define IO_PORT_INPUT  0
 +#define IO_PORT_OUTPUT 1
 +
 +int config_switch_bit(int num, int port, int bit, int dir, uchar value);
 +#endif
 diff --git a/board/bf609-ezkit/soft_switch.c b/board/bf609-ezkit/soft_switch.c
 index 2e1404f..e0c8d93 100644
 --- a/board/bf609-ezkit/soft_switch.c
 +++ b/board/bf609-ezkit/soft_switch.c
 @@ -12,14 +12,6 @@
  #include i2c.h
  #include soft_switch.h

 -#define SWITCH_ADDR 0x21
 -
 -#define NUM_SWITCH  3
 -#define IODIRA  0x0
 -#define IODIRB  0x1
 -#define OLATA   0x14
 -#define OLATB   0x15
 -
  struct switch_config {
 uchar dir0; /* IODIRA */
 uchar dir1; /* IODIRB */
 @@ -126,9 +118,8 @@ static int setup_soft_switch(int addr, struct 
 switch_config *config)
 return i2c_write(addr, IODIRB, 1, config-dir1, 1);
  }

 -int config_switch_bit(int num, int port, int bit, int dir, uchar value)
 +int config_switch_bit(int addr, int port, int bit, int dir, uchar value)
  {
 -   int addr = SWITCH_ADDR + num;
 int ret, data_reg, dir_reg;
 uchar tmp;

 diff --git a/board/bf609-ezkit/soft_switch.h b/board/bf609-ezkit/soft_switch.h
 index 8da0e44..d147fe1 100644
 --- a/board/bf609-ezkit/soft_switch.h
 +++ b/board/bf609-ezkit/soft_switch.h
 @@ -6,8 +6,10 @@
   * Licensed under the GPL-2 or later.
   */

 -#ifndef __SOFT_SWITCH_H__
 -#define __SOFT_SWITCH_H__
 +#ifndef __BOARD_SOFT_SWITCH_H__
 +#define __BOARD_SOFT_SWITCH_H__
 +
 +#include asm/soft_switch.h

  /* switch 0 port A */
  #define CAN_EN 0x1
 @@ -61,11 +63,18 @@
  #define PD3_SPI0MOSI_EN0x1
  #define PD4_SPI0CK_EN  0x2

 -#define IO_PORT_A  0
 -#define IO_PORT_B  1
 -#define IO_PORT_INPUT  0
 -#define IO_PORT_OUTPUT 1
 +#ifdef CONFIG_BFIN_BOARD_VERSION_1_0
 +#define SWITCH_ADDR 0x21
 +#else
 +#define SWITCH_ADDR 0x20
 +#endif
 +
 +#define NUM_SWITCH  3
 +#define IODIRA  0x0
 +#define IODIRB  0x1
 +#define OLATA   0x14
 +#define OLATB   0x15

 -int config_switch_bit(int num, int port, int bit, int dir, uchar value);
  int setup_board_switches(void);
 -#endif
 +
 +#endif /* __BOARD_SOFT_SWITCH_H__ */
 diff --git a/common/Makefile b/common/Makefile
 index 54fcc81..80fee78 100644
 --- a/common/Makefile
 +++ b/common/Makefile
 @@ -157,6 +157,7 @@ COBJS-$(CONFIG_CMD_SF) += cmd_sf.o
  COBJS-$(CONFIG_CMD_SCSI) += cmd_scsi.o
  COBJS-$(CONFIG_CMD_SHA1SUM) += cmd_sha1sum.o
  COBJS-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o
 +COBJS-$(CONFIG_CMD_SOFTSWITCH) += cmd_softswitch.o
  COBJS-$(CONFIG_CMD_SPI) += cmd_spi.o
  COBJS-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o
  COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o
 diff --git a/common/cmd_softswitch.c b/common/cmd_softswitch.c
 new file mode 100644
 index 000..f75d926
 --- /dev/null
 +++ b/common/cmd_softswitch.c
 @@ -0,0 +1,41 @@
 +/*
 + * cmd_softswitch.c - set the softswitch for bf60x
 + *
 + * Copyright (c) 2012 Analog Devices Inc.
 + *
 + * Licensed under the GPL-2 or later.
 + */
 +
 +#include common.h
 +#include command.h
 +#include asm/blackfin.h
 +#include asm/soft_switch.h
 +
 +int do_softswitch(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 +{
 +   int switchaddr, value, pin, port;
 +
 +   if (argc != 5)
 +   return CMD_RET_USAGE;
 +
 +   if (strcmp(argv[2], GPA) == 0)
 +   port = IO_PORT_A;
 +   else if (strcmp(argv[2], GPB) == 0)
 +   port = IO_PORT_B;
 +   else
 +   return CMD_RET_USAGE;
 +
 +   switchaddr = simple_strtoul(argv[1], NULL, 16);
 +   pin = simple_strtoul(argv[3], 

[U-Boot] [PATCH v2] EXYNOS: SPI: Support SPI_PREAMBLE mode

2013-05-11 Thread Simon Glass
From: Rajeshwari Shinde rajeshwar...@samsung.com

Support interfaces with a preamble before each received message.

We handle this when the client has requested a SPI_XFER_END, meaning
that we must close of the transaction. In this case we read until we
see the preamble (or a timeout occurs), skipping all data before and
including the preamble. The client will receive only data bytes after
the preamble.

Signed-off-by: Simon Glass s...@chromium.org
Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
---
Changes in v2:
- Remove preamable_count variable which is not really needed
- Fix checkpatch warning (multiple assignments)

 drivers/spi/exynos_spi.c | 62 +---
 1 file changed, 54 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/exynos_spi.c b/drivers/spi/exynos_spi.c
index 607e1cd..b7b2ea5 100644
--- a/drivers/spi/exynos_spi.c
+++ b/drivers/spi/exynos_spi.c
@@ -51,6 +51,7 @@ struct exynos_spi_slave {
unsigned int mode;
enum periph_id periph_id;   /* Peripheral ID for this device */
unsigned int fifo_size;
+   int skip_preamble;
 };
 
 static struct spi_bus *spi_get_bus(unsigned dev_index)
@@ -105,6 +106,8 @@ struct spi_slave *spi_setup_slave(unsigned int busnum, 
unsigned int cs,
else
spi_slave-fifo_size = 256;
 
+   spi_slave-skip_preamble = 0;
+
spi_slave-freq = bus-frequency;
if (max_hz)
spi_slave-freq = min(max_hz, spi_slave-freq);
@@ -217,17 +220,23 @@ static void spi_request_bytes(struct exynos_spi *regs, 
int count)
writel(count | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 }
 
-static void spi_rx_tx(struct exynos_spi_slave *spi_slave, int todo,
-   void **dinp, void const **doutp)
+static int spi_rx_tx(struct exynos_spi_slave *spi_slave, int todo,
+   void **dinp, void const **doutp, unsigned long flags)
 {
struct exynos_spi *regs = spi_slave-regs;
uchar *rxp = *dinp;
const uchar *txp = *doutp;
int rx_lvl, tx_lvl;
uint out_bytes, in_bytes;
+   int toread;
+   unsigned start = get_timer(0);
+   int stopping;
 
out_bytes = in_bytes = todo;
 
+   stopping = spi_slave-skip_preamble  (flags  SPI_XFER_END) 
+   !(spi_slave-mode  SPI_SLAVE);
+
/*
 * If there's something to send, do a software reset and set a
 * transaction size.
@@ -238,6 +247,7 @@ static void spi_rx_tx(struct exynos_spi_slave *spi_slave, 
int todo,
 * Bytes are transmitted/received in pairs. Wait to receive all the
 * data because then transmission will be done as well.
 */
+   toread = in_bytes;
while (in_bytes) {
int temp;
 
@@ -250,13 +260,41 @@ static void spi_rx_tx(struct exynos_spi_slave *spi_slave, 
int todo,
}
if (rx_lvl  0  in_bytes) {
temp = readl(regs-rx_data);
-   if (rxp)
+   if (!rxp  !stopping) {
+   in_bytes--;
+   } else if (spi_slave-skip_preamble) {
+   if (temp == SPI_PREAMBLE_END_BYTE) {
+   spi_slave-skip_preamble = 0;
+   stopping = 0;
+   }
+   } else {
*rxp++ = temp;
-   in_bytes--;
+   in_bytes--;
+   }
+   toread--;
+   }
+   /*
+* We have run out of input data, but haven't read enough
+* bytes after the preamble yet. Read some more, and make
+* sure that we transmit dummy bytes too, to keep things
+* going.
+*/
+   else if (in_bytes  !toread) {
+   assert(!out_bytes);
+   out_bytes = in_bytes;
+   toread = in_bytes;
+   txp = NULL;
+   spi_request_bytes(regs, toread);
+   }
+   if (spi_slave-skip_preamble  get_timer(start)  100) {
+   printf(SPI timeout: in_bytes=%d, out_bytes=%d, ,
+  in_bytes, out_bytes);
+   return -1;
}
}
*dinp = rxp;
*doutp = txp;
+   return 0;
 }
 
 /**
@@ -276,6 +314,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, 
const void *dout,
struct exynos_spi_slave *spi_slave = to_exynos_spi(slave);
int upto, todo;
int bytelen;
+   int ret = 0;
 
/* spi core configured to do 8 bit transfers */
if (bitlen % 8) {
@@ -289,16 +328,22 @@ int spi_xfer(struct spi_slave *slave, unsigned int 
bitlen, const void *dout,
 
/* Exynos 

Re: [U-Boot] [PATCH v2] EXYNOS: SPI: Support SPI_PREAMBLE mode

2013-05-11 Thread Simon Glass
On Sat, May 11, 2013 at 9:04 AM, Simon Glass s...@chromium.org wrote:
 From: Rajeshwari Shinde rajeshwar...@samsung.com

 Support interfaces with a preamble before each received message.

 We handle this when the client has requested a SPI_XFER_END, meaning
 that we must close of the transaction. In this case we read until we
 see the preamble (or a timeout occurs), skipping all data before and
 including the preamble. The client will receive only data bytes after
 the preamble.

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in v2:
 - Remove preamable_count variable which is not really needed
 - Fix checkpatch warning (multiple assignments)

This v2 patch fixes the nits reported.

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] EXYNOS: Export timer_get_us() to get microsecond timer

2013-05-11 Thread Simon Glass
On Fri, Mar 22, 2013 at 6:45 PM, Simon Glass s...@chromium.org wrote:
 Hi Rajeshwari,

 On Fri, Mar 22, 2013 at 5:28 AM, Rajeshwari Shinde
 rajeshwar...@samsung.com wrote:
 This function, if implemented by the board, provides a microsecond
 timer. The granularity may be larger than 1us if hardware does not
 support this.

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  include/common.h |8 
  1 files changed, 8 insertions(+), 0 deletions(-)

 diff --git a/include/common.h b/include/common.h
 index 4ad17ea..0c21edc 100644
 --- a/include/common.h
 +++ b/include/common.h
 @@ -558,6 +558,14 @@ void ddr_enable_ecc(unsigned int dram_size);
  #endif
  #endif

 +#if defined CONFIG_EXYNOS5

 I don't think we need the #ifdef. If some boards don't have then that is OK.

Further to this, I suppose we can always remove the #ifdef when other
boards define the function. So:

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2] EXYNOS: SPI: Support a delay after deactivate

2013-05-11 Thread Simon Glass
On Fri, Mar 22, 2013 at 6:28 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 For devices that need some time to react after a spi transaction
 finishes, add the ability to set a delay.

 Implement this as a delay on the first/next transaction to avoid
 any delay in the fairly common case where a SPI transaction is
 followed by other processing.

 Based on:
 EXYNOS: SPI: Support SPI_PREAMBLE mode
 link: http://patchwork.ozlabs.org/patch/229891/

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] EXYNOS: SPI: Minimise access to SPI FIFO level

2013-05-11 Thread Simon Glass
On Fri, Mar 22, 2013 at 8:09 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 Accessing SPI registers is slow, but access to the FIFO level register
 in particular seems to be extraordinarily expensive (I measure up to
 600ns). Perhaps it is required to synchronise with the SPI byte output
 logic which might run at 1/8th of the 40MHz SPI speed (just a guess).

 Reduce access to this register by filling up and emptying FIFOs
 more completely, rather than just one word each time around the inner
 loop.

 Since the rxfifo value will now likely be much greater that what we read
 before we fill the txfifo, we only fill the txfifo halfway. This is
 because if the txfifo is empty, but the rxfifo has data in it, then writing
 too much data to the txfifo may overflow the rxfifo as data arrives.

 This speeds up SPI flash reading from about 1MB/s to about 2MB/s on snow.

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] EXYNOS: SPL: Add a custom spi copy function

2013-05-11 Thread Simon Glass
Hi Rajeshwari,

On Wed, Mar 27, 2013 at 4:28 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This CL implements a custom spi_copy funtion to copy u-boot from SF to
 RAM. This is faster then iROM spi_copy funtion as this runs spi at 50Mhz
 and also in WORD mode of operation.

 Changed a printf in pimux.c to debug just to avoid the the compilation
 error in SPL.
 Removed the enum for boot mode from spl_boot.c as it was already define in 
 spl.h

 Signed-off-by: Alim Akhtar alim.akh...@samsung.com
 Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
 Signe-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

This now conflicts with the MMC series. I have an updated patch so
will post it as a v2 to this one. That way the MMC patches can be
applied first, then all your SPI patches.

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


[U-Boot] [PATCH v2] EXYNOS: SPL: Add a custom spi copy function

2013-05-11 Thread Simon Glass
From: Rajeshwari Shinde rajeshwar...@samsung.com

This CL implements a custom spi_copy funtion to copy u-boot from SF to
RAM. This is faster then iROM spi_copy funtion as this runs spi at 50Mhz
and also in WORD mode of operation.

Changed a printf in pimux.c to debug just to avoid the the compilation
error in SPL.
Removed the enum for boot mode from spl_boot.c as it was already define in spl.h

Signed-off-by: Alim Akhtar alim.akh...@samsung.com
Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
Rebased on top of MMC series:
Signed-off-by: Simon Glass s...@chromium.org
---
Changes in v2:
- Rebase on top of MMC series
- Fix new checkpatch warnings

 arch/arm/cpu/armv7/exynos/pinmux.c |   2 +-
 arch/arm/include/asm/arch-exynos/spi.h |   2 +
 arch/arm/include/asm/arch-exynos/spl.h |   1 +
 board/samsung/smdk5250/spl_boot.c  | 132 +
 include/configs/exynos5250-dt.h|   3 +
 spl/Makefile   |   4 +
 6 files changed, 129 insertions(+), 15 deletions(-)

diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c 
b/arch/arm/cpu/armv7/exynos/pinmux.c
index bd499b4..c484a86 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -427,7 +427,7 @@ static int exynos4_pinmux_config(int peripheral, int flags)
case PERIPH_ID_SDMMC1:
case PERIPH_ID_SDMMC3:
case PERIPH_ID_SDMMC4:
-   printf(SDMMC device %d not implemented\n, peripheral);
+   debug(SDMMC device %d not implemented\n, peripheral);
return -1;
default:
debug(%s: invalid peripheral %d, __func__, peripheral);
diff --git a/arch/arm/include/asm/arch-exynos/spi.h 
b/arch/arm/include/asm/arch-exynos/spi.h
index e67ad27..3430ac1 100644
--- a/arch/arm/include/asm/arch-exynos/spi.h
+++ b/arch/arm/include/asm/arch-exynos/spi.h
@@ -43,6 +43,8 @@ struct exynos_spi {
 
 #define SPI_TIMEOUT_MS 10
 
+#define SF_READ_DATA_CMD   0x3
+
 /* SPI_CHCFG */
 #define SPI_CH_HS_EN   (1  6)
 #define SPI_CH_RST (1  5)
diff --git a/arch/arm/include/asm/arch-exynos/spl.h 
b/arch/arm/include/asm/arch-exynos/spl.h
index 46b25a6..59bb7e0 100644
--- a/arch/arm/include/asm/arch-exynos/spl.h
+++ b/arch/arm/include/asm/arch-exynos/spl.h
@@ -32,6 +32,7 @@ enum boot_mode {
 * pin values are the same across Exynos4 and Exynos5.
 */
BOOT_MODE_MMC = 4,
+   BOOT_MODE_EMMC = 8, /* EMMC4.4 */
BOOT_MODE_SERIAL = 20,
/* Boot based on Operating Mode pin settings */
BOOT_MODE_OM = 32,
diff --git a/board/samsung/smdk5250/spl_boot.c 
b/board/samsung/smdk5250/spl_boot.c
index 98f2286..8699d1d 100644
--- a/board/samsung/smdk5250/spl_boot.c
+++ b/board/samsung/smdk5250/spl_boot.c
@@ -22,6 +22,12 @@
 
 #includecommon.h
 #includeconfig.h
+#include spi.h
+#include asm/arch/clk.h
+#include asm/arch/spi.h
+#include asm/arch/pinmux.h
+#include asm/arch/periph.h
+#include asm/arch/spl.h
 
 #include asm/arch-exynos/dmc.h
 #include asm/arch/clock.h
@@ -48,15 +54,6 @@ u32 irom_ptr_table[] = {
[USB_INDEX] = 0x02020070,   /* iROM Function Pointer-USB boot*/
};
 
-enum boot_mode {
-   BOOT_MODE_MMC = 4,
-   BOOT_MODE_SERIAL = 20,
-   BOOT_MODE_EMMC = 8, /* EMMC4.4 */
-   /* Boot based on Operating Mode pin settings */
-   BOOT_MODE_OM = 32,
-   BOOT_MODE_USB,  /* Boot using USB download */
-};
-
 void *get_irom_func(int index)
 {
return (void *)*(u32 *)irom_ptr_table[index];
@@ -76,6 +73,115 @@ static int config_branch_prediction(int set_cr_z)
return cr  CR_Z;
 }
 
+static void spi_rx_tx(struct exynos_spi *regs, int todo,
+   void *dinp, void const *doutp, int i)
+{
+   uint *rxp = (uint *)(dinp + (i * (32 * 1024)));
+   int rx_lvl, tx_lvl;
+   uint out_bytes, in_bytes;
+
+   in_bytes = todo;
+   out_bytes = todo;
+   setbits_le32(regs-ch_cfg, SPI_CH_RST);
+   clrbits_le32(regs-ch_cfg, SPI_CH_RST);
+   writel(((todo * 8) / 32) | SPI_PACKET_CNT_EN, regs-pkt_cnt);
+
+   while (in_bytes) {
+   uint32_t spi_sts;
+   int temp;
+
+   spi_sts = readl(regs-spi_sts);
+   rx_lvl = ((spi_sts  15)  0x7f);
+   tx_lvl = ((spi_sts  6)  0x7f);
+   while (tx_lvl  32  out_bytes) {
+   temp = 0x;
+   writel(temp, regs-tx_data);
+   out_bytes -= 4;
+   tx_lvl += 4;
+   }
+   while (rx_lvl = 4  in_bytes) {
+   temp = readl(regs-rx_data);
+   if (rxp)
+   *rxp++ = temp;
+   in_bytes -= 4;
+   rx_lvl -= 4;
+   }
+   }
+}
+
+/**
+ * Copy uboot from spi flash to RAM
+ *
+ * @parma uboot_size   size of 

Re: [U-Boot] [PATCH v2] EXYNOS: SPL: Add a custom spi copy function

2013-05-11 Thread Simon Glass
Hi Rajeshwari,

On Sat, May 11, 2013 at 9:17 AM, Simon Glass s...@chromium.org wrote:
 From: Rajeshwari Shinde rajeshwar...@samsung.com

 This CL implements a custom spi_copy funtion to copy u-boot from SF to
 RAM. This is faster then iROM spi_copy funtion as this runs spi at 50Mhz
 and also in WORD mode of operation.

 Changed a printf in pimux.c to debug just to avoid the the compilation
 error in SPL.
 Removed the enum for boot mode from spl_boot.c as it was already define in 
 spl.h

 Signed-off-by: Alim Akhtar alim.akh...@samsung.com
 Signed-off-by: Tom Wai-Hong Tam waih...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 Rebased on top of MMC series:
 Signed-off-by: Simon Glass s...@chromium.org
 ---
 Changes in v2:
 - Rebase on top of MMC series
 - Fix new checkpatch warnings


Acked-by: Simon Glass s...@chromium.org

For all your SPI patches (listed below):

Tested-by:  Simon Glass s...@chromium.org

I have applied the MMC series and all of your SPI patches, and tested
on snow. Everything works correctly I think.

Original SPI speed is very slow:

SMDK5250 #  time sf read 4000 0 40

time: 1 minutes, 9.906 seconds, 69906 ticks

With your SPI patches and my 50MHz device tree patch I get:

SMDK5250 # time sf read 4000 0 40

time: 1.427 seconds, 1427 ticks

which is a dramatic improvement. If I turn on the caches (remove
CONFIG_SYS_DCACHE_OFF from include/configs/exynos5-dt.h) then it goes
at full sped:

SMDK5250 # time sf read 4000 0 40

time: 0.699 seconds, 699 ticks

Note that we are working on some further SPI code improvements locally
and may send patches for that, but it will be after the merge window.

For references, here are the patches in my tree when I tested (listed
in the reverse order they were applied).

660d9fd (HEAD, ws/snow, snow) exynos: dts: Use 50MHz SPI flash speed on snow
0295f39 EXYNOS: SPL: Add a custom spi copy function
e712583 EXYNOS: SPI: Support word transfers
aac5c2d EXYNOS: SPI: Minimise access to SPI FIFO level
99f2680 EXYNOS: SPI: Support a delay after deactivate
cbe66cb EXYNOS: Export timer_get_us() to get microsecond timer
893d152 EXYNOS: SPI: Support SPI_PREAMBLE mode
f4cce8b SPI: Add support for preamble bytes
f91072a exynos: Enable mmc for snow
aa1b39f COMMON: MMC: Command to support EMMC booting and to resize
EMMC boot partition
a6358a3 SMDK5250: Enable EMMC booting
e37cc9f MMC: APIs to support resize of EMMC boot partition
919c7f6 SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT
2277040 EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted results.
206af80 EXYNOS5: DWMMC: Added FDT support for DWMMC
0e8e41c DWMMC: Initialise dwmci and resolve EMMC read write issues
087075c EXYNOS5: FDT: Add DWMMC device node data
0f2db62 FDT: Add compatible string for DWMMC
6e4e37c EXYNOS5: I2C: Add FDT and non-FDT support for I2C


  arch/arm/cpu/armv7/exynos/pinmux.c |   2 +-
  arch/arm/include/asm/arch-exynos/spi.h |   2 +
  arch/arm/include/asm/arch-exynos/spl.h |   1 +
  board/samsung/smdk5250/spl_boot.c  | 132 
 +
  include/configs/exynos5250-dt.h|   3 +
  spl/Makefile   |   4 +
  6 files changed, 129 insertions(+), 15 deletions(-)


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


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

2013-05-11 Thread Sonic Zhang
Hi Tom,

On Thu, May 9, 2013 at 8:09 PM, Tom Rini tr...@ti.com wrote:

 Some number of these changes haven't been posted to the list for review
 yet.  I'm pretty sure.  I don't recall seeing the CONFIG_CMD_SOFTSWITCH
 stuff go past, and you didn't document that new flag in the top-level

I just forward the former softswtich command patch to you which
include the definition of CONFIG_CMD_SOFTSWITCH. What else do you
think are missing?

 README.  Also, you did a merge of your patman branch which means there's
 extra stuff in your commit messages.

Because this command is only implemented for blackfin by now. Should I
explan this limitation in the README as well?


 Please submit the new patches to the mailing list, and re-submit the
 pull request with everything else you do have ready.  Thanks!


Yes, I just figured out my patman subfolder isn't equal to the
upstream master, but I didn't add any stuff except for doing rebase.
It looks some upstream patches may be lost during rebase. I will try
to redo rebase and re-submit the pull request.

The difference are as following:

diff -urN u-boot-blackfin/tools/patman/patman u-boot.up/tools/patman/patman
--- u-boot-blackfin/tools/patman/patman 2013-05-11 23:11:43.158054437 +0800
+++ u-boot.up/tools/patman/patman 2013-05-11 23:00:34.050736519 +0800
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright (c) 2011 The Chromium OS Authors.
 #
diff -urN u-boot-blackfin/tools/patman/patman.py
u-boot.up/tools/patman/patman.py
--- u-boot-blackfin/tools/patman/patman.py 2013-05-11 23:11:43.158054437 +0800
+++ u-boot.up/tools/patman/patman.py 2013-05-11 23:00:34.050736519 +0800
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright (c) 2011 The Chromium OS Authors.
 #
diff -urN u-boot-blackfin/tools/patman/series.py
u-boot.up/tools/patman/series.py
--- u-boot-blackfin/tools/patman/series.py 2013-05-11 23:11:43.158054437 +0800
+++ u-boot.up/tools/patman/series.py 2013-05-11 23:00:34.050736519 +0800
@@ -40,6 +40,7 @@
 notes: List of lines in the notes
 changes: (dict) List of changes for each version, The key is
 the integer version number
+allow_overwrite: Allow tags to overwrite an existing tag
 
 def __init__(self):
 self.cc = []
@@ -49,6 +50,7 @@
 self.cover = None
 self.notes = []
 self.changes = {}
+self.allow_overwrite = False

 # Written in MakeCcFile()
 #  key: name of patch file
@@ -72,7 +74,7 @@
 
 # If we already have it, then add to our list
 name = name.replace('-', '_')
-if name in self:
+if name in self and not self.allow_overwrite:
 values = value.split(',')
 values = [str.strip() for str in values]
 if type(self[name]) != type([]):


Regards,

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


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

2013-05-11 Thread Tom Rini
On Fri, May 10, 2013 at 07:21:46PM -0400, Jerry Van Baren wrote:

 Dear Tom,
 
 The following changes since commit 2988eac70ead3720f9ec85a239cd06b2f7246683:
 
   Merge branch 'patman' of git://git.denx.de/u-boot-x86 (2013-05-10
 08:16:34 -0400)
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-fdt.git master
 
 for you to fetch changes up to bbd0f7e3ba66d288a2f146f1c7797801e04598ae:
 
   Move FDT_RAMDISK_OVERHEAD from fdt.h to libfdt_env.h (2013-05-10
 19:04:50 -0400)
 
 Per my email and consensus, I have *not* included Simon's patch
   libfdt: Add fdt_next_subnode() to permit easy subnode iteration
 which Tom has or will apply as part of Simon's full sandbox patchset.
 
 Thanks,
 gvb
 
 
 Fran?ois Revol (1):
   Fix typo
 
 Gerald Van Baren (1):
   Move FDT_RAMDISK_OVERHEAD from fdt.h to libfdt_env.h
 
 Justin Sobota (1):
   Added license header to dtc/libfdt/fdt.h and libfdt_env.h
 
 Simon Glass (1):
   Export fdt_stringlist_contains()
 
  include/fdt.h|   53
 --
  include/libfdt.h |   16 ++-
  include/libfdt_env.h |3 +++
  lib/libfdt/fdt_ro.c  |5 ++---
  4 files changed, 71 insertions(+), 6 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 request: u-boot-blackfin

2013-05-11 Thread Tom Rini
On Sat, May 11, 2013 at 11:27:41PM +0800, Sonic Zhang wrote:
 Hi Tom,
 
 On Thu, May 9, 2013 at 8:09 PM, Tom Rini tr...@ti.com wrote:
 
  Some number of these changes haven't been posted to the list for review
  yet.  I'm pretty sure.  I don't recall seeing the CONFIG_CMD_SOFTSWITCH
  stuff go past, and you didn't document that new flag in the top-level
 
 I just forward the former softswtich command patch to you which
 include the definition of CONFIG_CMD_SOFTSWITCH. What else do you
 think are missing?

Well, please go over everything else and make sure it's showing up in
patchwork.  I spotted one trivially so I don't know how many others
might have been missed.

  README.  Also, you did a merge of your patman branch which means there's
  extra stuff in your commit messages.
 
 Because this command is only implemented for blackfin by now. Should I
 explan this limitation in the README as well?

Yes.

  Please submit the new patches to the mailing list, and re-submit the
  pull request with everything else you do have ready.  Thanks!
 
 
 Yes, I just figured out my patman subfolder isn't equal to the
 upstream master, but I didn't add any stuff except for doing rebase.
 It looks some upstream patches may be lost during rebase. I will try
 to redo rebase and re-submit the pull request.

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 3/3] usb: Correct CLEAR_FEATURE code in ehci-hcd

2013-05-11 Thread Marek Vasut
Dear Simon Glass,

 This commit broke USB2 on link (Chromebook Pixel):
 
   020bbcb usb: hub: Power-cycle on root-hub ports
 
 However the root cause seems to be a missing mask and missing 'break'
 in ehci-hcd.c. This patch fixes both.
 
 On link, 'usb start' with a USB keyboard and memory stick inserted now
 finds both. The keyboard works as expected. Also ext2ls shows a directory
 listing from the memory stick.
 
 Signed-off-by: Simon Glass s...@chromium.org

Picking up all three, thanks!

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 3/3] usb: Correct CLEAR_FEATURE code in ehci-hcd

2013-05-11 Thread Simon Glass
On Sat, May 11, 2013 at 10:39 AM, Marek Vasut ma...@denx.de wrote:
 Dear Simon Glass,

 This commit broke USB2 on link (Chromebook Pixel):

   020bbcb usb: hub: Power-cycle on root-hub ports

 However the root cause seems to be a missing mask and missing 'break'
 in ehci-hcd.c. This patch fixes both.

 On link, 'usb start' with a USB keyboard and memory stick inserted now
 finds both. The keyboard works as expected. Also ext2ls shows a directory
 listing from the memory stick.

 Signed-off-by: Simon Glass s...@chromium.org

 Picking up all three, thanks!

Thanks, also Julius may have some comments on Monday. Two of the
patches were reviewed by him, but not the last one, although he
suggested it.

Regards,
Simon


 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 2/4] arm: make __image_copy_{start, end} compiler-generated

2013-05-11 Thread Benoît Thébaudeau
Hi Albert,

On Saturday, May 11, 2013 10:02:48 AM, Albert ARIBAUD wrote:
 Hi Benoît,
 
 On Sat, 11 May 2013 02:25:02 +0200 (CEST), Benoît Thébaudeau
 benoit.thebaud...@advansee.com wrote:
 
  Hi Albert,

[...]

   diff --git a/arch/arm/cpu/arm1136/u-boot-spl.lds
   b/arch/arm/cpu/arm1136/u-boot-spl.lds
   index 8296e5d..04fc881 100644
   --- a/arch/arm/cpu/arm1136/u-boot-spl.lds
   +++ b/arch/arm/cpu/arm1136/u-boot-spl.lds
   @@ -37,7 +37,6 @@ SECTIONS
{
 .text  :
 {
   - __start = .;
   arch/arm/cpu/arm1136/start.o  (.text*)
   *(.text*)
 } .sram
   @@ -48,7 +47,9 @@ SECTIONS
 . = ALIGN(4);
 .data : { *(SORT_BY_ALIGNMENT(.data*)) } .sram
 . = ALIGN(4);
   +
 __image_copy_end = .;
  
  Why aren't all linker scripts treated equally?
  
  Here, start.S is still used, so '*(.__image_copy_end)' and the related
  stuff
  should be like what you did for arch/arm/cpu/u-boot.lds below. Or am I
  missing
  something?
  
  Same question for several other linker scripts below.
 
 Not all SPLs use relocation -- actually, most SPLs do not use
 relocation, and thus do not need image and relocaton section symbols.

Then, why do you keep the old definition of __image_copy_end in such linker
scripts? Probably because start.S can't be linked in otherwise, but this is no
longer true at the end of this series with the new relocate.S that is garbage-
collected for those SPLs. And in all cases, shouldn't all linker scripts
requiring __image_copy_end be converted to the new definition?

[...]

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


Re: [U-Boot] [PATCH 3/3] usb: Correct CLEAR_FEATURE code in ehci-hcd

2013-05-11 Thread Marek Vasut
Dear Simon Glass,

 On Sat, May 11, 2013 at 10:39 AM, Marek Vasut ma...@denx.de wrote:
  Dear Simon Glass,
  
  This commit broke USB2 on link (Chromebook Pixel):
020bbcb usb: hub: Power-cycle on root-hub ports
  
  However the root cause seems to be a missing mask and missing 'break'
  in ehci-hcd.c. This patch fixes both.
  
  On link, 'usb start' with a USB keyboard and memory stick inserted now
  finds both. The keyboard works as expected. Also ext2ls shows a
  directory listing from the memory stick.
  
  Signed-off-by: Simon Glass s...@chromium.org
  
  Picking up all three, thanks!
 
 Thanks, also Julius may have some comments on Monday. Two of the
 patches were reviewed by him, but not the last one, although he
 suggested it.

I just build-tested them, seem OK.

btw. I might be less available this month, sorry about that.

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


Re: [U-Boot] [PATCH 1/4 V4] EXYNOS5: FDT: Add compatible strings for Serial

2013-05-11 Thread Simon Glass
On Tue, Apr 2, 2013 at 12:46 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 Add required compatible information for s5p serial driver

 Signed-off-by: Abhilash Kesavan a.kesa...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - Changed the compatible string to samsung,exynos4210-uart
 Changes in V3:
 - Rebased on latest u-boot-samsung
 Changes in V4:
 - Rebased on latest u-boot-samsung
 - Changed to COMPAT_SAMSUNG_EXYNOS5_SERIAL to 
 COMPAT_SAMSUNG_EXYNOS_SERIAL
  include/fdtdec.h |1 +
  lib/fdtdec.c |1 +
  2 files changed, 2 insertions(+), 0 deletions(-)

Tested on snow, console works correctly.

Acked-by: Simon Glass s...@chromium.org
Tested-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 4/4 V4] CONFIG: EXYNOS5: Enable silent console

2013-05-11 Thread Simon Glass
On Tue, Apr 2, 2013 at 12:46 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch enables CONFIG_SILENT_CONSOLE for EXYNOS5.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 Acked-by: Simon Glass s...@chromium.org
 ---
 Changes in V2:
 - None
 Changes in V3:
 - None
 Changes in V4:
 - None
  include/configs/exynos5250-dt.h |2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

Tested on snow, with a change to add the serial console info to the
device tree. Console works correctly and silent mode can be selected
from FDT as expected.

Tested-by: Simon Glass s...@chromium.org

Rajeshwari, please could you send a patch to add the serial FDT nodes
to snow also?

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


Re: [U-Boot] [PATCH 1/3 V5] EXYNOS5: Add gpio pin numbering feature

2013-05-11 Thread Simon Glass
HI Rajeshwari,

On Wed, Apr 3, 2013 at 5:54 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch adds support for gpio pin numbering support on
 EXYNOS5250
 To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.

 Signed-off-by: Leela Krishna Amudala l.kris...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
 Changes in V2:
 - none.
 Changes in V3:
 - none.
 Changes in V4:
 - To have consistent 0..n-1 GPIO numbering the banks are divided
 into different parts where ever they have holes in them.
 - Combined previous patch 1 and 2 into single patch.
 Changes in V5:
 - Removed Exynos5 specific code in gpio driver api to
 get bank.
 - Added #define HAVE_GENERIC_GPIO in config file
 to remove conditinal CPU check in gpio driver.

With this series I am getting errors in exynos5-dt.c:

25: EXYNOS5: Add gpio pin numbering feature
   arm: +   snow
+exynos5-dt.c: In function 'board_usb_vbus_init':
+exynos5-dt.c:79: error: 'struct exynos5_gpio_part1' has no member named 'x2'
+exynos5-dt.c: In function 'board_enable_audio_codec':
+exynos5-dt.c:95: error: 'struct exynos5_gpio_part1' has no member named 'x1'
+exynos5-dt.c:96: error: 'struct exynos5_gpio_part1' has no member named 'x1'
+exynos5-dt.c: In function 'exynos_cfg_lcd_gpio':
+exynos5-dt.c:412: error: 'struct exynos5_gpio_part1' has no member named 'x1'
+exynos5-dt.c:413: error: 'struct exynos5_gpio_part1' has no member named 'x1'
+exynos5-dt.c:416: error: 'struct exynos5_gpio_part1' has no member named 'x0'


This is probably due to new support added, so I think you need to
adjust your patch.

Here is the sequence I am testing with (reverse order of application):

9529fd4 (HEAD, ws/snow, snow) EXYNOS5: GPIO: Enable GPIO Command for EXYNOS5
0f81b33 S5P: Rename GPIO definitions
0c6254b EXYNOS5: Add gpio pin numbering feature
5a35ef9 CONFIG: EXYNOS5: Enable silent console
6083f4f S5P: Serial: Add fdt support to driver
2f78e0f EXYNOS5: FDT: Add serial device node values
5b85902 EXYNOS5: FDT: Add compatible strings for Serial
6402856 exynos: dts: Use 50MHz SPI flash speed on snow
1a6900e EXYNOS: SPL: Add a custom spi copy function
27530a7 EXYNOS: SPI: Support word transfers
7f8ba96 EXYNOS: SPI: Minimise access to SPI FIFO level
149742a EXYNOS: SPI: Support a delay after deactivate
f3d8caf EXYNOS: Export timer_get_us() to get microsecond timer
1aaa266 EXYNOS: SPI: Support SPI_PREAMBLE mode
2752d08 SPI: Add support for preamble bytes
279a5cb exynos: Enable mmc for snow
a6280ba COMMON: MMC: Command to support EMMC booting and to resize
EMMC boot partition
19425ea SMDK5250: Enable EMMC booting
5253ae0 MMC: APIs to support resize of EMMC boot partition
15bb05e SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT
eeef540 EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted results.
a4d8bf2 EXYNOS5: DWMMC: Added FDT support for DWMMC
71b87c4 DWMMC: Initialise dwmci and resolve EMMC read write issues
97c6565 EXYNOS5: FDT: Add DWMMC device node data
ec5fb8b FDT: Add compatible string for DWMMC
e7c528b EXYNOS5: I2C: Add FDT and non-FDT support for I2C

Regards,
Simon


  arch/arm/cpu/armv7/exynos/pinmux.c  |  150 --
  arch/arm/include/asm/arch-exynos/cpu.h  |   10 +-
  arch/arm/include/asm/arch-exynos/gpio.h |  452 
 +++
  board/samsung/smdk5250/smdk5250.c   |   24 +-
  drivers/gpio/s5p_gpio.c |   42 +++
  include/configs/exynos5250-dt.h |1 +
  6 files changed, 522 insertions(+), 157 deletions(-)

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


Re: [U-Boot] [PATCH] EXYNOS: Move includes from setup.h to tzpc_init.c

2013-05-11 Thread Simon Glass
On Wed, Apr 3, 2013 at 6:11 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 These should not be in the header since not every C file needs them.
 Move them to the file that needs them.

 Signed-off-by: Simon Glass s...@chromium.org
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Tested on snow.

Acked-by: Simon Glass s...@chromium.org
Tested-by: Simon Glass s...@chromium.org

 ---
  board/samsung/smdk5250/setup.h |3 ---
  board/samsung/smdk5250/tzpc_init.c |2 ++
  2 files changed, 2 insertions(+), 3 deletions(-)

 diff --git a/board/samsung/smdk5250/setup.h b/board/samsung/smdk5250/setup.h
 index 34d8bc3..68f48ea 100644
 --- a/board/samsung/smdk5250/setup.h
 +++ b/board/samsung/smdk5250/setup.h
 @@ -25,9 +25,6 @@
  #ifndef _SMDK5250_SETUP_H
  #define _SMDK5250_SETUP_H

 -#include config.h
 -#include asm/arch/dmc.h
 -
  /* TZPC : Register Offsets */
  #define TZPC0_BASE 0x1010
  #define TZPC1_BASE 0x1011
 diff --git a/board/samsung/smdk5250/tzpc_init.c 
 b/board/samsung/smdk5250/tzpc_init.c
 index c833541..96e5a6c 100644
 --- a/board/samsung/smdk5250/tzpc_init.c
 +++ b/board/samsung/smdk5250/tzpc_init.c
 @@ -22,6 +22,8 @@
   * MA 02111-1307 USA
   */

 +#include config.h
 +#include asm/arch/dmc.h
  #include asm/arch/tzpc.h
  #includesetup.h

 --
 1.7.4.4

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


Re: [U-Boot] [PATCH 1/4] EXYNOS: Add API for power reset and exit wakeup

2013-05-11 Thread Simon Glass
Hi Rajeshwari,

On Wed, Apr 24, 2013 at 11:57 PM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch adds APIs to get power reset status and exit the wakeup condition 
 for
 both exynos5 and exynos4

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com
 ---
  arch/arm/cpu/armv7/exynos/power.c|   50 
 ++
  arch/arm/include/asm/arch-exynos/power.h |   10 ++
  2 files changed, 60 insertions(+), 0 deletions(-)

 diff --git a/arch/arm/cpu/armv7/exynos/power.c 
 b/arch/arm/cpu/armv7/exynos/power.c
 index 6375a81..5d3bda2 100644
 --- a/arch/arm/cpu/armv7/exynos/power.c
 +++ b/arch/arm/cpu/armv7/exynos/power.c
 @@ -140,3 +140,53 @@ void set_hw_thermal_trip(void)
 setbits_le32(power-ps_hold_control, POWER_ENABLE_HW_TRIP);
 }
  }
 +
 +static uint32_t exynos5_get_reset_status(void)
 +{
 +   struct exynos5_power *power =
 +   (struct exynos5_power *)samsung_get_base_power();
 +
 +   return power-inform1;
 +}
 +
 +static uint32_t exynos4_get_reset_status(void)
 +{
 +   struct exynos4_power *power =
 +   (struct exynos4_power *)samsung_get_base_power();
 +
 +   return power-inform1;
 +}
 +
 +uint32_t get_reset_status(void)
 +{
 +   if (cpu_is_exynos5())
 +   return exynos5_get_reset_status();
 +   else
 +   return  exynos4_get_reset_status();
 +}
 +
 +static void exynos5_power_exit_wakeup(void)
 +{
 +   struct exynos5_power *power =
 +   (struct exynos5_power *)samsung_get_base_power();
 +   typedef void (*resume_func)(void);
 +
 +   ((resume_func)power-inform0)();
 +}
 +
 +static void exynos4_power_exit_wakeup(void)
 +{
 +   struct exynos4_power *power =
 +   (struct exynos4_power *)samsung_get_base_power();
 +   typedef void (*resume_func)(void);
 +
 +   ((resume_func)power-inform0)();
 +}
 +
 +void power_exit_wakeup(void)
 +{
 +   if (cpu_is_exynos5())
 +   exynos5_power_exit_wakeup();
 +   else
 +   exynos4_power_exit_wakeup();
 +}
 diff --git a/arch/arm/include/asm/arch-exynos/power.h 
 b/arch/arm/include/asm/arch-exynos/power.h
 index 3549667..98e1144 100644
 --- a/arch/arm/include/asm/arch-exynos/power.h
 +++ b/arch/arm/include/asm/arch-exynos/power.h
 @@ -888,4 +888,14 @@ void set_ps_hold_ctrl(void);
   * source as XXTI
   */
  void set_xclkout(void);
 +
 +/*
 + *  Read inform1 to get the reset status

Please can you expand this comment? What values are returned? Do you
have an enum that can be used to decode the values?

 + */
 +uint32_t get_reset_status(void);
 +
 +/*
 + *  Read the resume function and call it
 + */
 +void power_exit_wakeup(void);
  #endif
 --
 1.7.4.4


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


Re: [U-Boot] [PATCH 2/4] EXYNOS: LDS file move to common

2013-05-11 Thread Simon Glass
On Wed, Apr 24, 2013 at 11:57 PM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 smdk5250-uboot-spl.lds is moved to common folder, so that it can be reused.
 It is renamed to exynos-uboot-spl.lds

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Tested on snow.

Acked-by: Simon Glass s...@chromium.org
Tested-by: Simon Glass s...@chromium.org

 ---
  .../exynos-uboot-spl.lds}  |0
  include/configs/exynos5250-dt.h|2 +-
  2 files changed, 1 insertions(+), 1 deletions(-)
  rename board/samsung/{smdk5250/smdk5250-uboot-spl.lds = 
 common/exynos-uboot-spl.lds} (100%)

 diff --git a/board/samsung/smdk5250/smdk5250-uboot-spl.lds 
 b/board/samsung/common/exynos-uboot-spl.lds
 similarity index 100%
 rename from board/samsung/smdk5250/smdk5250-uboot-spl.lds
 rename to board/samsung/common/exynos-uboot-spl.lds
 diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
 index 4514e7a..03f896a 100644
 --- a/include/configs/exynos5250-dt.h
 +++ b/include/configs/exynos5250-dt.h
 @@ -144,7 +144,7 @@
  #define COPY_BL2_FNPTR_ADDR0x02020030

  /* specific .lds file */
 -#define CONFIG_SPL_LDSCRIPT
 board/samsung/smdk5250/smdk5250-uboot-spl.lds
 +#define CONFIG_SPL_LDSCRIPTboard/samsung/common/exynos-uboot-spl.lds
  #define CONFIG_SPL_TEXT_BASE   0x02023400
  #define CONFIG_SPL_MAX_FOOTPRINT   (14 * 1024)

 --
 1.7.4.4

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


Re: [U-Boot] [PATCH 3/4] EXYNOS4210: Configure GPIO for uart

2013-05-11 Thread Simon Glass
Hi Rajeshwari,

On Wed, Apr 24, 2013 at 11:57 PM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch configures the gpio values for UART
 on Origen and SMDKV310 using pinmux

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

I don't have hardware to test this but it seems OK to me.

Acked-by: Simon Glass s...@chromium.org

Regards,
Simon

 ---
  arch/arm/cpu/armv7/exynos/pinmux.c |   40 +++
  board/samsung/origen/origen.c  |   46 
 
  board/samsung/smdkv310/smdkv310.c  |   44 ++
  include/configs/origen.h   |1 +
  include/configs/smdkv310.h |1 +
  5 files changed, 132 insertions(+), 0 deletions(-)

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


Re: [U-Boot] [PATCH 4/4] EXYNOS: Move files from board/samsung to arch/arm.

2013-05-11 Thread Simon Glass
Hi Rajeshwari,

On Wed, Apr 24, 2013 at 11:57 PM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch performs the following:

 1) Convert the assembly code for memory and clock initialization to C code.
 2) Move the memory and clock init codes from board/samsung to arch/arm
 3) Creat a common lowlevel_init file across Exynos4 and Exynos5. Converted
the common lowlevel_init from assembly to C-code
 4) Made spl_boot.c and tzpc_init.c common for both exynos4 and exynos5.
 5) Enable CONFIG_SKIP_LOWLEVEL_INIT as stack pointer initialisation is already
 done in _main.
 6) exynos-uboot-spl.lds made common across SMDKV310, Origen and SMDK5250.

 TEST: Tested SD-MMC boot on SMDK5250 and Origen.
   Tested USB and SPI boot on SMDK5250
   Compile tested for SMDKV310.

 Signed-off-by: Hatim Ali hatim...@samsung.com
 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Congratulations on getting this patch together.

It looks correct, but I had some problems getting it to build.
Probably I am missing some other patch.

Configuring for smdk5250 board...
lowlevel_init.c: In function ‘do_lowlevel_init’:
lowlevel_init.c:50:2: warning: implicit declaration of function
‘get_reset_status’ [-Wimplicit-function-declaration]
spl_boot.c: In function ‘board_init_f’:
spl_boot.c:141:3: warning: implicit declaration of function
‘power_exit_wakeup’ [-Wimplicit-function-declaration]
arch/arm/cpu/armv7/exynos/libexynos.o: In function `board_init_f':
/mnt/host/source/src/third_party/u-boot/files/arch/arm/cpu/armv7/exynos/spl_boot.c:141:
undefined reference to `power_exit_wakeup'
arch/arm/cpu/armv7/exynos/libexynos.o: In function `do_lowlevel_init':
/mnt/host/source/src/third_party/u-boot/files/arch/arm/cpu/armv7/exynos/lowlevel_init.c:50:
undefined reference to `get_reset_status'
make[1]: *** [/mnt/host/source/src/third_party/u-boot/files/spl/u-boot-spl]
Error 1

I will send a separate email about the patch situation. Here are the
patches I applied in reverse order - please let me know if I missed
any.

d3858f7 (HEAD, snow2) EXYNOS: Move files from board/samsung to arch/arm.
e666035 hack: Remove TPM definitions from exysno5-dt.h so that next
patch applies cleanly
c9ec2d1 EXYNOS4210: Configure GPIO for uart
cf6e500 EXYNOS: LDS file move to common
a40665b EXYNOS: Add API for power reset and shutdown


Regards,
Simon

 ---
  arch/arm/cpu/armv7/exynos/Makefile |   14 +-
  .../arm/cpu/armv7/exynos}/clock_init.h |0
  arch/arm/cpu/armv7/exynos/clock_init_exynos4.c |   63 +++
  .../arm/cpu/armv7/exynos/clock_init_exynos5.c  |   26 +-
  arch/arm/cpu/armv7/exynos/common_setup.h   |   44 ++
  .../arm/cpu/armv7/exynos}/dmc_common.c |7 +-
  .../arm/cpu/armv7/exynos}/dmc_init_ddr3.c  |   17 +-
  arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c   |  294 
  .../arm/cpu/armv7/exynos/exynos4_setup.h   |   72 +++-
  .../arm/cpu/armv7/exynos/exynos5_setup.h   |   53 +--
  arch/arm/cpu/armv7/exynos/lowlevel_init.c  |   72 +++
  .../arm/cpu/armv7/exynos}/spl_boot.c   |   90 +++-
  .../arm/cpu/armv7/exynos}/tzpc_init.c  |   17 +-
  arch/arm/include/asm/arch-exynos/spl.h |1 +
  arch/arm/include/asm/arch-exynos/tzpc.h|   28 ++
  board/samsung/origen/Makefile  |7 -
  board/samsung/origen/lowlevel_init.S   |  397 -
  board/samsung/origen/mem_setup.S   |  421 --
  board/samsung/origen/mmc_boot.c|   58 ---
  board/samsung/smdk5250/Makefile|9 -
  board/samsung/smdk5250/lowlevel_init.S |2 +
  board/samsung/smdkv310/Makefile|   10 +-
  board/samsung/smdkv310/lowlevel_init.S |  470 
 
  board/samsung/smdkv310/mem_setup.S |  365 ---
  board/samsung/smdkv310/mmc_boot.c  |   60 ---
  include/configs/exynos5250-dt.h|   12 +-
  include/configs/origen.h   |9 +-
  include/configs/smdkv310.h |8 +-
  spl/Makefile   |4 +
  29 files changed, 728 insertions(+), 1902 deletions(-)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/clock_init.h 
 (100%)
  create mode 100644 arch/arm/cpu/armv7/exynos/clock_init_exynos4.c
  rename board/samsung/smdk5250/clock_init.c = 
 arch/arm/cpu/armv7/exynos/clock_init_exynos5.c (97%)
  create mode 100644 arch/arm/cpu/armv7/exynos/common_setup.h
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_common.c 
 (97%)
  rename {board/samsung/smdk5250 = arch/arm/cpu/armv7/exynos}/dmc_init_ddr3.c 
 (96%)
  create mode 100644 arch/arm/cpu/armv7/exynos/dmc_init_exynos4.c
  rename board/samsung/origen/origen_setup.h = 
 arch/arm/cpu/armv7/exynos/exynos4_setup.h (89%)
  rename 

Re: [U-Boot] [PATCH 2/3 V5] S5P: Rename GPIO definitions

2013-05-11 Thread Simon Glass
On Wed, Apr 3, 2013 at 5:54 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch rename GPIO definitions from GPIO_... to S5P_GPIO_...
 This changes was done to enable cmd_gpio for EXYNOS and
 cmd_gpio has GPIO_INPUT same as s5p_gpio driver and hence
 getting a error during compilation.

 Build tested for s5p_goni, origen, smdk5250, s5pc210_universal,
 trats, smdkc100, smdkv310 config files.

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Still looks good to me. Hope you can arrange the ordering to land this soon.

 ---
 Changes in V2:
 - New patch
 Changes in V3:
 - Created a table to know the base address of input bank.
 Changes in V4:
 - Moved the function name_to_gpio to s5p gpio driver and
 renamed to s5p_name_to_gpio.
 Changes in V5:
 - Rebased on latest u-boot-samsung tree
  arch/arm/cpu/armv7/exynos/pinmux.c   |  134 
 +++---
  arch/arm/include/asm/arch-exynos/gpio.h  |   26 +++---
  arch/arm/include/asm/arch-s5pc1xx/gpio.h |   26 +++---
  board/samsung/goni/goni.c|4 +-
  board/samsung/origen/origen.c|8 +-
  board/samsung/smdk5250/smdk5250.c|8 +-
  board/samsung/smdkc100/smdkc100.c|2 +-
  board/samsung/smdkv310/smdkv310.c|   10 +-
  board/samsung/trats/trats.c  |   17 ++--
  board/samsung/universal_c210/universal.c |   36 
  drivers/gpio/s5p_gpio.c  |   20 ++--
  11 files changed, 146 insertions(+), 145 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3 V5] EXYNOS5: GPIO: Enable GPIO Command for EXYNOS5

2013-05-11 Thread Simon Glass
On Wed, Apr 3, 2013 at 5:54 AM, Rajeshwari Shinde
rajeshwar...@samsung.com wrote:
 This patch enables GPIO Command for EXYNOS5.
 Function has been added to asm/gpio.h to decode the
 input gpio name to gpio number.
 example: gpio set gpa00

 Signed-off-by: Rajeshwari Shinde rajeshwar...@samsung.com

Acked-by: Simon Glass s...@chromium.org

 ---
 Changes in V2:
 - New patch
 Changes in V3:
 - Created a table to know the base address of input bank.
 Changes in V4:
 - Moved the function name_to_gpio to s5p gpio driver and
 renamed to s5p_name_to_gpio.
 Changes in V5:
 - Rebased on latest u-boot-samsung tree
  arch/arm/include/asm/arch-exynos/gpio.h |8 +
  drivers/gpio/s5p_gpio.c |   49 
 +++
  include/configs/exynos5250-dt.h |1 +
  3 files changed, 58 insertions(+), 0 deletions(-)

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


Re: [U-Boot] [PATCH 1/4] pmic: max77686: add pmic_set_voltage api for max77686

2013-05-11 Thread Simon Glass
Hi Akshay,

On Wed, Apr 3, 2013 at 12:27 AM, Akshay Saraswat aksha...@samsung.com wrote:
 This patch adds pmic_set_voltage api in max77686.
 As the name suggests, this api is required for switching
 voltage from one level to another.

 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 ---
  drivers/power/pmic/pmic_max77686.c | 61 
 ++
  include/power/max77686_pmic.h  | 12 
  include/power/pmic.h   |  1 +
  3 files changed, 74 insertions(+)

 diff --git a/drivers/power/pmic/pmic_max77686.c 
 b/drivers/power/pmic/pmic_max77686.c
 index 7fcb4c0..d8782f8 100644
 --- a/drivers/power/pmic/pmic_max77686.c
 +++ b/drivers/power/pmic/pmic_max77686.c
 @@ -77,3 +77,64 @@ int pmic_init(unsigned char bus)

 return 0;
  }
 +
 +int pmic_set_voltage(u32 new_voltage)
 +{
 +   struct pmic *p;
 +   u32 read_data, volt_level, ret;
 +
 +   p = pmic_get(MAX77686_PMIC);
 +   if (!p)
 +   return -ENODEV;
 +
 +   /* Read BUCK2 DVS1 value */
 +   ret = pmic_reg_read(p, MAX77686_REG_PMIC_BUCK2DVS1, read_data);
 +   if (ret != 0) {
 +   debug(CPUFREQ: max77686 BUCK2 DVS1 register read failed.\n);
 +   return -1;
 +   }
 +
 +   /* Calculate voltage level */
 +   volt_level = new_voltage - MAX77686_BUCK2_VOL_MIN * 1000;
 +
 +   if (volt_level  0) {
 +   debug(CPUFREQ: Not a valid voltage level to set\n);
 +   return -1;
 +   }
 +
 +   volt_level /= MAX77686_BUCK2_VOL_DIV;
 +
 +   /* Update voltage level in BUCK2 DVS1 register value */
 +   clrsetbits_8(read_data,
 +MAX77686_BUCK2_VOL_BITMASK  MAX77686_BUCK2_VOL_BITPOS,
 +volt_level  MAX77686_BUCK2_VOL_BITPOS);
 +
 +   /* Write new value in BUCK2 DVS1 */
 +   ret = pmic_reg_write(p, MAX77686_REG_PMIC_BUCK2DVS1, read_data);
 +   if (ret != 0) {
 +   debug(CPUFREQ: max77686 BUCK2 DVS1 register write 
 failed.\n);
 +   return -1;
 +   }
 +
 +   /* Set ENABLE BUCK2 register bits */
 +   read_data = 0;
 +   ret = pmic_reg_read(p, MAX77686_BUCK2_VOL_ENADDR, read_data);
 +   if (ret != 0) {
 +   debug(CPUFREQ: max77686 BUCK2 enable address read 
 failed.\n);
 +   return -1;
 +   }
 +
 +   clrsetbits_8(read_data,
 +(MAX77686_BUCK2_VOL_ENBITMASK
 + MAX77686_BUCK2_VOL_ENBITPOS),
 +(MAX77686_BUCK2_VOL_ENBITON
 + MAX77686_BUCK2_VOL_ENBITPOS));
 +
 +   ret = pmic_reg_write(p, MAX77686_BUCK2_VOL_ENADDR, read_data);
 +   if (ret != 0) {
 +   debug(CPUFREQ: max77686 BUCK2 enable address write 
 failed.\n);
 +   return -1;
 +   }
 +
 +   return 0;
 +}
 diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h
 index fdc7ca9..2780f17 100644
 --- a/include/power/max77686_pmic.h
 +++ b/include/power/max77686_pmic.h
 @@ -175,6 +175,18 @@ enum {
  #define MAX77686_LD05CTRL1_1_8V0x14
  /* LDO10 1.8 volt value */
  #define MAX77686_LD10CTRL1_1_8V0x14
 +
 +/* BUCK2 voltage parameter values */
 +#define MAX77686_BUCK2_VOL_BITPOS  0x0
 +#define MAX77686_BUCK2_VOL_BITMASK 0xff
 +#define MAX77686_BUCK2_VOL_ENBITPOS0x4
 +#define MAX77686_BUCK2_VOL_ENBITMASK   0x3
 +#define MAX77686_BUCK2_VOL_ENADDR  0x12
 +#define MAX77686_BUCK2_VOL_ENBITON 0x1
 +#define MAX77686_BUCK2_VOL_ENBITOFF0x0
 +#define MAX77686_BUCK2_VOL_MIN 925
 +#define MAX77686_BUCK2_VOL_DIV 12500
 +
  /*
   * MAX77686_REG_PMIC_32KHZ set to 32KH CP
   * output is activated
 diff --git a/include/power/pmic.h b/include/power/pmic.h
 index 1ecfc05..02f6f11 100644
 --- a/include/power/pmic.h
 +++ b/include/power/pmic.h
 @@ -99,6 +99,7 @@ int pmic_probe(struct pmic *p);
  int pmic_reg_read(struct pmic *p, u32 reg, u32 *val);
  int pmic_reg_write(struct pmic *p, u32 reg, u32 val);
  int pmic_set_output(struct pmic *p, u32 reg, int ldo, int on);
 +int pmic_set_voltage(u32 new_voltage);

Please can you document what 'new_voltage' means in a function
comment? Is it microvolts, or something else?

Regards,
Simon


  #define pmic_i2c_addr (p-hw.i2c.addr)
  #define pmic_i2c_tx_num (p-hw.i2c.tx_num)
 --
 1.8.0

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


Re: [U-Boot] [PATCH 2/4] Exynos5: cpufreq: Implement frequency scaling for exynos5

2013-05-11 Thread Simon Glass
Hi Akshay,

On Wed, Apr 3, 2013 at 12:27 AM, Akshay Saraswat aksha...@samsung.com wrote:
 Exynos5 currently runs at full speed i.e. 1.7 GHz everytime.
 Scaling down the clock speed in certain situations, may help in
 reducing the ARM temperature and power consumption.

 Signed-off-by: Akshay Saraswat aksha...@samsung.com
 ---
  arch/arm/include/asm/arch-exynos/cpufreq.h |  54 ++
  drivers/power/Makefile |   1 +
  drivers/power/exynos-cpufreq.c | 282 
 +
  3 files changed, 337 insertions(+)
  create mode 100644 arch/arm/include/asm/arch-exynos/cpufreq.h
  create mode 100644 drivers/power/exynos-cpufreq.c

There may be a couple of style nits here I think (do you use patman or
checkpatch?) but otherwise:

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] smdk5250: enable support for tmu throttling

2013-05-11 Thread Simon Glass
On Wed, Apr 3, 2013 at 12:27 AM, Akshay Saraswat aksha...@samsung.com wrote:
 Adding tmu throttling support to smdk5250.

 Signed-off-by: Akshay Saraswat aksha...@samsung.com

Acked-by: Simon Glass s...@chromium.org

 ---
  board/samsung/smdk5250/smdk5250.c | 19 +++
  1 file changed, 19 insertions(+)

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


Re: [U-Boot] [PATCH 4/4] Exynos5: config: enable cpu freq

2013-05-11 Thread Simon Glass
On Wed, Apr 3, 2013 at 12:27 AM, Akshay Saraswat aksha...@samsung.com wrote:
 This patch enables cpu freq support for exynos5 by adding
 config for it.

 Signed-off-by: Akshay Saraswat aksha...@samsung.com

Acked-by: Simon Glass s...@chromium.org

 ---
  include/configs/exynos5250-dt.h | 3 +++
  1 file changed, 3 insertions(+)

 diff --git a/include/configs/exynos5250-dt.h b/include/configs/exynos5250-dt.h
 index 496a194..18d3e04 100644
 --- a/include/configs/exynos5250-dt.h
 +++ b/include/configs/exynos5250-dt.h
 @@ -128,6 +128,9 @@
  #define CONFIG_CMD_DTT
  #define CONFIG_TMU_CMD_DTT

 +/* CPU Frequency Scaling */
 +#define CONFIG_EXYNOS_CPUFREQ
 +
  /* USB */
  #define CONFIG_CMD_USB
  #define CONFIG_USB_EHCI
 --
 1.8.0

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


Re: [U-Boot] [PATCH] exynos: Adjust the starting MIF voltage to 1.05v

2013-05-11 Thread Simon Glass
On Mon, Apr 15, 2013 at 11:34 AM, Bernie Thompson
bhthomp...@chromium.org wrote:
 Some Exynos5250 silicon may require 1.05v on the MIF to be stable, so to be
 safe we can default to 1.05v instead of 1.00v. This can be set optimally later
 in the boot process by the kernel.

 The 0x6 value for 1.05v comes from the MAX77686 datasheet.

 Signed-off-by: Bernie Thompson bhthomp...@chromium.org

Acked-by: Simon Glass s...@chromium.org

 ---
  board/samsung/smdk5250/smdk5250.c | 2 +-
  include/power/max77686_pmic.h | 2 ++
  2 files changed, 3 insertions(+), 1 deletion(-)

 diff --git a/board/samsung/smdk5250/smdk5250.c 
 b/board/samsung/smdk5250/smdk5250.c
 index 217c6df..2cea844 100644
 --- a/board/samsung/smdk5250/smdk5250.c
 +++ b/board/samsung/smdk5250/smdk5250.c
 @@ -182,7 +182,7 @@ int power_init_board(void)

 /* VDD_MIF */
 if (pmic_reg_write(p, MAX77686_REG_PMIC_BUCK1OUT,
 -   MAX77686_BUCK1OUT_1V)) {
 +   MAX77686_BUCK1OUT_1_05V)) {
 debug(%s: PMIC %d register write failed\n, __func__,
 MAX77686_REG_PMIC_BUCK1OUT);
 return -1;
 diff --git a/include/power/max77686_pmic.h b/include/power/max77686_pmic.h
 index fdc7ca9..1c374a9 100644
 --- a/include/power/max77686_pmic.h
 +++ b/include/power/max77686_pmic.h
 @@ -157,6 +157,8 @@ enum {

  /* Buck1 1 volt value */
  #define MAX77686_BUCK1OUT_1V   0x5
 +/* Buck1 1.05 volt value */
 +#define MAX77686_BUCK1OUT_1_05V0x6
  #define MAX77686_BUCK1CTRL_EN  (3  0)
  /* Buck2 1.3 volt value */
  #define MAX77686_BUCK2DVS1_1_3V0x38
 --
 1.8.1.3

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


Re: [U-Boot] [PATCH V1 1/1] EXYNOS5: I2C: Add FDT and non-FDT support for I2C

2013-05-11 Thread Simon Glass
On Thu, Apr 4, 2013 at 12:27 AM, Amar amarendra...@samsung.com wrote:
 This patch updates the function board_i2c_init() to add support for both
 FDT and non-FDT for I2C, and initialise the I2C channels.

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

Acked-by: Simon Glass s...@chromium.org
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/4] power: Explicitly select pmic device's bus

2013-05-11 Thread Simon Glass
Hi Rajeshwari,

On Mon, Apr 1, 2013 at 11:18 PM, Rajeshwari Birje
rajeshwari.bi...@gmail.com wrote:
 Hi Simon,

 Just had one following comment

 On Tue, Apr 2, 2013 at 5:34 AM, Simon Glass s...@chromium.org wrote:
 From: Aaron Durbin adur...@chromium.org

 The current pmic i2c code assumes the current i2c bus is
 the same as the pmic device's bus. There is nothing ensuring
 that to be true. Therefore, select the proper bus before performing
 a transaction.

 Signed-off-by: Aaron Durbin adur...@chromium.org
 Signed-off-by: Simon Glass s...@chromium.org
 Reviewed-by: Simon Glass s...@chromium.org
 ---
  drivers/power/power_i2c.c | 4 
  1 file changed, 4 insertions(+)

 diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
 index 3e5a784..ec9701e 100644
 --- a/drivers/power/power_i2c.c
 +++ b/drivers/power/power_i2c.c
 @@ -39,6 +39,8 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
 if (check_reg(p, reg))
 return -1;

 +   I2C_SET_BUS(p-bus);
 +

 Do we need to set I2C bus for each register read and write?

It could potentially be done at a higher level, but it is tricky,
since the pmic is supposed to know its bus number. Nothing else should
need to know.

It's just setting a variable so does not take long. I think this sort
of thing will get cleaned up now that Heiko has posted the i2c
clean-up series (which I am going to take a look at).

Regards,
Simon


 switch (pmic_i2c_tx_num) {
 case 3:
 if (p-sensor_byte_order == PMIC_SENSOR_BYTE_ORDER_BIG) {
 @@ -82,6 +84,8 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
 if (check_reg(p, reg))
 return -1;

 +   I2C_SET_BUS(p-bus);
 +
 if (i2c_read(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num))
 return -1;

 --
 1.8.1.3

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


[U-Boot] da850-evm: MMC-SD query

2013-05-11 Thread Manish Badarkhe
Hi All

May I know what is use of CONFIG_DAVINCI_MMC_SD1 in case of da850-evm?
Currently, We are using instance 0 of MMC SD card in case of da850-evm.
I think this define (CONFIG_DAVINCI_MMC_SD1) is of no use for da850-evm.

Ref files:
1. ../board/davinci/da8xxevm/da850evm.c : where we are using instance 0 of
davinci MMC SD.
2. ../include/configs/da850evm.h  :  where
CONFIG_DAVINCI_MMC_SD1 is defined.
]
Please let me know if I am missing something.

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


Re: [U-Boot] [PATCH] Revert wrong removal of nand_init and nand_deselect

2013-05-11 Thread stefano babic
Am 11/05/2013 16:29, schrieb Albert ARIBAUD:
 The manual resolution in commit ec7023db wrongly removed functions
 nand_init and nand_deselect from file drivers/mtd/nand/mxc_nand_spl.c.
 Revert this removal.
 
 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
 ---
  drivers/mtd/nand/mxc_nand_spl.c |3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c
 index f13d5fc..ba725e9 100644
 --- a/drivers/mtd/nand/mxc_nand_spl.c
 +++ b/drivers/mtd/nand/mxc_nand_spl.c
 @@ -359,3 +359,6 @@ void nand_boot(void)
   }
  }
  #endif
 +
 +void nand_init(void) {}
 +void nand_deselect(void) {}
 

Acked-by: Stefano Babic sba...@denx.de

Best regards,
Stefano Babic

-- 
=
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 2/4] arm: make __image_copy_{start, end} compiler-generated

2013-05-11 Thread Albert ARIBAUD
Hi Benoît,

On Sat, 11 May 2013 19:52:17 +0200 (CEST), Benoît Thébaudeau
benoit.thebaud...@advansee.com wrote:

 Hi Albert,
 
 On Saturday, May 11, 2013 10:02:48 AM, Albert ARIBAUD wrote:
  Hi Benoît,
  
  On Sat, 11 May 2013 02:25:02 +0200 (CEST), Benoît Thébaudeau
  benoit.thebaud...@advansee.com wrote:
  
   Hi Albert,
 
 [...]
 
diff --git a/arch/arm/cpu/arm1136/u-boot-spl.lds
b/arch/arm/cpu/arm1136/u-boot-spl.lds
index 8296e5d..04fc881 100644
--- a/arch/arm/cpu/arm1136/u-boot-spl.lds
+++ b/arch/arm/cpu/arm1136/u-boot-spl.lds
@@ -37,7 +37,6 @@ SECTIONS
 {
.text  :
{
-   __start = .;
  arch/arm/cpu/arm1136/start.o  (.text*)
  *(.text*)
} .sram
@@ -48,7 +47,9 @@ SECTIONS
. = ALIGN(4);
.data : { *(SORT_BY_ALIGNMENT(.data*)) } .sram
. = ALIGN(4);
+
__image_copy_end = .;
   
   Why aren't all linker scripts treated equally?
   
   Here, start.S is still used, so '*(.__image_copy_end)' and the related
   stuff
   should be like what you did for arch/arm/cpu/u-boot.lds below. Or am I
   missing
   something?
   
   Same question for several other linker scripts below.
  
  Not all SPLs use relocation -- actually, most SPLs do not use
  relocation, and thus do not need image and relocaton section symbols.
 
 Then, why do you keep the old definition of __image_copy_end in such linker
 scripts? Probably because start.S can't be linked in otherwise, but this is no
 longer true at the end of this series with the new relocate.S that is garbage-
 collected for those SPLs. And in all cases, shouldn't all linker scripts
 requiring __image_copy_end be converted to the new definition?

You are right on both accounts: all linker scripts that need
__image_copy_* should be converted to the new definition, and some
linker scripts probably don't need __image_copy_end even though they
define it. I intend to achieve this, not by editing various linker
scripts, but by factoring them into a single linker script (or two at
most, one for U-boot and one for SPL). So I prefer to do as little work
on the scripts as possible right now; here, only what's needed for
relocation factoring to work.

Hence, if an SPL script sort-of-hardcodes image start and end (or
relocation symbols as some do), then I prefer to leave it alone for now
and handle in the linker script factoring series later.

(on an unrelated note, V2 will have an additional patch removing
absolute relocation record type support in relocate_code, as it should
be useless now too. But I'll pair this removal with a build step that
makes sure the ELF u-boot and SPL binaries only have R_ARM_RELATIVE
relocation records.)

 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] Revert wrong removal of nand_init and nand_deselect

2013-05-11 Thread Albert ARIBAUD
On Sat, 11 May 2013 16:29:50 +0200, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 The manual resolution in commit ec7023db wrongly removed functions
 nand_init and nand_deselect from file drivers/mtd/nand/mxc_nand_spl.c.
 Revert this removal.
 
 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
 ---
  drivers/mtd/nand/mxc_nand_spl.c |3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/drivers/mtd/nand/mxc_nand_spl.c b/drivers/mtd/nand/mxc_nand_spl.c
 index f13d5fc..ba725e9 100644
 --- a/drivers/mtd/nand/mxc_nand_spl.c
 +++ b/drivers/mtd/nand/mxc_nand_spl.c
 @@ -359,3 +359,6 @@ void nand_boot(void)
   }
  }
  #endif
 +
 +void nand_init(void) {}
 +void nand_deselect(void) {}

Applied to u-boot-arm/master.

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


Re: [U-Boot] [PATCH v2] EXYNOS: SPL: Add a custom spi copy function

2013-05-11 Thread Wolfgang Denk
Dear Simon Glass,

In message 1368285471-11039-1-git-send-email-...@chromium.org you wrote:
 From: Rajeshwari Shinde rajeshwar...@samsung.com
 
 This CL implements a custom spi_copy funtion to copy u-boot from SF to

What is a CL ?

 Changed a printf in pimux.c to debug just to avoid the the compilation

s/the the/the/ ??

 Removed the enum for boot mode from spl_boot.c as it was already define in 
 spl.h

s/define/defined/

Line length in commit messages should be not more than 72 characters.


 +/**
 + * Copy uboot from spi flash to RAM
 + *
 + * @parma uboot_size size of u-boot to copy
 + * @param uboot_addr address of u-boot to copy
 + */

Incorrect multiline comment style.

 +static void exynos_spi_copy(unsigned int uboot_size, unsigned int uboot_addr)
 +{
 + int upto, todo;
 + int i;
 + struct exynos_spi *regs = (struct exynos_spi *)CONFIG_ENV_SPI_BASE;
 +
 + set_spi_clk(PERIPH_ID_SPI1, 5000); /* set spi clock to 50Mhz */
 + /* set the spi1 GPIO */
 + exynos_pinmux_config(PERIPH_ID_SPI1, PINMUX_FLAG_NONE);
 +
 + /* set pktcnt and enable it */
 + writel(4 | SPI_PACKET_CNT_EN, regs-pkt_cnt);
 + /* set FB_CLK_SEL */
 + writel(SPI_FB_DELAY_180, regs-fb_clk);
 + /* set CH_WIDTH and BUS_WIDTH as word */
 + setbits_le32(regs-mode_cfg, SPI_MODE_CH_WIDTH_WORD |
 + SPI_MODE_BUS_WIDTH_WORD);
 + clrbits_le32(regs-ch_cfg, SPI_CH_CPOL_L); /* CPOL: active high */
 +
 + /* clear rx and tx channel if set priveously */
 + clrbits_le32(regs-ch_cfg, SPI_RX_CH_ON | SPI_TX_CH_ON);
 +
 + typedef u32 (*spi_copy_func_t)(u32 offset, u32 nblock, u32 dst);

We do not allow typedefs or variable declarations etc. right in the
middle of the code.

I'm surprised that checkpatch does not complain here about not to add
new typedefs ??

 + /* waiting for TX done */
 + while (!(readl(regs-spi_sts)  SPI_ST_TX_DONE))
 + ;

Potentially infinite loop.  This (and similar code) should always have
a timeout and appropriate error handling.

 + /* let us our own function to copy u-boot from SF */

Please fix the wording of this comment.

 diff --git a/spl/Makefile b/spl/Makefile
 index b5a8de7..5e7816a 100644
 --- a/spl/Makefile
 +++ b/spl/Makefile
 @@ -94,6 +94,10 @@ LIBS-y += 
 arch/$(ARCH)/cpu/tegra-common/libcputegra-common.o
  LIBS-y += $(CPUDIR)/tegra-common/libtegra-common.o
  endif
  
 +ifneq ($(CONFIG_EXYNOS4)$(CONFIG_EXYNOS5),)
 +LIBS-y += $(CPUDIR)/s5p-common/libs5p-common.o
 +endif

This should be done without the ifneq.


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
Love all, trust a few.  - William Shakespeare
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] usb: asix: Move software resets to basic_init

2013-05-11 Thread Simon Glass
From: Julius Werner jwer...@chromium.org

The ASIX driver calls a basic_init() function during get_info(), so that
not all initialization tasks need to be redone on every init().
Unfortunately, the most important one is still triggered too often: the
driver does a full port and MII reset on every asix_init(), requiring up
to several seconds to reestablish the link.

This patch confines that software reset into the asix_basic_init()
function so that it will only be executed once. This saves about a
second of boot time on systems using BOOTP.

Note: this patch was previously submitted many moons ago as:

   usb: usbeth: asix: Do a fast init if link already established

That patch seens to have been lost or forgotten, so this is a rebased
version. It is tested on snow with a Asix USB dongle (Cisco).

Signed-off-by: Julius Werner jwer...@chromium.org
Signed-off-by: Simon Glass s...@chromium.org
Reviewed-by: Simon Glass s...@chromium.org
Reviewed-by: Vadim Bendebury vben...@chromium.org
---
 drivers/usb/eth/asix.c | 40 +---
 1 file changed, 17 insertions(+), 23 deletions(-)

diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index 75ec8f7..76624b9 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -407,46 +407,40 @@ static int asix_basic_reset(struct ueth_data *dev)
rx_ctl = asix_read_rx_ctl(dev);
debug(RX_CTL is 0x%04x setting to 0x\n, rx_ctl);
 
-   return 0;
-}
-
-/*
- * Asix callbacks
- */
-static int asix_init(struct eth_device *eth, bd_t *bd)
-{
-   struct ueth_data*dev = (struct ueth_data *)eth-priv;
-   int timeout = 0;
-#define TIMEOUT_RESOLUTION 50  /* ms */
-   int link_detected;
-
-   debug(** %s()\n, __func__);
-
dev-phy_id = asix_get_phy_addr(dev);
if (dev-phy_id  0)
debug(Failed to read phy id\n);
 
-   if (asix_sw_reset(dev, AX_SWRESET_PRL)  0)
-   goto out_err;
-
-   if (asix_sw_reset(dev, AX_SWRESET_IPRL | AX_SWRESET_PRL)  0)
-   goto out_err;
-
asix_mdio_write(dev, dev-phy_id, MII_BMCR, BMCR_RESET);
asix_mdio_write(dev, dev-phy_id, MII_ADVERTISE,
ADVERTISE_ALL | ADVERTISE_CSMA);
mii_nway_restart(dev);
 
if (asix_write_medium_mode(dev, AX88772_MEDIUM_DEFAULT)  0)
-   goto out_err;
+   return -1;
 
if (asix_write_cmd(dev, AX_CMD_WRITE_IPG0,
AX88772_IPG0_DEFAULT | AX88772_IPG1_DEFAULT,
AX88772_IPG2_DEFAULT, 0, NULL)  0) {
debug(Write IPG,IPG1,IPG2 failed\n);
-   goto out_err;
+   return -1;
}
 
+   return 0;
+}
+
+/*
+ * Asix callbacks
+ */
+static int asix_init(struct eth_device *eth, bd_t *bd)
+{
+   struct ueth_data*dev = (struct ueth_data *)eth-priv;
+   int timeout = 0;
+#define TIMEOUT_RESOLUTION 50  /* ms */
+   int link_detected;
+
+   debug(** %s()\n, __func__);
+
if (asix_write_rx_ctl(dev, AX_DEFAULT_RX_CTL)  0)
goto out_err;
 
-- 
1.8.2.1

___
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 - correction done

2013-05-11 Thread Albert ARIBAUD
Hi Albert,

On Sat, 11 May 2013 16:32:18 +0200, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 Hi Stefano,
 
 On Sat, 11 May 2013 13:36:45 +0200, Stefano Babic sba...@denx.de
 wrote:
 
  Correct !
 
 Ok - ARM repo rolled forward to ec7023db and patch sent to the list. Ack
 it and I'll apply it onto ARM repo.

Patch applied, ARM repo back to 100% build-clean.

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-ti/master

2013-05-11 Thread Albert ARIBAUD
Hi Tom,

On Fri, 10 May 2013 09:16:18 -0400, Tom Rini tr...@ti.com wrote:

 Hello,
 
 The following changes since commit 8934f7846501070a5b01c1fab5db27559e9d70d1:
 
   i2c: zynq: Add support for Xilinx Zynq (2013-04-30 11:39:28 +0200)
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-ti.git master
 
 for you to fetch changes up to 47c6ea076eb51e624f8744d93db5cd70b97dc25d:
 
   ARM: OMAP: Add arch_cpu_init function (2013-05-10 08:25:56 -0400)
 
 
 Dan Murphy (2):
   ARM:Panda:Fix device tree loading for the panda-es
   ARM: Panda: Add flag to allow runtime enviroment varibale mods
 
 Enric Balletbo i Serra (2):
   Add DDR3 support for IGEP COM AQUILA/CYGNUS.
   ARM: Add support for IGEP COM AQUILA/CYGNUS
 
 Eric Benard (2):
   da850: provide davinci_enable_uart0
   davinci: handle CONFIG_SYS_CLE_MASK and CONFIG_SYS_ALE_MASK
 
 Igor Grinberg (3):
   cm-t35: move cm-t35 to live in compulab directory
   MAINTAINERS: fix the cm-t35 board name
   cm-t35: update config file
 
 Lokesh Vutla (2):
   arm: omap: emif: Fix DDR3 init after warm reset
   ARM: OMAP5: Fix warm reset with USB cable connected
 
 Lubomir Popov (4):
   OMAP5: I2C: Enable i2c5 clocks
   OMAP5: I2C: Add I2C4 and I2C5 bases
   OMAP5: I2C: Set I2C_BUS_MAX to 5 to enable I2C4 and I2C5
   OMAP5: USB: hsusbtll_clkctrl has to be in hw_auto for USB to work
 
 Mark Jackson (1):
   Remove duplicate / unused #defines on AM335x boards
 
 Matt Porter (4):
   am33xx: add pll and clock support for TI814x CPSW
   cpsw: add support for TI814x slave_regs differences
   phy: add support for ET1011C phys
   ti814x_evm: enable CPSW support
 
 Nishanth Menon (10):
   twl4030: make twl4030_i2c_write_u8 prototype consistent
   twl4030: make twl4030_i2c_read_u8 prototype consistent
   twl6030: twl6030_i2c_[read|write]_u8 prototype consistent
   twl6030: move twl6030 register access functions to common header file
   twl6030: add header guard
   twl6035: rename to palmas
   palmas: rename init_settings to an generic palmas init
   palmas: rename twl6035_mmc1_poweron_ldo with an palmas generic function
   palmas: use palmas_i2c_[read|write]_u8
   palmas: add header guard
 
 SRICHARAN R (5):
   ARM: OMAP: Make omap_boot_parameters common across socs
   ARM: OMAP4/5: Make OMAPx_SRAM_SCRATCH_ defines common
   ARM: OMAP: Correct save_boot_params and replace with 'C' function
   ARM: OMAP: Cleanup boot parameters usage
   ARM: OMAP: Add arch_cpu_init function
 
 Tom Rini (3):
   beagleboard: Update comment in get_board_rev()
   omap5_common: Add optargs variable for kernel command line args
   am33xx: Fix warning with CONFIG_DISPLAY_CPUINFO
 
  MAINTAINERS|3 +-
  README |4 +
  arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|8 +
  arch/arm/cpu/armv7/am33xx/clock_ti814x.c   |  103 ++-
  arch/arm/cpu/armv7/am33xx/sys_info.c   |6 +-
  arch/arm/cpu/armv7/lowlevel_init.S |8 +-
  arch/arm/cpu/armv7/omap-common/boot-common.c   |   31 +--
  arch/arm/cpu/armv7/omap-common/clocks-common.c |1 +
  arch/arm/cpu/armv7/omap-common/emif-common.c   |   11 +-
  arch/arm/cpu/armv7/omap-common/hwinit-common.c |   61 -
  arch/arm/cpu/armv7/omap-common/lowlevel_init.S |   50 +---
  arch/arm/cpu/armv7/omap-common/reset.c |4 +
  arch/arm/cpu/armv7/omap4/emif.c|4 +-
  arch/arm/cpu/armv7/omap4/hw_data.c |2 +-
  arch/arm/cpu/armv7/omap4/hwinit.c  |3 +-
  arch/arm/cpu/armv7/omap5/emif.c|4 +-
  arch/arm/cpu/armv7/omap5/hw_data.c |5 +-
  arch/arm/cpu/armv7/omap5/hwinit.c  |   22 +-
  arch/arm/cpu/armv7/omap5/prcm-regs.c   |2 +
  arch/arm/include/asm/arch-am33xx/ddr_defs.h|   17 ++
  arch/arm/include/asm/arch-am33xx/hardware_ti814x.h |1 +
  arch/arm/include/asm/arch-am33xx/omap.h|   25 --
  arch/arm/include/asm/arch-davinci/hardware.h   |2 +
  arch/arm/include/asm/arch-davinci/nand_defs.h  |9 +
  arch/arm/include/asm/arch-omap4/omap.h |   36 ---
  arch/arm/include/asm/arch-omap4/sys_proto.h|   12 +-
  arch/arm/include/asm/arch-omap5/clocks.h   |   10 +
  arch/arm/include/asm/arch-omap5/cpu.h  |2 +
  arch/arm/include/asm/arch-omap5/i2c.h  |2 +-
  arch/arm/include/asm/arch-omap5/omap.h |   36 ---
  arch/arm/include/asm/arch-omap5/sys_proto.h|   22 +-
  arch/arm/include/asm/global_data.h |8 +
  arch/arm/include/asm/omap_boot.h   |   50 
  arch/arm/include/asm/omap_common.h | 

Re: [U-Boot] [PATCH v5 5/7] Add Atmel I2C tpm

2013-05-11 Thread Simon Glass
Hi Dirk,

On Tue, Apr 30, 2013 at 6:54 AM,  dirk.eib...@gdsys.cc wrote:
 From: Dirk Eibach eib...@gdsys.de

 Add support for Atmel TPM devices with two wire interface.

 Signed-off-by: Dirk Eibach dirk.eib...@gdsys.cc
 Signed-off-by: Reinhard Pfau reinhard.p...@gdsys.cc
 ---
 Changes in v5: None
 Changes in v4: None
 Changes in v3: None
 Changes in v2: None

Can you please rebase this patch on top of the existing pending patches?

http://patchwork.ozlabs.org/patch/236211/
http://patchwork.ozlabs.org/patch/236212/
http://patchwork.ozlabs.org/patch/236214/
http://patchwork.ozlabs.org/patch/236215/
http://patchwork.ozlabs.org/patch/236213/

If it helps I have put them in branch 'tpm' of u-boot-x86.git.

Also a few minor comments below:


  README  |6 ++
  drivers/tpm/Makefile|1 +
  drivers/tpm/atmel_twi_tpm.c |  119 
 +++
  3 files changed, 126 insertions(+), 0 deletions(-)
  create mode 100644 drivers/tpm/atmel_twi_tpm.c

 diff --git a/README b/README
 index 58b2ee5..2053931 100644
 --- a/README
 +++ b/README
 @@ -1201,6 +1201,12 @@ The following options need to be configured:
 If this option is set, the driver enables cache flush.

  - TPM Support:
 +   Only one TPM device per system is supported at this time.
 +   So enable only one of the supported devices.
 +
 +   CONFIG_ATMEL_TWI_TPM
 +   Support for Atmel TWI TPM device. Requires I2C support.
 +

Needs rebase, also suggest CONFIG_TPM_ATMEL_TWI since you will see
that we have decided to make all the drivers start with CONFIG_TPM.

 CONFIG_GENERIC_LPC_TPM
 Support for generic parallel port TPM devices. Only one device
 per system is supported at this time.
 diff --git a/drivers/tpm/Makefile b/drivers/tpm/Makefile
 index e8c159c..5c8f246 100644
 --- a/drivers/tpm/Makefile
 +++ b/drivers/tpm/Makefile
 @@ -28,6 +28,7 @@ $(shell mkdir -p $(obj)slb9635_i2c)
  COBJS-$(CONFIG_GENERIC_LPC_TPM) = generic_lpc_tpm.o
  COBJS-$(CONFIG_INFINEON_TPM_I2C) += tis_i2c.o slb9635_i2c/tpm.o
  COBJS-$(CONFIG_INFINEON_TPM_I2C) += slb9635_i2c/tpm_tis_i2c.o
 +COBJS-$(CONFIG_ATMEL_TWI_TPM) = atmel_twi_tpm.o

You should put this at the top since A comes before G.

  COBJS  := $(COBJS-y)
  SRCS   := $(COBJS:.o=.c)
 diff --git a/drivers/tpm/atmel_twi_tpm.c b/drivers/tpm/atmel_twi_tpm.c
 new file mode 100644
 index 000..1fa626f
 --- /dev/null
 +++ b/drivers/tpm/atmel_twi_tpm.c
 @@ -0,0 +1,119 @@
 +/*
 + * 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 tpm.h
 +#include i2c.h
 +#include asm/unaligned.h
 +
 +#undef DEBUG_ATMEL_TWI_TPM
 +#ifdef DEBUG
 +#define DEBUG_ATMEL_TWI_TPM
 +#endif

Can this file not just use #ifdef DEBUG, and even debug() ?

 +
 +
 +/*
 + * tis_init()
 + *
 + * Initialize the TPM device. Returns 0 on success or -1 on
 + * failure (in case device probing did not succeed).
 + */
 +int tis_init(void)
 +{
 +   return 0;
 +}
 +
 +/*
 + * tis_open()
 + *
 + * Requests access to locality 0 for the caller. After all commands have been
 + * completed the caller is supposed to call tis_close().
 + *
 + * Returns 0 on success, -1 on failure.
 + */
 +int tis_open(void)
 +{
 +   return 0;
 +}
 +
 +/*
 + * tis_close()
 + *
 + * terminate the currect session with the TPM by releasing the locked
 + * locality. Returns 0 on success of -1 on failure (in case lock
 + * removal did not succeed).
 + */
 +int tis_close(void)
 +{
 +   return 0;
 +}
 +
 +/*
 + * tis_sendrecv()
 + *
 + * Send the requested data to the TPM and then try to get its response
 + *
 + * @sendbuf - buffer of the data to send
 + * @send_size size of the data to send
 + * @recvbuf - memory to save the response to
 + * @recv_len - pointer to the size of the response buffer
 + *
 + * Returns 0 on success (and places the number of response bytes at recv_len)
 + * or -1 on failure.
 + */
 +int tis_sendrecv(const uint8_t *sendbuf, size_t send_size, uint8_t *recvbuf,
 +   size_t *recv_len)
 +{
 +   int res;
 +
 +#ifdef DEBUG_ATMEL_TWI_TPM
 +   memset(recvbuf, 0xcc, *recv_len);
 +   printf(send to TPM (%d bytes, recv_len=%d):\n, send_size, 
 *recv_len);
 +   

Re: [U-Boot] [PATCH v5 2/7] tpm: add AUTH1 cmds for LoadKey2 and GetPubKey

2013-05-11 Thread Simon Glass
Hi,

On Tue, Apr 30, 2013 at 6:54 AM,  dirk.eib...@gdsys.cc wrote:
 From: Reinhard Pfau p...@gdsys.de

 Extend the tpm library with support for single authorized (AUTH1) commands
 as specified in the TCG Main Specification 1.2. (The internally used helper
 functions are implemented in a way that they could also be used for double
 authorized commands if someone needs it.)

 Provide enums with the return codes from the TCG Main specification.

 For now only a single OIAP session is supported.

 OIAP authorized version of the commands TPM_LoadKey2 and TPM_GetPubKey are
 provided. Both features are available using the 'tpm' command, too.

 Authorized commands are enabled with CONFIG_TPM_AUTH_SESSIONS. (Note that
 this also requires CONFIG_SHA1 to be enabled.)

 Signed-off-by: Reinhard Pfau reinhard.p...@gdsys.cc


 Signed-off-by: Dirk Eibach dirk.eib...@gdsys.cc

The same rebase comment applies here, but otherwise it looks good.

Regards,
Simon

 ---
 Changes in v5: None
 Changes in v4: None
 Changes in v3:
 - fix email addresses

 Changes in v2:
 - replace some numeric constants with named constants
 - style fixes (as shown by checkpatch.pl) in common/cmd_tpm.c and lib/tpm.c

  README   |   14 ++
  common/cmd_tpm.c |  100 +++
  include/tpm.h|  174 +++
  lib/tpm.c|  351 
 +-
  4 files changed, 638 insertions(+), 1 deletions(-)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/1] TPM: STMicroelectronics u-boot driver I2C

2013-05-11 Thread Simon Glass
Hi Mathias,


On Fri, Mar 22, 2013 at 10:28 AM, Mathias leblanc
mathias.lebl...@st.com wrote:
 From: admin01 admin01@admin01-desktop.(none)

  * STMicroelectronics version 1.2.0, Copyright (C) 2013
  * STMicroelectronics comes with ABSOLUTELY NO WARRANTY.
  * This is free software, and you are welcome to redistribute it
  * under certain conditions.

 This is the driver for TPM chip from ST Microelectronics.

 If you have a TPM security chip from STMicroelectronics working with
 an I2C, read the README file and add the correct defines regarding
 the tpm in the configuration file of your board.
 This file is located in include/configs/your_board.h

 The driver will be accessible from within uboot terminal.

The TPM code in U-Boot has been updated, also there are some pending patches

Can you please rebase this patch on top of mainline plus the existing
pending patches?

http://patchwork.ozlabs.org/patch/236211/
http://patchwork.ozlabs.org/patch/236212/
http://patchwork.ozlabs.org/patch/236214/
http://patchwork.ozlabs.org/patch/236215/
http://patchwork.ozlabs.org/patch/236213/

If it helps I have put them in branch 'tpm' of u-boot-x86.git.

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


Re: [U-Boot] [PATCH v3 2/9] i2c: common changes for multibus/multiadapter support

2013-05-11 Thread Simon Glass
Hi Heiko,

On Sat, May 4, 2013 at 6:01 AM, Heiko Schocher h...@denx.de wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 Signed-off-by: Simon Glass s...@chromium.org
 Cc: Henrik Nordström hen...@henriknordstrom.net

 ---
 - changes for v2:
   add comment from Henrik Nordström hen...@henriknordstrom.net
   remove wrong line in README
   - rebase against current mainline 178d0cc1a4c73c3341afbeb2a93b172de8c96bd1
 - changes for v3:
   - adapt to the new introduced U_BOOT_I2C_ADAP_COMPLETE define
   - fix Codingstyle issues
   - adapt README
 ---
  README  |  74 -
  arch/arm/lib/board.c|   7 ++-
  arch/blackfin/lib/board.c   |   7 +++
  arch/m68k/lib/board.c   |  17 +-
  arch/mips/lib/board.c   |   7 +++
  arch/nds32/lib/board.c  |  10 +++-
  arch/powerpc/cpu/mpc8xx/video.c |   4 ++
  arch/powerpc/lib/board.c|  12 +++-
  common/cmd_date.c   |   9 +++
  common/cmd_dtt.c|   9 +++
  common/cmd_i2c.c| 120 
 ++--
  common/env_eeprom.c |  14 +
  common/stdio.c  |  13 -
  include/i2c.h   |   9 ---
  14 Dateien geändert, 251 Zeilen hinzugefügt(+), 61 Zeilen entfernt(-)

Very happy to see this again.

Do you also need to change common/board_f.c or common/board_r.c?

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


Re: [U-Boot] [PATCH v3 2/9] i2c: common changes for multibus/multiadapter support

2013-05-11 Thread Simon Glass
Hi Heiko,

On Sat, May 4, 2013 at 6:01 AM, Heiko Schocher h...@denx.de wrote:
 Signed-off-by: Heiko Schocher h...@denx.de
 Signed-off-by: Simon Glass s...@chromium.org
 Cc: Henrik Nordström hen...@henriknordstrom.net

 ---
 - changes for v2:
   add comment from Henrik Nordström hen...@henriknordstrom.net
   remove wrong line in README
   - rebase against current mainline 178d0cc1a4c73c3341afbeb2a93b172de8c96bd1
 - changes for v3:
   - adapt to the new introduced U_BOOT_I2C_ADAP_COMPLETE define
   - fix Codingstyle issues
   - adapt README
 ---
  README  |  74 -
  arch/arm/lib/board.c|   7 ++-
  arch/blackfin/lib/board.c   |   7 +++
  arch/m68k/lib/board.c   |  17 +-
  arch/mips/lib/board.c   |   7 +++
  arch/nds32/lib/board.c  |  10 +++-
  arch/powerpc/cpu/mpc8xx/video.c |   4 ++
  arch/powerpc/lib/board.c|  12 +++-
  common/cmd_date.c   |   9 +++
  common/cmd_dtt.c|   9 +++
  common/cmd_i2c.c| 120 
 ++--
  common/env_eeprom.c |  14 +
  common/stdio.c  |  13 -
  include/i2c.h   |   9 ---
  14 Dateien geändert, 251 Zeilen hinzugefügt(+), 61 Zeilen entfernt(-)


...
 diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
 index 4380794..d59f10d 100644

 @@ -1508,16 +1543,21 @@ static int do_i2c_nm(cmd_tbl_t * cmdtp, int flag, int 
 argc, char * const argv[])
   */
  static int do_i2c_reset(cmd_tbl_t * cmdtp, int flag, int argc, char * const 
 argv[])
  {
 +#if defined(CONFIG_SYS_I2C)
 +   i2c_init(I2C_ADAP-speed, I2C_ADAP-slaveaddr);
 +#else
 i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 +#endif
 return 0;
  }

  static cmd_tbl_t cmd_i2c_sub[] = {
 -#if defined(CONFIG_I2C_MUX)
 -   U_BOOT_CMD_MKENT(bus, 1, 1, do_i2c_add_bus, , ),
 +#if defined(CONFIG_SYS_I2C)
 +   U_BOOT_CMD_MKENT(bus, 1, 1, do_i2c_show_bus, , ),
  #endif  /* CONFIG_I2C_MUX */
 U_BOOT_CMD_MKENT(crc32, 3, 1, do_i2c_crc, , ),
 -#if defined(CONFIG_I2C_MULTI_BUS)
 +#if defined(CONFIG_SYS_I2C) || \
 +   defined(CONFIG_I2C_MULTI_BUS)
 U_BOOT_CMD_MKENT(dev, 1, 1, do_i2c_bus_num, , ),

If you are changing the condition here you should change the condition
on the help also.

  #endif  /* CONFIG_I2C_MULTI_BUS */
  #if defined(CONFIG_I2C_EDID)
 @@ -1576,11 +1616,11 @@ static int do_i2c(cmd_tbl_t * cmdtp, int flag, int 
 argc, char * const argv[])
  /***/
  #ifdef CONFIG_SYS_LONGHELP
  static char i2c_help_text[] =
 -#if defined(CONFIG_I2C_MUX)
 -   bus [muxtype:muxaddr:muxchannel] - add a new bus reached over 
 muxes\ni2c 
 +#if defined(CONFIG_SYS_I2C)
 +   bus [muxtype:muxaddr:muxchannel] - show I2C bus info\n
  #endif  /* CONFIG_I2C_MUX */
 crc32 chip address[.0, .1, .2] count - compute CRC32 checksum\n
 -#if defined(CONFIG_I2C_MULTI_BUS)
 +#if defined(CONFIG_SYS_I2C)
 i2c dev [dev] - show or set current I2C bus\n
  #endif  /* CONFIG_I2C_MULTI_BUS */
  #if defined(CONFIG_I2C_EDID)
 diff --git a/common/env_eeprom.c b/common/env_eeprom.c
 index 45c935b..fbd459a 100644

I tested this on snow and it seems to disable every bus except bus 0.
I will see if I can take a look.

Hopefully one of the Nvidia guys can test on seaboard as I don't have
mind with me right now.

SMDK5250 # i2c dev 4
Invalid bus 4

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


Re: [U-Boot] [PATCH 2/2] EXYNOS: SPI: Support SPI_PREAMBLE mode

2013-05-11 Thread Simon Glass
Hi Vadim,

On Mon, May 6, 2013 at 10:01 AM, Vadim Bendebury vben...@chromium.org wrote:
 On Mon, May 6, 2013 at 7:37 AM, Simon Glass s...@chromium.org wrote:

 HI Vadim,

 On Thu, May 2, 2013 at 11:12 PM, Vadim Bendebury vben...@chromium.org 
 wrote:
  [the original patch removed, re-sending from a registered address]
 
  So, I spent some more time debugging a system which requires this
  patch: a system, where on a SPI interface a response to a command
  could come way later then the command data transmission completes.
 
  The original patch was trying to address many corner cases, but come
  to think of it, in this situation the slave does not care about extra
  data sent on the transmit interface, as otherwise there is no clock
  and no data could be transferred from the slave.
 
  Then, for this SPI interface we do not need to set the counter of
  clocks, and do not need to keep adding more clocks if the data has not
  been received yet, the clocks could be just free running. And then the
  patch becomes much simpler, what do you think:

 Does this deal with the performance problems that the old driver code
 had? There were a number of other patches sent upstream by Rajeshwari
 also. I wonder if it might be easier to do your improvement as a
 separate patch on top of those instead. Then it can be considered on
 its merits.


 Hi Simon,

 what performance problems are there? Do you mean that u-boot is not
 fast enough when polling the SPI interface? I thought about this -
 even when clocking at 50MHz (resulting in 6.125 MB/s transfer rate)
 with 64 byte FIFOs there should be no problem when serving the
 interface, especially when receive and transmit flows are split in
 time.

 Have there been any evidence of performance problems?  Also, I noticed
 that the driver does not pay any respect to error conditions. I am
 planning to add error monitoring/processing code, as this would be a
 good way to know if there indeed are performance problems.

The issue is not the hardware but the software. Yes the hardware is
well able to keep up, but it does have some oddities. For example
reading the FIFO level registers seems to take a while, as does
reading/writing data to the FIFO.

I did a bit of benchmarking comparing the original upstream driver
with the driver after Rajeshwari's patches are applied. I posted that
to the list earlier today, but roughly speaking it is 100x faster, and
SPI boot time is reduced by about half a second. Unfortunately it is a
bit more complicated, but it is reliable and the code is well tested
with lots of units in the field :-)

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


Re: [U-Boot] [PATCH 4/4] arm: factorize relocate_code routine

2013-05-11 Thread Simon Glass
On Fri, May 10, 2013 at 3:56 PM, Albert ARIBAUD
albert.u.b...@aribaud.net wrote:

 Signed-off-by: Albert ARIBAUD albert.u.b...@aribaud.net
 ---
  arch/arm/cpu/arm1136/start.S   |   82 
  arch/arm/cpu/arm1176/start.S   |   75 --
  arch/arm/cpu/arm720t/start.S   |   82 
  arch/arm/cpu/arm920t/start.S   |   75 --
  arch/arm/cpu/arm925t/start.S   |   75 --
  arch/arm/cpu/arm926ejs/start.S |   82 
  arch/arm/cpu/arm946es/start.S  |   75 --
  arch/arm/cpu/arm_intcm/start.S |   75 --
  arch/arm/cpu/armv7/start.S |   78 ---
  arch/arm/cpu/ixp/start.S   |   75 --
  arch/arm/cpu/pxa/start.S   |   84 -
  arch/arm/cpu/s3c44b0/start.S   |   75 --
  arch/arm/cpu/sa1100/start.S|   75 --
  arch/arm/lib/Makefile  |2 +-
  arch/arm/lib/relocate.S|  100 
 
  15 files changed, 101 insertions(+), 1009 deletions(-)
  create mode 100644 arch/arm/lib/relocate.S


I tested this series on snow (Exynos 5250, ARMv7, with SPL) with no
apparent regressions.

Tested-by: Simon Glass s...@chromium.org

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