diff options
author | Olof Johansson <olof@lixom.net> | 2013-04-19 14:37:21 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-04-19 14:37:21 -0400 |
commit | 17ada81e4ed9525cc2344aceb2ecf360142eef50 (patch) | |
tree | cf4a4834d5d29c7d908f598af769c3a872162ac5 /arch/arm/mach-omap2 | |
parent | 981c448014557d6f9d7289567137c38adddd94e5 (diff) | |
parent | 105612489bf59386b46b3f9f034e03f70e57aee6 (diff) |
Merge branch 'omap/fixes-non-critical' into late/cleanup
* omap/fixes-non-critical:
ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"
ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"
ARM: OMAP: dpll: enable bypass clock only when attempting dpll bypass
ARM: OMAP2+: powerdomain: avoid testing whether an unsigned char is less than 0
ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
ARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk
ARM: OMAP2+: AM33xx: hwmod: Add missing sysc definition to wdt1 entry
ARM: OMAP: fix typo "CONFIG_SMC91x_MODULE"
ARM: OMAP5: clock: No Freqsel on OMAP5 devices too
ARM: OMAP5: Make errata i688 workaround available
ARM: OMAP5: Update SAR memory layout for WakeupGen
ARM: OMAP5: Update SAR RAM base address
ARM: OMAP5: Reuse prm read_inst/write_inst
ARM: OMAP5: prm: Allow prm init to succeed
ARM: OMAP5: timer: Update the clocksource name as per clock data
ARM: OMAP5: Update SOC id detection code for ES2
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-2430sdp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-h4.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/cclock33xx_data.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/dpll3xxx.c | 30 | ||||
-rw-r--r-- | arch/arm/mach-omap2/dsp.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/id.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap4-common.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap4-sar-layout.h | 14 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap54xx.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_33xx_data.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm44xx.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/soc.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/timer.c | 5 |
18 files changed, 94 insertions, 56 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 8111cd9ff3e5..b9c0ed3f648c 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -408,7 +408,7 @@ config OMAP3_SDRC_AC_TIMING | |||
408 | 408 | ||
409 | config OMAP4_ERRATA_I688 | 409 | config OMAP4_ERRATA_I688 |
410 | bool "OMAP4 errata: Async Bridge Corruption" | 410 | bool "OMAP4 errata: Async Bridge Corruption" |
411 | depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM | 411 | depends on (ARCH_OMAP4 || SOC_OMAP5) && !ARCH_MULTIPLATFORM |
412 | select ARCH_HAS_BARRIERS | 412 | select ARCH_HAS_BARRIERS |
413 | help | 413 | help |
414 | If a data is stalled inside asynchronous bridge because of back | 414 | If a data is stalled inside asynchronous bridge because of back |
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index a3e0aaa4886b..cb0596b631cf 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -166,7 +166,7 @@ static void __init sdp2430_display_init(void) | |||
166 | omap_display_init(&sdp2430_dss_data); | 166 | omap_display_init(&sdp2430_dss_data); |
167 | } | 167 | } |
168 | 168 | ||
169 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE) | 169 | #if IS_ENABLED(CONFIG_SMC91X) |
170 | 170 | ||
171 | static struct omap_smc91x_platform_data board_smc91x_data = { | 171 | static struct omap_smc91x_platform_data board_smc91x_data = { |
172 | .cs = 5, | 172 | .cs = 5, |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 812c829fa46f..5b4ec51c385f 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -246,7 +246,7 @@ static u32 is_gpmc_muxed(void) | |||
246 | return 0; | 246 | return 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91x_MODULE) | 249 | #if IS_ENABLED(CONFIG_SMC91X) |
250 | 250 | ||
251 | static struct omap_smc91x_platform_data board_smc91x_data = { | 251 | static struct omap_smc91x_platform_data board_smc91x_data = { |
252 | .cs = 1, | 252 | .cs = 1, |
diff --git a/arch/arm/mach-omap2/cclock33xx_data.c b/arch/arm/mach-omap2/cclock33xx_data.c index 476b82066cb6..7f091c85384e 100644 --- a/arch/arm/mach-omap2/cclock33xx_data.c +++ b/arch/arm/mach-omap2/cclock33xx_data.c | |||
@@ -958,6 +958,14 @@ int __init am33xx_clk_init(void) | |||
958 | 958 | ||
959 | clk_set_parent(&timer3_fck, &sys_clkin_ck); | 959 | clk_set_parent(&timer3_fck, &sys_clkin_ck); |
960 | clk_set_parent(&timer6_fck, &sys_clkin_ck); | 960 | clk_set_parent(&timer6_fck, &sys_clkin_ck); |
961 | /* | ||
962 | * The On-Chip 32K RC Osc clock is not an accurate clock-source as per | ||
963 | * the design/spec, so as a result, for example, timer which supposed | ||
964 | * to get expired @60Sec, but will expire somewhere ~@40Sec, which is | ||
965 | * not expected by any use-case, so change WDT1 clock source to PRCM | ||
966 | * 32KHz clock. | ||
967 | */ | ||
968 | clk_set_parent(&wdt1_fck, &clkdiv32k_ick); | ||
961 | 969 | ||
962 | return 0; | 970 | return 0; |
963 | } | 971 | } |
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index 3aed4b0b9563..3a0296cfcace 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c | |||
@@ -307,10 +307,10 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel) | |||
307 | _omap3_noncore_dpll_bypass(clk); | 307 | _omap3_noncore_dpll_bypass(clk); |
308 | 308 | ||
309 | /* | 309 | /* |
310 | * Set jitter correction. No jitter correction for OMAP4 and 3630 | 310 | * Set jitter correction. Jitter correction applicable for OMAP343X |
311 | * since freqsel field is no longer present | 311 | * only since freqsel field is no longer present on other devices. |
312 | */ | 312 | */ |
313 | if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) { | 313 | if (cpu_is_omap343x()) { |
314 | v = __raw_readl(dd->control_reg); | 314 | v = __raw_readl(dd->control_reg); |
315 | v &= ~dd->freqsel_mask; | 315 | v &= ~dd->freqsel_mask; |
316 | v |= freqsel << __ffs(dd->freqsel_mask); | 316 | v |= freqsel << __ffs(dd->freqsel_mask); |
@@ -480,29 +480,30 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, | |||
480 | if (!dd) | 480 | if (!dd) |
481 | return -EINVAL; | 481 | return -EINVAL; |
482 | 482 | ||
483 | __clk_prepare(dd->clk_bypass); | ||
484 | clk_enable(dd->clk_bypass); | ||
485 | __clk_prepare(dd->clk_ref); | ||
486 | clk_enable(dd->clk_ref); | ||
487 | |||
488 | if (__clk_get_rate(dd->clk_bypass) == rate && | 483 | if (__clk_get_rate(dd->clk_bypass) == rate && |
489 | (dd->modes & (1 << DPLL_LOW_POWER_BYPASS))) { | 484 | (dd->modes & (1 << DPLL_LOW_POWER_BYPASS))) { |
490 | pr_debug("%s: %s: set rate: entering bypass.\n", | 485 | pr_debug("%s: %s: set rate: entering bypass.\n", |
491 | __func__, __clk_get_name(hw->clk)); | 486 | __func__, __clk_get_name(hw->clk)); |
492 | 487 | ||
488 | __clk_prepare(dd->clk_bypass); | ||
489 | clk_enable(dd->clk_bypass); | ||
493 | ret = _omap3_noncore_dpll_bypass(clk); | 490 | ret = _omap3_noncore_dpll_bypass(clk); |
494 | if (!ret) | 491 | if (!ret) |
495 | new_parent = dd->clk_bypass; | 492 | new_parent = dd->clk_bypass; |
493 | clk_disable(dd->clk_bypass); | ||
494 | __clk_unprepare(dd->clk_bypass); | ||
496 | } else { | 495 | } else { |
496 | __clk_prepare(dd->clk_ref); | ||
497 | clk_enable(dd->clk_ref); | ||
498 | |||
497 | if (dd->last_rounded_rate != rate) | 499 | if (dd->last_rounded_rate != rate) |
498 | rate = __clk_round_rate(hw->clk, rate); | 500 | rate = __clk_round_rate(hw->clk, rate); |
499 | 501 | ||
500 | if (dd->last_rounded_rate == 0) | 502 | if (dd->last_rounded_rate == 0) |
501 | return -EINVAL; | 503 | return -EINVAL; |
502 | 504 | ||
503 | /* No freqsel on AM335x, OMAP4 and OMAP3630 */ | 505 | /* Freqsel is available only on OMAP343X devices */ |
504 | if (!soc_is_am33xx() && !cpu_is_omap44xx() && | 506 | if (cpu_is_omap343x()) { |
505 | !cpu_is_omap3630()) { | ||
506 | freqsel = _omap3_dpll_compute_freqsel(clk, | 507 | freqsel = _omap3_dpll_compute_freqsel(clk, |
507 | dd->last_rounded_n); | 508 | dd->last_rounded_n); |
508 | WARN_ON(!freqsel); | 509 | WARN_ON(!freqsel); |
@@ -514,6 +515,8 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, | |||
514 | ret = omap3_noncore_dpll_program(clk, freqsel); | 515 | ret = omap3_noncore_dpll_program(clk, freqsel); |
515 | if (!ret) | 516 | if (!ret) |
516 | new_parent = dd->clk_ref; | 517 | new_parent = dd->clk_ref; |
518 | clk_disable(dd->clk_ref); | ||
519 | __clk_unprepare(dd->clk_ref); | ||
517 | } | 520 | } |
518 | /* | 521 | /* |
519 | * FIXME - this is all wrong. common code handles reparenting and | 522 | * FIXME - this is all wrong. common code handles reparenting and |
@@ -525,11 +528,6 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, | |||
525 | if (!ret) | 528 | if (!ret) |
526 | __clk_reparent(hw->clk, new_parent); | 529 | __clk_reparent(hw->clk, new_parent); |
527 | 530 | ||
528 | clk_disable(dd->clk_ref); | ||
529 | __clk_unprepare(dd->clk_ref); | ||
530 | clk_disable(dd->clk_bypass); | ||
531 | __clk_unprepare(dd->clk_bypass); | ||
532 | |||
533 | return 0; | 531 | return 0; |
534 | } | 532 | } |
535 | 533 | ||
diff --git a/arch/arm/mach-omap2/dsp.c b/arch/arm/mach-omap2/dsp.c index b155500e84a8..b8208b4b1bd9 100644 --- a/arch/arm/mach-omap2/dsp.c +++ b/arch/arm/mach-omap2/dsp.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include "control.h" | 26 | #include "control.h" |
27 | #include "cm2xxx_3xxx.h" | 27 | #include "cm2xxx_3xxx.h" |
28 | #include "prm2xxx_3xxx.h" | 28 | #include "prm2xxx_3xxx.h" |
29 | #ifdef CONFIG_BRIDGE_DVFS | 29 | #ifdef CONFIG_TIDSPBRIDGE_DVFS |
30 | #include "omap-pm.h" | 30 | #include "omap-pm.h" |
31 | #endif | 31 | #endif |
32 | 32 | ||
@@ -35,7 +35,7 @@ | |||
35 | static struct platform_device *omap_dsp_pdev; | 35 | static struct platform_device *omap_dsp_pdev; |
36 | 36 | ||
37 | static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { | 37 | static struct omap_dsp_platform_data omap_dsp_pdata __initdata = { |
38 | #ifdef CONFIG_BRIDGE_DVFS | 38 | #ifdef CONFIG_TIDSPBRIDGE_DVFS |
39 | .dsp_set_min_opp = omap_pm_dsp_set_min_opp, | 39 | .dsp_set_min_opp = omap_pm_dsp_set_min_opp, |
40 | .dsp_get_opp = omap_pm_dsp_get_opp, | 40 | .dsp_get_opp = omap_pm_dsp_get_opp, |
41 | .cpu_set_freq = omap_pm_cpu_set_freq, | 41 | .cpu_set_freq = omap_pm_cpu_set_freq, |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 8a68f1ec66b9..ff0bc9e51aa7 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -529,22 +529,28 @@ void __init omap5xxx_check_revision(void) | |||
529 | case 0xb942: | 529 | case 0xb942: |
530 | switch (rev) { | 530 | switch (rev) { |
531 | case 0: | 531 | case 0: |
532 | default: | ||
533 | omap_revision = OMAP5430_REV_ES1_0; | 532 | omap_revision = OMAP5430_REV_ES1_0; |
533 | break; | ||
534 | case 1: | ||
535 | default: | ||
536 | omap_revision = OMAP5430_REV_ES2_0; | ||
534 | } | 537 | } |
535 | break; | 538 | break; |
536 | 539 | ||
537 | case 0xb998: | 540 | case 0xb998: |
538 | switch (rev) { | 541 | switch (rev) { |
539 | case 0: | 542 | case 0: |
540 | default: | ||
541 | omap_revision = OMAP5432_REV_ES1_0; | 543 | omap_revision = OMAP5432_REV_ES1_0; |
544 | break; | ||
545 | case 1: | ||
546 | default: | ||
547 | omap_revision = OMAP5432_REV_ES2_0; | ||
542 | } | 548 | } |
543 | break; | 549 | break; |
544 | 550 | ||
545 | default: | 551 | default: |
546 | /* Unknown default to latest silicon rev as default*/ | 552 | /* Unknown default to latest silicon rev as default*/ |
547 | omap_revision = OMAP5430_REV_ES1_0; | 553 | omap_revision = OMAP5430_REV_ES2_0; |
548 | } | 554 | } |
549 | 555 | ||
550 | pr_info("OMAP%04x ES%d.0\n", | 556 | pr_info("OMAP%04x ES%d.0\n", |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 5c445ca1e271..e210fa830f8d 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -277,6 +277,14 @@ static struct map_desc omap54xx_io_desc[] __initdata = { | |||
277 | .length = L4_PER_54XX_SIZE, | 277 | .length = L4_PER_54XX_SIZE, |
278 | .type = MT_DEVICE, | 278 | .type = MT_DEVICE, |
279 | }, | 279 | }, |
280 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
281 | { | ||
282 | .virtual = OMAP4_SRAM_VA, | ||
283 | .pfn = __phys_to_pfn(OMAP4_SRAM_PA), | ||
284 | .length = PAGE_SIZE, | ||
285 | .type = MT_MEMORY_SO, | ||
286 | }, | ||
287 | #endif | ||
280 | }; | 288 | }; |
281 | #endif | 289 | #endif |
282 | 290 | ||
@@ -329,6 +337,7 @@ void __init omap4_map_io(void) | |||
329 | void __init omap5_map_io(void) | 337 | void __init omap5_map_io(void) |
330 | { | 338 | { |
331 | iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); | 339 | iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc)); |
340 | omap_barriers_init(); | ||
332 | } | 341 | } |
333 | #endif | 342 | #endif |
334 | /* | 343 | /* |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 708bb115a27f..2aeb928efdfd 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -240,15 +240,21 @@ void __iomem *omap4_get_sar_ram_base(void) | |||
240 | */ | 240 | */ |
241 | static int __init omap4_sar_ram_init(void) | 241 | static int __init omap4_sar_ram_init(void) |
242 | { | 242 | { |
243 | unsigned long sar_base; | ||
244 | |||
243 | /* | 245 | /* |
244 | * To avoid code running on other OMAPs in | 246 | * To avoid code running on other OMAPs in |
245 | * multi-omap builds | 247 | * multi-omap builds |
246 | */ | 248 | */ |
247 | if (!cpu_is_omap44xx()) | 249 | if (cpu_is_omap44xx()) |
250 | sar_base = OMAP44XX_SAR_RAM_BASE; | ||
251 | else if (soc_is_omap54xx()) | ||
252 | sar_base = OMAP54XX_SAR_RAM_BASE; | ||
253 | else | ||
248 | return -ENOMEM; | 254 | return -ENOMEM; |
249 | 255 | ||
250 | /* Static mapping, never released */ | 256 | /* Static mapping, never released */ |
251 | sar_ram_base = ioremap(OMAP44XX_SAR_RAM_BASE, SZ_16K); | 257 | sar_ram_base = ioremap(sar_base, SZ_16K); |
252 | if (WARN_ON(!sar_ram_base)) | 258 | if (WARN_ON(!sar_ram_base)) |
253 | return -ENOMEM; | 259 | return -ENOMEM; |
254 | 260 | ||
diff --git a/arch/arm/mach-omap2/omap4-sar-layout.h b/arch/arm/mach-omap2/omap4-sar-layout.h index e170fe803b04..937417523b8e 100644 --- a/arch/arm/mach-omap2/omap4-sar-layout.h +++ b/arch/arm/mach-omap2/omap4-sar-layout.h | |||
@@ -48,13 +48,13 @@ | |||
48 | #define SAR_BACKUP_STATUS_WAKEUPGEN 0x10 | 48 | #define SAR_BACKUP_STATUS_WAKEUPGEN 0x10 |
49 | 49 | ||
50 | /* WakeUpGen save restore offset from OMAP54XX_SAR_RAM_BASE */ | 50 | /* WakeUpGen save restore offset from OMAP54XX_SAR_RAM_BASE */ |
51 | #define OMAP5_WAKEUPGENENB_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x8d4) | 51 | #define OMAP5_WAKEUPGENENB_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x9dc) |
52 | #define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x8e8) | 52 | #define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU0 (SAR_BANK3_OFFSET + 0x9f0) |
53 | #define OMAP5_WAKEUPGENENB_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0x8fc) | 53 | #define OMAP5_WAKEUPGENENB_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0xa04) |
54 | #define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0x910) | 54 | #define OMAP5_WAKEUPGENENB_SECURE_OFFSET_CPU1 (SAR_BANK3_OFFSET + 0xa18) |
55 | #define OMAP5_AUXCOREBOOT0_OFFSET (SAR_BANK3_OFFSET + 0x924) | 55 | #define OMAP5_AUXCOREBOOT0_OFFSET (SAR_BANK3_OFFSET + 0xa2c) |
56 | #define OMAP5_AUXCOREBOOT1_OFFSET (SAR_BANK3_OFFSET + 0x928) | 56 | #define OMAP5_AUXCOREBOOT1_OFFSET (SAR_BANK3_OFFSET + 0x930) |
57 | #define OMAP5_AMBA_IF_MODE_OFFSET (SAR_BANK3_OFFSET + 0x92c) | 57 | #define OMAP5_AMBA_IF_MODE_OFFSET (SAR_BANK3_OFFSET + 0xa34) |
58 | #define OMAP5_SAR_BACKUP_STATUS_OFFSET (SAR_BANK3_OFFSET + 0x800) | 58 | #define OMAP5_SAR_BACKUP_STATUS_OFFSET (SAR_BANK3_OFFSET + 0x800) |
59 | 59 | ||
60 | #endif | 60 | #endif |
diff --git a/arch/arm/mach-omap2/omap54xx.h b/arch/arm/mach-omap2/omap54xx.h index a2582bb3cab3..a086ba15868b 100644 --- a/arch/arm/mach-omap2/omap54xx.h +++ b/arch/arm/mach-omap2/omap54xx.h | |||
@@ -28,5 +28,6 @@ | |||
28 | #define OMAP54XX_PRCM_MPU_BASE 0x48243000 | 28 | #define OMAP54XX_PRCM_MPU_BASE 0x48243000 |
29 | #define OMAP54XX_SCM_BASE 0x4a002000 | 29 | #define OMAP54XX_SCM_BASE 0x4a002000 |
30 | #define OMAP54XX_CTRL_BASE 0x4a002800 | 30 | #define OMAP54XX_CTRL_BASE 0x4a002800 |
31 | #define OMAP54XX_SAR_RAM_BASE 0x4ae26000 | ||
31 | 32 | ||
32 | #endif /* __ASM_SOC_OMAP555554XX_H */ | 33 | #endif /* __ASM_SOC_OMAP555554XX_H */ |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index a202a4785104..5f33c2da6999 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -610,8 +610,6 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v) | |||
610 | 610 | ||
611 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ | 611 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ |
612 | 612 | ||
613 | oh->_int_flags |= _HWMOD_WAKEUP_ENABLED; | ||
614 | |||
615 | return 0; | 613 | return 0; |
616 | } | 614 | } |
617 | 615 | ||
@@ -645,8 +643,6 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) | |||
645 | 643 | ||
646 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ | 644 | /* XXX test pwrdm_get_wken for this hwmod's subsystem */ |
647 | 645 | ||
648 | oh->_int_flags &= ~_HWMOD_WAKEUP_ENABLED; | ||
649 | |||
650 | return 0; | 646 | return 0; |
651 | } | 647 | } |
652 | 648 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h index d5dc935f6060..fe5962921f07 100644 --- a/arch/arm/mach-omap2/omap_hwmod.h +++ b/arch/arm/mach-omap2/omap_hwmod.h | |||
@@ -482,15 +482,13 @@ struct omap_hwmod_omap4_prcm { | |||
482 | * These are for internal use only and are managed by the omap_hwmod code. | 482 | * These are for internal use only and are managed by the omap_hwmod code. |
483 | * | 483 | * |
484 | * _HWMOD_NO_MPU_PORT: no path exists for the MPU to write to this module | 484 | * _HWMOD_NO_MPU_PORT: no path exists for the MPU to write to this module |
485 | * _HWMOD_WAKEUP_ENABLED: set when the omap_hwmod code has enabled ENAWAKEUP | ||
486 | * _HWMOD_SYSCONFIG_LOADED: set when the OCP_SYSCONFIG value has been cached | 485 | * _HWMOD_SYSCONFIG_LOADED: set when the OCP_SYSCONFIG value has been cached |
487 | * _HWMOD_SKIP_ENABLE: set if hwmod enabled during init (HWMOD_INIT_NO_IDLE) - | 486 | * _HWMOD_SKIP_ENABLE: set if hwmod enabled during init (HWMOD_INIT_NO_IDLE) - |
488 | * causes the first call to _enable() to only update the pinmux | 487 | * causes the first call to _enable() to only update the pinmux |
489 | */ | 488 | */ |
490 | #define _HWMOD_NO_MPU_PORT (1 << 0) | 489 | #define _HWMOD_NO_MPU_PORT (1 << 0) |
491 | #define _HWMOD_WAKEUP_ENABLED (1 << 1) | 490 | #define _HWMOD_SYSCONFIG_LOADED (1 << 1) |
492 | #define _HWMOD_SYSCONFIG_LOADED (1 << 2) | 491 | #define _HWMOD_SKIP_ENABLE (1 << 2) |
493 | #define _HWMOD_SKIP_ENABLE (1 << 3) | ||
494 | 492 | ||
495 | /* | 493 | /* |
496 | * omap_hwmod._state definitions | 494 | * omap_hwmod._state definitions |
diff --git a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c index 26eee4a556ad..31bea1ce3de1 100644 --- a/arch/arm/mach-omap2/omap_hwmod_33xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_33xx_data.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "prm-regbits-33xx.h" | 28 | #include "prm-regbits-33xx.h" |
29 | #include "i2c.h" | 29 | #include "i2c.h" |
30 | #include "mmc.h" | 30 | #include "mmc.h" |
31 | #include "wd_timer.h" | ||
31 | 32 | ||
32 | /* | 33 | /* |
33 | * IP blocks | 34 | * IP blocks |
@@ -2087,8 +2088,21 @@ static struct omap_hwmod am33xx_uart6_hwmod = { | |||
2087 | }; | 2088 | }; |
2088 | 2089 | ||
2089 | /* 'wd_timer' class */ | 2090 | /* 'wd_timer' class */ |
2091 | static struct omap_hwmod_class_sysconfig wdt_sysc = { | ||
2092 | .rev_offs = 0x0, | ||
2093 | .sysc_offs = 0x10, | ||
2094 | .syss_offs = 0x14, | ||
2095 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SIDLEMODE | | ||
2096 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
2097 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
2098 | SIDLE_SMART_WKUP), | ||
2099 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2100 | }; | ||
2101 | |||
2090 | static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = { | 2102 | static struct omap_hwmod_class am33xx_wd_timer_hwmod_class = { |
2091 | .name = "wd_timer", | 2103 | .name = "wd_timer", |
2104 | .sysc = &wdt_sysc, | ||
2105 | .pre_shutdown = &omap2_wd_timer_disable, | ||
2092 | }; | 2106 | }; |
2093 | 2107 | ||
2094 | /* | 2108 | /* |
@@ -2099,6 +2113,7 @@ static struct omap_hwmod am33xx_wd_timer1_hwmod = { | |||
2099 | .name = "wd_timer2", | 2113 | .name = "wd_timer2", |
2100 | .class = &am33xx_wd_timer_hwmod_class, | 2114 | .class = &am33xx_wd_timer_hwmod_class, |
2101 | .clkdm_name = "l4_wkup_clkdm", | 2115 | .clkdm_name = "l4_wkup_clkdm", |
2116 | .flags = HWMOD_SWSUP_SIDLE, | ||
2102 | .main_clk = "wdt1_fck", | 2117 | .main_clk = "wdt1_fck", |
2103 | .prcm = { | 2118 | .prcm = { |
2104 | .omap4 = { | 2119 | .omap4 = { |
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 8e61d80bf6b3..89cad4a605dd 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -52,7 +52,6 @@ enum { | |||
52 | #define ALREADYACTIVE_SWITCH 0 | 52 | #define ALREADYACTIVE_SWITCH 0 |
53 | #define FORCEWAKEUP_SWITCH 1 | 53 | #define FORCEWAKEUP_SWITCH 1 |
54 | #define LOWPOWERSTATE_SWITCH 2 | 54 | #define LOWPOWERSTATE_SWITCH 2 |
55 | #define ERROR_SWITCH 3 | ||
56 | 55 | ||
57 | /* pwrdm_list contains all registered struct powerdomains */ | 56 | /* pwrdm_list contains all registered struct powerdomains */ |
58 | static LIST_HEAD(pwrdm_list); | 57 | static LIST_HEAD(pwrdm_list); |
@@ -233,10 +232,7 @@ static u8 _pwrdm_save_clkdm_state_and_activate(struct powerdomain *pwrdm, | |||
233 | { | 232 | { |
234 | u8 sleep_switch; | 233 | u8 sleep_switch; |
235 | 234 | ||
236 | if (curr_pwrst < 0) { | 235 | if (curr_pwrst < PWRDM_POWER_ON) { |
237 | WARN_ON(1); | ||
238 | sleep_switch = ERROR_SWITCH; | ||
239 | } else if (curr_pwrst < PWRDM_POWER_ON) { | ||
240 | if (curr_pwrst > pwrst && | 236 | if (curr_pwrst > pwrst && |
241 | pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE && | 237 | pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE && |
242 | arch_pwrdm->pwrdm_set_lowpwrstchange) { | 238 | arch_pwrdm->pwrdm_set_lowpwrstchange) { |
@@ -1091,7 +1087,8 @@ int pwrdm_post_transition(struct powerdomain *pwrdm) | |||
1091 | */ | 1087 | */ |
1092 | int omap_set_pwrdm_state(struct powerdomain *pwrdm, u8 pwrst) | 1088 | int omap_set_pwrdm_state(struct powerdomain *pwrdm, u8 pwrst) |
1093 | { | 1089 | { |
1094 | u8 curr_pwrst, next_pwrst, sleep_switch; | 1090 | u8 next_pwrst, sleep_switch; |
1091 | int curr_pwrst; | ||
1095 | int ret = 0; | 1092 | int ret = 0; |
1096 | bool hwsup = false; | 1093 | bool hwsup = false; |
1097 | 1094 | ||
@@ -1107,16 +1104,17 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u8 pwrst) | |||
1107 | pwrdm_lock(pwrdm); | 1104 | pwrdm_lock(pwrdm); |
1108 | 1105 | ||
1109 | curr_pwrst = pwrdm_read_pwrst(pwrdm); | 1106 | curr_pwrst = pwrdm_read_pwrst(pwrdm); |
1107 | if (curr_pwrst < 0) { | ||
1108 | ret = -EINVAL; | ||
1109 | goto osps_out; | ||
1110 | } | ||
1111 | |||
1110 | next_pwrst = pwrdm_read_next_pwrst(pwrdm); | 1112 | next_pwrst = pwrdm_read_next_pwrst(pwrdm); |
1111 | if (curr_pwrst == pwrst && next_pwrst == pwrst) | 1113 | if (curr_pwrst == pwrst && next_pwrst == pwrst) |
1112 | goto osps_out; | 1114 | goto osps_out; |
1113 | 1115 | ||
1114 | sleep_switch = _pwrdm_save_clkdm_state_and_activate(pwrdm, curr_pwrst, | 1116 | sleep_switch = _pwrdm_save_clkdm_state_and_activate(pwrdm, curr_pwrst, |
1115 | pwrst, &hwsup); | 1117 | pwrst, &hwsup); |
1116 | if (sleep_switch == ERROR_SWITCH) { | ||
1117 | ret = -EINVAL; | ||
1118 | goto osps_out; | ||
1119 | } | ||
1120 | 1118 | ||
1121 | ret = pwrdm_set_next_pwrst(pwrdm, pwrst); | 1119 | ret = pwrdm_set_next_pwrst(pwrdm, pwrst); |
1122 | if (ret) | 1120 | if (ret) |
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c index d35f98aabf7a..415c7e0c9393 100644 --- a/arch/arm/mach-omap2/prm44xx.c +++ b/arch/arm/mach-omap2/prm44xx.c | |||
@@ -81,13 +81,13 @@ static struct prm_reset_src_map omap44xx_prm_reset_src_map[] = { | |||
81 | /* Read a register in a CM/PRM instance in the PRM module */ | 81 | /* Read a register in a CM/PRM instance in the PRM module */ |
82 | u32 omap4_prm_read_inst_reg(s16 inst, u16 reg) | 82 | u32 omap4_prm_read_inst_reg(s16 inst, u16 reg) |
83 | { | 83 | { |
84 | return __raw_readl(OMAP44XX_PRM_REGADDR(inst, reg)); | 84 | return __raw_readl(prm_base + inst + reg); |
85 | } | 85 | } |
86 | 86 | ||
87 | /* Write into a register in a CM/PRM instance in the PRM module */ | 87 | /* Write into a register in a CM/PRM instance in the PRM module */ |
88 | void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg) | 88 | void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 reg) |
89 | { | 89 | { |
90 | __raw_writel(val, OMAP44XX_PRM_REGADDR(inst, reg)); | 90 | __raw_writel(val, prm_base + inst + reg); |
91 | } | 91 | } |
92 | 92 | ||
93 | /* Read-modify-write a register in a PRM module. Caller must lock */ | 93 | /* Read-modify-write a register in a PRM module. Caller must lock */ |
@@ -650,7 +650,7 @@ static struct prm_ll_data omap44xx_prm_ll_data = { | |||
650 | 650 | ||
651 | int __init omap44xx_prm_init(void) | 651 | int __init omap44xx_prm_init(void) |
652 | { | 652 | { |
653 | if (!cpu_is_omap44xx()) | 653 | if (!cpu_is_omap44xx() && !soc_is_omap54xx()) |
654 | return 0; | 654 | return 0; |
655 | 655 | ||
656 | return prm_register(&omap44xx_prm_ll_data); | 656 | return prm_register(&omap44xx_prm_ll_data); |
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h index c62116bbc760..18fdeeb3a44a 100644 --- a/arch/arm/mach-omap2/soc.h +++ b/arch/arm/mach-omap2/soc.h | |||
@@ -413,7 +413,9 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
413 | 413 | ||
414 | #define OMAP54XX_CLASS 0x54000054 | 414 | #define OMAP54XX_CLASS 0x54000054 |
415 | #define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8)) | 415 | #define OMAP5430_REV_ES1_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x10 << 8)) |
416 | #define OMAP5430_REV_ES2_0 (OMAP54XX_CLASS | (0x30 << 16) | (0x20 << 8)) | ||
416 | #define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8)) | 417 | #define OMAP5432_REV_ES1_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x10 << 8)) |
418 | #define OMAP5432_REV_ES2_0 (OMAP54XX_CLASS | (0x32 << 16) | (0x20 << 8)) | ||
417 | 419 | ||
418 | void omap2xxx_check_revision(void); | 420 | void omap2xxx_check_revision(void); |
419 | void omap3xxx_check_revision(void); | 421 | void omap3xxx_check_revision(void); |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index f62b509ed08d..d00d89c93f1c 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #define OMAP2_MPU_SOURCE "sys_ck" | 62 | #define OMAP2_MPU_SOURCE "sys_ck" |
63 | #define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE | 63 | #define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE |
64 | #define OMAP4_MPU_SOURCE "sys_clkin_ck" | 64 | #define OMAP4_MPU_SOURCE "sys_clkin_ck" |
65 | #define OMAP5_MPU_SOURCE "sys_clkin" | ||
65 | #define OMAP2_32K_SOURCE "func_32k_ck" | 66 | #define OMAP2_32K_SOURCE "func_32k_ck" |
66 | #define OMAP3_32K_SOURCE "omap_32k_fck" | 67 | #define OMAP3_32K_SOURCE "omap_32k_fck" |
67 | #define OMAP4_32K_SOURCE "sys_32k_ck" | 68 | #define OMAP4_32K_SOURCE "sys_32k_ck" |
@@ -487,7 +488,7 @@ static void __init realtime_counter_init(void) | |||
487 | pr_err("%s: ioremap failed\n", __func__); | 488 | pr_err("%s: ioremap failed\n", __func__); |
488 | return; | 489 | return; |
489 | } | 490 | } |
490 | sys_clk = clk_get(NULL, "sys_clkin_ck"); | 491 | sys_clk = clk_get(NULL, OMAP5_MPU_SOURCE); |
491 | if (IS_ERR(sys_clk)) { | 492 | if (IS_ERR(sys_clk)) { |
492 | pr_err("%s: failed to get system clock handle\n", __func__); | 493 | pr_err("%s: failed to get system clock handle\n", __func__); |
493 | iounmap(base); | 494 | iounmap(base); |
@@ -620,7 +621,7 @@ void __init omap4_local_timer_init(void) | |||
620 | 621 | ||
621 | #ifdef CONFIG_SOC_OMAP5 | 622 | #ifdef CONFIG_SOC_OMAP5 |
622 | OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", | 623 | OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon", |
623 | 2, OMAP4_MPU_SOURCE); | 624 | 2, OMAP5_MPU_SOURCE); |
624 | void __init omap5_realtime_timer_init(void) | 625 | void __init omap5_realtime_timer_init(void) |
625 | { | 626 | { |
626 | int err; | 627 | int err; |