patch-2.2.18 linux/arch/m68k/mvme16x/config.c
Next file: linux/arch/m68k/mvme16x/mvme16x_ksyms.c
Previous file: linux/arch/m68k/mvme16x/Makefile
Back to the patch index
Back to the overall index
- Lines: 139
- Date:
Fri Oct 13 23:30:47 2000
- Orig file:
v2.2.17/arch/m68k/mvme16x/config.c
- Orig date:
Fri Apr 21 12:45:46 2000
diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/arch/m68k/mvme16x/config.c linux/arch/m68k/mvme16x/config.c
@@ -26,6 +26,7 @@
#include <linux/init.h>
#include <linux/major.h>
+#include <asm/bootinfo.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/setup.h>
@@ -36,6 +37,7 @@
int atari_SCC_reset_done = 1; /* So SCC doesn't get reset */
u_long atari_mch_cookie = 0;
+extern unsigned long mvme_bdid;
static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;
@@ -72,6 +74,14 @@
unsigned short mvme16x_config;
+int mvme16x_parse_bootinfo(const struct bi_record *bi)
+{
+ if (bi->tag == BI_VME_TYPE || bi->tag == BI_VME_BRDINFO)
+ return 0;
+ else
+ return 1;
+}
+
int mvme16x_kbdrate (struct kbd_repeat *k)
{
return 0;
@@ -92,7 +102,7 @@
static void mvme16x_get_model(char *model)
{
- p_bdid p = (p_bdid)mvme_bdid_ptr;
+ p_bdid p = (p_bdid)&mvme_bdid;
char suf[4];
suf[1] = p->brdsuffix[0];
@@ -106,7 +116,7 @@
static int mvme16x_get_hardware_list(char *buffer)
{
- p_bdid p = (p_bdid)mvme_bdid_ptr;
+ p_bdid p = (p_bdid)&mvme_bdid;
int len = 0;
if (p->brdno == 0x0162 || p->brdno == 0x0172)
@@ -134,7 +144,7 @@
__initfunc(void config_mvme16x(void))
{
- p_bdid p = (p_bdid)mvme_bdid_ptr;
+ p_bdid p = (p_bdid)&mvme_bdid;
char id[40];
mach_sched_init = mvme16x_sched_init;
@@ -200,7 +210,7 @@
static void mvme16x_abort_int (int irq, void *dev_id, struct pt_regs *fp)
{
- p_bdid p = (p_bdid)mvme_bdid_ptr;
+ p_bdid p = (p_bdid)&mvme_bdid;
unsigned long *new = (unsigned long *)vectors;
unsigned long *old = (unsigned long *)0xffe00000;
volatile unsigned char uc, *ucp;
@@ -233,7 +243,7 @@
void mvme16x_sched_init (void (*timer_routine)(int, void *, struct pt_regs *))
{
- p_bdid p = (p_bdid)mvme_bdid_ptr;
+ p_bdid p = (p_bdid)&mvme_bdid;
int irq;
tick_handler = timer_routine;
@@ -299,19 +309,22 @@
extern void mvme167_serial_console_setup(int cflag);
extern void serial167_write(struct console *co, const char *str, unsigned cnt);
+extern int serial167_wait_key(struct console *co);
extern void vme_scc_write(struct console *co, const char *str, unsigned cnt);
+extern int vme_scc_wait_key(struct console *co);
void mvme16x_init_console_port (struct console *co, int cflag)
{
- p_bdid p = (p_bdid)mvme_bdid_ptr;
+ p_bdid p = (p_bdid)&mvme_bdid;
switch (p->brdno)
{
#ifdef CONFIG_MVME162_SCC
case 0x0162:
case 0x0172:
- co->write = vme_scc_write;
+ co->write = vme_scc_write;
+ co->wait_key = vme_scc_wait_key;
return;
#endif
#ifdef CONFIG_SERIAL167
@@ -319,7 +332,8 @@
case 0x0167:
case 0x0176:
case 0x0177:
- co->write = serial167_write;
+ co->write = serial167_write;
+ co->wait_key = serial167_wait_key;
mvme167_serial_console_setup (cflag);
return;
#endif
@@ -371,4 +385,27 @@
}
restore_flags(flags);
}
+
+
+int vme_scc_wait_key (struct console *co)
+{
+ volatile unsigned char *p = (volatile char *)MVME_SCC_A_ADDR;
+ unsigned long flags;
+ int c;
+
+ /* wait for rx buf filled */
+ while ((*p & 0x01) == 0)
+ ;
+
+ save_flags(flags);
+ cli();
+
+ *p = 8;
+ scc_delay();
+ c = *p;
+
+ restore_flags(flags);
+ return c;
+}
+
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)