Re: [U-Boot] [PATCH] powerpc/mpc85xx: Remove P1023 RDS support

2014-06-06 Thread Wolfgang Denk
Dear Emil,

In message <53926fa8.5040...@freescale.com> you wrote:
> 
> > So are there not any boards left in the field that should be
> > supported?
> 
> Seems that we sold about 10 RDS boards before the RDB became available.
> Even internally, at this time, I'm unable to locate a RDS board if I'd
> want to test patches of relevance to this platform. Please note we've
> already dropped support for this board from the kernel

I see.  Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
panic: can't find /
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] docs: driver-model: Fix spelling

2014-06-06 Thread Simon Glass
Hi Chris,

On 6 June 2014 16:35, Chris Packham  wrote:
> Signed-off-by: Chris Packham 
> ---
> On 07/06/14 08:48, Simon Glass wrote:> Hi Chris,
>>
>> On 5 June 2014 21:24, Chris Packham  wrote:
>>> Hi,
>>>
>>> (Joe, Simon, I'm not sure if this counts as "networking" or "driver
>>> model" but figured it was close enough to warrant an Cc).
>>>
>>> We're looking at a new board design and are planning on using a
>>> BCM5718 to provide a couple of Ethernet ports. The chipset is
>>> supported in Linux using the tg3.c driver. I was planning on creating
>>> an equivalent driver in u-boot using e1000.c as a guide and probably
>>> borrowing heavily from the Linux driver.
>>>
>>> Is anyone else actively looking at Broadcom based chipset/NICs? Any
>>> tips as for where to start or pitfalls to expect?
>>
>> I'm not aware of anything myself, but it sounds like a good idea. If
>> you feel able to convert 'eth' over to driver model that would be
>> great too. There are only a small number of operations.
>>
>> Regards,
>> Simon
>
> Yeah it doesn't look as thought it'd be too hard to do 'eth' (or is it
> 'netdev'?). I think I'll concentrate on doing the BCM5718 driver the current
> way first then have a think about converting 'eth'.

I think it is actually struct eth_device that you need to do, in terms
of writing the uclass. Also you can follow the GPIO approach of using
CONFIG_DM_ETH to control whether driver model is used for networking
(which it would be for any board using your driver).

>
> In the meantime I spotted a few typos when reading the driver-model docs.

Thanks, will add these.

>
>  doc/driver-model/README.txt | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
> index dcecb9a..a5035be 100644
> --- a/doc/driver-model/README.txt
> +++ b/doc/driver-model/README.txt
> @@ -20,7 +20,7 @@ Terminology
>  ---
>
>  Uclass - a group of devices which operate in the same way. A uclass provides
> -   a way of accessing invidual devices within the group, but always
> +   a way of accessing individual devices within the group, but always
> using the same interface. For example a GPIO uclass provides
> operations for get/set value. An I2C uclass may have 10 I2C ports,
> 4 with one driver, and 6 with another.
> @@ -120,7 +120,7 @@ What is going on?
>  -
>
>  Let's start at the top. The demo command is in common/cmd_demo.c. It does
> -the usual command procesing and then:
> +the usual command processing and then:
>
> struct udevice *demo_dev;
>
> @@ -228,7 +228,7 @@ The data can be interpreted by the drivers however they 
> like - it is
>  basically a communication scheme between the board-specific code and
>  the generic drivers, which are intended to work on any board.
>
> -Drivers can acceess their data via dev->info->platdata. Here is
> +Drivers can access their data via dev->info->platdata. Here is
>  the declaration for the platform data, which would normally appear
>  in the board file.
>
> @@ -272,7 +272,7 @@ method reads the information out of the device tree and 
> puts it in
>  dev->platdata. Then the probe method is called to set up the device.
>
>  Note that both methods are optional. If you provide an ofdata_to_platdata
> -method then it wlil be called first (after bind). If you provide a probe
> +method then it will be called first (after bind). If you provide a probe
>  method it will be called next.
>
>  If you don't want to have the platdata automatically allocated then you
> @@ -310,7 +310,7 @@ Changes since v1
>  For the record, this implementation uses a very similar approach to the
>  original patches, but makes at least the following changes:
>
> -- Tried to agressively remove boilerplate, so that for most drivers there
> +- Tried to aggressively remove boilerplate, so that for most drivers there
>  is little or no 'driver model' code to write.
>  - Moved some data from code into data structure - e.g. store a pointer to
>  the driver operations structure in the driver, rather than passing it
> --
> 2.0.0.153.g79d
>

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


[U-Boot] [U-boot] [Patch v3] ARM: keystone: aemif: move aemif driver to drivers/memory/ti-aemif.c

2014-06-06 Thread Ivan Khoronzhuk
Move AEMIF driver to drivers/memory/ti-aemif.c along with AEMIF
definitions collected in arch/arm/include/asm/ti-common/ti-aemif.h

Acked-by: Vitaly Andrianov 
Signed-off-by: Ivan Khoronzhuk 
---

v2..v1
- moved driver header from drivers to asm/ti-common

Based on [U-boot] [Patch v3] mtd: nand: davinci: add header file for driver
 definitions

 arch/arm/cpu/armv7/keystone/Makefile   |  1 -
 arch/arm/include/asm/arch-keystone/hardware-k2hk.h |  7 
 arch/arm/include/asm/arch-keystone/hardware.h  | 30 +++--
 arch/arm/include/asm/ti-common/ti-aemif.h  | 39 ++
 board/ti/k2hk_evm/board.c  |  9 ++---
 drivers/Makefile   |  1 +
 drivers/memory/Makefile|  1 +
 .../keystone/aemif.c => drivers/memory/ti-aemif.c  | 37 
 include/configs/k2hk_evm.h |  4 +++
 9 files changed, 77 insertions(+), 52 deletions(-)
 create mode 100644 arch/arm/include/asm/ti-common/ti-aemif.h
 create mode 100644 drivers/memory/Makefile
 rename arch/arm/cpu/armv7/keystone/aemif.c => drivers/memory/ti-aemif.c (63%)

diff --git a/arch/arm/cpu/armv7/keystone/Makefile 
b/arch/arm/cpu/armv7/keystone/Makefile
index b1bd022..c4af252 100644
--- a/arch/arm/cpu/armv7/keystone/Makefile
+++ b/arch/arm/cpu/armv7/keystone/Makefile
@@ -5,7 +5,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-obj-y  += aemif.o
 obj-y  += init.o
 obj-y  += psc.o
 obj-y  += clock.o
diff --git a/arch/arm/include/asm/arch-keystone/hardware-k2hk.h 
b/arch/arm/include/asm/arch-keystone/hardware-k2hk.h
index 7ac2662..50ce649 100644
--- a/arch/arm/include/asm/arch-keystone/hardware-k2hk.h
+++ b/arch/arm/include/asm/arch-keystone/hardware-k2hk.h
@@ -9,13 +9,6 @@
 #ifndef __ASM_ARCH_HARDWARE_K2HK_H
 #define __ASM_ARCH_HARDWARE_K2HK_H
 
-#define K2HK_ASYNC_EMIF_CNTRL_BASE  0x21000a00
-#define DAVINCI_ASYNC_EMIF_CNTRL_BASE   K2HK_ASYNC_EMIF_CNTRL_BASE
-#define K2HK_ASYNC_EMIF_DATA_CE0_BASE   0x3000
-#define K2HK_ASYNC_EMIF_DATA_CE1_BASE   0x3400
-#define K2HK_ASYNC_EMIF_DATA_CE2_BASE   0x3800
-#define K2HK_ASYNC_EMIF_DATA_CE3_BASE   0x3c00
-
 #define K2HK_PLL_CNTRL_BASE 0x0231
 #define CLOCK_BASE  K2HK_PLL_CNTRL_BASE
 #define KS2_RSTCTRL (K2HK_PLL_CNTRL_BASE + 0xe8)
diff --git a/arch/arm/include/asm/arch-keystone/hardware.h 
b/arch/arm/include/asm/arch-keystone/hardware.h
index 6c532ca..ffdecbf 100644
--- a/arch/arm/include/asm/arch-keystone/hardware.h
+++ b/arch/arm/include/asm/arch-keystone/hardware.h
@@ -22,32 +22,6 @@
 typedef volatile unsigned int   dv_reg;
 typedef volatile unsigned int   *dv_reg_p;
 
-#define ASYNC_EMIF_NUM_CS   4
-#define ASYNC_EMIF_MODE_NOR 0
-#define ASYNC_EMIF_MODE_NAND1
-#define ASYNC_EMIF_MODE_ONENAND 2
-#define ASYNC_EMIF_PRESERVE -1
-
-struct async_emif_config {
-   unsigned mode;
-   unsigned select_strobe;
-   unsigned extend_wait;
-   unsigned wr_setup;
-   unsigned wr_strobe;
-   unsigned wr_hold;
-   unsigned rd_setup;
-   unsigned rd_strobe;
-   unsigned rd_hold;
-   unsigned turn_around;
-   enum {
-   ASYNC_EMIF_8= 0,
-   ASYNC_EMIF_16   = 1,
-   ASYNC_EMIF_32   = 2,
-   } width;
-};
-
-void init_async_emif(int num_cs, struct async_emif_config *config);
-
 struct ddr3_phy_config {
unsigned int pllcr;
unsigned int pgcr1_mask;
@@ -145,6 +119,10 @@ struct ddr3_emif_config {
 #define KS2_UART0_BASE 0x02530c00
 #define KS2_UART1_BASE 0x02531000
 
+/* AEMIF */
+#define KS2_AEMIF_CNTRL_BASE   0x21000a00
+#define DAVINCI_ASYNC_EMIF_CNTRL_BASE   KS2_AEMIF_CNTRL_BASE
+
 #ifdef CONFIG_SOC_K2HK
 #include 
 #endif
diff --git a/arch/arm/include/asm/ti-common/ti-aemif.h 
b/arch/arm/include/asm/ti-common/ti-aemif.h
new file mode 100644
index 000..4a311d4
--- /dev/null
+++ b/arch/arm/include/asm/ti-common/ti-aemif.h
@@ -0,0 +1,39 @@
+/*
+ * AEMIF definitions
+ *
+ * (C) Copyright 2012-2014
+ * Texas Instruments Incorporated, 
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _AEMIF_H_
+#define _AEMIF_H_
+
+#define AEMIF_NUM_CS   4
+#define AEMIF_MODE_NOR 0
+#define AEMIF_MODE_NAND1
+#define AEMIF_MODE_ONENAND 2
+#define AEMIF_PRESERVE -1
+
+struct aemif_config {
+   unsigned mode;
+   unsigned select_strobe;
+   unsigned extend_wait;
+   unsigned wr_setup;
+   unsigned wr_strobe;
+   unsigned wr_hold;
+   unsigned rd_setup;
+   unsigned rd_strobe;
+   unsigned rd_hold;
+   unsigned turn_around;
+   enum {
+   AEMIF_WIDTH_8   = 0,
+   AEMIF_WIDTH_16  = 1,
+   AEMIF_WIDTH_32  = 2,
+   } width;
+};
+
+void aemif_init(int num_cs, struct aemif_conf

[U-Boot] [U-boot] [Patch v3] mtd: nand: davinci: add header file for driver definitions

2014-06-06 Thread Ivan Khoronzhuk
The definitions inside emif_defs.h concern davinci nand driver and
should be in it's header. So create header file for davinci nand
driver and move definitions from emif_defs.h and nand_defs.h to it.

Acked-by: Vitaly Andrianov 
Signed-off-by: Ivan Khoronzhuk 
---

v3..v2
- move drivers/mtd/nand/davinci_nand.h to
  arch/arm/include/asm/ti-common/davinci_nand.h
- apply changes also for davinci platforms

v2..v1
- no functional changes

 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|  2 +-
 arch/arm/cpu/armv7/keystone/aemif.c|  2 +-
 arch/arm/include/asm/arch-davinci/emif_defs.h  | 72 --
 arch/arm/include/asm/arch-davinci/hardware.h   |  1 -
 arch/arm/include/asm/arch-davinci/nand_defs.h  | 38 
 arch/arm/include/asm/arch-keystone/nand_defs.h | 23 ---
 arch/arm/include/asm/arch-tnetv107x/emif_defs.h|  1 -
 arch/arm/include/asm/arch-tnetv107x/hardware.h |  2 +
 arch/arm/include/asm/arch-tnetv107x/nand_defs.h| 23 ---
 .../emif_defs.h => ti-common/davinci_nand.h}   | 56 -
 board/Barix/ipam390/ipam390.c  |  2 +-
 board/ait/cam_enc_4xx/cam_enc_4xx.c|  2 +-
 board/davinci/da8xxevm/da830evm.c  |  3 +-
 board/davinci/da8xxevm/da850evm.c  |  2 +-
 board/davinci/dm355evm/dm355evm.c  |  3 +-
 board/davinci/dm355leopard/dm355leopard.c  |  2 +-
 board/davinci/dm365evm/dm365evm.c  |  3 +-
 board/davinci/dm6467evm/dm6467evm.c|  3 +-
 board/davinci/ea20/ea20.c  |  2 +-
 board/davinci/sonata/sonata.c  |  2 +-
 board/enbw/enbw_cmc/enbw_cmc.c |  2 +-
 board/omicron/calimain/calimain.c  |  2 +-
 board/ti/k2hk_evm/board.c  |  1 -
 board/ti/tnetv107xevm/sdb_board.c  |  2 +-
 drivers/mtd/nand/davinci_nand.c|  3 +-
 include/configs/davinci_dm6467evm.h|  2 +
 include/configs/k2hk_evm.h |  2 +
 include/configs/tnetv107x_evm.h|  2 +
 28 files changed, 65 insertions(+), 195 deletions(-)
 delete mode 100644 arch/arm/include/asm/arch-davinci/emif_defs.h
 delete mode 100644 arch/arm/include/asm/arch-davinci/nand_defs.h
 delete mode 100644 arch/arm/include/asm/arch-keystone/nand_defs.h
 delete mode 100644 arch/arm/include/asm/arch-tnetv107x/emif_defs.h
 delete mode 100644 arch/arm/include/asm/arch-tnetv107x/nand_defs.h
 rename arch/arm/include/asm/{arch-keystone/emif_defs.h => 
ti-common/davinci_nand.h} (55%)

diff --git a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c 
b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
index b91e948..19730ce 100644
--- a/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
+++ b/arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
@@ -14,7 +14,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 void davinci_enable_uart0(void)
diff --git a/arch/arm/cpu/armv7/keystone/aemif.c 
b/arch/arm/cpu/armv7/keystone/aemif.c
index 9b26886..bcbb95a 100644
--- a/arch/arm/cpu/armv7/keystone/aemif.c
+++ b/arch/arm/cpu/armv7/keystone/aemif.c
@@ -10,7 +10,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #define AEMIF_CFG_SELECT_STROBE(v) ((v) ? 1 << 31 : 0)
 #define AEMIF_CFG_EXTEND_WAIT(v)   ((v) ? 1 << 30 : 0)
diff --git a/arch/arm/include/asm/arch-davinci/emif_defs.h 
b/arch/arm/include/asm/arch-davinci/emif_defs.h
deleted file mode 100644
index 7e19cfe..000
--- a/arch/arm/include/asm/arch-davinci/emif_defs.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2007 Sergey Kubushyn 
- *
- * SPDX-License-Identifier:GPL-2.0+
- */
-#ifndef _EMIF_DEFS_H_
-#define _EMIF_DEFS_H_
-
-#include 
-
-struct davinci_emif_regs {
-   u_int32_t   ercsr;
-   u_int32_t   awccr;
-   u_int32_t   sdbcr;
-   u_int32_t   sdrcr;
-   u_int32_t   ab1cr;
-   u_int32_t   ab2cr;
-   u_int32_t   ab3cr;
-   u_int32_t   ab4cr;
-   u_int32_t   sdtimr;
-   u_int32_t   ddrsr;
-   u_int32_t   ddrphycr;
-   u_int32_t   ddrphysr;
-   u_int32_t   totar;
-   u_int32_t   totactr;
-   u_int32_t   ddrphyid_rev;
-   u_int32_t   sdsretr;
-   u_int32_t   eirr;
-   u_int32_t   eimr;
-   u_int32_t   eimsr;
-   u_int32_t   eimcr;
-   u_int32_t   ioctrlr;
-   u_int32_t   iostatr;
-   u_int8_trsvd0[8];
-   u_int32_t   nandfcr;
-   u_int32_t   nandfsr;
-   u_int8_trsvd1[8];
-   u_int32_t   nandfecc[4];
-   u_int8_trsvd2[60];
-   u_int32_t   nand4biteccload;
-   u_int32_t   nand4bitecc[4];
-   u_int32_t   nanderradd1;
-   u_int32_t   nanderradd2;
-   u_int32_t   nanderrval1;
-   u_int32_t   nander

[U-Boot] [PATCH] docs: driver-model: Fix spelling

2014-06-06 Thread Chris Packham
Signed-off-by: Chris Packham 
---
On 07/06/14 08:48, Simon Glass wrote:> Hi Chris,
> 
> On 5 June 2014 21:24, Chris Packham  wrote:
>> Hi,
>>
>> (Joe, Simon, I'm not sure if this counts as "networking" or "driver
>> model" but figured it was close enough to warrant an Cc).
>>
>> We're looking at a new board design and are planning on using a
>> BCM5718 to provide a couple of Ethernet ports. The chipset is
>> supported in Linux using the tg3.c driver. I was planning on creating
>> an equivalent driver in u-boot using e1000.c as a guide and probably
>> borrowing heavily from the Linux driver.
>>
>> Is anyone else actively looking at Broadcom based chipset/NICs? Any
>> tips as for where to start or pitfalls to expect?
> 
> I'm not aware of anything myself, but it sounds like a good idea. If
> you feel able to convert 'eth' over to driver model that would be
> great too. There are only a small number of operations.
> 
> Regards,
> Simon

Yeah it doesn't look as thought it'd be too hard to do 'eth' (or is it
'netdev'?). I think I'll concentrate on doing the BCM5718 driver the current
way first then have a think about converting 'eth'.

In the meantime I spotted a few typos when reading the driver-model docs.

 doc/driver-model/README.txt | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index dcecb9a..a5035be 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -20,7 +20,7 @@ Terminology
 ---
 
 Uclass - a group of devices which operate in the same way. A uclass provides
-   a way of accessing invidual devices within the group, but always
+   a way of accessing individual devices within the group, but always
using the same interface. For example a GPIO uclass provides
operations for get/set value. An I2C uclass may have 10 I2C ports,
4 with one driver, and 6 with another.
@@ -120,7 +120,7 @@ What is going on?
 -
 
 Let's start at the top. The demo command is in common/cmd_demo.c. It does
-the usual command procesing and then:
+the usual command processing and then:
 
struct udevice *demo_dev;
 
@@ -228,7 +228,7 @@ The data can be interpreted by the drivers however they 
like - it is
 basically a communication scheme between the board-specific code and
 the generic drivers, which are intended to work on any board.
 
-Drivers can acceess their data via dev->info->platdata. Here is
+Drivers can access their data via dev->info->platdata. Here is
 the declaration for the platform data, which would normally appear
 in the board file.
 
@@ -272,7 +272,7 @@ method reads the information out of the device tree and 
puts it in
 dev->platdata. Then the probe method is called to set up the device.
 
 Note that both methods are optional. If you provide an ofdata_to_platdata
-method then it wlil be called first (after bind). If you provide a probe
+method then it will be called first (after bind). If you provide a probe
 method it will be called next.
 
 If you don't want to have the platdata automatically allocated then you
@@ -310,7 +310,7 @@ Changes since v1
 For the record, this implementation uses a very similar approach to the
 original patches, but makes at least the following changes:
 
-- Tried to agressively remove boilerplate, so that for most drivers there
+- Tried to aggressively remove boilerplate, so that for most drivers there
 is little or no 'driver model' code to write.
 - Moved some data from code into data structure - e.g. store a pointer to
 the driver operations structure in the driver, rather than passing it
-- 
2.0.0.153.g79d

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


Re: [U-Boot] [PATCH] powerpc/mpc85xx: Remove P1023 RDS support

2014-06-06 Thread Wolfgang Denk
Dear York,

In message <53923ec8.1090...@freescale.com> you wrote:
>
> Incidentally, I have been trying to get a list of EOL boards from Freescale.
> Presume if I get the list, shall we drop the support for those boards right 
> away
> or wait for some time, or keep them until we are tired of maintenance?

In general, EOL of a board at the vendor is of little meaning to the
U-Boot community. As long as the boards are in use, and ther eis
someone who is willing to take care of supporting it (even at the
level of running tests) we do not drop a board.

Boards get dropped only if they become a burson, i. e. if they need
fixing (or at least testing) and no active user / maintainer can be
found any more.

If we would rrop boards as soon as the vendor declares them EOL, we'd
have to spend a lof of work now on removal patches ;-)

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
Remember, an int is not always 16 bits. I'm  not  sure,  but  if  the
80386  is one step closer to Intel's slugfest with the CPU curve that
is aymptotically approaching a real machine, perhaps an int has  been
implemented as 32 bits by some Unix vendors...?   - Derek Terveer
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] powerpc/mpc85xx: Remove P1023 RDS support

2014-06-06 Thread York Sun
On 06/06/2014 03:14 PM, Wolfgang Denk wrote:
> Dear Lijun Pan,
> 
> In message <1402085638-12144-1-git-send-email-lijun@freescale.com> you 
> wrote:
>> Since P1023RDS is no longer supported/manufactured by Freescale,
>> we clean up P1023RDS related code.
>> Since P1023RDB is still supported by Freescale,
>> we keep P1023RDB releated code.
> 
> So are there not any boards left in the field that should be
> supported?
> 
> Best regards,
> 


Wolfgang,

Incidentally, I have been trying to get a list of EOL boards from Freescale.
Presume if I get the list, shall we drop the support for those boards right away
or wait for some time, or keep them until we are tired of maintenance?

York


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


Re: [U-Boot] [PATCH v2] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

2014-06-06 Thread Wolfgang Denk
Dear Lijun Pan,

In message <1402090662-3702-1-git-send-email-lijun@freescale.com> you wrote:
...
> + * upper_32_bits - return bits 32-63 of a number
> + * @n: the number we're accessing

Comments wrong on Power Architecture.

> + * lower_32_bits - return bits 0-31 of a number
> + * @n: the number we're accessing

Ditto.

BTW: what exactly are the license terms for this code?

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
"Life is a garment we continuously alter, but which  never  seems  to
fit."  - David McCord
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread York Sun
On 06/06/2014 01:17 PM, York Sun wrote:
> On 06/06/2014 10:32 AM, Mark Rutland wrote:
 How is TCR_EL2.SH0 (or TCR_EL1.SH*) configured?

 You'll only need to flush the cache if they're configured non shareable.
>>>
>>> It is configured as non shareable.
>>
>> Is there any reason not to configure them as inner shareable? That way
>> the MMU will look in the D-cache, and you won't have to spend time
>> flushing them.
>>
> 
> Mark,
> 
> I appreciate the reminder. I tried on our emulator. With inner share set for 
> TCR
> SH0 bits, u-boot works with the flushing, but doesn't work without flushing. 
> It
> went to exception.
> 
> Can you share more information about the inner share? I need to follow up with
> our designer to confirm.
> 

A second thought, do I need to set the first MMU table so DDR is inner 
shareable?

York

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


Re: [U-Boot] [PATCH] powerpc/mpc85xx: Remove P1023 RDS support

2014-06-06 Thread Wolfgang Denk
Dear Lijun Pan,

In message <1402085638-12144-1-git-send-email-lijun@freescale.com> you 
wrote:
> Since P1023RDS is no longer supported/manufactured by Freescale,
> we clean up P1023RDS related code.
> Since P1023RDB is still supported by Freescale,
> we keep P1023RDB releated code.

So are there not any boards left in the field that should be
supported?

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
Good manners are the settled  medium  of  social,  as  specie  is  of
commercial, life; returns are equally expected for both.
   - Lord Chesterfield _Letters to his Son_, 25 December 1753
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

2014-06-06 Thread Wolfgang Denk
Dear Lijun Pan,

In message <1402085108-11841-1-git-send-email-lijun@freescale.com> you 
wrote:
> lower_32_bits and upper_32_bits are very useful while programming.

"is very useful" is not enough reason to add any code.

Where are the actual users of these functions?  We will not add dead
code.

> +/**
> + * upper_32_bits - return bits 32-63 of a number
> + * @n: the number we're accessing

Hm... This comment is definitely wrong for the Power Architecture,
where bit 0 is always the most significan bit, so upper_32_bits would
reutn bits 0...31.

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
Children are natural mimics who act like their parents despite  every
effort to teach them good manners.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

2014-06-06 Thread Wolfgang Denk
Dear Lijun Pan,

In message <1402085600-12083-1-git-send-email-lijun@freescale.com> you 
wrote:
> lower_32_bits and upper_32_bits are very useful while programming.
> Port these two functions here from Linux:include/linux/kernel.h,
> also remove the definition in drivers/usb/host/xhci.h.
> Later on, developers could include linux/compat.h if they want to
> use these two functions.

Any reason to post this stuff twice?

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 it ain't broke, don't fix it."   - Bert Lantz
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/4] Add ctrlc_ignore environment variable to ignore Ctrl-C

2014-06-06 Thread Wolfgang Denk
Dear Simon,

In message  
you wrote:
> 
> > If this happens, I consider it a bug that should be fixed, and not
> > papered over.
> 
> If you look at the code for the 'md' command it calls ctrlc() every
> now and then. Each call results in a getc() which reads a character
> from the console. So we lose characters.

Well, as I mentioned: it looks like a bug that needs fixing.

> > I dislike this idea. It looks wrong to me.  Can we not fix the problem
> > at the root cause?
> 
> I certainly thought about this. I even though maybe we might change
> the serial module to scan ahead and buffer characters, in case there
> is a Ctrl-C in the future. But that itself seems like something for
> the future.

well, I see two sides of this:

1) Looking at sandbox only, we should provide an implementation of
   ctrlc() that does not consume characters from stdin - I thinkwe
   should rather be able to react on signals?

2) With a general point of view, consuming characters for no good is
   always wrong and needs to be fixed.

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
Our business is run on trust.  We trust you will pay in advance.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-Boot,3/4] power: Add support for the TPS65218 PMIC

2014-06-06 Thread Tom Rini
On Thu, Jun 05, 2014 at 11:15:29AM -0400, Tom Rini wrote:

> Add a driver for the TPS65218 PMIC which is used by TI AM43xx SoCs and
> may be used by TI AM335x SoCs.
> 
> Signed-off-by: Tom Rini 

Applied to u-boot-ti/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, 4/4] arm:am43xx: Add TPS65218 support to scale voltages up

2014-06-06 Thread Tom Rini
On Thu, Jun 05, 2014 at 11:15:30AM -0400, Tom Rini wrote:

> This family is supported by the TPS65218 PMIC.  Implement a scale_vcores
> to set the MPU and CORE voltage correctly to the max frequency that is
> supported (and what we will be scaling them to in setup_dplls()).
> 
> Signed-off-by: Tom Rini 

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

-- 
Tom


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


[U-Boot] Please pull u-boot-ti/master

2014-06-06 Thread Tom Rini
Hello,

The following changes since commit cc49da249cf2f380d2fed5571fad65ce6494fc95:

  Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master' (2014-06-02 
08:43:48 +0200)

are available in the git repository at:


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

for you to fetch changes up to 83bad1026b9e3a4f6b7783cc1cbb434c1bbd3fa2:

  arm:am43xx: Add TPS65218 support to scale voltages up (2014-06-06 17:46:16 
-0400)


Brian Norris (2):
  mtd: nand: don't use read_buf for 8-bit ONFI transfers
  mtd: nand: force NAND_CMD_READID onto 8-bit bus

David Mosberger (1):
  mtd: nand: fix GET/SET_FEATURES address on 16-bit devices

Hannes Petermaier (6):
  arch-am33xx: Add defines for timer0-7
  board/BuR/common: introduce usage of CONFIG_SYS_GENERIC_BOARD
  board/BuR/tseries: Add support for using 8-bit on eMMC
  board/BuR/tseries: only run gpmc_init(...) in NAND-build
  board/BuR/common: Add CONFIG_CMD_I2C
  board/BuR/tseries: cosmetic changes

Jeroen Hofstee (1):
  tam3517: fix NAND detection

Lokesh Vutla (2):
  ARM: AM43xx: Fix mmcboot command in EXTRA_ENV_SETTINGS
  ARM: AM43xx: Fix UART clocks enabling

Murali Karicheri (1):
  keystone: init: enable UART1 to be able use it from kernel

Sourav Poddar (2):
  am43xx_evm: Add qspiboot target
  ti: qspi: populate slave device to set flash quad bit.

Tom Rini (6):
  arm:am33xx: Make dram_init call sdram_init() in some contexts
  arm:am33xx: Rework s_init and add board_early_init_f
  am43xx: Only read the MPU frequency bits of CTRL_DEV_ATTR
  arm:am33xx: Add a scale_vcores() hook
  power: Add support for the TPS65218 PMIC
  arm:am43xx: Add TPS65218 support to scale voltages up

WingMan Kwok (1):
  keystone: k2hk: enable support of nand ecclayout command

pekon gupta (12):
  mtd: nand: omap_elm: remove #include omap_gpmc.h
  mtd: nand: omap_elm: use bch_type instead of nibble count to 
differentiate between BCH4/BCH8/BCH16
  mtd: nand: omap_elm: use macros for register definitions
  mtd: nand: omap_gpmc: remove unused members of 'struct nand_bch_priv'
  mtd: nand: omap_gpmc: rename struct nand_bch_priv to struct omap_nand_info
  mtd: nand: omap_gpmc: minor cleanup of omap_correct_data_bch
  mtd: nand: omap: fix error-codes returned from omap-elm driver
  mtd: nand: omap: add CONFIG_SYS_NAND_BUSWIDTH_16BIT to indicate NAND 
device bus-width
  omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and 
GPMC_NAND_ECC_LP_x16_LAYOUT
  mtd: nand: omap_gpmc: use macro for register definitions
  mtd: nand: omap: add support for BCH16_ECC - NAND driver updates
  am335x: update README for BCH16

 arch/arm/cpu/armv7/am33xx/board.c  |   20 +-
 arch/arm/cpu/armv7/am33xx/clock.c  |   11 ++
 arch/arm/cpu/armv7/am33xx/clock_am43xx.c   |9 +
 arch/arm/cpu/armv7/am33xx/emif4.c  |4 +
 arch/arm/cpu/armv7/keystone/init.c |9 +
 arch/arm/cpu/armv7/omap3/mem.c |   12 --
 arch/arm/include/asm/arch-am33xx/clock.h   |1 +
 arch/arm/include/asm/arch-am33xx/cpu.h |   35 +++-
 arch/arm/include/asm/arch-keystone/hardware-k2hk.h |2 -
 arch/arm/include/asm/arch-keystone/hardware.h  |3 +
 arch/arm/include/asm/arch-omap3/mem.h  |8 -
 board/BuR/tseries/board.c  |2 +
 board/BuR/tseries/mux.c|9 +-
 board/compulab/cm_t35/cm_t35.c |   12 +-
 board/ti/am43xx/Makefile   |2 +-
 board/ti/am43xx/board.c|   55 +-
 boards.cfg |1 +
 doc/README.nand|   60 ++
 drivers/mtd/nand/am335x_spl_bch.c  |2 +-
 drivers/mtd/nand/atmel_nand.c  |2 +-
 drivers/mtd/nand/nand_base.c   |   11 +-
 drivers/mtd/nand/nand_spl_simple.c |2 +-
 drivers/mtd/nand/omap_elm.c|   28 ++-
 drivers/mtd/nand/omap_gpmc.c   |  193 +---
 drivers/power/pmic/Makefile|1 +
 drivers/power/pmic/pmic_tps65218.c |   97 ++
 drivers/spi/ti_qspi.c  |1 +
 include/configs/am3517_crane.h |1 +
 include/configs/am43xx_evm.h   |   45 -
 include/configs/bur_am335x_common.h|4 +-
 include/configs/cm_t335.h  |1 -
 include/configs/cm_t35.h   |1 -
 include/configs/devkit8000.h   |1 +
 include/configs/dig297.h   |1 +
 include/configs/k2hk_evm.h |4 +-
 include/configs/omap3_beagle.

Re: [U-Boot] board/BuR/tseries: only run gpmc_init(...) in NAND-build

2014-06-06 Thread Tom Rini
On Wed, Jun 04, 2014 at 10:26:29AM +0200, Hannes Petermaier wrote:

> if we have no NAND-Chip, we don't need the gpmc-controller and therefore
> is no need to init it.
> 
> Cc: tr...@ti.com
> Signed-off-by: Hannes Petermaier 

Applied to u-boot-ti/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/4] arm:am33xx: Add a scale_vcores() hook

2014-06-06 Thread Tom Rini
On Thu, Jun 05, 2014 at 11:15:28AM -0400, Tom Rini wrote:

> Similar to OMAP4/5 we need to scale the voltage up prior to changing the
> clock frequencies up higher.  Add a similar hook to start with.
> 
> Signed-off-by: Tom Rini 

Applied to u-boot-ti/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/4] am43xx: Only read the MPU frequency bits of CTRL_DEV_ATTR

2014-06-06 Thread Tom Rini
On Thu, Jun 05, 2014 at 11:15:27AM -0400, Tom Rini wrote:

> Signed-off-by: Tom Rini 

Applied to u-boot-ti/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] board/BuR/tseries: cosmetic changes

2014-06-06 Thread Tom Rini
On Wed, Jun 04, 2014 at 10:37:12AM +0200, Hannes Petermaier wrote:

> Cc: tr...@ti.com
> Signed-off-by: Hannes Petermaier 

Applied to u-boot-ti/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] board/BuR/common: introduce usage of CONFIG_SYS_GENERIC_BOARD

2014-06-06 Thread Tom Rini
On Wed, Jun 04, 2014 at 10:22:07AM +0200, Hannes Petermaier wrote:

> Signed-off-by: Hannes Petermaier 

Applied to u-boot-ti/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] board/BuR/common: Add CONFIG_CMD_I2C

2014-06-06 Thread Tom Rini
On Wed, Jun 04, 2014 at 10:28:39AM +0200, Hannes Petermaier wrote:

> in almost all cases we need the i2c commands within the u-boot shell.
> So we enable them within the common section.
> 
> Cc: tr...@ti.com
> Signed-off-by: Hannes Petermaier 

Applied to u-boot-ti/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] arch-am33xx: Add defines for timer0-7

2014-06-06 Thread Tom Rini
On Wed, Jun 04, 2014 at 10:19:26AM +0200, Hannes Petermaier wrote:

> For usage of timer6 within B&R we need this defines to enable clock
> modules and clk-source.
> 
> Also the 'Timer register bits' are expanded.
> 
> By the way we add defines for all timers within AM335x SoC.
> 
> Cc: tr...@ti.com
> Signed-off-by: Hannes Petermaier 

Applied to u-boot-ti/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] ARM: AM43xx: Fix mmcboot command in EXTRA_ENV_SETTINGS

2014-06-06 Thread Tom Rini
On Mon, Jun 02, 2014 at 10:45:38AM +0530, Lokesh Vutla wrote:

> loadbootenv expects devtype variable to be set. This is missing in
> mmcboot command. With this the following error comes:
> U-Boot# run mmcboot
> mmc0 is current device
> SD/MMC found on device 0
> ** Bad device usb 0 **
> ** Bad device usb 0 **
> Fixing this by setting devtype as mmc.
> 
> Reported-by: Tony Lindgren 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot-ti/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, v4, 2/3] mtd: nand: omap: add support for BCH16_ECC - NAND driver updates

2014-06-06 Thread Tom Rini
On Mon, Jun 02, 2014 at 05:14:42PM +0530, pekon gupta wrote:

> This patch add support for BCH16_ECC to omap_gpmc driver.
> 
> *need to BCH16 ECC scheme*
> With newer SLC Flash technologies and MLC NAND, and large densities, pagesizes
> Flash devices have become more suspectible to bit-flips. Thus stronger
> ECC schemes are required for protecting the data.
> But stronger ECC schemes have come with larger-sized ECC syndromes which 
> require
> more space in OOB/Spare. This puts constrains like;
> (a) BCH16_ECC can correct 16 bit-flips per 512Bytes of data.
> (b) BCH16_ECC generates 26-bytes of ECC syndrome / 512B.
> Due to (b) this scheme can only be used with NAND devices which have enough
> OOB to satisfy following equation:
> OOBsize per page >= 26 * (page-size / 512)
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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, v4, 1/3] mtd: nand: omap_gpmc: use macro for register definitions

2014-06-06 Thread Tom Rini
On Mon, Jun 02, 2014 at 05:14:41PM +0530, pekon gupta wrote:

> GPMC can support simultaneous processing of 8 512Byte data chunks, in parallel
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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] ARM: AM43xx: Fix UART clocks enabling

2014-06-06 Thread Tom Rini
On Mon, Jun 02, 2014 at 10:49:03AM +0530, Lokesh Vutla wrote:

> After enabling a module, SW has to wait on IDLEST bit
> until it is Fully functional. This wait is missing for UART module
> and there is a immediate access of UART registers after this. So there
> is a chance of hang on this module( This can happen when we are running
> from MPU SRAM). So waiting for IDLEST bit.
> 
> Signed-off-by: Lokesh Vutla 

Applied to u-boot-ti/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,v4,3/3] am335x: update README for BCH16

2014-06-06 Thread Tom Rini
On Mon, Jun 02, 2014 at 05:14:43PM +0530, pekon gupta wrote:

> updates documentation with explanation on how to select ECC schemes.
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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] tam3517: fix NAND detection

2014-06-06 Thread Tom Rini
On Sat, May 31, 2014 at 05:08:30PM +0200, Jeroen Hofstee wrote:

> commit a0a37183bd7 "ARM: omap: merge GPMC initialization code for
> all platform" needs CONFIG_NOR, CONFIG_NAND or CONFIG_CMD_ONENAND
> to be set to access flash. Add CONFIG_NAND for tam3517 derived
> boards to prevent the following error: "nand: error: Unable to
> find NAND settings in GPMC Configuration - quitting"
> 
> cc: Stefano Babic 
> Signed-off-by: Jeroen Hofstee 

Applied to u-boot-ti/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, U-boot] keystone: k2hk: enable support of nand ecclayout command

2014-06-06 Thread Tom Rini
On Thu, May 29, 2014 at 06:58:16PM +0300, Khoronzhuk, Ivan wrote:

> From: WingMan Kwok 
> 
> Enable support of nand ecclayout command.
> 
> Acked-By: Murali Karicheri 
> Acked-by: Vitaly Andrianov 
> Signed-off-by: WingMan Kwok 
> Signed-off-by: Ivan Khoronzhuk 

Applied to u-boot-ti/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] ti: qspi: populate slave device to set flash quad bit.

2014-06-06 Thread Tom Rini
On Mon, May 19, 2014 at 04:53:38PM -0400, Tom Rini wrote:

> From: Sourav Poddar 
> 
> The patch populates the slave data which will be used by flash driver to
> set the  flash quad enable bit.
> 
> Signed-off-by: Sourav Poddar 

Applied to u-boot-ti/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, U-boot] keystone: init: enable UART1 to be able use it from kernel

2014-06-06 Thread Tom Rini
On Thu, May 29, 2014 at 06:57:12PM +0300, Khoronzhuk, Ivan wrote:

> From: Murali Karicheri 
> 
> Currently PWREMU_MGMT is not configured in the Linux generic UART
> driver as this register seems to be specific TI UART IP. So this
> needs to be enabled in u-boot to use UART1 from kernel space.
> 
> Acked-By: Vitaly Andrianov 
> Signed-off-by: Murali Karicheri 
> Signed-off-by: Ivan Khoronzhuk 

Applied to u-boot-ti/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] arm:am33xx: Rework s_init and add board_early_init_f

2014-06-06 Thread Tom Rini
On Wed, May 21, 2014 at 12:57:22PM -0400, Tom Rini wrote:

> With the changes to the i2c framework (and adopting the omap24xx_i2c
> driver to them) we can no longer call i2c functions prior to gd having
> been set and cleared.  When SPL booting, this is handled by setting gd
> to point to SRAM in s_init.  However in the cases where we are loaded
> directly by ROM (memory mapped NOR or QSPI) we need to make use of the
> normal hooks to slightly delay these calls.
> 
> Signed-off-by: Tom Rini 

Applied to u-boot-ti/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] arm:am33xx: Make dram_init call sdram_init() in some contexts

2014-06-06 Thread Tom Rini
On Wed, May 21, 2014 at 12:57:21PM -0400, Tom Rini wrote:

> We have two contexts for booting these platforms.  One is SPL which is
> roughly: reset, cpu_init_crit, lowlevel_init, s_init, sdram_init, _main,
> board_init_f from SPL, ... then U-Boot loads.  The other is a
> memory-mapped XIP case (NOR or QSPI) where we do not run an SPL.  In
> this case we go, roughly: reset, cpu_init_crit, lowlevel_init, s_init,
> _main, regular board_init_f.
> 
> In the first case s_init will set a valid gd and then be able to call
> sdram_init which in many cases will need i2c (which needs a valid gd for
> gd->cur_i2c_bus).  In this second case we must (and are able to and
> should) defer sdram_init() into dram_init() called by board_init_f as gd
> will have been set in _main and cleared in board_init_f.
> 
> Signed-off-by: Tom Rini 

Applied to u-boot-ti/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, v5, 3/5] mtd: nand: fix GET/SET_FEATURES address on 16-bit devices

2014-06-06 Thread Tom Rini
On Tue, May 06, 2014 at 12:46:18AM +0530, pekon gupta wrote:

> From: David Mosberger 
> 
> As per following Sections in ONFI Spec, GET_FEATURES and SET_FEATURES also 
> need
> byte-addressing on 16-bit devices.
> 
> *Section: Target Initialization"
> "The Read ID and Read Parameter Page commands only use the lower 8-bits of the
>  data bus. The host shall not issue commands that use a word data width on x16
>  devices until the host determines the device supports a 16-bit data bus width
>  in the parameter page."
> 
> *Section: Bus Width Requirements*
> "When the host supports a 16-bit bus width, only data is transferred at the
>  16-bit width. All address and command line transfers shall use only the lower
>  8-bits of the data bus. During command transfers, the host may place any 
> value
>  on the upper 8-bits of the data bus. During address transfers, the host shall
>  set the upper 8-bits of the data bus to 00h."
> 
> So porting following commit from linux kernel
> commit e34fcb07a6d57411de6e15a47724fbe92c5caa42
> Author: David Mosberger   (preserving authorship)
> mtd: nand: fix GET/SET_FEATURES address on 16-bit devices
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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, v5, 5/5] omap3: remove remnant macros GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT

2014-06-06 Thread Tom Rini
On Tue, May 06, 2014 at 12:46:20AM +0530, pekon gupta wrote:

> OMAP3 used GPMC_NAND_ECC_LP_x8_LAYOUT and GPMC_NAND_ECC_LP_x16_LAYOUT macros
> to configure GPMC controller for x7 or x8 bit device connected to its 
> interface.
> Now this information is encoded in CONFIG_SYS_NAND_DEVICE_WIDTH macro, so 
> above
> macros can be completely removed.
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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, v5, 4/5] mtd: nand: omap: add CONFIG_SYS_NAND_BUSWIDTH_16BIT to indicate NAND device bus-width

2014-06-06 Thread Tom Rini
On Tue, May 06, 2014 at 12:46:19AM +0530, pekon gupta wrote:

> GPMC controller needs to be configured based on bus-width of the NAND device
> connected to it. Also, dynamic detection of NAND bus-width from on-chip ONFI
> parameters is not possible in following situations:
> SPL:SPL NAND drivers does not support ONFI parameter reading.
> U-boot: GPMC controller iniitalization is done in 
> omap_gpmc.c:board_nand_init()
> which is called before probing for devices, hence any ONFI parameter
> information is not available during GPMC initialization.
> 
> Thus, OMAP NAND driver expected board developers to explicitely write GPMC
> configurations specific to NAND device attached on board in board files 
> itself.
> But this was troublesome for board manufacturers as they need to dive into
> lengthy platform & SoC documents to find details of GPMC registers and
> appropriate configurations to get NAND device working.
> 
> This patch instead adds existing CONFIG_SYS_NAND_BUSWIDTH_16BIT to board 
> config
> hich indicates that connected NAND device has x16 bus-width. And then based on
> this config GPMC driver itself initializes itself based on NAND bus-width. 
> This
> keeps board developers free from knowing GPMC controller specific internals.
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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, v5, 1/5] mtd: nand: don't use read_buf for 8-bit ONFI transfers

2014-06-06 Thread Tom Rini
On Tue, May 06, 2014 at 12:46:16AM +0530, pekon gupta wrote:

> From: Brian Norris 
> 
> Porting below commit from linux-tree, preserving original authorship & commit 
> log
> commit bd9c6e99b58255b9de1982711ac9487c9a2f18be
> Author: Brian Norris 
> mtd: nand: don't use read_buf for 8-bit ONFI transfers
> 
>   Use a repeated read_byte() instead of read_buf(), since for x16 buswidth
>   devices, we need to avoid the upper I/O[16:9] bits. See the following
>   commit for reference:
> 
>   commit 05f7835975dad6b3b517f9e23415985e648fb875 (from linux-tree)
>   Author: Uwe Kleine-König 
>   Date:   Thu Dec 5 22:22:04 2013 +0100
> 
>   mtd: nand: don't use {read,write}_buf for 8-bit transfers
> 
>   Now, I think that all barriers to probing ONFI on x16 devices are
>   removed, so remove the check from nand_flash_detect_onfi().
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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, v5, 2/5] mtd: nand: force NAND_CMD_READID onto 8-bit bus

2014-06-06 Thread Tom Rini
On Tue, May 06, 2014 at 12:46:17AM +0530, pekon gupta wrote:

> From: Brian Norris 
> 
> As per following Sections in ONFI Spec, NAND_CMD_READID should use only
> lower 8-bit for transfering command, address and data even on x16 NAND device.
> 
> *Section: Target Initialization"
> "The Read ID and Read Parameter Page commands only use the lower 8-bits of the
>  data bus. The host shall not issue commands that use a word data width on x16
>  devices until the host determines the device supports a 16-bit data bus width
>  in the parameter page."
> 
> *Section: Bus Width Requirements*
> "When the host supports a 16-bit bus width, only data is transferred at the
>  16-bit width. All address and command line transfers shall use only the lower
>  8-bits of the data bus. During command transfers, the host may place any 
> value
>  on the upper 8-bits of the data bus. During address transfers, the host shall
>  set the upper 8-bits of the data bus to 00h."
> 
> Thus porting  following commit from linux-kernel to ensure that column address
> is not altered to align to x16 bus when issuing NAND_CMD_READID command.
> 
> commit 3dad2344e92c6e1aeae42df1c4824f307c51bcc7
> mtd: nand: force NAND_CMD_READID onto 8-bit bus
> Author: Brian Norris  (preserving authorship)
> 
> The NAND command helpers tend to automatically shift the column address
> for x16 bus devices, since most commands expect a word address, not a
> byte address. The Read ID command, however, expects an 8-bit address
> (i.e., 0x00, 0x20, or 0x40 should not be translated to 0x00, 0x10, or
> 0x20).
> 
> This fixes the column address for a few drivers which imitate the
> nand_base defaults.
> 
> Signed-off-by: Pekon Gupta 

Applied to u-boot-ti/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] am43xx_evm: Add qspiboot target

2014-06-06 Thread Tom Rini
On Mon, May 19, 2014 at 04:53:37PM -0400, Tom Rini wrote:

> From: Sourav Poddar 
> 
> The ePOS EVM and EVM SK have QSPI as an option to boot.  Add a qspiboot
> target that utilizes QSPI for env and so forth as an example of best
> practices.  As QSPI is booted from directly we need to chang
> CONFIG_SYS_TEXT_BASE.
> 
> Note that on ePOS EVM the QSPI and NAND are mutually exclusive choices
> we need to handle that elsewhere, once NAND support is also added.
> 
> Signed-off-by: Sourav Poddar 
> Signed-off-by: Tom Rini 

Applied to u-boot-ti/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, 7/7] mtd: nand: omap: fix error-codes returned from omap-elm driver

2014-06-06 Thread Tom Rini
On Fri, Apr 11, 2014 at 12:55:35PM +0530, pekon gupta wrote:

> This patch
>  omap-elm.c: replaces -ve integer value returned during errorneous condition,
>  with proper error-codes.
>  omap-gpmc.c: updates omap-gpmc driver to pass error-codes returned from
>  omap-elm driver to upper layers
> 
> Signed-off-by: Pekon Gupta 
> Reviewed-by: Stefan Roese 
> Reviewed-by: Stefan Roese 

Applied to u-boot-ti/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, 5/7] mtd: nand: omap_gpmc: rename struct nand_bch_priv to struct omap_nand_info

2014-06-06 Thread Tom Rini
On Fri, Apr 11, 2014 at 12:55:33PM +0530, pekon gupta wrote:

> This patch renames 'struct nand_bch_priv' which currently holds private data 
> only
> for BCH ECC schemes, into 'struct omap_nand_info' so that same can be used for
> all ECC schemes
> 
> Signed-off-by: Pekon Gupta 
> Reviewed-by: Stefan Roese 

Applied to u-boot-ti/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/7] mtd: nand: omap_elm: use bch_type instead of nibble count to differentiate between BCH4/BCH8/BCH16

2014-06-06 Thread Tom Rini
On Fri, Apr 11, 2014 at 12:55:30PM +0530, pekon gupta wrote:

> ELM hardware engine support ECC error detection for multiple ECC strengths 
> like
>  +--++
>  |Type  | ECC syndrome length|
>  +--++
>  |BCH4  | 6.5 bytes = 13 nibbles |
>  |BCH8  | 13 byte = 26 nibbles   |
>  |BCH16 | 26 bytes = 52 nibbles  |
>  +--++
> 
> Current implementation of omap_elm driver uses ECC syndrom length (in 
> 'nibbles')
> to differentiate between BCH4/BCH8/BCH16. This patch replaces it with 
> 'bch_type'
> 
> Signed-off-by: Pekon Gupta 
> Reviewed-by: Stefan Roese 

Applied to u-boot-ti/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/7] mtd: nand: omap_gpmc: remove unused members of 'struct nand_bch_priv'

2014-06-06 Thread Tom Rini
On Fri, Apr 11, 2014 at 12:55:32PM +0530, pekon gupta wrote:

> This patch prepares to refactor 'struct nand_bch_priv' -> 'struct 
> omap_nand_info'
> And thus performs following clean-ups:
>  - remove nand_bch_priv.type: use nand_bch_priv.ecc_scheme instead
>  - remove nand_bch_priv.mode: 
> 
> Signed-off-by: Pekon Gupta 
> Reviewed-by: Stefan Roese 
> Reviewed-by: Stefan Roese 
> 

Applied to u-boot-ti/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, 6/7] mtd: nand: omap_gpmc: minor cleanup of omap_correct_data_bch

2014-06-06 Thread Tom Rini
On Fri, Apr 11, 2014 at 12:55:34PM +0530, pekon gupta wrote:

> This patch tries to avoid some local pointer dereferences, by using common
> local variables in omap_correct_data_bch()
> 
> Signed-off-by: Pekon Gupta 
> Reviewed-by: Stefan Roese 
> Reviewed-by: Stefan Roese 

Applied to u-boot-ti/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/7] mtd: nand: omap_elm: use macros for register definitions

2014-06-06 Thread Tom Rini
On Fri, Apr 11, 2014 at 12:55:31PM +0530, pekon gupta wrote:

> This patch adds macros for following parameters of ELM Hardware engine
>  - ELM_MAX_CHANNELS: ELM can process 8 data streams simultaneously
>  - ELM_MAX_ERRORS: ELM can detect upto 16 ECC error when using BCH16 scheme
> 
> Signed-off-by: Pekon Gupta 
> Reviewed-by: Stefan Roese 

Applied to u-boot-ti/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/7] mtd: nand: omap_elm: remove #include omap_gpmc.h

2014-06-06 Thread Tom Rini
On Fri, Apr 11, 2014 at 12:55:29PM +0530, pekon gupta wrote:

> There is no dependency of omap_elm.c on omap_gpmc.h
> 
> Signed-off-by: Pekon Gupta 
> Reviewed-by: Stefan Roese 

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

-- 
Tom


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


[U-Boot] [PATCH v2] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

2014-06-06 Thread Lijun Pan
[backport from linux commit 204b885e and 218e180e7]
lower_32_bits and upper_32_bits are very useful while programming.
Port these two functions here from Linux:include/linux/kernel.h,
also remove the definition in drivers/usb/host/xhci.h.
Later on, developers could include linux/compat.h if they want to
use these two functions.

Signed-off-by: Lijun Pan 
---
Change log
v2: add git SHA of linux kernel tree.

 drivers/usb/host/xhci.h |  4 +---
 include/linux/compat.h  | 17 +
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index ceb1573..6381596 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -20,9 +20,7 @@
 #include 
 #include 
 #include 
-
-#define upper_32_bits(n) (u32)((n) >> 32)
-#define lower_32_bits(n) (u32)(n)
+#include 
 
 #define MAX_EP_CTX_NUM 31
 #define XHCI_ALIGNMENT 64
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3fdfb39..bc51dd1 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -57,4 +57,21 @@
  , __FILE__, __LINE__); }
 
 #define PAGE_SIZE  4096
+
+/**
+ * upper_32_bits - return bits 32-63 of a number
+ * @n: the number we're accessing
+ *
+ * A basic shift-right of a 64- or 32-bit quantity.  Use this to suppress
+ * the "right shift count >= width of type" warning when that quantity is
+ * 32-bits.
+ */
+#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+
+/**
+ * lower_32_bits - return bits 0-31 of a number
+ * @n: the number we're accessing
+ */
+#define lower_32_bits(n) ((u32)(n))
+
 #endif
-- 
1.9.0

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


Re: [U-Boot] [U-boot] [Patch v2] mtd: nand: davinci: add header file for driver definitions

2014-06-06 Thread Ivan Khoronzhuk


On 06/06/2014 11:34 PM, Tom Rini wrote:

On Thu, May 29, 2014 at 08:46:22PM +0300, Ivan Khoronzhuk wrote:


The definitions inside emif_defs.h concern davinci nand driver and
should be in it's header. So create header file for davinci nand
driver and move definitions from emif_defs.h to it.

Acked-by: Vitaly Andrianov 
Signed-off-by: Ivan Khoronzhuk 
---
  arch/arm/cpu/armv7/keystone/aemif.c|  2 +-
  arch/arm/include/asm/arch-keystone/emif_defs.h | 73 --
  arch/arm/include/asm/arch-keystone/nand_defs.h | 23 
  board/ti/k2hk_evm/board.c  |  1 -
  drivers/mtd/nand/davinci_nand.c|  3 +-
  drivers/mtd/nand/davinci_nand.h| 66 +++
  6 files changed, 68 insertions(+), 100 deletions(-)
  delete mode 100644 arch/arm/include/asm/arch-keystone/emif_defs.h
  delete mode 100644 arch/arm/include/asm/arch-keystone/nand_defs.h
  create mode 100644 drivers/mtd/nand/davinci_nand.h

This breaks building a bunch of davinci platforms.  Further, we should
put the new header file under arch/arm/include/asm/ti-common/ not
drivers/mtd/nand/.  Can you please update things and reconcile
arch/arm/include/asm/arch-davinci/emif_defs.h with these new changes?
Thanks.



Yes..I will repost new patch.
Thanks!

--
Regards,
Ivan Khoronzhuk

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


Re: [U-Boot] [PATCH v2] test:dfu: Add test scripts for testing DFU regression

2014-06-06 Thread Simon Glass
Hi Lukasz,

On 3 June 2014 03:54, Lukasz Majewski  wrote:
> This commit adds test scripts for testing if any commit has introduced
> regression to the DFU subsystem.
>
> It uses md5 to test if sent and received file is correct.
> The test detailed description is available at README file.
>
> Signed-off-by: Lukasz Majewski 
> ---
> Changes for v2:
> - Rename DESCRIPTION.TXT to README
> - Introduction of COLOUR_* variables to hold code necessary to change
>   console color
> - File to create initial setup - dfu_gadget_test_init.sh has been added
> - Test files are now automatically generated with the above script

Looks good, but a few comments below.

> ---
>  test/dfu/README  |   27 
>  test/dfu/dfu_gadget_test.sh  |   88 
> ++
>  test/dfu/dfu_gadget_test_init.sh |   34 +++
>  3 files changed, 149 insertions(+)
>  create mode 100644 test/dfu/README
>  create mode 100755 test/dfu/dfu_gadget_test.sh
>  create mode 100755 test/dfu/dfu_gadget_test_init.sh
>
> diff --git a/test/dfu/README b/test/dfu/README
> new file mode 100644
> index 000..f8f5a43
> --- /dev/null
> +++ b/test/dfu/README
> @@ -0,0 +1,27 @@
> +DFU TEST CASE DESCRIPTION:
> +
> +The prerequisites for running this script are assured by
> +dfu_gadget_test_init.sh script.
> +In this file user is able to generate their own set of test files by altering
> +the default set of TEST_FILES_SIZES variable
> +
> +Moreover, on a target device the "dfu_alt_info" env variable should be 
> extended
> +to have "dfu_test.bin fat 0 6;" \ entry ([1]). For reference please consult 
> the
> +config file for TRATS/TRATS2 devices (./include/configs/trats{2}.h)
> +
> +One can use fat, ext4 or any other supported file system, which can be
> +created in a convenient way with exporting partitions via UMS (ums 0 mmc 0)
> +and using standard tools on host (like mkfs.ext4).
> +
> +Example usage:
> +1. On the target:
> +   env default -a
> +   dfu 0 mmc 0
> +2. On the host:
> +   ./dfu_gadget_test.sh 11
> +
> +where 11 is the mumber of alt setting corresponding to entry [1].
> +
> +The number of the alt setting entry can be obtained with dfu-util -l command.
> +In its output one should look for the 'name="dfu_test1.bin"' and 
> corresponding
> +alt=11.
> diff --git a/test/dfu/dfu_gadget_test.sh b/test/dfu/dfu_gadget_test.sh
> new file mode 100755
> index 000..8abd8e7
> --- /dev/null
> +++ b/test/dfu/dfu_gadget_test.sh
> @@ -0,0 +1,88 @@
> +#! /bin/bash
> +set -e # any command return if not equal to zero
> +clear
> +
> +COLOR_RED="\33[31m"
> +COLOR_GREEN="\33[32m"
> +COLOR_DEFAULT="\33[0m"

Which side of the pond are you? :-) I think it should be COLOUR in U-Boot.

> +
> +DIR=./
> +SUFFIX=img
> +RCV_DIR=rcv/
> +LOG_FILE=./log/log-`date +%d-%m-%Y_%H-%M-%S`
> +
> +./dfu_gadget_test_init.sh
> +
> +cleanup () {
> +rm -rf $RCV_DIR
> +}
> +
> +die () {
> +   printf "   $COLOR_RED FAILED $COLOR_DEFAULT \n"
> +   cleanup
> +   exit 1
> +}
> +
> +calculate_md5sum () {
> +MD5SUM=`md5sum $1`
> +MD5SUM=`echo $MD5SUM | cut -d ' ' -f1`
> +echo "md5sum:"$MD5SUM
> +}
> +
> +dfu_test_file () {
> +printf "$COLOR_GREEN 
> =
>  $COLOR_DEFAULT\n"
> +printf "File:$COLOR_GREEN %s $COLOR_DEFAULT\n" $1
> +
> +dfu-util -D $1 -a $TARGET_ALT_SETTING >> $LOG_FILE 2>&1 || die $?
> +
> +echo -n "TX: "
> +calculate_md5sum $1
> +
> +MD5_TX=$MD5SUM
> +
> +N_FILE=$DIR$RCV_DIR${1:2}"_rcv"
> +
> +dfu-util -U $N_FILE -a $TARGET_ALT_SETTING >> $LOG_FILE 2>&1 || die $?
> +
> +echo -n "RX: "
> +calculate_md5sum $N_FILE
> +MD5_RX=$MD5SUM
> +
> +if [ "$MD5_TX" == "$MD5_RX" ]; then
> +   printf "   $COLOR_GREEN ---> OK $COLOR_DEFAULT \n"
> +else
> +   printf "   $COLOR_RED ---> FAILED $COLOR_DEFAULT \n"
> +   cleanup
> +   exit 1
> +fi
> +
> +}
> +
> +printf 
> "$COLOR_GREEN=
>  $COLOR_DEFAULT\n"
> +echo "DFU EP0 transmission test program"
> +echo "Trouble shoot -> disable DBG (even the KERN_DEBUG) in the UDC driver"
> +echo "@ -> TRATS2 # dfu 0 mmc 0"
> +mkdir -p $RCV_DIR
> +touch $LOG_FILE
> +
> +if [ $# -eq 0 ]
> +then
> +   printf "   $COLOR_RED Please pass alt setting number!!  
> $COLOR_DEFAULT \n"
> +   exit 0
> +fi
> +
> +TARGET_ALT_SETTING=$1
> +
> +if [ -n "$2" ]
> +then
> +   dfu_test_file $2

Where is $2 mentioned? in your example usage?

> +else
> +   for file in $DIR*.$SUFFIX
> +   do
> +   dfu_test_file $file
> +   done
> +fi
> +
> +cleanup
> +
> +exit 0
> diff --git a/test/dfu/dfu_gadget_test_init.sh 
> b/test/dfu/dfu_gadget_test_init.sh
> new file mode 100755
> index 000..ea2f715
> --- /dev/null
> +++ b/test/dfu/dfu_gadget_test_init.sh

Should this script be run by the main script in the default case? Yo

Re: [U-Boot] [PATCH] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

2014-06-06 Thread Tom Rini
On Fri, Jun 06, 2014 at 03:05:08PM -0500, Lijun Pan wrote:

> lower_32_bits and upper_32_bits are very useful while programming.
> Port these two functions here from Linux:include/linux/kernel.h,
> also remove the definition in drivers/usb/host/xhci.h.
> Later on, developers could include linux/compat.h if they want to
> use these two functions.
> 
> Signed-off-by: Lijun Pan 

Per
http://www.denx.de/wiki/view/U-Boot/Patches#Attributing_Code_Copyrights_Sign
you need to say what git hash or tag this comes from in the kernel.

-- 
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] Any interest in support for BCM5718 (a.k.a Tigon3) PCIe Ethernet chipset?

2014-06-06 Thread Simon Glass
Hi Chris,

On 5 June 2014 21:24, Chris Packham  wrote:
> Hi,
>
> (Joe, Simon, I'm not sure if this counts as "networking" or "driver
> model" but figured it was close enough to warrant an Cc).
>
> We're looking at a new board design and are planning on using a
> BCM5718 to provide a couple of Ethernet ports. The chipset is
> supported in Linux using the tg3.c driver. I was planning on creating
> an equivalent driver in u-boot using e1000.c as a guide and probably
> borrowing heavily from the Linux driver.
>
> Is anyone else actively looking at Broadcom based chipset/NICs? Any
> tips as for where to start or pitfalls to expect?

I'm not aware of anything myself, but it sounds like a good idea. If
you feel able to convert 'eth' over to driver model that would be
great too. There are only a small number of operations.

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


Re: [U-Boot] [PATCH v4 04/15] Makefile: Support include files for .dts files

2014-06-06 Thread Simon Glass
Hi Jon,

On 6 June 2014 14:29, Jon Loeliger  wrote:
>> diff --git a/arch/arm/dts/include/dt-bindings 
>> b/arch/arm/dts/include/dt-bindings
>> new file mode 12
>> index 000..0cecb3d
>> --- /dev/null
>> +++ b/arch/arm/dts/include/dt-bindings
>> @@ -0,0 +1 @@
>> +../../../../include/dt-bindings
>> \ No newline at end of file
>
> Hmmm... is this right?

It is supposed to come through as a symlink.

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


[U-Boot] [PATCH] powerpc/mpc85xx: Remove P1023 RDS support

2014-06-06 Thread Lijun Pan
Since P1023RDS is no longer supported/manufactured by Freescale,
we clean up P1023RDS related code.
Since P1023RDB is still supported by Freescale,
we keep P1023RDB releated code.

Signed-off-by: Lijun Pan 
---
 board/freescale/p1023rds/Makefile |   9 -
 board/freescale/p1023rds/README   | 101 -
 board/freescale/p1023rds/bcsr.h   |  49 ---
 board/freescale/p1023rds/law.c|  19 -
 board/freescale/p1023rds/p1023rds.c   | 196 --
 board/freescale/p1023rds/tlb.c| 102 -
 boards.cfg|   2 -
 include/configs/P1023RDS.h| 523 --
 nand_spl/board/freescale/p1023rds/Makefile|  87 -
 nand_spl/board/freescale/p1023rds/nand_boot.c |  96 -
 10 files changed, 1184 deletions(-)
 delete mode 100644 board/freescale/p1023rds/Makefile
 delete mode 100644 board/freescale/p1023rds/README
 delete mode 100644 board/freescale/p1023rds/bcsr.h
 delete mode 100644 board/freescale/p1023rds/law.c
 delete mode 100644 board/freescale/p1023rds/p1023rds.c
 delete mode 100644 board/freescale/p1023rds/tlb.c
 delete mode 100644 include/configs/P1023RDS.h
 delete mode 100644 nand_spl/board/freescale/p1023rds/Makefile
 delete mode 100644 nand_spl/board/freescale/p1023rds/nand_boot.c

diff --git a/board/freescale/p1023rds/Makefile 
b/board/freescale/p1023rds/Makefile
deleted file mode 100644
index fdbf365..000
--- a/board/freescale/p1023rds/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# Copyright 2010-2011 Freescale Semiconductor, Inc.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y  += p1023rds.o
-obj-y  += law.o
-obj-y  += tlb.o
diff --git a/board/freescale/p1023rds/README b/board/freescale/p1023rds/README
deleted file mode 100644
index d382551..000
--- a/board/freescale/p1023rds/README
+++ /dev/null
@@ -1,101 +0,0 @@
-Overview
-
-The P1023 process includes a performance optimized implementation of the
-QorIQ data Path Acceleration Architecture (DPAA).  This architecture
-provides the infrastructure to support simplified sharing of networking
-interfaces and accelerators by multiple CPU cores. P1023 is an e500 based
-dual core SOC.
-
-P1023RDS board is a Low End Dual core platform supporting the P1023
-processor of QorIQ series.
-
-Building U-boot

-To build the u-boot for P1023RDS:
-Configure to NOR boot:
-   make P1023RDS_config
-Configure to NAND boot:
-   make P1023RDS_NAND_config
-Build:
-   make
-
-Board Switches
---
-Most switches on the board should not be changed.  The most frequent
-user-settable switches on the board are used to configure
-the flash banks.
-
-J4: all open
-
-Default NOR flash boot switch setting:
- Sw3[1:8]: off on on off on on off off
- Sw4[1:8]: off off off on off off off off
- Sw6[1:8]: off on off on off on on off
- Sw7[1:8]: off on off off on off off off
- Sw8[1:8]: on off off off off off off off
-
-For NAND flash boot,set
-Sw4[1:4]: off on on on
-
-The default native ethernet setting is for RGMII mode.
-To use SGMII mode, set
-SW8[1:2]: OFF OFF
-SW7[6:7]: ON ON
-
-Memory Map
---
-0x_0x7fff_ DDR 2G Cacheable
-0x8000_0xbfff_ PCI Express Mem 1G non-cacheable
-0xc000_0xdfff_ PCI 512M non-cacheable
-0xe100_0xe3ff_ PCI IO range4M non-cacheable
-
-0xe000_0xe003_ BCSR256K BCSR
-0xee00_0xefff_ NOR flash   32M NOR flash
-0xff00_0xff3f_ DPAA_QBMAN  4M
-0xff60_0xff7f_ CCSR2M non-cacheable
-0xffa0_0xffaf_ NAND FLASH  1M non-cacheable
-0xffd0_0xffd0_3fff L1 for stack16K Cacheable TLB0
-
-Flashing u-boot Images

-To program the image in the boot flash bank:
-NOR flash boot:
-   => tftp 100 u-boot.bin
-   => protect off all
-   => erase eff4 efff
-   => cp.b 100 eff4 c
-
-NAND flash boot:
-   => tftp 100 u-boot-nand.bin
-   => nand erase 0 8
-   => nand write 100 0 8
-
-Firmware ucode location
--
-Microcode(ucode) to FMAN's IRAM is needed to make FMAN Ethernet work.
-u-boot loads ucode FLASH. The location for ucode:
-NOR Flash: 0xfe00
-NAND Flash: 0x1f0
-
-Using the Device Tree Source File
--
-To create the DTB (Device Tree Binary) image file,
-use a command similar to this:
-
-   dtc -b 0 -f -I dts -O dtb p1023rds.dts > p1023rds.dtb
-
-Likely, that .dts file will come from here;
-
-   linux-2.6/arch/powerpc/boot/dts/p1023rds.dts
-or
-   make p1023rds.dtb ARCH=powerpc
-in linux-2.6 directory.
-
-Booting Linux
--
-Place a linux uImage in the TFTP disk area.
-
-   tftp 100 uImage
-   tftp 2

Re: [U-Boot] [PATCH v4 15/15] dm: Expand and improve the device lifecycle docs

2014-06-06 Thread Simon Glass
Hi Pawel,

On 6 June 2014 13:52, Pavel Herrmann  wrote:
> Hi,
>
> I found some typos in this

Thanks very much for that, will add these.

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


[U-Boot] [PATCH] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

2014-06-06 Thread Lijun Pan
lower_32_bits and upper_32_bits are very useful while programming.
Port these two functions here from Linux:include/linux/kernel.h,
also remove the definition in drivers/usb/host/xhci.h.
Later on, developers could include linux/compat.h if they want to
use these two functions.

Signed-off-by: Lijun Pan 
---
 drivers/usb/host/xhci.h |  4 +---
 include/linux/compat.h  | 17 +
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index ceb1573..6381596 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -20,9 +20,7 @@
 #include 
 #include 
 #include 
-
-#define upper_32_bits(n) (u32)((n) >> 32)
-#define lower_32_bits(n) (u32)(n)
+#include 
 
 #define MAX_EP_CTX_NUM 31
 #define XHCI_ALIGNMENT 64
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3fdfb39..bc51dd1 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -57,4 +57,21 @@
  , __FILE__, __LINE__); }
 
 #define PAGE_SIZE  4096
+
+/**
+ * upper_32_bits - return bits 32-63 of a number
+ * @n: the number we're accessing
+ *
+ * A basic shift-right of a 64- or 32-bit quantity.  Use this to suppress
+ * the "right shift count >= width of type" warning when that quantity is
+ * 32-bits.
+ */
+#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+
+/**
+ * lower_32_bits - return bits 0-31 of a number
+ * @n: the number we're accessing
+ */
+#define lower_32_bits(n) ((u32)(n))
+
 #endif
-- 
1.9.0

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


[U-Boot] [PATCH] linux/compat.h: port lower_32_bits and upper_32_bits from Linux

2014-06-06 Thread Lijun Pan
lower_32_bits and upper_32_bits are very useful while programming.
Port these two functions here from Linux:include/linux/kernel.h,
also remove the definition in drivers/usb/host/xhci.h.
Later on, developers could include linux/compat.h if they want to
use these two functions.

Signed-off-by: Lijun Pan 
---
 drivers/usb/host/xhci.h |  4 +---
 include/linux/compat.h  | 17 +
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index ceb1573..6381596 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -20,9 +20,7 @@
 #include 
 #include 
 #include 
-
-#define upper_32_bits(n) (u32)((n) >> 32)
-#define lower_32_bits(n) (u32)(n)
+#include 
 
 #define MAX_EP_CTX_NUM 31
 #define XHCI_ALIGNMENT 64
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 3fdfb39..bc51dd1 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -57,4 +57,21 @@
  , __FILE__, __LINE__); }
 
 #define PAGE_SIZE  4096
