Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-10-12 Thread Keerthy



On Monday 12 October 2015 10:59 PM, Tony Lindgren wrote:

* Tony Lindgren  [151012 10:17]:

* Keerthy  [150901 17:24]:



On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:

* Keerthy  [150901 10:22]:



On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:

Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.


Tony,

A Gentle ping on this.


Looks good to me for v4.4. I'll apply it after some testing
after -rc1.


Thanks Tony.


Now with the fixes finally out of the way, applying into
omap-for-v4.4/cleanup.


Uhh actually not applying. This breaks builds quite a bit depending on
the .config options chosen:

arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]

Keerthy, can you please test this with just single SoC configurations
and run randconfig builds on this overnight.


I will do that Tony. I tested omap2plus_defconfig and boot tested on 
multiple platforms.




And then we obviously need to test to make sure that this does not
break booting on various platforms for multi SoC and single SoC
configurations.


Okay.



And then you can repost, please include what all was tested.


Sure.



Thanks,

Tony


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-10-12 Thread Tony Lindgren
* Tony Lindgren  [151012 10:17]:
> * Keerthy  [150901 17:24]:
> > 
> > 
> > On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:
> > >* Keerthy  [150901 10:22]:
> > >>
> > >>
> > >>On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:
> > >>>Currently apart from dra7, omap5 and amx3 all the other SoCs
> > >>>are identified using cpu_is_* functions which is not right since
> > >>>they are all SoCs(System on Chips). Hence changing the SoC
> > >>>identification code to use soc_is instead of cpu_is and keeping
> > >>>defines for cpu_is where needed. This allows us to replace the
> > >>>rest of cpu_is usage along with other fixes as needed.
> > >>
> > >>Tony,
> > >>
> > >>A Gentle ping on this.
> > >
> > >Looks good to me for v4.4. I'll apply it after some testing
> > >after -rc1.
> > 
> > Thanks Tony.
> 
> Now with the fixes finally out of the way, applying into
> omap-for-v4.4/cleanup.

Uhh actually not applying. This breaks builds quite a bit depending on
the .config options chosen:

arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]

Keerthy, can you please test this with just single SoC configurations
and run randconfig builds on this overnight.

And then we obviously need to test to make sure that this does not
break booting on various platforms for multi SoC and single SoC
configurations.

And then you can repost, please include what all was tested.

Thanks,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-10-12 Thread Tony Lindgren
* Keerthy  [150901 17:24]:
> 
> 
> On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:
> >* Keerthy  [150901 10:22]:
> >>
> >>
> >>On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:
> >>>Currently apart from dra7, omap5 and amx3 all the other SoCs
> >>>are identified using cpu_is_* functions which is not right since
> >>>they are all SoCs(System on Chips). Hence changing the SoC
> >>>identification code to use soc_is instead of cpu_is and keeping
> >>>defines for cpu_is where needed. This allows us to replace the
> >>>rest of cpu_is usage along with other fixes as needed.
> >>
> >>Tony,
> >>
> >>A Gentle ping on this.
> >
> >Looks good to me for v4.4. I'll apply it after some testing
> >after -rc1.
> 
> Thanks Tony.

Now with the fixes finally out of the way, applying into
omap-for-v4.4/cleanup.

Thanks,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-10-12 Thread Tony Lindgren
* Keerthy  [150901 17:24]:
> 
> 
> On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:
> >* Keerthy  [150901 10:22]:
> >>
> >>
> >>On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:
> >>>Currently apart from dra7, omap5 and amx3 all the other SoCs
> >>>are identified using cpu_is_* functions which is not right since
> >>>they are all SoCs(System on Chips). Hence changing the SoC
> >>>identification code to use soc_is instead of cpu_is and keeping
> >>>defines for cpu_is where needed. This allows us to replace the
> >>>rest of cpu_is usage along with other fixes as needed.
> >>
> >>Tony,
> >>
> >>A Gentle ping on this.
> >
> >Looks good to me for v4.4. I'll apply it after some testing
> >after -rc1.
> 
> Thanks Tony.

Now with the fixes finally out of the way, applying into
omap-for-v4.4/cleanup.

