* [U-Boot] [PATCH] MX35: mx35pdk: wrong board revision
@ 2012-04-09 11:42 Stefano Babic
2012-04-09 11:51 ` [U-Boot] [PATCH V2] " Stefano Babic
0 siblings, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2012-04-09 11:42 UTC (permalink / raw)
To: u-boot
The board revision is detected accessing to the pmic,
that is not available before relocation (I2C).
This generates the following error:
CPU: Freescale i.MX35 rev 2.0 at 532 MHz.
Reset cause: WDOG
<reg num> = 7 is invalid. Should be less than 0
Board: MX35 PDK 1.0
The revision number is wrong, as a default value is printed
(tested on a mx35pdk Rev. 2.0).
Move the output in the board_late_init(), when
pmic can be accessed.
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
board/freescale/mx35pdk/mx35pdk.c | 8 +++++---
include/configs/mx35pdk.h | 1 -
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index cce7123..d5b592b 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -258,9 +258,13 @@ int board_late_init(void)
val |= 0x80;
mc9sdz60_reg_write(MC9SDZ60_REG_RESET_1, val);
+ /* Print board revision */
+ printf("Board: MX35 PDK %d.0\n", ((get_board_rev() >> 8) + 1) & 0x0F);
+
return 0;
}
+#if 0
int checkboard(void)
{
/*
@@ -269,11 +273,9 @@ int checkboard(void)
*/
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
- /* Print board revision */
- printf("Board: MX35 PDK %d.0\n", ((get_board_rev() >> 8) + 1) & 0x0F);
-
return 0;
}
+#endif
int board_eth_init(bd_t *bis)
{
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index 1e03639..de4b954 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -34,7 +34,6 @@
#define CONFIG_MX35_HCLK_FREQ 24000000
#define CONFIG_DISPLAY_CPUINFO
-#define CONFIG_DISPLAY_BOARDINFO
/* Set TEXT at the beginning of the NOR flash */
#define CONFIG_SYS_TEXT_BASE 0xA0000000
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2] MX35: mx35pdk: wrong board revision
2012-04-09 11:42 [U-Boot] [PATCH] MX35: mx35pdk: wrong board revision Stefano Babic
@ 2012-04-09 11:51 ` Stefano Babic
2012-04-09 12:56 ` Fabio Estevam
0 siblings, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2012-04-09 11:51 UTC (permalink / raw)
To: u-boot
The board revision is detected accessing to the pmic,
that is not available before relocation (I2C).
This generates the following error:
CPU: Freescale i.MX35 rev 2.0 at 532 MHz.
Reset cause: WDOG
<reg num> = 7 is invalid. Should be less than 0
Board: MX35 PDK 1.0
The revision number is wrong, as a default value is printed
(tested on a mx35pdk Rev. 2.0).
Move the output in the board_late_init(), when
pmic can be accessed.
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
V2: drop dead code
board/freescale/mx35pdk/mx35pdk.c | 11 -----------
include/configs/mx35pdk.h | 1 -
2 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/board/freescale/mx35pdk/mx35pdk.c b/board/freescale/mx35pdk/mx35pdk.c
index cce7123..bc415b8 100644
--- a/board/freescale/mx35pdk/mx35pdk.c
+++ b/board/freescale/mx35pdk/mx35pdk.c
@@ -258,17 +258,6 @@ int board_late_init(void)
val |= 0x80;
mc9sdz60_reg_write(MC9SDZ60_REG_RESET_1, val);
- return 0;
-}
-
-int checkboard(void)
-{
- /*
- * Be sure that I2C is initialized to check
- * the board revision
- */
- i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
-
/* Print board revision */
printf("Board: MX35 PDK %d.0\n", ((get_board_rev() >> 8) + 1) & 0x0F);
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index 1e03639..de4b954 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -34,7 +34,6 @@
#define CONFIG_MX35_HCLK_FREQ 24000000
#define CONFIG_DISPLAY_CPUINFO
-#define CONFIG_DISPLAY_BOARDINFO
/* Set TEXT at the beginning of the NOR flash */
#define CONFIG_SYS_TEXT_BASE 0xA0000000
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2] MX35: mx35pdk: wrong board revision
2012-04-09 11:51 ` [U-Boot] [PATCH V2] " Stefano Babic
@ 2012-04-09 12:56 ` Fabio Estevam
2012-04-10 6:52 ` Stefano Babic
0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2012-04-09 12:56 UTC (permalink / raw)
To: u-boot
On 4/9/12, Stefano Babic <sbabic@denx.de> wrote:
> The board revision is detected accessing to the pmic,
> that is not available before relocation (I2C).
> This generates the following error:
>
> CPU: Freescale i.MX35 rev 2.0 at 532 MHz.
> Reset cause: WDOG
> <reg num> = 7 is invalid. Should be less than 0
> Board: MX35 PDK 1.0
>
> The revision number is wrong, as a default value is printed
> (tested on a mx35pdk Rev. 2.0).
>
> Move the output in the board_late_init(), when
> pmic can be accessed.
>
> Signed-off-by: Stefano Babic <sbabic@denx.de>
> ---
>
> V2: drop dead code
>
> board/freescale/mx35pdk/mx35pdk.c | 11 -----------
> include/configs/mx35pdk.h | 1 -
> 2 files changed, 0 insertions(+), 12 deletions(-)
Looks like there is something wrong with this patch: 12 deletions and
no insertions.
Comparing it with v1 I would expect that only the "#if 0 and #endif"
were removed.
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH V2] MX35: mx35pdk: wrong board revision
2012-04-09 12:56 ` Fabio Estevam
@ 2012-04-10 6:52 ` Stefano Babic
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2012-04-10 6:52 UTC (permalink / raw)
To: u-boot
On 09/04/2012 14:56, Fabio Estevam wrote:
> On 4/9/12, Stefano Babic <sbabic@denx.de> wrote:
>> The board revision is detected accessing to the pmic,
>> that is not available before relocation (I2C).
>> This generates the following error:
>>
>> CPU: Freescale i.MX35 rev 2.0 at 532 MHz.
>> Reset cause: WDOG
>> <reg num> = 7 is invalid. Should be less than 0
>> Board: MX35 PDK 1.0
>>
>> The revision number is wrong, as a default value is printed
>> (tested on a mx35pdk Rev. 2.0).
>>
>> Move the output in the board_late_init(), when
>> pmic can be accessed.
>>
>> Signed-off-by: Stefano Babic <sbabic@denx.de>
>> ---
>>
>> V2: drop dead code
>>
>> board/freescale/mx35pdk/mx35pdk.c | 11 -----------
>> include/configs/mx35pdk.h | 1 -
>> 2 files changed, 0 insertions(+), 12 deletions(-)
>
Hi Fabio,
> Looks like there is something wrong with this patch: 12 deletions and
> no insertions.
>
> Comparing it with v1 I would expect that only the "#if 0 and #endif"
> were removed.
At first glance, yes. However, the patch produces the correct code. The
checkboard function is removed, but not completely, and its last two
statements (printf and return) slip into the board_late_init() function,
where the i2c is already initialized and pmic already used.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
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
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-10 6:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-09 11:42 [U-Boot] [PATCH] MX35: mx35pdk: wrong board revision Stefano Babic
2012-04-09 11:51 ` [U-Boot] [PATCH V2] " Stefano Babic
2012-04-09 12:56 ` Fabio Estevam
2012-04-10 6:52 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox