at91: Fixes the crippled console output on PortuxG20.
cover at91: Fixes the crippled console output on PortuxG20.
In order to use the serial interface on the PortuxG20 we need to enable the level converter first by setting the PC9 pin to high. The level converter needs some time to settle so we have to use the mdelay() function to wait for some time. Unfortunately we have no timers available at board_early_init_f() so we enable the serial output early within board_postclk_init().
Unfortunately the board_postclk_init() function was not called in the init_sequence of arch/arm/lib/board.c so the first patch will added it there.
---
Markus Hubig (2):
arm: Adds board_postclk_init to the init_sequence. Fixes the crippled console output on PortuxG20.
arch/arm/lib/board.c | 3 +++ board/taskit/stamp9g20/stamp9g20.c | 21 +++++++++++++++++---- include/configs/stamp9g20.h | 1 + 3 files changed, 21 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.7
PATCH 1/2 arm: Adds board_postclk_init to the init_sequence.
The board_postclk_init() function can be used to perform operations that requires a working timer early within the U-Boot init_sequence.
--- arch/arm/lib/board.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/arm/lib/board.c +3 -0
@@ -241,6 +241,9 @@ init_fnc_t *init_sequence[] = { fdtdec_check_fdt, #endif timer_init, /* initialize timer */ +#ifdef CONFIG_BOARD_POSTCLK_INIT + board_postclk_init, +#endif #ifdef CONFIG_FSL_ESDHC get_clocks,#endif
Signature · 1 line
1.7.7
PATCH 1/2 arm: Adds board_postclk_init to the init_sequence.
Dear Albert Aribaud,
Quoted 15 lines · Markus Hubig
The
board_postclk_init()function can be used to perform operations that requires a working timer early within the U-Bootinit_sequence.Signed-off-by Markus Hubig <[email protected]>Cc Albert ARIBAUD <[email protected]>--- arch/arm/lib/board.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/lib/board.c +0
-0
arch/arm/lib/board.c init_fnc_t *init_sequence[] = { · line 249
Quoted 9 lines
arch/arm/lib/board.c +3
-0@@ -241,6 +241,9 @@ init_fnc_t *init_sequence[] = { fdtdec_check_fdt, #endif timer_init, /* initialize timer */ +#ifdef CONFIG_BOARD_POSTCLK_INIT + board_postclk_init, +#endif #ifdef CONFIG_FSL_ESDHC get_clocks,#endif
how do you think about this suggestion? Will you accept it? Should I apply both patches to u-boot-atmel?
Best regards
Andreas Bie?mann
PATCH 1/2 arm: Adds board_postclk_init to the init_sequence.
Hi Andreas,
Quoted 22 lines · Andreas Bie?mann
Dear Albert Aribaud,
Quoted 19 lines · Markus Hubig
The
board_postclk_init()function can be used to perform operations that requires a working timer early within the U-Bootinit_sequence.Signed-off-by Markus Hubig <[email protected]>Cc Albert ARIBAUD <[email protected]>--- arch/arm/lib/board.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/lib/board.c +2
-0@@ -241,6 +241,9 @@ init_fnc_t *init_sequence[] = { fdtdec_check_fdt, #endif timer_init, /* initialize timer */ +#ifdef CONFIG_BOARD_POSTCLK_INIT + board_postclk_init,
Quoted 8 lines
arch/arm/lib/board.c init_fnc_t *init_sequence[] = { · line 249
Quoted 5 lines
arch/arm/lib/board.c +1
-0+#endif #ifdef CONFIG_FSL_ESDHC get_clocks,#endif how do you think about this suggestion? Will you accept it? Should I apply both patches to u-boot-atmel?
From what I see, this converges with what's been in PPC for a long time... I'm ok with the series going into atmel.
Quoted 3 lines
Best regards
Andreas Bie?mann
Amicalement,
Signature · 1 line
Albert.
PATCH 1/2 arm: Adds board_postclk_init to the init_sequence.
Hi Albert,
Quoted 36 lines · Albert ARIBAUD
Hi Andreas,
Quoted 22 lines · Andreas Bie?mann
Dear Albert Aribaud,
Quoted 19 lines · Markus Hubig
The
board_postclk_init()function can be used to perform operations that requires a working timer early within the U-Bootinit_sequence.Signed-off-by Markus Hubig <[email protected]>Cc Albert ARIBAUD <[email protected]>--- arch/arm/lib/board.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/lib/board.c +2
-0@@ -241,6 +241,9 @@ init_fnc_t *init_sequence[] = { fdtdec_check_fdt, #endif timer_init, /* initialize timer */ +#ifdef CONFIG_BOARD_POSTCLK_INIT + board_postclk_init,Quoted 8 lines
arch/arm/lib/board.c init_fnc_t *init_sequence[] = { · line 249
Quoted 5 lines
arch/arm/lib/board.c +1
-0+#endif #ifdef CONFIG_FSL_ESDHC get_clocks,#endif how do you think about this suggestion? Will you accept it? Should I apply both patches to u-boot-atmel?
Quoted 2 lines
From what I see, this converges with what's been in PPC for a long time... I'm ok with the series going into atmel.
So I add a formal Acked-by from you?
Best regards
Andreas Bie?mann
PATCH 1/2 arm: Adds board_postclk_init to the init_sequence.
Hi Andreas,
Quoted 40 lines · Andreas Bie?mann
Hi Albert,
Quoted 37 lines · Albert ARIBAUD
Hi Andreas,
Quoted 31 lines · Andreas Bie?mann
Dear Albert Aribaud,
Quoted 16 lines · Markus Hubig
The
board_postclk_init()function can be used to perform operations that requires a working timer early within the U-Bootinit_sequence.Signed-off-by Markus Hubig <[email protected]>Cc Albert ARIBAUD <[email protected]>--- arch/arm/lib/board.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/arm/lib/board.c +0
-0arch/arm/lib/board.c init_fnc_t *init_sequence[] = { · line 249
Quoted 9 lines
arch/arm/lib/board.c +3
-0@@ -241,6 +241,9 @@ init_fnc_t *init_sequence[] = { fdtdec_check_fdt, #endif timer_init, /* initialize timer */ +#ifdef CONFIG_BOARD_POSTCLK_INIT + board_postclk_init, +#endif #ifdef CONFIG_FSL_ESDHC get_clocks,#endif how do you think about this suggestion? Will you accept it? Should I apply both patches to u-boot-atmel?
Quoted 4 lines
Quoted 2 lines
From what I see, this converges with what's been in PPC for a long time... I'm ok with the series going into atmel.
So I add a formal Acked-by from you?
That or just go ahead and apply them to atmel; as the custodian, you don't need my Acked-By.
Quoted 3 lines
Best regards
Andreas Bie?mann
Amicalement,
Signature · 1 line
Albert.
PATCH 1/2 arm: Adds board_postclk_init to the init_sequence.
In reply to Markus HubigDear Markus Hubig,
Quoted 6 lines · Markus Hubig
The
board_postclk_init()function can be used to perform operations that requires a working timer early within the U-Bootinit_sequence.Signed-off-by Markus Hubig <[email protected]>Cc Albert ARIBAUD <[email protected]>---
applied to u-boot-atmel/master, thanks!
Best regards
Andreas Bie?mann
PATCH 2/2 Fixes the crippled console output on PortuxG20.
In reply to Markus HubigIn order to use the serial interface on the PortuxG20 we need to enable the level converter first by setting the PC9 pin to high. The level converter needs some time to settle so we have to use the mdelay() function to wait for some time. Unfortunately we have no timers available at board_early_init_f() so we enable the serial output early within board_postclk_init().
Now the U-Boot output looks fine:
| U-Boot 2012.07-00132-gaf1a3b0-dirty (Aug 16 2012 - 18:21:32) | | CPU: AT91SAM9G20 | Crystal frequency: 18.432 MHz | CPU clock : 396.288 MHz | Master clock : 132.096 MHz | DRAM: 64 MiB | WARNING: Caches not enabled | NAND: 128 MiB | In: serial | Out: serial | Err: serial | Net: macb0 | Hit any key to stop autoboot: 0
--- board/taskit/stamp9g20/stamp9g20.c | 21 +++++++++++++++++---- include/configs/stamp9g20.h | 1 + 2 files changed, 18 insertions(+), 4 deletions(-)
board/taskit/stamp9g20/stamp9g20.c +17 -4
@@ -159,15 +159,28 @@ int board_early_init_f(void)return 0 ; } -int board_init (void ) +int board_postclk_init (void ) { -/* Adress of boot parameters */ - gd->bd->bi_boot_params =CONFIG_SYS_SDRAM_BASE +0x100 ; +/* +* Initialize the serial interface here, because be need a running +* timer to set PC9 to high and wait for some time to enable the +* level converter of the RS232 interface on the PortuxG20 board. +*/ -/* Enable the serial interface */ +#ifdef CONFIG_PORTUXG20 at91_set_gpio_output (AT91_PIN_PC9 ,1 ); +mdelay (1 ); +#endif at91_seriald_hw_init (); +return 0 ; +} + +int board_init (void ) +{ +/* Adress of boot parameters */ + gd->bd->bi_boot_params =CONFIG_SYS_SDRAM_BASE +0x100 ; +stamp9G20_nand_hw_init ();#ifdef CONFIG_MACB stamp9G20_macb_hw_init ();
include/configs/stamp9g20.h +1 -0
@@ -59,6 +59,7 @@#define CONFIG_INITRD_TAG /* pass initrd param to kernel */ #define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a bootloader */ #define CONFIG_BOARD_EARLY_INIT_f/* call board_early_init_f() */ +#define CONFIG_BOARD_POSTCLK_INIT /* call board_postclk_init() */ #define CONFIG_DISPLAY_CPUINFO /* display CPU Info at startup */ /* setting board specific options */
Signature · 1 line
1.7.7
PATCH 2/2 Fixes the crippled console output on PortuxG20.
Dear Markus Hubig,
Quoted 23 lines · Markus Hubig
In order to use the serial interface on the PortuxG20 we need to enable the level converter first by setting the PC9 pin to high. The level converter needs some time to settle so we have to use the
mdelay()function to wait for some time. Unfortunately we have no timers available atboard_early_init_f()so we enable the serial output early withinboard_postclk_init().Now the U-Boot output looks fine:
| U-Boot 2012.07-00132-gaf1a3b0-dirty (Aug 16 2012 - 18:21:32) | | CPU: AT91SAM9G20 | Crystal frequency: 18.432 MHz | CPU clock : 396.288 MHz | Master clock : 132.096 MHz | DRAM: 64 MiB | WARNING: Caches not enabled | NAND: 128 MiB | In: serial | Out: serial | Err: serial | Net: macb0 | Hit any key to stop autoboot: 0
Quoted 3 lines
Signed-off-by Markus Hubig <[email protected]>Cc Andreas Bie?mann <[email protected]>---
applied to u-boot-atmel/master, thanks!
Best regards
Andreas Bie?mann
cover at91: Fixes the crippled console output on PortuxG20.
In reply to Markus HubigHello Albert, hello Andreas,
any news if this two patches can get accepted?
Cheers, Markus
Quoted 21 lines · Markus Hubig
In order to use the serial interface on the PortuxG20 we need to enable the level converter first by setting the PC9 pin to high. The level converter needs some time to settle so we have to use the
mdelay()function to wait for some time. Unfortunately we have no timers available atboard_early_init_f()so we enable the serial output early withinboard_postclk_init().Unfortunately the
board_postclk_init()function was not called in theinit_sequenceofarch/arm/lib/board.cso the first patch will added it there.---
Markus Hubig (2):
arm: Addsboard_postclk_initto theinit_sequence. Fixes the crippled console output on PortuxG20.arch/arm/lib/board.c | 3 +++ board/taskit/stamp9g20/stamp9g20.c | 21 +++++++++++++++++---- include/configs/stamp9g20.h | 1 + 3 files changed, 21 insertions(+), 4 deletions(-)--
1.7.7
cover at91: Fixes the crippled console output on PortuxG20.
Dear Markus Hubig,
Quoted 3 lines · Markus Hubig
Hello Albert, hello Andreas,
any news if this two patches can get accepted?
I'm waiting for Albert's comment. I did force Albert to accept a change albeit he had objections by sending some Ack-by before. I promised to never do this again ;)
@Albert: ping?
Best regards
Andreas Bie?mann