* [PATCH v2] OMAP3: powerdomains: Match silicon revision to select the correct "core_pwrdm" definition
@ 2011-07-15 11:44 Abhilash K V
2011-08-12 7:41 ` Koyamangalath, Abhilash
0 siblings, 1 reply; 3+ messages in thread
From: Abhilash K V @ 2011-07-15 11:44 UTC (permalink / raw)
To: linux-arm-kernel
powerdomains3xxx_data.c defines core_3xxx_pre_es3_1_pwrdm and
core_3xxx_es3_1_pwrdm to take care of differences in "core_pwrdm"
implementations across revisions.
However,_pwrdm_lookup("core_pwrdm") always matches the first definition for
3630 ES 1.1 and 1.2 which is incorrect. This patch fixes this issue by adding
code to match silicon revision as well while looking up "core_pwrdm" in
_pwrdm_lookup().
core_3xxx_es3_1_pwrdm is different from core_3xxx_pre_es3_1_pwrdm in
that the former adds hardware save-restore support for USBTLL for 3430
ES3.1 and for 3630 ES1.1 and ES1.2.
Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
---
v2:
* now tested on 3630 (ES1.2 and ES1.0) and 3530 (ES3.0 and ES3.1)
* fixed checkpatch errors/warnings.
arch/arm/mach-omap2/powerdomain.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index 9af0847..82a2e30 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -32,6 +32,7 @@
#include "powerdomain.h"
#include "clockdomain.h"
#include <plat/prcm.h>
+#include <plat/cpu.h>
#include "pm.h"
@@ -58,6 +59,24 @@ static struct powerdomain *_pwrdm_lookup(const char *name)
list_for_each_entry(temp_pwrdm, &pwrdm_list, node) {
if (!strcmp(name, temp_pwrdm->name)) {
+ if (!strcmp(name, "core_pwrdm") && cpu_is_omap3630()) {
+ if (omap_rev() > OMAP3630_REV_ES1_0) {
+ /*
+ * match omap_chip info for OMAP3630
+ * Rev ES1.1, ES1.2 or higher
+ */
+ if (!(temp_pwrdm->omap_chip.oc
+ & CHIP_GE_OMAP3630ES1_1))
+ continue;
+ } else {
+ /* match omap_chip info for OMAP3630
+ * Rev ES1.0
+ */
+ if (!(temp_pwrdm->omap_chip.oc
+ & CHIP_IS_OMAP3630ES1))
+ continue;
+ }
+ }
pwrdm = temp_pwrdm;
break;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] OMAP3: powerdomains: Match silicon revision to select the correct "core_pwrdm" definition
2011-07-15 11:44 [PATCH v2] OMAP3: powerdomains: Match silicon revision to select the correct "core_pwrdm" definition Abhilash K V
@ 2011-08-12 7:41 ` Koyamangalath, Abhilash
2011-09-15 0:27 ` Tony Lindgren
0 siblings, 1 reply; 3+ messages in thread
From: Koyamangalath, Abhilash @ 2011-08-12 7:41 UTC (permalink / raw)
To: linux-arm-kernel
Hi
On Friday, July 15, 2011 5:14 PM +0530, Koyamangalath, Abhilash wrote:
________________________________________
> From: Koyamangalath, Abhilash
> Sent: Friday, July 15, 2011 5:14 PM
> To: linux-omap at vger.kernel.org
> Cc: tony at atomide.com; linux at arm.linux.org.uk; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Koyamangalath, Abhilash
> Subject: [PATCH v2] OMAP3: powerdomains: Match silicon revision to select the correct "core_pwrdm" definition
>
> powerdomains3xxx_data.c defines core_3xxx_pre_es3_1_pwrdm and
> core_3xxx_es3_1_pwrdm to take care of differences in "core_pwrdm"
> implementations across revisions.
> However,_pwrdm_lookup("core_pwrdm") always matches the first definition for
> 3630 ES 1.1 and 1.2 which is incorrect. This patch fixes this issue by adding
> code to match silicon revision as well while looking up "core_pwrdm" in
> _pwrdm_lookup().
> core_3xxx_es3_1_pwrdm is different from core_3xxx_pre_es3_1_pwrdm in
> that the former adds hardware save-restore support for USBTLL for 3430
> ES3.1 and for 3630 ES1.1 and ES1.2.
>
> Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
> ---
> v2:
> * now tested on 3630 (ES1.2 and ES1.0) and 3530 (ES3.0 and ES3.1)
> * fixed checkpatch errors/warnings.
>
> arch/arm/mach-omap2/powerdomain.c | 19 +++++++++++++++++++
> 1 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
> index 9af0847..82a2e30 100644
> --- a/arch/arm/mach-omap2/powerdomain.c
> +++ b/arch/arm/mach-omap2/powerdomain.c
> @@ -32,6 +32,7 @@
> #include "powerdomain.h"
> #include "clockdomain.h"
> #include <plat/prcm.h>
> +#include <plat/cpu.h>
>
> #include "pm.h"
>
> @@ -58,6 +59,24 @@ static struct powerdomain *_pwrdm_lookup(const char *name)
>
> list_for_each_entry(temp_pwrdm, &pwrdm_list, node) {
> if (!strcmp(name, temp_pwrdm->name)) {
> + if (!strcmp(name, "core_pwrdm") && cpu_is_omap3630()) {
> + if (omap_rev() > OMAP3630_REV_ES1_0) {
> + /*
> + * match omap_chip info for OMAP3630
> + * Rev ES1.1, ES1.2 or higher
> + */
> + if (!(temp_pwrdm->omap_chip.oc
> + & CHIP_GE_OMAP3630ES1_1))
> + continue;
> + } else {
> + /* match omap_chip info for OMAP3630
> + * Rev ES1.0
> + */
> + if (!(temp_pwrdm->omap_chip.oc
> + & CHIP_IS_OMAP3630ES1))
> + continue;
> + }
> + }
> pwrdm = temp_pwrdm;
> break;
> }
> --
> 1.7.1
Any comments ?
-Abhilash
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2] OMAP3: powerdomains: Match silicon revision to select the correct "core_pwrdm" definition
2011-08-12 7:41 ` Koyamangalath, Abhilash
@ 2011-09-15 0:27 ` Tony Lindgren
0 siblings, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2011-09-15 0:27 UTC (permalink / raw)
To: linux-arm-kernel
* Koyamangalath, Abhilash <abhilash.kv@ti.com> [110812 00:12]:
> Hi
>
> > @@ -58,6 +59,24 @@ static struct powerdomain *_pwrdm_lookup(const char *name)
> >
> > list_for_each_entry(temp_pwrdm, &pwrdm_list, node) {
> > if (!strcmp(name, temp_pwrdm->name)) {
> > + if (!strcmp(name, "core_pwrdm") && cpu_is_omap3630()) {
> > + if (omap_rev() > OMAP3630_REV_ES1_0) {
> > + /*
> > + * match omap_chip info for OMAP3630
> > + * Rev ES1.1, ES1.2 or higher
> > + */
> > + if (!(temp_pwrdm->omap_chip.oc
> > + & CHIP_GE_OMAP3630ES1_1))
> > + continue;
> > + } else {
> > + /* match omap_chip info for OMAP3630
> > + * Rev ES1.0
> > + */
> > + if (!(temp_pwrdm->omap_chip.oc
> > + & CHIP_IS_OMAP3630ES1))
> > + continue;
> > + }
> > + }
> > pwrdm = temp_pwrdm;
> > break;
> > }
>
> Any comments ?
Can you please check if this is still needed after Paul's
CHIP_IS removal patches? You can find them at:
git://git.pwsan.com/linux-2.6 omap_chip_remove_cleanup_3.2
Regards,
Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-09-15 0:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-15 11:44 [PATCH v2] OMAP3: powerdomains: Match silicon revision to select the correct "core_pwrdm" definition Abhilash K V
2011-08-12 7:41 ` Koyamangalath, Abhilash
2011-09-15 0:27 ` Tony Lindgren
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).