[U-Boot] [PATCH V2 3/4] imx: mx6: implement mmc_get_env_devno

2015-12-16 Thread Peng Fan
Implement mmc_get_env_devno, devno can be got from smbr1 of SRC. Introduce a weak function board_mmc_get_env_devno, different boards can implement it according to different sdhc controllers that used by the board. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba..

[U-Boot] [PATCH V2 1/4] imx: mx7dsabresd: move mmc_get_env_devno to soc code

2015-12-16 Thread Peng Fan
Move mmc_get_env_devno to soc.c Introduce a weak function board_mmc_get_env_devno. Different boards can implement this according to sdhc controller which is used by the board. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> --- Changes V2: new patch.

[U-Boot] [PATCH V2 2/4] common: env_mmc: support loading env from different cards

2015-12-16 Thread Peng Fan
Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Simon Glass <s...@chromium.org> Cc: Tim Harvey <thar...@gateworks.com> Cc: Hans de Goede <hdego...@redhat.com> --- Changes V2: none. common/env_mmc.c | 22 ++ incl

[U-Boot] [PATCH 4/5] imx: mx6slevk: implement mmc_get_env_devno

2015-12-15 Thread Peng Fan
Implement mmc_get_env_devno, support loading env successfully when booting from different slots. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Stefano Babic <sba...@denx.de> --- board/freescale/mx6slevk/mx6slevk.c | 16 1 file changed, 16 insertions(+) diff -

[U-Boot] [PATCH 5/5] imx: mx6sxsabresd: implement mmc_get_env_devno

2015-12-15 Thread Peng Fan
Implement mmc_get_env_devno, support loading env successfully when booting from different slots. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Stefano Babic <sba...@denx.de> --- board/freescale/mx6sxsabresd/mx6sxsabresd.c | 24 1 file changed, 2

[U-Boot] [PATCH 3/5] imx: mx6qarm2: implement mmc_get_env_devno

2015-12-15 Thread Peng Fan
Implement mmc_get_env_devno, support loading env successfully when booting from different slots. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Stefano Babic <sba...@denx.de> --- board/freescale/mx6qarm2/mx6qarm2.c | 23 +++ 1 file changed, 23 insertions(+)

[U-Boot] [PATCH] imx: mx6qsabreauto: support lvds display

2015-12-15 Thread Peng Fan
Move setup_display from board_early_init_f to board_init. Add more clock settings. Add blacklight iomux setting. Add display_info_t info for the lvds screen. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Fabio Estevam <fabio.este...@freescale.com> Cc: Stefano Babic <

[U-Boot] [PATCH 2/5] imx: mx6sabresd: implement mmc_get_env_devno

2015-12-15 Thread Peng Fan
Implement mmc_get_env_devno, support loading env successfully when booting from different slots. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Stefano Babic <sba...@denx.de> --- board/freescale/mx6sabresd/mx6sabresd.c | 29 + 1 file changed, 2

[U-Boot] [PATCH 1/5] common: env_mmc: support loading env from different cards

2015-12-15 Thread Peng Fan
Signed-off-by: Peng Fan <peng@freescale.com> Cc: Stefano Babic <sba...@denx.de> Cc: Simon Glass <s...@chromium.org> Cc: Tim Harvey <thar...@gateworks.com> Cc: Hans de Goede <hdego...@redhat.com> --- common/env_mmc.c | 22 ++ 1 file changed, 14 i

Re: [U-Boot] [RFC V1] arm: config: enforce -fno-pic for gcc

2015-12-13 Thread Peng Fan
Hi Albert, Do you have any comments on this patch? Regards, Peng. On Sat, Dec 05, 2015 at 03:53:46PM +0800, Peng Fan wrote: >Android's tool chain enable the -mandroid at default. >This option will enable the -fpic, which cause uboot compilation >failure: >" > LD u-bo

Re: [U-Boot] [PATCH 1/5] common: env_mmc: support loading env from different cards

2015-12-15 Thread Peng Fan
Hi Stefano, On Tue, Dec 15, 2015 at 03:58:47PM +0100, Stefano Babic wrote: >Hi Peng, > >On 15/12/2015 09:26, Peng Fan wrote: >> Some boards support booting from different SD card slots. >> For example, mx6dpsabresd board supports booting from SD2, >> SD3, EMMC4,

[U-Boot] [PATCH] net: bootp: Ignore packets whose yiaddr is 0

2016-01-03 Thread Peng Fan
if there is a bad dhcp server, uboot can still get ipaddr and tftp work ok. The way is to ignore the packets from the bad dhcp server by filtering out the yiaddr whose value is 0. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Joe Hershberger <joe.hershber...@ni.com> --- net/bootp.c | 3

[U-Boot] [PATCH] imx: mx6/7 enlarge CONFIG_SYS_BOOTM_LEN to 16M

2016-01-03 Thread Peng Fan
Support uncompressing zImage which is larger than 8M. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Peter Robinson <pbrobin...@gmail.com> Cc: Volodymyr Riazantsev <volodymyr.riazant...@globallogic.com> Cc: Fabio Estevam <fabio.este...@freescale.com> Cc: Adrian Alonso &l

