Skip to content

Commit 98fd150

Browse files
committed
Merge tag 'for-v3.17-rc/omap-dra72x-d74x-support-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into fixes
Pull "ARM: OMAP2+: DRA72x/DRA74x basic support" from Tony Lindgren: Add basic subarchitecture support for the DRA72x and DRA74x. These are OMAP2+ derivative SoCs. This should be low-risk to existing OMAP platforms. Basic build, boot, and PM test logs are available here: http://www.pwsan.com/omap/testlogs/hwmod-a-early-v3.17-rc/20140827194314/ * tag 'for-v3.17-rc/omap-dra72x-d74x-support-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending: ARM: DRA7: hwmod: Add dra74x and dra72x specific ocp interface lists ARM: DRA7: Add support for soc_is_dra74x() and soc_is_dra72x() variants Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents 0dc0d9e + f7f7a29 commit 98fd150

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3349,6 +3349,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois)
33493349
if (!ois)
33503350
return 0;
33513351

3352+
if (ois[0] == NULL) /* Empty list */
3353+
return 0;
3354+
33523355
if (!linkspace) {
33533356
if (_alloc_linkspace(ois)) {
33543357
pr_err("omap_hwmod: could not allocate link space\n");

arch/arm/mach-omap2/omap_hwmod_7xx_data.c

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "i2c.h"
3636
#include "mmc.h"
3737
#include "wd_timer.h"
38+
#include "soc.h"
3839

3940
/* Base offset for all DRA7XX interrupts external to MPUSS */
4041
#define DRA7XX_IRQ_GIC_START 32
@@ -3261,7 +3262,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
32613262
&dra7xx_l4_per3__usb_otg_ss1,
32623263
&dra7xx_l4_per3__usb_otg_ss2,
32633264
&dra7xx_l4_per3__usb_otg_ss3,
3264-
&dra7xx_l4_per3__usb_otg_ss4,
32653265
&dra7xx_l3_main_1__vcp1,
32663266
&dra7xx_l4_per2__vcp1,
32673267
&dra7xx_l3_main_1__vcp2,
@@ -3270,8 +3270,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
32703270
NULL,
32713271
};
32723272

3273+
static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
3274+
&dra7xx_l4_per3__usb_otg_ss4,
3275+
NULL,
3276+
};
3277+
3278+
static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = {
3279+
NULL,
3280+
};
3281+
32733282
int __init dra7xx_hwmod_init(void)
32743283
{
3284+
int ret;
3285+
32753286
omap_hwmod_init();
3276-
return omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
3287+
ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
3288+
3289+
if (!ret && soc_is_dra74x())
3290+
return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
3291+
else if (!ret && soc_is_dra72x())
3292+
return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
3293+
3294+
return ret;
32773295
}

arch/arm/mach-omap2/soc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ IS_AM_SUBCLASS(437x, 0x437)
245245
#define soc_is_omap54xx() 0
246246
#define soc_is_omap543x() 0
247247
#define soc_is_dra7xx() 0
248+
#define soc_is_dra74x() 0
249+
#define soc_is_dra72x() 0
248250

249251
#if defined(MULTI_OMAP2)
250252
# if defined(CONFIG_ARCH_OMAP2)
@@ -393,7 +395,11 @@ IS_OMAP_TYPE(3430, 0x3430)
393395

394396
#if defined(CONFIG_SOC_DRA7XX)
395397
#undef soc_is_dra7xx
398+
#undef soc_is_dra74x
399+
#undef soc_is_dra72x
396400
#define soc_is_dra7xx() (of_machine_is_compatible("ti,dra7"))
401+
#define soc_is_dra74x() (of_machine_is_compatible("ti,dra74"))
402+
#define soc_is_dra72x() (of_machine_is_compatible("ti,dra72"))
397403
#endif
398404

399405
/* Various silicon revisions for omap2 */

0 commit comments

Comments
 (0)