]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/amirix/ap1000/serial.c
imported Freescale specific U-Boot additions for i.MX28,... release L2.6.31_10.08.01
[karo-tx-uboot.git] / board / amirix / ap1000 / serial.c
index c6ee7728129db67f0cfa3dab0b3b5fcb8019ebc8..87003be9c12450c21e9e4c0c6be8ee25d534fe1c 100755 (executable)
@@ -19,9 +19,9 @@
  *
  */
 
+#include <common.h>
 #include <asm/u-boot.h>
 #include <asm/processor.h>
-#include <common.h>
 #include <command.h>
 #include <config.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
 const NS16550_t COM_PORTS[] =
-       { (NS16550_t) CFG_NS16550_COM1, (NS16550_t) CFG_NS16550_COM2 };
+       { (NS16550_t) CONFIG_SYS_NS16550_COM1, (NS16550_t) CONFIG_SYS_NS16550_COM2 };
 
-#undef CFG_DUART_CHAN
-#define CFG_DUART_CHAN gComPort
+#undef CONFIG_SYS_DUART_CHAN
+#define CONFIG_SYS_DUART_CHAN gComPort
 static int gComPort = 0;
 
 int serial_init (void)
 {
-       int clock_divisor = CFG_NS16550_CLK / 16 / gd->baudrate;
+       int clock_divisor = CONFIG_SYS_NS16550_CLK / 16 / gd->baudrate;
 
        (void) NS16550_init (COM_PORTS[0], clock_divisor);
        gComPort = 0;
@@ -49,30 +49,30 @@ int serial_init (void)
 void serial_putc (const char c)
 {
        if (c == '\n') {
-               NS16550_putc (COM_PORTS[CFG_DUART_CHAN], '\r');
+               NS16550_putc (COM_PORTS[CONFIG_SYS_DUART_CHAN], '\r');
        }
 
-       NS16550_putc (COM_PORTS[CFG_DUART_CHAN], c);
+       NS16550_putc (COM_PORTS[CONFIG_SYS_DUART_CHAN], c);
 }
 
 int serial_getc (void)
 {
-       return NS16550_getc (COM_PORTS[CFG_DUART_CHAN]);
+       return NS16550_getc (COM_PORTS[CONFIG_SYS_DUART_CHAN]);
 }
 
 int serial_tstc (void)
 {
-       return NS16550_tstc (COM_PORTS[CFG_DUART_CHAN]);
+       return NS16550_tstc (COM_PORTS[CONFIG_SYS_DUART_CHAN]);
 }
 
 void serial_setbrg (void)
 {
-       int clock_divisor = CFG_NS16550_CLK / 16 / gd->baudrate;
+       int clock_divisor = CONFIG_SYS_NS16550_CLK / 16 / gd->baudrate;
 
-#ifdef CFG_INIT_CHAN1
+#ifdef CONFIG_SYS_INIT_CHAN1
        NS16550_reinit (COM_PORTS[0], clock_divisor);
 #endif
-#ifdef CFG_INIT_CHAN2
+#ifdef CONFIG_SYS_INIT_CHAN2
        NS16550_reinit (COM_PORTS[1], clock_divisor);
 #endif
 }
@@ -84,7 +84,7 @@ void serial_puts (const char *s)
        }
 }
 
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
 void kgdb_serial_init (void)
 {
 }
@@ -108,4 +108,4 @@ void kgdb_interruptible (int yes)
 {
        return;
 }
-#endif /* CFG_CMD_KGDB */
+#endif