diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/clock34xx_data.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock44xx_data.c | 62 | ||||
-rw-r--r-- | arch/arm/mach-omap2/cpuidle34xx.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/id.c | 41 | ||||
-rw-r--r-- | arch/arm/mach-omap2/irq.c | 22 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mmc-twl4030.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 37 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.h | 24 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux34xx.c | 47 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 47 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prcm.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prm44xx.h | 32 | ||||
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sleep34xx.S | 13 |
19 files changed, 258 insertions, 134 deletions
diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c index c6031d74d6f6..74930e3158e3 100644 --- a/arch/arm/mach-omap2/clock34xx_data.c +++ b/arch/arm/mach-omap2/clock34xx_data.c | |||
@@ -671,7 +671,6 @@ static struct clk dpll4_m3x2_ck = { | |||
671 | .name = "dpll4_m3x2_ck", | 671 | .name = "dpll4_m3x2_ck", |
672 | .ops = &clkops_omap2_dflt_wait, | 672 | .ops = &clkops_omap2_dflt_wait, |
673 | .parent = &dpll4_m3_ck, | 673 | .parent = &dpll4_m3_ck, |
674 | .init = &omap2_init_clksel_parent, | ||
675 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), | 674 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
676 | .enable_bit = OMAP3430_PWRDN_TV_SHIFT, | 675 | .enable_bit = OMAP3430_PWRDN_TV_SHIFT, |
677 | .flags = INVERT_ENABLE, | 676 | .flags = INVERT_ENABLE, |
@@ -811,7 +810,6 @@ static struct clk dpll4_m6x2_ck = { | |||
811 | .name = "dpll4_m6x2_ck", | 810 | .name = "dpll4_m6x2_ck", |
812 | .ops = &clkops_omap2_dflt_wait, | 811 | .ops = &clkops_omap2_dflt_wait, |
813 | .parent = &dpll4_m6_ck, | 812 | .parent = &dpll4_m6_ck, |
814 | .init = &omap2_init_clksel_parent, | ||
815 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), | 813 | .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
816 | .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT, | 814 | .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT, |
817 | .flags = INVERT_ENABLE, | 815 | .flags = INVERT_ENABLE, |
@@ -1047,7 +1045,6 @@ static struct clk iva2_ck = { | |||
1047 | .name = "iva2_ck", | 1045 | .name = "iva2_ck", |
1048 | .ops = &clkops_omap2_dflt_wait, | 1046 | .ops = &clkops_omap2_dflt_wait, |
1049 | .parent = &dpll2_m2_ck, | 1047 | .parent = &dpll2_m2_ck, |
1050 | .init = &omap2_init_clksel_parent, | ||
1051 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN), | 1048 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN), |
1052 | .enable_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT, | 1049 | .enable_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT, |
1053 | .clkdm_name = "iva2_clkdm", | 1050 | .clkdm_name = "iva2_clkdm", |
@@ -1121,7 +1118,6 @@ static struct clk gfx_l3_ck = { | |||
1121 | .name = "gfx_l3_ck", | 1118 | .name = "gfx_l3_ck", |
1122 | .ops = &clkops_omap2_dflt_wait, | 1119 | .ops = &clkops_omap2_dflt_wait, |
1123 | .parent = &l3_ick, | 1120 | .parent = &l3_ick, |
1124 | .init = &omap2_init_clksel_parent, | ||
1125 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN), | 1121 | .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN), |
1126 | .enable_bit = OMAP_EN_GFX_SHIFT, | 1122 | .enable_bit = OMAP_EN_GFX_SHIFT, |
1127 | .recalc = &followparent_recalc, | 1123 | .recalc = &followparent_recalc, |
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c index 2210e227d78a..9d882bcb56e3 100644 --- a/arch/arm/mach-omap2/clock44xx_data.c +++ b/arch/arm/mach-omap2/clock44xx_data.c | |||
@@ -346,37 +346,37 @@ static struct clk aess_fclk = { | |||
346 | }; | 346 | }; |
347 | 347 | ||
348 | static const struct clksel_rate div31_1to31_rates[] = { | 348 | static const struct clksel_rate div31_1to31_rates[] = { |
349 | { .div = 1, .val = 0, .flags = RATE_IN_4430 }, | 349 | { .div = 1, .val = 1, .flags = RATE_IN_4430 }, |
350 | { .div = 2, .val = 1, .flags = RATE_IN_4430 }, | 350 | { .div = 2, .val = 2, .flags = RATE_IN_4430 }, |
351 | { .div = 3, .val = 2, .flags = RATE_IN_4430 }, | 351 | { .div = 3, .val = 3, .flags = RATE_IN_4430 }, |
352 | { .div = 4, .val = 3, .flags = RATE_IN_4430 }, | 352 | { .div = 4, .val = 4, .flags = RATE_IN_4430 }, |
353 | { .div = 5, .val = 4, .flags = RATE_IN_4430 }, | 353 | { .div = 5, .val = 5, .flags = RATE_IN_4430 }, |
354 | { .div = 6, .val = 5, .flags = RATE_IN_4430 }, | 354 | { .div = 6, .val = 6, .flags = RATE_IN_4430 }, |
355 | { .div = 7, .val = 6, .flags = RATE_IN_4430 }, | 355 | { .div = 7, .val = 7, .flags = RATE_IN_4430 }, |
356 | { .div = 8, .val = 7, .flags = RATE_IN_4430 }, | 356 | { .div = 8, .val = 8, .flags = RATE_IN_4430 }, |
357 | { .div = 9, .val = 8, .flags = RATE_IN_4430 }, | 357 | { .div = 9, .val = 9, .flags = RATE_IN_4430 }, |
358 | { .div = 10, .val = 9, .flags = RATE_IN_4430 }, | 358 | { .div = 10, .val = 10, .flags = RATE_IN_4430 }, |
359 | { .div = 11, .val = 10, .flags = RATE_IN_4430 }, | 359 | { .div = 11, .val = 11, .flags = RATE_IN_4430 }, |
360 | { .div = 12, .val = 11, .flags = RATE_IN_4430 }, | 360 | { .div = 12, .val = 12, .flags = RATE_IN_4430 }, |
361 | { .div = 13, .val = 12, .flags = RATE_IN_4430 }, | 361 | { .div = 13, .val = 13, .flags = RATE_IN_4430 }, |
362 | { .div = 14, .val = 13, .flags = RATE_IN_4430 }, | 362 | { .div = 14, .val = 14, .flags = RATE_IN_4430 }, |
363 | { .div = 15, .val = 14, .flags = RATE_IN_4430 }, | 363 | { .div = 15, .val = 15, .flags = RATE_IN_4430 }, |
364 | { .div = 16, .val = 15, .flags = RATE_IN_4430 }, | 364 | { .div = 16, .val = 16, .flags = RATE_IN_4430 }, |
365 | { .div = 17, .val = 16, .flags = RATE_IN_4430 }, | 365 | { .div = 17, .val = 17, .flags = RATE_IN_4430 }, |
366 | { .div = 18, .val = 17, .flags = RATE_IN_4430 }, | 366 | { .div = 18, .val = 18, .flags = RATE_IN_4430 }, |
367 | { .div = 19, .val = 18, .flags = RATE_IN_4430 }, | 367 | { .div = 19, .val = 19, .flags = RATE_IN_4430 }, |
368 | { .div = 20, .val = 19, .flags = RATE_IN_4430 }, | 368 | { .div = 20, .val = 20, .flags = RATE_IN_4430 }, |
369 | { .div = 21, .val = 20, .flags = RATE_IN_4430 }, | 369 | { .div = 21, .val = 21, .flags = RATE_IN_4430 }, |
370 | { .div = 22, .val = 21, .flags = RATE_IN_4430 }, | 370 | { .div = 22, .val = 22, .flags = RATE_IN_4430 }, |
371 | { .div = 23, .val = 22, .flags = RATE_IN_4430 }, | 371 | { .div = 23, .val = 23, .flags = RATE_IN_4430 }, |
372 | { .div = 24, .val = 23, .flags = RATE_IN_4430 }, | 372 | { .div = 24, .val = 24, .flags = RATE_IN_4430 }, |
373 | { .div = 25, .val = 24, .flags = RATE_IN_4430 }, | 373 | { .div = 25, .val = 25, .flags = RATE_IN_4430 }, |
374 | { .div = 26, .val = 25, .flags = RATE_IN_4430 }, | 374 | { .div = 26, .val = 26, .flags = RATE_IN_4430 }, |
375 | { .div = 27, .val = 26, .flags = RATE_IN_4430 }, | 375 | { .div = 27, .val = 27, .flags = RATE_IN_4430 }, |
376 | { .div = 28, .val = 27, .flags = RATE_IN_4430 }, | 376 | { .div = 28, .val = 28, .flags = RATE_IN_4430 }, |
377 | { .div = 29, .val = 28, .flags = RATE_IN_4430 }, | 377 | { .div = 29, .val = 29, .flags = RATE_IN_4430 }, |
378 | { .div = 30, .val = 29, .flags = RATE_IN_4430 }, | 378 | { .div = 30, .val = 30, .flags = RATE_IN_4430 }, |
379 | { .div = 31, .val = 30, .flags = RATE_IN_4430 }, | 379 | { .div = 31, .val = 31, .flags = RATE_IN_4430 }, |
380 | { .div = 0 }, | 380 | { .div = 0 }, |
381 | }; | 381 | }; |
382 | 382 | ||
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index a26d6a08ae3f..12f0cbfc2894 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c | |||
@@ -137,7 +137,7 @@ return_sleep_time: | |||
137 | local_irq_enable(); | 137 | local_irq_enable(); |
138 | local_fiq_enable(); | 138 | local_fiq_enable(); |
139 | 139 | ||
140 | return (u32)timespec_to_ns(&ts_idle)/1000; | 140 | return ts_idle.tv_nsec / NSEC_PER_USEC + ts_idle.tv_sec * USEC_PER_SEC; |
141 | } | 141 | } |
142 | 142 | ||
143 | /** | 143 | /** |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index bd8cb5974726..7027cdc1ba49 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -505,7 +505,7 @@ static void __init gpmc_mem_init(void) | |||
505 | void __init gpmc_init(void) | 505 | void __init gpmc_init(void) |
506 | { | 506 | { |
507 | u32 l; | 507 | u32 l; |
508 | char *ck; | 508 | char *ck = NULL; |
509 | 509 | ||
510 | if (cpu_is_omap24xx()) { | 510 | if (cpu_is_omap24xx()) { |
511 | ck = "core_l3_ck"; | 511 | ck = "core_l3_ck"; |
@@ -521,6 +521,9 @@ void __init gpmc_init(void) | |||
521 | l = OMAP44XX_GPMC_BASE; | 521 | l = OMAP44XX_GPMC_BASE; |
522 | } | 522 | } |
523 | 523 | ||
524 | if (WARN_ON(!ck)) | ||
525 | return; | ||
526 | |||
524 | gpmc_l3_clk = clk_get(NULL, ck); | 527 | gpmc_l3_clk = clk_get(NULL, ck); |
525 | if (IS_ERR(gpmc_l3_clk)) { | 528 | if (IS_ERR(gpmc_l3_clk)) { |
526 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); | 529 | printk(KERN_ERR "Could not get GPMC clock %s\n", ck); |
@@ -534,6 +537,8 @@ void __init gpmc_init(void) | |||
534 | BUG(); | 537 | BUG(); |
535 | } | 538 | } |
536 | 539 | ||
540 | clk_enable(gpmc_l3_clk); | ||
541 | |||
537 | l = gpmc_read_reg(GPMC_REVISION); | 542 | l = gpmc_read_reg(GPMC_REVISION); |
538 | printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); | 543 | printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f); |
539 | /* Set smart idle mode and automatic L3 clock gating */ | 544 | /* Set smart idle mode and automatic L3 clock gating */ |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index a091b53657b9..3d65c50bd017 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -188,6 +188,8 @@ void __init omap3_check_revision(void) | |||
188 | u16 hawkeye; | 188 | u16 hawkeye; |
189 | u8 rev; | 189 | u8 rev; |
190 | 190 | ||
191 | omap_chip.oc = CHIP_IS_OMAP3430; | ||
192 | |||
191 | /* | 193 | /* |
192 | * We cannot access revision registers on ES1.0. | 194 | * We cannot access revision registers on ES1.0. |
193 | * If the processor type is Cortex-A8 and the revision is 0x0 | 195 | * If the processor type is Cortex-A8 and the revision is 0x0 |
@@ -196,6 +198,7 @@ void __init omap3_check_revision(void) | |||
196 | cpuid = read_cpuid(CPUID_ID); | 198 | cpuid = read_cpuid(CPUID_ID); |
197 | if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) { | 199 | if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) { |
198 | omap_revision = OMAP3430_REV_ES1_0; | 200 | omap_revision = OMAP3430_REV_ES1_0; |
201 | omap_chip.oc |= CHIP_IS_OMAP3430ES1; | ||
199 | return; | 202 | return; |
200 | } | 203 | } |
201 | 204 | ||
@@ -216,18 +219,28 @@ void __init omap3_check_revision(void) | |||
216 | case 0: /* Take care of early samples */ | 219 | case 0: /* Take care of early samples */ |
217 | case 1: | 220 | case 1: |
218 | omap_revision = OMAP3430_REV_ES2_0; | 221 | omap_revision = OMAP3430_REV_ES2_0; |
222 | omap_chip.oc |= CHIP_IS_OMAP3430ES2; | ||
219 | break; | 223 | break; |
220 | case 2: | 224 | case 2: |
221 | omap_revision = OMAP3430_REV_ES2_1; | 225 | omap_revision = OMAP3430_REV_ES2_1; |
226 | omap_chip.oc |= CHIP_IS_OMAP3430ES2; | ||
222 | break; | 227 | break; |
223 | case 3: | 228 | case 3: |
224 | omap_revision = OMAP3430_REV_ES3_0; | 229 | omap_revision = OMAP3430_REV_ES3_0; |
230 | omap_chip.oc |= CHIP_IS_OMAP3430ES3_0; | ||
225 | break; | 231 | break; |
226 | case 4: | 232 | case 4: |
233 | omap_revision = OMAP3430_REV_ES3_1; | ||
234 | omap_chip.oc |= CHIP_IS_OMAP3430ES3_1; | ||
235 | break; | ||
236 | case 7: | ||
227 | /* FALLTHROUGH */ | 237 | /* FALLTHROUGH */ |
228 | default: | 238 | default: |
229 | /* Use the latest known revision as default */ | 239 | /* Use the latest known revision as default */ |
230 | omap_revision = OMAP3430_REV_ES3_1; | 240 | omap_revision = OMAP3430_REV_ES3_1_2; |
241 | |||
242 | /* REVISIT: Add CHIP_IS_OMAP3430ES3_1_2? */ | ||
243 | omap_chip.oc |= CHIP_IS_OMAP3430ES3_1; | ||
231 | } | 244 | } |
232 | break; | 245 | break; |
233 | case 0xb868: | 246 | case 0xb868: |
@@ -235,14 +248,18 @@ void __init omap3_check_revision(void) | |||
235 | * | 248 | * |
236 | * Set the device to be OMAP3505 here. Actual device | 249 | * Set the device to be OMAP3505 here. Actual device |
237 | * is identified later based on the features. | 250 | * is identified later based on the features. |
251 | * | ||
252 | * REVISIT: AM3505/AM3517 should have their own CHIP_IS | ||
238 | */ | 253 | */ |
239 | omap_revision = OMAP3505_REV(rev); | 254 | omap_revision = OMAP3505_REV(rev); |
255 | omap_chip.oc |= CHIP_IS_OMAP3430ES3_1; | ||
240 | break; | 256 | break; |
241 | case 0xb891: | 257 | case 0xb891: |
242 | /* FALLTHROUGH */ | 258 | /* FALLTHROUGH */ |
243 | default: | 259 | default: |
244 | /* Unknown default to latest silicon rev as default*/ | 260 | /* Unknown default to latest silicon rev as default*/ |
245 | omap_revision = OMAP3630_REV_ES1_0; | 261 | omap_revision = OMAP3630_REV_ES1_0; |
262 | omap_chip.oc |= CHIP_IS_OMAP3630ES1; | ||
246 | } | 263 | } |
247 | } | 264 | } |
248 | 265 | ||
@@ -360,6 +377,7 @@ void __init omap2_check_revision(void) | |||
360 | omap3_check_revision(); | 377 | omap3_check_revision(); |
361 | omap3_check_features(); | 378 | omap3_check_features(); |
362 | omap3_cpuinfo(); | 379 | omap3_cpuinfo(); |
380 | return; | ||
363 | } else if (cpu_is_omap44xx()) { | 381 | } else if (cpu_is_omap44xx()) { |
364 | omap4_check_revision(); | 382 | omap4_check_revision(); |
365 | return; | 383 | return; |
@@ -374,27 +392,14 @@ void __init omap2_check_revision(void) | |||
374 | if (cpu_is_omap243x()) { | 392 | if (cpu_is_omap243x()) { |
375 | /* Currently only supports 2430ES2.1 and 2430-all */ | 393 | /* Currently only supports 2430ES2.1 and 2430-all */ |
376 | omap_chip.oc |= CHIP_IS_OMAP2430; | 394 | omap_chip.oc |= CHIP_IS_OMAP2430; |
395 | return; | ||
377 | } else if (cpu_is_omap242x()) { | 396 | } else if (cpu_is_omap242x()) { |
378 | /* Currently only supports 2420ES2.1.1 and 2420-all */ | 397 | /* Currently only supports 2420ES2.1.1 and 2420-all */ |
379 | omap_chip.oc |= CHIP_IS_OMAP2420; | 398 | omap_chip.oc |= CHIP_IS_OMAP2420; |
380 | } else if (cpu_is_omap3505() || cpu_is_omap3517()) { | 399 | return; |
381 | omap_chip.oc = CHIP_IS_OMAP3430 | CHIP_IS_OMAP3430ES3_1; | ||
382 | } else if (cpu_is_omap343x()) { | ||
383 | omap_chip.oc = CHIP_IS_OMAP3430; | ||
384 | if (omap_rev() == OMAP3430_REV_ES1_0) | ||
385 | omap_chip.oc |= CHIP_IS_OMAP3430ES1; | ||
386 | else if (omap_rev() >= OMAP3430_REV_ES2_0 && | ||
387 | omap_rev() <= OMAP3430_REV_ES2_1) | ||
388 | omap_chip.oc |= CHIP_IS_OMAP3430ES2; | ||
389 | else if (omap_rev() == OMAP3430_REV_ES3_0) | ||
390 | omap_chip.oc |= CHIP_IS_OMAP3430ES3_0; | ||
391 | else if (omap_rev() == OMAP3430_REV_ES3_1) | ||
392 | omap_chip.oc |= CHIP_IS_OMAP3430ES3_1; | ||
393 | else if (omap_rev() == OMAP3630_REV_ES1_0) | ||
394 | omap_chip.oc |= CHIP_IS_OMAP3630ES1; | ||
395 | } else { | ||
396 | pr_err("Uninitialized omap_chip, please fix!\n"); | ||
397 | } | 400 | } |
401 | |||
402 | pr_err("Uninitialized omap_chip, please fix!\n"); | ||
398 | } | 403 | } |
399 | 404 | ||
400 | /* | 405 | /* |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index e9bc782fa414..26aeef560aa3 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -194,7 +194,7 @@ void __init omap_init_irq(void) | |||
194 | int i; | 194 | int i; |
195 | 195 | ||
196 | for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { | 196 | for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { |
197 | unsigned long base; | 197 | unsigned long base = 0; |
198 | struct omap_irq_bank *bank = irq_banks + i; | 198 | struct omap_irq_bank *bank = irq_banks + i; |
199 | 199 | ||
200 | if (cpu_is_omap24xx()) | 200 | if (cpu_is_omap24xx()) |
@@ -202,6 +202,8 @@ void __init omap_init_irq(void) | |||
202 | else if (cpu_is_omap34xx()) | 202 | else if (cpu_is_omap34xx()) |
203 | base = OMAP34XX_IC_BASE; | 203 | base = OMAP34XX_IC_BASE; |
204 | 204 | ||
205 | BUG_ON(!base); | ||
206 | |||
205 | /* Static mapping, never released */ | 207 | /* Static mapping, never released */ |
206 | bank->base_reg = ioremap(base, SZ_4K); | 208 | bank->base_reg = ioremap(base, SZ_4K); |
207 | if (!bank->base_reg) { | 209 | if (!bank->base_reg) { |
@@ -274,4 +276,22 @@ void omap_intc_restore_context(void) | |||
274 | } | 276 | } |
275 | /* MIRs are saved and restore with other PRCM registers */ | 277 | /* MIRs are saved and restore with other PRCM registers */ |
276 | } | 278 | } |
279 | |||
280 | void omap3_intc_suspend(void) | ||
281 | { | ||
282 | /* A pending interrupt would prevent OMAP from entering suspend */ | ||
283 | omap_ack_irq(0); | ||
284 | } | ||
285 | |||
286 | void omap3_intc_prepare_idle(void) | ||
287 | { | ||
288 | /* Disable autoidle as it can stall interrupt controller */ | ||
289 | intc_bank_write_reg(0, &irq_banks[0], INTC_SYSCONFIG); | ||
290 | } | ||
291 | |||
292 | void omap3_intc_resume_idle(void) | ||
293 | { | ||
294 | /* Re-enable autoidle */ | ||
295 | intc_bank_write_reg(1, &irq_banks[0], INTC_SYSCONFIG); | ||
296 | } | ||
277 | #endif /* CONFIG_ARCH_OMAP3 */ | 297 | #endif /* CONFIG_ARCH_OMAP3 */ |
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c index 0c3c72d934bf..8afe9dd3f150 100644 --- a/arch/arm/mach-omap2/mmc-twl4030.c +++ b/arch/arm/mach-omap2/mmc-twl4030.c | |||
@@ -408,6 +408,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
408 | { | 408 | { |
409 | struct twl4030_hsmmc_info *c; | 409 | struct twl4030_hsmmc_info *c; |
410 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); | 410 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); |
411 | int i; | ||
411 | 412 | ||
412 | if (cpu_is_omap2430()) { | 413 | if (cpu_is_omap2430()) { |
413 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; | 414 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; |
@@ -434,7 +435,7 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
434 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); | 435 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); |
435 | if (!mmc) { | 436 | if (!mmc) { |
436 | pr_err("Cannot allocate memory for mmc device!\n"); | 437 | pr_err("Cannot allocate memory for mmc device!\n"); |
437 | return; | 438 | goto done; |
438 | } | 439 | } |
439 | 440 | ||
440 | if (c->name) | 441 | if (c->name) |
@@ -532,6 +533,10 @@ void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | |||
532 | continue; | 533 | continue; |
533 | c->dev = mmc->dev; | 534 | c->dev = mmc->dev; |
534 | } | 535 | } |
536 | |||
537 | done: | ||
538 | for (i = 0; i < nr_hsmmc; i++) | ||
539 | kfree(hsmmc_data[i]); | ||
535 | } | 540 | } |
536 | 541 | ||
537 | #endif | 542 | #endif |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 459ef23ab8a8..5fef73f4743d 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -51,7 +51,7 @@ struct omap_mux_entry { | |||
51 | static unsigned long mux_phys; | 51 | static unsigned long mux_phys; |
52 | static void __iomem *mux_base; | 52 | static void __iomem *mux_base; |
53 | 53 | ||
54 | static inline u16 omap_mux_read(u16 reg) | 54 | u16 omap_mux_read(u16 reg) |
55 | { | 55 | { |
56 | if (cpu_is_omap24xx()) | 56 | if (cpu_is_omap24xx()) |
57 | return __raw_readb(mux_base + reg); | 57 | return __raw_readb(mux_base + reg); |
@@ -59,7 +59,7 @@ static inline u16 omap_mux_read(u16 reg) | |||
59 | return __raw_readw(mux_base + reg); | 59 | return __raw_readw(mux_base + reg); |
60 | } | 60 | } |
61 | 61 | ||
62 | static inline void omap_mux_write(u16 val, u16 reg) | 62 | void omap_mux_write(u16 val, u16 reg) |
63 | { | 63 | { |
64 | if (cpu_is_omap24xx()) | 64 | if (cpu_is_omap24xx()) |
65 | __raw_writeb(val, mux_base + reg); | 65 | __raw_writeb(val, mux_base + reg); |
@@ -67,6 +67,14 @@ static inline void omap_mux_write(u16 val, u16 reg) | |||
67 | __raw_writew(val, mux_base + reg); | 67 | __raw_writew(val, mux_base + reg); |
68 | } | 68 | } |
69 | 69 | ||
70 | void omap_mux_write_array(struct omap_board_mux *board_mux) | ||
71 | { | ||
72 | while (board_mux->reg_offset != OMAP_MUX_TERMINATOR) { | ||
73 | omap_mux_write(board_mux->value, board_mux->reg_offset); | ||
74 | board_mux++; | ||
75 | } | ||
76 | } | ||
77 | |||
70 | #if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_OMAP_MUX) | 78 | #if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_OMAP_MUX) |
71 | 79 | ||
72 | static struct omap_mux_cfg arch_mux_cfg; | 80 | static struct omap_mux_cfg arch_mux_cfg; |
@@ -478,7 +486,7 @@ int __init omap_mux_init_signal(char *muxname, int val) | |||
478 | static inline void omap_mux_decode(struct seq_file *s, u16 val) | 486 | static inline void omap_mux_decode(struct seq_file *s, u16 val) |
479 | { | 487 | { |
480 | char *flags[OMAP_MUX_MAX_NR_FLAGS]; | 488 | char *flags[OMAP_MUX_MAX_NR_FLAGS]; |
481 | char mode[14]; | 489 | char mode[sizeof("OMAP_MUX_MODE") + 1]; |
482 | int i = -1; | 490 | int i = -1; |
483 | 491 | ||
484 | sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); | 492 | sprintf(mode, "OMAP_MUX_MODE%d", val & 0x7); |
@@ -545,6 +553,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused) | |||
545 | if (!m0_name) | 553 | if (!m0_name) |
546 | continue; | 554 | continue; |
547 | 555 | ||
556 | /* REVISIT: Needs to be updated if mode0 names get longer */ | ||
548 | for (i = 0; i < OMAP_MUX_DEFNAME_LEN; i++) { | 557 | for (i = 0; i < OMAP_MUX_DEFNAME_LEN; i++) { |
549 | if (m0_name[i] == '\0') { | 558 | if (m0_name[i] == '\0') { |
550 | m0_def[i] = m0_name[i]; | 559 | m0_def[i] = m0_name[i]; |
@@ -833,14 +842,6 @@ static void __init omap_mux_set_cmdline_signals(void) | |||
833 | kfree(options); | 842 | kfree(options); |
834 | } | 843 | } |
835 | 844 | ||
836 | static void __init omap_mux_set_board_signals(struct omap_board_mux *board_mux) | ||
837 | { | ||
838 | while (board_mux->reg_offset != OMAP_MUX_TERMINATOR) { | ||
839 | omap_mux_write(board_mux->value, board_mux->reg_offset); | ||
840 | board_mux++; | ||
841 | } | ||
842 | } | ||
843 | |||
844 | static int __init omap_mux_copy_names(struct omap_mux *src, | 845 | static int __init omap_mux_copy_names(struct omap_mux *src, |
845 | struct omap_mux *dst) | 846 | struct omap_mux *dst) |
846 | { | 847 | { |
@@ -960,7 +961,12 @@ static void __init omap_mux_init_list(struct omap_mux *superset) | |||
960 | while (superset->reg_offset != OMAP_MUX_TERMINATOR) { | 961 | while (superset->reg_offset != OMAP_MUX_TERMINATOR) { |
961 | struct omap_mux *entry; | 962 | struct omap_mux *entry; |
962 | 963 | ||
963 | #ifndef CONFIG_OMAP_MUX | 964 | #ifdef CONFIG_OMAP_MUX |
965 | if (!superset->muxnames || !superset->muxnames[0]) { | ||
966 | superset++; | ||
967 | continue; | ||
968 | } | ||
969 | #else | ||
964 | /* Skip pins that are not muxed as GPIO by bootloader */ | 970 | /* Skip pins that are not muxed as GPIO by bootloader */ |
965 | if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) { | 971 | if (!OMAP_MODE_GPIO(omap_mux_read(superset->reg_offset))) { |
966 | superset++; | 972 | superset++; |
@@ -998,12 +1004,15 @@ int __init omap_mux_init(u32 mux_pbase, u32 mux_size, | |||
998 | omap_mux_package_fixup(package_subset, superset); | 1004 | omap_mux_package_fixup(package_subset, superset); |
999 | if (package_balls) | 1005 | if (package_balls) |
1000 | omap_mux_package_init_balls(package_balls, superset); | 1006 | omap_mux_package_init_balls(package_balls, superset); |
1001 | omap_mux_set_cmdline_signals(); | ||
1002 | omap_mux_set_board_signals(board_mux); | ||
1003 | #endif | 1007 | #endif |
1004 | 1008 | ||
1005 | omap_mux_init_list(superset); | 1009 | omap_mux_init_list(superset); |
1006 | 1010 | ||
1011 | #ifdef CONFIG_OMAP_MUX | ||
1012 | omap_mux_set_cmdline_signals(); | ||
1013 | omap_mux_write_array(board_mux); | ||
1014 | #endif | ||
1015 | |||
1007 | return 0; | 1016 | return 0; |
1008 | } | 1017 | } |
1009 | 1018 | ||
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index d8b4d5ad2278..f8c2e7a8f063 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -147,6 +147,30 @@ u16 omap_mux_get_gpio(int gpio); | |||
147 | void omap_mux_set_gpio(u16 val, int gpio); | 147 | void omap_mux_set_gpio(u16 val, int gpio); |
148 | 148 | ||
149 | /** | 149 | /** |
150 | * omap_mux_read() - read mux register | ||
151 | * @mux_offset: Offset of the mux register | ||
152 | * | ||
153 | */ | ||
154 | u16 omap_mux_read(u16 mux_offset); | ||
155 | |||
156 | /** | ||
157 | * omap_mux_write() - write mux register | ||
158 | * @val: New mux register value | ||
159 | * @mux_offset: Offset of the mux register | ||
160 | * | ||
161 | * This should be only needed for dynamic remuxing of non-gpio signals. | ||
162 | */ | ||
163 | void omap_mux_write(u16 val, u16 mux_offset); | ||
164 | |||
165 | /** | ||
166 | * omap_mux_write_array() - write an array of mux registers | ||
167 | * @board_mux: Array of mux registers terminated by MAP_MUX_TERMINATOR | ||
168 | * | ||
169 | * This should be only needed for dynamic remuxing of non-gpio signals. | ||
170 | */ | ||
171 | void omap_mux_write_array(struct omap_board_mux *board_mux); | ||
172 | |||
173 | /** | ||
150 | * omap3_mux_init() - initialize mux system with board specific set | 174 | * omap3_mux_init() - initialize mux system with board specific set |
151 | * @board_mux: Board specific mux table | 175 | * @board_mux: Board specific mux table |
152 | * @flags: OMAP package type used for the board | 176 | * @flags: OMAP package type used for the board |
diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index 68e0a595f9a1..07aa7b3c95f7 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c | |||
@@ -649,6 +649,53 @@ static struct omap_mux __initdata omap3_muxmodes[] = { | |||
649 | _OMAP3_MUXENTRY(UART3_TX_IRTX, 166, | 649 | _OMAP3_MUXENTRY(UART3_TX_IRTX, 166, |
650 | "uart3_tx_irtx", NULL, NULL, NULL, | 650 | "uart3_tx_irtx", NULL, NULL, NULL, |
651 | "gpio_166", NULL, NULL, "safe_mode"), | 651 | "gpio_166", NULL, NULL, "safe_mode"), |
652 | |||
653 | /* Only on 3630, see omap36xx_cbp_subset for the signals */ | ||
654 | _OMAP3_MUXENTRY(GPMC_A11, 0, | ||
655 | NULL, NULL, NULL, NULL, | ||
656 | NULL, NULL, NULL, NULL), | ||
657 | _OMAP3_MUXENTRY(SAD2D_MBUSFLAG, 0, | ||
658 | NULL, NULL, NULL, NULL, | ||
659 | NULL, NULL, NULL, NULL), | ||
660 | _OMAP3_MUXENTRY(SAD2D_MREAD, 0, | ||
661 | NULL, NULL, NULL, NULL, | ||
662 | NULL, NULL, NULL, NULL), | ||
663 | _OMAP3_MUXENTRY(SAD2D_MWRITE, 0, | ||
664 | NULL, NULL, NULL, NULL, | ||
665 | NULL, NULL, NULL, NULL), | ||
666 | _OMAP3_MUXENTRY(SAD2D_SBUSFLAG, 0, | ||
667 | NULL, NULL, NULL, NULL, | ||
668 | NULL, NULL, NULL, NULL), | ||
669 | _OMAP3_MUXENTRY(SAD2D_SREAD, 0, | ||
670 | NULL, NULL, NULL, NULL, | ||
671 | NULL, NULL, NULL, NULL), | ||
672 | _OMAP3_MUXENTRY(SAD2D_SWRITE, 0, | ||
673 | NULL, NULL, NULL, NULL, | ||
674 | NULL, NULL, NULL, NULL), | ||
675 | _OMAP3_MUXENTRY(GPMC_A11, 0, | ||
676 | NULL, NULL, NULL, NULL, | ||
677 | NULL, NULL, NULL, NULL), | ||
678 | _OMAP3_MUXENTRY(SAD2D_MCAD28, 0, | ||
679 | NULL, NULL, NULL, NULL, | ||
680 | NULL, NULL, NULL, NULL), | ||
681 | _OMAP3_MUXENTRY(SAD2D_MCAD29, 0, | ||
682 | NULL, NULL, NULL, NULL, | ||
683 | NULL, NULL, NULL, NULL), | ||
684 | _OMAP3_MUXENTRY(SAD2D_MCAD32, 0, | ||
685 | NULL, NULL, NULL, NULL, | ||
686 | NULL, NULL, NULL, NULL), | ||
687 | _OMAP3_MUXENTRY(SAD2D_MCAD33, 0, | ||
688 | NULL, NULL, NULL, NULL, | ||
689 | NULL, NULL, NULL, NULL), | ||
690 | _OMAP3_MUXENTRY(SAD2D_MCAD34, 0, | ||
691 | NULL, NULL, NULL, NULL, | ||
692 | NULL, NULL, NULL, NULL), | ||
693 | _OMAP3_MUXENTRY(SAD2D_MCAD35, 0, | ||
694 | NULL, NULL, NULL, NULL, | ||
695 | NULL, NULL, NULL, NULL), | ||
696 | _OMAP3_MUXENTRY(SAD2D_MCAD36, 0, | ||
697 | NULL, NULL, NULL, NULL, | ||
698 | NULL, NULL, NULL, NULL), | ||
652 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 699 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
653 | }; | 700 | }; |
654 | 701 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index d8c8545875b1..478ae585ca39 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -94,7 +94,8 @@ static int _update_sysc_cache(struct omap_hwmod *oh) | |||
94 | 94 | ||
95 | oh->_sysc_cache = omap_hwmod_readl(oh, oh->sysconfig->sysc_offs); | 95 | oh->_sysc_cache = omap_hwmod_readl(oh, oh->sysconfig->sysc_offs); |
96 | 96 | ||
97 | oh->_int_flags |= _HWMOD_SYSCONFIG_LOADED; | 97 | if (!(oh->sysconfig->sysc_flags & SYSC_NO_CACHE)) |
98 | oh->_int_flags |= _HWMOD_SYSCONFIG_LOADED; | ||
98 | 99 | ||
99 | return 0; | 100 | return 0; |
100 | } | 101 | } |
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 860b755d2220..a0866268aa41 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -54,8 +54,6 @@ int omap2_pm_debug; | |||
54 | regs[reg_count++].val = \ | 54 | regs[reg_count++].val = \ |
55 | __raw_readl(OMAP2_L4_IO_ADDRESS(0x480fe000 + (off))) | 55 | __raw_readl(OMAP2_L4_IO_ADDRESS(0x480fe000 + (off))) |
56 | 56 | ||
57 | static int __init pm_dbg_init(void); | ||
58 | |||
59 | void omap2_pm_dump(int mode, int resume, unsigned int us) | 57 | void omap2_pm_dump(int mode, int resume, unsigned int us) |
60 | { | 58 | { |
61 | struct reg { | 59 | struct reg { |
@@ -167,6 +165,8 @@ struct dentry *pm_dbg_dir; | |||
167 | 165 | ||
168 | static int pm_dbg_init_done; | 166 | static int pm_dbg_init_done; |
169 | 167 | ||
168 | static int __init pm_dbg_init(void); | ||
169 | |||
170 | enum { | 170 | enum { |
171 | DEBUG_FILE_COUNTERS = 0, | 171 | DEBUG_FILE_COUNTERS = 0, |
172 | DEBUG_FILE_TIMERS, | 172 | DEBUG_FILE_TIMERS, |
@@ -488,9 +488,11 @@ int pm_dbg_regset_init(int reg_set) | |||
488 | 488 | ||
489 | static int pwrdm_suspend_get(void *data, u64 *val) | 489 | static int pwrdm_suspend_get(void *data, u64 *val) |
490 | { | 490 | { |
491 | *val = omap3_pm_get_suspend_state((struct powerdomain *)data); | 491 | int ret; |
492 | ret = omap3_pm_get_suspend_state((struct powerdomain *)data); | ||
493 | *val = ret; | ||
492 | 494 | ||
493 | if (*val >= 0) | 495 | if (ret >= 0) |
494 | return 0; | 496 | return 0; |
495 | return *val; | 497 | return *val; |
496 | } | 498 | } |
@@ -604,6 +606,4 @@ static int __init pm_dbg_init(void) | |||
604 | } | 606 | } |
605 | arch_initcall(pm_dbg_init); | 607 | arch_initcall(pm_dbg_init); |
606 | 608 | ||
607 | #else | ||
608 | void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) {} | ||
609 | #endif | 609 | #endif |
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index 0bf345db7147..7a9c2d004511 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h | |||
@@ -32,12 +32,16 @@ extern struct omap_dm_timer *gptimer_wakeup; | |||
32 | #ifdef CONFIG_PM_DEBUG | 32 | #ifdef CONFIG_PM_DEBUG |
33 | extern void omap2_pm_dump(int mode, int resume, unsigned int us); | 33 | extern void omap2_pm_dump(int mode, int resume, unsigned int us); |
34 | extern int omap2_pm_debug; | 34 | extern int omap2_pm_debug; |
35 | #else | ||
36 | #define omap2_pm_dump(mode, resume, us) do {} while (0); | ||
37 | #define omap2_pm_debug 0 | ||
38 | #endif | ||
39 | |||
40 | #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) | ||
35 | extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev); | 41 | extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev); |
36 | extern int pm_dbg_regset_save(int reg_set); | 42 | extern int pm_dbg_regset_save(int reg_set); |
37 | extern int pm_dbg_regset_init(int reg_set); | 43 | extern int pm_dbg_regset_init(int reg_set); |
38 | #else | 44 | #else |
39 | #define omap2_pm_dump(mode, resume, us) do {} while (0); | ||
40 | #define omap2_pm_debug 0 | ||
41 | #define pm_dbg_update_time(pwrdm, prev) do {} while (0); | 45 | #define pm_dbg_update_time(pwrdm, prev) do {} while (0); |
42 | #define pm_dbg_regset_save(reg_set) do {} while (0); | 46 | #define pm_dbg_regset_save(reg_set) do {} while (0); |
43 | #define pm_dbg_regset_init(reg_set) do {} while (0); | 47 | #define pm_dbg_regset_init(reg_set) do {} while (0); |
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index c6cc809afb79..910a7acf542d 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
29 | #include <linux/delay.h> | ||
29 | 30 | ||
30 | #include <plat/sram.h> | 31 | #include <plat/sram.h> |
31 | #include <plat/clockdomain.h> | 32 | #include <plat/clockdomain.h> |
@@ -126,7 +127,15 @@ static void omap3_core_save_context(void) | |||
126 | /* wait for the save to complete */ | 127 | /* wait for the save to complete */ |
127 | while (!(omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS) | 128 | while (!(omap_ctrl_readl(OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS) |
128 | & PADCONF_SAVE_DONE)) | 129 | & PADCONF_SAVE_DONE)) |
129 | ; | 130 | udelay(1); |
131 | |||
132 | /* | ||
133 | * Force write last pad into memory, as this can fail in some | ||
134 | * cases according to erratas 1.157, 1.185 | ||
135 | */ | ||
136 | omap_ctrl_writel(omap_ctrl_readl(OMAP343X_PADCONF_ETK_D14), | ||
137 | OMAP343X_CONTROL_MEM_WKUP + 0x2a0); | ||
138 | |||
130 | /* Save the Interrupt controller context */ | 139 | /* Save the Interrupt controller context */ |
131 | omap_intc_save_context(); | 140 | omap_intc_save_context(); |
132 | /* Save the GPMC context */ | 141 | /* Save the GPMC context */ |
@@ -392,6 +401,7 @@ void omap_sram_idle(void) | |||
392 | prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); | 401 | prm_set_mod_reg_bits(OMAP3430_EN_IO, WKUP_MOD, PM_WKEN); |
393 | omap3_enable_io_chain(); | 402 | omap3_enable_io_chain(); |
394 | } | 403 | } |
404 | omap3_intc_prepare_idle(); | ||
395 | 405 | ||
396 | /* | 406 | /* |
397 | * On EMU/HS devices ROM code restores a SRDC value | 407 | * On EMU/HS devices ROM code restores a SRDC value |
@@ -438,6 +448,7 @@ void omap_sram_idle(void) | |||
438 | OMAP3430_GR_MOD, | 448 | OMAP3430_GR_MOD, |
439 | OMAP3_PRM_VOLTCTRL_OFFSET); | 449 | OMAP3_PRM_VOLTCTRL_OFFSET); |
440 | } | 450 | } |
451 | omap3_intc_resume_idle(); | ||
441 | 452 | ||
442 | /* PER */ | 453 | /* PER */ |
443 | if (per_next_state < PWRDM_POWER_ON) { | 454 | if (per_next_state < PWRDM_POWER_ON) { |
@@ -578,6 +589,8 @@ static int omap3_pm_suspend(void) | |||
578 | } | 589 | } |
579 | 590 | ||
580 | omap_uart_prepare_suspend(); | 591 | omap_uart_prepare_suspend(); |
592 | omap3_intc_suspend(); | ||
593 | |||
581 | omap_sram_idle(); | 594 | omap_sram_idle(); |
582 | 595 | ||
583 | restore: | 596 | restore: |
@@ -835,6 +848,8 @@ static void __init prcm_setup_regs(void) | |||
835 | CM_AUTOIDLE); | 848 | CM_AUTOIDLE); |
836 | } | 849 | } |
837 | 850 | ||
851 | omap_ctrl_writel(OMAP3430_AUTOIDLE, OMAP2_CONTROL_SYSCONFIG); | ||
852 | |||
838 | /* | 853 | /* |
839 | * Set all plls to autoidle. This is needed until autoidle is | 854 | * Set all plls to autoidle. This is needed until autoidle is |
840 | * enabled by clockfw | 855 | * enabled by clockfw |
@@ -875,15 +890,23 @@ static void __init prcm_setup_regs(void) | |||
875 | prm_write_mod_reg(OMAP3430_IO_EN | OMAP3430_WKUP_EN, | 890 | prm_write_mod_reg(OMAP3430_IO_EN | OMAP3430_WKUP_EN, |
876 | OCP_MOD, OMAP3_PRM_IRQENABLE_MPU_OFFSET); | 891 | OCP_MOD, OMAP3_PRM_IRQENABLE_MPU_OFFSET); |
877 | 892 | ||
893 | /* Enable PM_WKEN to support DSS LPR */ | ||
894 | prm_write_mod_reg(OMAP3430_PM_WKEN_DSS_EN_DSS, | ||
895 | OMAP3430_DSS_MOD, PM_WKEN); | ||
896 | |||
878 | /* Enable wakeups in PER */ | 897 | /* Enable wakeups in PER */ |
879 | prm_write_mod_reg(OMAP3430_EN_GPIO2 | OMAP3430_EN_GPIO3 | | 898 | prm_write_mod_reg(OMAP3430_EN_GPIO2 | OMAP3430_EN_GPIO3 | |
880 | OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 | | 899 | OMAP3430_EN_GPIO4 | OMAP3430_EN_GPIO5 | |
881 | OMAP3430_EN_GPIO6 | OMAP3430_EN_UART3, | 900 | OMAP3430_EN_GPIO6 | OMAP3430_EN_UART3 | |
901 | OMAP3430_EN_MCBSP2 | OMAP3430_EN_MCBSP3 | | ||
902 | OMAP3430_EN_MCBSP4, | ||
882 | OMAP3430_PER_MOD, PM_WKEN); | 903 | OMAP3430_PER_MOD, PM_WKEN); |
883 | /* and allow them to wake up MPU */ | 904 | /* and allow them to wake up MPU */ |
884 | prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2 | OMAP3430_EN_GPIO3 | | 905 | prm_write_mod_reg(OMAP3430_GRPSEL_GPIO2 | OMAP3430_EN_GPIO3 | |
885 | OMAP3430_GRPSEL_GPIO4 | OMAP3430_EN_GPIO5 | | 906 | OMAP3430_GRPSEL_GPIO4 | OMAP3430_EN_GPIO5 | |
886 | OMAP3430_GRPSEL_GPIO6 | OMAP3430_EN_UART3, | 907 | OMAP3430_GRPSEL_GPIO6 | OMAP3430_EN_UART3 | |
908 | OMAP3430_EN_MCBSP2 | OMAP3430_EN_MCBSP3 | | ||
909 | OMAP3430_EN_MCBSP4, | ||
887 | OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL); | 910 | OMAP3430_PER_MOD, OMAP3430_PM_MPUGRPSEL); |
888 | 911 | ||
889 | /* Don't attach IVA interrupts */ | 912 | /* Don't attach IVA interrupts */ |
@@ -904,24 +927,6 @@ static void __init prcm_setup_regs(void) | |||
904 | /* Clear any pending PRCM interrupts */ | 927 | /* Clear any pending PRCM interrupts */ |
905 | prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); | 928 | prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); |
906 | 929 | ||
907 | /* Don't attach IVA interrupts */ | ||
908 | prm_write_mod_reg(0, WKUP_MOD, OMAP3430_PM_IVAGRPSEL); | ||
909 | prm_write_mod_reg(0, CORE_MOD, OMAP3430_PM_IVAGRPSEL1); | ||
910 | prm_write_mod_reg(0, CORE_MOD, OMAP3430ES2_PM_IVAGRPSEL3); | ||
911 | prm_write_mod_reg(0, OMAP3430_PER_MOD, OMAP3430_PM_IVAGRPSEL); | ||
912 | |||
913 | /* Clear any pending 'reset' flags */ | ||
914 | prm_write_mod_reg(0xffffffff, MPU_MOD, RM_RSTST); | ||
915 | prm_write_mod_reg(0xffffffff, CORE_MOD, RM_RSTST); | ||
916 | prm_write_mod_reg(0xffffffff, OMAP3430_PER_MOD, RM_RSTST); | ||
917 | prm_write_mod_reg(0xffffffff, OMAP3430_EMU_MOD, RM_RSTST); | ||
918 | prm_write_mod_reg(0xffffffff, OMAP3430_NEON_MOD, RM_RSTST); | ||
919 | prm_write_mod_reg(0xffffffff, OMAP3430_DSS_MOD, RM_RSTST); | ||
920 | prm_write_mod_reg(0xffffffff, OMAP3430ES2_USBHOST_MOD, RM_RSTST); | ||
921 | |||
922 | /* Clear any pending PRCM interrupts */ | ||
923 | prm_write_mod_reg(0, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); | ||
924 | |||
925 | omap3_iva_idle(); | 930 | omap3_iva_idle(); |
926 | omap3_d2d_idle(); | 931 | omap3_d2d_idle(); |
927 | } | 932 | } |
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 3ea8177ffb25..cf466ea1dffc 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -44,7 +44,6 @@ struct omap3_prcm_regs { | |||
44 | u32 iva2_cm_clksel2; | 44 | u32 iva2_cm_clksel2; |
45 | u32 cm_sysconfig; | 45 | u32 cm_sysconfig; |
46 | u32 sgx_cm_clksel; | 46 | u32 sgx_cm_clksel; |
47 | u32 wkup_cm_clksel; | ||
48 | u32 dss_cm_clksel; | 47 | u32 dss_cm_clksel; |
49 | u32 cam_cm_clksel; | 48 | u32 cam_cm_clksel; |
50 | u32 per_cm_clksel; | 49 | u32 per_cm_clksel; |
@@ -53,7 +52,6 @@ struct omap3_prcm_regs { | |||
53 | u32 pll_cm_autoidle2; | 52 | u32 pll_cm_autoidle2; |
54 | u32 pll_cm_clksel4; | 53 | u32 pll_cm_clksel4; |
55 | u32 pll_cm_clksel5; | 54 | u32 pll_cm_clksel5; |
56 | u32 pll_cm_clken; | ||
57 | u32 pll_cm_clken2; | 55 | u32 pll_cm_clken2; |
58 | u32 cm_polctrl; | 56 | u32 cm_polctrl; |
59 | u32 iva2_cm_fclken; | 57 | u32 iva2_cm_fclken; |
@@ -77,7 +75,6 @@ struct omap3_prcm_regs { | |||
77 | u32 usbhost_cm_iclken; | 75 | u32 usbhost_cm_iclken; |
78 | u32 iva2_cm_autiidle2; | 76 | u32 iva2_cm_autiidle2; |
79 | u32 mpu_cm_autoidle2; | 77 | u32 mpu_cm_autoidle2; |
80 | u32 pll_cm_autoidle; | ||
81 | u32 iva2_cm_clkstctrl; | 78 | u32 iva2_cm_clkstctrl; |
82 | u32 mpu_cm_clkstctrl; | 79 | u32 mpu_cm_clkstctrl; |
83 | u32 core_cm_clkstctrl; | 80 | u32 core_cm_clkstctrl; |
@@ -274,7 +271,6 @@ void omap3_prcm_save_context(void) | |||
274 | prcm_context.cm_sysconfig = __raw_readl(OMAP3430_CM_SYSCONFIG); | 271 | prcm_context.cm_sysconfig = __raw_readl(OMAP3430_CM_SYSCONFIG); |
275 | prcm_context.sgx_cm_clksel = | 272 | prcm_context.sgx_cm_clksel = |
276 | cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL); | 273 | cm_read_mod_reg(OMAP3430ES2_SGX_MOD, CM_CLKSEL); |
277 | prcm_context.wkup_cm_clksel = cm_read_mod_reg(WKUP_MOD, CM_CLKSEL); | ||
278 | prcm_context.dss_cm_clksel = | 274 | prcm_context.dss_cm_clksel = |
279 | cm_read_mod_reg(OMAP3430_DSS_MOD, CM_CLKSEL); | 275 | cm_read_mod_reg(OMAP3430_DSS_MOD, CM_CLKSEL); |
280 | prcm_context.cam_cm_clksel = | 276 | prcm_context.cam_cm_clksel = |
@@ -291,8 +287,6 @@ void omap3_prcm_save_context(void) | |||
291 | cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL4); | 287 | cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL4); |
292 | prcm_context.pll_cm_clksel5 = | 288 | prcm_context.pll_cm_clksel5 = |
293 | cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5); | 289 | cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKSEL5); |
294 | prcm_context.pll_cm_clken = | ||
295 | cm_read_mod_reg(PLL_MOD, CM_CLKEN); | ||
296 | prcm_context.pll_cm_clken2 = | 290 | prcm_context.pll_cm_clken2 = |
297 | cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2); | 291 | cm_read_mod_reg(PLL_MOD, OMAP3430ES2_CM_CLKEN2); |
298 | prcm_context.cm_polctrl = __raw_readl(OMAP3430_CM_POLCTRL); | 292 | prcm_context.cm_polctrl = __raw_readl(OMAP3430_CM_POLCTRL); |
@@ -338,8 +332,6 @@ void omap3_prcm_save_context(void) | |||
338 | cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_AUTOIDLE2); | 332 | cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_AUTOIDLE2); |
339 | prcm_context.mpu_cm_autoidle2 = | 333 | prcm_context.mpu_cm_autoidle2 = |
340 | cm_read_mod_reg(MPU_MOD, CM_AUTOIDLE2); | 334 | cm_read_mod_reg(MPU_MOD, CM_AUTOIDLE2); |
341 | prcm_context.pll_cm_autoidle = | ||
342 | cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE); | ||
343 | prcm_context.iva2_cm_clkstctrl = | 335 | prcm_context.iva2_cm_clkstctrl = |
344 | cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSTCTRL); | 336 | cm_read_mod_reg(OMAP3430_IVA2_MOD, CM_CLKSTCTRL); |
345 | prcm_context.mpu_cm_clkstctrl = | 337 | prcm_context.mpu_cm_clkstctrl = |
@@ -431,7 +423,6 @@ void omap3_prcm_restore_context(void) | |||
431 | __raw_writel(prcm_context.cm_sysconfig, OMAP3430_CM_SYSCONFIG); | 423 | __raw_writel(prcm_context.cm_sysconfig, OMAP3430_CM_SYSCONFIG); |
432 | cm_write_mod_reg(prcm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD, | 424 | cm_write_mod_reg(prcm_context.sgx_cm_clksel, OMAP3430ES2_SGX_MOD, |
433 | CM_CLKSEL); | 425 | CM_CLKSEL); |
434 | cm_write_mod_reg(prcm_context.wkup_cm_clksel, WKUP_MOD, CM_CLKSEL); | ||
435 | cm_write_mod_reg(prcm_context.dss_cm_clksel, OMAP3430_DSS_MOD, | 426 | cm_write_mod_reg(prcm_context.dss_cm_clksel, OMAP3430_DSS_MOD, |
436 | CM_CLKSEL); | 427 | CM_CLKSEL); |
437 | cm_write_mod_reg(prcm_context.cam_cm_clksel, OMAP3430_CAM_MOD, | 428 | cm_write_mod_reg(prcm_context.cam_cm_clksel, OMAP3430_CAM_MOD, |
@@ -448,7 +439,6 @@ void omap3_prcm_restore_context(void) | |||
448 | OMAP3430ES2_CM_CLKSEL4); | 439 | OMAP3430ES2_CM_CLKSEL4); |
449 | cm_write_mod_reg(prcm_context.pll_cm_clksel5, PLL_MOD, | 440 | cm_write_mod_reg(prcm_context.pll_cm_clksel5, PLL_MOD, |
450 | OMAP3430ES2_CM_CLKSEL5); | 441 | OMAP3430ES2_CM_CLKSEL5); |
451 | cm_write_mod_reg(prcm_context.pll_cm_clken, PLL_MOD, CM_CLKEN); | ||
452 | cm_write_mod_reg(prcm_context.pll_cm_clken2, PLL_MOD, | 442 | cm_write_mod_reg(prcm_context.pll_cm_clken2, PLL_MOD, |
453 | OMAP3430ES2_CM_CLKEN2); | 443 | OMAP3430ES2_CM_CLKEN2); |
454 | __raw_writel(prcm_context.cm_polctrl, OMAP3430_CM_POLCTRL); | 444 | __raw_writel(prcm_context.cm_polctrl, OMAP3430_CM_POLCTRL); |
@@ -487,7 +477,6 @@ void omap3_prcm_restore_context(void) | |||
487 | cm_write_mod_reg(prcm_context.iva2_cm_autiidle2, OMAP3430_IVA2_MOD, | 477 | cm_write_mod_reg(prcm_context.iva2_cm_autiidle2, OMAP3430_IVA2_MOD, |
488 | CM_AUTOIDLE2); | 478 | CM_AUTOIDLE2); |
489 | cm_write_mod_reg(prcm_context.mpu_cm_autoidle2, MPU_MOD, CM_AUTOIDLE2); | 479 | cm_write_mod_reg(prcm_context.mpu_cm_autoidle2, MPU_MOD, CM_AUTOIDLE2); |
490 | cm_write_mod_reg(prcm_context.pll_cm_autoidle, PLL_MOD, CM_AUTOIDLE); | ||
491 | cm_write_mod_reg(prcm_context.iva2_cm_clkstctrl, OMAP3430_IVA2_MOD, | 480 | cm_write_mod_reg(prcm_context.iva2_cm_clkstctrl, OMAP3430_IVA2_MOD, |
492 | CM_CLKSTCTRL); | 481 | CM_CLKSTCTRL); |
493 | cm_write_mod_reg(prcm_context.mpu_cm_clkstctrl, MPU_MOD, CM_CLKSTCTRL); | 482 | cm_write_mod_reg(prcm_context.mpu_cm_clkstctrl, MPU_MOD, CM_CLKSTCTRL); |
diff --git a/arch/arm/mach-omap2/prm.h b/arch/arm/mach-omap2/prm.h index ea050ce188a7..40f006285163 100644 --- a/arch/arm/mach-omap2/prm.h +++ b/arch/arm/mach-omap2/prm.h | |||
@@ -24,6 +24,8 @@ | |||
24 | OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) | 24 | OMAP2_L4_IO_ADDRESS(OMAP3430_PRM_BASE + (module) + (reg)) |
25 | #define OMAP44XX_PRM_REGADDR(module, reg) \ | 25 | #define OMAP44XX_PRM_REGADDR(module, reg) \ |
26 | OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (module) + (reg)) | 26 | OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (module) + (reg)) |
27 | #define OMAP44XX_CHIRONSS_REGADDR(module, reg) \ | ||
28 | OMAP2_L4_IO_ADDRESS(OMAP4430_CHIRONSS_BASE + (module) + (reg)) | ||
27 | 29 | ||
28 | #include "prm44xx.h" | 30 | #include "prm44xx.h" |
29 | 31 | ||
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h index 89be97f0589d..adb2558bb121 100644 --- a/arch/arm/mach-omap2/prm44xx.h +++ b/arch/arm/mach-omap2/prm44xx.h | |||
@@ -386,26 +386,26 @@ | |||
386 | 386 | ||
387 | 387 | ||
388 | /* CHIRON_PRCM.CHIRONSS_OCP_SOCKET_PRCM register offsets */ | 388 | /* CHIRON_PRCM.CHIRONSS_OCP_SOCKET_PRCM register offsets */ |
389 | #define OMAP4430_REVISION_PRCM OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_OCP_SOCKET_PRCM_MOD, 0x0000) | 389 | #define OMAP4430_REVISION_PRCM OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_OCP_SOCKET_PRCM_MOD, 0x0000) |
390 | 390 | ||
391 | /* CHIRON_PRCM.CHIRONSS_DEVICE_PRM register offsets */ | 391 | /* CHIRON_PRCM.CHIRONSS_DEVICE_PRM register offsets */ |
392 | #define OMAP4430_CHIRON_PRCM_PRM_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_DEVICE_PRM_MOD, 0x0000) | 392 | #define OMAP4430_CHIRON_PRCM_PRM_RSTST OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_DEVICE_PRM_MOD, 0x0000) |
393 | 393 | ||
394 | /* CHIRON_PRCM.CHIRONSS_CPU0 register offsets */ | 394 | /* CHIRON_PRCM.CHIRONSS_CPU0 register offsets */ |
395 | #define OMAP4430_PM_PDA_CPU0_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0000) | 395 | #define OMAP4430_PM_PDA_CPU0_PWRSTCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0000) |
396 | #define OMAP4430_PM_PDA_CPU0_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0004) | 396 | #define OMAP4430_PM_PDA_CPU0_PWRSTST OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0004) |
397 | #define OMAP4430_RM_PDA_CPU0_CPU0_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0008) | 397 | #define OMAP4430_RM_PDA_CPU0_CPU0_CONTEXT OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0008) |
398 | #define OMAP4430_RM_PDA_CPU0_CPU0_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x000c) | 398 | #define OMAP4430_RM_PDA_CPU0_CPU0_RSTCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x000c) |
399 | #define OMAP4430_RM_PDA_CPU0_CPU0_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0010) | 399 | #define OMAP4430_RM_PDA_CPU0_CPU0_RSTST OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0010) |
400 | #define OMAP4430_CM_PDA_CPU0_CPU0_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0014) | 400 | #define OMAP4430_CM_PDA_CPU0_CPU0_CLKCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0014) |
401 | #define OMAP4430_CM_PDA_CPU0_CLKSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0018) | 401 | #define OMAP4430_CM_PDA_CPU0_CLKSTCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU0_MOD, 0x0018) |
402 | 402 | ||
403 | /* CHIRON_PRCM.CHIRONSS_CPU1 register offsets */ | 403 | /* CHIRON_PRCM.CHIRONSS_CPU1 register offsets */ |
404 | #define OMAP4430_PM_PDA_CPU1_PWRSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0000) | 404 | #define OMAP4430_PM_PDA_CPU1_PWRSTCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0000) |
405 | #define OMAP4430_PM_PDA_CPU1_PWRSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0004) | 405 | #define OMAP4430_PM_PDA_CPU1_PWRSTST OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0004) |
406 | #define OMAP4430_RM_PDA_CPU1_CPU1_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0008) | 406 | #define OMAP4430_RM_PDA_CPU1_CPU1_CONTEXT OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0008) |
407 | #define OMAP4430_RM_PDA_CPU1_CPU1_RSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x000c) | 407 | #define OMAP4430_RM_PDA_CPU1_CPU1_RSTCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x000c) |
408 | #define OMAP4430_RM_PDA_CPU1_CPU1_RSTST OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0010) | 408 | #define OMAP4430_RM_PDA_CPU1_CPU1_RSTST OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0010) |
409 | #define OMAP4430_CM_PDA_CPU1_CPU1_CLKCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0014) | 409 | #define OMAP4430_CM_PDA_CPU1_CPU1_CLKCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0014) |
410 | #define OMAP4430_CM_PDA_CPU1_CLKSTCTRL OMAP44XX_PRM_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0018) | 410 | #define OMAP4430_CM_PDA_CPU1_CLKSTCTRL OMAP44XX_CHIRONSS_REGADDR(OMAP4430_CHIRONSS_CHIRONSS_CPU1_MOD, 0x0018) |
411 | #endif | 411 | #endif |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 8c964bec8159..e10a02df6e1d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -36,7 +36,13 @@ | |||
36 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 | 36 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 |
37 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | 37 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ |
38 | 38 | ||
39 | #define DEFAULT_TIMEOUT (5 * HZ) | 39 | /* |
40 | * NOTE: By default the serial timeout is disabled as it causes lost characters | ||
41 | * over the serial ports. This means that the UART clocks will stay on until | ||
42 | * disabled via sysfs. This also causes that any deeper omap sleep states are | ||
43 | * blocked. | ||
44 | */ | ||
45 | #define DEFAULT_TIMEOUT 0 | ||
40 | 46 | ||
41 | struct omap_uart_state { | 47 | struct omap_uart_state { |
42 | int num; | 48 | int num; |
@@ -422,7 +428,8 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
422 | uart->timeout = DEFAULT_TIMEOUT; | 428 | uart->timeout = DEFAULT_TIMEOUT; |
423 | setup_timer(&uart->timer, omap_uart_idle_timer, | 429 | setup_timer(&uart->timer, omap_uart_idle_timer, |
424 | (unsigned long) uart); | 430 | (unsigned long) uart); |
425 | mod_timer(&uart->timer, jiffies + uart->timeout); | 431 | if (uart->timeout) |
432 | mod_timer(&uart->timer, jiffies + uart->timeout); | ||
426 | omap_uart_smart_idle_enable(uart, 0); | 433 | omap_uart_smart_idle_enable(uart, 0); |
427 | 434 | ||
428 | if (cpu_is_omap34xx()) { | 435 | if (cpu_is_omap34xx()) { |
diff --git a/arch/arm/mach-omap2/sleep34xx.S b/arch/arm/mach-omap2/sleep34xx.S index 15268f8b61de..c3626ea48143 100644 --- a/arch/arm/mach-omap2/sleep34xx.S +++ b/arch/arm/mach-omap2/sleep34xx.S | |||
@@ -245,7 +245,8 @@ restore: | |||
245 | mov r1, #0 @ set task id for ROM code in r1 | 245 | mov r1, #0 @ set task id for ROM code in r1 |
246 | mov r2, #4 @ set some flags in r2, r6 | 246 | mov r2, #4 @ set some flags in r2, r6 |
247 | mov r6, #0xff | 247 | mov r6, #0xff |
248 | adr r3, write_aux_control_params @ r3 points to parameters | 248 | ldr r4, scratchpad_base |
249 | ldr r3, [r4, #0xBC] @ r3 points to parameters | ||
249 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier | 250 | mcr p15, 0, r0, c7, c10, 4 @ data write barrier |
250 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier | 251 | mcr p15, 0, r0, c7, c10, 5 @ data memory barrier |
251 | .word 0xE1600071 @ call SMI monitor (smi #1) | 252 | .word 0xE1600071 @ call SMI monitor (smi #1) |
@@ -253,14 +254,14 @@ restore: | |||
253 | b logic_l1_restore | 254 | b logic_l1_restore |
254 | l2_inv_api_params: | 255 | l2_inv_api_params: |
255 | .word 0x1, 0x00 | 256 | .word 0x1, 0x00 |
256 | write_aux_control_params: | ||
257 | .word 0x1, 0x72 | ||
258 | l2_inv_gp: | 257 | l2_inv_gp: |
259 | /* Execute smi to invalidate L2 cache */ | 258 | /* Execute smi to invalidate L2 cache */ |
260 | mov r12, #0x1 @ set up to invalide L2 | 259 | mov r12, #0x1 @ set up to invalide L2 |
261 | smi: .word 0xE1600070 @ Call SMI monitor (smieq) | 260 | smi: .word 0xE1600070 @ Call SMI monitor (smieq) |
262 | /* Write to Aux control register to set some bits */ | 261 | /* Write to Aux control register to set some bits */ |
263 | mov r0, #0x72 | 262 | ldr r4, scratchpad_base |
263 | ldr r3, [r4,#0xBC] | ||
264 | ldr r0, [r3,#4] | ||
264 | mov r12, #0x3 | 265 | mov r12, #0x3 |
265 | .word 0xE1600070 @ Call SMI monitor (smieq) | 266 | .word 0xE1600070 @ Call SMI monitor (smieq) |
266 | logic_l1_restore: | 267 | logic_l1_restore: |
@@ -271,6 +272,7 @@ logic_l1_restore: | |||
271 | 272 | ||
272 | ldr r4, scratchpad_base | 273 | ldr r4, scratchpad_base |
273 | ldr r3, [r4,#0xBC] | 274 | ldr r3, [r4,#0xBC] |
275 | adds r3, r3, #8 | ||
274 | ldmia r3!, {r4-r6} | 276 | ldmia r3!, {r4-r6} |
275 | mov sp, r4 | 277 | mov sp, r4 |
276 | msr spsr_cxsf, r5 | 278 | msr spsr_cxsf, r5 |
@@ -387,6 +389,9 @@ usettbr0: | |||
387 | save_context_wfi: | 389 | save_context_wfi: |
388 | /*b save_context_wfi*/ @ enable to debug save code | 390 | /*b save_context_wfi*/ @ enable to debug save code |
389 | mov r8, r0 /* Store SDRAM address in r8 */ | 391 | mov r8, r0 /* Store SDRAM address in r8 */ |
392 | mrc p15, 0, r5, c1, c0, 1 @ Read Auxiliary Control Register | ||
393 | mov r4, #0x1 @ Number of parameters for restore call | ||
394 | stmia r8!, {r4-r5} | ||
390 | /* Check what that target sleep state is:stored in r1*/ | 395 | /* Check what that target sleep state is:stored in r1*/ |
391 | /* 1 - Only L1 and logic lost */ | 396 | /* 1 - Only L1 and logic lost */ |
392 | /* 2 - Only L2 lost */ | 397 | /* 2 - Only L2 lost */ |