+
+/**
+ * upper_32_bits - return bits 32-63 of a number
+ * @n: the number we're accessing
+ *
+ * A basic shift-right of a 64- or 32-bit quantity.  Use this to suppress
+ * the "right shift count >= width of type" warning when that quantity is
+ * 32-bits.
+ */
+#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+
+/**
+ * lower_32_bits - return bits 0-31 of a number
+ * @n: the number we're accessing
+ */
+#define lower_32_bits(n) ((u32)(n))
+
 #endif
-- 
1.9.0

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


Re: [U-Boot] [PATCH v4 05/15] dm: Rename struct device_id to udevice_id

2014-06-06 Thread Simon Glass
Hi Jon,

On 6 June 2014 14:26, Jon Loeliger  wrote:
> Didn't this hit upstream master already?
> 54c5d08a09e631f88738db54c75395c6457c2157
>
> Or is this subsequent cleanup for straglers in this branch?
>
> Thanks,
> jdl

This is a subsequent clean-up, just to keep things consistent.

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


Re: [U-Boot] [U-boot] [Patch v2] mtd: nand: davinci: add header file for driver definitions

2014-06-06 Thread Tom Rini
On Thu, May 29, 2014 at 08:46:22PM +0300, Ivan Khoronzhuk wrote:

> The definitions inside emif_defs.h concern davinci nand driver and
> should be in it's header. So create header file for davinci nand
> driver and move definitions from emif_defs.h to it.
> 
> Acked-by: Vitaly Andrianov 
> Signed-off-by: Ivan Khoronzhuk 
> ---
>  arch/arm/cpu/armv7/keystone/aemif.c|  2 +-
>  arch/arm/include/asm/arch-keystone/emif_defs.h | 73 
> --
>  arch/arm/include/asm/arch-keystone/nand_defs.h | 23 
>  board/ti/k2hk_evm/board.c  |  1 -
>  drivers/mtd/nand/davinci_nand.c|  3 +-
>  drivers/mtd/nand/davinci_nand.h| 66 +++
>  6 files changed, 68 insertions(+), 100 deletions(-)
>  delete mode 100644 arch/arm/include/asm/arch-keystone/emif_defs.h
>  delete mode 100644 arch/arm/include/asm/arch-keystone/nand_defs.h
>  create mode 100644 drivers/mtd/nand/davinci_nand.h

