diff options
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomain.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomains2420_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomains2430_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomains3xxx_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomains44xx_data.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clockdomains_common_data.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 28 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_44xx_data.c | 3 |
9 files changed, 19 insertions, 47 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index fa742f3c2629..bc7d2393161f 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -116,7 +116,6 @@ obj-$(CONFIG_ARCH_OMAP4) += powerdomains44xx_data.o | |||
116 | 116 | ||
117 | # PRCM clockdomain control | 117 | # PRCM clockdomain control |
118 | clockdomain-common += clockdomain.o | 118 | clockdomain-common += clockdomain.o |
119 | clockdomain-common += clockdomains_common_data.o | ||
120 | obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common) | 119 | obj-$(CONFIG_ARCH_OMAP2) += $(clockdomain-common) |
121 | obj-$(CONFIG_ARCH_OMAP2) += clockdomain2xxx_3xxx.o | 120 | obj-$(CONFIG_ARCH_OMAP2) += clockdomain2xxx_3xxx.o |
122 | obj-$(CONFIG_ARCH_OMAP2) += clockdomains2xxx_3xxx_data.o | 121 | obj-$(CONFIG_ARCH_OMAP2) += clockdomains2xxx_3xxx_data.o |
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index f7b58609bad8..349dcbb6fecb 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h | |||
@@ -206,7 +206,5 @@ extern struct clkdm_ops omap4_clkdm_operations; | |||
206 | extern struct clkdm_dep gfx_24xx_wkdeps[]; | 206 | extern struct clkdm_dep gfx_24xx_wkdeps[]; |
207 | extern struct clkdm_dep dsp_24xx_wkdeps[]; | 207 | extern struct clkdm_dep dsp_24xx_wkdeps[]; |
208 | extern struct clockdomain wkup_common_clkdm; | 208 | extern struct clockdomain wkup_common_clkdm; |
209 | extern struct clockdomain prm_common_clkdm; | ||
210 | extern struct clockdomain cm_common_clkdm; | ||
211 | 209 | ||
212 | #endif | 210 | #endif |
diff --git a/arch/arm/mach-omap2/clockdomains2420_data.c b/arch/arm/mach-omap2/clockdomains2420_data.c index 0ab8e46d5b2b..5c741852fac0 100644 --- a/arch/arm/mach-omap2/clockdomains2420_data.c +++ b/arch/arm/mach-omap2/clockdomains2420_data.c | |||
@@ -131,8 +131,6 @@ static struct clockdomain dss_2420_clkdm = { | |||
131 | 131 | ||
132 | static struct clockdomain *clockdomains_omap242x[] __initdata = { | 132 | static struct clockdomain *clockdomains_omap242x[] __initdata = { |
133 | &wkup_common_clkdm, | 133 | &wkup_common_clkdm, |
134 | &cm_common_clkdm, | ||
135 | &prm_common_clkdm, | ||
136 | &mpu_2420_clkdm, | 134 | &mpu_2420_clkdm, |
137 | &iva1_2420_clkdm, | 135 | &iva1_2420_clkdm, |
138 | &dsp_2420_clkdm, | 136 | &dsp_2420_clkdm, |
diff --git a/arch/arm/mach-omap2/clockdomains2430_data.c b/arch/arm/mach-omap2/clockdomains2430_data.c index 3645ed044890..f09617555e15 100644 --- a/arch/arm/mach-omap2/clockdomains2430_data.c +++ b/arch/arm/mach-omap2/clockdomains2430_data.c | |||
@@ -157,8 +157,6 @@ static struct clockdomain dss_2430_clkdm = { | |||
157 | 157 | ||
158 | static struct clockdomain *clockdomains_omap243x[] __initdata = { | 158 | static struct clockdomain *clockdomains_omap243x[] __initdata = { |
159 | &wkup_common_clkdm, | 159 | &wkup_common_clkdm, |
160 | &cm_common_clkdm, | ||
161 | &prm_common_clkdm, | ||
162 | &mpu_2430_clkdm, | 160 | &mpu_2430_clkdm, |
163 | &mdm_clkdm, | 161 | &mdm_clkdm, |
164 | &dsp_2430_clkdm, | 162 | &dsp_2430_clkdm, |
diff --git a/arch/arm/mach-omap2/clockdomains3xxx_data.c b/arch/arm/mach-omap2/clockdomains3xxx_data.c index 6038adb97710..2cdc17c9d2fa 100644 --- a/arch/arm/mach-omap2/clockdomains3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains3xxx_data.c | |||
@@ -347,8 +347,6 @@ static struct clkdm_autodep clkdm_autodeps[] = { | |||
347 | 347 | ||
348 | static struct clockdomain *clockdomains_omap3430_common[] __initdata = { | 348 | static struct clockdomain *clockdomains_omap3430_common[] __initdata = { |
349 | &wkup_common_clkdm, | 349 | &wkup_common_clkdm, |
350 | &cm_common_clkdm, | ||
351 | &prm_common_clkdm, | ||
352 | &mpu_3xxx_clkdm, | 350 | &mpu_3xxx_clkdm, |
353 | &neon_clkdm, | 351 | &neon_clkdm, |
354 | &iva2_clkdm, | 352 | &iva2_clkdm, |
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c index c53425847493..bd7ed13515cc 100644 --- a/arch/arm/mach-omap2/clockdomains44xx_data.c +++ b/arch/arm/mach-omap2/clockdomains44xx_data.c | |||
@@ -430,8 +430,6 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = { | |||
430 | &l4_wkup_44xx_clkdm, | 430 | &l4_wkup_44xx_clkdm, |
431 | &emu_sys_44xx_clkdm, | 431 | &emu_sys_44xx_clkdm, |
432 | &l3_dma_44xx_clkdm, | 432 | &l3_dma_44xx_clkdm, |
433 | &prm_common_clkdm, | ||
434 | &cm_common_clkdm, | ||
435 | NULL | 433 | NULL |
436 | }; | 434 | }; |
437 | 435 | ||
diff --git a/arch/arm/mach-omap2/clockdomains_common_data.c b/arch/arm/mach-omap2/clockdomains_common_data.c deleted file mode 100644 index 615b1f04967d..000000000000 --- a/arch/arm/mach-omap2/clockdomains_common_data.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * OMAP2+-common clockdomain data | ||
3 | * | ||
4 | * Copyright (C) 2008-2012 Texas Instruments, Inc. | ||
5 | * Copyright (C) 2008-2010 Nokia Corporation | ||
6 | * | ||
7 | * Paul Walmsley, Jouni Högander | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/io.h> | ||
12 | |||
13 | #include "clockdomain.h" | ||
14 | |||
15 | /* These are implicit clockdomains - they are never defined as such in TRM */ | ||
16 | struct clockdomain prm_common_clkdm = { | ||
17 | .name = "prm_clkdm", | ||
18 | .pwrdm = { .name = "wkup_pwrdm" }, | ||
19 | }; | ||
20 | |||
21 | struct clockdomain cm_common_clkdm = { | ||
22 | .name = "cm_clkdm", | ||
23 | .pwrdm = { .name = "core_pwrdm" }, | ||
24 | }; | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index bf86f7e8f91f..32a5e08ffb9b 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -810,7 +810,7 @@ static int _omap4_wait_target_disable(struct omap_hwmod *oh) | |||
810 | if (!cpu_is_omap44xx()) | 810 | if (!cpu_is_omap44xx()) |
811 | return 0; | 811 | return 0; |
812 | 812 | ||
813 | if (!oh) | 813 | if (!oh || !oh->clkdm) |
814 | return -EINVAL; | 814 | return -EINVAL; |
815 | 815 | ||
816 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) | 816 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) |
@@ -1285,23 +1285,22 @@ static struct omap_hwmod *_lookup(const char *name) | |||
1285 | 1285 | ||
1286 | return oh; | 1286 | return oh; |
1287 | } | 1287 | } |
1288 | |||
1288 | /** | 1289 | /** |
1289 | * _init_clkdm - look up a clockdomain name, store pointer in omap_hwmod | 1290 | * _init_clkdm - look up a clockdomain name, store pointer in omap_hwmod |
1290 | * @oh: struct omap_hwmod * | 1291 | * @oh: struct omap_hwmod * |
1291 | * | 1292 | * |
1292 | * Convert a clockdomain name stored in a struct omap_hwmod into a | 1293 | * Convert a clockdomain name stored in a struct omap_hwmod into a |
1293 | * clockdomain pointer, and save it into the struct omap_hwmod. | 1294 | * clockdomain pointer, and save it into the struct omap_hwmod. |
1294 | * return -EINVAL if clkdm_name does not exist or if the lookup failed. | 1295 | * Return -EINVAL if the clkdm_name lookup failed. |
1295 | */ | 1296 | */ |
1296 | static int _init_clkdm(struct omap_hwmod *oh) | 1297 | static int _init_clkdm(struct omap_hwmod *oh) |
1297 | { | 1298 | { |
1298 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | 1299 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) |
1299 | return 0; | 1300 | return 0; |
1300 | 1301 | ||
1301 | if (!oh->clkdm_name) { | 1302 | if (!oh->clkdm_name) |
1302 | pr_warning("omap_hwmod: %s: no clkdm_name\n", oh->name); | 1303 | return 0; |
1303 | return -EINVAL; | ||
1304 | } | ||
1305 | 1304 | ||
1306 | oh->clkdm = clkdm_lookup(oh->clkdm_name); | 1305 | oh->clkdm = clkdm_lookup(oh->clkdm_name); |
1307 | if (!oh->clkdm) { | 1306 | if (!oh->clkdm) { |
@@ -1447,16 +1446,20 @@ static int _assert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1447 | if (IS_ERR_VALUE(ret)) | 1446 | if (IS_ERR_VALUE(ret)) |
1448 | return ret; | 1447 | return ret; |
1449 | 1448 | ||
1450 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | 1449 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { |
1451 | return omap2_prm_assert_hardreset(oh->prcm.omap2.module_offs, | 1450 | return omap2_prm_assert_hardreset(oh->prcm.omap2.module_offs, |
1452 | ohri.rst_shift); | 1451 | ohri.rst_shift); |
1453 | else if (cpu_is_omap44xx()) | 1452 | } else if (cpu_is_omap44xx()) { |
1453 | if (!oh->clkdm) | ||
1454 | return -EINVAL; | ||
1455 | |||
1454 | return omap4_prminst_assert_hardreset(ohri.rst_shift, | 1456 | return omap4_prminst_assert_hardreset(ohri.rst_shift, |
1455 | oh->clkdm->pwrdm.ptr->prcm_partition, | 1457 | oh->clkdm->pwrdm.ptr->prcm_partition, |
1456 | oh->clkdm->pwrdm.ptr->prcm_offs, | 1458 | oh->clkdm->pwrdm.ptr->prcm_offs, |
1457 | oh->prcm.omap4.rstctrl_offs); | 1459 | oh->prcm.omap4.rstctrl_offs); |
1458 | else | 1460 | } else { |
1459 | return -EINVAL; | 1461 | return -EINVAL; |
1462 | } | ||
1460 | } | 1463 | } |
1461 | 1464 | ||
1462 | /** | 1465 | /** |
@@ -1489,6 +1492,10 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name) | |||
1489 | if (ohri.st_shift) | 1492 | if (ohri.st_shift) |
1490 | pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", | 1493 | pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", |
1491 | oh->name, name); | 1494 | oh->name, name); |
1495 | |||
1496 | if (!oh->clkdm) | ||
1497 | return -EINVAL; | ||
1498 | |||
1492 | ret = omap4_prminst_deassert_hardreset(ohri.rst_shift, | 1499 | ret = omap4_prminst_deassert_hardreset(ohri.rst_shift, |
1493 | oh->clkdm->pwrdm.ptr->prcm_partition, | 1500 | oh->clkdm->pwrdm.ptr->prcm_partition, |
1494 | oh->clkdm->pwrdm.ptr->prcm_offs, | 1501 | oh->clkdm->pwrdm.ptr->prcm_offs, |
@@ -1527,6 +1534,9 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name) | |||
1527 | return omap2_prm_is_hardreset_asserted(oh->prcm.omap2.module_offs, | 1534 | return omap2_prm_is_hardreset_asserted(oh->prcm.omap2.module_offs, |
1528 | ohri.st_shift); | 1535 | ohri.st_shift); |
1529 | } else if (cpu_is_omap44xx()) { | 1536 | } else if (cpu_is_omap44xx()) { |
1537 | if (!oh->clkdm) | ||
1538 | return -EINVAL; | ||
1539 | |||
1530 | return omap4_prminst_is_hardreset_asserted(ohri.rst_shift, | 1540 | return omap4_prminst_is_hardreset_asserted(ohri.rst_shift, |
1531 | oh->clkdm->pwrdm.ptr->prcm_partition, | 1541 | oh->clkdm->pwrdm.ptr->prcm_partition, |
1532 | oh->clkdm->pwrdm.ptr->prcm_offs, | 1542 | oh->clkdm->pwrdm.ptr->prcm_offs, |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index 950454a3fa31..e9e9ec0df64a 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -2540,14 +2540,12 @@ static struct omap_hwmod omap44xx_prcm_mpu_hwmod = { | |||
2540 | static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { | 2540 | static struct omap_hwmod omap44xx_cm_core_aon_hwmod = { |
2541 | .name = "cm_core_aon", | 2541 | .name = "cm_core_aon", |
2542 | .class = &omap44xx_prcm_hwmod_class, | 2542 | .class = &omap44xx_prcm_hwmod_class, |
2543 | .clkdm_name = "cm_clkdm", | ||
2544 | }; | 2543 | }; |
2545 | 2544 | ||
2546 | /* cm_core */ | 2545 | /* cm_core */ |
2547 | static struct omap_hwmod omap44xx_cm_core_hwmod = { | 2546 | static struct omap_hwmod omap44xx_cm_core_hwmod = { |
2548 | .name = "cm_core", | 2547 | .name = "cm_core", |
2549 | .class = &omap44xx_prcm_hwmod_class, | 2548 | .class = &omap44xx_prcm_hwmod_class, |
2550 | .clkdm_name = "cm_clkdm", | ||
2551 | }; | 2549 | }; |
2552 | 2550 | ||
2553 | /* prm */ | 2551 | /* prm */ |
@@ -2564,7 +2562,6 @@ static struct omap_hwmod_rst_info omap44xx_prm_resets[] = { | |||
2564 | static struct omap_hwmod omap44xx_prm_hwmod = { | 2562 | static struct omap_hwmod omap44xx_prm_hwmod = { |
2565 | .name = "prm", | 2563 | .name = "prm", |
2566 | .class = &omap44xx_prcm_hwmod_class, | 2564 | .class = &omap44xx_prcm_hwmod_class, |
2567 | .clkdm_name = "prm_clkdm", | ||
2568 | .mpu_irqs = omap44xx_prm_irqs, | 2565 | .mpu_irqs = omap44xx_prm_irqs, |
2569 | .rst_lines = omap44xx_prm_resets, | 2566 | .rst_lines = omap44xx_prm_resets, |
2570 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_prm_resets), | 2567 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_prm_resets), |