All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"tony@atomide.com" <tony@atomide.com>,
	"paul@pwsan.com" <paul@pwsan.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Cousson, Benoit" <b-cousson@ti.com>,
	"Mohammed, Afzal" <afzal@ti.com>, "Patil, Rachna" <rachna@ti.com>
Subject: Re: [RFC PATCH 03/11] arm:omap:am33xx: Add power domain data
Date: Thu, 01 Dec 2011 07:29:34 -0800	[thread overview]
Message-ID: <87vcq0qpi9.fsf@ti.com> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A8047604@DBDE01.ent.ti.com> (Vaibhav Hiremath's message of "Thu, 1 Dec 2011 11:58:19 +0000")

"Hiremath, Vaibhav" <hvaibhav@ti.com> writes:

>> -----Original Message-----
>> From: Hilman, Kevin
>> Sent: Thursday, December 01, 2011 6:34 AM
>> To: Hiremath, Vaibhav
>> Cc: linux-omap@vger.kernel.org; tony@atomide.com; paul@pwsan.com; linux-
>> arm-kernel@lists.infradead.org; Cousson, Benoit; Mohammed, Afzal; Patil,
>> Rachna
>> Subject: Re: [RFC PATCH 03/11] arm:omap:am33xx: Add power domain data
>> 
>> Vaibhav Hiremath <hvaibhav@ti.com> writes:
>> 
>> > From: Afzal Mohammed <afzal@ti.com>
>> >
>> > This patch adds AM33XX power domain data,
>> > corresponding API's to access PRM module and
>> > PRM register offsets & bit fields.
>> >
>> > Signed-off-by: Rachna Patil <rachna@ti.com>
>> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
>> > Signed-off-by: Afzal Mohammed <afzal@ti.com>
>> 
>> First some general comments:
>> 
>> At first glance, it seems like there could be much more reuse with OMAP4
>> code here.  From what I see, AM33x has only one partition compared to
>> several on OMAP4, but that doesn't mean you couldn't reuse the OMAP4
>> functions and just use a single partition.
> Kevin,
>
> Indeed it looks close to OMAP4, but it becomes difficult and ugly once you
> Start getting into implementation details, for example,
>
>  - All PRM offsets don't match, you will end up with
> cpu_is_xxx check and handle this. Applicable to all power domains.
>
> 	OMAP4430_PRM_MPU_INST           0x0300
> 	Vs
> 	AM33XX_PRM_MPU_MOD              0x0E00
>
> 	OMAP4430_PRM_WKUP_INST          0x1700
> 	Vs
> 	AM33XX_PRM_WKUP_MOD             0x0D00
>
>  - Also there are some differences in logic states of domains as well.
>
> Another important point is, we have considered AM33xx as OMAP3 family
> of device (ARCH_OMAP3).  So you may end up with number of cpu_is_xxx
> checks in code.

If we end up with cpu_is_* checks in the code, we're doing it wrong.

I understand there are lots of differences with OMAP4, but from what I'm
looking at (at least for the power domains in this patch) there most of
those differences are handled in the data files, and the code could be
shared.

For example, looking at powerdomain33xx.c, this looks exactly like the
OMAP4 version except

- you have 2 new AM33XX_PRM_* defines (which are the same as OMAP4 version)
- you have a new register access functions: am33xx_prminst_read_inst_reg()...

So, my question is: if you could update the OMAP4 code to be able to
override the register access read/write functions, would you even need a
new powerdomain33xx.c?

Your am33xx_ version doesn't take a partition argument, but that would
be easy to remedy, and the AM33x powerdomains could be updated to all
declare a default partition.

Anyways, I'll let Benoit/Paul/Rajendra take it from here, as they're the
ones who know this code the best.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: khilman@ti.com (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 03/11] arm:omap:am33xx: Add power domain data
Date: Thu, 01 Dec 2011 07:29:34 -0800	[thread overview]
Message-ID: <87vcq0qpi9.fsf@ti.com> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A8047604@DBDE01.ent.ti.com> (Vaibhav Hiremath's message of "Thu, 1 Dec 2011 11:58:19 +0000")

"Hiremath, Vaibhav" <hvaibhav@ti.com> writes:

>> -----Original Message-----
>> From: Hilman, Kevin
>> Sent: Thursday, December 01, 2011 6:34 AM
>> To: Hiremath, Vaibhav
>> Cc: linux-omap at vger.kernel.org; tony at atomide.com; paul at pwsan.com; linux-
>> arm-kernel at lists.infradead.org; Cousson, Benoit; Mohammed, Afzal; Patil,
>> Rachna
>> Subject: Re: [RFC PATCH 03/11] arm:omap:am33xx: Add power domain data
>> 
>> Vaibhav Hiremath <hvaibhav@ti.com> writes:
>> 
>> > From: Afzal Mohammed <afzal@ti.com>
>> >
>> > This patch adds AM33XX power domain data,
>> > corresponding API's to access PRM module and
>> > PRM register offsets & bit fields.
>> >
>> > Signed-off-by: Rachna Patil <rachna@ti.com>
>> > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
>> > Signed-off-by: Afzal Mohammed <afzal@ti.com>
>> 
>> First some general comments:
>> 
>> At first glance, it seems like there could be much more reuse with OMAP4
>> code here.  From what I see, AM33x has only one partition compared to
>> several on OMAP4, but that doesn't mean you couldn't reuse the OMAP4
>> functions and just use a single partition.
> Kevin,
>
> Indeed it looks close to OMAP4, but it becomes difficult and ugly once you
> Start getting into implementation details, for example,
>
>  - All PRM offsets don't match, you will end up with
> cpu_is_xxx check and handle this. Applicable to all power domains.
>
> 	OMAP4430_PRM_MPU_INST           0x0300
> 	Vs
> 	AM33XX_PRM_MPU_MOD              0x0E00
>
> 	OMAP4430_PRM_WKUP_INST          0x1700
> 	Vs
> 	AM33XX_PRM_WKUP_MOD             0x0D00
>
>  - Also there are some differences in logic states of domains as well.
>
> Another important point is, we have considered AM33xx as OMAP3 family
> of device (ARCH_OMAP3).  So you may end up with number of cpu_is_xxx
> checks in code.

If we end up with cpu_is_* checks in the code, we're doing it wrong.

I understand there are lots of differences with OMAP4, but from what I'm
looking at (at least for the power domains in this patch) there most of
those differences are handled in the data files, and the code could be
shared.

For example, looking at powerdomain33xx.c, this looks exactly like the
OMAP4 version except

- you have 2 new AM33XX_PRM_* defines (which are the same as OMAP4 version)
- you have a new register access functions: am33xx_prminst_read_inst_reg()...

So, my question is: if you could update the OMAP4 code to be able to
override the register access read/write functions, would you even need a
new powerdomain33xx.c?

Your am33xx_ version doesn't take a partition argument, but that would
be easy to remedy, and the AM33x powerdomains could be updated to all
declare a default partition.

Anyways, I'll let Benoit/Paul/Rajendra take it from here, as they're the
ones who know this code the best.

Kevin

  reply	other threads:[~2011-12-01 15:29 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20 17:19 [RFC PATCH 00/11] arm:omap:am33xx: Add basic voltage, power, clock & HWMOD data Vaibhav Hiremath
2011-11-20 17:19 ` Vaibhav Hiremath
2011-11-20 17:19 ` [RFC PATCH 01/11] arm:omap:am33xx: Add voltage domain data Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-12-01  0:11   ` Kevin Hilman
2011-12-01  0:11     ` Kevin Hilman
2011-12-01 11:25     ` Hiremath, Vaibhav
2011-12-01 11:25       ` Hiremath, Vaibhav
2011-12-01 14:53       ` Kevin Hilman
2011-12-01 14:53         ` Kevin Hilman
2011-11-20 17:19 ` [RFC PATCH 02/11] arm:omap:am33xx: Integrate " Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-12-01  0:12   ` Kevin Hilman
2011-12-01  0:12     ` Kevin Hilman
2011-12-01 11:25     ` Hiremath, Vaibhav
2011-12-01 11:25       ` Hiremath, Vaibhav
2011-11-20 17:19 ` [RFC PATCH 03/11] arm:omap:am33xx: Add power " Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-12-01  1:04   ` Kevin Hilman
2011-12-01  1:04     ` Kevin Hilman
2011-12-01 11:58     ` Hiremath, Vaibhav
2011-12-01 11:58       ` Hiremath, Vaibhav
2011-12-01 15:29       ` Kevin Hilman [this message]
2011-12-01 15:29         ` Kevin Hilman
2011-12-02  5:37       ` Rajendra Nayak
2011-12-02  5:37         ` Rajendra Nayak
2011-12-02 17:39         ` Kevin Hilman
2011-12-02 17:39           ` Kevin Hilman
2011-12-02 18:14     ` Nori, Sekhar
2011-12-02 18:14       ` Nori, Sekhar
2011-12-02 21:25       ` Kevin Hilman
2011-12-02 21:25         ` Kevin Hilman
2011-12-02  9:19   ` Rajendra Nayak
2011-12-02  9:19     ` Rajendra Nayak
2011-11-20 17:19 ` [RFC PATCH 04/11] arm:omap:am33xx: Integrate powerdomain to OMAP power framework Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-12-01  1:04   ` Kevin Hilman
2011-12-01  1:04     ` Kevin Hilman
2011-12-01 11:26     ` Hiremath, Vaibhav
2011-12-01 11:26       ` Hiremath, Vaibhav
2011-11-20 17:19 ` [RFC PATCH 06/11] arm:omap:am33xx: Integrate clock & clockdomain to OMAP clock framework Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-11-20 17:19 ` [RFC PATCH 07/11] arm:omap:am33xx: Add irq, dma and module base addr to SoC header files Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-12-01  1:46   ` Kevin Hilman
2011-12-01  1:46     ` Kevin Hilman
2011-12-01 12:03     ` Hiremath, Vaibhav
2011-12-01 12:03       ` Hiremath, Vaibhav
2011-11-20 17:19 ` [RFC PATCH 08/11] arm:omap:am33xx: Add HWMOD data Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-11-20 17:19 ` [RFC PATCH 09/11] arm:omap:am33xx: Integrate AM33XX hwmods to omap HWMOD framework Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-11-20 17:19 ` [RFC PATCH 10/11] ARM:omap:am33xx: Add clock control api's Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-11-20 17:19 ` [RFC PATCH 11/11] arm:omap:am33xx: Add am335x support in generic omap_hwmod Vaibhav Hiremath
2011-11-20 17:19   ` Vaibhav Hiremath
2011-12-07  0:09   ` Kevin Hilman
2011-12-07  0:09     ` Kevin Hilman
2011-12-01  1:42 ` [RFC PATCH 00/11] arm:omap:am33xx: Add basic voltage, power, clock & HWMOD data Kevin Hilman
2011-12-01  1:42   ` Kevin Hilman
2011-12-01 12:02   ` Hiremath, Vaibhav
2011-12-01 12:02     ` Hiremath, Vaibhav
2011-12-01 12:57     ` Cousson, Benoit
2011-12-01 12:57       ` Cousson, Benoit
2011-12-01 14:58     ` Kevin Hilman
2011-12-01 14:58       ` Kevin Hilman
2011-12-01 15:14       ` Kevin Hilman
2011-12-01 15:14         ` Kevin Hilman
2011-12-07 21:25 ` Tony Lindgren
2011-12-07 21:25   ` Tony Lindgren

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=87vcq0qpi9.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=afzal@ti.com \
    --cc=b-cousson@ti.com \
    --cc=hvaibhav@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rachna@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.