public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: "Guzman Lugo, Fernando" <x0095840@ti.com>
Cc: Ameya Palande <ameya.palande@nokia.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"Ramirez Luna, Omar" <omar.ramirez@ti.com>,
	"hiroshi.doyu@nokia.com" <hiroshi.doyu@nokia.com>
Subject: Re: [PATCH 05/13] DSPBRIDGE: enable smart/autoidle for mailbox sysconfig
Date: Wed, 15 Jul 2009 17:01:11 -0500	[thread overview]
Message-ID: <4A5E51A7.6040907@ti.com> (raw)
In-Reply-To: <496565EC904933469F292DDA3F1663E602A32025B9@dlee06.ent.ti.com>

Guzman Lugo, Fernando had written, on 07/15/2009 04:59 PM, the following:
>> 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);
> 
> What do think about doing a call to __raw_writel to avoid a new function wrapper as Omar suggested? Something like that:
> 				
> 			/* Enabling mailbox SMART/AUTO-IDLE */
> 			__raw_writel(2 << 3 | 1, hostRes.dwMboxBase + 10);
> 
> 
I think this is cleaner than piggybacking on the context save/restore 
structure. We should use macros though for 2<<3 | 1 etc.. just my 2Cents 
for readability.

Regards,
Nishanth Menon

  reply	other threads:[~2009-07-15 22:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 14:56 [PATCH 00/13] DSPBRIDGE: Patchset with various fixes Ameya Palande
2009-07-15 14:56 ` [PATCH 01/13] DSPBRIDGE: Heuristic fixes of strlen/malloc out by one Ameya Palande
2009-07-15 14:56   ` [PATCH 02/13] DSPBRIDGE: PROCWRAP_Load function cleanup in a complete mess Ameya Palande
2009-07-15 14:56     ` [PATCH 03/13] DSPBRIDGE: Remove unnecessary conditions from some for loops Ameya Palande
2009-07-15 14:56       ` [PATCH 04/13] DSPBRIDGE: fix macros that break when inside an if/else Ameya Palande
2009-07-15 14:56         ` [PATCH 05/13] DSPBRIDGE: enable smart/autoidle for mailbox sysconfig Ameya Palande
2009-07-15 14:56           ` [PATCH 06/13] DSPBRIDGE: avoid to dump unnecessary registers without debug Ameya Palande
2009-07-15 14:56             ` [PATCH 07/13] DSPBRIDGE: flush_all() bumps VDD1_OPP to 2 if it is at 1 Ameya Palande
2009-07-15 14:56               ` [PATCH 08/13] DSPBRIDGE: Prevent memory access during hibernation Ameya Palande
2009-07-15 14:56                 ` [PATCH 09/13] DSPBRIDGE: fix incorrect mask of DPLL in CHNLSM_InterruptDSP2() Ameya Palande
2009-07-15 14:56                   ` [PATCH 10/13] DSPBRIDGE: HACK: insert delay for DPLL stabilization Ameya Palande
2009-07-15 14:56                     ` [PATCH 11/13] DSPBRIDGE: Set VDD1 OPP1 unconditionally while moving to off mode Ameya Palande
2009-07-15 14:56                       ` [PATCH 12/13] DSPBRIDGE: fix resuming problem with dsp hibernation Ameya Palande
2009-07-15 23:10                         ` Guzman Lugo, Fernando
2009-07-16  7:12                           ` Ameya Palande
2009-07-16  7:16                           ` Hiroshi DOYU
2009-07-15 22:53                       ` [PATCH 11/13] DSPBRIDGE: Set VDD1 OPP1 unconditionally while moving to off mode Guzman Lugo, Fernando
2009-07-15 23:10                         ` Hiroshi DOYU
2009-07-15 23:17                           ` Guzman Lugo, Fernando
2009-07-16  8:53                     ` [PATCH 10/13] DSPBRIDGE: HACK: insert delay for DPLL stabilization Hiroshi DOYU
2009-07-20  3:52                   ` [PATCH 09/13] DSPBRIDGE: fix incorrect mask of DPLL in CHNLSM_InterruptDSP2() Ramirez Luna, Omar
2009-07-20  3:52                 ` [PATCH 08/13] DSPBRIDGE: Prevent memory access during hibernation Ramirez Luna, Omar
2009-07-19 21:54             ` [PATCH 06/13] DSPBRIDGE: avoid to dump unnecessary registers without debug Ramirez Luna, Omar
2009-07-15 21:59           ` [PATCH 05/13] DSPBRIDGE: enable smart/autoidle for mailbox sysconfig Guzman Lugo, Fernando
2009-07-15 22:01             ` Nishanth Menon [this message]
2009-07-15 22:37               ` Hiroshi DOYU
2009-07-15 22:32             ` Hiroshi DOYU
2009-07-15 21:51         ` [PATCH 04/13] DSPBRIDGE: fix macros that break when inside an if/else Guzman Lugo, Fernando
2009-07-19 21:54         ` Ramirez Luna, Omar
2009-07-19 21:53       ` [PATCH 03/13] DSPBRIDGE: Remove unnecessary conditions from some for loops Ramirez Luna, Omar
2009-07-19 21:52     ` [PATCH 02/13] DSPBRIDGE: PROCWRAP_Load function cleanup in a complete mess Ramirez Luna, Omar
2009-07-19 21:52   ` [PATCH 01/13] DSPBRIDGE: Heuristic fixes of strlen/malloc out by one Ramirez Luna, Omar
2009-07-15 19:19 ` [PATCH 00/13] DSPBRIDGE: Patchset with various fixes Nishanth Menon
2009-07-16  6:53   ` Ameya Palande

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=4A5E51A7.6040907@ti.com \
    --to=nm@ti.com \
    --cc=ameya.palande@nokia.com \
    --cc=hiroshi.doyu@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --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