Commit 2f2b0f4d authored by Rajendra Nayak's avatar Rajendra Nayak Committed by Greg Kroah-Hartman

ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists

commit f7f7a29b upstream.

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: d904b38d ("ARM: DRA7: hwmod: Add SYSCONFIG for usb_otg_ss")
Reported-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
Signed-off-by: default avatarLokesh Vutla <lokeshvutla@ti.com>
Tested-by: default avatarNishanth Menon <nm@ti.com>
[paul@pwsan.com: fixed comment style to conform with CodingStyle]
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent be35ff0f
...@@ -3349,6 +3349,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois) ...@@ -3349,6 +3349,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
if (!ois) if (!ois)
return 0; return 0;
if (ois[0] == NULL) /* Empty list */
return 0;
if (!linkspace) { if (!linkspace) {
if (_alloc_linkspace(ois)) { if (_alloc_linkspace(ois)) {
pr_err("omap_hwmod: could not allocate link space\n"); pr_err("omap_hwmod: could not allocate link space\n");
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "i2c.h" #include "i2c.h"
#include "mmc.h" #include "mmc.h"
#include "wd_timer.h" #include "wd_timer.h"
#include "soc.h"
/* Base offset for all DRA7XX interrupts external to MPUSS */ /* Base offset for all DRA7XX interrupts external to MPUSS */
#define DRA7XX_IRQ_GIC_START 32 #define DRA7XX_IRQ_GIC_START 32
...@@ -2705,7 +2706,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { ...@@ -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_ss1,
&dra7xx_l4_per3__usb_otg_ss2, &dra7xx_l4_per3__usb_otg_ss2,
&dra7xx_l4_per3__usb_otg_ss3, &dra7xx_l4_per3__usb_otg_ss3,
&dra7xx_l4_per3__usb_otg_ss4,
&dra7xx_l3_main_1__vcp1, &dra7xx_l3_main_1__vcp1,
&dra7xx_l4_per2__vcp1, &dra7xx_l4_per2__vcp1,
&dra7xx_l3_main_1__vcp2, &dra7xx_l3_main_1__vcp2,
...@@ -2714,8 +2714,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { ...@@ -2714,8 +2714,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
NULL, 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 __init dra7xx_hwmod_init(void)
{ {
int ret;
omap_hwmod_init(); 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;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment