]> git.sur5r.net Git - u-boot/blobdiff - drivers/serial/arm_dcc.c
drivers/net/inca-ip_sw.c: Fix GCC 4.6 build warning
[u-boot] / drivers / serial / arm_dcc.c
index 7c7fa34c5e09bb22e5407793497313d30c08f422..7b5ecb5132d0de3bd5c508448579caea717104e0 100644 (file)
@@ -27,7 +27,7 @@
  */
 
 #include <common.h>
-#include <devices.h>
+#include <stdio_dev.h>
 
 #if defined(CONFIG_CPU_V6)
 /*
 #define status_dcc(x)  \
                __asm__ volatile ("mrc p14, 0, %0, c0, c1, 0\n" : "=r" (x))
 
+#elif defined(CONFIG_CPU_XSCALE)
+/*
+ * XSCALE
+ */
+#define DCC_RBIT       (1 << 31)
+#define DCC_WBIT       (1 << 28)
+
+#define write_dcc(x)   \
+               __asm__ volatile ("mcr p14, 0, %0, c8, c0, 0\n" : : "r" (x))
+
+#define read_dcc(x)    \
+               __asm__ volatile ("mrc p14, 0, %0, c9, c0, 0\n" : "=r" (x))
+
+#define status_dcc(x)  \
+               __asm__ volatile ("mrc p14, 0, %0, c14, c0, 0\n" : "=r" (x))
+
 #else
 #define DCC_RBIT       (1 << 0)
 #define DCC_WBIT       (1 << 1)
@@ -132,7 +148,7 @@ int arm_dcc_tstc(void)
 }
 
 #ifdef CONFIG_ARM_DCC_MULTI
-static device_t arm_dcc_dev;
+static struct stdio_dev arm_dcc_dev;
 
 int drv_arm_dcc_init(void)
 {
@@ -149,6 +165,6 @@ int drv_arm_dcc_init(void)
        arm_dcc_dev.putc = arm_dcc_putc;        /* 'putc' function */
        arm_dcc_dev.puts = arm_dcc_puts;        /* 'puts' function */
 
-       return device_register(&arm_dcc_dev);
+       return stdio_register(&arm_dcc_dev);
 }
 #endif