Path: blob/master/arch/mips/bcm63xx/early_printk.c
10818 views
/*1* This file is subject to the terms and conditions of the GNU General Public2* License. See the file "COPYING" in the main directory of this archive3* for more details.4*5* Copyright (C) 2008 Maxime Bizon <[email protected]>6*/78#include <linux/init.h>9#include <bcm63xx_io.h>10#include <bcm63xx_regs.h>1112static void __init wait_xfered(void)13{14unsigned int val;1516/* wait for any previous char to be transmitted */17do {18val = bcm_uart0_readl(UART_IR_REG);19if (val & UART_IR_STAT(UART_IR_TXEMPTY))20break;21} while (1);22}2324void __init prom_putchar(char c)25{26wait_xfered();27bcm_uart0_writel(c, UART_FIFO_REG);28wait_xfered();29}303132