Re: [U-Boot] [PATCH 2/2] powerpc/mpc85xx: modify erratum A007212

2014-09-25 Thread York Sun
On 9/25/14 9:37 PM, "Zhao Qiang"  wrote:

>T2080 v1.0 has this errata while v1.1 has fixed
>this errata by hardware, add a new function to
>check the SVR_SOC_VER, SVR_MAJ and SVR_MIN first,
>if the cpu is T2080 and version is not v1.0, doesn't
>run the a007212 errata_workaround.
>
>Signed-off-by: Zhao Qiang 
>---


Qiang,

I don't agree with your analysis.

This workaround has two parts. One part is to to disable DDR PLL in RCW.
The second part is to detect DDR PLL is disabled and to implement the
software workaround to bring DDR up. U-boot has the second part, it is
safe to apply to all versions for affected SoC. I put in the comments.
Your patch detects the SVR and decide if the workaround should be applied.
This is wrong. It should detect if DDR PLL is disabled. In case an old RCW
is used, you don't want to end up with a dead board because DDR is
disabled.

York

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


[U-Boot] [PATCH 1/2] powerpc/mpc85xx: modify erratum A007186

2014-09-25 Thread Zhao Qiang
T2080 v1.0 has this errata while v1.1 has fixed
this errata by hardware, add a new function to
check the SVR_SOC_VER, SVR_MAJ and SVR_MIN first,
if the cpu is T2080 and version is not v1.0, doesn't
run the a007186 errata_workaround.

Signed-off-by: Zhao Qiang 
---
 arch/powerpc/cpu/mpc85xx/cmd_errata.c  |   3 +-
 arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c | 210 ++---
 arch/powerpc/include/asm/fsl_errata.h  |  14 ++
 3 files changed, 130 insertions(+), 97 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c 
b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index 3a04a89..741eb63 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -270,7 +270,8 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
puts("Work-around for Erratum USB14 enabled\n");
 #endif
 #ifdef CONFIG_SYS_FSL_ERRATUM_A007186
-   puts("Work-around for Erratum A007186 enabled\n");
+   if (!not_has_erratum_a007186())
+   puts("Work-around for Erratum A007186 enabled\n");
 #endif
 #ifdef CONFIG_SYS_FSL_ERRATUM_A006593
puts("Work-around for Erratum A006593 enabled\n");
diff --git a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c 
b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
index d1fc76a..9b0a538 100644
--- a/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
+++ b/arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c
@@ -11,6 +11,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "fsl_corenet2_serdes.h"
 
 #ifdef CONFIG_SYS_FSL_SRDS_1
@@ -203,108 +204,125 @@ u64 serdes_init(u32 sd, u32 sd_addr, u32 sd_prctl_mask, 
u32 sd_prctl_shift)
  * This workaround for the protocols and rates that only have the Ring VCO.
  */
 #ifdef CONFIG_SYS_FSL_ERRATUM_A007186
