2 * Ralink RT305x SoC early printk support
4 * Copyright (C) 2009 Gabor Juhos <juhosg@openwrt.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
12 #include <linux/serial_reg.h>
14 #include <asm/addrspace.h>
16 #include <asm/mach-ralink/rt305x_regs.h>
18 #define UART_READ(r) \
19 __raw_readl((void __iomem *)(KSEG1ADDR(RT305X_UART1_BASE) + 4 * (r)))
21 #define UART_WRITE(r, v) \
22 __raw_writel((v), (void __iomem *)(KSEG1ADDR(RT305X_UART1_BASE) + 4 * (r)))
24 void prom_putchar(unsigned char ch
)
26 while (((UART_READ(UART_REG_LSR
)) & UART_LSR_THRE
) == 0);
27 UART_WRITE(UART_REG_TX
, ch
);
28 while (((UART_READ(UART_REG_LSR
)) & UART_LSR_THRE
) == 0);
This page took 0.04595 seconds and 5 git commands to generate.