/*1* BRIEF MODULE DESCRIPTION2* Serial port initialisation.3*4* Copyright 2004 IDT Inc. ([email protected])5*6* This program is free software; you can redistribute it and/or modify it7* under the terms of the GNU General Public License as published by the8* Free Software Foundation; either version 2 of the License, or (at your9* option) any later version.10*11* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED12* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF13* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN14* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,15* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT16* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF17* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON18* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT19* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF20* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.21*22* You should have received a copy of the GNU General Public License along23* with this program; if not, write to the Free Software Foundation, Inc.,24* 675 Mass Ave, Cambridge, MA 02139, USA.25*/2627#include <linux/init.h>28#include <linux/tty.h>29#include <linux/serial_core.h>30#include <linux/serial_8250.h>31#include <linux/irq.h>3233#include <asm/serial.h>34#include <asm/mach-rc32434/rb.h>3536extern unsigned int idt_cpu_freq;3738static struct uart_port rb532_uart = {39.flags = UPF_BOOT_AUTOCONF,40.line = 0,41.irq = UART0_IRQ,42.iotype = UPIO_MEM,43.membase = (char *)KSEG1ADDR(REGBASE + UART0BASE),44.regshift = 245};4647int __init setup_serial_port(void)48{49rb532_uart.uartclk = idt_cpu_freq;5051return early_serial_setup(&rb532_uart);52}53arch_initcall(setup_serial_port);545556