-   sfp_spfr0 = in_be32(&sfp_regs->fsl_spfr0);
-   debug("A007186: sfp_spfr0= %x\n", sfp_spfr0);
+   if (!not_has_erratum_a007186()) {
+   sfp_spfr0 = in_be32(&sfp_regs->fsl_spfr0);
+   debug("A007186: sfp_spfr0= %x\n", sfp_spfr0);
 
-   sel = (sfp_spfr0 >> FUSE_VAL_SHIFT) & FUSE_VAL_MASK;
+   sel = (sfp_spfr0 >> FUSE_VAL_SHIFT) & FUSE_VAL_MASK;
 
-   if (sel == 0x01 || sel == 0x02) {
-   for (pll_num = 0; pll_num < SRDS_MAX_BANK; pll_num++) {
-   pll_status = in_be32(&srds_regs->bank[pll_num].pllcr0);
-   debug("A007186: pll_num=%x pllcr0=%x\n",
- pll_num, pll_status);
-   /* STEP 1 */
-   /* Read factory pre-set SerDes calibration values
-* from fuse block(SFP scratch register-sfp_spfr0)
-*/
-   switch (pll_status & SRDS_PLLCR0_FRATE_SEL_MASK) {
-   case SRDS_PLLCR0_FRATE_SEL_3_0:
-   case SRDS_PLLCR0_FRATE_SEL_3_072:
-   debug("A007186: 3.0/3.072 protocol rate\n");
-   bc = (sfp_spfr0 >> BC1_SHIFT) & BC_MASK;
-   dc = (sfp_spfr0 >> DC1_SHIFT) & DC_MASK;
-   fc = (sfp_spfr0 >> FC1_SHIFT) & FC_MASK;
-   break;
-   case SRDS_PLLCR0_FRATE_SEL_3_125:
-   debug("A007186: 3.125 protocol rate\n");
-   bc = (sfp_spfr0 >> BC2_SHIFT) & BC_MASK;
-   dc = (sfp_spfr0 >> DC2_SHIFT) & DC_MASK;
-   fc = (sfp_spfr0 >> FC2_SHIFT) & FC_MASK;
-   break;
-   case SRDS_PLLCR0_FRATE_SEL_3_75:
-   debug("A007186: 3.75 protocol rate\n");
-   bc = (sfp_spfr0 >> BC1_SHIFT) & BC_MASK;
-   dc = (sfp_spfr0 >> DC1_SHIFT) & DC_MASK;
-   fc = (sfp_spfr0 >> FC1_SHIFT) & FC_MASK;
-   break;
-   default:
-   continue;
-   }
+   if (sel == 0x01 || sel == 0x02) {
+   for (pll_num = 0; pll_num < SRDS_MAX_BANK; pll_num++) {
+   pll_status = in_be32(&srds_regs->
+bank[pll_num].pllcr0);
+   debug("A007186: pll_num=%x pllcr0=%x\n",
+ pll_num, pll_status);
+   /* STEP 1 */
+   /* Read factory pre-set SerDes calibration
+* values from fuse block(SFP scratch
+* register-sfp_spfr0)
+*/
+   switch (pll_status &
+   SRDS_PLLCR0_FRATE_SEL_MASK) {
+   case SRDS_PLLCR0_FRATE_SEL_3_0:
+ 

[U-Boot] [PATCH 2/2] powerpc/mpc85xx: modify erratum A007212

2014-09-25 Thread Zhao Qiang
T2080 v1.0 has this errata while v1.1 has fixed
this errata by hardware, add a new function to
check the SVR_SOC_VER, SVR_MAJ and SVR_MIN first,
if the cpu is T2080 and version is not v1.0, doesn't
run the a007212 errata_workaround.

Signed-off-by: Zhao Qiang 
---
 arch/powerpc/cpu/mpc85xx/cmd_errata.c |  2 +-
 arch/powerpc/cpu/mpc85xx/cpu_init.c   |  2 ++
 arch/powerpc/cpu/mpc85xx/speed.c  |  3 ++-
 arch/powerpc/include/asm/fsl_errata.h | 14 ++
 4 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c 
b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index 741eb63..a50bb08 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -121,7 +121,7 @@ static void check_erratum_a007212(void)
 {
u32 __iomem *plldgdcr = (void *)(CONFIG_SYS_DCSRBAR + 0x21c20);
 
-   if (in_be32(plldgdcr) & 0x1fe) {
+   if (!not_has_erratum_a007212() && in_be32(plldgdcr) & 0x1fe) {
/* check if PLL ratio is set by workaround */
puts("Work-around for Erratum A007212 enabled\n");
}
diff --git a/arch/powerpc/cpu/mpc85xx/cpu_init.c 
b/arch/powerpc/cpu/mpc85xx/cpu_init.c
index 78316a6..6219619 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu_init.c
@@ -345,6 +345,8 @@ void fsl_erratum_a007212_workaround(void)
u32 __iomem *plldadcr3 = (void *)(CONFIG_SYS_DCSRBAR + 0x21c68);
 #endif
 #endif
+   if (not_has_erratum_a007212())
+   return;
/*
 * Even this workaround applies to selected version of SoCs, it is
 * safe to apply to all versions, with the limitation of odd ratios.
diff --git a/arch/powerpc/cpu/mpc85xx/speed.c b/arch/powerpc/cpu/mpc85xx/speed.c
index 3236f6a..904d19d 100644
--- a/arch/powerpc/cpu/mpc85xx/speed.c
+++ b/arch/powerpc/cpu/mpc85xx/speed.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -113,7 +114,7 @@ void get_sys_info(sys_info_t *sys_info)
FSL_CORENET_RCWSR0_MEM_PLL_RAT_SHIFT)
& FSL_CORENET_RCWSR0_MEM_PLL_RAT_MASK;
 #ifdef CONFIG_SYS_FSL_ERRATUM_A007212
-   if (mem_pll_rat == 0) {
+   if (!not_has_erratum_a007212() && mem_pll_rat == 0) {
mem_pll_rat = (in_be32(&gur->rcwsr[0]) >>
FSL_CORENET_RCWSR0_MEM_PLL_RAT_RESV_SHIFT) &
FSL_CORENET_RCWSR0_MEM_PLL_RAT_MASK;
diff --git a/arch/powerpc/include/asm/fsl_errata.h 
b/arch/powerpc/include/asm/fsl_errata.h
index a977544..8fd 100644
--- a/arch/powerpc/include/asm/fsl_errata.h
+++ b/arch/powerpc/include/asm/fsl_errata.h
@@ -96,3 +96,17 @@ static inline bool not_has_erratum_a007186(void)
return false;
 }
 #endif
+
+#ifdef CONFIG_SYS_FSL_ERRATUM_A007212
+static inline bool not_has_erratum_a007212(void)
+{
+   u32 svr = get_svr();
+   u32 soc = SVR_SOC_VER(svr);
+
+   if (((soc == SVR_T2080) && (SVR_MAJ(svr) > 1)) ||
+   ((soc == SVR_T2080) && (SVR_MAJ(svr) == 1) && (SVR_MIN(svr) > 0)))
+   return true;
+
+   return false;
+}
+#endif
-- 
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] [PATCH] cmd_mmc: fix bootpart-resize maxarg to 4

2014-09-25 Thread DEATHX
sorry for send this patch two times, It shows being held until the list
moderator can review it for approval.

I think maybe I didn't register the correct mail address and sent it
again. but it still show wait for moderator review.

At last I register my private mail address to this list and found I have
post the same post two time. 

I'm so sorry for this mistake.

Wally

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


[U-Boot] [PATCH] exynos: update maintainer of Snow and SMDK5420 board

2014-09-25 Thread Masahiro Yamada
The email address of Rajeshwari Shinde 
is not working.

Squash the maintainership of Snow board to
Chander Kashyap who is the maintainer of SMDK5250 board.

Likewise, pass the maintainership of SMDK5420 board to
Akshay Saraswat, the maintainer of Peach Pit.

Signed-off-by: Masahiro Yamada 
Cc: Chander Kashyap 
Cc: Akshay Saraswat 
Cc: Minkyu Kang 
---

The error message I got from the mail server is as follows:

   - The following addresses had permanent fatal errors -
  
(reason: 550 5.1.1 Recipient address rejected: User unknown)

Chander, Akshay,

Please let me know if this change is not acceptable for you.


 board/samsung/smdk5250/MAINTAINERS | 4 
 board/samsung/smdk5420/MAINTAINERS | 4 
 2 files changed, 8 deletions(-)

diff --git a/board/samsung/smdk5250/MAINTAINERS 
b/board/samsung/smdk5250/MAINTAINERS
index 8a2a4aa..a65ff93 100644
--- a/board/samsung/smdk5250/MAINTAINERS
+++ b/board/samsung/smdk5250/MAINTAINERS
@@ -4,9 +4,5 @@ S:  Maintained
 F: board/samsung/smdk5250/
 F: include/configs/smdk5250.h
 F: configs/smdk5250_defconfig
-
-SNOW BOARD
-M: Rajeshwari Shinde 
-S: Maintained
 F: include/configs/snow.h
 F: configs/snow_defconfig
diff --git a/board/samsung/smdk5420/MAINTAINERS 
b/board/samsung/smdk5420/MAINTAINERS
index c8241a8..e0f5c7a 100644
--- a/board/samsung/smdk5420/MAINTAINERS
+++ b/board/samsung/smdk5420/MAINTAINERS
@@ -4,9 +4,5 @@ S:  Maintained
 F: board/samsung/smdk5420/
 F: include/configs/peach-pit.h
 F: configs/peach-pit_defconfig
-
-SMDK5420 BOARD
-M: Rajeshwari Shinde 
-S: Maintained
 F: include/configs/smdk5420.h
 F: configs/smdk5420_defconfig
-- 
1.9.1

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


Re: [U-Boot] [PATCH 2/2] arm: am43xx: switch over to CONFIG_ENV_IS_IN_FAT

2014-09-25 Thread Felipe Balbi
On Tue, Sep 23, 2014 at 10:44:18AM -0500, Felipe Balbi wrote:
> By using CONFIG_ENV_IS_IN_FAT it's far easier
> to have a private, minimal environment for e.g.
> booting off of network or mounting rootfs on NFS
> without having to modify the configuration header.
> 
> Signed-off-by: Felipe Balbi 

ping

> ---
>  include/configs/am43xx_evm.h | 11 +--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
> index 0707827..4472c3e 100644
> --- a/include/configs/am43xx_evm.h
> +++ b/include/configs/am43xx_evm.h
> @@ -11,6 +11,9 @@
>  
>  #define CONFIG_AM43XX
>  
> +#define CONFIG_CMD_FAT
> +#define CONFIG_CMD_SAVEENV
> +
>  #define CONFIG_BOARD_LATE_INIT
>  #define CONFIG_ARCH_CPU_INIT
>  #define CONFIG_SYS_CACHELINE_SIZE   32
> @@ -82,7 +85,11 @@
>  /* NS16550 Configuration */
>  #define CONFIG_SYS_NS16550_COM1  0x44e09000  /* Base EVM has 
> UART0 */
>  
> -#define CONFIG_ENV_IS_NOWHERE
> +#define CONFIG_ENV_IS_IN_FAT
> +#define FAT_ENV_INTERFACE"mmc"
> +#define FAT_ENV_DEVICE_AND_PART  "0:1"
> +#define FAT_ENV_FILE "uboot.env"
> +#define CONFIG_FAT_WRITE
>  
>  #define CONFIG_SPL_LDSCRIPT  "$(CPUDIR)/omap-common/u-boot-spl.lds"
>  
> @@ -103,7 +110,7 @@
>  
>  #ifdef CONFIG_QSPI_BOOT
>  #define CONFIG_SYS_TEXT_BASE   0x3000
> -#undef CONFIG_ENV_IS_NOWHERE
> +#undef CONFIG_ENV_IS_IN_FAT
>  #define CONFIG_ENV_IS_IN_SPI_FLASH
>  #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
>  #define CONFIG_ENV_SPI_MAX_HZ   CONFIG_SF_DEFAULT_SPEED
> -- 
> 2.1.1.273.g97b8860
> 

-- 
balbi


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


Re: [U-Boot] [PATCH 1/2] common: Makefile: allow for spl builds with env_fat

2014-09-25 Thread Felipe Balbi
On Tue, Sep 23, 2014 at 10:44:17AM -0500, Felipe Balbi wrote:
> If CONFIG_SPL_BUILD and CONFIG_ENV_IS_IN_FAT are
> defined, u-boot spl will fail to build. Fix that.
> 
> Signed-off-by: Felipe Balbi 

ping

> ---
>  common/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/Makefile b/common/Makefile
> index aca0f7f..1ff7ce0 100644
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -233,6 +233,7 @@ obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o
>  obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o
>  obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o
>  obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o
> +obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o
>  obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
>  obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
>  obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
> -- 
> 2.1.1.273.g97b8860
> 

-- 
balbi


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: nand flash

2014-09-25 Thread Tom Rini
On Thu, Sep 25, 2014 at 03:28:37PM -0500, Scott Wood wrote:

> The following changes since commit e3a4facdfc07179ebe017a07b8de6224a935a9f3:
> 
>   checkpatch: remove unnecessary + after {8,8} (2014-09-25 09:31:24 -0400)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-nand-flash.git master
> 
> for you to fetch changes up to f9860cf081efdf32c8a01b9fc271fe55e2a79f8d:
> 
>   nand/denali: Document CONFIG symbols (2014-09-25 13:54:58 -0500)
> 
> 
> Chin Liang See (1):
>   nand/denali: Adding Denali NAND driver support
> 
> Rostislav Lisovy (1):
>   mtd: nand: am335x: Fix 'bit-flip' errors in SPL
> 
> Scott Wood (1):
>   nand/denali: Document CONFIG symbols
> 
> Stefan Roese (1):
>   mtd: nand: Fix length bug in ioread16_rep() and iowrite16_rep()
> 
>  doc/README.nand   |6 +
>  drivers/mtd/nand/Makefile |1 +
>  drivers/mtd/nand/am335x_spl_bch.c |   12 +-
>  drivers/mtd/nand/denali.c | 1205 
> +
>  drivers/mtd/nand/denali.h |  467 ++
>  drivers/mtd/nand/nand_base.c  |4 +-
>  6 files changed, 1688 insertions(+), 7 deletions(-)
>  create mode 100644 drivers/mtd/nand/denali.c
>  create mode 100644 drivers/mtd/nand/denali.h

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] powerpc/t104xrdb: Disable DTSEC1 and DTSEC2 on T1042RDB

2014-09-25 Thread York Sun
On 09/17/2014 12:38 AM, Vijay Rai wrote:
> As the board was basically designed for T1040RDB so there are 5 DTSEC ports,
> DTSEC1 and DTSEC2 are connected to L2 switch and not usable in T1042 mode
> only 3 ports DTSEC3 to DTSEC5 are usable
> 
> Signed-off-by: Vijay Rai 
> Signed-off-by: Priyanka Jain 
> ---
>  board/freescale/t104xrdb/eth.c |2 +-
>  drivers/net/fm/t1040.c |   15 +++
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/board/freescale/t104xrdb/eth.c b/board/freescale/t104xrdb/eth.c
> index c8b6c67..f84ee2d 100644
> --- a/board/freescale/t104xrdb/eth.c
> +++ b/board/freescale/t104xrdb/eth.c
> @@ -47,7 +47,7 @@ int board_eth_init(bd_t *bis)
>   case PHY_INTERFACE_MODE_SGMII:
>   /* T1042RDB doesn't supports SGMII on DTSEC1 & DTSEC2 */
>   if ((FM1_DTSEC1 == i) || (FM1_DTSEC2 == i))
> - fm_info_set_phy_address(i, 0);
> + fm_disable_port(i);
>   /* T1042RDB only supports SGMII on DTSEC3 */
>   fm_info_set_phy_address(FM1_DTSEC3,
>   CONFIG_SYS_SGMII1_PHY_ADDR);
> diff --git a/drivers/net/fm/t1040.c b/drivers/net/fm/t1040.c
> index bcc871d..1e03662 100644
> --- a/drivers/net/fm/t1040.c
> +++ b/drivers/net/fm/t1040.c
> @@ -10,6 +10,21 @@
>  #include 
>  #include 
>  
> +u32 port_to_devdisr[] = {
> + [FM1_DTSEC1] = FSL_CORENET_DEVDISR2_DTSEC1_1,
> + [FM1_DTSEC2] = FSL_CORENET_DEVDISR2_DTSEC1_2,
> + [FM1_DTSEC3] = FSL_CORENET_DEVDISR2_DTSEC1_3,
> + [FM1_DTSEC4] = FSL_CORENET_DEVDISR2_DTSEC1_4,
> + [FM1_DTSEC5] = FSL_CORENET_DEVDISR2_DTSEC1_5,
> +};
> +
> +void fman_disable_port(enum fm_port port)
> +{
> + ccsr_gur_t *gur = (void __iomem *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);

We declare it as ccsr_gur_t __iomem *gur.

> +
> + setbits_be32(&gur->devdisr2, port_to_devdisr[port]);

I don't see a check for the array. It may be difficult to debug if
CONFIG_SYS_NUM_FM1_DTSEC is bigger than the size of port_to_devdisr.

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


Re: [U-Boot] [u-boot-release] [Patch v3 1/5] fdt_support: Move of_read_number to fdt_support.h

2014-09-25 Thread York Sun
On 09/08/2014 12:19 PM, York Sun wrote:
> From: Arnab Basu 
> 
> This is being done so that it can be used outside 'fdt_support.c'. Making
> life more convenient when reading device node properties that can be 32
> or 64 bits long.
> 
> Signed-off-by: Arnab Basu 
> Cc: Scott Wood 
> ---
> Change log
>  v3: no change
>  v2: new patch
> 

This set is applied to u-boot-fsl-qoriq, awaiting upstream.

York

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


Re: [U-Boot] [PATCH] board/ls2085a: Add support of NOR and NAND flash for simulator

2014-09-25 Thread York Sun
On 07/15/2014 08:51 PM, Prabhakar Kushwaha wrote:
> Add support of NOR and NAND flash for simulator target.
> Here
>   IFC - CS0: NOR flash
>   IFC - CS1: NAND flash
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---

Applied to u-boot-fsl-qoriq, awaiting upstream.

York


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


Re: [U-Boot] [PATCH][v2] driver/mtd: Use generic timer API for FSL IFC, eLBC

2014-09-25 Thread York Sun
On 09/22/2014 09:27 PM, Prabhakar Kushwaha wrote:
> Freescale's flash control driver is using architecture specific timer API
> i.e. usec2ticks
> 
> Replace usec2ticks with get_timer() (generic timer API)
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---
> Changes for v2: updated timeout time to 10ms

Applied to u-boot-fsl-qoriq, awaiting upstream.

York


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


Re: [U-Boot] [PATCH] board/ls2085a: Update env_addr after NOR flash relocation

2014-09-25 Thread York Sun
On 07/14/2014 04:45 AM, Prabhakar Kushwaha wrote:
> LS2085a has 2 regions in system memory map. Region1 is default map from
> where system boots. Once u-boot is moved to DDR, IFC is re-mapped to
> Region2.
> 
> So, update gd->env_addr to reflect correct address.
> 
> Signed-off-by: Prabhakar Kushwaha 
> ---

Applied to u-boot-fsl-qoriq, awaiting upstream.

York

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


[U-Boot] Please pull u-boot-fsl-qoriq

2014-09-25 Thread York Sun
Tom,

The following changes since commit 47d3debe1ab8315dc9ade22279e02f60eceda25b:

  Merge git://git.denx.de/u-boot-dm (2014-09-23 15:21:43 -0400)

are available in the git repository at:

u-boot
  git://git.denx.de/u-boot-fsl-qoriq.git master

for you to fetch changes up to c7eae7fcb11bc7dab519fca8d8902f1fbc5c3c76:

  board/ls1021aqds: Add DDR4 support (2014-09-25 09:12:12 -0700)


Arnab Basu (2):
  fdt_support: Move of_read_number to fdt_support.h
  fdt_support: Make of_bus_default_count_cells non static

Prabhakar Kushwaha (3):
  board/ls2085a: Update env_addr after NOR flash relocation
  driver/mtd: Use generic timer API for FSL IFC, eLBC
  board/ls2085a: Add support of NOR and NAND flash for simulator

York Sun (8):
  driver/ddr: Restruct driver to allow standalone memory space
  ARMv8/ls2085a_emu: Enable DP-DDR as standalone memory block
  driver/ddr/fsl: Fix tXP and tCKE
  armv8/fsl-lsch3: Release secondary cores from boot hold off with Boot Page
  ARMv8/ls2085a: Enable secondary cores
  ARMv8/ls2085a: Move u-boot location to make room for RCW
  driver/ddr/fsl: Fix DDR4 driver
  board/ls1021aqds: Add DDR4 support

 README|6 +
 arch/arm/cpu/armv8/fsl-lsch3/Makefile |2 +
 arch/arm/cpu/armv8/fsl-lsch3/cpu.c|   13 ++
 arch/arm/cpu/armv8/fsl-lsch3/cpu.h|1 +
 arch/arm/cpu/armv8/fsl-lsch3/fdt.c|   58 +
 arch/arm/cpu/armv8/fsl-lsch3/lowlevel.S   |  125 +--
 arch/arm/cpu/armv8/fsl-lsch3/mp.c |  168 ++
 arch/arm/cpu/armv8/fsl-lsch3/mp.h |   36 +++
 arch/arm/cpu/armv8/transition.S   |   63 +-
 arch/arm/include/asm/arch-fsl-lsch3/config.h  |6 +-
 arch/arm/include/asm/arch-fsl-lsch3/immap_lsch3.h |   35 +++
 arch/arm/include/asm/arch-ls102xa/config.h|5 +
 arch/arm/include/asm/macro.h  |   93 
 arch/arm/lib/gic_64.S |   10 +-
 arch/powerpc/cpu/mpc85xx/cpu.c|4 +-
 board/freescale/ls1021aqds/MAINTAINERS|1 +
 board/freescale/ls1021aqds/ddr.c  |9 +-
 board/freescale/ls1021aqds/ddr.h  |   10 +
 board/freescale/ls2085a/ddr.c |   34 ++-
 board/freescale/ls2085a/ddr.h |   29 +++
 board/freescale/ls2085a/ls2085a.c |   21 +-
 common/fdt_support.c  |   11 +-
 configs/ls1021aqds_ddr4_nor_defconfig |3 +
 drivers/ddr/fsl/ctrl_regs.c   |   37 +++-
 drivers/ddr/fsl/ddr4_dimm_params.c|   12 +-
 drivers/ddr/fsl/fsl_ddr_gen4.c|3 +-
 drivers/ddr/fsl/interactive.c |2 -
 drivers/ddr/fsl/main.c|  244 ++---
 drivers/ddr/fsl/options.c |   27 ++-
 drivers/ddr/fsl/util.c|   26 ++-
 drivers/mtd/nand/fsl_elbc_nand.c  |8 +-
 drivers/mtd/nand/fsl_ifc_nand.c   |   21 +-
 include/configs/ls1021aqds.h  |4 +-
 include/configs/ls2085a_common.h  |   87 +++-
 include/configs/ls2085a_emu.h |1 +
 include/configs/ls2085a_simu.h|9 +
 include/fdt_support.h |   12 +
 include/fsl_ddr.h |   15 +-
 include/fsl_ddr_sdram.h   |   18 +-
 39 files changed, 1018 insertions(+), 251 deletions(-)
 create mode 100644 arch/arm/cpu/armv8/fsl-lsch3/fdt.c
 create mode 100644 arch/arm/cpu/armv8/fsl-lsch3/mp.c
 create mode 100644 arch/arm/cpu/armv8/fsl-lsch3/mp.h
 create mode 100644 configs/ls1021aqds_ddr4_nor_defconfig

Thanks,

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


[U-Boot] Pull request: nand flash

2014-09-25 Thread Scott Wood
The following changes since commit e3a4facdfc07179ebe017a07b8de6224a935a9f3:

  checkpatch: remove unnecessary + after {8,8} (2014-09-25 09:31:24 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-nand-flash.git master

for you to fetch changes up to f9860cf081efdf32c8a01b9fc271fe55e2a79f8d:

  nand/denali: Document CONFIG symbols (2014-09-25 13:54:58 -0500)


Chin Liang See (1):
  nand/denali: Adding Denali NAND driver support

Rostislav Lisovy (1):
  mtd: nand: am335x: Fix 'bit-flip' errors in SPL

Scott Wood (1):
  nand/denali: Document CONFIG symbols

Stefan Roese (1):
  mtd: nand: Fix length bug in ioread16_rep() and iowrite16_rep()

 doc/README.nand   |6 +
 drivers/mtd/nand/Makefile |1 +
 drivers/mtd/nand/am335x_spl_bch.c |   12 +-
 drivers/mtd/nand/denali.c | 1205 +
 drivers/mtd/nand/denali.h |  467 ++
 drivers/mtd/nand/nand_base.c  |4 +-
 6 files changed, 1688 insertions(+), 7 deletions(-)
 create mode 100644 drivers/mtd/nand/denali.c
 create mode 100644 drivers/mtd/nand/denali.h
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] arm: make .vectors section allocatable

2014-09-25 Thread Georges Savoundararadj

Hi Albert,

Le 24/09/2014 09:34, Albert ARIBAUD a écrit :

Hi Georges,

On Sun, 21 Sep 2014 23:33:48 +0200, Georges Savoundararadj
    wrote:


Before the commit 41623c91, the exception vector was in a .text
section which is allocatable. After this, the .vectors section was
introduced to contain the exception vector without specifying it as a
.text section but only as a executable section ("x").
This fix marks the section .vectors as allocatable as well ("ax") allowing
symbols to be relocated.

Could you explain (on the list, not in the commit message, although I
might ask you to do it there too later on) the exact effects of adding
the "a" flag, i.e., what symbol exactly was broken by commit 41623c91,
how it is broken, and how "a" changes this?
According to [1], the .text section has the attributes allocated and 
executable:

"The attributes used are SHF_ALLOC and SHF_EXECINSTR".

Before commit 41623c91, the exception vectors were not defined in a 
specific section.

For instance, see arch/arm/cpu/arm1176/start.S.
I think, if no specific section type is specified, the symbols will be, 
by default, in a .text section.
It is what we observe thanks to arm-none-eabi-objdump -D 
arch/arm/cpu/arm1176/start.o.


And, we notice that the addresses of the symbols of the exception 
vectors are indeed there:

0003328c <__rel_dyn_end-0x4b00>:
   3328c:   8020andeq   r8, r0, r0, lsr #32
   33290:   0017andeq   r0, r0, r7, lsl r0
   33294:   8024andeq   r8, r0, r4, lsr #32
   33298:   0017andeq   r0, r0, r7, lsl r0
   3329c:   8028andeq   r8, r0, r8, lsr #32
   332a0:   0017andeq   r0, r0, r7, lsl r0
   332a4:   802candeq   r8, r0, ip, lsr #32
8020 is the address of _undefined_instruction, 8024 of 
_software_interrupt, etc., ...


In commit 41623c91, a specific section is created to contain these 
symbols called .vectors

with the attribute executable (SHF_EXECINSTR or "x").

The symbols of the exception vectors are not referenced in .rel.dyn:
000332ac <__rel_dyn_end-0x4ac8>:
   332ac:   8538andeq   r8, r0, r8, lsr r5
   332b0:   0017andeq   r0, r0, r7, lsl r0
   332b4:   853candeq   r8, r0, ip, lsr r5
   332b8:   0017andeq   r0, r0, r7, lsl r0
   332bc:   8540andeq   r8, r0, r0, asr #10
   332c0:   0017andeq   r0, r0, r7, lsl r0
   332c4:   8548andeq   r8, r0, r8, asr #10
   332c8:   0017andeq   r0, r0, r7, lsl r0
   332cc:   854candeq   r8, r0, ip, asr #10

What has changed between commit 41623c91^ and 41623c91 is the attribute 
of the section where the exception

vectors are.
If we add the lacking attribute (SHF_ALLOC or "a") for the definition of 
the section .vectors, the problem is solved.
According to [1], a allocatable section is "a section [that] occupies 
memory during process execution" which is

the case of .vectors.

To summarize, the issue is to set the section where the symbols 
_undefined_instruction, _software_interrupt,
_prefetch_abort, _data_abort, _not_used, _irq and _fiq are as 
allocatable because the exception vectors

resides in memory during execution.
If we do not mark it as allocatable, these symbols will no be referenced 
for relocation.


[1] http://man7.org/linux/man-pages/man5/elf.5.html


On a deeper level, note that many ARM targets around do not have free
rein on where they can put vectors, e.g., they are limited to base
addresses of 0x or 0x. Thus, in many cases, vector are
relocated along with the rest of the image, but in fact, their base
address will not be their relocated address, and they will require
copying into whatever fixed location the target supports.

If you're going to fix general exception handling files (which I am
quite fine with), I would prefer that you solve the general problem,
i.e. either relocate vectors along with the code and fix VBAR on
plaforms that can use it, or relocate them to the fixed location wher
e the target expects them.
I didn't plan to to do that. But, I am ok to propose you a more general 
patch.


Regards,

Georges


Signed-off-by: Georges Savoundararadj  

---
  arch/arm/lib/vectors.S | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index 0cb87ce..49238ed 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -33,7 +33,7 @@
   *
   */
  
-	.section ".vectors", "x"

+   .section ".vectors", "ax"
  
  /*

   *

Amicalement,

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


Re: [U-Boot] [PATCH 50/51] arm: socfpga: Split SoCFPGA configuration

2014-09-25 Thread Marek Vasut
On Wednesday, September 24, 2014 at 04:10:29 PM, Dinh Nguyen wrote:
> On Sun, 21 Sep 2014, Marek Vasut wrote:
> > From: Pavel Machek 
> > 
> > Split the SoCFPGA configuration into SoC-specific part which is
> > common for all boards (socfpga_cyclone5_common.h) and a board
> > specific part. There is currently only one board, which is the
> > generic SoCFPGA board (socfpga_cyclone5.h), but there are more
> > to come.
> > 
> > This is necessary due to various features of the boards, which
> > unfortunatelly cannot be autodetected.
> > 
> > Signed-off-by: Marek Vasut 
> > Cc: Chin Liang See 
> > Cc: Dinh Nguyen 
> > Cc: Albert Aribaud 
> > Cc: Tom Rini 
> > Cc: Wolfgang Denk 
> > Cc: Pavel Machek 
> > ---
> > 
> >  include/configs/socfpga_cyclone5.h| 211
> >  ++
> >  include/configs/socfpga_cyclone5_common.h | 196
> >  +++ 2 files changed, 207 insertions(+), 200
> >  deletions(-)
> >  create mode 100644 include/configs/socfpga_cyclone5_common.h
> 
> Thanks for taking a stab at this, but I think it makes more sense to have
> socfpga_commoh.h and socfpga_cyclone5.h. The _common file can have most of
> the common settings for u-boot, while _cyclone5 will have the base
> addresses for all the various IP blocks. Then once everything is done for
> Cyclone5, we can add support for the Arria5 SOC by just adding
> socfpga_arria5.h.

Yes, I agree, done.

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


Re: [U-Boot] [PATCH 50/51] arm: socfpga: Split SoCFPGA configuration

2014-09-25 Thread Marek Vasut
On Wednesday, September 24, 2014 at 05:38:07 PM, Pavel Machek wrote:
> Hi!
> 
> > > From: Pavel Machek 
> > > 
> > > Split the SoCFPGA configuration into SoC-specific part which is
> > > common for all boards (socfpga_cyclone5_common.h) and a board
> > > specific part. There is currently only one board, which is the
> > > generic SoCFPGA board (socfpga_cyclone5.h), but there are more
> > > to come.
> > > 
> > > This is necessary due to various features of the boards, which
> > > unfortunatelly cannot be autodetected.
> > > 
> > > Signed-off-by: Marek Vasut 
> > > Cc: Chin Liang See 
> > > Cc: Dinh Nguyen 
> > > Cc: Albert Aribaud 
> > > Cc: Tom Rini 
> > > Cc: Wolfgang Denk 
> > > Cc: Pavel Machek 
> > > ---
> > > 
> > >  include/configs/socfpga_cyclone5.h| 211
> > >  ++
> > >  include/configs/socfpga_cyclone5_common.h | 196
> > >  +++ 2 files changed, 207 insertions(+), 200
> > >  deletions(-)
> > >  create mode 100644 include/configs/socfpga_cyclone5_common.h
> > 
> > Thanks for taking a stab at this, but I think it makes more sense to have
> > socfpga_commoh.h and socfpga_cyclone5.h. The _common file can have most
> > of the common settings for u-boot, while _cyclone5 will have the base
> > addresses for all the various IP blocks. Then once everything is done
> > for Cyclone5, we can add support for the Arria5 SOC by just adding
> > socfpga_arria5.h.
> 
> socfpga_common.h sounds like a good name.
> 
> But I wonder if socfpga_cyclone5.h should be named
> socfpga_cyclone5_socdk.h ?

To be consistent with Linux DTB name even ? Might be a good idea, but not for 
this patch . This patch doesn't introduce any "functional" change either for
the build or for the result.

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


Re: [U-Boot] [WIP PATCH 0/2 v2] arm: socfpga: Add Cadence QSPI support

2014-09-25 Thread Marek Vasut
On Tuesday, September 23, 2014 at 04:08:28 PM, Stefan Roese wrote:
> Hi SoCFPGA-developers!
> 
> So this is my 2nd posting regarding the Candence SPI driver on SoCFPGA.
> I got it working now. But only with one quick-hack, as you can see in
> patch 4/4. Which disabled the dcache. Or more precise, doesn't enable it.
> Thanks to Michael who pointed this out.
> 
> Since I really can't spend more time on this in this week, and
> Chin Liang mentioned that he might be able to help out (thanks
> again for this), I'm posting this version now for all others
> as a reference. Hopefully Chin Liang (or some other volunteer) can fix
> this cache issue in a generic way.

I will keep tracking this in my repository so it doesn't get lost. I am not 
sure 
I will get to fixing it though.

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


Re: [U-Boot] [PATCH v2 0/9] Add a better USB keyboard polling method

2014-09-25 Thread Marek Vasut
On Thursday, September 25, 2014 at 03:27:44 PM, Hans de Goede wrote:
> Hi,
> 
> On 09/24/2014 09:04 PM, Marek Vasut wrote:
> > On Wednesday, September 24, 2014 at 02:06:02 PM, Hans de Goede wrote:
> >> Hi Marek,
> >> 
> >> Here is v2 of my "Add a better USB keyboard polling method" patch-set.
> >> 
> >> Changes in v2:
> >> 
> >> -Added 2 new patches:
> >>  usb: kbd: Fix memleak on usb_kbd_deregister()
> >>  stdio: Fix memleak on stdio_deregister
> >> 
> >> -Fixed use after free in:
> >>  usb: kbd: Add (optional) support for using an interrupt queue for
> >>  polling
> > 
> > Applied all to u-boot-usb/next . Please verify if all is in place.
> 
> Verified, everything is in place.
> 
> Thanks and Regards,

Thank you!

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


[U-Boot] [PATCH] patman: Check commit_match before stripping leading whitespace

2014-09-25 Thread Scott Wood
True commit lines start at column zero.  Anything that is indented
is part of the commit message instead.  I noticed this by trying to
run buildman with commit e3a4facdfc07179ebe017a07b8de6224a935a9f3
as master, which contained a reference to a Linux commit inside
the commit message.  ProcessLine saw that as a genuite commit
line, and thus buildman tried to build it, and died with an
exception because that SHA is not present in the U-Boot tree.

Signed-off-by: Scott Wood 
---
 tools/patman/patchstream.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index d630157..68e98b9 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -139,6 +139,9 @@ class PatchStream:
 # Initially we have no output. Prepare the input line string
 out = []
 line = line.rstrip('\n')
+
+commit_match = re_commit.match(line) if self.is_log else None
+
 if self.is_log:
 if line[:4] == '':
 line = line[4:]
@@ -146,7 +149,6 @@ class PatchStream:
 # Handle state transition and skipping blank lines
 series_tag_match = re_series_tag.match(line)
 commit_tag_match = re_commit_tag.match(line)
-commit_match = re_commit.match(line) if self.is_log else None
 cover_cc_match = re_cover_cc.match(line)
 signoff_match = re_signoff.match(line)
 tag_match = None
-- 
1.9.1

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


Re: [U-Boot] [PATCH] Fman/mEMAC: mEMAC fix for 10G MAC and PHY

2014-09-25 Thread Joe Hershberger
On Wed, Aug 13, 2014 at 5:32 AM,  wrote:
>
> From: Shaohui Xie 
>
> 1. use Payload length check disable when enable MAC;
> 2. add XGMII support for setting MAC interface mode;
> 3. only enable auto negotiation for Non-XGMII mode;
> 4. return 0x if clause 22 is used to read 10G phy_id;
>
> Signed-off-by: Shaohui Xie 
> Signed-off-by: Roy Zang 

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


Re: [U-Boot] [PATCH] driver/net/fm/memac_phy: set NEG bit for external MDIOs

2014-09-25 Thread Joe Hershberger
On Wed, Aug 13, 2014 at 5:38 AM,  wrote:
>
> From: Shaohui Xie 
>
> NEG bit default is '1' for external MDIOs as per FMAN-v3 RM, but on some
> platforms, e.g. T2080QDS, this bit is '0', which leads to MDIO failure
> on XAUI PHY, so set this bit definitely to align with the RM.
>
> Signed-off-by: Shaohui Xie 

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


[U-Boot] [PATCH 1/2] arm: m28evk: Zap superfluous tab in env

2014-09-25 Thread Marek Vasut
Remove this tab from env, since it's useless, just use spaces.

Signed-off-by: Marek Vasut 
Cc: Stefano Babic 
---
 include/configs/m28evk.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 322b45f..efe770b 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -282,9 +282,9 @@
"mmc rescan;"   \
"if test -e mmc 0:2 ${bootscript} ; then "  \
"if load mmc 0:2 ${kernel_addr_r} ${bootscript};"   \
-   "then;" \
-   "\techo Running bootscript...;" \
-   "\tsource ${kernel_addr_r};"\
+   "then ; "   \
+   "echo Running bootscript... ; " \
+   "source ${kernel_addr_r} ; "\
"fi ; " \
"fi\0"
 
-- 
2.1.0

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


[U-Boot] [PATCH 2/2] arm: m53evk: Zap superfluous tab in env

2014-09-25 Thread Marek Vasut
Remove this tab from env, since it's useless, just use spaces.

Signed-off-by: Marek Vasut 
Cc: Stefano Babic 
---
 include/configs/m53evk.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/configs/m53evk.h b/include/configs/m53evk.h
index ee4eb10..c133ba9 100644
--- a/include/configs/m53evk.h
+++ b/include/configs/m53evk.h
@@ -351,9 +351,9 @@
"mmc rescan;"   \
"if test -e mmc 0:1 ${bootscript} ; then "  \
"if load mmc 0:1 ${kernel_addr_r} ${bootscript};"   \
-   "then;" \
-   "\techo Running bootscript...;" \
-   "\tsource ${kernel_addr_r};"\
+   "then ; "   \
+   "echo Running bootscript... ; " \
+   "source ${kernel_addr_r} ; "\
"fi ; " \
"fi\0"
 
-- 
2.1.0

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


[U-Boot] [PATCH] mtd: nand: mxs: Add ECC geometry for 2048b/112b NAND

2014-09-25 Thread Marek Vasut
Add ECC geometry for NAND which has 2048b pagesize and 112b OOB
size. This is for example Macronix MX30LF2G28AB chip.

Signed-off-by: Marek Vasut 
---
 drivers/mtd/nand/mxs_nand.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
index 036c113..7a064ab 100644
--- a/drivers/mtd/nand/mxs_nand.c
+++ b/drivers/mtd/nand/mxs_nand.c
@@ -146,8 +146,13 @@ static uint32_t mxs_nand_aux_status_offset(void)
 static inline uint32_t mxs_nand_get_ecc_strength(uint32_t page_data_size,
uint32_t page_oob_size)
 {
-   if (page_data_size == 2048)
-   return 8;
+   if (page_data_size == 2048) {
+   if (page_oob_size == 64)
+   return 8;
+
+   if (page_oob_size == 112)
+   return 14;
+   }
 
if (page_data_size == 4096) {
if (page_oob_size == 128)
-- 
2.1.0

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


Re: [U-Boot] [PATCH v2 10/10] ARM: sun6i: Add Colombus board defconfig

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> The Colombus board is an A31 evaluation board from WITS Technology.
> 
> Signed-off-by: Chen-Yu Tsai 

> ---
>  configs/Colombus_defconfig | 4 
>  1 file changed, 4 insertions(+)
>  create mode 100644 configs/Colombus_defconfig
> 
> diff --git a/configs/Colombus_defconfig b/configs/Colombus_defconfig
> new file mode 100644
> index 000..16800de
> --- /dev/null
> +++ b/configs/Colombus_defconfig
> @@ -0,0 +1,4 @@
> +CONFIG_SYS_EXTRA_OPTIONS="COLOMBUS"

Does this do anything other than define an unused #define?

Ah, I suppose eventually it will cause the inclusion of a suitable dram
file. Really ought to start moving things out of SYS_EXTRA though, but I
don't think you need to shave that yakk just to get this patch in, so:

Acked-by: Ian Campbell 



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


Re: [U-Boot] [PATCH v2 09/10] ARM: sunxi: Add basic A31 support

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> From: Maxime Ripard 
> 
> Add a new sun6i machine that supports UART and MMC.
> 
> Signed-off-by: Maxime Ripard 
> Signed-off-by: Hans de Goede 
> [w...@csie.org: use SPDX labels, adapt to Kconfig system, drop ifdef
>   around mmc and smp code, drop MACH_TYPE]
> Signed-off-by: Chen-Yu Tsai 

Acked-by: Ian Campbell 


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


[U-Boot] [PATCH] nand/denali: Document CONFIG symbols

2014-09-25 Thread Scott Wood
The patch "nand/denali: Adding Denali NAND driver support"
introduced two config symbols without documenting them.

Signed-off-by: Scott Wood 
Cc: Chin Liang See 
Cc: Masahiro Yamada 
---
 doc/README.nand | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/doc/README.nand b/doc/README.nand
index e29188f..320d752 100644
--- a/doc/README.nand
+++ b/doc/README.nand
@@ -215,6 +215,12 @@ Configuration Options:
 
 Platform specific options
 =
+   CONFIG_NAND_DENALI
+   Enables the denali.c driver.
+
+   CONFIG_SYS_NAND_DENALI_64BIT
+   Indicates that the Denali NAND controller is the 64-bit variant.
+
CONFIG_NAND_OMAP_GPMC
Enables omap_gpmc.c driver for OMAPx and AM platforms.
GPMC controller is used for parallel NAND flash devices, and can
-- 
1.9.1

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


Re: [U-Boot] [PATCH v2 08/10] ARM: sun6i: Setup the A31 UART0 muxing

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> From: Maxime Ripard 
> 
> Signed-off-by: Maxime Ripard 
> Signed-off-by: Hans de Goede 
> [w...@csie.org: commit message was "ARM: sunxi: Setup the A31 UART0 muxing"]
> [w...@csie.org: reorder #ifs by SUN?I]
> [w...@csie.org: replace magic numbers with GPIO definitions]
> Signed-off-by: Chen-Yu Tsai 

Acked-by: Ian Campbell 


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


Re: [U-Boot] [PATCH v2 07/10] ARM: sun6i: Define UART0 pins for A31

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> UART0 is the default debug/console UART on the A31.
> 
> Signed-off-by: Chen-Yu Tsai 

Acked-by: Ian Campbell 


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


Re: [U-Boot] [PATCH v2 06/10] ARM: sunxi-mmc: Add mmc support for sun6i / A31

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> From: Hans de Goede 
> 
> The mmc hardware on sun6i has an extra reset control that needs to
> be de-asserted prior to usage. Also the FIFO address is different.
> 
> Signed-off-by: Hans de Goede 
> [w...@csie.org: use setbits_le32 for reset control, drop obsolete changes,
>   rewrite different FIFO address handling, add commit message]
> Signed-off-by: Chen-Yu Tsai 

Acked-by: Ian Campbell 

Pantelis, unless you object I'd like to eventually take this into
u-boot-sunxi.git#next and merge for v2015.04.

> ---
>  arch/arm/include/asm/arch-sunxi/mmc.h |  5 -
>  drivers/mmc/sunxi_mmc.c   | 11 +++
>  2 files changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h 
> b/arch/arm/include/asm/arch-sunxi/mmc.h
> index 53196e3..6a31184 100644
> --- a/arch/arm/include/asm/arch-sunxi/mmc.h
> +++ b/arch/arm/include/asm/arch-sunxi/mmc.h
> @@ -43,7 +43,10 @@ struct sunxi_mmc {
>   u32 chda;   /* 0x90 */
>   u32 cbda;   /* 0x94 */
>   u32 res1[26];
> - u32 fifo;   /* 0x100 FIFO access address */
> +#if defined(CONFIG_SUN6I)
> + u32 res2[64];
> +#endif
> + u32 fifo;   /* 0x100 (0x200 on sun6i) FIFO access address */
>  };
>  
>  #define SUNXI_MMC_CLK_POWERSAVE  (0x1 << 17)
> diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
> index d4e574f..1982988 100644
> --- a/drivers/mmc/sunxi_mmc.c
> +++ b/drivers/mmc/sunxi_mmc.c
> @@ -19,7 +19,6 @@
>  struct sunxi_mmc_host {
>   unsigned mmc_no;
>   uint32_t *mclkreg;
> - unsigned database;
>   unsigned fatal_err;
>   unsigned mod_clk;
>   struct sunxi_mmc *reg;
> @@ -57,7 +56,6 @@ static int mmc_resource_init(int sdc_no)
>   printf("Wrong mmc number %d\n", sdc_no);
>   return -1;
>   }
> - mmchost->database = (unsigned int)mmchost->reg + 0x100;
>   mmchost->mmc_no = sdc_no;
>  
>   return 0;
> @@ -75,6 +73,11 @@ static int mmc_clk_io_on(int sdc_no)
>   /* config ahb clock */
>   setbits_le32(&ccm->ahb_gate0, 1 << AHB_GATE_OFFSET_MMC(sdc_no));
>  
> +#if defined(CONFIG_SUN6I)
> + /* unassert reset */
> + setbits_le32(&ccm->ahb_reset0_cfg, 1 << AHB_RESET_OFFSET_MMC(sdc_no));
> +#endif
> +
>   /* config mod clock */
>   pll_clk = clock_get_pll6();
>   /* should be close to 100 MHz but no more, so round up */
> @@ -194,9 +197,9 @@ static int mmc_trans_data_by_cpu(struct mmc *mmc, struct 
> mmc_data *data)
>   }
>  
>   if (reading)
> - buff[i] = readl(mmchost->database);
> + buff[i] = readl(&mmchost->reg->fifo);
>   else
> - writel(buff[i], mmchost->database);
> + writel(buff[i], &mmchost->reg->fifo);
>   }
>  
>   return 0;


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


Re: [U-Boot] [PATCH v2 05/10] ARM: sun6i: Add clock support

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> This patch adds the basic clocks support for the Allwinner A31 (sun6i)
> processor. This code will not been compiled until the build is hooked
> up in a later patch. It has been split out to keep the patches manageable.
> 
> This includes changes from the following commits from u-boot-sunxi:
> 
> a92051b ARM: sunxi: Add sun6i clock controller structure
> 1f72c6f ARM: sun6i: Setup the UART0 clocks
> 5f2e712 ARM: sunxi: Enable pll6 by default on all models
> 2be2f2a ARM: sunxi-mmc: Add mmc support for sun6i / A31
> 12e1633 ARM: sun6i: Add initial clock setup for SPL
> 1a9c9c6 ARM: sunxi: Split clock code into common, sun4i and sun6i code
> 0b194ee ARM: sun6i: Properly setup the PLL LDO in clock_init_safe
> b54c626 sunxi: avoid sr32 for APB1 clock setup.
> 68fe29c sunxi: remove magic numbers from clock_get_pll{5,6}
> c89867d sunxi: clocks: clock_get_pll5 prototype and coding style
> 501ab1e ARM: sunxi: Fix sun6i PLL6 settings
> 37f669b ARM: sunxi: Fix macro names for mmc and uart reset offsets
> 61de1e6 ARM: sunxi: Correct comment for MBUS1 register in sun6i clock 
> definitions
> 
> Signed-off-by: Maxime Ripard 
> Signed-off-by: Ian Campbell 
> Signed-off-by: Hans de Goede 
> [w...@csie.org: styling fixes reported by checkpatch.pl]
> [w...@csie.org: drop unsupported SPL code block and unused gpio.h header]
> Signed-off-by: Chen-Yu Tsai 
> Cc: Tom Cubie 

Acked-by: Ian Campbell 

(my contributions to what became this patch were minor enough that I
think this doesn't constitute a double dealing self-ack, if that might
have been a problem)


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


Re: [U-Boot] [PATCH v2 04/10] ARM: sun6i: Add support for the power reset control module found on the A31

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> From: Oliver Schinagl 
> 
> The A31 has a new module called PRCM, or Power, Reset Control Module.
> This module controls clocks and resets for RTC block modules, and also
> PLL biasing in the main clock module.
> 
> This patch adds the register definitions, and also enables the clocks
> and resets for the RTC block PIO (pin controller) and P2WI (push-pull
> 2 wire interface) which is used to talk to the PMIC.
> 
> Signed-off-by: Oliver Schinagl 
> Signed-off-by: Hans de Goede 
> [w...@csie.org: spacing fixes reported by checkpatch.pl]
> [w...@csie.org: Use setbits helper in PRCM init function]
> [w...@csie.org: rephrase commit message to explain what the hardware
>   supports and what we actually enable]
> Signed-off-by: Chen-Yu Tsai 

Acked-by: Ian Campbell 


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


Re: [U-Boot] [PATCH v2 01/10] ARM: sunxi: Use macro values for setting UART GPIO pull-ups

2014-09-25 Thread Ian Campbell
On Wed, 2014-09-24 at 16:01 +0800, Chen-Yu Tsai wrote:
> We have already defined macros for pull-up/down values in the
> GPIO header. Use them instead of magic numbers when configuring
> the UART pins.
> 
> Signed-off-by: Chen-Yu Tsai 

Acked-by: Ian Campbell 


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


Re: [U-Boot] [RFC PATCH v1] powerpc: add --bss-plt to LDFLAGS

2014-09-25 Thread York Sun
On 09/09/2014 09:03 PM, Chris Packham wrote:
> With some versions of gcc (that we know of 4.6.3 and 4.8.2 are affected)
> it is necessary to specify --bss-plt to get the final blrl in the
> _GOT2_TABLE_. Without this the last symbol does not get it's address
> relocated.  For the P2041RDB board this ended up being
> NetArpWaitTimerStart which caused the ARP packets to timeout
> immediately.
> 
> Helped-by: Joakim Tjernlund 
> Signed-off-by: Chris Packham 
> ---

Applied to u-boot-mpc85xx, awaiting upstream.

York


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


Re: [U-Boot] [PATCH] board/t1040qds: Add sgmii ports support in 0xA7 protocol

2014-09-25 Thread York Sun
On 09/08/2014 12:50 AM, Priyanka Jain wrote:
> T1042QDS (T1042 is T1040 Personality without L2 switch) supports following
> sgmii interfaces with serdes protocol 0xA7
> -SGMII-MAC3 on Lane B - slot 7
> -SGMII-MAC5 on Lane H - slot 7
> -SGMII2.5G-MAC1 on Lane C - slot 6
> -SGMII2.5G-MAC2 on Lane D - slot 5
> 
> Add support of above sgmii interfaces
> 
> Signed-off-by: Priyanka Jain 
> ---

Applied to u-boot-mpc85xx, awaiting upstream.

York


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


Re: [U-Boot] [PATCH] powerpc/t104xrdb: Set DDR ODT to 75ohm

2014-09-25 Thread York Sun
On 09/05/2014 02:48 AM, Priyanka Jain wrote:
> DDR-ODT require cfg_dram_type switch set properly as per DDR type.
> T1040RDB, T1042RDB boards have DDR3L type DDR, so cfg_dram_type
> should be set to OFF for DDR3L
> Update t104xrdb/README for switch setting
> 
> Signed-off-by: Priyanka Jain 
> ---

Applied to u-boot-mpc85xx, awaiting upstream.

York


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


Re: [U-Boot] [PATCH] powerpc/mpc85xx: Serdes protocol "00" is supported

2014-09-25 Thread York Sun
On 09/04/2014 09:53 AM, Ebony Zhu wrote:
> "0x00" is a valid serdes protocol for QorIQ parts, and can not be
> used to test whether the serdes is enabled or disabled.
> 
> Signed-off-by: Ebony Zhu 
> ---
>  arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c | 5 -
>  1 file changed, 5 deletions(-)
> 

Applied to u-boot-mpc85xx, awaiting upstream.

York


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


Re: [U-Boot] [PATCH] B4860QDS: Enable mac command support

2014-09-25 Thread York Sun
On 09/04/2014 03:47 AM, Shaveta Leekha wrote:
> One of the I2C EEPROM is used to store/save and edit mac
> addresses of ports.
> this patch add required CONFIG to support the same
> 
> Signed-off-by: Shaveta Leekha 
> ---

Applied to u-boot-mpc85xx, awaiting upstream.

York


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


Re: [U-Boot] [PATCH][v2] powerpc/b4860: Updated default hwconfig so as to enable only

2014-09-25 Thread York Sun
On 09/03/2014 11:13 PM, Shaveta Leekha wrote:
> CPC1 is not being enabled by default as powerpc is supposed to
> use only CPC2.
> Though by editing hwconfig en_cpc option,
> CPC1 can also be enabled
> 
> Signed-off-by: Shaveta Leekha 
> Signed-off-by: Sandeep Singh 
> ---
> Tested on B4860QDS
> 
> Changes in V2:
>   Inserted "en_cpc:cpc2" at right place,
>   not to broke into the settings for DDR

Appended cpc2 to the subject.

Applied to u-boot-mpc85xx, awaiting upstream.

York


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


Re: [U-Boot] [PATCH] powerpc/8xxx: Fix in USB device-tree fixup

2014-09-25 Thread York Sun
On 08/21/2014 10:26 PM, Ramneek Mehresh wrote:
>  Fix following issues in USB device-tree fixup:
> - returns when either dr_mode or phy_type not defined.
>   This was terminating fix-up when only either property
>   was defined in hwconfig string
> - updates dr_mode_type or dr_phy_type with junk value when
>   their index is -1. Now these are updated only when their
>   respective index is pointing to relevant types
>   in modes[] and phys[] array
> - dr_mode_type and dr_phy_type were not NULL for
>   each controller
> 
> Signed-off-by: Ramneek Mehresh 
> ---

Applied to u-boot-mpc85xx, awaiting upstream.

York


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


Re: [U-Boot] [PATCH v4] powerpc/t104xrdb: Add T1042RDB board support

2014-09-25 Thread York Sun
On 08/19/2014 12:16 AM, Vijay Rai wrote:
> T1042RDB is a Freescale reference board that hosts the T1042 SoC
> (and variants). The board is similar to T1040RDB, T1042 is a reduced
> personality of T1040 SoC without Integrated 8-port Gigabit(L2 Switch).
> 
> T1042RDB is configured with serdes protocol 0x86 which can support
> following interfaces
> - 2 RGMII's on DTSEC4, DTSEC5
> - 1 SGMII on DTSEC3
> DTSEC1, DTSEC2 are not connected on board.
> 
> This Patch
> - add T1042RDB support
> - updates README file for T1042RDB details and update commands for switching
>   to alternate banks from vBank0 to vBank4 and vice versa
> 
> This patch also does minor clean ups for fdt defines for T1042RDB and
> T1042RDB_PI board
> 
> Signed-off-by: Vijay Rai 
> Signed-off-by: Priyanka Jain 
> ---
> changes for v4: There are some changes regarding Kconfig, 
> Added configs/T1042RDB_defconfig file to support T1042RDB,added T1042RDB as
> config option into board/freescale/t104xrdb/MAINTAINERS  
>

Applied to u-boot-mpc85xx, awaiting upstream.

York

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


Re: [U-Boot] [PATCH v2] powerpc/t104xrdb: Add Support of rcw for T1042RDB in u-boot

2014-09-25 Thread York Sun
On 07/23/2014 05:55 AM, Vijay Rai wrote:
> This patch adds support of rcw for T1042RDB, it makes following changes :
> - Adds t1042_rcw.cfg file for serdes protocol 0x86 for T1042RDB
> - Renames t1042_pi_rcw.cfg file from t1042_rcw.cfg and also updates
>   comments for valid serdes protocol which is 0x06
> - Also updates CONFIG_SYS_FSL_PBL_RCW for T1042RDB
> 
> Signed-off-by: Vijay Rai 
> Signed-off-by: Priyanka Jain 
> ---

Applied to u-boot-mpc85xx master, awaiting upstream.

York


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


[U-Boot] Please pull u-boot-mpc85xx

2014-09-25 Thread York Sun
Tom,

The following changes since commit 47d3debe1ab8315dc9ade22279e02f60eceda25b:

  Merge git://git.denx.de/u-boot-dm (2014-09-23 15:21:43 -0400)

are available in the git repository at:


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

for you to fetch changes up to 039b77396abb0ed78af34dadbd0786dfaf0e6aa9:

  powerpc: add --bss-plt to LDFLAGS (2014-09-25 09:22:37 -0700)


Chris Packham (1):
  powerpc: add --bss-plt to LDFLAGS

Ebony Zhu (1):
  powerpc/mpc85xx: Serdes protocol "00" is supported

Priyanka Jain (2):
  powerpc/t104xrdb: Set DDR ODT to 75ohm
  board/t1040qds: Add sgmii ports support in 0xA7 protocol

Shaveta Leekha (2):
  powerpc/b4860: Updated default hwconfig to enable only cpc2
  B4860QDS: Enable mac command support

ramneek mehresh (1):
  powerpc/8xxx: Fix in USB device-tree fixup

vijay rai (2):
  powerpc/t104xrdb: Add Support of rcw for T1042RDB in u-boot
  powerpc/t104xrdb: Add T1042RDB board support

 arch/powerpc/config.mk |1 +
 arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c |5 -
 arch/powerpc/cpu/mpc8xxx/fdt.c |   20 +---
 board/freescale/t1040qds/eth.c |4 
 board/freescale/t104xrdb/MAINTAINERS   |1 +
 board/freescale/t104xrdb/README|   23 ++-
 board/freescale/t104xrdb/ddr.c |4 ++--
 board/freescale/t104xrdb/eth.c |   10 ++
 board/freescale/t104xrdb/t1042_pi_rcw.cfg  |7 +++
 board/freescale/t104xrdb/t1042_rcw.cfg |8 
 configs/T1042RDB_defconfig |4 
 drivers/net/fm/t1040.c |2 --
 include/configs/B4860QDS.h |   12 ++--
 include/configs/T104xRDB.h |   20 
 14 files changed, 82 insertions(+), 39 deletions(-)
 create mode 100644 board/freescale/t104xrdb/t1042_pi_rcw.cfg
 create mode 100644 configs/T1042RDB_defconfig

Thanks,

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


[U-Boot] [Patch v4, 2/2] board/ls1021aqds: Add DDR4 support

2014-09-25 Thread York Sun
LS1021AQDS has a variant with DDR4 slot. This patch adds a new defconfig
for this variant to enable DDR4 support. RAW timing parameters are not
added for DDR4. The board timing parameters are only tuned for single-
rank 1600 and 1800MT/s with Micron DIMM 9ASF51272AZ-2G1A1 due to DIMM
availability.

Signed-off-by: York Sun 
CC: Alison Wang 
---
Change log
 v4: Update maintainer file with defconfig.
 v3: Fix commit message, drop name of ls1021aqds_d4.
 v2: Drop the name of TARGET_LS1021AQDS_D4 in Kconfig.

 arch/arm/include/asm/arch-ls102xa/config.h |5 +
 board/freescale/ls1021aqds/MAINTAINERS |1 +
 board/freescale/ls1021aqds/ddr.c   |9 -
 board/freescale/ls1021aqds/ddr.h   |   10 ++
 configs/ls1021aqds_ddr4_nor_defconfig  |3 +++
 include/configs/ls1021aqds.h   |4 +++-
 6 files changed, 30 insertions(+), 2 deletions(-)
 create mode 100644 configs/ls1021aqds_ddr4_nor_defconfig

diff --git a/arch/arm/include/asm/arch-ls102xa/config.h 
b/arch/arm/include/asm/arch-ls102xa/config.h
index ed78c33..a500b5b 100644
--- a/arch/arm/include/asm/arch-ls102xa/config.h
+++ b/arch/arm/include/asm/arch-ls102xa/config.h
@@ -50,7 +50,11 @@
 #ifdef CONFIG_DDR_SPD
 #define CONFIG_SYS_FSL_DDR_BE
 #define CONFIG_VERY_BIG_RAM
+#ifdef CONFIG_SYS_FSL_DDR4
+#define CONFIG_SYS_FSL_DDRC_GEN4
+#else
 #define CONFIG_SYS_FSL_DDRC_ARM_GEN3
+#endif
 #define CONFIG_SYS_FSL_DDR
 #define CONFIG_SYS_LS1_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
 #define CONFIG_MAX_MEM_MAPPED  CONFIG_SYS_LS1_DDR_BLOCK1_SIZE
@@ -71,6 +75,7 @@
 #define CONFIG_MAX_CPUS2
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT  8
 #define CONFIG_NUM_DDR_CONTROLLERS 1
+#define CONFIG_SYS_FSL_DDR_VER FSL_DDR_VER_5_0
 #else
 #error SoC not defined
 #endif
diff --git a/board/freescale/ls1021aqds/MAINTAINERS 
b/board/freescale/ls1021aqds/MAINTAINERS
index 021d82b..ccf4513 100644
--- a/board/freescale/ls1021aqds/MAINTAINERS
+++ b/board/freescale/ls1021aqds/MAINTAINERS
@@ -4,3 +4,4 @@ S:  Maintained
 F: board/freescale/ls1021aqds/
 F: include/configs/ls1021aqds.h
 F: configs/ls1021aqds_nor_defconfig
+F: configs/ls1021aqds_ddr4_nor_defconfig
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index 679c654..5898e33 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -79,7 +79,6 @@ found:
 */
popts->wrlvl_override = 1;
popts->wrlvl_sample = 0xf;
-   popts->cswl_override = DDR_CSWL_CS0;
 
/*
 * Rtt and Rtt_WR override
@@ -89,9 +88,17 @@ found:
/* Enable ZQ calibration */
popts->zq_en = 1;
 
+#ifdef CONFIG_SYS_FSL_DDR4
+   popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
+   popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
+ DDR_CDR2_VREF_OVRD(70);   /* Vref = 70% */
+#else
+   popts->cswl_override = DDR_CSWL_CS0;
+
/* DHC_EN =1, ODT = 75 Ohm */
popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+#endif
 }
 
 #ifdef CONFIG_SYS_DDR_RAW_TIMING
diff --git a/board/freescale/ls1021aqds/ddr.h b/board/freescale/ls1021aqds/ddr.h
index 16d87cb..f819c99 100644
--- a/board/freescale/ls1021aqds/ddr.h
+++ b/board/freescale/ls1021aqds/ddr.h
@@ -30,6 +30,13 @@ static const struct board_specific_parameters udimm0[] = {
 *   num|  hi| rank|  clk| wrlvl |   wrlvl   |  wrlvl | cpo  |wrdata|2T
 * ranks| mhz| GB  |adjst| start |   ctl2|  ctl3  |  |delay |
 */
+#ifdef CONFIG_SYS_FSL_DDR4
+   {2,  1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A,},
+   {2,  1900, 0, 4, 6, 0x08080A0C, 0x0D0E0F0A,},
+   {1,  1666, 0, 4, 8, 0x090A0B0B, 0x0C0D0E0C,},
+   {1,  1900, 0, 4, 9, 0x0A0B0C0B, 0x0D0E0F0D,},
+   {1,  2200, 0, 4,10, 0x0B0C0D0C, 0x0E0F110E,},
+#elif defined(CONFIG_SYS_FSL_DDR3)
{1,  833,  1, 6, 8, 0x06060607, 0x08080807,   0x1f,2,  0},
{1,  1350, 1, 6, 8, 0x0708080A, 0x0A0B0C09,   0x1f,2,  0},
{1,  833,  2, 6, 8, 0x06060607, 0x08080807,   0x1f,2,  0},
@@ -39,6 +46,9 @@ static const struct board_specific_parameters udimm0[] = {
{2,  1350, 0, 6, 8, 0x0708080A, 0x0A0B0C09,   0x1f,2,  0},
{2,  1666, 4, 4,   0xa, 0x0B08090C, 0x0B0E0D0A,   0x1f,2,  0},
{2,  1666, 0, 4,   0xa, 0x0B08090C, 0x0B0E0D0A,   0x1f,2,  0},
+#else
+#error DDR type not defined
+#endif
{}
 };
 
diff --git a/configs/ls1021aqds_ddr4_nor_defconfig 
b/configs/ls1021aqds_ddr4_nor_defconfig
new file mode 100644
index 000..3c57481
--- /dev/null
+++ b/configs/ls1021aqds_ddr4_nor_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021AQDS=y
diff --git a/include/configs/ls1021aqds.h b/include/config

[U-Boot] [PATCH] cmd_mmc: fix bootpart-resize maxarg to 4

2014-09-25 Thread Wally Yeh
sub-command 'bootpart-resize' check for argc == 4,
it will retrun CMD_RET_FAILURE when argc value not matched.

but bootpart-resize's maxarg is 3, which means you never execute
this sub-command successfully.

fix it by change bootpart-resize maxarg to 4.

Signed-off-by: wally.yeh 
Cc: Wolfgang Denk 
Cc: Pierre Aubert 
---
 common/cmd_mmc.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 1e40983..4286e26 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -602,7 +602,7 @@ static cmd_tbl_t cmd_mmc[] = {
  U_BOOT_CMD_MKENT(list, 1, 1, do_mmc_list, "", ""),
 #ifdef CONFIG_SUPPORT_EMMC_BOOT
  U_BOOT_CMD_MKENT(bootbus, 5, 0, do_mmc_bootbus, "", ""),
- U_BOOT_CMD_MKENT(bootpart-resize, 3, 0, do_mmc_boot_resize, "", ""),
+ U_BOOT_CMD_MKENT(bootpart-resize, 4, 0, do_mmc_boot_resize, "", ""),
  U_BOOT_CMD_MKENT(partconf, 5, 0, do_mmc_partconf, "", ""),
  U_BOOT_CMD_MKENT(rst-function, 3, 0, do_mmc_rst_func, "", ""),
 #endif
-- 
1.7.10.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [Patch v3, 2/2] board/ls1021aqds: Add DDR4 support

2014-09-25 Thread York Sun
LS1021AQDS has a variant with DDR4 slot. This patch adds a new defconfig
for this variant to enable DDR4 support. RAW timing parameters are not
added for DDR4. The board timing parameters are only tuned for single-
rank 1600 and 1800MT/s with Micron DIMM 9ASF51272AZ-2G1A1 due to DIMM
availability.

Signed-off-by: York Sun 
---
Chagne log
 v3: Fix commit message, drop name of ls1021aqds_d4.
 v2: Drop the name of TARGET_LS1021AQDS_D4 in Kconfig.

 arch/arm/include/asm/arch-ls102xa/config.h |5 +
 board/freescale/ls1021aqds/ddr.c   |9 -
 board/freescale/ls1021aqds/ddr.h   |   10 ++
 configs/ls1021aqds_ddr4_nor_defconfig  |3 +++
 include/configs/ls1021aqds.h   |4 +++-
 5 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 configs/ls1021aqds_ddr4_nor_defconfig

diff --git a/arch/arm/include/asm/arch-ls102xa/config.h 
b/arch/arm/include/asm/arch-ls102xa/config.h
index ed78c33..a500b5b 100644
--- a/arch/arm/include/asm/arch-ls102xa/config.h
+++ b/arch/arm/include/asm/arch-ls102xa/config.h
@@ -50,7 +50,11 @@
 #ifdef CONFIG_DDR_SPD
 #define CONFIG_SYS_FSL_DDR_BE
 #define CONFIG_VERY_BIG_RAM
+#ifdef CONFIG_SYS_FSL_DDR4
+#define CONFIG_SYS_FSL_DDRC_GEN4
+#else
 #define CONFIG_SYS_FSL_DDRC_ARM_GEN3
+#endif
 #define CONFIG_SYS_FSL_DDR
 #define CONFIG_SYS_LS1_DDR_BLOCK1_SIZE ((phys_size_t)2 << 30)
 #define CONFIG_MAX_MEM_MAPPED  CONFIG_SYS_LS1_DDR_BLOCK1_SIZE
@@ -71,6 +75,7 @@
 #define CONFIG_MAX_CPUS2
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT  8
 #define CONFIG_NUM_DDR_CONTROLLERS 1
+#define CONFIG_SYS_FSL_DDR_VER FSL_DDR_VER_5_0
 #else
 #error SoC not defined
 #endif
diff --git a/board/freescale/ls1021aqds/ddr.c b/board/freescale/ls1021aqds/ddr.c
index 679c654..5898e33 100644
--- a/board/freescale/ls1021aqds/ddr.c
+++ b/board/freescale/ls1021aqds/ddr.c
@@ -79,7 +79,6 @@ found:
 */
popts->wrlvl_override = 1;
popts->wrlvl_sample = 0xf;
-   popts->cswl_override = DDR_CSWL_CS0;
 
/*
 * Rtt and Rtt_WR override
@@ -89,9 +88,17 @@ found:
/* Enable ZQ calibration */
popts->zq_en = 1;
 
+#ifdef CONFIG_SYS_FSL_DDR4
+   popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
+   popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
+ DDR_CDR2_VREF_OVRD(70);   /* Vref = 70% */
+#else
+   popts->cswl_override = DDR_CSWL_CS0;
+
/* DHC_EN =1, ODT = 75 Ohm */
popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR1_ODT(DDR_CDR_ODT_75ohm);
popts->ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_75ohm);
+#endif
 }
 
 #ifdef CONFIG_SYS_DDR_RAW_TIMING
diff --git a/board/freescale/ls1021aqds/ddr.h b/board/freescale/ls1021aqds/ddr.h
index 16d87cb..f819c99 100644
--- a/board/freescale/ls1021aqds/ddr.h
+++ b/board/freescale/ls1021aqds/ddr.h
@@ -30,6 +30,13 @@ static const struct board_specific_parameters udimm0[] = {
 *   num|  hi| rank|  clk| wrlvl |   wrlvl   |  wrlvl | cpo  |wrdata|2T
 * ranks| mhz| GB  |adjst| start |   ctl2|  ctl3  |  |delay |
 */
+#ifdef CONFIG_SYS_FSL_DDR4
+   {2,  1666, 0, 4, 7, 0x0808090B, 0x0C0D0E0A,},
+   {2,  1900, 0, 4, 6, 0x08080A0C, 0x0D0E0F0A,},
+   {1,  1666, 0, 4, 8, 0x090A0B0B, 0x0C0D0E0C,},
+   {1,  1900, 0, 4, 9, 0x0A0B0C0B, 0x0D0E0F0D,},
+   {1,  2200, 0, 4,10, 0x0B0C0D0C, 0x0E0F110E,},
+#elif defined(CONFIG_SYS_FSL_DDR3)
{1,  833,  1, 6, 8, 0x06060607, 0x08080807,   0x1f,2,  0},
{1,  1350, 1, 6, 8, 0x0708080A, 0x0A0B0C09,   0x1f,2,  0},
{1,  833,  2, 6, 8, 0x06060607, 0x08080807,   0x1f,2,  0},
@@ -39,6 +46,9 @@ static const struct board_specific_parameters udimm0[] = {
{2,  1350, 0, 6, 8, 0x0708080A, 0x0A0B0C09,   0x1f,2,  0},
{2,  1666, 4, 4,   0xa, 0x0B08090C, 0x0B0E0D0A,   0x1f,2,  0},
{2,  1666, 0, 4,   0xa, 0x0B08090C, 0x0B0E0D0A,   0x1f,2,  0},
+#else
+#error DDR type not defined
+#endif
{}
 };
 
diff --git a/configs/ls1021aqds_ddr4_nor_defconfig 
b/configs/ls1021aqds_ddr4_nor_defconfig
new file mode 100644
index 000..3c57481
--- /dev/null
+++ b/configs/ls1021aqds_ddr4_nor_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021AQDS=y
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 657e3b6..bb47813 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -49,10 +49,12 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_DDR_SPD
 #define SPD_EEPROM_ADDRESS 0x51
 #define CONFIG_SYS_SPD_BUS_NUM 0
-#define CONFIG_SYS_DDR_RAW_TIMING
 
 #define CONFIG_FSL_DDR_INTERACTIVE /* Interactive debugging */
+#ifndef CONFIG_SYS_FSL_DDR4
 #define CONFIG_SYS_FSL_DDR3/* Use DDR3 memory */
+#define CONFIG_SYS_DDR_RAW_TIMING
+#endif

[U-Boot] [PATCH 3/3][v2] ls102x: Add support for secure boot and enable blob command

2014-09-25 Thread Ruchika Gupta
Signed-off-by: Ruchika Gupta 
---
Changes from v1:
Command MACRO corrected

 configs/ls1021aqds_nor_SECURE_BOOT_defconfig | 3 +++
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig | 3 +++
 include/configs/ls1021aqds.h | 4 
 include/configs/ls1021atwr.h | 4 
 4 files changed, 14 insertions(+)
 create mode 100644 configs/ls1021aqds_nor_SECURE_BOOT_defconfig
 create mode 100644 configs/ls1021atwr_nor_SECURE_BOOT_defconfig

diff --git a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig 
b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
new file mode 100644
index 000..2b47995
--- /dev/null
+++ b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021AQDS=y
diff --git a/configs/ls1021atwr_nor_SECURE_BOOT_defconfig 
b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
new file mode 100644
index 000..eeeb0d5
--- /dev/null
+++ b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021ATWR=y
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index df2fc09..1da5523 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -392,4 +392,8 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_CMD_HASH
 #define CONFIG_SHA_HW_ACCEL
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 7199c92..2ece663 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -294,4 +294,8 @@
 #define CONFIG_CMD_HASH
 #define CONFIG_SHA_HW_ACCEL
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif
-- 
1.8.1.4

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


[U-Boot] [PATCH 2/3][v2] mpc85xx: configs - Enable blob command in freescale platforms

2014-09-25 Thread Ruchika Gupta
Enable blob commands for platforms having SEC 4.0 or greater
for secure boot scenarios

Signed-off-by: Ruchika Gupta 
CC: York Sun 
---
Changes from v1:
Added command in corenet_ds.h

 include/configs/B4860QDS.h   | 4 
 include/configs/BSC9132QDS.h | 4 
 include/configs/P1010RDB.h   | 4 
 include/configs/P2041RDB.h   | 4 
 include/configs/T1040QDS.h   | 1 +
 include/configs/T104xRDB.h   | 1 +
 include/configs/T208xQDS.h   | 1 +
 include/configs/T208xRDB.h   | 1 +
 include/configs/T4240QDS.h   | 4 
 include/configs/T4240RDB.h   | 1 +
 include/configs/corenet_ds.h | 4 
 11 files changed, 29 insertions(+)

diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 58932ad..9217f37 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -909,4 +909,8 @@ unsigned long get_board_ddr_clk(void);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 922ac00..32fc099 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -708,4 +708,8 @@ combinations. this should be removed later
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 45ef53d..54365a2 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -960,4 +960,8 @@ extern unsigned long get_sdram_size(void);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 7ff2dd5..0b12cf5 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -747,4 +747,8 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index 5870a49..bbe54bf 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -822,6 +822,7 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#define CONFIG_CMD_BLOB
 #endif
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 8e43931..bcfa410 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -864,6 +864,7 @@
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#define CONFIG_CMD_BLOB
 #endif
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 9a8a3b6..70ce540 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -913,6 +913,7 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#include CONFIG_CMD_BLOB
 #undef CONFIG_CMD_USB
 #endif
 
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 4ff31e6..8d4b02f 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -872,6 +872,7 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#define CONFIG_CMD_BLOB
 #undef CONFIG_CMD_USB
 #endif
 
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index d2faf94..e3bbfeb 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -629,4 +629,8 @@ unsigned long get_board_ddr_clk(void);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index b3fbbe3..82e5efd 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -755,6 +755,7 @@ unsigned long get_board_ddr_clk(void);
  * which is anyways not used in Secure Environment.
  */
 #undef CONFIG_CMD_USB
+#define CONFIG_CMD_BLOB
 #endif
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index 4fd290e..b0c8277 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -749,4 +749,8 @@
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
-- 
1.8.1.4

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


[U-Boot] [PATCH 1/3][v2] crypto/fsl: Add command for encapsulating/decapsulating blobs

2014-09-25 Thread Ruchika Gupta
Freescale's SEC block has built-in Blob Protocol which provides
a method for protecting user-defined data across system power
cycles. SEC block protects data in a data structure called a Blob,
which provides both confidentiality and integrity protection.

Encapsulating data as a blob
Each time that the Blob Protocol is used to protect data, a
different randomly generated key is used to encrypt the data.
This random key is itself encrypted using a key which is derived
from SoC's non volatile secret key and a 16 bit Key identifier.
The resulting encrypted key along with encrypted data is called a blob.
The non volatile secure key is available for use only during secure boot.

During decapsulation, the reverse process is performed to get back
the original data.

Commands added
--
blob enc - encapsulating data as a cryptgraphic blob
blob dec - decapsulating cryptgraphic blob to get the data

Commands Syntax
---
blob enc src dst len km

Encapsulate and create blob of data $len bytes long
at address $src and store the result at address $dst.
$km is the 16 byte key modifier is also required for
generation/use as key for cryptographic operation. Key
modifier should be 16 byte long.

blob dec src dst len km

Decapsulate the  blob of data at address $src and
store result of $len byte at addr $dst.
$km is the 16 byte key modifier is also required for
generation/use as key for cryptographic operation. Key
modifier should be 16 byte long.

Signed-off-by: Ruchika Gupta 
CC: York Sun 
---
Changes from v1:
Removed inclusion of command from corenet_ds.h from this patch.
Command is added in the config files as part of next patch in this series

 common/Makefile   |   2 +
 common/cmd_blob.c | 109 
 drivers/crypto/fsl/Makefile   |   1 +
 drivers/crypto/fsl/fsl_blob.c |  61 
 drivers/crypto/fsl/jobdesc.c  |  80 ++
 drivers/crypto/fsl/jobdesc.h  |  11 
 drivers/crypto/fsl/jr.c   | 127 +-
 include/fsl_sec.h |  34 ++-
 8 files changed, 423 insertions(+), 2 deletions(-)
 create mode 100644 common/cmd_blob.c
 create mode 100644 drivers/crypto/fsl/fsl_blob.c

diff --git a/common/Makefile b/common/Makefile
index aca0f7f..2c07636 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -264,4 +264,6 @@ obj-$(CONFIG_IO_TRACE) += iotrace.o
 obj-y += memsize.o
 obj-y += stdio.o
 
+obj-$(CONFIG_CMD_BLOB) += cmd_blob.o
+
 CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 
2>/dev/null)
diff --git a/common/cmd_blob.c b/common/cmd_blob.c
new file mode 100644
index 000..82ecaf0
--- /dev/null
+++ b/common/cmd_blob.c
@@ -0,0 +1,109 @@
+/*
+ *
+ * Command for encapsulating/decapsulating blob of memory.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/**
+ * blob_decap() - Decapsulate the data as a blob
+ * @key_mod:   - Pointer to key modifier/key
+ * @src:   - Address of data to be decapsulated
+ * @dst:   - Address of data to be decapsulated
+ * @len:   - Size of data to be decapsulated
+ *
+ * Returns zero on success,and negative on error.
+ */
+__weak int blob_decap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
+{
+   return 0;
+}
+
+/**
+ * blob_encap() - Encapsulate the data as a blob
+ * @key_mod:   - Pointer to key modifier/key
+ * @src:   - Address of data to be encapsulated
+ * @dst:   - Address of data to be encapsulated
+ * @len:   - Size of data to be encapsulated
+ *
+ * Returns zero on success,and negative on error.
+ */
+__weak int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
+{
+   return 0;
+}
+
+/**
+ * do_blob() - Handle the "blob" command-line command
+ * @cmdtp: Command data struct pointer
+ * @flag:  Command flag
+ * @argc:  Command-line argument count
+ * @argv:  Array of command-line arguments
+ *
+ * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
+ * on error.
+ */
+static int do_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+   uint32_t key_addr, src_addr, dst_addr, len;
+   uint8_t *km_ptr, *src_ptr, *dst_ptr;
+   int enc, ret = 0;
+
+   if (argc != 6)
+   return CMD_RET_USAGE;
+
+   if (!strncmp(argv[1], "enc", 3))
+   enc = 1;
+   else if (!strncmp(argv[1], "dec", 3))
+   enc = 0;
+   else
+   return CMD_RET_USAGE;
+
+   src_addr = simple_strtoul(argv[2], NULL, 16);
+   dst_addr = simple_strtoul(argv[3], NULL, 16);
+   len = simple_strtoul(argv[4], NULL, 16);
+   key_addr = simple_strtoul(argv[5], NULL, 16);
+
+   km_ptr = (uint8_t *)key_addr;
+   src_ptr = (uint8_t *)src_addr;
+   dst_ptr = (uint8_t *)dst_addr;

[U-Boot] [PATCH 3/3][v2] ls102x: Add support for secure boot and enable blob command

2014-09-25 Thread Ruchika Gupta
Signed-off-by: Ruchika Gupta 
CC: York Sun 
---
Changes from v1:
No changes

 configs/ls1021aqds_nor_SECURE_BOOT_defconfig | 3 +++
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig | 3 +++
 include/configs/ls1021aqds.h | 4 
 include/configs/ls1021atwr.h | 4 
 4 files changed, 14 insertions(+)
 create mode 100644 configs/ls1021aqds_nor_SECURE_BOOT_defconfig
 create mode 100644 configs/ls1021atwr_nor_SECURE_BOOT_defconfig

diff --git a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig 
b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
new file mode 100644
index 000..2b47995
--- /dev/null
+++ b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021AQDS=y
diff --git a/configs/ls1021atwr_nor_SECURE_BOOT_defconfig 
b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
new file mode 100644
index 000..eeeb0d5
--- /dev/null
+++ b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021ATWR=y
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index df2fc09..1da5523 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -392,4 +392,8 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_CMD_HASH
 #define CONFIG_SHA_HW_ACCEL
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_FSL_BLOB
+#endif
+
 #endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 7199c92..2ece663 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -294,4 +294,8 @@
 #define CONFIG_CMD_HASH
 #define CONFIG_SHA_HW_ACCEL
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_FSL_BLOB
+#endif
+
 #endif
-- 
1.8.1.4

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


Re: [U-Boot] [PATCH] powerpc/mpc85xx: SECURE BOOT - Bypass PAMU in case of secure boot

2014-09-25 Thread York Sun
On 09/17/2014 03:35 AM, Ruchika Gupta wrote:
> By default, PAMU's (IOMMU) are enabled in case of secure boot.
> Disable/bypass them , once the control reached the bootloader.
> 
> For non-secure boot, PAMU's are already bypassed in the default
> SoC configuration
> 
> Signed-off-by: Ruchika Gupta 
> CC: York Sun 
> ---
>  arch/powerpc/cpu/mpc85xx/cpu_init.c   | 6 +-
>  arch/powerpc/include/asm/immap_85xx.h | 1 +
>  2 files changed, 6 insertions(+), 1 deletion(-)

Ruchika,

This patch broken these boards

BSC9132QDS_SDCARD_DDRCLK133_SECURE BSC9132QDS_SDCARD_DDRCLK100_SECURE
BSC9132QDS_NAND_DDRCLK133_SECURE P1010RDB-PA_36BIT_SPIFLASH_SECBOOT
P1010RDB-PA_SPIFLASH_SECBOOT P1010RDB-PB_36BIT_NOR_SECBOOT
BSC9132QDS_NOR_DDRCLK100_SECURE P1010RDB-PB_NAND_SECBOOT
BSC9132QDS_SPIFLASH_DDRCLK100_SECURE P1010RDB-PA_36BIT_NOR_SECBOOT
P1010RDB-PB_36BIT_NAND_SECBOOT BSC9132QDS_NAND_DDRCLK100_SECURE
P1010RDB-PB_NOR_SECBOOT BSC9132QDS_NOR_DDRCLK133_SECURE P1010RDB-PA_NAND_SECBOOT
BSC9132QDS_SPIFLASH_DDRCLK133_SECURE P1010RDB-PA_NOR_SECBOOT
P1010RDB-PA_36BIT_NAND_SECBOOT

Please check.

York

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


Re: [U-Boot] [PATCH 1/2] fsl_sec : Add hardware accelerated SHA256 and SHA1

2014-09-25 Thread York Sun
On 09/10/2014 08:58 PM, Ruchika Gupta wrote:
> SHA-256 and SHA-1 accelerated using SEC hardware in Freescale SoC's
> The driver for SEC (CAAM) IP is based on linux drivers/crypto/caam.
> 
> Signed-off-by: Ruchika Gupta 
> CC: York Sun 
> ---
> The patch series is dependent on
> https://patchwork.ozlabs.org/patch/387174/
> https://patchwork.ozlabs.org/patch/387175/

Ruchika,

This patch increases the image size and causes a problem for these boards,
kmcoge4 kmlion1 P1010RDB-PB_36BIT_SPIFLASH_SECBOOT

Please check.

York

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


Re: [U-Boot] [PATCH 2/2] mpc85xx: configs - Add hash command in freescale platforms

2014-09-25 Thread York Sun
On 09/10/2014 08:58 PM, Ruchika Gupta wrote:
> Hardware accelerated support for SHA-1 and SHA-256 has been added.
> Hash command enabled along with hardware accelerated support for
> SHA-1 and SHA-256 for platforms which have CAAM block.
> 
> Signed-off-by: Ruchika Gupta 
> CC: York Sun 
> ---
> The patch series is dependent on
> https://patchwork.ozlabs.org/patch/387174/
> https://patchwork.ozlabs.org/patch/387175/

Ruchika,

This patch further increases the size of image. This board failed to compile

P1010RDB-PB_SPIFLASH_SECBOOT

York

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


[U-Boot] [PATCH 2/3] mpc85xx: configs - Enable blob command in freescale platforms

2014-09-25 Thread Ruchika Gupta
Enable blob commands for platforms having SEC 4.0 or greater
for secure boot scenarios

Signed-off-by: Ruchika Gupta 
CC: York Sun 
---
 include/configs/B4860QDS.h   | 4 
 include/configs/BSC9132QDS.h | 4 
 include/configs/P1010RDB.h   | 4 
 include/configs/P2041RDB.h   | 4 
 include/configs/T1040QDS.h   | 1 +
 include/configs/T104xRDB.h   | 1 +
 include/configs/T208xQDS.h   | 1 +
 include/configs/T208xRDB.h   | 1 +
 include/configs/T4240QDS.h   | 4 
 include/configs/T4240RDB.h   | 1 +
 include/configs/corenet_ds.h | 3 +++
 11 files changed, 28 insertions(+)

diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 58932ad..9217f37 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -909,4 +909,8 @@ unsigned long get_board_ddr_clk(void);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/BSC9132QDS.h b/include/configs/BSC9132QDS.h
index 922ac00..32fc099 100644
--- a/include/configs/BSC9132QDS.h
+++ b/include/configs/BSC9132QDS.h
@@ -708,4 +708,8 @@ combinations. this should be removed later
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 45ef53d..54365a2 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -960,4 +960,8 @@ extern unsigned long get_sdram_size(void);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 7ff2dd5..0b12cf5 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -747,4 +747,8 @@ unsigned long get_board_sys_clk(unsigned long dummy);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index 5870a49..bbe54bf 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -822,6 +822,7 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#define CONFIG_CMD_BLOB
 #endif
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 8e43931..bcfa410 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -864,6 +864,7 @@
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#define CONFIG_CMD_BLOB
 #endif
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 9a8a3b6..70ce540 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -913,6 +913,7 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#include CONFIG_CMD_BLOB
 #undef CONFIG_CMD_USB
 #endif
 
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 4ff31e6..8d4b02f 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -872,6 +872,7 @@ unsigned long get_board_ddr_clk(void);
 
 #ifdef CONFIG_SECURE_BOOT
 #include 
+#define CONFIG_CMD_BLOB
 #undef CONFIG_CMD_USB
 #endif
 
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index d2faf94..e3bbfeb 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -629,4 +629,8 @@ unsigned long get_board_ddr_clk(void);
 
 #include 
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_BLOB
+#endif
+
 #endif /* __CONFIG_H */
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index b3fbbe3..82e5efd 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -755,6 +755,7 @@ unsigned long get_board_ddr_clk(void);
  * which is anyways not used in Secure Environment.
  */
 #undef CONFIG_CMD_USB
+#define CONFIG_CMD_BLOB
 #endif
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index aff0f9c..b0c8277 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -748,6 +748,9 @@
 #define CONFIG_BOOTCOMMAND CONFIG_HDBOOT
 
 #include 
+
+#ifdef CONFIG_SECURE_BOOT
 #define CONFIG_CMD_BLOB
+#endif
 
 #endif /* __CONFIG_H */
-- 
1.8.1.4

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


[U-Boot] [PATCH 3/3] ls102x: Add support for secure boot and enable blob command

2014-09-25 Thread Ruchika Gupta
Signed-off-by: Ruchika Gupta 
CC: York Sun 
---
 configs/ls1021aqds_nor_SECURE_BOOT_defconfig | 3 +++
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig | 3 +++
 include/configs/ls1021aqds.h | 4 
 include/configs/ls1021atwr.h | 4 
 4 files changed, 14 insertions(+)
 create mode 100644 configs/ls1021aqds_nor_SECURE_BOOT_defconfig
 create mode 100644 configs/ls1021atwr_nor_SECURE_BOOT_defconfig

diff --git a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig 
b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
new file mode 100644
index 000..2b47995
--- /dev/null
+++ b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021AQDS=y
diff --git a/configs/ls1021atwr_nor_SECURE_BOOT_defconfig 
b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
new file mode 100644
index 000..eeeb0d5
--- /dev/null
+++ b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
@@ -0,0 +1,3 @@
+CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
+CONFIG_ARM=y
+CONFIG_TARGET_LS1021ATWR=y
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index df2fc09..1da5523 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -392,4 +392,8 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_CMD_HASH
 #define CONFIG_SHA_HW_ACCEL
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_FSL_BLOB
+#endif
+
 #endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 7199c92..2ece663 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -294,4 +294,8 @@
 #define CONFIG_CMD_HASH
 #define CONFIG_SHA_HW_ACCEL
 
+#ifdef CONFIG_SECURE_BOOT
+#define CONFIG_CMD_FSL_BLOB
+#endif
+
 #endif
-- 
1.8.1.4

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


[U-Boot] [PATCH 1/3] crypto/fsl: Add command for encapsulating/decapsulating blobs

2014-09-25 Thread Ruchika Gupta
Freescale's SEC block has built-in Blob Protocol which provides
a method for protecting user-defined data across system power
cycles. SEC block protects data in a data structure called a Blob,
which provides both confidentiality and integrity protection.

Encapsulating data as a blob
Each time that the Blob Protocol is used to protect data, a
different randomly generated key is used to encrypt the data.
This random key is itself encrypted using a key which is derived
from SoC's non volatile secret key and a 16 bit Key identifier.
The resulting encrypted key along with encrypted data is called a blob.
The non volatile secure key is available for use only during secure boot.

During decapsulation, the reverse process is performed to get back
the original data.

Commands added
--
blob enc - encapsulating data as a cryptgraphic blob
blob dec - decapsulating cryptgraphic blob to get the data

Commands Syntax
---
blob enc src dst len km

Encapsulate and create blob of data $len bytes long
at address $src and store the result at address $dst.
$km is the 16 byte key modifier is also required for
generation/use as key for cryptographic operation. Key
modifier should be 16 byte long.

blob dec src dst len km

Decapsulate the  blob of data at address $src and
store result of $len byte at addr $dst.
$km is the 16 byte key modifier is also required for
generation/use as key for cryptographic operation. Key
modifier should be 16 byte long.

Signed-off-by: Ruchika Gupta 
CC: York Sun 
---
 common/Makefile   |   2 +
 common/cmd_blob.c | 110 
 drivers/crypto/fsl/Makefile   |   1 +
 drivers/crypto/fsl/fsl_blob.c |  61 
 drivers/crypto/fsl/jobdesc.c  |  80 ++
 drivers/crypto/fsl/jobdesc.h  |  11 
 drivers/crypto/fsl/jr.c   | 127 +-
 include/configs/corenet_ds.h  |   1 +
 include/fsl_sec.h |  34 ++-
 9 files changed, 425 insertions(+), 2 deletions(-)
 create mode 100644 common/cmd_blob.c
 create mode 100644 drivers/crypto/fsl/fsl_blob.c

diff --git a/common/Makefile b/common/Makefile
index aca0f7f..2c07636 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -264,4 +264,6 @@ obj-$(CONFIG_IO_TRACE) += iotrace.o
 obj-y += memsize.o
 obj-y += stdio.o
 
+obj-$(CONFIG_CMD_BLOB) += cmd_blob.o
+
 CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 
2>/dev/null)
diff --git a/common/cmd_blob.c b/common/cmd_blob.c
new file mode 100644
index 000..26a28d9
--- /dev/null
+++ b/common/cmd_blob.c
@@ -0,0 +1,110 @@
+/*
+ *
+ * Command for encapsulating/decapsulating blob of memory.
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/**
+ * blob_decap() - Decapsulate the data as a blob
+ * @key_mod:   - Pointer to key modifier/key
+ * @src:   - Address of data to be decapsulated
+ * @dst:   - Address of data to be decapsulated
+ * @len:   - Size of data to be decapsulated
+ *
+ * Returns zero on success,and negative on error.
+ */
+__weak int blob_decap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
+{
+   return 0;
+}
+
+/**
+ * blob_encap() - Encapsulate the data as a blob
+ * @key_mod:   - Pointer to key modifier/key
+ * @src:   - Address of data to be encapsulated
+ * @dst:   - Address of data to be encapsulated
+ * @len:   - Size of data to be encapsulated
+ *
+ * Returns zero on success,and negative on error.
+ */
+__weak int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
+{
+   return 0;
+}
+
+/**
+ * do_blob() - Handle the "blob" command-line command
+ * @cmdtp: Command data struct pointer
+ * @flag:  Command flag
+ * @argc:  Command-line argument count
+ * @argv:  Array of command-line arguments
+ *
+ * Returns zero on success, CMD_RET_USAGE in case of misuse and negative
+ * on error.
+ */
+static int do_blob(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
+{
+   uint32_t key_addr, src_addr, dst_addr, len;
+   uint8_t *km_ptr, *src_ptr, *dst_ptr;
+   int enc, ret = 0;
+
+   if (argc != 6)
+   return CMD_RET_USAGE;
+
+   if (!strncmp(argv[1], "enc", 3))
+   enc = 1;
+   else if (!strncmp(argv[1], "dec", 3))
+   enc = 0;
+   else
+   return CMD_RET_USAGE;
+
+   src_addr = simple_strtoul(argv[2], NULL, 16);
+   dst_addr = simple_strtoul(argv[3], NULL, 16);
+   len = simple_strtoul(argv[4], NULL, 16);
+   key_addr = simple_strtoul(argv[5], NULL, 16);
+
+   km_ptr = (uint8_t *)key_addr;
+   src_ptr = (uint8_t *)src_addr;
+   dst_ptr = (uint8_t *)dst_addr;
+
+   if (enc)
+   ret = blob_encap(km_ptr, src_ptr, dst_ptr, len);
+   else
+   

[U-Boot] [PATCH] ls102x: configs - Add hash command in freescale LS1 platforms

2014-09-25 Thread Ruchika Gupta
Hardware accelerated support for SHA-1 and SHA-256 has been added.
Hash command enabled along with hardware accelerated support for
SHA-1 and SHA-256 for platforms which have CAAM block.

Signed-off-by: Ruchika Gupta 
CC: York Sun 
---
 arch/arm/include/asm/arch-ls102xa/config.h | 10 ++
 board/freescale/ls1021aqds/ls1021aqds.c| 10 ++
 board/freescale/ls1021atwr/ls1021atwr.c|  9 +
 include/configs/ls1021aqds.h   |  6 ++
 include/configs/ls1021atwr.h   |  6 ++
 5 files changed, 41 insertions(+)

diff --git a/arch/arm/include/asm/arch-ls102xa/config.h 
b/arch/arm/include/asm/arch-ls102xa/config.h
index ed78c33..b6cb857 100644
--- a/arch/arm/include/asm/arch-ls102xa/config.h
+++ b/arch/arm/include/asm/arch-ls102xa/config.h
@@ -20,6 +20,8 @@
 #define CONFIG_SYS_FSL_ESDHC_ADDR  (CONFIG_SYS_IMMR + 0x0056)
 #define CONFIG_SYS_FSL_SCFG_ADDR   (CONFIG_SYS_IMMR + 0x0057)
 #define CONFIG_SYS_FSL_SERDES_ADDR (CONFIG_SYS_IMMR + 0x00ea)
+#define CONFIG_SYS_FSL_SEC_ADDR(CONFIG_SYS_IMMR + 
0x70)
+#define CONFIG_SYS_FSL_JR0_ADDR(CONFIG_SYS_IMMR + 
0x71)
 #define CONFIG_SYS_FSL_GUTS_ADDR   (CONFIG_SYS_IMMR + 0x00ee)
 #define CONFIG_SYS_FSL_LS1_CLK_ADDR(CONFIG_SYS_IMMR + 0x00ee1000)
 #define CONFIG_SYS_NS16550_COM1(CONFIG_SYS_IMMR + 
0x011c0500)
@@ -71,8 +73,16 @@
 #define CONFIG_MAX_CPUS2
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT  8
 #define CONFIG_NUM_DDR_CONTROLLERS 1
+#define CONFIG_SYS_FSL_SEC_OFFSET  0x0070
+#define CONFIG_SYS_FSL_SEC_COMPAT  5
 #else
 #error SoC not defined
 #endif
 
+#define CONFIG_SYS_FSL_SEC_LE
+
+#if CONFIG_SYS_FSL_SEC_COMPAT >= 4
+#define CONFIG_FSL_CAAM
+#endif
+
 #endif /* _ASM_ARMV7_LS102XA_CONFIG_ */
diff --git a/board/freescale/ls1021aqds/ls1021aqds.c 
b/board/freescale/ls1021aqds/ls1021aqds.c
index 12e83f7..d6278b9 100644
--- a/board/freescale/ls1021aqds/ls1021aqds.c
+++ b/board/freescale/ls1021aqds/ls1021aqds.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "../common/qixis.h"
 #include "ls1021aqds_qixis.h"
@@ -213,6 +214,15 @@ int config_serdes_mux(void)
return 0;
 }
 
