[U-Boot] [PATCH v3 2/2] fsl_i2c: add workaround for the erratum I2C A004447

2013-08-16 Thread Chunhe Lan
This workaround is for the erratum I2C A004447. Device reference
manual provides a scheme that allows the I2C master controller
to generate nine SCL pulses, which enable an I2C slave device
that held SDA low to release SDA. However, due to this erratum,
this scheme no longer works. In addition, when I2C is used as
a source of the PBL, the state machine is not able to recover.

At the same time, delete the reduplicative definition of SVR_VER
and SVR_REV. The SVR_REV is the low 8 bits rather than the low 16
bits of svr. And we use the CONFIG_SYS_FSL_A004447_SVR_REV macro
instead of hard-code value 0x10, 0x11 and 0x20.

The CONFIG_SYS_FSL_A004447_SVR_REV = 0x00 represents that one
version of platform has this I2C errata. So enable this errata
by IS_SVR_REV(svr, maj, min) function.

Signed-off-by: Zhao Chenhui chenhui.z...@freescale.com
Signed-off-by: Chunhe Lan chunhe@freescale.com
Cc: Scott Wood scottw...@freescale.com
Cc: Heiko Schocher h...@denx.de
---
Changes for v2:
- Caller directly uses CONFIG_SYS_FSL_A004447_SVR_REV
  to judge whether SVR_REV is less than or equal 
  CONFIG_SYS_FSL_A004447_SVR_REV
- SVR_REV is the low 8 bits rather than the low 16
  bits of svr 
Changes for v3:
- Rework codes for the newest mainline

 arch/powerpc/cpu/mpc85xx/cmd_errata.c |5 +
 arch/powerpc/include/asm/config_mpc85xx.h |   16 
 arch/powerpc/include/asm/fsl_i2c.h|1 +
 arch/powerpc/include/asm/processor.h  |5 +
 drivers/i2c/fsl_i2c.c |   14 +++---
 5 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c 
b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index cbb443f..05436f9 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -248,6 +248,11 @@ static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
 #ifdef CONFIG_SYS_FSL_ERRATUM_A005812
puts(Work-around for Erratum A-005812 enabled\n);
 #endif
+#ifdef CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+   if ((SVR_SOC_VER(svr) == SVR_8548  IS_SVR_REV(svr, 3, 1)) ||
+   (SVR_REV(svr) = CONFIG_SYS_FSL_A004447_SVR_REV))
+   puts(Work-around for Erratum I2C-A004447 enabled\n);
+#endif
return 0;
 }
 
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h 
b/arch/powerpc/include/asm/config_mpc85xx.h
index ce1bf05..3d1de4a 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -67,6 +67,8 @@
 #define CONFIG_SYS_FSL_SRIO_IB_WIN_NUM 5
 #define CONFIG_SYS_FSL_RMU
 #define CONFIG_SYS_FSL_SRIO_MSG_UNIT_NUM   2
+#define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+#define CONFIG_SYS_FSL_A004447_SVR_REV 0x00
 
 #elif defined(CONFIG_MPC8555)
 #define CONFIG_MAX_CPUS1
@@ -132,6 +134,8 @@
 #define CONFIG_SYS_FSL_ERRATUM_IFC_A002769
 #define CONFIG_SYS_FSL_ERRATUM_P1010_A003549
 #define CONFIG_SYS_FSL_ERRATUM_IFC_A003399
+#define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+#define CONFIG_SYS_FSL_A004447_SVR_REV 0x10
 
 /* P1011 is single core version of P1020 */
 #elif defined(CONFIG_P1011)
@@ -249,6 +253,8 @@
 #define CONFIG_SYS_FM_MURAM_SIZE   0x1
 #define CONFIG_SYS_FSL_PCIE_COMPAT fsl,qoriq-pcie-v2.2
 #define CONFIG_SYS_CCSRBAR_DEFAULT 0xff60
+#define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+#define CONFIG_SYS_FSL_A004447_SVR_REV 0x11
 
 /* P1024 is lower end variant of P1020 */
 #elif defined(CONFIG_P1024)
@@ -334,6 +340,8 @@
 #define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xf000
 #define CONFIG_SYS_FSL_ERRATUM_SRIO_A004034
 #define CONFIG_SYS_FSL_ERRATUM_A004849
+#define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+#define CONFIG_SYS_FSL_A004447_SVR_REV 0x11
 
 #elif defined(CONFIG_PPC_P3041)
 #define CONFIG_SYS_FSL_QORIQ_CHASSIS1
@@ -369,6 +377,8 @@
 #define CONFIG_SYS_FSL_ERRATUM_SRIO_A004034
 #define CONFIG_SYS_FSL_ERRATUM_A004849
 #define CONFIG_SYS_FSL_ERRATUM_A005812
+#define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+#define CONFIG_SYS_FSL_A004447_SVR_REV 0x20
 
 #elif defined(CONFIG_PPC_P4080) /* also supports P4040 */
 #define CONFIG_SYS_FSL_QORIQ_CHASSIS1
@@ -415,6 +425,8 @@
 #define CONFIG_SYS_FSL_ERRATUM_A004580
 #define CONFIG_SYS_P4080_ERRATUM_PCIE_A003
 #define CONFIG_SYS_FSL_ERRATUM_A005812
+#define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+#define CONFIG_SYS_FSL_A004447_SVR_REV 0x20
 
 #elif defined(CONFIG_PPC_P5020) /* also supports P5010 */
 #define CONFIG_SYS_PPC64   /* 64-bit core */
@@ -446,6 +458,8 @@
 #define CONFIG_SYS_FSL_ERRATUM_A004510_SVR_REV 0x10
 #define CONFIG_SYS_FSL_CORENET_SNOOPVEC_COREONLY 0xc000
 #define CONFIG_SYS_FSL_ERRATUM_SRIO_A004034
+#define CONFIG_SYS_FSL_ERRATUM_I2C_A004447
+#define CONFIG_SYS_FSL_A004447_SVR_REV 0x20
 
 #elif defined(CONFIG_PPC_P5040)
 #define CONFIG_SYS_PPC64
@@ -510,6 +524,8 @@
 #define CONFIG_SYS_FSL_ERRATUM_ESDHC111
 #define CONFIG_SYS_FSL_ESDHC_P1010_BROKEN_SDCLK
 #define 

Re: [U-Boot] [PATCH v3 1/3] arm:samsung:serial Extract common UART code

2013-08-16 Thread Lukasz Majewski

Hi Minkyu,

By mistake I've forgotten to add you to CC for the v3 of this patch
series.

However you were on CC for last two versions of those patches.

I'd be very grateful for feedback :-)

 This commit brings removal of duplicated code for UART IP block
 embedded at Samsung SoCs.
 New include/asm/samsung-common directory has been created to store
 common code for existing and future Samsung targets.
 
 Moreover building of UART code now depends on more verbose
 CONFIG_S5P_SERIAL. Thereof all relevant boards configs have been
 adjusted.
 
 Signed-off-by: Lukasz Majewski l.majew...@majess.pl
 
 ---
 Changes for v3:
 - Comply with SPDX license format
 
 Changes for v2:
 - Remove S3C64XX define from the code
 ---
  arch/arm/include/asm/arch-exynos/uart.h|   44 ---
  arch/arm/include/asm/arch-s5pc1xx/uart.h   |   44 ---
  arch/arm/include/asm/samsung-common/uart.h |   64
 
 drivers/serial/Makefile|2 +-
 drivers/serial/serial_s5p.c|   13 +-
 include/configs/exynos5250-dt.h|1 +
 include/configs/origen.h   |1 +
 include/configs/s5p_goni.h |1 +
 include/configs/s5pc210_universal.h|1 +
 include/configs/smdkc100.h |1 +
 include/configs/smdkv310.h |1 +
 include/configs/trats.h|1 + 12 files changed,
 74 insertions(+), 100 deletions(-) delete mode 100644
 arch/arm/include/asm/arch-exynos/uart.h delete mode 100644
 arch/arm/include/asm/arch-s5pc1xx/uart.h create mode 100644
 arch/arm/include/asm/samsung-common/uart.h
 
 diff --git a/arch/arm/include/asm/arch-exynos/uart.h
 b/arch/arm/include/asm/arch-exynos/uart.h deleted file mode 100644
 index 33d6ba3..000
 --- a/arch/arm/include/asm/arch-exynos/uart.h
 +++ /dev/null
 @@ -1,44 +0,0 @@
 -/*
 - * (C) Copyright 2009 Samsung Electronics
 - * Minkyu Kang mk7.k...@samsung.com
 - * Heungjun Kim riverful@samsung.com
 - *
 - * SPDX-License-Identifier:  GPL-2.0+
 - */
 -
 -#ifndef __ASM_ARCH_UART_H_
 -#define __ASM_ARCH_UART_H_
 -
 -#ifndef __ASSEMBLY__
 -/* baudrate rest value */
 -union br_rest {
 - unsigned short  slot;   /* udivslot */
 - unsigned char   value;  /* ufracval */
 -};
 -
 -struct s5p_uart {
 - unsigned intulcon;
 - unsigned intucon;
 - unsigned intufcon;
 - unsigned intumcon;
 - unsigned intutrstat;
 - unsigned intuerstat;
 - unsigned intufstat;
 - unsigned intumstat;
 - unsigned char   utxh;
 - unsigned char   res1[3];
 - unsigned char   urxh;
 - unsigned char   res2[3];
 - unsigned intubrdiv;
 - union br_rest   rest;
 - unsigned char   res3[0xffd0];
 -};
 -
 -static inline int s5p_uart_divslot(void)
 -{
 - return 0;
 -}
 -
 -#endif   /* __ASSEMBLY__ */
 -
 -#endif
 diff --git a/arch/arm/include/asm/arch-s5pc1xx/uart.h
 b/arch/arm/include/asm/arch-s5pc1xx/uart.h deleted file mode 100644
 index 26db098..000
 --- a/arch/arm/include/asm/arch-s5pc1xx/uart.h
 +++ /dev/null
 @@ -1,44 +0,0 @@
 -/*
 - * (C) Copyright 2009 Samsung Electronics
 - * Minkyu Kang mk7.k...@samsung.com
 - * Heungjun Kim riverful@samsung.com
 - *
 - * SPDX-License-Identifier:  GPL-2.0+
 - */
 -
 -#ifndef __ASM_ARCH_UART_H_
 -#define __ASM_ARCH_UART_H_
 -
 -#ifndef __ASSEMBLY__
 -/* baudrate rest value */
 -union br_rest {
 - unsigned short  slot;   /* udivslot */
 - unsigned char   value;  /* ufracval */
 -};
 -
 -struct s5p_uart {
 - unsigned intulcon;
 - unsigned intucon;
 - unsigned intufcon;
 - unsigned intumcon;
 - unsigned intutrstat;
 - unsigned intuerstat;
 - unsigned intufstat;
 - unsigned intumstat;
 - unsigned char   utxh;
 - unsigned char   res1[3];
 - unsigned char   urxh;
 - unsigned char   res2[3];
 - unsigned intubrdiv;
 - union br_rest   rest;
 - unsigned char   res3[0x3d0];
 -};
 -
 -static inline int s5p_uart_divslot(void)
 -{
 - return 1;
 -}
 -
 -#endif   /* __ASSEMBLY__ */
 -
 -#endif
 diff --git a/arch/arm/include/asm/samsung-common/uart.h
 b/arch/arm/include/asm/samsung-common/uart.h new file mode 100644
 index 000..ce92399
 --- /dev/null
 +++ b/arch/arm/include/asm/samsung-common/uart.h
 @@ -0,0 +1,64 @@
 +/*
 + * (C) Copyright 2009 Samsung Electronics
 + * Minkyu Kang mk7.k...@samsung.com
 + * Heungjun Kim riverful@samsung.com
 + *
 + * SPDX-License-Identifier:  GPL-2.0+
 + */
 +
 +#ifndef __ASM_ARCH_UART_H_
 +#define __ASM_ARCH_UART_H_
 +
 +#ifndef __ASSEMBLY__
 +/* baudrate rest value */
 +union br_rest {
 + unsigned short  slot;   /* udivslot */
 + unsigned char   value;  /* ufracval */
 +};
 +
 +struct s5p_uart {
 + unsigned intulcon;
 + unsigned intucon;
 + unsigned intufcon;
 + unsigned int

[U-Boot] [PATCH v3 1/2] fsl_i2c: generate nine pulses on SCL if the I2C bus is hung

2013-08-16 Thread Chunhe Lan
When the code detected that the bus is hung (e.g. SDA stuck low),
send 9 pulses on SCL to try to fixup the bus.

Signed-off-by: Zhao Chenhui chenhui.z...@freescale.com
Signed-off-by: Chunhe Lan chunhe@freescale.com
Cc: Scott Wood scottw...@freescale.com
Cc: Heiko Schocher h...@denx.de
---
Changes for v2:
- No change 
Changes for v3:
- Rework codes for the newest mainline

 drivers/i2c/fsl_i2c.c |   59 +++-
 1 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 38455e1..44b08f7 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -206,9 +206,50 @@ static unsigned int get_i2c_clock(int bus)
return gd-arch.i2c1_clk;   /* I2C1 clock */
 }
 
+static int fsl_i2c_fixup(const struct fsl_i2c *dev)
+{
+   const unsigned long long timeout = usec2ticks(CONFIG_I2C_MBB_TIMEOUT);
+   unsigned long long timeval = 0;
+   int ret = -1;
+
+   writeb(I2C_CR_MEN | I2C_CR_MSTA, dev-cr);
+
+   timeval = get_ticks();
+   while (!(readb(dev-sr)  I2C_SR_MBB)) {
+   if ((get_ticks() - timeval)  timeout)
+   goto err;
+   }
+
+   if (readb(dev-sr)  I2C_SR_MAL) {
+   /* SDA is stuck low */
+   writeb(0, dev-cr);
+   udelay(100);
+   writeb(I2C_CR_MSTA, dev-cr);
+   writeb(I2C_CR_MEN | I2C_CR_MSTA, dev-cr);
+   }
+
+   readb(dev-dr);
+
+   timeval = get_ticks();
+   while (!(readb(dev-sr)  I2C_SR_MIF)) {
+   if ((get_ticks() - timeval)  timeout)
+   goto err;
+   }
+   ret = 0;
+
+err:
+   writeb(I2C_CR_MEN, dev-cr);
+   writeb(0, dev-sr);
+   udelay(100);
+
+   return ret;
+}
+
 static void fsl_i2c_init(struct i2c_adapter *adap, int speed, int slaveadd)
 {
const struct fsl_i2c *dev;
+   const unsigned long long timeout = usec2ticks(CONFIG_I2C_MBB_TIMEOUT);
+   unsigned long long timeval;
 
 #ifdef CONFIG_SYS_I2C_INIT_BOARD
/* Call board specific i2c bus reset routine before accessing the
@@ -226,6 +267,18 @@ static void fsl_i2c_init(struct i2c_adapter *adap, int 
speed, int slaveadd)
writeb(0x0, dev-sr);  /* clear status register */
writeb(I2C_CR_MEN, dev-cr);   /* start I2C controller */
 
+   timeval = get_ticks();
+   while (readb(dev-sr)  I2C_SR_MBB) {
+   if ((get_ticks() - timeval)  timeout)
+   continue;
+
+   if (fsl_i2c_fixup(dev))
+   debug(i2c_init: BUS#%d failed to init\n,
+ adap-hwadapnr);
+
+   break;
+   }
+
 #ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT
/* Call board specific i2c bus reset routine AFTER the bus has been
 * initialized. Use either this callpoint or i2c_init_board;
@@ -394,8 +447,10 @@ fsl_i2c_write(struct i2c_adapter *adap, u8 dev, uint addr, 
int alen,
int i = -1; /* signal error */
u8 *a = (u8*)addr;
 
-   if (i2c_wait4bus(adap) = 0 
-   i2c_write_addr(adap, dev, I2C_WRITE_BIT, 0) != 0 
+   if (i2c_wait4bus(adap)  0)
+   return -1;
+
+   if (i2c_write_addr(adap, dev, I2C_WRITE_BIT, 0) != 0 
__i2c_write(adap, a[4 - alen], alen) == alen) {
i = __i2c_write(adap, data, length);
}
-- 
1.7.6.5


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


[U-Boot] [PATCH] powerpc: Fix CamelCase checkpatch warnings

2013-08-16 Thread Prabhakar Kushwaha
85xx, 86xx PowerPC folders have code variables with CamelCase naming 
conventions.
because of this code checkpatch script generates WARNING: Avoid CamelCase.

This patch set Convert variables name to normal naming convention and modify
board, driver files with updated new
  - [PATCH 1/2] powerpc: Fix CamelCase checkpatch warnings
  - [PATCH 2/2] board: Update variable names as per new the structures



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


[U-Boot] [PATCH 1/2] powerpc: Fix CamelCase checkpatch warnings

2013-08-16 Thread Prabhakar Kushwaha
85xx, 86xx PowerPC folders have code variables with CamelCase naming 
conventions.
because of this code checkpatch script generates WARNING: Avoid CamelCase.

Convert variables name to normal naming convention.

Signed-off-by: Prabhakar Kushwaha prabha...@freescale.com
---
 arch/powerpc/cpu/mpc85xx/cpu.c   |   43 ++--
 arch/powerpc/cpu/mpc85xx/fdt.c   |   10 +--
 arch/powerpc/cpu/mpc85xx/speed.c |  142 +++---
 arch/powerpc/cpu/mpc86xx/cpu.c   |   16 ++---
 arch/powerpc/cpu/mpc86xx/speed.c |   40 ++-
 include/e500.h   |   16 ++---
 include/mpc86xx.h|6 +-
 7 files changed, 138 insertions(+), 135 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 66bc6a2..b77964a 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -135,78 +135,79 @@ int checkcpu (void)
if (!(i  3))
printf (\n   );
printf(CPU%d:%-4s MHz, , core,
-   strmhz(buf1, sysinfo.freqProcessor[core]));
+   strmhz(buf1, sysinfo.freq_processor[core]));
}
-   printf(\n   CCB:%-4s MHz,\n, strmhz(buf1, sysinfo.freqSystemBus));
+   printf(\n   CCB:%-4s MHz,, strmhz(buf1, sysinfo.freq_systembus));
+   printf(\n);
 
 #ifdef CONFIG_FSL_CORENET
if (ddr_sync == 1) {
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Synchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
} else {
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Asynchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
}
 #else
switch (ddr_ratio) {
case 0x0:
printf(   DDR:%-4s MHz (%s MT/s data rate), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
break;
case 0x7:
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Synchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
break;
default:
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Asynchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
break;
}
 #endif
 
 #if defined(CONFIG_FSL_LBC)
-   if (sysinfo.freqLocalBus  LCRR_CLKDIV) {
-   printf(LBC:%-4s MHz\n, strmhz(buf1, sysinfo.freqLocalBus));
+   if (sysinfo.freq_localbus  LCRR_CLKDIV) {
+   printf(LBC:%-4s MHz\n, strmhz(buf1, sysinfo.freq_localbus));
} else {
printf(LBC: unknown (LCRR[CLKDIV] = 0x%02lx)\n,
-  sysinfo.freqLocalBus);
+  sysinfo.freq_localbus);
}
 #endif
 
 #if defined(CONFIG_FSL_IFC)
-   printf(IFC:%-4s MHz\n, strmhz(buf1, sysinfo.freqLocalBus));
+   printf(IFC:%-4s MHz\n, strmhz(buf1, sysinfo.freq_localbus));
 #endif
 
 #ifdef CONFIG_CPM2
-   printf(CPM:   %s MHz\n, strmhz(buf1, sysinfo.freqSystemBus));
+   printf(CPM:   %s MHz\n, strmhz(buf1, sysinfo.freq_systembus));
 #endif
 
 #ifdef CONFIG_QE
-   printf(   QE:%-4s MHz\n, strmhz(buf1, sysinfo.freqQE));
+   printf(   QE:%-4s MHz\n, strmhz(buf1, sysinfo.freq_qe));
 #endif
 
 #ifdef CONFIG_SYS_DPAA_FMAN
for (i = 0; i  CONFIG_SYS_NUM_FMAN; i++) {
printf(   FMAN%d: %s MHz\n, i + 1,
-   strmhz(buf1, sysinfo.freqFMan[i]));
+   strmhz(buf1, sysinfo.freq_fman[i]));
}
 #endif
 
 #ifdef CONFIG_SYS_DPAA_QBMAN
-   printf(   QMAN:  %s MHz\n, strmhz(buf1, sysinfo.freqQMAN));
+   printf(   QMAN:  %s MHz\n, strmhz(buf1, sysinfo.freq_qman));
 #endif
 
 #ifdef CONFIG_SYS_DPAA_PME
-   printf(   PME:   %s MHz\n, strmhz(buf1, sysinfo.freqPME));
+   printf(   PME:   %s MHz\n, strmhz(buf1, sysinfo.freq_pme));
 #endif
 