This breaks building a bunch of davinci platforms.  Further, we should
put the new header file under arch/arm/include/asm/ti-common/ not
drivers/mtd/nand/.  Can you please update things and reconcile
arch/arm/include/asm/arch-davinci/emif_defs.h with these new changes?
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 v4 05/15] dm: Rename struct device_id to udevice_id

2014-06-06 Thread Jon Loeliger
Gah.  Sorry about that top-post.

I hate gmail's collapsed stupid-shit representation.

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


Re: [U-Boot] [PATCH v4 04/15] Makefile: Support include files for .dts files

2014-06-06 Thread Jon Loeliger
> diff --git a/arch/arm/dts/include/dt-bindings 
> b/arch/arm/dts/include/dt-bindings
> new file mode 12
> index 000..0cecb3d
> --- /dev/null
> +++ b/arch/arm/dts/include/dt-bindings
> @@ -0,0 +1 @@
> +../../../../include/dt-bindings
> \ No newline at end of file

Hmmm... is this right?

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


Re: [U-Boot] [PATCH v4 05/15] dm: Rename struct device_id to udevice_id

2014-06-06 Thread Jon Loeliger
Didn't this hit upstream master already?
54c5d08a09e631f88738db54c75395c6457c2157

Or is this subsequent cleanup for straglers in this branch?

