Re: [U-Boot] [U-boot] uboot support ext4 format command?

2013-11-08 Thread Albert ARIBAUD
Hi tiger...@viatech.com.cn,

On Sat, 9 Nov 2013 11:36:30 +0800,  wrote:

> Hi, shankar:
> 
> It seems uboot currently supports ext4load / ext4ls / ext4write command.
> 
> Does it support ext4format command?
> 
> (such as : format NAND as ext4 filesystem?)

I don't think it does, but you can find out by looking at the
documentation and code.

Besides, I don't think being able to format a filesystem from
the bootloader is really needed; this task is best performed in a
full-fledged operating system IMO. 
 
> Best wishes,

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


[U-Boot] [U-boot] uboot support ext4 format command?

2013-11-08 Thread TigerLiu
Hi, shankar:

It seems uboot currently supports ext4load / ext4ls / ext4write command.

Does it support ext4format command?

(such as : format NAND as ext4 filesystem?)

 

Best wishes,

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


Re: [U-Boot] [Patch v1 3/6] Driver/DDR: Add Freescale DDR driver for ARM

2013-11-08 Thread york sun

On Nov 8, 2013, at 4:51 PM, Scott Wood wrote:

> On Wed, 2013-10-30 at 19:07 -0700, York Sun wrote:
>> Make PowerPC specific code conditional so ARM SoCs can reuse
>> this driver. Add DDR3 driver for ARM.
>> 
>> Signed-off-by: York Sun 
>> ---
>> drivers/ddr/fsl/Makefile   |1 +
>> drivers/ddr/fsl/arm_ddr_gen3.c |  213 
>> 
>> drivers/ddr/fsl/main.c |   12 ++-
>> drivers/ddr/fsl/util.c |4 +
>> 4 files changed, 227 insertions(+), 3 deletions(-)
>> create mode 100644 drivers/ddr/fsl/arm_ddr_gen3.c
>> 
>> diff --git a/drivers/ddr/fsl/Makefile b/drivers/ddr/fsl/Makefile
>> index cbbd178..381ec6c 100644
>> --- a/drivers/ddr/fsl/Makefile
>> +++ b/drivers/ddr/fsl/Makefile
>> @@ -34,6 +34,7 @@ COBJS-$(CONFIG_SYS_FSL_DDR_PPC_GEN1)   += 
>> mpc85xx_ddr_gen1.o
>> COBJS-$(CONFIG_SYS_FSL_DDR_PPC_GEN2) += mpc85xx_ddr_gen2.o
>> COBJS-$(CONFIG_SYS_FSL_DDR_PPC_GEN3) += mpc85xx_ddr_gen3.o
>> COBJS-$(CONFIG_SYS_FSL_DDR_86XX) += mpc86xx_ddr.o
>> +COBJS-$(CONFIG_SYS_FSL_DDR_ARM_GEN3)+= arm_ddr_gen3.o
>> COBJS-$(CONFIG_FSL_DDR_INTERACTIVE)  += interactive.o
> 
> I'm confused -- is this hardware the same across CPU families or not?

The algorithm is the same for all DDR controllers. The final part of writing to 
registers is slightly different. For example, 85xx SoCs have LAWs, ARM parts 
don't. 85xx driver needs to deal with both DDR2 and DDR3, while ARM driver 
doesn't. I also don't want to carry some messy workarounds from 85xx to ARM 
driver. It's much cleaner to keep them separated. The final part is very small 
in size.

York


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


Re: [U-Boot] [PATCH v1 3/6] arm: pxa: move SP check from start.S to cpuinfo.c

2013-11-08 Thread Marek Vasut
Dear Albert ARIBAUD,

> PXA start.S has a PXA (variant) specific check in
> start.S. Move it to cpuinfo.c.
> 
> Signed-off-by: Albert ARIBAUD 

Either way WFM

Acked-by: Marek Vasut 

> ---
>  arch/arm/cpu/pxa/cpuinfo.c | 6 ++
>  arch/arm/cpu/pxa/start.S   | 6 --
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
> index 9d16079..17d8be5 100644
> --- a/arch/arm/cpu/pxa/cpuinfo.c
> +++ b/arch/arm/cpu/pxa/cpuinfo.c
> @@ -11,6 +11,12 @@
>  #include 
>  #include 
> 
> +#ifdef CONFIG_CPU_PXA25X
> +#if ((CONFIG_SYS_INIT_SP_ADDR) != 0xf800)
> +#error "Init SP address must be set to 0xf800 for PXA250"
> +#endif
> +#endif
> +
>  #define  CPU_MASK_PXA_PRODID 0x03f0
>  #define  CPU_MASK_PXA_REVID  0x000f
> 
> diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
> index ae0d13c..eb3243a 100644
> --- a/arch/arm/cpu/pxa/start.S
> +++ b/arch/arm/cpu/pxa/start.S
> @@ -23,12 +23,6 @@
>  #include 
>  #include 
> 
> -#ifdef CONFIG_CPU_PXA25X
> -#if ((CONFIG_SYS_INIT_SP_ADDR) != 0xf800)
> -#error "Init SP address must be set to 0xf800 for PXA250"
> -#endif
> -#endif
> -
>  .globl _start
>  _start: breset
>  #ifdef CONFIG_SPL_BUILD

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 v1 1/6] Driver/DDR: Moving Freescale DDR driver to a common driver

2013-11-08 Thread york sun

On Nov 8, 2013, at 4:48 PM, Scott Wood wrote:

> On Wed, 2013-10-30 at 19:07 -0700, York Sun wrote:
>> 
>> +CONFIG_SYS_FSL_DDR
>> +Freescale DDR driver in use. This type of DDR controller is
>> +found in mpc83xx, mpc85xx, mpc86xx as well as some ARM core
>> +SoCs.
>> +
>> +CONFIG_SYS_FSL_DDR_ADDR
>> +Freescale DDR memory-mapped register base.
>> +
>> +CONFIG_SYS_FSL_DDR_EMU
>> +Specify emulator support for DDR. Some DDR features such as
>> +deskew training are not available.
>> +
>> +CONFIG_SYS_FSL_DDR_PPC_GEN1
>> +Freescale DDR1 controller.
>> +
>> +CONFIG_SYS_FSL_DDR_PPC_GEN2
>> +Freescale DDR2 controller.
>> +
>> +CONFIG_SYS_FSL_DDR_PPC_GEN3
>> +Freescale DDR3 controller.
> 
> Why is there "PPC" in the name if this is to be common for PPC and ARM?
> The description is more generic than the config symbol...

This patch moves the DDR driver out of powerpc. I should deal with the common 
part for ARM and PPC later. Good point.

> 
>> +CONFIG_FSL_DDR1
>> +User config to use DDR1. It can be enabled for SoCs with
>> +Freescale DDR1 or DDR2 controllers.
>> +
>> +CONFIG_FSL_DDR2
>> +User config to use DDR2. It can be eanbeld for SoCs with
>> +Freescale DDR2 or DDR3 controllers.
>> +
>> +CONFIG_FSL_DDR3
>> +User config to use DDR3. It can be enabled for SoCs with
>> +Freescale DDR3 controllers.
> 
> How is this user config, rather than a description of the type of DDR
> that is present?

The DDR controller may support more than one type of memory. DDR2 controllers 
support both DDR1 and DDR2, and some DDR3 controllers support both DDR2 and 
DDR3. It's user's option to choose which type of DDR devices to use. The driver 
needs to deal with them differently. You may argue the driver should detect 
them and choose the algorithm differently. But that will increase the code size 
considerably. It makes less sense to do so because once the board is designed, 
it is either this or that.

> 
>> diff --git a/arch/powerpc/include/asm/config_mpc86xx.h 
>> b/arch/powerpc/include/asm/config_mpc86xx.h
>> index 694b110..4f9b225 100644
>> --- a/arch/powerpc/include/asm/config_mpc86xx.h
>> +++ b/arch/powerpc/include/asm/config_mpc86xx.h
>> @@ -7,6 +7,8 @@
>> #ifndef _ASM_MPC86xx_CONFIG_H_
>> #define _ASM_MPC86xx_CONFIG_H_
>> 
>> +#define CONFIG_SYS_FSL_DDR_86XX
> 
> This doesn't qualify as one of the "PPC_GEN" controllers?
> 
The common part is shared for all controllers. The final writing register 
function is different. I didn't try to merge 86xx with 85xx, because 85xx is 
messy, with a lot of workaround. And most importantly, 86xx driver stay with 
DDR2 while 85xx driver mainly supports DDR3.

York



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


Re: [U-Boot] [RESEND PATCH v14 07/10] arm64: core support

2013-11-08 Thread Scott Wood
On Fri, 2013-11-08 at 13:49 +0800, FengHua wrote:
> > -原始邮件-
> > 发件人: "Scott Wood" 
> > 发送时间: 2013-11-08 08:44:34 (星期五)
> > 收件人: feng...@phytium.com.cn
> > 抄送: u-boot@lists.denx.de, tr...@ti.com, albert.u.b...@aribaud.net
> > 主题: Re: [RESEND PATCH v14 07/10] arm64: core support
> > 
> > On Tue, 2013-10-15 at 11:34 +0800, feng...@phytium.com.cn wrote:
> > > +/*
> > > + * void __asm_flush_dcache_level(level)
> > > + *
> > > + * clean and invalidate one level cache.
> > > + *
> > > + * x0: cache level
> > > + * x1~x9: clobbered
> > > + */
> > > +ENTRY(__asm_flush_dcache_level)
> > > + lsl x1, x0, #1
> > > + msr csselr_el1, x1  /* select cache level */
> > > + isb /* isb to sych the new cssr & csidr */
> > > + mrs x6, ccsidr_el1  /* read the new ccsidr */
> > > + and x2, x6, #7  /* x2 <- length of the cache lines */
> > > + add x2, x2, #4  /* add 4 (line length offset) */
> > > + mov x3, #0x3ff
> > > + and x3, x3, x6, lsr #3  /* x3 <- maximum number of way size */
> > > + clz w5, w3  /* bit position of way size */
> > 
> > You should round up (so "add w3, w3, w3; sub w3, w3, #1" before clz),
> > since the architecture allows non-power-of-2 values for #sets/#ways.
> > 
> x3 is the way size after "and x3, x3, x6, lsr #3".
> "clz  w5, w3" is used to caculate the number of heading zero  of way size.
> The result will be used to generate parameter of "dc cisw".
> we don't need to calculate the power-of-2 values for #ways.

According to the manual, the number of bits for the "way" field is
log2(associativity) rounded up to the nearest integer.  Counting the
leading zeroes does not round up -- you'll get the same number of
leading zeroes for e.g. 0x17 as for 0x10.

> > BTW, I see some very similar comments, register usage, and code
> > structure in the Linux code.  Are you *sure* this code wasn't derived
> > from it (or some other common source)?  Do we need to start from
> > scratch, if we can't trust that you're identifying all the code that you
> > didn't write yourself?  You were asked several times to do so.
> > 
> The reference code is from ARMv8 ARM.

That still counts as code that came from somewhere else that needs to be
attributed.  What is the license on that code in the ARMv8 ARM?

