summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/clock-db8500.c
diff options
context:
space:
mode:
authorRickard Andersson <rickard.andersson@stericsson.com>2011-04-01 10:38:22 +0200
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 15:15:06 +0200
commit006b02032f159e955c7d8cf31ebde3e64feaa3e6 (patch)
tree4dd69bd8f18128b81f5967f38308bef602582d96 /arch/arm/mach-ux500/clock-db8500.c
parent0d3644b8626deaff53292cae6d5dde346e6f40f6 (diff)
mach-ux500: clock: correct AB8500 internal clock handling
Change settings for AB internal clock handling. Now the internal clock used by the AB ASIC is always sysclk if both sysclk and ulpclk are present. ST-Ericsson Linux next: - ST-Ericsson ID: 325090 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I4b3f8ed5dd2158954bb1bd40795a6a55cc38512f Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/19683 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Tested-by: Mattias NILSSON <mattias.i.nilsson@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/clock-db8500.c')
-rw-r--r--arch/arm/mach-ux500/clock-db8500.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/arm/mach-ux500/clock-db8500.c b/arch/arm/mach-ux500/clock-db8500.c
index 874e8617197..57db0226b3c 100644
--- a/arch/arm/mach-ux500/clock-db8500.c
+++ b/arch/arm/mach-ux500/clock-db8500.c
@@ -145,7 +145,8 @@ static int ab_ulpclk_enable(struct clk *clk)
if (err)
return err;
return ab8500_sysctrl_set(AB8500_SYSULPCLKCTRL1,
- AB8500_SYSULPCLKCTRL1_ULPCLKREQ);
+ (AB8500_SYSULPCLKCTRL1_ULPCLKREQ |
+ AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_MASK));
}
static void ab_ulpclk_disable(struct clk *clk)
@@ -185,24 +186,9 @@ static void audioclk_disable(struct clk *clk)
}
}
-static int audioclk_set_parent(struct clk *clk, struct clk *parent)
-{
- if (parent->ops == &sysclk_ops) {
- return ab8500_sysctrl_clear(AB8500_SYSULPCLKCTRL1,
- AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_MASK);
- } else if (parent->ops == &ab_ulpclk_ops) {
- return ab8500_sysctrl_write(AB8500_SYSULPCLKCTRL1,
- AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_MASK,
- (1 << AB8500_SYSULPCLKCTRL1_SYSULPCLKINTSEL_SHIFT));
- } else {
- return -EINVAL;
- }
-}
-
static struct clkops audioclk_ops = {
.enable = audioclk_enable,
.disable = audioclk_disable,
- .set_parent = audioclk_set_parent,
};
/* Primary camera clock operations */