Thanks,
jdl

On Fri, Jun 6, 2014 at 2:13 PM, Simon Glass  wrote:
> It is best to avoid having any occurence of 'struct device' in driver
> model, so rename to achieve this.
>
> - Add new patch to rename struct device_id to udevice_id
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  doc/driver-model/README.txt | 2 +-
>  drivers/core/lists.c| 2 +-
>  drivers/demo/demo-shape.c   | 2 +-
>  drivers/demo/demo-simple.c  | 2 +-
>  drivers/gpio/sandbox.c  | 2 +-
>  include/dm/device.h | 6 +++---
>  test/dm/test-fdt.c  | 2 +-
>  7 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
> index dcecb9a..4af89b0 100644
> --- a/doc/driver-model/README.txt
> +++ b/doc/driver-model/README.txt
> @@ -315,7 +315,7 @@ is little or no 'driver model' code to write.
>  - Moved some data from code into data structure - e.g. store a pointer to
>  the driver operations structure in the driver, rather than passing it
>  to the driver bind function.
> -- Rename some structures to make them more similar to Linux (struct device
> +- Rename some structures to make them more similar to Linux (struct udevice
>  instead of struct instance, struct platdata, etc.)
>  - Change the name 'core' to 'uclass', meaning U-Boot class. It seems that
>  this concept relates to a class of drivers (or a subsystem). We shouldn't
> diff --git a/drivers/core/lists.c b/drivers/core/lists.c
> index 205b140..9f2917f 100644
> --- a/drivers/core/lists.c
> +++ b/drivers/core/lists.c
> @@ -94,7 +94,7 @@ int lists_bind_drivers(struct udevice *parent)
>   * tree error
>   */
>  static int driver_check_compatible(const void *blob, int offset,
> -  const struct device_id *of_match)
> +  const struct udevice_id *of_match)
>  {
> int ret;
>
> diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
> index a68cc10..3fa9c59 100644
> --- a/drivers/demo/demo-shape.c
> +++ b/drivers/demo/demo-shape.c
> @@ -111,7 +111,7 @@ static int shape_ofdata_to_platdata(struct udevice *dev)
> return 0;
>  }
>
> -static const struct device_id demo_shape_id[] = {
> +static const struct udevice_id demo_shape_id[] = {
> { "demo-shape", 0 },
> { },
>  };
> diff --git a/drivers/demo/demo-simple.c b/drivers/demo/demo-simple.c
> index 11def86..2bcb7df 100644
> --- a/drivers/demo/demo-simple.c
> +++ b/drivers/demo/demo-simple.c
> @@ -32,7 +32,7 @@ static int demo_shape_ofdata_to_platdata(struct udevice 
> *dev)
> return demo_parse_dt(dev);
>  }
>
> -static const struct device_id demo_shape_id[] = {
> +static const struct udevice_id demo_shape_id[] = {
> { "demo-simple", 0 },
> { },
>  };
> diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
> index 09cebe2..75ada5d 100644
> --- a/drivers/gpio/sandbox.c
> +++ b/drivers/gpio/sandbox.c
> @@ -239,7 +239,7 @@ static int gpio_sandbox_probe(struct udevice *dev)
> return 0;
>  }
>
> -static const struct device_id sandbox_gpio_ids[] = {
> +static const struct udevice_id sandbox_gpio_ids[] = {
> { .compatible = "sandbox,gpio" },
> { }
>  };
> diff --git a/include/dm/device.h b/include/dm/device.h
> index ec04982..19f2039 100644
> --- a/include/dm/device.h
> +++ b/include/dm/device.h
> @@ -75,11 +75,11 @@ struct udevice {
>  #define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED)
>
>  /**
> - * struct device_id - Lists the compatible strings supported by a driver
> + * struct udevice_id - Lists the compatible strings supported by a driver
>   * @compatible: Compatible string
>   * @data: Data for this compatible string
>   */
> -struct device_id {
> +struct udevice_id {
> const char *compatible;
> ulong data;
>  };
> @@ -121,7 +121,7 @@ struct device_id {
>  struct driver {
> char *name;
> enum uclass_id id;
> -   const struct device_id *of_match;
> +   const struct udevice_id *of_match;
> int (*bind)(struct udevice *dev);
> int (*probe)(struct udevice *dev);
> int (*remove)(struct udevice *dev);
> diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
> index 6eccf11..98e3936 100644
> --- a/test/dm/test-fdt.c
> +++ b/test/dm/test-fdt.c
> @@ -53,7 +53,7 @@ static int testfdt_drv_probe(struct udevice *dev)
> return 0;
>  }
>
> -static const struct device_id testfdt_ids[] = {
> +static const struct udevice_id testfdt_ids[] = {
> {
> .compatible = "denx,u-boot-fdt-test",
> .data = DM_TEST_TYPE_FIRST },
> --
> 2.0.0.526.g5318336
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
_

Re: [U-Boot] [PATCH v4 15/15] dm: Expand and improve the device lifecycle docs

2014-06-06 Thread Pavel Herrmann
Hi,

I found some typos in this

On Friday 06 of June 2014 13:13:32 Simon Glass wrote:
> The lifecycle of a device is an important part of driver model. Add to the
> existing documentation and clarify it.

...snip...

> +This means that instead of having lots of U_BOOT_DEVICE() declarations in
> +the board file, we put these in the device tree. This approach allows a lot
> +more generality, since the same board file can support many types of
> boards +(e,g. with the same SoC) just by using different device trees. An
> added +benefit is that the Linux device tree can be used, thus further
> simplifying +the task of board-bring up either for U-Boot or Linux devs
> (whoever gets to +the baord first!).

s/baord/board/

...snip...

> +Note that compared to Linux, U-Boot's driver model has a separate step of
> +probe/remove which is independent of bind/unbind. This is partly because in
> +U-Boot it may be expensive to prove devices and we don't want to do it
> until +they are needed, or perhaps until after relocation.

s/prove/probe/

...snip...

> +   d. All parent devices are probed. It is not possible to activate a
> device +   unless its parents (all the way up to the root device) are
> activated. +   This means (for example) that an I2C driver will require
> that its bus +   be activated.
s/parents/predecessors/
in a tree, a node can have up to one parent. parent of a parent (recursively) 
is a predecessor.

...snip...

> +   e. The device is marked inactive. Note that it is still bound, so the
> +   device structure itself is not freed at this point. Should the device be
> +   activated again, then the cycle starts again at step 4 above.

if there were no drastic changes since I last checked, this would go to 
activation/probe(), which is described in step 2


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


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread York Sun
On 06/06/2014 10:32 AM, Mark Rutland wrote:
>>> How is TCR_EL2.SH0 (or TCR_EL1.SH*) configured?
>>>
>>> You'll only need to flush the cache if they're configured non shareable.
>>
>> It is configured as non shareable.
> 
> Is there any reason not to configure them as inner shareable? That way
> the MMU will look in the D-cache, and you won't have to spend time
> flushing them.
> 

Mark,

I appreciate the reminder. I tried on our emulator. With inner share set for TCR
SH0 bits, u-boot works with the flushing, but doesn't work without flushing. It
went to exception.

Can you share more information about the inner share? I need to follow up with
our designer to confirm.

York



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


Re: [U-Boot] [PATCH 2/4] Add ctrlc_ignore environment variable to ignore Ctrl-C

2014-06-06 Thread Simon Glass
Hi Wolfgang,

On 5 June 2014 15:43, Wolfgang Denk  wrote:
> Dear Simon Glass,
>
> In message <1401992872-31985-3-git-send-email-...@chromium.org> you wrote:
>> Sometimes it is useful to ignore Ctrl-C, because checking for it causes the
>> CLI to drop characters. In particular for tests involving sandbox, where
>> input commands are piped in, some commands will call ctrlc() which will
>> drop characters from the test script.
>
> Why would that be the case?
>
> If this happens, I consider it a bug that should be fixed, and not
> papered over.

If you look at the code for the 'md' command it calls ctrlc() every
now and then. Each call results in a getc() which reads a character
from the console. So we lose characters.

>
>> Add a CONFIG_SYS_CTRLC_IGNORE option which enables this variable. If the
>> variable is present (e.g. "setenv ctrlc_ignore ignore") then no checking
>> for Ctrl-C will be performed.
>
> I dislike this idea. It looks wrong to me.  Can we not fix the problem
> at the root cause?

I certainly thought about this. I even though maybe we might change
the serial module to scan ahead and buffer characters, in case there
is a Ctrl-C in the future. But that itself seems like something for
the future.

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


Re: [U-Boot] Unable to boot the new FIT image

2014-06-06 Thread Simon Glass
Hi Harsha,

On 3 June 2014 22:40, Harsha Kiran  wrote:
>
> Hi Simon,
>
> On Tue, Jun 3, 2014 at 9:58 PM, Simon Glass  wrote:
>>
>> Hi Harsha,
>>
>> On 3 June 2014 20:29, Harsha Kiran  wrote:
>> > Hi Simon,
>> >
>> > I was able to succesfully test the Secure u-boot on the beaglebone black
>> > from the u-boot-x86 Bone git.
>> > Thanks for all the help and it was a great beaglebone_vboot.txt file !
>>
>> Good!
>>
>> >
>> > I have some of minor things i would like to mention when i followed the
>> > procedure.
>> >
>> > 1) in the 7th step
>> >
>> > 7. Put U-Boot and the kernel onto the board
>> > ---
>> > The MLO information is missing..
>>
>> In my case I already had this on the card. Do you have instructions
>> for what you followed?
>
>
> Harsha: I have formated my SD card into 2 partitions(boot and rootfs). in my
> boot partition, i have MLO,u-boot.img,image.fit,uEnv.txt and in the other
> partition i have the root filesystem.

OK - in the instructions I talk about copying the Angstrom image to
the SD card and it has these. Do you think I should add instructions
on how to do this yourself from scratch, instead of using the image?

> Instructions: I just copied them directly
> harsha@harshakiran_kasha:/abb/Verified-uboot/u-boot-x86$ sudo cp MLO
> /media/harsha/boot/
> harsha@harshakiran_kasha:/abb/Verified-uboot/u-boot-x86$ sudo cp u-boot.img
> /media/harsha/boot/
> harsha@harshakiran_kasha:/abb/Verified-uboot/u-boot-x86/doc/uImage.FIT$ sudo
> cp image.fit /media/harsha/boot/
>
> i used fatload command. i have to modify my uEnv.txt to load it without
> stoping in u-boot prompt.
> U-Boot# fatload mmc 0 0x8200 image.fit
> reading image.fit
> 8580350 bytes read in 474 ms (17.3 MiB/s)
>
> U-Boot# bootm 0x8200
> ## Loading kernel from FIT Image at 8200 ...
>Using 'conf@1' configuration
>
>
>
>> >
>> >
>> > 2)
>> >
>> > I was not able to boot with kernel (image.lzo) in the FIT. it gave me
>> > the
>> > following error
>> > U-Boot# bootm 0x8200
>> >
>> > ## Loading kernel from FIT Image at 8200 ...
>> >Using 'conf@1' configuration
>> >Verifying Hash Integrity ... OK
>> >Trying 'kernel@1' kernel subimage
>> >  Description:  unavailable
>> >  Created:  2014-06-04   1:28:38 UTC
>> >  Type: Kernel Image
>> >  Compression:  lzo compressed
>> >  Data Start:   0x82a8
>> >  Data Size:8543704 Bytes = 8.1 MiB
>> >
>> >  Architecture: ARM
>> >  OS:   Linux
>> >  Load Address: 0x80008000
>> >  Entry Point:  0x80008000
>> >  Hash algo:sha1
>> >  Hash value:   9504d8fefcec81c054e2d0fb4e9d9b6bcfb9b4b7
>> >Verifying Hash Integrity ... sha1+ OK
>> >
>> > ## Loading fdt from FIT Image at 8200 ...
>> >Using 'conf@1' configuration
>> >Trying 'fdt@1' fdt subimage
>> >  Description:  beaglebone-black
>> >  Created:  2014-06-04   1:28:38 UTC
>> >
>> >  Type: Flat Device Tree
>> >  Compression:  uncompressed
>> >  Data Start:   0x82825f68
>> >  Data Size:34352 Bytes = 33.5 KiB
>> >
>> >  Architecture: ARM
>> >  Hash algo:sha1
>> >  Hash value:   4b14973cf0fe4a40dc420ed55d2441c6f51f586b
>> >Verifying Hash Integrity ... sha1+ OK
>> >Booting using the fdt blob at 0x82825f68
>> >Uncompressing Kernel Image ... LZO: uncompress or overwrite error -1
>> > -
>> > must RESET board to recover
>> > resetting ...
>> >
>> > U-Boot SPL 2014.07-rc2 (Jun 03 2014 - 20:09:15)
>> > reading u-boot.img
>> > reading u-boot.img
>> >
>> > But when i switch it back to the zImage it worked good. I will check
>> > again
>> > on this.
>>
>> It might be the maximum image size:
>>
>> #define CONFIG_SYS_BOOTM_LEN (16 << 20)
>>
>> Is it possible that your kernel is larger than 16MB? Or that you
>> forgot to compress it with lzop?
>>
>  Harsha: I am working on the TI SDK7 and took tisdk_am335x-evm_defconfig as
> my config file.  The default kernel compression mode is Gzip. My Image is 8
> MB and zImage is 4.1MB. Which compression mode is the best? I usually use
> the XZ mode as it gives me smallest binary (uImage 2.9 MB).

Yes XZ is good, but does U-Boot support it? It looks to be like you
didn't compress your kernel 'Image' file with lzop?
>
>
>
>>
>> Regards,
>> Simon
>
>
> I have modified my signed image.fit in a HEX editor and loaded the image and
> it fails to load with the correct error..
> 
>
> Entry Point:  0x80008000
>  Hash algo:sha1
>  Hash value:   3d72bc90b8afb5464cb03de2952d1bba90cd542e
>Verifying Hash Integrity ... sha1 error!
> Bad hash value for 'hash@1' hash node in 'kernel@1' image node
> Bad Data Hash
> ERROR: can't get kernel image!
> U-Boot#
> U-Boot SPL 2014.07-rc2 (Jun 03 2014 - 20:09:15)
>
> But, this time i did not sign my image.fit. i just converted my
> kernel_fdt.its to image.fit file (To test the unsigned images)
> harsha@harshakiran_kasha:/abb/Verified-uboot/u-boot-x86/doc/uImage.FIT$

[U-Boot] [PATCH v4 10/15] dm: Allow driver model tests only for sandbox

2014-06-06 Thread Simon Glass
The GPIO tests require the sandbox GPIO driver, so cannot be run on other
platforms. Similarly for the 'dm test' command.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to allow driver model tests only for sandbox

 test/dm/Makefile |  2 ++
 test/dm/cmd_dm.c | 11 +--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/test/dm/Makefile b/test/dm/Makefile
index 4e9afe6..c0f2135 100644
--- a/test/dm/Makefile
+++ b/test/dm/Makefile
@@ -15,4 +15,6 @@ obj-$(CONFIG_DM_TEST) += ut.o
 # subsystem you must add sandbox tests here.
 obj-$(CONFIG_DM_TEST) += core.o
 obj-$(CONFIG_DM_TEST) += ut.o
+ifneq ($(CONFIG_SANDBOX),)
 obj-$(CONFIG_DM_GPIO) += gpio.o
+endif
diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index 083f15c..180661b 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -93,16 +93,23 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, 
int argc,
return 0;
 }
 
+#ifdef CONFIG_DM_TEST
 static int do_dm_test(cmd_tbl_t *cmdtp, int flag, int argc,
  char * const argv[])
 {
return dm_test_main();
 }
+#define TEST_HELP "\ndm test Run tests"
+#else
+#define TEST_HELP
+#endif
 
 static cmd_tbl_t test_commands[] = {
U_BOOT_CMD_MKENT(tree, 0, 1, do_dm_dump_all, "", ""),
U_BOOT_CMD_MKENT(uclass, 1, 1, do_dm_dump_uclass, "", ""),
+#ifdef CONFIG_DM_TEST
U_BOOT_CMD_MKENT(test, 1, 1, do_dm_test, "", ""),
+#endif
 };
 
 static int do_dm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
@@ -128,6 +135,6 @@ U_BOOT_CMD(
dm, 2,  1,  do_dm,
"Driver model low level access",
"tree Dump driver model tree\n"
-   "dm uclassDump list of instances for each uclass\n"
-   "dm test Run tests"
+   "dm uclassDump list of instances for each uclass"
+   TEST_HELP
 );
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 13/15] tegra: Enable driver model

2014-06-06 Thread Simon Glass
Enable driver model for Tegra boards.


Signed-off-by: Simon Glass 
Acked-by: Stephen Warren 
---

Changes in v4: None
Changes in v3:
- Enable dm command in this patch instead of the next

Changes in v2:
- Split out a separate patch to enable driver model for tegra

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

diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 129acf2..3b88a83 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -19,6 +19,9 @@
 
 #include /* get chip and board defs */
 
+#define CONFIG_DM
+#define CONFIG_CMD_DM
+
 #define CONFIG_SYS_TIMER_RATE  100
 #define CONFIG_SYS_TIMER_COUNTER   NV_PA_TMRUS_BASE
 
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 12/15] tegra: dts: Bring in GPIO bindings from linux

2014-06-06 Thread Simon Glass
These files are taken from Linux 3.14.


Signed-off-by: Simon Glass 
Acked-by: Stephen Warren 
---

Changes in v4:
- Remove 64-bit addresses which are not used in U-Boot

Changes in v3:
- Bring in GPIO bindings for tegra{30,114,124} also

Changes in v2:
- Add new patch to bring in Tegra device tree files from linux

 arch/arm/dts/tegra114.dtsi | 21 +
 arch/arm/dts/tegra124.dtsi | 19 
 arch/arm/dts/tegra20.dtsi  | 15 ++-
 arch/arm/dts/tegra30.dtsi  | 21 +
 include/dt-bindings/gpio/gpio.h| 15 +++
 include/dt-bindings/gpio/tegra-gpio.h  | 51 ++
 include/dt-bindings/interrupt-controller/arm-gic.h | 22 ++
 include/dt-bindings/interrupt-controller/irq.h | 19 
 8 files changed, 155 insertions(+), 28 deletions(-)
 create mode 100644 include/dt-bindings/gpio/gpio.h
 create mode 100644 include/dt-bindings/gpio/tegra-gpio.h
 create mode 100644 include/dt-bindings/interrupt-controller/arm-gic.h
 create mode 100644 include/dt-bindings/interrupt-controller/irq.h

diff --git a/arch/arm/dts/tegra114.dtsi b/arch/arm/dts/tegra114.dtsi
index f52fcf1..59434e0 100644
--- a/arch/arm/dts/tegra114.dtsi
+++ b/arch/arm/dts/tegra114.dtsi
@@ -1,3 +1,6 @@
+#include 
+#include 
+
 #include "skeleton.dtsi"
 
 / {
@@ -46,17 +49,17 @@
  0 143 0x04>;
};
 
-   gpio: gpio {
+   gpio: gpio@6000d000 {
compatible = "nvidia,tegra114-gpio", "nvidia,tegra30-gpio";
reg = <0x6000d000 0x1000>;
-   interrupts = <0 32 0x04
- 0 33 0x04
- 0 34 0x04
- 0 35 0x04
- 0 55 0x04
- 0 87 0x04
- 0 89 0x04
- 0 125 0x04>;
+   interrupts = ,
+,
+,
+,
+,
+,
+,
+;
#gpio-cells = <2>;
gpio-controller;
#interrupt-cells = <2>;
diff --git a/arch/arm/dts/tegra124.dtsi b/arch/arm/dts/tegra124.dtsi
index 18a8b24..4561c5f 100644
--- a/arch/arm/dts/tegra124.dtsi
+++ b/arch/arm/dts/tegra124.dtsi
@@ -1,3 +1,6 @@
+#include 
+#include 
+
 #include "skeleton.dtsi"
 
 / {
@@ -49,14 +52,14 @@
gpio: gpio@6000d000 {
compatible = "nvidia,tegra124-gpio", "nvidia,tegra30-gpio";
reg = <0x6000d000 0x1000>;
-   interrupts = <0 32 0x04
- 0 33 0x04
- 0 34 0x04
- 0 35 0x04
- 0 55 0x04
- 0 87 0x04
- 0 89 0x04
- 0 125 0x04>;
+   interrupts = ,
+,
+,
+,
+,
+,
+,
+;
#gpio-cells = <2>;
gpio-controller;
#interrupt-cells = <2>;
diff --git a/arch/arm/dts/tegra20.dtsi b/arch/arm/dts/tegra20.dtsi
index 3805750..a524f6e 100644
--- a/arch/arm/dts/tegra20.dtsi
+++ b/arch/arm/dts/tegra20.dtsi
@@ -1,3 +1,6 @@
+#include 
+#include 
+
 #include "skeleton.dtsi"
 
 / {
@@ -139,10 +142,18 @@
 
gpio: gpio@6000d000 {
compatible = "nvidia,tegra20-gpio";
-   reg = < 0x6000d000 0x1000 >;
-   interrupts = < 64 65 66 67 87 119 121 >;
+   reg = <0x6000d000 0x1000>;
+   interrupts = ,
+,
+,
+,
+,
+,
+;
#gpio-cells = <2>;
gpio-controller;
+   #interrupt-cells = <2>;
+   interrupt-controller;
};
 
pinmux: pinmux@7000 {
diff --git a/arch/arm/dts/tegra30.dtsi b/arch/arm/dts/tegra30.dtsi
index fee1c36..7be3791 100644
--- a/arch/arm/dts/tegra30.dtsi
+++ b/arch/arm/dts/tegra30.dtsi
@@ -1,3 +1,6 @@
+#include 
+#include 
+
 #include "skeleton.dtsi"
 
 / {
@@ -47,17 +50,17 @@
clocks = <&tegra_car 34>;
};
 
-   gpio: gpio {
+   gpio: gpio@6000d000 {
compatible = "nvidia,tegra30-gpio";
reg = <0x6000d000 0x1000>;
-   interrupts = <0 32 0x04
- 0 33 0x04
- 0 34 0x04
- 0 35 0x04
- 0 55 0x04
- 0 87 0

[U-Boot] [PATCH v4 09/15] dm: Cast away the const-ness of the global_data pointer

2014-06-06 Thread Simon Glass
In a very few cases we need to adjust the driver model root device, such as
when setting it up at initialisation. Add a macro to make this easier.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3:
- Fix typo in commit subject

Changes in v2:
- Add new patch to deal with const-ness of the global_data pointer

 drivers/core/root.c  | 6 +++---
 drivers/core/uclass.c| 2 +-
 include/dm/device-internal.h | 4 
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/core/root.c b/drivers/core/root.c
index f31be72..70ea97f 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -43,9 +43,9 @@ int dm_init(void)
dm_warn("Virtual root driver already exists!\n");
return -EINVAL;
}
-   INIT_LIST_HEAD(&gd->uclass_root);
+   INIT_LIST_HEAD(&DM_UCLASS_ROOT());
 
-   ret = device_bind_by_name(NULL, &root_info, &gd->dm_root);
+   ret = device_bind_by_name(NULL, &root_info, &DM_ROOT());
if (ret)
return ret;
 
@@ -56,7 +56,7 @@ int dm_scan_platdata(void)
 {
int ret;
 
-   ret = lists_bind_drivers(gd->dm_root);
+   ret = lists_bind_drivers(DM_ROOT());
if (ret == -ENOENT) {
dm_warn("Some drivers were not found\n");
ret = 0;
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index f6867e4..d16d6fc 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -75,7 +75,7 @@ static int uclass_add(enum uclass_id id, struct uclass **ucp)
uc->uc_drv = uc_drv;
INIT_LIST_HEAD(&uc->sibling_node);
INIT_LIST_HEAD(&uc->dev_head);
-   list_add(&uc->sibling_node, &gd->uclass_root);
+   list_add(&uc->sibling_node, &DM_UCLASS_ROOT());
 
if (uc_drv->init) {
ret = uc_drv->init(uc);
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index ea3df36..67318fa 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -84,4 +84,8 @@ int device_remove(struct udevice *dev);
  */
 int device_unbind(struct udevice *dev);
 
+/* Cast away any volatile pointer */
+#define DM_ROOT()  (((gd_t *)gd)->dm_root)
+#define DM_UCLASS_ROOT()   (((gd_t *)gd)->uclass_root)
+
 #endif
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 06/15] dm: Update README to encourage conversion to driver model

2014-06-06 Thread Simon Glass
Add a note to encourage people to convert drivers to use driver model.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Update README to encourage conversion to driver model

 README | 5 +
 1 file changed, 5 insertions(+)

diff --git a/README b/README
index a53f69a..c7b911b 100644
--- a/README
+++ b/README
@@ -5310,6 +5310,11 @@ Information structure as we define in 
include/asm-/u-boot.h,
 and make sure that your definition of IMAP_ADDR uses the same value
 as your U-Boot configuration in CONFIG_SYS_IMMR.
 
+Note that U-Boot now has a driver model, a unified model for drivers.
+If you are adding a new driver, plumb it into driver model. If there
+is no uclass available, you are encouraged to create one. See
+doc/driver-model.
+
 
 Configuring the Linux kernel:
 -
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 15/15] dm: Expand and improve the device lifecycle docs

2014-06-06 Thread Simon Glass
The lifecycle of a device is an important part of driver model. Add to the
existing documentation and clarify it.

Reported-by: Jon Loeliger 

Signed-off-by: Simon Glass 
---
Thanks for Jon Loeliger  for helping with the text and
suggesting improvements.

(Jon please comment/adjust to help clarify things further)

Changes in v4:
- Minor spelling fixes

Changes in v3: None
Changes in v2:
- Rename struct device to struct udevice
- Adjust docs as per Jon's review

 doc/driver-model/README.txt | 215 ++--
 1 file changed, 208 insertions(+), 7 deletions(-)

diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index 4af89b0..884acef 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -222,7 +222,44 @@ device tree) and probe.
 Platform Data
 -
 
-Where does the platform data come from? See demo-pdata.c which
+Platform data is like Linux platform data, if you are familiar with that.
+It provides the board-specific information to start up a device.
+
+Why is this information not just stored in the device driver itself? The
+idea is that the device driver is generic, and can in principle operate on
+any board that has that type of device. For example, with modern
+highly-complex SoCs it is common for the IP to come from an IP vendor, and
+therefore (for example) the MMC controller may be the same on chips from
+different vendors. It makes no sense to write independent drivers for the
+MMC controller on each vendor's SoC, when they are all almost the same.
+Similarly, we may have 6 UARTs in an SoC, all of which are mostly the same,
+but lie at different addresses in the address space.
+
+Using the UART example, we have a single driver and it is instantiated 6
+times by supplying 6 lots of platform data. Each lot of platform data
+gives the driver name and a pointer to a structure containing information
+about this instance - e.g. the address of the register space. It may be that
+one of the UARTS supports RS-485 operation - this can be added as a flag in
+the platform data, which is set for this one port and clear for the rest.
+
+Think of your driver as a generic piece of code which knows how to talk to
+a device, but needs to know where it is, any variant/option information and
+so on. Platform data provides this link between the generic piece of code
+and the specific way it is bound on a particular board.
+
+Examples of platform data include:
+
+   - The base address of the IP block's register space
+   - Configuration options, like:
+ - the SPI polarity and maximum speed for a SPI controller
+ - the I2C speed to use for an I2C device
+ - the number of GPIOs available in a GPIO device
+
+Where does the platform data come from? It is either held in a structure
+which is compiled into U-Boot, or it can be parsed from the Device Tree
+(see 'Device Tree' below).
+
+For an example of how it can be compiled in, see demo-pdata.c which
 sets up a table of driver names and their associated platform data.
 The data can be interpreted by the drivers however they like - it is
 basically a communication scheme between the board-specific code and
@@ -259,21 +296,30 @@ following device tree fragment:
sides = <4>;
};
 
+This means that instead of having lots of U_BOOT_DEVICE() declarations in
+the board file, we put these in the device tree. This approach allows a lot
+more generality, since the same board file can support many types of boards
+(e,g. with the same SoC) just by using different device trees. An added
+benefit is that the Linux device tree can be used, thus further simplifying
+the task of board-bring up either for U-Boot or Linux devs (whoever gets to
+the baord first!).
 
 The easiest way to make this work it to add a few members to the driver:
 
.platdata_auto_alloc_size = sizeof(struct dm_test_pdata),
.ofdata_to_platdata = testfdt_ofdata_to_platdata,
-   .probe  = testfdt_drv_probe,
 
 The 'auto_alloc' feature allowed space for the platdata to be allocated
-and zeroed before the driver's ofdata_to_platdata method is called. This
-method reads the information out of the device tree and puts it in
-dev->platdata. Then the probe method is called to set up the device.
+and zeroed before the driver's ofdata_to_platdata() method is called. The
+ofdata_to_platdata() method, which the driver write supplies, should parse
+the device tree node for this device and place it in dev->platdata. Thus
+when the probe method is called later (to set up the device ready for use)
+the platform data will be present.
 
 Note that both methods are optional. If you provide an ofdata_to_platdata
-method then it wlil be called first (after bind). If you provide a probe
-method it will be called next.
+method then it wlil be called first (during activation). If you provide a
+probe method it will be called next. See Driver Lifecycle below for more
+details.
 
 If you don't want 

[U-Boot] [PATCH v4 11/15] dm: Fix printf() strings in the 'dm' command

2014-06-06 Thread Simon Glass
The values here are int, but the map_to_sysmem() call can return a long.
Add a cast to deal with this.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to fix printf() strings in the 'dm' command

 test/dm/cmd_dm.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index 180661b..8019407 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -23,7 +23,7 @@ static int display_succ(struct udevice *in, char *buf)
char local[16];
struct udevice *pos, *n, *prev = NULL;
 
-   printf("%s- %s @ %08x", buf, in->name, map_to_sysmem(in));
+   printf("%s- %s @ %08x", buf, in->name, (uint)map_to_sysmem(in));
if (in->flags & DM_FLAG_ACTIVATED)
puts(" - activated");
puts("\n");
@@ -62,7 +62,7 @@ static int do_dm_dump_all(cmd_tbl_t *cmdtp, int flag, int 
argc,
struct udevice *root;
 
root = dm_root();
-   printf("ROOT %08x\n", map_to_sysmem(root));
+   printf("ROOT %08x\n", (uint)map_to_sysmem(root));
return dm_dump(root);
 }
 
@@ -84,8 +84,8 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int 
argc,
for (ret = uclass_first_device(id, &dev);
 dev;
 ret = uclass_next_device(&dev)) {
-   printf("  %s @  %08x:\n", dev->name,
-  map_to_sysmem(dev));
+   printf("  %s @ %08x:\n", dev->name,
+  (uint)map_to_sysmem(dev));
}
puts("\n");
}
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 14/15] dm: Tidy up four minor code nits

2014-06-06 Thread Simon Glass
There is a spelling mistake and two functions are missing comments
altogether. Also the flags declaration is correct, but doesn't follow
style. Finally, the uclass_get_device() function has some errors in
its documentation.

Fix these problems.


Signed-off-by: Simon Glass 
Acked-by: Marek Vasut 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 include/dm/device.h |  2 +-
 include/dm/lists.h  | 20 
 include/dm/root.h   |  2 +-
 include/dm/uclass.h |  6 --
 4 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/include/dm/device.h b/include/dm/device.h
index 19f2039..ae75a3f 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -21,7 +21,7 @@ struct driver_info;
 #define DM_FLAG_ACTIVATED  (1 << 0)
 
 /* DM is responsible for allocating and freeing platdata */
-#define DM_FLAG_ALLOC_PDATA(2 << 0)
+#define DM_FLAG_ALLOC_PDATA(1 << 1)
 
 /**
  * struct udevice - An instance of a driver
diff --git a/include/dm/lists.h b/include/dm/lists.h
index 7feba4b..49d87e6 100644
--- a/include/dm/lists.h
+++ b/include/dm/lists.h
@@ -32,8 +32,28 @@ struct driver *lists_driver_lookup_name(const char *name);
  */
 struct uclass_driver *lists_uclass_lookup(enum uclass_id id);
 
+/**
+ * lists_bind_drivers() - search for and bind all drivers to parent
+ *
+ * This searches the U_BOOT_DEVICE() structures and creates new devices for
+ * each one. The devices will have @parent as their parent.
+ *
+ * @parent: parent driver (root)
+ * @early_only: If true, bind only drivers with the DM_INIT_F flag. If false
+ * bind all drivers.
+ */
 int lists_bind_drivers(struct udevice *parent);
 
+/**
+ * lists_bind_fdt() - bind a device tree node
+ *
+ * This creates a new device bound to the given device tree node, with
+ * @parent as its parent.
+ *
+ * @parent: parent driver (root)
+ * @blob: device tree blob
+ * @offset: offset of this device tree node
+ */
 int lists_bind_fdt(struct udevice *parent, const void *blob, int offset);
 
 #endif
diff --git a/include/dm/root.h b/include/dm/root.h
index 3018bc8..a4826a6 100644
--- a/include/dm/root.h
+++ b/include/dm/root.h
@@ -41,7 +41,7 @@ int dm_scan_platdata(void);
 int dm_scan_fdt(const void *blob);
 
 /**
- * dm_init() - Initialize Driver Model structures
+ * dm_init() - Initialise Driver Model structures
  *
  * This function will initialize roots of driver tree and class tree.
  * This needs to be called before anything uses the DM
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index 931d9c0..0df2e5e 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -96,12 +96,14 @@ int uclass_get(enum uclass_id key, struct uclass **ucp);
 /**
  * uclass_get_device() - Get a uclass device based on an ID and index
  *
+ * The device is probed to activate it ready for use.
+ *
  * id: ID to look up
  * @index: Device number within that uclass (0=first)
- * @ucp: Returns pointer to uclass (there is only one per for each ID)
+ * devp: Returns pointer to device (there is only one per for each ID)
  * @return 0 if OK, -ve on error
  */
-int uclass_get_device(enum uclass_id id, int index, struct udevice **ucp);
+int uclass_get_device(enum uclass_id id, int index, struct udevice **devp);
 
 /**
  * uclass_first_device() - Get the first device in a uclass
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 04/15] Makefile: Support include files for .dts files

2014-06-06 Thread Simon Glass
Linux supports this, and if we are to have compatible device tree files,
U-Boot should also.

Avoid giving the device tree files access to U-Boot's include/ directory.
Only include/dt-bindings is accessible.


Signed-off-by: Simon Glass 
Acked-by: Stephen Warren 
Reviewed-by: Masahiro Yamada 
---

Changes in v4: None
Changes in v3:
- Create a symlink for each arch to dt-bindings

Changes in v2:
- Add new patch to support include files for .dts files

 arch/arm/dts/include/dt-bindings| 1 +
 arch/microblaze/dts/include/dt-bindings | 1 +
 arch/sandbox/dts/include/dt-bindings| 1 +
 arch/x86/dts/include/dt-bindings| 1 +
 scripts/Makefile.lib| 1 +
 5 files changed, 5 insertions(+)
 create mode 12 arch/arm/dts/include/dt-bindings
 create mode 12 arch/microblaze/dts/include/dt-bindings
 create mode 12 arch/sandbox/dts/include/dt-bindings
 create mode 12 arch/x86/dts/include/dt-bindings

diff --git a/arch/arm/dts/include/dt-bindings b/arch/arm/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/arm/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/arch/microblaze/dts/include/dt-bindings 
b/arch/microblaze/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/microblaze/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/arch/sandbox/dts/include/dt-bindings 
b/arch/sandbox/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/sandbox/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/arch/x86/dts/include/dt-bindings b/arch/x86/dts/include/dt-bindings
new file mode 12
index 000..0cecb3d
--- /dev/null
+++ b/arch/x86/dts/include/dt-bindings
@@ -0,0 +1 @@
+../../../../include/dt-bindings
\ No newline at end of file
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index a04439d..722afed 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -153,6 +153,7 @@ ld_flags   = $(LDFLAGS) $(ldflags-y)
 # Modified for U-Boot
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc\
 -I$(srctree)/arch/$(ARCH)/dts   \
+-I$(srctree)/arch/$(ARCH)/dts/include   \
 -undef -D__DTS__
 
 # Finds the multi-part object the current object will be linked into
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 07/15] dm: Use case-insensitive comparison for GPIO banks

2014-06-06 Thread Simon Glass
We want 'N0' and 'n0' to mean the same thing, so ensure that case is not
considered when naming GPIO banks.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to use case-insensitive comparison for GPIO banks

 drivers/gpio/gpio-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-uclass.c b/drivers/gpio/gpio-uclass.c
index fa2c2fb..f1bbc58 100644
--- a/drivers/gpio/gpio-uclass.c
+++ b/drivers/gpio/gpio-uclass.c
@@ -58,7 +58,7 @@ int gpio_lookup_name(const char *name, struct udevice **devp,
uc_priv = dev->uclass_priv;
len = uc_priv->bank_name ? strlen(uc_priv->bank_name) : 0;
 
-   if (!strncmp(name, uc_priv->bank_name, len)) {
+   if (!strncasecmp(name, uc_priv->bank_name, len)) {
if (strict_strtoul(name + len, 10, &offset))
continue;
if (devp)
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 02/15] arm: Support iotrace feature

2014-06-06 Thread Simon Glass
Support the iotrace feature for ARM, when enabled.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Add a new patch to enable iotrace for arm

 arch/arm/include/asm/io.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 6a1f05a..9f35fd6 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -437,4 +437,7 @@ out:
 
 #endif /* __mem_isa */
 #endif /* __KERNEL__ */
+
+#include 
+
 #endif /* __ASM_ARM_IO_H */
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 01/15] Add an I/O tracing feature

2014-06-06 Thread Simon Glass
When debugging drivers it is useful to see what I/O accesses were done
and in what order.

Even if the individual accesses are of little interest it can be useful to
verify that the access pattern is consistent each time an operation is
performed. In this case a checksum can be used to characterise the operation
of a driver. The checksum can be compared across different runs of the
operation to verify that the driver is working properly.

In particular, when performing major refactoring of the driver, where the
access pattern should not change, the checksum provides assurance that the
refactoring work has not broken the driver.

Add an I/O tracing feature and associated commands to provide this facility.
It works by sneaking into the io.h heder for an architecture and redirecting
I/O accesses through its tracing mechanism.

For now no commands are provided to examine the trace buffer. The format is
fairly simple, so 'md' is a reasonable substitute.

Note: The checksum feature is only useful for I/O regions where the contents
do not change outside of software control. Where this is not suitable you can
fall back to manually comparing the addresses. It might be useful to enhance
tracing to only checksum the accesses and not the data read/written.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3:
- Remove use of bool in header file to avoid exynos5 build failure

Changes in v2:
- Add a new patch for an I/O tracing feature

 README   |  23 +++
 common/Makefile  |   2 +
 common/cmd_iotrace.c |  73 ++
 common/iotrace.c | 169 +++
 include/iotrace.h| 104 +++
 5 files changed, 371 insertions(+)
 create mode 100644 common/cmd_iotrace.c
 create mode 100644 common/iotrace.c
 create mode 100644 include/iotrace.h

diff --git a/README b/README
index 6edb2e7..a53f69a 100644
--- a/README
+++ b/README
@@ -1000,6 +1000,7 @@ The following options need to be configured:
CONFIG_CMD_IMLS   List all images found in NOR flash
CONFIG_CMD_IMLS_NAND* List all images found in NAND flash
CONFIG_CMD_IMMAP* IMMR dump support
+   CONFIG_CMD_IOTRACE  * I/O tracing for debugging
CONFIG_CMD_IMPORTENV* import an environment
CONFIG_CMD_INI  * import data from an ini file into the 
env
CONFIG_CMD_IRQ  * irqinfo
@@ -1171,6 +1172,28 @@ The following options need to be configured:
Note that if the GPIO device uses I2C, then the I2C interface
must also be configured. See I2C Support, below.
 
+- I/O tracing:
+   When CONFIG_IO_TRACE is selected, U-Boot intercepts all I/O
+   accesses and can checksum them or write a list of them out
+   to memory. See the 'iotrace' command for details. This is
+   useful for testing device drivers since it can confirm that
+   the driver behaves the same way before and after a code
+   change. Currently this is supported on sandbox and arm. To
+   add support for your architecture, add '#include '
+   to the bottom of arch//include/asm/io.h and test.
+
+   Example output from the 'iotrace stats' command is below.
+   Note that if the trace buffer is exhausted, the checksum will
+   still continue to operate.
+
+   iotrace is enabled
+   Start:  1000(buffer start address)
+   Size:   0001(buffer size)
+   Offset: 0120(current buffer offset)
+   Output: 1120(start + offset)
+   Count:  0018(number of trace records)
+   CRC32:  9526fb66(CRC32 of all trace records)
+
 - Timestamp Support:
 
When CONFIG_TIMESTAMP is selected, the timestamp
diff --git a/common/Makefile b/common/Makefile
index 391a8d6..7e192c7 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -114,6 +114,7 @@ obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o
 obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o
 obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o
 obj-$(CONFIG_CMD_I2C) += cmd_i2c.o
+obj-$(CONFIG_CMD_IOTRACE) += cmd_iotrace.o
 obj-$(CONFIG_CMD_HASH) += cmd_hash.o
 obj-$(CONFIG_CMD_IDE) += cmd_ide.o
 obj-$(CONFIG_CMD_IMMAP) += cmd_immap.o
@@ -261,6 +262,7 @@ obj-$(CONFIG_ANDROID_BOOT_IMAGE) += image-android.o
 obj-$(CONFIG_OF_LIBFDT) += image-fdt.o
 obj-$(CONFIG_FIT) += image-fit.o
 obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o
+obj-$(CONFIG_IO_TRACE) += iotrace.o
 obj-y += memsize.o
 obj-y += stdio.o
 
diff --git a/common/cmd_iotrace.c b/common/cmd_iotrace.c
new file mode 100644
index 000..f54276d
--- /dev/null
+++ b/common/cmd_iotrace.c
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2014 Google, Inc
+ *
+ * S

[U-Boot] [PATCH v4 03/15] sandbox: Support iotrace feature

2014-06-06 Thread Simon Glass
Support the iotrace feature for sandbox, and enable it, using some dummy
I/O access methods.

Signed-off-by: Simon Glass 
---

Changes in v4:
- Correct typo in CONFIG_CMD_IOTRACE

Changes in v3: None
Changes in v2:
- Add a new patch to enable iotrace for sandbox

 arch/sandbox/include/asm/io.h | 10 ++
 include/configs/sandbox.h |  3 +++
 2 files changed, 13 insertions(+)

diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 7956041..895fcb8 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -40,4 +40,14 @@ static inline void unmap_sysmem(const void *vaddr)
 /* Map from a pointer to our RAM buffer */
 phys_addr_t map_to_sysmem(const void *ptr);
 
+/* Define nops for sandbox I/O access */
+#define readb(addr) 0
+#define readw(addr) 0
+#define readl(addr) 0
+#define writeb(v, addr)
+#define writew(v, addr)
+#define writel(v, addr)
+
+#include 
+
 #endif
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index 6bb2546..fdc8b75 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -16,6 +16,9 @@
 
 #endif
 
+#define CONFIG_IO_TRACE
+#define CONFIG_CMD_IOTRACE
+
 #define CONFIG_SYS_TIMER_RATE  100
 
 #define CONFIG_BOOTSTAGE
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 05/15] dm: Rename struct device_id to udevice_id

2014-06-06 Thread Simon Glass
It is best to avoid having any occurence of 'struct device' in driver
model, so rename to achieve this.

- Add new patch to rename struct device_id to udevice_id

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 doc/driver-model/README.txt | 2 +-
 drivers/core/lists.c| 2 +-
 drivers/demo/demo-shape.c   | 2 +-
 drivers/demo/demo-simple.c  | 2 +-
 drivers/gpio/sandbox.c  | 2 +-
 include/dm/device.h | 6 +++---
 test/dm/test-fdt.c  | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index dcecb9a..4af89b0 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -315,7 +315,7 @@ is little or no 'driver model' code to write.
 - Moved some data from code into data structure - e.g. store a pointer to
 the driver operations structure in the driver, rather than passing it
 to the driver bind function.
-- Rename some structures to make them more similar to Linux (struct device
+- Rename some structures to make them more similar to Linux (struct udevice
 instead of struct instance, struct platdata, etc.)
 - Change the name 'core' to 'uclass', meaning U-Boot class. It seems that
 this concept relates to a class of drivers (or a subsystem). We shouldn't
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 205b140..9f2917f 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -94,7 +94,7 @@ int lists_bind_drivers(struct udevice *parent)
  * tree error
  */
 static int driver_check_compatible(const void *blob, int offset,
-  const struct device_id *of_match)
+  const struct udevice_id *of_match)
 {
int ret;
 
diff --git a/drivers/demo/demo-shape.c b/drivers/demo/demo-shape.c
index a68cc10..3fa9c59 100644
--- a/drivers/demo/demo-shape.c
+++ b/drivers/demo/demo-shape.c
@@ -111,7 +111,7 @@ static int shape_ofdata_to_platdata(struct udevice *dev)
return 0;
 }
 
-static const struct device_id demo_shape_id[] = {
+static const struct udevice_id demo_shape_id[] = {
{ "demo-shape", 0 },
{ },
 };
diff --git a/drivers/demo/demo-simple.c b/drivers/demo/demo-simple.c
index 11def86..2bcb7df 100644
--- a/drivers/demo/demo-simple.c
+++ b/drivers/demo/demo-simple.c
@@ -32,7 +32,7 @@ static int demo_shape_ofdata_to_platdata(struct udevice *dev)
return demo_parse_dt(dev);
 }
 
-static const struct device_id demo_shape_id[] = {
+static const struct udevice_id demo_shape_id[] = {
{ "demo-simple", 0 },
{ },
 };
diff --git a/drivers/gpio/sandbox.c b/drivers/gpio/sandbox.c
index 09cebe2..75ada5d 100644
--- a/drivers/gpio/sandbox.c
+++ b/drivers/gpio/sandbox.c
@@ -239,7 +239,7 @@ static int gpio_sandbox_probe(struct udevice *dev)
return 0;
 }
 
-static const struct device_id sandbox_gpio_ids[] = {
+static const struct udevice_id sandbox_gpio_ids[] = {
{ .compatible = "sandbox,gpio" },
{ }
 };
diff --git a/include/dm/device.h b/include/dm/device.h
index ec04982..19f2039 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -75,11 +75,11 @@ struct udevice {
 #define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED)
 
 /**
- * struct device_id - Lists the compatible strings supported by a driver
+ * struct udevice_id - Lists the compatible strings supported by a driver
  * @compatible: Compatible string
  * @data: Data for this compatible string
  */
-struct device_id {
+struct udevice_id {
const char *compatible;
ulong data;
 };
@@ -121,7 +121,7 @@ struct device_id {
 struct driver {
char *name;
enum uclass_id id;
-   const struct device_id *of_match;
+   const struct udevice_id *of_match;
int (*bind)(struct udevice *dev);
int (*probe)(struct udevice *dev);
int (*remove)(struct udevice *dev);
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 6eccf11..98e3936 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -53,7 +53,7 @@ static int testfdt_drv_probe(struct udevice *dev)
return 0;
 }
 
-static const struct device_id testfdt_ids[] = {
+static const struct udevice_id testfdt_ids[] = {
{
.compatible = "denx,u-boot-fdt-test",
.data = DM_TEST_TYPE_FIRST },
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 08/15] dm: Add missing header files in lists and root

2014-06-06 Thread Simon Glass
These files don't compile in some architectures. Fix it by adding the
missing headers.

Signed-off-by: Simon Glass 
---

Changes in v4: None
Changes in v3: None
Changes in v2:
- Add new patch to add missing header files in lists and root

 drivers/core/lists.c | 1 +
 drivers/core/root.c  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 9f2917f..afb59d1 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 struct driver *lists_driver_lookup_name(const char *name)
diff --git a/drivers/core/root.c b/drivers/core/root.c
index 4977875..f31be72 100644
--- a/drivers/core/root.c
+++ b/drivers/core/root.c
@@ -10,6 +10,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-- 
2.0.0.526.g5318336

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


[U-Boot] [PATCH v4 0/15] Collected driver model bug-fixes and docs

2014-06-06 Thread Simon Glass
This series collects some of the patches from the Tegra GPIO conversion
to driver model. That work is still in progress, but the bug fixes and
iotracing feature should go into this release I think. Also the
documentation improvements may as well follow since the existings docs
are proven inadequate.

Changes in v4:
- Correct typo in CONFIG_CMD_IOTRACE
- Remove 64-bit addresses which are not used in U-Boot
- Minor spelling fixes

Changes in v3:
- Remove use of bool in header file to avoid exynos5 build failure
- Create a symlink for each arch to dt-bindings
- Fix typo in commit subject
- Bring in GPIO bindings for tegra{30,114,124} also
- Enable dm command in this patch instead of the next

Changes in v2:
- Add a new patch for an I/O tracing feature
- Add a new patch to enable iotrace for arm
- Add a new patch to enable iotrace for sandbox
- Add new patch to support include files for .dts files
- Update README to encourage conversion to driver model
- Add new patch to use case-insensitive comparison for GPIO banks
- Add new patch to add missing header files in lists and root
- Add new patch to deal with const-ness of the global_data pointer
- Add new patch to allow driver model tests only for sandbox
- Add new patch to fix printf() strings in the 'dm' command
- Add new patch to bring in Tegra device tree files from linux
- Split out a separate patch to enable driver model for tegra
- Rename struct device to struct udevice
- Adjust docs as per Jon's review

Simon Glass (15):
  Add an I/O tracing feature
  arm: Support iotrace feature
  sandbox: Support iotrace feature
  Makefile: Support include files for .dts files
  dm: Rename struct device_id to udevice_id
  dm: Update README to encourage conversion to driver model
  dm: Use case-insensitive comparison for GPIO banks
  dm: Add missing header files in lists and root
  dm: Cast away the const-ness of the global_data pointer
  dm: Allow driver model tests only for sandbox
  dm: Fix printf() strings in the 'dm' command
  tegra: dts: Bring in GPIO bindings from linux
  tegra: Enable driver model
  dm: Tidy up four minor code nits
  dm: Expand and improve the device lifecycle docs

 README |  28 +++
 arch/arm/dts/include/dt-bindings   |   1 +
 arch/arm/dts/tegra114.dtsi |  21 +-
 arch/arm/dts/tegra124.dtsi |  19 +-
 arch/arm/dts/tegra20.dtsi  |  15 +-
 arch/arm/dts/tegra30.dtsi  |  21 +-
 arch/arm/include/asm/io.h  |   3 +
 arch/microblaze/dts/include/dt-bindings|   1 +
 arch/sandbox/dts/include/dt-bindings   |   1 +
 arch/sandbox/include/asm/io.h  |  10 +
 arch/x86/dts/include/dt-bindings   |   1 +
 common/Makefile|   2 +
 common/cmd_iotrace.c   |  73 +++
 common/iotrace.c   | 169 
 doc/driver-model/README.txt| 217 -
 drivers/core/lists.c   |   3 +-
 drivers/core/root.c|   7 +-
 drivers/core/uclass.c  |   2 +-
 drivers/demo/demo-shape.c  |   2 +-
 drivers/demo/demo-simple.c |   2 +-
 drivers/gpio/gpio-uclass.c |   2 +-
 drivers/gpio/sandbox.c |   2 +-
 include/configs/sandbox.h  |   3 +
 include/configs/tegra-common.h |   3 +
 include/dm/device-internal.h   |   4 +
 include/dm/device.h|   8 +-
 include/dm/lists.h |  20 ++
 include/dm/root.h  |   2 +-
 include/dm/uclass.h|   6 +-
 include/dt-bindings/gpio/gpio.h|  15 ++
 include/dt-bindings/gpio/tegra-gpio.h  |  51 +
 include/dt-bindings/interrupt-controller/arm-gic.h |  22 +++
 include/dt-bindings/interrupt-controller/irq.h |  19 ++
 include/iotrace.h  | 104 ++
 scripts/Makefile.lib   |   1 +
 test/dm/Makefile   |   2 +
 test/dm/cmd_dm.c   |  19 +-
 test/dm/test-fdt.c |   2 +-
 38 files changed, 824 insertions(+), 59 deletions(-)
 create mode 12 arch/arm/dts/include/dt-bindings
 create mode 12 arch/microblaze/dts/include/dt-bindings
 create mode 12 arch/sandbox/dts/include/dt-bindings
 create mode 12 arch/x86/dts/include/dt-bindings
 create mode 100644 common/cmd_iotrace.c
 create mode 100644 common/iotrace.c
 create mode 100644 include/dt-bindings/gpio/gpio.h
 create mode 100644 include/dt-bindings/gpio/tegra-gpio.h
 create mode

[U-Boot] [PATCH] omap3: overo: Select fdtfile for expansion board

2014-06-06 Thread Ash Charles
The u-boot Overo board actually supports both Overo (OMAP35xx)
and Overo Storm (AM/DM37xx) COMs with a range of different expansion
boards.  This provides a mechanism to select the an appropriate device
tree file based on the processor version and, if available, the
expansion board ID written on the expansion board EEPROM. To match the
3.15+ kernels, fdtfile names have this format:
 "omap3-overo[-storm]-.dtb"

By default, we use "omap3-overo-storm-tobi.dtb".

Signed-off-by: Ash Charles 

Conflicts:
include/configs/omap3_overo.h
---
 board/overo/overo.c   | 48 +++
 include/configs/omap3_overo.h |  2 +-
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/board/overo/overo.c b/board/overo/overo.c
index 62b50a8..6a0a655 100644
--- a/board/overo/overo.c
+++ b/board/overo/overo.c
@@ -230,6 +230,52 @@ unsigned int get_expansion_id(void)
return expansion_config.device_vendor;
 }
 
+#ifdef CONFIG_OF_LIBFDT
+void set_fdt(void)
+{
+   int is_storm = 0;
+   char fdtname[64];
+   char expansion_name[32];
+
+if (get_cpu_family() != CPU_OMAP34XX)
+   is_storm = 1;
+
+switch (expansion_config.device_vendor) {
+case GUMSTIX_SUMMIT:
+   snprintf(expansion_name, ARRAY_SIZE(expansion_name), "%s",
+   "summit");
+   break;
+   case GUMSTIX_CHESTNUT43:
+   snprintf(expansion_name, ARRAY_SIZE(expansion_name), "%s",
+   "chestnut43");
+   break;
+   case GUMSTIX_PALO43:
+   snprintf(expansion_name, ARRAY_SIZE(expansion_name), "%s",
+   "palo43");
+   break;
+   case GUMSTIX_GALLOP43:
+   snprintf(expansion_name, ARRAY_SIZE(expansion_name), "%s",
+   "gallop43");
+   break;
+   case GUMSTIX_ALTO35:
+   snprintf(expansion_name, ARRAY_SIZE(expansion_name), "%s",
+   "alto35");
+   break;
+   case GUMSTIX_TOBI:
+   case GUMSTIX_NO_EEPROM:
+   default:
+   snprintf(expansion_name, ARRAY_SIZE(expansion_name), "%s",
+   "tobi");
+   }
+
+snprintf(fdtname, ARRAY_SIZE(fdtname),  "omap3-overo%s-%s.dtb",
+ is_storm ? "-storm" : "", expansion_name);
+setenv("fdtfile", fdtname);
+}
+#else
+void set_fdt(void) { return; }
+#endif
+
 /*
  * Routine: misc_init_r
  * Description: Configure board specific parts
@@ -360,6 +406,8 @@ int misc_init_r(void)
 
dieid_num_r();
 
+   set_fdt();
+
return 0;
 }
 
diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
index 7b97be9..f79a528 100644
--- a/include/configs/omap3_overo.h
+++ b/include/configs/omap3_overo.h
@@ -83,7 +83,7 @@
 /* Environment information */
 #define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
-   "fdtfile=overo.dtb\0" \
+   "fdtfile=omap3-overo-storm-tobi.dtb\0" \
"bootdir=/boot\0" \
"bootfile=zImage\0" \
"usbtty=cdc_acm\0" \
-- 
1.8.3.2

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


[U-Boot] [PATCH] omap4: duovero: Correct name of default device tree

2014-06-06 Thread Ash Charles
Signed-off-by: Ash Charles 
---
 include/configs/ti_omap4_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/ti_omap4_common.h 
b/include/configs/ti_omap4_common.h
index 44b3718..30b02f6 100644
--- a/include/configs/ti_omap4_common.h
+++ b/include/configs/ti_omap4_common.h
@@ -126,7 +126,7 @@
"if test $board_name = panda-es; then " \
"setenv fdtfile omap4-panda-es.dtb; fi;" \
"if test $board_name = duovero; then " \
-   "setenv fdtfile omap4-duovero.dtb; fi;" \
+   "setenv fdtfile omap4-duovero-parlor.dtb; fi;" \
"if test $fdtfile = undefined; then " \
"echo WARNING: Could not determine device tree to use; 
fi; \0" \
"loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \
-- 
1.8.3.2

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


[U-Boot] [PATCH] omap: Don't enable GPMC CS0 with nothing attached

2014-06-06 Thread Ash Charles
If CONFIG_(NAND|NOR|ONENAND) is not defined, no configuration is set
for GPMC on chip select #0---size is 0.  In this case, the GPMC
configuration should be reset but not enabled.  Enabling causes the
Gumstix DuoVero board to hang when entering Linux.

Signed-off-by: Ash Charles 
---
 arch/arm/cpu/armv7/omap-common/mem-common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/omap-common/mem-common.c 
b/arch/arm/cpu/armv7/omap-common/mem-common.c
index 944ef84..f3aa268 100644
--- a/arch/arm/cpu/armv7/omap-common/mem-common.c
+++ b/arch/arm/cpu/armv7/omap-common/mem-common.c
@@ -133,5 +133,6 @@ void gpmc_init(void)
writel(0, &gpmc_cfg->cs[0].config7);
sdelay(1000);
/* enable chip-select specific configurations */
-   enable_gpmc_cs_config(gpmc_regs, &gpmc_cfg->cs[0], base, size);
+   if (size != 0)
+   enable_gpmc_cs_config(gpmc_regs, &gpmc_cfg->cs[0], base, size);
 }
-- 
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 v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread York Sun
On 06/06/2014 10:32 AM, Mark Rutland wrote:
> On Fri, Jun 06, 2014 at 03:54:49PM +0100, York Sun wrote:
>> On 06/06/2014 05:33 AM, Mark Rutland wrote:
>>> [...]
>>>
>>> What you need to do to replace the active set of tables (assuming that
>>> the new mapping has the instruction stream mapped in an identical way)
>>> is:
>>>
>>> - Write the tables.
>>>
>>> - DSB to make them visible to the MMU.
>>>
>>> - Write to the appropriate TTBR_*.
>>>
>>> - ISB to complete the write to the TTBR_*.
>>>
>>> - TLBI to invalidate the old mappings the the TLBs.
>>>
>>> - DSB to complete the TLBI.
>>>
>>> - If you've changed the instruction stream or system state that will
>>>   affect the instruction stream, ISB to flush the CPU pipeline.
>>>
>>>
>> Here is the flow I have (as of v5 patch)
>>
>> Write the tables
>>
>> (I removed dsb here in v5, need to add back)
>>
>> Write TTBR
>>
>> (I missed isb here, need to add)
>>
>> Flush dcache (otherwise the table will not be in DDR. Yes, I verified)
>
> This looks odd -- why do we need the tables to be in DDR? Why would we
> flush them here, when the address is partially visible to the MMU?

 This sounds odd but it actually makes sense. Let's say we have new tables
 created by u-boot. The new tables are in the address of DDR with D-cache
 enabled. If we don't flush the cache, the moment TLBs are invalidated, MMU 
 will
 fetch the tables from TTBR which points to DDR. Without a valid TLB, MMU 
 cannot
 get the table from D-cache, it has to fetch from the DDR directly. I have
 verified this by checking waveforms of the SoC and exercised code in both 
 ways.
>>>
>>> How is TCR_EL2.SH0 (or TCR_EL1.SH*) configured?
>>>
>>> You'll only need to flush the cache if they're configured non shareable.
>>
>> It is configured as non shareable.
> 
> Is there any reason not to configure them as inner shareable? That way
> the MMU will look in the D-cache, and you won't have to spend time
> flushing them.
> 

You may be right. I need to test it. It will take me a little while. In the
meantime, would you comment on v6 patches please? If flushing is the only
question left, I can address it after testing.

York

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


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread Mark Rutland
On Fri, Jun 06, 2014 at 03:54:49PM +0100, York Sun wrote:
> On 06/06/2014 05:33 AM, Mark Rutland wrote:
> > [...]
> > 
> > What you need to do to replace the active set of tables (assuming that
> > the new mapping has the instruction stream mapped in an identical way)
> > is:
> >
> > - Write the tables.
> >
> > - DSB to make them visible to the MMU.
> >
> > - Write to the appropriate TTBR_*.
> >
> > - ISB to complete the write to the TTBR_*.
> >
> > - TLBI to invalidate the old mappings the the TLBs.
> >
> > - DSB to complete the TLBI.
> >
> > - If you've changed the instruction stream or system state that will
> >   affect the instruction stream, ISB to flush the CPU pipeline.
> >
> >
>  Here is the flow I have (as of v5 patch)
> 
>  Write the tables
> 
>  (I removed dsb here in v5, need to add back)
> 
>  Write TTBR
> 
>  (I missed isb here, need to add)
> 
>  Flush dcache (otherwise the table will not be in DDR. Yes, I verified)
> >>>
> >>> This looks odd -- why do we need the tables to be in DDR? Why would we
> >>> flush them here, when the address is partially visible to the MMU?
> >>
> >> This sounds odd but it actually makes sense. Let's say we have new tables
> >> created by u-boot. The new tables are in the address of DDR with D-cache
> >> enabled. If we don't flush the cache, the moment TLBs are invalidated, MMU 
> >> will
> >> fetch the tables from TTBR which points to DDR. Without a valid TLB, MMU 
> >> cannot
> >> get the table from D-cache, it has to fetch from the DDR directly. I have
> >> verified this by checking waveforms of the SoC and exercised code in both 
> >> ways.
> > 
> > How is TCR_EL2.SH0 (or TCR_EL1.SH*) configured?
> > 
> > You'll only need to flush the cache if they're configured non shareable.
> 
> It is configured as non shareable.

Is there any reason not to configure them as inner shareable? That way
the MMU will look in the D-cache, and you won't have to spend time
flushing them.

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


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread Tom Rini
On Fri, Jun 06, 2014 at 07:52:44AM -0700, York Sun wrote:
> On 06/06/2014 06:34 AM, Rob Herring wrote:
> > On Thu, Jun 5, 2014 at 1:34 PM, York Sun  wrote:
> >> On 06/05/2014 10:41 AM, Mark Rutland wrote:
> >>> On Thu, Jun 05, 2014 at 04:07:17PM +0100, York Sun wrote:
>  On 06/05/2014 03:09 AM, Mark Rutland wrote:
> > 
> > [...]
> > 
>  No objection here on the idea. But again this is not the case. My first 
>  MMU
>  table is in SRAM, which is small and will be used for other purpose. The 
>  2nd MMU
>  table is in DDR. I could copy the table and do the maintenance as you 
>  said. For
>  now, I want to stick with the static table and only create the API when 
>  I have to.
> >>>
> >>> Sure, if your tables are in SRAM then trying to do a load of dynamic
> >>> allocation isn't going to work.
> > 
> > Why do you need to turn on the MMU early using SRAM in the first
> > place? Can't you delay that until after DDR setup?
> 
> Logically yes. But it runs too slow without cache on emulator.
> 
> > 
> >>> My fear is that while that sounds OK with a single user to do a quick
> >>> havk and poke the tables directly, we'll end up with everyone doing
> >>> that, and no-one will try to unify things. It is very diffifcult to
> >>> unify such variation after the fact.
> >>
> >> That's a good reason. Let me start to code the API. It will take a while to
> >> cover the complexity of the multilevel tables and sizes. It will be a 
> >> separated
> >> patch for later review. I don't want that to delay this patch set. I am 
> >> hoping
> >> to get this set in for 2014.07 release.
> > 
> > If I was maintainer I would say no because few people come back later
> > to clean-up their mess. If you want to get platform support in now,
> > perhaps you should just add the base platform first and add mmu setup
> > later. Surely you don't need the MMU to just boot to u-boot shell.
> > 
> 
> My plan is to get the first platform in, then I will maintain
> Freescale stuff.  So you can be sure I will continue to improve it.
> One reason to get these code in early is to enable our partners and
> early adopters to use u-boot. After all, this is the second ARMv8
> platform. The first one vexpress_aemv8a doesn't even support cache.

For the record, I'm OK with this plan given York's track record in the
U-Boot community.

-- 
Tom


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


[U-Boot] pull request for u-boot-tegra/master into ARM/master

2014-06-06 Thread Tom Warren
Albert,

Please pull u-boot-tegra/master into ARM/master. Thanks!

./MAKEALL -s tegra AOK, checkpatch.pl is OK, and ./MAKEALL -a arm only
shows failures that were already present in ARM/master.

The following changes since commit cc49da249cf2f380d2fed5571fad65ce6494fc95:

  Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master' (2014-06-02
08:43:48 +0200)

are available in the git repository at:

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

for you to fetch changes up to e6607cffef965011ef0ddc0fbe6f4b7c0d53aeec:

  ARM: tegra: enable USB device mode and UMS on some boards (2014-06-05
11:25:54 -0700)


Stephen Warren (1):
  ARM: tegra: enable USB device mode and UMS on some boards

 arch/arm/dts/tegra124-jetson-tk1.dts |  9 -
 arch/arm/dts/tegra124-venice2.dts|  9 -
 arch/arm/dts/tegra30-beaver.dts  |  9 -
 include/configs/beaver.h |  2 ++
 include/configs/jetson-tk1.h |  2 ++
 include/configs/tegra-common-ums.h   | 26 ++
 include/configs/venice2.h|  2 ++
 7 files changed, 56 insertions(+), 3 deletions(-)
 create mode 100644 include/configs/tegra-common-ums.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread York Sun
On 06/06/2014 05:33 AM, Mark Rutland wrote:
> [...]
> 
> What you need to do to replace the active set of tables (assuming that
> the new mapping has the instruction stream mapped in an identical way)
> is:
>
> - Write the tables.
>
> - DSB to make them visible to the MMU.
>
> - Write to the appropriate TTBR_*.
>
> - ISB to complete the write to the TTBR_*.
>
> - TLBI to invalidate the old mappings the the TLBs.
>
> - DSB to complete the TLBI.
>
> - If you've changed the instruction stream or system state that will
>   affect the instruction stream, ISB to flush the CPU pipeline.
>
>
 Here is the flow I have (as of v5 patch)

 Write the tables

 (I removed dsb here in v5, need to add back)

 Write TTBR

 (I missed isb here, need to add)

 Flush dcache (otherwise the table will not be in DDR. Yes, I verified)
>>>
>>> This looks odd -- why do we need the tables to be in DDR? Why would we
>>> flush them here, when the address is partially visible to the MMU?
>>
>> This sounds odd but it actually makes sense. Let's say we have new tables
>> created by u-boot. The new tables are in the address of DDR with D-cache
>> enabled. If we don't flush the cache, the moment TLBs are invalidated, MMU 
>> will
>> fetch the tables from TTBR which points to DDR. Without a valid TLB, MMU 
>> cannot
>> get the table from D-cache, it has to fetch from the DDR directly. I have
>> verified this by checking waveforms of the SoC and exercised code in both 
>> ways.
> 
> How is TCR_EL2.SH0 (or TCR_EL1.SH*) configured?
> 
> You'll only need to flush the cache if they're configured non shareable.

It is configured as non shareable.

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


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread York Sun
On 06/06/2014 06:34 AM, Rob Herring wrote:
> On Thu, Jun 5, 2014 at 1:34 PM, York Sun  wrote:
>> On 06/05/2014 10:41 AM, Mark Rutland wrote:
>>> On Thu, Jun 05, 2014 at 04:07:17PM +0100, York Sun wrote:
 On 06/05/2014 03:09 AM, Mark Rutland wrote:
> 
> [...]
> 
 No objection here on the idea. But again this is not the case. My first MMU
 table is in SRAM, which is small and will be used for other purpose. The 
 2nd MMU
 table is in DDR. I could copy the table and do the maintenance as you 
 said. For
 now, I want to stick with the static table and only create the API when I 
 have to.
>>>
>>> Sure, if your tables are in SRAM then trying to do a load of dynamic
>>> allocation isn't going to work.
> 
> Why do you need to turn on the MMU early using SRAM in the first
> place? Can't you delay that until after DDR setup?

Logically yes. But it runs too slow without cache on emulator.

> 
>>> My fear is that while that sounds OK with a single user to do a quick
>>> havk and poke the tables directly, we'll end up with everyone doing
>>> that, and no-one will try to unify things. It is very diffifcult to
>>> unify such variation after the fact.
>>
>> That's a good reason. Let me start to code the API. It will take a while to
>> cover the complexity of the multilevel tables and sizes. It will be a 
>> separated
>> patch for later review. I don't want that to delay this patch set. I am 
>> hoping
>> to get this set in for 2014.07 release.
> 
> If I was maintainer I would say no because few people come back later
> to clean-up their mess. If you want to get platform support in now,
> perhaps you should just add the base platform first and add mmu setup
> later. Surely you don't need the MMU to just boot to u-boot shell.
> 

My plan is to get the first platform in, then I will maintain Freescale stuff.
So you can be sure I will continue to improve it. One reason to get these code
in early is to enable our partners and early adopters to use u-boot. After all,
this is the second ARMv8 platform. The first one vexpress_aemv8a doesn't even
support cache.

York


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


Re: [U-Boot] [PATCH 1/3] net: sh-eth: Add support R7S72100 of rmobile

2014-06-06 Thread Tom Rini
On Fri, Jun 06, 2014 at 11:44:20AM +0900, Nobuhiro Iwamatsu wrote:

> ping.
> 
> 2014-01-23 7:52 GMT+09:00 Nobuhiro Iwamatsu 
> :
> > The R7S72100 of ARM SoC that Renesas manufactured has one Ether port.
> > This has the same IP SH-Ether. This patch adds support of the R7S72100
> > in SH-Ether.
> >
> > Signed-off-by: Nobuhiro Iwamatsu 

I'm fine with this series coming via the sh tree.

-- 
Tom


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


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread Rob Herring
On Thu, Jun 5, 2014 at 1:34 PM, York Sun  wrote:
> On 06/05/2014 10:41 AM, Mark Rutland wrote:
>> On Thu, Jun 05, 2014 at 04:07:17PM +0100, York Sun wrote:
>>> On 06/05/2014 03:09 AM, Mark Rutland wrote:

[...]

>>> No objection here on the idea. But again this is not the case. My first MMU
>>> table is in SRAM, which is small and will be used for other purpose. The 
>>> 2nd MMU
>>> table is in DDR. I could copy the table and do the maintenance as you said. 
>>> For
>>> now, I want to stick with the static table and only create the API when I 
>>> have to.
>>
>> Sure, if your tables are in SRAM then trying to do a load of dynamic
>> allocation isn't going to work.

Why do you need to turn on the MMU early using SRAM in the first
place? Can't you delay that until after DDR setup?

>> My fear is that while that sounds OK with a single user to do a quick
>> havk and poke the tables directly, we'll end up with everyone doing
>> that, and no-one will try to unify things. It is very diffifcult to
>> unify such variation after the fact.
>
> That's a good reason. Let me start to code the API. It will take a while to
> cover the complexity of the multilevel tables and sizes. It will be a 
> separated
> patch for later review. I don't want that to delay this patch set. I am hoping
> to get this set in for 2014.07 release.

If I was maintainer I would say no because few people come back later
to clean-up their mess. If you want to get platform support in now,
perhaps you should just add the base platform first and add mmu setup
later. Surely you don't need the MMU to just boot to u-boot shell.

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


Re: [U-Boot] [RFC PATCH] IMX: Rename IMX image "SPL" to something else for Cygwin

2014-06-06 Thread Stefano Babic
Hi Masahiro,

On 06/06/2014 14:31, Masahiro Yamada wrote:
> I am not sure how much effort we should make
> for building U-Boot on Cygwin.
> 
> Anyway, other than host programs, I notice file name problem.
> 
> Unlike Unix or Linux, on Windows upper/lower cases for file names
> are not distinguished.
> 
> On Cygwin, for example, we cannot do this:
> 
>   $ mkdir abc
>   $ mkdir ABC
>   mkdir: cannot create directory `ABC': File exists
> 

Right, this is a well know issue.

> It causes some problems in U-Boot too.
> 
> For example,
> 
>   $ make mrproper
> CLEAN   SPL
>   rm: cannot remove `SPL': Is a directory
>   Makefile:1278: recipe for target 'clobber' failed
>   make: *** [clobber] Error 1
> 
>   $ make qong_config
>   Configuring for qong board...
> 
>   $ make clean
> CLEAN   arch/arm/imx-common
>   rm: cannot remove `arch/arm/imx-common/../../../SPL': Is a directory
>   scripts/Makefile.clean:79: recipe for target '__clean' failed
>   make[1]: *** [__clean] Error 1
>   Makefile:1256: recipe for target '_clean_arch/arm/imx-common' failed
>   make: *** [_clean_arch/arm/imx-common] Error 2
> 
> I notice at least one file name conflict at the top directory.
> 
>   SPL - image for IMX
>   spl - directory where SPL is built
> 
> This commit renames the former to a temporary name.
> 
> I guess there is few developers testing U-Boot on Cygwin.
> If Cygwin support is mandatory, please consider to rename IMX image.

IMHO we have to consider if there will be a high request to build on
Cygwin and I prefer to defer this issue. Some developers working before
on Cygwin are used to set up a VM on their OS nowadays, reducing the
number of people who need a Cygwin environment.

Regards,
Stefano

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


Re: [U-Boot] [Patch v4 2/5] ARMv8: Adjust MMU setup

2014-06-06 Thread Mark Rutland
[...]

> >>> What you need to do to replace the active set of tables (assuming that
> >>> the new mapping has the instruction stream mapped in an identical way)
> >>> is:
> >>>
> >>> - Write the tables.
> >>>
> >>> - DSB to make them visible to the MMU.
> >>>
> >>> - Write to the appropriate TTBR_*.
> >>>
> >>> - ISB to complete the write to the TTBR_*.
> >>>
> >>> - TLBI to invalidate the old mappings the the TLBs.
> >>>
> >>> - DSB to complete the TLBI.
> >>>
> >>> - If you've changed the instruction stream or system state that will
> >>>   affect the instruction stream, ISB to flush the CPU pipeline.
> >>>
> >>>
> >> Here is the flow I have (as of v5 patch)
> >>
> >> Write the tables
> >>
> >> (I removed dsb here in v5, need to add back)
> >>
> >> Write TTBR
> >>
> >> (I missed isb here, need to add)
> >>
> >> Flush dcache (otherwise the table will not be in DDR. Yes, I verified)
> >
> > This looks odd -- why do we need the tables to be in DDR? Why would we
> > flush them here, when the address is partially visible to the MMU?
> 
> This sounds odd but it actually makes sense. Let's say we have new tables
> created by u-boot. The new tables are in the address of DDR with D-cache
> enabled. If we don't flush the cache, the moment TLBs are invalidated, MMU 
> will
> fetch the tables from TTBR which points to DDR. Without a valid TLB, MMU 
> cannot
> get the table from D-cache, it has to fetch from the DDR directly. I have
> verified this by checking waveforms of the SoC and exercised code in both 
> ways.

How is TCR_EL2.SH0 (or TCR_EL1.SH*) configured?

You'll only need to flush the cache if they're configured non shareable.

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


[U-Boot] [RFC PATCH] IMX: Rename IMX image "SPL" to something else for Cygwin

2014-06-06 Thread Masahiro Yamada
I am not sure how much effort we should make
for building U-Boot on Cygwin.

Anyway, other than host programs, I notice file name problem.

Unlike Unix or Linux, on Windows upper/lower cases for file names
are not distinguished.

On Cygwin, for example, we cannot do this:

  $ mkdir abc
  $ mkdir ABC
  mkdir: cannot create directory `ABC': File exists

It causes some problems in U-Boot too.

For example,

  $ make mrproper
CLEAN   SPL
  rm: cannot remove `SPL': Is a directory
  Makefile:1278: recipe for target 'clobber' failed
  make: *** [clobber] Error 1

  $ make qong_config
  Configuring for qong board...

  $ make clean
CLEAN   arch/arm/imx-common
  rm: cannot remove `arch/arm/imx-common/../../../SPL': Is a directory
  scripts/Makefile.clean:79: recipe for target '__clean' failed
  make[1]: *** [__clean] Error 1
  Makefile:1256: recipe for target '_clean_arch/arm/imx-common' failed
  make: *** [_clean_arch/arm/imx-common] Error 2

I notice at least one file name conflict at the top directory.

  SPL - image for IMX
  spl - directory where SPL is built

This commit renames the former to a temporary name.

I guess there is few developers testing U-Boot on Cygwin.
If Cygwin support is mandatory, please consider to rename IMX image.

Signed-off-by: Masahiro Yamada 
---

 .gitignore   | 2 +-
 Makefile | 6 +++---
 arch/arm/config.mk   | 2 +-
 arch/arm/imx-common/Makefile | 8 
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4e4fd00..b68e4f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,7 +31,7 @@
 # Top-level generic files
 #
 /MLO*
-/SPL
+/SPL__PLEASE_RENAME
 /System.map
 /u-boot*
 
diff --git a/Makefile b/Makefile
index aebee55..a6fe5d8 100644
--- a/Makefile
+++ b/Makefile
@@ -866,10 +866,10 @@ OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \
 tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE
$(call if_changed,pad_cat)
 
-SPL: spl/u-boot-spl.bin FORCE
+SPL__PLEASE_RENAME: spl/u-boot-spl.bin FORCE
$(Q)$(MAKE) $(build)=arch/arm/imx-common $@
 
-u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE
+u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL__PLEASE_RENAME u-boot.bin 
FORCE
$(Q)$(MAKE) $(build)=arch/arm/imx-common $@
 
 MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e 
$(CONFIG_SYS_TEXT_BASE)
@@ -1221,7 +1221,7 @@ CLEAN_FILES += u-boot.lds include/bmp_logo.h 
include/bmp_logo_data.h \
 CLOBBER_DIRS  += $(patsubst %,spl/%, $(filter-out Makefile, \
 $(shell ls -1 spl 2>/dev/null))) \
 tpl
-CLOBBER_FILES += u-boot* MLO* SPL System.map
+CLOBBER_FILES += u-boot* MLO* SPL__PLEASE_RENAME System.map
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated  \
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 66ecc2e..e5bf171 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -119,7 +119,7 @@ endif
 ifneq ($(CONFIG_IMX_CONFIG),)
 ifdef CONFIG_SPL
 ifndef CONFIG_SPL_BUILD
-ALL-y += SPL
+ALL-y += SPL__PLEASE_RENAME
 endif
 else
 ifeq ($(CONFIG_OF_SEPARATE),y)
diff --git a/arch/arm/imx-common/Makefile b/arch/arm/imx-common/Makefile
index 016fb98..8bf4d20 100644
--- a/arch/arm/imx-common/Makefile
+++ b/arch/arm/imx-common/Makefile
@@ -50,7 +50,7 @@ endif
 MKIMAGEFLAGS_SPL = -n $(filter-out $< $(PHONY),$^) -T imximage \
-e $(CONFIG_SPL_TEXT_BASE)
 
-SPL: spl/u-boot-spl.bin $(IMX_CONFIG) FORCE
+SPL__PLEASE_RENAME: spl/u-boot-spl.bin $(IMX_CONFIG) FORCE
$(call if_changed,mkimage)
 
 MKIMAGEFLAGS_u-boot.uim = -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \
@@ -61,7 +61,7 @@ u-boot.uim: u-boot.bin FORCE
 
 OBJCOPYFLAGS += -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO)
 
-u-boot-with-spl.imx: SPL u-boot.uim FORCE
+u-boot-with-spl.imx: SPL__PLEASE_RENAME u-boot.uim FORCE
$(call if_changed,pad_cat)
 
 u-boot-with-nand-spl.imx: spl/u-boot-nand-spl.imx u-boot.uim FORCE
@@ -71,7 +71,7 @@ quiet_cmd_u-boot-nand-spl_imx = GEN $@
 cmd_u-boot-nand-spl_imx = (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \
dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | cat - $< > $@
 
-spl/u-boot-nand-spl.imx: SPL FORCE
+spl/u-boot-nand-spl.imx: SPL__PLEASE_RENAME FORCE
$(call if_changed,u-boot-nand-spl_imx)
 
-targets += $(addprefix ../../../,$(IMX_CONFIG) SPL u-boot.uim 
spl/u-boot-nand-spl.imx)
+targets += $(addprefix ../../../,$(IMX_CONFIG) SPL__PLEASE_RENAME u-boot.uim 
spl/u-boot-nand-spl.imx)
-- 
1.9.1

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


Re: [U-Boot] Building under Cygwin - "-ansi" flag?

2014-06-06 Thread Vasili Galka
Hi Masahiro,

>> Let's suppose there is an application in tools directory that requires
>> both "libfdt_env.h" (from uboot tree) and "errno.h" (from host
>> environment). However, as both headers exist at both places, in the
>> uboot tree and on the host environment, there is no way to solve this
>> just by altering the include paths order. For any reshuffling both
>> headers will be taken either from uboot or from host - which is
>> undesired.
>
> True.
> What we should do is not to tweak the inclusion order.
>
>
> I guess we should follow what happended in Linux Kernel world:
>
> They split out the user-space API content in separated headers
> and put them into  new   include/uapi/  and  arch/$(ARCH)/include/uapi/
> directories.
>
>
> So, the right direction we should go is:
>
> - Define the exact tools-API  which should be exported to
>   host program space. (For ex.  image structure)
>
> - Put the tool-API headers into a new directory.
> (I have no idea about a good dir name.   include/host-api/ ? )
>  This directory is added to include-path for  both U-Boot and host programs.
>
>
>include  include
>  U-Boot  -->   include/host-api/<   Host programs
>
>
> U-boot  includes:  include/host-api/  +  include/   + arch/$ARCH/include/
>
> Host programs include:  include/host-api/ + headers provided by environments

What you propose sounds good. But are you sure that no tools require a
really deep details of U-Boot internals? In such case separating the
details into an interface won't be possible. If (hopefully) that's not
the case, interfaces seem to be the right direction. Although
implementing them requires great work.
In any case, as a new comer, I don't think I know U-Boot enough for
such design decision. I would be glad to hear the opinion of other
major developers.

As about the solution I initially thought of, here is a more detailed design:
https://docs.google.com/document/d/1D86EedRrViJHsTZrf9bEQB-DYsEweHDKaJyZYI2Yr3I/edit?usp=sharing
It does not contradict what you propose and these two can be used
together. My proposal does not target only the specific compilation
issues descussed here but the general ease of code understanding and
navigation. I think it is much easier to implement and can provide a
good short term solution. Since re-factoring host-api requires much
effort and deep understanding of existing code. The only drawback of
my proposal I see is the large patch footprint. But maybe you see
other weaknesses. I'll be glad for your opinion.

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


[U-Boot] [PATCH 1/2] kbuild: remove unnecessary adjustment for Cygwin

2014-06-06 Thread Masahiro Yamada
"SFX = .exe" was originally added for Cygwin environment.

It is true that GCC on Cygwin spits executables with .exe extention.

For example,

  gcc -o foo foo.c

will generate "foo.exe", not "foo".

But GNU make is also nicely adjusted for Cygwin.

For example,

  foo: foo.c
  gcc -o $@ $<

will compare the timestamp between "foo.exe" and "foo.c".

You do not have to tweak Makefiles like this:

  foo$(SFX): foo.c
  gcc -o $@ $<

And "make clean" works as well without adjustment for Cygwin because
the command "rm foo" on Cygwin will delete both "foo" and "foo.exe".

In conclusion, makefiles do not need special care for Cygwin.

Signed-off-by: Masahiro Yamada 
---

I tested this patch on the following environment.

$ uname -a
CYGWIN_NT-6.1 yamada-win7 1.7.30(0.272/5/3) 2014-05-23 10:36 i686 Cygwin

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.8.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc4/gcc-4.8.3-1/src/gcc-4.8.3/configure
 --srcdir=/cygdrive/i/szsz/tmpp/gcc4/gcc-4.8.3-1/src/gcc-4.8.3
 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
 --libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var
 --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
 --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
 --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-pc-cygwin
 --without-libiconv-prefix --without-libintl-prefix --enable-shared
 --enable-shared-libgcc --enable-static
 --enable-version-specific-runtime-libs --enable-bootstrap
 --disable-__cxa_atexit --with-dwarf2 --with-arch=i686
 --with-tune=generic --disable-sjlj-exceptions
 --enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++
 --enable-graphite --enable-threads=posix --enable-libatomic
 --enable-libgomp --disable-libitm --enable-libquadmath
 --enable-libquadmath-support --enable-libssp --enable-libada
 --enable-libjava --enable-libgcj-sublibs --disable-java-awt
 --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar
 --with-gnu-ld --with-gnu-as
 --with-cloog-include=/usr/include/cloog-isl
 --without-libiconv-prefix --without-libintl-prefix
 --with-system-zlib --libexecdir=/usr/lib
Thread model: posix
gcc version 4.8.3 (GCC)

$ make -v
GNU Make 4.0
Built for i686-pc-cygwin
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


 tools/Makefile | 89 ++
 1 file changed, 40 insertions(+), 49 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 09ac3bb..5235539 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -5,15 +5,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 #
 
-#
-# toolchains targeting win32 generate .exe files
-#
-ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null)))
-SFX = .exe
-else
-SFX =
-endif
-
 # Enable all the config-independent tools
 ifneq ($(HOST_TOOLS_ALL),)
 CONFIG_LCD_LOGO = y
@@ -38,31 +29,31 @@ ENVCRC-$(CONFIG_ENV_IS_IN_NVRAM) = y
 ENVCRC-$(CONFIG_ENV_IS_IN_SPI_FLASH) = y
 CONFIG_BUILD_ENVCRC ?= $(ENVCRC-y)
 
-hostprogs-$(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER) += atmel_pmecc_params$(SFX)
+hostprogs-$(CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER) += atmel_pmecc_params
 
 # TODO: CONFIG_CMD_LICENSE does not work
-hostprogs-$(CONFIG_CMD_LICENSE) += bin2header$(SFX)
-hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX)
-hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX)
-HOSTCFLAGS_bmp_logo$(SFX).o := -pedantic
+hostprogs-$(CONFIG_CMD_LICENSE) += bin2header
+hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo
+hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo
+HOSTCFLAGS_bmp_logo.o := -pedantic
 
