Re: [U-Boot] [PATCH v7 18/21] mtd: nand: Kconfig: Add NAND_MXS entry

2016-10-12 Thread Jörg Krause
On Mi, 2016-10-12 at 11:20 +0530, Jagan Teki wrote:
> On Wed, Oct 12, 2016 at 3:40 AM, Jörg Krause
>  wrote:
> > 
> > On Sa, 2016-10-08 at 18:00 +0530, Jagan Teki wrote:
> > > 
> > > From: Jagan Teki 
> > > 
> > > Added kconfig for NAND_MXS driver.
> > > 
> > > Cc: Scott Wood 
> > > Cc: Simon Glass 
> > > Cc: Fabio Estevam 
> > > Cc: Stefano Babic 
> > > Cc: Peng Fan 
> > > Cc: Matteo Lisi 
> > > Cc: Michael Trimarchi 
> > > Signed-off-by: Jagan Teki 
> > > ---
> > >  drivers/mtd/nand/Kconfig | 7 +++
> > >  1 file changed, 7 insertions(+)
> > > 
> > > diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> > > index 5ce7d6d..df154bf 100644
> > > --- a/drivers/mtd/nand/Kconfig
> > > +++ b/drivers/mtd/nand/Kconfig
> > > @@ -80,6 +80,13 @@ config NAND_ARASAN
> > > controller. This uses the hardware ECC for read and
> > > write operations.
> > > 
> > > +config NAND_MXS
> > > + bool "MXS NAND support"
> > > + depends on MX6
> > 
> > Isn't mxs supposed to be i.MX23/i.MX28 and not i.MX6?
> 
> Yes will ||ed once the nand config used by MX23/28 are planing to
> move
> defconfig.

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


[U-Boot] inconsistent use of semi-colons when invoking macros

2016-10-12 Thread Robert P. J. Day

  just noticed this in lib/bzip2/bzlib_decompress.c (around line 240):

