linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Tony Lindgren <tony@atomide.com>
Cc: khilman@deeprootsystems.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 2/4] ARM: OMAP4+: PM: Consolidate OMAP4 PM code to re-use it for OMAP5
Date: Tue, 9 Apr 2013 11:43:50 +0530	[thread overview]
Message-ID: <5163B19E.30105@ti.com> (raw)
In-Reply-To: <20130408164228.GK10155@atomide.com>

On Monday 08 April 2013 10:12 PM, Tony Lindgren wrote:
> * Santosh Shilimkar <santosh.shilimkar@ti.com> [130408 03:51]:
>> On Saturday 06 April 2013 03:04 AM, Tony Lindgren wrote:
>>> * Santosh Shilimkar <santosh.shilimkar@ti.com> [130405 06:01]:
>>>> OMAP5 has backward compatible PRCM block and it's programming
>>>> model is mostly similar to OMAP4. Same is going to be maintained
>>>> for future OMAP4 based SOCs. Hence consolidate the OMAP4 power
>>>> management code so that it can be re-used on OMAP5 and later devices.
>>>>
>>>> While at it, update the kernel-doc for omap4_pm_init().
>>>>
>>>> Acked-by: Nishanth Menon <nm@ti.com>
>>>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>> ---
>>>>  arch/arm/mach-omap2/Makefile                       |    9 +--
>>>>  arch/arm/mach-omap2/{pm44xx.c => pm_omap4plus.c}   |   58 ++++++++++++++++----
>>>>  .../mach-omap2/{sleep44xx.S => sleep_omap4plus.S}  |    0
>>>>  3 files changed, 53 insertions(+), 14 deletions(-)
>>>>  rename arch/arm/mach-omap2/{pm44xx.c => pm_omap4plus.c} (83%)
>>>>  rename arch/arm/mach-omap2/{sleep44xx.S => sleep_omap4plus.S} (100%)
>>>
>>> I suggest you leave out the rename. That just adds churn and has
>>> flame potential.
>>>
>> OK. I can leave that mow but have to do renames anyways when
>> I add OMAP5 support. OMAP54XX support inside pm44xx.c and sleep44x.S
>> will be really odd.
> 
> Well that should be just fine if the hardware is the same.
>  
>> Let me know if you have concern on renaming it while OMAP5 support
>> gets added ?
> 
> If the rename is done, it should have a clear reason to do it in
> a separate patch. IMHO it's just fine to have omap4 in some name and
> then assume that at least some follow up SoCs also use that code.
> In the worst case we may end up renaming things many times:
>
Agree. omap4_* is just fine and thats why many omap4_* are not renamed.
Here the files were calling specific family of OMAP4 i.e OMAP44XX and
hence the rename was appropriate.
 
> omap-xyz.c -> omap2-xyz.c -> omap2plus-xyz.c -> omap2-to-4-xyz.c ->
> omap2-to-4-and-am35xx-xyz.c etc :)
> 
pm_omap4plus.c and sleep_omap4plus.S was chosen specifically considering
the OMAP4+ devices share the PRCM IP. But PRCM_IP itself isn't new so
calling by IP wasn't an option.

> If we rename something, the description should have a clear reason
> for doing it like "To avoid confusing between PM code that does not
> have support for bootrom assisted off-idle on SMP omaps with PM code
> that's not bootrom assisted, let's rename foo to.."
> 
> For the naming, the only safe naming convention is to use something
> actually describing the piece of hardware. Maybe some combination
> of bootrom-assisted-off-idle + SMP in this case if there's no actual
> name for this hwblock?
> 
As I said, the IP has been there from OMAP2XX days. Here the case that
IP version is very similar between OMAP4, OMAP5. DRA(next SOC) and its
derivatives. Hence can share most of the code. I thought this was good
enough reason considering at least 4 family of SOC's can make use
of the code.

It has nothing to do with SMP etc specifically and rather the similarity
between the PM infrastructure on the mentioned SOCs. 

Let me know if you can suggested better name than what I chose ?

Regards,
Santosh

  reply	other threads:[~2013-04-09  6:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 12:58 [PATCH v3 0/4] ARM: OMAP4+: PM: Consolidate code for re-use on OMAP5 Santosh Shilimkar
2013-04-05 12:59 ` [PATCH v3 1/4] ARM: OMAP4+: PM: Consolidate MPU subsystem PM code for re-use Santosh Shilimkar
2013-04-05 13:19   ` Felipe Balbi
2013-04-05 13:35     ` Nishanth Menon
2013-04-05 13:39       ` Santosh Shilimkar
2013-04-05 14:04       ` Felipe Balbi
2013-04-05 14:18         ` Nishanth Menon
2013-04-05 14:29           ` Felipe Balbi
2013-04-05 13:37     ` Santosh Shilimkar
2013-04-05 12:59 ` [PATCH v3 2/4] ARM: OMAP4+: PM: Consolidate OMAP4 PM code to re-use it for OMAP5 Santosh Shilimkar
2013-04-05 13:21   ` Felipe Balbi
2013-04-05 13:35     ` Santosh Shilimkar
2013-04-05 21:34   ` Tony Lindgren
2013-04-08 10:48     ` Santosh Shilimkar
2013-04-08 16:42       ` Tony Lindgren
2013-04-09  6:13         ` Santosh Shilimkar [this message]
2013-04-09 16:55           ` Tony Lindgren
2013-04-10  6:17             ` Santosh Shilimkar
2013-04-05 12:59 ` [PATCH v3 3/4] ARM: OMAP4+: Make secondary_startup function name more consistent Santosh Shilimkar
2013-04-05 12:59 ` [PATCH v3 4/4] ARM: OMAP4+: CPUidle: Consolidate idle driver for OMAP5 support Santosh Shilimkar
2013-04-05 21:29   ` Kevin Hilman
2013-04-05 23:42 ` [PATCH v3 0/4] ARM: OMAP4+: PM: Consolidate code for re-use on OMAP5 Kevin Hilman
2013-04-08 11:03   ` Santosh Shilimkar

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=5163B19E.30105@ti.com \
    --to=santosh.shilimkar@ti.com \
    --cc=khilman@deeprootsystems.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).