Subject: L68K: 2.1.115 patches
To: linux-m68k@phil.uni-sb.de (Linux Liste)
Date: Tue, 11 Aug 1998 00:59:22 +0200 (MET DST)
From: Joerg Dorchain <dorchain@wirbel.com>
Cc: jes.sorensen@cern.ch
Sender: owner-linux-m68k@phil.uni-sb.de

Hi,

The follwoing patch contains two things:
- It resolvs a naimng confilct between the lp_mfc driver and the cia
registers.
- it lets you use the devpts filesystem (I am not sure about the position
of the config question, because with this version, you have to do make
oldconfig twice in order to select the devpts filesystem)


Have fun,

Joerg


--- ./arch/m68k/config.in.old	Sat Feb  5 08:34:03 1955
+++ ./arch/m68k/config.in	Sat Feb  5 08:37:09 1955
@@ -344,6 +344,11 @@
 if [ "$CONFIG_ATARI" = "y" ]; then
   bool 'Enhanced Real Time Clock Support' CONFIG_RTC
 fi
+bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS
+if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then
+  int 'Maximum number of Unix98 PTYs in use (0-2048)' CONFIG_UNIX98_PTY_COUNT 256
+fi
+
 endmenu
 
 mainmenu_option next_comment
--- ./drivers/char/lp_mfc.c.old	Mon Aug 10 21:07:21 1998
+++ ./drivers/char/lp_mfc.c	Mon Aug 10 21:09:28 1998
@@ -17,9 +17,7 @@
 #include <linux/sched.h>
 #include <linux/lp_m68k.h>
 #include <linux/lp_mfc.h>
-#if 0
 #include <linux/mc6821.h>
-#endif
 #include <asm/amigahw.h>
 #include <linux/zorro.h>
 #include <asm/irq.h>
@@ -47,23 +45,23 @@
 int wait = 0;
 
 while (wait != lp_table[dev]->wait) wait++;
-dummy = pia(dev)->prb; /* trigger read clears irq bit*/
-pia(dev)->prb = c;  /* strobe goes down by hardware */
+dummy = pia(dev)->pprb; /* trigger read clears irq bit*/
+pia(dev)->pprb = c;  /* strobe goes down by hardware */
 }
 
 static int lp_mfc_busy(int dev)
 {
-return pia(dev)->pra&1;
+return pia(dev)->ppra&1;
 }
 
 static int lp_mfc_pout(int dev)
 {
-return pia(dev)->pra&2;
+return pia(dev)->ppra&2;
 }
 
 static int lp_mfc_online(int dev)
 {
-return pia(dev)->pra&4;
+return pia(dev)->ppra&4;
 }
 
 static void lp_mfc_interrupt(int irq,void *data,struct pt_regs *fp)
@@ -73,7 +71,7 @@
 for( i=0; i<MAX_LP; i++)  /* test all lp's */
 	if (minor[i] != -1)  /* one of ours ? */
 		if (pia(minor[i])->crb&128) { /* has an irq? */
-			dummy = pia(minor[i])->prb; /* clear bit */
+			dummy = pia(minor[i])->pprb; /* clear bit */
 			lp_interrupt(minor[i]);
 		}
 }
@@ -112,16 +110,16 @@
   pp = (struct pia *)ZTWO_VADDR((((u_char *)cd->cd_BoardAddr)+PIABASE));
   if (pias < MAX_LP) {
 	pp->crb = 0;
-	pp->ddrb = 255;    /* all pins output */
+	pp->pddrb = 255;    /* all pins output */
 	pp->crb = PIA_DDR|32|8;
-	dummy = pp->prb;
+	dummy = pp->pprb;
 	pp->crb |=(lp_irq!=0)?PIA_C1_ENABLE_IRQ:0; 
 	pp->cra = 0;
-	pp->ddra = 0xe0;   /* /RESET,  /DIR ,/AUTO-FEED output */
+	pp->pddra = 0xe0;   /* /RESET,  /DIR ,/AUTO-FEED output */
 	pp->cra = PIA_DDR;
-	pp->pra = 0;    /* reset printer */
+	pp->ppra = 0;    /* reset printer */
 	udelay(5);
-	pp->pra |= 128;
+	pp->ppra |= 128;
 	tab[pias].name="Multiface III LP";
 	tab[pias].lp_out=lp_mfc_out;
 	tab[pias].lp_is_busy=lp_mfc_busy;
--- ./include/linux/mc6821.h.old	Mon Aug 10 21:06:25 1998
+++ ./include/linux/mc6821.h	Mon Aug 10 21:07:06 1998
@@ -37,10 +37,10 @@
 	u_char pad4[PIA_REG_PADWIDTH];
 };
 
-#define pra ua.pra
-#define ddra ua.ddra
-#define prb ub.prb
-#define ddrb ub.ddrb
+#define ppra ua.pra
+#define pddra ua.ddra
+#define pprb ub.prb
+#define pddrb ub.ddrb
 
 #define PIA_C1_ENABLE_IRQ (1<<0)
 #define PIA_C1_LOW_TO_HIGH (1<<1)