... snip ...
   switch (s->state) {

  GET_UCHAR(BZ_X_MAGIC_1, uc);
  if (uc != BZ_HDR_B) RETURN(BZ_DATA_ERROR_MAGIC);

  GET_UCHAR(BZ_X_MAGIC_2, uc);
  if (uc != BZ_HDR_Z) RETURN(BZ_DATA_ERROR_MAGIC);

  GET_UCHAR(BZ_X_MAGIC_3, uc)  <---
  if (uc != BZ_HDR_h) RETURN(BZ_DATA_ERROR_MAGIC);

  GET_BITS(BZ_X_MAGIC_4, s->blockSize100k, 8)  <---
... snip ...

note the lack of terminating semi-colon on a couple of those macro
invocations. now, given those macro definitions in the same file:

#define GET_BITS(lll,vvv,nnn) \
   case lll: s->state = lll;  \
   while (True) { \
  if (s->bsLive >= nnn) { \
 UInt32 v;\
 v = (s->bsBuff >>\
 (s->bsLive-nnn)) & ((1 << nnn)-1);   \
 s->bsLive -= nnn;\
 vvv = v; \
 break;   \
  }   \
  if (s->strm->avail_in == 0) RETURN(BZ_OK);  \
  s->bsBuff   \
 = (s->bsBuff << 8) | \
   ((UInt32)  \
  (*((UChar*)(s->strm->next_in;   \
  s->bsLive += 8; \
  s->strm->next_in++; \
  s->strm->avail_in--;\
  s->strm->total_in_lo32++;   \
  if (s->strm->total_in_lo32 == 0)\
 s->strm->total_in_hi32++;\
   }

#define GET_UCHAR(lll,uuu)\
   GET_BITS(lll,uuu,8)

it turns out those semi-colons are unnecessary but, still, it would be
stylistically nice to be consistent. is there a coding standard in
cases where a macro invocation doesn't need a terminating semi-colon?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


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


Re: [U-Boot] [PicoZed] Error in NET and SD Card

2016-10-12 Thread Oscar Gomez Fuente
Hi Jaehoon,


How can I enable the CONFG_MMC_TRACE? I couldn't find this option in the
menuconfig.

Is it enough to add "CONFIG_MMC_TRACE=y" in the .config file?


Best regards.

Oscar Gomez Fuente.

On 12 October 2016 at 06:46, Jaehoon Chung  wrote:

> Hi
>
> On 10/11/2016 11:08 PM, Oscar Gomez Fuente wrote:
> > Hi everyone,
> >
> > I've just compiled u-boot for a picoZed platform with
> > the zynq_picozed_defconfig, and I've realised that the NET and SD Card
> > aren't recognised. In the init I see these messages:
> >
> > I boot from the SD Card and I see these messages from my uart terminal:
> >
> > -
> > U-Boot 2016.11-rc1-00139-gf5fd45f (Oct 11 2016 - 15:48:54 +0200)
> >
> > Model: Zynq PicoZed Board
> > Board: Xilinx Zynq
> > DRAM:  ECC disabled 1 GiB
> > MMC:
> > Using default environment
> >
> > In:serial@e0001000
> > Out:   serial@e0001000
> > Err:   serial@e0001000
> > Model: Zynq PicoZed Board
> > Board: Xilinx Zynq
> > Net:   No ethernet found.
> > ** Bad device mmc 0 **
> > Checking if uenvcmd is set ...
> > Hit any key to stop autoboot:  0
> > -
> >
> > So, I think something has broken. Could anyone chek this issue?
>
> Could you enable the CONFIG_MMC_TRACE? then we can see more information.
> And which config do you use?
>
> Best Regards,
> Jaehoon Chung
>
> >
> >
> > Thank you very much. Best regards.
> >
> > Oscar Gomez Fuente
> > ___
> > U-Boot mailing list
> > U-Boot@lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
> >
> >
> >
>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 5/5] fsl PPA: enable PPA for ls1043ardb and ls1046ardb

2016-10-12 Thread Zhiqiang Hou
From: Hou Zhiqiang 

Enable PPA for ls1043ardb NOR boot and ls1046ardb QSPI boot.

Signed-off-by: Hou Zhiqiang 
---
 configs/ls1043ardb_defconfig  | 1 +
 configs/ls1046ardb_qspi_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index 3b6de1d..70e0c36 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_LS1043ARDB=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-rdb"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_FSL_DDR4=y
 CONFIG_NOR_BOOT=y
diff --git a/configs/ls1046ardb_qspi_defconfig 
b/configs/ls1046ardb_qspi_defconfig
index 67ef3ce..56b39c5 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -4,6 +4,7 @@ CONFIG_DM_SPI=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
+CONFIG_FSL_LS_PPA=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
 CONFIG_QSPI_BOOT=y
-- 
2.1.0.27.g96db324

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


[U-Boot] [PATCH 3/5] kconfig: armv8: move armv8 sec_firmware CONFIG_* to Kconfig

2016-10-12 Thread Zhiqiang Hou
From: Hou Zhiqiang 

Signed-off-by: Hou Zhiqiang 
---
 arch/arm/cpu/armv8/Kconfig| 36 +++
 arch/arm/cpu/armv8/Makefile   |  2 +-
 arch/arm/cpu/armv8/sec_firmware_asm.S |  4 ++--
 include/configs/ls1043ardb.h  |  4 
 include/configs/ls1046ardb.h  |  4 
 5 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
index 7e1fc4c..cb5a970 100644
--- a/arch/arm/cpu/armv8/Kconfig
+++ b/arch/arm/cpu/armv8/Kconfig
@@ -21,4 +21,40 @@ config ARMV8_SPIN_TABLE
- Reserve the code for the spin-table and the release address
  via a /memreserve/ region in the Device Tree.
 
+menu "ARMv8 secure monitor firmware"
+config ARMV8_SEC_FIRMWARE_SUPPORT
+   bool "Enable ARMv8 secure monitor firmware framework support"
+   select OF_LIBFDT
+   select FIT
+   help
+ This framework is aimed at making secure monitor firmware load
+ process brief.
+ Note: Only FIT format image is supported.
+ You should prepare and provide the below information:
+   - Address of secure firmware.
+   - Address to hold the return address from secure firmware.
+   - Secure firmware FIT image related information.
+ Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMEWARE_FIT_CNF_NAME
+   - The target exception level that secure monitor firmware will
+ return to.
+
+config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
+   bool "Enable ARMv8 secure monitor firmware framework support for SPL"
+   select SPL_OF_LIBFDT
+   select SPL_FIT
+   help
+ Say Y here to support this framework in SPL phase.
+
+config ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
+   bool "ARMv8 secure monitor firmware ERET address byteorder swap"
+   depends on ARMV8_SEC_FIRMWARE_SUPPORT || SPL_ARMV8_SEC_FIRMWARE_SUPPORT
+   help
+ Say Y here when the endianness of the register or memory holding the
+ Secure firmware exception return address is different with core's.
+
+endmenu
+
+config ARMV8_PSCI
+   bool "ARMv8 PSCI support"
+
 endif
diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
index dea1465..9f65927 100644
--- a/arch/arm/cpu/armv8/Makefile
+++ b/arch/arm/cpu/armv8/Makefile
@@ -19,7 +19,7 @@ obj-y += cpu-dt.o
 ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_ARMV8_SPIN_TABLE) += spin_table.o spin_table_v8.o
 endif
-obj-$(CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o sec_firmware_asm.o
+obj-$(CONFIG_$(SPL_)ARMV8_SEC_FIRMWARE_SUPPORT) += sec_firmware.o 
sec_firmware_asm.o
 
 obj-$(CONFIG_FSL_LAYERSCAPE) += fsl-layerscape/
 obj-$(CONFIG_S32V234) += s32v234/
diff --git a/arch/arm/cpu/armv8/sec_firmware_asm.S 
b/arch/arm/cpu/armv8/sec_firmware_asm.S
index 0c6a462..15fbe0b 100644
--- a/arch/arm/cpu/armv8/sec_firmware_asm.S
+++ b/arch/arm/cpu/armv8/sec_firmware_asm.S
@@ -23,12 +23,12 @@ WEAK(_sec_firmware_entry)
/* Set exception return address hold pointer */
 adrx4, 1f
 movx3, x4
-#ifdef SEC_FIRMWARE_ERET_ADDR_REVERT
+#ifdef CONFIG_ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
 revw3, w3
 #endif
 strw3, [x1]
 lsrx3, x4, #32
-#ifdef SEC_FIRMWARE_ERET_ADDR_REVERT
+#ifdef CONFIG_ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
 revw3, w3
 #endif
 strw3, [x2]
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index 70ee046..4b4d090 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -10,10 +10,6 @@
 #include "ls1043a_common.h"
 
 #if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
-#define SEC_FIRMWARE_ERET_ADDR_REVERT
-#define CONFIG_ARMV8_PSCI
-
 #define CONFIG_SYS_LS_PPA_FW_IN_XIP
 #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
 #defineCONFIG_SYS_LS_PPA_FW_ADDR   0x6050
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 693cc8d..85a58b0 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -10,10 +10,6 @@
 #include "ls1046a_common.h"
 
 #if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_ARMV8_PSCI
-#define CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
-#define CONFIG_SYS_LS_PPA_DRAM_BLOCK_MIN_SIZE  (1UL * 1024 * 1024)
-
 #define CONFIG_SYS_LS_PPA_FW_IN_XIP
 #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
 #defineCONFIG_SYS_LS_PPA_FW_ADDR   0x4050
-- 
2.1.0.27.g96db324

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


[U-Boot] [PATCH 4/5] kconfig: fsl PPA: move CONFIG_* to Kconfig

2016-10-12 Thread Zhiqiang Hou
From: Hou Zhiqiang 

Signed-off-by: Hou Zhiqiang 
---
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig  | 29 +
 arch/arm/cpu/armv8/fsl-layerscape/Makefile |  2 +-
 include/configs/ls1043ardb.h   |  7 ---
 include/configs/ls1046ardb.h   |  7 ---
 4 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig 
b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index 94ec8d5..952db19 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -44,6 +44,35 @@ config FSL_LSCH3
 menu "Layerscape architecture"
depends on FSL_LSCH2 || FSL_LSCH3
 
+menu "Layerscape PPA"
+config FSL_LS_PPA
+   bool "FSL Layerscape PPA firmware support"
+   depends on ARCH_LS1043A || ARCH_LS1046A
+   select ARMV8_PSCI
+   select ARMV8_SEC_FIRMWARE_SUPPORT
+   select ARMV8_SEC_FIRMWARE_ERET_ADDR_REVERT
+   help
+ The FSL Primary Protected Application (PPA) is a software component
+ loaded during boot which runs in TrustZone and remains resident
+ after boot.
+choice
+   prompt "FSL Layerscape PPA firmware storage select"
+   depends on FSL_LS_PPA
+   default SYS_LS_PPA_FW_IN_XIP
+
+config SYS_LS_PPA_FW_IN_XIP
+   bool "XIP"
+
+endchoice
+
+config SYS_LS_PPA_FW_ADDR
+   hex "Address of PPA firmware"
+   depends on FSL_LS_PPA
+   default 0x6050 if SYS_LS_PPA_FW_IN_XIP && NOR_BOOT
+   default 0x4050 if SYS_LS_PPA_FW_IN_XIP && QSPI_BOOT
+
+endmenu
+
 config SYS_FSL_MMDC
bool
 
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Makefile 
b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
index 51c1cee..150eb7a 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Makefile
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Makefile
@@ -10,7 +10,7 @@ obj-y += soc.o
 obj-$(CONFIG_MP) += mp.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
 obj-$(CONFIG_SPL) += spl.o
-obj-$(CONFIG_FSL_LS_PPA) += ppa.o
+obj-$(CONFIG_$(SPL_)FSL_LS_PPA) += ppa.o
 
 ifneq ($(CONFIG_FSL_LSCH3),)
 obj-y += fsl_lsch3_speed.o
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index 4b4d090..3023c48 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -9,13 +9,6 @@
 
 #include "ls1043a_common.h"
 
-#if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_SYS_LS_PPA_FW_IN_XIP
-#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
-#defineCONFIG_SYS_LS_PPA_FW_ADDR   0x6050
-#endif
-#endif
-
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 85a58b0..3ea02f0 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -9,13 +9,6 @@
 
 #include "ls1046a_common.h"
 
-#if defined(CONFIG_FSL_LS_PPA)
-#define CONFIG_SYS_LS_PPA_FW_IN_XIP
-#ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP
-#defineCONFIG_SYS_LS_PPA_FW_ADDR   0x4050
-#endif
-#endif
-
 #define CONFIG_DISPLAY_CPUINFO
 #define CONFIG_DISPLAY_BOARDINFO
 
-- 
2.1.0.27.g96db324

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


[U-Boot] [PATCH 2/5] configs/ls104xa: enable the config NOR_BOOT

2016-10-12 Thread Zhiqiang Hou
From: Hou Zhiqiang 

Enable the config NOR_BOOT obviously for NOR boot defconfigs of
ls1043a and ls1046a.

Signed-off-by: Hou Zhiqiang 
---
 configs/ls1043aqds_defconfig | 1 +
 configs/ls1043aqds_lpuart_defconfig  | 1 +
 configs/ls1043aqds_nor_ddr3_defconfig| 1 +
 configs/ls1043ardb_SECURE_BOOT_defconfig | 1 +
 configs/ls1043ardb_defconfig | 1 +
 configs/ls1046aqds_defconfig | 1 +
 6 files changed, 6 insertions(+)

diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index 9352d82..3c8ae2e 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -5,6 +5,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_FSL_DDR4=y
+CONFIG_NOR_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/ls1043aqds_lpuart_defconfig 
b/configs/ls1043aqds_lpuart_defconfig
index d384985..8acf732 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -6,6 +6,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="LPUART"
 CONFIG_SYS_FSL_DDR4=y
+CONFIG_NOR_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/ls1043aqds_nor_ddr3_defconfig 
b/configs/ls1043aqds_nor_ddr3_defconfig
index 1103346..9be3b2c 100644
--- a/configs/ls1043aqds_nor_ddr3_defconfig
+++ b/configs/ls1043aqds_nor_ddr3_defconfig
@@ -4,6 +4,7 @@ CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
+CONFIG_NOR_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig 
b/configs/ls1043ardb_SECURE_BOOT_defconfig
index 262769d..0848d66 100644
--- a/configs/ls1043ardb_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_SECURE_BOOT_defconfig
@@ -6,6 +6,7 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
 CONFIG_SYS_FSL_DDR4=y
+CONFIG_NOR_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_MMC=y
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index e1b75ac..3b6de1d 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -5,6 +5,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_FSL_DDR4=y
+CONFIG_NOR_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_MMC=y
diff --git a/configs/ls1046aqds_defconfig b/configs/ls1046aqds_defconfig
index 71c3b95..d97ddd9 100644
--- a/configs/ls1046aqds_defconfig
+++ b/configs/ls1046aqds_defconfig
@@ -6,6 +6,7 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_NOR_BOOT=y
 CONFIG_BOOTDELAY=10
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
-- 
2.1.0.27.g96db324

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


[U-Boot] [PATCH] armv8: fsl-layerscape: Add support of GPIO structure

2016-10-12 Thread Pratiyush Srivastava
Layerscape supports GPIO registers to conrol GPIO singals.
Add support of GPIO structure to enable GPIO access.

Signed-off-by: Pratiyush Srivastava 
Signed-off-by: Prabhakar Kushwaha 
---
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig  | 4 
 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h | 9 +
 2 files changed, 13 insertions(+)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig 
b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index f8057ba..6af39d9 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -2,6 +2,7 @@ config ARCH_LS1012A
bool "Freescale Layerscape LS1012A SoC"
select SYS_FSL_MMDC
select SYS_FSL_ERRATUM_A010315
+   select SYS_GPIO1_ADDR
 
 config ARCH_LS1043A
bool "Freescale Layerscape LS1043A SoC"
@@ -15,3 +16,6 @@ config SYS_FSL_MMDC
 
 config SYS_FSL_ERRATUM_A010315
bool "Workaround for PCIe erratum A010315"
+
+config SYS_GPIO1_ADDR
+   bool "Support for GPIO structure to enable GPIO access"
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h 
b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
index df51871..d9d7cb6 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -584,6 +584,15 @@ struct ccsr_cci400 {
u8 res_e004[0x1 - 0xe004];
 };
 
+typedef struct ccsr_gpio {
+   u32 gpdir;
+   u32 gpodr;
+   u32 gpdat;
+   u32 gpier;
+   u32 gpimr;
+   u32 gpicr;
+} ccsr_gpio_t;
+
 /* MMU 500 */
 #define SMMU_SCR0  (SMMU_BASE + 0x0)
 #define SMMU_SCR1  (SMMU_BASE + 0x4)
-- 
2.7.4

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev
In order to exclude possible errors on my board, i get MarsBoard A20 Lite, 
desolder nand, and put on emmc pads my emmc flash.
So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can 
init emmc, and i got /dev/mmcblkp1, works well.
But when i eject sd and try to boot from sdc2 emmc, get the same err 17. 
In this case i have used some old uboot from marsboard site, because mainline 
u-boot have not config for a20 marsboard.

U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
Board: MarsBoard-A20 & MarsPI
DRAM: 1024 MiB
CPU: 96000Hz, AXI/AHB/APB: 3/2/2
Card did not respond to voltage select!
spl: mmc init failed: err - -17
### ERROR ### Please RESET the board ###

So, the problem with eMMC KLM4G1FE3B-B001 is exists(
Maybe you know some cheap emmc, which is 100% works with mainline u-boot?

> 7 окт. 2016 г., в 14:44, Alexandr Bochkarev  
> написал(а):
> 
> Hi!
> Very appreciate your help! Hope we will fix it, because my board will be 
> garbage without emmc (
> So, my steps:
> 
> git clone git://git.denx.de/u-boot.git  --depth 
> 1; cd u-boot;
> make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig
> make CROSS_COMPILE=arm-linux-gnueabihf-
> 
> Also turn on CONFIG_MMC_TRACE
> 
> After run, got:
> 
> Trying to boot from MMC1
> CMD_SEND:0
> ..ARG... 0x
> ..MMC_RSP_NONE
> CMD_SEND:8
> ..ARG... 0x
> ..RET... -110
> CMD_SEND:55
> ..ARG... 0x
> ..RET... -110
> CMD_SEND:0
> ..ARG... 0x
> ..MMC_RSP_NONE
> CMD_SEND:1
> ..ARG... 0x
> ..MMC_RSP_R3,4.. 0x 
> CMD_SEND:1
> ..ARG... 0x
> ..MMC_RSP_R3,4.. 0x 
> CMD_SEND:0
> ..ARG... 0x
> ..MMC_RSP_NONE
> CMD_SEND:1
> ..ARG... 0x
> ..MMC_RSP_R3,4.. 0x 
> CMD_SEND:1
> ..ARG... 0x
> ..MMC_RSP_R3,4.. 0x 
> CMD_SEND:2
> ..ARG... 0x
> ..MMC_RSP_R2.. 0x 
> ..  .. 0x 
> ..  .. 0x 
> ..  .. 0x 
> 
> .DUMPING DATA
> .000 - 00 00 00 00 
> .004 - 00 00 00 00 
> .008 - 00 00 00 00 
> .012 - 00 00 00 00 
> CMD_SEND:3
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CMD_SEND:9
> ..ARG... 0x
> ..MMC_RSP_R2.. 0x 
> ..  .. 0x 
> ..  .. 0x 
> ..  .. 0x 
> 
> .DUMPING DATA
> .000 - 00 00 00 00 
> .004 - 00 00 00 00 
> .008 - 00 00 00 00 
> .012 - 00 00 00 00 
> CMD_SEND:13
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CURR STATE:3
> CMD_SEND:7
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CMD_SEND:8
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CMD_SEND:8
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CMD_SEND:6
> ..ARG... 0x
> ..MMC_RSP_R1b.. 0x 
> CMD_SEND:13
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CURR STATE:4
> CMD_SEND:8
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CMD_SEND:6
> ..ARG... 0x
> ..RET... -110
> CMD_SEND:16
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x 
> CMD_SEND:17
> ..ARG... 0x
> ..RET... -110
> 
> hdr read sector 80, count=0
> mmc_load_image_raw_sector: mmc block read error
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
> 
> So, 
> spl_mmc.c on line 66, blk_dread return 0 count
> blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) 
> return 0
> block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on 
> line 144, bdesc->block_read = mmc_bread;
> mmc.c, line 285 mmc_read_blocks return Failed to read blocks
> mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
> 
> 
>> 7 окт. 2016 г., в 5:48, Jaehoon Chung > > написал(а):
>> 
>> On 10/03/2016 02:39 AM, AneoX wrote:
>>> Emmc Card was the new one, so i just burn a dump of working sd. Previously
>>> sd have been wired to board for test.
>>> 
>>> Board is a custom,  like olinuxino lime which with nand and sd slot, 512 mb
>>> ram. So i using it defconfig and in case of sd card, it works.
>>> Emmc lines has external pullups according to the datasheet.
>> 
>> Well, i needs to get more information..If you guess that seems to return 0 
>> from block_read()..
>> then you can find which condition was hit..is it impossible?
>> 
>> If you can share more debug message..then i will help you.
>> 
>> Best Regards,
>> Jaehoon Chung
>> 
>>> 
>>> 2 окт. 2016 г. 23:28 пользователь "Jagan Teki" >> >
>>> написал:
>>> 
>>> On Sun, Oct 2, 2016 at 10:45 PM, AneoX >> > wrote:
 Like a sd card. I have emmc to sd adapter, so
 
 dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
>>> 
>>> I guess you cleaned[1] the card before doing this?
>>> 
 
 and then just solder emmc to my board.
>>> 
>>> OK, which a20 board?
>>> 
>>> [1] http://linux-sunxi.org/Bootable_SD_card 
>>> 

[U-Boot] [PATCH v3 3/3] armv8: ls1012a: Added CSU assignment for USB2

2016-10-12 Thread Rajesh Bhagat
Access settings for USB2 IP is added through CSU register.

Added CSU ID for USB2, reg: CSL23_REG[8:0]

Signed-off-by: Rajesh Bhagat 
---
Changes in v3:
 - Rebased to u-boot-usb master

Changes in v2:
 - None

 arch/arm/include/asm/arch-fsl-layerscape/ns_access.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h 
b/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h
index f46f1d8..3a803e0 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h
@@ -39,6 +39,7 @@ enum csu_cslx_ind {
CSU_CSLX_ESDHC,
CSU_CSLX_IFC = 45,
CSU_CSLX_I2C1,
+   CSU_CSLX_USB_2,
CSU_CSLX_I2C3 = 48,
CSU_CSLX_I2C2,
CSU_CSLX_DUART2 = 50,
@@ -118,6 +119,7 @@ static struct csu_ns_dev ns_dev[] = {
 {CSU_CSLX_ESDHC, CSU_ALL_RW},
 {CSU_CSLX_IFC, CSU_ALL_RW},
 {CSU_CSLX_I2C1, CSU_ALL_RW},
+{CSU_CSLX_USB_2, CSU_ALL_RW},
 {CSU_CSLX_I2C3, CSU_ALL_RW},
 {CSU_CSLX_I2C2, CSU_ALL_RW},
 {CSU_CSLX_DUART2, CSU_ALL_RW},
-- 
2.6.2.198.g614a2ac

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


[U-Boot] [PATCH v3 0/3] Add USB EHCI support for ls1012aqds

2016-10-12 Thread Rajesh Bhagat
Adds USB EHCI support for ls1012qds by adding the support for NXP ULPI
PHY and adding the support it configuration files. Also enables, USB2 IP
in ns access defines. 

Rajesh Bhagat (3):
  drivers: usb: fsl: add USB ULPI init code
  config: ls1012aqds: Add USB EHCI support for ls1012aqds
  armv8: ls1012a: Added CSU assignment for USB2

 .../include/asm/arch-fsl-layerscape/immap_lsch2.h   |  1 +
 .../arm/include/asm/arch-fsl-layerscape/ns_access.h |  2 ++
 drivers/usb/host/ehci-fsl.c | 21 +
 include/configs/ls1012aqds.h|  2 ++
 include/usb/ehci-ci.h   |  2 +-
 5 files changed, 27 insertions(+), 1 deletion(-)

-- 
2.6.2.198.g614a2ac

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Jaehoon Chung
On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
> In order to exclude possible errors on my board, i get MarsBoard A20 Lite, 
> desolder nand, and put on emmc pads my emmc flash.
> So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can 
> init emmc, and i got /dev/mmcblkp1, works well.
> But when i eject sd and try to boot from sdc2 emmc, get the same err 17. 
> In this case i have used some old uboot from marsboard site, because mainline 
> u-boot have not config for a20 marsboard.
> 
> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
> Board: MarsBoard-A20 & MarsPI
> DRAM: 1024 MiB
> CPU: 96000Hz, AXI/AHB/APB: 3/2/2
> Card did not respond to voltage select!

This log means that there is no card on slot..
In my case..when i set the wrong mmc boot dev in environment, I had seen the 
similar log.
Could you share the environment values?

> spl: mmc init failed: err - -17
> ### ERROR ### Please RESET the board ###
> 
> So, the problem with eMMC KLM4G1FE3B-B001 is exists(
> Maybe you know some cheap emmc, which is 100% works with mainline u-boot?

I'm not sure...100% working card...because we don't ensure 100% what problem 
there are in mainline u-boot.

> 
>> 7 окт. 2016 г., в 14:44, Alexandr Bochkarev > > написал(а):
>>
>> Hi!
>> Very appreciate your help! Hope we will fix it, because my board will be 
>> garbage without emmc (
>> So, my steps:
>>
>> git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot;
>> make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig
>> make CROSS_COMPILE=arm-linux-gnueabihf-
>>
>> Also turn on CONFIG_MMC_TRACE

the below log seems that is nothing to do..arguments/response data..everything 
are 0..
It's strange.


Best Regards,
Jaehoon Chung

>>
>> After run, got:
>>
>> Trying to boot from MMC1
>> CMD_SEND:0
>> ..ARG... 0x
>> ..MMC_RSP_NONE
>> CMD_SEND:8
>> ..ARG... 0x
>> ..RET... -110
>> CMD_SEND:55
>> ..ARG... 0x
>> ..RET... -110
>> CMD_SEND:0
>> ..ARG... 0x
>> ..MMC_RSP_NONE
>> CMD_SEND:1
>> ..ARG... 0x
>> ..MMC_RSP_R3,4.. 0x 
>> CMD_SEND:1
>> ..ARG... 0x
>> ..MMC_RSP_R3,4.. 0x 
>> CMD_SEND:0
>> ..ARG... 0x
>> ..MMC_RSP_NONE
>> CMD_SEND:1
>> ..ARG... 0x
>> ..MMC_RSP_R3,4.. 0x 
>> CMD_SEND:1
>> ..ARG... 0x
>> ..MMC_RSP_R3,4.. 0x 
>> CMD_SEND:2
>> ..ARG... 0x
>> ..MMC_RSP_R2.. 0x 
>> ..  .. 0x 
>> ..  .. 0x 
>> ..  .. 0x 
>>
>> .DUMPING DATA
>> .000 - 00 00 00 00 
>> .004 - 00 00 00 00 
>> .008 - 00 00 00 00 
>> .012 - 00 00 00 00 
>> CMD_SEND:3
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CMD_SEND:9
>> ..ARG... 0x
>> ..MMC_RSP_R2.. 0x 
>> ..  .. 0x 
>> ..  .. 0x 
>> ..  .. 0x 
>>
>> .DUMPING DATA
>> .000 - 00 00 00 00 
>> .004 - 00 00 00 00 
>> .008 - 00 00 00 00 
>> .012 - 00 00 00 00 
>> CMD_SEND:13
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CURR STATE:3
>> CMD_SEND:7
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CMD_SEND:8
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CMD_SEND:8
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CMD_SEND:6
>> ..ARG... 0x
>> ..MMC_RSP_R1b.. 0x 
>> CMD_SEND:13
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CURR STATE:4
>> CMD_SEND:8
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CMD_SEND:6
>> ..ARG... 0x
>> ..RET... -110
>> CMD_SEND:16
>> ..ARG... 0x
>> ..MMC_RSP_R1,5,6,7 . 0x 
>> CMD_SEND:17
>> ..ARG... 0x
>> ..RET... -110
>>
>> hdr read sector 80, count=0
>> mmc_load_image_raw_sector: mmc block read error
>> SPL: failed to boot from all boot devices
>> ### ERROR ### Please RESET the board ###
>>
>> So, 
>> spl_mmc.c on line 66, blk_dread return 0 count
>> blk.h on line 389, block_dev->block_read(block_dev, start, blkcnt, buffer) 
>> return 0
>> block_dev->block_read is a pointer, seems like it defined in mmc_legacy.c on 
>> line 144, bdesc->block_read = mmc_bread;
>> mmc.c, line 285 mmc_read_blocks return Failed to read blocks
>> mmc.c, line 223, mmc_send_cmd return 0, cmdidx was 17, like last in mmc trace
>>
>>
>>> 7 окт. 2016 г., в 5:48, Jaehoon Chung >> > написал(а):
>>>
>>> On 10/03/2016 02:39 AM, AneoX wrote:
 Emmc Card was the new one, so i just burn a dump of working sd. Previously
 sd have been wired to board for test.

 Board is a custom,  like olinuxino lime which with nand and sd slot, 512 mb
 ram. So i using it defconfig and in case of sd card, it works.
 Emmc lines has external pullups according to the datasheet.
>>>
>>> Well, i needs to get more information..If you guess that seems to return 0 
>>> from block_read()..
>>> then you can find which condition was hi

[U-Boot] [PATCH 1/5] common/Kconfig: remove NOR_BOOT's depends on NOR

2016-10-12 Thread Zhiqiang Hou
From: Hou Zhiqiang 

Remove this dependency to make the NOR_BOOT available for other
SoCs which do not have the config NOR, not only for am335x.

Signed-off-by: Hou Zhiqiang 
---
 common/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/common/Kconfig b/common/Kconfig
index c69c141..7fd6c49 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -101,7 +101,6 @@ menu "Boot media"
 
 config NOR_BOOT
bool "Support for booting from NOR flash"
-   depends on NOR
help
  Enabling this will make a U-Boot binary that is capable of being
  booted via NOR.  In this case we will enable certain pinmux early
-- 
2.1.0.27.g96db324

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


Re: [U-Boot] [PicoZed] Error in NET and SD Card

2016-10-12 Thread Jaehoon Chung
On 10/12/2016 05:36 PM, Oscar Gomez Fuente wrote:
> Hi Jaehoon,
> 
> 
> How can I enable the CONFG_MMC_TRACE? I couldn't find this option in the 
> menuconfig.
> 
> Is it enough to add "CONFIG_MMC_TRACE=y" in the .config file?

Yes..CONFIG_MMC_TRACE=y or add the CONFIG_MMC_TRACE in your config file.

Best Regards,
Jaehoon Chung

> 
> 
> Best regards.
> 
> Oscar Gomez Fuente.
> 
> On 12 October 2016 at 06:46, Jaehoon Chung  > wrote:
> 
> Hi
> 
> On 10/11/2016 11:08 PM, Oscar Gomez Fuente wrote:
> > Hi everyone,
> >
> > I've just compiled u-boot for a picoZed platform with
> > the zynq_picozed_defconfig, and I've realised that the NET and SD Card
> > aren't recognised. In the init I see these messages:
> >
> > I boot from the SD Card and I see these messages from my uart terminal:
> >
> > -
> > U-Boot 2016.11-rc1-00139-gf5fd45f (Oct 11 2016 - 15:48:54 +0200)
> >
> > Model: Zynq PicoZed Board
> > Board: Xilinx Zynq
> > DRAM:  ECC disabled 1 GiB
> > MMC:
> > Using default environment
> >
> > In:serial@e0001000
> > Out:   serial@e0001000
> > Err:   serial@e0001000
> > Model: Zynq PicoZed Board
> > Board: Xilinx Zynq
> > Net:   No ethernet found.
> > ** Bad device mmc 0 **
> > Checking if uenvcmd is set ...
> > Hit any key to stop autoboot:  0
> > -
> >
> > So, I think something has broken. Could anyone chek this issue?
> 
> Could you enable the CONFIG_MMC_TRACE? then we can see more information.
> And which config do you use?
> 
> Best Regards,
> Jaehoon Chung
> 
> >
> >
> > Thank you very much. Best regards.
> >
> > Oscar Gomez Fuente
> > ___
> > U-Boot mailing list
> > U-Boot@lists.denx.de 
> > http://lists.denx.de/mailman/listinfo/u-boot 
> 
> >
> >
> >
> 
> 

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


[U-Boot] [PATCH v3 1/3] drivers: usb: fsl: add USB ULPI init code

2016-10-12 Thread Rajesh Bhagat
This adds the required code to set up a ULPI USB port, for
new NXP USB PHY used in QorIQ platforms.

To use this both CONFIG_USB_ULPI and CONFIG_USB_ULPI_VIEWPORT
have to be set in the board configuration file.

Signed-off-by: Rajesh Bhagat 
---
Changes in v3:
 - Rebased to u-boot-usb master

Changes in v2:
 - Changes return value from -1 to ulpi_init ret value

 drivers/usb/host/ehci-fsl.c | 21 +
 1 file changed, 21 insertions(+)

diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 9c32921..85b810d 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -17,6 +17,9 @@
 #include 
 #include 
 #include 
+#ifdef CONFIG_USB_ULPI
+#include 
+#endif
 
 #include "ehci.h"
 
@@ -190,6 +193,10 @@ static int ehci_fsl_init(int index, struct usb_ehci *ehci,
size_t len;
char current_usb_controller[5];
 #endif
+#ifdef CONFIG_USB_ULPI
+   int ret;
+   struct ulpi_viewport ulpi_vp;
+#endif
 #ifdef CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
char usb_phy[5];
 
@@ -257,6 +264,20 @@ static int ehci_fsl_init(int index, struct usb_ehci *ehci,
udelay(1000); /* delay required for PHY Clk to appear */
if (!usb_phy_clk_valid(ehci))
return -EINVAL;
+
+#ifdef CONFIG_USB_ULPI
+   ulpi_vp.viewport_addr = (u32)&ehci->ulpi_viewpoint;
+   ulpi_vp.port_num = 0;
+
+   ret = ulpi_init(&ulpi_vp);
+   if (ret) {
+   puts("NXP ULPI viewport init failed\n");
+   return ret;
+   }
+
+   ulpi_set_vbus(&ulpi_vp, 1, 1);
+   ulpi_set_vbus_indicator(&ulpi_vp, 1, 1, 1);
+#endif
out_le32(&(hcor)->or_portsc[0], PORT_PTS_ULPI);
}
 
-- 
2.6.2.198.g614a2ac

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


Re: [U-Boot] SPL load ARM Trusted Firmware BL31?

2016-10-12 Thread Mike Looijmans

On 11-10-16 13:00, Dan Handley wrote:




Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail





-Original Message-

From: Masahiro Yamada [mailto:yamada.masah...@socionext.com]
Sent: 05 October 2016 04:19
Hi.

Recently I implemented ARM Trusted Firmware BL31 for my SoCs.

But, I am wondering how the boot-flow should be.


I'm no U-Boot expert but as ARM Trusted Firmware (TF) maintainer, I feel I 
should say something here.

In general we expect partners to take the bits of TF that work best for them. 
So all the bootflows discussed in this thread are valid as far as I'm concerned:

Proprietary Boot ROM -> Proprietary firmware -> TF BL31 -> U-Boot -> Linux

Proprietary Boot ROM -> U-Boot SPL -> TF BL31 -> Full U-Boot -> Linux

TF BL1 -> TF BL2 -> TF BL31 -> U-Boot or UEFI (BL33) -> Linux


Regardless of choice here, it would be nice if all those blobs could be 
combined into a single image. Currently the system spends most of its boot 
time looking up binaries, and copying them around from device into memory and 
then relocate them to a final destination.


The current situation is that I need to create a bunch of tiny flash 
partitions: SPL, BL31, U-boot, devicetree, ...


What I WANT to have is just one "boot" partition that holds SPL, BL31 and 
u-boot, and then have big u-boot access a filesystem (UBI, FAT or EXT) to 
continue from there.







We've gone to some effort to make TF as interoperable as possible with other 
boot firmware. If there's more we can do here, please let us know.

As Michal said in an earlier mail, which bootflow you choose depends on what 
brings you the most value. Others have stated the advantages of U-Boot SPL over 
TF BL2, which I can't disagree with. But there may be other factors to 
consider, for example:

* Interoperability with other boot firmware (e.g. UEFI) or other OS.
* Integration with proprietary secure software (which permissively licensed 
software allows).
* Alignment with ARM's Trusted Board Boot Requirements (TBBR) document.

Each vendor needs to make their own decisions here.

Regarding TF BL31, we'd prefer this to remain the EL3 Runtime Software on 
AArch64 platforms, because:

* It is the deployment vehicle for ARM support code, which is constantly 
evolving (e.g. ARM architectural support, ARM CPU support, errata workarounds, 
plus other fundamental IP support).
* It has upstream integration with various Trusted OS.
* It helps standardization by providing reference code for PSCI and potentially 
other future industry standards.

There may be other runtime resident firmware present, but we expect these to 
execute at a lower EL.

One area that may be worth exploring is whether more can be done to help 
integration of the early TF secure world initialization code into other boot 
firmware (e.g. proprietary Boot ROMs or U-Boot SPL). This could be useful on 
platforms where TF BL1 is not used or TF BL31 is not the first software to 
execute on the CPU after reset.

I hope that helps (and is not too controversial!).

Regards

Dan.

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot



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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev
> This log means that there is no card on slot..
But then i tried my board with mainline u-boot, emmc was on sdc0 lines.

Now i tried, boot marsboard from sd, hit button to stop kernel loading.
sun7i# mmc list
SUNXI SD/MMC: 0

Looks like its doesnt see emmc on sdc2.


sun7i# printenv
Environment size: 1919/131068 bytes
autoboot=run loadkernel && run setargs && true && bootm 0x4800
baudrate=115200
boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x4100; then true; 
setenv stdout $saved_stdout; source 0x4100;else setenv stdout 
$saved_stdout;fi
bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env 
import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo 
Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to 
${bootscr};source ${scriptaddr};fi;run autoboot;
bootdelay=2
bootenv=uEnv.txt
bootm_size=0x1000
bootscr=boot.scr
console=ttyS0,115200
device=mmc
ethact=dwmac.1c5
ethaddr=02:d8:09:82:e3:9b
kernel=uImage
loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load 
$device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition 
$scriptaddr ${bootenv}
loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load 
$device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition 
$scriptaddr ${bootscr}
loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x4300 
${bootpath}${script} && ext2load $device $partition 0x4800 
${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 
0x4300 ${script} && fatload $device $partition 0x4800 ${kernel};then 
true; elif bootpath=/ && ext2load $device $partition 0x4300 
${bootpath}${script} && ext2load $device $partition 0x4800 
${bootpath}${kernel};then true; else false;fi
loglevel=8
panicarg=panic=10
partition=0:1
script=script.bin
scriptaddr=0x4400
setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; then 
root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; 
setenv bootargs console=${console} root=${root} loglevel=${loglevel} 
${panicarg} ${extraargs}
stderr=serial
stdin=serial
stdout=serial


> 12 окт. 2016 г., в 17:09, Jaehoon Chung  написал(а):
> 
> On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
>> In order to exclude possible errors on my board, i get MarsBoard A20 Lite, 
>> desolder nand, and put on emmc pads my emmc flash.
>> So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel can 
>> init emmc, and i got /dev/mmcblkp1, works well.
>> But when i eject sd and try to boot from sdc2 emmc, get the same err 17. 
>> In this case i have used some old uboot from marsboard site, because 
>> mainline u-boot have not config for a20 marsboard.
>> 
>> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
>> Board: MarsBoard-A20 & MarsPI
>> DRAM: 1024 MiB
>> CPU: 96000Hz, AXI/AHB/APB: 3/2/2
>> Card did not respond to voltage select!
> 
> This log means that there is no card on slot..
> In my case..when i set the wrong mmc boot dev in environment, I had seen the 
> similar log.
> Could you share the environment values?
> 
>> spl: mmc init failed: err - -17
>> ### ERROR ### Please RESET the board ###
>> 
>> So, the problem with eMMC KLM4G1FE3B-B001 is exists(
>> Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
> 
> I'm not sure...100% working card...because we don't ensure 100% what problem 
> there are in mainline u-boot.
> 
>> 
>>> 7 окт. 2016 г., в 14:44, Alexandr Bochkarev >> > написал(а):
>>> 
>>> Hi!
>>> Very appreciate your help! Hope we will fix it, because my board will be 
>>> garbage without emmc (
>>> So, my steps:
>>> 
>>> git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot;
>>> make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig
>>> make CROSS_COMPILE=arm-linux-gnueabihf-
>>> 
>>> Also turn on CONFIG_MMC_TRACE
> 
> the below log seems that is nothing to do..arguments/response 
> data..everything are 0..
> It's strange.
> 
> 
> Best Regards,
> Jaehoon Chung
> 
>>> 
>>> After run, got:
>>> 
>>> Trying to boot from MMC1
>>> CMD_SEND:0
>>> ..ARG... 0x
>>> ..MMC_RSP_NONE
>>> CMD_SEND:8
>>> ..ARG... 0x
>>> ..RET... -110
>>> CMD_SEND:55
>>> ..ARG... 0x
>>> ..RET... -110
>>> CMD_SEND:0
>>> ..ARG... 0x
>>> ..MMC_RSP_NONE
>>> CMD_SEND:1
>>> ..ARG... 0x
>>> ..MMC_RSP_R3,4.. 0x 
>>> CMD_SEND:1
>>> ..ARG... 0x
>>> ..MMC_RSP_R3,4.. 0x 
>>> CMD_SEND:0
>>> ..ARG... 0x
>>> ..MMC_RSP_NONE
>>> CMD_SEND:1
>>> ..ARG... 0x
>>> ..MMC_RSP_R3,4.. 0x 
>>> CMD_SEND:1
>>> ..ARG... 0x
>>> ..MMC_RSP_R3,4.. 0x 
>>> CMD_SEND:2
>>> ..ARG... 0x
>>> ..MMC_RSP_R2.. 0x 
>>> ..  .. 0x 
>>> ..  .. 0x 
>>> ..  .. 0x 
>>> 
>>> .DUMPING DATA
>>> .000 - 00 00 00 00 
>>> .004

Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Jaehoon Chung
Added Hans (sunxi maintainer)

On 10/12/2016 08:25 PM, Alexandr Bochkarev wrote:
>> This log means that there is no card on slot..
> But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
> 
> Now i tried, boot marsboard from sd, hit button to stop kernel loading.
> sun7i# mmc list
> SUNXI SD/MMC: 0
> 
> Looks like its doesnt see emmc on sdc2.

If i misunderstood something, let me know, plz. :)
(Because i don't have targets relevant to sunxi..)

U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
-> This is right? 2014?

What did you mean sdc0/sdc1/sdc2...do you mean the hardware line?
If it's hardware line..sdc0 is for eMMC?

"Card did not respond to voltage select!"
1. There is no card on slot..
2. Power doesn't supply..

Did you check everything? Power, clock, gpio pin..


Best Regards,
Jaehoon Chung

> 
> 
> sun7i# printenv
> Environment size: 1919/131068 bytes
> autoboot=run loadkernel && run setargs && true && bootm 0x4800
> baudrate=115200
> boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x4100; then 
> true; setenv stdout $saved_stdout; source 0x4100;else setenv stdout 
> $saved_stdout;fi
> bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env 
> import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo 
> Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to 
> ${bootscr};source ${scriptaddr};fi;run autoboot;
> bootdelay=2
> bootenv=uEnv.txt
> bootm_size=0x1000
> bootscr=boot.scr
> console=ttyS0,115200
> device=mmc
> ethact=dwmac.1c5
> ethaddr=02:d8:09:82:e3:9b
> kernel=uImage
> loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load 
> $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition 
> $scriptaddr ${bootenv}
> loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load 
> $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition 
> $scriptaddr ${bootscr}
> loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x4300 
> ${bootpath}${script} && ext2load $device $partition 0x4800 
> ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 
> 0x4300 ${script} && fatload $device $partition 0x4800 ${kernel};then 
> true; elif bootpath=/ && ext2load $device $partition 0x4300 
> ${bootpath}${script} && ext2load $device $partition 0x4800 
> ${bootpath}${kernel};then true; else false;fi
> loglevel=8
> panicarg=panic=10
> partition=0:1
> script=script.bin
> scriptaddr=0x4400
> setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; then 
> root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; 
> setenv bootargs console=${console} root=${root} loglevel=${loglevel} 
> ${panicarg} ${extraargs}
> stderr=serial
> stdin=serial
> stdout=serial
> 
> 
>> 12 окт. 2016 г., в 17:09, Jaehoon Chung  написал(а):
>>
>> On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
>>> In order to exclude possible errors on my board, i get MarsBoard A20 Lite, 
>>> desolder nand, and put on emmc pads my emmc flash.
>>> So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel 
>>> can init emmc, and i got /dev/mmcblkp1, works well.
>>> But when i eject sd and try to boot from sdc2 emmc, get the same err 17. 
>>> In this case i have used some old uboot from marsboard site, because 
>>> mainline u-boot have not config for a20 marsboard.
>>>
>>> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
>>> Board: MarsBoard-A20 & MarsPI
>>> DRAM: 1024 MiB
>>> CPU: 96000Hz, AXI/AHB/APB: 3/2/2
>>> Card did not respond to voltage select!
>>
>> This log means that there is no card on slot..
>> In my case..when i set the wrong mmc boot dev in environment, I had seen the 
>> similar log.
>> Could you share the environment values?
>>
>>> spl: mmc init failed: err - -17
>>> ### ERROR ### Please RESET the board ###
>>>
>>> So, the problem with eMMC KLM4G1FE3B-B001 is exists(
>>> Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
>>
>> I'm not sure...100% working card...because we don't ensure 100% what problem 
>> there are in mainline u-boot.
>>
>>>
 7 окт. 2016 г., в 14:44, Alexandr Bochkarev >>> > написал(а):

 Hi!
 Very appreciate your help! Hope we will fix it, because my board will be 
 garbage without emmc (
 So, my steps:

 git clone git://git.denx.de/u-boot.git --depth 1; cd u-boot;
 make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime_defconfig
 make CROSS_COMPILE=arm-linux-gnueabihf-

 Also turn on CONFIG_MMC_TRACE
>>
>> the below log seems that is nothing to do..arguments/response 
>> data..everything are 0..
>> It's strange.
>>
>>
>> Best Regards,
>> Jaehoon Chung
>>

 After run, got:

 Trying to boot from MMC1
 CMD_SEND:0
 ..ARG... 0x
 ..MMC_RSP_NONE
 CMD_SEND:8
 ..ARG..

[U-Boot] [PATCH v4 1/2] common/Kconfig: Add DISPLAY_CPUINFO

2016-10-12 Thread Tom Rini
From: Lokesh Vutla 

Create a Kconfig entry for DISPLAY_CPUINFO and make it be the default
in certain architectures.  Migrate all config files.

Signed-off-by: Lokesh Vutla 
Signed-off-by: Tom Rini 
---
 arch/blackfin/include/asm/config.h   | 1 -
 common/Kconfig   | 8 
 configs/ap121_defconfig  | 1 +
 configs/ap143_defconfig  | 1 +
 configs/at91rm9200ek_defconfig   | 1 +
 configs/at91rm9200ek_ram_defconfig   | 1 +
 configs/bcm11130_defconfig   | 1 +
 configs/bcm11130_nand_defconfig  | 1 +
 configs/bcm23550_w1d_defconfig   | 1 +
 configs/bcm28155_ap_defconfig| 1 +
 configs/bcm28155_w1d_defconfig   | 1 +
 configs/bcm911360_entphn-ns_defconfig| 1 +
 configs/bcm911360_entphn_defconfig   | 1 +
 configs/bcm911360k_defconfig | 1 +
 configs/bcm958300k-ns_defconfig  | 1 +
 configs/bcm958300k_defconfig | 1 +
 configs/bcm958305k_defconfig | 1 +
 configs/bcm958622hr_defconfig| 1 +
 configs/brppt1_mmc_defconfig | 1 +
 configs/brppt1_nand_defconfig| 1 +
 configs/brppt1_spi_defconfig | 1 +
 configs/brxre1_defconfig | 1 +
 configs/calimain_defconfig   | 1 +
 configs/chromebook_jerry_defconfig   | 1 +
 configs/cm_t43_defconfig | 1 +
 configs/da850_am18xxevm_defconfig| 1 +
 configs/da850evm_defconfig   | 1 +
 configs/da850evm_direct_nor_defconfig| 1 +
 configs/dragonboard410c_defconfig| 1 +
 configs/ea20_defconfig   | 1 +
 configs/edb9315a_defconfig   | 1 +
 configs/espresso7420_defconfig   | 1 +
 configs/evb-rk3036_defconfig | 1 +
 configs/evb-rk3288_defconfig | 1 +
 configs/evb-rk3399_defconfig | 1 +
 configs/fennec-rk3288_defconfig  | 1 +
 configs/firefly-rk3288_defconfig | 1 +
 configs/h2200_defconfig  | 1 +
 configs/highbank_defconfig   | 1 +
 configs/hikey_defconfig  | 1 +
 configs/integratorap_cm720t_defconfig| 1 +
 configs/integratorap_cm920t_defconfig| 1 +
 configs/integratorap_cm926ejs_defconfig  | 1 +
 configs/integratorap_cm946es_defconfig   | 1 +
 configs/integratorcp_cm1136_defconfig| 1 +
 configs/integratorcp_cm920t_defconfig| 1 +
 configs/integratorcp_cm926ejs_defconfig  | 1 +
 configs/integratorcp_cm946es_defconfig   | 1 +
 configs/ipam390_defconfig| 1 +
 configs/kylin-rk3036_defconfig   | 1 +
 configs/legoev3_defconfig| 1 +
 configs/miniarm-rk3288_defconfig | 1 +
 configs/mvebu_db-88f3720_defconfig   | 1 +
 configs/mvebu_db-88f7040_defconfig   | 1 +
 configs/mx53loco_defconfig   | 1 +
 configs/odroid-c2_defconfig  | 1 +
 configs/omapl138_lcdk_defconfig  | 1 +
 configs/pm9261_defconfig | 1 +
 configs/pm9g45_defconfig | 1 +
 configs/popmetal-rk3288_defconfig| 1 +
 configs/pxm2_defconfig   | 1 +
 configs/rock2_defconfig  | 1 +
 configs/rpi_2_defconfig  | 1 +
 configs/rpi_3_32b_defconfig  | 1 +
 configs/rpi_3_defconfig  | 1 +
 configs/rpi_defconfig| 1 +
 configs/rut_defconfig| 1 +
 configs/stm32f429-discovery_defconfig| 1 +
 configs/stm32f746-disco_defconfig| 1 +
 configs/stv0991_defconfig| 1 +
 configs/thunderx_88xx_defconfig  | 1 +
 configs/ti814x_evm_defconfig | 1 +
 configs/tplink_wdr4300_defconfig | 1 +
 configs/vexpress_aemv8a_dram_defconfig   | 1 +
 configs/vexpress_aemv8a_juno_defconfig   | 1 +
 configs/vexpress_aemv8a_semi_defconfig   | 1 +
 configs/vexpress_ca15_tc2_defconfig  | 1 +
 configs/vexpress_ca5x2_defconfig | 1 +
 configs/vexpress_ca9x4_defconfig | 1 +
 configs/xilinx_zynqmp_ep_defconfig   | 1 +
 configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig | 1 +
 configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig | 1 +
 configs/xilinx_zynqmp_zc1751_xm018_dc4_defconfig | 1 +
 configs/xilinx_zynqmp_zc1751_xm019_dc5_defconfig | 1 +
 configs/xilinx_zynqmp_zcu102_defconfig   | 1 +
 configs/xilinx_zynqmp_zcu102

Re: [U-Boot] SPL load ARM Trusted Firmware BL31?

2016-10-12 Thread Michal Simek
On 12.10.2016 13:18, Mike Looijmans wrote:
> On 11-10-16 13:00, Dan Handley wrote:
>>>
> 
> Kind regards,
> 
> Mike Looijmans
> System Expert
> 
> TOPIC Products
> Materiaalweg 4, NL-5681 RJ Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79
> E-mail: mike.looijm...@topicproducts.com
> Website: www.topicproducts.com
> 
> Please consider the environment before printing this e-mail
> 
> 
> 
> 
> 
> -Original Message-
>>> From: Masahiro Yamada [mailto:yamada.masah...@socionext.com]
>>> Sent: 05 October 2016 04:19
>>> Hi.
>>>
>>> Recently I implemented ARM Trusted Firmware BL31 for my SoCs.
>>>
>>> But, I am wondering how the boot-flow should be.
>>>
>> I'm no U-Boot expert but as ARM Trusted Firmware (TF) maintainer, I
>> feel I should say something here.
>>
>> In general we expect partners to take the bits of TF that work best
>> for them. So all the bootflows discussed in this thread are valid as
>> far as I'm concerned:
>>
>> Proprietary Boot ROM -> Proprietary firmware -> TF BL31 -> U-Boot ->
>> Linux
>>
>> Proprietary Boot ROM -> U-Boot SPL -> TF BL31 -> Full U-Boot -> Linux
>>
>> TF BL1 -> TF BL2 -> TF BL31 -> U-Boot or UEFI (BL33) -> Linux
> 
> Regardless of choice here, it would be nice if all those blobs could be
> combined into a single image. Currently the system spends most of its
> boot time looking up binaries, and copying them around from device into
> memory and then relocate them to a final destination.
> 
> The current situation is that I need to create a bunch of tiny flash
> partitions: SPL, BL31, U-boot, devicetree, ...
> 
> What I WANT to have is just one "boot" partition that holds SPL, BL31
> and u-boot, and then have big u-boot access a filesystem (UBI, FAT or
> EXT) to continue from there.


I haven't had a time but Simon sent binman which can solve at least the
part of this.

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev
On marsboard today i used 2014 u-boot, sd card on sdc0 hardware lines and emmc 
on sdc2 hardware lines.
and get error "Card did not respond to voltage select!» , then i tried to boot 
without sd card, only with emmc on sdc2

On my board i used mainline u-boot, emmc on sdc0 hardware lines.
And get block read error, logs below.

Brom on A20 chip firstly tries sdc0, if fail, then sdc2.

I dont checked only gpio pins, maybe in det pin problem, i will try, thx.


> 12 окт. 2016 г., в 18:05, Jaehoon Chung  написал(а):
> 
> Added Hans (sunxi maintainer)
> 
> On 10/12/2016 08:25 PM, Alexandr Bochkarev wrote:
>>> This log means that there is no card on slot..
>> But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
>> 
>> Now i tried, boot marsboard from sd, hit button to stop kernel loading.
>> sun7i# mmc list
>> SUNXI SD/MMC: 0
>> 
>> Looks like its doesnt see emmc on sdc2.
> 
> If i misunderstood something, let me know, plz. :)
> (Because i don't have targets relevant to sunxi..)
> 
> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
> -> This is right? 2014?
> 
> What did you mean sdc0/sdc1/sdc2...do you mean the hardware line?
> If it's hardware line..sdc0 is for eMMC?
> 
> "Card did not respond to voltage select!"
> 1. There is no card on slot..
> 2. Power doesn't supply..
> 
> Did you check everything? Power, clock, gpio pin..
> 
> 
> Best Regards,
> Jaehoon Chung
> 
>> 
>> 
>> sun7i# printenv
>> Environment size: 1919/131068 bytes
>> autoboot=run loadkernel && run setargs && true && bootm 0x4800
>> baudrate=115200
>> boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x4100; then 
>> true; setenv stdout $saved_stdout; source 0x4100;else setenv stdout 
>> $saved_stdout;fi
>> bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env 
>> import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo 
>> Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to 
>> ${bootscr};source ${scriptaddr};fi;run autoboot;
>> bootdelay=2
>> bootenv=uEnv.txt
>> bootm_size=0x1000
>> bootscr=boot.scr
>> console=ttyS0,115200
>> device=mmc
>> ethact=dwmac.1c5
>> ethaddr=02:d8:09:82:e3:9b
>> kernel=uImage
>> loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load 
>> $device $partition $scriptaddr boot/${bootenv} || ext2load $device 
>> $partition $scriptaddr ${bootenv}
>> loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load 
>> $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition 
>> $scriptaddr ${bootscr}
>> loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x4300 
>> ${bootpath}${script} && ext2load $device $partition 0x4800 
>> ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device 
>> $partition 0x4300 ${script} && fatload $device $partition 0x4800 
>> ${kernel};then true; elif bootpath=/ && ext2load $device $partition 
>> 0x4300 ${bootpath}${script} && ext2load $device $partition 0x4800 
>> ${bootpath}${kernel};then true; else false;fi
>> loglevel=8
>> panicarg=panic=10
>> partition=0:1
>> script=script.bin
>> scriptaddr=0x4400
>> setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; 
>> then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; 
>> fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} 
>> ${panicarg} ${extraargs}
>> stderr=serial
>> stdin=serial
>> stdout=serial
>> 
>> 
>>> 12 окт. 2016 г., в 17:09, Jaehoon Chung  написал(а):
>>> 
>>> On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
 In order to exclude possible errors on my board, i get MarsBoard A20 Lite, 
 desolder nand, and put on emmc pads my emmc flash.
 So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel 
 can init emmc, and i got /dev/mmcblkp1, works well.
 But when i eject sd and try to boot from sdc2 emmc, get the same err 17. 
 In this case i have used some old uboot from marsboard site, because 
 mainline u-boot have not config for a20 marsboard.
 
 U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
 Board: MarsBoard-A20 & MarsPI
 DRAM: 1024 MiB
 CPU: 96000Hz, AXI/AHB/APB: 3/2/2
 Card did not respond to voltage select!
>>> 
>>> This log means that there is no card on slot..
>>> In my case..when i set the wrong mmc boot dev in environment, I had seen 
>>> the similar log.
>>> Could you share the environment values?
>>> 
 spl: mmc init failed: err - -17
 ### ERROR ### Please RESET the board ###
 
 So, the problem with eMMC KLM4G1FE3B-B001 is exists(
 Maybe you know some cheap emmc, which is 100% works with mainline u-boot?
>>> 
>>> I'm not sure...100% working card...because we don't ensure 100% what 
>>> problem there are in mainline u-boot.
>>> 
 
> 7 окт. 2016 г., в 14:44, Alexandr Bochkarev  > написал(а):
> 

[U-Boot] [PATCH] ARM: uniphier: fix addresses of Cortex-A72 gear setting macros

2016-10-12 Thread Masahiro Yamada
My mistake during copy-paste work.

Signed-off-by: Masahiro Yamada 
---

 arch/arm/mach-uniphier/sc64-regs.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-uniphier/sc64-regs.h 
b/arch/arm/mach-uniphier/sc64-regs.h
index 780fdd1..b0a4281 100644
--- a/arch/arm/mach-uniphier/sc64-regs.h
+++ b/arch/arm/mach-uniphier/sc64-regs.h
@@ -63,9 +63,9 @@
 #define   SC_CLKCTRL7_UMC31(1 << 1)
 #define   SC_CLKCTRL7_UMC30(1 << 0)
 
-#define SC_CA72_GEARST (SC_BASE_ADDR | 0x8080)
-#define SC_CA72_GEARSET(SC_BASE_ADDR | 0x8084)
-#define SC_CA72_GEARUPD(SC_BASE_ADDR | 0x8088)
+#define SC_CA72_GEARST (SC_BASE_ADDR | 0x8000)
+#define SC_CA72_GEARSET(SC_BASE_ADDR | 0x8004)
+#define SC_CA72_GEARUPD(SC_BASE_ADDR | 0x8008)
 #define SC_CA53_GEARST (SC_BASE_ADDR | 0x8080)
 #define SC_CA53_GEARSET(SC_BASE_ADDR | 0x8084)
 #define SC_CA53_GEARUPD(SC_BASE_ADDR | 0x8088)
-- 
1.9.1

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


[U-Boot] [PATCH v3 2/3] config: ls1012aqds: Add USB EHCI support for ls1012aqds

2016-10-12 Thread Rajesh Bhagat
Add USB EHCI support for ls1012aqds platform

Signed-off-by: Rajat Srivastava 
Signed-off-by: Rajesh Bhagat 
---
Changes in v3:
 - Rebased to u-boot-usb master

Changes in v2: 
 - None

 arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h | 1 +
 include/configs/ls1012aqds.h   | 2 ++
 include/usb/ehci-ci.h  | 2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h 
b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
index df51871..14de100 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
@@ -34,6 +34,7 @@
 #define CONFIG_SYS_XHCI_USB1_ADDR  (CONFIG_SYS_IMMR + 0x01f0)
 #define CONFIG_SYS_XHCI_USB2_ADDR  (CONFIG_SYS_IMMR + 0x0200)
 #define CONFIG_SYS_XHCI_USB3_ADDR  (CONFIG_SYS_IMMR + 0x0210)
+#define CONFIG_SYS_EHCI_USB1_ADDR  (CONFIG_SYS_IMMR + 0x0760)
 #define CONFIG_SYS_PCIE1_ADDR  (CONFIG_SYS_IMMR + 0x240)
 #define CONFIG_SYS_PCIE2_ADDR  (CONFIG_SYS_IMMR + 0x250)
 #define CONFIG_SYS_PCIE3_ADDR  (CONFIG_SYS_IMMR + 0x260)
diff --git a/include/configs/ls1012aqds.h b/include/configs/ls1012aqds.h
index 54abf30..7566f1a 100644
--- a/include/configs/ls1012aqds.h
+++ b/include/configs/ls1012aqds.h
@@ -118,6 +118,8 @@
 #ifdef CONFIG_HAS_FSL_DR_USB
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_FSL
+#define CONFIG_USB_ULPI
+#define CONFIG_USB_ULPI_VIEWPORT
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 #endif
 
diff --git a/include/usb/ehci-ci.h b/include/usb/ehci-ci.h
index 882aed4..38d557c 100644
--- a/include/usb/ehci-ci.h
+++ b/include/usb/ehci-ci.h
@@ -159,7 +159,7 @@
 #elif defined(CONFIG_MPC512X)
 #define CONFIG_SYS_FSL_USB1_ADDR CONFIG_SYS_MPC512x_USB1_ADDR
 #define CONFIG_SYS_FSL_USB2_ADDR   0
-#elif defined(CONFIG_LS102XA)
+#elif defined(CONFIG_LS102XA) || defined(CONFIG_ARCH_LS1012A)
 #define CONFIG_SYS_FSL_USB1_ADDR CONFIG_SYS_EHCI_USB1_ADDR
 #define CONFIG_SYS_FSL_USB2_ADDR0
 #endif
-- 
2.6.2.198.g614a2ac

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


[U-Boot] [PATCH] armv8/ls1043a: Add the OCRAM initialization

2016-10-12 Thread Pratiyush Srivastava
Clear the content to zero and the ECC error bit of OCRAM1/2.

The OCRAM must be initialized to ZERO by the unit of 8-Byte before
accessing it, or else it will generate ECC error. And the IBR has
accessed the OCRAM before this initialization, so the ECC error
status bit should to be cleared.

Signed-off-by: Pratiyush Srivastava 
Signed-off-by: Hou Zhiqiang 
Signed-off-by: Prabhakar Kushwaha 
---
 arch/arm/cpu/armv8/start.S | 39 +++
 1 file changed, 39 insertions(+)

diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index 19c771d..24fed46 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -11,6 +11,9 @@
 #include 
 #include 
 
+#define DCSR_SYS_DCFG_SBEESR2  0x20140534
+#define DCSR_SYS_DCFG_MBEESR2  0x20140544
+
 /*
  *
  * Startup Code (reset vector)
@@ -259,10 +262,46 @@ WEAK(lowlevel_init)
 #endif /* CONFIG_ARMV8_MULTIENTRY */
 
 2:
+#if defined(CONFIG_FSL_LSCH2) && !defined(CONFIG_SPL_BUILD)
+   bl  fsl_ocram_init
+#endif
mov lr, x29 /* Restore LR */
ret
 ENDPROC(lowlevel_init)
 
+#if defined(CONFIG_FSL_LSCH2) && !defined(CONFIG_SPL_BUILD)
+ENTRY(fsl_ocram_init)
+   mov x28, lr /* Save LR */
+   bl  fsl_clear_ocram
+   bl  fsl_ocram_clear_ecc_err
+   mov lr, x28 /* Restore LR */
+   ret
+ENDPROC(fsl_ocram_init)
+
+ENTRY(fsl_clear_ocram)
+/* Clear OCRAM */
+   ldr x0, =CONFIG_SYS_FSL_OCRAM_BASE
+   ldr x1, =(CONFIG_SYS_FSL_OCRAM_BASE + CONFIG_SYS_FSL_OCRAM_SIZE)
+   mov x2, #0
+clear_loop:
+   str x2, [x0]
+   add x0, x0, #8
+   cmp x0, x1
+   b.loclear_loop
+   ret
+ENDPROC(fsl_clear_ocram)
+
+ENTRY(fsl_ocram_clear_ecc_err)
+   /* OCRAM1/2 ECC status bit */
+   mov w1, #0x60
+   ldr x0, =DCSR_SYS_DCFG_SBEESR2
+   str w1, [x0]
+   ldr x0, =DCSR_SYS_DCFG_MBEESR2
+   str w1, [x0]
+   ret
+ENDPROC(fsl_ocram_init)
+#endif
+
 WEAK(smp_kick_all_cpus)
/* Kick secondary cpus up by SGI 0 interrupt */
 #if defined(CONFIG_GICV2) || defined(CONFIG_GICV3)
-- 
2.7.4

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


Re: [U-Boot] [PATCH v4 2/2] commmon: Add DISPLAY_BOARDINFO

2016-10-12 Thread Masahiro Yamada
2016-10-12 21:07 GMT+09:00 Tom Rini :
> From: Lokesh Vutla 
>
> Create a Kconfig entry for DISPLAY_BOARDINFO and make it be the default
> in certain architectures.  Migrate all config files.
>
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Tom Rini 


Nit: commmon -> common




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


Re: [U-Boot] [PATCH v4 2/2] commmon: Add DISPLAY_BOARDINFO

2016-10-12 Thread Tom Rini
On Wed, Oct 12, 2016 at 09:19:10PM +0900, Masahiro Yamada wrote:
> 2016-10-12 21:07 GMT+09:00 Tom Rini :
> > From: Lokesh Vutla 
> >
> > Create a Kconfig entry for DISPLAY_BOARDINFO and make it be the default
> > in certain architectures.  Migrate all config files.
> >
> > Signed-off-by: Lokesh Vutla 
> > Signed-off-by: Tom Rini 
> 
> Nit: commmon -> common

Oops, 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] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Jaehoon Chung
On 10/12/2016 09:11 PM, Alexandr Bochkarev wrote:
> On marsboard today i used 2014 u-boot, sd card on sdc0 hardware lines and 
> emmc on sdc2 hardware lines.
> and get error "Card did not respond to voltage select!» , then i tried to 
> boot without sd card, only with emmc on sdc2
> 
> On my board i used mainline u-boot, emmc on sdc0 hardware lines.
> And get block read error, logs below.
> 
> Brom on A20 chip firstly tries sdc0, if fail, then sdc2.

I understood more clearly...Your target for using is sdc0(eMMC), right?
- marsboard for just testing is sdc0 (SD-card)..

> 
> I dont checked only gpio pins, maybe in det pin problem, i will try, thx.

If det-pin problem, it should be fixed too easy. :)
I will try to check codes relevant to sunxi..

Sorry for helping more clearly..

> 
> 
>> 12 окт. 2016 г., в 18:05, Jaehoon Chung  написал(а):
>>
>> Added Hans (sunxi maintainer)
>>
>> On 10/12/2016 08:25 PM, Alexandr Bochkarev wrote:
 This log means that there is no card on slot..
>>> But then i tried my board with mainline u-boot, emmc was on sdc0 lines.
>>>
>>> Now i tried, boot marsboard from sd, hit button to stop kernel loading.
>>> sun7i# mmc list
>>> SUNXI SD/MMC: 0
>>>
>>> Looks like its doesnt see emmc on sdc2.
>>
>> If i misunderstood something, let me know, plz. :)
>> (Because i don't have targets relevant to sunxi..)
>>
>> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
>> -> This is right? 2014?
>>
>> What did you mean sdc0/sdc1/sdc2...do you mean the hardware line?
>> If it's hardware line..sdc0 is for eMMC?
>>
>> "Card did not respond to voltage select!"
>> 1. There is no card on slot..
>> 2. Power doesn't supply..
>>
>> Did you check everything? Power, clock, gpio pin..
>>
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>
>>>
>>> sun7i# printenv
>>> Environment size: 1919/131068 bytes
>>> autoboot=run loadkernel && run setargs && true && bootm 0x4800
>>> baudrate=115200
>>> boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x4100; then 
>>> true; setenv stdout $saved_stdout; source 0x4100;else setenv stdout 
>>> $saved_stdout;fi
>>> bootcmd=if run loadbootenv; then echo Loaded environment from 
>>> ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n 
>>> "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run 
>>> loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run 
>>> autoboot;
>>> bootdelay=2
>>> bootenv=uEnv.txt
>>> bootm_size=0x1000
>>> bootscr=boot.scr
>>> console=ttyS0,115200
>>> device=mmc
>>> ethact=dwmac.1c5
>>> ethaddr=02:d8:09:82:e3:9b
>>> kernel=uImage
>>> loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load 
>>> $device $partition $scriptaddr boot/${bootenv} || ext2load $device 
>>> $partition $scriptaddr ${bootenv}
>>> loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load 
>>> $device $partition $scriptaddr boot/${bootscr} ||ext2load $device 
>>> $partition $scriptaddr ${bootscr}
>>> loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x4300 
>>> ${bootpath}${script} && ext2load $device $partition 0x4800 
>>> ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device 
>>> $partition 0x4300 ${script} && fatload $device $partition 0x4800 
>>> ${kernel};then true; elif bootpath=/ && ext2load $device $partition 
>>> 0x4300 ${bootpath}${script} && ext2load $device $partition 0x4800 
>>> ${bootpath}${kernel};then true; else false;fi
>>> loglevel=8
>>> panicarg=panic=10
>>> partition=0:1
>>> script=script.bin
>>> scriptaddr=0x4400
>>> setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; 
>>> then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; 
>>> fi; fi; setenv bootargs console=${console} root=${root} 
>>> loglevel=${loglevel} ${panicarg} ${extraargs}
>>> stderr=serial
>>> stdin=serial
>>> stdout=serial
>>>
>>>
 12 окт. 2016 г., в 17:09, Jaehoon Chung  
 написал(а):

 On 10/12/2016 07:52 PM, Alexandr Bochkarev wrote:
> In order to exclude possible errors on my board, i get MarsBoard A20 
> Lite, desolder nand, and put on emmc pads my emmc flash.
> So emmc is on sdc2 lines. When iam booting from sd on sdc1, linux kernel 
> can init emmc, and i got /dev/mmcblkp1, works well.
> But when i eject sd and try to boot from sdc2 emmc, get the same err 17. 
> In this case i have used some old uboot from marsboard site, because 
> mainline u-boot have not config for a20 marsboard.
>
> U-Boot SPL 2014.04-10685-g4af825f-dirty (Jun 14 2014 - 17:55:48)
> Board: MarsBoard-A20 & MarsPI
> DRAM: 1024 MiB
> CPU: 96000Hz, AXI/AHB/APB: 3/2/2
> Card did not respond to voltage select!

 This log means that there is no card on slot..
 In my case..when i set the wrong mmc boot dev in environment, I had seen 
 the similar log.
 Could you share the environment values?

> spl: mmc init failed: err - -17
>>

Re: [U-Boot] [PATCH v4 1/2] common/Kconfig: Add DISPLAY_CPUINFO

2016-10-12 Thread Tom Rini
On Wed, Oct 12, 2016 at 08:07:44AM -0400, Tom Rini wrote:

> From: Lokesh Vutla 
> 
> Create a Kconfig entry for DISPLAY_CPUINFO and make it be the default
> in certain architectures.  Migrate all config files.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v4 2/2] common: Add DISPLAY_BOARDINFO

2016-10-12 Thread Tom Rini
On Wed, Oct 12, 2016 at 08:07:45AM -0400, Tom Rini wrote:

> From: Lokesh Vutla 
> 
> Create a Kconfig entry for DISPLAY_BOARDINFO and make it be the default
> in certain architectures.  Migrate all config files.
> 
> Signed-off-by: Lokesh Vutla 
> Signed-off-by: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev

> I understood more clearly...Your target for using is sdc0(eMMC), right?
Yes

Now i have checked det pin on my board. I use standart 
A20-OLinuXino-Lime_defconfig with my board.
So PH1 is pull-fown. No changes if just remove det pin

U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:12:37)
DRAM: 512 MiB
Failed to set core voltage! Can't set CPU frequency
Trying to boot from MMC1
mmc_bread: Failed to read blocks
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###



Then , i removed det pin from config and build again. Burn it to emmc(sdc2) on 
marsboard and tried to boot this board with mainline u-boot, not 2014 as before 
and get this.

U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:24:58)
DRAM: 1024 MiB
CPU: 91200Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC2
MMC Device 1 not found
spl: could not find mmc device. error: -19
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Something new, error code is 19 ) Looks like it see that no card on sdc0 and 
found emmc on sdc2, but fails.
Same code on my board never tries mmc2, so it part works

> I will try to check codes relevant to sunxi..

I hope on your help, thank you very much


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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev
Now i found and add 2 in mmc_extra_slot_number config, compile and burn on 
marsboard emmc(sdc2)
Got absolutely the same output, as from my board, except mmc number

U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:48:07)
DRAM: 1024 MiB
CPU: 91200Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC2
CMD_SEND:0
..ARG... 0x
..MMC_RSP_NONE
CMD_SEND:8
..ARG... 0x
..RET... -110
CMD_SEND:55
..ARG... 0x
..RET... -110
CMD_SEND:0
..ARG... 0x
..MMC_RSP_NONE
CMD_SEND:1
..ARG... 0x
..MMC_RSP_R3,4.. 0x 
CMD_SEND:1
..ARG... 0x
..MMC_RSP_R3,4.. 0x 
CMD_SEND:0
..ARG... 0x
..MMC_RSP_NONE
CMD_SEND:1
..ARG... 0x
..MMC_RSP_R3,4.. 0x 
CMD_SEND:1
..ARG... 0x
..MMC_RSP_R3,4.. 0x 
CMD_SEND:2
..ARG... 0x
..MMC_RSP_R2.. 0x 
..  .. 0x 
..  .. 0x 
..  .. 0x 

.DUMPING DATA
.000 - 00 00 00 00 
.004 - 00 00 00 00 
.008 - 00 00 00 00 
.012 - 00 00 00 00 
CMD_SEND:3
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CMD_SEND:9
..ARG... 0x
..MMC_RSP_R2.. 0x 
..  .. 0x 
..  .. 0x 
..  .. 0x 

.DUMPING DATA
.000 - 00 00 00 00 
.004 - 00 00 00 00 
.008 - 00 00 00 00 
.012 - 00 00 00 00 
CMD_SEND:13
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CURR STATE:3
CMD_SEND:7
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CMD_SEND:8
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CMD_SEND:8
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CMD_SEND:6
..ARG... 0x
..MMC_RSP_R1b.. 0x 
CMD_SEND:13
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CURR STATE:4
CMD_SEND:8
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CMD_SEND:6
..ARG... 0x
..RET... -110
CMD_SEND:16
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x 
CMD_SEND:17
..ARG... 0x
..RET... -110
test 1 cmdidx: 17 
mmc_bread: Failed to read blocks
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###


> 12 окт. 2016 г., в 18:42, Alexandr Bochkarev  
> написал(а):
> 
> 
>> I understood more clearly...Your target for using is sdc0(eMMC), right?
> Yes
> 
> Now i have checked det pin on my board. I use standart 
> A20-OLinuXino-Lime_defconfig with my board.
> So PH1 is pull-fown. No changes if just remove det pin
> 
> U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:12:37)
> DRAM: 512 MiB
> Failed to set core voltage! Can't set CPU frequency
> Trying to boot from MMC1
> mmc_bread: Failed to read blocks
> mmc_load_image_raw_sector: mmc block read error
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
> 
> 
> 
> Then , i removed det pin from config and build again. Burn it to emmc(sdc2) 
> on marsboard and tried to boot this board with mainline u-boot, not 2014 as 
> before and get this.
> 
> U-Boot SPL 2016.11-rc1-g4dc34be-dirty (Oct 12 2016 - 18:24:58)
> DRAM: 1024 MiB
> CPU: 91200Hz, AXI/AHB/APB: 3/2/2
> Trying to boot from MMC2
> MMC Device 1 not found
> spl: could not find mmc device. error: -19
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
> 
> Something new, error code is 19 ) Looks like it see that no card on sdc0 and 
> found emmc on sdc2, but fails.
> Same code on my board never tries mmc2, so it part works
> 
>> I will try to check codes relevant to sunxi..
> 
> I hope on your help, thank you very much
> 
> 

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev
Now i boot marsboard from sd card with new config

=> mmc list
SUNXI SD/MMC: 0 (SD)
SUNXI SD/MMC: 1

=> mmc info
Device: SUNXI SD/MMC
Manufacturer ID: 2
OEM: 544d
Name: SA04G 
Tran Speed: 5000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

=> mmc part

Partition Map for MMC device 0  --   Partition Type: DOS

Part.Start Sector.Num Sectors.UUID..Type
  1.2048  .12288 .da1dcf13-01.83
  2.14336 .204800.da1dcf13-02.83
  3.219136.204800.da1dcf13-03.83
  4.423936.409600.da1dcf13-04.05 Extd
  5.425984.204800.da1dcf13-05.83
  6.632832.200704.da1dcf13-06.83

=> mmc dev 1
CMD_SEND:0
..ARG... 0x
..MMC_RSP_NONE
CMD_SEND:8
..ARG... 0x01AA
..RET... -110
CMD_SEND:55
..ARG... 0x
..RET... -110
CMD_SEND:0
..ARG... 0x
..MMC_RSP_NONE
CMD_SEND:1
..ARG... 0x
..MMC_RSP_R3,4.. 0x00FF8080 
CMD_SEND:1
..ARG... 0x4030
..MMC_RSP_R3,4.. 0x00FF8080 
CMD_SEND:0
..ARG... 0x
..MMC_RSP_NONE
CMD_SEND:1
..ARG... 0x4030
..MMC_RSP_R3,4.. 0x00FF8080 
CMD_SEND:1
..ARG... 0x4030
..MMC_RSP_R3,4.. 0xC0FF8080 
CMD_SEND:2
..ARG... 0x
..MMC_RSP_R2.. 0x1501004D 
..  .. 0x34473146 
..  .. 0x42030B01 
..  .. 0x7585C009 

.DUMPING DATA
.000 - 15 01 00 4D 
.004 - 34 47 31 46 
.008 - 42 03 0B 01 
.012 - 75 85 C0 09 
CMD_SEND:3
..ARG... 0x0001
..MMC_RSP_R1,5,6,7 . 0x0500 
CMD_SEND:9
..ARG... 0x0001
..MMC_RSP_R2.. 0xD0270132 
..  .. 0x0F5903FF 
..  .. 0xF6DBFFE7 
..  .. 0x8A404057 

.DUMPING DATA
.000 - D0 27 01 32 
.004 - 0F 59 03 FF 
.008 - F6 DB FF E7 
.012 - 8A 40 40 57 
CMD_SEND:13
..ARG... 0x0001
..MMC_RSP_R1,5,6,7 . 0x0700 
CURR STATE:3
CMD_SEND:7
..ARG... 0x0001
..MMC_RSP_R1,5,6,7 . 0x0700 
CMD_SEND:8
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x0900 
CMD_SEND:8
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x0900 
CMD_SEND:6
..ARG... 0x03B90100
..MMC_RSP_R1b.. 0x0900 
CMD_SEND:13
..ARG... 0x0001
..MMC_RSP_R1,5,6,7 . 0x0900 
CURR STATE:4
CMD_SEND:8
..ARG... 0x
..MMC_RSP_R1,5,6,7 . 0x0900 
CMD_SEND:6
..ARG... 0x03B70100
..RET... -110
CMD_SEND:16
..ARG... 0x0200
..MMC_RSP_R1,5,6,7 . 0x0900 
CMD_SEND:17
..ARG... 0x
..RET... -110
mmc_bread: Failed to read blocks
CMD_SEND:16
..ARG... 0x0200
..MMC_RSP_R1,5,6,7 . 0x0900 
CMD_SEND:17
..ARG... 0x
..RET... -110
mmc_bread: Failed to read blocks
CMD_SEND:16
..ARG... 0x0200
..MMC_RSP_R1,5,6,7 . 0x0900 
CMD_SEND:18
..ARG... 0x0040
..RET... -110
mmc_bread: Failed to read blocks
switch to partitions #0, OK
mmc1(part 0) is current device


=> mmc info
Device: SUNXI SD/MMC
Manufacturer ID: 15
OEM: 100
Name: M4G1F 
Tran Speed: 5200
Rd Block Len: 512
MMC version 4.4.1
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 1-bit
Erase Group Size: 512 KiB
HC WP Group Size: 4 MiB
User Capacity: 3.6 GiB WRREL
Boot Capacity: 1 MiB ENH
RPMB Capacity: 128 KiB ENH

=> mmc part
## Unknown partition table type 0




eMMC burned same image as SD. And seems like it doesnt switched to 4-bit bus 
width
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Jaehoon Chung
On 10/12/2016 10:11 PM, Alexandr Bochkarev wrote:
> Now i boot marsboard from sd card with new config

Good.

> 
> => mmc list
> SUNXI SD/MMC: 0 (SD)
> SUNXI SD/MMC: 1
> 
> => mmc info
> Device: SUNXI SD/MMC
> Manufacturer ID: 2
> OEM: 544d
> Name: SA04G 
> Tran Speed: 5000
> Rd Block Len: 512
> SD version 3.0
> High Capacity: Yes
> Capacity: 3.6 GiB
> Bus Width: 4-bit
> Erase Group Size: 512 Bytes
> 
> => mmc part
> 
> Partition Map for MMC device 0  --   Partition Type: DOS
> 
> Part.Start Sector.Num Sectors.UUID..Type
>   1.2048  .12288 .da1dcf13-01.83
>   2.14336 .204800.da1dcf13-02.83
>   3.219136.204800.da1dcf13-03.83
>   4.423936.409600.da1dcf13-04.05 Extd
>   5.425984.204800.da1dcf13-05.83
>   6.632832.200704.da1dcf13-06.83
> 
> => mmc dev 1
> CMD_SEND:0
> ..ARG... 0x
> ..MMC_RSP_NONE
> CMD_SEND:8
> ..ARG... 0x01AA
> ..RET... -110
> CMD_SEND:55
> ..ARG... 0x
> ..RET... -110
> CMD_SEND:0
> ..ARG... 0x
> ..MMC_RSP_NONE
> CMD_SEND:1
> ..ARG... 0x
> ..MMC_RSP_R3,4.. 0x00FF8080 
> CMD_SEND:1
> ..ARG... 0x4030
> ..MMC_RSP_R3,4.. 0x00FF8080 
> CMD_SEND:0
> ..ARG... 0x
> ..MMC_RSP_NONE
> CMD_SEND:1
> ..ARG... 0x4030
> ..MMC_RSP_R3,4.. 0x00FF8080 
> CMD_SEND:1
> ..ARG... 0x4030
> ..MMC_RSP_R3,4.. 0xC0FF8080 
> CMD_SEND:2
> ..ARG... 0x
> ..MMC_RSP_R2.. 0x1501004D 
> ..  .. 0x34473146 
> ..  .. 0x42030B01 
> ..  .. 0x7585C009 
> 
> .DUMPING DATA
> .000 - 15 01 00 4D 
> .004 - 34 47 31 46 
> .008 - 42 03 0B 01 
> .012 - 75 85 C0 09 
> CMD_SEND:3
> ..ARG... 0x0001
> ..MMC_RSP_R1,5,6,7 . 0x0500 
> CMD_SEND:9
> ..ARG... 0x0001
> ..MMC_RSP_R2.. 0xD0270132 
> ..  .. 0x0F5903FF 
> ..  .. 0xF6DBFFE7 
> ..  .. 0x8A404057 
> 
> .DUMPING DATA
> .000 - D0 27 01 32 
> .004 - 0F 59 03 FF 
> .008 - F6 DB FF E7 
> .012 - 8A 40 40 57 
> CMD_SEND:13
> ..ARG... 0x0001
> ..MMC_RSP_R1,5,6,7 . 0x0700 
> CURR STATE:3
> CMD_SEND:7
> ..ARG... 0x0001
> ..MMC_RSP_R1,5,6,7 . 0x0700 
> CMD_SEND:8
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x0900 
> CMD_SEND:8
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x0900 
> CMD_SEND:6
> ..ARG... 0x03B90100
> ..MMC_RSP_R1b.. 0x0900 
> CMD_SEND:13
> ..ARG... 0x0001
> ..MMC_RSP_R1,5,6,7 . 0x0900 
> CURR STATE:4
> CMD_SEND:8
> ..ARG... 0x
> ..MMC_RSP_R1,5,6,7 . 0x0900 
> CMD_SEND:6
> ..ARG... 0x03B70100
> ..RET... -110

Maybe at here..switch to buswidth..but failed.
define debug() in your mmc driver..or enable CONFIG_DEBUG..then you can see all 
debug message.

> CMD_SEND:16
> ..ARG... 0x0200
> ..MMC_RSP_R1,5,6,7 . 0x0900 
> CMD_SEND:17
> ..ARG... 0x
> ..RET... -110
> mmc_bread: Failed to read blocks
> CMD_SEND:16
> ..ARG... 0x0200
> ..MMC_RSP_R1,5,6,7 . 0x0900 
> CMD_SEND:17
> ..ARG... 0x
> ..RET... -110
> mmc_bread: Failed to read blocks
> CMD_SEND:16
> ..ARG... 0x0200
> ..MMC_RSP_R1,5,6,7 . 0x0900 
> CMD_SEND:18
> ..ARG... 0x0040
> ..RET... -110
> mmc_bread: Failed to read blocks
> switch to partitions #0, OK
> mmc1(part 0) is current device
> 
> 
> => mmc info
> Device: SUNXI SD/MMC
> Manufacturer ID: 15
> OEM: 100
> Name: M4G1F 
> Tran Speed: 5200
> Rd Block Len: 512
> MMC version 4.4.1
> High Capacity: Yes
> Capacity: 3.6 GiB
> Bus Width: 1-bit
> Erase Group Size: 512 KiB
> HC WP Group Size: 4 MiB
> User Capacity: 3.6 GiB WRREL
> Boot Capacity: 1 MiB ENH
> RPMB Capacity: 128 KiB ENH
> 
> => mmc part
> ## Unknown partition table type 0
> 
> 
> 
> 
> eMMC burned same image as SD. And seems like it doesnt switched to 4-bit bus 
> width

If you're setting MMC_MODE_8BIT..try to remove it..

> 
> 

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev

> 
> define debug() in your mmc driver..or enable CONFIG_DEBUG..then you can see 
> all debug message.
> 

When i define CONFIG_DEGUB, u-boot binary size is to large for a20 sram
I have tried to disable unused features in config, but its not enough

> 
> If you're setting MMC_MODE_8BIT..try to remove it..
> 
I am not never set 8 bit mode
And now found it defines

#define MMC_MODE_4BIT   (1 << 2)
#define MMC_MODE_8BIT   (1 << 3)

and replace with 

#define MMC_MODE_4BIT   (1 << 2)
#define MMC_MODE_8BIT   (1 << 2) //(1 << 3)

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


Re: [U-Boot] Please pull u-boot-fdt

2016-10-12 Thread Tom Rini
On Tue, Oct 11, 2016 at 02:29:01PM -0600, Simon Glass wrote:

> Hi Tom,
> 
> This is mostly syncing up with upstream. I have a few more things to do
> also (some small, some large).
> 
> 
> The following changes since commit f5fd45ff64e28a73499548358e3d1ceda0de7daf:
> 
>   Merge branch 'master' of git://www.denx.de/git/u-boot-imx (2016-10-08
> 09:33:37 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-fdt.git
> 
> for you to fetch changes up to 7f899e436fe1e952950a14df92600d68d55dea5c:
> 
>   libfdt: Drop inlining of fdt_path_offset() (2016-10-11 14:26:46 -0600)
> 

Something in here is breaking my TI J6 Eco platform.  I'll try and kick
a rebase and bisect of just this series later to pinpoint which one is
at fault (I'm testing all of the other stuff that piled up while my
power was out atm).  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] Please pull u-boot-fdt

2016-10-12 Thread Simon Glass
Hi Tom,

On 12 October 2016 at 08:13, Tom Rini  wrote:
> On Tue, Oct 11, 2016 at 02:29:01PM -0600, Simon Glass wrote:
>
>> Hi Tom,
>>
>> This is mostly syncing up with upstream. I have a few more things to do
>> also (some small, some large).
>>
>>
>> The following changes since commit f5fd45ff64e28a73499548358e3d1ceda0de7daf:
>>
>>   Merge branch 'master' of git://www.denx.de/git/u-boot-imx (2016-10-08
>> 09:33:37 -0400)
>>
>> are available in the git repository at:
>>
>>   git://git.denx.de/u-boot-fdt.git
>>
>> for you to fetch changes up to 7f899e436fe1e952950a14df92600d68d55dea5c:
>>
>>   libfdt: Drop inlining of fdt_path_offset() (2016-10-11 14:26:46 -0600)
>>
>
> Something in here is breaking my TI J6 Eco platform.  I'll try and kick
> a rebase and bisect of just this series later to pinpoint which one is
> at fault (I'm testing all of the other stuff that piled up while my
> power was out atm).  Thanks!

OK, let's hold off on this one until I've had time to do more testing also.

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


Re: [U-Boot] [PATCH] spi: Add support for MX66U51235F, MX66L1G45G and MT25QU02G

2016-10-12 Thread Chin Liang See
On Wed, 2016-10-12 at 09:15 -0500, dumitru.bac...@intel.com wrote:
> From: Radu Bacrau 
> 
> This commit adds support for the Macronix MX66U51235F, MX66L1G45G and
> Micron MT25QU02G flash parts.
> 
> Signed-off-by: Radu Bacrau 
> Cc: Chin Liang See 
> Cc: Dinh Nguyen 
> Cc: Jagan Teki 
> Cc: Radu Bacrau 
> ---
>  drivers/mtd/spi/sf_params.c | 3 +++
>  1 file changed, 3 insertions(+)
> 

Reviewed-by: Chin Liang See 

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


Re: [U-Boot] [RFC 1/4] drivers: dma: Add the ARM PL330 DMA driver

2016-10-12 Thread Chin Liang See
On Mon, 2016-10-10 at 10:52 -0500, Dinh Nguyen wrote:
> From: Dinh Nguyen 
> 
> Adopted from the Linux kernel PL330 DMA driver.
> 
> Signed-off-by: Dinh Nguyen 
> ---
>  arch/arm/include/asm/pl330.h | 105 +
>  drivers/dma/pl330.c  | 942
> +++
>  2 files changed, 1047 insertions(+)
>  create mode 100644 arch/arm/include/asm/pl330.h
>  create mode 100644 drivers/dma/pl330.c
> 
> diff --git a/arch/arm/include/asm/pl330.h
> b/arch/arm/include/asm/pl330.h
> new file mode 100644
> index 000..dd19b4c
> --- /dev/null
> +++ b/arch/arm/include/asm/pl330.h
> @@ -0,0 +1,105 @@
> +/*
> + * Copyright (C) 2010 Samsung Electronics Co. Ltd.
> + *   Jaswinder Singh 
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + *
> + * adapted from linux kernel pl330.h
> + */
> +
> +#ifndef  __PL330_H_
> +#define  __PL330_H_
> +
> +#define PL330_STATE_STOPPED  (1 << 0)
> +#define PL330_STATE_EXECUTING(1 << 1)
> +#define PL330_STATE_WFE  (1 << 2)
> +#define PL330_STATE_FAULTING (1 << 3)
> +#define PL330_STATE_COMPLETING   (1 << 4)
> +#define PL330_STATE_WFP  (1 << 5)
> +#define PL330_STATE_KILLING  (1 << 6)
> +#define PL330_STATE_FAULT_COMPLETING (1 << 7)
> +#define PL330_STATE_CACHEMISS(1 << 8)
> +#define PL330_STATE_UPDTPC   (1 << 9)
> +#define PL330_STATE_ATBARRIER(1 << 10)
> +#define PL330_STATE_QUEUEBUSY(1 << 11)
> +#define PL330_STATE_INVALID  (1 << 15)
> +
> +#define PL330_DMA_MAX_BURST_SIZE 3
> +

Not sure this is true for other platform. If not, this would need goto
include/configs header files.

[..]

> 
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
> new file mode 100644
> index 000..a97cd9f
> --- /dev/null
> +++ b/drivers/dma/pl330.c
> @@ -0,0 +1,942 @@
> +/*
> + * Copyright (c) 2012 Samsung Electronics Co., Ltd.
> + *   http://www.samsung.com
> + *
> + * Copyright (C) 2010 Samsung Electronics Co. Ltd.
> + *   Jaswinder Singh 
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> 

[..]

> +
> +static inline u32 _state(struct pl330_transfer_struct *pl330)
> +{
> + void __iomem *regs = pl330->reg_base;
> + u32 val;
> +
> + val = readl(regs + CS(pl330->channel_num)) & 0xf;
> +
> + udelay(1);
> +
> + switch (val) {
> + case DS_ST_STOP:
> + return PL330_STATE_STOPPED;
> + case DS_ST_EXEC:
> + return PL330_STATE_EXECUTING;
> + case DS_ST_CMISS:
> + return PL330_STATE_CACHEMISS;
> + case DS_ST_UPDTPC:
> + return PL330_STATE_UPDTPC;
> + case DS_ST_WFE:
> + return PL330_STATE_WFE;
> + case DS_ST_FAULT:
> + return PL330_STATE_FAULTING;
> + case DS_ST_ATBRR:
> + return PL330_STATE_ATBARRIER;

This state and below would yield difference between channel and
manager.

[..]

> 
> +/*
> + * DMA transfer setup (DMA_SUPPORTS_MEM_TO_MEM,
> DMA_SUPPORTS_MEM_TO_DEV or
> + DMA_SUPPORTS_DEV_TO_MEM)
> + * For Peripheral transfer, the FIFO threshold value is expected at
> + * 2 ^ pl330->brst_size * pl330->brst_len.
> + * Return:   1 for error or not successful
> + *
> + * channel_num   -   channel number assigned, valid from 0
> to 7
> + * src_addr  -   address to transfer from / source
> + * dst_addr  -   address to transfer to / destination
> + * len   -   number of bytes to be transferred
> + * brst_size -   valid from 0 - 3
> + *   where 0 = 1 (2 ^ 0) bytes and 3 = 8 bytes
> (2 ^ 3)
> + * single_brst_size -single transfer size (from 0 - 3)
> + * brst_len  -   valid from 1 - 16 where each burst can
> trasfer 1 - 16
> + *   data chunk (each chunk size equivalent to
> brst_size)
> + * peripheral_id assigned peripheral_id, valid from 0 to 31
> + * transfer_type DMA_SUPPORTS_MEM_TO_MEM,
> DMA_SUPPORTS_MEM_TO_DEV or
> + *   DMA_SUPPORTS_DEV_TO_MEM
> + * buf_size  -   sizeof(buf)
> + * buf   -   buffer handler which will point to
> the memory
> + *   allocated for dma microcode
> + */
> +static int pl330_transfer_setup(struct pl330_transfer_struct *pl330)
> +{
> + /* Variable declaration */
> + int off = 0;/* buffer offset clear
> to 0 */
> + int ret = 0;
> + unsigned loopjmp0, loopjmp1;/* for DMALPEND */
> + unsigned lcnt0 = 0; /* loop count 0 */
> + unsigned lcnt1 = 0; /* loop count 1 */
> + unsigned burst_size = 0;
> + unsigned len = pl330->len;
> + u32 ccr = 0;/* Channel Control
> Register */
> + struct pl330_reqcfg reqcfg;
> +
> + /* for burst, always use the maximum burst size and length
> */
> + pl330->brst_size = PL33

Re: [U-Boot] [RFC 2/4] dma: Kconfig: Add CONFIG_PL330_DMA entry

2016-10-12 Thread Chin Liang See
On Mon, 2016-10-10 at 10:52 -0500, Dinh Nguyen wrote:
> From: Dinh Nguyen 
> 
> Add PL330_DMA entry.
> 
> Signed-off-by: Dinh Nguyen 
> ---
>  drivers/dma/Kconfig  | 4 
>  drivers/dma/Makefile | 1 +
>  2 files changed, 5 insertions(+)
> 

Reviewed-by: Chin Liang See 

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


Re: [U-Boot] [PATCH v5 2/5] net: fec_mxc: Convert into driver model

2016-10-12 Thread Jagan Teki
On Wed, Oct 12, 2016 at 2:15 AM, Joe Hershberger
 wrote:
> On Thu, Oct 6, 2016 at 12:55 PM, Jagan Teki  wrote:
>> From: Jagan Teki 
>>
>> This patch add driver model support for fec_mxc driver.
>>
>> Cc: Simon Glass 
>> Cc: Joe Hershberger 
>> Cc: Peng Fan 
>> Cc: Stefano Babic 
>> Cc: Michael Trimarchi 
>> Signed-off-by: Jagan Teki 
>> ---
>>  drivers/net/fec_mxc.c | 314 
>> ++
>>  drivers/net/fec_mxc.h |   4 +
>>  2 files changed, 271 insertions(+), 47 deletions(-)
>>
>> diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
>> index 0838d58..c0ec976 100644
>> --- a/drivers/net/fec_mxc.c
>> +++ b/drivers/net/fec_mxc.c
>> @@ -9,6 +9,7 @@
>>   */
>>
>>  #include 
>> +#include 
>>  #include 
>>  #include 
>>  #include 
>> @@ -368,11 +369,8 @@ static int fec_get_hwaddr(int dev_id, unsigned char 
>> *mac)
>> return !is_valid_ethaddr(mac);
>>  }
>>
>> -static int fec_set_hwaddr(struct eth_device *dev)
>> +static int _fec_set_hwaddr(struct fec_priv *fec, uchar *mac)
>>  {
>> -   uchar *mac = dev->enetaddr;
>> -   struct fec_priv *fec = (struct fec_priv *)dev->priv;
>> -
>> writel(0, &fec->eth->iaddr1);
>> writel(0, &fec->eth->iaddr2);
>> writel(0, &fec->eth->gaddr1);
>> @@ -426,9 +424,8 @@ static void fec_reg_setup(struct fec_priv *fec)
>>   * Start the FEC engine
>>   * @param[in] dev Our device to handle
>>   */
>> -static int fec_open(struct eth_device *edev)
>> +static int fec_open(struct fec_priv *fec)
>>  {
>> -   struct fec_priv *fec = (struct fec_priv *)edev->priv;
>> int speed;
>> uint32_t addr, size;
>> int i;
>> @@ -534,14 +531,13 @@ static int fec_open(struct eth_device *edev)
>> return 0;
>>  }
>>
>> -static int fec_init(struct eth_device *dev, bd_t* bd)
>> +static int _fec_init(struct fec_priv *fec, uchar *mac)
>>  {
>> -   struct fec_priv *fec = (struct fec_priv *)dev->priv;
>> uint32_t mib_ptr = (uint32_t)&fec->eth->rmon_t_drop;
>> int i;
>>
>> /* Initialize MAC address */
>> -   fec_set_hwaddr(dev);
>> +   _fec_set_hwaddr(fec, mac);
>>
>> /*
>>  * Setup transmit descriptors, there are two in total.
>> @@ -587,7 +583,7 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
>> if (fec->xcv_type != SEVENWIRE)
>> miiphy_restart_aneg(dev);
>>  #endif
>> -   fec_open(dev);
>> +   fec_open(fec);
>> return 0;
>>  }
>>
>> @@ -595,9 +591,8 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
>>   * Halt the FEC engine
>>   * @param[in] dev Our device to handle
>>   */
>> -static void fec_halt(struct eth_device *dev)
>> +static void _fec_halt(struct fec_priv *fec)
>>  {
>> -   struct fec_priv *fec = (struct fec_priv *)dev->priv;
>> int counter = 0x;
>>
>> /*
>> @@ -637,7 +632,7 @@ static void fec_halt(struct eth_device *dev)
>>   * @param[in] length Data count in bytes
>>   * @return 0 on success
>>   */
>> -static int fec_send(struct eth_device *dev, void *packet, int length)
>> +static int _fec_send(struct fec_priv *fec, void *packet, int length)
>>  {
>> unsigned int status;
>> uint32_t size, end;
>> @@ -649,8 +644,6 @@ static int fec_send(struct eth_device *dev, void 
>> *packet, int length)
>>  * This routine transmits one frame.  This routine only accepts
>>  * 6-byte Ethernet addresses.
>>  */
>> -   struct fec_priv *fec = (struct fec_priv *)dev->priv;
>> -
>> /*
>>  * Check for valid length of data.
>>  */
>> @@ -777,14 +770,14 @@ out:
>> return ret;
>>  }
>>
>> +
>>  /**
>>   * Pull one frame from the card
>>   * @param[in] dev Our ethernet device to handle
>>   * @return Length of packet read
>>   */
>> -static int fec_recv(struct eth_device *dev)
>> +static int _fec_recv(struct fec_priv *fec, uchar *mac)
>>  {
>> -   struct fec_priv *fec = (struct fec_priv *)dev->priv;
>> struct fec_bd *rbd = &fec->rbd_base[fec->rbd_index];
>> unsigned long ievent;
>> int frame_length, len = 0;
>> @@ -800,8 +793,8 @@ static int fec_recv(struct eth_device *dev)
>> writel(ievent, &fec->eth->ievent);
>> debug("fec_recv: ievent 0x%lx\n", ievent);
>> if (ievent & FEC_IEVENT_BABR) {
>> -   fec_halt(dev);
>> -   fec_init(dev, fec->bd);
>> +   _fec_halt(fec);
>> +   _fec_init(fec, mac);
>> printf("some error: 0x%08lx\n", ievent);
>> return 0;
>> }
>> @@ -813,10 +806,10 @@ static int fec_recv(struct eth_device *dev)
>> if (ievent & FEC_IEVENT_GRA) {
>> /* Graceful stop complete */
>> if (readl(&fec->eth->x_cntrl) & 0x0001) {
>> -   fec_halt(dev);
>> +   _fec_halt(fec);
>> writel(~0x0001 & readl(&fec->eth->x_cntrl),
>>

Re: [U-Boot] [RFC 4/4] arm: socfpga: scrub the SDRAM to properly enable ECC support

2016-10-12 Thread Chin Liang See
On Mon, 2016-10-10 at 10:52 -0500, Dinh Nguyen wrote:
> From: Dinh Nguyen 
> 
> In order for SDRAM ECC to work correctly, the SDRAM needs to get
> zero'd which
> enables the ECC bit. By using the PL330 DMA to fill the SDRAM with
> zeroes,
> the operation is completed in ~1.2 seconds, versus ~14 seconds with a
> memset.
> 
> Signed-off-by: Dinh Nguyen 
> ---
>  arch/arm/mach-socfpga/include/mach/reset_manager.h | 21
> 
>  arch/arm/mach-socfpga/include/mach/sdram.h |  2 ++
>  arch/arm/mach-socfpga/spl.c|  8 +++
>  arch/arm/mach-socfpga/wrap_sdram_config.c  | 28
> ++
>  configs/socfpga_cyclone5_defconfig |  2 ++
>  5 files changed, 61 insertions(+)
> 

[..]

> diff --git a/arch/arm/mach-socfpga/wrap_sdram_config.c
> b/arch/arm/mach-socfpga/wrap_sdram_config.c
> index 31cc7de..dfa6423 100644
> --- a/arch/arm/mach-socfpga/wrap_sdram_config.c
> +++ b/arch/arm/mach-socfpga/wrap_sdram_config.c
> @@ -5,8 +5,10 @@
>   */
>  
>  #include 
> +#include 
>  #include 
>  #include 
> +#include 
>  
>  /* Board-specific header. */
>  #include 
> @@ -310,3 +312,29 @@ const struct socfpga_sdram_misc_config
> *socfpga_get_sdram_misc_config(void)
>  {
>   return &misc_config;
>  }
> +
> +#if (CONFIG_HPS_SDR_CTRLCFG_CTRLCFG_ECCEN == 1)
> +/* init the whole SDRAM ECC bit */
> +void sdram_ecc_init(void)
> +{
> + struct pl330_transfer_struct pl330;
> + u8 pl330_buf[2000];

Would need size of 2500 if the SDRAM size is 2GB

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


Re: [U-Boot] [PATCH v5 2/5] net: fec_mxc: Convert into driver model

2016-10-12 Thread Jagan Teki
Hi Simon,

On Wed, Oct 12, 2016 at 2:28 AM, Simon Glass  wrote:
> Hi Jagan,
>
> On 9 October 2016 at 08:51, Jagan Teki  wrote:
>>
>> Hi Simon,
>>
>> On Thu, Oct 6, 2016 at 4:25 PM, Jagan Teki  wrote:
>> > From: Jagan Teki 
>> >
>> > This patch add driver model support for fec_mxc driver.
>> >
>> > Cc: Simon Glass 
>> > Cc: Joe Hershberger 
>> > Cc: Peng Fan 
>> > Cc: Stefano Babic 
>> > Cc: Michael Trimarchi 
>> > Signed-off-by: Jagan Teki 
>> > ---
>> >  drivers/net/fec_mxc.c | 314 
>> > ++
>> >  drivers/net/fec_mxc.h |   4 +
>> >  2 files changed, 271 insertions(+), 47 deletions(-)
>> >
>>
>  [...]
>>
>> This look OK now, let me know if you have any inputs.
>
> Is there a change log please?

Added on cover-letter[1], forgot to add you :)

[1] 
http://u-boot.10912.n7.nabble.com/PATCH-v5-0-5-net-fec-mxc-Convert-to-DM-td269625.html

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v5] ARM: sun71: dts: add support for Bananapi BPI-R1

2016-10-12 Thread Jagan Teki
On Wed, Oct 12, 2016 at 12:18 AM, Stephen Arnold
 wrote:
> Okay, but I could use a little clarity; do you want the u-boot dts to
> look just like my (proposed) kernel dts?  Or do I start with kernel
> dts and remove the gmac/axp209 stuff?
>
> If we can merge all of this feedback into a single list of changes,
> then I can take a whack at it later this week (after a few work
> things).  Back to the test mtg...

Please take a reference of Linux dts and add tested nodes/properties,
this would be certainly gives a better understanding and maintenance
easy.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] armv8/ls1043a: Add the OCRAM initialization

2016-10-12 Thread york sun
On 10/12/2016 05:15 AM, Pratiyush Srivastava wrote:
> Clear the content to zero and the ECC error bit of OCRAM1/2.
>
> The OCRAM must be initialized to ZERO by the unit of 8-Byte before
> accessing it, or else it will generate ECC error. And the IBR has
> accessed the OCRAM before this initialization, so the ECC error
> status bit should to be cleared.

Does the ECC error trigger any exception? Why didn't we see the error 
before?

>
> Signed-off-by: Pratiyush Srivastava 
> Signed-off-by: Hou Zhiqiang 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  arch/arm/cpu/armv8/start.S | 39 +++
>  1 file changed, 39 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index 19c771d..24fed46 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -11,6 +11,9 @@
>  #include 
>  #include 
>
> +#define DCSR_SYS_DCFG_SBEESR20x20140534
> +#define DCSR_SYS_DCFG_MBEESR20x20140544
> +
>  /*
>   *
>   * Startup Code (reset vector)
> @@ -259,10 +262,46 @@ WEAK(lowlevel_init)
>  #endif /* CONFIG_ARMV8_MULTIENTRY */
>
>  2:
> +#if defined(CONFIG_FSL_LSCH2) && !defined(CONFIG_SPL_BUILD)
> + bl  fsl_ocram_init
> +#endif

Why do you change this weak function, not the one in lowerlevel.S?

York

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


[U-Boot] [PATCH] pwm: imx: increase support up to PWM8

2016-10-12 Thread Christoph Fritz
This patch increases number of supported PWMs from previously
4 now up to 8.

Signed-off-by: Christoph Fritz 
---
 drivers/pwm/pwm-imx-util.c | 8 
 1 file changed, 8 insertions(+)

diff --git a/drivers/pwm/pwm-imx-util.c b/drivers/pwm/pwm-imx-util.c
index f92c370..f030b44 100644
--- a/drivers/pwm/pwm-imx-util.c
+++ b/drivers/pwm/pwm-imx-util.c
@@ -27,6 +27,14 @@ struct pwm_regs *pwm_id_to_reg(int pwm_id)
return (struct pwm_regs *)PWM3_BASE_ADDR;
case 3:
return (struct pwm_regs *)PWM4_BASE_ADDR;
+   case 4:
+   return (struct pwm_regs *)PWM5_BASE_ADDR;
+   case 5:
+   return (struct pwm_regs *)PWM6_BASE_ADDR;
+   case 6:
+   return (struct pwm_regs *)PWM7_BASE_ADDR;
+   case 7:
+   return (struct pwm_regs *)PWM8_BASE_ADDR;
default:
printf("unknown pwm_id: %d\n", pwm_id);
break;
-- 
2.1.4

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Alexandr Bochkarev
I decided to check how linux kernel init emmc on marsboard, which i boot from 
SD card
And i found, that it inited only in 1-bit mode, is it normal? it works, i can 
edit files on it

linux set 
eMMC(sdc2) to mmc0 
SD(sdc0) to mmc1

# cat /sys/kernel/debug/mmc0/ioseMMC
clock:  5200 Hz
vdd:7 (1.65 - 1.95 V)
bus mode:   2 (push-pull)
chip select:0 (don't care)
power mode: 2 (on)
bus width:  0 (1 bits)
timing spec:1 (mmc high-speed)

# cat /sys/kernel/debug/mmc1/iosSD card
clock:  5000 Hz
vdd:16 (2.8 ~ 2.9 V)
bus mode:   2 (push-pull)
chip select:0 (don't care)
power mode: 2 (on)
bus width:  2 (4 bits)
timing spec:2 (sd high-speed)

# dmesg | grep 'mmc-msg\|mmc-err’

[0.167917] [mmc-msg] sw_mci_init
[0.168039] [mmc-msg] MMC host used card: 0x5, boot card: 0x4, io_card 0
[0.168310] [mmc-msg] sdc2 set round clock 40, src 2400
[0.168520] [mmc-msg] sdc2 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 
timing LEGACY(SDR12) dt B
[0.169639] [mmc-msg] sdc2 Probe: base:0xf005e000 irq:66 
sg_cpu:f006(4fc0) ret 0.
[0.169683] [mmc-msg] sdc2 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 
timing LEGACY(SDR12) dt B
[0.169695] [mmc-msg] sdc2 power on
[0.170832] [mmc-msg] sdc0 set round clock 40, src 2400
[0.171037] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 
timing LEGACY(SDR12) dt B
[0.172069] [mmc-msg] sdc0 Probe: base:0xf0062000 irq:64 
sg_cpu:f0064000(4fc01000) ret 0.
[0.182158] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.182189] [mmc-msg] sdc2 set round clock 40, src 2400
[0.254447] [mmc-err] smc 2 err, cmd 52,  RTO
[0.259631] [mmc-err] smc 2 err, cmd 52,  RTO
[0.264001] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.266386] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.268208] [mmc-err] smc 2 err, cmd 8,  RTO
[0.273296] [mmc-err] smc 2 err, cmd 5,  RTO
[0.278383] [mmc-err] smc 2 err, cmd 5,  RTO
[0.283461] [mmc-err] smc 2 err, cmd 5,  RTO
[0.288546] [mmc-err] smc 2 err, cmd 5,  RTO
[0.293641] [mmc-err] smc 2 err, cmd 55,  RTO
[0.298813] [mmc-err] smc 2 err, cmd 55,  RTO
[0.303988] [mmc-err] smc 2 err, cmd 55,  RTO
[0.309158] [mmc-err] smc 2 err, cmd 55,  RTO
[0.313529] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.313857] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.313874] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.313889] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.316273] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.333276] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[0.346076] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing MMC-HS(SDR20) dt B
[0.346092] [mmc-msg] sdc2 set ios: clk 5200Hz bm PP pm ON vdd 3.3V 
width 1 timing MMC-HS(SDR20) dt B
[0.346123] [mmc-msg] sdc2 set round clock 42857143, src 6
[0.401211] [mmc-msg] sdc2 set ios: clk 5200Hz bm PP pm ON vdd 3.3V 
width 8 timing MMC-HS(SDR20) dt B
[0.401276] [mmc-err] smc 2 err, cmd 8,  DCE EBE
[0.405889] [mmc-err] In data read operation
[0.410155] [mmc-msg] found data error, need to send stop command
[0.410172] [mmc-err] sdc 2 send stop command failed
[0.415209] [mmc-msg] sdc2 set ios: clk 5200Hz bm PP pm ON vdd 3.3V 
width 4 timing MMC-HS(SDR20) dt B
[0.415284] [mmc-err] smc 2 err, cmd 8,  DCE
[0.419553] [mmc-err] In data read operation
[0.423818] [mmc-msg] found data error, need to send stop command
[0.423834] [mmc-err] sdc 2 send stop command failed
[0.428862] [mmc-msg] sdc2 set ios: clk 5200Hz bm PP pm ON vdd 3.3V 
width 1 timing MMC-HS(SDR20) dt B
[1.167097] [mmc-msg] mmc 0 detect change, present 1
[1.662131] [mmc-msg] sdc0 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 
timing LEGACY(SDR12) dt B
[1.662143] [mmc-msg] sdc0 power on
[1.682156] [mmc-msg] sdc0 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[1.682200] [mmc-msg] sdc0 set round clock 40, src 2400
[1.754452] [mmc-err] smc 0 err, cmd 52,  RTO
[1.759631] [mmc-err] smc 0 err, cmd 52,  RTO
[1.764010] [mmc-msg] sdc0 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[1.770004] [mmc-msg] sdc0 set ios: clk 40Hz bm PP pm ON vdd 3.3V width 
1 timing LEGACY(SDR12) dt B
[1.772136] [mmc-err] smc 0 err, cmd 5,  RTO
[1.777223] [mmc-err] smc 0 err, cmd 5,  RTO
[1.782306] [mmc-err] 

[U-Boot] [PATCH 3/3] imx6: icorem6: Add custom splashscreen support

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

Add custom splashscreen, engicam.bmp support for
Engicam i.CoreM6 qdl board.

Cc: Anatolij Gustschin 
Cc: Stefano Babic 
Cc: Matteo Lisi 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 include/configs/imx6qdl_icore.h |   2 ++
 tools/logos/engicam.bmp | Bin 0 -> 60214 bytes
 2 files changed, 2 insertions(+)
 create mode 100755 tools/logos/engicam.bmp

diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h
index 889211f..4637b00 100644
--- a/include/configs/imx6qdl_icore.h
+++ b/include/configs/imx6qdl_icore.h
@@ -37,6 +37,7 @@
 /* Default environment */
 #define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
+   "splashpos=m,m\0" \
"image=zImage\0" \
"console=ttymxc3\0" \
"fdt_high=0x\0" \
@@ -158,6 +159,7 @@
 # define CONFIG_VGA_AS_SINGLE_DEVICE
 
 # define CONFIG_SPLASH_SCREEN
+# define CONFIG_SPLASH_SCREEN_ALIGN
 # define CONFIG_SYS_CONSOLE_IS_IN_ENV
 # define CONFIG_BMP_16BPP
 # define CONFIG_VIDEO_BMP_RLE8
diff --git a/tools/logos/engicam.bmp b/tools/logos/engicam.bmp
new file mode 100755
index 
..f6c60fb810d29830941e18d6725ef95785d95967
GIT binary patch
literal 60214
zcmeHQy{;oUb}kzN)XMw_3jG8d3(oxxdV~$;0V-UDRydJ>F&s^}4^XkQQP^@I>=H2G
zwt(#(j1mX!k7V)ie21)3Rd-+A*}hfX=aMWQp5KpTiPF{mmw)}khbCNqST)T*qxMh#
z*ff7c`47#z*zw=7D1Ww1ga1w2#sWW4ZMv>&y8r5$zy0TbG|hGg+Jn%sJ%KvVwP|(@
zXbVDRw+FSL6Q~1Sn`YmDwxAsdjeQF`fjZE&*Skfz1MNXA=mhFO*QPqx+
zPM{8Sg^>+t3)+G9pcZrjb)ak0;D2-7f_9)is0E!s9q8KZ8kpH^LH^$!)Phc+4s?yK
zZMP_QpgpJsoj@Jv8r|M)QSLx{PzySNI?y$SWWPnZ1MNXA=mhFO*BGvLi*g6rgIdrD
z)Pb%sl&3Aq9cT|~K_^fLy2dbfTa-J{9@K(Ppbm5mDcD`ND0iSes0E!s9q8J$@V{-g
zAn*AekhpgpJsoj@Jv8liC7qTGS@pcZrjb)aj6Nw-D01MNXA=mhFO*8rjRx<$DI
z?LjT*1nNN7ri1@ovjy!ydr%8Hf&9N~gw}S8atGRjTF?p9fvypDyDiEcXb);ZCr}5v
zMo8|rD0iSes0E!s9q1b2+HO(qKzmRNI)OUSHA4BcMY#j*K`rP6>Oj{B^KOfB2ik*L
z(5d;`|9x)$9ege1HO=Snzxn*x*FgB^Z~69eEfH8EutZ>qz!HHa0!svz2rLm;BCteY
ziNF$p-%SMWzZ**yLtZZe_sz|@%lWYK*Wr9|?zVY7YZlF~8iBhz2OQWR=i9PaylP@z
zL;2dpMZtn0wvTRECSD^eucUKx83RLv#KA4A#4Dxe$!hPH`l3+Wy)1}$a%x^d-Q5*=
zAHLyU!N5i3Gb1qi*iZuFaC@e4i>@a};P&{r!D8aDezJ{=x~D~;{`%4)z_u?>vu{!K
z%n01)FAfnJ=jFNbnR$AWuFaRi0VkKsX~dI~^gJ~;yA8~0FOQYa%hXdeO+9lMLdo*V
z^C@Y1mXa@flGNZ>o+_V}t0(CBdN{0B3m~45sOP9~dZK@Eec3XeldTum@^z1r89&R(
z)QhL;84A{YMt}VI(e-1_eYN&GJ%_k&HaC2(=XTp{UdF=vdVPcV_4;MRKLZ3=M?8l5
z@rP;GC?pP*c-(K3uDrI;fPsSz5}Ai)r=+%VM~3e4;%aFltt37)2JC>EoB3?OnZ>V3
z)}R=pKDxv=#ie?M6;%>ZA6DKC@%nih8o>24hnHLDQv97chFS+1xzQ~7w)CTtRSm{A{}&H3hoBObQo%OCE;!NX)U
zct-NjG%C-OY^dSS%{+Au`Q~aRfem5ne>lytT2+*K#s{C{FrV=vtt{WSYM9%MxOPaN
zAUl$*p*)#c)3cFH1CUH{F%N<1_S`Z|wdt#a$HV9fk<*$iF@{ojR3k@husBoC#@
z!%=nRs#C&;s%n`attEeDc0N)NKS9QmypC^Rmo@fYvxXWZv%5w@#oo+2QuFZrH=pGh
z7ek&sDN$?;W%k_4I|E0sW;@Lrh^R%%U?wXvwKSHs8m85%^lOR&pI1k+vYX_X2~v*-
z-WMOFnC+>~BT`vygvmQ^dHCUnKa+>1Q7#Z{sA12|yfaX`D^W1Pt8N$*m9ADIpR{JP
zQZ3;oh4I09(hu`a9g~Pq4s343BWHVLQwhmrODN4cOns9ZLE((0A+oaZ+$tAuV<@xd
zRz|eTH><~6RBcD
zNwR9C$S18OXTnXeqBNl#5bgw|GPf}{dd0&fnPihJWhoF`nq`waC$(I(Vm2PgO7;XT
z32?H(7+MVIZ%7dM5iH+M@=5__&bg9f_>M&R!6==^&9FGr6RbD*3>Zny^d*N>d}f;n
zl12cUthz`;Il$aWX3oX~E4D3@oWfAcFKsc8S7W)|S8B=N5OZ*od>lgIL>bqb`%{!R
z=l)6qVtMHAN{(Pg{aNFTGjVr0((o7zo)LmTSo*&HpV?B@QuJJqJJas=Tlaa@nco=;T1Hln=Cktj9>SC7TPYZNTSLC6j
zRT%hJ$#~XT`Sv(G!!-HBqo@mL5hjDoR-P_fil}T
z?*QV_@=$rAoNFit+(dyx*NfJ#;u6lYR+B9=8;yK3DNA^NHu#1fs{kSIf0w04YB?lZ
zSJv{3%1QEE6*W4!JP`_sy4~*`-l&NugS(0PRb-x-B`V|4JA#KP!=VMbEGzMFIG}Qv`vn9^4Ok-brb?D9x@iSj!?%E
zk$PDu8DJYalSkc|P0@G7ev{Jz=Y@Id#tiec?n!kqFzK6ZsMC6Mc+A`twj3#*QFgnD
z7BOb>*xp|5mW(EEZ0JVgE}b)W4DB#QVzudQU?*k5NH{`8ZYRUXN}7Qz=c`-CLNRMA
z@KW$|MkJ=i+cw$M6e)X7SAW=Jd-B-c5bn17fy-J$t+2j+WBQJv@xYl+k>mKtj>kyV
zV(KQTyT&Ko{L}jnzdpMD=l$6045cSl+0YU%#Q@5P0{UQ3bJDacsHYH;3P(%@3wPV~
zgL~x(ffUpl90am}8tH!~$58&-2k1?dZcLCxkfxDxebA=V
zVLZ-}{pHgnG@zvN+D>#a`8P_m)LgjAfd%6QEi2F(^yDmo2|(nb8bA!CyrY;InA
zLcfh&8uYL2LrbhV~3Ip28u#l%^G!&$BC8mmWROw!o<((Wrc@h_0o~8ZWt`(OifX0f~D3X;uoh;$(iY6
znCsioI#mu~tp0i8gyaZr&m&2|U$k=4CF;@c>ENY~$ra@Cm%A_m=
zY?$1R0=aYJZ<3T`O{J&6`H+cKfvdyJ?c(Fd`V*ybC>T-Kn0)EW;8L`im&qRJ%)aKh
zq(z@lk`~e^l*g-pVpzNif#}1b{QNukJ
zng%nQe%@n#B~2?1VoY2|H;iI%GNf7(TKh<`HXA;Qgnv1s*^dh2e%6rq$xx-qm*X<`
z`C;G%XEED+VA#;ClWK4_T|5awhjJaGycQCglEx$Hd5@IohEg02Aju>H{cMOvT(W++
zWK2ez`JTlC`vbQ%`&l2=V9RvctI3Dy#-Su*?(2(zGi$xOU7q}O~gZJ6_aKwu{
z`8dvdHE@~GCTXkHoE>9ex1gjd{Vr=6u8nONEFea$zF{!umn{%RhB?|Xh*L0D9uHMX
zbh+}Cc%bFzK)YnntfFvZv`ySF2Jx`^%hYGePeZH2(0nw8uBzAAhCxy3S3(vl3HYjX
zMJYUI?K7iUAhg+H#Bhby9>2IyEJ{4EwzUpK#HsSvd=t5zV8aF(XSF$p51$@G;?t)O
z^`odDX+W5=25}!{7i;e#}6ZedXeIFAhmYA(TU0Dt3Av;8*TwczT+_Ch484FOyViz$j~0;pauaoSd9;+0JKCgsr6
zl}YI12r4HL1Zv5Y=bcXiXwxMthj2Ws7;~)zPLbI2P;6wN_`8RAVBb}i5+3w3rRqj?
z+J@nH&^K+_$VrG8xkIoKcJtVMBqL=s3C*glgAdVHGEmO!D-2^CzfY1~NHy~~YDV+#
zoLANd28;?s=4ER$iy$VMQY{Vm^Kh=Y-`+jGe)}sAsw(t19q~;tbjU}@5!jQ^93DQp
z#PU++o9sNN2ajn9qqV=P1t!gtM`sMLV4ZkU7s6$)Cm%hzP^hVJL2@kRos(Tx$3i#+W$_41Nanvi@4=T
z97$EicIGfO;-^MtBxEb)MF>@29vy2TIT=fRH>a#flRhX8whcMte6N*m&=v&5AB7@s
zj_TJ{?Ni}!WIXiVpl~aEdG6+huOraoLjMq&va-tzIJ|q8vtk|3=6u5qLrpiAP3B2X
z9iEB52O`_mC$@-@32@;UFHKNT|J!nLuIOnRR2%8uz<5>hpe9`6^Cc~M1

[U-Boot] [PATCH 2/3] imx6: icorem6: Add framebuffer support

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

Add IPUv3 framebuffer support for Engicam i.CoreM6 qdl board.

Cc: Anatolij Gustschin 
Cc: Stefano Babic 
Cc: Matteo Lisi 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/engicam/icorem6/icorem6.c  | 113 +++
 configs/imx6qdl_icore_mmc_defconfig  |   1 +
 configs/imx6qdl_icore_nand_defconfig |   1 +
 include/configs/imx6qdl_icore.h  |  16 +
 4 files changed, 131 insertions(+)

diff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c
index 587775e..171ec45 100644
--- a/board/engicam/icorem6/icorem6.c
+++ b/board/engicam/icorem6/icorem6.c
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -90,6 +91,113 @@ static void setup_gpmi_nand(void)
 }
 #endif
 
+#if defined(CONFIG_VIDEO_IPUV3)
+static iomux_v3_cfg_t const rgb_pads[] = {
+   IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK),
+   IOMUX_PADS(PAD_DI0_PIN15__IPU1_DI0_PIN15),
+   IOMUX_PADS(PAD_DI0_PIN2__IPU1_DI0_PIN02),
+   IOMUX_PADS(PAD_DI0_PIN3__IPU1_DI0_PIN03),
+   IOMUX_PADS(PAD_DISP0_DAT0__IPU1_DISP0_DATA00),
+   IOMUX_PADS(PAD_DISP0_DAT1__IPU1_DISP0_DATA01),
+   IOMUX_PADS(PAD_DISP0_DAT2__IPU1_DISP0_DATA02),
+   IOMUX_PADS(PAD_DISP0_DAT3__IPU1_DISP0_DATA03),
+   IOMUX_PADS(PAD_DISP0_DAT4__IPU1_DISP0_DATA04),
+   IOMUX_PADS(PAD_DISP0_DAT5__IPU1_DISP0_DATA05),
+   IOMUX_PADS(PAD_DISP0_DAT6__IPU1_DISP0_DATA06),
+   IOMUX_PADS(PAD_DISP0_DAT7__IPU1_DISP0_DATA07),
+   IOMUX_PADS(PAD_DISP0_DAT8__IPU1_DISP0_DATA08),
+   IOMUX_PADS(PAD_DISP0_DAT9__IPU1_DISP0_DATA09),
+   IOMUX_PADS(PAD_DISP0_DAT10__IPU1_DISP0_DATA10),
+   IOMUX_PADS(PAD_DISP0_DAT11__IPU1_DISP0_DATA11),
+   IOMUX_PADS(PAD_DISP0_DAT12__IPU1_DISP0_DATA12),
+   IOMUX_PADS(PAD_DISP0_DAT13__IPU1_DISP0_DATA13),
+   IOMUX_PADS(PAD_DISP0_DAT14__IPU1_DISP0_DATA14),
+   IOMUX_PADS(PAD_DISP0_DAT15__IPU1_DISP0_DATA15),
+   IOMUX_PADS(PAD_DISP0_DAT16__IPU1_DISP0_DATA16),
+   IOMUX_PADS(PAD_DISP0_DAT17__IPU1_DISP0_DATA17),
+};
+
+static void enable_rgb(struct display_info_t const *dev)
+{
+   SETUP_IOMUX_PADS(rgb_pads);
+}
+
+struct display_info_t const displays[] = {
+   {
+   .bus= -1,
+   .addr   = 0,
+   .pixfmt = IPU_PIX_FMT_RGB666,
+   .detect = NULL,
+   .enable = enable_rgb,
+   .mode   = {
+   .name   = "Amp-WD",
+   .refresh= 60,
+   .xres   = 800,
+   .yres   = 480,
+   .pixclock   = 3,
+   .left_margin= 30,
+   .right_margin   = 30,
+   .upper_margin   = 5,
+   .lower_margin   = 5,
+   .hsync_len  = 64,
+   .vsync_len  = 20,
+   .sync   = FB_SYNC_EXT,
+   .vmode  = FB_VMODE_NONINTERLACED
+   }
+   },
+};
+
+size_t display_count = ARRAY_SIZE(displays);
+
+static void setup_display(void)
+{
+   struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
+   struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
+   int reg;
+
+   enable_ipu_clock();
+
+   /* Turn on LDB0,IPU,IPU DI0 clocks */
+   reg = __raw_readl(&mxc_ccm->CCGR3);
+   reg |=  (MXC_CCM_CCGR3_LDB_DI0_MASK | 0x);
+   writel(reg, &mxc_ccm->CCGR3);
+
+   /* set LDB0, LDB1 clk select to 011/011 */
+   reg = readl(&mxc_ccm->cs2cdr);
+   reg &= ~(MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_MASK |
+   MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK);
+   reg |= (3 << MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_OFFSET) |
+   (3 << MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET);
+   writel(reg, &mxc_ccm->cs2cdr);
+
+   reg = readl(&mxc_ccm->cscmr2);
+   reg |= MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV;
+   writel(reg, &mxc_ccm->cscmr2);
+
+   reg = readl(&mxc_ccm->chsccdr);
+   reg |= (CHSCCDR_CLK_SEL_LDB_DI0 <<
+   MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
+   writel(reg, &mxc_ccm->chsccdr);
+
+   reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES |
+   IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH |
+   IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW |
+   IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG |
+   IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT |
+   IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG |
+   IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT |
+   IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED |
+   IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0;
+   writel(reg, &iomux->gpr[2]);
+
+   reg = readl(&iomux->gpr[3]);
+   reg = (reg & ~IOMUXC_GPR3_LVDS0_MUX_CTL_MASK) |
+   (IOMUXC_GPR3_MUX_SRC_IPU1_DI0 <<
+   IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET);
+   writel(reg, &iomux->gpr[3]);

[U-Boot] [PATCH 1/3] video: Kconfig: Add VIDEO_IPV3 entry

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

Added kconfig entry for CONFIG_VIDEO_IPV3 driver.

Cc: Anatolij Gustschin 
Cc: Stefano Babic 
Cc: Matteo Lisi 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 drivers/video/Kconfig | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 8361a71..4cf95e1 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -337,6 +337,13 @@ config VIDEO_LCD_SPI_MISO
option takes a string in the format understood by 'name_to_gpio'
function, e.g. PH1 for pin 1 of port H.
 
+config VIDEO_IPUV3
+   bool "i.MX IPUv3 Core video support"
+   depends on MX6
+   help
+ This enables framebuffer driver for i.MX processors working
+ on the IPUv3(Image Processing Unit) internal graphic processor.
+
 config VIDEO_MVEBU
bool "Armada XP LCD controller"
default n
-- 
2.7.4

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


Re: [U-Boot] [PATCH] board/ls2080qds: add the procedure to deply QSPI image.

2016-10-12 Thread Yao Yuan
On 10/11/2016 11:04 PM, york sun wrote:
> On 10/10/2016 11:04 PM, Yuan Yao wrote:
> > From: Yuan Yao 
> >
> > Signed-off-by: Yuan Yao 
> > ---
> >  board/freescale/ls2080aqds/README | 35
> > +++
> >  1 file changed, 35 insertions(+)
> >
> > diff --git a/board/freescale/ls2080aqds/README
> > b/board/freescale/ls2080aqds/README
> > index f288750..0f7446a 100644
> > --- a/board/freescale/ls2080aqds/README
> > +++ b/board/freescale/ls2080aqds/README
> > @@ -188,3 +188,38 @@ DPMAC14 -> PHY4-P1
> >  DPMAC15 -> PHY4-P2
> >  DPMAC16 -> PHY4-P3
> >
> > +
> > +Booting from QSPI
> > +---
> > +Booting from QSPI requires two images, RCW and u-boot-dtb.bin.
> > +The difference between QSPI boot RCW image and NOR boot image is the
> > +PBI command sequence. Below is the setting for PBI commands for QDS
> > +which boot on QSPI flash device.
> > +
> > +1) CCSR 4-byte write to 0x00e00404, data=0x
> > +2) CCSR 4-byte write to 0x00e00400, data=0x2001 The above two
> > +commands set bootloc register to 0x_2001 where the u-boot
> > +code will be running in QSPI flash.
> > +
> > +RCW image should be written to the beginning of QSPI flash device.
> > +Example of using u-boot command
> > +
> > +=> sf probe 0:0
> > +SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64
> > +KiB, total 32 MiB => sf erase 0 +
> > +SF: 65536 bytes @ 0x0 Erased: OK
> > +=> sf write  0 
> > +SF: 164 bytes @ 0x0 Written: OK
> > +
> > +To get the QSPI image, build u-boot with QSPI config, for example,
> > +ls2080aqds_qspi_defconfig. The image needed is u-boot-dtb.bin.
> > +The u-boot image should be written to 0x1.
> > +
> > +=> sf probe 0:0
> > +SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64
> > +KiB, total 32 MiB => sf erase 1 +
> > +SF: 589824 bytes @ 0x1 Erased: OK => sf write  > +memory> 1 
> > +SF: 580966 bytes @ 0x1 Written: OK
> > +
> > +With these two images in QSPI flash device, the board can boot from QSPI.
> >
> 
> Yuan Yao,
> 
> I think the procedure can be applied to many of our boards with QSPI, right? 
> It
> may be better to move this information out of ls2080aqds.
> 

Hi York,

Yes, but a little difference for "CCSR  write" for different boards.
But the "CCSR write" should be wrote into uboot code or cw.
So, should I remove the notes for "CCSR  write" and then move this information 
for
 all the boards which support QSPI boot?
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] armv8: fsl-layerscape: Add support of GPIO structure

2016-10-12 Thread york sun
On 10/12/2016 03:20 AM, Pratiyush Srivastava wrote:
> Layerscape supports GPIO registers to conrol GPIO singals.
> Add support of GPIO structure to enable GPIO access.
>
> Signed-off-by: Pratiyush Srivastava 
> Signed-off-by: Prabhakar Kushwaha 
> ---
>  arch/arm/cpu/armv8/fsl-layerscape/Kconfig  | 4 
>  arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h | 9 +
>  2 files changed, 13 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig 
> b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> index f8057ba..6af39d9 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
> @@ -2,6 +2,7 @@ config ARCH_LS1012A
>   bool "Freescale Layerscape LS1012A SoC"
>   select SYS_FSL_MMDC
>   select SYS_FSL_ERRATUM_A010315
> + select SYS_GPIO1_ADDR
>
>  config ARCH_LS1043A
>   bool "Freescale Layerscape LS1043A SoC"
> @@ -15,3 +16,6 @@ config SYS_FSL_MMDC
>
>  config SYS_FSL_ERRATUM_A010315
>   bool "Workaround for PCIe erratum A010315"
> +
> +config SYS_GPIO1_ADDR
> + bool "Support for GPIO structure to enable GPIO access"

This name sounds like an address, yet you set it as bool. How do you use it?

> diff --git a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h 
> b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
> index df51871..d9d7cb6 100644
> --- a/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
> +++ b/arch/arm/include/asm/arch-fsl-layerscape/immap_lsch2.h
> @@ -584,6 +584,15 @@ struct ccsr_cci400 {
>   u8 res_e004[0x1 - 0xe004];
>  };
>
> +typedef struct ccsr_gpio {
> + u32 gpdir;
> + u32 gpodr;
> + u32 gpdat;
> + u32 gpier;
> + u32 gpimr;
> + u32 gpicr;
> +} ccsr_gpio_t;
> +
>  /* MMU 500 */
>  #define SMMU_SCR0(SMMU_BASE + 0x0)
>  #define SMMU_SCR1(SMMU_BASE + 0x4)
>

Does this patch depend on other patches? I don't see how SYS_GPIO1_ADDR 
is used.

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


Re: [U-Boot] [PATCH v2 02/12] x86: Add an accelerated memmove() function

2016-10-12 Thread Simon Glass
Hi Bin,

On 9 October 2016 at 20:05, Bin Meng  wrote:
> On Sat, Oct 8, 2016 at 1:53 PM, Bin Meng  wrote:
>> Hi Simon,
>>
>> On Sat, Oct 8, 2016 at 10:25 AM, Bin Meng  wrote:
>>> Hi Simon,
>>>
>>> On Thu, Oct 6, 2016 at 10:42 AM, Simon Glass  wrote:
 Bring in a faster memmove() from Linux 4.7. This speeds up scrolling on the
 display.

 Signed-off-by: Simon Glass 
 ---

 Changes in v2:
 - Move the code into string.c
 - Fix multi-line comments that should not be

  arch/x86/include/asm/string.h |   2 +-
  arch/x86/lib/string.c | 161 
 ++
  2 files changed, 162 insertions(+), 1 deletion(-)

>>>
>>> Reviewed-by: Bin Meng 
>>>
>>> Tested on Crown Bay with an external PCIe graphics card
>>> Tested-by: Bin Meng 
>>>
>>> However, I did not see significant speed up on screen scrolling...
>>>
>>
>> Crown Bay is still using cfb_console.c, which is the legacy driver
>> that does not use memmove(). Looks the new console_xxx driver is using
>> memmove(). I guess I will need convert Crown Bay to use DM video.
>>
>
> Testing shows that on Crown Bay, the DM driver with the optimized
> memmove() does not improve the performance compared to legacy
> cfb_console driver. But on Bayleybay, memmove() indeed helps the
> screen scrolling.

That's interesting. What is the difference between those two
platforms? It is slow on Crown Bay?

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


Re: [U-Boot] x86: Updating u-boot.bin vs u-boot.rom

2016-10-12 Thread Simon Glass
Hi Stefan,

On 6 October 2016 at 02:12, Stefan Roese  wrote:
> Hi Bin, Hi Simon,
>
> I'm currently trying to only update the u-boot.bin part in the
> SPI NOR chip instead of updating the complete ROM (8MiB).
> Updating u-boot.bin (same as u-boot-dtb.bin) at 0x70. results
> in a non booting board though. I've checked a bit and found
> that the U-Boot image in u-boot.rom at this offset differs
> from the original u-boot.bin file. Here a diff:
>
> uboot.test (u-boot.rom at offset 0x70.)
>  2D50: 54 2D F0 FF 50 4C F7 FF  00 98 01 00 00 00 F0 FF  T-..PL.. 
>
> u-boot.bin
>  2D50: 54 2D F0 FF 00 00 00 00  00 00 00 00 00 00 F0 FF  T-.. 
>
> Do you know why this is the case? I would have expected no
> differences here.

I think this is the microcode pointer (and size).

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


Re: [U-Boot] [RFC 3/4] dm: add DMA_SUPPORTS_DEV_TO_MEM type to DMA_UCLASS

2016-10-12 Thread Simon Glass
Hi,

On 10 October 2016 at 09:52, Dinh Nguyen  wrote:
> From: Dinh Nguyen 
>
> Add DMA_SUPPORTS_DEV_TO_MEM type to the DMA uclass.

Can you explain (in your commit message) the need for this?

>
> Signed-off-by: Dinh Nguyen 
> ---
>  drivers/dma/dma-uclass.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/dma-uclass.c b/drivers/dma/dma-uclass.c
> index ea21fd9..a021395 100644
> --- a/drivers/dma/dma-uclass.c
> +++ b/drivers/dma/dma-uclass.c
> @@ -49,7 +49,8 @@ int dma_memcpy(void *dst, void *src, size_t len)
> const struct dma_ops *ops;
> int ret;
>
> -   ret = dma_get_device(DMA_SUPPORTS_MEM_TO_MEM, &dev);
> +   ret = dma_get_device(DMA_SUPPORTS_MEM_TO_MEM |
> +DMA_SUPPORTS_DEV_TO_MEM, &dev);
> if (ret < 0)
> return ret;
>
> --
> 2.8.3
>

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


Re: [U-Boot] [PATCH v1 2/2] pinctrl: pinctrl-at91: Add pinctrl driver

2016-10-12 Thread Simon Glass
Hi Wenyou,

On 11 October 2016 at 23:22, Wenyou Yang  wrote:
> AT91 PIO controller is a combined gpio-controller, pin-mux and
> pin-config module. The peripheral's pins are assigned through
> per-pin based muxing logic.
>
> Each soc will have to describe the SoC limitation and pin
> configuration via DT. This will allow to do not need to touch
> the C code when adding new SoC if the IP version is supported.
>
> Signed-off-by: Wenyou Yang 
> ---
>
>  arch/arm/mach-at91/include/mach/at91_pio.h |   6 +-
>  drivers/pinctrl/Kconfig|   7 +
>  drivers/pinctrl/Makefile   |   1 +
>  drivers/pinctrl/pinctrl-at91.c | 451 
> +
>  4 files changed, 464 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/pinctrl/pinctrl-at91.c

Reviewed-by: Simon Glass 

Some comments below.

>
> diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h 
> b/arch/arm/mach-at91/include/mach/at91_pio.h
> index 393a163..f195a7d 100644
> --- a/arch/arm/mach-at91/include/mach/at91_pio.h
> +++ b/arch/arm/mach-at91/include/mach/at91_pio.h
> @@ -107,7 +107,11 @@ typedef struct at91_port {
> u32 wpsr;   /* 0xE8 Write Protect Status Register */
> u32 reserved11[5];  /* */
> u32 schmitt;/* 0x100 Schmitt Trigger Register */
> -   u32 reserved12[63];
> +   u32 reserved12[4];  /* 0x104 ~ 0x110 */
> +   u32 driver1;/* 0x114 I/O Driver Register1(AT91SAM9x5's 
> driver1) */
> +   u32 driver12;   /* 0x118 I/O Driver Register12(AT91SAM9x5's 
> driver2 or SAMA5D3x's driver1 ) */
> +   u32 driver2;/* 0x11C I/O Driver Register2(SAMA5D3x's 
> driver2) */
> +   u32 reserved13[12]; /* 0x120 ~ 0x14C */
>  } at91_port_t;
>
>  typedef union at91_pio {
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index 12be3cf..87a7ff0 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -141,6 +141,13 @@ config ROCKCHIP_RK3288_PINCTRL
>   definitions and pin control functions for each available multiplex
>   function.
>
> +config PINCTRL_AT91
> +   bool "AT91 pinctrl driver"
> +   depends on DM
> +   help
> + This option is to enable the AT91 pinctrl driver for AT91 PIO
> + controller.

Can you add a bit more info? What features does it support? How does
it relate to the pio4 driver?

> +
>  config PINCTRL_AT91PIO4
> bool "AT91 PIO4 pinctrl driver"
> depends on DM
> diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
> index f28b5c1..a9535fa 100644
> --- a/drivers/pinctrl/Makefile
> +++ b/drivers/pinctrl/Makefile
> @@ -5,6 +5,7 @@
>  obj-y  += pinctrl-uclass.o
>  obj-$(CONFIG_$(SPL_)PINCTRL_GENERIC)   += pinctrl-generic.o
>
> +obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o
>  obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o
>  obj-y  += nxp/
>  obj-$(CONFIG_ARCH_ATH79) += ath79/
> diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
> new file mode 100644
> index 000..c7f75cb
> --- /dev/null
> +++ b/drivers/pinctrl/pinctrl-at91.c
> @@ -0,0 +1,451 @@
> +/*
> + * Atmel PIO pinctrl driver
> + *
> + * Copyright (C) 2016 Atmel Corporation
> + *   Wenyou.Yang 
> + *
> + * SPDX-License-Identifier:GPL-2.0+
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +DECLARE_GLOBAL_DATA_PTR;
> +
> +#define MAX_GPIO_BANKS 5
> +#define MAX_NB_GPIO_PER_BANK   32
> +
> +#define MAX_PINMUX_ENTRIES 200
> +
> +struct at91_pinctrl_priv {
> +   struct at91_port *reg_base[MAX_GPIO_BANKS];
> +   u32 nbanks;
> +};
> +
> +#define PULL_UPBIT(0)
> +#define MULTI_DRIVEBIT(1)
> +#define DEGLITCH   BIT(2)
> +#define PULL_DOWN  BIT(3)
> +#define DIS_SCHMIT BIT(4)
> +#define DRIVE_STRENGTH_SHIFT   5
> +#define DRIVE_STRENGTH_MASK0x3
> +#define DRIVE_STRENGTH (DRIVE_STRENGTH_MASK << DRIVE_STRENGTH_SHIFT)
> +#define DEBOUNCE   BIT(16)
> +#define DEBOUNCE_VAL_SHIFT 17
> +#define DEBOUNCE_VAL   (0x3fff << DEBOUNCE_VAL_SHIFT)
> +
> +/**
> + * These defines will translated the dt binding settings to our internal
> + * settings. They are not necessarily the same value as the register setting.
> + * The actual drive strength current of low, medium and high must be looked 
> up
> + * from the corresponding device datasheet. This value is different for pins
> + * that are even in the same banks. It is also dependent on VCC.
> + * DRIVE_STRENGTH_DEFAULT is just a placeholder to avoid changing the drive
> + * strength when there is no dt config for it.
> + */
> +#define DRIVE_STRENGTH_DEFAULT (0 << DRIVE_STRENGTH_SHIFT)
> +#define DRIVE_STRENGTH_LOW (1 << DRIVE_STRENGTH_SHIFT)
> +#define DRIVE_STRENGTH_MED (2 << 

Re: [U-Boot] [PATCH 8/9] reset: declare fdtdec_phandle_args as struct to fix warning

2016-10-12 Thread Simon Glass
On 7 October 2016 at 22:25, Masahiro Yamada
 wrote:
> The of_xlate() callback needs to know fdtdec_phandle_args is struct.
>
> Otherwise, the following warning is displayed.
>
> include/reset-uclass.h:40:11: warning: 'struct fdtdec_phandle_args'
> declared inside parameter list
> struct fdtdec_phandle_args *args);
>^
> include/reset-uclass.h:40:11: warning: its scope is only this
> definition or declaration, which is probably not what you want
>
> Signed-off-by: Masahiro Yamada 
> ---
>
>  include/reset-uclass.h | 1 +
>  1 file changed, 1 insertion(+)

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


Re: [U-Boot] [PATCH v4 11/11] x86: Use binman all x86 boards

2016-10-12 Thread Simon Glass
Hi Bin,

On 6 October 2016 at 14:59, Simon Glass  wrote:
> Change x86 boards to use binman to produce the ROM. This involves adding the
> image definition to the device tree and using it in the Makefile. The
> existing ifdtool features are no-longer needed.
>
> Note that the .dtsi file is common and is used for all x86 boards.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v4:
> - Remove RFC tag
> - Use binman for all x86 boards
>
> Changes in v3:
> - Put the binman definition in u-boot.dtsi
>
> Changes in v2:
> - Add automated test coverage
> - Put the binman definition in a common file for x86
> - Various changes and improvements based on using this tool for a while
>
>  Makefile | 45 +++
>  arch/x86/dts/u-boot.dtsi | 62 
> 
>  2 files changed, 65 insertions(+), 42 deletions(-)
>  create mode 100644 arch/x86/dts/u-boot.dtsi

What do you think of this patch?

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


[U-Boot] [PATCH v3 1/7] Revert "generic-board: allow showing custom board info"

2016-10-12 Thread Marcel Ziswiler
Drop CONFIG_CUSTOM_BOARDINFO as it is not Kconfig compliant and anyway
not really used anywhere plus the upcoming weak show_board_info()
approach seems much superior.

This reverts commit a9ad18c9d5fe2554753b0f9a52adfd5ebce61147.

Signed-off-by: Marcel Ziswiler 
---

Changes in v3:
- introduce new patch dropping unused CONFIG_CUSTOM_BOARDINFO by
  reverting commit a9ad18c9d5fe2554753b0f9a52adfd5ebce61147

Changes in v2: None

 common/board_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/board_info.c b/common/board_info.c
index bd5dcfa..6afe98e 100644
--- a/common/board_info.c
+++ b/common/board_info.c
@@ -17,7 +17,7 @@ int __weak checkboard(void)
  */
 int show_board_info(void)
 {
-#if defined(CONFIG_OF_CONTROL) && !defined(CONFIG_CUSTOM_BOARDINFO)
+#ifdef CONFIG_OF_CONTROL
DECLARE_GLOBAL_DATA_PTR;
const char *model;
 
-- 
2.5.5

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


[U-Boot] [PATCH v3 3/7] apalis/colibri_t20/t30: deactivate displaying board info

2016-10-12 Thread Marcel Ziswiler
Deactivate CONFIG_DISPLAY_BOARDINFO in favour of
CONFIG_DISPLAY_BOARDINFO_LATE which also displays on the LCD.

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- fixup deactivation of CONFIG_DISPLAY_BOARDINFO in favour of
  CONFIG_DISPLAY_BOARDINFO_LATE which also displays on the LCD after
  recent move thereof to Kconfig

Changes in v2: None

 configs/apalis_t30_defconfig  | 1 +
 configs/colibri_t20_defconfig | 1 +
 configs/colibri_t30_defconfig | 1 +
 3 files changed, 3 insertions(+)

diff --git a/configs/apalis_t30_defconfig b/configs/apalis_t30_defconfig
index a22e6b6..df12231 100644
--- a/configs/apalis_t30_defconfig
+++ b/configs/apalis_t30_defconfig
@@ -4,6 +4,7 @@ CONFIG_TEGRA30=y
 CONFIG_TARGET_APALIS_T30=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra30-apalis"
 CONFIG_OF_SYSTEM_SETUP=y
+# CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Apalis T30 # "
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 2745d8b..71096c2 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -4,6 +4,7 @@ CONFIG_TEGRA20=y
 CONFIG_TARGET_COLIBRI_T20=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra20-colibri"
 CONFIG_OF_SYSTEM_SETUP=y
+# CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Colibri T20 # "
 CONFIG_CMD_BOOTZ=y
diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig
index e9eabed..f565a01 100644
--- a/configs/colibri_t30_defconfig
+++ b/configs/colibri_t30_defconfig
@@ -4,6 +4,7 @@ CONFIG_TEGRA30=y
 CONFIG_TARGET_COLIBRI_T30=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra30-colibri"
 CONFIG_OF_SYSTEM_SETUP=y
+# CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_HUSH_PARSER=y
 CONFIG_SYS_PROMPT="Colibri T30 # "
 CONFIG_CMD_BOOTZ=y
-- 
2.5.5

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


[U-Boot] [PATCH v3 4/7] toradex: config block handling

2016-10-12 Thread Marcel Ziswiler
Add Toradex factory configuration block handling. The config block is a
data structure which gets stored to flash during production testing. The
structure holds such information as board resp. hardware revision,
product ID and serial number which is used as the NIC part of the
Ethernet MAC address as well. The config block will be read upon boot by
the show_board_info() function, displayed as part of the board
information and passed to Linux via device tree or ATAGs.

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- use custom show_board_info() rather than checkboard() and
  checkboard() rather than checkboard_fallback()
- also reword commit message accordingly

Changes in v2: None

 board/toradex/common/Kconfig |  76 +
 board/toradex/common/Makefile|  11 +
 board/toradex/common/tdx-cfg-block.c | 544 +++
 board/toradex/common/tdx-cfg-block.h |  68 +
 board/toradex/common/tdx-common.c| 168 +++
 board/toradex/common/tdx-common.h|  13 +
 6 files changed, 880 insertions(+)
 create mode 100644 board/toradex/common/Kconfig
 create mode 100644 board/toradex/common/Makefile
 create mode 100644 board/toradex/common/tdx-cfg-block.c
 create mode 100644 board/toradex/common/tdx-cfg-block.h
 create mode 100644 board/toradex/common/tdx-common.c
 create mode 100644 board/toradex/common/tdx-common.h

diff --git a/board/toradex/common/Kconfig b/board/toradex/common/Kconfig
new file mode 100644
index 000..0ec3d6e
--- /dev/null
+++ b/board/toradex/common/Kconfig
@@ -0,0 +1,76 @@
+# Copyright (c) 2016 Toradex, Inc.
+# SPDX-License-Identifier: GPL-2.0+
+
+menuconfig TDX_CFG_BLOCK
+   bool "Enable Toradex config block support"
+   select OF_BOARD_SETUP
+   help
+ The Toradex config block stored production data on the on-module
+ flash device (NAND, NOR or eMMC). The area is normally preserved by
+ software and contains the serial number (out of which the MAC
+ address is generated) and the exact module type.
+
+# Helper config to determine the correct default location of the cfg block
+config TDX_HAVE_MMC
+   bool
+
+config TDX_HAVE_NAND
+   bool
+
+config TDX_HAVE_NOR
+   bool
+
+if TDX_CFG_BLOCK
+
+choice TDX_CFG_BLOCK_LOCATION
+   prompt "Toradex config block location"
+   depends on TDX_CFG_BLOCK
+   default TDX_CFG_BLOCK_IS_IN_MMC if TDX_HAVE_MMC
+   default TDX_CFG_BLOCK_IS_IN_NAND if TDX_HAVE_NAND
+   default TDX_CFG_BLOCK_IS_IN_NOR if TDX_HAVE_NOR
+   help
+ Configure the location of the Toradex config block. By default, the
+ factory version of the Toradex config block is on the NAND, NOR or
+ eMMC flash device on the module.
+
+config TDX_CFG_BLOCK_IS_IN_MMC
+   bool "Location of the config block is in eMMC"
+
+config TDX_CFG_BLOCK_IS_IN_NAND
+   bool "Location of the config block is in NAND"
+
+config TDX_CFG_BLOCK_IS_IN_NOR
+   bool "Location of the config block is in NOR"
+
+endchoice
+
+config TDX_CFG_BLOCK_DEV
+   int "Toradex config block eMMC device ID"
+   depends on TDX_CFG_BLOCK_IS_IN_MMC
+
+config TDX_CFG_BLOCK_PART
+   int "Toradex config block eMMC partition ID"
+   depends on TDX_CFG_BLOCK_IS_IN_MMC
+
+config TDX_CFG_BLOCK_OFFSET
+   int "Toradex config block offset"
+   help
+ Specify the byte offset of the Toradex config block within the flash
+ device the config block is stored on.
+
+config TDX_CFG_BLOCK_OFFSET2
+   int "Toradex config block offset, second instance"
+   default 0
+   help
+ Specify the byte offset of the 2nd instance of the Toradex config 
block
+ within the flash device the config block is stored on.
+ Set to 0 on modules which have no 2nd instance.
+
+config TDX_CFG_BLOCK_2ND_ETHADDR
+   bool "Set the second Ethernet address"
+   help
+ For each serial number two Ethernet addresses are available for dual
+ Ethernet carrier boards. This options enables the code to set the
+ second Ethernet address as environment variable (eth1addr).
+
+endif
diff --git a/board/toradex/common/Makefile b/board/toradex/common/Makefile
new file mode 100644
index 000..d645f5a
--- /dev/null
+++ b/board/toradex/common/Makefile
@@ -0,0 +1,11 @@
+# Copyright (c) 2016 Toradex, Inc.
+# SPDX-License-Identifier: GPL-2.0+
+
+# Common for all Toradex modules
+ifeq ($(CONFIG_SPL_BUILD),y)
+# Necessary to create built-in.o
+obj- := __dummy__.o
+else
+obj-$(CONFIG_TDX_CFG_BLOCK) += tdx-cfg-block.o
+obj-y += tdx-common.o
+endif
diff --git a/board/toradex/common/tdx-cfg-block.c 
b/board/toradex/common/tdx-cfg-block.c
new file mode 100644
index 000..0014ce8
--- /dev/null
+++ b/board/toradex/common/tdx-cfg-block.c
@@ -0,0 +1,544 @@
+/*
+ * Copyright (c) 2016 Toradex, Inc.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include "tdx-cfg-block.h"
+
+#if defined(CONFIG_TARGET_APALIS_IMX6) ||

[U-Boot] [PATCH v3 5/7] apalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling

2016-10-12 Thread Marcel Ziswiler
With our common code in place actually make use of it across all our
modules.

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- use checkboard() rather than checkboard_fallback()
- drop CUSTOM_BOARDINFO

Changes in v2: None

 board/toradex/apalis_t30/Kconfig  | 18 ++
 board/toradex/apalis_t30/apalis_t30.c | 12 +++-
 board/toradex/colibri_imx7/Kconfig| 16 
 board/toradex/colibri_pxa270/Kconfig  | 11 +++
 board/toradex/colibri_pxa270/colibri_pxa270.c |  8 
 board/toradex/colibri_t20/Kconfig | 11 +++
 board/toradex/colibri_t20/colibri_t20.c   | 13 +
 board/toradex/colibri_t30/Kconfig | 18 ++
 board/toradex/colibri_t30/colibri_t30.c   |  9 -
 board/toradex/colibri_vf/Kconfig  | 14 ++
 configs/colibri_vf_defconfig  |  1 +
 include/configs/apalis_t30.h  |  4 ++--
 include/configs/colibri_imx7.h|  6 +-
 include/configs/colibri_pxa270.h  |  7 +--
 include/configs/colibri_t20.h |  2 +-
 include/configs/colibri_t30.h |  4 ++--
 include/configs/colibri_vf.h  |  6 --
 17 files changed, 148 insertions(+), 12 deletions(-)

diff --git a/board/toradex/apalis_t30/Kconfig b/board/toradex/apalis_t30/Kconfig
index f1dcda5..16224da 100644
--- a/board/toradex/apalis_t30/Kconfig
+++ b/board/toradex/apalis_t30/Kconfig
@@ -9,4 +9,22 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
default "apalis_t30"
 
+config TDX_CFG_BLOCK
+   default y
+
+config TDX_HAVE_MMC
+   default y
+
+config TDX_CFG_BLOCK_DEV
+   default "0"
+
+config TDX_CFG_BLOCK_PART
+   default "1"
+
+# Toradex config block in eMMC, at the end of 1st "boot sector"
+config TDX_CFG_BLOCK_OFFSET
+   default "-512"
+
+source "board/toradex/common/Kconfig"
+
 endif
diff --git a/board/toradex/apalis_t30/apalis_t30.c 
b/board/toradex/apalis_t30/apalis_t30.c
index 3f56971..3d83491 100644
--- a/board/toradex/apalis_t30/apalis_t30.c
+++ b/board/toradex/apalis_t30/apalis_t30.c
@@ -1,5 +1,5 @@
 /*
- *  (C) Copyright 2014
+ *  (C) Copyright 2014-2016
  *  Marcel Ziswiler 
  *
  * SPDX-License-Identifier:GPL-2.0+
@@ -17,6 +17,8 @@
 
 #include "pinmux-config-apalis_t30.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define PMU_I2C_ADDRESS0x2D
 #define MAX_I2C_RETRY  3
 
@@ -29,6 +31,14 @@ int arch_misc_init(void)
return 0;
 }
 
+int checkboard(void)
+{
+   printf("Model: Toradex Apalis T30 %dGB\n",
+  (gd->ram_size == 0x4000) ? 1 : 2);
+
+   return 0;
+}
+
 /*
  * Routine: pinmux_init
  * Description: Do individual peripheral pinmux configs
diff --git a/board/toradex/colibri_imx7/Kconfig 
b/board/toradex/colibri_imx7/Kconfig
index 7bba26b..414a600 100644
--- a/board/toradex/colibri_imx7/Kconfig
+++ b/board/toradex/colibri_imx7/Kconfig
@@ -16,5 +16,21 @@ config COLIBRI_IMX7_EXT_PHYCLK
  clock source.
default y
 
+config TDX_CFG_BLOCK
+   default y
+
+config TDX_HAVE_NAND
+   default y
+
+config TDX_CFG_BLOCK_OFFSET
+   default "2048"
+
+config TDX_CFG_BLOCK_OFFSET2
+   default "133120"
+
+config TDX_CFG_BLOCK_2ND_ETHADDR
+   default y
+
+source "board/toradex/common/Kconfig"
 
 endif
diff --git a/board/toradex/colibri_pxa270/Kconfig 
b/board/toradex/colibri_pxa270/Kconfig
index 949407a..f646baa 100644
--- a/board/toradex/colibri_pxa270/Kconfig
+++ b/board/toradex/colibri_pxa270/Kconfig
@@ -9,4 +9,15 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
default "colibri_pxa270"
 
+config TDX_CFG_BLOCK
+   default y
+
+config TDX_HAVE_NOR
+   default y
+
+config TDX_CFG_BLOCK_OFFSET
+   default "262144"
+
+source "board/toradex/common/Kconfig"
+
 endif
diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c 
b/board/toradex/colibri_pxa270/colibri_pxa270.c
index 3def0a6..de8cb28 100644
--- a/board/toradex/colibri_pxa270/colibri_pxa270.c
+++ b/board/toradex/colibri_pxa270/colibri_pxa270.c
@@ -2,6 +2,7 @@
  * Toradex Colibri PXA270 Support
  *
  * Copyright (C) 2010 Marek Vasut 
+ * Copyright (C) 2016 Marcel Ziswiler 
  *
  * SPDX-License-Identifier:GPL-2.0+
  */
@@ -32,6 +33,13 @@ int board_init(void)
return 0;
 }
 
+int checkboard(void)
+{
+   puts("Model: Toradex Colibri PXA270\n");
+
+   return 0;
+}
+
 int dram_init(void)
 {
pxa2xx_dram_init();
diff --git a/board/toradex/colibri_t20/Kconfig 
b/board/toradex/colibri_t20/Kconfig
index 7f373b2..a43acdd 100644
--- a/board/toradex/colibri_t20/Kconfig
+++ b/board/toradex/colibri_t20/Kconfig
@@ -9,4 +9,15 @@ config SYS_VENDOR
 config SYS_CONFIG_NAME
default "colibri_t20"
 
+config TDX_CFG_BLOCK
+   default y
+
+config TDX_HAVE_NAND
+   default y
+
+config TDX_CFG_BLOCK_OFFSET
+   default "3145728"
+
+source "board/toradex/common/Kconfig"
+
 endif
diff --git 

[U-Boot] [PATCH v3 2/7] generic-board: make show_board_info a weak function

2016-10-12 Thread Marcel Ziswiler
Make show_board_info() a weak function which allows for custom board
specific implementations thereof.

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- introduce new patch making show_board_info() a weak function which
  allows for custom board specific implementations thereof

Changes in v2: None

 common/board_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/board_info.c b/common/board_info.c
index 6afe98e..aa45e24 100644
--- a/common/board_info.c
+++ b/common/board_info.c
@@ -15,7 +15,7 @@ int __weak checkboard(void)
  * If the root node of the DTB has a "model" property, show it.
  * Then call checkboard().
  */
-int show_board_info(void)
+int __weak show_board_info(void)
 {
 #ifdef CONFIG_OF_CONTROL
DECLARE_GLOBAL_DATA_PTR;
-- 
2.5.5

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


[U-Boot] [PATCH v3 0/7] toradex: config block handling

2016-10-12 Thread Marcel Ziswiler

This series integrates Toradex factory configuration block handling. The
config block is a data structure which gets stored to flash during
production testing. The structure holds such information as board resp.
hardware revision, product ID and serial number which is used as the NIC
part of the Ethernet MAC address as well. The config block will be read
upon boot by the show_board_info() function, displayed as part of the
board information and passed to Linux via device tree or ATAGs.

Changes in v3:
- introduce new patch dropping unused CONFIG_CUSTOM_BOARDINFO by
  reverting commit a9ad18c9d5fe2554753b0f9a52adfd5ebce61147
- introduce new patch making show_board_info() a weak function which
  allows for custom board specific implementations thereof
- fixup deactivation of CONFIG_DISPLAY_BOARDINFO in favour of
  CONFIG_DISPLAY_BOARDINFO_LATE which also displays on the LCD after
  recent move thereof to Kconfig
- use custom show_board_info() rather than checkboard() and
  checkboard() rather than checkboard_fallback()
- also reword commit message accordingly
- use checkboard() rather than checkboard_fallback()
- drop CUSTOM_BOARDINFO
- drop patch 1 'colibri_imx7/vf: move to custom checkboard_fallback()'
  in favour of Stefan's proposed solution

Changes in v2:
- fixed common.h include mess in board/toradex/common by renaming
  common* to tdx-common
- renamed TRDX to TDX and trdx to tdx as in common use internally
- consolidated makefiles and changed copyright message
- renamed configblock* to tdx-cfg-block* analogous to Kconfig symbols
- moved board/toradex/common/Kconfig sourcing from arch/arm/Kconfig
  into our own board Kconfig files
- use a named choice for the config block location for above to work
  without issuing any warnings (undocumented kbuild feature curtsey
  Arnaud Lacombe)
- added CUSTOM_BOARDINFO into our common Kconfig to avoid recent
  no_new_adhoc_configs_check error
- add Max' patch
  colibri_vf: usb gadget: toradex pid is now set generically

Marcel Ziswiler (6):
  Revert "generic-board: allow showing custom board info"
  generic-board: make show_board_info a weak function
  apalis/colibri_t20/t30: deactivate displaying board info
  toradex: config block handling
  apalis/colibri_imx7/pxa270/t20/t30/vf: integrate config block handling
  apalis/colibri_t30: move environment location

Max Krummenacher (1):
  colibri_vf: usb gadget: toradex pid is now set generically

 board/toradex/apalis_t30/Kconfig  |  18 +
 board/toradex/apalis_t30/apalis_t30.c |  12 +-
 board/toradex/colibri_imx7/Kconfig|  16 +
 board/toradex/colibri_pxa270/Kconfig  |  11 +
 board/toradex/colibri_pxa270/colibri_pxa270.c |   8 +
 board/toradex/colibri_t20/Kconfig |  11 +
 board/toradex/colibri_t20/colibri_t20.c   |  13 +
 board/toradex/colibri_t30/Kconfig |  18 +
 board/toradex/colibri_t30/colibri_t30.c   |   9 +-
 board/toradex/colibri_vf/Kconfig  |  14 +
 board/toradex/colibri_vf/colibri_vf.c |  16 -
 board/toradex/common/Kconfig  |  76 
 board/toradex/common/Makefile |  11 +
 board/toradex/common/tdx-cfg-block.c  | 544 ++
 board/toradex/common/tdx-cfg-block.h  |  68 
 board/toradex/common/tdx-common.c | 168 
 board/toradex/common/tdx-common.h |  13 +
 common/board_info.c   |   4 +-
 configs/apalis_t30_defconfig  |   1 +
 configs/colibri_t20_defconfig |   1 +
 configs/colibri_t30_defconfig |   1 +
 configs/colibri_vf_defconfig  |   1 +
 include/configs/apalis_t30.h  |  11 +-
 include/configs/colibri_imx7.h|   6 +-
 include/configs/colibri_pxa270.h  |   7 +-
 include/configs/colibri_t20.h |   2 +-
 include/configs/colibri_t30.h |  11 +-
 include/configs/colibri_vf.h  |  13 +-
 scripts/config_whitelist.txt  |   5 -
 29 files changed, 1041 insertions(+), 48 deletions(-)
 create mode 100644 board/toradex/common/Kconfig
 create mode 100644 board/toradex/common/Makefile
 create mode 100644 board/toradex/common/tdx-cfg-block.c
 create mode 100644 board/toradex/common/tdx-cfg-block.h
 create mode 100644 board/toradex/common/tdx-common.c
 create mode 100644 board/toradex/common/tdx-common.h

-- 
2.5.5

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


[U-Boot] [PATCH v3 7/7] colibri_vf: usb gadget: toradex pid is now set generically

2016-10-12 Thread Marcel Ziswiler
From: Max Krummenacher 

remove now unused CONFIG_TRDX_PID_XXX

Signed-off-by: Marcel Ziswiler 
---

Changes in v3: None
Changes in v2: None

 board/toradex/colibri_vf/colibri_vf.c | 16 
 include/configs/colibri_vf.h  |  7 ---
 scripts/config_whitelist.txt  |  5 -
 3 files changed, 28 deletions(-)

diff --git a/board/toradex/colibri_vf/colibri_vf.c 
b/board/toradex/colibri_vf/colibri_vf.c
index c65ccb3..e65d9c3 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -528,22 +528,6 @@ int checkboard(void)
return 0;
 }
 
-int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
-{
-   unsigned short usb_pid;
-
-   put_unaligned(CONFIG_TRDX_VID, &dev->idVendor);
-
-   if (is_colibri_vf61())
-   usb_pid = CONFIG_TRDX_PID_COLIBRI_VF61IT;
-   else
-   usb_pid = CONFIG_TRDX_PID_COLIBRI_VF50IT;
-
-   put_unaligned(usb_pid, &dev->idProduct);
-
-   return 0;
-}
-
 #ifdef CONFIG_USB_EHCI_VF
 int board_ehci_hcd_init(int port)
 {
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 0e622fb..0cd77ff 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -208,13 +208,6 @@
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
 
-/* USB Client Support */
-#define CONFIG_TRDX_VID  0x1B67
-#define CONFIG_TRDX_PID_COLIBRI_VF50 0x0016
-#define CONFIG_TRDX_PID_COLIBRI_VF61 0x0017
-#define CONFIG_TRDX_PID_COLIBRI_VF61IT   0x0018
-#define CONFIG_TRDX_PID_COLIBRI_VF50IT   0x0019
-
 /* USB DFU */
 #define CONFIG_SYS_DFU_DATA_BUF_SIZE (1024 * 1024)
 
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 3621c91..05fd5be 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -8010,11 +8010,6 @@ CONFIG_TRACE_EARLY_ADDR
 CONFIG_TRACE_EARLY_SIZE
 CONFIG_TRAILBLAZER
 CONFIG_TRATS
-CONFIG_TRDX_PID_COLIBRI_VF50
-CONFIG_TRDX_PID_COLIBRI_VF50IT
-CONFIG_TRDX_PID_COLIBRI_VF61
-CONFIG_TRDX_PID_COLIBRI_VF61IT
-CONFIG_TRDX_VID
 CONFIG_TSEC
 CONFIG_TSEC1
 CONFIG_TSEC1_NAME
-- 
2.5.5

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


[U-Boot] [PATCH v3 6/7] apalis/colibri_t30: move environment location

2016-10-12 Thread Marcel Ziswiler
Now with the config block handling in place move the U-Boot environment
location before the config block at the end of 1st "boot sector" as
deployed during production using our downstream BSP.

Signed-off-by: Marcel Ziswiler 

---

Changes in v3:
- drop patch 1 'colibri_imx7/vf: move to custom checkboard_fallback()'
  in favour of Stefan's proposed solution

Changes in v2:
- fixed common.h include mess in board/toradex/common by renaming
  common* to tdx-common
- renamed TRDX to TDX and trdx to tdx as in common use internally
- consolidated makefiles and changed copyright message
- renamed configblock* to tdx-cfg-block* analogous to Kconfig symbols
- moved board/toradex/common/Kconfig sourcing from arch/arm/Kconfig
  into our own board Kconfig files
- use a named choice for the config block location for above to work
  without issuing any warnings (undocumented kbuild feature curtsey
  Arnaud Lacombe)
- added CUSTOM_BOARDINFO into our common Kconfig to avoid recent
  no_new_adhoc_configs_check error
- add Max' patch
  colibri_vf: usb gadget: toradex pid is now set generically

 include/configs/apalis_t30.h  | 7 ---
 include/configs/colibri_t30.h | 7 ---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index 5df8013..66bed44 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -32,11 +32,12 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_TEGRA_MMC
 
-/* Environment in eMMC, at the end of 2nd "boot sector" */
+/* Environment in eMMC, before config block at the end of 1st "boot sector" */
 #define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_ENV_OFFSET  (-CONFIG_ENV_SIZE)
+#define CONFIG_ENV_OFFSET  (-CONFIG_ENV_SIZE + \
+CONFIG_TDX_CFG_BLOCK_OFFSET)
 #define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART2
+#define CONFIG_SYS_MMC_ENV_PART1
 
 /* USB host support */
 #define CONFIG_USB_EHCI
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index 1ab5c41..e8b3f99 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -32,11 +32,12 @@
 #define CONFIG_GENERIC_MMC
 #define CONFIG_TEGRA_MMC
 
-/* Environment in eMMC, at the end of 2nd "boot sector" */
+/* Environment in eMMC, before config block at the end of 1st "boot sector" */
 #define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_ENV_OFFSET  (-CONFIG_ENV_SIZE)
+#define CONFIG_ENV_OFFSET  (-CONFIG_ENV_SIZE + \
+CONFIG_TDX_CFG_BLOCK_OFFSET)
 #define CONFIG_SYS_MMC_ENV_DEV 0
-#define CONFIG_SYS_MMC_ENV_PART2
+#define CONFIG_SYS_MMC_ENV_PART1
 
 /* USB host support */
 #define CONFIG_USB_EHCI
-- 
2.5.5

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


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

2016-10-12 Thread Tom Rini
On Sun, Oct 09, 2016 at 11:05:10AM +0200, Stefan Roese wrote:

> Hi Tom,
> 
> please pull the DS109 board support. Its an updated version - the
> original patches have been sent to the list quite some time ago.
> 
> Thanks,
> Stefan
> 
> The following changes since commit f5fd45ff64e28a73499548358e3d1ceda0de7daf:
> 
>   Merge branch 'master' of git://www.denx.de/git/u-boot-imx (2016-10-08 
> 09:33:37 -0400)
> 
> are available in the git repository at:
> 
>   git://www.denx.de/git/u-boot-marvell.git 
> 
> for you to fetch changes up to 1c653201d7de10b486266317200bfaa8bdb57700:
> 
>   arm: kirkwood: fix Synology board tag (2016-10-09 10:55:32 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Please pull fsl-qoriq master

2016-10-12 Thread Tom Rini
On Sat, Oct 08, 2016 at 05:11:44PM +, york sun wrote:

> Tom,
> 
> The following changes since commit 53fec162061811a73c7dab3207f8fdb2343ae289:
> 
>Prepare v2016.11-rc1 (2016-10-03 09:28:13 -0400)
> 
> are available in the git repository at:
> 
>git://git.denx.de/u-boot-fsl-qoriq.git
> 
> for you to fetch changes up to 76379dfb7e7e5092f32c79897bb58c19979e576b:
> 
>board: ls1012afrdm: overwrite CONFIG_EXTRA_ENV_SETTINGS (2016-10-07 
> 11:34:24 -0700)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] pull request: u-boot-uniphier/master

2016-10-12 Thread Tom Rini
On Mon, Oct 10, 2016 at 10:14:26AM +0900, Masahiro Yamada wrote:

> Hi Tom.
> 
> Please pull some more UniPhier updates:
> 
>  - Various SoC specpfic updates (DRAM, PLL, errata)
>  - Minor cleanups
>  - Add UniPhier reset controller driver
> 
> Note:
> I am touching include/reset-uclass.h by
> "reset: declare fdtdec_phandle_args as struct to fix warning".
> I included it in this pull-request because
> I need it to suppress warnings for my new reset driver.
> I believe it is OK since the patch is trivial enough.
> 
> 
> 
> 
> The following changes since commit f5fd45ff64e28a73499548358e3d1ceda0de7daf:
> 
>   Merge branch 'master' of git://www.denx.de/git/u-boot-imx
> (2016-10-08 09:33:37 -0400)
> 
> are available in the git repository at:
> 
> 
>   git://git.denx.de/u-boot-uniphier.git master
> 
> for you to fetch changes up to 4fb96c48c183128c00b21c7858bb05897a1b80de:
> 
>   reset: uniphier: add reset controller driver for UniPhier SoCs
> (2016-10-10 10:03:23 +0900)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Please pull u-boot-sunxi master

2016-10-12 Thread Tom Rini
On Mon, Oct 10, 2016 at 10:17:16AM +0200, Hans de Goede wrote:

> Hi Tom,
> 
> Here is a small pull-req for v2016.11, consisting
> of 2 small DRAM handling bug-fixes.
> 
> The following changes since commit f5fd45ff64e28a73499548358e3d1ceda0de7daf:
> 
>   Merge branch 'master' of git://www.denx.de/git/u-boot-imx (2016-10-08 
> 09:33:37 -0400)
> 
> are available in the git repository at:
> 
>   http://git.denx.de/u-boot-sunxi.git master
> 
> for you to fetch changes up to 55cdcdaad3edb24779b76716d5cf9c36db2fed44:
> 
>   sunxi: OLinuXino Lime A20 boards: Use 384 MHz DRAM clock (2016-10-10 
> 09:24:00 +0200)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Please pull u-boot-x86

2016-10-12 Thread Tom Rini
On Wed, Oct 12, 2016 at 11:04:12AM +0800, Bin Meng wrote:

> Hi Tom,
> 
> The following changes since commit f5fd45ff64e28a73499548358e3d1ceda0de7daf:
> 
>   Merge branch 'master' of git://www.denx.de/git/u-boot-imx
> (2016-10-08 09:33:37 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-x86.git master
> 
> for you to fetch changes up to 00bcaedd5c4063c677d16af264bbcb991fb9675c:
> 
>   x86: Clean up unused macros in the configuration headers (2016-10-12
> 10:58:24 +0800)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] Pull request, u-boot-tegra/master

2016-10-12 Thread Tom Rini
On Mon, Oct 10, 2016 at 01:55:22PM -0700, Tom Warren wrote:

> Tom,
> 
> Please pull u-boot-tegra/master into U-Boot/master. Thanks!
> 
> All Tegra builds are OK, and Stephen's automated test system reports that
> all tests pass.
> 
> The following changes since commit f5fd45ff64e28a73499548358e3d1ceda0de7daf:
> 
>   Merge branch 'master' of git://www.denx.de/git/u-boot-imx (2016-10-08
> 09:33:37 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-tegra.git master
> 
> for you to fetch changes up to d40d69ee350b62af90c2b522e05cbb3eb5f27112:
> 
>   ARM: tegra: reduce DRAM size mapped into MMU on ARM64 (2016-10-10
> 11:00:03 -0700)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v4 11/11] x86: Use binman all x86 boards

2016-10-12 Thread Bin Meng
Hi Simon,

On Thu, Oct 13, 2016 at 8:04 AM, Simon Glass  wrote:
> Hi Bin,
>
> On 6 October 2016 at 14:59, Simon Glass  wrote:
>> Change x86 boards to use binman to produce the ROM. This involves adding the
>> image definition to the device tree and using it in the Makefile. The
>> existing ifdtool features are no-longer needed.
>>
>> Note that the .dtsi file is common and is used for all x86 boards.
>>
>> Signed-off-by: Simon Glass 
>> ---
>>
>> Changes in v4:
>> - Remove RFC tag
>> - Use binman for all x86 boards
>>
>> Changes in v3:
>> - Put the binman definition in u-boot.dtsi
>>
>> Changes in v2:
>> - Add automated test coverage
>> - Put the binman definition in a common file for x86
>> - Various changes and improvements based on using this tool for a while
>>
>>  Makefile | 45 +++
>>  arch/x86/dts/u-boot.dtsi | 62 
>> 
>>  2 files changed, 65 insertions(+), 42 deletions(-)
>>  create mode 100644 arch/x86/dts/u-boot.dtsi
>
> What do you think of this patch?
>

Sorry, I will try to look at this in a day or two.

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Jaehoon Chung
On 10/12/2016 11:03 PM, Alexandr Bochkarev wrote:
> 
>>
>> define debug() in your mmc driver..or enable CONFIG_DEBUG..then you can see 
>> all debug message.
>>
> 
> When i define CONFIG_DEGUB, u-boot binary size is to large for a20 sram
> I have tried to disable unused features in config, but its not enough

Just add the debug() into your driver..then it's only displayed your driver 
debug message.

#define debug() ...

> 
>>
>> If you're setting MMC_MODE_8BIT..try to remove it..
>>
> I am not never set 8 bit mode
> And now found it defines
> 
> #define MMC_MODE_4BIT (1 << 2)
> #define MMC_MODE_8BIT (1 << 3)
> 
> and replace with 
> 
> #define MMC_MODE_4BIT (1 << 2)
> #define MMC_MODE_8BIT (1 << 2) //(1 << 3)
> 
> The same result.
> 
> 

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


Re: [U-Boot] [bug report] sunxi: booting from eMMC

2016-10-12 Thread Jaehoon Chung
On 10/13/2016 02:49 AM, Alexandr Bochkarev wrote:
> I decided to check how linux kernel init emmc on marsboard, which i boot from 
> SD card
> And i found, that it inited only in 1-bit mode, is it normal? it works, i can 
> edit files on it

Well, it's not normal.
It's possible to use only 1bit buswidth...but i didn't see the case about using 
only 1bit buswidth.

> 
> linux set 
> eMMC(sdc2) to mmc0 
> SD(sdc0) to mmc1
> 
> # cat /sys/kernel/debug/mmc0/ioseMMC
> clock:  5200 Hz
> vdd:7 (1.65 - 1.95 V)
> bus mode:   2 (push-pull)
> chip select:0 (don't care)
> power mode: 2 (on)
> bus width:  0 (1 bits)
> timing spec:1 (mmc high-speed)
> 
> # cat /sys/kernel/debug/mmc1/iosSD card
> clock:  5000 Hz
> vdd:16 (2.8 ~ 2.9 V)
> bus mode:   2 (push-pull)
> chip select:0 (don't care)
> power mode: 2 (on)
> bus width:  2 (4 bits)
> timing spec:2 (sd high-speed)
> 
> # dmesg | grep 'mmc-msg\|mmc-err’
> 
> [0.167917] [mmc-msg] sw_mci_init
> [0.168039] [mmc-msg] MMC host used card: 0x5, boot card: 0x4, io_card 0
> [0.168310] [mmc-msg] sdc2 set round clock 40, src 2400
> [0.168520] [mmc-msg] sdc2 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 
> timing LEGACY(SDR12) dt B
> [0.169639] [mmc-msg] sdc2 Probe: base:0xf005e000 irq:66 
> sg_cpu:f006(4fc0) ret 0.
> [0.169683] [mmc-msg] sdc2 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 
> timing LEGACY(SDR12) dt B
> [0.169695] [mmc-msg] sdc2 power on
> [0.170832] [mmc-msg] sdc0 set round clock 40, src 2400
> [0.171037] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 
> timing LEGACY(SDR12) dt B
> [0.172069] [mmc-msg] sdc0 Probe: base:0xf0062000 irq:64 
> sg_cpu:f0064000(4fc01000) ret 0.
> [0.182158] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.182189] [mmc-msg] sdc2 set round clock 40, src 2400
> [0.254447] [mmc-err] smc 2 err, cmd 52,  RTO
> [0.259631] [mmc-err] smc 2 err, cmd 52,  RTO
> [0.264001] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.266386] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.268208] [mmc-err] smc 2 err, cmd 8,  RTO
> [0.273296] [mmc-err] smc 2 err, cmd 5,  RTO
> [0.278383] [mmc-err] smc 2 err, cmd 5,  RTO
> [0.283461] [mmc-err] smc 2 err, cmd 5,  RTO
> [0.288546] [mmc-err] smc 2 err, cmd 5,  RTO
> [0.293641] [mmc-err] smc 2 err, cmd 55,  RTO
> [0.298813] [mmc-err] smc 2 err, cmd 55,  RTO
> [0.303988] [mmc-err] smc 2 err, cmd 55,  RTO
> [0.309158] [mmc-err] smc 2 err, cmd 55,  RTO
> [0.313529] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.313857] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.313874] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.313889] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.316273] [mmc-msg] sdc2 set ios: clk 40Hz bm OD pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.333276] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V 
> width 1 timing LEGACY(SDR12) dt B
> [0.346076] [mmc-msg] sdc2 set ios: clk 40Hz bm PP pm ON vdd 3.3V 
> width 1 timing MMC-HS(SDR20) dt B
> [0.346092] [mmc-msg] sdc2 set ios: clk 5200Hz bm PP pm ON vdd 3.3V 
> width 1 timing MMC-HS(SDR20) dt B
> [0.346123] [mmc-msg] sdc2 set round clock 42857143, src 6
> [0.401211] [mmc-msg] sdc2 set ios: clk 5200Hz bm PP pm ON vdd 3.3V 
> width 8 timing MMC-HS(SDR20) dt B
> [0.401276] [mmc-err] smc 2 err, cmd 8,  DCE EBE
> [0.405889] [mmc-err] In data read operation
> [0.410155] [mmc-msg] found data error, need to send stop command
> [0.410172] [mmc-err] sdc 2 send stop command failed
> [0.415209] [mmc-msg] sdc2 set ios: clk 5200Hz bm PP pm ON vdd 3.3V 
> width 4 timing MMC-HS(SDR20) dt B
> [0.415284] [mmc-err] smc 2 err, cmd 8,  DCE
> [0.419553] [mmc-err] In data read operation
> [0.423818] [mmc-msg] found data error, need to send stop command
> [0.423834] [mmc-err] sdc 2 send stop command failed

