aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/au1000/Kconfig9
-rw-r--r--arch/mips/au1000/common/pci.c8
-rw-r--r--arch/mips/au1000/common/setup.c9
-rw-r--r--arch/mips/cobalt/time.c21
-rw-r--r--arch/mips/kernel/process.c3
-rw-r--r--arch/mips/kernel/time.c4
-rw-r--r--arch/mips/kernel/traps.c6
-rw-r--r--arch/mips/mips-boards/generic/memory.c2
-rw-r--r--arch/mips/pci/pci.c2
9 files changed, 36 insertions, 28 deletions
diff --git a/arch/mips/au1000/Kconfig b/arch/mips/au1000/Kconfig
index 05d1354aad3a..1fe97cccead1 100644
--- a/arch/mips/au1000/Kconfig
+++ b/arch/mips/au1000/Kconfig
@@ -7,7 +7,6 @@ config MIPS_MTX1
7 bool "4G Systems MTX-1 board" 7 bool "4G Systems MTX-1 board"
8 select DMA_NONCOHERENT 8 select DMA_NONCOHERENT
9 select HW_HAS_PCI 9 select HW_HAS_PCI
10 select RESOURCES_64BIT if PCI
11 select SOC_AU1500 10 select SOC_AU1500
12 select SYS_SUPPORTS_LITTLE_ENDIAN 11 select SYS_SUPPORTS_LITTLE_ENDIAN
13 12
@@ -22,7 +21,6 @@ config MIPS_DB1000
22 select SOC_AU1000 21 select SOC_AU1000
23 select DMA_NONCOHERENT 22 select DMA_NONCOHERENT
24 select HW_HAS_PCI 23 select HW_HAS_PCI
25 select RESOURCES_64BIT if PCI
26 select SYS_SUPPORTS_LITTLE_ENDIAN 24 select SYS_SUPPORTS_LITTLE_ENDIAN
27 25
28config MIPS_DB1100 26config MIPS_DB1100
@@ -44,7 +42,6 @@ config MIPS_DB1500
44 select DMA_NONCOHERENT 42 select DMA_NONCOHERENT
45 select HW_HAS_PCI 43 select HW_HAS_PCI
46 select MIPS_DISABLE_OBSOLETE_IDE 44 select MIPS_DISABLE_OBSOLETE_IDE
47 select RESOURCES_64BIT if PCI
48 select SYS_SUPPORTS_BIG_ENDIAN 45 select SYS_SUPPORTS_BIG_ENDIAN
49 select SYS_SUPPORTS_LITTLE_ENDIAN 46 select SYS_SUPPORTS_LITTLE_ENDIAN
50 47
@@ -54,7 +51,6 @@ config MIPS_DB1550
54 select HW_HAS_PCI 51 select HW_HAS_PCI
55 select DMA_NONCOHERENT 52 select DMA_NONCOHERENT
56 select MIPS_DISABLE_OBSOLETE_IDE 53 select MIPS_DISABLE_OBSOLETE_IDE
57 select RESOURCES_64BIT if PCI
58 select SYS_SUPPORTS_LITTLE_ENDIAN 54 select SYS_SUPPORTS_LITTLE_ENDIAN
59 55
60config MIPS_MIRAGE 56config MIPS_MIRAGE
@@ -68,7 +64,6 @@ config MIPS_PB1000
68 select SOC_AU1000 64 select SOC_AU1000
69 select DMA_NONCOHERENT 65 select DMA_NONCOHERENT
70 select HW_HAS_PCI 66 select HW_HAS_PCI
71 select RESOURCES_64BIT if PCI
72 select SWAP_IO_SPACE 67 select SWAP_IO_SPACE
73 select SYS_SUPPORTS_LITTLE_ENDIAN 68 select SYS_SUPPORTS_LITTLE_ENDIAN
74 69
@@ -77,7 +72,6 @@ config MIPS_PB1100
77 select SOC_AU1100 72 select SOC_AU1100
78 select DMA_NONCOHERENT 73 select DMA_NONCOHERENT
79 select HW_HAS_PCI 74 select HW_HAS_PCI
80 select RESOURCES_64BIT if PCI
81 select SWAP_IO_SPACE 75 select SWAP_IO_SPACE
82 select SYS_SUPPORTS_LITTLE_ENDIAN 76 select SYS_SUPPORTS_LITTLE_ENDIAN
83 77
@@ -86,7 +80,6 @@ config MIPS_PB1200
86 select SOC_AU1200 80 select SOC_AU1200
87 select DMA_NONCOHERENT 81 select DMA_NONCOHERENT
88 select MIPS_DISABLE_OBSOLETE_IDE 82 select MIPS_DISABLE_OBSOLETE_IDE
89 select RESOURCES_64BIT if PCI
90 select SYS_SUPPORTS_LITTLE_ENDIAN 83 select SYS_SUPPORTS_LITTLE_ENDIAN
91 84
92config MIPS_PB1500 85config MIPS_PB1500
@@ -94,7 +87,6 @@ config MIPS_PB1500
94 select SOC_AU1500 87 select SOC_AU1500
95 select DMA_NONCOHERENT 88 select DMA_NONCOHERENT
96 select HW_HAS_PCI 89 select HW_HAS_PCI
97 select RESOURCES_64BIT if PCI
98 select SYS_SUPPORTS_LITTLE_ENDIAN 90 select SYS_SUPPORTS_LITTLE_ENDIAN
99 91
100config MIPS_PB1550 92config MIPS_PB1550
@@ -103,7 +95,6 @@ config MIPS_PB1550
103 select DMA_NONCOHERENT 95 select DMA_NONCOHERENT
104 select HW_HAS_PCI 96 select HW_HAS_PCI
105 select MIPS_DISABLE_OBSOLETE_IDE 97 select MIPS_DISABLE_OBSOLETE_IDE
106 select RESOURCES_64BIT if PCI
107 select SYS_SUPPORTS_LITTLE_ENDIAN 98 select SYS_SUPPORTS_LITTLE_ENDIAN
108 99
109config MIPS_XXS1500 100config MIPS_XXS1500
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c
index 9be99a68932a..6fa70a36a250 100644
--- a/arch/mips/au1000/common/pci.c
+++ b/arch/mips/au1000/common/pci.c
@@ -39,15 +39,15 @@
39 39
40/* TBD */ 40/* TBD */
41static struct resource pci_io_resource = { 41static struct resource pci_io_resource = {
42 .start = (resource_size_t)PCI_IO_START, 42 .start = PCI_IO_START,
43 .end = (resource_size_t)PCI_IO_END, 43 .end = PCI_IO_END,
44 .name = "PCI IO space", 44 .name = "PCI IO space",
45 .flags = IORESOURCE_IO 45 .flags = IORESOURCE_IO
46}; 46};
47 47
48static struct resource pci_mem_resource = { 48static struct resource pci_mem_resource = {
49 .start = (resource_size_t)PCI_MEM_START, 49 .start = PCI_MEM_START,
50 .end = (resource_size_t)PCI_MEM_END, 50 .end = PCI_MEM_END,
51 .name = "PCI memory space", 51 .name = "PCI memory space",
52 .flags = IORESOURCE_MEM 52 .flags = IORESOURCE_MEM
53}; 53};
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index a90d425d4651..d885e3848ec6 100644
--- a/arch/mips/au1000/common/setup.c
+++ b/arch/mips/au1000/common/setup.c
@@ -137,12 +137,11 @@ phys_t __fixup_bigphys_addr(phys_t phys_addr, phys_t size)
137 137
138#ifdef CONFIG_PCI 138#ifdef CONFIG_PCI
139 { 139 {
140 u32 start, end; 140 u32 start = (u32)Au1500_PCI_MEM_START;
141 u32 end = (u32)Au1500_PCI_MEM_END;
141 142
142 start = (u32)Au1500_PCI_MEM_START; 143 /* Check for PCI memory window */
143 end = (u32)Au1500_PCI_MEM_END; 144 if (phys_addr >= start && (phys_addr + size - 1) <= end)
144 /* check for pci memory window */
145 if ((phys_addr >= start) && ((phys_addr + size) < end))
146 return (phys_t) 145 return (phys_t)
147 ((phys_addr - start) + Au1500_PCI_MEM_START); 146 ((phys_addr - start) + Au1500_PCI_MEM_START);
148 } 147 }
diff --git a/arch/mips/cobalt/time.c b/arch/mips/cobalt/time.c
index fa819fccd5db..4a570e7145fe 100644
--- a/arch/mips/cobalt/time.c
+++ b/arch/mips/cobalt/time.c
@@ -27,9 +27,28 @@
27 27
28void __init plat_time_init(void) 28void __init plat_time_init(void)
29{ 29{
30 u32 start, end;
31 int i = HZ / 10;
32
30 setup_pit_timer(); 33 setup_pit_timer();
31 34
32 gt641xx_set_base_clock(GT641XX_BASE_CLOCK); 35 gt641xx_set_base_clock(GT641XX_BASE_CLOCK);
33 36
34 mips_timer_state = gt641xx_timer0_state; 37 /*
38 * MIPS counter frequency is measured during a 100msec interval
39 * using GT64111 timer0.
40 */
41 while (!gt641xx_timer0_state())
42 ;
43
44 start = read_c0_count();
45
46 while (i--)
47 while (!gt641xx_timer0_state())
48 ;
49
50 end = read_c0_count();
51
52 mips_hpt_frequency = (end - start) * 10;
53 printk(KERN_INFO "MIPS counter frequency %dHz\n", mips_hpt_frequency);
35} 54}
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 11cb264f59ce..2c09a442e5e5 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -77,9 +77,8 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
77 unsigned long status; 77 unsigned long status;
78 78
79 /* New thread loses kernel privileges. */ 79 /* New thread loses kernel privileges. */
80 status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK); 80 status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|ST0_FR|KU_MASK);
81#ifdef CONFIG_64BIT 81#ifdef CONFIG_64BIT
82 status &= ~ST0_FR;
83 status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR; 82 status |= test_thread_flag(TIF_32BIT_REGS) ? 0 : ST0_FR;
84#endif 83#endif
85 status |= KU_USER; 84 status |= KU_USER;
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 52075426c373..1ecfbb7eba6c 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -109,10 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd,
109 cd->mult = (u32) temp; 109 cd->mult = (u32) temp;
110} 110}
111 111
112void __init __weak plat_time_init(void)
113{
114}
115
116/* 112/*
117 * This function exists in order to cause an error due to a duplicate 113 * This function exists in order to cause an error due to a duplicate
118 * definition if platform code should have its own implementation. The hook 114 * definition if platform code should have its own implementation. The hook
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 23e73d0650a3..fcae66752972 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -1317,12 +1317,12 @@ void __init per_cpu_trap_init(void)
1317#endif 1317#endif
1318 if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) 1318 if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
1319 status_set |= ST0_XX; 1319 status_set |= ST0_XX;
1320 if (cpu_has_dsp)
1321 status_set |= ST0_MX;
1322
1320 change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX, 1323 change_c0_status(ST0_CU|ST0_MX|ST0_RE|ST0_FR|ST0_BEV|ST0_TS|ST0_KX|ST0_SX|ST0_UX,
1321 status_set); 1324 status_set);
1322 1325
1323 if (cpu_has_dsp)
1324 set_c0_status(ST0_MX);
1325
1326#ifdef CONFIG_CPU_MIPSR2 1326#ifdef CONFIG_CPU_MIPSR2
1327 if (cpu_has_mips_r2) { 1327 if (cpu_has_mips_r2) {
1328 unsigned int enable = 0x0000000f; 1328 unsigned int enable = 0x0000000f;
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c
index dc272c188233..2c5c27c8e86d 100644
--- a/arch/mips/mips-boards/generic/memory.c
+++ b/arch/mips/mips-boards/generic/memory.c
@@ -169,6 +169,7 @@ void __init prom_meminit(void)
169 169
170void __init prom_free_prom_memory(void) 170void __init prom_free_prom_memory(void)
171{ 171{
172#if 0 /* for now ... */
172 unsigned long addr; 173 unsigned long addr;
173 int i; 174 int i;
174 175
@@ -180,4 +181,5 @@ void __init prom_free_prom_memory(void)
180 free_init_pages("prom memory", 181 free_init_pages("prom memory",
181 addr, addr + boot_mem_map.map[i].size); 182 addr, addr + boot_mem_map.map[i].size);
182 } 183 }
184#endif
183} 185}
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index 589b745d822a..6e6981fd7934 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -242,6 +242,8 @@ static void pcibios_fixup_device_resources(struct pci_dev *dev,
242 for (i = 0; i < PCI_NUM_RESOURCES; i++) { 242 for (i = 0; i < PCI_NUM_RESOURCES; i++) {
243 if (!dev->resource[i].start) 243 if (!dev->resource[i].start)
244 continue; 244 continue;
245 if (dev->resource[i].flags & IORESOURCE_PCI_FIXED)
246 continue;
245 if (dev->resource[i].flags & IORESOURCE_IO) 247 if (dev->resource[i].flags & IORESOURCE_IO)
246 offset = hose->io_offset; 248 offset = hose->io_offset;
247 else if (dev->resource[i].flags & IORESOURCE_MEM) 249 else if (dev->resource[i].flags & IORESOURCE_MEM)