diff options
author | Benoit Cousson <b-cousson@ti.com> | 2010-09-27 16:02:56 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-09-27 16:02:56 -0400 |
commit | 0edc9e858222ca8fd685756f0d7e546633c39ff0 (patch) | |
tree | 50cd199f4b8eb5c7e282dc2bb646a920cf534aa9 /arch/arm/mach-omap2/clock44xx_data.c | |
parent | bb722f33e233c980159f0ac5560d530eb5dfdd0f (diff) |
OMAP4: clocks: Fix ES2 clock issues
Fix a few OMAP4430 clock tree problems after the recent manual merge of the
various ES2 clock patches:
- usim optional clock and its parent had the same name, rename the parent
usim_fclk -> usim_ck
- OPTFCLKEN_CLK32K is not handled anymore by the USBPHYOCP2SCP module in ES2
Create a new clock that belongs to CM_ALWON_USBPHY_CLKCTRL register
This patch depends on some of the PRCM macro updates from Rajendra.
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
[paul@pwsan.com: tweaked patch description]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock44xx_data.c')
-rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 88 |
1 files changed, 55 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index b94f21aa2581..67fac44cb6e6 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -2037,23 +2037,23 @@ static struct clk mmc5_fck = { | |||
2037 | .recalc = &followparent_recalc, | 2037 | .recalc = &followparent_recalc, |
2038 | }; | 2038 | }; |
2039 | 2039 | ||
2040 | static struct clk ocp2scp_usb_phy_clk32k = { | 2040 | static struct clk ocp2scp_usb_phy_phy_48m = { |
2041 | .name = "ocp2scp_usb_phy_clk32k", | 2041 | .name = "ocp2scp_usb_phy_phy_48m", |
2042 | .ops = &clkops_omap2_dflt, | 2042 | .ops = &clkops_omap2_dflt, |
2043 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, | 2043 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
2044 | .enable_bit = OMAP4430_OPTFCLKEN_CLK32K_SHIFT, | 2044 | .enable_bit = OMAP4430_OPTFCLKEN_PHY_48M_SHIFT, |
2045 | .clkdm_name = "l3_init_clkdm", | 2045 | .clkdm_name = "l3_init_clkdm", |
2046 | .parent = &sys_32k_ck, | 2046 | .parent = &func_48m_fclk, |
2047 | .recalc = &followparent_recalc, | 2047 | .recalc = &followparent_recalc, |
2048 | }; | 2048 | }; |
2049 | 2049 | ||
2050 | static struct clk ocp2scp_usb_phy_phy_48m = { | 2050 | static struct clk ocp2scp_usb_phy_ick = { |
2051 | .name = "ocp2scp_usb_phy_phy_48m", | 2051 | .name = "ocp2scp_usb_phy_ick", |
2052 | .ops = &clkops_omap2_dflt, | 2052 | .ops = &clkops_omap2_dflt, |
2053 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, | 2053 | .enable_reg = OMAP4430_CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, |
2054 | .enable_bit = OMAP4430_OPTFCLKEN_PHY_48M_SHIFT, | 2054 | .enable_bit = OMAP4430_MODULEMODE_HWCTRL, |
2055 | .clkdm_name = "l3_init_clkdm", | 2055 | .clkdm_name = "l3_init_clkdm", |
2056 | .parent = &func_48m_fclk, | 2056 | .parent = &l4_div_ck, |
2057 | .recalc = &followparent_recalc, | 2057 | .recalc = &followparent_recalc, |
2058 | }; | 2058 | }; |
2059 | 2059 | ||
@@ -2599,6 +2599,16 @@ static struct clk usb_otg_hs_ick = { | |||
2599 | .recalc = &followparent_recalc, | 2599 | .recalc = &followparent_recalc, |
2600 | }; | 2600 | }; |
2601 | 2601 | ||
2602 | static struct clk usb_phy_cm_clk32k = { | ||
2603 | .name = "usb_phy_cm_clk32k", | ||
2604 | .ops = &clkops_omap2_dflt, | ||
2605 | .enable_reg = OMAP4430_CM_ALWON_USBPHY_CLKCTRL, | ||
2606 | .enable_bit = OMAP4430_OPTFCLKEN_CLK32K_SHIFT, | ||
2607 | .clkdm_name = "l4_ao_clkdm", | ||
2608 | .parent = &sys_32k_ck, | ||
2609 | .recalc = &followparent_recalc, | ||
2610 | }; | ||
2611 | |||
2602 | static struct clk usb_tll_hs_usb_ch2_clk = { | 2612 | static struct clk usb_tll_hs_usb_ch2_clk = { |
2603 | .name = "usb_tll_hs_usb_ch2_clk", | 2613 | .name = "usb_tll_hs_usb_ch2_clk", |
2604 | .ops = &clkops_omap2_dflt, | 2614 | .ops = &clkops_omap2_dflt, |
@@ -2639,6 +2649,39 @@ static struct clk usb_tll_hs_ick = { | |||
2639 | .recalc = &followparent_recalc, | 2649 | .recalc = &followparent_recalc, |
2640 | }; | 2650 | }; |
2641 | 2651 | ||
2652 | static const struct clksel_rate div2_14to18_rates[] = { | ||
2653 | { .div = 14, .val = 0, .flags = RATE_IN_4430 }, | ||
2654 | { .div = 18, .val = 1, .flags = RATE_IN_4430 }, | ||
2655 | { .div = 0 }, | ||
2656 | }; | ||
2657 | |||
2658 | static const struct clksel usim_fclk_div[] = { | ||
2659 | { .parent = &dpll_per_m4_ck, .rates = div2_14to18_rates }, | ||
2660 | { .parent = NULL }, | ||
2661 | }; | ||
2662 | |||
2663 | static struct clk usim_ck = { | ||
2664 | .name = "usim_ck", | ||
2665 | .parent = &dpll_per_m4_ck, | ||
2666 | .clksel = usim_fclk_div, | ||
2667 | .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, | ||
2668 | .clksel_mask = OMAP4430_CLKSEL_DIV_MASK, | ||
2669 | .ops = &clkops_null, | ||
2670 | .recalc = &omap2_clksel_recalc, | ||
2671 | .round_rate = &omap2_clksel_round_rate, | ||
2672 | .set_rate = &omap2_clksel_set_rate, | ||
2673 | }; | ||
2674 | |||
2675 | static struct clk usim_fclk = { | ||
2676 | .name = "usim_fclk", | ||
2677 | .ops = &clkops_omap2_dflt, | ||
2678 | .enable_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, | ||
2679 | .enable_bit = OMAP4430_OPTFCLKEN_FCLK_SHIFT, | ||
2680 | .clkdm_name = "l4_wkup_clkdm", | ||
2681 | .parent = &usim_ck, | ||
2682 | .recalc = &followparent_recalc, | ||
2683 | }; | ||
2684 | |||
2642 | static struct clk usim_fck = { | 2685 | static struct clk usim_fck = { |
2643 | .name = "usim_fck", | 2686 | .name = "usim_fck", |
2644 | .ops = &clkops_omap2_dflt, | 2687 | .ops = &clkops_omap2_dflt, |
@@ -2704,29 +2747,6 @@ static struct clk trace_clk_div_ck = { | |||
2704 | .set_rate = &omap2_clksel_set_rate, | 2747 | .set_rate = &omap2_clksel_set_rate, |
2705 | }; | 2748 | }; |
2706 | 2749 | ||
2707 | static const struct clksel_rate div2_14to18_rates[] = { | ||
2708 | { .div = 14, .val = 0, .flags = RATE_IN_4430 }, | ||
2709 | { .div = 18, .val = 1, .flags = RATE_IN_4430 }, | ||
2710 | { .div = 0 }, | ||
2711 | }; | ||
2712 | |||
2713 | static const struct clksel usim_fclk_div[] = { | ||
2714 | { .parent = &dpll_per_m4_ck, .rates = div2_14to18_rates }, | ||
2715 | { .parent = NULL }, | ||
2716 | }; | ||
2717 | |||
2718 | static struct clk usim_fclk = { | ||
2719 | .name = "usim_fclk", | ||
2720 | .parent = &dpll_per_m4_ck, | ||
2721 | .clksel = usim_fclk_div, | ||
2722 | .clksel_reg = OMAP4430_CM_WKUP_USIM_CLKCTRL, | ||
2723 | .clksel_mask = OMAP4430_CLKSEL_DIV_MASK, | ||
2724 | .ops = &clkops_null, | ||
2725 | .recalc = &omap2_clksel_recalc, | ||
2726 | .round_rate = &omap2_clksel_round_rate, | ||
2727 | .set_rate = &omap2_clksel_set_rate, | ||
2728 | }; | ||
2729 | |||
2730 | /* | 2750 | /* |
2731 | * clkdev | 2751 | * clkdev |
2732 | */ | 2752 | */ |
@@ -2883,8 +2903,8 @@ static struct omap_clk omap44xx_clks[] = { | |||
2883 | CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X), | 2903 | CLK("mmci-omap-hs.2", "fck", &mmc3_fck, CK_443X), |
2884 | CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X), | 2904 | CLK("mmci-omap-hs.3", "fck", &mmc4_fck, CK_443X), |
2885 | CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X), | 2905 | CLK("mmci-omap-hs.4", "fck", &mmc5_fck, CK_443X), |
2886 | CLK(NULL, "ocp2scp_usb_phy_clk32k", &ocp2scp_usb_phy_clk32k, CK_443X), | ||
2887 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), | 2906 | CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), |
2907 | CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), | ||
2888 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), | 2908 | CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), |
2889 | CLK("omap_rng", "ick", &rng_ick, CK_443X), | 2909 | CLK("omap_rng", "ick", &rng_ick, CK_443X), |
2890 | CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), | 2910 | CLK(NULL, "sha2md5_fck", &sha2md5_fck, CK_443X), |
@@ -2931,16 +2951,18 @@ static struct omap_clk omap44xx_clks[] = { | |||
2931 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), | 2951 | CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), |
2932 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), | 2952 | CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), |
2933 | CLK("musb_hdrc", "ick", &usb_otg_hs_ick, CK_443X), | 2953 | CLK("musb_hdrc", "ick", &usb_otg_hs_ick, CK_443X), |
2954 | CLK(NULL, "usb_phy_cm_clk32k", &usb_phy_cm_clk32k, CK_443X), | ||
2934 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), | 2955 | CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), |
2935 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), | 2956 | CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), |
2936 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), | 2957 | CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), |
2937 | CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X), | 2958 | CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X), |
2959 | CLK(NULL, "usim_ck", &usim_ck, CK_443X), | ||
2960 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), | ||
2938 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), | 2961 | CLK(NULL, "usim_fck", &usim_fck, CK_443X), |
2939 | CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X), | 2962 | CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X), |
2940 | CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X), | 2963 | CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X), |
2941 | CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), | 2964 | CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), |
2942 | CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), | 2965 | CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), |
2943 | CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), | ||
2944 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), | 2966 | CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), |
2945 | CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), | 2967 | CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), |
2946 | CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), | 2968 | CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), |