Path: blob/master/arch/arm/mach-cns3xxx/include/mach/uncompress.h
17892 views
/*1* Copyright 2003 ARM Limited2* Copyright 2008 Cavium Networks3*4* This file is free software; you can redistribute it and/or modify5* it under the terms of the GNU General Public License, Version 2, as6* published by the Free Software Foundation.7*/89#include <asm/mach-types.h>10#include <mach/hardware.h>11#include <mach/cns3xxx.h>1213#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))14#define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c))15#define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30))16#define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18))1718/*19* Return the UART base address20*/21static inline unsigned long get_uart_base(void)22{23if (machine_is_cns3420vb())24return CNS3XXX_UART0_BASE;25else26return 0;27}2829/*30* This does not append a newline31*/32static inline void putc(int c)33{34unsigned long base = get_uart_base();3536while (AMBA_UART_FR(base) & (1 << 5))37barrier();3839AMBA_UART_DR(base) = c;40}4142static inline void flush(void)43{44unsigned long base = get_uart_base();4546while (AMBA_UART_FR(base) & (1 << 3))47barrier();48}4950/*51* nothing to do52*/53#define arch_decomp_setup()54#define arch_decomp_wdog()555657