* [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information
@ 2012-02-10 15:34 Fabio Estevam
2012-02-10 15:34 ` [U-Boot] [PATCH 2/2] mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected Fabio Estevam
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Fabio Estevam @ 2012-02-10 15:34 UTC (permalink / raw)
To: u-boot
MX35PDK board does not need to print CPU revision and reset cause in board file
because this is printed by common code when CONFIG_DISPLAY_CPUINFO is selected
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Stefano,
I don't have a mx35pdk board handy to try this.
board/freescale/mx35pdk/mx35pdk.c | 25 -------------------------
1 files changed, 0 insertions(+), 25 deletions(-)
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index a5b51a0..5f24fed 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -263,10 +263,6 @@ int board_late_init(void)
int checkboard(void)
{
- struct ccm_regs *ccm =
- (struct ccm_regs *)IMX_CCM_BASE;
- u32 cpu_rev = get_cpu_rev();
-
/*
* Be sure that I2C is initialized to check
* the board revision
@@ -276,27 +272,6 @@ int checkboard(void)
/* Print board revision */
printf("Board: MX35 PDK %d.0 ", ((get_board_rev() >> 8) + 1) & 0x0F);
- /* Print CPU revision */
- printf("i.MX35 %d.%d [", (cpu_rev & 0xF0) >> 4, cpu_rev & 0x0F);
-
- switch (readl(&ccm->rcsr) & 0x0F) {
- case 0x0000:
- puts("POR");
- break;
- case 0x0002:
- puts("JTAG");
- break;
- case 0x0004:
- puts("RST");
- break;
- case 0x0008:
- puts("WDT");
- break;
- default:
- puts("unknown");
- }
- puts("]\n");
-
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/2] mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected
2012-02-10 15:34 [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Fabio Estevam
@ 2012-02-10 15:34 ` Fabio Estevam
2012-02-10 16:49 ` Stefano Babic
2012-02-10 15:57 ` [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Stefano Babic
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2012-02-10 15:34 UTC (permalink / raw)
To: u-boot
get_reset_cause() function is only used inside print_cpuinfo(), so let it be
defined only when CONFIG_DISPLAY_CPUINFO is selected.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
arch/arm/cpu/arm1136/mx35/generic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/cpu/arm1136/mx35/generic.c b/arch/arm/cpu/arm1136/mx35/generic.c
index d41613e..986b1f9 100644
--- a/arch/arm/cpu/arm1136/mx35/generic.c
+++ b/arch/arm/cpu/arm1136/mx35/generic.c
@@ -422,6 +422,7 @@ U_BOOT_CMD(
""
);
+#if defined(CONFIG_DISPLAY_CPUINFO)
static char *get_reset_cause(void)
{
/* read RCSR register from CCM module */
@@ -444,7 +445,6 @@ static char *get_reset_cause(void)
}
}
-#if defined(CONFIG_DISPLAY_CPUINFO)
int print_cpuinfo(void)
{
u32 srev = get_cpu_rev();
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information
2012-02-10 15:34 [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Fabio Estevam
2012-02-10 15:34 ` [U-Boot] [PATCH 2/2] mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected Fabio Estevam
@ 2012-02-10 15:57 ` Stefano Babic
2012-02-10 16:18 ` Stefano Babic
2012-02-10 16:29 ` [U-Boot] [PATCH v2 " Fabio Estevam
3 siblings, 0 replies; 7+ messages in thread
From: Stefano Babic @ 2012-02-10 15:57 UTC (permalink / raw)
To: u-boot
On 10/02/2012 16:34, Fabio Estevam wrote:
> MX35PDK board does not need to print CPU revision and reset cause in board file
> because this is printed by common code when CONFIG_DISPLAY_CPUINFO is selected
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Stefano,
>
> I don't have a mx35pdk board handy to try this.
Do not worry, I can test it.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information
2012-02-10 15:34 [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Fabio Estevam
2012-02-10 15:34 ` [U-Boot] [PATCH 2/2] mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected Fabio Estevam
2012-02-10 15:57 ` [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Stefano Babic
@ 2012-02-10 16:18 ` Stefano Babic
2012-02-10 16:29 ` [U-Boot] [PATCH v2 " Fabio Estevam
3 siblings, 0 replies; 7+ messages in thread
From: Stefano Babic @ 2012-02-10 16:18 UTC (permalink / raw)
To: u-boot
On 10/02/2012 16:34, Fabio Estevam wrote:
> MX35PDK board does not need to print CPU revision and reset cause in board file
> because this is printed by common code when CONFIG_DISPLAY_CPUINFO is selected
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Hi Fabio,
> /* Print board revision */
> printf("Board: MX35 PDK %d.0 ", ((get_board_rev() >> 8) + 1) & 0x0F);
Now please add a \n here, because the newline is not inserted anymore.
The output with your patches is :
Board: MX35 PDK 1.0 I2C: ready
DRAM: 256 MiB
Thanks,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information
2012-02-10 15:34 [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Fabio Estevam
` (2 preceding siblings ...)
2012-02-10 16:18 ` Stefano Babic
@ 2012-02-10 16:29 ` Fabio Estevam
2012-02-10 16:49 ` Stefano Babic
3 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2012-02-10 16:29 UTC (permalink / raw)
To: u-boot
MX35PDK board does not need to print CPU revision and reset cause in board file
because this is printed by common code when CONFIG_DISPLAY_CPUINFO is selected
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Introduce \n.
board/freescale/mx35pdk/mx35pdk.c | 27 +--------------------------
1 files changed, 1 insertions(+), 26 deletions(-)
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index a5b51a0..cce7123 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -263,10 +263,6 @@ int board_late_init(void)
int checkboard(void)
{
- struct ccm_regs *ccm =
- (struct ccm_regs *)IMX_CCM_BASE;
- u32 cpu_rev = get_cpu_rev();
-
/*
* Be sure that I2C is initialized to check
* the board revision
@@ -274,28 +270,7 @@ int checkboard(void)
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
/* Print board revision */
- printf("Board: MX35 PDK %d.0 ", ((get_board_rev() >> 8) + 1) & 0x0F);
-
- /* Print CPU revision */
- printf("i.MX35 %d.%d [", (cpu_rev & 0xF0) >> 4, cpu_rev & 0x0F);
-
- switch (readl(&ccm->rcsr) & 0x0F) {
- case 0x0000:
- puts("POR");
- break;
- case 0x0002:
- puts("JTAG");
- break;
- case 0x0004:
- puts("RST");
- break;
- case 0x0008:
- puts("WDT");
- break;
- default:
- puts("unknown");
- }
- puts("]\n");
+ printf("Board: MX35 PDK %d.0\n", ((get_board_rev() >> 8) + 1) & 0x0F);
return 0;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/2] mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected
2012-02-10 15:34 ` [U-Boot] [PATCH 2/2] mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected Fabio Estevam
@ 2012-02-10 16:49 ` Stefano Babic
0 siblings, 0 replies; 7+ messages in thread
From: Stefano Babic @ 2012-02-10 16:49 UTC (permalink / raw)
To: u-boot
On 10/02/2012 16:34, Fabio Estevam wrote:
> get_reset_cause() function is only used inside print_cpuinfo(), so let it be
> defined only when CONFIG_DISPLAY_CPUINFO is selected.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Acked-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH v2 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information
2012-02-10 16:29 ` [U-Boot] [PATCH v2 " Fabio Estevam
@ 2012-02-10 16:49 ` Stefano Babic
0 siblings, 0 replies; 7+ messages in thread
From: Stefano Babic @ 2012-02-10 16:49 UTC (permalink / raw)
To: u-boot
On 10/02/2012 17:29, Fabio Estevam wrote:
> MX35PDK board does not need to print CPU revision and reset cause in board file
> because this is printed by common code when CONFIG_DISPLAY_CPUINFO is selected
>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
Acked-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-02-10 16:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-10 15:34 [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Fabio Estevam
2012-02-10 15:34 ` [U-Boot] [PATCH 2/2] mx35: generic: Let get_reset_cause be defined only when CONFIG_DISPLAY_CPUINFO is selected Fabio Estevam
2012-02-10 16:49 ` Stefano Babic
2012-02-10 15:57 ` [U-Boot] [PATCH 1/2] mx35pdk: Remove duplicate CPU revision and reset cause information Stefano Babic
2012-02-10 16:18 ` Stefano Babic
2012-02-10 16:29 ` [U-Boot] [PATCH v2 " Fabio Estevam
2012-02-10 16:49 ` Stefano Babic
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.