diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 14:04:15 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-02-26 14:06:24 -0500 |
commit | a7790532f5b7358c33a6b1834dc2b318de209f31 (patch) | |
tree | 0ceb9e24b3f54cb5c8453fb5a218e2a94a0f1cce /arch/mips/loongson/common/uart_base.c | |
parent | 2764fb4244cc1bc08df3667924ca4a972e90ac70 (diff) | |
parent | 60b341b778cc2929df16c0a504c91621b3c6a4ad (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
The SmartMedia FTL code depends on new kfifo bits from 2.6.33
Diffstat (limited to 'arch/mips/loongson/common/uart_base.c')
-rw-r--r-- | arch/mips/loongson/common/uart_base.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/mips/loongson/common/uart_base.c b/arch/mips/loongson/common/uart_base.c new file mode 100644 index 000000000000..78ff66ae749e --- /dev/null +++ b/arch/mips/loongson/common/uart_base.c | |||
@@ -0,0 +1,45 @@ | |||
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 | /* ioremapped */ | ||
17 | unsigned long _loongson_uart_base; | ||
18 | EXPORT_SYMBOL(_loongson_uart_base); | ||
19 | /* raw */ | ||
20 | unsigned long loongson_uart_base; | ||
21 | EXPORT_SYMBOL(loongson_uart_base); | ||
22 | |||
23 | void prom_init_loongson_uart_base(void) | ||
24 | { | ||
25 | switch (mips_machtype) { | ||
26 | case MACH_LEMOTE_FL2E: | ||
27 | loongson_uart_base = LOONGSON_PCIIO_BASE + 0x3f8; | ||
28 | break; | ||
29 | case MACH_LEMOTE_FL2F: | ||
30 | case MACH_LEMOTE_LL2F: | ||
31 | loongson_uart_base = LOONGSON_PCIIO_BASE + 0x2f8; | ||
32 | break; | ||
33 | case MACH_LEMOTE_ML2F7: | ||
34 | case MACH_LEMOTE_YL2F89: | ||
35 | case MACH_DEXXON_GDIUM2F10: | ||
36 | case MACH_LEMOTE_NAS: | ||
37 | default: | ||
38 | /* The CPU provided serial port */ | ||
39 | loongson_uart_base = LOONGSON_LIO1_BASE + 0x3f8; | ||
40 | break; | ||
41 | } | ||
42 | |||
43 | _loongson_uart_base = | ||
44 | (unsigned long)ioremap_nocache(loongson_uart_base, 8); | ||
45 | } | ||