All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] imx: mx7: discard unused global variable
@ 2015-09-14  9:08 Peng Fan
  2015-09-14  9:08 ` [U-Boot] [PATCH 2/4] imx-common: wrap boot_mode_apply with CONFIG_CMD_BMODE Peng Fan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Peng Fan @ 2015-09-14  9:08 UTC (permalink / raw
  To: u-boot

Discard unused global variable.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/cpu/armv7/mx7/soc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
index 8d50149..af16ba7 100644
--- a/arch/arm/cpu/armv7/mx7/soc.c
+++ b/arch/arm/cpu/armv7/mx7/soc.c
@@ -15,8 +15,6 @@
 #include <dm.h>
 #include <imx_thermal.h>
 
-struct src *src_reg = (struct src *)SRC_BASE_ADDR;
-
 #if defined(CONFIG_IMX_THERMAL)
 static const struct imx_thermal_plat imx7_thermal_plat = {
 	.regs = (void *)ANATOP_BASE_ADDR,
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 2/4] imx-common: wrap boot_mode_apply with CONFIG_CMD_BMODE
  2015-09-14  9:08 [U-Boot] [PATCH 1/4] imx: mx7: discard unused global variable Peng Fan
@ 2015-09-14  9:08 ` Peng Fan
  2015-09-14  9:08 ` [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE Peng Fan
  2015-09-14  9:08 ` [U-Boot] [PATCH 4/4] imx: fix coding style Peng Fan
  2 siblings, 0 replies; 7+ messages in thread
From: Peng Fan @ 2015-09-14  9:08 UTC (permalink / raw
  To: u-boot

boot_mode_apply should be applied only with CONFIG_CMD_BMODE enabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/imx-common/init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/imx-common/init.c b/arch/arm/imx-common/init.c
index 56d5010..058cf79 100644
--- a/arch/arm/imx-common/init.c
+++ b/arch/arm/imx-common/init.c
@@ -103,6 +103,7 @@ void init_src(void)
 	writel(val, &src_regs->scr);
 }
 
+#ifdef CONFIG_CMD_BMODE
 void boot_mode_apply(unsigned cfg_val)
 {
 	unsigned reg;
@@ -115,3 +116,4 @@ void boot_mode_apply(unsigned cfg_val)
 		reg &= ~(1 << 28);
 	writel(reg, &psrc->gpr10);
 }
+#endif
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE
  2015-09-14  9:08 [U-Boot] [PATCH 1/4] imx: mx7: discard unused global variable Peng Fan
  2015-09-14  9:08 ` [U-Boot] [PATCH 2/4] imx-common: wrap boot_mode_apply with CONFIG_CMD_BMODE Peng Fan
@ 2015-09-14  9:08 ` Peng Fan
  2015-09-14 18:09   ` Fabio Estevam
  2015-09-14  9:08 ` [U-Boot] [PATCH 4/4] imx: fix coding style Peng Fan
  2 siblings, 1 reply; 7+ messages in thread
From: Peng Fan @ 2015-09-14  9:08 UTC (permalink / raw
  To: u-boot

Since i.MX7D does not support warm reset, so boot_mode_apply
actually will not work. Also we use outer pmic reset and drop
internal reset signal, so drop boot mode code for 7dsabresd board.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Adrian Alonso <aalonso@freescale.com>
---
 board/freescale/mx7dsabresd/mx7dsabresd.c | 14 --------------
 include/configs/mx7dsabresd.h             |  2 --
 2 files changed, 16 deletions(-)

diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c
index 6d88573..2b14fb6 100644
--- a/board/freescale/mx7dsabresd/mx7dsabresd.c
+++ b/board/freescale/mx7dsabresd/mx7dsabresd.c
@@ -10,7 +10,6 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/gpio.h>
 #include <asm/imx-common/iomux-v3.h>
-#include <asm/imx-common/boot_mode.h>
 #include <asm/io.h>
 #include <linux/sizes.h>
 #include <common.h>
@@ -458,15 +457,6 @@ int board_init(void)
 	return 0;
 }
 
-#ifdef CONFIG_CMD_BMODE
-static const struct boot_mode board_boot_modes[] = {
-	/* 4 bit bus width */
-	{"sd1", MAKE_CFGVAL(0x10, 0x10, 0x00, 0x00)},
-	{"emmc", MAKE_CFGVAL(0x10, 0x2a, 0x00, 0x00)},
-	{NULL,   0},
-};
-#endif
-
 #ifdef CONFIG_POWER
 #define I2C_PMIC	0
 int power_init_board(void)
