Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
[pandora-kernel.git] / arch / arm / mach-omap1 / serial.c
index b78d074..550ca9d 100644 (file)
@@ -27,6 +27,8 @@
 #include <mach/gpio.h>
 #include <plat/fpga.h>
 
+#include "pm.h"
+
 static struct clk * uart1_ck;
 static struct clk * uart2_ck;
 static struct clk * uart3_ck;
@@ -52,9 +54,11 @@ static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset,
  */
 static void __init omap_serial_reset(struct plat_serial8250_port *p)
 {
-       omap_serial_outp(p, UART_OMAP_MDR1, 0x07);      /* disable UART */
+       omap_serial_outp(p, UART_OMAP_MDR1,
+                       UART_OMAP_MDR1_DISABLE);        /* disable UART */
        omap_serial_outp(p, UART_OMAP_SCR, 0x08);       /* TX watermark */
-       omap_serial_outp(p, UART_OMAP_MDR1, 0x00);      /* enable UART */
+       omap_serial_outp(p, UART_OMAP_MDR1,
+                       UART_OMAP_MDR1_16X_MODE);       /* enable UART */
 
        if (!cpu_is_omap15xx()) {
                omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
@@ -254,6 +258,9 @@ late_initcall(omap_serial_wakeup_init);
 
 static int __init omap_init(void)
 {
+       if (!cpu_class_is_omap1())
+               return -ENODEV;
+
        return platform_device_register(&serial_device);
 }
 arch_initcall(omap_init);