diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-07 20:00:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-07 20:00:37 -0400 |
commit | dc315011312f04433e0fdd34b6a3dde4bfde1e48 (patch) | |
tree | 7a9f907f1e2c1441c63c93b0d0b0d71a05453d94 /arch | |
parent | 2c750edd39a45402e355459194fe8804366bedd2 (diff) | |
parent | 6ba07e590d1f841a5d0539978399b852a015ab53 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Fix warning by moving do_default_vi into CONFIG_CPU_MIPSR2_SRS
[MIPS] Fix some minor typoes in arch/mips/Kconfig.
[MIPS] Remove prototype for deleted function qemu_handle_int
[MIPS] Fix some system calls with long long arguments
[MIPS] Make dma_map_sg handle sg elements which are longer than one page
[MIPS] Drop __ARCH_WANT_SYS_FADVISE64
[MIPS] Fix VGA corruption on RM300C
[MIPS] RM300: Fix MMIO problems by marking the PCI INT ACK region busy
[MIPS] EMMA2RH: remove dead KGDB code
[MIPS] Remove duplicate fpu enable hazard code.
[MIPS] Atlas, Malta, SEAD: Remove scroll from interrupt handler.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/Kconfig | 6 | ||||
-rw-r--r-- | arch/mips/emma2rh/markeins/setup.c | 24 | ||||
-rw-r--r-- | arch/mips/kernel/linux32.c | 10 | ||||
-rw-r--r-- | arch/mips/kernel/r4k_switch.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 2 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 12 | ||||
-rw-r--r-- | arch/mips/mips-boards/atlas/atlas_setup.c | 2 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/display.c | 24 | ||||
-rw-r--r-- | arch/mips/mips-boards/generic/time.c | 31 | ||||
-rw-r--r-- | arch/mips/mips-boards/malta/malta_setup.c | 6 | ||||
-rw-r--r-- | arch/mips/mips-boards/sead/sead_setup.c | 2 | ||||
-rw-r--r-- | arch/mips/mm/dma-default.c | 5 | ||||
-rw-r--r-- | arch/mips/qemu/q-irq.c | 2 | ||||
-rw-r--r-- | arch/mips/sni/pcimt.c | 18 | ||||
-rw-r--r-- | arch/mips/sni/setup.c | 33 |
16 files changed, 110 insertions, 71 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 0f09412e1b7f..9528ee90640a 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -747,9 +747,9 @@ config EARLY_PRINTK | |||
747 | to print messages very early in the bootup process. | 747 | to print messages very early in the bootup process. |
748 | 748 | ||
749 | This is useful for kernel debugging when your machine crashes very | 749 | This is useful for kernel debugging when your machine crashes very |
750 | early before the console code is initialized. For normal operation | 750 | early before the console code is initialized. For normal operation, |
751 | it is not recommended because it looks on some machines ugly and | 751 | it is not recommended because it looks ugly on some machines and |
752 | oesn't cooperate with an X server. You should normally N here, | 752 | doesn't cooperate with an X server. You should normally say N here, |
753 | unless you want to debug such a crash. | 753 | unless you want to debug such a crash. |
754 | 754 | ||
755 | config SYS_HAS_EARLY_PRINTK | 755 | config SYS_HAS_EARLY_PRINTK |
diff --git a/arch/mips/emma2rh/markeins/setup.c b/arch/mips/emma2rh/markeins/setup.c index b29a44739230..2f060e1ed36c 100644 --- a/arch/mips/emma2rh/markeins/setup.c +++ b/arch/mips/emma2rh/markeins/setup.c | |||
@@ -115,30 +115,6 @@ extern void markeins_irq_setup(void); | |||
115 | 115 | ||
116 | static void inline __init markeins_sio_setup(void) | 116 | static void inline __init markeins_sio_setup(void) |
117 | { | 117 | { |
118 | #ifdef CONFIG_KGDB_8250 | ||
119 | struct uart_port emma_port; | ||
120 | |||
121 | memset(&emma_port, 0, sizeof(emma_port)); | ||
122 | |||
123 | emma_port.flags = | ||
124 | UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; | ||
125 | emma_port.iotype = UPIO_MEM; | ||
126 | emma_port.regshift = 4; /* I/O addresses are every 8 bytes */ | ||
127 | emma_port.uartclk = 18544000; /* Clock rate of the chip */ | ||
128 | |||
129 | emma_port.line = 0; | ||
130 | emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR0_BASE + 3); | ||
131 | emma_port.membase = (u8*)emma_port.mapbase; | ||
132 | early_serial_setup(&emma_port); | ||
133 | |||
134 | emma_port.line = 1; | ||
135 | emma_port.mapbase = KSEG1ADDR(EMMA2RH_PFUR1_BASE + 3); | ||
136 | emma_port.membase = (u8*)emma_port.mapbase; | ||
137 | early_serial_setup(&emma_port); | ||
138 | |||
139 | emma_port.irq = EMMA2RH_IRQ_PFUR1; | ||
140 | kgdb8250_add_port(1, &emma_port); | ||
141 | #endif | ||
142 | } | 118 | } |
143 | 119 | ||
144 | void __init plat_mem_setup(void) | 120 | void __init plat_mem_setup(void) |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 37849edd0645..06e04da211d5 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -556,6 +556,16 @@ asmlinkage long sys32_sync_file_range(int fd, int __pad, | |||
556 | flags); | 556 | flags); |
557 | } | 557 | } |
558 | 558 | ||
559 | asmlinkage long sys32_fadvise64_64(int fd, int __pad, | ||
560 | unsigned long a2, unsigned long a3, | ||
561 | unsigned long a4, unsigned long a5, | ||
562 | int flags) | ||
563 | { | ||
564 | return sys_fadvise64_64(fd, | ||
565 | merge_64(a2, a3), merge_64(a4, a5), | ||
566 | flags); | ||
567 | } | ||
568 | |||
559 | save_static_function(sys32_clone); | 569 | save_static_function(sys32_clone); |
560 | __attribute_used__ noinline static int | 570 | __attribute_used__ noinline static int |
561 | _sys32_clone(nabi_no_regargs struct pt_regs regs) | 571 | _sys32_clone(nabi_no_regargs struct pt_regs regs) |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index cc566cf12246..06729596812f 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -174,7 +174,7 @@ LEAF(_init_fpu) | |||
174 | or t0, t1 | 174 | or t0, t1 |
175 | mtc0 t0, CP0_STATUS | 175 | mtc0 t0, CP0_STATUS |
176 | #endif /* CONFIG_MIPS_MT_SMTC */ | 176 | #endif /* CONFIG_MIPS_MT_SMTC */ |
177 | fpu_enable_hazard | 177 | enable_fpu_hazard |
178 | 178 | ||
179 | li t1, FPU_DEFAULT | 179 | li t1, FPU_DEFAULT |
180 | ctc1 t1, fcr31 | 180 | ctc1 t1, fcr31 |
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 6eac28337423..1631035ffc24 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S | |||
@@ -299,7 +299,7 @@ EXPORT(sysn32_call_table) | |||
299 | PTR sys_ni_syscall /* res. for afs_syscall */ | 299 | PTR sys_ni_syscall /* res. for afs_syscall */ |
300 | PTR sys_ni_syscall /* res. for security */ | 300 | PTR sys_ni_syscall /* res. for security */ |
301 | PTR sys_gettid | 301 | PTR sys_gettid |
302 | PTR sys32_readahead | 302 | PTR sys_readahead |
303 | PTR sys_setxattr /* 6180 */ | 303 | PTR sys_setxattr /* 6180 */ |
304 | PTR sys_lsetxattr | 304 | PTR sys_lsetxattr |
305 | PTR sys_fsetxattr | 305 | PTR sys_fsetxattr |
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 7e74b412a782..2aa99426ac1c 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S | |||
@@ -459,7 +459,7 @@ sys_call_table: | |||
459 | PTR sys_remap_file_pages | 459 | PTR sys_remap_file_pages |
460 | PTR sys_set_tid_address | 460 | PTR sys_set_tid_address |
461 | PTR sys_restart_syscall | 461 | PTR sys_restart_syscall |
462 | PTR sys_fadvise64_64 | 462 | PTR sys32_fadvise64_64 |
463 | PTR compat_sys_statfs64 /* 4255 */ | 463 | PTR compat_sys_statfs64 /* 4255 */ |
464 | PTR compat_sys_fstatfs64 | 464 | PTR compat_sys_fstatfs64 |
465 | PTR compat_sys_timer_create | 465 | PTR compat_sys_timer_create |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 200de027f354..3f58b6ac1358 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -927,12 +927,6 @@ asmlinkage void do_reserved(struct pt_regs *regs) | |||
927 | (regs->cp0_cause & 0x7f) >> 2); | 927 | (regs->cp0_cause & 0x7f) >> 2); |
928 | } | 928 | } |
929 | 929 | ||
930 | static asmlinkage void do_default_vi(void) | ||
931 | { | ||
932 | show_regs(get_irq_regs()); | ||
933 | panic("Caught unexpected vectored interrupt."); | ||
934 | } | ||
935 | |||
936 | /* | 930 | /* |
937 | * Some MIPS CPUs can enable/disable for cache parity detection, but do | 931 | * Some MIPS CPUs can enable/disable for cache parity detection, but do |
938 | * it different ways. | 932 | * it different ways. |
@@ -1128,6 +1122,12 @@ void mips_srs_free(int set) | |||
1128 | clear_bit(set, &sr->sr_allocated); | 1122 | clear_bit(set, &sr->sr_allocated); |
1129 | } | 1123 | } |
1130 | 1124 | ||
1125 | static asmlinkage void do_default_vi(void) | ||
1126 | { | ||
1127 | show_regs(get_irq_regs()); | ||
1128 | panic("Caught unexpected vectored interrupt."); | ||
1129 | } | ||
1130 | |||
1131 | static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) | 1131 | static void *set_vi_srs_handler(int n, vi_handler_t addr, int srs) |
1132 | { | 1132 | { |
1133 | unsigned long handler; | 1133 | unsigned long handler; |
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c index 0c6b0ce15028..1cc6ebbedfdd 100644 --- a/arch/mips/mips-boards/atlas/atlas_setup.c +++ b/arch/mips/mips-boards/atlas/atlas_setup.c | |||
@@ -48,6 +48,8 @@ const char *get_system_type(void) | |||
48 | return "MIPS Atlas"; | 48 | return "MIPS Atlas"; |
49 | } | 49 | } |
50 | 50 | ||
51 | const char display_string[] = " LINUX ON ATLAS "; | ||
52 | |||
51 | void __init plat_mem_setup(void) | 53 | void __init plat_mem_setup(void) |
52 | { | 54 | { |
53 | mips_pcibios_init(); | 55 | mips_pcibios_init(); |
diff --git a/arch/mips/mips-boards/generic/display.c b/arch/mips/mips-boards/generic/display.c index 548dbe5ce7c8..5d600054090a 100644 --- a/arch/mips/mips-boards/generic/display.c +++ b/arch/mips/mips-boards/generic/display.c | |||
@@ -19,9 +19,14 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/compiler.h> | 21 | #include <linux/compiler.h> |
22 | #include <linux/timer.h> | ||
22 | #include <asm/io.h> | 23 | #include <asm/io.h> |
23 | #include <asm/mips-boards/generic.h> | 24 | #include <asm/mips-boards/generic.h> |
24 | 25 | ||
26 | extern const char display_string[]; | ||
27 | static unsigned int display_count; | ||
28 | static unsigned int max_display_count; | ||
29 | |||
25 | void mips_display_message(const char *str) | 30 | void mips_display_message(const char *str) |
26 | { | 31 | { |
27 | static unsigned int __iomem *display = NULL; | 32 | static unsigned int __iomem *display = NULL; |
@@ -37,3 +42,22 @@ void mips_display_message(const char *str) | |||
37 | writel(' ', display + i); | 42 | writel(' ', display + i); |
38 | } | 43 | } |
39 | } | 44 | } |
45 | |||
46 | static void scroll_display_message(unsigned long data); | ||
47 | static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0); | ||
48 | |||
49 | static void scroll_display_message(unsigned long data) | ||
50 | { | ||
51 | mips_display_message(&display_string[display_count++]); | ||
52 | if (display_count == max_display_count) | ||
53 | display_count = 0; | ||
54 | |||
55 | mod_timer(&mips_scroll_timer, jiffies + HZ); | ||
56 | } | ||
57 | |||
58 | void mips_scroll_message(void) | ||
59 | { | ||
60 | del_timer_sync(&mips_scroll_timer); | ||
61 | max_display_count = strlen(display_string) + 1 - 8; | ||
62 | mod_timer(&mips_scroll_timer, jiffies + 1); | ||
63 | } | ||
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index df2a2bd3aa5d..37735bfc3afd 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -53,37 +53,11 @@ | |||
53 | 53 | ||
54 | unsigned long cpu_khz; | 54 | unsigned long cpu_khz; |
55 | 55 | ||
56 | #if defined(CONFIG_MIPS_ATLAS) | ||
57 | static char display_string[] = " LINUX ON ATLAS "; | ||
58 | #endif | ||
59 | #if defined(CONFIG_MIPS_MALTA) | ||
60 | #if defined(CONFIG_MIPS_MT_SMTC) | ||
61 | static char display_string[] = " SMTC LINUX ON MALTA "; | ||
62 | #else | ||
63 | static char display_string[] = " LINUX ON MALTA "; | ||
64 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
65 | #endif | ||
66 | #if defined(CONFIG_MIPS_SEAD) | ||
67 | static char display_string[] = " LINUX ON SEAD "; | ||
68 | #endif | ||
69 | static unsigned int display_count; | ||
70 | #define MAX_DISPLAY_COUNT (sizeof(display_string) - 8) | ||
71 | |||
72 | #define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR) | 56 | #define CPUCTR_IMASKBIT (0x100 << MIPSCPU_INT_CPUCTR) |
73 | 57 | ||
74 | static unsigned int timer_tick_count; | ||
75 | static int mips_cpu_timer_irq; | 58 | static int mips_cpu_timer_irq; |
76 | extern void smtc_timer_broadcast(int); | 59 | extern void smtc_timer_broadcast(int); |
77 | 60 | ||
78 | static inline void scroll_display_message(void) | ||
79 | { | ||
80 | if ((timer_tick_count++ % HZ) == 0) { | ||
81 | mips_display_message(&display_string[display_count++]); | ||
82 | if (display_count == MAX_DISPLAY_COUNT) | ||
83 | display_count = 0; | ||
84 | } | ||
85 | } | ||
86 | |||
87 | static void mips_timer_dispatch(void) | 61 | static void mips_timer_dispatch(void) |
88 | { | 62 | { |
89 | do_IRQ(mips_cpu_timer_irq); | 63 | do_IRQ(mips_cpu_timer_irq); |
@@ -143,7 +117,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id) | |||
143 | if (cpu_data[cpu].vpe_id == 0) { | 117 | if (cpu_data[cpu].vpe_id == 0) { |
144 | timer_interrupt(irq, NULL); | 118 | timer_interrupt(irq, NULL); |
145 | smtc_timer_broadcast(cpu_data[cpu].vpe_id); | 119 | smtc_timer_broadcast(cpu_data[cpu].vpe_id); |
146 | scroll_display_message(); | ||
147 | } else { | 120 | } else { |
148 | write_c0_compare(read_c0_count() + | 121 | write_c0_compare(read_c0_count() + |
149 | (mips_hpt_frequency/HZ)); | 122 | (mips_hpt_frequency/HZ)); |
@@ -167,8 +140,6 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id) | |||
167 | /* we keep interrupt disabled all the time */ | 140 | /* we keep interrupt disabled all the time */ |
168 | if (!r2 || (read_c0_cause() & (1 << 30))) | 141 | if (!r2 || (read_c0_cause() & (1 << 30))) |
169 | timer_interrupt(irq, NULL); | 142 | timer_interrupt(irq, NULL); |
170 | |||
171 | scroll_display_message(); | ||
172 | } else { | 143 | } else { |
173 | /* Everyone else needs to reset the timer int here as | 144 | /* Everyone else needs to reset the timer int here as |
174 | ll_local_timer_interrupt doesn't */ | 145 | ll_local_timer_interrupt doesn't */ |
@@ -262,6 +233,8 @@ void __init mips_time_init(void) | |||
262 | (est_freq%1000000)*100/1000000); | 233 | (est_freq%1000000)*100/1000000); |
263 | 234 | ||
264 | cpu_khz = est_freq / 1000; | 235 | cpu_khz = est_freq / 1000; |
236 | |||
237 | mips_scroll_message(); | ||
265 | } | 238 | } |
266 | 239 | ||
267 | void __init plat_timer_setup(struct irqaction *irq) | 240 | void __init plat_timer_setup(struct irqaction *irq) |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 7873932532a1..c14b7bf89950 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -56,6 +56,12 @@ const char *get_system_type(void) | |||
56 | return "MIPS Malta"; | 56 | return "MIPS Malta"; |
57 | } | 57 | } |
58 | 58 | ||
59 | #if defined(CONFIG_MIPS_MT_SMTC) | ||
60 | const char display_string[] = " SMTC LINUX ON MALTA "; | ||
61 | #else | ||
62 | const char display_string[] = " LINUX ON MALTA "; | ||
63 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
64 | |||
59 | #ifdef CONFIG_BLK_DEV_FD | 65 | #ifdef CONFIG_BLK_DEV_FD |
60 | void __init fd_activate(void) | 66 | void __init fd_activate(void) |
61 | { | 67 | { |
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c index a189dec7c7bc..811aba100605 100644 --- a/arch/mips/mips-boards/sead/sead_setup.c +++ b/arch/mips/mips-boards/sead/sead_setup.c | |||
@@ -43,6 +43,8 @@ const char *get_system_type(void) | |||
43 | return "MIPS SEAD"; | 43 | return "MIPS SEAD"; |
44 | } | 44 | } |
45 | 45 | ||
46 | const char display_string[] = " LINUX ON SEAD "; | ||
47 | |||
46 | void __init plat_mem_setup(void) | 48 | void __init plat_mem_setup(void) |
47 | { | 49 | { |
48 | ioport_resource.end = 0x7fffffff; | 50 | ioport_resource.end = 0x7fffffff; |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index f0eb29917d9a..76903c727647 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -168,8 +168,9 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
168 | addr = (unsigned long) page_address(sg->page); | 168 | addr = (unsigned long) page_address(sg->page); |
169 | if (!plat_device_is_coherent(dev) && addr) | 169 | if (!plat_device_is_coherent(dev) && addr) |
170 | __dma_sync(addr + sg->offset, sg->length, direction); | 170 | __dma_sync(addr + sg->offset, sg->length, direction); |
171 | sg->dma_address = plat_map_dma_mem_page(dev, sg->page) + | 171 | sg->dma_address = plat_map_dma_mem(dev, |
172 | sg->offset; | 172 | (void *)(addr + sg->offset), |
173 | sg->length); | ||
173 | } | 174 | } |
174 | 175 | ||
175 | return nents; | 176 | return nents; |
diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c index f5ea2fe10f14..89891e984b3b 100644 --- a/arch/mips/qemu/q-irq.c +++ b/arch/mips/qemu/q-irq.c | |||
@@ -7,8 +7,6 @@ | |||
7 | #include <asm/system.h> | 7 | #include <asm/system.h> |
8 | #include <asm/time.h> | 8 | #include <asm/time.h> |
9 | 9 | ||
10 | extern asmlinkage void qemu_handle_int(void); | ||
11 | |||
12 | asmlinkage void plat_irq_dispatch(void) | 10 | asmlinkage void plat_irq_dispatch(void) |
13 | { | 11 | { |
14 | unsigned int pending = read_c0_status() & read_c0_cause(); | 12 | unsigned int pending = read_c0_status() & read_c0_cause(); |
diff --git a/arch/mips/sni/pcimt.c b/arch/mips/sni/pcimt.c index 9ee208daa8b1..97b234361b4d 100644 --- a/arch/mips/sni/pcimt.c +++ b/arch/mips/sni/pcimt.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) | 8 | * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) |
9 | * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de) | 9 | * Copyright (C) 2006,2007 Thomas Bogendoerfer (tsbogend@alpha.franken.de) |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
@@ -131,6 +131,19 @@ static struct resource pcimt_io_resources[] = { | |||
131 | } | 131 | } |
132 | }; | 132 | }; |
133 | 133 | ||
134 | static struct resource pcimt_mem_resources[] = { | ||
135 | { | ||
136 | /* | ||
137 | * this region should only be 4 bytes long, | ||
138 | * but it's 16MB on all RM300C I've checked | ||
139 | */ | ||
140 | .start = 0x1a000000, | ||
141 | .end = 0x1affffff, | ||
142 | .name = "PCI INT ACK", | ||
143 | .flags = IORESOURCE_BUSY | ||
144 | } | ||
145 | }; | ||
146 | |||
134 | static struct resource sni_mem_resource = { | 147 | static struct resource sni_mem_resource = { |
135 | .start = 0x18000000UL, | 148 | .start = 0x18000000UL, |
136 | .end = 0x1fbfffffUL, | 149 | .end = 0x1fbfffffUL, |
@@ -145,6 +158,9 @@ static void __init sni_pcimt_resource_init(void) | |||
145 | /* request I/O space for devices used on all i[345]86 PCs */ | 158 | /* request I/O space for devices used on all i[345]86 PCs */ |
146 | for (i = 0; i < ARRAY_SIZE(pcimt_io_resources); i++) | 159 | for (i = 0; i < ARRAY_SIZE(pcimt_io_resources); i++) |
147 | request_resource(&sni_io_resource, pcimt_io_resources + i); | 160 | request_resource(&sni_io_resource, pcimt_io_resources + i); |
161 | /* request MEM space for devices used on all i[345]86 PCs */ | ||
162 | for (i = 0; i < ARRAY_SIZE(pcimt_mem_resources); i++) | ||
163 | request_resource(&sni_mem_resource, pcimt_mem_resources + i); | ||
148 | } | 164 | } |
149 | 165 | ||
150 | extern struct pci_ops sni_pcimt_ops; | 166 | extern struct pci_ops sni_pcimt_ops; |
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 68d7cf609b4f..4fedfbda0c79 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * for more details. | 6 | * for more details. |
7 | * | 7 | * |
8 | * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) | 8 | * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) |
9 | * Copyright (C) 2006 Thomas Bogendoerfer (tsbogend@alpha.franken.de) | 9 | * Copyright (C) 2006,2007 Thomas Bogendoerfer (tsbogend@alpha.franken.de) |
10 | */ | 10 | */ |
11 | #include <linux/eisa.h> | 11 | #include <linux/eisa.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
@@ -92,3 +92,34 @@ void __init plat_mem_setup(void) | |||
92 | 92 | ||
93 | sni_display_setup(); | 93 | sni_display_setup(); |
94 | } | 94 | } |
95 | |||
96 | #if CONFIG_PCI | ||
97 | |||
98 | #include <linux/pci.h> | ||
99 | #include <video/vga.h> | ||
100 | #include <video/cirrus.h> | ||
101 | |||
102 | static void __devinit quirk_cirrus_ram_size(struct pci_dev *dev) | ||
103 | { | ||
104 | u16 cmd; | ||
105 | |||
106 | /* | ||
107 | * firmware doesn't set the ram size correct, so we | ||
108 | * need to do it here, otherwise we get screen corruption | ||
109 | * on older Cirrus chips | ||
110 | */ | ||
111 | pci_read_config_word (dev, PCI_COMMAND, &cmd); | ||
112 | if ((cmd & (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) | ||
113 | == (PCI_COMMAND_IO|PCI_COMMAND_MEMORY)) { | ||
114 | vga_wseq (NULL, CL_SEQR6, 0x12); /* unlock all extension registers */ | ||
115 | vga_wseq (NULL, CL_SEQRF, 0x18); | ||
116 | } | ||
117 | } | ||
118 | |||
119 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5434_8, | ||
120 | quirk_cirrus_ram_size); | ||
121 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5436, | ||
122 | quirk_cirrus_ram_size); | ||
123 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_5446, | ||
124 | quirk_cirrus_ram_size); | ||
125 | #endif | ||