Thread (15 messages) read the whole thread 15 messages, 3 authors, 2013-02-11
STALE4919d

[PATCH v3 9/9] ARM: OMAP2+: AM33XX: control: Add some control module registers and APIs

From: paul@pwsan.com (Paul Walmsley)
Date: 2013-02-08 14:17:04
Also in: linux-omap

Hi Vaibhav,

a comment on this one:

On Tue, 29 Jan 2013, Vaibhav Bedia wrote:
quoted hunk ↗ jump to hunk
Add minimal APIs for writing to the IPC and the M3_TXEV registers
in the Control module. These will be used in a subsequent patch which
adds suspend-resume support for AM33XX.

Signed-off-by: Vaibhav Bedia <redacted>
Acked-by: Santosh Shilimkar <redacted>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
---
v3: Add Peter's Acked-by
v2: No change

 arch/arm/mach-omap2/control.c | 20 ++++++++++++++++++++
 arch/arm/mach-omap2/control.h | 41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c
index 2adb268..c5d54ae 100644
--- a/arch/arm/mach-omap2/control.c
+++ b/arch/arm/mach-omap2/control.c
@@ -604,3 +604,23 @@ int omap3_ctrl_save_padconf(void)
 }
 
 #endif /* CONFIG_ARCH_OMAP3 && CONFIG_PM */
+
+#if defined(CONFIG_SOC_AM33XX) && defined(CONFIG_PM)
+void am33xx_txev_eoi(void)
+{
+	omap_ctrl_writel(AM33XX_M3_TXEV_ACK, AM33XX_CONTROL_M3_TXEV_EOI);
+}
+
+void am33xx_txev_enable(void)
+{
+	omap_ctrl_writel(AM33XX_M3_TXEV_ENABLE, AM33XX_CONTROL_M3_TXEV_EOI);
+}
+
+void am33xx_wkup_m3_ipc_cmd(struct am33xx_ipc_data *data)
+{
+	omap_ctrl_writel(data->resume_addr, AM33XX_CONTROL_IPC_MSG_REG0);
+	omap_ctrl_writel(data->sleep_mode, AM33XX_CONTROL_IPC_MSG_REG1);
+	omap_ctrl_writel(data->param1, AM33XX_CONTROL_IPC_MSG_REG2);
+	omap_ctrl_writel(data->param2, AM33XX_CONTROL_IPC_MSG_REG3);
+}
Could you please add some kerneldoc-style comments to these functions so 
others can understand what they're intended to do, any side-effects they 
have, any prerequisites, etc.?


- Paul
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help