[PATCHv4 4/8] ARM: OMAP4: hwmod: flag hwmods/modules supporting module level context status

Kevin Hilman khilman at ti.com
Tue May 15 18:22:23 EDT 2012


"Cousson, Benoit" <b-cousson at ti.com> writes:

> On 4/24/2012 4:46 PM, Tero Kristo wrote:
>> On Mon, 2012-04-23 at 10:52 -0500, Jon Hunter wrote:
>>> Hi Tero,
>>>
>>> On 04/20/2012 04:19 AM, Tero Kristo wrote:
>>>> From: Rajendra Nayak<rnayak at ti.com>
>>>>
>>>> On OMAP4 most modules/hwmods support module level context status. On
>>>> OMAP3 and earlier, we relyed on the power domain level context status.
>>>> Identify all such modules using a 'HWMOD_CONTEXT_REG' flag, all such
>>>> hwmods already have a valid 'context_offs' populated in .prcm structure.
>>>
>>> Is it necessary to add another flag? Can't we just check if context_offs
>>> is non-zero? Would save adding a lot more lines to an already large file
>>> :-)
>>
>> Actually one of the older versions of this patch was just checking
>> against a non-zero value, but it was decided to be changed as
>> potentially the context_offs can be zero even if it is a valid offset.

Potentially?  Is that the case on OMAP4/5 today?  I don't see any for
OMAP4 in mainline.

If zero really is a valid offset somewhere (where?), then we could use
-1 (or USHRT_MAX in this case.)

> Yeah, but still, every OMAP4 IPs are supporting that except two of
> them I guess, so it is a pity to add that to every IPs.
>
> We'd better add a HWMOD_NO_CONTEXT_REG to the few IPs that are not
> supporting that. Since OMAP 2 & 3 does not have this feature at all,
> we can check on the cpu revision.
>
> I think the issue raised by Rajendra was about AM35xx that looks like
> an OMAP3 variant but does have these registers like an OMAP4
> variant:-(

If AM335x is missing it for *all* IPs, that's easy enough to solve
without bloating the data file: just set .context_offs field (or flag)
to the magic value for all IPs during hwmod registration.

Paul/Benoit should make the call whether to use a special value in the
.context_offs field (0 or -1) or add a new flag.  If a flag is chosen, I
agree with Benoit that it should indicate the *lack* of the feature,
since having the feature is the norm.

Kevin




More information about the linux-arm-kernel mailing list