PageRenderTime 32ms CodeModel.GetById 21ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/arm/mach-iop32x/include/mach/uncompress.h

https://github.com/AICP/kernel_google_msm
C Header | 39 lines | 26 code | 7 blank | 6 comment | 6 complexity | 0c08cd93c7965b47cf5a608b08208528 MD5 | raw file
 1/*
 2 * arch/arm/mach-iop32x/include/mach/uncompress.h
 3 */
 4
 5#include <asm/types.h>
 6#include <asm/mach-types.h>
 7#include <linux/serial_reg.h>
 8#include <mach/hardware.h>
 9
10volatile u8 *uart_base;
11
12#define TX_DONE		(UART_LSR_TEMT | UART_LSR_THRE)
13
14static inline void putc(char c)
15{
16	while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE)
17		barrier();
18	uart_base[UART_TX] = c;
19}
20
21static inline void flush(void)
22{
23}
24
25static __inline__ void __arch_decomp_setup(unsigned long arch_id)
26{
27	if (machine_is_iq80321())
28		uart_base = (volatile u8 *)IQ80321_UART;
29	else if (machine_is_iq31244() || machine_is_em7210())
30		uart_base = (volatile u8 *)IQ31244_UART;
31	else
32		uart_base = (volatile u8 *)0xfe800000;
33}
34
35/*
36 * nothing to do
37 */
38#define arch_decomp_setup()	__arch_decomp_setup(arch_id)
39#define arch_decomp_wdog()