-hostprogs-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX)
-envcrc$(SFX)-objs := envcrc.o lib/crc32.o common/env_embedded.o lib/sha1.o
+hostprogs-$(CONFIG_BUILD_ENVCRC) += envcrc
+envcrc-objs := envcrc.o lib/crc32.o common/env_embedded.o lib/sha1.o
 
-hostprogs-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX)
-HOSTCFLAGS_gen_eth_addr$(SFX).o := -pedantic
+hostprogs-$(CONFIG_CMD_NET) += gen_eth_addr
+HOSTCFLAGS_gen_eth_addr.o := -pedantic
 
-hostprogs-$(CONFIG_CMD_LOADS) += img2srec$(SFX)
-HOSTCFLAGS_img2srec$(SFX).o := -pedantic
+hostprogs-$(CONFIG_CMD_LOADS) += img2srec
+HOSTCFLAGS_img2srec.o := -pedantic
 
-hostprogs-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX)
-HOSTCFLAGS_xway-swap-bytes$(SFX).o := -pedantic
+hostprogs-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes
+HOSTCFLAGS_xway-swap-bytes.o := -pedantic
 
-hostprogs-y += mkenvimage$(SFX)
-mkenvimage$(SFX)-objs := mkenvimage.o os_support.o lib/crc32.o
+hostprogs-y += mkenvimage
+mkenvimage-objs := mkenvimage.o os_support.o lib/crc32.o
 
