diff options
author | Rajendra Nayak <rnayak@ti.com> | 2011-07-01 22:30:24 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-07-08 06:38:48 -0400 |
commit | 257d643d7d7cd81075b6dee88cfba14f773805c7 (patch) | |
tree | eadf158d485be0b4004b2515bcccf3a923434d10 | |
parent | 6b54b4991289762887a572785e296d15adbc1550 (diff) |
OMAP4: clocks: Update the clock tree with 4460 clock nodes
Add the new clock nodes (bandgap_ts_fclk, div_ts_ck) for omap4460.
Handle these nodes using the clock flags (CK_*).
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 39 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clkdev_omap.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/clock.h | 2 |
3 files changed, 42 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 8c965671b4d4..639e00e0eac2 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -1486,6 +1486,40 @@ static struct clk dss_dss_clk = { | |||
1486 | .recalc = &followparent_recalc, | 1486 | .recalc = &followparent_recalc, |
1487 | }; | 1487 | }; |
1488 | 1488 | ||
1489 | static const struct clksel_rate div3_8to32_rates[] = { | ||
1490 | { .div = 8, .val = 0, .flags = RATE_IN_44XX }, | ||
1491 | { .div = 16, .val = 1, .flags = RATE_IN_44XX }, | ||
1492 | { .div = 32, .val = 2, .flags = RATE_IN_44XX }, | ||
1493 | { .div = 0 }, | ||
1494 | }; | ||
1495 | |||
1496 | static const struct clksel div_ts_div[] = { | ||
1497 | { .parent = &l4_wkup_clk_mux_ck, .rates = div3_8to32_rates }, | ||
1498 | { .parent = NULL }, | ||
1499 | }; | ||
1500 | |||
1501 | static struct clk div_ts_ck = { | ||
1502 | .name = "div_ts_ck", | ||
1503 | .parent = &l4_wkup_clk_mux_ck, | ||
1504 | .clksel = div_ts_div, | ||
1505 | .clksel_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, | ||
1506 | .clksel_mask = OMAP4430_CLKSEL_24_25_MASK, | ||
1507 | .ops = &clkops_null, | ||
1508 | .recalc = &omap2_clksel_recalc, | ||
1509 | .round_rate = &omap2_clksel_round_rate, | ||
1510 | .set_rate = &omap2_clksel_set_rate, | ||
1511 | }; | ||
1512 | |||
1513 | static struct clk bandgap_ts_fclk = { | ||
1514 | .name = "bandgap_ts_fclk", | ||
1515 | .ops = &clkops_omap2_dflt, | ||
1516 | .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, | ||
1517 | .enable_bit = OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT, | ||
1518 | .clkdm_name = "l4_wkup_clkdm", | ||
1519 | .parent = &div_ts_ck, | ||
1520 | .recalc = &followparent_recalc, | ||
1521 | }; | ||
1522 | |||
1489 | static struct clk dss_48mhz_clk = { | 1523 | static struct clk dss_48mhz_clk = { |
1490 | .name = "dss_48mhz_clk", | 1524 | .name = "dss_48mhz_clk", |
1491 | .ops = &clkops_omap2_dflt, | 1525 | .ops = &clkops_omap2_dflt, |
@@ -3110,7 +3144,9 @@ static struct omap_clk omap44xx_clks[] = { | |||
3110 | CLK(NULL, "aes2_fck", &aes2_fck, CK_443X), | 3144 | CLK(NULL, "aes2_fck", &aes2_fck, CK_443X), |
3111 | CLK(NULL, "aess_fck", &aess_fck, CK_443X), | 3145 | CLK(NULL, "aess_fck", &aess_fck, CK_443X), |
3112 | CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X), | 3146 | CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X), |
3147 | CLK(NULL, "bandgap_ts_fclk", &bandgap_ts_fclk, CK_446X), | ||
3113 | CLK(NULL, "des3des_fck", &des3des_fck, CK_443X), | 3148 | CLK(NULL, "des3des_fck", &des3des_fck, CK_443X), |
3149 | CLK(NULL, "div_ts_ck", &div_ts_ck, CK_446X), | ||
3114 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), | 3150 | CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), |
3115 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), | 3151 | CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), |
3116 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), | 3152 | CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), |
@@ -3293,6 +3329,9 @@ int __init omap4xxx_clk_init(void) | |||
3293 | if (cpu_is_omap44xx()) { | 3329 | if (cpu_is_omap44xx()) { |
3294 | cpu_mask = RATE_IN_4430; | 3330 | cpu_mask = RATE_IN_4430; |
3295 | cpu_clkflg = CK_443X; | 3331 | cpu_clkflg = CK_443X; |
3332 | } else if (cpu_is_omap446x()) { | ||
3333 | cpu_mask = RATE_IN_4460; | ||
3334 | cpu_clkflg = CK_446X; | ||
3296 | } | 3335 | } |
3297 | 3336 | ||
3298 | clk_init(&omap2_clk_functions); | 3337 | clk_init(&omap2_clk_functions); |
diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h index f1899a3e4174..387a9638991b 100644 --- a/arch/arm/plat-omap/include/plat/clkdev_omap.h +++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h | |||
@@ -39,6 +39,7 @@ struct omap_clk { | |||
39 | #define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */ | 39 | #define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */ |
40 | #define CK_443X (1 << 11) | 40 | #define CK_443X (1 << 11) |
41 | #define CK_TI816X (1 << 12) | 41 | #define CK_TI816X (1 << 12) |
42 | #define CK_446X (1 << 13) | ||
42 | 43 | ||
43 | 44 | ||
44 | #define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) | 45 | #define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) |
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 006e599c6613..21b1beb23e5e 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -58,10 +58,12 @@ struct clkops { | |||
58 | #define RATE_IN_36XX (1 << 4) | 58 | #define RATE_IN_36XX (1 << 4) |
59 | #define RATE_IN_4430 (1 << 5) | 59 | #define RATE_IN_4430 (1 << 5) |
60 | #define RATE_IN_TI816X (1 << 6) | 60 | #define RATE_IN_TI816X (1 << 6) |
61 | #define RATE_IN_4460 (1 << 7) | ||
61 | 62 | ||
62 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) | 63 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) |
63 | #define RATE_IN_34XX (RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS) | 64 | #define RATE_IN_34XX (RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS) |
64 | #define RATE_IN_3XXX (RATE_IN_34XX | RATE_IN_36XX) | 65 | #define RATE_IN_3XXX (RATE_IN_34XX | RATE_IN_36XX) |
66 | #define RATE_IN_44XX (RATE_IN_4430 | RATE_IN_4460) | ||
65 | 67 | ||
66 | /* RATE_IN_3430ES2PLUS_36XX includes 34xx/35xx with ES >=2, and all 36xx/37xx */ | 68 | /* RATE_IN_3430ES2PLUS_36XX includes 34xx/35xx with ES >=2, and all 36xx/37xx */ |
67 | #define RATE_IN_3430ES2PLUS_36XX (RATE_IN_3430ES2PLUS | RATE_IN_36XX) | 69 | #define RATE_IN_3430ES2PLUS_36XX (RATE_IN_3430ES2PLUS | RATE_IN_36XX) |