diff options
Diffstat (limited to 'arch/mips/sibyte/swarm/setup.c')
-rw-r--r-- | arch/mips/sibyte/swarm/setup.c | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index 4daeaa413def..b614ca0ddb69 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000, 2001, 2002, 2003 Broadcom Corporation | 2 | * Copyright (C) 2000, 2001, 2002, 2003, 2004 Broadcom Corporation |
3 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) | 3 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
@@ -39,11 +39,23 @@ | |||
39 | #include <asm/time.h> | 39 | #include <asm/time.h> |
40 | #include <asm/traps.h> | 40 | #include <asm/traps.h> |
41 | #include <asm/sibyte/sb1250.h> | 41 | #include <asm/sibyte/sb1250.h> |
42 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) | ||
43 | #include <asm/sibyte/bcm1480_regs.h> | ||
44 | #elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) | ||
42 | #include <asm/sibyte/sb1250_regs.h> | 45 | #include <asm/sibyte/sb1250_regs.h> |
46 | #else | ||
47 | #error invalid SiByte board configuation | ||
48 | #endif | ||
43 | #include <asm/sibyte/sb1250_genbus.h> | 49 | #include <asm/sibyte/sb1250_genbus.h> |
44 | #include <asm/sibyte/board.h> | 50 | #include <asm/sibyte/board.h> |
45 | 51 | ||
52 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) | ||
53 | extern void bcm1480_setup(void); | ||
54 | #elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) | ||
46 | extern void sb1250_setup(void); | 55 | extern void sb1250_setup(void); |
56 | #else | ||
57 | #error invalid SiByte board configuation | ||
58 | #endif | ||
47 | 59 | ||
48 | extern int xicor_probe(void); | 60 | extern int xicor_probe(void); |
49 | extern int xicor_set_time(unsigned long); | 61 | extern int xicor_set_time(unsigned long); |
@@ -66,27 +78,34 @@ void __init swarm_timer_setup(struct irqaction *irq) | |||
66 | */ | 78 | */ |
67 | 79 | ||
68 | /* We only need to setup the generic timer */ | 80 | /* We only need to setup the generic timer */ |
69 | sb1250_time_init(); | 81 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) |
82 | bcm1480_time_init(); | ||
83 | #elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) | ||
84 | sb1250_time_init(); | ||
85 | #else | ||
86 | #error invalid SiByte board configuation | ||
87 | #endif | ||
70 | } | 88 | } |
71 | 89 | ||
72 | int swarm_be_handler(struct pt_regs *regs, int is_fixup) | 90 | int swarm_be_handler(struct pt_regs *regs, int is_fixup) |
73 | { | 91 | { |
74 | if (!is_fixup && (regs->cp0_cause & 4)) { | 92 | if (!is_fixup && (regs->cp0_cause & 4)) { |
75 | /* Data bus error - print PA */ | 93 | /* Data bus error - print PA */ |
76 | #ifdef CONFIG_64BIT | 94 | printk("DBE physical address: %010Lx\n", |
77 | printk("DBE physical address: %010lx\n", | ||
78 | __read_64bit_c0_register($26, 1)); | 95 | __read_64bit_c0_register($26, 1)); |
79 | #else | ||
80 | printk("DBE physical address: %010llx\n", | ||
81 | __read_64bit_c0_split($26, 1)); | ||
82 | #endif | ||
83 | } | 96 | } |
84 | return (is_fixup ? MIPS_BE_FIXUP : MIPS_BE_FATAL); | 97 | return (is_fixup ? MIPS_BE_FIXUP : MIPS_BE_FATAL); |
85 | } | 98 | } |
86 | 99 | ||
87 | static int __init swarm_setup(void) | 100 | void __init plat_setup(void) |
88 | { | 101 | { |
102 | #if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80) | ||
103 | bcm1480_setup(); | ||
104 | #elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X) | ||
89 | sb1250_setup(); | 105 | sb1250_setup(); |
106 | #else | ||
107 | #error invalid SiByte board configuation | ||
108 | #endif | ||
90 | 109 | ||
91 | panic_timeout = 5; /* For debug. */ | 110 | panic_timeout = 5; /* For debug. */ |
92 | 111 | ||
@@ -133,12 +152,8 @@ static int __init swarm_setup(void) | |||
133 | }; | 152 | }; |
134 | /* XXXKW for CFE, get lines/cols from environment */ | 153 | /* XXXKW for CFE, get lines/cols from environment */ |
135 | #endif | 154 | #endif |
136 | |||
137 | return 0; | ||
138 | } | 155 | } |
139 | 156 | ||
140 | early_initcall(swarm_setup); | ||
141 | |||
142 | #ifdef LEDS_PHYS | 157 | #ifdef LEDS_PHYS |
143 | 158 | ||
144 | #ifdef CONFIG_SIBYTE_CARMEL | 159 | #ifdef CONFIG_SIBYTE_CARMEL |