Plus, I see some other similarities to the Linux code that aren't found
in the ARMv8 ARM code (e.g. "add 4 (line length offset)", "create
working copy of [max] way size"...).

> Cache.S of Linux-aarch64 is identical with it.
> Maybe the maintainer of Linux-aarch64 is just the writer of ARMv8 ARM.

There is an ARM copyright on that file in Linux...

> It's hard to write different code to do hardware specific initialization.

I'm not necessarily asking for different code, just attribution and
license compliance.

> > > + /* load TTBR0 */
> > > + el = curent_el();
> > > + if (el == 1)
> > > + asm volatile("msr ttbr0_el1, %0"
> > > +  : : "r" (gd->arch.tlb_addr) : "memory");
> > > + else if (el == 2)
> > > + asm volatile("msr ttbr0_el2, %0"
> > > +  : : "r" (gd->arch.tlb_addr) : "memory");
> > > + else
> > > + panic("Not Supported Exception Level");
> > 
> > Do we really need to support running in either el1 or el2 at runtime,
> > throughout U-Boot?  If Linux is started in el2, it enters el1 after
> > setting up exception vectors to get control back if it needs to.  Can't
> > we do the same (and go back to el2 if available immediately before
> > entering an OS)?  Assuming we don't want to just set the expected
> > exception level at compile time.
> > 
> I am preparing to ask for some advice about boot process.
> My original idea is to providing more choice for users. user could choose
> to run u-boot at el1 or el2.
> But now, locally I have changed the boot process. U-boot will be running
> at the highest exception level processor supportted (EL3/EL2/EL1)

By highest you mean closest to EL3?  That seems the opposite direction
of what would simplify things...

> I am not sure whether u-boot is ever used to provide run-time service before.

Only to standalone programs, not after booting an OS with bootm.

> There are many works to do if we want it be that.

We don't. :-)

-Scott



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


Re: [U-Boot] [Patch v1 6/6] Driver/IFC: Move Freescale IFC driver to a common driver

2013-11-08 Thread Scott Wood
On Sat, 2013-11-09 at 06:22 +0530, Prabhakar Kushwaha wrote:
> On 11/9/2013 6:14 AM, Scott Wood wrote:
> > On Thu, 2013-10-31 at 08:57 +0530, Prabhakar Kushwaha wrote:
> >> On 10/31/2013 7:37 AM, York Sun wrote:
> >>> Freescale IFC controller has been used for mpc8xxx. It will be used
> >>> for ARM-based SoC as well. This patch moves the driver to driver/mtd
> >>> and fix the header file includes.
> >>>
> >>> Signed-off-by: York Sun 
> >>>
> >> Thanks York for this patch.  This was pending from long time.
> >>
> >> This patch moves fsl_ifc.c from powerpc to driver/mtd
> >> I am not sure having 2 files for IFC controller in driver/mtd/ is
> >> correct. Although fsl_ifc.c is for IFC Controller(NOR, NAND machine) and
> >> fsl_ifc_nand.c is only for IFC - NAND machine.
> >> I am asking this question as same changes will be applicable in Linux also.
> >>
> >> Also,
> >> We have to move changes of arch/powerpc/cpu/mpc85xx/speed.c to fsl_ifc.c
> >> .  This will make a IFC driver generic.
> >>
> >> As this patch has impact on all IFC platforms,  has this been tested on
> >> few platforms?
> > I'm not sure that drivers/mtd is the right place for it as it doesn't
> > expose an mtd interface.
> >
> >
> 
> Yes Scott, I am also agree with you. But we are not sure about the right 
> place for it.

This is similar to the question of where to put CPM/QE code.  A place
will need to be identified for glue code that doesn't fit cleanly into
an existing subsystem.  drivers/misc is probably the right place, though
IIRC on the Linux side the drivers/misc maintainer was generally opposed
to its existence and pushed back on new things being added to it.

> one suggestion, may we merge fsl_ifc in fsl_ifc_nand.c & fsl_ifc_spl.c?

No.

-Scott



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


Re: [U-Boot] [PATCH v4 07/18] qemu-malta: rename to just "malta"

2013-11-08 Thread Daniel Schwierzeck
2013/11/8 Paul Burton :
> This is in preparation for adapting this board to function correctly on
> a physical MIPS Malta board. The board is moved into an "imgtec" vendor
> directory at the same time in order to ready us for any other boards
> supported by Imagination in the future.
>
> Signed-off-by: Paul Burton 
> ---
> Changes in v4:
>   - rebase atop master
>
> Changes in v3:
>   - modify a missed CONFIG_QEMU_MALTA in arch/mips/cpu/mips32/start.S
> which would affect old QEMU builds
>
> Changes in v2:
>   - move to an imgtec vendor directory to reduce churn should other
> Imagination boards be added later
>   - enable rename detection for the patch
> ---

...

> diff --git a/include/configs/qemu-malta.h b/include/configs/malta.h
> similarity index 98%
> rename from include/configs/qemu-malta.h
> rename to include/configs/malta.h
> index 03514d1..4ca8bad 100644
> --- a/include/configs/qemu-malta.h
> +++ b/include/configs/malta.h
> @@ -13,7 +13,7 @@
>  /*
>   * System configuration
>   */
> -#define CONFIG_QEMU_MALTA
> +#define CONFIG_MALTA
>
>  #define CONFIG_PCI
>  #define CONFIG_PCI_GT64120
> --
> 1.8.4.1
>
>

I've missed that last time, you should also change the prompt:

#if defined(CONFIG_SYS_LITTLE_ENDIAN)
#define CONFIG_SYS_PROMPT "qemu-maltael # "
#else
#define CONFIG_SYS_PROMPT "qemu-malta # "
#endif

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


Re: [U-Boot] [Patch v1 6/6] Driver/IFC: Move Freescale IFC driver to a common driver

2013-11-08 Thread Prabhakar Kushwaha


On 11/9/2013 6:14 AM, Scott Wood wrote:

On Thu, 2013-10-31 at 08:57 +0530, Prabhakar Kushwaha wrote:

On 10/31/2013 7:37 AM, York Sun wrote:

Freescale IFC controller has been used for mpc8xxx. It will be used
for ARM-based SoC as well. This patch moves the driver to driver/mtd
and fix the header file includes.

Signed-off-by: York Sun 


Thanks York for this patch.  This was pending from long time.

This patch moves fsl_ifc.c from powerpc to driver/mtd
I am not sure having 2 files for IFC controller in driver/mtd/ is
correct. Although fsl_ifc.c is for IFC Controller(NOR, NAND machine) and
fsl_ifc_nand.c is only for IFC - NAND machine.
I am asking this question as same changes will be applicable in Linux also.

Also,
We have to move changes of arch/powerpc/cpu/mpc85xx/speed.c to fsl_ifc.c
.  This will make a IFC driver generic.

As this patch has impact on all IFC platforms,  has this been tested on
few platforms?

I'm not sure that drivers/mtd is the right place for it as it doesn't
expose an mtd interface.




Yes Scott, I am also agree with you. But we are not sure about the right 
place for it.

one suggestion, may we merge fsl_ifc in fsl_ifc_nand.c & fsl_ifc_spl.c?

Please advice

Regards,
Prabhakar







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


Re: [U-Boot] [Patch v1 3/6] Driver/DDR: Add Freescale DDR driver for ARM

2013-11-08 Thread Scott Wood
On Wed, 2013-10-30 at 19:07 -0700, York Sun wrote:
> Make PowerPC specific code conditional so ARM SoCs can reuse
> this driver. Add DDR3 driver for ARM.
> 
> Signed-off-by: York Sun 
> ---
>  drivers/ddr/fsl/Makefile   |1 +
>  drivers/ddr/fsl/arm_ddr_gen3.c |  213 
> 
>  drivers/ddr/fsl/main.c |   12 ++-
>  drivers/ddr/fsl/util.c |4 +
>  4 files changed, 227 insertions(+), 3 deletions(-)
>  create mode 100644 drivers/ddr/fsl/arm_ddr_gen3.c
> 
> diff --git a/drivers/ddr/fsl/Makefile b/drivers/ddr/fsl/Makefile
> index cbbd178..381ec6c 100644
> --- a/drivers/ddr/fsl/Makefile
> +++ b/drivers/ddr/fsl/Makefile
> @@ -34,6 +34,7 @@ COBJS-$(CONFIG_SYS_FSL_DDR_PPC_GEN1)+= 
> mpc85xx_ddr_gen1.o
>  COBJS-$(CONFIG_SYS_FSL_DDR_PPC_GEN2) += mpc85xx_ddr_gen2.o
>  COBJS-$(CONFIG_SYS_FSL_DDR_PPC_GEN3) += mpc85xx_ddr_gen3.o
>  COBJS-$(CONFIG_SYS_FSL_DDR_86XX) += mpc86xx_ddr.o
> +COBJS-$(CONFIG_SYS_FSL_DDR_ARM_GEN3) += arm_ddr_gen3.o
>  COBJS-$(CONFIG_FSL_DDR_INTERACTIVE)  += interactive.o

I'm confused -- is this hardware the same across CPU families or not?

-Scott



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


Re: [U-Boot] [Patch v1 1/6] Driver/DDR: Moving Freescale DDR driver to a common driver

2013-11-08 Thread Scott Wood
On Wed, 2013-10-30 at 19:07 -0700, York Sun wrote:
> Freescale DDR driver has been used for mpc83xx, mpc85xx, mpc86xx SoCs.
> The similar DDR controllers will be used for ARM-based SoCs.
> 
> Signed-off-by: York Sun 
> ---
>  Makefile   |4 +-
>  README |   39 ++--
>  arch/powerpc/cpu/mpc83xx/Makefile  |8 +---
>  arch/powerpc/cpu/mpc85xx/Makefile  |   42 -
>  arch/powerpc/cpu/mpc85xx/cpu.c |   16 +++
>  arch/powerpc/cpu/mpc85xx/mp.c  |2 +-
>  arch/powerpc/cpu/mpc86xx/Makefile  |3 --
>  arch/powerpc/cpu/mpc8xxx/ddr/Makefile  |   45 --
>  arch/powerpc/include/asm/config.h  |6 +++
>  arch/powerpc/include/asm/config_mpc85xx.h  |   13 ++
>  arch/powerpc/include/asm/config_mpc86xx.h  |2 +
>  arch/powerpc/include/asm/immap_83xx.h  |2 +-
>  arch/powerpc/include/asm/immap_85xx.h  |6 +--
>  arch/powerpc/include/asm/immap_86xx.h  |4 +-
>  board/exmeritus/hww1u1a/ddr.c  |4 +-
>  board/exmeritus/hww1u1a/hww1u1a.c  |4 +-
>  board/freescale/b4860qds/ddr.c |6 +--
>  board/freescale/bsc9131rdb/ddr.c   |4 +-
>  board/freescale/bsc9131rdb/spl_minimal.c   |4 +-
>  board/freescale/bsc9132qds/bsc9132qds.c|4 +-
>  board/freescale/bsc9132qds/ddr.c   |4 +-
>  board/freescale/bsc9132qds/spl_minimal.c   |4 +-
>  board/freescale/c29xpcie/ddr.c |4 +-
>  board/freescale/corenet_ds/ddr.c   |4 +-
>  board/freescale/corenet_ds/eth_p4080.c |2 +-
>  board/freescale/corenet_ds/p3041ds_ddr.c   |2 +-
>  board/freescale/corenet_ds/p4080ds_ddr.c   |2 +-
>  board/freescale/corenet_ds/p5020ds_ddr.c   |2 +-
>  board/freescale/corenet_ds/p5040ds_ddr.c   |2 +-
>  board/freescale/mpc8349emds/ddr.c  |4 +-
>  board/freescale/mpc8349emds/mpc8349emds.c  |2 +-
>  board/freescale/mpc8536ds/ddr.c|4 +-
>  board/freescale/mpc8536ds/mpc8536ds.c  |2 +-
>  board/freescale/mpc8540ads/ddr.c   |4 +-
>  board/freescale/mpc8540ads/mpc8540ads.c|4 +-
>  board/freescale/mpc8541cds/ddr.c   |4 +-
>  board/freescale/mpc8541cds/mpc8541cds.c|2 +-
>  board/freescale/mpc8544ds/ddr.c|4 +-
>  board/freescale/mpc8544ds/mpc8544ds.c  |2 +-
>  board/freescale/mpc8548cds/ddr.c   |4 +-
>  board/freescale/mpc8548cds/mpc8548cds.c|2 +-
>  board/freescale/mpc8555cds/ddr.c   |4 +-
>  board/freescale/mpc8555cds/mpc8555cds.c|2 +-
>  board/freescale/mpc8560ads/ddr.c   |4 +-
>  board/freescale/mpc8560ads/mpc8560ads.c|4 +-
>  board/freescale/mpc8568mds/ddr.c   |4 +-
>  board/freescale/mpc8568mds/mpc8568mds.c|2 +-
>  board/freescale/mpc8569mds/ddr.c   |4 +-
>  board/freescale/mpc8569mds/mpc8569mds.c|4 +-
>  board/freescale/mpc8572ds/ddr.c|4 +-
>  board/freescale/mpc8572ds/mpc8572ds.c  |2 +-
>  board/freescale/mpc8610hpcd/ddr.c  |4 +-
>  board/freescale/mpc8610hpcd/mpc8610hpcd.c  |2 +-
>  board/freescale/mpc8641hpcn/ddr.c  |4 +-
>  board/freescale/mpc8641hpcn/mpc8641hpcn.c  |2 +-
>  board/freescale/p1010rdb/ddr.c |4 +-
>  board/freescale/p1010rdb/spl_minimal.c |4 +-
>  board/freescale/p1022ds/ddr.c  |4 +-
>  board/freescale/p1022ds/p1022ds.c  |2 +-
>  board/freescale/p1022ds/spl_minimal.c  |2 +-
>  board/freescale/p1023rdb/ddr.c |4 +-
>  board/freescale/p1023rdb/p1023rdb.c|2 +-
>  board/freescale/p1023rds/p1023rds.c|4 +-
>  board/freescale/p1_p2_rdb/ddr.c|2 +-
>  board/freescale/p1_p2_rdb_pc/ddr.c |4 +-
>  board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c|2 +-
>  board/freescale/p1_p2_rdb_pc/spl_minimal.c |2 +-
>  board/freescale/p1_twr/ddr.c   |4 +-
>  board/freescale/p1_twr/p1_twr.c|2 +-
>  board/freescale/p2020come/ddr.c|4 +-
>  board/freescale/p2020ds/ddr.c  |4 +-
>  board/freescale/p2020ds/p2020ds.c  |4 +-
>  board/freescale/p2041rdb/ddr.c |4 +-
>  board/freescale/t1040qds/ddr.c 

Re: [U-Boot] [Patch v1 6/6] Driver/IFC: Move Freescale IFC driver to a common driver

2013-11-08 Thread Scott Wood
On Thu, 2013-10-31 at 08:57 +0530, Prabhakar Kushwaha wrote:
> On 10/31/2013 7:37 AM, York Sun wrote:
> > Freescale IFC controller has been used for mpc8xxx. It will be used
> > for ARM-based SoC as well. This patch moves the driver to driver/mtd
> > and fix the header file includes.
> >
> > Signed-off-by: York Sun 
> >
> Thanks York for this patch.  This was pending from long time.
> 
> This patch moves fsl_ifc.c from powerpc to driver/mtd
> I am not sure having 2 files for IFC controller in driver/mtd/ is 
> correct. Although fsl_ifc.c is for IFC Controller(NOR, NAND machine) and 
> fsl_ifc_nand.c is only for IFC - NAND machine.
> I am asking this question as same changes will be applicable in Linux also.
> 
> Also,
> We have to move changes of arch/powerpc/cpu/mpc85xx/speed.c to fsl_ifc.c 
> .  This will make a IFC driver generic.
> 
> As this patch has impact on all IFC platforms,  has this been tested on 
> few platforms?

I'm not sure that drivers/mtd is the right place for it as it doesn't
expose an mtd interface.

-Scott



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


Re: [U-Boot] [PATCH 3/4] mx6: add co-existing pad configuration macros mx6q/mx6dl

2013-11-08 Thread Eric Nelson

Hi Edward,

On 11/08/2013 02:36 AM, Edward Lin wrote:

In order to be able to support several CPU types in one binary,
a duplicate set of pad configuration macros are introduced.

The idea is that a board file should be able to define:

#define MX6_SET_PAD(p, q) \
 if (is_cpu_type(MXC_CPU_MX6Q)) \
 imx_iomux_v3_setup_pad(MX6Q_##p | q); \
 else \
 imx_iomux_v3_setup_pad(MX6DL_##p | q);

and then use

MX6_SET_PAD(PAD_CSI0_DAT10__UART1_TXD, MUX_PAD_CTRL(UART_PAD_CTRL));
MX6_SET_PAD(PAD_CSI0_DAT11__UART1_RXD, MUX_PAD_CTRL(UART_PAD_CTRL));

for a readable setup of pad configurations.



The most common case of this will be multiple pads.

These are currently configured in various places as blocks
of pads by functional group (i.e. ENET pads, UART pads).

This path doesn't lead us to a single declaration of
such lists.


Signed-off-by: Edward Lin 
Signed-off-by: Richard Hu 
---
  arch/arm/include/asm/arch-mx6/mx6qdl_pins.h | 3290
+++
  1 file changed, 3290 insertions(+)
  create mode 100644 arch/arm/include/asm/arch-mx6/mx6qdl_pins.h

diff --git a/arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
b/arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
new file mode 100644
index 000..b41a877
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
@@ -0,0 +1,3290 @@
+/*
+ * Copyright (C) 2012 Freescale Semiconductor, Inc. All Rights
Reserved.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#ifndef __ASM_ARCH_MX6_MX6QDL_PINS_H__
+#define __ASM_ARCH_MX6_MX6QDL_PINS_H__
+
+#include 
+
+enum {
+   MX6DL_PAD_CSI0_DAT10__IPU1_CSI0_D_10= IOMUX_PAD(0x0360,
0x004C, 0,
0x, 0, 0),

...

If we want a single binary to support 6DQ and 6DLS (and I do),
we really shouldn't duplicate everything here.

As much as I dislike macro-fu, the enums in mx6q_pins.h and mx6dl_pins.h
need to be macros instead of direct declarations of enum constants.

I'll try to write up some notes tomorrow so we can hash through
the specifics.

Regards,


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


[U-Boot] [PATCH] imx-common: remove extraneous semicolon from macro

2013-11-08 Thread Eric Nelson
Signed-off-by: Eric Nelson 
---
This was clearly a typo.

 arch/arm/imx-common/cpu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/imx-common/cpu.c b/arch/arm/imx-common/cpu.c
index 0cd2538..9231649 100644
--- a/arch/arm/imx-common/cpu.c
+++ b/arch/arm/imx-common/cpu.c
@@ -51,9 +51,9 @@ char *get_reset_cause(void)
 
 #if defined(CONFIG_MX53) || defined(CONFIG_MX6)
 #if defined(CONFIG_MX53)
-#define MEMCTL_BASEESDCTL_BASE_ADDR;
+#define MEMCTL_BASEESDCTL_BASE_ADDR
 #else
-#define MEMCTL_BASEMMDC_P0_BASE_ADDR;
+#define MEMCTL_BASEMMDC_P0_BASE_ADDR
 #endif
 static const unsigned char col_lookup[] = {9, 10, 11, 8, 12, 9, 9, 9};
 static const unsigned char bank_lookup[] = {3, 2};
-- 
1.8.1.2

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


Re: [U-Boot] [PATCH 2/4] mx6: add structs for mmdc and ddr iomux registers

2013-11-08 Thread Eric Nelson

Hi Edward,

On 11/08/2013 02:35 AM, Edward Lin wrote:

Signed-off-by: Edward Lin 
---
  arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h | 167
+++
  1 file changed, 167 insertions(+)
  create mode 100644 arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h

diff --git a/arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
b/arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
new file mode 100644
index 000..dd5e892
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2013 TechNexion Inc.
+ *
+ * Author: Edward Lin 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+#ifndef __ASM_ARCH_MX6_DDR_REGS_H__
+#define __ASM_ARCH_MX6_DDR_REGS_H__
+
+#define MX6_MMDC_P0_BASE   0x021b
+#define MX6_MMDC_P1_BASE   0x021b4000
+


These are already declared in
arch/arm/include/asm/arch-mx6/imx-regs.h


+/* MMDC P0/P1 Registers */
+struct mmdc_p_regs {
+   u32 mdctl;
+   u32 mdpdc;
+   u32 mdotc;
+   u32 mdcfg0;
+   u32 mdcfg1;
+   u32 mdcfg2;
+   u32 mdmisc;
+   u32 mdscr;
+   u32 mdref;
+   u32 res1[2];
+   u32 mdrwd;
+   u32 mdor;


Up to this point, this appears to be a mirror of
struct esd_mmdc_regs from arch/arm/imx-common/cpu.c


+   u32 res2[3];
+   u32 mdasp;
+   u32 res3[240];
+   u32 mapsr;
+   u32 res4[254];
+   u32 mpzqhwctrl;
+   u32 res5[2];
+   u32 mpwldectrl0;
+   u32 mpwldectrl1;
+   u32 res6;
+   u32 mpodtctrl;
+   u32 mprddqby0dl;
+   u32 mprddqby1dl;
+   u32 mprddqby2dl;
+   u32 mprddqby3dl;
+   u32 res7[4];
+   u32 mpdgctrl0;
+   u32 mpdgctrl1;
+   u32 res8;
+   u32 mprddlctl;
+   u32 res9;
+   u32 mpwrdlctl;
+   u32 res10[25];
+   u32 mpmur0;
+}__attribute__((packed, aligned(4)));
+


I'm not sure where you're headed with these...

It seems arbitrary to treat these as structures,
and I'm guessing that you're going to want tables
of values as is currently done in the DCD and
declared in mx6q-ddr.h/mx6dl-ddr.h.


+#define MX6Q_IOM_DDR_BASE  0x020e0500
+struct mx6q_iomux_ddr_regs {
+   u32 res1[3];
+   u32 dram_sdqs5;
+   u32 dram_dqm5;
+   u32 dram_dqm4;
+   u32 dram_sdqs4;
+   u32 dram_sdqs3;
+   u32 dram_dqm3;
+   u32 dram_sdqs2;
+   u32 dram_dqm2;
+   u32 res2[16];
+   u32 dram_cas;


...

Regards,


Eric

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


[U-Boot] [PATCH] time: fix gcc warnings on MIPS64

2013-11-08 Thread Daniel Schwierzeck
Commit 8dfafdde88eb3e71d5569846396ae67a91017232 introduced
new gcc warnings on MIPS64:

time.c: In function 'tick_to_time':
time.c:59:2: warning: comparison of distinct pointer types lacks a cast 
[enabled by default]
time.c:59:2: warning: passing argument 1 of '__div64_32' from incompatible 
pointer type [enabled by default]
In file included from time.c:10:0:
./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument 
is of type 'long long unsigned int *'
time.c: In function 'usec_to_tick':
time.c:76:2: warning: comparison of distinct pointer types lacks a cast 
[enabled by default]
time.c:76:2: warning: passing argument 1 of '__div64_32' from incompatible 
pointer type [enabled by default]
In file included from time.c:10:0:
./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument 
is of type 'long long unsigned int *'

Signed-off-by: Daniel Schwierzeck 
---
 lib/time.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/time.c b/lib/time.c
index 111b493..09bb05a 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -51,7 +51,7 @@ unsigned long long __weak notrace get_ticks(void)
return ((unsigned long long)gd->timebase_h << 32) | gd->timebase_l;
 }
 
-static unsigned long long notrace tick_to_time(unsigned long long tick)
+static unsigned long long notrace tick_to_time(uint64_t tick)
 {
unsigned int div = get_tbclk();
 
@@ -71,7 +71,7 @@ unsigned long __weak notrace timer_get_us(void)
 }
 static unsigned long long usec_to_tick(unsigned long usec)
 {
-   unsigned long long tick = usec * get_tbclk();
+   uint64_t tick = usec * get_tbclk();
usec *= get_tbclk();
do_div(tick, 100);
return tick;
-- 
1.8.3.2

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


Re: [U-Boot] [PATCH 1/4] mx6: add function to determine boot device

2013-11-08 Thread Eric Nelson

Hi Edward,

On 11/08/2013 02:34 AM, Edward Lin wrote:

During boot the boot pin configuration is copied to the SBMR registers.
This patch adds a function to read the boot device from SBMR.

Signed-off-by: Edward Lin 
Signed-off-by: Richard Hu 

---
  arch/arm/cpu/armv7/mx6/soc.c  | 43
+++
  arch/arm/include/asm/arch-mx6/sys_proto.h | 17 
  2 files changed, 60 insertions(+)

diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index a390296..6bacdab 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -243,6 +243,49 @@ void s_init(void)
 writel(mask528, &anatop->pfd_528_clr);
  }

+enum mx6_boot_device imx_get_boot_device(void)
+{
+   uint soc_sbmr = readl(SRC_BASE_ADDR + 0x4);


(struct src)->sbmr1? (from imx-regs.h)


+   uint bt_mem_ctl = (soc_sbmr & 0x00FF) >> 4 ;


You may want a macro here, but certainly don't need the
low four bits set.


+   uint bt_mem_type = (soc_sbmr & 0x0008) >> 3;
+   uint bt_mem_mmc = (soc_sbmr & 0x1000) >> 12;
+
+   switch (bt_mem_ctl) {
+   case 0x0:
+   if (bt_mem_type)
+   return MX6_ONE_NAND_BOOT;
+   else
+   return MX6_WEIM_NOR_BOOT;
+   break;
+   case 0x2:
+   return MX6_SATA_BOOT;
+   break;
+   case 0x3:
+   if (bt_mem_type)
+   return MX6_I2C_BOOT;
+   else
+   return MX6_SPI_NOR_BOOT;
+   break;
+   case 0x4:
+   case 0x5:
+   if (bt_mem_mmc)
+   return MX6_SD0_BOOT;
+   else
+   return MX6_SD1_BOOT;
+   break;
+   case 0x6:
+   case 0x7:
+   return MX6_MMC_BOOT;
+   break;
+   case 0x8 ... 0xf:
+   return MX6_NAND_BOOT;
+   break;
+   default:
+   return MX6_UNKNOWN_BOOT;
+   break;
+   }
+}
+


These magic values are the same as those used in
arch/arm/cpu/armv7/mx6/soc.c for the "bmode" command,
so I'd personally like to see some constants...

I'd also like to know where the definitive reference
for these is. I have a spreadsheet of dubious ancestry,
and the current RM has the very helpful comment
"Refer to the fusemap", and the fuse map is similarly
opaque.

Troy? Anyone?


  #ifdef CONFIG_IMX_HDMI
  void imx_enable_hdmi_phy(void)
  {
diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h
b/arch/arm/include/asm/arch-mx6/sys_proto.h
index 8c21364..b26955e 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -17,6 +17,21 @@
  #define MXC_CPU_MX6SOLO0x62
  #define MXC_CPU_MX6Q   0x63

+enum mx6_boot_device {
+MX6_SD0_BOOT,
+MX6_SD1_BOOT,
+MX6_MMC_BOOT,
+MX6_NAND_BOOT,
+MX6_SATA_BOOT,
+MX6_WEIM_NOR_BOOT,
+MX6_ONE_NAND_BOOT,
+MX6_PATA_BOOT,
+MX6_I2C_BOOT,
+MX6_SPI_NOR_BOOT,
+MX6_UNKNOWN_BOOT,
+MX6_BOOT_DEV_NUM = MX6_UNKNOWN_BOOT,
+};
+


It might make sense to just place these into the
soc_boot_modes table, gain "bmode" support for all
of them, and have imx_get_boot_device() walk the
table.

At the moment, it appears that only USB, SATA,
SPI-NOR, and SD card are supported by "bmode".

Regards,


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


Re: [U-Boot] [PATCH 0/4] mx6: Add SPL Framewok

2013-11-08 Thread Eric Nelson

Hi Edward,

On 11/08/2013 02:33 AM, Edward Lin wrote:

Add common code for SPL boot on imx6.

Patch 1 adds a function to determine which device mx6 is booting from.

Patch 2 adds structures for mmdc and ddr iomux registers

Patch 3 adds co-existing pad configs that allows the support of
mx6q/mx6d/mx6dl/mx6s in one binary.

Patch 4 adds mx6 arch-specific spl header.

  arch/arm/cpu/armv7/mx6/soc.c |   43 +
  arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h |  167 ++
  arch/arm/include/asm/arch-mx6/mx6qdl_pins.h  | 3290
++
  arch/arm/include/asm/arch-mx6/spl.h  |   25 +
  arch/arm/include/asm/arch-mx6/sys_proto.h|   17 +
  5 files changed, 3542 insertions(+)
  create mode 100644 arch/arm/include/asm/arch-mx6/mx6_ddr_regs.h
  create mode 100644 arch/arm/include/asm/arch-mx6/mx6qdl_pins.h
  create mode 100644 arch/arm/include/asm/arch-mx6/spl.h



This patch set is mostly about support for multiple i.MX6
architectures, not SPL, right?

It seems to me that there are three distinct things that
we're all after, and we should probably separate them for
the purpose of patch review:

-- Add support for SPL

-- Add support for binaries which can run on both
i.MX6DQ and i.MX6DLS parts

-- Add support for dynamic memory setup

Since the second two are closely correlated and requires
that some code be executed in internal RAM, does it make
sense to start there?

We can't re-configure DDR while executing from DDR, and
the two architectures have different DDR limits, which
makes SPL the first pre-requisite (and likely the easiest).

Regards,


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


Re: [U-Boot] [PATCH v1 2/6] arm: move reset_cpu from start.S into cpu.c

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

On Friday, November 8, 2013 10:17:55 PM, Albert ARIBAUD wrote:
> CPUs arm946es, ixp and sa1100 all define the reset_cpu()
> function in their start.S file. Move this cpu-specific code
> into cpu.c so that start.S only contains ARM generic code.
> 
> Signed-off-by: Albert ARIBAUD 

Reviewed-by: Benoît Thébaudeau 

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


Re: [U-Boot] [U-Boot, v2] common/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() functions

2013-11-08 Thread Tom Rini
On Mon, Nov 04, 2013 at 11:18:14AM +0800, miao@windriver.com wrote:

> From: Miao Yan 
> 
> In commit "5c427e4: use BOOTM_STATE_OS_CMDLINE flag for plain bootm"
> and "3d187b3: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS",
> BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This
> breaks other OSes (vxworks, netbsd, plan9,...) that don't support
> subcommand processing, e.g. they all contain the following code in their
> do_bootm_xxx():
> 
> if (flag & BOOTM_STATE_OS_PREP)
> return 0;
> if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
> return 1;
> 
> which will result a "subcommand not supported" error.
> This patch changes the above logic to:
> 
> /* if not go command, pretend everything to be OK */
> if (flag != BOOTM_STATE_OS_GO)
>  return 0;
> 
> Signed-off-by: Miao Yan 

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] Remove <<<<<< HEAD from boards.cfg

2013-11-08 Thread Tom Rini
On Sat, Nov 02, 2013 at 11:08:49PM -0700, Wink Saville wrote:

> ---
>  boards.cfg | 1 -
>  1 file changed, 1 deletion(-)

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] cosmetic: remove empty lines at the top of file

2013-11-08 Thread Tom Rini
On Tue, Nov 05, 2013 at 11:28:48AM +0900, Masahiro Yamada wrote:

> Signed-off-by: Masahiro Yamada 

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] README: remove wrong config name

2013-11-08 Thread Tom Rini
On Wed, Nov 06, 2013 at 05:24:02PM +0200, Igor Grinberg wrote:

> There is no CONFIG_PCA953X_INFO symbol.
> U-Boot uses CONFIG_CMD_PCA953X_INFO instead, which is described in
> "Monitor Functions" section and thus no need to be repeated in the
> "GPIO Support" section.
> Remove the whole line.
> 
> Signed-off-by: Igor Grinberg 

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] [U-Boot, v2] Makefile: do not create a symbolic link to arch/${ARCH}/include/asm

