diff options
author | Atsushi Nemoto <anemo@mba.ocn.ne.jp> | 2008-07-10 11:33:08 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2008-07-15 13:44:35 -0400 |
commit | 89d63fe179520b11f54de1f26755b7444c79e73a (patch) | |
tree | fede06c5648335652c864fc35c951d991cbab183 /arch/mips/txx9/generic/setup.c | |
parent | 22b1d707ffc99faebd86257ad19d5bb9fc624734 (diff) |
[MIPS] TXx9: Reorganize PCI code
Split out PCIC dependent code and SoC dependent code from board dependent
code. Now TX4927 PCIC code is independent from TX4927/TX4938 SoC code.
Also fix some build problems on CONFIG_PCI=n.
As a bonus, "FPCIB0 Backplane Support" is available for all TX39/TX49 boards
and PCI66 support is available for all TX49 boards.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/txx9/generic/setup.c')
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c new file mode 100644 index 000000000000..46a631177757 --- /dev/null +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * linux/arch/mips/txx9/generic/setup.c | ||
3 | * | ||
4 | * Based on linux/arch/mips/txx9/rbtx4938/setup.c, | ||
5 | * and RBTX49xx patch from CELF patch archive. | ||
6 | * | ||
7 | * 2003-2005 (c) MontaVista Software, Inc. | ||
8 | * (C) Copyright TOSHIBA CORPORATION 2000-2001, 2004-2007 | ||
9 | * | ||
10 | * This file is subject to the terms and conditions of the GNU General Public | ||
11 | * License. See the file "COPYING" in the main directory of this archive | ||
12 | * for more details. | ||
13 | */ | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <asm/txx9/generic.h> | ||
18 | |||
19 | /* EBUSC settings of TX4927, etc. */ | ||
20 | struct resource txx9_ce_res[8]; | ||
21 | static char txx9_ce_res_name[8][4]; /* "CEn" */ | ||
22 | |||
23 | /* pcode, internal register */ | ||
24 | char txx9_pcode_str[8]; | ||
25 | static struct resource txx9_reg_res = { | ||
26 | .name = txx9_pcode_str, | ||
27 | .flags = IORESOURCE_MEM, | ||
28 | }; | ||
29 | void __init | ||
30 | txx9_reg_res_init(unsigned int pcode, unsigned long base, unsigned long size) | ||
31 | { | ||
32 | int i; | ||
33 | |||
34 | for (i = 0; i < ARRAY_SIZE(txx9_ce_res); i++) { | ||
35 | sprintf(txx9_ce_res_name[i], "CE%d", i); | ||
36 | txx9_ce_res[i].flags = IORESOURCE_MEM; | ||
37 | txx9_ce_res[i].name = txx9_ce_res_name[i]; | ||
38 | } | ||
39 | |||
40 | sprintf(txx9_pcode_str, "TX%x", pcode); | ||
41 | if (base) { | ||
42 | txx9_reg_res.start = base & 0xfffffffffULL; | ||
43 | txx9_reg_res.end = (base & 0xfffffffffULL) + (size - 1); | ||
44 | request_resource(&iomem_resource, &txx9_reg_res); | ||
45 | } | ||
46 | } | ||
47 | |||
48 | /* clocks */ | ||
49 | unsigned int txx9_master_clock; | ||
50 | unsigned int txx9_cpu_clock; | ||
51 | unsigned int txx9_gbus_clock; | ||