diff options
author | Olof Johansson <olof@lixom.net> | 2014-08-31 13:19:09 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-08-31 13:19:43 -0400 |
commit | 98fd1508363a3e717f480795d8030430c298508a (patch) | |
tree | 30a623a8eaad98c105eb7eeec5aaf924bc373caa | |
parent | 0dc0d9e18e7d4076440bdab73410cdfc1337586a (diff) | |
parent | f7f7a29bf0cf25af23f37e5b5bf1368b85705286 (diff) |
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>
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-omap2/soc.h | 6 |
3 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index da1b256caccc..8fd87a3055bf 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -3349,6 +3349,9 @@ int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois) | |||
3349 | if (!ois) | 3349 | if (!ois) |
3350 | return 0; | 3350 | return 0; |
3351 | 3351 | ||
3352 | if (ois[0] == NULL) /* Empty list */ | ||
3353 | return 0; | ||
3354 | |||
3352 | if (!linkspace) { | 3355 | if (!linkspace) { |
3353 | if (_alloc_linkspace(ois)) { | 3356 | if (_alloc_linkspace(ois)) { |
3354 | pr_err("omap_hwmod: could not allocate link space\n"); | 3357 | 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 2757abf87fbc..5684f112654b 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 @@ | |||
35 | #include "i2c.h" | 35 | #include "i2c.h" |
36 | #include "mmc.h" | 36 | #include "mmc.h" |
37 | #include "wd_timer.h" | 37 | #include "wd_timer.h" |
38 | #include "soc.h" | ||
38 | 39 | ||
39 | /* Base offset for all DRA7XX interrupts external to MPUSS */ | 40 | /* Base offset for all DRA7XX interrupts external to MPUSS */ |
40 | #define DRA7XX_IRQ_GIC_START 32 | 41 | #define DRA7XX_IRQ_GIC_START 32 |
@@ -3261,7 +3262,6 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
3261 | &dra7xx_l4_per3__usb_otg_ss1, | 3262 | &dra7xx_l4_per3__usb_otg_ss1, |
3262 | &dra7xx_l4_per3__usb_otg_ss2, | 3263 | &dra7xx_l4_per3__usb_otg_ss2, |
3263 | &dra7xx_l4_per3__usb_otg_ss3, | 3264 | &dra7xx_l4_per3__usb_otg_ss3, |
3264 | &dra7xx_l4_per3__usb_otg_ss4, | ||
3265 | &dra7xx_l3_main_1__vcp1, | 3265 | &dra7xx_l3_main_1__vcp1, |
3266 | &dra7xx_l4_per2__vcp1, | 3266 | &dra7xx_l4_per2__vcp1, |
3267 | &dra7xx_l3_main_1__vcp2, | 3267 | &dra7xx_l3_main_1__vcp2, |
@@ -3270,8 +3270,26 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { | |||
3270 | NULL, | 3270 | NULL, |
3271 | }; | 3271 | }; |
3272 | 3272 | ||
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 | |||
3273 | int __init dra7xx_hwmod_init(void) | 3282 | int __init dra7xx_hwmod_init(void) |
3274 | { | 3283 | { |
3284 | int ret; | ||
3285 | |||
3275 | omap_hwmod_init(); | 3286 | 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; | ||
3277 | } | 3295 | } |
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index 01ca8086fb6c..4376f59626d1 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h | |||
@@ -245,6 +245,8 @@ IS_AM_SUBCLASS(437x, 0x437) | |||
245 | #define soc_is_omap54xx() 0 | 245 | #define soc_is_omap54xx() 0 |
246 | #define soc_is_omap543x() 0 | 246 | #define soc_is_omap543x() 0 |
247 | #define soc_is_dra7xx() 0 | 247 | #define soc_is_dra7xx() 0 |
248 | #define soc_is_dra74x() 0 | ||
249 | #define soc_is_dra72x() 0 | ||
248 | 250 | ||
249 | #if defined(MULTI_OMAP2) | 251 | #if defined(MULTI_OMAP2) |
250 | # if defined(CONFIG_ARCH_OMAP2) | 252 | # if defined(CONFIG_ARCH_OMAP2) |
@@ -393,7 +395,11 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
393 | 395 | ||
394 | #if defined(CONFIG_SOC_DRA7XX) | 396 | #if defined(CONFIG_SOC_DRA7XX) |
395 | #undef soc_is_dra7xx | 397 | #undef soc_is_dra7xx |
398 | #undef soc_is_dra74x | ||
399 | #undef soc_is_dra72x | ||
396 | #define soc_is_dra7xx() (of_machine_is_compatible("ti,dra7")) | 400 | #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")) | ||
397 | #endif | 403 | #endif |
398 | 404 | ||
399 | /* Various silicon revisions for omap2 */ | 405 | /* Various silicon revisions for omap2 */ |