diff options
author | Fernando Guzman Lugo <fernando.lugo@ti.com> | 2012-03-21 09:39:28 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-04-11 13:05:36 +0800 |
commit | c3e9f3d1fc435c023908f37d0ab925385fc80d6e (patch) | |
tree | 41747a4b53fa0a0c6daf5920bffce434f89e1013 /arch | |
parent | 777d3c60abf90861c37bd1ae736e7795cf1a825d (diff) |
omap: remoteproc: implement suspend and resume callbacks
Implement resume and suspend callbacks, that way omap remote
processors can support suspend and resume.
The host processor can not save the context of the remote processors
for that reason it sends messages to the remote processor requesting
enter to suspend. The remote processor can ack the request or cancel
the request depending of if it is still doing some work. However
when there is a system suspend the remote processor should suspend
even if it is doing some job. Therefore, in the system suspend case
we send a different suspend request to the remote processor saying
that the suspend is forced and it must enter to suspend.
Also, if the remoteproc has a register that can say if the remote
processor is in idle state, it can be specify in the platform data that
way the host can know if it is in idle state without the need to send
a message to the remote processor.
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/remoteproc.c | 8 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/remoteproc.h | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/remoteproc.c b/arch/arm/mach-omap2/remoteproc.c index ed77406170c7..d1d80bafdafd 100644 --- a/arch/arm/mach-omap2/remoteproc.c +++ b/arch/arm/mach-omap2/remoteproc.c @@ -26,6 +26,12 @@ #include <plat/remoteproc.h> #include <plat/iommu.h> +#include "cm2_44xx.h" +#include "cm-regbits-44xx.h" + +#define OMAP4430_CM_M3_M3_CLKCTRL (OMAP4430_CM2_BASE + OMAP4430_CM2_CORE_INST \ + + OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET) + /* * Temporarily define the CMA base address explicitly. * @@ -48,6 +54,8 @@ static struct omap_rproc_pdata omap4_rproc_data[] = { .firmware = "ducati-m3-core0.xem3", .mbox_name = "mailbox-1", .oh_name = "ipu_c0", + .idle_addr = OMAP4430_CM_M3_M3_CLKCTRL, + .idle_mask = OMAP4430_STBYST_MASK, }, }; diff --git a/arch/arm/plat-omap/include/plat/remoteproc.h b/arch/arm/plat-omap/include/plat/remoteproc.h index 590ba663d810..0b24f769e888 100644 --- a/arch/arm/plat-omap/include/plat/remoteproc.h +++ b/arch/arm/plat-omap/include/plat/remoteproc.h @@ -27,6 +27,9 @@ struct platform_device; * @oh_name_opt: optional, secondary omap hwmod device * @firmware: name of firmware file to load * @mbox_name: name of omap mailbox device to use with this rproc + * @idle_addr: physical address of the idle register + * @idle_mask: mask of the idle register + * @suspend_timeout: max timeout waiting for suspend request respond * @ops: start/stop rproc handlers */ struct omap_rproc_pdata { @@ -35,6 +38,9 @@ struct omap_rproc_pdata { const char *oh_name_opt; const char *firmware; const char *mbox_name; + u32 idle_addr; + u32 idle_mask; + unsigned long suspend_timeout; const struct rproc_ops *ops; }; |