+#if defined(CONFIG_MISC_INIT_R)
+int misc_init_r(void)
+{
+   if (sec_init() < 0)
+   return -1;
+   return 0;
+}
+#endif
+
 int board_init(void)
 {
struct ccsr_cci400 *cci = (struct ccsr_cci400 *)CONFIG_SYS_CCI400_ADDR;
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c 
b/board/freescale/ls1021atwr/ls1021atwr.c
index b522ff2..80903f6 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -280,6 +280,15 @@ int board_init(void)
return 0;
 }
 
+#if defined(CONFIG_MISC_INIT_R)
+int misc_init_r(void)
+{
+   if (sec_init() < 0)
+   return -1;
+   return 0;
+}
+#endif
+
 void ft_board_setup(void *blob, bd_t *bd)
 {
ft_cpu_setup(blob, bd);
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 657e3b6..df2fc09 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -386,4 +386,10 @@ unsigned long get_board_ddr_clk(void);
 #define CONFIG_OF_BOARD_SETUP
 #define CONFIG_CMD_BOOTZ
 
+#define CONFIG_MISC_INIT_R
+
+/* Hash command with SHA acceleration supported in hardware */
+#define CONFIG_CMD_HASH
+#define CONFIG_SHA_HW_ACCEL
+
 #endif
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 45b2272..7199c92 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -288,4 +288,10 @@
 #define CONFIG_OF_BOARD_SETUP
 #define CONFIG_CMD_BOOTZ
 
+#define CONFIG_MISC_INIT_R
+
+/* Hash command with SHA acceleration supported in hardware */
+#define CONFIG_CMD_HASH
+#define CONFIG_SHA_HW_ACCEL
+
 #endif
-- 
1.8.1.4

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


Re: [U-Boot] [U-Boot,v2,01/10] kconfig: add blank Kconfig files

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 04:32:58PM +0900, Masahiro Yamada wrote:

> This would be useful to start moving various config options.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 
> Tested-by: Simon Glass 

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] checkpatch: remove unnecessary + after {8,8}

