/* * include/asm/arch/serial.h * * Copyright (C) 2012 MStar Semiconductor. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef __ASM_ARCH_SERIAL_H #define __ASM_ARCH_SERIAL_H #include #include #include #define BASE_BAUD (UART_CLK/16) #define SERIAL_PORT_CFG \ { \ baud_base: BASE_BAUD, \ irq:INT_UART_1, \ flags:(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ iomem_base: (u8*)IO_ADDRESS(ARM_UART1_BASE), iomem_reg_shift: 2, \ io_type: SERIAL_IO_MEM \ }, \ { \ baud_base: BASE_BAUD, \ irq:INT_UART_2, \ flags:(ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ iomem_base: (u8*)IO_ADDRESS(ARM_UART2_BASE), iomem_reg_shift: 2, \ io_type: SERIAL_IO_MEM \ } #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25) # define SERIAL_PORT_DFNS SERIAL_PORT_CFG #else # define STD_SERIAL_PORT_DEFNS SERIAL_PORT_CFG #endif #define EXTRA_SERIAL_PORT_DEFNS #endif /* __ASM_ARCH_SERIAL_H */