buswidth test are all failed..so it's set to 1bit buswidth..Dose it support 
4bit buswidth on hardware?
If my understanding is right, it's used SDR20(?)..how about controlling clk 
value..?
clock value is set to high value..

When i bring up the eMMC/SD/SDIO..I did to check the below sequence.

1. Power is supplied correctly.
2. Clock is enabled correctly
3. GPIO pin is set to correct value. (Function, GPIO value..)
4. Which buswidth/busmode is supported..and it's correctly changed.

Above checking lists nave to ensure...after that..can be checked mmc c

[U-Boot] [PATCH] mmc: sdhci: fix the "misaligned operation at range" for cache

2016-10-12 Thread Jaehoon Chung
This pathc is fixed the below thing.
If misaligned the cache range, Just flush to CACHLINE_SIZE.
"CACHE: Misaligned operation at range [7ae55b00, 7ae55b08]"

Signed-off-by: Jaehoon Chung 
---
 drivers/mmc/sdhci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 837c538..10ff57e 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -242,6 +242,7 @@ static int sdhci_send_command(struct mmc *mmc, struct 
mmc_cmd *cmd,
 
sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT);
 #ifdef CONFIG_MMC_SDMA
+   trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
flush_cache(start_addr, trans_bytes);
 #endif
sdhci_writew(host, SDHCI_MAKE_CMD(cmd->cmdidx, flags), SDHCI_COMMAND);
-- 
1.9.1

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