Re: [U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu

2016-01-04 Thread Peng Fan
Hi Stefano, On Mon, Jan 04, 2016 at 09:59:10AM +0100, Stefano Babic wrote: >Hi Peng, > >On 04/01/2016 05:19, Peng Fan wrote: >> This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu which >> breaks SPL build when DEBUG macro defined. >> >> In

[U-Boot] [PATCH] pfuze: Fix unsigned variable for less-than-zero comparison

2016-01-03 Thread Peng Fan
From: "Ye.Li" <b37...@freescale.com> According to the Coverity result, a unsigned int variable is used fo less- than-zero comparison, the result is never true. Need to fix the variable type to signed int. Signed-off-by: Ye.Li <b37...@freescale.com> Signed-off-by: Peng Fan

[U-Boot] [PATCH 1/2] arm: add a weak function reset_cpu

2016-01-03 Thread Peng Fan
m/lib/reset.c:45: undefined reference to `reset_cpu' scripts/Makefile.spl:244: recipe for target 'spl/u-boot-spl' failed " Signed-off-by: Peng Fan <peng@nxp.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam

[U-Boot] [PATCH 2/2] imx: mx6ul: disable VIDEO for SPL

2016-01-03 Thread Peng Fan
ith ifndef CONFIG_SPL_BUILD Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> --- include/configs/mx6ul_14x14_evk.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index 5779632..a4f624

[U-Boot] [PATCH 1/2] imx: mx7: default enable MDIO open drain

2016-01-03 Thread Peng Fan
The management data input/output (MDIO) requires open-drain, i.MX7D TO1.0 ENET MDIO pin has no open drain, but TO1.1 supports this feature. So to TO1.1, need to enable open drain by setting bits GPR0[8:7] for TO1.1. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba..

[U-Boot] [PATCH 2/2] imx: mx7: fix the temperature checking for Rev1.1

2016-01-03 Thread Peng Fan
To TO1.0, we can not rely on finish bit to read temperature. But to TO1.1, the issue was fixed by IC, we can rely on finish bit for temperature reading for TO1.1. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Tim Harvey <thar...@gateworks.com>

[U-Boot] [PATCH 1/2] imx: mx6: add more entry for mxc_ccm_reg

2016-01-03 Thread Peng Fan
Add more entries for structure mxc_ccm_reg. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> --- arch/arm/include/asm/arch-mx6/crm_regs.h | 87 1 file changed, 87 insertions(+) diff --git a/arch/arm/include/asm/arch-mx6/c

[U-Boot] [PATCH 2/2] imx: mx6ul/sx: fix mmdc_ch0 clk calculation

2016-01-03 Thread Peng Fan
g. Fix mmdc_ch0 clk calculation. Also add PLL_AUDIO/VIDEO support for decode_pll. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> --- arch/arm/cpu/armv7/mx6/clock.c | 63 +++--- 1 file changed, 59 insertions(+), 4 deletio

Re: [U-Boot] [PATCH 2/2] imx: mx7: fix the temperature checking for Rev1.1

2016-01-04 Thread Peng Fan
Hi Stefano, On Mon, Jan 04, 2016 at 10:04:42AM +0100, Stefano Babic wrote: >Hi Peng, > >On 04/01/2016 06:16, Peng Fan wrote: >> To TO1.0, we can not rely on finish bit to read temperature. But to >> TO1.1, the issue was fixed by IC, we can rely on finish bit for >> te

Re: [U-Boot] [PATCH] pfuze: Fix unsigned variable for less-than-zero comparison

2016-01-04 Thread Peng Fan
Hi Stefano, On Mon, Jan 04, 2016 at 10:07:25AM +0100, Stefano Babic wrote: >Hi Peng, > >On 04/01/2016 08:26, Peng Fan wrote: >> From: "Ye.Li" <b37...@freescale.com> >> > >it is enough to have Ye in the Signed-off instead of the commit message. Since a

Re: [U-Boot] [PATCH] ARM: Disable "DISCARD" for secure section if CONFIG_ARMV7_SECURE_BASE isn't defined

2016-01-04 Thread Peng Fan
t; > size, so even if the LDR is based on the current instruction >> > > > > address, there is also have a risk for RelAdr. If we use two jump >> > > > > steps I think we can fix this issue, but looks too hack, so give up >> > > > > this way. >

[U-Boot] [PATCH V2 1/2] imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

2016-01-04 Thread Peng Fan
-boot-spl' failed " Enable CONFIG_SPL_WATCHDOG_SUPPORT to fix this issue. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Estevam <fabio.este...@freescale.com> Cc: Marek Vasut <ma...@denx.de> Cc: Tim Harvey <thar...@gateworks.com

[U-Boot] [PATCH V2 2/2] imx: mx6ul: disable VIDEO for SPL

2016-01-04 Thread Peng Fan
ith ifndef CONFIG_SPL_BUILD Signed-off-by: Peng Fan <peng@nxp.com> Reviewed-by: Stefano Babic <sba...@denx.de> --- include/configs/mx6ul_14x14_evk.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h index 5

Re: [U-Boot] [PATCH V2 1/2] imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

2016-01-04 Thread Peng Fan
On Mon, Jan 04, 2016 at 01:45:49PM +0100, Marek Vasut wrote: >On Monday, January 04, 2016 at 01:40:10 PM, Peng Fan wrote: >> Hi Marek, >> >> On Mon, Jan 04, 2016 at 01:38:23PM +0100, Marek Vasut wrote: >> >On Monday, January 04, 2016 at 01:27:27 PM, Pen

[U-Boot] [PATCH V3] imx: mx7: fix the temperature checking for Rev1.1

2016-01-04 Thread Peng Fan
To TO1.0, we can not rely on finish bit to read temperature. But to TO1.1, the issue was fixed by IC, we can rely on finish bit for temperature reading for TO1.1. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Tim Harvey <thar...@gateworks.com>

Re: [U-Boot] [PATCH V2 1/2] imx: spl: enable CONFIG_SPL_WATCHDOG_SUPPORT

2016-01-04 Thread Peng Fan
Hi Marek, On Mon, Jan 04, 2016 at 01:38:23PM +0100, Marek Vasut wrote: >On Monday, January 04, 2016 at 01:27:27 PM, Peng Fan wrote: >> This commit 4bdcbe60a142b08eefccb0e326a37ba81d3389e8 removes reset_cpu >> which breaks SPL build when DEBUG macro defined. >> >> &

[U-Boot] [PATCH V2] imx: mx7: fix the temperature checking for Rev1.1

2016-01-04 Thread Peng Fan
To TO1.0, we can not rely on finish bit to read temperature. But to TO1.1, the issue was fixed by IC, we can rely on finish bit for temperature reading for TO1.1. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Tim Harvey <thar...@gateworks.com>

[U-Boot] [PATCH 06/11] imx: imx-common: introduce boot auxiliary core

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> To boot a auxiliary core in asymmetric multicore system, introduce the new command "bootaux" to do it. Example of boot auxliary core from 0x7000 where stores the boot head information that should be parsed by auxiliary core, "bootaux 0

[U-Boot] [PATCH 02/11] imx: imx-common: introduce Resource Domain Controller support

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Introduce Resource Domain Controller support for i.MX. Now i.MX6SX and i.MX7D supports this feature to assign masters and peripherals to different domains. Signed-off-by: Ye.Li <ye...@nxp.com> Signed-off-by: Peng Fan <peng@nxp.com> --- a

[U-Boot] [PATCH 05/11] imx: mx7d: clock support for RDC

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> If CONFIG_IMX_RDC is enabled, enable clock for RDC and SEMAPHORE. Signed-off-by: Peng Fan <peng@nxp.com> --- arch/arm/cpu/armv7/mx7/clock.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/cpu/armv7/mx7/clock.c b/arch/arm/c

[U-Boot] [PATCH 03/11] imx: mx6sx Add RDC mappings of masters and peripherals

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Add the definitions for the RDC mappings for i.MX6 SoloX. Signed-off-by: Ye.Li <ye...@nxp.com> Signed-off-by: Peng Fan <peng@nxp.com> --- arch/arm/include/asm/arch-mx6/imx-rdc.h | 4 + arch/arm/include/asm/arch-mx6

[U-Boot] [PATCH 10/11] imx: mx7dsabresd: add command and macros for boot m4 core

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Introduce macros and command to support booting M4 core for i.MX7D SabreSD board. Signed-off-by: Ye.Li <ye...@nxp.com> Signed-off-by: Peng Fan <peng@nxp.com> --- include/configs/mx7dsabresd.h | 24 1 file chan

[U-Boot] [PATCH 09/11] imx: mx7: implement functions to boot auxiliary core

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Implement arch_auxiliary_core_up and arch_auxiliary_core_check_up. arch_auxiliary_core_check_up is used to check whether M4 is running or not. arch_auxiliary_core_up is to boot M4 core, the m4 core will use the pc and stack which is set in arch_auxiliary_c

[U-Boot] [PATCH 07/11] imx: mx6: implement functions to boot auxiliary core

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Implement arch_auxiliary_core_up and arch_auxiliary_core_check_up. arch_auxiliary_core_check_up is used to check whether M4 is running or not. arch_auxiliary_core_up is to boot M4 core, the m4 core will use the pc and stack which is set in arch_auxiliary_c

[U-Boot] [PATCH 04/11] imx: mx7d: Add RDC support

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Add the peripherals/masters definitions and registers base addresses for mx7d RDC. Signed-off-by: Ye.Li <ye...@nxp.com> Signed-off-by: Peng Fan <peng@nxp.com> --- arch/arm/include/asm/arch-mx7/imx-rdc.h | 16 +++ arch/arm/include/asm/a

[U-Boot] [PATCH 01/11] imx: mx6: introduce rdc regs

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Introudce rdc regs structure and rdc sema reg structure for i.MX6. For now, to i.MX6, only i.MX6SX supports this. Signed-off-by: Ye.Li <ye...@nxp.com> Signed-off-by: Peng Fan <peng@nxp.com> --- arch/arm/include/asm/arch-m

[U-Boot] [PATCH 00/11] imx: introduce rdc and boot auxiliary core

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> To i.MX6SX and i.MX7D, there is a M4 core embedded. Resources can be shared or occupied exclusively by setting Resource domain controller between A9/7 core and M4 core. Refer "Chapter 52 Resource Domain Controller (RDC)" of i.MX 6SoloX RM

[U-Boot] [PATCH 11/11] imx: mx7d: isolate resources to domain 0 for A7 core

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> In current design, if any peripheral was assigned to both A7 and M4, it will receive ipg_stop or ipg_wait when any of the 2 platforms enter low power mode. We will have a risk that, if A7 enter wait, M4 enter stop, peripheral will have chance to get ip

[U-Boot] [PATCH 08/11] imx: mx6sxsabresd: add command and macros for boot m4 core

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Introduce macros and command to support booting M4 core for i.MX6SX SabreSD board. Signed-off-by: Ye.Li <ye...@nxp.com> Signed-off-by: Peng Fan <peng@nxp.com> --- include/configs/mx6sxsabresd.h | 24 1 file chan

[U-Boot] [PATCH] imx: mx6ulevk: change mtest memory size to 128M

2016-01-04 Thread Peng Fan
From: Peng Fan <peng@nxp.com> To i.MX6UL 14x14 EVK, system memory is 512M; to i.MX6UL 9x9 EVK, system memory is 256M. If setting mtest size to 256M, mtest will crash uboot for i.MX6UL 9x9 evk. So change mtest size to 128M. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefan

Re: [U-Boot] [RFC V1] arm: config: enforce -fno-pic for gcc

2015-12-30 Thread Peng Fan
Hi Albert, Gentle ping! Sorry for missing to mail you when I sent out the patch. Thanks, Peng. On Mon, Dec 14, 2015 at 03:28:56PM +0800, Peng Fan wrote: >Hi Albert, > >Do you have any comments on this patch? > >Regards, >Peng. > >On Sat, Dec 05, 2015 at 03:53:46

[U-Boot] [PATCH V3] usb:ci_udc: Remove ULPI setting for i.MX OTG controller

2015-12-30 Thread Peng Fan
From: "Ye.Li" <b37...@freescale.com> All the i.MX6, i.MX23 and i.MX28 OTG controllers only support UTMI interface. Set to ULPI is not correct, even the controller will reject this setting in PORTSC register. Signed-off-by: Ye.Li <b37...@freescale.com> Signed-off-by: Peng

[U-Boot] [PATCH V2 1/2] imx: mx6: add more entry for mxc_ccm_reg

2016-01-05 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Add more entries for structure mxc_ccm_reg. Signed-off-by: Peng Fan <peng@nxp.com> Reviewed-by: Eric Nelson <e...@nelint.com> Cc: Stefano Babic <sba...@denx.de> --- Changes V2: Address Eric'c comments. Add Comments and r

[U-Boot] [PATCH V2 2/2] imx: mx6ul/sx: fix mmdc_ch0 clk calculation

2016-01-05 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Check "Figure 19-5. BUS clock generation" of i.MX 6SoloX Applications Processor Reference Manual and "Figure 18-5. BUS clock generation" of i.MX 6UltraLite Applications Processor Reference Manual. If mmdc clk sources from pll4_main_clk(p

Re: [U-Boot] [PATCH] net: bootp: Ignore packets whose yiaddr is 0

2016-01-06 Thread Peng Fan
Hi Wolfgang, On Thu, Jan 07, 2016 at 12:49:42AM +0100, Wolfgang Denk wrote: >Dear Peng Fan, > >In message <1451875796-15860-1-git-send-email-peng@nxp.com> you wrote: >> When doing `dhcp`, there is a bad dhcp server in my network >> which always reply dhcp request

Re: [U-Boot] [PATCH 11/11] imx: mx7d: isolate resources to domain 0 for A7 core

2016-01-07 Thread Peng Fan
Hi Stefan, On Wed, Jan 06, 2016 at 11:04:44PM -0800, Stefan Agner wrote: >On 2016-01-04 21:56, Peng Fan wrote: >> From: Peng Fan <peng@nxp.com> >> >> In current design, if any peripheral was assigned to both A7 and M4, >> it will receive ipg_stop or ipg

[U-Boot] [PATCH] common: cli_simple: use strncpy instead of strcpy

2016-01-09 Thread Peng Fan
Report Coverity log: Destination buffer too small (STRING_OVERFLOW) string_overflow: You might overrun the 1024 byte destination string lastcommand by writing 1025 bytes from console_buffer Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Heiko Schocher <h...@denx.de> Cc: Si

[U-Boot] [PATCH] nand: mxs: fix error handling for mxs_nand_init

2016-01-09 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Fix error handling for mxs_nand_init. The original error handling is wrong for err2 and err1. Should first free desc[x], then free desc. This patch also correctly handle err3, should use MXS_DMA_CHANNEL_AHB_APBH_GPMI0 as the check point. Signed-off-by

[U-Boot] [PATCH V2] common: cli_simple: use strlcpy instead of strcpy

2016-01-09 Thread Peng Fan
Report Coverity log: Destination buffer too small (STRING_OVERFLOW) string_overflow: You might overrun the 1024 byte destination string lastcommand by writing 1025 bytes from console_buffer Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Heiko Schocher <h...@denx.de> Cc: Si

Re: [U-Boot] [PATCH] common: cli_simple: use strncpy instead of strcpy

2016-01-09 Thread Peng Fan
On Sat, Jan 09, 2016 at 09:03:59AM -0500, Tom Rini wrote: >On Sat, Jan 09, 2016 at 09:31:48PM +0800, Peng Fan wrote: > >> Report Coverity log: >> Destination buffer too small (STRING_OVERFLOW) >> string_overflow: You might overrun the 1024 byte destination string >&g

Re: [U-Boot] [PATCH 1/2] imx: mx6: add more entry for mxc_ccm_reg

2016-01-05 Thread Peng Fan
Hi Eric, On Tue, Jan 05, 2016 at 11:21:25AM -0700, Eric Nelson wrote: >Hi Peng, > >On 01/03/2016 11:10 PM, Peng Fan wrote: >> Add more entries for structure mxc_ccm_reg. >> >> Signed-off-by: Peng Fan <peng@nxp.com> >> Cc: Stefano Babic <sba...@den

Re: [U-Boot] [PATCH 2/2] imx: mx6ul/sx: fix mmdc_ch0 clk calculation

2016-01-05 Thread Peng Fan
Hi Eric, On Tue, Jan 05, 2016 at 12:06:52PM -0700, Eric Nelson wrote: >Hi Peng, > >On 01/03/2016 11:10 PM, Peng Fan wrote: >> Check "Figure 19-5. BUS clock generation" of i.MX 6SoloX Applications >> Processor Reference Manual and "Figure 18-5. BUS clo

Re: [U-Boot] [PATCH 1/1] common: nvedit: use snprintf instead of sprintf

2015-12-22 Thread Peng Fan
Hi All, On Tue, Dec 22, 2015 at 02:40:58PM -0500, Tom Rini wrote: >On Tue, Dec 22, 2015 at 07:53:12AM -0200, Fabio Estevam wrote: >> Hi Peng, >> >> On Tue, Dec 22, 2015 at 7:14 AM, Peng Fan <van.free...@gmail.com> wrote: >> > From: Peng Fan <peng@nxp

Re: [U-Boot] [PATCH 1/1] common: env: initialize scalar variable

2015-12-22 Thread Peng Fan
Hi Wolfgang On Tue, Dec 22, 2015 at 10:29:51AM +0100, Wolfgang Denk wrote: >Dear Peng Fan, > >In message <1450775655-2979-2-git-send-email-van.free...@gmail.com> you wrote: >> From: Peng Fan <peng@nxp.com> >> >> Before calling hsearch_r, initialize

Re: [U-Boot] [PATCH] imx: mx6sxsabresd: support emmc

2015-12-22 Thread Peng Fan
Hi Otavio, On Tue, Dec 22, 2015 at 09:51:37AM -0200, Otavio Salvador wrote: >On Tue, Dec 22, 2015 at 7:03 AM, Peng Fan <van.free...@gmail.com> wrote: >> From: Peng Fan <peng@nxp.com> >> >> For i.MX6SX SABRESD, USDHC4 can be used for SD and EMMC, default >&

[U-Boot] [PATCH V2] common: nvedit: use snprintf instead of sprintf

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Use snprintf to replace sprintf. Coverity log: " Unbounded source buffer (STRING_SIZE) string_size: Passing string init_val of unknown size to sprintf. " Reported-by: Coverity Signed-off-by: Peng Fan <peng@nxp.com> Cc: Tom Rini &

[U-Boot] [PATCH V2] common: env: initialize scalar variable

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Before calling hsearch_r, initialize callback entry to NULL. Coverity log: " Uninitialized scalar variable (UNINIT) uninit_use_in_call: Using uninitialized value e. Field e.callback is uninitialized when calling hsearch_r. " Reported-by: Cov

Re: [U-Boot] [PATCH 1/1] common: cli: avoid memory leak

2015-12-27 Thread Peng Fan
Hi Simon, On Sun, Dec 27, 2015 at 09:22:01PM -0700, Simon Glass wrote: >Hi Peng, > >On 22 December 2015 at 02:14, Peng Fan <van.free...@gmail.com> wrote: >> From: Peng Fan <peng@nxp.com> >> >> Whether CONFIG_SYS_HUSH_PARSER is defined or not, should

[U-Boot] [PATCH 2/3] imx: nand: update GPMI NAND driver to support MX7

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Update GPMI NAND driver and BCH head file to support i.MX7 Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> --- arch/arm/include/asm/imx-common/regs-bch.h | 4 ++-- drivers/mtd/nand/mxs_nand.c

[U-Boot] [PATCH] imx: mx6sxsabresd: support emmc

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> For i.MX6SX SABRESD, USDHC4 can be used for SD and EMMC, default it is used for SD. This patch introduces EMMC pinmux settings and a new macro CONFIG_MX6SXSABRESD_EMMC_REWORK. If the board has been reworked to support emmc, need to enable this macro. Sign

[U-Boot] [PATCH 3/3] imx: mx7dsabresd: support nand

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Add pinmux settings. Add related macro definitions. Nand pin conflicts with emmc, so if want to enable nand, need to do hardware rework. After hardware rework, define CONFIG_NAND_MXS in board header file. Signed-off-by: Peng Fan <peng@nxp.com>

[U-Boot] [PATCH 1/3] imx: apbh_dma: Update APBH-DMA for MX7D

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Update APBH-DMA driver and head files to support i.MX7D Signed-off-by: Peng Fan <peng@nxp.com> Cc: Stefano Babic <sba...@denx.de> --- arch/arm/include/asm/imx-common/dma.h | 2 +- arch/arm/include/asm/imx-common/regs-apbh.h | 6 +

[U-Boot] [PATCH 1/1] common: cli: avoid memory leak

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always check to free 'buff' to avoid memory leak. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Tom Rini <tr...@konsulko.com> Cc: Masahiro Yamada <yamada.masah...@socionext.co

[U-Boot] [PATCH 1/1] common: nvedit: use snprintf instead of sprintf

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Use snprintf to replace sprintf. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Tom Rini <tr...@konsulko.com> Cc: Simon Glass <s...@chromium.org> Cc: Joe Hershberger <joe.hershber...@ni.com> --- common/cmd_nvedit.c | 2 +- 1 f

[U-Boot] [PATCH 1/1] common: env: initialize scalar variable

2015-12-22 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Before calling hsearch_r, initialize callback entry to NULL. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Tom Rini <tr...@konsulko.com> Cc: Simon Glass <s...@chromium.org> --- common/env_callback.c | 1 + common/env_flags.c|

Re: [U-Boot] [PATCH] common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY

2015-11-24 Thread Peng Fan
Hi Simon, On Tue, Nov 24, 2015 at 12:04:56PM -0700, Simon Glass wrote: >Hi Peng, > >On 24 November 2015 at 01:54, Peng Fan <peng@freescale.com> wrote: >> If condition of "(load == image_start || load == image_data)" is true, >> should use "fd

[U-Boot] [PATCH] video: ipu: fix out of bounds access

2015-11-26 Thread Peng Fan
We need to access reg stp_rep9, but not stp_rep[(9 - 1) / 2]. If using "__raw_writel(0, DI_STP_REP(disp, 9))", this will exceeds the size of stp_rep array. Signed-off-by: Peng Fan <peng@freescale.com> Acked-by: Liu Ying <ying@freescale.com> Cc: Stefano Babic <sba

[U-Boot] [PATCH V2] common: cli_hush: avoid memory leak

2015-11-26 Thread Peng Fan
Need to free memory avoid memory leak, when error. Signed-off-by: Peng Fan <peng@freescale.com> Reviewed-by: Simon Glass <s...@chromium.org> Cc: Simon Glass <s...@chromium.org> Cc: Tom Rini <tr...@konsulko.com> --- Changes V2: Take Simon's comments, fix another memo

Re: [U-Boot] [PATCH] common: cli_hush: avoid memory leak

2015-11-26 Thread Peng Fan
Hi Simon, On Thu, Nov 26, 2015 at 09:49:38AM -0800, Simon Glass wrote: >Hi Peng, > >On 25 November 2015 at 02:16, Peng Fan <peng@freescale.com> wrote: >> Need to free memory avoid memory leak, when error. >> >> Signed-off-by: Peng Fan <peng@

Re: [U-Boot] [PATCH] common: mmc: unsigned char compared against 0

2015-11-26 Thread Peng Fan
Hi Simon, On Thu, Nov 26, 2015 at 06:51:58PM -0800, Simon Glass wrote: >Hi Peng, > >On 25 November 2015 at 01:16, Peng Fan <peng@freescale.com> wrote: >> "enable" is unsigned char type and its value will not be >> negative, so discard "enable

Re: [U-Boot] [PATCH] pmic: Fix pfuze100 bit definitions

2015-11-25 Thread Peng Fan
> >commit 8fa46350a4c7dca7710362f6c871098557b934ad >Author: Peng Fan <peng@freescale.com> >Date: Fri Aug 7 16:43:45 2015 +0800 > >power: regulator: add pfuze100 support > >Signed-off-by: Marek Vasut <ma...@denx.de> >Cc: Fabio Estevam <fabio.este...@freescale.com> >Cc:

Re: [U-Boot] [PATCH] pmic: Fix pfuze100 bit definitions

2015-11-25 Thread Peng Fan
On Thu, Nov 26, 2015 at 02:35:28AM +0100, Marek Vasut wrote: >On Thursday, November 26, 2015 at 02:27:01 AM, Peng Fan wrote: >> Hi Marek, >> >> On Thu, Nov 26, 2015 at 12:15:44AM +0100, Marek Vasut wrote: >> >The following patch changed the PFUZE100 swbst register

[U-Boot] [PATCH] common: miiphyutil: avoid memory leak

2015-11-25 Thread Peng Fan
can handle NULL pointer. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Joe Hershberger <joe.hershber...@ni.com> Cc: Simon Glass <s...@chromium.org> Cc: Bin Meng <bmeng...@gmail.com> --- common/miiphyutil.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/

Re: [U-Boot] [PATCH] arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

2015-11-27 Thread Peng Fan
871098557b934ad >Author: Peng Fan <peng@freescale.com> >Date: Fri Aug 7 16:43:45 2015 +0800 > >power: regulator: add pfuze100 support > >Signed-off-by: Marek Vasut <ma...@denx.de> >Cc: Fabio Estevam <fabio.este...@freescale.com> >Cc: Peng Fan

[U-Boot] [PATCH] common: mmc: unsigned char compared against 0

2015-11-25 Thread Peng Fan
"enable" is unsigned char type and its value will not be negative, so discard "enable < 0". Signed-off-by: Peng Fan <peng@freescale.com> Cc: Diego Santa Cruz <diego.santac...@spinetix.com> Cc: Pantelis Antoniou <pantelis.anton...@konsulko.com> Cc: An

[U-Boot] [PATCH] common: cli_hush: avoid memory leak

2015-11-25 Thread Peng Fan
Need to free memory avoid memory leak, when error. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Simon Glass <s...@chromium.org> Cc: Tom Rini <tr...@konsulko.com> --- common/cli_hush.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/c

Re: [U-Boot] [PATCH] imx: mx6: add missing return value

2015-11-29 Thread Peng Fan
Hi Jeroen, On Sun, Nov 29, 2015 at 06:30:34PM +0100, Jeroen Hofstee wrote: >cc: Peng Fan <peng@freescale.com> >Signed-off-by: Jeroen Hofstee <jer...@myspectrum.nl> >--- >not tested ;) > > arch/arm/cpu/armv7/mx6/clock.c | 2 ++ > 1 file changed, 2 insertions(+) &

Re: [U-Boot] MX6ULEVK does not boot

2015-11-30 Thread Peng Fan
Hi Fabio, On Mon, Nov 30, 2015 at 12:54:37PM -0200, Fabio Estevam wrote: >Hi Peng, > >On Mon, Nov 30, 2015 at 5:39 AM, Peng Fan <b51...@freescale.com> wrote: > >> Sorry for this late reply. I missed you mail. I tried in my side >> with one sandisk 2GB macro sd card a

Re: [U-Boot] MX6ULEVK does not boot

2015-11-29 Thread Peng Fan
Hi Fabio, On Thu, Nov 19, 2015 at 02:13:31PM -0200, Fabio Estevam wrote: >On Thu, Nov 19, 2015 at 1:58 PM, Fabio Estevam wrote: >> Hi Peng, >> >> Just noticed that mx6ulevk is not booting with latest U-boot: >> >> U-Boot SPL 2016.01-rc1-00078-g736d174 (Nov 19 2015 - 13:45:19)

[U-Boot] [PATCH] imx: mx6: fix reg base address when runtime usage

2015-11-30 Thread Peng Fan
Should use parenthese to wrap the macro definition, otherwise we will encounter error like the following: " if (base_addr != LCDIF1_BASE_ADDR) { puts("Wrong LCD interface!\n"); return -EINVAL; } " Without this patch, we will always encounter "Wrong LCD interfa

[U-Boot] [PATCH] imx: mx7dsabresd: Add QSPI support

2015-11-30 Thread Peng Fan
sf read 0x8000 0 0x400 device 0 whole chip SF: 67108864 bytes @ 0x0 Read: OK => sf erase 0 0x400 SF: 67108864 bytes @ 0x0 Erased: OK => sf write 0x8000 0 0x400 device 0 whole chip SF: 67108864 bytes @ 0x0 Written: OK " Signed-off-by: Peng Fan <peng@freescale.com

[U-Boot] [PATCH] common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY

2015-11-24 Thread Peng Fan
If condition of "(load == image_start || load == image_data)" is true, should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;", or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);" at the end of the switch case. Signed-

[U-Boot] [RFC] common: cli_hush: avoid dead code

2015-11-24 Thread Peng Fan
Condition "(value == NULL && ++value == NULL)" actully will always return false. Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect such expression "c=". To "c=", *(value + 1) is 0, so directly return -1, but not continue. Sig

[U-Boot] [PATCH] common: bootm: check return value of strict_strtoul

2015-11-24 Thread Peng Fan
Before continue, check return value of strict_strtoul. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Albert Aribaud <albert.u.b...@aribaud.net> Cc: Simon Glass <s...@chromium.org> Cc: Jan Kiszka <jan.kis...@siemens.com> Cc: Joe Hershberger <joe.hershber...@ni.co

[U-Boot] [PATCH] video: ipu: simplify if else code

2015-11-24 Thread Peng Fan
Simplify if/else code, since if channel equals to MEM_BG_SYNC or MEM_FG_SYNC, we have value 5 for 'dc_chan'. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Anatolij Gustschin <ag...@denx.de> Cc: Stefano Babic <sba...@denx.de> --- drivers/video/ipu_disp.c | 4 +---

[U-Boot] [PATCH] common: miiphyutil: no need to check name of mii_dev

2015-11-24 Thread Peng Fan
The entry name of mii_dev is an array not pointer, so no need to check. Signed-off-by: Peng Fan <peng@freescale.com> Cc: Joe Hershberger <joe.hershber...@ni.com> Cc: Simon Glass <s...@chromium.org> Cc: Bin Meng <bmeng...@gmail.com> --- common/miiphyutil.c | 2 +- 1 f

[U-Boot] [PATCH] imx: mx6/7 define CONFIG_SYS_VSNPRINTF

2016-01-12 Thread Peng Fan
From: Peng Fan <peng@nxp.com> Define CONFIG_SYS_VSNPRINTF to use snprintf. If not define CONFIG_SYS_VSNPRINTF, snprintf is sprintf. Report by Coverity: pass string init_val of unknown size to sprintf Signed-off-by: Peng Fan <peng@nxp.com> Cc: Peter Robinson <pbrobin..

[U-Boot] [PATCH] common: usb: fix checking condition

2016-01-12 Thread Peng Fan
From: Peng Fan <peng@nxp.com> We support max USB_MAXENDPOINTS, so need to use "epno >= USB_MAXENDPOINTS", but not "epno > USB_MAXENDPOINTS". If use ">", we may exceeds the array of if_desc->ep_desc. Signed-off-by: Peng Fan <peng@nxp.c

[U-Boot] [PATCH] common: env_flags: fix loop condition when using env_flags_varaccess_mask

2016-01-12 Thread Peng Fan
From: Peng Fan <peng@nxp.com> We should use ARRAY_SIZE, but not sizeof. The size of env_flags_varaccess_mask is 16bytes, but we only need 4 loops. If using 16 as the end condition, we may access memory that not belong to array env_flags_varaccess_mask. Signed-off-by: Peng Fan

Re: [U-Boot] [PATCH] arm: mxs: Remove misleading comments

2016-06-06 Thread Peng Fan
Hi Michael > -Original Message- > From: Michael Heimpold [mailto:michael.heimp...@i2se.com] > Sent: Monday, June 06, 2016 8:27 PM > To: u-boot@lists.denx.de > Cc: Michael Heimpold <michael.heimp...@i2se.com>; Peng Fan > <peng@freescale.com>; Stefano Ba

Re: [U-Boot] [PATCH 3/3] mmc: fsl: introduce wp_enable

2016-06-14 Thread Peng Fan
Hi Fabio, On Tue, Jun 14, 2016 at 10:46:15PM -0300, Fabio Estevam wrote: >On Tue, Jun 14, 2016 at 10:17 PM, Peng Fan <van.free...@gmail.com> wrote: > >>>> Your patch allows me to write to the eMMC succesfully: >>>> >>>> Tested-by: Fabio Estevam <

Re: [U-Boot] [PATCH 3/3] mmc: fsl: introduce wp_enable

2016-06-14 Thread Peng Fan
Hi Fabio, On Tue, Jun 14, 2016 at 08:23:27PM -0300, Fabio Estevam wrote: >Hi Peng, > >On Tue, Jun 14, 2016 at 8:01 PM, Fabio Estevam wrote: > >> Just saw this issue on a mx6ul pico board: after adding I2C support >> then the eMMC could not longer be written: >> >> => saveenv

[U-Boot] [PATCH] usb: ehci: only shutdown opened controller

2016-06-14 Thread Peng Fan
er for OTG port does not run actually. Then, if `usb stop`, the OTG controller for OTG port will also be shutdown, but it is not running. This patch adds a check to only shutdown the running controller. Signed-off-by: Peng Fan <peng@nxp.com> Cc: Marek Vasut <ma...@denx.de&

[U-Boot] [PATCH V2 1/3] mmc: fsl: reset to normal boot mode when eMMC fast boot

2016-06-14 Thread Peng Fan
ode. Also clear DLL_CTRL delay line settings at USDHC initialization to eliminate the pre-settings from boot rom. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Pantelis Antoniou <pa...@antoniou-consulting.com> Cc: York Sun <york@nxp.com> Cc: Stefano Babic <sb

[U-Boot] [PATCH V2 2/3] fsl_esdhc: Update clock enable bits for USDHC

2016-06-14 Thread Peng Fan
Signed-off-by: Ye Li <ye...@nxp.com> Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: York Sun <york@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Pantelis Antoniou <pa...@antoniou-consulting.com> Cc: Fabio Estevam <fabio.este...@nxp.com> --- V2: Reb

[U-Boot] [PATCH V2 3/3] mmc: fsl: introduce wp_enable

2016-06-14 Thread Peng Fan
wp_gpio, if there is wp-gpios provided in dts, wp_enable is set to 1; if no, set to 0. Signed-off-by: Peng Fan <van.free...@gmail.com> Cc: Pantelis Antoniou <pa...@antoniou-consulting.com> Cc: York Sun <york@nxp.com> Cc: Stefano Babic <sba...@denx.de> Cc: Fabio Esteva

[U-Boot] [PATCH 1/4] mx7dsabresd: Fix LCD_PWR_EN output setting

2016-06-15 Thread Peng Fan
From: Ye Li <ye...@nxp.com> LCD_PWR_EN controls the G pin of Q13 PMOS which needs low voltage to connect D to S for outputting LCD 3.3V. If LCD_PWR_EN is high, we measured the LCD 3v3 is actually 1.2V. Signed-off-by: Ye Li <ye...@nxp.com> Signed-off-by: Peng Fan <peng@nxp.c

<    2   3   4   5   6   7   8   9   10   11   >