2 * Ralink RT288x SoC early printk support
4 * Copyright (C) 2009 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>
15 #include <asm/addrspace.h>
17 #include <asm/mach-ralink/rt288x_regs.h>
19 #define UART_READ(r) \
20 __raw_readl((void __iomem *)(KSEG1ADDR(RT2880_UART1_BASE) + 4 * (r)))
22 #define UART_WRITE(r, v) \
23 __raw_writel((v), (void __iomem *)(KSEG1ADDR(RT2880_UART1_BASE) + 4 * (r)))
25 void prom_putchar(unsigned char ch
)
27 while (((UART_READ(UART_REG_LSR
)) & UART_LSR_THRE
) == 0);
28 UART_WRITE(UART_REG_TX
, ch
);
29 while (((UART_READ(UART_REG_LSR
)) & UART_LSR_THRE
) == 0);
This page took 0.054694 seconds and 5 git commands to generate.