diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock2420_data.c')
-rw-r--r-- | arch/arm/mach-omap2/clock2420_data.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c index ff47a6c2611d..608874b651e8 100644 --- a/arch/arm/mach-omap2/clock2420_data.c +++ b/arch/arm/mach-omap2/clock2420_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP2420 clock data | 2 | * OMAP2420 clock data |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2009 Texas Instruments, Inc. | 4 | * Copyright (C) 2005-2009, 2012 Texas Instruments, Inc. |
5 | * Copyright (C) 2004-2011 Nokia Corporation | 5 | * Copyright (C) 2004-2011 Nokia Corporation |
6 | * | 6 | * |
7 | * Contacts: | 7 | * Contacts: |
@@ -23,7 +23,7 @@ | |||
23 | #include "clock.h" | 23 | #include "clock.h" |
24 | #include "clock2xxx.h" | 24 | #include "clock2xxx.h" |
25 | #include "opp2xxx.h" | 25 | #include "opp2xxx.h" |
26 | #include "cm2xxx_3xxx.h" | 26 | #include "cm2xxx.h" |
27 | #include "prm2xxx_3xxx.h" | 27 | #include "prm2xxx_3xxx.h" |
28 | #include "prm-regbits-24xx.h" | 28 | #include "prm-regbits-24xx.h" |
29 | #include "cm-regbits-24xx.h" | 29 | #include "cm-regbits-24xx.h" |
@@ -124,6 +124,7 @@ static struct clk dpll_ck = { | |||
124 | .name = "dpll_ck", | 124 | .name = "dpll_ck", |
125 | .ops = &clkops_omap2xxx_dpll_ops, | 125 | .ops = &clkops_omap2xxx_dpll_ops, |
126 | .parent = &sys_ck, /* Can be func_32k also */ | 126 | .parent = &sys_ck, /* Can be func_32k also */ |
127 | .init = &omap2xxx_clkt_dpllcore_init, | ||
127 | .dpll_data = &dpll_dd, | 128 | .dpll_data = &dpll_dd, |
128 | .clkdm_name = "wkup_clkdm", | 129 | .clkdm_name = "wkup_clkdm", |
129 | .recalc = &omap2_dpllcore_recalc, | 130 | .recalc = &omap2_dpllcore_recalc, |
@@ -1924,12 +1925,9 @@ static struct omap_clk omap2420_clks[] = { | |||
1924 | 1925 | ||
1925 | int __init omap2420_clk_init(void) | 1926 | int __init omap2420_clk_init(void) |
1926 | { | 1927 | { |
1927 | const struct prcm_config *prcm; | ||
1928 | struct omap_clk *c; | 1928 | struct omap_clk *c; |
1929 | u32 clkrate; | ||
1930 | 1929 | ||
1931 | prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL; | 1930 | prcm_clksrc_ctrl = OMAP2420_PRCM_CLKSRC_CTRL; |
1932 | cm_idlest_pll = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST); | ||
1933 | cpu_mask = RATE_IN_242X; | 1931 | cpu_mask = RATE_IN_242X; |
1934 | rate_table = omap2420_rate_table; | 1932 | rate_table = omap2420_rate_table; |
1935 | 1933 | ||
@@ -1949,20 +1947,13 @@ int __init omap2420_clk_init(void) | |||
1949 | omap2_init_clk_clkdm(c->lk.clk); | 1947 | omap2_init_clk_clkdm(c->lk.clk); |
1950 | } | 1948 | } |
1951 | 1949 | ||
1950 | omap2xxx_clkt_vps_late_init(); | ||
1951 | |||
1952 | /* Disable autoidle on all clocks; let the PM code enable it later */ | 1952 | /* Disable autoidle on all clocks; let the PM code enable it later */ |
1953 | omap_clk_disable_autoidle_all(); | 1953 | omap_clk_disable_autoidle_all(); |
1954 | 1954 | ||
1955 | /* Check the MPU rate set by bootloader */ | 1955 | /* XXX Can this be done from the virt_prcm_set clk init function? */ |
1956 | clkrate = omap2xxx_clk_get_core_rate(&dpll_ck); | 1956 | omap2xxx_clkt_vps_check_bootloader_rates(); |
1957 | for (prcm = rate_table; prcm->mpu_speed; prcm++) { | ||
1958 | if (!(prcm->flags & cpu_mask)) | ||
1959 | continue; | ||
1960 | if (prcm->xtal_speed != sys_ck.rate) | ||
1961 | continue; | ||
1962 | if (prcm->dpll_speed <= clkrate) | ||
1963 | break; | ||
1964 | } | ||
1965 | curr_prcm_set = prcm; | ||
1966 | 1957 | ||
1967 | recalculate_root_clocks(); | 1958 | recalculate_root_clocks(); |
1968 | 1959 | ||
@@ -1976,11 +1967,6 @@ int __init omap2420_clk_init(void) | |||
1976 | */ | 1967 | */ |
1977 | clk_enable_init_clocks(); | 1968 | clk_enable_init_clocks(); |
1978 | 1969 | ||
1979 | /* Avoid sleeping sleeping during omap2_clk_prepare_for_reboot() */ | ||
1980 | vclk = clk_get(NULL, "virt_prcm_set"); | ||
1981 | sclk = clk_get(NULL, "sys_ck"); | ||
1982 | dclk = clk_get(NULL, "dpll_ck"); | ||
1983 | |||
1984 | return 0; | 1970 | return 0; |
1985 | } | 1971 | } |
1986 | 1972 | ||