Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
OMAP2+: PM/serial: hold console semaphore while OMAP UARTs are disabled
OMAP: UART: don't resume UARTs that are not enabled.

+23 -1
+7
arch/arm/mach-omap2/pm24xx.c
··· 30 30 #include <linux/irq.h> 31 31 #include <linux/time.h> 32 32 #include <linux/gpio.h> 33 + #include <linux/console.h> 33 34 34 35 #include <asm/mach/time.h> 35 36 #include <asm/mach/irq.h> ··· 119 118 if (omap_irq_pending()) 120 119 goto no_sleep; 121 120 121 + /* Block console output in case it is on one of the OMAP UARTs */ 122 + if (try_acquire_console_sem()) 123 + goto no_sleep; 124 + 122 125 omap_uart_prepare_idle(0); 123 126 omap_uart_prepare_idle(1); 124 127 omap_uart_prepare_idle(2); ··· 135 130 omap_uart_resume_idle(2); 136 131 omap_uart_resume_idle(1); 137 132 omap_uart_resume_idle(0); 133 + 134 + release_console_sem(); 138 135 139 136 no_sleep: 140 137 if (omap2_pm_debug) {
+10
arch/arm/mach-omap2/pm34xx.c
··· 28 28 #include <linux/clk.h> 29 29 #include <linux/delay.h> 30 30 #include <linux/slab.h> 31 + #include <linux/console.h> 31 32 32 33 #include <plat/sram.h> 33 34 #include <plat/clockdomain.h> ··· 386 385 omap3_enable_io_chain(); 387 386 } 388 387 388 + /* Block console output in case it is on one of the OMAP UARTs */ 389 + if (per_next_state < PWRDM_POWER_ON || 390 + core_next_state < PWRDM_POWER_ON) 391 + if (try_acquire_console_sem()) 392 + goto console_still_active; 393 + 389 394 /* PER */ 390 395 if (per_next_state < PWRDM_POWER_ON) { 391 396 omap_uart_prepare_idle(2); ··· 470 463 omap_uart_resume_idle(3); 471 464 } 472 465 466 + release_console_sem(); 467 + 468 + console_still_active: 473 469 /* Disable IO-PAD and IO-CHAIN wakeup */ 474 470 if (omap3_has_io_wakeup() && 475 471 (per_next_state < PWRDM_POWER_ON ||
+6 -1
arch/arm/mach-omap2/serial.c
··· 27 27 #include <linux/slab.h> 28 28 #include <linux/serial_8250.h> 29 29 #include <linux/pm_runtime.h> 30 + #include <linux/console.h> 30 31 31 32 #ifdef CONFIG_SERIAL_OMAP 32 33 #include <plat/omap-serial.h> ··· 407 406 struct omap_uart_state *uart; 408 407 409 408 list_for_each_entry(uart, &uart_list, node) { 410 - if (num == uart->num) { 409 + if (num == uart->num && uart->can_sleep) { 411 410 omap_uart_enable_clocks(uart); 412 411 413 412 /* Check for IO pad wakeup */ ··· 808 807 809 808 oh->dev_attr = uart; 810 809 810 + acquire_console_sem(); /* in case the earlycon is on the UART */ 811 + 811 812 /* 812 813 * Because of early UART probing, UART did not get idled 813 814 * on init. Now that omap_device is ready, ensure full idle ··· 833 830 uart->timeout = (30 * HZ); 834 831 omap_uart_block_sleep(uart); 835 832 uart->timeout = DEFAULT_TIMEOUT; 833 + 834 + release_console_sem(); 836 835 837 836 if ((cpu_is_omap34xx() && uart->padconf) || 838 837 (uart->wk_en && uart->wk_mask)) {