MIPS: Lemote 2F: Add Lynloong support
[pandora-kernel.git] / arch / mips / loongson / common / uart_base.c
1 /*
2  * Copyright (C) 2009 Lemote Inc.
3  * Author: Wu Zhangjin, wuzj@lemote.com
4  *
5  * This program is free software; you can redistribute  it and/or modify it
6  * under  the terms of  the GNU General  Public License as published by the
7  * Free Software Foundation;  either version 2 of the  License, or (at your
8  * option) any later version.
9  */
10
11 #include <linux/module.h>
12 #include <asm/bootinfo.h>
13
14 #include <loongson.h>
15
16 unsigned long __maybe_unused _loongson_uart_base;
17 EXPORT_SYMBOL(_loongson_uart_base);
18
19 unsigned long __maybe_unused uart8250_base[] = {
20         [MACH_LOONGSON_UNKNOWN] 0,
21         [MACH_LEMOTE_FL2E]      (LOONGSON_PCIIO_BASE + 0x3f8),
22         [MACH_LEMOTE_FL2F]      (LOONGSON_PCIIO_BASE + 0x2f8),
23         [MACH_LEMOTE_ML2F7]     (LOONGSON_LIO1_BASE + 0x3f8),
24         [MACH_LEMOTE_YL2F89]    (LOONGSON_LIO1_BASE + 0x3f8),
25         [MACH_DEXXON_GDIUM2F10] (LOONGSON_LIO1_BASE + 0x3f8),
26         [MACH_LEMOTE_NAS]       (LOONGSON_LIO1_BASE + 0x3f8),
27         [MACH_LEMOTE_LL2F]      (LOONGSON_PCIIO_BASE + 0x2f8),
28         [MACH_LOONGSON_END]     0,
29 };
30 EXPORT_SYMBOL(uart8250_base);
31
32 void __maybe_unused prom_init_uart_base(void)
33 {
34         _loongson_uart_base =
35                 (unsigned long)ioremap_nocache(uart8250_base[mips_machtype], 8);
36 }