aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd/glamo/glamo-core.c
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:11:10 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:11:10 +0000
commit92d436e83938338c308c7cadce20f3fb0342b19f (patch)
tree7de0eb40cdc765cea281b5e9cd51894e1390fbb6 /drivers/mfd/glamo/glamo-core.c
parent6ef255b4dc63eb1144cf0f330eef46639db08228 (diff)
fix-glamo-suspend-cant-use-pll-host-bus-clock-during-suspend.patch
Hum well that's the idea, Glamo did not play ball Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/mfd/glamo/glamo-core.c')
-rw-r--r--drivers/mfd/glamo/glamo-core.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
index 498ac42c6e0..61b0ef811e4 100644
--- a/drivers/mfd/glamo/glamo-core.c
+++ b/drivers/mfd/glamo/glamo-core.c
@@ -831,6 +831,14 @@ static void glamo_power(struct glamo_core *glamo,
while ((__reg_read(glamo, GLAMO_REG_PLL_GEN5) & 3) != 3)
;
+ /* allow to use the PLLS */
+ __reg_set_bit_mask(glamo, GLAMO_REG_DFT_GEN5, 0x400, 0);
+
+ /*
+ * we can go back to using fast PLL as host bus clock source
+ */
+ __reg_write(glamo, 0x200, 0x0e03);
+
/* Get memory out of deep powerdown */
__reg_write(glamo, GLAMO_REG_MEM_DRAM2,
@@ -865,6 +873,15 @@ static void glamo_power(struct glamo_core *glamo,
break;
case GLAMO_POWER_SUSPEND:
+
+ /* we like to use fast PLL as host bus clock now normally.
+ * but since we close down the PLLs, this is not going to fly
+ * during suspend - resume
+ */
+ __reg_write(glamo, 0x200, 0x0e00);
+ /* disallow PLLS (use CLKI) */
+ __reg_set_bit_mask(glamo, GLAMO_REG_DFT_GEN5, 0x400, 0x400);
+
/* stash a copy of which engines were running */
glamo->engine_enabled_bitfield_suspend =
glamo->engine_enabled_bitfield;
@@ -1337,8 +1354,8 @@ static int glamo_resume(struct platform_device *pdev)
static struct platform_driver glamo_driver = {
.probe = glamo_probe,
.remove = glamo_remove,
- .suspend_late = glamo_suspend,
- .resume_early = glamo_resume,
+ .suspend = glamo_suspend,
+ .resume = glamo_resume,
.driver = {
.name = "glamo3362",
.owner = THIS_MODULE,