2014-09-25 Thread Tom Rini
On Tue, Sep 23, 2014 at 12:41:02PM +0200, Marek Vasut wrote:

> From: Joe Perches 
> 
> Pick the following commit from Linux kernel:
> commit 66cb4ee0e52ca721f609fd5eec16187189ae5fda
> Author: Joe Perches 
> Date:   Wed Sep 10 09:40:47 2014 +1000
> 
> checkpatch: remove unnecessary + after {8,8}
> 
> There's a useless "+" use that needs to be removed as perl 5.20 emits a
> "Useless use of greediness modifier '+'" message each time it's hit.
> 
> Signed-off-by: Marek Vasut 
> Cc: Tom Rini 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 10/10] kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig

2014-09-25 Thread Tom Rini
On Mon, Sep 22, 2014 at 07:59:06PM +0900, Masahiro Yamada wrote:

> This option specifies the default Device Tree used for the run-time
> configuration of U-Boot.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Simon Glass 
> Cc: Stephen Warren 
> Cc: Minkyu Kang 
> Cc: Michal Simek 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] tools: remove reformat.py

2014-09-25 Thread Tom Rini
On Mon, Sep 22, 2014 at 03:06:15PM +0900, Masahiro Yamada wrote:

> This tools is unnecessary since commit f6c8f38ec601
> (tools/genboardscfg.py: improve performance more with Kconfiglib).
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 2/3] README.clang: update FreeBSD instructions