2013-11-08 Thread Tom Rini
On Fri, Nov 01, 2013 at 10:28:45AM +0900, Masahiro Yamada wrote:

> In-tree build:
>   - Do not create a symbolic link
>   from include/asm to arch/${ARCH}/include/asm
>   - Add ${SRCTREE}/arch/arm/include into the header search path
> 
> Out-of-tree build:
>   - Do not create a directory ${OBJTREE}/include2
>   - Do not create a symbolic link
>   from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm
>   - Add ${SRCTREE}/arch/arm/include into the header search path
> 
> Signed-off-by: Masahiro Yamada 

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] boards.cfg: remove git leftovers

2013-11-08 Thread Tom Rini
On Thu, Oct 31, 2013 at 03:59:46AM +0100, Luka Perkov wrote:

> Remove 'HEAD' line which is most likely left there while rebasing. It was
> introduced in commit 877bfe37dc00b0ae59f37742954a62bce3fdf3a0.
> 
> Signed-off-by: Luka Perkov 

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] boards.cfg: remove trailing whitespace

2013-11-08 Thread Tom Rini
On Wed, Oct 23, 2013 at 11:17:14AM +0100, Paul Burton wrote:

> Commit 93e14596 "Coding Style cleanup: replace leading SPACEs by TABs"
> added trailing whitespace to a single line of boards.cfg. I presume this
> was unintentional, and it causes the file to change after running it
> through the reformat.py script. Remove the offending character.
> 
> Signed-off-by: Paul Burton 

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] [U-Boot,v2] nand_util.c: Correct licensing

2013-11-08 Thread Tom Rini
On Thu, Oct 31, 2013 at 09:26:01AM -0400, Tom Rini wrote:

> Prior to SPDX licensing this file was GPL-2.0 with Freescale granting
> rights for "or later" for their contributed code.  We incorrectly moved
> this file to GPL-2.0+, so correct it to GPL-2.0.  In addition we cannot
> easily denote in the file where or what code is "or later", so just set
> that aside for now and the file as a whole is GPL-2.0 regardless.
> 
> Cc: Scott Wood 
> Signed-off-by: Tom Rini 

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] [U-Boot,v2] Add support for SX151x SPI GPIO Expanders

2013-11-08 Thread Tom Rini
On Thu, Oct 31, 2013 at 11:16:59AM +0300, Viktar Palstsiuk wrote:

> Signed-off-by: Viktar Palstsiuk 

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] [U-Boot, v2, 4/4] MAKEALL: rename boards_by_* functions to targets_by_*

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 11:11:28AM +0900, Masahiro Yamada wrote:

> We expect boards_by_* function to return the 7th filed, 'Target',
> not the 6th field, 'Board name'.
> 
> So the function names, boards_by_* are a little misleading,
> and should be renamed to targets_by_*.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Albert ARIBAUD 

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] [U-Boot, v2, 2/4] MAKEALL: fix a bug to use CROSS_COMPILE_

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 11:11:26AM +0900, Masahiro Yamada wrote:

> Commit 27af930e changed the boards.cfg format but
> missed to change get_target_arch() fuction.
> This commit adjusts it for CROSS_COMPILE_
> to work correctly.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Albert ARIBAUD 

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] [U-Boot,v2,3/4] MAKEALL: fix boards_by_field function

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 11:11:27AM +0900, Masahiro Yamada wrote:

> Commit 27af930e changed the boards.cfg format
> and it changed boards_by_field() function incorrectly.
> For tegra cpus it returned Board Name field,
> not Target field.
> 
> This commit restores the behavior prior to 27af930e in the right way.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Albert ARIBAUD 

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] cmd_nvedit.c: Add env exists command

2013-11-08 Thread Tom Rini
On Tue, Oct 22, 2013 at 07:07:34PM -0500, Andrew Ruder wrote:

> env exists is a way to test (in hush) if an environment variable
> exists.  A workaround existed using printenv but this new command
> doesn't require all the stdout/stderr redirection to prevent
> printing information to the screen.
> 
> Example:
> $ set testexists 1
> $ env exists testexists && echo "yes"
> yes
> $ env exists testexists || echo "no"
> $ set testexists
> $ env exists testexists && echo "yes"
> $ env exists testexists || echo "no"
> no
> $
> 
> Signed-off-by: Andrew Ruder 

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] [U-Boot,v2,1/4] MAKEALL: fix awk warning message

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 11:11:25AM +0900, Masahiro Yamada wrote:

> If you do `./MAKEALL -M ` or `./MAKEALL -m`
> GNU awk would display warnings like follows:
> 
> awk: warning: escape sequence `\ ' treated as plain ` '
> 
> In the first place, we do not explicitly set the field separator.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Albert ARIBAUD 

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] [U-Boot,1/2] README.scrapyard: fix broken format

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 10:10:31AM +0900, Masahiro Yamada wrote:

> Some tabs have been replaced with spaces
> because doc/README.scrapyard is consistently using spaces.
> 
> Signed-off-by: Masahiro Yamada 

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] kup: Delete an unused Makefile

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 10:01:24AM +0900, Masahiro Yamada wrote:

> Signed-off-by: Masahiro Yamada 
> Cc: Klaus Heydeck 

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] sparc: include config.h to start.S

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 10:19:38AM +0900, Masahiro Yamada wrote:

> arch/sparc/cpu/leon3/start.S requires CONFIG_SYS_SPARC_NWINDOES
> to be defined:
> 
>   #ifndef CONFIG_SYS_SPARC_NWINDOWS
>   #error Must define number of SPARC register windows, default is 8
>   #endif
> 
> But it missed to include , which always ended up in compile error.
> 
> This commit fixes this problem.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Daniel Hellstrom 

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] [U-Boot,2/2] EP88x: remove remainders of dead board

2013-11-08 Thread Tom Rini
On Mon, Oct 21, 2013 at 10:10:32AM +0900, Masahiro Yamada wrote:

> Commit 1b0757e deleted the EP88x entry from boards.cfg file.
> But it missed to remove include/configs/EP88x.h and board/ep88x/.
> 
> This commit removes them and adds EP88x to README.scrapyard.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Wolfgang Denk 

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] [U-Boot, v2, 2/2] serial: s5p: Staticize local functions

2013-11-08 Thread Tom Rini
On Wed, Oct 16, 2013 at 09:47:13AM +0800, Axel Lin wrote:

> Staticize local functions in s5p serial driver.
> 
> Signed-off-by: Axel Lin 
> Acked-by: Minkyu Kang 

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] [U-Boot, v1, 1/1] netconsole loses 2nd character of input

2013-11-08 Thread Tom Rini
On Wed, Oct 16, 2013 at 09:54:24AM -0700, Suriyan Ramasami wrote:

> Netconsole loses the second character when used as input by
> either setenv stdin nc or setenv stdin serial,nc if using CONSOLE_CONSOLE_MUX
> 
> Before a nc_send_packet() to echo the input, a check is done to see if
> nc_ether is valid. If its not, it waits for an arp request and then sends
> the packet (which contains the first character of line to be displayed as
> output). As part of reaping the arp request, the second character is consumed.
> We protect this by making the call to NetLoop(NETCONS) between 
> input_recursion.
> 
> Signed-off-by: Suriyan Ramasami 
> Acked-by: Joe Hershberger 

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] serial: mxs_auart: Staticize local functions

2013-11-08 Thread Tom Rini
On Tue, Oct 15, 2013 at 10:52:35AM +0800, Axel Lin wrote:
> Staticize local functions in mxs_auart driver.
> 
> Signed-off-by: Axel Lin 
> Acked-by: Marek Vasut 

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] [U-Boot, v2, 1/2] serial: xuartlite: Staticize local functions

2013-11-08 Thread Tom Rini
On Wed, Oct 16, 2013 at 09:45:56AM +0800, Axel Lin wrote:

> Staticize local functions in xuartlite driver.
> 
> Signed-off-by: Axel Lin 
> Acked-by: Stefan Roese 
> Tested-by: Michal Simek 

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] fs:fat: fix set file name function

2013-11-08 Thread Tom Rini
On Fri, Oct 11, 2013 at 03:43:33PM +0200, Piotr Wilczek wrote:

> Curently memcpy copies string without null terminating char because
> function strlen returns only number of characters excluding
> null terminating character. Replace memcpy with strcpy.
> 
> Signed-off-by: Piotr Wilczek 
> Signed-off-by: Kyungmin Park 
> CC: Tom Rini 

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] [U-Boot, 2/3] cmd_reiser: normalize 'file not found' errors

2013-11-08 Thread Tom Rini
On Thu, Oct 10, 2013 at 01:32:27AM +0200, Luka Perkov wrote:

> Signed-off-by: Luka Perkov 

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] [U-Boot, 3/3] cmd_zfs: normalize 'file not found' errors

2013-11-08 Thread Tom Rini
On Thu, Oct 10, 2013 at 01:32:28AM +0200, Luka Perkov wrote:

> Signed-off-by: Luka Perkov 

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] [U-Boot, 1/3] cmd_ubifs: normalize 'file not found' errors

2013-11-08 Thread Tom Rini
On Thu, Oct 10, 2013 at 01:32:26AM +0200, Luka Perkov wrote:

