2 * Atheros AR71XX/AR724X/AR913X SoC early printk support
4 * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
5 * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published
9 * by the Free Software Foundation.
13 #include <linux/serial_reg.h>
14 #include <asm/addrspace.h>
16 #include <asm/mach-ath79/ar71xx_regs.h>
18 static inline void prom_wait_thre(void __iomem
*base
)
23 lsr
= __raw_readl(base
+ UART_LSR
* 4);
24 if (lsr
& UART_LSR_THRE
)
29 void prom_putchar(unsigned char ch
)
31 void __iomem
*base
= (void __iomem
*)(KSEG1ADDR(AR71XX_UART_BASE
));
34 __raw_writel(ch
, base
+ UART_TX
* 4);