fixes ifxmips pci support and adds GENERIC_GPIO
[openwrt/svn-archive/archive.git] / target / linux / ifxmips / files / arch / mips / ifxmips / prom.c
index a3b62f011447019f32ada4c1af891aea73bea011..2fb33b7cb8956721e85b03d5378d45eaae5ab475 100644 (file)
 #include <asm/bootinfo.h>
 #include <asm/ifxmips/ifxmips.h>
 
-#ifdef CONFIG_IFXMIPS_USE_CONSOLE0
-#define ASC_OFFSET                                                     0
-#elif CONFIG_IFXMIPS_USE_CONSOLE1
-#define ASC_OFFSET                                                     IFXMIPS_ASC1_BASE_OFFSET
-#else
-#error a tty for the console must be selected
-#endif
 static char buf[1024];
 
 void
@@ -46,11 +39,11 @@ prom_free_prom_memory (void)
 void
 prom_putchar (char c)
 {
-       while ((readl(IFXMIPS_ASC0_FSTAT + ASC_OFFSET) & ASCFSTAT_TXFFLMASK) >> ASCFSTAT_TXFFLOFF);
+       while ((ifxmips_r32(IFXMIPS_ASC1_FSTAT) & ASCFSTAT_TXFFLMASK) >> ASCFSTAT_TXFFLOFF);
 
        if (c == '\n')
-               writel('\r', IFXMIPS_ASC0_TBUF + ASC_OFFSET);
-       writel(c, IFXMIPS_ASC0_TBUF + ASC_OFFSET);
+               ifxmips_w32('\r', IFXMIPS_ASC1_TBUF);
+       ifxmips_w32(c, IFXMIPS_ASC1_TBUF);
 }
 
 void
@@ -74,7 +67,6 @@ prom_printf (const char * fmt, ...)
 void __init
 prom_init(void)
 {
-       mips_machgroup = MACH_GROUP_IFXMIPS;
        mips_machtype = MACH_INFINEON_IFXMIPS;
 
        strcpy(&(arcs_cmdline[0]), "console=ttyS0,115200 rootfstype=squashfs,jffs2 init=/etc/preinit");