-hostprogs-y += dumpimage$(SFX) mkimage$(SFX)
-hostprogs-$(CONFIG_FIT_SIGNATURE) += fit_info$(SFX) fit_check_sign$(SFX)
+hostprogs-y += dumpimage mk

[U-Boot] [PATCH 2/2] .gitignore: move *.exe pattern to the top gitignore for Cygwin

2014-06-06 Thread Masahiro Yamada
GCC on Cygwin generates executables with .exe extension,
for example:
 scripts/basic/fixdep.exe
 scripts/docproc.exe

To ignore them, *.exe pattern should be moved
from tools/.gitignore to ./.gitignore

Signed-off-by: Masahiro Yamada 
---

 .gitignore   | 3 +++
 tools/.gitignore | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index c2f53fc..4e4fd00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,9 @@
 *.patch
 *.cfgtmp
 
+# host programs on Cygwin
+*.exe
+
 # Build tree
 /build-*
 
diff --git a/tools/.gitignore b/tools/.gitignore
index 0eb9068..cefe923 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -17,7 +17,6 @@
 /relocate-rela
 /ubsha1
 /xway-swap-bytes
-/*.exe
 /easylogo/easylogo
 /gdb/gdbcont
 /gdb/gdbsend
-- 
1.9.1

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


[U-Boot] [PATCH 0/2] Some Cygwin-related changes

2014-06-06 Thread Masahiro Yamada



Masahiro Yamada (2):
  kbuild: remove unnecessary adjustment for Cygwin
  .gitignore: move *.exe pattern to the top gitignore for Cygwin

 .gitignore   |  3 ++
 tools/.gitignore |  1 -
 tools/Makefile   | 89 +---
 3 files changed, 43 insertions(+), 50 deletions(-)

-- 
1.9.1

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


  1   2   >