]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/mips/txx9/jmr3927/prom.c
[MIPS] TXx9: Reorganize code
[linux-2.6-omap-h63xx.git] / arch / mips / txx9 / jmr3927 / prom.c
similarity index 84%
rename from arch/mips/jmr3927/common/prom.c
rename to arch/mips/txx9/jmr3927/prom.c
index 5398813e50e60c480e295c417d55e9fe7e910bb4..8bc1049b622e3808b8b6cc45b03545dbb2f60c9f 100644 (file)
@@ -40,6 +40,7 @@
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
+#include <asm/txx9/tx3927.h>
 
 char * __init prom_getcmdline(void)
 {
@@ -70,3 +71,28 @@ void  __init prom_init_cmdline(void)
 void __init prom_free_prom_memory(void)
 {
 }
+
+#define TIMEOUT       0xffffff
+
+void
+prom_putchar(char c)
+{
+        int i = 0;
+
+        do {
+            i++;
+            if (i>TIMEOUT)
+                break;
+        } while (!(tx3927_sioptr(1)->cisr & TXx927_SICISR_TXALS));
+       tx3927_sioptr(1)->tfifo = c;
+       return;
+}
+
+void
+puts(const char *cp)
+{
+    while (*cp)
+       prom_putchar(*cp++);
+    prom_putchar('\r');
+    prom_putchar('\n');
+}