pandora: defconfig: update
[pandora-kernel.git] / arch / arm / mach-omap2 / serial.c
index c61ba57..9ccb723 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/serial_8250.h>
 #include <linux/pm_runtime.h>
 #include <linux/console.h>
+#include <linux/module.h>
 
 #ifdef CONFIG_SERIAL_OMAP
 #include <plat/omap-serial.h>
@@ -375,6 +376,19 @@ static void omap_uart_allow_sleep(struct omap_uart_state *uart)
        del_timer(&uart->timer);
 }
 
+void omap_uart_block_sleep_id(int num)
+{
+       struct omap_uart_state *uart;
+
+       list_for_each_entry(uart, &uart_list, node) {
+               if (num == uart->num && uart->can_sleep) {
+                       omap_uart_block_sleep(uart);
+                       return;
+               }
+       }
+}
+EXPORT_SYMBOL(omap_uart_block_sleep_id);
+
 static void omap_uart_idle_timer(unsigned long data)
 {
        struct omap_uart_state *uart = (struct omap_uart_state *)data;
@@ -665,6 +679,13 @@ static int __init omap_serial_early_init(void)
                struct omap_hwmod *oh;
                struct omap_uart_state *uart;
 
+#ifdef CONFIG_OMAP3_DISABLE_UART4
+               if (i == 3) {
+                       i++;
+                       continue;
+               }
+#endif
+
                snprintf(oh_name, MAX_UART_HWMOD_NAME_LEN,
                         "uart%d", i + 1);
                oh = omap_hwmod_lookup(oh_name);