summaryrefslogtreecommitdiffstats
path: root/arch/mips/jazz
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-03-25 23:40:36 +0000
committer <ralf@linux-mips.org>1997-03-25 23:40:36 +0000
commit7206675c40394c78a90e74812bbdbf8cf3cca1be (patch)
tree251895cf5a0008e2b4ce438cb01ad4d55fb5b97b /arch/mips/jazz
parentbeb116954b9b7f3bb56412b2494b562f02b864b1 (diff)
Import of Linux/MIPS 2.1.14.2
Diffstat (limited to 'arch/mips/jazz')
-rw-r--r--arch/mips/jazz/Makefile2
-rw-r--r--arch/mips/jazz/hw-access.c5
-rw-r--r--arch/mips/jazz/int-handler.S28
-rw-r--r--arch/mips/jazz/jazzdma.c8
-rw-r--r--arch/mips/jazz/reset.c15
-rw-r--r--arch/mips/jazz/setup.c80
6 files changed, 41 insertions, 97 deletions
diff --git a/arch/mips/jazz/Makefile b/arch/mips/jazz/Makefile
index 3ee478fee..3868b60cf 100644
--- a/arch/mips/jazz/Makefile
+++ b/arch/mips/jazz/Makefile
@@ -13,7 +13,7 @@
all: jazz.o
O_TARGET := jazz.o
-O_OBJS := hw-access.o int-handler.o jazzdma.o setup.o
+O_OBJS := hw-access.o int-handler.o jazzdma.o reset.o setup.o
ifdef CONFIG_VIDEO_G364
O_OBJS += g364.o
diff --git a/arch/mips/jazz/hw-access.c b/arch/mips/jazz/hw-access.c
index 112941275..52a61165f 100644
--- a/arch/mips/jazz/hw-access.c
+++ b/arch/mips/jazz/hw-access.c
@@ -10,11 +10,12 @@
#include <linux/delay.h>
#include <linux/linkage.h>
#include <linux/types.h>
+#include <linux/mm.h>
#include <asm/addrspace.h>
-#include <asm/cache.h>
#include <asm/vector.h>
#include <asm/jazz.h>
#include <asm/jazzdma.h>
+#include <asm/pgtable.h>
#include <asm/mc146818rtc.h>
static unsigned char
@@ -102,7 +103,7 @@ fd_disable_irq(void)
void
jazz_fd_cacheflush(const void *addr, size_t size)
{
- cacheflush((unsigned long)addr, size, CF_DCACHE|CF_ALL);
+ flush_cache_all();
}
static unsigned char
diff --git a/arch/mips/jazz/int-handler.S b/arch/mips/jazz/int-handler.S
index 03c999124..7be6b8457 100644
--- a/arch/mips/jazz/int-handler.S
+++ b/arch/mips/jazz/int-handler.S
@@ -22,10 +22,10 @@
*/
.set noreorder
- NESTED(jazz_handle_int, FR_SIZE, ra)
+ NESTED(jazz_handle_int, PT_SIZE, ra)
.set noat
SAVE_ALL
- REG_S sp,FR_ORIG_REG2(sp)
+ REG_S sp,PT_OR2(sp)
CLI
.set at
@@ -89,7 +89,7 @@ ll_local_dev: lbu t0,JAZZ_IO_IRQ_SOURCE
* whistles and bells and we're aware of the problem.
*/
ll_isa_irq: lw a0,JAZZ_EISA_IRQ_ACK
- lui s0,%hi(PORT_BASE_JAZZ)
+ lui s0,%hi(JAZZ_PORT_BASE)
li s1,1
andi t0,a0,8 # which pic?
bnez t0,ack_second
@@ -98,17 +98,17 @@ ll_isa_irq: lw a0,JAZZ_EISA_IRQ_ACK
/*
* Acknowledge first pic
*/
- lb t2,%lo(PORT_BASE_JAZZ)+0x21(s0)
+ lb t2,%lo(JAZZ_PORT_BASE)+0x21(s0)
lui s4,%hi(cache_21)
lb t0,%lo(cache_21)(s4)
sllv s1,s1,a0
or t0,s1
sb t0,%lo(cache_21)(s4)
- sb t0,%lo(PORT_BASE_JAZZ)+0x21(s0)
+ sb t0,%lo(JAZZ_PORT_BASE)+0x21(s0)
lui s3,%hi(intr_count)
lw t0,%lo(intr_count)(s3)
li t2,0x20
- sb t2,%lo(PORT_BASE_JAZZ)+0x20(s0)
+ sb t2,%lo(JAZZ_PORT_BASE)+0x20(s0)
/*
* Now call the real handler
*/
@@ -123,7 +123,7 @@ ll_isa_irq: lw a0,JAZZ_EISA_IRQ_ACK
/*
* Unblock first pic
*/
- lbu a0,%lo(PORT_BASE_JAZZ)+0x21(s0)
+ lbu a0,%lo(JAZZ_PORT_BASE)+0x21(s0)
lb a0,%lo(cache_21)(s4)
subu t0,1
sw t0,%lo(intr_count)(s3)
@@ -131,24 +131,24 @@ ll_isa_irq: lw a0,JAZZ_EISA_IRQ_ACK
and a0,s1
sb a0,%lo(cache_21)(s4)
jr v0
- sb a0,%lo(PORT_BASE_JAZZ)+0x21(s0) # delay slot
+ sb a0,%lo(JAZZ_PORT_BASE)+0x21(s0) # delay slot
.align 5
ack_second: /*
* Acknowledge second pic
*/
- lbu t2,%lo(PORT_BASE_JAZZ)+0xa1(s0)
+ lbu t2,%lo(JAZZ_PORT_BASE)+0xa1(s0)
lui s4,%hi(cache_A1)
lb t3,%lo(cache_A1)(s4)
sllv s1,s1,a0
or t3,s1
sb t3,%lo(cache_A1)(s4)
- sb t3,%lo(PORT_BASE_JAZZ)+0xa1(s0)
+ sb t3,%lo(JAZZ_PORT_BASE)+0xa1(s0)
li t3,0x20
- sb t3,%lo(PORT_BASE_JAZZ)+0xa0(s0)
+ sb t3,%lo(JAZZ_PORT_BASE)+0xa0(s0)
lui s3,%hi(intr_count)
lw t0,%lo(intr_count)(s3)
- sb t3,%lo(PORT_BASE_JAZZ)+0x20(s0)
+ sb t3,%lo(JAZZ_PORT_BASE)+0x20(s0)
/*
* Now call the real handler
*/
@@ -165,7 +165,7 @@ ack_second: /*
/*
* Unblock second pic
*/
- lb a0,%lo(PORT_BASE_JAZZ)+0xa1(s0)
+ lb a0,%lo(JAZZ_PORT_BASE)+0xa1(s0)
lb a0,%lo(cache_A1)(s4)
subu t0,1
sw t0,%lo(intr_count)(s3)
@@ -173,7 +173,7 @@ ack_second: /*
and a0,s1
sb a0,%lo(cache_A1)(s4)
jr v0
- sb a0,%lo(PORT_BASE_JAZZ)+0xa1(s0) # delay slot
+ sb a0,%lo(JAZZ_PORT_BASE)+0xa1(s0) # delay slot
/*
* Hmm... This is not just a plain PC clone so the question is
diff --git a/arch/mips/jazz/jazzdma.c b/arch/mips/jazz/jazzdma.c
index 3663f33d8..470185266 100644
--- a/arch/mips/jazz/jazzdma.c
+++ b/arch/mips/jazz/jazzdma.c
@@ -11,7 +11,7 @@
*/
#include <linux/kernel.h>
#include <linux/errno.h>
-#include <asm/cache.h>
+#include <linux/mm.h>
#include <asm/mipsregs.h>
#include <asm/mipsconfig.h>
#include <asm/jazz.h>
@@ -19,6 +19,7 @@
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/jazzdma.h>
+#include <asm/pgtable.h>
/*
* Set this to one to enable additional vdma debug code.
@@ -41,8 +42,7 @@ static int debuglvl = 3;
* entries to be unused. Using this method will at least
* allow some early device driver operations to work.
*/
-static __inline__ void
-vdma_pgtbl_init(void)
+static inline void vdma_pgtbl_init(void)
{
int i;
unsigned long paddr = 0;
@@ -69,7 +69,7 @@ unsigned long vdma_init(unsigned long memory_start, unsigned long memory_end)
*/
vdma_pagetable_start = KSEG1ADDR((memory_start + 4095) & ~4095);
vdma_pagetable_end = vdma_pagetable_start + VDMA_PGTBL_SIZE;
- cacheflush(vdma_pagetable_start, VDMA_PGTBL_SIZE, CF_DCACHE|CF_ALL);
+ flush_cache_all();
/*
* Clear the R4030 translation table
diff --git a/arch/mips/jazz/reset.c b/arch/mips/jazz/reset.c
new file mode 100644
index 000000000..a0accc3f6
--- /dev/null
+++ b/arch/mips/jazz/reset.c
@@ -0,0 +1,15 @@
+/*
+ * linux/arch/mips/acn/process.c
+ *
+ * Reset a Jazz machine.
+ */
+#include <asm/io.h>
+#include <asm/system.h>
+
+void
+jazz_hard_reset_now(void)
+{
+ printk("Implement jazz_hard_reset_now().\n");
+ printk("Press reset to continue.\n");
+ while(1);
+}
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index c5f5b1d77..6aaa2af75 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -11,10 +11,8 @@
#include <linux/ioport.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
-#include <asm/bootinfo.h>
#include <asm/irq.h>
#include <asm/jazz.h>
-#include <asm/processor.h>
#include <asm/vector.h>
#include <asm/io.h>
@@ -31,8 +29,7 @@ static struct irqaction irq2 = { no_action, 0, 0, "cascade", NULL, NULL};
extern asmlinkage void jazz_handle_int(void);
extern asmlinkage void jazz_fd_cacheflush(const void *addr, size_t size);
extern struct feature jazz_feature;
-extern void (*ibe_board_handler)(struct pt_regs *regs);
-extern void (*dbe_board_handler)(struct pt_regs *regs);
+extern void jazz_hard_reset_now(void);
static void
jazz_irq_setup(void)
@@ -47,91 +44,22 @@ jazz_irq_setup(void)
r4030_read_reg16(JAZZ_IO_IRQ_SOURCE); /* clear pending IRQs */
r4030_read_reg32(JAZZ_R4030_INVAL_ADDR); /* clear error bits */
set_cp0_status(ST0_IM, IE_IRQ4 | IE_IRQ3 | IE_IRQ2 | IE_IRQ1);
+ /* set the clock to 100 Hz */
+ r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
request_region(0x20, 0x20, "pic1");
request_region(0xa0, 0x20, "pic2");
setup_x86_irq(2, &irq2);
}
-void (*board_time_init)(struct irqaction *irq);
-
-static void jazz_time_init(struct irqaction *irq)
-{
- /* set the clock to 100 Hz */
- r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
- setup_x86_irq(0, irq);
-}
-
-/*
- * The ibe/dbe exceptions are signaled by onboard hardware and should get
- * a board specific handlers to get maximum available information. Bus
- * errors are always symptom of hardware malfunction or a kernel error.
- * We should try to handle this case a bit more gracefully than just
- * zapping the process ...
- */
-static void jazz_be_board_handler(struct pt_regs *regs)
-{
- u32 jazz_is, jazz_ia;
-
- /*
- * Give some debugging aid ...
- */
- jazz_is = r4030_read_reg32(JAZZ_R4030_IRQ_SOURCE);
- jazz_ia = r4030_read_reg32(JAZZ_R4030_INVAL_ADDR);
- printk("Interrupt Source == %08x\n", jazz_is);
- printk("Invalid Address Register == %08x\n", jazz_ia);
- show_regs(regs);
-
- /*
- * Assume it would be too dangerous to continue ...
- */
- force_sig(SIGBUS, current);
-}
-
void
jazz_setup(void)
{
- tag *atag;
-
- /*
- * we just check if a tag_screen_info can be gathered
- * in setup_arch(), if yes we don't proceed futher...
- */
- atag = bi_TagFind(tag_screen_info);
- if (!atag) {
- /*
- * If no, we try to find the tag_arc_displayinfo which is
- * always created by Milo for an ARC box (for now Milo only
- * works on ARC boxes :) -Stoned.
- */
- atag = bi_TagFind(tag_arcdisplayinfo);
- if (atag) {
- screen_info.orig_x =
- ((mips_arc_DisplayInfo*)TAGVALPTR(atag))->cursor_x;
- screen_info.orig_y =
- ((mips_arc_DisplayInfo*)TAGVALPTR(atag))->cursor_y;
- screen_info.orig_video_cols =
- ((mips_arc_DisplayInfo*)TAGVALPTR(atag))->columns;
- screen_info.orig_video_lines =
- ((mips_arc_DisplayInfo*)TAGVALPTR(atag))->lines;
- }
- }
irq_setup = jazz_irq_setup;
- board_time_init = jazz_time_init;
fd_cacheflush = jazz_fd_cacheflush;
feature = &jazz_feature; // Will go away
- port_base = PORT_BASE_JAZZ;
isa_slot_offset = 0xe3000000;
request_region(0x00,0x20,"dma1");
request_region(0x40,0x20,"timer");
/* The RTC is outside the port address space */
-
- if (mips_machtype == MACH_MIPS_MAGNUM_4000
- && mips_machtype == MACH_OLIVETTI_M700)
- EISA_bus = 1;
- /*
- * The Jazz hardware provides additional information for
- * bus errors, so we use an special handler.
- */
- ibe_board_handler = jazz_be_board_handler;
- dbe_board_handler = jazz_be_board_handler;
+ hard_reset_now = jazz_hard_reset_now;
}