diff options
Diffstat (limited to 'arch/mips/loongson/common/mem.c')
-rw-r--r-- | arch/mips/loongson/common/mem.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c index ceacd092b446..30eba6001205 100644 --- a/arch/mips/loongson/common/mem.c +++ b/arch/mips/loongson/common/mem.c | |||
@@ -16,10 +16,11 @@ | |||
16 | 16 | ||
17 | void __init prom_init_memory(void) | 17 | void __init prom_init_memory(void) |
18 | { | 18 | { |
19 | add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); | 19 | add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM); |
20 | |||
21 | add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize << | ||
22 | 20), BOOT_MEM_RESERVED); | ||
20 | 23 | ||
21 | add_memory_region(memsize << 20, LOONGSON_PCI_MEM_START - (memsize << | ||
22 | 20), BOOT_MEM_RESERVED); | ||
23 | #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG | 24 | #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG |
24 | { | 25 | { |
25 | int bit; | 26 | int bit; |
@@ -74,7 +75,7 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
74 | unsigned long end = offset + size; | 75 | unsigned long end = offset + size; |
75 | 76 | ||
76 | if (__uncached_access(file, offset)) { | 77 | if (__uncached_access(file, offset)) { |
77 | if (((uca_start && offset) >= uca_start) && | 78 | if (uca_start && (offset >= uca_start) && |
78 | (end <= uca_end)) | 79 | (end <= uca_end)) |
79 | return __pgprot((pgprot_val(vma_prot) & | 80 | return __pgprot((pgprot_val(vma_prot) & |
80 | ~_CACHE_MASK) | | 81 | ~_CACHE_MASK) | |
@@ -95,7 +96,7 @@ static int __init find_vga_mem_init(void) | |||
95 | return 0; | 96 | return 0; |
96 | 97 | ||
97 | for_each_pci_dev(dev) { | 98 | for_each_pci_dev(dev) { |
98 | if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA) { | 99 | if ((dev->class >> 16) == PCI_BASE_CLASS_DISPLAY) { |
99 | for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) { | 100 | for (idx = 0; idx < PCI_NUM_RESOURCES; idx++) { |
100 | r = &dev->resource[idx]; | 101 | r = &dev->resource[idx]; |
101 | if (!r->start && r->end) | 102 | if (!r->start && r->end) |