diff options
| author | Philippe Langlais <philippe.langlais@linaro.org> | 2011-07-07 13:39:47 +0200 |
|---|---|---|
| committer | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-19 15:15:43 +0200 |
| commit | 31470a483d96caf4d439fe41e8144bde728cf286 (patch) | |
| tree | 05d860463de00efee669d4630c2bf0d7150f8303 /arch/arm/mach-ux500/clock-db5500.c | |
| parent | f39ddd4052704c60a950c055b6f18f5aeed0c40e (diff) | |
ux500: align u5500 PRCMU & CPUFREQ management with u8500 (multiple commits in one)
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
Merge of following commits too:
u5500: add support for sysclk
basic sysclk support added in PRCMU driver and
clock framework driver updated.
Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
U5500: Support for ESRAM12 EPOD in PRCMU driver
Signed-off-by: Vijaya Kumar Kilari <vijay.kilari@stericsson.com>
ux500: regulator: handle different base offset of ePOD ID
5500 ePOD ids are offseted for some reason in the PRCMU driver. Adjust the ids
to index the local arrays to avoid memory corruption.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
ux500: pm: support PRCMU status check on 5500
This also removes unused 8500v1 code.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
arm: ux500: prcmu_ac_wake_req workaround
This patch adds a check in prcmu_ac_wake_req that the modem is
awake (in terms of the value in the PRCM_MOD_AWAKE_STATUS
register) after the AC_WAKE_ACK has been received from the PRCMU
FW. If the check fails, a retry is made.
This seems to be necessary, since the modem can generate an
AC_WAKE_ACK, and then still go to sleep.
Signed-off-by: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
U5500: Add support for PRCMU Mailbox0
Add PRCMU mailbox 0 support for irq wakeup
enable and disable
Signed-off-by: Vijaya Kumar K <vijay.kilari@stericsson.com>
U5500: Add support for power state transition
PRCMU driver is updated to provide API for
system power state transition
Signed-off-by: Vijaya Kumar K <vijay.kilari@stericsson.com>
ARM: ux500: prcmu: Add A9 watchdog interface
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
U5500 : ab5500 core interrupt hander update
AB5500 interrupts will be now handled by PRCMU and then
routed to AB5500 core driver.AB5500 irq handler will
no more read the latch registers to find the interrupt
reason.Instead PRCMU will read the latch registers and
provide the values to core driver.
Signed-off-by: Bibek Basu <bibek.basu@stericsson.com>
ARM: ux500: prcmu-dbg: Tiny code clean-up
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
u5500: add mailbox1 and related function support
Add cpufreq-db5500.c file for db5500 CPUfreq support.
PRCMU mailbox1 and related functions' support is added.
List of functions implemented:
- prcmu_get/set_arm_opp
- read_mailbox_1
Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Fix for PRCMU
u5500: PRCMU IRQ should be NO_SUSPEND
As on 8500.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
ARM: u5500: PRCMU reset API
Added API for rebooting the board and for getting the last reboot code.
Signed-off-by: Pawel Szyszuk <pawel.szyszuk@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/clock-db5500.c')
| -rw-r--r-- | arch/arm/mach-ux500/clock-db5500.c | 83 |
1 files changed, 2 insertions, 81 deletions
diff --git a/arch/arm/mach-ux500/clock-db5500.c b/arch/arm/mach-ux500/clock-db5500.c index ee2ea8033bd..18583a52334 100644 --- a/arch/arm/mach-ux500/clock-db5500.c +++ b/arch/arm/mach-ux500/clock-db5500.c @@ -36,59 +36,16 @@ static DEFINE_MUTEX(ab_ulpclk_mutex); static DEFINE_MUTEX(audioclk_mutex); /* SysClk operations. */ - -static int request_sysclk(bool enable) -{ - static int requests; - - if ((enable && (requests++ == 0)) || (!enable && (--requests == 0))) - return prcmu_request_clock(PRCMU_SYSCLK, enable); - return 0; -} - static int sysclk_enable(struct clk *clk) { - static bool swat_enable; - int r; - - if (!swat_enable) { - r = ab8500_sysctrl_set(AB8500_SWATCTRL, - AB8500_SWATCTRL_SWATENABLE); - if (r) - return r; - - swat_enable = true; - } - - r = request_sysclk(true); - if (r) - return r; - - if (clk->cg_sel) { - r = ab8500_sysctrl_set(AB8500_SYSULPCLKCTRL1, (u8)clk->cg_sel); - if (r) - (void)request_sysclk(false); - } - return r; + return prcmu_request_clock(PRCMU_SYSCLK, true); } static void sysclk_disable(struct clk *clk) { - int r; - if (clk->cg_sel) { - r = ab8500_sysctrl_clear(AB8500_SYSULPCLKCTRL1, - (u8)clk->cg_sel); - if (r) - goto disable_failed; - } - r = request_sysclk(false); - if (r) - goto disable_failed; + prcmu_request_clock(PRCMU_SYSCLK, false); return; - -disable_failed: - pr_err("clock: failed to disable %s.\n", clk->name); } static struct clkops sysclk_ops = { @@ -324,27 +281,6 @@ static struct clk sysclk = { .mutex = &sysclk_mutex, }; -static struct clk sysclk2 = { - .name = "sysclk2", - .ops = &sysclk_ops, - .cg_sel = AB8500_SYSULPCLKCTRL1_SYSCLKBUF2REQ, - .mutex = &sysclk_mutex, -}; - -static struct clk sysclk3 = { - .name = "sysclk3", - .ops = &sysclk_ops, - .cg_sel = AB8500_SYSULPCLKCTRL1_SYSCLKBUF3REQ, - .mutex = &sysclk_mutex, -}; - -static struct clk sysclk4 = { - .name = "sysclk4", - .ops = &sysclk_ops, - .cg_sel = AB8500_SYSULPCLKCTRL1_SYSCLKBUF4REQ, - .mutex = &sysclk_mutex, -}; - static struct clk rtc32k = { .name = "rtc32k", .rate = 32768, @@ -633,7 +569,6 @@ static struct clk *db5500_dbg_clks[] __initdata = { &p6_pclk7, /* Clock sources */ - &sysclk2, &clkout0, &clkout1, &rtc_clk1, @@ -655,12 +590,6 @@ static struct clk_lookup u8500_common_clock_sources[] = { CLK_LOOKUP(audioclk, "ab8500-codec.0", "audioclk"), }; -static struct clk_lookup u8500_v2_sysclks[] = { - CLK_LOOKUP(sysclk2, NULL, "sysclk2"), - CLK_LOOKUP(sysclk3, NULL, "sysclk3"), - CLK_LOOKUP(sysclk4, NULL, "sysclk4"), -}; - static struct clk_lookup db5500_prcmu_clocks[] = { CLK_LOOKUP(sgaclk, "mali", NULL), CLK_LOOKUP(siaclk, "mmio_camera", "sia"), @@ -793,9 +722,6 @@ static void __init db5500_boot_clk_enable(void) int __init db5500_clk_init(void) { - sysclk_ops.enable = NULL; - sysclk_ops.disable = NULL; - if (ux500_is_svp()) { prcmu_clk_ops.enable = NULL; prcmu_clk_ops.disable = NULL; @@ -813,11 +739,6 @@ int __init db5500_clk_init(void) clks_register(db5500_clkouts, ARRAY_SIZE(db5500_clkouts)); clks_register(u5500_clocks, ARRAY_SIZE(u5500_clocks)); - if (cpu_is_u8500v2()) { - clks_register(u8500_v2_sysclks, - ARRAY_SIZE(u8500_v2_sysclks)); - } - db5500_boot_clk_enable(); /* |
