diff options
author | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-03 23:59:07 -0500 |
commit | 79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch) | |
tree | 6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /arch/mips/mips-boards | |
parent | 19a79859e168640f8e16d7b216d211c1c52b687a (diff) | |
parent | 2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2 (diff) |
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'arch/mips/mips-boards')
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_int.c | 29 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/memory.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/pci.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/time.c | 10 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_int.c | 3 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_setup.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/sim/sim_time.c | 20 |
7 files changed, 25 insertions, 43 deletions
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c index be624b8c3b0..43dba6ce660 100644 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ b/arch/mips/mips-boards/atlas/atlas_int.c | |||
@@ -62,16 +62,6 @@ void enable_atlas_irq(unsigned int irq_nr) | |||
62 | iob(); | 62 | iob(); |
63 | } | 63 | } |
64 | 64 | ||
65 | static unsigned int startup_atlas_irq(unsigned int irq) | ||
66 | { | ||
67 | enable_atlas_irq(irq); | ||
68 | return 0; /* never anything pending */ | ||
69 | } | ||
70 | |||
71 | #define shutdown_atlas_irq disable_atlas_irq | ||
72 | |||
73 | #define mask_and_ack_atlas_irq disable_atlas_irq | ||
74 | |||
75 | static void end_atlas_irq(unsigned int irq) | 65 | static void end_atlas_irq(unsigned int irq) |
76 | { | 66 | { |
77 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | 67 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) |
@@ -80,11 +70,11 @@ static void end_atlas_irq(unsigned int irq) | |||
80 | 70 | ||
81 | static struct irq_chip atlas_irq_type = { | 71 | static struct irq_chip atlas_irq_type = { |
82 | .typename = "Atlas", | 72 | .typename = "Atlas", |
83 | .startup = startup_atlas_irq, | 73 | .ack = disable_atlas_irq, |
84 | .shutdown = shutdown_atlas_irq, | 74 | .mask = disable_atlas_irq, |
85 | .enable = enable_atlas_irq, | 75 | .mask_ack = disable_atlas_irq, |
86 | .disable = disable_atlas_irq, | 76 | .unmask = enable_atlas_irq, |
87 | .ack = mask_and_ack_atlas_irq, | 77 | .eoi = enable_atlas_irq, |
88 | .end = end_atlas_irq, | 78 | .end = end_atlas_irq, |
89 | }; | 79 | }; |
90 | 80 | ||
@@ -217,13 +207,8 @@ static inline void init_atlas_irqs (int base) | |||
217 | */ | 207 | */ |
218 | atlas_hw0_icregs->intrsten = 0xffffffff; | 208 | atlas_hw0_icregs->intrsten = 0xffffffff; |
219 | 209 | ||
220 | for (i = ATLAS_INT_BASE; i <= ATLAS_INT_END; i++) { | 210 | for (i = ATLAS_INT_BASE; i <= ATLAS_INT_END; i++) |
221 | irq_desc[i].status = IRQ_DISABLED; | 211 | set_irq_chip_and_handler(i, &atlas_irq_type, handle_level_irq); |
222 | irq_desc[i].action = 0; | ||
223 | irq_desc[i].depth = 1; | ||
224 | irq_desc[i].chip = &atlas_irq_type; | ||
225 | spin_lock_init(&irq_desc[i].lock); | ||
226 | } | ||
227 | } | 212 | } |
228 | 213 | ||
229 | static struct irqaction atlasirq = { | 214 | static struct irqaction atlasirq = { |
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c index be80c5dd4a0..eeed944e0f8 100644 --- a/arch/mips/mips-boards/generic/memory.c +++ b/arch/mips/mips-boards/generic/memory.c | |||
@@ -176,7 +176,7 @@ unsigned long __init prom_free_prom_memory(void) | |||
176 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) | 176 | if (boot_mem_map.map[i].type != BOOT_MEM_ROM_DATA) |
177 | continue; | 177 | continue; |
178 | 178 | ||
179 | addr = boot_mem_map.map[i].addr; | 179 | addr = PAGE_ALIGN(boot_mem_map.map[i].addr); |
180 | while (addr < boot_mem_map.map[i].addr | 180 | while (addr < boot_mem_map.map[i].addr |
181 | + boot_mem_map.map[i].size) { | 181 | + boot_mem_map.map[i].size) { |
182 | ClearPageReserved(virt_to_page(__va(addr))); | 182 | ClearPageReserved(virt_to_page(__va(addr))); |
diff --git a/arch/mips/mips-boards/generic/pci.c b/arch/mips/mips-boards/generic/pci.c index 9337f6c8873..3192a14698c 100644 --- a/arch/mips/mips-boards/generic/pci.c +++ b/arch/mips/mips-boards/generic/pci.c | |||
@@ -90,7 +90,7 @@ static struct pci_controller msc_controller = { | |||
90 | void __init mips_pcibios_init(void) | 90 | void __init mips_pcibios_init(void) |
91 | { | 91 | { |
92 | struct pci_controller *controller; | 92 | struct pci_controller *controller; |
93 | unsigned long start, end, map, start1, end1, map1, map2, map3, mask; | 93 | resource_size_t start, end, map, start1, end1, map1, map2, map3, mask; |
94 | 94 | ||
95 | switch (mips_revision_corid) { | 95 | switch (mips_revision_corid) { |
96 | case MIPS_REVISION_CORID_QED_RM5261: | 96 | case MIPS_REVISION_CORID_QED_RM5261: |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index 6f8a9fe7c1e..e4604c73f02 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -187,7 +187,7 @@ out: | |||
187 | } | 187 | } |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * Estimate CPU frequency. Sets mips_counter_frequency as a side-effect | 190 | * Estimate CPU frequency. Sets mips_hpt_frequency as a side-effect |
191 | */ | 191 | */ |
192 | static unsigned int __init estimate_cpu_frequency(void) | 192 | static unsigned int __init estimate_cpu_frequency(void) |
193 | { | 193 | { |
@@ -208,7 +208,8 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
208 | count = 6000000; | 208 | count = 6000000; |
209 | #endif | 209 | #endif |
210 | #if defined(CONFIG_MIPS_ATLAS) || defined(CONFIG_MIPS_MALTA) | 210 | #if defined(CONFIG_MIPS_ATLAS) || defined(CONFIG_MIPS_MALTA) |
211 | unsigned int flags; | 211 | unsigned long flags; |
212 | unsigned int start; | ||
212 | 213 | ||
213 | local_irq_save(flags); | 214 | local_irq_save(flags); |
214 | 215 | ||
@@ -217,13 +218,13 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
217 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); | 218 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); |
218 | 219 | ||
219 | /* Start r4k counter. */ | 220 | /* Start r4k counter. */ |
220 | write_c0_count(0); | 221 | start = read_c0_count(); |
221 | 222 | ||
222 | /* Read counter exactly on falling edge of update flag */ | 223 | /* Read counter exactly on falling edge of update flag */ |
223 | while (CMOS_READ(RTC_REG_A) & RTC_UIP); | 224 | while (CMOS_READ(RTC_REG_A) & RTC_UIP); |
224 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); | 225 | while (!(CMOS_READ(RTC_REG_A) & RTC_UIP)); |
225 | 226 | ||
226 | count = read_c0_count(); | 227 | count = read_c0_count() - start; |
227 | 228 | ||
228 | /* restore interrupts */ | 229 | /* restore interrupts */ |
229 | local_irq_restore(flags); | 230 | local_irq_restore(flags); |
@@ -287,6 +288,7 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
287 | The effect is that the int remains disabled on the second cpu. | 288 | The effect is that the int remains disabled on the second cpu. |
288 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ | 289 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ |
289 | irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; | 290 | irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; |
291 | set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); | ||
290 | #endif | 292 | #endif |
291 | 293 | ||
292 | /* to generate the first timer interrupt */ | 294 | /* to generate the first timer interrupt */ |
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c index 6244d0e2c7d..90ad5bf3e2f 100644 --- a/arch/mips/mips-boards/malta/malta_int.c +++ b/arch/mips/mips-boards/malta/malta_int.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/i8259.h> | 32 | #include <asm/i8259.h> |
33 | #include <asm/irq_cpu.h> | 33 | #include <asm/irq_cpu.h> |
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | #include <asm/irq_regs.h> | ||
35 | #include <asm/mips-boards/malta.h> | 36 | #include <asm/mips-boards/malta.h> |
36 | #include <asm/mips-boards/maltaint.h> | 37 | #include <asm/mips-boards/maltaint.h> |
37 | #include <asm/mips-boards/piix4.h> | 38 | #include <asm/mips-boards/piix4.h> |
@@ -131,7 +132,7 @@ static void corehi_irqdispatch(void) | |||
131 | unsigned int intedge, intsteer, pcicmd, pcibadaddr; | 132 | unsigned int intedge, intsteer, pcicmd, pcibadaddr; |
132 | unsigned int pcimstat, intisr, inten, intpol; | 133 | unsigned int pcimstat, intisr, inten, intpol; |
133 | unsigned int intrcause,datalo,datahi; | 134 | unsigned int intrcause,datalo,datahi; |
134 | struct pt_regs *regs; | 135 | struct pt_regs *regs = get_irq_regs(); |
135 | 136 | ||
136 | printk("CoreHI interrupt, shouldn't happen, so we die here!!!\n"); | 137 | printk("CoreHI interrupt, shouldn't happen, so we die here!!!\n"); |
137 | printk("epc : %08lx\nStatus: %08lx\n" | 138 | printk("epc : %08lx\nStatus: %08lx\n" |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index ab460f805be..282f3e52eea 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -159,7 +159,7 @@ void __init plat_mem_setup(void) | |||
159 | BONITO_PCIMEMBASECFG |= | 159 | BONITO_PCIMEMBASECFG |= |
160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | | 160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | |
161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); | 161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); |
162 | printk("Disabled Bonito IOBC coherency\n"); | 162 | printk("Enabled Bonito IOBC coherency\n"); |
163 | } | 163 | } |
164 | } | 164 | } |
165 | else | 165 | else |
diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c index c566b9bd042..30711d016fe 100644 --- a/arch/mips/mips-boards/sim/sim_time.c +++ b/arch/mips/mips-boards/sim/sim_time.c | |||
@@ -3,31 +3,24 @@ | |||
3 | #include <linux/kernel_stat.h> | 3 | #include <linux/kernel_stat.h> |
4 | #include <linux/sched.h> | 4 | #include <linux/sched.h> |
5 | #include <linux/spinlock.h> | 5 | #include <linux/spinlock.h> |
6 | |||
7 | #include <asm/mipsregs.h> | ||
8 | #include <asm/ptrace.h> | ||
9 | #include <asm/hardirq.h> | ||
10 | #include <asm/div64.h> | ||
11 | #include <asm/cpu.h> | ||
12 | #include <asm/time.h> | ||
13 | |||
14 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
15 | #include <linux/mc146818rtc.h> | 7 | #include <linux/mc146818rtc.h> |
16 | #include <linux/timex.h> | 8 | #include <linux/timex.h> |
9 | |||
17 | #include <asm/mipsregs.h> | 10 | #include <asm/mipsregs.h> |
11 | #include <asm/ptrace.h> | ||
18 | #include <asm/hardirq.h> | 12 | #include <asm/hardirq.h> |
19 | #include <asm/irq.h> | ||
20 | #include <asm/div64.h> | 13 | #include <asm/div64.h> |
21 | #include <asm/cpu.h> | 14 | #include <asm/cpu.h> |
22 | #include <asm/time.h> | 15 | #include <asm/time.h> |
16 | #include <asm/irq.h> | ||
23 | #include <asm/mc146818-time.h> | 17 | #include <asm/mc146818-time.h> |
24 | #include <asm/msc01_ic.h> | 18 | #include <asm/msc01_ic.h> |
19 | #include <asm/smp.h> | ||
25 | 20 | ||
26 | #include <asm/mips-boards/generic.h> | 21 | #include <asm/mips-boards/generic.h> |
27 | #include <asm/mips-boards/prom.h> | 22 | #include <asm/mips-boards/prom.h> |
28 | #include <asm/mips-boards/simint.h> | 23 | #include <asm/mips-boards/simint.h> |
29 | #include <asm/mc146818-time.h> | ||
30 | #include <asm/smp.h> | ||
31 | 24 | ||
32 | 25 | ||
33 | unsigned long cpu_khz; | 26 | unsigned long cpu_khz; |
@@ -102,7 +95,7 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id) | |||
102 | 95 | ||
103 | 96 | ||
104 | /* | 97 | /* |
105 | * Estimate CPU frequency. Sets mips_counter_frequency as a side-effect | 98 | * Estimate CPU frequency. Sets mips_hpt_frequency as a side-effect |
106 | */ | 99 | */ |
107 | static unsigned int __init estimate_cpu_frequency(void) | 100 | static unsigned int __init estimate_cpu_frequency(void) |
108 | { | 101 | { |
@@ -203,7 +196,8 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
203 | on seperate cpu's the first one tries to handle the second interrupt. | 196 | on seperate cpu's the first one tries to handle the second interrupt. |
204 | The effect is that the int remains disabled on the second cpu. | 197 | The effect is that the int remains disabled on the second cpu. |
205 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ | 198 | Mark the interrupt with IRQ_PER_CPU to avoid any confusion */ |
206 | irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU; | 199 | irq_desc[mips_cpu_timer_irq].flags |= IRQ_PER_CPU; |
200 | set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq); | ||
207 | #endif | 201 | #endif |
208 | 202 | ||
209 | /* to generate the first timer interrupt */ | 203 | /* to generate the first timer interrupt */ |