aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clk-imx51-imx53.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-07-17 10:42:49 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2012-08-13 14:54:54 -0400
commita745f039b901b43937f61f149ad9cee2796ed299 (patch)
tree27701a75ef12400dc4f659619097c6f9954d06c8 /arch/arm/mach-imx/clk-imx51-imx53.c
parent4283dbb3e3b9b42c6f52f33d0de985e4f8ce928f (diff)
ARM i.MX53: register CAN clocks
From: Sascha Hauer <s.hauer@pengutronix.de> This adds the clocks for the flexcans on the imx53. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx/clk-imx51-imx53.c')
-rw-r--r--arch/arm/mach-imx/clk-imx51-imx53.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/clk-imx51-imx53.c b/arch/arm/mach-imx/clk-imx51-imx53.c
index f6086693ebd2..da7be21be7a4 100644
--- a/arch/arm/mach-imx/clk-imx51-imx53.c
+++ b/arch/arm/mach-imx/clk-imx51-imx53.c
@@ -49,6 +49,7 @@ static const char *mx53_tve_ext_sel[] = { "pll4_sw", "ckih1", };
49static const char *tve_sel[] = { "tve_pred", "tve_ext_sel", }; 49static const char *tve_sel[] = { "tve_pred", "tve_ext_sel", };
50static const char *ipu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", }; 50static const char *ipu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", };
51static const char *vpu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", }; 51static const char *vpu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", };
52static const char *mx53_can_sel[] = { "ipg", "ckih1", "ckih2", "lp_apm", };
52 53
53enum imx5_clks { 54enum imx5_clks {
54 dummy, ckil, osc, ckih1, ckih2, ahb, ipg, axi_a, axi_b, uart_pred, 55 dummy, ckil, osc, ckih1, ckih2, ahb, ipg, axi_a, axi_b, uart_pred,
@@ -82,6 +83,7 @@ enum imx5_clks {
82 ssi_ext1_podf, ssi_ext2_pred, ssi_ext2_podf, ssi1_root_gate, 83 ssi_ext1_podf, ssi_ext2_pred, ssi_ext2_podf, ssi1_root_gate,
83 ssi2_root_gate, ssi3_root_gate, ssi_ext1_gate, ssi_ext2_gate, 84 ssi2_root_gate, ssi3_root_gate, ssi_ext1_gate, ssi_ext2_gate,
84 epit1_ipg_gate, epit1_hf_gate, epit2_ipg_gate, epit2_hf_gate, 85 epit1_ipg_gate, epit1_hf_gate, epit2_ipg_gate, epit2_hf_gate,
86 can_sel, can1_serial_gate, can1_ipg_gate,
85 clk_max 87 clk_max
86}; 88};
87 89
@@ -420,8 +422,12 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
420 clk[esdhc4_per_gate] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14); 422 clk[esdhc4_per_gate] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14);
421 clk[usb_phy1_gate] = imx_clk_gate2("usb_phy1_gate", "usb_phy_sel", MXC_CCM_CCGR4, 10); 423 clk[usb_phy1_gate] = imx_clk_gate2("usb_phy1_gate", "usb_phy_sel", MXC_CCM_CCGR4, 10);
422 clk[usb_phy2_gate] = imx_clk_gate2("usb_phy2_gate", "usb_phy_sel", MXC_CCM_CCGR4, 12); 424 clk[usb_phy2_gate] = imx_clk_gate2("usb_phy2_gate", "usb_phy_sel", MXC_CCM_CCGR4, 12);
423 clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "ipg", MXC_CCM_CCGR4, 6); 425 clk[can_sel] = imx_clk_mux("can_sel", MXC_CCM_CSCMR2, 6, 2,
424 clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 8); 426 mx53_can_sel, ARRAY_SIZE(mx53_can_sel));
427 clk[can1_serial_gate] = imx_clk_gate2("can1_serial_gate", "can_sel", MXC_CCM_CCGR6, 22);
428 clk[can1_ipg_gate] = imx_clk_gate2("can1_ipg_gate", "ipg", MXC_CCM_CCGR6, 20);
429 clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "can_sel", MXC_CCM_CCGR4, 8);
430 clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 6);
425 clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22); 431 clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22);
426 432
427 for (i = 0; i < ARRAY_SIZE(clk); i++) 433 for (i = 0; i < ARRAY_SIZE(clk); i++)
@@ -454,6 +460,10 @@ int __init mx53_clocks_init(unsigned long rate_ckil, unsigned long rate_osc,
454 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "63fcc000.ssi"); 460 clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "63fcc000.ssi");
455 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "50014000.ssi"); 461 clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "50014000.ssi");
456 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "63fd0000.ssi"); 462 clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "63fd0000.ssi");
463 clk_register_clkdev(clk[can1_ipg_gate], "ipg", "53fc8000.can");
464 clk_register_clkdev(clk[can1_serial_gate], "per", "53fc8000.can");
465 clk_register_clkdev(clk[can2_ipg_gate], "ipg", "53fcc000.can");
466 clk_register_clkdev(clk[can2_serial_gate], "per", "53fcc000.can");
457 467
458 /* set SDHC root clock to 200MHZ*/ 468 /* set SDHC root clock to 200MHZ*/
459 clk_set_rate(clk[esdhc_a_podf], 200000000); 469 clk_set_rate(clk[esdhc_a_podf], 200000000);