X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=target%2Flinux%2Fifxmips%2Ffiles%2Farch%2Fmips%2Fifxmips%2Fcommon%2Fearly_printk.c;fp=target%2Flinux%2Fifxmips%2Ffiles%2Farch%2Fmips%2Fifxmips%2Fcommon%2Fearly_printk.c;h=0000000000000000000000000000000000000000;hp=1409836390f32dd5656d849267f87df85fbfa782;hb=30262e6ea24e8999e8d7ae16ef21cdfe7963c72e;hpb=ce735cac7b9537f60c6447aad8b866c0f544d06f diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/common/early_printk.c b/target/linux/ifxmips/files/arch/mips/ifxmips/common/early_printk.c deleted file mode 100644 index 1409836390..0000000000 --- a/target/linux/ifxmips/files/arch/mips/ifxmips/common/early_printk.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include - -#include - -#ifdef CONFIG_IFXMIPS_PROM_ASC0 -#define IFXMIPS_ASC_DIFF 0 -#else -#define IFXMIPS_ASC_DIFF IFXMIPS_ASC_BASE_DIFF -#endif - -static char buf[1024]; - -static inline u32 -asc_r32(unsigned long r) -{ - return ifxmips_r32((u32 *)(IFXMIPS_ASC_BASE_ADDR + IFXMIPS_ASC_DIFF + r)); -} - -static inline void -asc_w32(u32 v, unsigned long r) -{ - ifxmips_w32(v, (u32 *)(IFXMIPS_ASC_BASE_ADDR + IFXMIPS_ASC_DIFF + r)); -} - -void -prom_putchar(char c) -{ - unsigned long flags; - - local_irq_save(flags); - while ((asc_r32(IFXMIPS_ASC_FSTAT) & ASCFSTAT_TXFFLMASK) >> ASCFSTAT_TXFFLOFF); - - if (c == '\n') - asc_w32('\r', IFXMIPS_ASC_TBUF); - asc_w32(c, IFXMIPS_ASC_TBUF); - local_irq_restore(flags); -} - -void -early_printf(const char *fmt, ...) -{ - va_list args; - int l; - char *p, *buf_end; - - va_start(args, fmt); - l = vsprintf(buf, fmt, args); - va_end(args); - buf_end = buf + l; - - for (p = buf; p < buf_end; p++) - prom_putchar(*p); -} - -