Wu Zhangjin | a3ed495 | 2009-11-06 18:35:34 +0800 | [diff] [blame^] | 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_LOONGSON_END] 0, |
| 27 | }; |
| 28 | EXPORT_SYMBOL(uart8250_base); |
| 29 | |
| 30 | void __maybe_unused prom_init_uart_base(void) |
| 31 | { |
| 32 | _loongson_uart_base = |
| 33 | (unsigned long)ioremap_nocache(uart8250_base[mips_machtype], 8); |
| 34 | } |