2014-09-25 Thread Tom Rini
On Sun, Sep 21, 2014 at 10:20:22AM +0200, Jeroen Hofstee wrote:

> The mentioned binutils port got removed while the patch was
> pending. As Ian pointed out there is another port providing
> the binutils for arm now. Update the instructions accordingly.
> 
> Cc: i...@freebsd.org
> Cc: Tom Rini 
> Signed-off-by: Jeroen Hofstee 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v3, 09/10] kconfig: move CONFIG_OF_* to Kconfig

2014-09-25 Thread Tom Rini
On Mon, Sep 22, 2014 at 07:59:05PM +0900, Masahiro Yamada wrote:

> This commit moves:
>   CONFIG_OF_CONTROL
>   CONFIG_OF_SEPARATE
>   CONFIG_OF_EMBED
>   CONFIG_OF_HOSTFILE
> 
> Because these options are currently not supported for SPL,
> the "Device Tree Control" menu does not appear in the SPL
> configuration.
> 
> Note:
> zynq-common.h should be adjusted so as not to change the
> default value of CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 
> Cc: Stephen Warren 
> Cc: Minkyu Kang 
> Acked-by: Michal Simek 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 1/3] compiler_gcc: prevent redefining attributes

2014-09-25 Thread Tom Rini
On Thu, Sep 18, 2014 at 08:10:27PM +0200, Jeroen Hofstee wrote:

