arm: mach-imx: enable all uart clocks for DEBUG_LL
Subsystems (3)
PATCH 1/1 arm: mach-imx: enable all uart clocks for DEBUG_LL
If you want to move the DEBUG_LL uart, simply changing the base address in debug-macro.S will not be enough. One needs to enable the correct clock during clock init, too, otherwise the kernel remains silent. This is too easy to forget, so enable all uart clocks for DEBUG_LL to save precious developer time.
--- arch/arm/mach-imx/clock-imx21.c | 3 +++ arch/arm/mach-imx/clock-imx25.c | 4 ++++ arch/arm/mach-imx/clock-imx27.c | 5 +++++ arch/arm/mach-imx/clock-imx35.c | 2 +- 4 files changed, 13 insertions(+), 1 deletions(-)
arch/arm/mach-imx/clock-imx21.c +3 -0
@@ -1231,6 +1231,9 @@ int __init mx21_clocks_init(unsigned long lref, unsigned long href)#if defined(CONFIG_DEBUG_LL ) && !defined(CONFIG_DEBUG_ICEDCC )clk_enable (&uart_clk[0 ]); +clk_enable (&uart_clk[1 ]); +clk_enable (&uart_clk[2 ]); +clk_enable (&uart_clk[3 ]);#endif mxc_timer_init(&gpt_clk[0], MX21_IO_ADDRESS(MX21_GPT1_BASE_ADDR),
arch/arm/mach-imx/clock-imx25.c +4 -0
@@ -325,6 +325,10 @@ int __init mx25_clocks_init(void)__raw_writel ((1 <<5 ),CRM_BASE +CCM_CGCR2 );#if defined(CONFIG_DEBUG_LL ) && !defined(CONFIG_DEBUG_ICEDCC )clk_enable (&uart1_clk); +clk_enable (&uart2_clk); +clk_enable (&uart3_clk); +clk_enable (&uart4_clk); +clk_enable (&uart5_clk);#endif /* Clock source for lcdc and csi is upll */
arch/arm/mach-imx/clock-imx27.c +5 -0
@@ -754,6 +754,11 @@ int __init mx27_clocks_init(unsigned long fref)#if defined(CONFIG_DEBUG_LL ) && !defined(CONFIG_DEBUG_ICEDCC )clk_enable (&uart1_clk); +clk_enable (&uart2_clk); +clk_enable (&uart3_clk); +clk_enable (&uart4_clk); +clk_enable (&uart5_clk); +clk_enable (&uart6_clk);#endif mxc_timer_init(&gpt1_clk, MX27_IO_ADDRESS(MX27_GPT1_BASE_ADDR),
arch/arm/mach-imx/clock-imx35.c +1 -1
@@ -510,7 +510,7 @@ int __init mx35_clocks_init()unsigned int cgr2 =3 <<26 , cgr3 =0 ;#if defined(CONFIG_DEBUG_LL ) && !defined(CONFIG_DEBUG_ICEDCC ) - cgr2 |=3 <<16 ; + cgr2 |=3 <<16 |3 <<18 |3 <<20 ;#endif clkdev_add_table (lookups,ARRAY_SIZE (lookups));
Signature · 1 line
1.7.5.4
PATCH 1/1 arm: mach-imx: enable all uart clocks for DEBUG_LL
Quoted 6 lines · Wolfram Sang
If you want to move the
DEBUG_LLuart, simply changing the base address indebug-macro.Swill not be enough. One needs to enable the correct clock during clock init, too, otherwise the kernel remains silent. This is too easy to forget, so enable all uart clocks forDEBUG_LLto save precious developer time.
I guess the patch is not welcomed from the power management POV. Shouldn't bootloader have enabled the clock for debug uart anyway?
Signature · 2 lines
Regards, Shawn
PATCH 1/1 arm: mach-imx: enable all uart clocks for DEBUG_LL
Quoted 10 lines · Shawn Guo
Quoted 6 lines · Wolfram Sang
If you want to move the
DEBUG_LLuart, simply changing the base address indebug-macro.Swill not be enough. One needs to enable the correct clock during clock init, too, otherwise the kernel remains silent. This is too easy to forget, so enable all uart clocks forDEBUG_LLto save precious developer time.I guess the patch is not welcomed from the power management POV. Shouldn't bootloader have enabled the clock for debug uart anyway?
Hmm, bootloader should be the only one who can enable the clock for DEBUG_LL uart, as DEBUG_LL could be used at the very early point of kernel booting.
Signature · 2 lines
Regards, Shawn
PATCH 1/1 arm: mach-imx: enable all uart clocks for DEBUG_LL
Quoted 9 lines · Shawn Guo
Quoted 8 lines · Shawn Guo
Quoted 6 lines · Wolfram Sang
If you want to move the
DEBUG_LLuart, simply changing the base address indebug-macro.Swill not be enough. One needs to enable the correct clock during clock init, too, otherwise the kernel remains silent. This is too easy to forget, so enable all uart clocks forDEBUG_LLto save precious developer time.I guess the patch is not welcomed from the power management POV.
Anything prefixed with DEBUG_* should be kinda safe from that POV :)
Quoted 5 lines
Quoted 2 lines
Shouldn't bootloader have enabled the clock for debug uart anyway?
Hmm, bootloader should be the only one who can enable the clock for
DEBUG_LLuart, asDEBUG_LLcould be used at the very early point of kernel booting.
That would mean: remove all #ifdef CONFIG_DEBUG_LL and make sure the clock won't get turned off during init. Sounds better to me, yet have to have another look...
Thanks!
Signature · 9 lines
Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110830/c8df64e6/attachment.sig>