puts(L1:D-cache 32 kB enabled\n   

[U-Boot] [PATCH 2/2] board: Update variable names as per new the structures

2013-08-16 Thread Prabhakar Kushwaha
Different board,driver files use fields defined in MPC85xx_SYS_INFO and
MPC86xx_SYS_INFO structure. To fix CamelCase warning, field name has been
updated in the mentioned structure.

So update variable names as per new the structures.

Signed-off-by: Prabhakar Kushwaha prabha...@freescale.com
---
 board/freescale/mpc8540ads/mpc8540ads.c |2 +-
 board/freescale/mpc8541cds/mpc8541cds.c |2 +-
 board/freescale/mpc8555cds/mpc8555cds.c |2 +-
 board/freescale/mpc8560ads/mpc8560ads.c |2 +-
 board/freescale/p1_p2_rdb_pc/ddr.c  |2 +-
 board/freescale/p1_twr/ddr.c|2 +-
 board/sbc8548/sbc8548.c |4 ++--
 board/socrates/socrates.c   |2 +-
 board/xes/xpedite537x/ddr.c |2 +-
 drivers/spi/fsl_espi.c  |2 +-
 10 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/board/freescale/mpc8540ads/mpc8540ads.c 
b/board/freescale/mpc8540ads/mpc8540ads.c
index 7a84cd2..2fb4037 100644
--- a/board/freescale/mpc8540ads/mpc8540ads.c
+++ b/board/freescale/mpc8540ads/mpc8540ads.c
@@ -68,7 +68,7 @@ local_bus_init(void)
 
get_sys_info(sysinfo);
clkdiv = lbc-lcrr  LCRR_CLKDIV;
-   lbc_hz = sysinfo.freqSystemBus / 100 / clkdiv;
+   lbc_hz = sysinfo.freq_systembus / 100 / clkdiv;
 
if (lbc_hz  66) {
lbc-lcrr = CONFIG_SYS_LBC_LCRR | LCRR_DBYP;/* DLL Bypass */
diff --git a/board/freescale/mpc8541cds/mpc8541cds.c 
b/board/freescale/mpc8541cds/mpc8541cds.c
index 3d2dabd..1e21a66 100644
--- a/board/freescale/mpc8541cds/mpc8541cds.c
+++ b/board/freescale/mpc8541cds/mpc8541cds.c
@@ -250,7 +250,7 @@ local_bus_init(void)
 
get_sys_info(sysinfo);
clkdiv = lbc-lcrr  LCRR_CLKDIV;
-   lbc_hz = sysinfo.freqSystemBus / 100 / clkdiv;
+   lbc_hz = sysinfo.freq_systembus / 100 / clkdiv;
 
if (lbc_hz  66) {
lbc-lcrr |= LCRR_DBYP; /* DLL Bypass */
diff --git a/board/freescale/mpc8555cds/mpc8555cds.c 
b/board/freescale/mpc8555cds/mpc8555cds.c
index d4e7abe..ee92695 100644
--- a/board/freescale/mpc8555cds/mpc8555cds.c
+++ b/board/freescale/mpc8555cds/mpc8555cds.c
@@ -248,7 +248,7 @@ local_bus_init(void)
 
get_sys_info(sysinfo);
clkdiv = lbc-lcrr  LCRR_CLKDIV;
-   lbc_hz = sysinfo.freqSystemBus / 100 / clkdiv;
+   lbc_hz = sysinfo.freq_systembus / 100 / clkdiv;
 
if (lbc_hz  66) {
lbc-lcrr |= LCRR_DBYP; /* DLL Bypass */
diff --git a/board/freescale/mpc8560ads/mpc8560ads.c 
b/board/freescale/mpc8560ads/mpc8560ads.c
index a45a558..162636e 100644
--- a/board/freescale/mpc8560ads/mpc8560ads.c
+++ b/board/freescale/mpc8560ads/mpc8560ads.c
@@ -273,7 +273,7 @@ local_bus_init(void)
 
get_sys_info(sysinfo);
clkdiv = lbc-lcrr  LCRR_CLKDIV;
-   lbc_hz = sysinfo.freqSystemBus / 100 / clkdiv;
+   lbc_hz = sysinfo.freq_systembus / 100 / clkdiv;
 
if (lbc_hz  66) {
lbc-lcrr = CONFIG_SYS_LBC_LCRR | LCRR_DBYP;/* DLL Bypass */
diff --git a/board/freescale/p1_p2_rdb_pc/ddr.c 
b/board/freescale/p1_p2_rdb_pc/ddr.c
index 5c51845..c0b72e0 100644
--- a/board/freescale/p1_p2_rdb_pc/ddr.c
+++ b/board/freescale/p1_p2_rdb_pc/ddr.c
@@ -247,7 +247,7 @@ phys_size_t fixed_sdram(void)
 
get_sys_info(sysinfo);
printf(Configuring DDR for %s MT/s data rate\n,
-   strmhz(buf, sysinfo.freqDDRBus));
+   strmhz(buf, sysinfo.freq_ddrbus));
 
ddr_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
 
diff --git a/board/freescale/p1_twr/ddr.c b/board/freescale/p1_twr/ddr.c
index 697c0dd..67f69d7 100644
--- a/board/freescale/p1_twr/ddr.c
+++ b/board/freescale/p1_twr/ddr.c
@@ -53,7 +53,7 @@ phys_size_t fixed_sdram(void)
 
get_sys_info(sysinfo);
printf(Configuring DDR for %s MT/s data rate\n,
-   strmhz(buf, sysinfo.freqDDRBus));
+   strmhz(buf, sysinfo.freq_ddrbus));
 
ddr_size = CONFIG_SYS_SDRAM_SIZE * 1024 * 1024;
 
diff --git a/board/sbc8548/sbc8548.c b/board/sbc8548/sbc8548.c
index dee8710..8378518 100644
--- a/board/sbc8548/sbc8548.c
+++ b/board/sbc8548/sbc8548.c
@@ -65,8 +65,8 @@ local_bus_init(void)
 
get_sys_info(sysinfo);
 
-   lbc_mhz = sysinfo.freqLocalBus / 100;
-   clkdiv = sysinfo.freqSystemBus / sysinfo.freqLocalBus;
+   lbc_mhz = sysinfo.freq_localbus / 100;
+   clkdiv = sysinfo.freq_systembus / sysinfo.freq_localbus;
 
debug(LCRR=0x%x, CD=%d, MHz=%d\n, lcrr, clkdiv, lbc_mhz);
 
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index 97fd0e4..2caefbb 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -143,7 +143,7 @@ void local_bus_init (void)
 
get_sys_info (sysinfo);
clkdiv = lbc-lcrr  LCRR_CLKDIV;
-   lbc_mhz = sysinfo.freqSystemBus / 100 / clkdiv;
+   lbc_mhz = sysinfo.freq_systembus / 100 / clkdiv;
 
/* 

Re: [U-Boot] [PATCH V2] Origen: Set FIMD as the default display path

2013-08-16 Thread Ajay kumar
On Thu, Aug 15, 2013 at 6:53 PM, Tushar Behera tushar.beh...@linaro.orgwrote:

 On EXYNOS4210, there are three paths for display data to be processed,
 namely MIE, MDNIE and FIMD. On Origen board, FIMD display controller
 is used.

 Signed-off-by: Tushar Behera tushar.beh...@linaro.org
 ---
 Changes for V2:
 * Updated review comments from Ajay Kumar, reusing the code from
 arch/arm/cpu/armv7/exynos/system.c.

  board/samsung/origen/origen.c |3 +++
  1 file changed, 3 insertions(+)

 diff --git a/board/samsung/origen/origen.c b/board/samsung/origen/origen.c
 index 15f77ca..bb16699 100644
 --- a/board/samsung/origen/origen.c
 +++ b/board/samsung/origen/origen.c
 @@ -22,6 +22,9 @@ int board_init(void)
 gpio2 = (struct exynos4_gpio_part2 *) EXYNOS4_GPIO_PART2_BASE;

 gd-bd-bi_boot_params = (PHYS_SDRAM_1 + 0x100UL);
 +
 +   set_system_display_ctrl();
 +

Ok. You are trying to get the display up in the kernel,
without enabling the display in u-boot.
And, thats why you are making an explicit call here?

return 0;
  }

 --
 1.7.9.5


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


[U-Boot] [PATCH v4] SPL: Makefile: Build a separate autoconf.mk for SPL

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

SPL defines CONFIG_SPL_BUILD but this does not percolate to the autoconf.mk 
Makefile.
As a result the build breaks when CONFIG_SPL_BUILD is used in the 
board-specific include
header file. With this, there is a possibility of having a CONFIG option 
defined in the
header file but not defined in the Makefile causing all kinds of build failure 
and problems.

It also messes things for up, for example, when one might want to undefine 
options to
keep the SPL small and doesn't want to be stuck with the CONFIG options used 
for U-boot.
Lastly, this also avoids defining special CONFIG_SPL_ variables for cases where 
some
options are required in U-boot but not in SPL.

We add a spl-autoconf.mk rule that is generated for SPL with the 
CONFIG_SPL_BUILD flag
and conditionally include it for SPL builds.

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v3:
- No change.
Change from v2:
- Fixed the reported build breakage of am335x_evm_usbspl.
Change from v1:
- Fixed issue where builds in a different directory were failing.

 Makefile |   19 +--
 config.mk|6 ++
 spl/Makefile |1 +
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d545d30..75df06a 100644
--- a/Makefile
+++ b/Makefile
@@ -613,6 +613,7 @@ updater:
 # Explicitly make _depend in subdirs containing multiple targets to prevent
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:$(TIMESTAMP_FILE) $(VERSION_FILE) \
+   $(obj)include/spl-autoconf.mk \
$(obj)include/autoconf.mk \
$(obj)include/generated/generic-asm-offsets.h \
$(obj)include/generated/asm-offsets.h
@@ -694,12 +695,23 @@ $(obj)include/autoconf.mk: $(obj)include/config.h
sed -n -f tools/scripts/define2mk.sed  $@.tmp  \
mv $@.tmp $@
 
+# Auto-generate the spl-autoconf.mk file (which is included by all makefiles 
for SPL)
+$(obj)include/spl-autoconf.mk: $(obj)include/config.h
+   @$(XECHO) Generating $@ ; \
+   set -e ; \
+   : Extract the config macros ; \
+   $(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM include/common.h 
| \
+   sed -n -f tools/scripts/define2mk.sed  $@.tmp  \
+   mv $@.tmp $@
+
 $(obj)include/generated/generic-asm-offsets.h: $(obj)include/autoconf.mk.dep \
+   $(obj)include/spl-autoconf.mk \
$(obj)lib/asm-offsets.s
@$(XECHO) Generating $@
tools/scripts/make-asm-offsets $(obj)lib/asm-offsets.s $@
 
 $(obj)lib/asm-offsets.s:   $(obj)include/autoconf.mk.dep \
+   $(obj)include/spl-autoconf.mk \
$(src)lib/asm-offsets.c
@mkdir -p $(obj)lib
$(CC) -DDO_DEPS_ONLY \
@@ -707,11 +719,13 @@ $(obj)lib/asm-offsets.s:  $(obj)include/autoconf.mk.dep \
-o $@ $(src)lib/asm-offsets.c -c -S
 
 $(obj)include/generated/asm-offsets.h: $(obj)include/autoconf.mk.dep \
+   $(obj)include/spl-autoconf.mk \
$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
@$(XECHO) Generating $@
tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@
 
-$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s:  $(obj)include/autoconf.mk.dep
+$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s:  $(obj)include/autoconf.mk.dep \
+   $(obj)include/spl-autoconf.mk
@mkdir -p $(obj)$(CPUDIR)/$(SOC)
if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
$(CC) -DDO_DEPS_ONLY \
@@ -783,7 +797,8 @@ include/license.h: tools/bin2header COPYING
 unconfig:
@rm -f $(obj)include/config.h $(obj)include/config.mk \
$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
-   $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
+   $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep \
+   $(obj)include/spl-autoconf.mk
 
 %_config:: unconfig
@$(MKCONFIG) -A $(@:_config=)
diff --git a/config.mk b/config.mk
index 3e84f36..54e99f4 100644
--- a/config.mk
+++ b/config.mk
@@ -145,7 +145,13 @@ CHECK  = sparse
 #
 
 # Load generated board configuration
+ifeq ($(CONFIG_SPL_BUILD),y)
+# Include SPL autoconf
+sinclude $(OBJTREE)/include/spl-autoconf.mk
+else
+# Include normal autoconf
 sinclude $(OBJTREE)/include/autoconf.mk
+endif
 sinclude $(OBJTREE)/include/config.mk
 
 # Some architecture config.mk files need to know what CPUDIR is set to,
diff --git a/spl/Makefile b/spl/Makefile
index 6e5299b..43db01f 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -80,6 +80,7 @@ LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/memory.o
 LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/libnet.o
 LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/libnet.o
 LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/libphy.o
+LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/net/phy/libphy.o
 LIBS-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += drivers/usb/musb-new/libusb_musb-new.o
 

[U-Boot] [PATCH 3/7 v11] powerpc: p1022ds: Enable P1022DS to boot from SD Card with SPL

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

Enable p1022ds to start from eSDHC with SPL.

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v10:
- Fix the warning from spl.c.
Change from v9:
- Mofidy board/freescale/p1022ds/spl.c, fix checkpatch warnings.
Change from v8:
- No change.
Change from v7:
- No change.
Change from v6:
- Split from the patch powerpc/p1022ds: boot from SD Card with SPL.
- this patch only enables p1022ds to boot from SD Card with SPL.
Change from v5:
- No change.
Change from v4:
- No change.
Change from v3:
- No change.
Change from v2:
- No change.
Change from v1:
- No change.

 README   |4 ++
 board/freescale/common/Makefile  |2 -
 board/freescale/p1022ds/Makefile |3 +
 board/freescale/p1022ds/spl.c|  110 ++
 board/freescale/p1022ds/tlb.c|   23 +---
 include/configs/P1022DS.h|   54 ---
 6 files changed, 179 insertions(+), 17 deletions(-)
 create mode 100644 board/freescale/p1022ds/spl.c

diff --git a/README b/README
index e7cca82..23222d4 100644
--- a/README
+++ b/README
@@ -3079,6 +3079,10 @@ FIT uImage format:
Set for the SPL on PPC mpc8xxx targets, support for
arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary.
 
+   CONFIG_SPL_COMMON_INIT_DDR
+   Set for common ddr init with serial presence detect in
+   SPL binary.
+
CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT,
CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE,
CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS,
diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 457d1ad..f9550c4 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -45,9 +45,7 @@ COBJS-$(CONFIG_MPC8555CDS)+= cds_pci_ft.o
 
 COBJS-$(CONFIG_MPC8536DS)  += ics307_clk.o
 COBJS-$(CONFIG_MPC8572DS)  += ics307_clk.o
-ifndef CONFIG_SPL_BUILD
 COBJS-$(CONFIG_P1022DS)+= ics307_clk.o
-endif
 COBJS-$(CONFIG_P2020DS)+= ics307_clk.o
 COBJS-$(CONFIG_P3041DS)+= ics307_clk.o
 COBJS-$(CONFIG_P4080DS)+= ics307_clk.o
diff --git a/board/freescale/p1022ds/Makefile b/board/freescale/p1022ds/Makefile
index cfc05f7..3bc4f43 100644
--- a/board/freescale/p1022ds/Makefile
+++ b/board/freescale/p1022ds/Makefile
@@ -21,6 +21,9 @@ ifdef MINIMAL
 COBJS-y+= spl_minimal.o tlb.o law.o
 
 else
+ifdef CONFIG_SPL_BUILD
+COBJS-y += spl.o
+endif
 COBJS-y+= $(BOARD).o
 COBJS-y+= ddr.o
 COBJS-y+= law.o
diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
new file mode 100644
index 000..71a0f85
--- /dev/null
+++ b/board/freescale/p1022ds/spl.c
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#include common.h
+#include ns16550.h
+#include malloc.h
+#include mmc.h
+#include nand.h
+#include i2c.h
+#include ../common/ngpixis.h
+#include fsl_esdhc.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const u32 sysclk_tbl[] = {
+   6000, 7499900, 83332500, 800,
+   9000, 1000, 12499800, 1200
+};
+
+ulong get_effective_memsize(void)
+{
+   return CONFIG_SYS_L2_SIZE;
+}
+
+void board_init_f(ulong bootflag)
+{
+   int px_spd;
+   u32 plat_ratio, sys_clk, bus_clk;
+   ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
+
+   console_init_f();
+
+   /* Set pmuxcr to allow both i2c1 and i2c2 */
+   setbits_be32(gur-pmuxcr, in_be32(gur-pmuxcr) | 0x1000);
+   setbits_be32(gur-pmuxcr,
+in_be32(gur-pmuxcr) | MPC85xx_PMUXCR_SD_DATA);
+
+   /* Read back the register to synchronize the write. */
+   in_be32(gur-pmuxcr);
+
+   /* initialize selected port with appropriate baud rate */
+   px_spd = in_8((unsigned char *)(PIXIS_BASE + PIXIS_SPD));
+   sys_clk = sysclk_tbl[px_spd  PIXIS_SPD_SYSCLK_MASK];
+   plat_ratio = in_be32(gur-porpllsr)  MPC85xx_PORPLLSR_PLAT_RATIO;
+   bus_clk = sys_clk * plat_ratio / 2;
+
+   NS16550_init((NS16550_t)CONFIG_SYS_NS16550_COM1,
+bus_clk / 16 / CONFIG_BAUDRATE);

[U-Boot] [PATCH 1/7 v11] powerpc: deleted unused symbol CONFIG_SPL_NAND_MINIMAL and enabled some functionality for common SPL

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

1. The symbol CONFIG_SPL_NAND_MINIMAL is unused, so deleted it.
2. Some functions were unused in the minimal SPL, but it is useful
in the common SPL. So, enabled some functionality for common SPL.

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v10:
- No change.
Change from v9:
- No change.
Change from v8:
- No change.
Change from v7:
- No change.
Change from v6:
- No change.
Change from v5:
- No change.
Change from v4:
- Use !defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL).
- to replace to new symbols.
Change from v3:
- Give up new symbol and delete the line.
- ifndef CONFIG_SPL_BUILD in common/env_common.c.
Change from v2:
- Split from Add the symbol for the minimal SPL to eliminate unused code.
Change from v1:
- Split from boot from SD card/SPI flash with SPL.

 arch/powerpc/cpu/mpc85xx/tlb.c |3 ++-
 arch/powerpc/cpu/mpc8xxx/law.c |6 --
 include/configs/MPC8313ERDB.h  |1 -
 include/configs/P1022DS.h  |1 -
 include/configs/p1_p2_rdb_pc.h |1 -
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/tlb.c b/arch/powerpc/cpu/mpc85xx/tlb.c
index da3c345..8748ecd 100644
--- a/arch/powerpc/cpu/mpc85xx/tlb.c
+++ b/arch/powerpc/cpu/mpc85xx/tlb.c
@@ -39,7 +39,8 @@ void init_tlbs(void)
return ;
 }
 
-#if !defined(CONFIG_NAND_SPL)  !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_NAND_SPL)  \
+   (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL))
 void read_tlbcam_entry(int idx, u32 *valid, u32 *tsize, unsigned long *epn,
   phys_addr_t *rpn)
 {
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index 89a561e..a401083 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -76,7 +76,8 @@ void disable_law(u8 idx)
return;
 }
 
-#if !defined(CONFIG_NAND_SPL)  !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_NAND_SPL)  \
+   (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL))
 static int get_law_entry(u8 i, struct law_entry *e)
 {
u32 lawar;
@@ -106,7 +107,8 @@ int set_next_law(phys_addr_t addr, enum law_size sz, enum 
law_trgt_if id)
return idx;
 }
 
-#if !defined(CONFIG_NAND_SPL)  !defined(CONFIG_SPL_BUILD)
+#if !defined(CONFIG_NAND_SPL)  \
+   (!defined(CONFIG_SPL_BUILD) || !defined(CONFIG_SPL_INIT_MINIMAL))
 int set_last_law(phys_addr_t addr, enum law_size sz, enum law_trgt_if id)
 {
u32 idx;
diff --git a/include/configs/MPC8313ERDB.h b/include/configs/MPC8313ERDB.h
index 6c6ce58..ddcbfa6 100644
--- a/include/configs/MPC8313ERDB.h
+++ b/include/configs/MPC8313ERDB.h
@@ -24,7 +24,6 @@
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET  u-boot-with-spl.bin
 #define CONFIG_SPL_MPC83XX_WAIT_FOR_NAND
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index d1ce9fd..5ca7f07 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -38,7 +38,6 @@
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET  u-boot-with-spl.bin
 
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 9657228..5f0c4fb 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -172,7 +172,6 @@
 #define CONFIG_SPL_INIT_MINIMAL
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET  u-boot-with-spl.bin
 
-- 
1.7.0.4


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


[U-Boot] [PATCH 2/7 v11] powerpc: mpc85xx: Support booting from SD Card with SPL

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

The code from the internal on-chip ROM. It loads the final uboot image
into DDR, then jump to it to begin execution.

The SPL's size is sizeable, the maximum size must not exceed the size of L2
SRAM. It initializes the DDR through SPD code, and copys final uboot image
to DDR. So there are two stage uboot images:
* spl_boot, 96KB size. The env variables are copied to L2 SRAM, so that
ddr spd code can get the interleaving mode setting in env. It loads
final uboot image from offset 96KB.
* final uboot image, size is variable depends on the functions enabled.

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v10:
- No change.
Change from v9:
- Mofidy drivers/mmc/fsl_esdhc_spl.c, fix checkpatch warnings.
Change from v8:
- No change.
Change from v7:
- No change.
Change from v6:
- Split to the patch Support booting from SD Card with SPL and the patch.
- Enable P1022DS to boot from SD Card with SPL. this patch only support.
- booting from SD Card with SPL.
Change from v5:
- Add new symbol CONFIG_SPL_ENV_IMPORT for contain the functionality.
- env_import.
Change from v4:
- No change.
Change from v3:
- No change.
Change from v2:
- No change.
Change from v1:
- Split from boot from SD card/SPI flash with SPL.

 README |4 +
 arch/powerpc/cpu/mpc85xx/u-boot-spl.lds|5 +
 .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c|4 +
 doc/README.mpc85xx-sd-spi-boot |   81 
 drivers/mmc/Makefile   |3 +
 drivers/mmc/fsl_esdhc_spl.c|  130 
 drivers/mmc/mmc.c  |2 +
 include/fsl_esdhc.h|1 +
 spl/Makefile   |3 +
 9 files changed, 233 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.mpc85xx-sd-spi-boot
 create mode 100644 drivers/mmc/fsl_esdhc_spl.c

diff --git a/README b/README
index 3918807..e7cca82 100644
--- a/README
+++ b/README
@@ -3075,6 +3075,10 @@ FIT uImage format:
Support for NAND boot using simple NAND drivers that
expose the cmd_ctrl() interface.
 
+   CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
+   Set for the SPL on PPC mpc8xxx targets, support for
+   arch/powerpc/cpu/mpc8xxx/ddr/libddr.o in SPL binary.
+
CONFIG_SYS_NAND_5_ADDR_CYCLE, CONFIG_SYS_NAND_PAGE_COUNT,
CONFIG_SYS_NAND_PAGE_SIZE, CONFIG_SYS_NAND_OOBSIZE,
CONFIG_SYS_NAND_BLOCK_SIZE, CONFIG_SYS_NAND_BAD_BLOCK_POS,
diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds 
b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
index 08188d7..85ec74b 100644
--- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
@@ -44,6 +44,11 @@ SECTIONS
}
_edata  =  .;
 