Thanks,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-10-12 Thread Tony Lindgren
* Tony Lindgren  [151012 10:17]:
> * Keerthy  [150901 17:24]:
> > 
> > 
> > On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:
> > >* Keerthy  [150901 10:22]:
> > >>
> > >>
> > >>On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:
> > >>>Currently apart from dra7, omap5 and amx3 all the other SoCs
> > >>>are identified using cpu_is_* functions which is not right since
> > >>>they are all SoCs(System on Chips). Hence changing the SoC
> > >>>identification code to use soc_is instead of cpu_is and keeping
> > >>>defines for cpu_is where needed. This allows us to replace the
> > >>>rest of cpu_is usage along with other fixes as needed.
> > >>
> > >>Tony,
> > >>
> > >>A Gentle ping on this.
> > >
> > >Looks good to me for v4.4. I'll apply it after some testing
> > >after -rc1.
> > 
> > Thanks Tony.
> 
> Now with the fixes finally out of the way, applying into
> omap-for-v4.4/cleanup.

Uhh actually not applying. This breaks builds quite a bit depending on
the .config options chosen:

arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]

Keerthy, can you please test this with just single SoC configurations
and run randconfig builds on this overnight.

And then we obviously need to test to make sure that this does not
break booting on various platforms for multi SoC and single SoC
configurations.

And then you can repost, please include what all was tested.

Thanks,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-10-12 Thread Keerthy



On Monday 12 October 2015 10:59 PM, Tony Lindgren wrote:

* Tony Lindgren  [151012 10:17]:

* Keerthy  [150901 17:24]:



On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:

* Keerthy  [150901 10:22]:



On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:

Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.


Tony,

A Gentle ping on this.


Looks good to me for v4.4. I'll apply it after some testing
after -rc1.


Thanks Tony.


Now with the fixes finally out of the way, applying into
omap-for-v4.4/cleanup.


Uhh actually not applying. This breaks builds quite a bit depending on
the .config options chosen:

arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:389:7: error: implicit declaration of function 
‘cpu_is_omap34xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:257:15: error: implicit declaration of function 
‘cpu_is_omap243x’ [-Werror=implicit-function-declaration]
arch/arm/mach-omap2/control.c:259:8: error: implicit declaration of function 
‘cpu_is_omap44xx’ [-Werror=implicit-function-declaration]
...
arch/arm/mach-omap2/io.c:767:6: error: implicit declaration of function 
‘cpu_is_omap24xx’ [-Werror=implicit-function-declaration]

Keerthy, can you please test this with just single SoC configurations
and run randconfig builds on this overnight.


I will do that Tony. I tested omap2plus_defconfig and boot tested on 
multiple platforms.




And then we obviously need to test to make sure that this does not
break booting on various platforms for multi SoC and single SoC
configurations.


Okay.



And then you can repost, please include what all was tested.


Sure.



Thanks,

Tony


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-09-01 Thread Keerthy



On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:

* Keerthy  [150901 10:22]:



On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:

Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.


Tony,

A Gentle ping on this.


Looks good to me for v4.4. I'll apply it after some testing
after -rc1.


Thanks Tony.



Regards,

Tony


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-09-01 Thread Tony Lindgren
* Keerthy  [150901 10:22]:
> 
> 
> On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:
> >Currently apart from dra7, omap5 and amx3 all the other SoCs
> >are identified using cpu_is_* functions which is not right since
> >they are all SoCs(System on Chips). Hence changing the SoC
> >identification code to use soc_is instead of cpu_is and keeping
> >defines for cpu_is where needed. This allows us to replace the
> >rest of cpu_is usage along with other fixes as needed.
> 
> Tony,
> 
> A Gentle ping on this.

Looks good to me for v4.4. I'll apply it after some testing
after -rc1.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-09-01 Thread Keerthy



On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:

Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.


Tony,

A Gentle ping on this.

Regards,
Keerthy



Acked-by: Russell King 
Signed-off-by: Keerthy 
---

Changes in v2:

   * Corrected a typo in the commit log.

  arch/arm/mach-omap2/id.c  |  30 +++
  arch/arm/mach-omap2/soc.h | 193 ++
  2 files changed, 123 insertions(+), 100 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index e3f713f..24f24d4 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -57,15 +57,15 @@ int omap_type(void)
if (val < OMAP2_DEVICETYPE_MASK)
return val;

-   if (cpu_is_omap24xx()) {
+   if (soc_is_omap24xx()) {
val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
-   } else if (cpu_is_ti81xx()) {
+   } else if (soc_is_ti81xx()) {
val = omap_ctrl_readl(TI81XX_CONTROL_STATUS);
} else if (soc_is_am33xx() || soc_is_am43xx()) {
val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
-   } else if (cpu_is_omap34xx()) {
+   } else if (soc_is_omap34xx()) {
val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
-   } else if (cpu_is_omap44xx()) {
+   } else if (soc_is_omap44xx()) {
val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
} else if (soc_is_omap54xx() || soc_is_dra7xx()) {
val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS);
@@ -122,7 +122,7 @@ static u16 tap_prod_id;

  void omap_get_die_id(struct omap_die_id *odi)
  {
-   if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
+   if (soc_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1);
odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2);
@@ -218,17 +218,17 @@ static void __init omap3_cpuinfo(void)
 * on available features. Upon detection, update the CPU id
 * and CPU class bits.
 */
-   if (cpu_is_omap3630()) {
+   if (soc_is_omap3630()) {
cpu_name = "OMAP3630";
} else if (soc_is_am35xx()) {
cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
-   } else if (cpu_is_ti816x()) {
+   } else if (soc_is_ti816x()) {
cpu_name = "TI816X";
} else if (soc_is_am335x()) {
cpu_name =  "AM335X";
} else if (soc_is_am437x()) {
cpu_name =  "AM437x";
-   } else if (cpu_is_ti814x()) {
+   } else if (soc_is_ti814x()) {
cpu_name = "TI814X";
} else if (omap3_has_iva() && omap3_has_sgx()) {
/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
@@ -275,11 +275,11 @@ void __init omap3xxx_check_features(void)
OMAP3_CHECK_FEATURE(status, SGX);
OMAP3_CHECK_FEATURE(status, NEON);
OMAP3_CHECK_FEATURE(status, ISP);
-   if (cpu_is_omap3630())
+   if (soc_is_omap3630())
omap_features |= OMAP3_HAS_192MHZ_CLK;
-   if (cpu_is_omap3430() || cpu_is_omap3630())
+   if (soc_is_omap3430() || soc_is_omap3630())
omap_features |= OMAP3_HAS_IO_WAKEUP;
-   if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
+   if (soc_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
omap_rev() == OMAP3430_REV_ES3_1_2)
omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;

@@ -697,7 +697,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem 
*tap)
tap_base = tap;

/* XXX What is this intended to do? */
-   if (cpu_is_omap34xx())
+   if (soc_is_omap34xx())
tap_prod_id = 0x0210;
else
tap_prod_id = 0x0208;
@@ -715,11 +715,11 @@ static const char * const omap_types[] = {

  static const char * __init omap_get_family(void)
  {
-   if (cpu_is_omap24xx())
+   if (soc_is_omap24xx())
return kasprintf(GFP_KERNEL, "OMAP2");
-   else if (cpu_is_omap34xx())
+   else if (soc_is_omap34xx())
return kasprintf(GFP_KERNEL, "OMAP3");
-   else if (cpu_is_omap44xx())
+   else if (soc_is_omap44xx())
return kasprintf(GFP_KERNEL, "OMAP4");
else if (soc_is_omap54xx())
return kasprintf(GFP_KERNEL, "OMAP5");
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index f97654d..bb824ae 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -148,13 +148,13 @@ static inline int soc_is_omap(void)
  /*
   * 

Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-09-01 Thread Tony Lindgren
* Keerthy  [150901 10:22]:
> 
> 
> On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:
> >Currently apart from dra7, omap5 and amx3 all the other SoCs
> >are identified using cpu_is_* functions which is not right since
> >they are all SoCs(System on Chips). Hence changing the SoC
> >identification code to use soc_is instead of cpu_is and keeping
> >defines for cpu_is where needed. This allows us to replace the
> >rest of cpu_is usage along with other fixes as needed.
> 
> Tony,
> 
> A Gentle ping on this.

Looks good to me for v4.4. I'll apply it after some testing
after -rc1.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-09-01 Thread Keerthy



On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:

Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.


Tony,

A Gentle ping on this.

Regards,
Keerthy



Acked-by: Russell King 
Signed-off-by: Keerthy 
---

Changes in v2:

   * Corrected a typo in the commit log.

  arch/arm/mach-omap2/id.c  |  30 +++
  arch/arm/mach-omap2/soc.h | 193 ++
  2 files changed, 123 insertions(+), 100 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index e3f713f..24f24d4 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -57,15 +57,15 @@ int omap_type(void)
if (val < OMAP2_DEVICETYPE_MASK)
return val;

-   if (cpu_is_omap24xx()) {
+   if (soc_is_omap24xx()) {
val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
-   } else if (cpu_is_ti81xx()) {
+   } else if (soc_is_ti81xx()) {
val = omap_ctrl_readl(TI81XX_CONTROL_STATUS);
} else if (soc_is_am33xx() || soc_is_am43xx()) {
val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
-   } else if (cpu_is_omap34xx()) {
+   } else if (soc_is_omap34xx()) {
val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
-   } else if (cpu_is_omap44xx()) {
+   } else if (soc_is_omap44xx()) {
val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
} else if (soc_is_omap54xx() || soc_is_dra7xx()) {
val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS);
@@ -122,7 +122,7 @@ static u16 tap_prod_id;

  void omap_get_die_id(struct omap_die_id *odi)
  {
-   if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
+   if (soc_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1);
odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2);
@@ -218,17 +218,17 @@ static void __init omap3_cpuinfo(void)
 * on available features. Upon detection, update the CPU id
 * and CPU class bits.
 */
-   if (cpu_is_omap3630()) {
+   if (soc_is_omap3630()) {
cpu_name = "OMAP3630";
} else if (soc_is_am35xx()) {
cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
-   } else if (cpu_is_ti816x()) {
+   } else if (soc_is_ti816x()) {
cpu_name = "TI816X";
} else if (soc_is_am335x()) {
cpu_name =  "AM335X";
} else if (soc_is_am437x()) {
cpu_name =  "AM437x";
-   } else if (cpu_is_ti814x()) {
+   } else if (soc_is_ti814x()) {
cpu_name = "TI814X";
} else if (omap3_has_iva() && omap3_has_sgx()) {
/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
@@ -275,11 +275,11 @@ void __init omap3xxx_check_features(void)
OMAP3_CHECK_FEATURE(status, SGX);
OMAP3_CHECK_FEATURE(status, NEON);
OMAP3_CHECK_FEATURE(status, ISP);
-   if (cpu_is_omap3630())
+   if (soc_is_omap3630())
omap_features |= OMAP3_HAS_192MHZ_CLK;
-   if (cpu_is_omap3430() || cpu_is_omap3630())
+   if (soc_is_omap3430() || soc_is_omap3630())
omap_features |= OMAP3_HAS_IO_WAKEUP;
-   if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
+   if (soc_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
omap_rev() == OMAP3430_REV_ES3_1_2)
omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;

@@ -697,7 +697,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem 
*tap)
tap_base = tap;

/* XXX What is this intended to do? */
-   if (cpu_is_omap34xx())
+   if (soc_is_omap34xx())
tap_prod_id = 0x0210;
else
tap_prod_id = 0x0208;
@@ -715,11 +715,11 @@ static const char * const omap_types[] = {

  static const char * __init omap_get_family(void)
  {
-   if (cpu_is_omap24xx())
+   if (soc_is_omap24xx())
return kasprintf(GFP_KERNEL, "OMAP2");
-   else if (cpu_is_omap34xx())
+   else if (soc_is_omap34xx())
return kasprintf(GFP_KERNEL, "OMAP3");
-   else if (cpu_is_omap44xx())
+   else if (soc_is_omap44xx())
return kasprintf(GFP_KERNEL, "OMAP4");
else if (soc_is_omap54xx())
return kasprintf(GFP_KERNEL, "OMAP5");
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index f97654d..bb824ae 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -148,13 +148,13 @@ 

Re: [PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-09-01 Thread Keerthy



On Tuesday 01 September 2015 11:33 PM, Tony Lindgren wrote:

* Keerthy  [150901 10:22]:



On Wednesday 26 August 2015 09:29 AM, Keerthy wrote:

Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.


Tony,

A Gentle ping on this.


Looks good to me for v4.4. I'll apply it after some testing
after -rc1.


Thanks Tony.



Regards,

Tony


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-08-25 Thread Keerthy
Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.

Acked-by: Russell King  
Signed-off-by: Keerthy 
---

Changes in v2:

  * Corrected a typo in the commit log.

 arch/arm/mach-omap2/id.c  |  30 +++
 arch/arm/mach-omap2/soc.h | 193 ++
 2 files changed, 123 insertions(+), 100 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index e3f713f..24f24d4 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -57,15 +57,15 @@ int omap_type(void)
if (val < OMAP2_DEVICETYPE_MASK)
return val;
 
-   if (cpu_is_omap24xx()) {
+   if (soc_is_omap24xx()) {
val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
-   } else if (cpu_is_ti81xx()) {
+   } else if (soc_is_ti81xx()) {
val = omap_ctrl_readl(TI81XX_CONTROL_STATUS);
} else if (soc_is_am33xx() || soc_is_am43xx()) {
val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
-   } else if (cpu_is_omap34xx()) {
+   } else if (soc_is_omap34xx()) {
val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
-   } else if (cpu_is_omap44xx()) {
+   } else if (soc_is_omap44xx()) {
val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
} else if (soc_is_omap54xx() || soc_is_dra7xx()) {
val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS);
@@ -122,7 +122,7 @@ static u16 tap_prod_id;
 
 void omap_get_die_id(struct omap_die_id *odi)
 {
-   if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
+   if (soc_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
odi->id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
odi->id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1);
odi->id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2);
@@ -218,17 +218,17 @@ static void __init omap3_cpuinfo(void)
 * on available features. Upon detection, update the CPU id
 * and CPU class bits.
 */
-   if (cpu_is_omap3630()) {
+   if (soc_is_omap3630()) {
cpu_name = "OMAP3630";
} else if (soc_is_am35xx()) {
cpu_name = (omap3_has_sgx()) ? "AM3517" : "AM3505";
-   } else if (cpu_is_ti816x()) {
+   } else if (soc_is_ti816x()) {
cpu_name = "TI816X";
} else if (soc_is_am335x()) {
cpu_name =  "AM335X";
} else if (soc_is_am437x()) {
cpu_name =  "AM437x";
-   } else if (cpu_is_ti814x()) {
+   } else if (soc_is_ti814x()) {
cpu_name = "TI814X";
} else if (omap3_has_iva() && omap3_has_sgx()) {
/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
@@ -275,11 +275,11 @@ void __init omap3xxx_check_features(void)
OMAP3_CHECK_FEATURE(status, SGX);
OMAP3_CHECK_FEATURE(status, NEON);
OMAP3_CHECK_FEATURE(status, ISP);
-   if (cpu_is_omap3630())
+   if (soc_is_omap3630())
omap_features |= OMAP3_HAS_192MHZ_CLK;
-   if (cpu_is_omap3430() || cpu_is_omap3630())
+   if (soc_is_omap3430() || soc_is_omap3630())
omap_features |= OMAP3_HAS_IO_WAKEUP;
-   if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
+   if (soc_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
omap_rev() == OMAP3430_REV_ES3_1_2)
omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;
 
@@ -697,7 +697,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem 
*tap)
tap_base = tap;
 
/* XXX What is this intended to do? */
-   if (cpu_is_omap34xx())
+   if (soc_is_omap34xx())
tap_prod_id = 0x0210;
else
tap_prod_id = 0x0208;
@@ -715,11 +715,11 @@ static const char * const omap_types[] = {
 
 static const char * __init omap_get_family(void)
 {
-   if (cpu_is_omap24xx())
+   if (soc_is_omap24xx())
return kasprintf(GFP_KERNEL, "OMAP2");
-   else if (cpu_is_omap34xx())
+   else if (soc_is_omap34xx())
return kasprintf(GFP_KERNEL, "OMAP3");
-   else if (cpu_is_omap44xx())
+   else if (soc_is_omap44xx())
return kasprintf(GFP_KERNEL, "OMAP4");
else if (soc_is_omap54xx())
return kasprintf(GFP_KERNEL, "OMAP5");
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index f97654d..bb824ae 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -148,13 +148,13 @@ static inline int soc_is_omap(void)
 /*
  * Macros to group OMAP into cpu classes.
  * These can be used in most places.
- * cpu_is_omap24xx():  True for 

[PATCH v2] ARM: OMAP: Change all cpu_is_* occurences to soc_is_*

2015-08-25 Thread Keerthy
Currently apart from dra7, omap5 and amx3 all the other SoCs
are identified using cpu_is_* functions which is not right since
they are all SoCs(System on Chips). Hence changing the SoC
identification code to use soc_is instead of cpu_is and keeping
defines for cpu_is where needed. This allows us to replace the
rest of cpu_is usage along with other fixes as needed.

Acked-by: Russell King rmk+ker...@arm.linux.org.uk 
Signed-off-by: Keerthy j-keer...@ti.com
---

Changes in v2:

  * Corrected a typo in the commit log.

 arch/arm/mach-omap2/id.c  |  30 +++
 arch/arm/mach-omap2/soc.h | 193 ++
 2 files changed, 123 insertions(+), 100 deletions(-)

diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index e3f713f..24f24d4 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -57,15 +57,15 @@ int omap_type(void)
if (val  OMAP2_DEVICETYPE_MASK)
return val;
 
-   if (cpu_is_omap24xx()) {
+   if (soc_is_omap24xx()) {
val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
-   } else if (cpu_is_ti81xx()) {
+   } else if (soc_is_ti81xx()) {
val = omap_ctrl_readl(TI81XX_CONTROL_STATUS);
} else if (soc_is_am33xx() || soc_is_am43xx()) {
val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
-   } else if (cpu_is_omap34xx()) {
+   } else if (soc_is_omap34xx()) {
val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
-   } else if (cpu_is_omap44xx()) {
+   } else if (soc_is_omap44xx()) {
val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS);
} else if (soc_is_omap54xx() || soc_is_dra7xx()) {
val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS);
@@ -122,7 +122,7 @@ static u16 tap_prod_id;
 
 void omap_get_die_id(struct omap_die_id *odi)
 {
-   if (cpu_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
+   if (soc_is_omap44xx() || soc_is_omap54xx() || soc_is_dra7xx()) {
odi-id_0 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_0);
odi-id_1 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_1);
odi-id_2 = read_tap_reg(OMAP_TAP_DIE_ID_44XX_2);
@@ -218,17 +218,17 @@ static void __init omap3_cpuinfo(void)
 * on available features. Upon detection, update the CPU id
 * and CPU class bits.
 */
-   if (cpu_is_omap3630()) {
+   if (soc_is_omap3630()) {
cpu_name = OMAP3630;
} else if (soc_is_am35xx()) {
cpu_name = (omap3_has_sgx()) ? AM3517 : AM3505;
-   } else if (cpu_is_ti816x()) {
+   } else if (soc_is_ti816x()) {
cpu_name = TI816X;
} else if (soc_is_am335x()) {
cpu_name =  AM335X;
} else if (soc_is_am437x()) {
cpu_name =  AM437x;
-   } else if (cpu_is_ti814x()) {
+   } else if (soc_is_ti814x()) {
cpu_name = TI814X;
} else if (omap3_has_iva()  omap3_has_sgx()) {
/* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */
@@ -275,11 +275,11 @@ void __init omap3xxx_check_features(void)
OMAP3_CHECK_FEATURE(status, SGX);
OMAP3_CHECK_FEATURE(status, NEON);
OMAP3_CHECK_FEATURE(status, ISP);
-   if (cpu_is_omap3630())
+   if (soc_is_omap3630())
omap_features |= OMAP3_HAS_192MHZ_CLK;
-   if (cpu_is_omap3430() || cpu_is_omap3630())
+   if (soc_is_omap3430() || soc_is_omap3630())
omap_features |= OMAP3_HAS_IO_WAKEUP;
-   if (cpu_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
+   if (soc_is_omap3630() || omap_rev() == OMAP3430_REV_ES3_1 ||
omap_rev() == OMAP3430_REV_ES3_1_2)
omap_features |= OMAP3_HAS_IO_CHAIN_CTRL;
 
@@ -697,7 +697,7 @@ void __init omap2_set_globals_tap(u32 class, void __iomem 
*tap)
tap_base = tap;
 
/* XXX What is this intended to do? */
-   if (cpu_is_omap34xx())
+   if (soc_is_omap34xx())
tap_prod_id = 0x0210;
else
tap_prod_id = 0x0208;
@@ -715,11 +715,11 @@ static const char * const omap_types[] = {
 
 static const char * __init omap_get_family(void)
 {
-   if (cpu_is_omap24xx())
+   if (soc_is_omap24xx())
return kasprintf(GFP_KERNEL, OMAP2);
-   else if (cpu_is_omap34xx())
+   else if (soc_is_omap34xx())
return kasprintf(GFP_KERNEL, OMAP3);
-   else if (cpu_is_omap44xx())
+   else if (soc_is_omap44xx())
return kasprintf(GFP_KERNEL, OMAP4);
else if (soc_is_omap54xx())
return kasprintf(GFP_KERNEL, OMAP5);
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index f97654d..bb824ae 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -148,13 +148,13 @@ static inline int soc_is_omap(void)
 /*
  * Macros to group OMAP into cpu classes.
  * These can be used in most places.
- * cpu_is_omap24xx():