summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kernel/head.S25
-rw-r--r--arch/mips/kernel/setup.c7
-rw-r--r--arch/mips/mips-boards/atlas/atlas_int.c5
-rw-r--r--arch/mips/mips-boards/generic/memory.c32
-rw-r--r--arch/mips/mips-boards/malta/malta_int.c4
5 files changed, 58 insertions, 15 deletions
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index fb73d3db0..1fd8c2590 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -432,12 +432,31 @@ handle_vcei:
* unconditional jump to this vector.
*/
NESTED(except_vec_ejtag_debug, 0, sp)
- PRINT("SDBBP EJTAG debug exception - not handled yet, hang!\n");
-1: j 1b
+ j ejtag_debug_handler
nop
END(except_vec_ejtag_debug)
-
+ /*
+ * EJTAG debug exception handler.
+ */
+ NESTED(ejtag_debug_handler, PT_SIZE, sp)
+ .set noat
+ .set noreorder
+ SAVE_ALL
+ PRINT("SDBBP EJTAG debug exception - not handled yet, just ignored!\n");
+ mfc0 k0, $23 # Get EJTAG Debug register.
+ mfc0 k1, $24 # Get DEPC register.
+ bgez k0, 1f
+ addiu k1, k1, 4 # SBDDP inst. in delay slot.
+ addiu k1, k1, 4
+1: mtc0 k1, $24
+ RESTORE_ALL
+ .word 0x4200001f # deret, return EJTAG debug exception.
+ nop
+ .set at
+ END(ejtag_debug_handler)
+
+
/*
* Kernel entry point
*/
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index 82d44e33e..ac15aae33 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -305,6 +305,13 @@ static inline void cpu_probe(void)
switch (mips_cpu.processor_id & 0xff00) {
case PRID_IMP_4KC:
mips_cpu.cputype = CPU_4KC;
+ goto cpu_4kc;
+ case PRID_IMP_4KEC:
+ mips_cpu.cputype = CPU_4KEC;
+ goto cpu_4kc;
+ case PRID_IMP_4KSC:
+ mips_cpu.cputype = CPU_4KSC;
+cpu_4kc:
/* Why do we set all these options by default, THEN query them?? */
mips_cpu.cputype = MIPS_CPU_ISA_M32;
mips_cpu.options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c
index 8ff004b55..c5035ad0b 100644
--- a/arch/mips/mips-boards/atlas/atlas_int.c
+++ b/arch/mips/mips-boards/atlas/atlas_int.c
@@ -51,6 +51,11 @@ irq_desc_t irq_desc[NR_IRQS];
#define DEBUG_INT(x...)
#endif
+void inline disable_irq_nosync(unsigned int irq_nr)
+{
+ disable_atlas_irq(irq_nr);
+}
+
void disable_atlas_irq(unsigned int irq_nr)
{
atlas_hw0_icregs->intrsten = (1 << irq_nr);
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c
index 915f0a3e4..e2ba1531d 100644
--- a/arch/mips/mips-boards/generic/memory.c
+++ b/arch/mips/mips-boards/generic/memory.c
@@ -50,6 +50,11 @@ static char *mtypes[3] = {
};
#endif
+/* References to section boundaries */
+extern char _end;
+
+#define PFN_ALIGN(x) (((unsigned long)(x) + (PAGE_SIZE - 1)) & PAGE_MASK)
+
struct prom_pmemblock * __init prom_getmdesc(void)
{
@@ -94,9 +99,13 @@ struct prom_pmemblock * __init prom_getmdesc(void)
mdesc[2].size = 0x00010000;
#endif
- mdesc[3].type = yamon_free;
+ mdesc[3].type = yamon_dontuse;
mdesc[3].base = 0x00100000;
- mdesc[3].size = memsize - mdesc[3].base;
+ mdesc[3].size = PHYSADDR(PFN_ALIGN(&_end)) - mdesc[3].base;
+
+ mdesc[4].type = yamon_free;
+ mdesc[4].base = PHYSADDR(PFN_ALIGN(&_end));
+ mdesc[4].size = memsize - mdesc[4].base;
return &mdesc[0];
}
@@ -118,11 +127,10 @@ void __init prom_meminit(void)
struct prom_pmemblock *p;
#ifdef DEBUG
- int i = 0;
-
prom_printf("YAMON MEMORY DESCRIPTOR dump:\n");
p = prom_getmdesc();
while (p->size) {
+ int i = 0;
prom_printf("[%d,%p]: base<%08lx> size<%08lx> type<%s>\n",
i, p, p->base, p->size, mtypes[p->type]);
p++;
@@ -130,24 +138,24 @@ void __init prom_meminit(void)
}
#endif
p = prom_getmdesc();
+
while (p->size) {
- unsigned long base, size;
long type;
+ unsigned long base, size;
type = prom_memtype_classify (p->type);
base = p->base;
size = p->size;
add_memory_region(base, size, type);
-
- p++;
+ p++;
}
}
-void prom_free_prom_memory (void)
+void __init
+prom_free_prom_memory (void)
{
int i;
- struct prom_pmemblock *p;
unsigned long freed = 0;
unsigned long addr;
@@ -158,9 +166,9 @@ void prom_free_prom_memory (void)
addr = boot_mem_map.map[i].addr;
while (addr < boot_mem_map.map[i].addr
+ boot_mem_map.map[i].size) {
- ClearPageReserved(virt_to_page(phys_to_virt(addr)));
- set_page_count(virt_to_page(phys_to_virt(addr)), 1);
- free_page(phys_to_virt(addr));
+ ClearPageReserved(virt_to_page(__va(addr)));
+ set_page_count(virt_to_page(__va(addr)), 1);
+ free_page(__va(addr));
addr += PAGE_SIZE;
freed += PAGE_SIZE;
}
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 085fefcdb..fdfe32c75 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -69,6 +69,10 @@ static struct irqaction *irq_action[8] = {
*/
static unsigned int cached_int_mask = 0xffff;
+void inline disable_irq_nosync(unsigned int irq_nr)
+{
+ disable_irq(irq_nr);
+}
void disable_irq(unsigned int irq_nr)
{