> From: Tim Harvey 
> 
> Signed-off-by: Tim Harvey 

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] env: fix the env export varname

2013-11-08 Thread Tom Rini
On Tue, Oct 08, 2013 at 02:20:27PM +0200, Pierre Aubert wrote:

> The env export command doesn't export the first variable of the list
> since commit 5a31ea04c9ee5544fbb70ad7597ea4b294840eab
> "env grep" - reimplement command using hexport_r()
> 
> Signed-off-by: Pierre Aubert 

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] include: delete include/linux/config.h

2013-11-08 Thread Tom Rini
On Mon, Oct 07, 2013 at 04:04:18PM +0900, Masahiro Yamada wrote:

> Linux Kernel abolished include/linux/config.h long time ago.
> (around version v2.6.18..v2.6.19)
> 
> We don't need to provide Linux copatibility any more.
> 
> This commit deletes include/linux/config.h
> and fixes source files not to include this.
> 
> Signed-off-by: Masahiro Yamada 

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] config: Define HAVE_BLOCK_DEVICE when CONFIG_CMD_GPT is set

2013-11-08 Thread Tom Rini
On Fri, Oct 04, 2013 at 07:42:53PM +0200, egbert.e...@gmail.com wrote:

> From: Egbert Eich 
> 
> Signed-off-by: Egbert Eich 

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] [U-Boot, 2/5] cosmetic: UDM-serial: clean up the remainders of dead driver

2013-11-08 Thread Tom Rini
On Tue, Sep 24, 2013 at 10:32:05AM +0900, Masahiro Yamada wrote:

> The following serial drivers do not exist any more.
> 
>  - ns9750_serial.c: deleted by commit 4cfc611b4
>  - s3c4510b_uart.c: deleted by commit afad40299
>  - serial_clps7111.c: deleted by commit f2e080156
>  - serial_netarm.c: deleted by commit b411eb30f
> 
> This commit cleans up UDM-serial.txt.
> 
> Signed-off-by: Masahiro Yamada 

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] [U-Boot, 3/5] cosmetic: UDM-net: clean up the remainders of dead driver

2013-11-08 Thread Tom Rini
On Tue, Sep 24, 2013 at 10:32:06AM +0900, Masahiro Yamada wrote:

> This commit omits non-existing drivers/net/netarm_eth.c from the list.
> This driver is deleted by commit b411eb30f.
> 
> Signed-off-by: Masahiro Yamada 

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] config/sandbox: Add EFI and GPT support

2013-11-08 Thread Tom Rini
On Fri, Oct 04, 2013 at 07:44:07PM +0200, egbert.e...@gmail.com wrote:

> From: Egbert Eich 
> 
> Signed-off-by: Egbert Eich 

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] [U-Boot, 1/5] cosmetic: doc: driver-model: Do not number driver lists

2013-11-08 Thread Tom Rini
On Tue, Sep 24, 2013 at 10:32:04AM +0900, Masahiro Yamada wrote:

> Everytime a dead driver is removed from the list,
> we must re-number. This is a painful task.
> 
> Try
>   git show e53232250 -- doc/driver-model/UDM-serial.txt
>   git show 6f62f4207 -- doc/driver-model/UDM-serial.txt
>   git show b9f4bc34a -- doc/driver-model/UDM-serial.txt
> to see what I mean.
> 
> Signed-off-by: Masahiro Yamada 

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] [PATCH 1/2] time: add weak annotation to timer_read_counter declaration

2013-11-08 Thread Tom Rini
On Fri, Nov 08, 2013 at 08:40:43AM -0600, Rob Herring wrote:

> From: Rob Herring 
> 
> A weak annotation is needed in order to prevent link errors when
> get_ticks is overridden. This fixes sandbox build.
> 
> Signed-off-by: Rob Herring 

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] [U-Boot, 1/2] highbank: set AUTOBOOT_KEYED_CTRLC config option

2013-11-08 Thread Tom Rini
On Tue, Sep 10, 2013 at 03:20:24PM -0500, Mark Langsdorf wrote:

> Let highbank users break into the autoboot script with ctrl-c.
> 
> Signed-off-by: Mark Langsdorf 

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] [U-Boot, 1/2] autoboot: add an option to override keyed autoboot

2013-11-08 Thread Tom Rini
On Tue, Sep 10, 2013 at 03:20:23PM -0500, Mark Langsdorf wrote:

> As originally implemented, setting the AUTOBOOT_KEYED config option will
> prevent users from breaking into the autoboot script with ctrl-c. Restore
> that option with a new config symbol.
> 
> Signed-off-by: Mark Langsdorf 

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] [PATCH 2/2] sandbox: convert to common time functions

2013-11-08 Thread Tom Rini
On Fri, Nov 08, 2013 at 08:40:44AM -0600, Rob Herring wrote:

> From: Rob Herring 
> 
> Convert sandbox to use common time functions.
> 
> Signed-off-by: Rob Herring 

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] [U-Boot, v3] cmd/gpt: Support gpt command for all devices

2013-11-08 Thread Tom Rini
On Fri, Oct 04, 2013 at 06:53:04PM +0200, egbert.e...@gmail.com wrote:

> From: Egbert Eich 
> 
> The gpt command was only implemented for mmc devices. There is no reason
> why this command should not be generalized and be applied all other
> storage device classes.
> This change both simplifies the implementation and eliminates a
> build failure for systems that don't support mmcs.
> 
> Signed-off-by: Egbert Eich 
> Tested-by: Piotr Wilczek 

Applied to u-boot/master with a slight change to the coding style (yes,
we want variables declared at the start of the function and
__maybe_unused for ones that would be hidden via #ifdef and cause a
warning in some cases), thanks!

-- 
Tom


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


Re: [U-Boot] [PULL] u-boot-usb/master

2013-11-08 Thread Tom Rini
On Fri, Nov 08, 2013 at 08:47:33PM +0100, Marek Vasut wrote:

> The following changes since commit 2cee0408e5c6f5dbdfa89fb40168ba2ead3f61a6:
>
>   Merge branch 'master' of git://www.denx.de/git/u-boot-coldfire (2013-11-06
> 16:18:25 -0500)
>
> are available in the git repository at:
>
>
>   git://git.denx.de/u-boot-usb.git master
>
> for you to fetch changes up to 47d79deb9967970984cef8b48a566c82180e:
>
>   usb: dfu: make nand upload working (2013-11-08 20:46:20 +0100)
>
> 
> Bo Shen (3):
>   usb: dfu: decrease dfu->r_left along with the transfer
>   usb: dfu: correct dfu buffer inited value
>   usb: dfu: make nand upload working
>
> Heiko Schocher (1):
>   usb, g_dnl: make iSerialNumber board configurable
>
> Mateusz Kulikowski (1):
>   usb: ohci-hcd: submit_common_msg: report actual_length properly
>
> Przemyslaw Marczak (5):
>   usb: ums: code refactoring to improve reusability on other boards.
>   usb: ums: allows using every mmc device with ums.
>   usb: ums: fix disk capacity miscalculation and code cleanup
>   usb: ums: move ums code from trats to Samsung common directory
>   usb: ums: add ums exit feature by ctrl+c or by detach usb cable
>
>  README  |  7 +++
>  board/samsung/common/Makefile   |  1
>  board/samsung/common/ums.c  | 76 
> 
>  board/samsung/trats/trats.c | 62 
> --
>  common/cmd_usb_mass_storage.c   | 51  
> +++
>  drivers/dfu/dfu.c   |  3 ++-
>  drivers/dfu/dfu_nand.c  |  1
>  drivers/usb/gadget/f_mass_storage.c | 67 
> +++
>  drivers/usb/gadget/g_dnl.c  | 20 
>  drivers/usb/gadget/storage_common.c | 27 +++
>  drivers/usb/host/ohci-hcd.c |  2 +-
>  include/configs/trats.h |  2 --
>  include/g_dnl.h |  1
>  include/usb.h   | 10 ++
>  include/usb_mass_storage.h  | 33 +
>  15 files changed, 205 insertions(+), 158 deletions(-)
>  create mode 100644 board/samsung/common/ums.c

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] SPL Dfu update

2013-11-08 Thread Michael Trimarchi
Hi Tom

On Thu, Oct 31, 2013 at 2:20 PM, Tom Rini  wrote:
> On Wed, Oct 30, 2013 at 09:11:43PM +0100, Wolfgang Denk wrote:
>> Dear Michael Trimarchi,
>>
>> In message 
>>  you 
>> wrote:
>> >
>> > > This does not answer Stefano's question: why do it in SPL, what's
>> > > wrong with loading the real U-Boot for this purpose?
>> >
>> > Because it's not possible, internal memory size of some cpus. You need
>> > to have a way to load the second stage and I'm discussing a general
>> > way to do.
>>
>> I'm not sure that there are many use cases where you have sufficient
>> room for all that is needed for DFU (including I/O buffers); and if
>> you move to RAM early, you have other options as well.
>
> No, it's true.  We have some "small" amount of image download area in
> some sort of on-chip RAM (OMAP3 is between 54 and 62KiB, depending on
> how we think about stack, AM335x is ~110KiB) which is where our first
> stage _has_to_ fit.  We can still do a two-step process here of loading
> a regular SPL and then a full U-Boot, but this requires more complicated
> host side tooling.
>
> But this is what I was trying to highlight, about how Scott's comment is
> right.  What's desired here, rightly is a U-Boot build with limited IO
> and a main loop that drops right into DFU.  You can do this today with
> SPL+U-Boot and a CONFIG_BOOTCOMMAND that just kicks off DFU.  But that
> means transferring more data, which is taking more time and yes,
> programming time is a concern.
>
>> > What is your alternative way?
>>
>> Depending on your hardware there is a zillion ways to do this.  For
>> low to medium volumes good old JTAG is still a very powerful tool; for
>> high volumes you will probably just fit pre-programmed NAND on your
>> board.  And of course there is the growing number of systems that can
>> just boot and install from a SDCard or USB MSD.
>
> Exactly.  But you're leaving out "system boots via USB gadget", which is
> what Michael is trying to solve.
>

This should make more sense. Try to have all the dfu support
in the first stage is complicated for the writing routine but having
just ram loading can be more simple considering the image size

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
#define DFU_BOARD_FLASHINFO "RAM" STR(DFU_RAM_DEVICE_ADDRESS) ";"

void spl_dfu_load_image()
{
int ret;
struct image_header *header;

printf("SPL load image\n");

ret = dfu_config_entities(DFU_BOARD_FLASHINFO, "ram", 0);
g_dnl_register("dfu");
while(1) {
if (ctrlc())
goto exit;
ret = usb_gadget_handle_interrupts();
if (ret)
goto exit;
}

g_dnl_unregister();
dfu_free_entities();

header = (struct image_header *)DFU_RAM_DEVICE_ADDRESS;
spl_parse_image_header(header);
memcpy((void *)DFU_RAM_DEVICE_ADDRESS, (void *)spl_image.load_addr,
spl_image.size);
return;
exit:
g_dnl_unregister();
dfu_free_entities();
}
> --
> Tom


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


Re: [U-Boot] Question about patman

2013-11-08 Thread Albert ARIBAUD
Hi Masahiro,

On Tue, 05 Nov 2013 12:47:05 +0900, Masahiro Yamada
 wrote:

> Hello Simon.
> 
> > You should put an alias for arm in your ~/.patman file, like this:
> > 
> > albert: Albert Aribaud 
> > arm: albert
> > 
> > There is also a -t option to skip bad aliases.
> 
> Thanks! It worked.
> I love this tool.  :-)
> 
> I have one more question.
> Does patman have a tag to handle the message area below
> the delimiter, '---' ?
> 
> I often use the area for writing additional explanations, which
> might be too verbose to be included into git log,
> but might be helpful for the code review.
> 
> I generally write in the area below '---' with a text editor
> before posting the patch file.
> 
> If patman could do this for me,
> it would be appreciated.

I have posted a patch to allow adding notes below the '---' line, if
this is what you mean. So far, there was no comment on it. See:

http://patchwork.ozlabs.org/patch/283057/

> Best Regards
> Masahiro Yamada

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


Re: [U-Boot] [PATCH v1 1/6] arm1136: move cache code from start.S to cache.c

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

On Friday, November 8, 2013 10:17:54 PM, Albert ARIBAUD wrote:
> arch/arm/cpu/arm1136/start.S contain a cache flushing function.
> Remove the function and move its code into arch/arm/lib/cache.c.
> 
> Signed-off-by: Albert ARIBAUD 

Reviewed-by: Benoît Thébaudeau 

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


Re: [U-Boot] [PATCH v2 2/2] arm: remove unneeded symbol offsets and _TEXT_BASE

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

On Thursday, November 7, 2013 3:15:04 PM, Albert ARIBAUD wrote:
> Remove the last uses of symbol offsets in ARM U-Boot.
> Remove some needless uses of _TEXT_BASE.
> Remove all _TEXT_BASE definitions.
> 
> Signed-off-by: Albert ARIBAUD 

Reviewed-by: Benoît Thébaudeau 

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


Re: [U-Boot] [PATCH v2 1/2] arm: make _end compiler-generated

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

On Thursday, November 7, 2013 3:15:03 PM, Albert ARIBAUD wrote:
> This prevents references to _end from generating absolute
> relocation records.
> 
> Signed-off-by: Albert ARIBAUD 

Reviewed-by: Benoît Thébaudeau 

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 v1] arm: keep all sections in ELF file

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

On Thursday, November 7, 2013 2:21:46 PM, Albert ARIBAUD wrote:
> Current LDS files /DISCARD/ a lot of sections when linking ELF
> files, causing diagnostic tools such as readelf or objdump to
> produce partial output. Keep all section at link stage, filter
> only at objcopy time so that .bin remains minimal.
> 
> Signed-off-by: Albert ARIBAUD 

Reviewed-by: Benoît Thébaudeau 

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


[U-Boot] [PATCH] Revert "ARM: move interrupt_init to before relocation"

2013-11-08 Thread Albert ARIBAUD
Revert commit 0f5141e9 which causes boards starting in
FLASH to try and write to a FLASH location.

Signed-off-by: Albert ARIBAUD 
---
 arch/arm/lib/board.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index 34f50b0..9c72a53 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -435,7 +435,6 @@ void board_init_f(ulong bootflag)
addr_sp += 128; /* leave 32 words for abort-stack   */
gd->irq_sp = addr_sp;
 #endif
-   interrupt_init();
 
debug("New Stack Pointer is: %08lx\n", addr_sp);
 
@@ -637,6 +636,8 @@ void board_init_r(gd_t *id, ulong dest_addr)
misc_init_r();
 #endif
 
+/* set up exceptions */
+   interrupt_init();
/* enable exceptions */
enable_interrupts();
 
-- 
1.8.3.2

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


Re: [U-Boot] A question about unconfigured pads check in omap24xx_i2c

2013-11-08 Thread Lubomir Popov
Hi Nikita,

> On 11/06/2013 03:19 PM, Lubomir Popov wrote:
>> On 06-Nov-13 14:12, Nikita Kiryanov wrote:
>>> In drivers/i2c/omap24xx_i2c.c there are a few checks that attempt to
>>> detect unconfigured pads for the i2c bus in use. These checks are
>>> all in the form of
>>>
>>> if (status == I2C_STAT_XRDY) {
>>> printf("unconfigured pads\n");
>>> return -1;
>>> }
>>>
>>> This check seems peculiar to me since the meaning of I2C_STAT_XRDY is
>>> that new data is requested for transmission. Why is that indication that
>>> the bus is not padconf'd for I2C?
>> Hi Nikita,
>>
>> This has been empirically confirmed on OMAP4 and OMAP5. When the pads
>> are not
>> configured, the I2C controller is actually disconnected from the bus.
>> The clock
>> input for its state machine has to come from the bus however due to
>> stretching
>> etc., although it is internally generated. So actually nothing changes
>> within
>> the controller after a transaction attempt is made, and it keeps its
>> initial
>> state with XRDY set only (ready to accept transmit data). I use this as an
>> indicator. Not perfect, but works in most cases.
>>
>> Regards,
>> Lubo
>>
>>
>
> Thanks for the quick reply.
> The reason I stumbled across this is that this check hasn't been working
> well on our OMAP3 based devices. Some I2C transactions work fine, but
> some of them fail this check in the address phase, especially if the I2C
> transactions happen in quick successions.
You mean that you occasionally get this error on an otherwise properly
configured and working bus, right? Does this happen with particular
slave devices only, or randomly? And is it happening in the SPL, or in
regular U-Boot?


> We did not have any I2C issues
> with the previous driver, and while this behavior is symptomatic of
> timing issues playing around with the delays didn't help.
Which delays did you modify? Did you try to increase I2C_WAIT/I2C_TIMEOUT?