> The libc headers on FreeBSD and likely related projects as well contain an
> header file, cdefs.h which provides similiar functionality as 
> linux/compiler.h.
> It provides compiler independent defines like __weak __packed, to allow
> compiling with multiple compilers which might have a different syntax for such
> extension.
> 
> Since that header file is included in multiple standard headers, like stddef.h
> and stdarg.h, multiple definitions of those defines will be present if both 
> are
> included. When compiling u-boot the compiler will warn about it hundreds of
> times since e.g. common.h will include both files indirectly.
> 
> commit 7ea50d52849fe8ffa5b5b74c979b60b1045d6fc9 "compiler_gcc: do not redefine
> __gnu_attributes" prevented such redefinitions, but this was undone by commit
> fb8ffd7cfc68b3dc44e182356a207d784cb30b34 "compiler*.h: sync
> include/linux/compiler*.h with Linux 3.16".
> 
> Add the checks back where necessary to prevent such warnings.
> 
> As the original patch this checkpatch warning is ignored:
> "WARNING: Adding new packed members is to be done with care"
> 
> Cc: Masahiro Yamada 
> Cc: Tom Rini 
> Signed-off-by: Jeroen Hofstee 
> Acked-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 2/2] common.h: remove MIN, MAX, MIN3, MAX3 macros