@@ -501,10 +491,6 @@ int board_late_init(void)
 {
 	struct wdog_regs *wdog = (struct wdog_regs *)WDOG1_BASE_ADDR;
 
-#ifdef CONFIG_CMD_BMODE
-	add_board_boot_modes(board_boot_modes);
-#endif
-
 #ifdef CONFIG_ENV_IS_IN_MMC
 	mmc_late_init();
 #endif
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index ec6e0a6..8231c04 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -175,8 +175,6 @@
 #define CONFIG_SYS_MMC_ENV_PART		0	/* user area */
 #define CONFIG_MMCROOT			"/dev/mmcblk0p2"  /* USDHC1 */
 
-#define CONFIG_CMD_BMODE
-
 /* USB Configs */
 #define CONFIG_CMD_USB
 #define CONFIG_USB_EHCI
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 4/4] imx: fix coding style
  2015-09-14  9:08 [U-Boot] [PATCH 1/4] imx: mx7: discard unused global variable Peng Fan
  2015-09-14  9:08 ` [U-Boot] [PATCH 2/4] imx-common: wrap boot_mode_apply with CONFIG_CMD_BMODE Peng Fan
  2015-09-14  9:08 ` [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE Peng Fan
@ 2015-09-14  9:08 ` Peng Fan
  2 siblings, 0 replies; 7+ messages in thread
From: Peng Fan @ 2015-09-14  9:08 UTC (permalink / raw
  To: u-boot

Fix coding style.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/cpu/armv7/mx7/soc.c | 2 +-
 arch/arm/imx-common/init.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c
index af16ba7..2ed05ea 100644
--- a/arch/arm/cpu/armv7/mx7/soc.c
+++ b/arch/arm/cpu/armv7/mx7/soc.c
@@ -79,7 +79,7 @@ u32 get_cpu_temp_grade(int *minc, int *maxc)
 	val &= 0x3;
 
 	if (minc && maxc) {
-		if ( val == TEMP_AUTOMOTIVE) {
+		if (val == TEMP_AUTOMOTIVE) {
 			*minc = -40;
 			*maxc = 125;
 		} else if (val == TEMP_INDUSTRIAL) {
diff --git a/arch/arm/imx-common/init.c b/arch/arm/imx-common/init.c
index 058cf79..15dab1d 100644
--- a/arch/arm/imx-common/init.c
+++ b/arch/arm/imx-common/init.c
@@ -44,8 +44,7 @@ void init_aips(void)
 	writel(0x00000000, &aips2->opacr3);
 	writel(0x00000000, &aips2->opacr4);
 
-	if (is_cpu_type(MXC_CPU_MX6SX) || is_soc_type(MXC_SOC_MX7))
-	{
+	if (is_cpu_type(MXC_CPU_MX6SX) || is_soc_type(MXC_SOC_MX7)) {
 		/*
 		 * Set all MPROTx to be non-bufferable, trusted for R/W,
 		 * not forced to user-mode.
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE
  2015-09-14  9:08 ` [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE Peng Fan
@ 2015-09-14 18:09   ` Fabio Estevam
  2015-09-15  0:31     ` Peng Fan
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2015-09-14 18:09 UTC (permalink / raw
  To: u-boot

Hi Peng,

On Mon, Sep 14, 2015 at 6:08 AM, Peng Fan <Peng.Fan@freescale.com> wrote:
> Since i.MX7D does not support warm reset, so boot_mode_apply
> actually will not work. Also we use outer pmic reset and drop
> internal reset signal, so drop boot mode code for 7dsabresd board.

Booting via bmode is working fine here.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE
  2015-09-14 18:09   ` Fabio Estevam
@ 2015-09-15  0:31     ` Peng Fan
  2015-09-15  1:48       ` Fabio Estevam
  0 siblings, 1 reply; 7+ messages in thread
From: Peng Fan @ 2015-09-15  0:31 UTC (permalink / raw
  To: u-boot

Hi Fabio,
On Mon, Sep 14, 2015 at 03:09:24PM -0300, Fabio Estevam wrote:
>Hi Peng,
>
>On Mon, Sep 14, 2015 at 6:08 AM, Peng Fan <Peng.Fan@freescale.com> wrote:
>> Since i.MX7D does not support warm reset, so boot_mode_apply
>> actually will not work. Also we use outer pmic reset and drop
>> internal reset signal, so drop boot mode code for 7dsabresd board.
>
>Booting via bmode is working fine here.

If boot from sd1, bmode sd1 work well. If boot from qspi1, bmode qspi work well.
This is expected. If boot from qspi, but we use 'bmode sd1', this will not work.
The reason that introduce bmode command is to boot from different media, but
now we use wdog signal to trigger pmic reset, which means the SoC will be
powered off and powered on. There is no reason to keep bmode. This patch
needs my previous wdog patch set.

Regards,
Peng.
>
>Regards,
>
>Fabio Estevam

-- 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE
  2015-09-15  0:31     ` Peng Fan
@ 2015-09-15  1:48       ` Fabio Estevam
  0 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2015-09-15  1:48 UTC (permalink / raw
  To: u-boot

Hi Peng,

On Mon, Sep 14, 2015 at 9:31 PM, Peng Fan <b51431@freescale.com> wrote:
> Hi Fabio,
> On Mon, Sep 14, 2015 at 03:09:24PM -0300, Fabio Estevam wrote:
>>Hi Peng,
>>
>>On Mon, Sep 14, 2015 at 6:08 AM, Peng Fan <Peng.Fan@freescale.com> wrote:
>>> Since i.MX7D does not support warm reset, so boot_mode_apply
>>> actually will not work. Also we use outer pmic reset and drop
>>> internal reset signal, so drop boot mode code for 7dsabresd board.
>>
>>Booting via bmode is working fine here.
>
> If boot from sd1, bmode sd1 work well. If boot from qspi1, bmode qspi work well.
> This is expected. If boot from qspi, but we use 'bmode sd1', this will not work.

Understood. I only booted from sd1 and did 'bmode sd1'.

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-09-15  1:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14  9:08 [U-Boot] [PATCH 1/4] imx: mx7: discard unused global variable Peng Fan
2015-09-14  9:08 ` [U-Boot] [PATCH 2/4] imx-common: wrap boot_mode_apply with CONFIG_CMD_BMODE Peng Fan
2015-09-14  9:08 ` [U-Boot] [PATCH 3/4] imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE Peng Fan
2015-09-14 18:09   ` Fabio Estevam
2015-09-15  0:31     ` Peng Fan
2015-09-15  1:48       ` Fabio Estevam
2015-09-14  9:08 ` [U-Boot] [PATCH 4/4] imx: fix coding style Peng Fan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.