aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-08-25 05:56:26 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-10-01 03:33:04 -0400
commit8f6e900a661881f9585d9b3a7173a44020c3c0b2 (patch)
tree756de76aa2be39577ec895e1569748bf6d2eb254 /arch/arm/mach-mx5
parent63a7c6d7507ed6f4ea24a8ed008efa1bb22a2a97 (diff)
ARM: mx5: clock-imx51: make *ipg clocks secondary clocks of their corresponding peripheral clocks
Currently the uarts and timer only work because they are turned on by reset default. Make them secondary clocks of their corresponding peripheral clocks to make sure they are turned on when necessary. Also, register some clocks to get rid of compiler warnings Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5')
-rw-r--r--arch/arm/mach-mx5/clock-mx51.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c
index 5c7901180c8e..e6c17d78189c 100644
--- a/arch/arm/mach-mx5/clock-mx51.c
+++ b/arch/arm/mach-mx5/clock-mx51.c
@@ -914,24 +914,24 @@ DEFINE_CLOCK(spba_clk, 0, MXC_CCM_CCGR5, MXC_CCM_CCGRx_CG0_OFFSET,
914 NULL, NULL, &ipg_clk, NULL); 914 NULL, NULL, &ipg_clk, NULL);
915 915
916/* UART */ 916/* UART */
917DEFINE_CLOCK(uart1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG4_OFFSET,
918 NULL, NULL, &uart_root_clk, NULL);
919DEFINE_CLOCK(uart2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG6_OFFSET,
920 NULL, NULL, &uart_root_clk, NULL);
921DEFINE_CLOCK(uart3_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG8_OFFSET,
922 NULL, NULL, &uart_root_clk, NULL);
923DEFINE_CLOCK(uart1_ipg_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG3_OFFSET, 917DEFINE_CLOCK(uart1_ipg_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG3_OFFSET,
924 NULL, NULL, &ipg_clk, &aips_tz1_clk); 918 NULL, NULL, &ipg_clk, &aips_tz1_clk);
925DEFINE_CLOCK(uart2_ipg_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG5_OFFSET, 919DEFINE_CLOCK(uart2_ipg_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG5_OFFSET,
926 NULL, NULL, &ipg_clk, &aips_tz1_clk); 920 NULL, NULL, &ipg_clk, &aips_tz1_clk);
927DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET, 921DEFINE_CLOCK(uart3_ipg_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG7_OFFSET,
928 NULL, NULL, &ipg_clk, &spba_clk); 922 NULL, NULL, &ipg_clk, &spba_clk);
923DEFINE_CLOCK(uart1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG4_OFFSET,
924 NULL, NULL, &uart_root_clk, &uart1_ipg_clk);
925DEFINE_CLOCK(uart2_clk, 1, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG6_OFFSET,
926 NULL, NULL, &uart_root_clk, &uart2_ipg_clk);
927DEFINE_CLOCK(uart3_clk, 2, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG8_OFFSET,
928 NULL, NULL, &uart_root_clk, &uart3_ipg_clk);
929 929
930/* GPT */ 930/* GPT */
931DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET,
932 NULL, NULL, &ipg_clk, NULL);
933DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET, 931DEFINE_CLOCK(gpt_ipg_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG10_OFFSET,
934 NULL, NULL, &ipg_clk, NULL); 932 NULL, NULL, &ipg_clk, NULL);
933DEFINE_CLOCK(gpt_clk, 0, MXC_CCM_CCGR2, MXC_CCM_CCGRx_CG9_OFFSET,
934 NULL, NULL, &ipg_clk, &gpt_ipg_clk);
935 935
936/* I2C */ 936/* I2C */
937DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET, 937DEFINE_CLOCK(i2c1_clk, 0, MXC_CCM_CCGR1, MXC_CCM_CCGRx_CG9_OFFSET,
@@ -1003,6 +1003,9 @@ static struct clk_lookup lookups[] = {
1003 _REGISTER_CLOCK("mxc_nand", NULL, nfc_clk) 1003 _REGISTER_CLOCK("mxc_nand", NULL, nfc_clk)
1004 _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) 1004 _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
1005 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) 1005 _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
1006 _REGISTER_CLOCK(NULL, "ckih", ckih_clk)
1007 _REGISTER_CLOCK(NULL, "ckih2", ckih2_clk)
1008 _REGISTER_CLOCK(NULL, "gpt_32k", gpt_32k_clk)
1006 _REGISTER_CLOCK("imx51-ecspi.0", NULL, ecspi1_clk) 1009 _REGISTER_CLOCK("imx51-ecspi.0", NULL, ecspi1_clk)
1007 _REGISTER_CLOCK("imx51-ecspi.1", NULL, ecspi2_clk) 1010 _REGISTER_CLOCK("imx51-ecspi.1", NULL, ecspi2_clk)
1008 _REGISTER_CLOCK("imx51-cspi.0", NULL, cspi_clk) 1011 _REGISTER_CLOCK("imx51-cspi.0", NULL, cspi_clk)