2014-09-25 Thread Tom Rini
On Thu, Sep 18, 2014 at 01:28:07PM +0900, Masahiro Yamada wrote:

> Now MIN, MAX, MIN3, MAX are not used.
> Going forward, use min, max, min3, max3.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] kbuild: refactor some makefiles

2014-09-25 Thread Tom Rini
On Thu, Sep 18, 2014 at 03:43:41PM +0900, Masahiro Yamada wrote:

> [1] Move driver/core/, driver/input/ and drivers/input/ entries
> from the top Makefile to drivers/Makefile
> 
> [2] Remove the conditional by CONFIG_DM in drivers/core/Makefile
> because the whole drivers/core directory is already selected
> by CONFIG_DM in the upper level
> 
> [3] Likewise for CONFIG_DM_DEMO in drivers/demo/Makefile
> 
> [4] Simplify common/Makefile - both CONFIG_DDR_SPD and
> CONFIG_SPD_EEPROM are boolean macros so they can directly
> select objects
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Marek Vasut 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 1/2] cosmetic: replace MIN, MAX with min, max

2014-09-25 Thread Tom Rini
On Thu, Sep 18, 2014 at 01:28:06PM +0900, Masahiro Yamada wrote:

> The macro MIN, MAX is defined as the aliase of min, max,
> respectively.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 07/10] kconfig: move CONFIG_CMD_IMPORTENV to Kconfig

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 04:33:04PM +0900, Masahiro Yamada wrote:

> Since CONFIG_CMD_IMPORTENV is defined in config_cmd_defaults.h,
> it should be enabled for all the boards except bf506f-ezkit
> that undefs it explicitely.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 
> Tested-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] cmd_nand: Update (nand_info_t*)nand after arg_off(_size) call

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 02:38:52PM +0200, Rostislav Lisovy wrote:


> The arg_off() and arg_off_size() update the 'current NAND
> device' variable (dev). This is then used when assigning the
> (nand_info_t*)nand value. Place the assignment after the
> arg_off(_size) calls to prevent using incorrect (nand_info_t*)
> nand value.
> 
> Signed-off-by: Rostislav Lisovy 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 3/3] compiler.h: remove duplicated uninitialized_var

2014-09-25 Thread Tom Rini
On Wed, Sep 17, 2014 at 08:33:48PM +0200, Jeroen Hofstee wrote:

> Since clang has a different definition for uninitialized_var
> it will complain that it is redefined in include/compiler.h.
> Since these are already defined in linux/compiler.h just remove
> this instance.
> 
> Cc: Masahiro Yamada 
> Cc: Tom Rini 
> Signed-off-by: Jeroen Hofstee 

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] linker_lists: fix comment

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 08:21:15PM +0900, Masahiro Yamada wrote:

> The section name and the C variable name seem to be opposite.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Marek Vasut 
> Acked-by: Marek Vasut 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 06/10] kconfig: move CONFIG_CMD_GO to Kconfig

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 04:33:03PM +0900, Masahiro Yamada wrote:

> Since CONFIG_CMD_GO is defined in config_cmd_defaults.h
> (and no board undefs it its own header), it can be moved to
> Kconfig with the default value "y".
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 
> Tested-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 08/10] kconfig: remove config_cmd_defaults.h

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 04:33:05PM +0900, Masahiro Yamada wrote:

> Now config_cmd_defaults.h is empty so it can be deleted safely.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 03/10] kconfig: move CONFIG_CMD_BOOTM to Kconfig

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 04:33:00PM +0900, Masahiro Yamada wrote:

> CONFIG_CMD_BOOTM is defined in config_cmd_defaults.h
> which is forcebly included from each board.
> So, the default value of "config CMD_BOOTM" should be "y".
> 
> For some boards undefining it (bf506f-ezkit, controlcenterd_TRAILBLA,
> controlcenterd_TRAILBLAZER_DEVELOP, controlcenterd_TRAILBLAZER),
> "# CONFIG_CMD_BOOTM is not set" should be added to their defconfig.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 02/10] kconfig: move CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED to Kconfig

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 04:32:59PM +0900, Masahiro Yamada wrote:

> If this option is enabled, the objects under lib/ directory
> are compiled with speed optimization, not size optimization.
> (Currently, only used by some Blackfin boards.)
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 
> Tested-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v2, 04/10] kconfig: move CONFIG_CMD_CRC32 to Kconfig

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 04:33:01PM +0900, Masahiro Yamada wrote:

> Since CONFIG_CMD_CRC32 is defined in config_cmd_defaults.h,
> it is enabled for all the boards except the ones undefining it
> explicitly:
>   kwb
>   tseries_mmc
>   tseries_nand
>   tseries_spi
>   vct_platinum_onenand_small
>   vct_platinum_small
>   vct_platinumavc_onenand_small
>   vct_platinumavc_small
>   vct_premium_onenand_small
>   vct_premium_small
> 
> The default value of this config option should be "y" and
> "# CONFIG_CMD_CRC32 is not set" should be added for those exceptions.
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 09:26:23AM +0200, Hans de Goede wrote:

> Scsi disks need to be probed before we try to access them, otherwise all
> accesses fail with: ** Bad device size - scsi 0 **.
> 
> Reported-by: Karsten Merker 
> Signed-off-by: Hans de Goede 
> Reviewed-by: Stephen Warren 
> Tested-by: Karsten Merker 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 1/3] tools/genboardscfg.py: pick up also commented maitainers

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 02:11:49PM +0900, Masahiro Yamada wrote:

> We are still keeping invalid email addressed in MAINTAINERS
> because they carry information.
> 
> The problem is that scripts/get_maintainer.pl adds emails in the
> "M:" field including invalid ones.
> 
> We want to comment out invalid email addresses in MAINTAINERS
> to prevent scripts/get_maintainer.pl from picking them up.
> On the other hand, we want to collect them for boards.cfg
> to know the last known maintainer of each board.
> 
> This commit adjusts tools/genboardscfg.py to parse also
> the commented "M:" fields, which is useful for the next commit.
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 2/3] MAINTAINERS: comment out invalid maintainers

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 02:11:50PM +0900, Masahiro Yamada wrote:

> The "S:Orphan" in MAINTAINERS means that the maintainer in the
> "M:" field is unreachable (i.e. the email address is not working).
> (Refer to the definition of "Orphan" adopted in U-Boot
> in the log of commit 31f1b654b2f395b69faa5d0d3c1eb0803923bd3b,
> "boards.cfg: move boards with invalid emails to Orphan")
> 
> For patch files adding global changes, scripts/get_maintainer.pl
> adds bunch of such invalid email addresses, which results in
> tons of annoying bounce emails.
> 
> This commit can be reproduced by the following command:
> 
> find . -name MAINTAINERS | xargs sed -i -e '
> /^M:[[:blank:]]/ {
>   N
>   /S:[[:blank:]]Orphan/s/^/#/
> }
> '
> 
> Signed-off-by: Masahiro Yamada 
> Acked-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,3/3] MAINTAINERS: comment out blank M: field

