From patchwork Wed Jul 15 14:56:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ameya Palande X-Patchwork-Id: 35696 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6FEufuc024812 for ; Wed, 15 Jul 2009 14:56:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755207AbZGOO4l (ORCPT ); Wed, 15 Jul 2009 10:56:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755208AbZGOO4l (ORCPT ); Wed, 15 Jul 2009 10:56:41 -0400 Received: from smtp.nokia.com ([192.100.105.134]:61032 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755207AbZGOO4k (ORCPT ); Wed, 15 Jul 2009 10:56:40 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n6FEuSZo016935; Wed, 15 Jul 2009 09:56:34 -0500 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 15 Jul 2009 17:56:36 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 15 Jul 2009 17:56:36 +0300 Received: from localhost.localdomain (esdhcp04048.research.nokia.com [172.21.40.48]) by mgw-sa01.ext.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n6FEuQeY018779; Wed, 15 Jul 2009 17:56:33 +0300 From: Ameya Palande To: linux-omap@vger.kernel.org Cc: omar.ramirez@ti.com, x0095840@ti.com, nm@ti.com, hiroshi.doyu@nokia.com Subject: [PATCH 05/13] DSPBRIDGE: enable smart/autoidle for mailbox sysconfig Date: Wed, 15 Jul 2009 17:56:28 +0300 Message-Id: <1247669795-23895-6-git-send-email-ameya.palande@nokia.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: <1247669795-23895-5-git-send-email-ameya.palande@nokia.com> References: <1247669795-23895-1-git-send-email-ameya.palande@nokia.com> <1247669795-23895-2-git-send-email-ameya.palande@nokia.com> <1247669795-23895-3-git-send-email-ameya.palande@nokia.com> <1247669795-23895-4-git-send-email-ameya.palande@nokia.com> <1247669795-23895-5-git-send-email-ameya.palande@nokia.com> X-OriginalArrivalTime: 15 Jul 2009 14:56:36.0120 (UTC) FILETIME=[7330F980:01CA055C] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Doyu Hiroshi (Nokia-D/Helsinki) Reported-by: Tero Kristo Signed-off-by: Hiroshi DOYU --- drivers/dsp/bridge/hw/hw_mbox.c | 4 +++- drivers/dsp/bridge/hw/hw_mbox.h | 5 +++++ drivers/dsp/bridge/wmd/io_sm.c | 1 + 3 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/dsp/bridge/hw/hw_mbox.c b/drivers/dsp/bridge/hw/hw_mbox.c index ee79032..5a87597 100644 --- a/drivers/dsp/bridge/hw/hw_mbox.c +++ b/drivers/dsp/bridge/hw/hw_mbox.c @@ -33,7 +33,9 @@ /* width in bits of MBOX Id */ #define HW_MBOX_ID_WIDTH 2 -struct MAILBOX_CONTEXT mboxsetting = {0x4, 0x1, 0x1}; +static struct MAILBOX_CONTEXT mboxsetting = { + .sysconfig = 2 << 3 | 1, /* SMART/AUTO-IDLE */ +}; /* 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..8a5f6bd 100644 --- a/drivers/dsp/bridge/hw/hw_mbox.h +++ b/drivers/dsp/bridge/hw/hw_mbox.h @@ -320,4 +320,9 @@ extern HW_STATUS HW_MBOX_saveSettings(void __iomem *baseAddres); */ extern HW_STATUS HW_MBOX_restoreSettings(void __iomem *baseAddres); +static inline void HW_MBOX_initSettings(void __iomem *baseAddres) +{ + HW_MBOX_restoreSettings(baseAddres); +} + #endif /* __MBOX_H */ diff --git a/drivers/dsp/bridge/wmd/io_sm.c b/drivers/dsp/bridge/wmd/io_sm.c index 39c34f7..d8ae1f1 100644 --- a/drivers/dsp/bridge/wmd/io_sm.c +++ b/drivers/dsp/bridge/wmd/io_sm.c @@ -282,6 +282,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)