+   . = .;
+   __start___ex_table = .;
+   __ex_table : { *(__ex_table) }
+   __stop___ex_table = .;
+
. = ALIGN(8);
__init_begin = .;
__init_end = .;
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c 
b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
index e958e13..56128a7 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/lc_common_dimm_params.c
@@ -218,12 +218,16 @@ compute_lowest_common_dimm_parameters(const dimm_params_t 
*dimm_params,
if (dimm_params[i].n_ranks) {
if (dimm_params[i].registered_dimm) {
temp1 = 1;
+#ifndef CONFIG_SPL_BUILD
printf(Detected RDIMM %s\n,
dimm_params[i].mpart);
+#endif
} else {
temp2 = 1;
+#ifndef CONFIG_SPL_BUILD
printf(Detected UDIMM %s\n,
dimm_params[i].mpart);
+#endif
}
}
}
diff --git a/doc/README.mpc85xx-sd-spi-boot b/doc/README.mpc85xx-sd-spi-boot
new file mode 100644
index 000..d5043cc
--- /dev/null
+++ b/doc/README.mpc85xx-sd-spi-boot
@@ -0,0 +1,81 @@
+
+Booting from On-Chip ROM (eSDHC or eSPI)
+
+
+boot_format is a tool to write SD bootable images to a filesystem and build
+SD/SPI images to a binary file for writing later.
+
+When booting from an SD card/MMC, boot_format puts the configuration file and
+the RAM-based U-Boot image on the card.
+When booting from an EEPROM, boot_format generates a binary image that is used
+to boot from this EEPROM.
+
+Where to get boot_format:
+
+
+you can browse it online at:
+http://git.freescale.com/git/cgit.cgi/ppc/sdk/boot-format.git/
+
+Building
+
+
+Run the following to build 

[U-Boot] [PATCH 4/7 v11] powerpc : spi flash : Support to start from eSPI with SPL

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

This patch introduces SPL to enable a loader stub that being loaded by
the code from the internal on-chip ROM. It loads the final uboot image
into DDR, then jump to it to begin execution.

The SPL's size is sizeable, the maximum size must not exceed the size of L2
SRAM. It initializes the DDR through SPD code, and copys final uboot image
to DDR. So there are two stage uboot images:
* spl_boot, 96KB size. The env variables are copied to L2 SRAM, so that
ddr spd code can get the interleaving mode setting in env. It loads
final uboot image from offset 96KB.
* final uboot image, size is variable depends on the functions enabled.

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v10:
- No change.
Change from v9:
- Modify drivers/mtd/spi/fsl_espi_spl.c, fix checkpatch warnings.
Change from v8:
- No change.
Change from v7:
- No change.
Change from v6:
- No change.
Change from v5:
- Split from powerpc/p1022ds: boot from spi flash with SPL.
- this patch add the capability starting from eSPI with SPL.
Change from v4:
- No change.
Change from v3:
- No change.
Change from v2:
- No change.
Change from v1:
- Split from boot from SD card/SPI flash with SPL.

 drivers/mtd/spi/Makefile   |1 +
 drivers/mtd/spi/fsl_espi_spl.c |   77 
 drivers/mtd/spi/spi_flash.c|2 +
 3 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/spi/fsl_espi_spl.c

diff --git a/drivers/mtd/spi/Makefile b/drivers/mtd/spi/Makefile
index e537fcf..191138a 100644
--- a/drivers/mtd/spi/Makefile
+++ b/drivers/mtd/spi/Makefile
@@ -11,6 +11,7 @@ LIB   := $(obj)libspi_flash.o
 
 ifdef CONFIG_SPL_BUILD
 COBJS-$(CONFIG_SPL_SPI_LOAD)   += spi_spl_load.o
+COBJS-$(CONFIG_SPL_SPI_BOOT)   += fsl_espi_spl.o
 endif
 
 COBJS-$(CONFIG_SPI_FLASH)  += spi_flash.o
diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c
new file mode 100644
index 000..9e216a6
--- /dev/null
+++ b/drivers/mtd/spi/fsl_espi_spl.c
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+
+#include common.h
+#include spi_flash.h
+#include malloc.h
+
+#define ESPI_BOOT_IMAGE_SIZE   0x48
+#define ESPI_BOOT_IMAGE_ADDR   0x50
+#define CONFIG_CFG_DATA_SECTOR 0
+
+/*
+ * The main entry for SPI booting. It's necessary that SDRAM is already
+ * configured and available since this code loads the main U-Boot image
+ * from SPI into SDRAM and starts it from there.
+ */
+void spi_boot(void)
+{
+   void (*uboot)(void) __noreturn;
+   u32 offset, code_len;
+   unsigned char *buf = NULL;
+   struct spi_flash *flash;
+
+   flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
+   CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
+   if (flash == NULL) {
+   puts(\nspi_flash_probe failed);
+   hang();
+   }
+
+   /*
+   * Load U-Boot image from SPI flash into RAM
+   */
+   buf = malloc(flash-page_size);
+   if (buf == NULL) {
+   puts(\nmalloc failed);
+   hang();
+   }
+   memset(buf, 0, flash-page_size);
+
+   spi_flash_read(flash, CONFIG_CFG_DATA_SECTOR,
+  flash-page_size, (void *)buf);
+   offset = *(u32 *)(buf + ESPI_BOOT_IMAGE_ADDR);
+   /* Skip spl code */
+   offset += CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS;
+   /* Get the code size from offset 0x48 */
+   code_len = *(u32 *)(buf + ESPI_BOOT_IMAGE_SIZE);
+   /* Skip spl code */
+   code_len = code_len - CONFIG_SPL_MAX_SIZE;
+   /* copy code to DDR */
+   spi_flash_read(flash, offset, code_len,
+  (void *)CONFIG_SYS_SPI_FLASH_U_BOOT_DST);
+   /*
+   * Jump to U-Boot image
+   */
+   flush_cache(CONFIG_SYS_SPI_FLASH_U_BOOT_DST, code_len);
+   uboot = (void *)CONFIG_SYS_SPI_FLASH_U_BOOT_START;
+   (*uboot)();
+}
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 9814395..5d5055f 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -555,12 +555,14 @@ struct spi_flash *spi_flash_probe(unsigned int bus, 
unsigned int cs,
goto 

[U-Boot] [PATCH 6/7 v11] NAND: TPL : introduce the TPL based on the SPL

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

Due to the nand SPL on some board(e.g. P1022DS)has a size limit, it can
not be more than 4K. So, the SPL cannot initialize the DDR with the SPD
code. This patch introduces TPL to enable a loader stub that is loaded
by the code from the SPL. It initializes the DDR with the SPD or other
operations.

The TPL's size is sizeable, the maximum size is decided by the memory's
size that TPL runs. It initializes the DDR through SPD code, and copys
final uboot image to DDR. So there are three stage uboot images:
* spl_boot, * tpl_boot, * final uboot image

This patch is on top of the patch:
SPL: Makefile: Build a separate autoconf.mk for SPL

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v10:
- No change.
Change from v9:
- Move the part revision to the other patch. for example:fsl_elbc_spl.c.
- Modify the Makefile.
- Modify doc/README.TPL, fix checkpatch warnings.
Change from v8:
- Modify the doc/README.TPL.
- Modify the Makefile.
- Modify the drivers/mtd/nand/fsl_elbc_spl.c.
- Modify the spl/Makefile.
Change from v7:
- Modify the doc/README.TPL
- Modify the spl/Makefile.
Change from v6:
- Modify the description of the patch.
- Add the separate the autoconf.mk for TPL.
- Delete the file tpl/Makefile and the directory tpl.
- Reuse the spl/Makefie in TPL.
Change from v5:
- Use ifdef to define nand_load_image to non-static for non-SPL.
Change from v4:
- No change.
Change from v3:
- No change.
Change from v2:
- No change.
Change from v1:
- Split from powerpc/p1022ds: nand: introduce the TPL based on the SPL.

 Makefile   |   50 ++
 README |   16 
 config.mk  |   30 --
 doc/README.TPL |   45 +
 spl/Makefile   |   20 
 5 files changed, 147 insertions(+), 14 deletions(-)
 create mode 100644 doc/README.TPL

diff --git a/Makefile b/Makefile
index 75df06a..7a8897d 100644
--- a/Makefile
+++ b/Makefile
@@ -102,10 +102,11 @@ endif # ifneq ($(BUILD_DIR),)
 
 OBJTREE:= $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR))
 SPLTREE:= $(OBJTREE)/spl
+TPLTREE:= $(OBJTREE)/tpl
 SRCTREE:= $(CURDIR)
 TOPDIR := $(SRCTREE)
 LNDIR  := $(OBJTREE)
-export TOPDIR SRCTREE OBJTREE SPLTREE
+export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE
 
 MKCONFIG   := $(SRCTREE)/mkconfig
 export MKCONFIG
@@ -397,6 +398,7 @@ ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map
 ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin
 ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin
 ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin
+ALL-$(CONFIG_TPL) += $(obj)tpl/u-boot-tpl.bin
 ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin
 ifneq ($(CONFIG_SPL_TARGET),)
 ALL-$(CONFIG_SPL) += $(obj)$(subst ,,$(CONFIG_SPL_TARGET))
@@ -475,13 +477,25 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
 $(obj)u-boot.dis:  $(obj)u-boot
$(OBJDUMP) -d $  $@
 
+# $@ is output, $(1) and $(2) are inputs, $(3) is padded intermediate,
+# $(4) is pad-to
+SPL_PAD_APPEND = \
+   $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O binary \
+   $(1) $(obj)$(3); \
+   cat $(obj)$(3) $(obj)$(2)  $@; \
+   rm $(obj)$(3)
 
+ifdef CONFIG_TPL
+SPL_PAYLOAD := $(obj)tpl/u-boot-with-tpl.bin
+else
+SPL_PAYLOAD := $(obj)u-boot.bin
+endif
 
-$(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
-   $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \
-   -I binary -O binary $ $(obj)spl/u-boot-spl-pad.bin
-   cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin  $@
-   rm $(obj)spl/u-boot-spl-pad.bin
+$(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(SPL_PAYLOAD)
+   $(call 
SPL_PAD_APPEND,$,$(SPL_PAYLOAD),spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO))
+
+$(obj)tpl/u-boot-with-tpl.bin: $(obj)tpl/u-boot-tpl.bin $(obj)u-boot.bin
+   $(call 
SPL_PAD_APPEND,$,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO))
 
 $(obj)u-boot-with-spl.imx: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
$(MAKE) -C $(SRCTREE)/arch/arm/imx-common \
@@ -607,6 +621,9 @@ $(obj)u-boot-nand.bin:  nand_spl $(obj)u-boot.bin
 $(obj)spl/u-boot-spl.bin:  $(SUBDIR_TOOLS) depend
$(MAKE) -C spl all
 
+$(obj)tpl/u-boot-tpl.bin:  $(SUBDIR_TOOLS) depend
+   $(MAKE) -C spl all CONFIG_TPL_BUILD=y
+
 updater:
$(MAKE) -C tools/updater all
 
@@ -614,6 +631,7 @@ updater:
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:$(TIMESTAMP_FILE) $(VERSION_FILE) \
$(obj)include/spl-autoconf.mk \
+   $(obj)include/tpl-autoconf.mk \
$(obj)include/autoconf.mk \
$(obj)include/generated/generic-asm-offsets.h \
 

[U-Boot] [PATCH 7/7 v11] powerpc: p1022ds: add TPL for p1022ds nand boot

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

TPL is introduced in the patch NAND: TPL : introduce the TPL
based on the SPL, here enable TPL for p1022ds nand boot.

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v10:
- No change.
Change from v9:
- Modify drivers/mtd/nand/Makefile.
- Modify drivers/mtd/nand/fsl_elbc_spl.c.
- Modify include/configs/P1022DS.h, fix checkpatch warnings.
Change from v8:
- Add new symbol CONFIG_SPL_ENV_IN_NAND.
Change from v7:
- No change.
Change from v6:
- Delete the file board/freescale/p1022ds/tpl.c.
- Reuse the file board/freescale/p1022ds/spl.c in the TPL.
Change from v5:
- Change functionality nand_load_image to nand_load, it is called in TPL.
Change from v4:
- No change.
Change from v3:
- No change.
Change from v2:
- No change.
Change from v1:
- Split from powerpc/p1022ds: nand: introduce the TPL based on the SPL.

 board/freescale/p1022ds/spl.c |   16 +++
 board/freescale/p1022ds/spl_minimal.c |   53 ++
 drivers/mtd/nand/Makefile |1 +
 drivers/mtd/nand/fsl_elbc_spl.c   |   27 +---
 include/configs/P1022DS.h |   77 ++---
 5 files changed, 103 insertions(+), 71 deletions(-)

diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index 7e89de2..358b2e3 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -100,21 +100,37 @@ void board_init_r(gd_t *gd, ulong dest_addr)
get_clocks();
mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR,
CONFIG_SPL_RELOC_MALLOC_SIZE);
+#ifndef CONFIG_SPL_NAND_BOOT
env_init();
+#endif
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_initialize(bd);
 #endif
/* relocate environment function pointers etc. */
+#ifdef CONFIG_SPL_NAND_BOOT
+   nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
+   (uchar *)CONFIG_ENV_ADDR);
+
+   gd-env_addr  = (ulong)(CONFIG_ENV_ADDR);
+   gd-env_valid = 1;
+#else
env_relocate();
+#endif
 
i2c_init(CONFIG_SYS_FSL_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
 
gd-ram_size = initdram(0);
+#ifdef CONFIG_SPL_NAND_BOOT
+   puts(Tertiary program loader running in sram...);
+#else
puts(Second program loader running in sram...\n);
+#endif
 
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
 #elif defined(CONFIG_SPL_SPI_BOOT)
spi_boot();
+#elif defined(CONFIG_SPL_NAND_BOOT)
+   nand_boot();
 #endif
 }
diff --git a/board/freescale/p1022ds/spl_minimal.c 
b/board/freescale/p1022ds/spl_minimal.c
index d150d95..8b34396 100644
--- a/board/freescale/p1022ds/spl_minimal.c
+++ b/board/freescale/p1022ds/spl_minimal.c
@@ -12,51 +12,6 @@
 #include asm/fsl_ddr_sdram.h
 
 
-/*
- * Fixed sdram init -- doesn't use serial presence detect.
- */
-void sdram_init(void)
-{
-   volatile ccsr_ddr_t *ddr = (ccsr_ddr_t *)CONFIG_SYS_MPC8xxx_DDR_ADDR;
-
-   __raw_writel(CONFIG_SYS_DDR_CS0_BNDS, ddr-cs0_bnds);
-   __raw_writel(CONFIG_SYS_DDR_CS0_CONFIG, ddr-cs0_config);
-#if CONFIG_CHIP_SELECTS_PER_CTRL  1
-   __raw_writel(CONFIG_SYS_DDR_CS1_BNDS, ddr-cs1_bnds);
-   __raw_writel(CONFIG_SYS_DDR_CS1_CONFIG, ddr-cs1_config);
-#endif
-   __raw_writel(CONFIG_SYS_DDR_TIMING_3, ddr-timing_cfg_3);
-   __raw_writel(CONFIG_SYS_DDR_TIMING_0, ddr-timing_cfg_0);
-   __raw_writel(CONFIG_SYS_DDR_TIMING_1, ddr-timing_cfg_1);
-   __raw_writel(CONFIG_SYS_DDR_TIMING_2, ddr-timing_cfg_2);
-
-   __raw_writel(CONFIG_SYS_DDR_CONTROL_2, ddr-sdram_cfg_2);
-   __raw_writel(CONFIG_SYS_DDR_MODE_1, ddr-sdram_mode);
-   __raw_writel(CONFIG_SYS_DDR_MODE_2, ddr-sdram_mode_2);
-
-   __raw_writel(CONFIG_SYS_DDR_INTERVAL, ddr-sdram_interval);
-   __raw_writel(CONFIG_SYS_DDR_DATA_INIT, ddr-sdram_data_init);
-   __raw_writel(CONFIG_SYS_DDR_CLK_CTRL, ddr-sdram_clk_cntl);
-
-   __raw_writel(CONFIG_SYS_DDR_TIMING_4, ddr-timing_cfg_4);
-   __raw_writel(CONFIG_SYS_DDR_TIMING_5, ddr-timing_cfg_5);
-   __raw_writel(CONFIG_SYS_DDR_ZQ_CONTROL, ddr-ddr_zq_cntl);
-   __raw_writel(CONFIG_SYS_DDR_WRLVL_CONTROL, ddr-ddr_wrlvl_cntl);
-
-   /* Set, but do not enable the memory */
-   __raw_writel(CONFIG_SYS_DDR_CONTROL  ~SDRAM_CFG_MEM_EN,
-   ddr-sdram_cfg);
-
-   in_be32(ddr-sdram_cfg);
-   udelay(500);
-
-   /* Let the controller go */
-   out_be32(ddr-sdram_cfg, in_be32(ddr-sdram_cfg) | SDRAM_CFG_MEM_EN);
-   in_be32(ddr-sdram_cfg);
-
-   set_next_law(0, CONFIG_SYS_SDRAM_SIZE_LAW, LAW_TRGT_IF_DDR_1);
-}
-
 const static u32 sysclk_tbl[] = {
6000, 7499900, 83332500, 800,
9000, 1000, 12499800, 1200
@@ -68,6 +23,10 @@ void board_init_f(ulong bootflag)
u32 plat_ratio, sys_clk, bus_clk;
ccsr_gur_t *gur = (void *)CONFIG_SYS_MPC85xx_GUTS_ADDR;
 
+#if defined(CONFIG_SYS_NAND_BR_PRELIM)  defined(CONFIG_SYS_NAND_OR_PRELIM)
+   set_lbc_br(0, 

[U-Boot] [PATCH 5/7 v11] powerpc : p1022ds : Enable p1022ds to start from eSPI with SPL

2013-08-16 Thread ying.zhang
From: Ying Zhang b40...@freescale.com

Enable p1022ds to start from eSPI with SPL.

Signed-off-by: Ying Zhang b40...@freescale.com
---
Change from v10:
- No change.
Change from v9:
- No change.
Change from v8:
- No change.
Change from v7:
- No change.
Change from v6:
- No longer changes the header file included by the file.
- board/freescale/p1022ds/spl.c.
Change from v5:
- Split from powerpc/p1022ds: boot from spi flash with SPL.
- this patch enable P1022DS to start from eSPI with SPL.
Change from v4:
- No change.
Change from v3:
- No change.
Change from v2:
- No change.
Change from v1:
- Split from boot from SD card/SPI flash with SPL.

 board/freescale/p1022ds/spl.c |   10 ++
 include/configs/P1022DS.h |   36 +---
 2 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/board/freescale/p1022ds/spl.c b/board/freescale/p1022ds/spl.c
index 71a0f85..7e89de2 100644
--- a/board/freescale/p1022ds/spl.c
+++ b/board/freescale/p1022ds/spl.c
@@ -27,6 +27,7 @@
 #include i2c.h
 #include ../common/ngpixis.h
 #include fsl_esdhc.h
+#include spi_flash.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -53,6 +54,11 @@ void board_init_f(ulong bootflag)
setbits_be32(gur-pmuxcr,
 in_be32(gur-pmuxcr) | MPC85xx_PMUXCR_SD_DATA);
 
+#ifdef CONFIG_SPL_SPI_BOOT
+   /* Enable the SPI */
+   clrsetbits_8(pixis-brdcfg0, PIXIS_ELBC_SPI_MASK, PIXIS_SPI);
+#endif
+
/* Read back the register to synchronize the write. */
in_be32(gur-pmuxcr);
 
@@ -66,6 +72,8 @@ void board_init_f(ulong bootflag)
 bus_clk / 16 / CONFIG_BAUDRATE);
 #ifdef CONFIG_SPL_MMC_BOOT
puts(\nSD boot...\n);
+#elif defined(CONFIG_SPL_SPI_BOOT)
+   puts(\nSPI Flash boot...\n);
 #endif
 
/* copy code to RAM and jump to it - this should not return */
@@ -106,5 +114,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
 #ifdef CONFIG_SPL_MMC_BOOT
mmc_boot();
+#elif defined(CONFIG_SPL_SPI_BOOT)
+   spi_boot();
 #endif
 }
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index 6db0c27..762b136 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -45,11 +45,33 @@
 #endif
 
 #ifdef CONFIG_SPIFLASH