> I was wondering if you might have some insights as to what may cause the
> controller to behave this way other than unconfigured pads?
Unfortunately I don't have any hands-on experience with OMAP3 (apart from
some very quick testing on a AM3359 derivative), and cannot guarantee that
the I2C controller IP on OMAP3 is absolutely the same as on OMAP4/5 (most
probably it isn't; shall check this on Monday). Anyway, if everything else
is OK (muxmode/pad config, pull-ups, power, etc.), the only reasonable
explanation would be that there is not enough time for the controller to
update its status register under certain conditions, and these would be
either a slower clock rate (that makes byte transmission time come close
to the timeout), or clock stretching by some slaves; btw, the latter
seems probable, judging from your words that this happens in the address
phase, when some devices could take longer to prepare for action, and they
do this by stretching the clock. That is why I'm asking if you tried to
increase I2C_TIMEOUT. Did you do any measurements on the bus to see if all
is OK and the clock rate is right, and if it gets stretched by some slaves?

Regards,
Lubo

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


[U-Boot] [PATCH v1 3/6] arm: pxa: move SP check from start.S to cpuinfo.c

2013-11-08 Thread Albert ARIBAUD
PXA start.S has a PXA (variant) specific check in
start.S. Move it to cpuinfo.c.

Signed-off-by: Albert ARIBAUD 
---
 arch/arm/cpu/pxa/cpuinfo.c | 6 ++
 arch/arm/cpu/pxa/start.S   | 6 --
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/cpu/pxa/cpuinfo.c b/arch/arm/cpu/pxa/cpuinfo.c
index 9d16079..17d8be5 100644
--- a/arch/arm/cpu/pxa/cpuinfo.c
+++ b/arch/arm/cpu/pxa/cpuinfo.c
@@ -11,6 +11,12 @@
 #include 
 #include 
 
+#ifdef CONFIG_CPU_PXA25X
+#if ((CONFIG_SYS_INIT_SP_ADDR) != 0xf800)
+#error "Init SP address must be set to 0xf800 for PXA250"
+#endif
+#endif
+
 #defineCPU_MASK_PXA_PRODID 0x03f0
 #defineCPU_MASK_PXA_REVID  0x000f
 
diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
index ae0d13c..eb3243a 100644
--- a/arch/arm/cpu/pxa/start.S
+++ b/arch/arm/cpu/pxa/start.S
@@ -23,12 +23,6 @@
 #include 
 #include 
 
-#ifdef CONFIG_CPU_PXA25X
-#if ((CONFIG_SYS_INIT_SP_ADDR) != 0xf800)
-#error "Init SP address must be set to 0xf800 for PXA250"
-#endif
-#endif
-
 .globl _start
 _start: b  reset
 #ifdef CONFIG_SPL_BUILD
-- 
1.8.3.2

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


[U-Boot] [PATCH v1 4/6] arm: ixp: cosmetic: move code around in start.S

2013-11-08 Thread Albert ARIBAUD
Make IPX start.S more consistant with other start.S files
by moving defines and macros away so that the file begins
with the exception vectors table.

Signed-off-by: Albert ARIBAUD 
---
 arch/arm/cpu/ixp/start.S | 64 
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S
index 0641593..9943e7f 100644
--- a/arch/arm/cpu/ixp/start.S
+++ b/arch/arm/cpu/ixp/start.S
@@ -16,38 +16,6 @@
 #include 
 #include 
 
-#define MMU_Control_M  0x001/* Enable MMU */
-#define MMU_Control_A  0x002/* Enable address alignment faults */
-#define MMU_Control_C  0x004/* Enable cache */
-#define MMU_Control_W  0x008/* Enable write-buffer */
-#define MMU_Control_P  0x010/* Compatability: 32 bit code */
-#define MMU_Control_D  0x020/* Compatability: 32 bit data */
-#define MMU_Control_L  0x040/* Compatability: */
-#define MMU_Control_B  0x080/* Enable Big-Endian */
-#define MMU_Control_S  0x100/* Enable system protection */
-#define MMU_Control_R  0x200/* Enable ROM protection */
-#define MMU_Control_I  0x1000   /* Enable Instruction cache */
-#define MMU_Control_X  0x2000   /* Set interrupt vectors at 0x */
-#define MMU_Control_Init (MMU_Control_P|MMU_Control_D|MMU_Control_L)
-
-
-/*
- * Macro definitions
- */
-   /* Delay a bit */
-   .macro DELAY_FOR cycles, reg0
-   ldr \reg0, =\cycles
-   subs\reg0, \reg0, #1
-   subne   pc,  pc, #0xc
-   .endm
-
-   /* wait for coprocessor write complete */
-   .macro CPWAIT reg
-   mrc  p15,0,\reg,c2,c0,0
-   mov  \reg,\reg
-   sub  pc,pc,#4
-   .endm
-
 .globl _start
 _start:
ldr pc, _reset
@@ -101,6 +69,38 @@ IRQ_STACK_START_IN:
  * the actual reset code
  */
 
+#define MMU_Control_M  0x001/* Enable MMU */
+#define MMU_Control_A  0x002/* Enable address alignment faults */
+#define MMU_Control_C  0x004/* Enable cache */
+#define MMU_Control_W  0x008/* Enable write-buffer */
+#define MMU_Control_P  0x010/* Compatability: 32 bit code */
+#define MMU_Control_D  0x020/* Compatability: 32 bit data */
+#define MMU_Control_L  0x040/* Compatability: */
+#define MMU_Control_B  0x080/* Enable Big-Endian */
+#define MMU_Control_S  0x100/* Enable system protection */
+#define MMU_Control_R  0x200/* Enable ROM protection */
+#define MMU_Control_I  0x1000   /* Enable Instruction cache */
+#define MMU_Control_X  0x2000   /* Set interrupt vectors at 0x */
+#define MMU_Control_Init (MMU_Control_P|MMU_Control_D|MMU_Control_L)
+
+
+/*
+ * Macro definitions
+ */
+   /* Delay a bit */
+   .macro DELAY_FOR cycles, reg0
+   ldr \reg0, =\cycles
+   subs\reg0, \reg0, #1
+   subne   pc,  pc, #0xc
+   .endm
+
+   /* wait for coprocessor write complete */
+   .macro CPWAIT reg
+   mrc  p15,0,\reg,c2,c0,0
+   mov  \reg,\reg
+   sub  pc,pc,#4
+   .endm
+
 reset:
/* disable mmu, set big-endian */
mov r0, #0xf8
-- 
1.8.3.2

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


[U-Boot] [PATCH v1 5/6] arm: remove unused _end_vect and _vectors_end symbols

2013-11-08 Thread Albert ARIBAUD
Signed-off-by: Albert ARIBAUD 
---
 arch/arm/cpu/arm1136/start.S  | 2 --
 arch/arm/cpu/arm1176/start.S  | 2 --
 arch/arm/cpu/arm946es/start.S | 2 --
 arch/arm/cpu/armv7/start.S| 3 ---
 arch/arm/cpu/pxa/start.S  | 2 --
 5 files changed, 11 deletions(-)

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index 0085754..13567b9 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -53,8 +53,6 @@ _irq: .word irq
 _fiq:  .word fiq
 _pad:  .word 0x12345678 /* now 16*4=64 */
 #endif /* CONFIG_SPL_BUILD */
-.global _end_vect
-_end_vect:
 
.balignl 16,0xdeadbeef
 /*
diff --git a/arch/arm/cpu/arm1176/start.S b/arch/arm/cpu/arm1176/start.S
index ce62011..b353d69 100644
--- a/arch/arm/cpu/arm1176/start.S
+++ b/arch/arm/cpu/arm1176/start.S
@@ -61,8 +61,6 @@ _pad:
. = _start + 64
 #endif
 
-.global _end_vect
-_end_vect:
.balignl 16,0xdeadbeef
 /*
  *
diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S
index 534592f..9806819 100644
--- a/arch/arm/cpu/arm946es/start.S
+++ b/arch/arm/cpu/arm946es/start.S
@@ -56,8 +56,6 @@ _fiq:
 
.balignl 16,0xdeadbeef
 
-_vectors_end:
-
 /*
  *
  *
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 4ff6268..d42a502 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -48,9 +48,6 @@ _fiq: .word fiq
 _pad:  .word 0x12345678 /* now 16*4=64 */
 #endif /* CONFIG_SPL_BUILD */
 
-.global _end_vect
-_end_vect:
-
.balignl 16,0xdeadbeef
 /*
  *
diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
index eb3243a..e3bf1c2 100644
--- a/arch/arm/cpu/pxa/start.S
+++ b/arch/arm/cpu/pxa/start.S
@@ -61,8 +61,6 @@ _irq: .word irq
 _fiq:  .word fiq
 _pad:  .word 0x12345678 /* now 16*4=64 */
 #endif /* CONFIG_SPL_BUILD */
-.global _end_vect
-_end_vect:
 
.balignl 16,0xdeadbeef
 /*
-- 
1.8.3.2

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


[U-Boot] [PATCH v1 2/6] arm: move reset_cpu from start.S into cpu.c

2013-11-08 Thread Albert ARIBAUD
CPUs arm946es, ixp and sa1100 all define the reset_cpu()
function in their start.S file. Move this cpu-specific code
into cpu.c so that start.S only contains ARM generic code.

Signed-off-by: Albert ARIBAUD 
---
 arch/arm/cpu/arm946es/cpu.c   | 12 
 arch/arm/cpu/arm946es/start.S | 23 ---
 arch/arm/cpu/ixp/cpu.c|  9 +
 arch/arm/cpu/ixp/start.S  | 24 
 arch/arm/cpu/sa1100/cpu.c | 14 ++
 arch/arm/cpu/sa1100/start.S   | 10 --
 6 files changed, 35 insertions(+), 57 deletions(-)

diff --git a/arch/arm/cpu/arm946es/cpu.c b/arch/arm/cpu/arm946es/cpu.c
index 0c8d92d..add0a4a 100644
--- a/arch/arm/cpu/arm946es/cpu.c
+++ b/arch/arm/cpu/arm946es/cpu.c
@@ -16,6 +16,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static void cache_flush(void);
 
@@ -51,3 +52,14 @@ static void cache_flush (void)
asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
asm ("mcr p15, 0, %0, c7, c6, 0": :"r" (i));
 }
+
+#ifndef CONFIG_INTEGRATOR
+
+__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
+{
+   writew(0x0, 0xfffece10);
+   writew(0x8, 0xfffece10);
+   for (;;) {}
+}
+
+#endif /* #ifdef CONFIG_INTEGRATOR */
diff --git a/arch/arm/cpu/arm946es/start.S b/arch/arm/cpu/arm946es/start.S
index 7d50145..534592f 100644
--- a/arch/arm/cpu/arm946es/start.S
+++ b/arch/arm/cpu/arm946es/start.S
@@ -320,26 +320,3 @@ fiq:
bl  do_fiq
 
 #endif
-
-# ifdef CONFIG_INTEGRATOR
-
-   /* Satisfied by general board level routine */
-
-#else
-
-   .align  5
-.globl reset_cpu
-reset_cpu:
-
-   ldr r1, rstctl1 /* get clkm1 reset ctl */
-   mov r3, #0x0
-   strhr3, [r1]/* clear it */
-   mov r3, #0x8
-   strhr3, [r1]/* force dsp+arm reset */
-_loop_forever:
-   b   _loop_forever
-
-rstctl1:
-   .word   0xfffece10
-
-#endif /* #ifdef CONFIG_INTEGRATOR */
diff --git a/arch/arm/cpu/ixp/cpu.c b/arch/arm/cpu/ixp/cpu.c
index 4387c18..2c20307 100644
--- a/arch/arm/cpu/ixp/cpu.c
+++ b/arch/arm/cpu/ixp/cpu.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static void cache_flush(void);
 
@@ -98,3 +99,11 @@ int cpu_eth_init(bd_t *bis)
 #endif
return 0;
 }
+
+__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
+{
+   writel(0x482e, IXP425_OSWK);
+   writel(0x0fff, IXP425_OSWT);
+   writel(0x5, IXP425_OSWE);
+   for (;;) {}
+}
diff --git a/arch/arm/cpu/ixp/start.S b/arch/arm/cpu/ixp/start.S
index 80ef443..0641593 100644
--- a/arch/arm/cpu/ixp/start.S
+++ b/arch/arm/cpu/ixp/start.S
@@ -378,27 +378,3 @@ fiq:
bl  do_fiq
 
 #endif
-
-//
-/*  */
-/* Reset function: Use Watchdog to reset*/
-/*  */
-//
-
-   .align  5
-.globl reset_cpu
-
-reset_cpu:
-   ldr r1, =0x482e
-   ldr r2, =IXP425_OSWK
-   str r1, [r2]
-   ldr r1, =0x0fff
-   ldr r2, =IXP425_OSWT
-   str r1, [r2]
-   ldr r1, =0x5
-   ldr r2, =IXP425_OSWE
-   str r1, [r2]
-   b   reset_endless
-
-reset_endless:
-   b   reset_endless
diff --git a/arch/arm/cpu/sa1100/cpu.c b/arch/arm/cpu/sa1100/cpu.c
index 6651898..9620ac6 100644
--- a/arch/arm/cpu/sa1100/cpu.c
+++ b/arch/arm/cpu/sa1100/cpu.c
@@ -17,6 +17,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef CONFIG_USE_IRQ
 DECLARE_GLOBAL_DATA_PTR;
@@ -52,3 +53,16 @@ static void cache_flush (void)
 
asm ("mcr p15, 0, %0, c7, c5, 0": :"r" (i));
 }
+
+#define RST_BASE 0x9003
+#define RSRR   0x00
+#define RCSR   0x04
+
+__attribute__((noreturn)) void reset_cpu(ulong addr __attribute__((unused)))
+{
+   while(1) /* repeat endlessly */
+   {
+   writel(0, RST_BASE + RCSR);
+   writel(1, RST_BASE + RSRR);
+   }
+}
diff --git a/arch/arm/cpu/sa1100/start.S b/arch/arm/cpu/sa1100/start.S
index bf80937..472a595 100644
--- a/arch/arm/cpu/sa1100/start.S
+++ b/arch/arm/cpu/sa1100/start.S
@@ -337,13 +337,3 @@ fiq:
bl  do_fiq
 
 #endif