[U-Boot] [PATCH v2 1/2] gpio: at91_gpio: Remove CPU_HAS_PIO3 macro

2016-10-12 Thread Wenyou Yang
The intention of this patch is the preparation to introduce
the pinctrl driver for AT91 PIO.

Use "union" to make the PIO3 and PIO2's registers be together
and make their offset aligned.

Signed-off-by: Wenyou Yang 
---

Changes in v2: None

 arch/arm/mach-at91/include/mach/at91_pio.h  |  61 
 arch/arm/mach-at91/include/mach/at91sam9x5.h|   1 -
 arch/arm/mach-at91/include/mach/sama5d3.h   |   1 -
 arch/arm/mach-at91/include/mach/sama5d4.h   |   1 -
 board/atmel/sama5d3xek/sama5d3xek.c |  64 -
 board/atmel/sama5d4_xplained/sama5d4_xplained.c | 148 ++--
 board/atmel/sama5d4ek/sama5d4ek.c   | 136 +-
 board/denx/ma5d4evk/ma5d4evk.c  | 178 
 board/l+g/vinco/vinco.c |  70 +-
 drivers/gpio/at91_gpio.c| 142 +--
 10 files changed, 427 insertions(+), 375 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h 
b/arch/arm/mach-at91/include/mach/at91_pio.h
index 3012278..393a163 100644
--- a/arch/arm/mach-at91/include/mach/at91_pio.h
+++ b/arch/arm/mach-at91/include/mach/at91_pio.h
@@ -63,28 +63,32 @@ typedef struct at91_port {
u32 puer;   /* 0x64 Pull-up Enable Register */
u32 pusr;   /* 0x68 Pad Pull-up Status Register */
u32 reserved4;
-#if defined(CPU_HAS_PIO3)
-   u32 abcdsr1;/* 0x70 Peripheral ABCD Select Register 1 */
-   u32 abcdsr2;/* 0x74 Peripheral ABCD Select Register 2 */
-   u32 reserved5[2];
-   u32 ifscdr; /* 0x80 Input Filter SCLK Disable Register */
-   u32 ifscer; /* 0x84 Input Filter SCLK Enable Register */
-   u32 ifscsr; /* 0x88 Input Filter SCLK Status Register */
-   u32 scdr;   /* 0x8C SCLK Divider Debouncing Register */
-   u32 ppddr;  /* 0x90 Pad Pull-down Disable Register */
-   u32 ppder;  /* 0x94 Pad Pull-down Enable Register */
-   u32 ppdsr;  /* 0x98 Pad Pull-down Status Register */
-   u32 reserved6;  /*  */
-#else
-   u32 asr;/* 0x70 Select A Register */
-   u32 bsr;/* 0x74 Select B Register */
-   u32 absr;   /* 0x78 AB Select Status Register */
-   u32 reserved5[9];   /*  */
-#endif
+   union {
+   struct {
+   u32 abcdsr1;/* 0x70 Peripheral ABCD Select 
Register 1 */
+   u32 abcdsr2;/* 0x74 Peripheral ABCD Select 
Register 2 */
+   u32 reserved5[2];
+   u32 ifscdr; /* 0x80 Input Filter SCLK 
Disable Register */
+   u32 ifscer; /* 0x84 Input Filter SCLK 
Enable Register */
+   u32 ifscsr; /* 0x88 Input Filter SCLK 
Status Register */
+   u32 scdr;   /* 0x8C SCLK Divider Debouncing 
Register */
+   u32 ppddr;  /* 0x90 Pad Pull-down Disable 
Register */
+   u32 ppder;  /* 0x94 Pad Pull-down Enable 
Register */
+   u32 ppdsr;  /* 0x98 Pad Pull-down Status 
Register */
+   u32 reserved6;  /*  */
+   } pio3;
+
+   struct {
+   u32 asr;/* 0x70 Select A Register */
+   u32 bsr;/* 0x74 Select B Register */
+   u32 absr;   /* 0x78 AB Select Status 
Register */
+   u32 reserved5[9];   /*  */
+   } pio2;
+   } mux;
+
u32 ower;   /* 0xA0 Output Write Enable Register */
u32 owdr;   /* 0xA4 Output Write Disable Register */
u32 owsr;   /* OxA8 Output Write Status Register */
-#if defined(CPU_HAS_PIO3)
u32 reserved7;  /*  */
u32 aimer;  /* 0xB0 Additional INT Modes Enable Register */
u32 aimdr;  /* 0xB4 Additional INT Modes Disable Register */
@@ -104,9 +108,6 @@ typedef struct at91_port {
u32 reserved11[5];  /* */
u32 schmitt;/* 0x100 Schmitt Trigger Register */
u32 reserved12[63];
-#else
-   u32 reserved6[85];
-#endif
 } at91_port_t;
 
 typedef union at91_pio {
@@ -123,13 +124,6 @@ typedef union at91_pio {
 #ifdef CONFIG_AT91_GPIO
 int at91_set_a_periph(unsigned port, unsigned pin, int use_pullup);
 int at91_set_b_periph(unsigned port, unsigned pin, int use_pullup);
-#if defined(CPU_HAS_PIO3)
-int at91_set_c_periph(unsigned port, unsigned pin, int use_pullup);
-int at91_set_d_periph(unsigned port, unsigned pin, int use_pullup);
-int at91_set_pio_debounce(unsigned port, unsigned pin, int is_on, int div);
-int at91_set_pio_pulldown(uns

[U-Boot] [PATCH v2 0/2] pinctrl: at91: Add pinctrl driver

2016-10-12 Thread Wenyou Yang
The purpose of this patch set is to add the pinctrl driver for AT91
PIO controller.

Changes in v2:
 - Add more information for the PINCTRL_AT91 option's help.
 - Add more comments for the callback of struct at91_pinctrl_mux_ops.
 - Use clrsetbits_le32() in set_drive_strength().
 - Add the brackets for readability.
 - Use debug() to print the message to debug, instead of printf().
 - Remove not veryuseful at91_bank_base().
 - Add Reviewed-by tag.

Wenyou Yang (2):
  gpio: at91_gpio: Remove CPU_HAS_PIO3 macro
  pinctrl: pinctrl-at91: Add pinctrl driver

 arch/arm/mach-at91/include/mach/at91_pio.h  |  67 ++--
 arch/arm/mach-at91/include/mach/at91sam9x5.h|   1 -
 arch/arm/mach-at91/include/mach/sama5d3.h   |   1 -
 arch/arm/mach-at91/include/mach/sama5d4.h   |   1 -
 board/atmel/sama5d3xek/sama5d3xek.c |  64 ++--
 board/atmel/sama5d4_xplained/sama5d4_xplained.c | 148 
 board/atmel/sama5d4ek/sama5d4ek.c   | 136 
 board/denx/ma5d4evk/ma5d4evk.c  | 178 +-
 board/l+g/vinco/vinco.c |  70 ++--
 drivers/gpio/at91_gpio.c| 142 +---
 drivers/pinctrl/Kconfig |  14 +
 drivers/pinctrl/Makefile|   1 +
 drivers/pinctrl/pinctrl-at91.c  | 441 
 13 files changed, 888 insertions(+), 376 deletions(-)
 create mode 100644 drivers/pinctrl/pinctrl-at91.c

-- 
2.7.4

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


[U-Boot] [PATCH v2 2/2] pinctrl: pinctrl-at91: Add pinctrl driver

2016-10-12 Thread Wenyou Yang
AT91 PIO controller is a combined gpio-controller, pin-mux and
pin-config module. The peripheral's pins are assigned through
per-pin based muxing logic.

Each soc will have to describe the SoC limitation and pin
configuration via DT. This will allow to do not need to touch
the C code when adding new SoC if the IP version is supported.

Signed-off-by: Wenyou Yang 
Reviewed-by: Simon Glass 
---

Changes in v2:
 - Add more information for the PINCTRL_AT91 option's help.
 - Add more comments for the callback of struct at91_pinctrl_mux_ops.
 - Use clrsetbits_le32() in set_drive_strength().
 - Add the brackets for readability.
 - Use debug() to print the message to debug, instead of printf().
 - Remove not veryuseful at91_bank_base().
 - Add Reviewed-by tag.

 arch/arm/mach-at91/include/mach/at91_pio.h |   6 +-
 drivers/pinctrl/Kconfig|  14 +
 drivers/pinctrl/Makefile   |   1 +
 drivers/pinctrl/pinctrl-at91.c | 441 +
 4 files changed, 461 insertions(+), 1 deletion(-)
 create mode 100644 drivers/pinctrl/pinctrl-at91.c

diff --git a/arch/arm/mach-at91/include/mach/at91_pio.h 
b/arch/arm/mach-at91/include/mach/at91_pio.h
index 393a163..f195a7d 100644
--- a/arch/arm/mach-at91/include/mach/at91_pio.h
+++ b/arch/arm/mach-at91/include/mach/at91_pio.h
@@ -107,7 +107,11 @@ typedef struct at91_port {
u32 wpsr;   /* 0xE8 Write Protect Status Register */
u32 reserved11[5];  /* */
u32 schmitt;/* 0x100 Schmitt Trigger Register */
-   u32 reserved12[63];
+   u32 reserved12[4];  /* 0x104 ~ 0x110 */
+   u32 driver1;/* 0x114 I/O Driver Register1(AT91SAM9x5's 
driver1) */
+   u32 driver12;   /* 0x118 I/O Driver Register12(AT91SAM9x5's 
driver2 or SAMA5D3x's driver1 ) */
+   u32 driver2;/* 0x11C I/O Driver Register2(SAMA5D3x's 
driver2) */
+   u32 reserved13[12]; /* 0x120 ~ 0x14C */
 } at91_port_t;
 
 typedef union at91_pio {
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 12be3cf..18556a8 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -141,6 +141,20 @@ config ROCKCHIP_RK3288_PINCTRL
  definitions and pin control functions for each available multiplex
  function.
 
+config PINCTRL_AT91
+   bool "AT91 pinctrl driver"
+   depends on DM
+   help
+ This option is to enable the AT91 pinctrl driver for AT91 PIO
+ controller. AT91 PIO controller is a combined gpio-controller,
+ pin-mux and pin-config module. Each I/O pin may be dedicated as
+ a general-purpose I/O or be assigned to a function of an embedded
+ peripheral. Each I/O pin has a glitch filter providing rejection of
+ glitches lower than one-half of peripheral clock cycle and
+ a debouncing filter providing rejection of unwanted pulses from key
+ or push button operations. You can also control the multi-driver
+ capability, pull-up and pull-down feature on each I/O pin.
+
 config PINCTRL_AT91PIO4
bool "AT91 PIO4 pinctrl driver"
depends on DM
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index f28b5c1..a9535fa 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -5,6 +5,7 @@
 obj-y  += pinctrl-uclass.o
 obj-$(CONFIG_$(SPL_)PINCTRL_GENERIC)   += pinctrl-generic.o
 
+obj-$(CONFIG_PINCTRL_AT91) += pinctrl-at91.o
 obj-$(CONFIG_PINCTRL_AT91PIO4) += pinctrl-at91-pio4.o
 obj-y  += nxp/
 obj-$(CONFIG_ARCH_ATH79) += ath79/
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
new file mode 100644
index 000..08f7d4b
--- /dev/null
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -0,0 +1,441 @@
+/*
+ * Atmel PIO pinctrl driver
+ *
+ * Copyright (C) 2016 Atmel Corporation
+ *   Wenyou.Yang 
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#define MAX_GPIO_BANKS 5
+#define MAX_NB_GPIO_PER_BANK   32
+
+#define MAX_PINMUX_ENTRIES 200
+
+struct at91_pinctrl_priv {
+   struct at91_port *reg_base[MAX_GPIO_BANKS];
+   u32 nbanks;
+};
+
+#define PULL_UPBIT(0)
+#define MULTI_DRIVEBIT(1)
+#define DEGLITCH   BIT(2)
+#define PULL_DOWN  BIT(3)
+#define DIS_SCHMIT BIT(4)
+#define DRIVE_STRENGTH_SHIFT   5
+#define DRIVE_STRENGTH_MASK0x3
+#define DRIVE_STRENGTH (DRIVE_STRENGTH_MASK << DRIVE_STRENGTH_SHIFT)
+#define DEBOUNCE   BIT(16)
+#define DEBOUNCE_VAL_SHIFT 17
+#define DEBOUNCE_VAL   (0x3fff << DEBOUNCE_VAL_SHIFT)
+
+/**
+ * These defines will translated the dt binding settings to our internal
+ * settings. They are not necessarily the same value as the register setting.
+ * The act

[U-Boot] [PATCH v2 0/6] imx6: icorem6: Add framebuffer support

2016-10-12 Thread Jagan Teki
On top of u-boot-imx/master engicam patches.
- Add framebuffer support  
- Add CMD_BMP and VIDEO_IPV3 kconfig entries
- Move CONFIG_CMD_BMP and CONFIG_VIDEO_IPUV3 to defconfigs

Jagan Teki (6):
  video: Kconfig: Add VIDEO_IPV3 entry
  Move CONFIG_VIDEO_IPUV3 to defconfig
  imx6: icorem6: Add framebuffer support
  imx6: icorem6: Add custom splashscreen support
  Define/Move CONFIG_CMD_BMP to defconfig
  defconfig: icorem6: Enable CONFIG_CMD_BMP

 board/engicam/icorem6/icorem6.c| 113 +
 cmd/Kconfig|  10 ++
 configs/MPC8610HPCD_defconfig  |   1 +
 configs/T1024QDS_DDR4_SECURE_BOOT_defconfig|   1 +
 configs/T1024QDS_DDR4_defconfig|   1 +
 configs/T1024QDS_NAND_defconfig|   1 +
 configs/T1024QDS_SDCARD_defconfig  |   1 +
 configs/T1024QDS_SECURE_BOOT_defconfig |   1 +
 configs/T1024QDS_SPIFLASH_defconfig|   1 +
 configs/T1024QDS_defconfig |   1 +
 configs/T1040QDS_DDR4_defconfig|   1 +
 configs/T1040QDS_SECURE_BOOT_defconfig |   1 +
 configs/T1040QDS_defconfig |   1 +
 configs/TQM5200_B_HIGHBOOT_defconfig   |   1 +
 configs/TQM5200_B_defconfig|   1 +
 configs/TQM5200_STK100_defconfig   |   1 +
 configs/TQM5200_defconfig  |   1 +
 configs/aristainetos2_defconfig|   2 +
 configs/aristainetos2b_defconfig   |   2 +
 configs/aristainetos_defconfig |   2 +
 configs/brxre1_defconfig   |   1 +
 configs/cgtqmx6eval_defconfig  |   1 +
 configs/cm_fx6_defconfig   |   2 +
 configs/cm_t3517_defconfig |   1 +
 configs/cm_t35_defconfig   |   1 +
 configs/colibri_imx7_defconfig |   1 +
 configs/colibri_t20_defconfig  |   1 +
 ...conga-qeval20-qa3-e3845-internal-uart_defconfig |   1 +
 configs/conga-qeval20-qa3-e3845_defconfig  |   1 +
 .../controlcenterd_36BIT_SDCARD_DEVELOP_defconfig  |   1 +
 configs/controlcenterd_36BIT_SDCARD_defconfig  |   1 +
 .../controlcenterd_TRAILBLAZER_DEVELOP_defconfig   |   1 +
 configs/controlcenterd_TRAILBLAZER_defconfig   |   1 +
 configs/dfi-bt700-q7x-151_defconfig|   1 +
 configs/digsy_mtc_RAMBOOT_defconfig|   1 +
 configs/digsy_mtc_defconfig|   1 +
 configs/digsy_mtc_rev5_RAMBOOT_defconfig   |   1 +
 configs/digsy_mtc_rev5_defconfig   |   1 +
 configs/ea20_defconfig |   1 +
 configs/gwventana_defconfig|   1 +
 configs/icon_defconfig |   1 +
 configs/imx31_phycore_defconfig|   1 +
 configs/imx31_phycore_eet_defconfig|   1 +
 configs/imx6qdl_icore_mmc_defconfig|   2 +
 configs/imx6qdl_icore_nand_defconfig   |   2 +
 configs/ipek01_defconfig   |   1 +
 configs/ls1021aqds_ddr4_nor_defconfig  |   1 +
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig   |   1 +
 configs/ls1021aqds_nand_defconfig  |   1 +
 configs/ls1021aqds_nor_SECURE_BOOT_defconfig   |   1 +
 configs/ls1021aqds_nor_defconfig   |   1 +
 configs/ls1021aqds_nor_lpuart_defconfig|   1 +
 configs/ls1021aqds_qspi_defconfig  |   1 +
 configs/ls1021aqds_sdcard_ifc_defconfig|   1 +
 configs/ls1021aqds_sdcard_qspi_defconfig   |   1 +
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig   |   1 +
 configs/ls1021atwr_nor_defconfig   |   1 +
 configs/ls1021atwr_nor_lpuart_defconfig|   1 +
 configs/ls1021atwr_qspi_defconfig  |   1 +
 .../ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig|   1 +
 configs/ls1021atwr_sdcard_ifc_defconfig|   1 +
 configs/ls1021atwr_sdcard_qspi_defconfig   |   1 +
 configs/lwmon5_defconfig   |   1 +
 configs/m28evk_defconfig   |   1 +
 configs/m53evk_defconfig   |   2 +
 configs/ma5d4evk_defconfig |   1 +
 configs/mcx_defconfig  |   1 +
 configs/mt_ventoux_defconfig   |   1 +
 configs/mx23evk_defconfig  |   1 +
 configs/mx28evk_auart_console_defconfig|   1 +
 configs/mx28evk_defconfig  |   1 +
 configs/mx28evk_nand_defconfig |   1 +
 configs/mx28evk_spi_defconfig  |   1 +
 configs/mx51evk_defconfig  |   1 +
 configs/mx53loco_defconfig |   1 +
 configs/mx6cuboxi_defconfig 

[U-Boot] [PATCH v2 1/6] video: Kconfig: Add VIDEO_IPV3 entry

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

Added kconfig entry for CONFIG_VIDEO_IPV3 driver.

Cc: Anatolij Gustschin 
Cc: Stefano Babic 
Cc: Matteo Lisi 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 drivers/video/Kconfig | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 8361a71..4cf95e1 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -337,6 +337,13 @@ config VIDEO_LCD_SPI_MISO
option takes a string in the format understood by 'name_to_gpio'
function, e.g. PH1 for pin 1 of port H.
 
+config VIDEO_IPUV3
+   bool "i.MX IPUv3 Core video support"
+   depends on MX6
+   help
+ This enables framebuffer driver for i.MX processors working
+ on the IPUv3(Image Processing Unit) internal graphic processor.
+
 config VIDEO_MVEBU
bool "Armada XP LCD controller"
default n
-- 
2.7.4

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


[U-Boot] [PATCH v2 2/6] Move CONFIG_VIDEO_IPUV3 to defconfig

2016-10-12 Thread Jagan Teki
Move CONFIG_VIDEO_IPUV3 from include/configs to configs

Cc: Tom Rini 
Cc: Stefano Babic 
Signed-off-by: Jagan Teki 
---
 configs/aristainetos2_defconfig   | 1 +
 configs/aristainetos2b_defconfig  | 1 +
 configs/aristainetos_defconfig| 1 +
 configs/cgtqmx6eval_defconfig | 1 +
 configs/cm_fx6_defconfig  | 1 +
 configs/gwventana_defconfig   | 1 +
 configs/m53evk_defconfig  | 1 +
 configs/mx51evk_defconfig | 1 +
 configs/mx53loco_defconfig| 1 +
 configs/mx6cuboxi_defconfig   | 1 +
 configs/mx6qsabreauto_defconfig   | 1 +
 configs/mx6sabresd_spl_defconfig  | 1 +
 configs/nitrogen6dl2g_defconfig   | 1 +
 configs/nitrogen6dl_defconfig | 1 +
 configs/nitrogen6q2g_defconfig| 1 +
 configs/nitrogen6q_defconfig  | 1 +
 configs/nitrogen6s1g_defconfig| 1 +
 configs/nitrogen6s_defconfig  | 1 +
 configs/novena_defconfig  | 1 +
 configs/tbs2910_defconfig | 1 +
 configs/wandboard_defconfig   | 1 +
 include/configs/aristainetos-common.h | 1 -
 include/configs/cgtqmx6eval.h | 1 -
 include/configs/cm_fx6.h  | 1 -
 include/configs/gw_ventana.h  | 1 -
 include/configs/m53evk.h  | 1 -
 include/configs/mx51evk.h | 1 -
 include/configs/mx53loco.h| 1 -
 include/configs/mx6cuboxi.h   | 1 -
 include/configs/mx6sabre_common.h | 1 -
 include/configs/nitrogen6x.h  | 1 -
 include/configs/novena.h  | 1 -
 include/configs/tbs2910.h | 1 -
 include/configs/wandboard.h   | 1 -
 34 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index 35d7e94..094c483 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -29,4 +29,5 @@ CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig
index 6b2c44d..512787b 100644
--- a/configs/aristainetos2b_defconfig
+++ b/configs/aristainetos2b_defconfig
@@ -29,4 +29,5 @@ CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig
index a06d9ee..601fa47 100644
--- a/configs/aristainetos_defconfig
+++ b/configs/aristainetos_defconfig
@@ -29,4 +29,5 @@ CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/cgtqmx6eval_defconfig b/configs/cgtqmx6eval_defconfig
index 5a053f5..1ff2df0 100644
--- a/configs/cgtqmx6eval_defconfig
+++ b/configs/cgtqmx6eval_defconfig
@@ -47,4 +47,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Congatec"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index 998bc05..0bd0113 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -52,4 +52,5 @@ CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig
index 0f726ae..c58e20d 100644
--- a/configs/gwventana_defconfig
+++ b/configs/gwventana_defconfig
@@ -52,4 +52,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="Gateworks"
 CONFIG_G_DNL_VENDOR_NUM=0x0525
 CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/m53evk_defconfig b/configs/m53evk_defconfig
index 03a4bfd..173bc6f 100644
--- a/configs/m53evk_defconfig
+++ b/configs/m53evk_defconfig
@@ -28,4 +28,5 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_UBI=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig
index c903b41..b46a2cb 100644
--- a/configs/mx51evk_defconfig
+++ b/configs/mx51evk_defconfig
@@ -15,4 +15,5 @@ CONFIG_CMD_PING=y
 CONFIG_CMD_FAT=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index b75ba01..403746e 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -16,4 +16,5 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6cuboxi_defconfig b/configs/mx6cuboxi_defconfig
index 27c3d3b..22eafe1 100644
--- a/configs/mx6cuboxi_defconfig
+++ b/configs/mx6cuboxi_defconfig
@@ -32,4 +32,5 @@ CONFIG_DM=y
 CONFIG_DM_THERMAL=y
 CONFIG_USB=y
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_IPUV3=y
 CONFIG_OF_LIBFDT=y
diff --git a/co

[U-Boot] [PATCH v2 3/6] imx6: icorem6: Add framebuffer support

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

Add IPUv3 framebuffer support for Engicam i.CoreM6 qdl board.

Cc: Anatolij Gustschin 
Cc: Stefano Babic 
Cc: Matteo Lisi 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 board/engicam/icorem6/icorem6.c  | 113 +++
 configs/imx6qdl_icore_mmc_defconfig  |   1 +
 configs/imx6qdl_icore_nand_defconfig |   1 +
 include/configs/imx6qdl_icore.h  |  16 +
 4 files changed, 131 insertions(+)

diff --git a/board/engicam/icorem6/icorem6.c b/board/engicam/icorem6/icorem6.c
index 587775e..171ec45 100644
--- a/board/engicam/icorem6/icorem6.c
+++ b/board/engicam/icorem6/icorem6.c
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -90,6 +91,113 @@ static void setup_gpmi_nand(void)
 }
 #endif
 
+#if defined(CONFIG_VIDEO_IPUV3)
+static iomux_v3_cfg_t const rgb_pads[] = {
+   IOMUX_PADS(PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK),
+   IOMUX_PADS(PAD_DI0_PIN15__IPU1_DI0_PIN15),
+   IOMUX_PADS(PAD_DI0_PIN2__IPU1_DI0_PIN02),
+   IOMUX_PADS(PAD_DI0_PIN3__IPU1_DI0_PIN03),
+   IOMUX_PADS(PAD_DISP0_DAT0__IPU1_DISP0_DATA00),
+   IOMUX_PADS(PAD_DISP0_DAT1__IPU1_DISP0_DATA01),
+   IOMUX_PADS(PAD_DISP0_DAT2__IPU1_DISP0_DATA02),
+   IOMUX_PADS(PAD_DISP0_DAT3__IPU1_DISP0_DATA03),
+   IOMUX_PADS(PAD_DISP0_DAT4__IPU1_DISP0_DATA04),
+   IOMUX_PADS(PAD_DISP0_DAT5__IPU1_DISP0_DATA05),
+   IOMUX_PADS(PAD_DISP0_DAT6__IPU1_DISP0_DATA06),
+   IOMUX_PADS(PAD_DISP0_DAT7__IPU1_DISP0_DATA07),
+   IOMUX_PADS(PAD_DISP0_DAT8__IPU1_DISP0_DATA08),
+   IOMUX_PADS(PAD_DISP0_DAT9__IPU1_DISP0_DATA09),
+   IOMUX_PADS(PAD_DISP0_DAT10__IPU1_DISP0_DATA10),
+   IOMUX_PADS(PAD_DISP0_DAT11__IPU1_DISP0_DATA11),
+   IOMUX_PADS(PAD_DISP0_DAT12__IPU1_DISP0_DATA12),
+   IOMUX_PADS(PAD_DISP0_DAT13__IPU1_DISP0_DATA13),
+   IOMUX_PADS(PAD_DISP0_DAT14__IPU1_DISP0_DATA14),
+   IOMUX_PADS(PAD_DISP0_DAT15__IPU1_DISP0_DATA15),
+   IOMUX_PADS(PAD_DISP0_DAT16__IPU1_DISP0_DATA16),
+   IOMUX_PADS(PAD_DISP0_DAT17__IPU1_DISP0_DATA17),
+};
+
+static void enable_rgb(struct display_info_t const *dev)
+{
+   SETUP_IOMUX_PADS(rgb_pads);
+}
+
+struct display_info_t const displays[] = {
+   {
+   .bus= -1,
+   .addr   = 0,
+   .pixfmt = IPU_PIX_FMT_RGB666,
+   .detect = NULL,
+   .enable = enable_rgb,
+   .mode   = {
+   .name   = "Amp-WD",
+   .refresh= 60,
+   .xres   = 800,
+   .yres   = 480,
+   .pixclock   = 3,
+   .left_margin= 30,
+   .right_margin   = 30,
+   .upper_margin   = 5,
+   .lower_margin   = 5,
+   .hsync_len  = 64,
+   .vsync_len  = 20,
+   .sync   = FB_SYNC_EXT,
+   .vmode  = FB_VMODE_NONINTERLACED
+   }
+   },
+};
+
+size_t display_count = ARRAY_SIZE(displays);
+
+static void setup_display(void)
+{
+   struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;
+   struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
+   int reg;
+
+   enable_ipu_clock();
+
+   /* Turn on LDB0,IPU,IPU DI0 clocks */
+   reg = __raw_readl(&mxc_ccm->CCGR3);
+   reg |=  (MXC_CCM_CCGR3_LDB_DI0_MASK | 0x);
+   writel(reg, &mxc_ccm->CCGR3);
+
+   /* set LDB0, LDB1 clk select to 011/011 */
+   reg = readl(&mxc_ccm->cs2cdr);
+   reg &= ~(MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_MASK |
+   MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_MASK);
+   reg |= (3 << MXC_CCM_CS2CDR_LDB_DI0_CLK_SEL_OFFSET) |
+   (3 << MXC_CCM_CS2CDR_LDB_DI1_CLK_SEL_OFFSET);
+   writel(reg, &mxc_ccm->cs2cdr);
+
+   reg = readl(&mxc_ccm->cscmr2);
+   reg |= MXC_CCM_CSCMR2_LDB_DI0_IPU_DIV;
+   writel(reg, &mxc_ccm->cscmr2);
+
+   reg = readl(&mxc_ccm->chsccdr);
+   reg |= (CHSCCDR_CLK_SEL_LDB_DI0 <<
+   MXC_CCM_CHSCCDR_IPU1_DI0_CLK_SEL_OFFSET);
+   writel(reg, &mxc_ccm->chsccdr);
+
+   reg = IOMUXC_GPR2_BGREF_RRMODE_EXTERNAL_RES |
+   IOMUXC_GPR2_DI1_VS_POLARITY_ACTIVE_HIGH |
+   IOMUXC_GPR2_DI0_VS_POLARITY_ACTIVE_LOW |
+   IOMUXC_GPR2_BIT_MAPPING_CH1_SPWG |
+   IOMUXC_GPR2_DATA_WIDTH_CH1_18BIT |
+   IOMUXC_GPR2_BIT_MAPPING_CH0_SPWG |
+   IOMUXC_GPR2_DATA_WIDTH_CH0_18BIT |
+   IOMUXC_GPR2_LVDS_CH1_MODE_DISABLED |
+   IOMUXC_GPR2_LVDS_CH0_MODE_ENABLED_DI0;
+   writel(reg, &iomux->gpr[2]);
+
+   reg = readl(&iomux->gpr[3]);
+   reg = (reg & ~IOMUXC_GPR3_LVDS0_MUX_CTL_MASK) |
+   (IOMUXC_GPR3_MUX_SRC_IPU1_DI0 <<
+   IOMUXC_GPR3_LVDS0_MUX_CTL_OFFSET);
+   writel(reg, &iomux->gpr[3]);

[U-Boot] [PATCH v2 4/6] imx6: icorem6: Add custom splashscreen support

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

Add custom splashscreen, engicam.bmp support for
Engicam i.CoreM6 qdl board.

Cc: Anatolij Gustschin 
Cc: Stefano Babic 
Cc: Matteo Lisi 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 include/configs/imx6qdl_icore.h |   2 ++
 tools/logos/engicam.bmp | Bin 0 -> 60214 bytes
 2 files changed, 2 insertions(+)
 create mode 100755 tools/logos/engicam.bmp

diff --git a/include/configs/imx6qdl_icore.h b/include/configs/imx6qdl_icore.h
index 889211f..4637b00 100644
--- a/include/configs/imx6qdl_icore.h
+++ b/include/configs/imx6qdl_icore.h
@@ -37,6 +37,7 @@
 /* Default environment */
 #define CONFIG_EXTRA_ENV_SETTINGS \
"script=boot.scr\0" \
+   "splashpos=m,m\0" \
"image=zImage\0" \
"console=ttymxc3\0" \
"fdt_high=0x\0" \
@@ -158,6 +159,7 @@
 # define CONFIG_VGA_AS_SINGLE_DEVICE
 
 # define CONFIG_SPLASH_SCREEN
+# define CONFIG_SPLASH_SCREEN_ALIGN
 # define CONFIG_SYS_CONSOLE_IS_IN_ENV
 # define CONFIG_BMP_16BPP
 # define CONFIG_VIDEO_BMP_RLE8
diff --git a/tools/logos/engicam.bmp b/tools/logos/engicam.bmp
new file mode 100755
index 
..f6c60fb810d29830941e18d6725ef95785d95967
GIT binary patch
literal 60214
zcmeHQy{;oUb}kzN)XMw_3jG8d3(oxxdV~$;0V-UDRydJ>F&s^}4^XkQQP^@I>=H2G
zwt(#(j1mX!k7V)ie21)3Rd-+A*}hfX=aMWQp5KpTiPF{mmw)}khbCNqST)T*qxMh#
z*ff7c`47#z*zw=7D1Ww1ga1w2#sWW4ZMv>&y8r5$zy0TbG|hGg+Jn%sJ%KvVwP|(@
zXbVDRw+FSL6Q~1Sn`YmDwxAsdjeQF`fjZE&*Skfz1MNXA=mhFO*QPqx+
zPM{8Sg^>+t3)+G9pcZrjb)ak0;D2-7f_9)is0E!s9q8KZ8kpH^LH^$!)Phc+4s?yK
zZMP_QpgpJsoj@Jv8r|M)QSLx{PzySNI?y$SWWPnZ1MNXA=mhFO*BGvLi*g6rgIdrD
z)Pb%sl&3Aq9cT|~K_^fLy2dbfTa-J{9@K(Ppbm5mDcD`ND0iSes0E!s9q8J$@V{-g
zAn*AekhpgpJsoj@Jv8liC7qTGS@pcZrjb)aj6Nw-D01MNXA=mhFO*8rjRx<$DI
z?LjT*1nNN7ri1@ovjy!ydr%8Hf&9N~gw}S8atGRjTF?p9fvypDyDiEcXb);ZCr}5v
zMo8|rD0iSes0E!s9q1b2+HO(qKzmRNI)OUSHA4BcMY#j*K`rP6>Oj{B^KOfB2ik*L
z(5d;`|9x)$9ege1HO=Snzxn*x*FgB^Z~69eEfH8EutZ>qz!HHa0!svz2rLm;BCteY
ziNF$p-%SMWzZ**yLtZZe_sz|@%lWYK*Wr9|?zVY7YZlF~8iBhz2OQWR=i9PaylP@z
zL;2dpMZtn0wvTRECSD^eucUKx83RLv#KA4A#4Dxe$!hPH`l3+Wy)1}$a%x^d-Q5*=
zAHLyU!N5i3Gb1qi*iZuFaC@e4i>@a};P&{r!D8aDezJ{=x~D~;{`%4)z_u?>vu{!K
z%n01)FAfnJ=jFNbnR$AWuFaRi0VkKsX~dI~^gJ~;yA8~0FOQYa%hXdeO+9lMLdo*V
z^C@Y1mXa@flGNZ>o+_V}t0(CBdN{0B3m~45sOP9~dZK@Eec3XeldTum@^z1r89&R(
z)QhL;84A{YMt}VI(e-1_eYN&GJ%_k&HaC2(=XTp{UdF=vdVPcV_4;MRKLZ3=M?8l5
z@rP;GC?pP*c-(K3uDrI;fPsSz5}Ai)r=+%VM~3e4;%aFltt37)2JC>EoB3?OnZ>V3
z)}R=pKDxv=#ie?M6;%>ZA6DKC@%nih8o>24hnHLDQv97chFS+1xzQ~7w)CTtRSm{A{}&H3hoBObQo%OCE;!NX)U
zct-NjG%C-OY^dSS%{+Au`Q~aRfem5ne>lytT2+*K#s{C{FrV=vtt{WSYM9%MxOPaN
zAUl$*p*)#c)3cFH1CUH{F%N<1_S`Z|wdt#a$HV9fk<*$iF@{ojR3k@husBoC#@
z!%=nRs#C&;s%n`attEeDc0N)NKS9QmypC^Rmo@fYvxXWZv%5w@#oo+2QuFZrH=pGh
z7ek&sDN$?;W%k_4I|E0sW;@Lrh^R%%U?wXvwKSHs8m85%^lOR&pI1k+vYX_X2~v*-
z-WMOFnC+>~BT`vygvmQ^dHCUnKa+>1Q7#Z{sA12|yfaX`D^W1Pt8N$*m9ADIpR{JP
zQZ3;oh4I09(hu`a9g~Pq4s343BWHVLQwhmrODN4cOns9ZLE((0A+oaZ+$tAuV<@xd
zRz|eTH><~6RBcD
zNwR9C$S18OXTnXeqBNl#5bgw|GPf}{dd0&fnPihJWhoF`nq`waC$(I(Vm2PgO7;XT
z32?H(7+MVIZ%7dM5iH+M@=5__&bg9f_>M&R!6==^&9FGr6RbD*3>Zny^d*N>d}f;n
zl12cUthz`;Il$aWX3oX~E4D3@oWfAcFKsc8S7W)|S8B=N5OZ*od>lgIL>bqb`%{!R
z=l)6qVtMHAN{(Pg{aNFTGjVr0((o7zo)LmTSo*&HpV?B@QuJJqJJas=Tlaa@nco=;T1Hln=Cktj9>SC7TPYZNTSLC6j
zRT%hJ$#~XT`Sv(G!!-HBqo@mL5hjDoR-P_fil}T
z?*QV_@=$rAoNFit+(dyx*NfJ#;u6lYR+B9=8;yK3DNA^NHu#1fs{kSIf0w04YB?lZ
zSJv{3%1QEE6*W4!JP`_sy4~*`-l&NugS(0PRb-x-B`V|4JA#KP!=VMbEGzMFIG}Qv`vn9^4Ok-brb?D9x@iSj!?%E
zk$PDu8DJYalSkc|P0@G7ev{Jz=Y@Id#tiec?n!kqFzK6ZsMC6Mc+A`twj3#*QFgnD
z7BOb>*xp|5mW(EEZ0JVgE}b)W4DB#QVzudQU?*k5NH{`8ZYRUXN}7Qz=c`-CLNRMA
z@KW$|MkJ=i+cw$M6e)X7SAW=Jd-B-c5bn17fy-J$t+2j+WBQJv@xYl+k>mKtj>kyV
zV(KQTyT&Ko{L}jnzdpMD=l$6045cSl+0YU%#Q@5P0{UQ3bJDacsHYH;3P(%@3wPV~
zgL~x(ffUpl90am}8tH!~$58&-2k1?dZcLCxkfxDxebA=V
zVLZ-}{pHgnG@zvN+D>#a`8P_m)LgjAfd%6QEi2F(^yDmo2|(nb8bA!CyrY;InA
zLcfh&8uYL2LrbhV~3Ip28u#l%^G!&$BC8mmWROw!o<((Wrc@h_0o~8ZWt`(OifX0f~D3X;uoh;$(iY6
znCsioI#mu~tp0i8gyaZr&m&2|U$k=4CF;@c>ENY~$ra@Cm%A_m=
zY?$1R0=aYJZ<3T`O{J&6`H+cKfvdyJ?c(Fd`V*ybC>T-Kn0)EW;8L`im&qRJ%)aKh
zq(z@lk`~e^l*g-pVpzNif#}1b{QNukJ
zng%nQe%@n#B~2?1VoY2|H;iI%GNf7(TKh<`HXA;Qgnv1s*^dh2e%6rq$xx-qm*X<`
z`C;G%XEED+VA#;ClWK4_T|5awhjJaGycQCglEx$Hd5@IohEg02Aju>H{cMOvT(W++
zWK2ez`JTlC`vbQ%`&l2=V9RvctI3Dy#-Su*?(2(zGi$xOU7q}O~gZJ6_aKwu{
z`8dvdHE@~GCTXkHoE>9ex1gjd{Vr=6u8nONEFea$zF{!umn{%RhB?|Xh*L0D9uHMX
zbh+}Cc%bFzK)YnntfFvZv`ySF2Jx`^%hYGePeZH2(0nw8uBzAAhCxy3S3(vl3HYjX
zMJYUI?K7iUAhg+H#Bhby9>2IyEJ{4EwzUpK#HsSvd=t5zV8aF(XSF$p51$@G;?t)O
z^`odDX+W5=25}!{7i;e#}6ZedXeIFAhmYA(TU0Dt3Av;8*TwczT+_Ch484FOyViz$j~0;pauaoSd9;+0JKCgsr6
zl}YI12r4HL1Zv5Y=bcXiXwxMthj2Ws7;~)zPLbI2P;6wN_`8RAVBb}i5+3w3rRqj?
z+J@nH&^K+_$VrG8xkIoKcJtVMBqL=s3C*glgAdVHGEmO!D-2^CzfY1~NHy~~YDV+#
zoLANd28;?s=4ER$iy$VMQY{Vm^Kh=Y-`+jGe)}sAsw(t19q~;tbjU}@5!jQ^93DQp
z#PU++o9sNN2ajn9qqV=P1t!gtM`sMLV4ZkU7s6$)Cm%hzP^hVJL2@kRos(Tx$3i#+W$_41Nanvi@4=T
z97$EicIGfO;-^MtBxEb)MF>@29vy2TIT=fRH>a#flRhX8whcMte6N*m&=v&5AB7@s
zj_TJ{?Ni}!WIXiVpl~aEdG6+huOraoLjMq&va-tzIJ|q8vtk|3=6u5qLrpiAP3B2X
z9iEB52O`_mC$@-@32@;UFHKNT|J!nLuIOnRR2%8uz<5>hpe9`6^Cc~M1

[U-Boot] [PATCH v2 6/6] defconfig: icorem6: Enable CONFIG_CMD_BMP

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

Add CONFIG_CMD_BMP to display bmp format images.

Cc: Anatolij Gustschin 
Cc: Stefano Babic 
Cc: Matteo Lisi 
Cc: Michael Trimarchi 
Signed-off-by: Jagan Teki 
---
 configs/imx6qdl_icore_mmc_defconfig  | 1 +
 configs/imx6qdl_icore_nand_defconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/configs/imx6qdl_icore_mmc_defconfig 
b/configs/imx6qdl_icore_mmc_defconfig
index 8d90c58..bcf999d 100644
--- a/configs/imx6qdl_icore_mmc_defconfig
+++ b/configs/imx6qdl_icore_mmc_defconfig
@@ -13,6 +13,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_SYS_MAXARGS=32
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_BMP=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MII=y
diff --git a/configs/imx6qdl_icore_nand_defconfig 
b/configs/imx6qdl_icore_nand_defconfig
index 911ab80..b424c15 100644
--- a/configs/imx6qdl_icore_nand_defconfig
+++ b/configs/imx6qdl_icore_nand_defconfig
@@ -13,6 +13,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_AUTO_COMPLETE=y
 CONFIG_SYS_MAXARGS=32
 # CONFIG_CMD_IMLS is not set
+CONFIG_CMD_BMP=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MII=y
-- 
2.7.4

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


[U-Boot] [PATCH v2 5/6] Define/Move CONFIG_CMD_BMP to defconfig

2016-10-12 Thread Jagan Teki
From: Jagan Teki 

- Add CMD_BMP kconfig entry
- Move CONFIG_CMD_BMP from include/configs to configs

Cc: Tom Rini 
Cc: Anatolij Gustschin 
Signed-off-by: Jagan Teki 
---
 cmd/Kconfig | 10 ++
 configs/MPC8610HPCD_defconfig   |  1 +
 configs/T1024QDS_DDR4_SECURE_BOOT_defconfig |  1 +
 configs/T1024QDS_DDR4_defconfig |  1 +
 configs/T1024QDS_NAND_defconfig |  1 +
 configs/T1024QDS_SDCARD_defconfig   |  1 +
 configs/T1024QDS_SECURE_BOOT_defconfig  |  1 +
 configs/T1024QDS_SPIFLASH_defconfig |  1 +
 configs/T1024QDS_defconfig  |  1 +
 configs/T1040QDS_DDR4_defconfig |  1 +
 configs/T1040QDS_SECURE_BOOT_defconfig  |  1 +
 configs/T1040QDS_defconfig  |  1 +
 configs/TQM5200_B_HIGHBOOT_defconfig|  1 +
 configs/TQM5200_B_defconfig |  1 +
 configs/TQM5200_STK100_defconfig|  1 +
 configs/TQM5200_defconfig   |  1 +
 configs/aristainetos2_defconfig |  1 +
 configs/aristainetos2b_defconfig|  1 +
 configs/aristainetos_defconfig  |  1 +
 configs/brxre1_defconfig|  1 +
 configs/cm_fx6_defconfig|  1 +
 configs/cm_t3517_defconfig  |  1 +
 configs/cm_t35_defconfig|  1 +
 configs/colibri_imx7_defconfig  |  1 +
 configs/colibri_t20_defconfig   |  1 +
 configs/conga-qeval20-qa3-e3845-internal-uart_defconfig |  1 +
 configs/conga-qeval20-qa3-e3845_defconfig   |  1 +
 configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig   |  1 +
 configs/controlcenterd_36BIT_SDCARD_defconfig   |  1 +
 configs/controlcenterd_TRAILBLAZER_DEVELOP_defconfig|  1 +
 configs/controlcenterd_TRAILBLAZER_defconfig|  1 +
 configs/dfi-bt700-q7x-151_defconfig |  1 +
 configs/digsy_mtc_RAMBOOT_defconfig |  1 +
 configs/digsy_mtc_defconfig |  1 +
 configs/digsy_mtc_rev5_RAMBOOT_defconfig|  1 +
 configs/digsy_mtc_rev5_defconfig|  1 +
 configs/ea20_defconfig  |  1 +
 configs/icon_defconfig  |  1 +
 configs/imx31_phycore_defconfig |  1 +
 configs/imx31_phycore_eet_defconfig |  1 +
 configs/ipek01_defconfig|  1 +
 configs/ls1021aqds_ddr4_nor_defconfig   |  1 +
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig|  1 +
 configs/ls1021aqds_nand_defconfig   |  1 +
 configs/ls1021aqds_nor_SECURE_BOOT_defconfig|  1 +
 configs/ls1021aqds_nor_defconfig|  1 +
 configs/ls1021aqds_nor_lpuart_defconfig |  1 +
 configs/ls1021aqds_qspi_defconfig   |  1 +
 configs/ls1021aqds_sdcard_ifc_defconfig |  1 +
 configs/ls1021aqds_sdcard_qspi_defconfig|  1 +
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig|  1 +
 configs/ls1021atwr_nor_defconfig|  1 +
 configs/ls1021atwr_nor_lpuart_defconfig |  1 +
 configs/ls1021atwr_qspi_defconfig   |  1 +
 configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig |  1 +
 configs/ls1021atwr_sdcard_ifc_defconfig |  1 +
 configs/ls1021atwr_sdcard_qspi_defconfig|  1 +
 configs/lwmon5_defconfig|  1 +
 configs/m28evk_defconfig|  1 +
 configs/m53evk_defconfig|  1 +
 configs/ma5d4evk_defconfig  |  1 +
 configs/mcx_defconfig   |  1 +
 configs/mt_ventoux_defconfig|  1 +
 configs/mx23evk_defconfig   |  1 +
 configs/mx28evk_auart_console_defconfig |  1 +
 configs/mx28evk_defconfig   |  1 +
 configs/mx28evk_nand_defconfig  |  1 +
 configs/mx28evk_spi_defconfig   |  1 +
 configs/mx6sxsabresd_defconfig  |  1 +
 configs/mx6sxsabresd_spl_defconfig  |  1 +
 configs/mx6ul_14x14_evk_defconfig   |  1 +
 configs/mx6ul_9x9_evk_defconfig |  1 +
 configs/mx7dsabresd_defconfig   |  1 +
 configs/mx7dsabresd_secure_defconfig|  1 +
 configs/nitrogen6dl2g_defconfig |  1 +
 configs/nitrogen6d

Re: [U-Boot] [PATCH 2/3] ti: common: board_detect: Setup initial default value for config as well

2016-10-12 Thread Lokesh Vutla


On Tuesday 11 October 2016 11:09 PM, Nishanth Menon wrote:
> config should have been initialized along with others as defaults.
> 
> Signed-off-by: Nishanth Menon 

Reviewed-by: Lokesh Vutla 

Thanks and regards,
Lokesh

> ---
>  board/ti/common/board_detect.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
> index 7c552d20656a..13aac2f03037 100644
> --- a/board/ti/common/board_detect.c
> +++ b/board/ti/common/board_detect.c
> @@ -131,6 +131,7 @@ int __maybe_unused ti_i2c_eeprom_am_get(int bus_addr, int 
> dev_addr)
>   ep->name[0] = 0x0;
>   ep->version[0] = 0x0;
>   ep->serial[0] = 0x0;
> + ep->config[0] = 0x0;
>  
>   rc = ti_i2c_eeprom_get(bus_addr, dev_addr, TI_EEPROM_HEADER_MAGIC,
>  sizeof(am_ep), (uint8_t *)&am_ep);
> @@ -175,6 +176,7 @@ int __maybe_unused ti_i2c_eeprom_dra7_get(int bus_addr, 
> int dev_addr)
>   ep->name[0] = 0x0;
>   ep->version[0] = 0x0;
>   ep->serial[0] = 0x0;
> + ep->config[0] = 0x0;
>   ep->emif1_size = 0;
>   ep->emif2_size = 0;
>  
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] ti: common: board_detect: Replace hardcoded value with macro

2016-10-12 Thread Lokesh Vutla


On Tuesday 11 October 2016 11:09 PM, Nishanth Menon wrote:
> We should have used TI_DEAD_EEPROM_MAGIC in the first place.
> 
> Fixes: d3b98a9eb941 ("ti: common: dra7: Add standard access for board 
> description EEPROM")
> Signed-off-by: Nishanth Menon 

Reviewed-by: Lokesh Vutla 

Thanks and regards,
Lokesh

> ---
>  board/ti/common/board_detect.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
> index e0ae1a51a6a4..7c552d20656a 100644
> --- a/board/ti/common/board_detect.c
> +++ b/board/ti/common/board_detect.c
> @@ -171,7 +171,7 @@ int __maybe_unused ti_i2c_eeprom_dra7_get(int bus_addr, 
> int dev_addr)
>   goto already_read;
>  
>   /* Initialize with a known bad marker for i2c fails.. */
> - ep->header = 0xADEAD12C;
> + ep->header = TI_DEAD_EEPROM_MAGIC;
>   ep->name[0] = 0x0;
>   ep->version[0] = 0x0;
>   ep->serial[0] = 0x0;
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] ti: common: board_detect: Return a valid empty string for un-initialized eeprom

2016-10-12 Thread Lokesh Vutla


On Tuesday 11 October 2016 11:09 PM, Nishanth Menon wrote:
> Current logic for query of revision, board_name, config returns
> NULL. Users of these functions do a direct strncmp to compare.
> Unfortunately, as per conventions require two valid strings to compare
> against and the current implementation causes a crash when compared
> with NULL.
> 
> We'd still like to maintain the simplistic usage of these APIs instead
> of redundant if (string) res=strncmp(fn(),"cmp",n); flowing all over
> the place.
> 
> Hence, since the version, name and config is already pre-initialized
> with empty string, just dont check for invalid header in the first
> place and return the empty string to the caller.
> 
> Reported-by: Brad Griffis 
> Signed-off-by: Nishanth Menon 


Reviewed-by: Lokesh Vutla 

Thanks and regards,
Lokesh


> ---
>  board/ti/common/board_detect.c | 12 +++-
>  board/ti/common/board_detect.h |  6 +++---
>  2 files changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
> index 13aac2f03037..6e7ca9196d22 100644
> --- a/board/ti/common/board_detect.c
> +++ b/board/ti/common/board_detect.c
> @@ -231,9 +231,7 @@ char * __maybe_unused board_ti_get_rev(void)
>  {
>   struct ti_common_eeprom *ep = TI_EEPROM_DATA;
>  
> - if (ep->header == TI_DEAD_EEPROM_MAGIC)
> - return NULL;
> -
> + /* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
>   return ep->version;
>  }
>  
> @@ -241,9 +239,7 @@ char * __maybe_unused board_ti_get_config(void)
>  {
>   struct ti_common_eeprom *ep = TI_EEPROM_DATA;
>  
> - if (ep->header == TI_DEAD_EEPROM_MAGIC)
> - return NULL;
> -
> + /* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
>   return ep->config;
>  }
>  
> @@ -251,9 +247,7 @@ char * __maybe_unused board_ti_get_name(void)
>  {
>   struct ti_common_eeprom *ep = TI_EEPROM_DATA;
>  
> - if (ep->header == TI_DEAD_EEPROM_MAGIC)
> - return NULL;
> -
> + /* if ep->header == TI_DEAD_EEPROM_MAGIC, this is empty already */
>   return ep->name;
>  }
>  
> diff --git a/board/ti/common/board_detect.h b/board/ti/common/board_detect.h
> index eb17f6f52a12..2ded3ed7764b 100644
> --- a/board/ti/common/board_detect.h
> +++ b/board/ti/common/board_detect.h
> @@ -141,7 +141,7 @@ bool board_ti_rev_is(char *rev_tag, int cmp_len);
>  /**
>   * board_ti_get_rev() - Get board revision for TI EVMs
>   *
> - * Return: NULL if eeprom was'nt read.
> + * Return: Empty string if eeprom was'nt read.
>   *  Board revision otherwise
>   */
>  char *board_ti_get_rev(void);
> @@ -149,7 +149,7 @@ char *board_ti_get_rev(void);
>  /**
>   * board_ti_get_config() - Get board config for TI EVMs
>   *
> - * Return: NULL if eeprom was'nt read.
> + * Return: Empty string if eeprom was'nt read.
>   *  Board config otherwise
>   */
>  char *board_ti_get_config(void);
> @@ -157,7 +157,7 @@ char *board_ti_get_config(void);
>  /**
>   * board_ti_get_name() - Get board name for TI EVMs
>   *
> - * Return: NULL if eeprom was'nt read.
> + * Return: Empty string if eeprom was'nt read.
>   *  Board name otherwise
>   */
>  char *board_ti_get_name(void);
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/3] driver: net: cpsw: add support for RGMII id mode support and RMII clock source selection

2016-10-12 Thread Lokesh Vutla


On Monday 10 October 2016 06:27 PM, Mugunthan V N wrote:
> cpsw driver supports only selection of phy mode in control module
> but control module has more setting like RGMII ID mode selection,
> RMII clock source selection. So ported to cpsw-phy-sel driver
> from kernel to u-boot.
> 
> Signed-off-by: Mugunthan V N 
> ---
>  drivers/net/cpsw.c | 153 
> -
>  include/cpsw.h |   1 +
>  2 files changed, 140 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
> index d17505e..1441f44 100644
> --- a/drivers/net/cpsw.c
> +++ b/drivers/net/cpsw.c
> @@ -225,6 +225,18 @@ struct cpdma_chan {
>   void*hdp, *cp, *rxfree;
>  };
>  
> +/* AM33xx SoC specific definitions for the CONTROL port */
> +#define AM33XX_GMII_SEL_MODE_MII 0
> +#define AM33XX_GMII_SEL_MODE_RMII1
> +#define AM33XX_GMII_SEL_MODE_RGMII   2
> +
> +#define AM33XX_GMII_SEL_RGMII1_IDMODEBIT(4)
> +#define AM33XX_GMII_SEL_RGMII2_IDMODEBIT(5)
> +#define AM33XX_GMII_SEL_RMII1_IO_CLK_EN  BIT(6)
> +#define AM33XX_GMII_SEL_RMII2_IO_CLK_EN  BIT(7)
> +
> +#define GMII_SEL_MODE_MASK   0x3
> +
>  #define desc_write(desc, fld, val)   __raw_writel((u32)(val), &(desc)->fld)
>  #define desc_read(desc, fld) __raw_readl(&(desc)->fld)
>  #define desc_read_ptr(desc, fld) ((void *)__raw_readl(&(desc)->fld))
> @@ -1150,12 +1162,129 @@ static inline fdt_addr_t cpsw_get_addr_by_node(const 
> void *fdt, int node)
> false);
>  }
>  
> +static void cpsw_gmii_sel_am3352(struct cpsw_priv *priv,
> +  phy_interface_t phy_mode)
> +{
> + u32 reg;
> + u32 mask;
> + u32 mode = 0;
> + bool rgmii_id = false;
> + int slave = priv->data.active_slave;
> +
> + reg = readl(priv->data.gmii_sel);
> +
> + switch (phy_mode) {
> + case PHY_INTERFACE_MODE_RMII:
> + mode = AM33XX_GMII_SEL_MODE_RMII;
> + break;
> +
> + case PHY_INTERFACE_MODE_RGMII:
> + mode = AM33XX_GMII_SEL_MODE_RGMII;
> + break;
> + case PHY_INTERFACE_MODE_RGMII_ID:
> + case PHY_INTERFACE_MODE_RGMII_RXID:
> + case PHY_INTERFACE_MODE_RGMII_TXID:
> + mode = AM33XX_GMII_SEL_MODE_RGMII;
> + rgmii_id = true;
> + break;
> +
> + case PHY_INTERFACE_MODE_MII:
> + default:
> + mode = AM33XX_GMII_SEL_MODE_MII;
> + break;
> + };
> +
> + mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6);
> + mode <<= slave * 2;
> +
> + if (priv->data.rmii_clock_external) {

I do not see any one updating value for priv->data.rmii_clock_external.
I guess cpsw_eth_ofdata_to_platdata() should be populating this value
based on DT.

Thanks and regards,
Lokesh

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


Re: [U-Boot] [PATCH 3/3] driver: net: cpsw: add support for RGMII id mode support and RMII clock source selection

2016-10-12 Thread Mugunthan V N
On Thursday 13 October 2016 09:39 AM, Lokesh Vutla wrote:
> 
> 
> On Monday 10 October 2016 06:27 PM, Mugunthan V N wrote:
>> cpsw driver supports only selection of phy mode in control module
>> but control module has more setting like RGMII ID mode selection,
>> RMII clock source selection. So ported to cpsw-phy-sel driver
>> from kernel to u-boot.
>>
>> Signed-off-by: Mugunthan V N 
>> ---
>>  drivers/net/cpsw.c | 153 
>> -
>>  include/cpsw.h |   1 +
>>  2 files changed, 140 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
>> index d17505e..1441f44 100644
>> --- a/drivers/net/cpsw.c
>> +++ b/drivers/net/cpsw.c
>> @@ -225,6 +225,18 @@ struct cpdma_chan {
>>  void*hdp, *cp, *rxfree;
>>  };
>>  
>> +/* AM33xx SoC specific definitions for the CONTROL port */
>> +#define AM33XX_GMII_SEL_MODE_MII0
>> +#define AM33XX_GMII_SEL_MODE_RMII   1
>> +#define AM33XX_GMII_SEL_MODE_RGMII  2
>> +
>> +#define AM33XX_GMII_SEL_RGMII1_IDMODE   BIT(4)
>> +#define AM33XX_GMII_SEL_RGMII2_IDMODE   BIT(5)
>> +#define AM33XX_GMII_SEL_RMII1_IO_CLK_EN BIT(6)
>> +#define AM33XX_GMII_SEL_RMII2_IO_CLK_EN BIT(7)
>> +
>> +#define GMII_SEL_MODE_MASK  0x3
>> +
>>  #define desc_write(desc, fld, val)  __raw_writel((u32)(val), &(desc)->fld)
>>  #define desc_read(desc, fld)__raw_readl(&(desc)->fld)
>>  #define desc_read_ptr(desc, fld)((void *)__raw_readl(&(desc)->fld))
>> @@ -1150,12 +1162,129 @@ static inline fdt_addr_t 
>> cpsw_get_addr_by_node(const void *fdt, int node)
>>false);
>>  }
>>  
>> +static void cpsw_gmii_sel_am3352(struct cpsw_priv *priv,
>> + phy_interface_t phy_mode)
>> +{
>> +u32 reg;
>> +u32 mask;
>> +u32 mode = 0;
>> +bool rgmii_id = false;
>> +int slave = priv->data.active_slave;
>> +
>> +reg = readl(priv->data.gmii_sel);
>> +
>> +switch (phy_mode) {
>> +case PHY_INTERFACE_MODE_RMII:
>> +mode = AM33XX_GMII_SEL_MODE_RMII;
>> +break;
>> +
>> +case PHY_INTERFACE_MODE_RGMII:
>> +mode = AM33XX_GMII_SEL_MODE_RGMII;
>> +break;
>> +case PHY_INTERFACE_MODE_RGMII_ID:
>> +case PHY_INTERFACE_MODE_RGMII_RXID:
>> +case PHY_INTERFACE_MODE_RGMII_TXID:
>> +mode = AM33XX_GMII_SEL_MODE_RGMII;
>> +rgmii_id = true;
>> +break;
>> +
>> +case PHY_INTERFACE_MODE_MII:
>> +default:
>> +mode = AM33XX_GMII_SEL_MODE_MII;
>> +break;
>> +};
>> +
>> +mask = GMII_SEL_MODE_MASK << (slave * 2) | BIT(slave + 6);
>> +mode <<= slave * 2;
>> +
>> +if (priv->data.rmii_clock_external) {
> 
> I do not see any one updating value for priv->data.rmii_clock_external.
> I guess cpsw_eth_ofdata_to_platdata() should be populating this value
> based on DT.
> 

Oops, missed squashing fixup patches from TI repo. Will be careful next
time. Thanks for pointing out early.

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


[U-Boot] MMC driver questions

2016-10-12 Thread Aaron Williams

Hi all,

I'm working on a eMMC/SD driver for our Thunder ARMv8 SoCs by porting 
the MIPS driver I wrote earlier but I'm running into some issues and 
have some comments.


First of all, our SoC performs a number of high-level operations in 
hardware which are not supported by the U-Boot model. The biggest issue 
is how we handle data transfers. We do not support sending CMD12 to stop 
a transmission and instead rely on CMD23 for multi-sector transfers. The 
mmc_read_blocks/mmc_write_blocks functions don't work with our hardware. 
For our Octeon SoC I basically had to replicate everything in mmc.c for 
our SoC and replace all of the functionality. I am wondering if this is 
considered acceptable because our hardware just does not fit the U-Boot 
MMC driver model very well. I also ran into a lot of issues with 
sd_send_op_cond/mmc_send_op_cond. Our SoC hardware also automatically 
handles things like polling the status. It would be nice if most or all 
of the functions inside mmc.c could be overridden by the driver.


Also, our MMC controller shows up as a PCI device but the single PCI 
device can handle up to four MMC slots using the same registers. The 
probe support does not allow for this. There can be multiple PCI devices 
as well in our NUMA configurations, with one PCI device per SoC.


-Aaron
--

Aaron Williams
Software Engineer
Cavium, Inc.
(408) 943-7198  (510) 789-8988 (cell)

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