2014-09-25 Thread Tom Rini
On Tue, Sep 16, 2014 at 02:11:51PM +0900, Masahiro Yamada wrote:

> Since commit ddaf5c8f3030050fcd356a1e49e3ee8f8f52c6d4
> (patman: RunPipe() should not pipe stdout/stderr unless asked),
> Patman spits lots of "Invalid MAINTAINERS address: '-'"
> error messages for patches with global changes.
> It takes too long for Patman to process them.
> 
> Anyway, "M:-" does not carry any important information.
> Rather, it is just like a place holder in case of assigning
> a new board maintainer.  Let's comment out.
> 
> This commit can be reproduced by the following command:
> 
> find . -name MAINTAINERS | xargs sed -i -e '/^M:[[:blank:]]*-$/s/^/#/'
> 
> Signed-off-by: Masahiro Yamada 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,1/4] Reactivate the tracing feature

2014-09-25 Thread Tom Rini
On Sun, Sep 14, 2014 at 12:40:14PM -0600, Simon Glass wrote:

> This was lost sometime in the Kbuild conversion. Add it back.
> 
> Check that the trace test now passes:
> 
> $ ./test/trace/test-trace.sh
> Simple trace test / sanity check using sandbox
> 
> /tmp/filemHKPGw
> Build sandbox
> O=sandbox FTRACE=1
>   GEN /home/sjg/c/src/third_party/u-boot/files/sandbox/Makefile
> Configuring for sandbox board...
> Check results
> Test passed
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,4/4] test: Add a test for command repeat

2014-09-25 Thread Tom Rini
On Sun, Sep 14, 2014 at 12:40:17PM -0600, Simon Glass wrote:

> This performs a command, then repeats it, and checks that the repeat
> happens.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,3/4] test: Remove tabs from trace test

2014-09-25 Thread Tom Rini
On Sun, Sep 14, 2014 at 12:40:16PM -0600, Simon Glass wrote:

> These cause U-Boot to print a list of available commands. It doesn't break
> the test, but it is best to remove them from the output.
> 
> Signed-off-by: Simon Glass 

Applied to u-boot/master, thanks!


-- 
Tom


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


Re: [U-Boot] [U-Boot,v2,2/4] sandbox: Disable Ctrl-C

2014-09-25 Thread Tom Rini
On Sun, Sep 14, 2014 at 12:40:15PM -0600, Simon Glass wrote:

> This is not supported properly on sandbox, and interferes with running
> tests, since when a test script is piped in, some commands will call
> ctrlc() which will drop characters from the test script.
> 
> Signed-off-by: Simon Glass 

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] mpc8xx: move common linker scripts into the CPU directory

2014-09-25 Thread Tom Rini
On Tue, Sep 09, 2014 at 03:12:08PM +0900, Masahiro Yamada wrote:

> Each CPU of PowerPC has its default linker script under the CPU
> directory, except mpc8xx.
> 
> Every mpc8xx board has its own linker script under the board
> directory, resulting in lots of duplication of linker scripts.
> 
> I notice eight mpc8xx boards have the same linker script.
> We can decrease the number of linker scripts by putting a single
> default linker script, arch/powerpc/cpu/mpc8xx/u-boot.lds.
> 
> Signed-off-by: Masahiro Yamada 
> Cc: Wolfgang Denk 
> Acked-by: Stefan Roese 

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] cleanup disk/part.c whitespace

2014-09-25 Thread Tom Rini
On Tue, Sep 09, 2014 at 03:19:42PM +0200, Pavel Machek wrote:

> Cleanup disk/part.c
> 
> Signed-off-by: Pavel Machek 

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] e1000: fix no nvm build

2014-09-25 Thread Tom Rini
On Mon, Sep 08, 2014 at 12:02:11AM +0200, Marcel Ziswiler wrote:

> Fix the following build error in case CONFIG_E1000_NO_NVM is enabled:
> CC  drivers/net/e1000.o
>   drivers/net/e1000.c: In function ‘e1000_initialize’:
>   drivers/net/e1000.c:5365:5: error: ‘struct e1000_hw’ has no
>   member named ‘eeprom_semaphore_present’
>   make[1]: *** [drivers/net/e1000.o] Error 1
>   make: *** [drivers/net] Error 2
> Acked-by: Marek Vasut 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 4/4] usb/gadget: fastboot: implement sparse format

2014-09-25 Thread Tom Rini
On Tue, Aug 26, 2014 at 11:47:30AM -0700, Steve Rae wrote:

> - add capability to "fastboot flash" with sparse format images
> 
> Signed-off-by: Steve Rae 
> Acked-by: Lukasz Majewski 

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] tools/env: change stripping strategy to allow no-stripping

2014-09-25 Thread Tom Rini
On Wed, Aug 27, 2014 at 02:29:00PM +0200, Thomas Petazzoni wrote:

> When building the U-Boot tools for non-ELF platforms (such as Blackfin
> FLAT), since commit 79fc0c5f498c3982aa4740c273ab1a9255063d9c
> ("tools/env: cross-compile fw_printenv without setting HOSTCC"), the
> build fails because it tries to strip a FLAT binary, which does not
> make sense.
> 
> This commit solves this by changing the stripping logic in
> tools/env/Makefile to be similar to the one in tools/Makefile. This
> logic continues to apply strip to the final binary, but does not abort
> the build if it fails, and does the stripping in place on the final
> binary. This allows the logic to work fine if stripping doesn't work,
> as it leaves the final binary untouched.
> 
> Signed-off-by: Thomas Petazzoni 
> Cc: Masahiro Yamada 
> Cc: Sonic Zhang 
> Reviewed-by: Masahiro Yamada 
> Reviewed-by: Sonic Zhang 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot,v6,3/4] usb/gadget: fastboot: minor cleanup

2014-09-25 Thread Tom Rini
On Tue, Aug 26, 2014 at 11:47:29AM -0700, Steve Rae wrote:

> - update static function
> - additional debugging statements
> - update "fastboot command" information
> - add missing include file
> - update spelling
> 
> Signed-off-by: Steve Rae 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 2/4] usb/gadget: fastboot: add support for flash command

2014-09-25 Thread Tom Rini
On Tue, Aug 26, 2014 at 11:47:28AM -0700, Steve Rae wrote:

> - implement 'fastboot flash' for eMMC devices
> 
> Signed-off-by: Steve Rae 
> Acked-by: Lukasz Majewski 
> Reviewed-by: Marek Vasut 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v6, 1/4] usb/gadget: fastboot: add eMMC support for flash command

2014-09-25 Thread Tom Rini
On Tue, Aug 26, 2014 at 11:47:27AM -0700, Steve Rae wrote:

> - add support for 'fastboot flash' command for eMMC devices
> 
> Signed-off-by: Steve Rae 

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

2014-09-25 Thread Tom Rini
On Wed, Sep 24, 2014 at 06:15:43PM +0530, Jagannadha Sutradharudu Teki wrote:

> Hi Tom,
> 
> Please pull this PR.
> 
> thanks!
> Jagan.
> 
> The following changes since commit 47d3debe1ab8315dc9ade22279e02f60eceda25b:
> 
>   Merge git://git.denx.de/u-boot-dm (2014-09-23 15:21:43 -0400)
> 
> are available in the git repository at:
> 
> 
>   git://git.denx.de/u-boot-spi.git master
> 
> for you to fetch changes up to bf9b86dc47988a404964c97c74e541a129719f9c:
> 
>   spi: kirkwood_spi.c: cosmetic: Fix minor coding style issues (2014-09-24 
> 17:48:56 +0530)
> 
> 
> Nikita Kiryanov (3):
>   mtd: spi: add support for M25PE16 and M25PX16
>   spi: mxc: fix sf probe when using mxc_spi
>   spl: replace CONFIG_SPL_SPI_* with CONFIG_SF_DEFAULT_*
> 
> Stefan Roese (5):
>   sf: Add M25PX64 SPI NOR flash ID
>   arm: kirkwood: spi.h: Add some missing parenthesis
>   spi: kirkwood_spi.c: Some fixes and cleanup
>   spi: kirkwood_spi.c: Make global variable static
>   spi: kirkwood_spi.c: cosmetic: Fix minor coding style issues
> 
>  arch/arm/include/asm/arch-kirkwood/spi.h  |  8 ++---
>  board/boundary/nitrogen6x/nitrogen6x.c|  5 +++
>  board/embest/mx6boards/mx6boards.c|  5 +++
>  board/freescale/mx6qsabreauto/mx6qsabreauto.c |  7 
>  board/freescale/mx6sabresd/mx6sabresd.c   |  7 
>  board/freescale/mx6slevk/mx6slevk.c   |  5 +++
>  board/gateworks/gw_ventana/gw_ventana.c   |  7 +++-
>  board/genesi/mx51_efikamx/efikamx.c   |  5 +++
>  board/ttcontrol/vision2/vision2.c |  5 +++
>  common/cmd_sf.c   | 13 
>  drivers/mtd/spi/sf_params.c   |  3 ++
>  drivers/mtd/spi/spi_spl_load.c|  6 ++--
>  drivers/spi/kirkwood_spi.c| 27 +++
>  drivers/spi/mxc_spi.c | 48 
> ++-
>  include/configs/am335x_evm.h  |  2 --
>  include/configs/da850evm.h|  4 ---
>  include/configs/dra7xx_evm.h  |  2 --
>  include/configs/embestmx6boards.h |  2 +-
>  include/configs/gw_ventana.h  |  2 +-
>  include/configs/ks2_evm.h |  2 --
>  include/configs/mx51_efikamx.h|  4 +--
>  include/configs/mx6sabre_common.h |  2 +-
>  include/configs/mx6slevk.h|  2 +-
>  include/configs/nitrogen6x.h  |  2 +-
>  include/configs/pcm051.h  |  2 --
>  include/configs/sama5d3xek.h  |  2 --
>  include/configs/siemens-am33x-common.h|  2 --
>  include/configs/tseries.h |  2 --
>  include/configs/vision2.h |  4 +--
>  include/configs/zynq-common.h |  2 --
>  include/spi_flash.h   | 13 
>  31 files changed, 115 insertions(+), 87 deletions(-)

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v3 10/10] kconfig: move CONFIG_DEFAULT_DEVICE_TREE to kconfig

2014-09-25 Thread Simon Glass
Hi Masahiro,

On 25 September 2014 02:06, Masahiro Yamada  wrote:
> Hi Simon,
>
>
>
> On Wed, 24 Sep 2014 17:09:35 -0600
> Simon Glass  wrote:
>> >
>> > diff --git a/configs/am335x_boneblack_vboot_defconfig 
>> > b/configs/am335x_boneblack_vboot_defconfig
>> > index af7ceca..e257143 100644
>> > --- a/configs/am335x_boneblack_vboot_defconfig
>> > +++ b/configs/am335x_boneblack_vboot_defconfig
>> > @@ -3,3 +3,4 @@ 
>> > CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,EMMC_BOOT,ENABLE_VBOOT"
>> >  +S:CONFIG_ARM=y
>> >  +S:CONFIG_TARGET_AM335X_EVM=y
>> >  CONFIG_OF_CONTROL=y
>> > +CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack"
>>
>> Do we want to include this for SPL too? At some point we might support
>> this. But if you want to define it only for U-Boot, that's OK.
>>
>> Regards,
>
>
>
> I was planning to expand this for SPL in the future,
> but if you want to do that now, I am fine with it.
>
> (The series is just moving CONFIGs verbatim from headers to defconfigs)
>
>
> I am afraid the current SPL implementation is too special.
>
>  - special Makefile (scripts/Makefile.spl)
>  - special linker scripts  (u-boot-spl.lds)
>  - special boot sequence (common/spl/spl.c)
>
> etc.  We need extra efforts because of that.
>
>
> My long-term goal is to implement the normal image and the SPL image
> as more symetirical ones, and I hope CONFIG_SPL_* will go away eventually.
>
>
> If we had implemented SPL as a generic case, you would not have needed
> a separate work for CONFIG_SPL_DM, right?
> Perhaps, you would have implemented the Driver Model for both of the normal 
> and SPL
> in the first place (and just enable CONFIG_DM for SPL and it would work).
>
> But unfortunately, we don't.
> Nor can I do that now.
> I guess we need more refactoring.
>
>
> If the device tree control for SPL is urgent necessity,
> I am fine with CONFIG_SPL_OF_CONTROL like before, or another implementation.
>
>
> Comments are welcome on this issue, of course.

Yes SPL should become less special, all of this sounds good.

With the DM SPL series we are getting close to just being able to
enable FDT in SPL just like any other feature. I'm not planning to
look at that imminently though as the DM SPL stuff is still pretty
new.

Note that the reason for CONFIG_SPL_DM is mostly a migration exercise.
It allows boards to decide when they are ready to switch to DM. I
expect the option will be removed one day (since boards with SPL are
mostly the well maintained ones I think).

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


Re: [U-Boot] [PATCH v3 09/10] kconfig: move CONFIG_OF_* to Kconfig

2014-09-25 Thread Simon Glass
Hi,

On 25 September 2014 07:18, Tom Rini  wrote:
> On Thu, Sep 25, 2014 at 04:38:09PM +0900, Masahiro Yamada wrote:
>> Hi Simon,
>>
>>
>>
>> On Wed, 24 Sep 2014 17:08:11 -0600
>> Simon Glass  wrote:
>>
>> > > +config OF_EMBED
>> > > +   bool "Embedded DTB for DT control"
>> > > +   help
>> > > + If this option is enabled, the device tree will be picked up 
>> > > and
>> > > + built into the U-Boot image.
>> >
>> > Can you please add " This is suitable for debugging
>> > and development only and is not recommended for production devices."
>>
>>
>> Why is CONFIG_OF_EMBED not recommended for production devices?
>
> It's kind-of a question for the devicetree folks.  The last time (a
> while back now) I asked for some general advice on how a DT should be
> shipped with hardware, being able to update the DT without replacing the
> whole of firmware was seen as a good thing.  Combine this with that we
> should try (yes, we can't today due to incompatible bindings) share the
> DT between U-Boot and the kernel (or really, U-Boot and anything but
> again, last I checked the BSD bindings were very very different),
> embedding doesn't seem good.

Addressing the binding differences, it's hard to see what these are
right now since the sorting and other churn in the Linux device tree
files. I think it would be good to sync the U-Boot files to the Linux
ones so we can see what bindings still differ.

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


Re: [U-Boot] [PATCH v2 0/9] Add a better USB keyboard polling method

2014-09-25 Thread Hans de Goede
Hi,

On 09/24/2014 09:04 PM, Marek Vasut wrote:
> On Wednesday, September 24, 2014 at 02:06:02 PM, Hans de Goede wrote:
>> Hi Marek,
>>
>> Here is v2 of my "Add a better USB keyboard polling method" patch-set.
>>
>> Changes in v2:
>> -Added 2 new patches:
>>  usb: kbd: Fix memleak on usb_kbd_deregister()
>>  stdio: Fix memleak on stdio_deregister
>> -Fixed use after free in:
>>  usb: kbd: Add (optional) support for using an interrupt queue for polling
> 
> Applied all to u-boot-usb/next . Please verify if all is in place.

Verified, everything is in place.

Thanks and Regards,

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


Re: [U-Boot] [PATCH v3 09/10] kconfig: move CONFIG_OF_* to Kconfig

2014-09-25 Thread Tom Rini
On Thu, Sep 25, 2014 at 04:38:09PM +0900, Masahiro Yamada wrote:
> Hi Simon,
> 
> 
> 
> On Wed, 24 Sep 2014 17:08:11 -0600
> Simon Glass  wrote:
> 
> > > +config OF_EMBED
> > > +   bool "Embedded DTB for DT control"
> > > +   help
> > > + If this option is enabled, the device tree will be picked up and
> > > + built into the U-Boot image.
> > 
> > Can you please add " This is suitable for debugging
> > and development only and is not recommended for production devices."
> 
> 
> Why is CONFIG_OF_EMBED not recommended for production devices?

It's kind-of a question for the devicetree folks.  The last time (a
while back now) I asked for some general advice on how a DT should be
shipped with hardware, being able to update the DT without replacing the
whole of firmware was seen as a good thing.  Combine this with that we
should try (yes, we can't today due to incompatible bindings) share the
DT between U-Boot and the kernel (or really, U-Boot and anything but
again, last I checked the BSD bindings were very very different),
embedding doesn't seem good.

-- 
Tom


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


Re: [U-Boot] u-boot bootargs not passing to kernel command line

2014-09-25 Thread Nilesh Kokane
Hi Wolfgang Denk,

Thanks I successfully passed the parameters to kernel by bootcmd script.
Thanks a lot for the clue.

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


  1   2   >