From 43b316da6147f18a9382ca51520c5f3871b8b28f Mon Sep 17 00:00:00 2001 From: Pawel Szyszuk Date: Mon, 3 Oct 2011 10:00:43 +0100 Subject: ARM: U9500: HSI core clocks initialization ST-Ericsson Linux next: NA ST-Ericsson ID: 343481 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ic59f08e1bb5d858344d95b5d34ae8a5d85d9aa1d Signed-off-by: Pawel Szyszuk Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32518 Reviewed-by: Andrew LYNN --- arch/arm/mach-ux500/clock-db8500.c | 22 ++++++++++++++++++---- arch/arm/mach-ux500/clock.c | 6 ++++++ arch/arm/mach-ux500/clock.h | 1 + 3 files changed, 25 insertions(+), 4 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-ux500/clock-db8500.c b/arch/arm/mach-ux500/clock-db8500.c index f82fbaa5c83..f03d8361157 100644 --- a/arch/arm/mach-ux500/clock-db8500.c +++ b/arch/arm/mach-ux500/clock-db8500.c @@ -511,8 +511,8 @@ static DEF_PRCMU_CLK(per6clk, PRCMU_PER6CLK, 133330000); static DEF_PRCMU_CLK(per7clk, PRCMU_PER7CLK, 100000000); static DEF_PRCMU_SCALABLE_CLK(lcdclk, PRCMU_LCDCLK); static DEF_PRCMU_OPP100_CLK(bmlclk, PRCMU_BMLCLK, 200000000); -static DEF_PRCMU_CLK(hsitxclk, PRCMU_HSITXCLK, 100000000); -static DEF_PRCMU_CLK(hsirxclk, PRCMU_HSIRXCLK, 200000000); +static DEF_PRCMU_SCALABLE_CLK(hsitxclk, PRCMU_HSITXCLK); +static DEF_PRCMU_SCALABLE_CLK(hsirxclk, PRCMU_HSIRXCLK); static DEF_PRCMU_SCALABLE_CLK(hdmiclk, PRCMU_HDMICLK); static DEF_PRCMU_CLK(apeatclk, PRCMU_APEATCLK, 160000000); static DEF_PRCMU_CLK(apetraceclk, PRCMU_APETRACECLK, 160000000); @@ -640,10 +640,24 @@ static DEF_PER2_KCLK(5, p2_sdi3_kclk, &sdmmcclk); static DEF_PER_CLK(p2_sdi3_clk, &p2_pclk7, &p2_sdi3_kclk); /* HSIR */ -static DEF_PER2_KCLK(6, p2_ssirx_kclk, &hsirxclk); +static struct clk p2_ssirx_kclk = { + .name = "p2_ssirx_kclk", + .ops = &prcc_kclk_rec_ops, + .io_base = U8500_CLKRST2_BASE, + .cg_sel = BIT(6), + .parent = &hsirxclk, + .clock = &per2clk, +}; /* HSIT */ -static DEF_PER2_KCLK(7, p2_ssitx_kclk, &hsitxclk); +static struct clk p2_ssitx_kclk = { + .name = "p2_ssitx_kclk", + .ops = &prcc_kclk_rec_ops, + .io_base = U8500_CLKRST2_BASE, + .cg_sel = BIT(7), + .parent = &hsitxclk, + .clock = &per2clk, +}; /* SSP0 */ static DEF_PER3_KCLK(1, p3_ssp0_kclk, &sspclk); diff --git a/arch/arm/mach-ux500/clock.c b/arch/arm/mach-ux500/clock.c index 2f9ca7ea64d..06a9bdaec7d 100644 --- a/arch/arm/mach-ux500/clock.c +++ b/arch/arm/mach-ux500/clock.c @@ -428,6 +428,12 @@ struct clkops prcc_kclk_ops = { .disable = prcc_kclk_disable, }; +struct clkops prcc_kclk_rec_ops = { + .enable = prcc_kclk_enable, + .disable = prcc_kclk_disable, + .round_rate = clk_round_rate_rec, + .set_rate = clk_set_rate_rec, +}; int __init clk_init(void) { diff --git a/arch/arm/mach-ux500/clock.h b/arch/arm/mach-ux500/clock.h index 205c768b896..39d8a61d79b 100644 --- a/arch/arm/mach-ux500/clock.h +++ b/arch/arm/mach-ux500/clock.h @@ -76,6 +76,7 @@ extern struct clkops prcmu_opp100_clk_ops; extern struct mutex clk_opp100_mutex; extern struct clkops prcc_pclk_ops; extern struct clkops prcc_kclk_ops; +extern struct clkops prcc_kclk_rec_ops; extern struct clkops sga_clk_ops; #define CLK_LOOKUP(_clk, _dev_id, _con_id) \ -- cgit v1.2.3