-
-   .align  5
-.globl reset_cpu
-reset_cpu:
-   ldr r0, RST_BASE
-   mov r1, #0x0@ set bit 3-0 ...
-   str r1, [r0, #RCSR] @ ... to clear in RCSR
-   mov r1, #0x1
-   str r1, [r0, #RSRR] @ and perform reset
-   b   reset_cpu   @ silly, but repeat endlessly
-- 
1.8.3.2

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


[U-Boot] [PATCH v1 1/6] arm1136: move cache code from start.S to cache.c

2013-11-08 Thread Albert ARIBAUD
arch/arm/cpu/arm1136/start.S contain a cache flushing function.
Remove the function and move its code into arch/arm/lib/cache.c.

Signed-off-by: Albert ARIBAUD 
---
 arch/arm/cpu/arm1136/start.S | 10 --
 arch/arm/lib/cache.c | 13 ++---
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index 3e2358e..0085754 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -333,14 +333,4 @@ fiq:
bl  do_fiq
 
 #endif
-   .align 5
-.global arm1136_cache_flush
-arm1136_cache_flush:
-#if !defined(CONFIG_SYS_ICACHE_OFF)
-   mcr p15, 0, r1, c7, c5, 0   @ invalidate I cache
-#endif
-#if !defined(CONFIG_SYS_DCACHE_OFF)
-   mcr p15, 0, r1, c7, c14, 0  @ invalidate D cache
-#endif
-   mov pc, lr  @ back to caller
 #endif /* CONFIG_SPL_BUILD */
diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 6cc136a..4f6b9f0 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -12,16 +12,23 @@
 void  __flush_cache(unsigned long start, unsigned long size)
 {
 #if defined(CONFIG_ARM1136)
-   void arm1136_cache_flush(void);
 
-   arm1136_cache_flush();
+#if !defined(CONFIG_SYS_ICACHE_OFF)
+   asm("mcr p15, 0, r1, c7, c5, 0"); /* invalidate I cache */
 #endif
+
+#if !defined(CONFIG_SYS_DCACHE_OFF)
+   asm("mcr p15, 0, r1, c7, c14, 0"); /* Clean+invalidate D cache */
+#endif
+
+#endif /* CONFIG_ARM1136 */
+
 #ifdef CONFIG_ARM926EJS
/* test and clean, page 2-23 of arm926ejs manual */
asm("0: mrc p15, 0, r15, c7, c10, 3\n\t" "bne 0b\n" : : : "memory");
/* disable write buffer as well (page 2-22) */
asm("mcr p15, 0, %0, c7, c10, 4" : : "r" (0));
-#endif
+#endif /* CONFIG_ARM926EJS */
return;
 }
 void  flush_cache(unsigned long start, unsigned long size)
-- 
1.8.3.2

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


[U-Boot] [PATCH v1 0/6] ARM: refactor start.S files

2013-11-08 Thread Albert ARIBAUD
This series aims at refactoring start.S files. Some of these
files contain cache-related or cpu-reset-related core, which
is moved where it belongs. Useless symbols are removed, and
finally, exception vector code, common across all ARM CPUs,
is moved in its own file.

At this point, the start.S files only contain CPU-specific reset
sequences.

NOTE: this series should be applied above the "arm: remove
unneeded symbol offsets and _TEXT_BASE" series.


Albert ARIBAUD (6):
  arm1136: move cache code from start.S to cache.c
  arm: move reset_cpu from start.S into cpu.c
  arm: pxa: move SP check from start.S to cpuinfo.c
  arm: ixp: cosmetic: move code around in start.S
  arm: remove unused _end_vect and _vectors_end symbols
  arm: move exception handling out of start.S files

 arch/arm/cpu/arm1136/start.S| 254 +---
 arch/arm/cpu/arm1176/start.S| 198 +--
 arch/arm/cpu/arm720t/start.S| 229 +
 arch/arm/cpu/arm920t/ep93xx/u-boot.lds  |   3 +-
 arch/arm/cpu/arm920t/start.S| 216 +---
 arch/arm/cpu/arm926ejs/mxs/start.S  |  92 +
 arch/arm/cpu/arm926ejs/spear/start.S|  27 +--
 arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds |   1 +
 arch/arm/cpu/arm926ejs/start.S  | 262 +---
 arch/arm/cpu/arm946es/cpu.c |  12 ++
 arch/arm/cpu/arm946es/start.S   | 246 +--
 arch/arm/cpu/arm_intcm/start.S  | 228 +
 arch/arm/cpu/armv7/start.S  | 246 +--
 arch/arm/cpu/ixp/cpu.c  |   9 +
 arch/arm/cpu/ixp/start.S| 249 +--
 arch/arm/cpu/ixp/u-boot.lds |   1 +
 arch/arm/cpu/pxa/cpuinfo.c  |   6 +
 arch/arm/cpu/pxa/start.S| 253 +---
 arch/arm/cpu/sa1100/cpu.c   |  14 ++
 arch/arm/cpu/sa1100/start.S | 225 +
 arch/arm/cpu/u-boot-spl.lds |   1 +
 arch/arm/cpu/u-boot.lds |   1 +
 arch/arm/lib/Makefile   |   2 +-
 arch/arm/lib/cache.c|  13 +-
 arch/arm/lib/vectors.S  | 296 
 board/actux1/u-boot.lds |   1 +
 board/actux2/u-boot.lds |   1 +
 board/actux3/u-boot.lds |   1 +
 board/dvlhost/u-boot.lds|   1 +
 board/ti/am335x/u-boot.lds  |   1 +
 30 files changed, 383 insertions(+), 2706 deletions(-)
 create mode 100644 arch/arm/lib/vectors.S

-- 
1.8.3.2

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


Re: [U-Boot] [PATCH 3/3] ahci: support LBA48 data reads for 2+TB drives

2013-11-08 Thread Anatolij Gustschin
On Tue, 10 Sep 2013 15:19:17 -0500
Mark Langsdorf  wrote:
...
> diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
> index 8cc9379..c5c942f 100644
> --- a/drivers/block/ahci.c
> +++ b/drivers/block/ahci.c

...
> @@ -689,10 +696,13 @@ static int ata_scsiop_read_write(ccb *pccb, u8 is_write)
>*
>* WARNING: one or two older ATA drives treat 0 as 0...
>*/
> - blocks = (((u16)pccb->cmd[7]) << 8) | ((u16) pccb->cmd[8]);
> + if (pccb->cmd[0] == SCSI_READ16)
> + blocks = (((u16)pccb->cmd[13]) << 8) | ((u16) pccb->cmd[14]);
> + else
> + blocks = (((u16)pccb->cmd[7]) << 8) | ((u16) pccb->cmd[8]);
>  
> - debug("scsi_ahci: %s %d blocks starting from lba 0x%x\n",
> -   is_write ?  "write" : "read", (unsigned)lba, blocks);
> + debug("scsi_ahci: %s %u blocks starting from lba 0x" LBAFU "\n",
> +   is_write ?  "write" : "read", blocks, lba);

LBAFU is defined as "%llu" or "%lu", so " 0x" in the debug string
will suggest that the lba value is in hexadecimal notation, but
the format specifier outputs as decimal. Please remove "0x" when
applying this patch. Thanks!

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


Re: [U-Boot] [U-Boot, 3/3] ahci: support LBA48 data reads for 2+TB drives

2013-11-08 Thread Tom Rini
On Tue, Sep 10, 2013 at 03:19:17PM -0500, Mark Langsdorf wrote:

> Enable full 48-bit LBA48 data reads by passing the upper word of the
> LBA block pointer in bytes 9 and 10 of the FIS.
> 
> This allows uboot to load data from any arbitrary sector on a drive
> with 2 or more TB of available data connected to an AHCI controller.
> 
> Signed-off-by: Mark Langsdorf 

OK, so a few things in here:

[snip]
> +void scsi_setup_read16(ccb * pccb, lbaint_t start, unsigned long blocks)
> +{
> + pccb->cmd[0] = SCSI_READ16;
> + pccb->cmd[1] = pccb->lun<<5;
> + pccb->cmd[2] = ((unsigned char) (start >> 56)) & 0xff;

This isn't protected with CONFIG_LBA48, so on non-LBA48 enabled boards
(P2020DS_36BIT is the example I found here) we get warnings here and on

[snip]
> @@ -721,6 +731,11 @@ static int ata_scsiop_read_write(ccb *pccb, u8 is_write)
>   fis[6] = (lba >> 16) & 0xff;
>   fis[7] = 1 << 6; /* device reg: set LBA mode */
>   fis[8] = ((lba >> 24) & 0xff);
> + if (pccb->cmd[0] == SCSI_READ16) {
> + fis[9] = ((lba >> 32) & 0xff);
> + fis[10] = ((lba >> 40) & 0xff);
> + }
> +

This hunk.

It's easy enough to guard both of these cases with #ifdef CONFIG_LBA48,
and I've done so now.

But, highbank isn't setting CONFIG_LBA48 and probably really wants to,
yes?

-- 
Tom


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


[U-Boot] [PULL] u-boot-usb/master

2013-11-08 Thread Marek Vasut
The following changes since commit 2cee0408e5c6f5dbdfa89fb40168ba2ead3f61a6:

  Merge branch 'master' of git://www.denx.de/git/u-boot-coldfire (2013-11-06 
16:18:25 -0500)

are available in the git repository at:


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



for you to fetch changes up to 47d79deb9967970984cef8b48a566c82180e:





  usb: dfu: make nand upload working (2013-11-08 20:46:20 +0100)








Bo Shen (3):


  usb: dfu: decrease dfu->r_left along with the transfer


  usb: dfu: correct dfu buffer inited value 


  usb: dfu: make nand upload working





Heiko Schocher (1): 


  usb, g_dnl: make iSerialNumber board configurable 





Mateusz Kulikowski (1): 


  usb: ohci-hcd: submit_common_msg: report actual_length properly   



Przemyslaw Marczak (5):
  usb: ums: code refactoring to improve reusability on other boards.
  usb: ums: allows using every mmc device with ums.
  usb: ums: fix disk capacity miscalculation and code cleanup
  usb: ums: move ums code from trats to Samsung common directory
  usb: ums: add ums exit feature by ctrl+c or by detach usb cable

 README  |  7 +++
 board/samsung/common/Makefile   |  1 +
 board/samsung/common/ums.c  | 76 

 board/samsung/trats/trats.c | 62 
--
 common/cmd_usb_mass_storage.c   | 51 
+++
 drivers/dfu/dfu.c   |  3 ++-
 drivers/dfu/dfu_nand.c  |  1 +
 drivers/usb/gadget/f_mass_storage.c | 67 
+++
 drivers/usb/gadget/g_dnl.c  | 20 
 drivers/usb/gadget/storage_common.c | 27 +++
 drivers/usb/host/ohci-hcd.c |  2 +-
 include/configs/trats.h |  2 --
 include/g_dnl.h |  1 +
 include/usb.h   | 10 ++
 include/usb_mass_storage.h  | 33 +
 15 files changed, 205 insertions(+), 158 deletions(-)
 create mode 100644 board/samsung/common/ums.c
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] usb: dfu: make nand upload working

2013-11-08 Thread Marek Vasut
Dear Bo Shen,

> Nowhere pass a value to len, which always 0, make no transfer which
> cause uploading failed.
> 
> This patch make nand upload working. However it needs enough malloc
> buffer to store read data, that means the buffer at least equal to
> the upload partition size, or else it doesn't work.
> 
> Signed-off-by: Bo Shen 
> ---
> Changes in v2:
>   - Move code to nand part, or else it will break mmc
> 
>  drivers/dfu/dfu_nand.c |1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

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


[U-Boot] [PATCH] am33xx: Make SoC bootcount driver have its own symbol

2013-11-08 Thread Tom Rini
Some am33xx boards may not use the RTC block for bootcount (as it may
not be wired up for the board) and use some other facility.  So add
another symbol for the bootcount driver for the IP block.

Cc: Heiko Schocher 
Signed-off-by: Tom Rini 
---
 drivers/bootcount/Makefile|2 +-
 drivers/bootcount/bootcount_davinci.c |4 
 include/configs/am335x_evm.h  |4 
 include/configs/ti_am335x_common.h|4 ++--
 4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/bootcount/Makefile b/drivers/bootcount/Makefile
index d0b8a79..4154352 100644
--- a/drivers/bootcount/Makefile
+++ b/drivers/bootcount/Makefile
@@ -10,7 +10,7 @@ COBJS-y   += bootcount.o
 COBJS-$(CONFIG_AT91SAM9XE) += bootcount_at91.o
 COBJS-$(CONFIG_BLACKFIN)   += bootcount_blackfin.o
 COBJS-$(CONFIG_SOC_DA8XX)  += bootcount_davinci.o
-COBJS-$(CONFIG_AM33XX) += bootcount_davinci.o
+COBJS-$(CONFIG_BOOTCOUNT_AM33XX) += bootcount_davinci.o
 COBJS-$(CONFIG_BOOTCOUNT_RAM)  += bootcount_ram.o
 COBJS-$(CONFIG_BOOTCOUNT_ENV)  += bootcount_env.o
 
diff --git a/drivers/bootcount/bootcount_davinci.c 
b/drivers/bootcount/bootcount_davinci.c
index f0acfad..fa87b5e 100644
--- a/drivers/bootcount/bootcount_davinci.c
+++ b/drivers/bootcount/bootcount_davinci.c
@@ -2,6 +2,10 @@
  * (C) Copyright 2011
  * Heiko Schocher, DENX Software Engineering, h...@denx.de.
  *
+ * A bootcount driver for the RTC IP block found on many TI platforms.
+ * This requires the RTC clocks, etc, to be enabled prior to use and
+ * not all boards with this IP block on it will have the RTC in use.
+ *
  * SPDX-License-Identifier:GPL-2.0+
  */
 
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index c2ba7e3..9015927 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -199,6 +199,10 @@
 #define CONFIG_SPL_POWER_SUPPORT
 #define CONFIG_SPL_YMODEM_SUPPORT
 
+/* Bootcount using the RTC block */
+#define CONFIG_BOOTCOUNT_LIMIT
+#define CONFIG_BOOTCOUNT_AM33XX
+
 /* CPSW support */
 #define CONFIG_SPL_ETH_SUPPORT
 
diff --git a/include/configs/ti_am335x_common.h 
b/include/configs/ti_am335x_common.h
index 0f6fa62..4364eef 100644
--- a/include/configs/ti_am335x_common.h
+++ b/include/configs/ti_am335x_common.h
@@ -43,9 +43,9 @@
 
 /*
  * RTC related defines. To use bootcount you must set bootlimit in the
- * environment to a non-zero value.
+ * environment to a non-zero value and enable CONFIG_BOOTCOUNT_LIMIT
+ * in the board config.
  */
-#define CONFIG_BOOTCOUNT_LIMIT
 #define CONFIG_SYS_BOOTCOUNT_ADDR  0x44E3E000
 
 /* Enable the HW watchdog, since we can use this with bootcount */
-- 
1.7.9.5

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


Re: [U-Boot] [PATCH 2/2] sandbox: convert to common time functions

2013-11-08 Thread Simon Glass
Hi Rob,

On Fri, Nov 8, 2013 at 10:18 AM, Rob Herring  wrote:
> On Fri, Nov 8, 2013 at 10:32 AM, Simon Glass  wrote:
>> Hi Rob,
>>
>> On Fri, Nov 8, 2013 at 7:40 AM, Rob Herring  wrote:
>>> From: Rob Herring 
>>>
>>> Convert sandbox to use common time functions.
>>>
>>> Signed-off-by: Rob Herring 
>>> ---
>>>  board/sandbox/sandbox/sandbox.c | 14 ++
>>>  include/configs/sandbox.h   |  2 ++
>>>  2 files changed, 4 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/board/sandbox/sandbox/sandbox.c 
>>> b/board/sandbox/sandbox/sandbox.c
>>> index f471cb7..65dcce8 100644
>>> --- a/board/sandbox/sandbox/sandbox.c
>>> +++ b/board/sandbox/sandbox/sandbox.c
>>> @@ -18,19 +18,9 @@ void flush_cache(unsigned long start, unsigned long size)
>>>  {
>>>  }
>>>
>>> -ulong get_tbclk(void)
>>> +unsigned long timer_read_counter(void)
>>>  {
>>> -   return CONFIG_SYS_HZ;
>>> -}
>>> -
>>> -unsigned long long get_ticks(void)
>>> -{
>>> -   return get_timer(0);
>>> -}
>>> -
>>> -ulong get_timer(ulong base)
>>> -{
>>> -   return (os_get_nsec() / 100) - base;
>>> +   return os_get_nsec() / 1000;
>>
>> Doesn't this change the time base to microseconds? It would be good to
>> keep sandbox at milliseconds like other boards. Or did I miss the
>> reason for this change?
>
> get_timer is still millisec. get_ticks is the "raw" counter ticks
> which is in microsec for sandbox. Some boards are equal here and some
> are not. The advantage of the latter is udelay has better resolution.
> However, in the case of sandbox, it uses the OS usleep so this doesn't
> matter.

OK that sounds good. I missed your timer patches at the time.

Acked-by: Simon Glass 

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


[U-Boot] [PATCH] mx6sabresd: Add SPI NOR support

2013-11-08 Thread Fabio Estevam
mx6sabre board has a m25p32 SPI NOR connected to ECSPI1 port.

Add support for it.

This patch allows the SPI NOR flash to be succesfully detected:

=> sf probe   
SF: Detected M25P32 with page size 256 Bytes, erase size 64 KiB, total 4 MiB

Signed-off-by: Fabio Estevam 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 19 +++
 include/configs/mx6sabre_common.h   | 11 +++
 2 files changed, 30 insertions(+)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index ba1f289..f6d6379 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -37,6 +37,9 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP |  \
PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS)
 
+#define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \
+ PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST)
+
 int dram_init(void)
 {
gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE);
@@ -120,6 +123,18 @@ iomux_v3_cfg_t const usdhc4_pads[] = {
MX6_PAD_SD4_DAT7__USDHC4_DAT7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
 };
 
+iomux_v3_cfg_t const ecspi1_pads[] = {
+   MX6_PAD_KEY_COL0__ECSPI1_SCLK | MUX_PAD_CTRL(SPI_PAD_CTRL),
+   MX6_PAD_KEY_COL1__ECSPI1_MISO | MUX_PAD_CTRL(SPI_PAD_CTRL),
+   MX6_PAD_KEY_ROW0__ECSPI1_MOSI | MUX_PAD_CTRL(SPI_PAD_CTRL),
+   MX6_PAD_KEY_ROW1__GPIO_4_9 | MUX_PAD_CTRL(NO_PAD_CTRL),
+};
+
+static void setup_spi(void)
+{
+   imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads));
+}
+
 static void setup_iomux_uart(void)
 {
imx_iomux_v3_setup_multiple_pads(uart1_pads, ARRAY_SIZE(uart1_pads));
@@ -454,6 +469,10 @@ int board_init(void)
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
+#ifdef CONFIG_MXC_SPI
+   setup_spi();
+#endif
+
return 0;
 }
 
diff --git a/include/configs/mx6sabre_common.h 
b/include/configs/mx6sabre_common.h
index bf6113b..cfd3e48 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -60,6 +60,17 @@
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_ATHEROS
 
+#define CONFIG_CMD_SF
+#ifdef CONFIG_CMD_SF
+#define CONFIG_SPI_FLASH
+#define CONFIG_SPI_FLASH_STMICRO
+#define CONFIG_MXC_SPI
+#define CONFIG_SF_DEFAULT_BUS  0
+#define CONFIG_SF_DEFAULT_CS   (0 | (IMX_GPIO_NR(4, 9) << 8))
+#define CONFIG_SF_DEFAULT_SPEED2000
+#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
+#endif
+
 /* allow to overwrite serial and ethaddr */
 #define CONFIG_ENV_OVERWRITE
 #define CONFIG_CONS_INDEX  1
-- 
1.8.1.2


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


Re: [U-Boot] [PATCH v2] usb: dfu: make nand upload working

2013-11-08 Thread Lukasz Majewski
Hi Bo,

> Nowhere pass a value to len, which always 0, make no transfer which
> cause uploading failed.
> 
> This patch make nand upload working. However it needs enough malloc
> buffer to store read data, that means the buffer at least equal to
> the upload partition size, or else it doesn't work.
> 
> Signed-off-by: Bo Shen 

I would kindly ask some users of NAND part of the DFU (Tom, Heiko) to
test if this change doesn't break anything.


