From: Omar Ramirez Luna <omar.ramirez@ti.com>
To: linux-omap <linux-omap@vger.kernel.org>
Cc: Hiroshi Doyu <Hiroshi.DOYU@nokia.com>,
Ameya Palande <ameya.palande@nokia.com>,
Felipe Contreras <felipe.contreras@nokia.com>,
Fernando Guzman <x0095840@ti.com>, Ernesto Ramos <ernesto@ti.com>
Subject: [PATCHv2 02/18] DSPBRIDGE: enable smart/autoidle for mailbox sysconfig
Date: Wed, 16 Dec 2009 20:15:47 -0600 [thread overview]
Message-ID: <1261016163-11091-3-git-send-email-omar.ramirez@ti.com> (raw)
In-Reply-To: <1261016163-11091-2-git-send-email-omar.ramirez@ti.com>
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Enable smart/autoidle for mailbox sysconfig register.
Original patch:
http://patchwork.kernel.org/patch/35628/
Reported-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
[ fg: remove wrapper around restoreSettings ]
Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
---
drivers/dsp/bridge/hw/hw_mbox.c | 14 +++++++++++++-
drivers/dsp/bridge/hw/hw_mbox.h | 22 ++++++++++++++++++++++
drivers/dsp/bridge/wmd/io_sm.c | 1 +
3 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/drivers/dsp/bridge/hw/hw_mbox.c b/drivers/dsp/bridge/hw/hw_mbox.c
index ee79032..5e8e15e 100644
--- a/drivers/dsp/bridge/hw/hw_mbox.c
+++ b/drivers/dsp/bridge/hw/hw_mbox.c
@@ -33,7 +33,19 @@
/* width in bits of MBOX Id */
#define HW_MBOX_ID_WIDTH 2
-struct MAILBOX_CONTEXT mboxsetting = {0x4, 0x1, 0x1};
+/* SYSCONFIG: register bit definition */
+#define AUTOIDLE (1 << 0)
+#define SMARTIDLE (2 << 3)
+
+struct MAILBOX_CONTEXT mboxsetting = {
+ .sysconfig = SMARTIDLE | AUTOIDLE,
+};
+
+HW_STATUS HW_MBOX_initSettings(void __iomem *baseAddress)
+{
+ MLBMAILBOX_SYSCONFIGWriteRegister32(baseAddress, SMARTIDLE | AUTOIDLE);
+ return RET_OK;
+}
/* Saves the mailbox context */
HW_STATUS HW_MBOX_saveSettings(void __iomem *baseAddress)
diff --git a/drivers/dsp/bridge/hw/hw_mbox.h b/drivers/dsp/bridge/hw/hw_mbox.h
index ad1a89c..203964c 100644
--- a/drivers/dsp/bridge/hw/hw_mbox.h
+++ b/drivers/dsp/bridge/hw/hw_mbox.h
@@ -277,6 +277,28 @@ extern HW_STATUS HW_MBOX_EventAck(
);
/*
+* FUNCTION : HW_MBOX_initSettings
+*
+* INPUTS:
+*
+* Identifier : baseAddress
+* Type : const u32
+* Description : Base Address of instance of Mailbox module
+*
+*
+* RETURNS:
+*
+* Type : ReturnCode_t
+* Description : RET_OK No errors occured
+* RET_BAD_NULL_PARAM Address/pointer Paramater was set to 0/NULL
+* RET_INVALID_ID Invalid Id used
+* RET_EMPTY Mailbox empty
+*
+* PURPOSE: : This function initialize the mailbox configuration.
+*/
+extern HW_STATUS HW_MBOX_initSettings(void __iomem *baseAddres);
+
+/*
* FUNCTION : HW_MBOX_saveSettings
*
* INPUTS:
diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c
index 0daf93d..a2da528 100644
--- a/drivers/dsp/bridge/wmd/io_sm.c
+++ b/drivers/dsp/bridge/wmd/io_sm.c
@@ -284,6 +284,7 @@ DSP_STATUS WMD_IO_Create(OUT struct IO_MGR **phIOMgr,
pIOMgr->fSharedIRQ = pMgrAttrs->fShared;
IO_DisableInterrupt(hWmdContext);
if (devType == DSP_UNIT) {
+ HW_MBOX_initSettings(hostRes.dwMboxBase);
/* Plug the channel ISR:. */
if ((request_irq(INT_MAIL_MPU_IRQ, IO_ISR, 0,
"DspBridge\tmailbox", (void *)pIOMgr)) == 0)
--
1.6.2.4
next prev parent reply other threads:[~2009-12-17 2:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 2:15 [PATCHv2 00/18] First set of unreviewed patches Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 01/18] DSPBRIDGE: Fix compile break for WCD debug mask Omar Ramirez Luna
2009-12-17 2:15 ` Omar Ramirez Luna [this message]
2009-12-17 2:15 ` [PATCHv2 03/18] DSPBRIDGE: Remove preproessor condition that could never work Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 04/18] DSPBRIDGE: Implemented Trampoline support for dynamic loader Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 05/18] DSPBRIDGE: Enable/Disable MCBSP_CLOCKS for MCBSP2 Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 06/18] DSPBRIDGE: set PWRERROR notifications as an option Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 07/18] DSPBRIDGE: Enable peripheral clocks on wake up Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 08/18] DSPBRIDGE: Remove long busy-wait loops on PWRST transitions Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 09/18] DSPBRIDGE: Rename usCount to timeout Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 10/18] DSPBRIDGE: Trivial cleanup on DBDCD Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 11/18] DSPBRIDGE: Do not panic on bad page count Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 12/18] DSPBRIDGE: support loading 4 dependent DLL Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 13/18] DSPBRIDGE: Memory leak in Node Register Notify Omar Ramirez Luna
2009-12-17 2:15 ` [PATCHv2 14/18] DSPBRIDGE: check pointer before calling Proc_Detach Omar Ramirez Luna
2009-12-17 2:16 ` [PATCHv2 15/18] DSPBRIDGE: check the status of DMM_GetHandle Omar Ramirez Luna
2009-12-17 2:16 ` [PATCHv2 16/18] DSPBRIDGE: KFILE_Seek & KFILE_Tell, u32 replaced with loff_t Omar Ramirez Luna
2009-12-17 2:16 ` [PATCHv2 17/18] DSPBRIDGE: Delete unused files Omar Ramirez Luna
2009-12-17 2:16 ` [PATCHv2 18/18] DSPBRIDGE: Compilation fixes 2.6.31 Omar Ramirez Luna
2009-12-18 17:44 ` [PATCH 0/2] dsp-bridge: PM cleanups Felipe Contreras
2009-12-18 17:44 ` [PATCH 1/2] dsp-bridge: improve PM conditional code Felipe Contreras
2009-12-18 17:44 ` [PATCH 2/2] dsp-bridge: remove unused includes Felipe Contreras
2009-12-18 17:48 ` [PATCHv2 18/18] DSPBRIDGE: Compilation fixes 2.6.31 Felipe Contreras
2009-12-18 21:50 ` Ramirez Luna, Omar
2009-12-22 13:13 ` [PATCHv2 00/18] First set of unreviewed patches Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1261016163-11091-3-git-send-email-omar.ramirez@ti.com \
--to=omar.ramirez@ti.com \
--cc=Hiroshi.DOYU@nokia.com \
--cc=ameya.palande@nokia.com \
--cc=ernesto@ti.com \
--cc=felipe.contreras@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=x0095840@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox