linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
@ 2014-07-16  8:36 Lokesh Vutla
  2014-07-16  8:36 ` [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients Lokesh Vutla
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Lokesh Vutla @ 2014-07-16  8:36 UTC (permalink / raw)
  To: linux-arm-kernel

This series add seperate ocp interface lists that are specific to dra74x
and dra72x, and moving USB OTG SS4 to dra74x only since its not present
in dra72x. Without this USB OTG SS4 hwmod gives an abort on dra72x.

Adding support for soc_is_dra74x() and soc_is_dra72x() in order to differentiate
between dra74x and dra72x and pass the respective ocp interface lists.

Verified on dra74x evm and dra72x evm using 3.16-rc5 based mainline kernel.

Before:
dra74x : http://paste.ubuntu.com/7802364/ 
dra72x : http://paste.ubuntu.com/7802334/ (Kernel panic)

After-
dra74x : http://paste.ubuntu.com/7802340/
dra72x : http://paste.ubuntu.com/7802338/ (booted)

Rajendra Nayak (2):
  ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x()
    varients
  ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists

 arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
 arch/arm/mach-omap2/soc.h                 |    7 +++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients
  2014-07-16  8:36 [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
@ 2014-07-16  8:36 ` Lokesh Vutla
  2014-07-22 16:46   ` Nishanth Menon
  2014-07-23 22:46   ` Suman Anna
  2014-07-16  8:36 ` [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
  2014-07-22 16:45 ` [PATCH 0/2] " Nishanth Menon
  2 siblings, 2 replies; 12+ messages in thread
From: Lokesh Vutla @ 2014-07-16  8:36 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rajendra Nayak <rnayak@ti.com>

Use the corresponding compatibles to identify the devices.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/soc.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 01ca808..5e1be94 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -245,6 +245,8 @@ IS_AM_SUBCLASS(437x, 0x437)
 #define soc_is_omap54xx()		0
 #define soc_is_omap543x()		0
 #define soc_is_dra7xx()			0
+#define soc_is_dra74x()			0
+#define soc_is_dra72x()			0
 
 #if defined(MULTI_OMAP2)
 # if defined(CONFIG_ARCH_OMAP2)
@@ -393,7 +395,12 @@ IS_OMAP_TYPE(3430, 0x3430)
 
 #if defined(CONFIG_SOC_DRA7XX)
 #undef soc_is_dra7xx
+#undef soc_is_dra74x
+#undef soc_is_dra72x
 #define soc_is_dra7xx()	(of_machine_is_compatible("ti,dra7"))
+#define soc_is_dra74x()	(of_machine_is_compatible("ti,dra74"))
+#define soc_is_dra72x()	(of_machine_is_compatible("ti,dra72"))
+
 #endif
 
 /* Various silicon revisions for omap2 */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-16  8:36 [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
  2014-07-16  8:36 ` [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients Lokesh Vutla
@ 2014-07-16  8:36 ` Lokesh Vutla
  2014-07-22 16:50   ` Nishanth Menon
  2014-07-22 16:45 ` [PATCH 0/2] " Nishanth Menon
  2 siblings, 1 reply; 12+ messages in thread
From: Lokesh Vutla @ 2014-07-16  8:36 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rajendra Nayak <rnayak@ti.com>

To deal with IPs which are specific to dra74x and dra72x, maintain seperate
ocp interface lists, while keeping the common list for all common IPs.

Move USB OTG SS4 to dra74x only list since its unavailable in
dra72x and is giving an abort during boot. The dra72x only list
is empty for now and a placeholder for future hwmod additions which
are specific to dra72x.

Fixes: d904b38 ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss
Reported-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 6c074f3..14f8370 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -3345,6 +3345,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
 	if (!ois)
 		return 0;
 
+	if (ois[0] == NULL) /*empty list*/
+		return 0;
+
 	if (!linkspace) {
 		if (_alloc_linkspace(ois)) {
 			pr_err("omap_hwmod: could not allocate link space\n");
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 284324f..c95033c 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -35,6 +35,7 @@
 #include "i2c.h"
 #include "mmc.h"
 #include "wd_timer.h"
+#include "soc.h"
 
 /* Base offset for all DRA7XX interrupts external to MPUSS */
 #define DRA7XX_IRQ_GIC_START	32
@@ -2705,7 +2706,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
 	&dra7xx_l4_per3__usb_otg_ss1,
 	&dra7xx_l4_per3__usb_otg_ss2,
 	&dra7xx_l4_per3__usb_otg_ss3,
-	&dra7xx_l4_per3__usb_otg_ss4,
 	&dra7xx_l3_main_1__vcp1,
 	&dra7xx_l4_per2__vcp1,
 	&dra7xx_l3_main_1__vcp2,
@@ -2714,8 +2714,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
 	NULL,
 };
 
+static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
+	&dra7xx_l4_per3__usb_otg_ss4,
+	NULL,
+};
+
+static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
+	NULL,
+};
+
 int __init dra7xx_hwmod_init(void)
 {
+	int ret;
+
 	omap_hwmod_init();
-	return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
+	ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
+
+	if (!ret && soc_is_dra74x())
+		return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
+	else if (!ret && soc_is_dra72x())
+		return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
+
+	return ret;
 }
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-16  8:36 [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
  2014-07-16  8:36 ` [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients Lokesh Vutla
  2014-07-16  8:36 ` [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
@ 2014-07-22 16:45 ` Nishanth Menon
  2014-07-23  4:06   ` Lokesh Vutla
  2 siblings, 1 reply; 12+ messages in thread
From: Nishanth Menon @ 2014-07-22 16:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/16/2014 03:36 AM, Lokesh Vutla wrote:
> This series add seperate ocp interface lists that are specific to dra74x
> and dra72x, and moving USB OTG SS4 to dra74x only since its not present
> in dra72x. Without this USB OTG SS4 hwmod gives an abort on dra72x.
> 
> Adding support for soc_is_dra74x() and soc_is_dra72x() in order to differentiate
> between dra74x and dra72x and pass the respective ocp interface lists.
> 
> Verified on dra74x evm and dra72x evm using 3.16-rc5 based mainline kernel.
> 
> Before:
> dra74x : http://paste.ubuntu.com/7802364/ 
> dra72x : http://paste.ubuntu.com/7802334/ (Kernel panic)
> 
> After-
> dra74x : http://paste.ubuntu.com/7802340/
> dra72x : http://paste.ubuntu.com/7802338/ (booted)
> 
> Rajendra Nayak (2):
>   ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x()
>     varients
>   ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
> 
>  arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
>  arch/arm/mach-omap2/soc.h                 |    7 +++++++
>  3 files changed, 30 insertions(+), 2 deletions(-)
> 
Tested-by: Nishanth Menon <nm@ti.com>

BUT, I suggest a follow up series to do exactly the same (moving stuff
that are not common from dra7.dtsi to dra72x.dtsi and 74x.dtsi) as
well to ensure that dts indicates exactly the same information (only
the applicable IPs are present in dts).

-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients
  2014-07-16  8:36 ` [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients Lokesh Vutla
@ 2014-07-22 16:46   ` Nishanth Menon
  2014-07-23 22:46   ` Suman Anna
  1 sibling, 0 replies; 12+ messages in thread
From: Nishanth Menon @ 2014-07-22 16:46 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/16/2014 03:36 AM, Lokesh Vutla wrote:
> From: Rajendra Nayak <rnayak@ti.com>
> 
> Use the corresponding compatibles to identify the devices.
> 
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  arch/arm/mach-omap2/soc.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
> index 01ca808..5e1be94 100644
> --- a/arch/arm/mach-omap2/soc.h
> +++ b/arch/arm/mach-omap2/soc.h
> @@ -245,6 +245,8 @@ IS_AM_SUBCLASS(437x, 0x437)
>  #define soc_is_omap54xx()		0
>  #define soc_is_omap543x()		0
>  #define soc_is_dra7xx()			0
> +#define soc_is_dra74x()			0
> +#define soc_is_dra72x()			0
>  
>  #if defined(MULTI_OMAP2)
>  # if defined(CONFIG_ARCH_OMAP2)
> @@ -393,7 +395,12 @@ IS_OMAP_TYPE(3430, 0x3430)
>  
>  #if defined(CONFIG_SOC_DRA7XX)
>  #undef soc_is_dra7xx
> +#undef soc_is_dra74x
> +#undef soc_is_dra72x
>  #define soc_is_dra7xx()	(of_machine_is_compatible("ti,dra7"))
> +#define soc_is_dra74x()	(of_machine_is_compatible("ti,dra74"))
> +#define soc_is_dra72x()	(of_machine_is_compatible("ti,dra72"))
> +
>  #endif
>  
>  /* Various silicon revisions for omap2 */
> 

Acked-by: Nishanth Menon <nm@ti.com>

-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-16  8:36 ` [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
@ 2014-07-22 16:50   ` Nishanth Menon
  2014-07-23  3:57     ` Lokesh Vutla
  2014-07-25 15:24     ` Lokesh Vutla
  0 siblings, 2 replies; 12+ messages in thread
From: Nishanth Menon @ 2014-07-22 16:50 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/16/2014 03:36 AM, Lokesh Vutla wrote:
> From: Rajendra Nayak <rnayak@ti.com>
> 
> To deal with IPs which are specific to dra74x and dra72x, maintain seperate
> ocp interface lists, while keeping the common list for all common IPs.
> 
> Move USB OTG SS4 to dra74x only list since its unavailable in
> dra72x and is giving an abort during boot. The dra72x only list
> is empty for now and a placeholder for future hwmod additions which
> are specific to dra72x.
> 
> Fixes: d904b38 ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss

please use a format as following:
Fixes: d904b38df0db13 ("ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss")

> Reported-by: Keerthy <j-keerthy@ti.com>
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
>  2 files changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 6c074f3..14f8370 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -3345,6 +3345,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
>  	if (!ois)
>  		return 0;
>  
> +	if (ois[0] == NULL) /*empty list*/
/* Empty list */ ?
> +		return 0;
> +

This change looks like a different patch?

>  	if (!linkspace) {
>  		if (_alloc_linkspace(ois)) {
>  			pr_err("omap_hwmod: could not allocate link space\n");
> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> index 284324f..c95033c 100644
> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
> @@ -35,6 +35,7 @@
>  #include "i2c.h"
>  #include "mmc.h"
>  #include "wd_timer.h"
> +#include "soc.h"
>  
>  /* Base offset for all DRA7XX interrupts external to MPUSS */
>  #define DRA7XX_IRQ_GIC_START	32
> @@ -2705,7 +2706,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
>  	&dra7xx_l4_per3__usb_otg_ss1,
>  	&dra7xx_l4_per3__usb_otg_ss2,
>  	&dra7xx_l4_per3__usb_otg_ss3,
> -	&dra7xx_l4_per3__usb_otg_ss4,
>  	&dra7xx_l3_main_1__vcp1,
>  	&dra7xx_l4_per2__vcp1,
>  	&dra7xx_l3_main_1__vcp2,
> @@ -2714,8 +2714,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
>  	NULL,
>  };
>  
> +static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
> +	&dra7xx_l4_per3__usb_otg_ss4,
> +	NULL,
> +};
> +
> +static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
> +	NULL,
> +};
> +
>  int __init dra7xx_hwmod_init(void)
>  {
> +	int ret;
> +
>  	omap_hwmod_init();
> -	return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
> +	ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
if (ret)
	goto out;
> +
> +	if (!ret && soc_is_dra74x())
no need of !ret
> +		return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
> +	else if (!ret && soc_is_dra72x())
no need of else and !ret
> +		return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
> +

out:
> +	return ret;
>  }
> 


-- 
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-22 16:50   ` Nishanth Menon
@ 2014-07-23  3:57     ` Lokesh Vutla
  2014-07-25 15:24     ` Lokesh Vutla
  1 sibling, 0 replies; 12+ messages in thread
From: Lokesh Vutla @ 2014-07-23  3:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nishanth,
On Tuesday 22 July 2014 10:20 PM, Nishanth Menon wrote:
> On 07/16/2014 03:36 AM, Lokesh Vutla wrote:
>> From: Rajendra Nayak <rnayak@ti.com>
>>
>> To deal with IPs which are specific to dra74x and dra72x, maintain seperate
>> ocp interface lists, while keeping the common list for all common IPs.
>>
>> Move USB OTG SS4 to dra74x only list since its unavailable in
>> dra72x and is giving an abort during boot. The dra72x only list
>> is empty for now and a placeholder for future hwmod additions which
>> are specific to dra72x.
>>
>> Fixes: d904b38 ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss
> 
> please use a format as following:
> Fixes: d904b38df0db13 ("ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss")
> 
>> Reported-by: Keerthy <j-keerthy@ti.com>
>> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>  arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
>>  2 files changed, 23 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
>> index 6c074f3..14f8370 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>> @@ -3345,6 +3345,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
>>  	if (!ois)
>>  		return 0;
>>  
>> +	if (ois[0] == NULL) /*empty list*/
> /* Empty list */ ?
>> +		return 0;
>> +
> 
> This change looks like a different patch?
Since we are introducing empty lists in this patch, I guess
this can go in the same patch.
> 
>>  	if (!linkspace) {
>>  		if (_alloc_linkspace(ois)) {
>>  			pr_err("omap_hwmod: could not allocate link space\n");
>> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
>> index 284324f..c95033c 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
>> @@ -35,6 +35,7 @@
>>  #include "i2c.h"
>>  #include "mmc.h"
>>  #include "wd_timer.h"
>> +#include "soc.h"
>>  
>>  /* Base offset for all DRA7XX interrupts external to MPUSS */
>>  #define DRA7XX_IRQ_GIC_START	32
>> @@ -2705,7 +2706,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
>>  	&dra7xx_l4_per3__usb_otg_ss1,
>>  	&dra7xx_l4_per3__usb_otg_ss2,
>>  	&dra7xx_l4_per3__usb_otg_ss3,
>> -	&dra7xx_l4_per3__usb_otg_ss4,
>>  	&dra7xx_l3_main_1__vcp1,
>>  	&dra7xx_l4_per2__vcp1,
>>  	&dra7xx_l3_main_1__vcp2,
>> @@ -2714,8 +2714,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
>>  	NULL,
>>  };
>>  
>> +static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
>> +	&dra7xx_l4_per3__usb_otg_ss4,
>> +	NULL,
>> +};
>> +
>> +static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
>> +	NULL,
>> +};
>> +
>>  int __init dra7xx_hwmod_init(void)
>>  {
>> +	int ret;
>> +
>>  	omap_hwmod_init();
>> -	return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
>> +	ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
> if (ret)
> 	goto out;
>> +
>> +	if (!ret && soc_is_dra74x())
> no need of !ret
>> +		return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
> ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
>> +	else if (!ret && soc_is_dra72x())
> no need of else and !ret
>> +		return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
> ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
>> +
> 
> out:
Ok. Will do this and repost.

Thanks and regards,
Lokesh
>> +	return ret;
>>  }
>>
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-22 16:45 ` [PATCH 0/2] " Nishanth Menon
@ 2014-07-23  4:06   ` Lokesh Vutla
  2014-07-23 22:43     ` Suman Anna
  0 siblings, 1 reply; 12+ messages in thread
From: Lokesh Vutla @ 2014-07-23  4:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nishanth,
On Tuesday 22 July 2014 10:15 PM, Nishanth Menon wrote:
> On 07/16/2014 03:36 AM, Lokesh Vutla wrote:
>> This series add seperate ocp interface lists that are specific to dra74x
>> and dra72x, and moving USB OTG SS4 to dra74x only since its not present
>> in dra72x. Without this USB OTG SS4 hwmod gives an abort on dra72x.
>>
>> Adding support for soc_is_dra74x() and soc_is_dra72x() in order to differentiate
>> between dra74x and dra72x and pass the respective ocp interface lists.
>>
>> Verified on dra74x evm and dra72x evm using 3.16-rc5 based mainline kernel.
>>
>> Before:
>> dra74x : http://paste.ubuntu.com/7802364/ 
>> dra72x : http://paste.ubuntu.com/7802334/ (Kernel panic)
>>
>> After-
>> dra74x : http://paste.ubuntu.com/7802340/
>> dra72x : http://paste.ubuntu.com/7802338/ (booted)
>>
>> Rajendra Nayak (2):
>>   ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x()
>>     varients
>>   ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
>>
>>  arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
>>  arch/arm/mach-omap2/soc.h                 |    7 +++++++
>>  3 files changed, 30 insertions(+), 2 deletions(-)
>>
> Tested-by: Nishanth Menon <nm@ti.com>
Thanks..
> 
> BUT, I suggest a follow up series to do exactly the same (moving stuff
> that are not common from dra7.dtsi to dra72x.dtsi and 74x.dtsi) as
> well to ensure that dts indicates exactly the same information (only
> the applicable IPs are present in dts).
The separation of dra72x.dtsi and dra74x.dtsi is already happened and the patch is
already present in mainline[1].
Looks like usb_otg_ss4 is still present in dra7.dtsi, but this should go into dra74x.dtsi.
I ll take it up.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=38b248db60e32734417534b57f9ab687c445113a

Thanks and regards,
Lokesh

> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-23  4:06   ` Lokesh Vutla
@ 2014-07-23 22:43     ` Suman Anna
  0 siblings, 0 replies; 12+ messages in thread
From: Suman Anna @ 2014-07-23 22:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Lokesh,

On 07/22/2014 11:06 PM, Vutla, Lokesh wrote:
> Hi Nishanth,
> On Tuesday 22 July 2014 10:15 PM, Nishanth Menon wrote:
>> On 07/16/2014 03:36 AM, Lokesh Vutla wrote:
>>> This series add seperate ocp interface lists that are specific to dra74x
>>> and dra72x, and moving USB OTG SS4 to dra74x only since its not present
>>> in dra72x. Without this USB OTG SS4 hwmod gives an abort on dra72x.
>>>
>>> Adding support for soc_is_dra74x() and soc_is_dra72x() in order to differentiate
>>> between dra74x and dra72x and pass the respective ocp interface lists.
>>>
>>> Verified on dra74x evm and dra72x evm using 3.16-rc5 based mainline kernel.

Thanks for the series. I also need this for the differences in DSPs
present on both SoCs.

>>>
>>> Before:
>>> dra74x : http://paste.ubuntu.com/7802364/ 
>>> dra72x : http://paste.ubuntu.com/7802334/ (Kernel panic)
>>>
>>> After-
>>> dra74x : http://paste.ubuntu.com/7802340/
>>> dra72x : http://paste.ubuntu.com/7802338/ (booted)
>>>
>>> Rajendra Nayak (2):
>>>   ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x()
>>>     varients
>>>   ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
>>>
>>>  arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
>>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
>>>  arch/arm/mach-omap2/soc.h                 |    7 +++++++
>>>  3 files changed, 30 insertions(+), 2 deletions(-)
>>>
>> Tested-by: Nishanth Menon <nm@ti.com>
> Thanks..
>>
>> BUT, I suggest a follow up series to do exactly the same (moving stuff
>> that are not common from dra7.dtsi to dra72x.dtsi and 74x.dtsi) as
>> well to ensure that dts indicates exactly the same information (only
>> the applicable IPs are present in dts).

We also need a similar split for clockdomains, and possibly powerdomains
(I haven't compared all of them myself).

regards
Suman

> The separation of dra72x.dtsi and dra74x.dtsi is already happened and the patch is
> already present in mainline[1].
> Looks like usb_otg_ss4 is still present in dra7.dtsi, but this should go into dra74x.dtsi.
> I ll take it up.
> 
> [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=38b248db60e32734417534b57f9ab687c445113a
> 
> Thanks and regards,
> Lokesh
> 
>>
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients
  2014-07-16  8:36 ` [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients Lokesh Vutla
  2014-07-22 16:46   ` Nishanth Menon
@ 2014-07-23 22:46   ` Suman Anna
  1 sibling, 0 replies; 12+ messages in thread
From: Suman Anna @ 2014-07-23 22:46 UTC (permalink / raw)
  To: linux-arm-kernel

On 07/16/2014 03:36 AM, Vutla, Lokesh wrote:
> From: Rajendra Nayak <rnayak@ti.com>
> 
> Use the corresponding compatibles to identify the devices.
> 
> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>  arch/arm/mach-omap2/soc.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
> index 01ca808..5e1be94 100644
> --- a/arch/arm/mach-omap2/soc.h
> +++ b/arch/arm/mach-omap2/soc.h
> @@ -245,6 +245,8 @@ IS_AM_SUBCLASS(437x, 0x437)
>  #define soc_is_omap54xx()		0
>  #define soc_is_omap543x()		0
>  #define soc_is_dra7xx()			0
> +#define soc_is_dra74x()			0
> +#define soc_is_dra72x()			0
>  
>  #if defined(MULTI_OMAP2)
>  # if defined(CONFIG_ARCH_OMAP2)
> @@ -393,7 +395,12 @@ IS_OMAP_TYPE(3430, 0x3430)
>  
>  #if defined(CONFIG_SOC_DRA7XX)
>  #undef soc_is_dra7xx
> +#undef soc_is_dra74x
> +#undef soc_is_dra72x
>  #define soc_is_dra7xx()	(of_machine_is_compatible("ti,dra7"))
> +#define soc_is_dra74x()	(of_machine_is_compatible("ti,dra74"))
> +#define soc_is_dra72x()	(of_machine_is_compatible("ti,dra72"))
> +
nit, can you remove this extra blank line when you repost.

regards
Suman
>  #endif
>  
>  /* Various silicon revisions for omap2 */
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-22 16:50   ` Nishanth Menon
  2014-07-23  3:57     ` Lokesh Vutla
@ 2014-07-25 15:24     ` Lokesh Vutla
  2014-07-25 15:44       ` Nishanth Menon
  1 sibling, 1 reply; 12+ messages in thread
From: Lokesh Vutla @ 2014-07-25 15:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nishanth,
On Tuesday 22 July 2014 10:20 PM, Nishanth Menon wrote:
> On 07/16/2014 03:36 AM, Lokesh Vutla wrote:
>> From: Rajendra Nayak <rnayak@ti.com>
>>
>> To deal with IPs which are specific to dra74x and dra72x, maintain seperate
>> ocp interface lists, while keeping the common list for all common IPs.
>>
>> Move USB OTG SS4 to dra74x only list since its unavailable in
>> dra72x and is giving an abort during boot. The dra72x only list
>> is empty for now and a placeholder for future hwmod additions which
>> are specific to dra72x.
>>
>> Fixes: d904b38 ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss
> 
> please use a format as following:
> Fixes: d904b38df0db13 ("ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss")
> 
>> Reported-by: Keerthy <j-keerthy@ti.com>
>> Signed-off-by: Rajendra Nayak <rnayak@ti.com>
>> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
>> ---
>>  arch/arm/mach-omap2/omap_hwmod.c          |    3 +++
>>  arch/arm/mach-omap2/omap_hwmod_7xx_data.c |   22 ++++++++++++++++++++--
>>  2 files changed, 23 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
>> index 6c074f3..14f8370 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod.c
>> @@ -3345,6 +3345,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
>>  	if (!ois)
>>  		return 0;
>>  
>> +	if (ois[0] == NULL) /*empty list*/
> /* Empty list */ ?
>> +		return 0;
>> +
> 
> This change looks like a different patch?
> 
>>  	if (!linkspace) {
>>  		if (_alloc_linkspace(ois)) {
>>  			pr_err("omap_hwmod: could not allocate link space\n");
>> diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
>> index 284324f..c95033c 100644
>> --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
>> +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
>> @@ -35,6 +35,7 @@
>>  #include "i2c.h"
>>  #include "mmc.h"
>>  #include "wd_timer.h"
>> +#include "soc.h"
>>  
>>  /* Base offset for all DRA7XX interrupts external to MPUSS */
>>  #define DRA7XX_IRQ_GIC_START	32
>> @@ -2705,7 +2706,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
>>  	&dra7xx_l4_per3__usb_otg_ss1,
>>  	&dra7xx_l4_per3__usb_otg_ss2,
>>  	&dra7xx_l4_per3__usb_otg_ss3,
>> -	&dra7xx_l4_per3__usb_otg_ss4,
>>  	&dra7xx_l3_main_1__vcp1,
>>  	&dra7xx_l4_per2__vcp1,
>>  	&dra7xx_l3_main_1__vcp2,
>> @@ -2714,8 +2714,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
>>  	NULL,
>>  };
>>  
>> +static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
>> +	&dra7xx_l4_per3__usb_otg_ss4,
>> +	NULL,
>> +};
>> +
>> +static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
>> +	NULL,
>> +};
>> +
>>  int __init dra7xx_hwmod_init(void)
>>  {
>> +	int ret;
>> +
>>  	omap_hwmod_init();
>> -	return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
>> +	ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
> if (ret)
> 	goto out;
>> +
>> +	if (!ret && soc_is_dra74x())
> no need of !ret
>> +		return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
> ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
>> +	else if (!ret && soc_is_dra72x())
> no need of else and !ret
>> +		return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
> ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
>> +
> 
> out:
>> +	return ret;
After looking closely into it, I realized that currently its the same logic of what you are
suggesting.  If there is no error from registering common lists then only go for registering the
Soc specific lists.
Do you still want me to go ahead and make this change?

Thanks and regards,
Lokesh
>>  }
>>
> 
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists
  2014-07-25 15:24     ` Lokesh Vutla
@ 2014-07-25 15:44       ` Nishanth Menon
  0 siblings, 0 replies; 12+ messages in thread
From: Nishanth Menon @ 2014-07-25 15:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 25, 2014 at 10:24 AM, Lokesh Vutla <lokeshvutla@ti.com> wrote:
>
> After looking closely into it, I realized that currently its the same logic of what you are
> suggesting.  If there is no error from registering common lists then only go for registering the
> Soc specific lists.
> Do you still want me to go ahead and make this change?


Sure. Ok with me at least.

-- 
---
Regards,
Nishanth Menon

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-07-25 15:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16  8:36 [PATCH 0/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
2014-07-16  8:36 ` [PATCH 1/2] ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() varients Lokesh Vutla
2014-07-22 16:46   ` Nishanth Menon
2014-07-23 22:46   ` Suman Anna
2014-07-16  8:36 ` [PATCH 2/2] ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists Lokesh Vutla
2014-07-22 16:50   ` Nishanth Menon
2014-07-23  3:57     ` Lokesh Vutla
2014-07-25 15:24     ` Lokesh Vutla
2014-07-25 15:44       ` Nishanth Menon
2014-07-22 16:45 ` [PATCH 0/2] " Nishanth Menon
2014-07-23  4:06   ` Lokesh Vutla
2014-07-23 22:43     ` Suman Anna

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).