-#define CONFIG_RAMBOOT_SPIFLASH
-#define CONFIG_SYS_RAMBOOT
-#define CONFIG_SYS_EXTRA_ENV_RELOC
-#define CONFIG_SYS_TEXT_BASE   0x1100
-#define CONFIG_RESET_VECTOR_ADDRESS0x1107fffc
+#define CONFIG_SPL
+#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
+#define CONFIG_SPL_ENV_SUPPORT
+#define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_SPI_SUPPORT
+#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_FLASH_MINIMAL
+#define CONFIG_SPL_FLUSH_IMAGE
+#define CONFIG_SPL_TARGET  u-boot-with-spl.bin
+#define CONFIG_SPL_LIBGENERIC_SUPPORT
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_I2C_SUPPORT
+#define CONFIG_FSL_LAW /* Use common FSL init code */
+#define CONFIG_SYS_TEXT_BASE   0x11001000
+#define CONFIG_SPL_TEXT_BASE   0xf8f81000
+#define CONFIG_SPL_PAD_TO  0x18000
+#define CONFIG_SPL_MAX_SIZE(96 * 1024)
+#define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE   (512  10)
+#define CONFIG_SYS_SPI_FLASH_U_BOOT_DST(0x1100)
+#define CONFIG_SYS_SPI_FLASH_U_BOOT_START  (0x1100)
+#define CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS   (96  10)
+#define CONFIG_SYS_MPC85XX_NO_RESETVEC
+#define CONFIG_SYS_LDSCRIPTarch/powerpc/cpu/mpc85xx/u-boot.lds
+#define CONFIG_SPL_SPI_BOOT
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_SPL_COMMON_INIT_DDR
+#endif
 #endif
 
 #define CONFIG_NAND_FSL_ELBC
@@ -315,7 +337,7 @@
  * Config the L2 Cache as L2 SRAM
 */
 #if defined(CONFIG_SPL_BUILD)
-#if defined(CONFIG_SDCARD)
+#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
 #define CONFIG_SYS_INIT_L2_ADDR0xf8f8
 #define CONFIG_SYS_INIT_L2_ADDR_PHYS   CONFIG_SYS_INIT_L2_ADDR
 #define CONFIG_SYS_L2_SIZE (256  10)
@@ -559,7 +581,7 @@
 /*
  * Environment
  */
-#ifdef CONFIG_RAMBOOT_SPIFLASH
+#ifdef CONFIG_SPIFLASH
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SPI_BUS 0
 #define CONFIG_ENV_SPI_CS  0
-- 
1.7.0.4


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


Re: [U-Boot] [PATCH] powerpc: Fix CamelCase checkpatch warnings

2013-08-16 Thread thomas.langer
Hello Prabhakar,

Prabhakar Kushwaha wrote on 2013-08-16:
 85xx, 86xx PowerPC folders have code variables with CamelCase naming
 conventions. because of this code checkpatch script generates WARNING:
 Avoid CamelCase.
 
 This patch set Convert variables name to normal naming convention and
 modify board, driver files with updated new
   - [PATCH 1/2] powerpc: Fix CamelCase checkpatch warnings
   - [PATCH 2/2] board: Update variable names as per new the structures
 
I think you have to fold both patches together to have the change bisectable!
Otherwise your board code will not compile after applying only the first patch.

Best Regards,
Thomas


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


Re: [U-Boot] [PATCH] powerpc: Fix CamelCase checkpatch warnings

2013-08-16 Thread Prabhakar Kushwaha

On 08/16/2013 02:23 PM, thomas.lan...@lantiq.com wrote:

Hello Prabhakar,

Prabhakar Kushwaha wrote on 2013-08-16:

85xx, 86xx PowerPC folders have code variables with CamelCase naming
conventions. because of this code checkpatch script generates WARNING:
Avoid CamelCase.

This patch set Convert variables name to normal naming convention and
modify board, driver files with updated new
   - [PATCH 1/2] powerpc: Fix CamelCase checkpatch warnings
   - [PATCH 2/2] board: Update variable names as per new the structures


I think you have to fold both patches together to have the change bisectable!
Otherwise your board code will not compile after applying only the first patch.




Thanks Thomas,
I will merge both the patches.

Regards,
Prabhakar


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


[U-Boot] [PATCH][v2] powerpc: Fix CamelCase checkpatch warnings

2013-08-16 Thread Prabhakar Kushwaha
85xx, 86xx PowerPC folders have code variables with CamelCase naming 
conventions.
because of this code checkpatch script generates WARNING: Avoid CamelCase.

Convert variables name to normal naming convention and modify board, driver
files with updated the new structure. 

Signed-off-by: Prabhakar Kushwaha prabha...@freescale.com
---
 Chages for v2: Incorporated Thomas's comments
  - Take care of git bisectable

 arch/powerpc/cpu/mpc85xx/cpu.c  |   43 +-
 arch/powerpc/cpu/mpc85xx/fdt.c  |   10 +--
 arch/powerpc/cpu/mpc85xx/speed.c|  142 +++
 arch/powerpc/cpu/mpc86xx/cpu.c  |   16 ++--
 arch/powerpc/cpu/mpc86xx/speed.c|   40 -
 board/freescale/mpc8540ads/mpc8540ads.c |2 +-
 board/freescale/mpc8541cds/mpc8541cds.c |2 +-
 board/freescale/mpc8555cds/mpc8555cds.c |2 +-
 board/freescale/mpc8560ads/mpc8560ads.c |2 +-
 board/freescale/p1_p2_rdb_pc/ddr.c  |2 +-
 board/freescale/p1_twr/ddr.c|2 +-
 board/sbc8548/sbc8548.c |4 +-
 board/socrates/socrates.c   |2 +-
 board/xes/xpedite537x/ddr.c |2 +-
 drivers/spi/fsl_espi.c  |2 +-
 include/e500.h  |   16 ++--
 include/mpc86xx.h   |6 +-
 17 files changed, 149 insertions(+), 146 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index 66bc6a2..b77964a 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -135,78 +135,79 @@ int checkcpu (void)
if (!(i  3))
printf (\n   );
printf(CPU%d:%-4s MHz, , core,
-   strmhz(buf1, sysinfo.freqProcessor[core]));
+   strmhz(buf1, sysinfo.freq_processor[core]));
}
-   printf(\n   CCB:%-4s MHz,\n, strmhz(buf1, sysinfo.freqSystemBus));
+   printf(\n   CCB:%-4s MHz,, strmhz(buf1, sysinfo.freq_systembus));
+   printf(\n);
 
 #ifdef CONFIG_FSL_CORENET
if (ddr_sync == 1) {
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Synchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
} else {
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Asynchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
}
 #else
switch (ddr_ratio) {
case 0x0:
printf(   DDR:%-4s MHz (%s MT/s data rate), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
break;
case 0x7:
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Synchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
break;
default:
printf(   DDR:%-4s MHz (%s MT/s data rate) 
(Asynchronous), ,
-   strmhz(buf1, sysinfo.freqDDRBus/2),
-   strmhz(buf2, sysinfo.freqDDRBus));
+   strmhz(buf1, sysinfo.freq_ddrbus/2),
+   strmhz(buf2, sysinfo.freq_ddrbus));
break;
}
 #endif
 
 #if defined(CONFIG_FSL_LBC)
-   if (sysinfo.freqLocalBus  LCRR_CLKDIV) {
-   printf(LBC:%-4s MHz\n, strmhz(buf1, sysinfo.freqLocalBus));
+   if (sysinfo.freq_localbus  LCRR_CLKDIV) {
+   printf(LBC:%-4s MHz\n, strmhz(buf1, sysinfo.freq_localbus));
} else {
printf(LBC: unknown (LCRR[CLKDIV] = 0x%02lx)\n,
-  sysinfo.freqLocalBus);
+  sysinfo.freq_localbus);
}
 #endif
 
 #if defined(CONFIG_FSL_IFC)
-   printf(IFC:%-4s MHz\n, strmhz(buf1, sysinfo.freqLocalBus));
+   printf(IFC:%-4s MHz\n, strmhz(buf1, sysinfo.freq_localbus));
 #endif
 
 #ifdef CONFIG_CPM2
-   printf(CPM:   %s MHz\n, strmhz(buf1, sysinfo.freqSystemBus));
+   printf(CPM:   %s MHz\n, strmhz(buf1, sysinfo.freq_systembus));
 #endif
 
 #ifdef CONFIG_QE
-   printf(   QE:%-4s MHz\n, strmhz(buf1, sysinfo.freqQE));
+   printf(   QE:%-4s MHz\n, strmhz(buf1, sysinfo.freq_qe));
 #endif
 
 

Re: [U-Boot] [PATCH] net: macb: fix the building warning

2013-08-16 Thread Andreas Bießmann
Hi Bo,

