Skip to contentSkip to conversation

imx: mx7: discard unused global variable

PATCH New Peng Fan 2 participants 5 messages Sep 15, 2015 – Sep 24, 2015

Subsystems (2)
lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH v2 1/4 imx: mx7: discard unused global variable

Discard unused global variable.

Cc Stefano Babic <[email protected]>

---

Changes V2:
none

 arch/arm/cpu/armv7/mx7/soc.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/cpu/armv7/mx7/soc.c +0 -2
index 8d50149..af16ba7 100644
@@ -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,
Signature · 1 line
1.8.4
author
#1 lore raw

PATCH v2 2/4 imx-common: wrap boot_mode_apply with CONFIG_CMD_BMODE

boot_mode_apply should be applied only with CONFIG_CMD_BMODE enabled.

Cc Stefano Babic <[email protected]>

---

Changes v2:
none

 arch/arm/imx-common/init.c | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/imx-common/init.c +2 -0
index 56d5010..058cf79 100644
@@ -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
Signature · 1 line
1.8.4
author
#2 lore raw

PATCH v2 3/4 imx: mx7dsabresd: drop code for CONFIG_CMD_BMODE

In reply to Peng Fan

We use outer pmic reset and drop internal reset signal, bmode will not work as expected, so drop boot mode code for 7dsabresd board.

Cc Stefano Babic <[email protected]>
Cc Adrian Alonso <[email protected]>

---

Changes v2:
refine commit msg.

 board/freescale/mx7dsabresd/mx7dsabresd.c | 14 --------------
 include/configs/mx7dsabresd.h             |  2 --
 2 files changed, 16 deletions(-)
board/freescale/mx7dsabresd/mx7dsabresd.c +0 -14
index 6d88573..2b14fb6 100644
@@ -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
include/configs/mx7dsabresd.h +0 -2
index ec6e0a6..8231c04 100644
@@ -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
Signature · 1 line
1.8.4
author
#3 lore raw

PATCH v2 4/4 imx: fix coding style

In reply to Peng Fan

Fix coding style.

Cc Stefano Babic <[email protected]>

---

Changes v2:
none

 arch/arm/cpu/armv7/mx7/soc.c | 2 +-
 arch/arm/imx-common/init.c   | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/mx7/soc.c +1 -1
index af16ba7..2ed05ea 100644
@@ -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) {
arch/arm/imx-common/init.c +1 -2
index 058cf79..15dab1d 100644
@@ -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.
Signature · 1 line
1.8.4
#4 lore raw

PATCH v2 1/4 imx: mx7: discard unused global variable

In reply to Peng Fan
Quoted 18 lines · Peng Fan

Discard unused global variable.

Cc Stefano Babic <[email protected]>

---

Changes V2:
none

 arch/arm/cpu/armv7/mx7/soc.c | 2 --
 1 file changed, 2 deletions(-)
arch/arm/cpu/armv7/mx7/soc.c +0 -0
index 8d50149..af16ba7 100644

arch/arm/cpu/armv7/mx7/soc.c line 20

Quoted 8 lines
arch/arm/cpu/armv7/mx7/soc.c +0 -2
@@ -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,

Whole series:

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================