Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv6277
Modified Files:
cpu_vxt.c
Log Message:
Quick fix for VXT console output
Index: cpu_vxt.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/cpu_vxt.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- cpu_vxt.c 20 May 2002 09:28:31 -0000 1.3
+++ cpu_vxt.c 22 May 2002 00:36:31 -0000 1.4
@@ -12,6 +12,7 @@
#include <linux/types.h> /* For NULL */
#include <linux/kernel.h> /* For printk */
+#include <asm/io.h>
#include <asm/mtpr.h>
#include <asm/mv.h>
#include <asm/simple_io.h>
@@ -22,6 +23,10 @@
void vxt_post_vm_init(void);
const char *vxt_cpu_type_str(void);
+void vxt_putchar(int c);
+int vxt_getchar(void);
+void init_vxt_console(unsigned long phys_addr);
+
struct vxt_machine_vector {
struct vax_mv mv;
@@ -37,8 +42,8 @@
ka4x_prom_putchar, /* pre_vm_putchar */
ka4x_prom_getchar, /* pre_vm_getchar */
- dz11_putchar, /* post_vm_putchar */
- dz11_getchar, /* post_vm_getchar */
+ vxt_putchar, /* post_vm_putchar */
+ vxt_getchar, /* post_vm_getchar */
NULL, /* console_init */
@@ -63,14 +68,46 @@
void vxt_post_vm_init(void)
{
-
- init_dz11_console(0x200A0000, 3);
- dz_serial_console_init(0, 0);
+ init_vxt_console(0x200A0000);
+ register_console(&vax_console);
}
const char *vxt_cpu_type_str(void)
{
return "VXT2000";
+}
+
+/************************************************************************/
+/* These functions do I/O through the first channel of a 2694 quad UART. They
+ are intended as a quick way to get post-VM output on the VXT2000 in serial
+ console mode until there's a proper driver. */
+
+volatile int *vxt2694_addr = NULL;
+
+void vxt_putchar(int c)
+{
+ /* wait for TxRDY */
+ while((vxt2694_addr[1] & 4) == 0)
+ ;
+
+ /* send the character */
+ vxt2694_addr[3] = c & 0xff;
+}
+
+int vxt_getchar(void)
+{
+ /* Not yet implemented */
+ asm("halt");
+ return 0;
+}
+
+void init_vxt_console(unsigned long phys_addr)
+{
+ if (vxt2694_addr != NULL) {
+ return;
+ }
+
+ vxt2694_addr = ioremap(phys_addr, 256);
}
|