blob: 1d636f4f750556d21208cb73b4130997d166b2c5 [file] [log] [blame]
Wu Zhangjina3ed4952009-11-06 18:35:34 +08001/*
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
16unsigned long __maybe_unused _loongson_uart_base;
17EXPORT_SYMBOL(_loongson_uart_base);
18
19unsigned 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),
Wu Zhangjine13fb772009-11-17 00:58:14 +080026 [MACH_LEMOTE_NAS] (LOONGSON_LIO1_BASE + 0x3f8),
Wu Zhangjin6e552c92009-11-17 00:58:15 +080027 [MACH_LEMOTE_LL2F] (LOONGSON_PCIIO_BASE + 0x2f8),
Wu Zhangjina3ed4952009-11-06 18:35:34 +080028 [MACH_LOONGSON_END] 0,
29};
30EXPORT_SYMBOL(uart8250_base);
31
32void __maybe_unused prom_init_uart_base(void)
33{
34 _loongson_uart_base =
35 (unsigned long)ioremap_nocache(uart8250_base[mips_machtype], 8);
36}