summaryrefslogtreecommitdiffstats
path: root/arch/mips/deskstation
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/deskstation
parentbeb116954b9b7f3bb56412b2494b562f02b864b1 (diff)
Import of Linux/MIPS 2.1.14.2
Diffstat (limited to 'arch/mips/deskstation')
-rw-r--r--arch/mips/deskstation/Makefile2
-rw-r--r--arch/mips/deskstation/hw-access.c20
-rw-r--r--arch/mips/deskstation/int-handler.S4
-rw-r--r--arch/mips/deskstation/reset.c15
-rw-r--r--arch/mips/deskstation/setup.c57
5 files changed, 38 insertions, 60 deletions
diff --git a/arch/mips/deskstation/Makefile b/arch/mips/deskstation/Makefile
index 8e1b6bb13..903a73eb0 100644
--- a/arch/mips/deskstation/Makefile
+++ b/arch/mips/deskstation/Makefile
@@ -13,7 +13,7 @@
all: deskstation.o
O_TARGET := deskstation.o
-O_OBJS := hw-access.o int-handler.o setup.o
+O_OBJS := hw-access.o int-handler.o reset.o setup.o
int-handler.o: int-handler.S
diff --git a/arch/mips/deskstation/hw-access.c b/arch/mips/deskstation/hw-access.c
index 2d79e6f77..418bac5f6 100644
--- a/arch/mips/deskstation/hw-access.c
+++ b/arch/mips/deskstation/hw-access.c
@@ -13,16 +13,17 @@
#include <linux/linkage.h>
#include <linux/types.h>
#include <asm/bootinfo.h>
-#include <asm/cache.h>
+#include <asm/cachectl.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/irq.h>
-#include <asm/mc146818rtc.h>
#include <asm/vector.h>
extern int FLOPPY_IRQ;
extern int FLOPPY_DMA;
+asmlinkage extern void deskstation_handle_int(void);
+
/*
* How to access the FDC's registers.
*/
@@ -110,24 +111,21 @@ fd_disable_irq(void)
void
deskstation_fd_cacheflush(const void *addr, size_t size)
{
- cacheflush(addr, size, CF_DCACHE|CF_ALL);
+ flush_cache_all();
}
/*
- * RTC stuff (This is a guess on how Deskstation handles this ...)
+ * RTC stuff
*/
-static unsigned char
-rtc_read_data(unsigned long addr)
+static unsigned char *
+rtc_read_data()
{
- outb_p(addr, RTC_PORT(0));
- return inb_p(RTC_PORT(1));
+ return 0;
}
static void
-rtc_write_data(unsigned char data, unsigned long addr)
+rtc_write_data(unsigned char data)
{
- outb_p(addr, RTC_PORT(0));
- outb_p(data, RTC_PORT(1));
}
/*
diff --git a/arch/mips/deskstation/int-handler.S b/arch/mips/deskstation/int-handler.S
index a52df711f..d7ff36d0f 100644
--- a/arch/mips/deskstation/int-handler.S
+++ b/arch/mips/deskstation/int-handler.S
@@ -15,9 +15,9 @@
.set noreorder
.set noat
.align 5
- NESTED(deskstation_handle_int, FR_SIZE, sp)
+ NESTED(deskstation_handle_int, PT_SIZE, sp)
SAVE_ALL
- REG_S sp,FR_ORIG_REG2(sp)
+ REG_S sp,PT_OR2(sp)
CLI
.set at
lui s0,%hi(PORT_BASE)
diff --git a/arch/mips/deskstation/reset.c b/arch/mips/deskstation/reset.c
new file mode 100644
index 000000000..7fb387631
--- /dev/null
+++ b/arch/mips/deskstation/reset.c
@@ -0,0 +1,15 @@
+/*
+ * linux/arch/mips/deskstation/process.c
+ *
+ * Reset a Deskstation.
+ */
+#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/deskstation/setup.c b/arch/mips/deskstation/setup.c
index fedab9c84..59d3da401 100644
--- a/arch/mips/deskstation/setup.c
+++ b/arch/mips/deskstation/setup.c
@@ -17,7 +17,6 @@
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/mipsregs.h>
-#include <asm/processor.h>
#include <asm/vector.h>
/*
@@ -34,6 +33,7 @@ extern asmlinkage void deskstation_handle_int(void);
extern asmlinkage void deskstation_fd_cacheflush(const void *addr, size_t size);
extern struct feature deskstation_tyne_feature;
extern struct feature deskstation_rpc44_feature;
+extern void deskstation_hard_reset_now(void);
#ifdef CONFIG_DESKSTATION_TYNE
unsigned long mips_dma_cache_size = 0;
@@ -43,6 +43,10 @@ static void
tyne_irq_setup(void)
{
set_except_vector(0, deskstation_handle_int);
+ /* set the clock to 100 Hz */
+ outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
+ outb_p(LATCH & 0xff , 0x40); /* LSB */
+ outb(LATCH >> 8 , 0x40); /* MSB */
request_region(0x20,0x20, "pic1");
request_region(0xa0,0x20, "pic2");
setup_x86_irq(2, &irq2);
@@ -58,6 +62,10 @@ rpc44_irq_setup(void)
* future, we need to consider merging the two -- imp
*/
set_except_vector(0, deskstation_handle_int);
+ /* set the clock to 100 Hz */
+ outb_p(0x34, 0x43); /* binary, mode 2, LSB/MSB, ch 0 */
+ outb_p(LATCH & 0xff , 0x40); /* LSB */
+ outb(LATCH >> 8 , 0x40); /* MSB */
request_region(0x20,0x20, "pic1");
request_region(0xa0,0x20, "pic2");
setup_x86_irq(2, &irq2);
@@ -65,46 +73,9 @@ rpc44_irq_setup(void)
}
#endif
-void (*board_time_init)(struct irqaction *irq);
-
-static void deskstation_time_init(struct irqaction *irq)
-{
- /* set the clock to 100 Hz */
- outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */
- outb_p(LATCH & 0xff , 0x40); /* LSB */
- outb(LATCH >> 8 , 0x40); /* MSB */
- setup_x86_irq(0, irq);
-}
-
void
deskstation_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;
- }
- }
-
switch(mips_machtype) {
#ifdef CONFIG_DESKSTATION_TYNE
case MACH_DESKSTATION_TYNE:
@@ -115,9 +86,8 @@ deskstation_setup(void)
memcpy(&mips_dma_cache_base, TAGVALPTR(atag), atag->size);
irq_setup = tyne_irq_setup;
- feature = &deskstation_tyne_feature; // Will go away
- port_base = PORT_BASE_TYNE;
- isa_slot_offset = 0xe3000000;
+ feature = &deskstation_tyne_feature;
+ isa_slot_offset = 0xe3000000; // Will go away
break;
#endif
#ifdef CONFIG_DESKSTATION_RPC44
@@ -125,17 +95,12 @@ deskstation_setup(void)
irq_setup = rpc44_irq_setup;
mips_memory_upper = KSEG0 + (32 << 20); /* xxx fixme imp */
feature = &deskstation_rpc44_feature; // Will go away
- port_base = PORT_BASE_RPC44;
isa_slot_offset = 0xa0000000;
break;
#endif
}
- board_time_init = deskstation_time_init;
fd_cacheflush = deskstation_fd_cacheflush;
request_region(0x00,0x20,"dma1");
request_region(0x40,0x20,"timer");
request_region(0x70,0x10,"rtc");
-
- if (mips_machtype == MACH_DESKSTATION_RPC44)
- EISA_bus = 1;
}