On 16.08.13 03:46, Bo Shen wrote:
 fix the following building warning
 ---8---
 macb.c: In function 'macb_init':
 macb.c:400:14: warning: 'phydev' may be used uninitialized in this function
 macb.c:377:21: note: 'phydev' was declared here
 ---8---
 
 Signed-off-by: Bo Shen voice.s...@atmel.com
 
 ---
  drivers/net/macb.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/macb.c b/drivers/net/macb.c
 index 1f7cc32..90ae42d 100644
 --- a/drivers/net/macb.c
 +++ b/drivers/net/macb.c
 @@ -374,7 +374,7 @@ static int macb_phy_init(struct macb_device *macb)
  {
   struct eth_device *netdev = macb-netdev;
  #ifdef CONFIG_PHYLIB
 - struct phy_device *phydev;
 + struct phy_device *phydev = NULL;

NAK, this will deference a NULL pointer later on ...

Best regards

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


[U-Boot] [PATCH] i2c:multibus:fix: Correct I2C_MULTI_BUS value when support for many buses is enabled

2013-08-16 Thread Lukasz Majewski
The I2C_MULTI_BUS needs to be defined for correct I2C operation with
many software emulated I2C controllers.

This fix restores correct value of the I2C_MULTI_BUS changed by following
commit:

SHA1: 385c9ef5a7215b2b0c22836fee6c692dfc8559d7
i2c: add i2c_core and prepare for new multibus support

Signed-off-by: Lukasz Majewski l.majew...@samsung.com
Cc: Heiko Schocher h...@denx.de
---
 include/i2c.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/i2c.h b/include/i2c.h
index d8674ef..8fd17d1 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -390,7 +390,7 @@ unsigned int i2c_get_bus_speed(void);
 # if !defined(CONFIG_SYS_MAX_I2C_BUS)
 #  define CONFIG_SYS_MAX_I2C_BUS   2
 # endif
-# define I2C_MULTI_BUS 0
+# define I2C_MULTI_BUS 1
 #else
 # define CONFIG_SYS_MAX_I2C_BUS1
 # define I2C_MULTI_BUS 0
-- 
1.7.10.4

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


[U-Boot] [PATCH] i2c:samsung: Adjust Trats, GONI and Universal_c210 boards to work with new I2C framework

2013-08-16 Thread Lukasz Majewski
New I2C framework, introduced after v2013.07 final release, imposed I2C
code adjustment for some Samsung boards - namely Trats, GONI and Universal_c210.

Those boards were using schematic based I2C enumeration (I2C_5, I2C_9).
However, new I2C framework imposes usage of logical I2C adapters numbering
(e.g. I2C_0, I2C_1, etc).

Additionally, I2C_GET_* macros were replaced with i2c_*_bus_num() functions.

Trats board gained definition of second soft I2C adapter.

Signed-off-by: Lukasz Majewski l.majew...@samsung.com
Cc: Minkyu Kang mk7.k...@samsung.com
Cc: Heiko Schocher h...@denx.de
---
 board/samsung/common/multi_i2c.c |   14 ++
 board/samsung/goni/goni.c|6 +-
 board/samsung/trats/trats.c  |   17 -
 board/samsung/universal_c210/universal.c |4 
 include/configs/trats.h  |3 +++
 5 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/board/samsung/common/multi_i2c.c b/board/samsung/common/multi_i2c.c
index 4fce987..084858d 100644
--- a/board/samsung/common/multi_i2c.c
+++ b/board/samsung/common/multi_i2c.c
@@ -11,13 +11,12 @@
 /* Handle multiple I2C buses instances */
 int get_multi_scl_pin(void)
 {
-   unsigned int bus = I2C_GET_BUS();
+   unsigned int bus = i2c_get_bus_num();
 
switch (bus) {
-   case I2C_0: /* I2C_0 definition - compatibility layer */
-   case I2C_5:
+   case I2C_0:
return CONFIG_SOFT_I2C_I2C5_SCL;
-   case I2C_9:
+   case I2C_1:
return CONFIG_SOFT_I2C_I2C9_SCL;
default:
printf(I2C_%d not supported!\n, bus);
@@ -28,13 +27,12 @@ int get_multi_scl_pin(void)
 
 int get_multi_sda_pin(void)
 {
-   unsigned int bus = I2C_GET_BUS();
+   unsigned int bus = i2c_get_bus_num();
 
switch (bus) {
-   case I2C_0: /* I2C_0 definition - compatibility layer */
-   case I2C_5:
+   case I2C_0:
return CONFIG_SOFT_I2C_I2C5_SDA;
-   case I2C_9:
+   case I2C_1:
return CONFIG_SOFT_I2C_I2C9_SDA;
default:
printf(I2C_%d not supported!\n, bus);
diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index c05801d..5b3d6ef 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -32,7 +32,11 @@ int power_init_board(void)
 {
int ret;
 
-   ret = pmic_init(I2C_5);
+   /*
+* For PMIC the I2C bus is named as I2C5, but it is connected
+* to logical I2C adapter 0
+*/
+   ret = pmic_init(I2C_0);
if (ret)
return ret;
 
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index c8698f3..7f61d17 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -61,10 +61,10 @@ void i2c_init_board(void)
struct exynos4_gpio_part2 *gpio2 =
(struct exynos4_gpio_part2 *)samsung_get_base_gpio_part2();
 
-   /* I2C_5 - PMIC */
+   /* I2C_5 - PMIC - Adapter 0 */
s5p_gpio_direction_output(gpio1-b, 7, 1);
s5p_gpio_direction_output(gpio1-b, 6, 1);
-   /* I2C_9 - FG */
+   /* I2C_9 - FG - Adapter 1 */
s5p_gpio_direction_output(gpio2-y4, 0, 1);
s5p_gpio_direction_output(gpio2-y4, 1, 1);
 }
@@ -282,10 +282,17 @@ int power_init_board(void)
struct power_battery *pb;
struct pmic *p_fg, *p_chrg, *p_muic, *p_bat;
 
-   ret = pmic_init(I2C_5);
+   /*
+* For PMIC/MUIC the I2C bus is named as I2C5, but it is connected
+* to logical I2C adapter 0
+*
+* The FUEL_GAUGE is marked as I2C9 on the schematic, but connected
+* to logical I2C adapter 1
+*/
+   ret = pmic_init(I2C_0);
ret |= pmic_init_max8997();
-   ret |= power_fg_init(I2C_9);
-   ret |= power_muic_init(I2C_5);
+   ret |= power_fg_init(I2C_1);
+   ret |= power_muic_init(I2C_0);
ret |= power_bat_init(0);
if (ret)
return ret;
diff --git a/board/samsung/universal_c210/universal.c 
b/board/samsung/universal_c210/universal.c
index 2e1dba6..54d0e1e 100644
--- a/board/samsung/universal_c210/universal.c
+++ b/board/samsung/universal_c210/universal.c
@@ -45,6 +45,10 @@ int power_init_board(void)
 {
int ret;
 
+   /*
+* For PMIC the I2C bus is named as I2C5, but it is connected
+* to logical I2C adapter 0
+*/
ret = pmic_init(I2C_5);
if (ret)
return ret;
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 9b6aac9..24ea06b 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -263,6 +263,9 @@
 #define CONFIG_SYS_I2C_SOFT/* I2C bit-banged */
 #define CONFIG_SYS_I2C_SOFT_SPEED  5
 #define CONFIG_SYS_I2C_SOFT_SLAVE  0xFE
+#define I2C_SOFT_DECLARATIONS2
+#define CONFIG_SYS_I2C_SOFT_SPEED_2 5
+#define CONFIG_SYS_I2C_SOFT_SLAVE_2 0x7F
 #define 

Re: [U-Boot] [PATCH v6 0/3] Add TI816X EVM support

2013-08-16 Thread Tom Rini
On Tue, Jul 02, 2013 at 12:05:57PM +0200, TENART Antoine wrote:

 Changes for v6:
 - fix typo in commit message
 
 Changes for v5:
 - use wd_timer structure for WDT
 - remove some magic
 - remove memtest and verify from config
 - fix a redefinition warning (VTP1_CTRL_ADDR)
 - rebase on top of ARM: AM33xx: Cleanup clocks and hwinit
 
 Changes for v4:
 - add arch_cpu_init function
 - rework the ddr initialization and move it to clock_ti816x.c
 - move common definitions from clock_ti814x.c to clock_ti81xx.h
 
 Changes for v3:
 - fix a compile error when using DDR2
 - rename misspelled CONFIG_EXTRA_ENV_SETTINGS in ti816x_evm.h
   (was CONFIG_EXTRA_EMV_SETTINGS)
 
 Changes for v2:
 - patches 2-7 squashed into a single patch Add TI816X support
 - removed all unused definitions
 - removed my definition of DMM_BASE and reworked the DMM initialization
   using the common config_dmm() from emif4.c
 - fixed coding style problems
 - now use the fallback CONFIG_SYS_BAUDRATE_TABLE
 - kept LONGHELP support
 - removed redefinition of the device type section in cpu_ti816x.h
 
 Antoine Tenart (3):
   Prepare for TI816X : reuse existing code from TI814X
   Add TI816X support
   Add TI816X evm board support
 
  MAINTAINERS|4 +
  Makefile   |2 +-
  arch/arm/cpu/armv7/Makefile|2 +-
  arch/arm/cpu/armv7/am33xx/Makefile |1 +
  arch/arm/cpu/armv7/am33xx/clock_ti814x.c   |   95 -
  arch/arm/cpu/armv7/am33xx/clock_ti816x.c   |  445 
 
  arch/arm/cpu/armv7/am33xx/emif4.c  |2 +
  arch/arm/cpu/armv7/omap-common/Makefile|2 +-
  arch/arm/include/asm/arch-am33xx/clock.h   |4 +
  arch/arm/include/asm/arch-am33xx/clock_ti81xx.h|  142 +++
  arch/arm/include/asm/arch-am33xx/cpu.h |2 +-
  arch/arm/include/asm/arch-am33xx/ddr_defs.h|   35 +-
  arch/arm/include/asm/arch-am33xx/hardware.h|   10 +-
  arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |6 +
  arch/arm/include/asm/arch-am33xx/hardware_ti814x.h |6 +
  arch/arm/include/asm/arch-am33xx/hardware_ti816x.h |   57 +++
  arch/arm/include/asm/arch-am33xx/mmc_host_def.h|3 +
  arch/arm/include/asm/arch-am33xx/mux.h |2 +
  arch/arm/include/asm/arch-am33xx/mux_ti816x.h  |  363 
  arch/arm/include/asm/arch-am33xx/omap.h|2 +-
  arch/arm/include/asm/arch-am33xx/spl.h |   11 +-
  board/ti/ti816x/Makefile   |   47 +++
  board/ti/ti816x/evm.c  |  229 ++
  boards.cfg |1 +
  drivers/serial/ns16550.c   |4 +-
  include/configs/ti816x_evm.h   |  180 
  spl/Makefile   |2 +-
  27 files changed, 1534 insertions(+), 125 deletions(-)
  create mode 100644 arch/arm/cpu/armv7/am33xx/clock_ti816x.c
  create mode 100644 arch/arm/include/asm/arch-am33xx/clock_ti81xx.h
  create mode 100644 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h
  create mode 100644 arch/arm/include/asm/arch-am33xx/mux_ti816x.h
  create mode 100644 board/ti/ti816x/Makefile
  create mode 100644 board/ti/ti816x/evm.c
  create mode 100644 include/configs/ti816x_evm.h

After adapting to some other changes, applied to u-boot-ti/master,
thanks!

-- 
Tom


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


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

2013-08-16 Thread Tom Rini
On Wed, Aug 14, 2013 at 12:11:03PM -0700, York Sun wrote:

 Tom,
 
 The following changes since commit b98d934128bcd98106e764d2f492ac79c38ae53d:
 
   Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx (2013-08-13
 09:14:02 -0400)
 
 are available in the git repository at:
 
 
   git://git.denx.de/u-boot-mpc85xx.git master
 
 for you to fetch changes up to 49d87b1325fde11ebac60d8dc1cbd4c2c11d3973:
 
   include/fsl_usb.h: Cleanup license header (2013-08-14 11:29:51 -0700)
 
 
 Po Liu (1):
   powerpc/c29xpcie: add readme document for c29xpcie
 
 Prabhakar Kushwaha (1):
   powerpc/mpc85xx:Avoid hardcoded init for serdes block 1  2
 
 York Sun (1):
   include/fsl_usb.h: Cleanup license header
 
 ramneek mehresh (2):
   fsl/usb: Move USB internal phy definitions to fsl_usb.h
   powerpc/usb: Depricate usb_phy_type and usb_dr_mode uboot env
 variables
 
  arch/powerpc/cpu/mpc85xx/cpu_init.c|7 +-
  arch/powerpc/cpu/mpc85xx/fsl_corenet2_serdes.c |   16 
  arch/powerpc/cpu/mpc8xxx/fdt.c |   22 --
  arch/powerpc/include/asm/config_mpc85xx.h  |4 +
  arch/powerpc/include/asm/immap_85xx.h  |   48 
  board/freescale/c29xpcie/README|  100
 
  include/fsl_usb.h  |   64 +++
  7 files changed, 188 insertions(+), 73 deletions(-)
  create mode 100644 board/freescale/c29xpcie/README
  create mode 100644 include/fsl_usb.h
 
 I am still working on the remaining patches.

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 V2 0/6] ARM: AM43xx: Add Support for AM43xx Soc's

2013-08-16 Thread Tom Rini
On Tue, Jul 30, 2013 at 11:36:26AM +0530, Lokesh Vutla wrote:

 AM43xx is a low cost Cortex-A9 based application processor
 targets higher performance applications and new specific end
 equipments like Point of Sale requiring stringent security requirements.
 This series add support for AM43xx Soc's.
 
 Data for the following is not added:
 - SDRAM
 - DPLL Dividers and post dividers
 - Pin mux data(only uart data added).
 Once this data is available Ill add them.
 Config file is kept minimal for now, ll add the corresponding configs when
 they are validated.
 
 This is on top of u-boot-ti + V2 of AM33xx cleanup series.
 http://u-boot.10912.n7.nabble.com/PATCH-V2-0-4-ARM-AM33xx-Cleanup-clocks-and-hwinit-tt160272.html
 
 Testing:
 Tested on pre-silicon platform
 verified ./MAKEALL --cpu=armv7
./MAKEALL -s am33xx
 
 Changes Since V1:
 - Rebased on top of u-boot-ti + V2 of AM33xx Cleanup
 - Updated License header for new files.
 
 Lokesh Vutla (6):
   ARM: AM43xx: Add Board files
   ARM: AM43xx: Add header files
   ARM: AM43xx: clocks: Add dpll and clock data
   ARM: OMAP: Add CONFIG_OMAP_COMMON
   ARM: AM43xx: Add build support
   ARM: AM43xx: Add config file
 
  Makefile   |2 +-
  arch/arm/config.mk |2 +-
  arch/arm/cpu/armv7/Makefile|2 +-
  arch/arm/cpu/armv7/am33xx/Makefile |7 +-
  arch/arm/cpu/armv7/am33xx/clock_am43xx.c   |  110 +
  arch/arm/cpu/armv7/omap-common/Makefile|2 +-
  arch/arm/cpu/armv7/omap-common/boot-common.c   |3 +-
  arch/arm/include/asm/arch-am33xx/cpu.h |  164 
 +++-
  arch/arm/include/asm/arch-am33xx/hardware.h|8 +-
  arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |9 ++
  .../{hardware_am33xx.h = hardware_am43xx.h}   |   18 ++-
  arch/arm/include/asm/arch-am33xx/hardware_ti814x.h |9 ++
  arch/arm/include/asm/arch-am33xx/mux.h |2 +
  arch/arm/include/asm/arch-am33xx/mux_am43xx.h  |  143 +
  arch/arm/include/asm/arch-am33xx/omap.h|9 +-
  arch/arm/include/asm/arch-am33xx/spl.h |4 +-
  board/ti/am43xx/Makefile   |   38 +
  board/ti/am43xx/board.c|   57 +++
  board/ti/am43xx/board.h|   17 ++
  board/ti/am43xx/mux.c  |   27 
  boards.cfg |1 +
  drivers/serial/ns16550.c   |5 +-
  include/configs/am335x_evm.h   |1 +
  include/configs/am3517_crane.h |1 +
  include/configs/am3517_evm.h   |1 +
  include/configs/am43xx_evm.h   |  135 
  include/configs/cm_t35.h   |1 +
  include/configs/devkit8000.h   |1 +
  include/configs/dig297.h   |1 +
  include/configs/igep0033.h |1 +
  include/configs/igep00x0.h |1 +
  include/configs/mcx.h  |1 +
  include/configs/nokia_rx51.h   |1 +
  include/configs/omap3_beagle.h |1 +
  include/configs/omap3_evm_common.h |1 +
  include/configs/omap3_logic.h  |1 +
  include/configs/omap3_mvblx.h  |1 +
  include/configs/omap3_overo.h  |1 +
  include/configs/omap3_pandora.h|1 +
  include/configs/omap3_sdp3430.h|1 +
  include/configs/omap3_zoom1.h  |1 +
  include/configs/omap3_zoom2.h  |1 +
  include/configs/omap4_common.h |1 +
  include/configs/omap5_common.h |1 +
  include/configs/pcm051.h   |1 +
  include/configs/tam3517-common.h   |1 +
  include/configs/ti814x_evm.h   |1 +
  include/configs/tricorder.h|1 +
  spl/Makefile   |2 +-
  49 files changed, 766 insertions(+), 35 deletions(-)
  create mode 100644 arch/arm/cpu/armv7/am33xx/clock_am43xx.c
  copy arch/arm/include/asm/arch-am33xx/{hardware_am33xx.h = 
 hardware_am43xx.h} (69%)
  create mode 100644 arch/arm/include/asm/arch-am33xx/mux_am43xx.h
  create mode 100644 board/ti/am43xx/Makefile
  create mode 100644 board/ti/am43xx/board.c
  create mode 100644 board/ti/am43xx/board.h
  create mode 100644 board/ti/am43xx/mux.c
  create mode 100644 include/configs/am43xx_evm.h

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

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de

Re: [U-Boot] [PATCH V2 0/4]ARM: AM33xx: Cleanup clocks and hwinit

2013-08-16 Thread Tom Rini
On Tue, Jul 30, 2013 at 10:48:51AM +0530, Lokesh Vutla wrote:

 This series tries to cleanup code for AM33xx,
 inorder to ensure code reusabilty by moving the
 duplicated code to common place.
 This also helps in addition of new Soc with minimal
 changes.
 
 Testing:
 Boot tested on BeagleBone White/Black, AM35xx EVM/EVMSK.
 Verified ./MAKEALL -s am33xx.
 
 Changes Since V1:
 - Rebased on top of u-boot-ti
 - Created a function get_dpll_ddr_params() for getting
   ddr dpll params from board files.
 - Updated License header for newly created files.
 
 Heiko Schocher (1):
   ARM: AM33xx: Move s_init to a common place
 
 Lokesh Vutla (3):
   ARM: AM33xx: Cleanup dplls data
   ARM: AM33xx: Cleanup clocks layer
   musb: Disable extra prints
 
  arch/arm/cpu/armv7/am33xx/Makefile   |1 +
  arch/arm/cpu/armv7/am33xx/board.c|   68 ++-
  arch/arm/cpu/armv7/am33xx/clock.c|  171 
  arch/arm/cpu/armv7/am33xx/clock_am33xx.c |  495 
 +-
  arch/arm/cpu/armv7/am33xx/clock_ti814x.c |   25 +-
  arch/arm/cpu/armv7/am33xx/emif4.c|5 +-
  arch/arm/include/asm/arch-am33xx/clock.h |   94 
  arch/arm/include/asm/arch-am33xx/clocks_am33xx.h |6 +-
  arch/arm/include/asm/arch-am33xx/sys_proto.h |9 +-
  board/isee/igep0033/board.c  |   55 +--
  board/phytec/pcm051/board.c  |   57 +--
  board/ti/am335x/board.c  |  102 ++---
  board/ti/am335x/mux.c|   19 +
  board/ti/ti814x/evm.c|   65 +--
  drivers/usb/musb-new/musb_core.c |   20 +-
  15 files changed, 573 insertions(+), 619 deletions(-)
  create mode 100644 arch/arm/cpu/armv7/am33xx/clock.c

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

-- 
Tom


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


Re: [U-Boot] [PATCH v2 0/9] Introduce common config file for TI ARMv7 platforms

2013-08-16 Thread Tom Rini
On Fri, Aug 09, 2013 at 11:22:11AM -0400, Tom Rini wrote:

 Hey all,
 
 The following series cleans up am335x a bit, and then uses that to
 introduce a common config file that can be used on all of the ARMv7
 platforms from TI.  This series converts am335x_evm, omap5_uevm and
 dra7xx_evm to use the new structure.  There is room for further cleanup
 and consolidation but as they are invasive patches I don't want to hold
 these for too long.  This is on top of u-boot-arm/master.  The changes
 since v1 are to address Dan's comments, add links to the TI site for
 where to find docs for the SoC family and drop the first patch about
 V_OSCK after Heiko and Lars comments.  Acked/Tested-bys are added for
 otherwise unchanged parts.

Applied to u-boot-ti/master.

-- 
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 0/4] arm, da850: add ipam390 board support

2013-08-16 Thread Tom Rini
On Mon, Aug 05, 2013 at 04:00:34PM +0200, Heiko Schocher wrote:

 add the am1808 based ipam390 board from Barix.
 
 - 128MByte, DDR2, synchronous RAM 16bit databus to SDRAM
   interface
 - 128MByte, NAND Flash, 8bit databus to the NANDFlash
   Interface
 - Ethernet PHY Micrel KSZ8051R via RMII
 - Console on UART 0
 - booting fron nand flash
 - spl falcon bootmode
 
 Needed patches posted on the ML but not yet in mainline:
 - [U-Boot,05/10] arm: spl: For Falcon Mode, set a default machid of ~0
   http://patchwork.ozlabs.org/patch/264336/
 
 applies on git://git.denx.de/u-boot-ti.git master
 last commit:
 
 commit 500a0daeecf36b72797c53ef78d9ad096a464d32
 Author: Dan Murphy dmur...@ti.com
 Date:   Thu Jul 11 13:10:27 2013 -0500
 gpio: tca642x: Add the tca642x gpio expander driver
 
 I am on vacation for two weeks, so I maybe not able to respond
 immediately but as the merge window closes soon, I post this
 board support now ...
 
 Heiko Schocher (4):
   arm/davinci/da850: add uart0_pins_rtscts and RMII_MHz_50_CLK in
 emac_pins_rmii pinmux
   bootstage: get more BOOTSTAGE_ID* in show_boot_progress()
   arm, da850: enable the correct uart in arch_cpu_init()
   arm, da850: add ipam390 board support
 
  MAINTAINERS |   1 +
  arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c |   4 +
  arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c   |   6 +
  arch/arm/include/asm/arch-davinci/pinmux_defs.h |   3 +-
  board/Barix/ipam390/Makefile|  29 ++
  board/Barix/ipam390/README.ipam390  | 229 
  board/Barix/ipam390/ipam390-ais-uart.cfg| 202 ++
  board/Barix/ipam390/ipam390.c   | 348 
 
  board/Barix/ipam390/u-boot-spl-ipam390.lds  |  53 
  boards.cfg  |   1 +
  include/bootstage.h |   1 +
  include/configs/ipam390.h   | 331 ++
  12 Dateien ge??ndert, 1207 Zeilen hinzugef??gt(+), 1 Zeile entfernt(-)
  create mode 100644 board/Barix/ipam390/Makefile
  create mode 100644 board/Barix/ipam390/README.ipam390
  create mode 100644 board/Barix/ipam390/ipam390-ais-uart.cfg
  create mode 100644 board/Barix/ipam390/ipam390.c
  create mode 100644 board/Barix/ipam390/u-boot-spl-ipam390.lds
  create mode 100644 include/configs/ipam390.h

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

-- 
Tom


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


[U-Boot] [PATCH] pmic:i2c: Replace legacy I2C_SET_BUS macro with i2c_set_bus_num()

2013-08-16 Thread Lukasz Majewski
After introduction of unified i2c model, the I2C_SET_BUS() macro is regarded
as obsolete.
Hence it is replaced with i2c_set_bus_num() function call.

Signed-off-by: Lukasz Majewski l.majew...@samsung.com
Cc: Heiko Schocher h...@denx.de
Cc: Tom Rini tr...@ti.com
---
 drivers/power/power_i2c.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index 66b3bab..ac76870 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -98,7 +98,7 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
 
 int pmic_probe(struct pmic *p)
 {
-   I2C_SET_BUS(p-bus);
+   i2c_set_bus_num(p-bus);
debug(Bus: %d PMIC:%s probed!\n, p-bus, p-name);
if (i2c_probe(pmic_i2c_addr)) {
printf(Can't find PMIC:%s\n, p-name);
-- 
1.7.10.4

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


Re: [U-Boot] ARM: omap3: Implement dpll5 (HSUSB clk) workaround for OMAP36xx/AM/DM37xx according to errata sprz318e.

2013-08-16 Thread Tom Rini
On Tue, Jul 09, 2013 at 09:43:17AM +0200, Naumann Andreas wrote:

 In chapter 'Advisory 2.1 USB Host Clock Drift Causes USB Spec
 Non-compliance in Certain Configurations' of the TI Errata it is
 recommended to use certain div/mult values for the DPLL5 clock setup.
 So far u-boot used the old 34xx values, so I added the errata
 recommended values specificly for 36xx init only.  Also, the FSEL
 registers exist no longer, so removed them from init.
 
 Tested this on a AM3703 board with 19.2MHz oscillator, which
 previously couldnt lock the dpll5 (kernel complained). As a
 consequence the EHCI USB port wasnt usable in U-Boot and kernel. With
 this patch, kernel panics disappear and USB working fine in u-boot and
 kernel.
 
 Signed-off-by: Andreas Naumann anaum...@ultratronik.de

Applied to u-boot-ti/master with a prototype added to
asm/arch-omap3/clock.h to avoid a warning.

-- 
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 0/5] ARM: IGEP0033: Updates for next release.

2013-08-16 Thread Tom Rini
On Thu, Jul 25, 2013 at 09:27:35AM +0200, Enric Balletbo i Serra wrote:

 From: Enric Balletbo i Serra eballe...@iseebcn.com
 
 Hello,
 
 These are some updates to improve the support for IGEP COM AQUILA. Please
 consider adding for next release.
 
 Best regards,
 
 Enric Balletbo i Serra (5):
   ARM: IGEP0033: Remove undef of CONFIG_CMD_MEMTEST
   ARM: IGEP0033: Add support for Flattened Device Tree.
   ARM: IGEP0033: Remove CYGNUS name from header.
   ARM: IGEP0033: Add support to boot from NAND.
   ARM: IGEP0033: Remove duplicate / unused #defines.
 
  board/isee/igep0033/board.c |  2 +-
  board/isee/igep0033/board.h |  2 +-
  include/configs/igep0033.h  | 78 
 +++--
  3 files changed, 42 insertions(+), 40 deletions(-)

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

-- 
Tom


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


Re: [U-Boot] [U-Boot, 1/2] omap: overo: update support for Micron 1GB POP

2013-08-16 Thread Tom Rini
On Wed, Jul 24, 2013 at 12:22:34PM -0700, Ash Charles wrote:

 From: Steve Sakoman st...@sakoman.com
 
 Signed-off-by: Ash Charles ashchar...@gmail.com
 
 ---
 board/overo/overo.c |6 ++
  board/overo/overo.h |1 +
  2 files changed, 7 insertions(+)

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

-- 
Tom


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


Re: [U-Boot] [U-Boot, 2/2] omap: overo: Use 200MHz SDRC timings for revision 1, 2 3 boards

2013-08-16 Thread Tom Rini
On Wed, Jul 24, 2013 at 12:22:35PM -0700, Ash Charles wrote:

 From: Ash Charles ashchar...@gmail.com
 
 Gumstix uses 200Mhz RAM on revision 1, 2  3 COMs, so use 200MHz
 timings rather than 165MHz.  Based on 6cf8bf44b1f8550e12f7f2a16e01890e5de8443d
 
 Signed-off-by: Ash Charles ashchar...@gmail.com

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

-- 
Tom


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


Re: [U-Boot] omap: emif: Set initial DDR PHY config first

2013-08-16 Thread Tom Rini
On Tue, Aug 06, 2013 at 04:16:50PM +0300, Taras Kondratiuk wrote:

 Commit OMAP5: emif/ddr: Change emif settings as required for ES1.0 silicon
 (f40107345cbcd6e0d1747eda45e76c4e2a6df0db)
 changed sequence to set final DDR PHY config register value at the beginning.
 Looks like it was made by mistake and should be reverted.
 
 Signed-off-by: Taras Kondratiuk ta...@ti.com

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

-- 
Tom


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


Re: [U-Boot] [U-Boot, 2/2] OMAP3: igep00x0: allow booting with a FDT from MMC

2013-08-16 Thread Tom Rini
On Wed, Aug 07, 2013 at 05:53:19PM +0200, Javier Martinez Canillas wrote:

 IGEP boards now have Device Tree support in the mainline
 kernel. To boot an IGEP board using a DT, a uEnv.txt plain
 text file could be used to define a custom uenvcmd that will
 be run by the default boot command.
 
 It is more convenient to change the default boot command to
 allow loading a FDT if it is stored in the boot dir of the
 rootfs uSD/MMC partition.
 
 If no FDT is found then the defaul command tries to boot a
 zImage without a DT using legacy boot.
 
 Signed-off-by: Javier Martinez Canillas javier.marti...@collabora.co.uk

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

-- 
Tom


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


Re: [U-Boot] [U-Boot, 1/2] ARM: igep00x0.h: Enable the use of CMD_EXT4, CMD_FS_GENERIC and zImage.

2013-08-16 Thread Tom Rini
On Wed, Aug 07, 2013 at 05:53:18PM +0200, Javier Martinez Canillas wrote:

 From: Enric Balletbo i Serra eballe...@gmail.com
 
 Able to load the kernel from some form of ext[234] or FAT. Also, with v3.9 and
 later of the Linux Kernel, uImage isn't builtable anymore by default, so we
 should switch to use the bootz command.
 
 Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com

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

-- 
Tom


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


Re: [U-Boot] ARM: omap24xx: remove remainders of dead board

2013-08-16 Thread Tom Rini
On Mon, Aug 05, 2013 at 10:49:42AM +0900, Masahiro Yamada wrote:

 Since Commit 7f5eef9 removed OMAP2420H4 support,
 arm1136/omap24xx has not been used at all.
 
 Signed-off-by: Masahiro Yamada yamad...@jp.panasonic.com

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

-- 
Tom


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


Re: [U-Boot] ARM: omap3: Implement dpll5 (HSUSB clk) workaround for OMAP36xx/AM/DM37xx according to errata sprz318e.

2013-08-16 Thread Tom Rini
On Wed, Aug 14, 2013 at 09:53:16PM -0500, Peter A. Bigot wrote:
 On 07/09/2013 02:43 AM, Naumann Andreas wrote:
 In chapter 'Advisory 2.1 USB Host Clock Drift Causes USB Spec Non-compliance 
 in Certain Configurations' of the TI Errata it is recommended to use certain 
 div/mult values for the DPLL5 clock setup.
 So far u-boot used the old 34xx values, so I added the errata recommended 
 values specificly for 36xx init only.
 Also, the FSEL registers exist no longer, so removed them from init.
 
 Tested this on a AM3703 board with 19.2MHz oscillator, which previously 
 couldnt lock the dpll5 (kernel complained). As a consequence the EHCI USB 
 port wasnt usable in U-Boot and kernel. With this patch, kernel panics 
 disappear and USB working fine in u-boot and kernel.
 
 Signed-off-by: Andreas Naumann anaum...@ultratronik.de
 
 While this patch works with Linux that has been patched for this
 erratum, it will cause problems with some unpatched versions of
 Linux.

Right.  So Linux also needs to be patched for the erratum.

-- 
Tom


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


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

2013-08-16 Thread Tom Rini
Hey,

The following changes since commit fdce7b633a1de24456226b18527cc7900c34282a:

  gpio: omap5-uevm: Configure the tca6424 gpio expander (2013-07-30 09:21:42 
-0400)

are available in the git repository at:

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

for you to fetch changes up to 425faf74cd8189c87919f7e72a0101c684ee3b9f:

  Add TI816X evm board support (2013-08-15 18:38:37 -0400)


Ash Charles (1):
  omap: overo: Use 200MHz SDRC timings for revision 1, 2  3 boards

Enric Balletbo i Serra (5):
  ARM: IGEP0033: Remove undef of CONFIG_CMD_MEMTEST
  ARM: IGEP0033: Remove CYGNUS name from header.
  ARM: IGEP0033: Add support to boot from NAND.
  ARM: IGEP0033: Remove duplicate / unused #defines.
  ARM: igep00x0.h: Enable the use of CMD_EXT4, CMD_FS_GENERIC and zImage.

Enric Balletb?? i Serra (1):
  ARM: IGEP0033: Add support for Flattened Device Tree.

Heiko Schocher (5):
  ARM: AM33xx: Move s_init to a common place
  arm/davinci/da850: add uart0_pins_rtscts and RMII_MHz_50_CLK in 
emac_pins_rmii pinmux
  bootstage: get more BOOTSTAGE_ID* in show_boot_progress()
  arm, da850: enable the correct uart in arch_cpu_init()
  arm, da850: add ipam390 board support

Javier Martinez Canillas (1):
  OMAP3: igep00x0: allow booting with a FDT from MMC

Lokesh Vutla (9):
  ARM: AM33xx: Cleanup dplls data
  ARM: AM33xx: Cleanup clocks layer
  musb: Disable extra prints
  ARM: AM43xx: Add Board files
  ARM: AM43xx: Add header files
  ARM: AM43xx: clocks: Add dpll and clock data
  ARM: OMAP: Add CONFIG_OMAP_COMMON
  ARM: AM43xx: Add build support
  ARM: AM43xx: Add config file

Masahiro Yamada (1):
  ARM: omap24xx: remove remainders of dead board

Naumann Andreas (1):
  ARM: omap3: Implement dpll5 (HSUSB clk) workaround for OMAP36xx/AM/DM37xx 
according to errata sprz318e.

Steve Sakoman (1):
  omap: overo: update support for Micron 1GB POP

TENART Antoine (3):
  Prepare for TI816X : reuse existing code from TI814X
  Add TI816X support
  Add TI816X evm board support

Taras Kondratiuk (1):
  omap: emif: Set initial DDR PHY config first

Tom Rini (9):
  am33xx: CONFIG_DMA_COHERENT defines are unused, remove
  am33xx: Stop using PHYS_DRAM_1 define
  am335x_evm: Use default baud rate table
  arm: spl: For Falcon Mode, set a default machid of ~0
  am335x_evm: Bring in 'boot_fdt' logic from i.MX
  TI:am33xx: Create common config files for TI ARMv7 platforms, and AM33xx
  TI:omap5/dra7xx: Convert to ti_armv7_common.h
  TI:armv7: Enable CONFIG_CMD_SPI
  TI:armv7: Enable CONFIG_CMD_GPIO

 MAINTAINERS|5 +
 Makefile   |2 +-
 arch/arm/config.mk |2 +-
 arch/arm/cpu/arm1136/omap24xx/reset.S  |   26 -
 arch/arm/cpu/arm1136/omap24xx/timer.c  |  136 --
 arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|4 +
 arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c  |6 +
 arch/arm/cpu/armv7/Makefile|2 +-
 arch/arm/cpu/armv7/am33xx/Makefile |7 +
 arch/arm/cpu/armv7/am33xx/board.c  |   68 ++-
 arch/arm/cpu/armv7/am33xx/clock.c  |  171 +++
 arch/arm/cpu/armv7/am33xx/clock_am33xx.c   |  495 +---
 arch/arm/cpu/armv7/am33xx/clock_am43xx.c   |  110 +
 arch/arm/cpu/armv7/am33xx/clock_ti814x.c   |  120 +
 arch/arm/cpu/armv7/am33xx/clock_ti816x.c   |  445 ++
 arch/arm/cpu/armv7/am33xx/emif4.c  |   11 +-
 arch/arm/cpu/armv7/omap-common/Makefile|2 +-
 arch/arm/cpu/armv7/omap-common/boot-common.c   |3 +-
 arch/arm/cpu/armv7/omap-common/emif-common.c   |2 +-
 arch/arm/cpu/armv7/omap3/clock.c   |   20 +-
 arch/arm/cpu/armv7/omap3/lowlevel_init.S   |   18 +
 arch/arm/include/asm/arch-am33xx/clock.h   |   98 
 arch/arm/include/asm/arch-am33xx/clock_ti81xx.h|  142 ++
 arch/arm/include/asm/arch-am33xx/clocks_am33xx.h   |6 +-
 arch/arm/include/asm/arch-am33xx/cpu.h |  164 ++-
 arch/arm/include/asm/arch-am33xx/ddr_defs.h|   35 +-
 arch/arm/include/asm/arch-am33xx/hardware.h|   18 +-
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |   15 +
 arch/arm/include/asm/arch-am33xx/hardware_am43xx.h |   54 +++
 arch/arm/include/asm/arch-am33xx/hardware_ti814x.h |   15 +
 arch/arm/include/asm/arch-am33xx/hardware_ti816x.h |   61 +++
 arch/arm/include/asm/arch-am33xx/mmc_host_def.h|3 +
 arch/arm/include/asm/arch-am33xx/mux.h |4 +
 arch/arm/include/asm/arch-am33xx/mux_am43xx.h  |  142 ++
 arch/arm/include/asm/arch-am33xx/mux_ti816x.h  |  363 ++
 

Re: [U-Boot] [PATCH v4 0/8] ARMv7: Add HYP mode switching support

2013-08-16 Thread Andre Przywara

On 08/09/2013 06:55 PM, Christoffer Dall wrote:

On Fri, Aug 09, 2013 at 05:03:04PM +0200, Andre Przywara wrote:

(for GIT URL and Changelog see below)

ARM CPUs with the virtualization extension have a new mode called
HYP mode, which allows hypervisors to safely control and monitor
guests. The current hypervisor implementations (KVM and Xen)
require the kernel to be entered in that HYP mode.

This patch series introduces a configuration variable
CONFIG_ARMV7_VIRT which enables code to switch all cores into HYP
mode. This is done automatically during execution of the bootm
command.

The process of switching into HYP mode requires the CPU to be in
secure state initially when entering u-boot, it will then setup some
register and switch to non-secure state. This requires the GIC to be
programmed properly first. Explanations about the details are in the
commit messages of the respective patches.

The patches are structured like this:
1/8: prepare header file
2/8: add monitor handler (assembly)
3/8: add per CPU non-secure switch routine (assembly)
4/8: add system wide non-secure setup (C)
5/8: trigger non-secure switch during bootm command
6/8: add generic SMP functionality
7/8: add HYP mode switching
8/8: board specific code for ARM Versatile Express TC2

Since up to patch 6/8 this code works on non-virtualization capable
CPUs also and there has been a request, there is now a second
configuration variable CONFIG_ARMV7_NONSEC, which omits the final
HYP mode switch and just goes into non-secure SVC state.
You can specify either (or none) of them, the code cares about
the dependency.

The code aims to be as generic as possible, though currently it has
only been tested on the Versatile Express TC-2 board. The last patch
thus enables the feature for that board and should serve as an
example for supporting other boards.

For convenience there is a GIT tree which you can pull these patches
from (hypmode_v4 branch):
git://git.linaro.org/people/aprzywara/u-boot.git

Changes RFC..v1
* not a dedicated command anymore, code run by bootm  friends
* protecting code with #ifdefs to avoid unnecessary inclusion and
   accidental crashing (when accessing restricted registers)
* moving prototypes to header file to meet checkpatch recommendation
* adding comment as proposed by Christoffer

Changes v1..v2
mostly style and code layout changes
* restructure assembly code to live in a new file and not start.S
* split smp, nonsec_init and hyp_init to be separate functions
* used named constants from common header files
* split C function to be more readable
* extend comments to be more precise and elaborate
* add provision to override GIC base address (needed for Arndale?)
* add configuration variable to enable VExpress specific SMP code
* use writel/readl for MMIO GIC accesses
* remove superfluous isb instructions
* more minor fixes

Changes v2..v3
* fix clobbering of GICC address actually spoiling the stack
* do CNTFRQ setup in assembly per core (and not only once per SoC)
* moving the new code files into arch/arm/cpu/armv7
* add config variable for doing non-secure switch only
* use actual HYP and secure instructions mnemonics instead of
   the encoded byte sequence. This requires more recent compilers.
* make the identification of the CPU core more robust and saner
* use enum for error codes and rename them
* lots of smaller layout and style fixes

Changes v3..v4
* mask reserved bits in CBAR register
* move the VExpress board specific SMP code into the board directory
* embed error reporting in the respective functions and getting
   rid of the error code enum at all (by popular demand ;-)
* minor style fixes

Please review and comment!


Only had those very few nits sent separately, which can be fixed later
if we want.  Otherwise looks good.

Reviewed-by: Christoffer Dall christoffer.d...@linaro.org


Thanks, Christoffer.

Are there more concerns or comments about this?
Is there anything left I can do get these patches merged?

Albert, Tom,
do you need more ACKs or Reviewed-bys?

Kim, do you have time and expertise to look at these?

Thanks,
Andre.

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


Re: [U-Boot] [PATCH 1/6] sandbox: add compression tests

2013-08-16 Thread Kees Cook
On Thu, Aug 15, 2013 at 10:19 AM, Kees Cook keesc...@chromium.org wrote:
 On Wed, Aug 14, 2013 at 10:30 AM, Simon Glass s...@chromium.org wrote:
 On Mon, Aug 12, 2013 at 4:48 PM, Kees Cook keesc...@chromium.org wrote:
 This adds the test_compression command when building the sandbox. This
 tests the existing compression and decompression routines for simple
 sanity and for buffer overflow conditions.

 Signed-off-by: Kees Cook keesc...@chromium.org
 ---
  include/configs/sandbox.h |5 +
  test/Makefile |1 +
  test/compression.c|  384 
 +
  3 files changed, 390 insertions(+)
  create mode 100644 test/compression.c

[snip]
 diff --git a/test/compression.c b/test/compression.c
 new file mode 100644
 index 000..c78c8e4
 --- /dev/null
 +++ b/test/compression.c
[snip[
 +static int compress_using_bzip2(void *in, unsigned long in_size,
 +   void *out, unsigned long out_max,
 +   unsigned long *out_size)
 +{
 +   /* There is no bzip2 compression in u-boot, so fake it. */
 +   assert(in_size == strlen(plain));
 +   assert(memcmp(plain, in, in_size) == 0);
 +
 +   if (bzip2_compressed_size  out_max)

 debug() here?

 Sure, I'll add calls at these failure points.

Ah, I take that back. These tests get hit during normal testing. I'd
rather leave the debug() calls out since they're expected to be
exercised.

-Kees

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


Re: [U-Boot] ARM: omap3: Implement dpll5 (HSUSB clk) workaround for OMAP36xx/AM/DM37xx according to errata sprz318e.

2013-08-16 Thread Peter A. Bigot

On 08/16/2013 08:38 AM, Tom Rini wrote:

On Wed, Aug 14, 2013 at 09:53:16PM -0500, Peter A. Bigot wrote:

On 07/09/2013 02:43 AM, Naumann Andreas wrote:

In chapter 'Advisory 2.1 USB Host Clock Drift Causes USB Spec Non-compliance in 
Certain Configurations' of the TI Errata it is recommended to use certain 
div/mult values for the DPLL5 clock setup.
So far u-boot used the old 34xx values, so I added the errata recommended 
values specificly for 36xx init only.
Also, the FSEL registers exist no longer, so removed them from init.

Tested this on a AM3703 board with 19.2MHz oscillator, which previously couldnt 
lock the dpll5 (kernel complained). As a consequence the EHCI USB port wasnt 
usable in U-Boot and kernel. With this patch, kernel panics disappear and USB 
working fine in u-boot and kernel.

Signed-off-by: Andreas Naumann anaum...@ultratronik.de

While this patch works with Linux that has been patched for this
erratum, it will cause problems with some unpatched versions of
Linux.

Right.  So Linux also needs to be patched for the erratum.


Yes.  My point was that if you update u-boot alone, then try to use it 
to boot an unpatched Linux that assumes CM_CLKSEL5_PLL has its power-on 
value, USB will not work.


I think it's dangerous to assume that the mixture of an unpatched Linux 
with a patched u-boot will never occur, and the cause of the failure 
that results is pretty subtle.  So whatever gets merged would be safer 
if it restored the default setting of CM_CLKSEL5_PLL prior to handing 
off control to Linux.


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


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

2013-08-16 Thread Kees Cook
The output buffer size must not be reset by the gzip decoder or there
is a risk of overflowing memory during decompression.

Signed-off-by: Kees Cook keesc...@chromium.org
Acked-by: Simon Glass s...@chromium.org
---
 lib/gunzip.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/gunzip.c b/lib/gunzip.c
index 9959781..35abfb3 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -89,13 +89,13 @@ int zunzip(void *dst, int dstlen, unsigned char *src, 
unsigned long *lenp,
s.avail_out = dstlen;
do {
r = inflate(s, Z_FINISH);
-   if (r != Z_STREAM_END  r != Z_BUF_ERROR  stoponerr == 1) {
+   if (stoponerr == 1  r != Z_STREAM_END 
+   (s.avail_out == 0 || r != Z_BUF_ERROR)) {
printf(Error: inflate() returned %d\n, r);
inflateEnd(s);
return -1;
}
s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned 
char*)dst);
-   s.avail_out = dstlen;
} while (r == Z_BUF_ERROR);
*lenp = s.next_out - (unsigned char *) dst;
inflateEnd(s);
-- 
1.7.9.5

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


[U-Boot] [PATCH 5/6] lzo: correctly bounds-check output buffer

2013-08-16 Thread Kees Cook
This checks the size of the output buffer and fails if it was going to
overflow the buffer during lzo decompression.

Signed-off-by: Kees Cook keesc...@chromium.org
Acked-by: Simon Glass s...@chromium.org
---
 lib/lzo/lzo1x_decompress.c |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/lzo/lzo1x_decompress.c b/lib/lzo/lzo1x_decompress.c
index e6ff708..35f3793 100644
--- a/lib/lzo/lzo1x_decompress.c
+++ b/lib/lzo/lzo1x_decompress.c
@@ -68,13 +68,14 @@ int lzop_decompress(const unsigned char *src, size_t 
src_len,
unsigned char *start = dst;
const unsigned char *send = src + src_len;
u32 slen, dlen;
-   size_t tmp;
+   size_t tmp, remaining;
int r;
 
src = parse_header(src);
if (!src)
return LZO_E_ERROR;
 
+   remaining = *dst_len;
while (src  send) {
/* read uncompressed block size */
dlen = get_unaligned_be32(src);
@@ -93,6 +94,10 @@ int lzop_decompress(const unsigned char *src, size_t src_len,
if (slen = 0 || slen  dlen)
return LZO_E_ERROR;
 
+   /* abort if buffer ran out of room */
+   if (dlen  remaining)
+   return LZO_E_OUTPUT_OVERRUN;
+
/* decompress */
tmp = dlen;
r = lzo1x_decompress_safe((u8 *) src, slen, dst, tmp);
@@ -105,6 +110,7 @@ int lzop_decompress(const unsigned char *src, size_t 
src_len,
 
src += slen;
dst += dlen;
+   remaining -= dlen;
}
 
return LZO_E_INPUT_OVERRUN;
-- 
1.7.9.5

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


[U-Boot] [PATCH v2 0/6] handle compression buffer overflows

2013-08-16 Thread Kees Cook
v2: added acks, various suggested cleanups

This series fixes gzip, lzma, and lzo to not overflow when writing
to output buffers. Without this, it might be possible for untrusted
compressed input to overflow the buffers used to hold the decompressed
image.

To catch these conditions, I added a series of compression tests available
in the sandbox build. Without the fixes in patches 3, 4, and 5, the
overflows are visible.

Thanks,

-Kees

Kees Cook (6):
  sandbox: add compression tests
  documentation: add more compression configs
  gzip: correctly bounds-check output buffer
  lzma: correctly bounds-check output buffer
  lzo: correctly bounds-check output buffer
  bootm: allow correct bounds-check of destination

 README |9 ++
 common/cmd_bootm.c |2 +-
 include/configs/sandbox.h  |5 +
 lib/gunzip.c   |4 +-
 lib/lzma/LzmaTools.c   |8 +-
 lib/lzo/lzo1x_decompress.c |8 +-
 test/Makefile  |1 +
 test/compression.c |  335 
 8 files changed, 366 insertions(+), 6 deletions(-)
 create mode 100644 test/compression.c

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


[U-Boot] [PATCH 6/6] bootm: allow correct bounds-check of destination

2013-08-16 Thread Kees Cook
While nothing presently examines the destination size, it should at
least be correct so that future users of sys_mapmem() will not be
surprised. Without this, it might be possible to overflow memory.

Signed-off-by: Kees Cook keesc...@chromium.org
Acked-by: Simon Glass s...@chromium.org
---
 common/cmd_bootm.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 046e22f..0f67112 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -368,7 +368,7 @@ static int bootm_load_os(bootm_headers_t *images, unsigned 
long *load_end,
 
const char *type_name = genimg_get_type_name(os.type);
 
-   load_buf = map_sysmem(load, image_len);
+   load_buf = map_sysmem(load, unc_len);
image_buf = map_sysmem(image_start, image_len);
switch (comp) {
case IH_COMP_NONE:
-- 
1.7.9.5

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


[U-Boot] [PATCH 2/6] documentation: add more compression configs

2013-08-16 Thread Kees Cook
This adds the missing compression config items to the README.

Signed-off-by: Kees Cook keesc...@chromium.org
---
v2:
 - adjusted language slightly, thanks to Simon Glass
---
 README |9 +
 1 file changed, 9 insertions(+)

diff --git a/README b/README
index 3918807..6485350 100644
--- a/README
+++ b/README
@@ -1680,6 +1680,10 @@ CBFS (Coreboot Filesystem) support
to compress the specified memory at its best effort.
 
 - Compression support:
+   CONFIG_GZIP
+
+   Enabled by default to support gzip compressed images.
+
CONFIG_BZIP2
 
If this option is set, support for bzip2 compressed
@@ -1713,6 +1717,11 @@ CBFS (Coreboot Filesystem) support
then calculate the amount of needed dynamic memory (ensuring
the appropriate CONFIG_SYS_MALLOC_LEN value).
 
+   CONFIG_LZO
+
+   If this option is set, support for LZO compressed images
+   is included.
+
 - MII/PHY support:
CONFIG_PHY_ADDR
 
-- 
1.7.9.5

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


[U-Boot] [PATCH 4/6] lzma: correctly bounds-check output buffer

2013-08-16 Thread Kees Cook
The output buffer size must be correctly passed to the lzma decoder or
there is a risk of overflowing memory during decompression. Switching
to the LZMA_FINISH_END mode means nothing is left in an unknown state
once the buffer becomes full.

Signed-off-by: Kees Cook keesc...@chromium.org
Acked-by: Simon Glass s...@chromium.org
---
 lib/lzma/LzmaTools.c |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/lzma/LzmaTools.c b/lib/lzma/LzmaTools.c
index 8d1165e11b..0aec2f9 100644
--- a/lib/lzma/LzmaTools.c
+++ b/lib/lzma/LzmaTools.c
@@ -97,15 +97,19 @@ int lzmaBuffToBuffDecompress (unsigned char *outStream, 
SizeT *uncompressedSize,
 g_Alloc.Alloc = SzAlloc;
 g_Alloc.Free = SzFree;
 
+/* Short-circuit early if we know the buffer can't hold the results. */
+if (outSizeFull != (SizeT)-1  *uncompressedSize  outSizeFull)
+return SZ_ERROR_OUTPUT_EOF;
+
 /* Decompress */
-outProcessed = outSizeFull;
+outProcessed = *uncompressedSize;
 
 WATCHDOG_RESET();
 
 res = LzmaDecode(
 outStream, outProcessed,
 inStream + LZMA_DATA_OFFSET, compressedSize,
-inStream, LZMA_PROPS_SIZE, LZMA_FINISH_ANY, state, g_Alloc);
+inStream, LZMA_PROPS_SIZE, LZMA_FINISH_END, state, g_Alloc);
 *uncompressedSize = outProcessed;
 if (res != SZ_OK)  {
 return res;
-- 
1.7.9.5

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


[U-Boot] [PATCH 1/6] sandbox: add compression tests

2013-08-16 Thread Kees Cook
This adds the test_compression command when building the sandbox. This
tests the existing compression and decompression routines for simple
sanity and for buffer overflow conditions.

Signed-off-by: Kees Cook keesc...@chromium.org
---
v2:
 - updates, suggested by Simon Glass:
   - replace license text with correct stub
   - drop redundant #ifdefs
---
 include/configs/sandbox.h |5 +
 test/Makefile |1 +
 test/compression.c|  335 +
 3 files changed, 341 insertions(+)
 create mode 100644 test/compression.c

diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index af3d6ad..4027030 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -109,4 +109,9 @@
stdout=serial\0 \
stderr=serial\0
 
+#define CONFIG_GZIP_COMPRESSED
+#define CONFIG_BZIP2
+#define CONFIG_LZO
+#define CONFIG_LZMA
+
 #endif
diff --git a/test/Makefile b/test/Makefile
index 99ce890..a68613d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -9,6 +9,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)libtest.o
 
 COBJS-$(CONFIG_SANDBOX) += command_ut.o
+COBJS-$(CONFIG_SANDBOX) += compression.o
 
 COBJS  := $(sort $(COBJS-y))
 SRCS   := $(COBJS:.o=.c)
diff --git a/test/compression.c b/test/compression.c
new file mode 100644
index 000..8834d5e
--- /dev/null
+++ b/test/compression.c
@@ -0,0 +1,335 @@
+/*
+ * Copyright (c) 2013, The Chromium Authors
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#define DEBUG
+
+#include common.h
+#include command.h
+#include malloc.h
+
+#include u-boot/zlib.h
+#include bzlib.h
+
+#include lzma/LzmaTypes.h
+#include lzma/LzmaDec.h
+#include lzma/LzmaTools.h
+
+#include linux/lzo.h
+
+static const char plain[] =
+   I am a highly compressable bit of text.\n
+   I am a highly compressable bit of text.\n
+   I am a highly compressable bit of text.\n
+   There are many like me, but this one is mine.\n
+   If I were any shorter, there wouldn't be much sense in\n
+   compressing me in the first place. At least with lzo, anyway,\n
+   which appears to behave poorly in the face of short text\n
+   messages.\n;
+
+/* bzip2 -c /tmp/plain.txt  /tmp/plain.bz2 */
+static const char bzip2_compressed[] =
+   \x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\xe5\x63\xdd\x09\x00\x00
+   \x28\x57\x80\x00\x10\x40\x85\x20\x20\x04\x00\x3f\xef\xdf\xf0\x30
+   \x00\xd6\xd0\x34\x91\x89\xa6\xf5\x4d\x19\x1a\x19\x0d\x02\x34\xd4
+   \xc9\x00\x34\x34\x00\x02\x48\x41\x35\x4f\xd4\xc6\x88\xd3\x50\x3d
+   \x4f\x51\x82\x4f\x88\xc3\x0d\x05\x62\x4f\x91\xa3\x52\x1b\xd0\x52
+   \x41\x4a\xa3\x98\xc2\x6b\xca\xa3\x82\xa5\xac\x8b\x15\x99\x68\xad
+   \xdf\x29\xd6\xf1\xf7\x5a\x10\xcd\x8c\x26\x61\x94\x95\xfe\x9e\x16
+   \x18\x28\x69\xd4\x23\x64\xcc\x2b\xe5\xe8\x5f\x00\xa4\x70\x26\x2c
+   \xee\xbd\x59\x6d\x6a\xec\xfc\x31\xda\x59\x0a\x14\x2a\x60\x1c\xf0
+   \x04\x86\x73\x9a\xc5\x5b\x87\x3f\x5b\x4c\x93\xe6\xb5\x35\x0d\xa6
+   \xb1\x2e\x62\x7b\xab\x67\xe7\x99\x2a\x14\x5e\x9f\x64\xcb\x96\xf4
+   \x0d\x65\xd4\x39\xe6\x8b\x7e\xea\x1c\x03\x69\x97\x83\x58\x91\x96
+   \xe1\xf0\x9d\xa4\x15\x8b\xb8\xc6\x93\xdc\x3d\xd9\x3c\x22\x55\xef
+   \xfb\xbb\x2a\xd3\x87\xa2\x8b\x04\xd9\x19\xf8\xe2\xfd\x4f\xdb\x1a
+   \x07\xc8\x60\xa3\x3f\xf8\xbb\x92\x29\xc2\x84\x87\x2b\x1e\xe8\x48;
+static const unsigned long bzip2_compressed_size = 240;
+
+/* lzma -z -c /tmp/plain.txt  /tmp/plain.lzma */
+static const char lzma_compressed[] =
+   \x5d\x00\x00\x80\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x24\x88
+   \x08\x26\xd8\x41\xff\x99\xc8\xcf\x66\x3d\x80\xac\xba\x17\xf1\xc8
+   \xb9\xdf\x49\x37\xb1\x68\xa0\x2a\xdd\x63\xd1\xa7\xa3\x66\xf8\x15
+   \xef\xa6\x67\x8a\x14\x18\x80\xcb\xc7\xb1\xcb\x84\x6a\xb2\x51\x16
+   \xa1\x45\xa0\xd6\x3e\x55\x44\x8a\x5c\xa0\x7c\xe5\xa8\xbd\x04\x57
+   \x8f\x24\xfd\xb9\x34\x50\x83\x2f\xf3\x46\x3e\xb9\xb0\x00\x1a\xf5
+   \xd3\x86\x7e\x8f\x77\xd1\x5d\x0e\x7c\xe1\xac\xde\xf8\x65\x1f\x4d
+   \xce\x7f\xa7\x3d\xaa\xcf\x26\xa7\x58\x69\x1e\x4c\xea\x68\x8a\xe5
+   \x89\xd1\xdc\x4d\xc7\xe0\x07\x42\xbf\x0c\x9d\x06\xd7\x51\xa2\x0b
+   \x7c\x83\x35\xe1\x85\xdf\xee\xfb\xa3\xee\x2f\x47\x5f\x8b\x70\x2b
+   \xe1\x37\xf3\x16\xf6\x27\x54\x8a\x33\x72\x49\xea\x53\x7d\x60\x0b
+   \x21\x90\x66\xe7\x9e\x56\x61\x5d\xd8\xdc\x59\xf0\xac\x2f\xd6\x49
+   \x6b\x85\x40\x08\x1f\xdf\x26\x25\x3b\x72\x44\xb0\xb8\x21\x2f\xb3
+   \xd7\x9b\x24\x30\x78\x26\x44\x07\xc3\x33\xd1\x4d\x03\x1b\xe1\xff
+   \xfd\xf5\x50\x8d\xca;
+static const unsigned long lzma_compressed_size = 229;
+
+/* lzop -c /tmp/plain.txt  /tmp/plain.lzo */
+static const char lzo_compressed[] =
+   \x89\x4c\x5a\x4f\x00\x0d\x0a\x1a\x0a\x10\x30\x20\x60\x09\x40\x01
+   \x05\x03\x00\x00\x09\x00\x00\x81\xb4\x52\x09\x54\xf1\x00\x00\x00
+   \x00\x09\x70\x6c\x61\x69\x6e\x2e\x74\x78\x74\x65\xb1\x07\x9c\x00
+  

Re: [U-Boot] ARM: omap3: Implement dpll5 (HSUSB clk) workaround for OMAP36xx/AM/DM37xx according to errata sprz318e.

2013-08-16 Thread Robert Nelson
On Fri, Aug 16, 2013 at 9:34 AM, Peter A. Bigot p...@pabigot.com wrote:
 On 08/16/2013 08:38 AM, Tom Rini wrote:

 On Wed, Aug 14, 2013 at 09:53:16PM -0500, Peter A. Bigot wrote:

 On 07/09/2013 02:43 AM, Naumann Andreas wrote:

 In chapter 'Advisory 2.1 USB Host Clock Drift Causes USB Spec
 Non-compliance in Certain Configurations' of the TI Errata it is 
 recommended
 to use certain div/mult values for the DPLL5 clock setup.
 So far u-boot used the old 34xx values, so I added the errata
 recommended values specificly for 36xx init only.
 Also, the FSEL registers exist no longer, so removed them from init.

 Tested this on a AM3703 board with 19.2MHz oscillator, which previously
 couldnt lock the dpll5 (kernel complained). As a consequence the EHCI USB
 port wasnt usable in U-Boot and kernel. With this patch, kernel panics
 disappear and USB working fine in u-boot and kernel.

 Signed-off-by: Andreas Naumann anaum...@ultratronik.de

 While this patch works with Linux that has been patched for this
 erratum, it will cause problems with some unpatched versions of
 Linux.

 Right.  So Linux also needs to be patched for the erratum.


 Yes.  My point was that if you update u-boot alone, then try to use it to
 boot an unpatched Linux that assumes CM_CLKSEL5_PLL has its power-on value,
 USB will not work.

 I think it's dangerous to assume that the mixture of an unpatched Linux with
 a patched u-boot will never occur, and the cause of the failure that results
 is pretty subtle.  So whatever gets merged would be safer if it restored the
 default setting of CM_CLKSEL5_PLL prior to handing off control to Linux.

Agree, we should not apply this, till we also have an 'approved' patch
for mainline linux posted.  Right now we have a set of kernel hacks,
but no agreed on method as the kernel maintainer did not have a board
that suffered from the errata..

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] ARM: omap3: Implement dpll5 (HSUSB clk) workaround for OMAP36xx/AM/DM37xx according to errata sprz318e.

2013-08-16 Thread Robert Nelson
On Fri, Aug 16, 2013 at 10:07 AM, Robert Nelson robertcnel...@gmail.com wrote:
 On Fri, Aug 16, 2013 at 9:34 AM, Peter A. Bigot p...@pabigot.com wrote:
 On 08/16/2013 08:38 AM, Tom Rini wrote:

 On Wed, Aug 14, 2013 at 09:53:16PM -0500, Peter A. Bigot wrote:

 On 07/09/2013 02:43 AM, Naumann Andreas wrote:

 In chapter 'Advisory 2.1 USB Host Clock Drift Causes USB Spec
 Non-compliance in Certain Configurations' of the TI Errata it is 
 recommended
 to use certain div/mult values for the DPLL5 clock setup.
 So far u-boot used the old 34xx values, so I added the errata
 recommended values specificly for 36xx init only.
 Also, the FSEL registers exist no longer, so removed them from init.

 Tested this on a AM3703 board with 19.2MHz oscillator, which previously
 couldnt lock the dpll5 (kernel complained). As a consequence the EHCI USB
 port wasnt usable in U-Boot and kernel. With this patch, kernel panics
 disappear and USB working fine in u-boot and kernel.

 Signed-off-by: Andreas Naumann anaum...@ultratronik.de

 While this patch works with Linux that has been patched for this
 erratum, it will cause problems with some unpatched versions of
 Linux.

 Right.  So Linux also needs to be patched for the erratum.


 Yes.  My point was that if you update u-boot alone, then try to use it to
 boot an unpatched Linux that assumes CM_CLKSEL5_PLL has its power-on value,
 USB will not work.

 I think it's dangerous to assume that the mixture of an unpatched Linux with
 a patched u-boot will never occur, and the cause of the failure that results
 is pretty subtle.  So whatever gets merged would be safer if it restored the
 default setting of CM_CLKSEL5_PLL prior to handing off control to Linux.

 Agree, we should not apply this, till we also have an 'approved' patch
 for mainline linux posted.  Right now we have a set of kernel hacks,
 but no agreed on method as the kernel maintainer did not have a board
 that suffered from the errata..

btw: here's a version that seems to work on v3.11-rc5:

https://raw.github.com/RobertCNelson/armv7-multiplatform/v3.11.x/patches/omap_sprz319_erratum_v2.1/0001-hack-omap-clockk-dpll5-apply-sprz319e-2.1-erratum-kernel-3.11-rc2.patch

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4] SPL: Makefile: Build a separate autoconf.mk for SPL

2013-08-16 Thread York Sun
On 08/16/2013 12:14 AM, ying.zh...@freescale.com wrote:
 From: Ying Zhang b40...@freescale.com
 
 SPL defines CONFIG_SPL_BUILD but this does not percolate to the autoconf.mk 
 Makefile.
 As a result the build breaks when CONFIG_SPL_BUILD is used in the 
 board-specific include
 header file. With this, there is a possibility of having a CONFIG option 
 defined in the
 header file but not defined in the Makefile causing all kinds of build 
 failure and problems.
 
 It also messes things for up, for example, when one might want to undefine 
 options to
 keep the SPL small and doesn't want to be stuck with the CONFIG options used 
 for U-boot.
 Lastly, this also avoids defining special CONFIG_SPL_ variables for cases 
 where some
 options are required in U-boot but not in SPL.
 
 We add a spl-autoconf.mk rule that is generated for SPL with the 
 CONFIG_SPL_BUILD flag
 and conditionally include it for SPL builds.
 
 Signed-off-by: Ying Zhang b40...@freescale.com

This patch changes Makefile and config.mk. I will need an ack from Tom
before I can apply this patch to 85xx/master.

York

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


[U-Boot] [PATCH] ARM: mxs: Add mx28evk_auart_console target

2013-08-16 Thread Andreas Wass
The target uses AUART 3 instead of the DUART for console output.

Signed-off-by: Andreas Wass andreas.w...@dalelven.com
Cc: Fabio Estevam fabio.este...@freescale.com
Cc: Marek Vasut ma...@denx.de
---
 boards.cfg| 1 +
 include/configs/mxs.h | 7 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/boards.cfg b/boards.cfg
index 454da7f..79d6cd8 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -203,6 +203,7 @@ mx23evk  arm arm926ejs   
mx23evk freesca
 m28evk   arm arm926ejs   m28evk  denx  
 mxsm28evk
 mx28evk  arm arm926ejs   mx28evk 
freescale  mxsmx28evk:ENV_IS_IN_MMC
 mx28evk_nand arm arm926ejs   mx28evk 
freescale  mxsmx28evk:ENV_IS_IN_NAND
+mx28evk_auart_consolearm arm926ejs   mx28evk 
freescale  mxs
mx28evk:MXS_AUART,MXS_AUART_BASE=MXS_UARTAPP3_BASE,ENV_IS_IN_MMC
 sc_sps_1 arm arm926ejs   sc_sps_1
schulercontrol mxs
 nhk8815  arm arm926ejs   nhk8815 st
 nomadik
 nhk8815_onenand  arm arm926ejs   nhk8815 st
 nomadik   nhk8815:BOOT_ONENAND
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index a684166..124dc1e 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -119,11 +119,16 @@
 /* GPIO */
 #define CONFIG_MXS_GPIO
 
-/* DUART Serial Driver */
+/*
+ * DUART Serial Driver.
+ * Conflicts with AUART driver which can be set by board.
+ */
+#ifndef CONFIG_MXS_AUART
 #define CONFIG_PL011_SERIAL
 #define CONFIG_PL011_CLOCK 2400
 #define CONFIG_PL01x_PORTS { (void *)MXS_UARTDBG_BASE }
 #define CONFIG_CONS_INDEX  0
+#endif
 /* Default baudrate can be overriden by board! */
 #ifndef CONFIG_BAUDRATE
 #define CONFIG_BAUDRATE115200
-- 
1.8.1.4

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


[U-Boot] [u-boot-release] [PATCH][v2] powerpc/common/vsc3316: remove const from vsc3316_config parameter define

2013-08-16 Thread York Sun
From: Shaohui Xie shaohui@freescale.com

Since the parameters need to be modified according to different Serdes
protocols at runtime, the const will block this. Also remove const from
arrays define used by vsc3316_config.

Signed-off-by: Shaohui Xie shaohui@freescale.com
---
Resend for patchwork to catch

changes for V2:
1. changed subject;
2. fix broken on B4xxx boards;

 board/freescale/b4860qds/b4860qds_crossbar_con.h | 12 ++--
 board/freescale/common/vsc3316_3308.c|  2 +-
 board/freescale/common/vsc3316_3308.h|  2 +-
 board/freescale/t4qds/t4qds.c|  8 
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/board/freescale/b4860qds/b4860qds_crossbar_con.h
b/board/freescale/b4860qds/b4860qds_crossbar_con.h
index 6e64745..db0cf28 100644
--- a/board/freescale/b4860qds/b4860qds_crossbar_con.h
+++ b/board/freescale/b4860qds/b4860qds_crossbar_con.h
@@ -13,10 +13,10 @@
 static const int8_t vsc16_tx_amc[8][2] = { {15, 3}, {0, 2}, {7, 4}, {9,
10},
{5, 11}, {4, 5}, {2, 6}, {12, 9} };
 -static const int8_t vsc16_tx_sfp[8][2] = { {15, 7}, {0, 1}, {7, 8},
{9, 0},
+static int8_t vsc16_tx_sfp[8][2] = { {15, 7}, {0, 1}, {7, 8}, {9, 0},
{-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
 -static const int8_t vsc16_tx_4sfp_sgmii_12_56[8][2] = { {15, 7}, {0, 1},
+static int8_t vsc16_tx_4sfp_sgmii_12_56[8][2] = { {15, 7}, {0, 1},
{7, 8}, {9, 0}, {2, 14}, {12, 15},
{-1, -1}, {-1, -1} };
 @@ -25,7 +25,7 @@ static const int8_t vsc16_tx_4sfp_sgmii_34[8][2] = {
{15, 7}, {0, 1},
{-1, -1}, {-1, -1} };
  #ifdef CONFIG_PPC_B4420
-static const int8_t vsc16_tx_sgmii_lane_cd[8][2] = { {5, 14}, {4, 15},
+static int8_t vsc16_tx_sgmii_lane_cd[8][2] = { {5, 14}, {4, 15},
{-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
 #endif
 @@ -35,10 +35,10 @@ static const int8_t vsc16_tx_aurora[8][2] = { {2,
13}, {12, 12}, {-1, -1},
 static const int8_t vsc16_rx_amc[8][2] = { {3, 15}, {2, 1}, {4, 8},
{10, 9},
{11, 11}, {5, 10}, {6, 3}, {9, 12} };
 -static const int8_t vsc16_rx_sfp[8][2] = { {8, 15}, {0, 1}, {7, 8},
{1, 9},
+static int8_t vsc16_rx_sfp[8][2] = { {8, 15}, {0, 1}, {7, 8}, {1, 9},
{-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
 -static const int8_t vsc16_rx_4sfp_sgmii_12_56[8][2] = { {8, 15}, {0, 1},
+static int8_t vsc16_rx_4sfp_sgmii_12_56[8][2] = { {8, 15}, {0, 1},
{7, 8}, {1, 9}, {14, 3}, {15, 12},
{-1, -1}, {-1, -1} };
 @@ -47,7 +47,7 @@ static const int8_t vsc16_rx_4sfp_sgmii_34[8][2] = {
{8, 15}, {0, 1},
{-1, -1}, {-1, -1} };
  #ifdef CONFIG_PPC_B4420
-static const int8_t vsc16_rx_sgmii_lane_cd[8][2] = { {14, 11}, {15, 10},
+static int8_t vsc16_rx_sgmii_lane_cd[8][2] = { {14, 11}, {15, 10},
{-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
 #endif
 diff --git a/board/freescale/common/vsc3316_3308.c
b/board/freescale/common/vsc3316_3308.c
index 8a3dc33..97a25e8 100644
--- a/board/freescale/common/vsc3316_3308.c
+++ b/board/freescale/common/vsc3316_3308.c
@@ -31,7 +31,7 @@ int vsc_if_enable(unsigned int vsc_addr)
return i2c_write(vsc_addr, INTERFACE_MODE_REG, 1, data, 1);
 }
 -int vsc3316_config(unsigned int vsc_addr, const int8_t con_arr[][2],
+int vsc3316_config(unsigned int vsc_addr, int8_t con_arr[][2],
unsigned int num_con)
 {
unsigned int i;
diff --git a/board/freescale/common/vsc3316_3308.h
b/board/freescale/common/vsc3316_3308.h
index 4003fcd..2a49187 100644
--- a/board/freescale/common/vsc3316_3308.h
+++ b/board/freescale/common/vsc3316_3308.h
@@ -12,7 +12,7 @@
 #include errno.h
  int vsc_if_enable(unsigned int vsc_addr);
-int vsc3316_config(unsigned int vsc_addr, const int8_t con_arr[][2],
+int vsc3316_config(unsigned int vsc_addr, int8_t con_arr[][2],
unsigned int num_con);
 int vsc3308_config(unsigned int vsc_addr, const int8_t con_arr[][2],
unsigned int num_con);
diff --git a/board/freescale/t4qds/t4qds.c b/board/freescale/t4qds/t4qds.c
index aa6a217..2dade85 100644
--- a/board/freescale/t4qds/t4qds.c
+++ b/board/freescale/t4qds/t4qds.c
@@ -26,16 +26,16 @@
  DECLARE_GLOBAL_DATA_PTR;
 -static const int8_t vsc3316_fsm1_tx[8][2] = { {0, 0}, {1, 1}, {6, 6},
{7, 7},
+static int8_t vsc3316_fsm1_tx[8][2] = { {0, 0}, {1, 1}, {6, 6}, {7, 7},
{8, 8}, {9, 9}, {14, 14}, {15, 15} };
 -static const int8_t vsc3316_fsm2_tx[8][2] = { {2, 2}, {3, 3}, {4, 4},
{5, 5},
+static int8_t vsc3316_fsm2_tx[8][2] = { {2, 2}, {3, 3}, {4, 4}, {5, 5},
{10, 10}, {11, 11}, {12, 12}, {13, 13} };
 -static const int8_t vsc3316_fsm1_rx[8][2] = { {2, 12}, {3, 13}, {4,
5}, {5, 4},
+static int8_t 

Re: [U-Boot] [PATCH v4] SPL: Makefile: Build a separate autoconf.mk for SPL

2013-08-16 Thread Tom Rini
On Fri, Aug 16, 2013 at 03:14:44PM +0800, ying.zh...@freescale.com wrote:

 From: Ying Zhang b40...@freescale.com
 
 SPL defines CONFIG_SPL_BUILD but this does not percolate to the autoconf.mk 
 Makefile.
 As a result the build breaks when CONFIG_SPL_BUILD is used in the 
 board-specific include
 header file. With this, there is a possibility of having a CONFIG option 
 defined in the
 header file but not defined in the Makefile causing all kinds of build 
 failure and problems.
 
 It also messes things for up, for example, when one might want to undefine 
 options to
 keep the SPL small and doesn't want to be stuck with the CONFIG options used 
 for U-boot.
 Lastly, this also avoids defining special CONFIG_SPL_ variables for cases 
 where some
 options are required in U-boot but not in SPL.
 
 We add a spl-autoconf.mk rule that is generated for SPL with the 
 CONFIG_SPL_BUILD flag
 and conditionally include it for SPL builds.
 
 Signed-off-by: Ying Zhang b40...@freescale.com
 ---
 Change from v3:
 - No change.
 Change from v2:
 - Fixed the reported build breakage of am335x_evm_usbspl.
 Change from v1:
 - Fixed issue where builds in a different directory were failing.

Uh, this is Joel's patch and you dropped his authorship when picking it
up.  I'm glad to see you picking it up and addressing the last of the
issues I reported (right?), but you need to retain Joel's Author/SOB and
add your own for any further changes you've made here.  Thanks.

And please make sure a MAKEALL passes for both powerpc and arm.

-- 
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-release] [PATCH][v2] powerpc/common/vsc3316: remove const from vsc3316_config parameter define

2013-08-16 Thread York Sun
On 08/09/2013 03:41 AM, Shaohui Xie wrote:
 Since the parameters need to be modified according to different Serdes
 protocols at runtime, the const will block this. Also remove const from
 arrays define used by vsc3316_config.
 
 Signed-off-by: Shaohui Xie shaohui@freescale.com
 ---
 changes for V2:
 1. changed subject;
 2. fix broken on B4xxx boards;
 
  board/freescale/b4860qds/b4860qds_crossbar_con.h | 12 ++--
  board/freescale/common/vsc3316_3308.c|  2 +-
  board/freescale/common/vsc3316_3308.h|  2 +-
  board/freescale/t4qds/t4qds.c|  8 
  4 files changed, 12 insertions(+), 12 deletions(-)
 
 diff --git a/board/freescale/b4860qds/b4860qds_crossbar_con.h 
 b/board/freescale/b4860qds/b4860qds_crossbar_con.h
 index 6e64745..db0cf28 100644
 --- a/board/freescale/b4860qds/b4860qds_crossbar_con.h
 +++ b/board/freescale/b4860qds/b4860qds_crossbar_con.h
 @@ -13,10 +13,10 @@
  static const int8_t vsc16_tx_amc[8][2] = { {15, 3}, {0, 2}, {7, 4}, {9, 10},
   {5, 11}, {4, 5}, {2, 6}, {12, 9} };
  
 -static const int8_t vsc16_tx_sfp[8][2] = { {15, 7}, {0, 1}, {7, 8}, {9, 0},
 +static int8_t vsc16_tx_sfp[8][2] = { {15, 7}, {0, 1}, {7, 8}, {9, 0},
   {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
  
 -static const int8_t vsc16_tx_4sfp_sgmii_12_56[8][2] = { {15, 7}, {0, 1},
 +static int8_t vsc16_tx_4sfp_sgmii_12_56[8][2] = { {15, 7}, {0, 1},
   {7, 8}, {9, 0}, {2, 14}, {12, 15},
   {-1, -1}, {-1, -1} };
  
 @@ -25,7 +25,7 @@ static const int8_t vsc16_tx_4sfp_sgmii_34[8][2] = { {15, 
 7}, {0, 1},
   {-1, -1}, {-1, -1} };
  
  #ifdef CONFIG_PPC_B4420
 -static const int8_t vsc16_tx_sgmii_lane_cd[8][2] = { {5, 14}, {4, 15},
 +static int8_t vsc16_tx_sgmii_lane_cd[8][2] = { {5, 14}, {4, 15},
   {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
  #endif
  
 @@ -35,10 +35,10 @@ static const int8_t vsc16_tx_aurora[8][2] = { {2, 13}, 
 {12, 12}, {-1, -1},
  static const int8_t vsc16_rx_amc[8][2] = { {3, 15}, {2, 1}, {4, 8}, {10, 9},
   {11, 11}, {5, 10}, {6, 3}, {9, 12} };
  
 -static const int8_t vsc16_rx_sfp[8][2] = { {8, 15}, {0, 1}, {7, 8}, {1, 9},
 +static int8_t vsc16_rx_sfp[8][2] = { {8, 15}, {0, 1}, {7, 8}, {1, 9},
   {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
  
 -static const int8_t vsc16_rx_4sfp_sgmii_12_56[8][2] = { {8, 15}, {0, 1},
 +static int8_t vsc16_rx_4sfp_sgmii_12_56[8][2] = { {8, 15}, {0, 1},
   {7, 8}, {1, 9}, {14, 3}, {15, 12},
   {-1, -1}, {-1, -1} };
  
 @@ -47,7 +47,7 @@ static const int8_t vsc16_rx_4sfp_sgmii_34[8][2] = { {8, 
 15}, {0, 1},
   {-1, -1}, {-1, -1} };
  
  #ifdef CONFIG_PPC_B4420
 -static const int8_t vsc16_rx_sgmii_lane_cd[8][2] = { {14, 11}, {15, 10},
 +static int8_t vsc16_rx_sgmii_lane_cd[8][2] = { {14, 11}, {15, 10},
   {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1}, {-1, -1} };
  #endif
  
 diff --git a/board/freescale/common/vsc3316_3308.c 
 b/board/freescale/common/vsc3316_3308.c
 index 8a3dc33..97a25e8 100644
 --- a/board/freescale/common/vsc3316_3308.c
 +++ b/board/freescale/common/vsc3316_3308.c
 @@ -31,7 +31,7 @@ int vsc_if_enable(unsigned int vsc_addr)
   return i2c_write(vsc_addr, INTERFACE_MODE_REG, 1, data, 1);
  }
  
 -int vsc3316_config(unsigned int vsc_addr, const int8_t con_arr[][2],
 +int vsc3316_config(unsigned int vsc_addr, int8_t con_arr[][2],
   unsigned int num_con)
  {
   unsigned int i;
 diff --git a/board/freescale/common/vsc3316_3308.h 
 b/board/freescale/common/vsc3316_3308.h
 index 4003fcd..2a49187 100644
 --- a/board/freescale/common/vsc3316_3308.h
 +++ b/board/freescale/common/vsc3316_3308.h
 @@ -12,7 +12,7 @@
  #include errno.h
  
  int vsc_if_enable(unsigned int vsc_addr);
 -int vsc3316_config(unsigned int vsc_addr, const int8_t con_arr[][2],
 +int vsc3316_config(unsigned int vsc_addr, int8_t con_arr[][2],
   unsigned int num_con);
  int vsc3308_config(unsigned int vsc_addr, const int8_t con_arr[][2],
   unsigned int num_con);
 diff --git a/board/freescale/t4qds/t4qds.c b/board/freescale/t4qds/t4qds.c
 index aa6a217..2dade85 100644
 --- a/board/freescale/t4qds/t4qds.c
 +++ b/board/freescale/t4qds/t4qds.c
 @@ -26,16 +26,16 @@
  
  DECLARE_GLOBAL_DATA_PTR;
  
 -static const int8_t vsc3316_fsm1_tx[8][2] = { {0, 0}, {1, 1}, {6, 6}, {7, 7},
 +static int8_t vsc3316_fsm1_tx[8][2] = { {0, 0}, {1, 1}, {6, 6}, {7, 7},
   {8, 8}, {9, 9}, {14, 14}, {15, 15} };
  
 -static const int8_t vsc3316_fsm2_tx[8][2] = { {2, 2}, {3, 3}, {4, 4}, {5, 5},
 +static int8_t vsc3316_fsm2_tx[8][2] = { {2, 2}, {3, 3}, {4, 4}, {5, 5},
   {10, 10}, {11, 11}, {12, 12}, {13, 13} };
  
 -static const int8_t 

Re: [U-Boot] [PATCH] ARM: mxs: Add mx28evk_auart_console target

2013-08-16 Thread Otavio Salvador
On Fri, Aug 16, 2013 at 1:24 PM, Andreas Wass andreas.w...@dalelven.com wrote:
 The target uses AUART 3 instead of the DUART for console output.

 Signed-off-by: Andreas Wass andreas.w...@dalelven.com
 Cc: Fabio Estevam fabio.este...@freescale.com
 Cc: Marek Vasut ma...@denx.de

Why to use AUART for console? can you elaborate it a little more?

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: mxs: Add mx28evk_auart_console target

2013-08-16 Thread Andreas Wass
Dear Otavio,

Some boards don't have the DUART easily available (see STKa28 by TQ-group for 
instance) while a regular rs232 port is easily accessed. 

The purpose of this patch is more of a demonstration how to use the AUART 
driver and was requested by Fabio during the submission of the AUART driver. 

Best regards
Andreas Wass

16 aug 2013 kl. 19:00 skrev Otavio Salvador ota...@ossystems.com.br:

 On Fri, Aug 16, 2013 at 1:24 PM, Andreas Wass andreas.w...@dalelven.com 
 wrote:
 The target uses AUART 3 instead of the DUART for console output.
 
 Signed-off-by: Andreas Wass andreas.w...@dalelven.com
 Cc: Fabio Estevam fabio.este...@freescale.com
 Cc: Marek Vasut ma...@denx.de
 
 Why to use AUART for console? can you elaborate it a little more?
 
 -- 
 Otavio Salvador O.S. Systems
 http://www.ossystems.com.brhttp://projetos.ossystems.com.br
 Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] ARM: mxs: Add mx28evk_auart_console target

2013-08-16 Thread Fabio Estevam
On Fri, Aug 16, 2013 at 2:06 PM, Andreas Wass andreas.w...@dalelven.com wrote:
 Dear Otavio,

 Some boards don't have the DUART easily available (see STKa28 by TQ-group for 
 instance) while a regular rs232 port is easily accessed.

 The purpose of this patch is more of a demonstration how to use the AUART 
 driver and was requested by Fabio during the submission of the AUART driver.

Yes, correct.

With this target in place, we can have a user of the mxs auart driver
that Andreas submitted recently.

Regards,

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


Re: [U-Boot] [PATCH] ARM: mxs: Add mx28evk_auart_console target

2013-08-16 Thread Otavio Salvador
On Fri, Aug 16, 2013 at 2:10 PM, Fabio Estevam feste...@gmail.com wrote:
 On Fri, Aug 16, 2013 at 2:06 PM, Andreas Wass andreas.w...@dalelven.com 
 wrote:
 Dear Otavio,

 Some boards don't have the DUART easily available (see STKa28 by TQ-group 
 for instance) while a regular rs232 port is easily accessed.

 The purpose of this patch is more of a demonstration how to use the AUART 
 driver and was requested by Fabio during the submission of the AUART driver.

 Yes, correct.

 With this target in place, we can have a user of the mxs auart driver
 that Andreas submitted recently.

I see.

Good :-)

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH V3 01/20] Add functions for use with i.mx6 otg udc

2013-08-16 Thread Troy Kisky

On 8/15/2013 2:36 PM, Marek Vasut wrote:

Are there any news on this front? If not, please fix as requested so I can apply
this stuff for .10 , thanks.

Best regards,
Marek Vasut


I will update, I'm just sidetracked with Windows work for a little while.

Thanks
Troy

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


Re: [U-Boot] about CONFIG_SYS_GENERIC_BOARD

2013-08-16 Thread Scott Wood
On Fri, 2013-08-16 at 13:02 +0800, FengHua wrote:
 hi Simon,
 I have worked on generic board for a few days, but something confuse 
 me.
 Why it is needed?
 Each processor architecture has different features, this will
 affect processor specific and board specific code. Putting board_init_*
 code of each platform into one file with many macro switch make things
 messy, the board_f.c and board_r.c become very complicated and less
 readable. Is it really needed?

Most of the stuff in arch/arm/lib/board.c is not processor specific (and
certainly not board specific).  It's poorly named and should have been
called something like init.c.

-Scott



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


Re: [U-Boot] [PATCH 2/2] board: Update variable names as per new the structures

2013-08-16 Thread Scott Wood
On Fri, 2013-08-16 at 12:56 +0530, Prabhakar Kushwaha wrote:
 Different board,driver files use fields defined in MPC85xx_SYS_INFO and
 MPC86xx_SYS_INFO structure. To fix CamelCase warning, field name has been
 updated in the mentioned structure.
 
 So update variable names as per new the structures.
 
 Signed-off-by: Prabhakar Kushwaha prabha...@freescale.com

This must be squashed into the previous patch or you will break
bisectability.

-Scott



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


Re: [U-Boot] about CONFIG_SYS_GENERIC_BOARD

2013-08-16 Thread Simon Glass
Hi David,

On Thu, Aug 15, 2013 at 11:02 PM, FengHua feng...@phytium.com.cn wrote:
 hi Simon,
 I have worked on generic board for a few days, but something confuse 
 me.
 Why it is needed?
 Each processor architecture has different features, this will affect 
 processor specific and board specific code. Putting board_init_* code of each 
 platform into one file with many macro switch make things messy, the 
 board_f.c and board_r.c become very complicated and less readable. Is it 
 really needed?
We should make it clear that what parts are common between 
 architecture and what parts are specific.
Actually, I have different opinion with this. Architecture specific 
 board.c file have more advantages. how ahout your opinion?

Scott's reply jogged my memory to reply to this.

I suspect having a board.c for each arch was a good idea at the start,
and it was hard to reconcile the different ordering and init needs of
each arch as it was added. It was much each when porting to a new arch
to just copy one of the existing archs and modify the code until it
works.

Unfortunately, this means we have about 10 different versions of what
turns out to be mostly the same code. The generic board effort was an
attempt to unify these into one. While I agree there are lots of
#idefs I think that is a separate problem, and at least the code is
now all in one file. As a first step it would be nice to sort through
and weed out the arch-specific #idefs in common/board_{f,r}.c.

Related to this is global_data and the board data in bd_t. These
structures have been unified and again found to contain a lot of
common elements across archs.

As a specific example of where having generic board init helps, it is
now possible to add a new feature to all archs without changing 10
different files. For example the trace feature was added that way.
Decide tree support (CONFIG_OF_CONTROL) can in principle be turned on
for any arch by porting it to generic board.

So far ARM and PowerPC support generic board, and x86 and sandbox use
it exclusively (i.e. their old board.c code is removed).

As it turns out, this board.c file is not really very arch-specific,
as Scott says. It should not be a huge job to make aarch64 use it
instead of its own board.c although I am sure there will be a few
curly problems.

We have not talked about this on the list, and it is far to early yet,
but at some point it would be nice to deprecate the old board.c files.

Regards,
Simon


 Best Regards.
David

 -原始邮件-
 发件人: Simon Glass s...@chromium.org
 发送时间: 2013年8月16日 星期五
 收件人: feng...@phytium.com.cn
 抄送: U-Boot Mailing List u-boot@lists.denx.de, tr...@ti.com 
 tr...@ti.com
 主题: Re: [U-Boot] [PATCH v3 0/5] arm64 patch

 Hi David,

 On Thu, Aug 15, 2013 at 7:47 AM,  feng...@phytium.com.cn wrote:
  From: David Feng feng...@phytium.com.cn
 
  *** BLURB HERE ***
  Changes for v3:
  - rewrite cache.S and exception.S that partly originated from linux 
  kernel,
so the license should be ok.
  - according to scott wood's advice, make the fdt 64bit initrd start 
  address support a seperate patch.
 
  David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address support
 
   arch/arm64/config.mk|   32 +++
   arch/arm64/cpu/armv8/Makefile   |   51 
   arch/arm64/cpu/armv8/cache.S|  144 ++
   arch/arm64/cpu/armv8/config.mk  |   29 ++
   arch/arm64/cpu/armv8/cpu.c  |  108 
   arch/arm64/cpu/armv8/exceptions.S   |  189 +
   arch/arm64/cpu/armv8/start.S|  197 ++
   arch/arm64/cpu/armv8/tlb.S  |   38 +++
   arch/arm64/cpu/u-boot.lds   |   73 +
   arch/arm64/dts/aemv8a.dtsi  |  234 
   arch/arm64/include/asm/arch-armv8/mmu.h |  117 
   arch/arm64/include/asm/atomic.h |  115 
   arch/arm64/include/asm/bitops.h |  153 +++
   arch/arm64/include/asm/byteorder.h  |   31 +++
   arch/arm64/include/asm/cache.h  |   53 
   arch/arm64/include/asm/config.h |   41 +++
   arch/arm64/include/asm/errno.h  |1 +
   arch/arm64/include/asm/global_data.h|   38 +++
   arch/arm64/include/asm/gpio.h   |1 +
   arch/arm64/include/asm/io.h |  193 +
   arch/arm64/include/asm/linkage.h|   49 
   arch/arm64/include/asm/posix_types.h|   61 +
   arch/arm64/include/asm/processor.h  |   59 
   arch/arm64/include/asm/ptrace.h |   64 +
   arch/arm64/include/asm/sections.h   |   27 ++
   arch/arm64/include/asm/string.h |   49 
   arch/arm64/include/asm/system.h |  106 
   arch/arm64/include/asm/types.h  |   67 +
   arch/arm64/include/asm/u-boot.h |   38 +++
   

Re: [U-Boot] about CONFIG_SYS_GENERIC_BOARD

2013-08-16 Thread Tom Rini
On Fri, Aug 16, 2013 at 01:28:26PM -0600, Simon Glass wrote:

 Hi David,
 
 On Thu, Aug 15, 2013 at 11:02 PM, FengHua feng...@phytium.com.cn wrote:
  hi Simon,
  I have worked on generic board for a few days, but something 
  confuse me.
  Why it is needed?
  Each processor architecture has different features, this will 
  affect processor specific and board specific code. Putting board_init_* 
  code of each platform into one file with many macro switch make things 
  messy, the board_f.c and board_r.c become very complicated and less 
  readable. Is it really needed?
 We should make it clear that what parts are common between 
  architecture and what parts are specific.
 Actually, I have different opinion with this. Architecture specific 
  board.c file have more advantages. how ahout your opinion?
 
 Scott's reply jogged my memory to reply to this.
 
 I suspect having a board.c for each arch was a good idea at the start,
 and it was hard to reconcile the different ordering and init needs of
 each arch as it was added. It was much each when porting to a new arch
 to just copy one of the existing archs and modify the code until it
 works.
 
 Unfortunately, this means we have about 10 different versions of what
 turns out to be mostly the same code. The generic board effort was an
 attempt to unify these into one. While I agree there are lots of
 #idefs I think that is a separate problem, and at least the code is
 now all in one file. As a first step it would be nice to sort through
 and weed out the arch-specific #idefs in common/board_{f,r}.c.
 
 Related to this is global_data and the board data in bd_t. These
 structures have been unified and again found to contain a lot of
 common elements across archs.
 
 As a specific example of where having generic board init helps, it is
 now possible to add a new feature to all archs without changing 10
 different files. For example the trace feature was added that way.
 Decide tree support (CONFIG_OF_CONTROL) can in principle be turned on
 for any arch by porting it to generic board.
 
 So far ARM and PowerPC support generic board, and x86 and sandbox use
 it exclusively (i.e. their old board.c code is removed).
 
 As it turns out, this board.c file is not really very arch-specific,
 as Scott says. It should not be a huge job to make aarch64 use it
 instead of its own board.c although I am sure there will be a few
 curly problems.
 
 We have not talked about this on the list, and it is far to early yet,
 but at some point it would be nice to deprecate the old board.c files.

And this would be another reason to place this in arch/arm to start
with, rather than split-arch, leveraging this otherwise generic stuff
should just be a matter of setting the define, and one less thing for
you to worry about having to cover.  It's on my plate to confirm that
for example, the trivial convert and boot test I did on am335x was
enough.

-- 
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 0/5] arm64 patch

2013-08-16 Thread Scott Wood
On Thu, 2013-08-15 at 23:32 -0500, Dennis Gilmore wrote:
 On Thu, 15 Aug 2013 21:47:09 +0800
 feng...@phytium.com.cn wrote:
 
  From: David Feng feng...@phytium.com.cn
  
  *** BLURB HERE ***
  Changes for v3:
  - rewrite cache.S and exception.S that partly originated from
  linux kernel, so the license should be ok.
  - according to scott wood's advice, make the fdt 64bit initrd
  start address support a seperate patch.
  
  David Feng (5):
core support of arm64
board support of arm64
arch support 1 of arm64
arch support 2 of arm64
64bit initrd start address support
 
 nitpick but the arch is aarch64 not arm64

powerpc is Power Architecture these days but we still call it powerpc.
arm64 is a sensible name that doesn't reduce the meaningful part of the
name (excluding the word size suffix) down to a single character.

-Scott



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


[U-Boot] merge arm64 to arm

2013-08-16 Thread FengHua
hi tom,
hi albert,
 yes, it's right. the u-boot could be more uniformly and maintainable 
if merging armv8 to arm architecture. I will try to migrate arm64 to armv8 
subarchitecture of arm. do you have any other advice?


Regards.
David






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


Re: [U-Boot] [PATCH v3 0/5] arm64 patch

2013-08-16 Thread Sharma Bhupesh-B45370
 -Original Message-
 From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
 On Behalf Of Scott Wood
 Sent: Saturday, August 17, 2013 1:23 AM
 To: Dennis Gilmore
 Cc: tr...@ti.com; u-boot@lists.denx.de; feng...@phytium.com.cn
 Subject: Re: [U-Boot] [PATCH v3 0/5] arm64 patch
 
 On Thu, 2013-08-15 at 23:32 -0500, Dennis Gilmore wrote:
  On Thu, 15 Aug 2013 21:47:09 +0800
  feng...@phytium.com.cn wrote:
 
   From: David Feng feng...@phytium.com.cn
  
   *** BLURB HERE ***
   Changes for v3:
   - rewrite cache.S and exception.S that partly originated from
   linux kernel, so the license should be ok.
   - according to scott wood's advice, make the fdt 64bit initrd
   start address support a seperate patch.
  
   David Feng (5):
 core support of arm64
 board support of arm64
 arch support 1 of arm64
 arch support 2 of arm64
 64bit initrd start address support
 
  nitpick but the arch is aarch64 not arm64
 
 powerpc is Power Architecture these days but we still call it powerpc.
 arm64 is a sensible name that doesn't reduce the meaningful part of the
 name (excluding the word size suffix) down to a single character.
 

Arm64 seems more simple and sensible and in-line with the naming convention used
across linux (arch/arm64). I remember reading Linus's comments in favor of 
keeping a
arm64 naming convention in the past (instead of Armv8 or AArch64). Here is that 
mail thread for reference:

https://lkml.org/lkml/2012/7/15/133

Regards,
Bhupesh

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