aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-10-18 15:33:26 -0700
committerColin Cross <ccross@android.com>2011-10-18 15:33:26 -0700
commit49f1349e6007ce26f79e1021c73613a8d82e233e (patch)
tree20bed47d210c9052241db3e3fc738d52eb1bb8a2
parent7195c0804fff8a0dde6f1d214ce300b5fe907482 (diff)
parent1e600867aa9b1982c652719693762bd967ad5b53 (diff)
downloadkernel_samsung_tuna-49f1349e6007ce26f79e1021c73613a8d82e233e.zip
kernel_samsung_tuna-49f1349e6007ce26f79e1021c73613a8d82e233e.tar.gz
kernel_samsung_tuna-49f1349e6007ce26f79e1021c73613a8d82e233e.tar.bz2
Merge branch 'linux-omap-3.0' into android-omap-3.0
-rw-r--r--arch/arm/mach-omap2/mailbox.c4
-rw-r--r--arch/arm/mach-omap2/prcm-debug.c8
-rw-r--r--drivers/remoteproc/omap_remoteproc.c18
3 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index e498e39..bdb5332 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -20,6 +20,7 @@
#include <mach/irqs.h>
#define MAILBOX_REVISION 0x000
+#define MAILBOX_SYSCONFIG 0x10
#define MAILBOX_MESSAGE(m) (0x040 + 0x4 * (m))
#define MAILBOX_FIFOSTATUS(m) (0x080 + 0x4 * (m))
#define MAILBOX_MSGSTATUS(m) (0x0c0 + 0x4 * (m))
@@ -32,6 +33,7 @@
#define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
#define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
+#define MAILBOX_SOFTRESET 1
#define MBOX_NUM_USER 2
#define OMAP4_MBOX_NUM_USER 3
@@ -123,6 +125,8 @@ static int omap2_mbox_startup(struct omap_mbox *mbox)
pm_runtime_enable(mbox->dev->parent);
pm_runtime_get_sync(mbox->dev->parent);
+ mbox_write_reg(MAILBOX_SOFTRESET, MAILBOX_SYSCONFIG);
+
omap2_mbox_restore_ctx(mbox);
l = mbox_read_reg(MAILBOX_REVISION);
diff --git a/arch/arm/mach-omap2/prcm-debug.c b/arch/arm/mach-omap2/prcm-debug.c
index 48fd754..12e3e55 100644
--- a/arch/arm/mach-omap2/prcm-debug.c
+++ b/arch/arm/mach-omap2/prcm-debug.c
@@ -1445,6 +1445,14 @@ static void prcmdebug_dump_mod(struct seq_file *sf, struct d_mod_info *mod,
!optclk)
return;
+ if (flags & PRCMDEBUG_LASTSLEEP &&
+ (mod->flags & MOD_MODE &&
+ ((clkctrl & OMAP4430_MODULEMODE_MASK) >>
+ OMAP4430_MODULEMODE_SHIFT) == 1 /* AUTO */) &&
+ (!(mod->flags & MOD_SLAVE) || idlest == 0) /* ON */ &&
+ !optclk)
+ return;
+
d_pr(sf, " %s", mod->name);
if (mod->flags & MOD_MODE)
diff --git a/drivers/remoteproc/omap_remoteproc.c b/drivers/remoteproc/omap_remoteproc.c
index 81146e1..1e01a33 100644
--- a/drivers/remoteproc/omap_remoteproc.c
+++ b/drivers/remoteproc/omap_remoteproc.c
@@ -248,6 +248,8 @@ int omap_rproc_deactivate(struct omap_device *od)
#ifdef CONFIG_REMOTE_PROC_AUTOSUSPEND
struct omap_rproc_priv *rpp = rproc->priv;
#endif
+ if (pdata->clkdm)
+ clkdm_wakeup(pdata->clkdm);
for (i = 0; i < od->hwmods_cnt; i++) {
ret = omap_hwmod_shutdown(od->hwmods[i]);
@@ -270,6 +272,9 @@ int omap_rproc_deactivate(struct omap_device *od)
}
#endif
err:
+ if (pdata->clkdm)
+ clkdm_allow_idle(pdata->clkdm);
+
return ret;
}
@@ -286,6 +291,8 @@ static int omap_rproc_iommu_init(struct rproc *rproc,
if (!rpp)
return -ENOMEM;
+ if (pdata->clkdm)
+ clkdm_wakeup(pdata->clkdm);
iommu_set_isr(pdata->iommu_name, omap_rproc_iommu_isr, rproc);
iommu_set_secure(pdata->iommu_name, rproc->secure_mode,
rproc->secure_ttb);
@@ -311,12 +318,17 @@ static int omap_rproc_iommu_init(struct rproc *rproc,
goto err_map;
}
}
+ if (pdata->clkdm)
+ clkdm_allow_idle(pdata->clkdm);
+
return 0;
err_map:
iommu_put(iommu);
err_mmu:
iommu_set_secure(pdata->iommu_name, false, NULL);
+ if (pdata->clkdm)
+ clkdm_allow_idle(pdata->clkdm);
kfree(rpp);
return ret;
}
@@ -476,10 +488,16 @@ out:
static int omap_rproc_iommu_exit(struct rproc *rproc)
{
struct omap_rproc_priv *rpp = rproc->priv;
+ struct omap_rproc_pdata *pdata = rproc->dev->platform_data;
+
+ if (pdata->clkdm)
+ clkdm_wakeup(pdata->clkdm);
if (rpp->iommu)
iommu_put(rpp->iommu);
kfree(rpp);
+ if (pdata->clkdm)
+ clkdm_allow_idle(pdata->clkdm);
return 0;
}