Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
early_printk.c
Go to the documentation of this file.
1 /*
2  * This file is subject to the terms and conditions of the GNU General Public
3  * License. See the file "COPYING" in the main directory of this archive
4  * for more details.
5  *
6  * Copyright (C) 2008 Maxime Bizon <[email protected]>
7  */
8 
9 #include <linux/init.h>
10 #include <bcm63xx_io.h>
11 #include <bcm63xx_regs.h>
12 
13 static void __init wait_xfered(void)
14 {
15  unsigned int val;
16 
17  /* wait for any previous char to be transmitted */
18  do {
20  if (val & UART_IR_STAT(UART_IR_TXEMPTY))
21  break;
22  } while (1);
23 }
24 
25 void __init prom_putchar(char c)
26 {
27  wait_xfered();
29  wait_xfered();
30 }