> ---
> Changes in v2:
>   - Move code to nand part, or else it will break mmc
> 
>  drivers/dfu/dfu_nand.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dfu/dfu_nand.c b/drivers/dfu/dfu_nand.c
> index 1c2e03b..cf082e2 100644
> --- a/drivers/dfu/dfu_nand.c
> +++ b/drivers/dfu/dfu_nand.c
> @@ -121,6 +121,7 @@ static int dfu_read_medium_nand(struct dfu_entity
> *dfu, u64 offset, void *buf, 
>   switch (dfu->layout) {
>   case DFU_RAW_ADDR:
> + *len = dfu->data.nand.size;
>   ret = nand_block_read(dfu, offset, buf, len);
>   break;
>   default:

Best regards,
Lukasz


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


Re: [U-Boot] A question about unconfigured pads check in omap24xx_i2c

2013-11-08 Thread Nikita Kiryanov

On 11/06/2013 03:19 PM, Lubomir Popov wrote:

On 06-Nov-13 14:12, Nikita Kiryanov wrote:

In drivers/i2c/omap24xx_i2c.c there are a few checks that attempt to
detect unconfigured pads for the i2c bus in use. These checks are
all in the form of

if (status == I2C_STAT_XRDY) {
printf("unconfigured pads\n");
return -1;
}

This check seems peculiar to me since the meaning of I2C_STAT_XRDY is
that new data is requested for transmission. Why is that indication that
the bus is not padconf'd for I2C?

Hi Nikita,

This has been empirically confirmed on OMAP4 and OMAP5. When the pads
are not
configured, the I2C controller is actually disconnected from the bus.
The clock
input for its state machine has to come from the bus however due to
stretching
etc., although it is internally generated. So actually nothing changes
within
the controller after a transaction attempt is made, and it keeps its
initial
state with XRDY set only (ready to accept transmit data). I use this as an
indicator. Not perfect, but works in most cases.

Regards,
Lubo




Thanks for the quick reply.
The reason I stumbled across this is that this check hasn't been working
well on our OMAP3 based devices. Some I2C transactions work fine, but
some of them fail this check in the address phase, especially if the I2C
transactions happen in quick successions. We did not have any I2C issues
with the previous driver, and while this behavior is symptomatic of
timing issues playing around with the delays didn't help.
I was wondering if you might have some insights as to what may cause the
controller to behave this way other than unconfigured pads?


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


[U-Boot] [U-BOOT PATCH] net: zynq_gem: Add d-cache support

2013-11-08 Thread Jagannadha Sutradharudu Teki
From: Srikanth Thokala 

Added d-cache support for zynq_gem.c,
Observed a difference of +0.8 MiB/s when downloading
a file of size of 3007944Bytes.

With d-cache OFF:

Filename 'uImage'.
Load address: 0x800
Loading: #
 #
 #
 ##
 1.3 MiB/s
done
Bytes transferred = 3007944 (2de5c8 hex)

With d-cache ON:
---
Filename 'uImage'.
Load address: 0x800
Loading: #
 #
 #
 ##
 2.1 MiB/s
done
Bytes transferred = 3007944 (2de5c8 hex)

Changes on zynq_gem for d-cache support:
- Tx and Rx buffers are cache-aligned
- Updated logic for invalidating Rx buffers and flushing Tx buffers.
- Tx and Rx BD's are allocated from non-cacheable region.
  (When BDs are cached, we don't see a consistent link)
- Use TX BD status intead of txsr status checks.

Signed-off-by: Srikanth Thokala 
Signed-off-by: Jagannadha Sutradharudu Teki 
Signed-off-by: Michal Simek 
---
 drivers/net/zynq_gem.c | 82 --
 1 file changed, 53 insertions(+), 29 deletions(-)

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 236a753..6a017a8 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -43,11 +43,6 @@
 #define ZYNQ_GEM_TXBUF_WRAP_MASK   0x4000
 #define ZYNQ_GEM_TXBUF_LAST_MASK   0x8000 /* Last buffer */
 
-#define ZYNQ_GEM_TXSR_HRESPNOK_MASK0x0100 /* Transmit hresp not OK */
-#define ZYNQ_GEM_TXSR_URUN_MASK0x0040 /* Transmit underrun 
*/
-/* Transmit buffs exhausted mid frame */
-#define ZYNQ_GEM_TXSR_BUFEXH_MASK  0x0010
-
 #define ZYNQ_GEM_NWCTRL_TXEN_MASK  0x0008 /* Enable transmit */
 #define ZYNQ_GEM_NWCTRL_RXEN_MASK  0x0004 /* Enable receive */
 #define ZYNQ_GEM_NWCTRL_MDEN_MASK  0x0010 /* Enable MDIO port */
@@ -90,6 +85,11 @@
  */
 #define PHY_DETECT_MASK 0x1808
 
+/* TX BD status masks */
+#define ZYNQ_GEM_TXBUF_FRMLEN_MASK 0x07ff
+#define ZYNQ_GEM_TXBUF_EXHAUSTED   0x0800
+#define ZYNQ_GEM_TXBUF_UNDERRUN0x1000
+
 /* Device registers */
 struct zynq_gem_regs {
u32 nwctrl; /* Network Control reg */
@@ -123,12 +123,18 @@ struct emac_bd {
 };
 
 #define RX_BUF 3
+/* Page table entries are set to 1MB, or multiples of 1MB
+ * (not < 1MB). driver uses less bd's so use 1MB bdspace.
+ */
+#define BD_SPACE   0x10
+/* BD separation space */
+#define BD_SEPRN_SPACE 64
 
 /* Initialized, rxbd_current, rx_first_buf must be 0 after init */
 struct zynq_gem_priv {
-   struct emac_bd tx_bd;
-   struct emac_bd rx_bd[RX_BUF];
-   char rxbuffers[RX_BUF * PKTSIZE_ALIGN];
+   struct emac_bd *tx_bd;
+   struct emac_bd *rx_bd;
+   char *rxbuffers;
u32 rxbd_current;
u32 rx_first_buf;
int phyaddr;
@@ -299,20 +305,18 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * 
bis)
readl(®s->stat[i]);
 
/* Setup RxBD space */
-   memset(&(priv->rx_bd), 0, sizeof(priv->rx_bd));
-   /* Create the RxBD ring */
-   memset(&(priv->rxbuffers), 0, sizeof(priv->rxbuffers));
+   memset(priv->rx_bd, 0, RX_BUF * sizeof(struct emac_bd));
 
for (i = 0; i < RX_BUF; i++) {
priv->rx_bd[i].status = 0xF000;
priv->rx_bd[i].addr =
-   (u32)((char *)&(priv->rxbuffers) +
+   ((u32)(priv->rxbuffers) +
(i * PKTSIZE_ALIGN));
}
/* WRAP bit to last BD */
priv->rx_bd[--i].addr |= ZYNQ_GEM_RXBUF_WRAP_MASK;
/* Write RxBDs to IP */
-   writel((u32)&(priv->rx_bd), ®s->rxqbase);
+   writel((u32)priv->rx_bd, ®s->rxqbase);
 
/* Setup for DMA Configuration register */
writel(ZYNQ_GEM_DMACR_INIT, ®s->dmacr);
@@ -368,32 +372,35 @@ static int zynq_gem_init(struct eth_device *dev, bd_t * 
bis)
 
 static int zynq_gem_send(struct eth_device *dev, void *ptr, int len)
 {
-   u32 status;
+   u32 addr, size;
struct zynq_gem_priv *priv = dev->priv;
struct zynq_gem_regs *regs = (struct zynq_gem_regs *)dev->iobase;
-   const u32 mask = ZYNQ_GEM_TXSR_HRESPNOK_MASK | \
-   ZYNQ_GEM_TXSR_URUN_MASK | ZYNQ_GEM_TXSR_BUFEXH_MASK;
 
/* setup BD */
-   writel((u32)&(priv->tx_bd), ®s->txqbase);
+   writel((u32)priv->tx_bd, ®s->txqbase);
 
 

Re: [U-Boot] [PATCH 2/2] sandbox: convert to common time functions

2013-11-08 Thread Rob Herring
On Fri, Nov 8, 2013 at 10:32 AM, Simon Glass  wrote:
> Hi Rob,
>
> On Fri, Nov 8, 2013 at 7:40 AM, Rob Herring  wrote:
>> From: Rob Herring 
>>
>> Convert sandbox to use common time functions.
>>
>> Signed-off-by: Rob Herring 
>> ---
>>  board/sandbox/sandbox/sandbox.c | 14 ++
>>  include/configs/sandbox.h   |  2 ++
>>  2 files changed, 4 insertions(+), 12 deletions(-)
>>
>> diff --git a/board/sandbox/sandbox/sandbox.c 
>> b/board/sandbox/sandbox/sandbox.c
>> index f471cb7..65dcce8 100644
>> --- a/board/sandbox/sandbox/sandbox.c
>> +++ b/board/sandbox/sandbox/sandbox.c
>> @@ -18,19 +18,9 @@ void flush_cache(unsigned long start, unsigned long size)
>>  {
>>  }
>>
>> -ulong get_tbclk(void)
>> +unsigned long timer_read_counter(void)
>>  {
>> -   return CONFIG_SYS_HZ;
>> -}
>> -
>> -unsigned long long get_ticks(void)
>> -{
>> -   return get_timer(0);
>> -}
>> -
>> -ulong get_timer(ulong base)
>> -{
>> -   return (os_get_nsec() / 100) - base;
>> +   return os_get_nsec() / 1000;
>
> Doesn't this change the time base to microseconds? It would be good to
> keep sandbox at milliseconds like other boards. Or did I miss the
> reason for this change?

get_timer is still millisec. get_ticks is the "raw" counter ticks
which is in microsec for sandbox. Some boards are equal here and some
are not. The advantage of the latter is udelay has better resolution.
However, in the case of sandbox, it uses the OS usleep so this doesn't
matter.

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


Re: [U-Boot] sandbox is broken again

2013-11-08 Thread Simon Glass
Hi Tom,

On Fri, Nov 8, 2013 at 7:52 AM, Tom Rini  wrote:
> On Fri, Nov 08, 2013 at 08:34:09AM -0600, Simon Glass wrote:
>> Hi,
>>
>> On Nov 8, 2013 3:35 AM, "Masahiro Yamada"  wrote:
>> >
>> > Hello, Rob, Simon.
>> >
>> > I noticed sandbox is broken.
>> >
>> > The error message is:
>> > lib/time.c:45: undefined reference to `timer_read_counter'
>> >
>> > This is caused by commit 8dfafdde88eb3e71d5569846396ae67a91017232.
>>
>> I sent patch with the latest driver model series.
>
> Whoops.  I don't know how I missed that one.  And I'll grab Rob's series
> now (well, not quite "now", I just kicked a big build grabbing a bunch
> of things out of my patchwork queue, but I'll include it there).

Thanks, sounds good. I have quite a few sandbox patches to send out.

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] sandbox: convert to common time functions

2013-11-08 Thread Simon Glass
Hi Rob,

On Fri, Nov 8, 2013 at 7:40 AM, Rob Herring  wrote:
> From: Rob Herring 
>
> Convert sandbox to use common time functions.
>
> Signed-off-by: Rob Herring 
> ---
>  board/sandbox/sandbox/sandbox.c | 14 ++
>  include/configs/sandbox.h   |  2 ++
>  2 files changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/board/sandbox/sandbox/sandbox.c b/board/sandbox/sandbox/sandbox.c
> index f471cb7..65dcce8 100644
> --- a/board/sandbox/sandbox/sandbox.c
> +++ b/board/sandbox/sandbox/sandbox.c
> @@ -18,19 +18,9 @@ void flush_cache(unsigned long start, unsigned long size)
>  {
>  }
>
> -ulong get_tbclk(void)
> +unsigned long timer_read_counter(void)
>  {
> -   return CONFIG_SYS_HZ;
> -}
> -
> -unsigned long long get_ticks(void)
> -{
> -   return get_timer(0);
> -}
> -
> -ulong get_timer(ulong base)
> -{
> -   return (os_get_nsec() / 100) - base;
> +   return os_get_nsec() / 1000;

Doesn't this change the time base to microseconds? It would be good to
keep sandbox at milliseconds like other boards. Or did I miss the
reason for this change?

>  }
>
>  int timer_init(void)
> diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
> index 279abbc..01628e1 100644
> --- a/include/configs/sandbox.h
> +++ b/include/configs/sandbox.h
> @@ -16,6 +16,8 @@
>
>  #endif
>
> +#define CONFIG_SYS_TIMER_RATE  100
> +
>  #define CONFIG_BOOTSTAGE
>  #define CONFIG_BOOTSTAGE_REPORT
>
> --
> 1.8.1.2
>

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


[U-Boot] [PATCH] mx6sabresd: Fix wrong colors in LVDS display

2013-11-08 Thread Fabio Estevam
Currently HDMI splash screen is selected by default on mx6sabresd boards.

As LVDS is also always enabled, this causes incorrect colors to be displayed in 
the LVDS panel due to the different pixel format in HDMI and LVDS.

Fix this by selecting the LVDS panel as the default splash output and also by 
ensuring that LVDS is turned off when HDMI output is active.

Signed-off-by: Fabio Estevam 
---
 board/freescale/mx6sabresd/mx6sabresd.c | 30 ++
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c 
b/board/freescale/mx6sabresd/mx6sabresd.c
index 9dbe605..ba1f289 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -249,8 +249,21 @@ static int detect_hdmi(struct display_info_t const *dev)
return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;
 }
 
+static void disable_lvds(struct display_info_t const *dev)
+{
+   struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
+
+   int reg = readl(&iomux->gpr[2]);
+
+   reg &= ~(IOMUXC_GPR2_LVDS_CH0_MODE_DISABLED  |
+ IOMUXC_GPR2_LVDS_CH1_MODE_ENABLED_DI0);
+
+   writel(reg, &iomux->gpr[2]);
+}
+
 static void do_enable_hdmi(struct display_info_t const *dev)
 {
+   disable_lvds(dev);
imx_enable_hdmi_phy();
 }
 
@@ -263,14 +276,15 @@ static void enable_lvds(struct display_info_t const *dev)
   IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT;
writel(reg, &iomux->gpr[2]);
 }
+
 static struct display_info_t const displays[] = {{
.bus= -1,
.addr   = 0,
-   .pixfmt = IPU_PIX_FMT_RGB24,
-   .detect = detect_hdmi,
-   .enable = do_enable_hdmi,
+   .pixfmt = IPU_PIX_FMT_LVDS666,
+   .detect = NULL,
+   .enable = enable_lvds,
.mode   = {
-   .name   = "HDMI",
+   .name   = "Hannstar-XGA",
.refresh= 60,
.xres   = 1024,
.yres   = 768,
@@ -286,11 +300,11 @@ static struct display_info_t const displays[] = {{
 } }, {
.bus= -1,
.addr   = 0,
-   .pixfmt = IPU_PIX_FMT_LVDS666,
-   .detect = NULL,
-   .enable = enable_lvds,
+   .pixfmt = IPU_PIX_FMT_RGB24,
+   .detect = detect_hdmi,
+   .enable = do_enable_hdmi,
.mode   = {
-   .name   = "Hannstar-XGA",
+   .name   = "HDMI",
.refresh= 60,
.xres   = 1024,
.yres   = 768,
-- 
1.8.1.2


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


Re: [U-Boot] [PATCH] i2c, omap1510: remove i2c driver

2013-11-08 Thread Tom Rini
On Fri, Nov 08, 2013 at 09:38:52AM +0100, Heiko Schocher wrote:

> remove omap1510 i2c driver, as there is no board which uses it
> 
> Signed-off-by: Heiko Schocher 
> Cc: Tom Rini 
> Cc: Wolfgang Denk 

Acked-by: Tom Rini 

-- 
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/6] gzip: correctly bounds-check output buffer

2013-11-08 Thread Michal Simek
On 11/08/2013 04:40 PM, Michal Simek wrote:
> On 11/08/2013 04:21 PM, Kees Cook wrote:
>> On Fri, Nov 8, 2013 at 4:04 AM, Michal Simek  wrote:
>>> Hi Kees,
>>>
>>> On 08/16/2013 04:59 PM, Kees Cook wrote:
>>>> The output buffer size must not be reset by the gzip decoder or there
>>>> is a risk of overflowing memory during decompression.
>>>>
>>>> Signed-off-by: Kees Cook 
>>>> Acked-by: Simon Glass 
>>>> ---
>>>>  lib/gunzip.c |4 ++--
>>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/lib/gunzip.c b/lib/gunzip.c
>>>> index 9959781..35abfb3 100644
>>>> --- a/lib/gunzip.c
>>>> +++ b/lib/gunzip.c
>>>> @@ -89,13 +89,13 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
>>>> unsigned long *lenp,
>>>>   s.avail_out = dstlen;
>>>>   do {
>>>>   r = inflate(&s, Z_FINISH);
>>>> - if (r != Z_STREAM_END && r != Z_BUF_ERROR && stoponerr == 1) 
>>>> {
>>>> + if (stoponerr == 1 && r != Z_STREAM_END &&
>>>> + (s.avail_out == 0 || r != Z_BUF_ERROR)) {
>>>>   printf("Error: inflate() returned %d\n", r);
>>>>   inflateEnd(&s);
>>>>   return -1;
>>>>   }
>>>>   s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
>>>> char*)dst);
>>>> - s.avail_out = dstlen;
>>>>   } while (r == Z_BUF_ERROR);
>>>>   *lenp = s.next_out - (unsigned char *) dst;
>>>>   inflateEnd(&s);
>>>>
>>>
>>> I have done u-boot upgrade to v2013.10 version and I see the problem with 
>>> this patch
>>> when I am trying to boot my zynq image.
>>>
>>> After reverting this patch everything works as expected.
>>
>> Eek, sorry this is causing you trouble!
> 
> no worries. Problem is on my side. Look below.
> 
>>> Here is the image I am using.
>>> http://www.monstr.eu/20131108-image.ub
>>
>> Is there any way you can extract just the gzipped kernel from this
>> image? I'm not sure how to get at it from this .ub file.
> 
> Sure just run imi. Then you will get data start address and length.
> And you can use unzip command.
> 
>>> Below is the bootlog.
>>>
>>> Do you have any idea what can be wrong?
>>> [...]
>>> Uncompressing Kernel Image ... Error: inflate() returned -5
>>> GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to 
>>> recover
>>> resetting ...
>>
>> Either my change is failing to detect end-of-buffer correctly, or it
>> _is_, in which case this has uncovered an unsafe caller of gunzip.
>> This is after the "Uncompressing" message, so it's this caller:
>>
>> case IH_COMP_GZIP:
>> printf("   Uncompressing %s ... ", type_name);
>> if (gunzip(load_buf, unc_len, image_buf, &image_len) != 0) {
>> puts("GUNZIP: uncompress, out-of-mem or overwrite "
>> "error - must RESET board to recover\n");
>> if (boot_progress)
>> bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE);
>> return BOOTM_ERR_RESET;
>> }
>>
>> *load_end = load + image_len;
>> break;
>>
>> If the uncompressed length of the kernel image is larger than
>> "unc_len", then this is catching a legitimate memory overflow. This is
>> entirely controlled by CONFIG_SYS_BOOTM_LEN. Is it possible this is
>> set too low for your build?
> 
> Ah yes, that's the issue. My image is 14MB and have just 16MB BOOTM_LEN.
> 

I have read README about BOOTM_LEN and it cares just about compressed images
but macro is generic enough to also handle uncompressed images and this checking
should be probably done too.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




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


Re: [U-Boot] [PATCH 3/6] gzip: correctly bounds-check output buffer

2013-11-08 Thread Michal Simek
On 11/08/2013 04:21 PM, Kees Cook wrote:
> On Fri, Nov 8, 2013 at 4:04 AM, Michal Simek  wrote:
>> Hi Kees,
>>
>> On 08/16/2013 04:59 PM, Kees Cook wrote:
>>> The output buffer size must not be reset by the gzip decoder or there
>>> is a risk of overflowing memory during decompression.
>>>
>>> Signed-off-by: Kees Cook 
>>> Acked-by: Simon Glass 
>>> ---
>>>  lib/gunzip.c |4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/lib/gunzip.c b/lib/gunzip.c
>>> index 9959781..35abfb3 100644
>>> --- a/lib/gunzip.c
>>> +++ b/lib/gunzip.c
>>> @@ -89,13 +89,13 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
>>> unsigned long *lenp,
>>>   s.avail_out = dstlen;
>>>   do {
>>>   r = inflate(&s, Z_FINISH);
>>> - if (r != Z_STREAM_END && r != Z_BUF_ERROR && stoponerr == 1) {
>>> + if (stoponerr == 1 && r != Z_STREAM_END &&
>>> + (s.avail_out == 0 || r != Z_BUF_ERROR)) {
>>>   printf("Error: inflate() returned %d\n", r);
>>>   inflateEnd(&s);
>>>   return -1;
>>>   }
>>>   s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
>>> char*)dst);
>>> - s.avail_out = dstlen;
>>>   } while (r == Z_BUF_ERROR);
>>>   *lenp = s.next_out - (unsigned char *) dst;
>>>   inflateEnd(&s);
>>>
>>
>> I have done u-boot upgrade to v2013.10 version and I see the problem with 
>> this patch
>> when I am trying to boot my zynq image.
>>
>> After reverting this patch everything works as expected.
> 
> Eek, sorry this is causing you trouble!

no worries. Problem is on my side. Look below.

>> Here is the image I am using.
>> http://www.monstr.eu/20131108-image.ub
> 
> Is there any way you can extract just the gzipped kernel from this
> image? I'm not sure how to get at it from this .ub file.

Sure just run imi. Then you will get data start address and length.
And you can use unzip command.

>> Below is the bootlog.
>>
>> Do you have any idea what can be wrong?
>> [...]
>> Uncompressing Kernel Image ... Error: inflate() returned -5
>> GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to 
>> recover
>> resetting ...
> 
> Either my change is failing to detect end-of-buffer correctly, or it
> _is_, in which case this has uncovered an unsafe caller of gunzip.
> This is after the "Uncompressing" message, so it's this caller:
> 
> case IH_COMP_GZIP:
> printf("   Uncompressing %s ... ", type_name);
> if (gunzip(load_buf, unc_len, image_buf, &image_len) != 0) {
> puts("GUNZIP: uncompress, out-of-mem or overwrite "
> "error - must RESET board to recover\n");
> if (boot_progress)
> bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE);
> return BOOTM_ERR_RESET;
> }
> 
> *load_end = load + image_len;
> break;
> 
> If the uncompressed length of the kernel image is larger than
> "unc_len", then this is catching a legitimate memory overflow. This is
> entirely controlled by CONFIG_SYS_BOOTM_LEN. Is it possible this is
> set too low for your build?

Ah yes, that's the issue. My image is 14MB and have just 16MB BOOTM_LEN.

Thanks for pointing to this.
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




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


Re: [U-Boot] soft vs. hard float

2013-11-08 Thread Wolfgang Denk
Dear "Saridakis, Dean (US SSA)",

please keep the ML on Cc:, and please do not top-post / full quote.
Finally, please keep your line length < 70 characters.  Thanks.


In message  you wrote:
> Figured I'd ask. FWIW, I have no intention of number crunching in U-Boot, but 
> do need to do 64-bit store operations. Being able to do a stfd on PowerPC can 
> be very handy, but MSR[FE] must be set.
...
> > hard-float in my system. Is this a general enough need that it'd make
> > sense to have a CONFIG_SYS_HARD_FLOAT to enable this option?
> 
> This makes no sense.  U-Boot does not use any FP operations at all.
> 
> > I made a quick update for mpc85xx (guarded by CONFIG_SYS_HARD_FLOAT)
> > and I seem to be running fine.
> 
> U-Boot does not (and will not) support FP.  If you want to do number
> crunching, then start an OS.

Agreed.  Usually we solve this by using dedicated assembler code. See
for example board/cu824/flash.c, board/cpc45/flash.c, or
board/ppmc7xx/flash.c:

static void write_via_fpu(vu_long *addr, ulong *data)
{
__asm__ __volatile__ ("lfd  1, 0(%0)" : : "r" (data));
__asm__ __volatile__ ("stfd 1, 0(%0)" : : "r" (addr));
}

No need for any FP support in the tool chain...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"If you own a machine, you are in turn owned by it,  and  spend  your
time serving it..."- Marion Zimmer Bradley, _The Forbidden Tower_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] gzip: correctly bounds-check output buffer

2013-11-08 Thread Kees Cook
On Fri, Nov 8, 2013 at 4:04 AM, Michal Simek  wrote:
> Hi Kees,
>
> On 08/16/2013 04:59 PM, Kees Cook wrote:
>> The output buffer size must not be reset by the gzip decoder or there
>> is a risk of overflowing memory during decompression.
>>
>> Signed-off-by: Kees Cook 
>> Acked-by: Simon Glass 
>> ---
>>  lib/gunzip.c |4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/gunzip.c b/lib/gunzip.c
>> index 9959781..35abfb3 100644
>> --- a/lib/gunzip.c
>> +++ b/lib/gunzip.c
>> @@ -89,13 +89,13 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
>> unsigned long *lenp,
>>   s.avail_out = dstlen;
>>   do {
>>   r = inflate(&s, Z_FINISH);
>> - if (r != Z_STREAM_END && r != Z_BUF_ERROR && stoponerr == 1) {
>> + if (stoponerr == 1 && r != Z_STREAM_END &&
>> + (s.avail_out == 0 || r != Z_BUF_ERROR)) {
>>   printf("Error: inflate() returned %d\n", r);
>>   inflateEnd(&s);
>>   return -1;
>>   }
>>   s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
>> char*)dst);
>> - s.avail_out = dstlen;
>>   } while (r == Z_BUF_ERROR);
>>   *lenp = s.next_out - (unsigned char *) dst;
>>   inflateEnd(&s);
>>
>
> I have done u-boot upgrade to v2013.10 version and I see the problem with 
> this patch
> when I am trying to boot my zynq image.
>
> After reverting this patch everything works as expected.

Eek, sorry this is causing you trouble!

> Here is the image I am using.
> http://www.monstr.eu/20131108-image.ub

Is there any way you can extract just the gzipped kernel from this
image? I'm not sure how to get at it from this .ub file.

> Below is the bootlog.
>
> Do you have any idea what can be wrong?
> [...]
> Uncompressing Kernel Image ... Error: inflate() returned -5
> GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to 
> recover
> resetting ...

Either my change is failing to detect end-of-buffer correctly, or it
_is_, in which case this has uncovered an unsafe caller of gunzip.
This is after the "Uncompressing" message, so it's this caller:

case IH_COMP_GZIP:
printf("   Uncompressing %s ... ", type_name);
if (gunzip(load_buf, unc_len, image_buf, &image_len) != 0) {
puts("GUNZIP: uncompress, out-of-mem or overwrite "
"error - must RESET board to recover\n");
if (boot_progress)
bootstage_error(BOOTSTAGE_ID_DECOMP_IMAGE);
return BOOTM_ERR_RESET;
}

*load_end = load + image_len;
break;

If the uncompressed length of the kernel image is larger than
"unc_len", then this is catching a legitimate memory overflow. This is
entirely controlled by CONFIG_SYS_BOOTM_LEN. Is it possible this is
set too low for your build?

-Kees

-- 
Kees Cook
Chrome OS Security
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] nitrogen6x: Remove unused OCOTP options

2013-11-08 Thread Eric Nelson

Thanks Fabio,

On 11/08/2013 06:08 AM, Fabio Estevam wrote:

OCOTP driver is currently selected via CONFIG_MXC_OCOTP option.

Remove the old OCOTP related options, as they are not used anymore.

Signed-off-by: Fabio Estevam 
---
  include/configs/nitrogen6x.h | 10 --
  1 file changed, 10 deletions(-)

diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 3454b86..d2eb853 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -56,16 +56,6 @@
  #define CONFIG_I2C_MXC
  #define CONFIG_SYS_I2C_SPEED  10

-/* OCOTP Configs */
-#define CONFIG_CMD_IMXOTP
-#ifdef CONFIG_CMD_IMXOTP
-#define CONFIG_IMX_OTP
-#define IMX_OTP_BASE   OCOTP_BASE_ADDR
-#define IMX_OTP_ADDR_MAX   0x7F
-#define IMX_OTP_DATA_ERROR_VAL 0xBADABADA
-#define IMX_OTPWRITE_ENABLED
-#endif
-
  /* MMC Configs */
  #define CONFIG_FSL_ESDHC
  #define CONFIG_FSL_USDHC



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


Re: [U-Boot] sandbox is broken again

2013-11-08 Thread Tom Rini
On Fri, Nov 08, 2013 at 08:34:09AM -0600, Simon Glass wrote:
> Hi,
> 
> On Nov 8, 2013 3:35 AM, "Masahiro Yamada"  wrote:
> >
> > Hello, Rob, Simon.
> >
> > I noticed sandbox is broken.
> >
> > The error message is:
> > lib/time.c:45: undefined reference to `timer_read_counter'
> >
> > This is caused by commit 8dfafdde88eb3e71d5569846396ae67a91017232.
> 
> I sent patch with the latest driver model series.

Whoops.  I don't know how I missed that one.  And I'll grab Rob's series
now (well, not quite "now", I just kicked a big build grabbing a bunch
of things out of my patchwork queue, but I'll include it there).

-- 
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 2/2] sandbox: convert to common time functions

2013-11-08 Thread Rob Herring
From: Rob Herring 

Convert sandbox to use common time functions.

Signed-off-by: Rob Herring 
---
 board/sandbox/sandbox/sandbox.c | 14 ++
 include/configs/sandbox.h   |  2 ++
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/board/sandbox/sandbox/sandbox.c b/board/sandbox/sandbox/sandbox.c
index f471cb7..65dcce8 100644
--- a/board/sandbox/sandbox/sandbox.c
+++ b/board/sandbox/sandbox/sandbox.c
@@ -18,19 +18,9 @@ void flush_cache(unsigned long start, unsigned long size)
 {
 }
 
-ulong get_tbclk(void)
+unsigned long timer_read_counter(void)
 {
-   return CONFIG_SYS_HZ;
-}
-
-unsigned long long get_ticks(void)
-{
-   return get_timer(0);
-}
-
-ulong get_timer(ulong base)
-{
-   return (os_get_nsec() / 100) - base;
+   return os_get_nsec() / 1000;
 }
 
 int timer_init(void)
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 279abbc..01628e1 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -16,6 +16,8 @@
 
 #endif
 
+#define CONFIG_SYS_TIMER_RATE  100
+
 #define CONFIG_BOOTSTAGE
 #define CONFIG_BOOTSTAGE_REPORT
 
-- 
1.8.1.2

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


Re: [U-Boot] sandbox is broken again

2013-11-08 Thread Simon Glass
Hi,

On Nov 8, 2013 3:35 AM, "Masahiro Yamada"  wrote:
>
> Hello, Rob, Simon.
>
> I noticed sandbox is broken.
>
> The error message is:
> lib/time.c:45: undefined reference to `timer_read_counter'
>
> This is caused by commit 8dfafdde88eb3e71d5569846396ae67a91017232.

I sent patch with the latest driver model series.

Regards,
Simon

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


[U-Boot] [PATCH 1/2] time: add weak annotation to timer_read_counter declaration

2013-11-08 Thread Rob Herring
From: Rob Herring 

A weak annotation is needed in order to prevent link errors when
get_ticks is overridden. This fixes sandbox build.

Signed-off-by: Rob Herring 
---
 lib/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/time.c b/lib/time.c
index 8361ddd..111b493 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -37,7 +37,7 @@ unsigned long notrace timer_read_counter(void)
 #endif
 }
 #else
-extern unsigned long timer_read_counter(void);
+extern unsigned long __weak timer_read_counter(void);
 #endif
 
 unsigned long long __weak notrace get_ticks(void)
-- 
1.8.1.2

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


[U-Boot] [PATCH] nitrogen6x: Remove unused OCOTP options

2013-11-08 Thread Fabio Estevam
OCOTP driver is currently selected via CONFIG_MXC_OCOTP option.

Remove the old OCOTP related options, as they are not used anymore.

Signed-off-by: Fabio Estevam 
---
 include/configs/nitrogen6x.h | 10 --
 1 file changed, 10 deletions(-)

diff --git a/include/configs/nitrogen6x.h b/include/configs/nitrogen6x.h
index 3454b86..d2eb853 100644
--- a/include/configs/nitrogen6x.h
+++ b/include/configs/nitrogen6x.h
@@ -56,16 +56,6 @@
 #define CONFIG_I2C_MXC
 #define CONFIG_SYS_I2C_SPEED   10
 
-/* OCOTP Configs */
-#define CONFIG_CMD_IMXOTP
-#ifdef CONFIG_CMD_IMXOTP
-#define CONFIG_IMX_OTP
-#define IMX_OTP_BASE   OCOTP_BASE_ADDR
-#define IMX_OTP_ADDR_MAX   0x7F
-#define IMX_OTP_DATA_ERROR_VAL 0xBADABADA
-#define IMX_OTPWRITE_ENABLED
-#endif
-
 /* MMC Configs */
 #define CONFIG_FSL_ESDHC
 #define CONFIG_FSL_USDHC
-- 
1.8.1.2


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


Re: [U-Boot] [PATCH 1/2] ARM: bcm2835: add missing mbox overscan response field

2013-11-08 Thread Albert ARIBAUD
Hi Stephen,

On Thu, 07 Nov 2013 14:30:54 -0700, Stephen Warren
 wrote:

> So, there are 2 patches and 2 custodians. One of you has to ack the
> patch for the other to merge them both through the other's subsystem,
> right? I guess you want Anatolij to take both of these through the video
> tree based on your comments. If so, can you ack this patch and re-assign
> them both in patchwork, so he knows that?

Done (although I suspect that in this instance, my Ack was not really
needed, as the change was quite trivial and did not require any ARM-
specific knowledge).

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


Re: [U-Boot] [PATCH v2] usb: dfu: make nand upload working

2013-11-08 Thread Heiko Schocher

Hello Bo,

Am 07.11.2013 07:29, schrieb Bo Shen:

Nowhere pass a value to len, which always 0, make no transfer which
cause uploading failed.

This patch make nand upload working. However it needs enough malloc
buffer to store read data, that means the buffer at least equal to
the upload partition size, or else it doesn't work.

Signed-off-by: Bo Shen
---
Changes in v2:
   - Move code to nand part, or else it will break mmc

  drivers/dfu/dfu_nand.c |1 +
  1 file changed, 1 insertion(+)


Thanks! Tested on the rut board.

Tested-by: Heiko Schocher 

bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] ARM: bcm2835: add missing mbox overscan response field

2013-11-08 Thread Albert ARIBAUD
Hi Andre,

On Tue, 22 Oct 2013 22:27:20 +0200, Andre Heider 
wrote:

> Add the missing "right" field to struct bcm2835_mbox_tag_overscan.
> 
> Signed-off-by: Andre Heider 
> ---
>  arch/arm/include/asm/arch-bcm2835/mbox.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h 
> b/arch/arm/include/asm/arch-bcm2835/mbox.h
> index 24abe57..6b806ec 100644
> --- a/arch/arm/include/asm/arch-bcm2835/mbox.h
> +++ b/arch/arm/include/asm/arch-bcm2835/mbox.h
> @@ -350,6 +350,7 @@ struct bcm2835_mbox_tag_overscan {
>   u32 top;
>   u32 bottom;
>   u32 left;
> + u32 right;
>   } resp;
>   } body;
>  };

Acked-by: Albert ARIBAUD 

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


  1   2   >