Commit a42a3570 authored by James Nelson's avatar James Nelson Committed by Linus Torvalds

[PATCH] pcxx: Remove obsolete driver

Remove the pcxx driver.  It is obsoleted by the epca driver.
Signed-off-by: default avatarJames Nelson <james4765@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 86c54fbd
......@@ -712,13 +712,6 @@ L: linux-net@vger.kernel.org
W: http://www.digi.com
S: Orphaned
DIGIBOARD PC/XE AND PC/XI DRIVER
P: Christoph Lameter
M: christoph@lameter.com
W: http://www.digi.com
L: digilnux@digi.com
S: Obsolete
DIRECTORY NOTIFICATION
P: Stephen Rothwell
M: sfr@canb.auug.org.au
......
......@@ -148,26 +148,9 @@ config DIGIEPCA
you have a card like this, say Y here and read the file
<file:Documentation/digiepca.txt>.
NOTE: There is another, separate driver for the Digiboard PC boards:
"Digiboard PC/Xx Support" below. You should (and can) only select
one of the two drivers.
To compile this driver as a module, choose M here: the
module will be called epca.
config DIGI
tristate "Digiboard PC/Xx Support"
depends on SERIAL_NONSTANDARD && DIGIEPCA=n && BROKEN_ON_SMP
help
This is a driver for the Digiboard PC/Xe, PC/Xi, and PC/Xeve cards
that give you many serial ports. You would need something like this
to connect more than two modems to your Linux box, for instance in
order to become a dial-in server. If you have a card like that, say
Y here and read the file <file:Documentation/digiboard.txt>.
To compile this driver as a module, choose M here: the
module will be called pcxx.
config ESPSERIAL
tristate "Hayes ESP serial port support"
depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP
......
......@@ -25,7 +25,6 @@ obj-$(CONFIG_SERIAL167) += serial167.o
obj-$(CONFIG_CYCLADES) += cyclades.o
obj-$(CONFIG_STALLION) += stallion.o
obj-$(CONFIG_ISTALLION) += istallion.o
obj-$(CONFIG_DIGI) += pcxx.o
obj-$(CONFIG_DIGIEPCA) += epca.o
obj-$(CONFIG_SPECIALIX) += specialix.o
obj-$(CONFIG_MOXA_INTELLIO) += moxa.o
......
/* DigiBoard PCXX Bios */
static unsigned char pcxx_bios[] __initdata = {
0x28,0x43,0x29,0x20,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,
0x74,0x20,0x31,0x39,0x39,0x34,0x2c,0x20,0x44,0x69,0x67,0x69,
0x42,0x6f,0x61,0x72,0x64,0x20,0x49,0x6e,0x63,0x2e,0x00,0x00,
0x8a,0xf8,0x8a,0xf8,0x15,0xf9,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,
0x8a,0xf8,0x8a,0xf8,0xbc,0xf8,0x8a,0xf8,0x96,0xf8,0x96,0xf8,
0x96,0xf8,0x96,0xf8,0x96,0xf8,0x96,0xf8,0x8a,0xf8,0x8a,0xf8,
0x96,0xf8,0x96,0xf8,0x8a,0xf8,0xad,0xf8,0xb0,0xf8,0x8a,0xf8,
0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,
0x8a,0xf8,0x8a,0xf8,0x8a,0xf8,0x04,0x02,0x00,0x02,0x14,0x02,
0x10,0x02,0x24,0x02,0x20,0x02,0x34,0x02,0x30,0x02,0x44,0x02,
0x40,0x02,0x54,0x02,0x50,0x02,0x64,0x02,0x60,0x02,0x74,0x02,
0x70,0x02,0x04,0x01,0x00,0x01,0x1e,0x2e,0x8e,0x1e,0x22,0xf8,
0xfe,0x06,0x70,0x00,0x1f,0xcf,0x1e,0x50,0x52,0x2e,0x8e,0x1e,
0x22,0xf8,0xfe,0x06,0x71,0x00,0xb8,0x00,0x80,0xba,0x22,0xff,
0xef,0x5a,0x58,0x1f,0xcf,0xb4,0x80,0xcf,0x1e,0x2e,0x8e,0x1e,
0x22,0xf8,0xfe,0x06,0x2b,0x00,0x1f,0xcf,0x1e,0x52,0x50,0x2e,
0x8e,0x1e,0x22,0xf8,0xcd,0x16,0xfe,0x06,0x2a,0x00,0x80,0x3e,
0x2a,0x00,0x12,0x72,0x39,0xc6,0x06,0x2a,0x00,0x00,0xfe,0x06,
0x29,0x00,0x80,0x3e,0x29,0x00,0x3c,0x72,0x29,0xc6,0x06,0x29,
0x00,0x00,0xfe,0x06,0x28,0x00,0x80,0x3e,0x28,0x00,0x3c,0x72,
0x19,0xc6,0x06,0x28,0x00,0x00,0xfe,0x06,0x27,0x00,0x80,0x3e,
0x27,0x00,0x18,0x72,0x09,0xc6,0x06,0x27,0x00,0x00,0xff,0x06,
0x25,0x00,0xba,0x22,0xff,0xb8,0x00,0x80,0xef,0x58,0x5a,0x1f,
0xcf,0x60,0x1e,0x06,0xfc,0x2e,0x8e,0x06,0x22,0xf8,0x2e,0x8e,
0x1e,0x22,0xf8,0x8d,0x36,0x40,0x00,0xad,0x3c,0x3f,0x7f,0x22,
0x3c,0x1f,0x7f,0x22,0x32,0xe4,0xd1,0xe0,0x3d,0x16,0x00,0x90,
0x73,0x14,0xbb,0x56,0xf9,0x03,0xd8,0x2e,0xff,0x17,0x8d,0x36,
0x40,0x00,0xb0,0x00,0x89,0x04,0x07,0x1f,0x61,0xcf,0xb4,0x80,
0xeb,0xf0,0xcd,0x15,0xeb,0xec,0x6c,0xf9,0x79,0xf9,0xb9,0xf9,
0xd3,0xf9,0xd8,0xf9,0xe1,0xf9,0xe9,0xf9,0xf2,0xf9,0xfa,0xf9,
0xfd,0xf9,0x2a,0xfa,0xe4,0x00,0x24,0xf7,0xe6,0x00,0x0c,0x08,
0xe6,0x00,0xb4,0x00,0xc3,0x1e,0xad,0x8b,0xd8,0xad,0x8e,0xdb,
0x8b,0xf0,0x33,0xdb,0x8b,0x07,0x3d,0x4f,0x53,0x75,0x2a,0x8a,
0x47,0x02,0x32,0xe4,0x86,0xc4,0x8b,0xc8,0x32,0xc0,0x02,0x07,
0x43,0xe2,0xfb,0x0a,0xc0,0x75,0x16,0x8c,0xd9,0x1f,0x89,0x0e,
0x2e,0x00,0x89,0x36,0x2c,0x00,0x8d,0x1e,0x02,0x00,0xc7,0x07,
0x45,0x4d,0x32,0xe4,0xc3,0x1f,0xb4,0x80,0xc3,0xad,0x8b,0xd8,
0xad,0x8b,0xd0,0xad,0x8e,0xc0,0xad,0x8b,0xf8,0xad,0x8b,0xc8,
0x8b,0xf2,0x1e,0x8e,0xdb,0xf3,0xa4,0x1f,0x32,0xe4,0xc3,0xea,
0xf0,0xff,0x00,0xf0,0xad,0x8b,0xd0,0xec,0x88,0x04,0x32,0xe4,
0xc3,0xad,0x8b,0xd0,0xac,0xee,0x32,0xe4,0xc3,0xad,0x8b,0xd0,
0xed,0x89,0x04,0x32,0xe4,0xc3,0xad,0x8b,0xd0,0xad,0xef,0x32,
0xe4,0xc3,0xb4,0x80,0xc3,0xac,0x3c,0x12,0x7f,0x25,0xfe,0xc8,
0x32,0xe4,0xd1,0xe0,0x8d,0x1e,0x66,0xf8,0x03,0xd8,0x2e,0x8b,
0x17,0xec,0xac,0x3c,0x0f,0x7f,0x10,0x3c,0x00,0x74,0x03,0xee,
0x90,0x90,0xec,0x8b,0xfe,0x1e,0x07,0xaa,0x32,0xe4,0xc3,0xb4,
0x80,0xc3,0xac,0x3c,0x12,0x7f,0x1f,0xfe,0xc8,0x32,0xe4,0xd1,
0xe0,0x8d,0x1e,0x66,0xf8,0x03,0xd8,0x2e,0x8b,0x17,0xec,0xac,
0x3c,0x0f,0x7f,0x0a,0x3c,0x00,0x74,0x01,0xee,0xac,0xee,0x32,
0xe4,0xc3,0xb4,0x80,0xc3,0xfc,0x8e,0xc0,0xb8,0xff,0xff,0x8b,
0xcb,0x33,0xff,0xf3,0xab,0x8b,0xcb,0x33,0xff,0xf3,0xaf,0xe3,
0x01,0xc3,0x8b,0xcb,0xbf,0x00,0x00,0x26,0x89,0x3d,0x83,0xc7,
0x02,0xe2,0xf8,0xbe,0x00,0x00,0x8b,0xcb,0x26,0x8b,0x3c,0x3b,
0xfe,0x74,0x01,0xc3,0x83,0xc6,0x02,0x83,0xc7,0x02,0xe2,0xf0,
0x33,0xc0,0x8b,0xcb,0x33,0xff,0xf3,0xab,0x8b,0xcb,0x33,0xff,
0xf3,0xaf,0xc3,0x32,0xc0,0x26,0x80,0x3e,0x23,0x00,0x00,0x74,
0x02,0x0c,0x01,0x26,0xf7,0x06,0x20,0x00,0x0f,0x00,0x74,0x02,
0x0c,0x02,0x26,0xf7,0x06,0x20,0x00,0xf0,0x00,0x74,0x02,0x0c,
0x04,0x26,0xf7,0x06,0x20,0x00,0x00,0xff,0x74,0x02,0x0c,0x08,
0x26,0xa2,0x24,0x00,0xb8,0x00,0x40,0xba,0x5e,0xff,0xef,0xba,
0x66,0xff,0xef,0xba,0x52,0xff,0xb8,0x63,0x0e,0xef,0xba,0x56,
0xff,0xb8,0x05,0xe0,0xef,0xba,0x28,0xff,0xb8,0xfc,0x00,0xef,
0xb8,0x00,0x02,0x26,0xa3,0x2e,0x00,0xb8,0x04,0x00,0x26,0xa3,
0x2c,0x00,0xb0,0xc3,0xe6,0x08,0x8a,0xd8,0xe4,0x08,0x3a,0xc3,
0x75,0x06,0x26,0xc6,0x06,0xb4,0x00,0x01,0xb0,0x00,0xe6,0x00,
0xfc,0x8d,0x3e,0x00,0x00,0xb8,0x47,0x44,0xab,0xb8,0xff,0xff,
0xab,0xab,0xab,0xb8,0x42,0x49,0xab,0xb8,0x4f,0x53,0xab,0xb8,
0x58,0x69,0x26,0x80,0x3e,0x10,0x00,0x04,0x74,0x0e,0xb8,0x58,
0x65,0x26,0x80,0x3e,0x10,0x00,0x03,0x74,0x03,0xb8,0x58,0x74,
0xab,0x8d,0x36,0xfe,0xff,0x8a,0x04,0x8d,0x36,0xff,0xff,0x8a,
0x24,0xab,0xfb,0x26,0x81,0x0e,0x12,0x00,0x00,0x08,0x06,0x1f,
0xa1,0x00,0x00,0x8b,0x1e,0x02,0x00,0x3d,0x44,0x47,0x75,0x0b,
0x26,0x81,0x0e,0x12,0x00,0x00,0x10,0xff,0x2e,0x2c,0x00,0x81,
0xfb,0x45,0x4d,0x75,0xe3,0x26,0x81,0x0e,0x12,0x00,0x00,0x20,
0xff,0x2e,0x2c,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xfa,0xba,0xa8,0xff,0xb8,0xba,0x81,0xef,
0xba,0xa4,0xff,0xb8,0x3a,0x00,0xef,0x90,0xe4,0x00,0xa8,0x60,
0x75,0x0c,0x24,0x06,0x74,0x14,0x3c,0x02,0x74,0x1c,0x3c,0x04,
0x74,0x24,0xbb,0x38,0xc0,0xbe,0xf8,0x81,0xbf,0xba,0xa0,0xeb,
0x22,0x90,0xbb,0x38,0xf0,0xbe,0xf8,0x41,0xbf,0xba,0x81,0xeb,
0x16,0x90,0xbb,0x38,0xf0,0xbe,0xf8,0xe1,0xbf,0xba,0x88,0xeb,
0x0a,0x90,0xbb,0x38,0xc0,0xbe,0xf8,0x41,0xbf,0xba,0x81,0xba,
0xa0,0xff,0x8b,0xc3,0xef,0xba,0xa2,0xff,0xb8,0xf8,0x0f,0xef,
0xba,0xa6,0xff,0x8b,0xc6,0xef,0xba,0xa8,0xff,0x8b,0xc7,0xef,
0x8c,0xc8,0x8e,0xd8,0xe4,0x00,0x24,0x06,0x74,0x17,0xbb,0x00,
0x80,0xbd,0xc0,0xe0,0x3c,0x02,0x74,0x5a,0xbd,0xc0,0xc0,0x3c,
0x04,0x74,0x53,0xbd,0xc0,0x80,0xeb,0x4e,0x90,0xb9,0x08,0x00,
0xb8,0x00,0x80,0x8e,0xc0,0x26,0xa3,0x00,0x00,0x05,0x00,0x10,
0xe2,0xf5,0xbd,0xc0,0xf0,0xbb,0x00,0x7c,0xb8,0x00,0xe0,0x8e,
0xc0,0x26,0x8b,0x0e,0x00,0x00,0x3b,0xc8,0x75,0x28,0xbb,0x00,
0x80,0xbd,0xc0,0xe0,0xb8,0x00,0xc0,0x8e,0xc0,0x26,0x8b,0x0e,
0x00,0x00,0x3b,0xc8,0x75,0x14,0xbd,0xc0,0xc0,0xb8,0x00,0x80,
0x8e,0xc0,0x26,0x8b,0x0e,0x00,0x00,0x3b,0xc8,0x75,0x03,0xbd,
0xc0,0x80,0x8c,0xc8,0x8e,0xd0,0xbc,0xed,0xfc,0x8b,0xc5,0x25,
0x00,0xf0,0xe9,0x6c,0xfd,0xb4,0x00,0x74,0x06,0xb4,0xff,0xeb,
0x02,0xe5,0xfc,0x8e,0xc5,0x2e,0x89,0x2e,0x22,0xf8,0xe4,0x00,
0x24,0x16,0x26,0xa2,0x11,0x00,0x26,0x83,0x0e,0x12,0x00,0x01,
0x80,0xfc,0x00,0x74,0x06,0x26,0x83,0x0e,0x14,0x00,0x01,0x26,
0xc7,0x06,0x18,0x00,0x40,0x00,0x26,0xc6,0x06,0x10,0x00,0x03,
0xa8,0x10,0x74,0x06,0x26,0xc6,0x06,0x10,0x00,0x04,0xb8,0x00,
0x00,0x8e,0xc0,0xb8,0xaa,0x55,0x26,0xa3,0x00,0x00,0x26,0xc7,
0x06,0x02,0x00,0x00,0x00,0x26,0xc7,0x06,0x04,0x00,0x00,0x00,
0x8b,0xcd,0x81,0xe1,0x00,0xf0,0x8e,0xc1,0x26,0x8b,0x1e,0x00,
0x00,0x3b,0xc3,0x75,0x13,0x8e,0xc5,0x26,0xc6,0x06,0x10,0x00,
0x05,0xb8,0x40,0x00,0x8e,0xd0,0xbc,0x00,0x04,0xe9,0x99,0x00,
0x8c,0xc8,0x8e,0xd0,0xbc,0x7c,0xfd,0xb8,0x00,0x00,0xbb,0x00,
0x20,0xe9,0xdd,0xfc,0xb4,0x00,0x74,0x06,0xb4,0xff,0xeb,0x02,
0x74,0xfd,0x8e,0xc5,0x80,0xfc,0x00,0x74,0x08,0x26,0x83,0x0e,
0x14,0x00,0x02,0xeb,0x0d,0x26,0xc7,0x06,0x16,0x00,0x10,0x00,
0x26,0x83,0x0e,0x12,0x00,0x02,0xb8,0x40,0x00,0x8e,0xd0,0xbc,
0x00,0x04,0xe4,0x00,0xa8,0x60,0x75,0x07,0xba,0xa2,0xff,0xb8,
0xfc,0x0f,0xef,0xb8,0x00,0x04,0x8e,0xc0,0xb8,0xaa,0x55,0x26,
0xa3,0x00,0x00,0x26,0xc7,0x06,0x02,0x00,0x00,0x00,0x26,0xc7,
0x06,0x04,0x00,0x00,0x00,0xb9,0x00,0x00,0x8e,0xc1,0x26,0x8b,
0x1e,0x00,0x00,0x3b,0xc3,0x75,0x02,0xeb,0x24,0x8e,0xc5,0x26,
0x83,0x0e,0x12,0x00,0x04,0xb8,0x00,0x04,0xbb,0x00,0x60,0x06,
0xe8,0x66,0xfc,0x07,0x75,0x09,0x26,0xc7,0x06,0x16,0x00,0x40,
0x00,0xeb,0x06,0x26,0x83,0x0e,0x14,0x00,0x04,0x8e,0xc5,0x8c,
0xc0,0x3d,0xc0,0xf0,0x75,0x03,0xe9,0x9f,0x00,0x3d,0xc0,0x80,
0x74,0x62,0x3d,0xc0,0xc0,0x74,0x23,0x26,0x83,0x0e,0x12,0x00,
0x08,0xb8,0x00,0xf0,0xbb,0x00,0x7c,0x06,0xe8,0x2e,0xfc,0x07,
0x75,0x08,0x26,0x83,0x06,0x18,0x00,0x40,0xeb,0x06,0x26,0x83,
0x0e,0x14,0x00,0x08,0xeb,0x72,0xb9,0x03,0x00,0xb8,0x00,0xd0,
0xba,0x08,0x00,0xbb,0x00,0x80,0x3d,0x00,0xf0,0x75,0x03,0xbb,
0x00,0x7c,0x26,0x09,0x16,0x12,0x00,0x06,0x50,0x51,0xe8,0xfc,
0xfb,0x59,0x58,0x07,0x75,0x0f,0x26,0x83,0x06,0x18,0x00,0x40,
0xd1,0xe2,0x05,0x00,0x10,0xe2,0xd8,0xeb,0x05,0x26,0x09,0x16,
0x14,0x00,0xeb,0x38,0xb9,0x07,0x00,0xb8,0x00,0x90,0xba,0x08,
0x00,0xbb,0x00,0x80,0x3d,0x00,0xf0,0x75,0x03,0xbb,0x00,0x7c,
0x26,0x09,0x16,0x12,0x00,0x06,0x50,0x51,0xe8,0xc2,0xfb,0x59,
0x58,0x07,0x75,0x0f,0x26,0x83,0x06,0x18,0x00,0x40,0xd1,0xe2,
0x05,0x00,0x10,0xe2,0xd8,0xeb,0x05,0x26,0x09,0x16,0x14,0x00,
0x26,0xa1,0x18,0x00,0x2d,0x10,0x00,0x26,0xa3,0x1a,0x00,0x06,
0xfc,0x33,0xff,0x8e,0xc7,0xb9,0x00,0x02,0xb8,0x00,0xf0,0xf3,
0xab,0x33,0xff,0xbe,0x24,0xf8,0xb9,0x20,0x00,0xa5,0x47,0x47,
0xe2,0xfb,0xbe,0x64,0xf8,0xb9,0xe0,0x00,0x8b,0x1c,0x26,0x89,
0x1d,0x83,0xc7,0x04,0xe2,0xf8,0x07,0xba,0x28,0xff,0xb8,0xfd,
0x00,0xef,0xba,0x32,0xff,0xb8,0x0d,0x00,0xef,0xba,0x34,0xff,
0xb8,0x0f,0x00,0xef,0xba,0x36,0xff,0xb8,0x0e,0x00,0xef,0xba,
0x38,0xff,0xb8,0x19,0x00,0xef,0xba,0x3a,0xff,0xb8,0x18,0x00,
0xef,0xba,0x3c,0xff,0xb8,0x0b,0x00,0xef,0xba,0x3e,0xff,0xb8,
0x1a,0x00,0xef,0x8d,0x3e,0x90,0x00,0x8d,0x36,0x66,0xf8,0xb9,
0x10,0x00,0xf3,0xa5,0x8d,0x3e,0xb0,0x00,0x8d,0x36,0x86,0xf8,
0xb9,0x02,0x00,0xf3,0xa5,0xb9,0x10,0x00,0x8d,0x36,0x90,0x00,
0x83,0xc6,0x1e,0x26,0x8b,0x14,0xb3,0x10,0x32,0xc0,0xec,0xb0,
0x0c,0xee,0x8a,0xc3,0x8a,0xc3,0xee,0x83,0xee,0x02,0x26,0x8b,
0x14,0xfe,0xcb,0xe2,0xeb,0xb9,0x10,0x00,0x8d,0x36,0x90,0x00,
0x26,0x8b,0x14,0xb3,0x01,0xbf,0x00,0x80,0xb0,0x0c,0xee,0xf6,
0xe8,0xec,0x3a,0xc3,0x75,0x0e,0xd1,0xc7,0x26,0x09,0x3e,0x20,
0x00,0x26,0xfe,0x06,0x22,0x00,0xeb,0x07,0x33,0xc0,0x26,0x89,
0x04,0xd1,0xc7,0x83,0xc6,0x02,0x26,0x8b,0x14,0xfe,0xc3,0xe2,
0xd7,0x26,0xc6,0x06,0x23,0x00,0x01,0x8d,0x36,0xb0,0x00,0x26,
0x8b,0x14,0x32,0xc0,0xee,0xb0,0x0c,0xee,0xb0,0x5a,0xee,0xb0,
0x0c,0xee,0xf6,0xe8,0xec,0x3c,0x5a,0x74,0x14,0x26,0xc7,0x06,
0xb0,0x00,0x00,0x00,0x26,0xc7,0x06,0xb2,0x00,0x00,0x00,0x26,
0xc6,0x06,0x23,0x00,0x00,0xe9,0xd3,0xfa,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xea,0x00,0xfc,0x00,0xf0,0x4d,0x2f,0x50,
0x43,0x2f,0x58,0x2a,0x39,0x34,0x34,0x31
};
/* DigiBoard PCXX Bios */
static unsigned char pcxx_cook[] __initdata = {
0x4f,0x53,0x18,0x80,0xe9,0xbf,0x15,0x00,0x40,0x28,0x23,0x29,
0x46,0x45,0x50,0x4f,0x53,0x20,0x37,0x2e,0x30,0x38,0x20,0x34,
0x2f,0x32,0x30,0x2f,0x39,0x35,0x00,0x40,0x28,0x23,0x29,0x28,
0x43,0x29,0x43,0x6f,0x70,0x79,0x72,0x69,0x67,0x68,0x74,0x20,
0x31,0x39,0x38,0x39,0x2d,0x31,0x39,0x39,0x35,0x20,0x44,0x69,
0x67,0x69,0x42,0x6f,0x61,0x72,0x64,0x20,0x49,0x6e,0x63,0x2e,
0x00,0xcb,0x0c,0xcb,0x0c,0xe2,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
0x0c,0xcb,0x0c,0xcb,0x0c,0x57,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
0x0c,0x53,0x0b,0xcb,0x0c,0xcb,0x0c,0x42,0x0b,0xcb,0x0c,0xcb,
0x0c,0x12,0x0d,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,0x0c,0xcb,
0x0c,0xcb,0x0c,0xcb,0x0c,0x00,0x10,0x80,0x10,0x00,0x11,0x80,
0x11,0x00,0x12,0x80,0x12,0x00,0x13,0x80,0x13,0x00,0x14,0x80,
0x14,0x00,0x15,0x80,0x15,0x00,0x16,0x80,0x16,0x00,0x17,0x80,
0x17,0x78,0x0b,0xb9,0x0b,0x50,0x0c,0xb9,0x0b,0x8d,0x0b,0x8d,
0x0b,0x8d,0x0b,0x8d,0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,
0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,0x0b,0x50,0x0c,0xb9,
0x0b,0x50,0x0c,0xb9,0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,0x0b,0x8d,
0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,0x0b,0xc0,0x0b,0x8d,0x0b,0x8d,
0x0b,0x8d,0x0b,0x8d,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,
0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x94,0x0b,0x16,0x00,0xfe,
0x11,0xfe,0x0b,0x2c,0x08,0xb5,0x06,0xfe,0x05,0x7e,0x04,0xfe,
0x02,0x7e,0x01,0xbe,0x00,0x7e,0x00,0x5e,0x00,0x2e,0x00,0x16,
0x00,0x0a,0x00,0x04,0x00,0x16,0x00,0x02,0x00,0x01,0x00,0x00,
0x00,0x0e,0x00,0x06,0x00,0x7e,0x04,0xfe,0x02,0x7e,0x01,0xbe,
0x00,0x7e,0x00,0x5e,0x00,0x2e,0x00,0x16,0x00,0x0a,0x00,0x04,
0x00,0x18,0x00,0x86,0x13,0x03,0x0d,0xdf,0x08,0x41,0x07,0x81,
0x06,0xe0,0x04,0x3f,0x03,0x9f,0x01,0xce,0x00,0x89,0x00,0x66,
0x00,0x32,0x00,0x18,0x00,0x0b,0x00,0x0b,0x00,0x18,0x00,0x0b,
0x00,0x0b,0x00,0x0b,0x00,0x41,0x07,0x81,0x06,0xe0,0x04,0x3f,
0x03,0x9f,0x01,0xce,0x00,0x89,0x00,0x66,0x00,0x32,0x00,0x18,
0x00,0x0b,0x00,0x0b,0x00,0x00,0x80,0x40,0xc0,0x1f,0x3f,0x7f,
0xff,0x00,0x04,0x02,0x06,0x08,0x0c,0x0a,0x0e,0x00,0x04,0x02,
0x06,0x08,0x0c,0x0a,0x0e,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0x1e,0x06,0x3e,
0x06,0xef,0x06,0xf8,0x05,0x0e,0x06,0x55,0x07,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0xa1,
0x05,0xa1,0x05,0xa1,0x05,0xa1,0x05,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x5b,0x05,0xea,0x05,0xea,0x05,0xea,
0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,
0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,
0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,
0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0xea,0x05,0x69,
0x05,0x77,0x05,0x85,0x05,0x93,0x05,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,0x08,0xa0,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,0x08,0x9d,
0x08,0x00,0x00,0xfa,0x8a,0x5c,0x50,0xf6,0xc3,0x0e,0x75,0x3c,
0xf6,0xc3,0x40,0x75,0x16,0xf6,0xc3,0x10,0x74,0x26,0xf6,0xc3,
0x01,0x75,0x13,0xf6,0xc3,0x20,0x75,0x15,0xc7,0x04,0xb6,0x04,
0xe9,0xcf,0x00,0x8b,0x44,0x02,0x89,0x04,0xff,0xe0,0xc7,0x04,
0x03,0x05,0xe9,0x0e,0x01,0xc7,0x04,0x66,0x08,0xe9,0x6a,0x04,
0xf6,0xc3,0x20,0x74,0x1a,0xc7,0x04,0xb3,0x08,0xe9,0xab,0x04,
0x8b,0x54,0x20,0xec,0x8a,0xc8,0xf6,0xc3,0x02,0x75,0x42,0xf6,
0xc3,0x08,0x75,0x0e,0xeb,0x69,0x90,0xc7,0x04,0x20,0x04,0xfb,
0x81,0xc6,0x80,0x00,0xff,0x24,0xf6,0xc1,0x04,0x74,0x27,0x80,
0x64,0x50,0xf7,0xf6,0x44,0x51,0x02,0x74,0x13,0xf6,0x44,0x29,
0x10,0x74,0x0d,0x8a,0x44,0x5d,0x83,0xc2,0x02,0xee,0x83,0xea,
0x02,0xe9,0x49,0x04,0x8a,0x44,0x5c,0x83,0xc2,0x02,0xee,0x83,
0xea,0x02,0xe9,0x3c,0x04,0xf6,0x44,0x50,0x04,0x75,0x28,0x83,
0x7c,0x24,0xff,0x74,0x1f,0xa1,0x00,0x0e,0x2b,0x44,0x26,0x3d,
0x64,0x00,0x77,0x14,0xb0,0x05,0xee,0x8a,0x44,0x75,0x24,0xef,
0x88,0x44,0x75,0xee,0x80,0x64,0x50,0xfd,0x80,0x64,0x4b,0xfd,
0xe9,0x0e,0x04,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,
0x74,0x25,0xb0,0x05,0xee,0x8a,0x44,0x75,0x0c,0x10,0x88,0x44,
0x75,0xee,0xa1,0x00,0x0e,0x03,0x44,0x24,0x89,0x44,0x26,0x80,
0x64,0x50,0xfb,0x80,0x64,0x4b,0xfb,0x80,0x4c,0x50,0x02,0x80,
0x4c,0x4b,0x02,0xe9,0xdb,0x03,0xfa,0x8b,0x54,0x20,0xec,0x8a,
0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,0x75,0x19,0x8b,0x7c,0x0c,
0x3b,0x7c,0x0a,0x74,0x18,0x8e,0x44,0x08,0x26,0x8a,0x05,0x47,
0x23,0x7c,0x0e,0x89,0x7c,0x0c,0x83,0xc2,0x02,0xee,0xfb,0x81,
0xc6,0x80,0x00,0xff,0x24,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,
0xa8,0x01,0x74,0x0c,0x80,0x64,0x50,0xef,0x80,0x64,0x4b,0xef,
0xc7,0x04,0xc3,0x03,0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0xfa,
0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,
0x75,0x3a,0x8b,0x7c,0x0c,0x3b,0x7c,0x0a,0x74,0x1b,0x8e,0x44,
0x08,0x26,0x8a,0x05,0x47,0x23,0x7c,0x0e,0x89,0x7c,0x0c,0x8a,
0xd8,0x22,0x5c,0x62,0x32,0xff,0x03,0xdb,0x2e,0xff,0xa7,0xc1,
0x01,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,0x74,0x0c,
0x80,0x64,0x50,0xef,0x80,0x64,0x4b,0xef,0xc7,0x04,0xc3,0x03,
0xf6,0xc1,0x01,0x75,0x07,0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,
0xe9,0x61,0x03,0xf6,0x44,0x2a,0x01,0x75,0x03,0xe9,0x39,0x03,
0xb0,0x27,0xeb,0x42,0x90,0xf6,0x44,0x2a,0x01,0x75,0x03,0xe9,
0x2b,0x03,0xb0,0x28,0xeb,0x34,0x90,0xf6,0x44,0x2a,0x01,0x75,
0x03,0xe9,0x1d,0x03,0xb0,0x21,0xeb,0x26,0x90,0xf6,0x44,0x2a,
0x01,0x75,0x03,0xe9,0x0f,0x03,0xb0,0x29,0xeb,0x18,0x90,0xf6,
0x44,0x2a,0x01,0x75,0x03,0xe9,0x01,0x03,0xb0,0x5e,0xeb,0x0a,
0x90,0xf6,0x44,0x2a,0x01,0x75,0x03,0xe9,0xf3,0x02,0x88,0x44,
0x61,0xb0,0x5c,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x80,0x4c,
0x50,0x40,0xc7,0x04,0xc6,0x05,0xc7,0x44,0x02,0xc6,0x05,0xe9,
0xcb,0x02,0xfa,0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,
0x3a,0x44,0x53,0x75,0x12,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,
0x05,0x83,0x44,0x30,0x02,0x8a,0x44,0x61,0xe9,0xb9,0x02,0xe9,
0xa7,0x02,0xf6,0x44,0x2a,0x02,0x75,0x03,0xe9,0xaa,0x02,0x2c,
0x20,0xe9,0xa5,0x02,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,
0x44,0x2b,0x40,0x75,0x03,0xe9,0x89,0x02,0xb8,0x7f,0x00,0xe9,
0x9b,0x01,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,0x44,0x2b,
0x80,0x75,0xed,0xe9,0x73,0x02,0x83,0xc2,0x02,0xee,0x83,0xea,
0x02,0xf7,0x44,0x30,0xff,0xff,0x74,0x03,0xff,0x4c,0x30,0xf6,
0x44,0x2b,0x20,0x75,0x03,0xe9,0x59,0x02,0xb8,0x02,0x00,0xe9,
0x6b,0x01,0xb3,0x18,0x22,0x5c,0x2b,0x75,0x16,0x83,0xc2,0x02,
0xee,0x83,0xea,0x02,0x8b,0x44,0x30,0x05,0x08,0x00,0x25,0xf8,
0xff,0x89,0x44,0x30,0xe9,0x36,0x02,0x80,0xfb,0x18,0x75,0x57,
0xb0,0x20,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x8b,0x44,0x30,
0x8b,0xd8,0x05,0x08,0x00,0x25,0xf8,0xff,0x89,0x44,0x30,0x2b,
0xc3,0x48,0x74,0x38,0x89,0x44,0x32,0x80,0x4c,0x50,0x40,0xc7,
0x44,0x02,0x8f,0x06,0xc7,0x04,0x8f,0x06,0xe9,0x02,0x02,0xfa,
0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,
0x75,0x16,0xb0,0x20,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xff,
0x4c,0x32,0x75,0x08,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,0x05,
0xe9,0xda,0x01,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x80,0xfb,
0x08,0x75,0x18,0x8b,0x44,0x30,0x8b,0xd8,0x05,0x08,0x00,0x25,
0xf8,0xff,0x89,0x44,0x30,0x2b,0xc3,0x3d,0x05,0x00,0x7c,0xdc,
0xe9,0xce,0x00,0x8b,0x44,0x30,0x8b,0xd8,0x05,0x08,0x00,0x25,
0xf8,0xff,0x89,0x44,0x30,0xb8,0x02,0x00,0xe9,0xba,0x00,0xf6,
0x44,0x2a,0x20,0x75,0x43,0xf6,0x44,0x2a,0x04,0x74,0x42,0xf6,
0x44,0x2a,0x10,0x74,0x07,0xf7,0x44,0x30,0xff,0xff,0x74,0x30,
0xb0,0x0d,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x80,0x4c,0x50,
0x40,0xc7,0x04,0x21,0x07,0xc7,0x44,0x02,0x21,0x07,0xe9,0x70,
0x01,0xfa,0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,
0x44,0x53,0x75,0x1c,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,0x05,
0xb0,0x0a,0xeb,0x2b,0x90,0xb0,0x0a,0x83,0xc2,0x02,0xee,0x83,
0xea,0x02,0xf6,0x44,0x2b,0x01,0x75,0x03,0xe9,0x42,0x01,0xb8,
0x05,0x00,0xeb,0x55,0x90,0xf6,0x44,0x2a,0x08,0x75,0xe2,0xf6,
0x44,0x2a,0x10,0x74,0x06,0x83,0x7c,0x30,0x00,0x74,0x13,0x83,
0xc2,0x02,0xee,0x83,0xea,0x02,0xb3,0x06,0x22,0x5c,0x2b,0x75,
0x08,0xc7,0x44,0x30,0x00,0x00,0xe9,0x14,0x01,0x80,0xfb,0x02,
0x75,0x14,0x8b,0x44,0x30,0xc1,0xe8,0x04,0x05,0x03,0x00,0x3d,
0x06,0x00,0x72,0x14,0xb8,0x06,0x00,0xeb,0x0f,0x90,0x80,0xfb,
0x04,0x75,0x06,0xb8,0x05,0x00,0xeb,0x04,0x90,0xb8,0x09,0x00,
0xc7,0x44,0x30,0x00,0x00,0xf6,0x44,0x2a,0x40,0x74,0x45,0x3d,
0x20,0x00,0x77,0x40,0xbb,0x01,0x00,0x3d,0x03,0x00,0x7e,0x03,
0xbb,0x02,0x00,0x89,0x5c,0x32,0x80,0x4c,0x50,0x40,0xc7,0x44,
0x02,0xd2,0x07,0xc7,0x04,0xd2,0x07,0xe9,0xbf,0x00,0xfa,0x8b,
0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,0x3a,0x44,0x53,0x75,
0x10,0x8a,0x44,0x60,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0x83,
0x6c,0x32,0x01,0x7e,0x50,0xe9,0x9d,0x00,0x05,0x06,0x00,0x03,
0xc0,0x89,0x44,0x32,0x80,0x4c,0x50,0x40,0xc7,0x44,0x02,0x0c,
0x08,0xc7,0x04,0x0c,0x08,0xe9,0x85,0x00,0xfa,0x8b,0x54,0x20,
0xec,0x8a,0xc8,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,
0x74,0x0f,0xa1,0x00,0x0e,0x01,0x44,0x32,0xc7,0x44,0x02,0x30,
0x08,0xc7,0x04,0x30,0x08,0xeb,0x62,0x90,0x8b,0x54,0x20,0xec,
0x8a,0xc8,0xa1,0x00,0x0e,0x2b,0x44,0x32,0x3d,0xe8,0x03,0x77,
0xec,0x80,0x64,0x50,0xbf,0xc7,0x04,0x03,0x05,0xeb,0x46,0x90,
0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0xa8,0x01,0x74,0x3a,0x80,
0x64,0x50,0xef,0x80,0x64,0x4b,0xef,0xc7,0x04,0xb3,0x08,0xeb,
0x2c,0x90,0xfa,0x8b,0x54,0x20,0xec,0x8a,0xc8,0x22,0x44,0x52,
0x3a,0x44,0x53,0x75,0x1c,0x8b,0x7c,0x0c,0x3b,0x7c,0x0a,0x74,
0xcf,0x8e,0x44,0x08,0x26,0x8a,0x05,0x47,0x23,0x7c,0x0e,0x89,
0x7c,0x0c,0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,0xc1,0x01,
0x75,0x26,0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0xff,0x44,0x30,
0x83,0xc2,0x02,0xee,0x83,0xea,0x02,0xf6,0xc1,0x01,0x75,0x10,
0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0xfa,0x8b,0x54,0x20,0xec,
0xa8,0x01,0x74,0xda,0xc6,0x44,0x49,0x02,0x8b,0x7c,0x12,0x8e,
0x44,0x10,0xb0,0x01,0xee,0x90,0x90,0x90,0xec,0x8a,0xe0,0x90,
0xb0,0x30,0xee,0x83,0xc2,0x02,0x90,0xec,0x83,0xea,0x02,0x23,
0x44,0x34,0xff,0x64,0x06,0xb3,0x1c,0x22,0x5c,0x51,0x75,0x1a,
0xf6,0x44,0x29,0x04,0x74,0x21,0xf6,0x44,0x29,0x20,0x75,0x2b,
0x80,0x7c,0x5e,0x00,0x75,0x1d,0xc7,0x44,0x06,0x58,0x0a,0xe9,
0x56,0x01,0xf6,0xc3,0x10,0x75,0x2e,0xf6,0xc3,0x04,0x75,0x74,
0xeb,0x6b,0x90,0xc7,0x44,0x06,0x62,0x0a,0xe9,0x4b,0x01,0xc7,
0x44,0x06,0x53,0x0a,0xe9,0x34,0x01,0x80,0x7c,0x5e,0x00,0x75,
0x08,0xc7,0x44,0x06,0xca,0x09,0xe9,0x9d,0x00,0xc7,0x44,0x06,
0xc5,0x09,0xe9,0x90,0x00,0x0a,0xc0,0x74,0x2a,0xfe,0x4c,0x63,
0x74,0x1a,0x80,0xe3,0xef,0x75,0xc4,0xf6,0x44,0x29,0x04,0x74,
0x21,0xf6,0x44,0x29,0x20,0x75,0x21,0x80,0x7c,0x5e,0x00,0x75,
0x18,0xe9,0x00,0x01,0x80,0x64,0x51,0xef,0x80,0xe3,0xef,0x75,
0xa6,0xeb,0x85,0x80,0x64,0x51,0xef,0xe9,0x06,0x01,0xe9,0xf5,
0x00,0xe9,0xe3,0x00,0x80,0x7c,0x5e,0x00,0x75,0x4f,0xeb,0x52,
0x90,0x80,0x64,0x51,0xf7,0xe9,0xe2,0x00,0x80,0x64,0x53,0x3f,
0x80,0x64,0x54,0xfe,0x80,0x4c,0x58,0x01,0x80,0x64,0x51,0xfb,
0xf6,0x44,0x29,0x40,0x75,0x2c,0x3a,0x44,0x5d,0x74,0x27,0x3a,
0x44,0x5c,0x74,0x22,0xf6,0x44,0x29,0x20,0x74,0x0a,0x3a,0x44,
0x5a,0x74,0x17,0x3a,0x44,0x5b,0x74,0x12,0xf6,0x44,0x5e,0xff,
0x74,0x09,0x3a,0x44,0x5e,0x75,0x04,0x80,0x4c,0x51,0x08,0xe9,
0xa0,0x00,0xe9,0xab,0x00,0x3a,0x44,0x5e,0x74,0x7d,0x3a,0x44,
0x5c,0x74,0x3d,0x3a,0x44,0x5d,0x74,0x55,0x3a,0x44,0x5a,0x74,
0x08,0x3a,0x44,0x5b,0x74,0x18,0xe9,0x81,0x00,0xf6,0x44,0x53,
0x40,0x74,0x07,0x80,0x64,0x53,0xbf,0xe9,0x82,0x00,0x3a,0x44,
0x5b,0x74,0x03,0xeb,0x7b,0x90,0x80,0x4c,0x53,0x40,0xf6,0x44,
0x29,0x08,0x74,0x70,0x80,0x4c,0x51,0x04,0xc7,0x44,0x06,0xe1,
0x08,0xeb,0x65,0x90,0xf6,0x44,0x53,0x80,0x74,0x0f,0x80,0x64,
0x53,0x7f,0x80,0x64,0x54,0xfe,0x80,0x4c,0x58,0x01,0xeb,0x50,
0x90,0x3a,0x44,0x5d,0x74,0x03,0xeb,0x48,0x90,0x80,0x4c,0x53,
0x80,0x80,0x4c,0x54,0x01,0x80,0x4c,0x58,0x01,0xf6,0x44,0x29,
0x08,0x74,0x35,0x80,0x4c,0x51,0x04,0xc7,0x44,0x06,0xe1,0x08,
0xeb,0x2a,0x90,0x80,0x4c,0x51,0x08,0xc7,0x44,0x06,0xe1,0x08,
0xeb,0x10,0x90,0x3a,0x44,0x5e,0x74,0xef,0x3a,0x44,0x5c,0x74,
0xaf,0x3a,0x44,0x5d,0x74,0xc7,0x3d,0xff,0x00,0x73,0x26,0xaa,
0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x4f,0xec,0xa8,0x01,0x74,
0x03,0xe9,0x4e,0xfe,0x89,0x7c,0x12,0x2b,0x7c,0x14,0x23,0x7c,
0x16,0x3b,0x7c,0x1c,0x73,0x46,0xfb,0x81,0xc6,0x80,0x00,0xff,
0x24,0x0a,0xe4,0x75,0x1e,0xb3,0x0c,0x22,0x5c,0x28,0x80,0xfb,
0x08,0x75,0xcc,0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x1b,
0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x12,0xeb,0xc1,0xf6,
0x44,0x28,0x04,0x75,0xbb,0xf6,0x44,0x28,0x08,0x75,0x50,0x32,
0xc0,0xeb,0xa8,0x4f,0x23,0x7c,0x16,0x89,0x7c,0x12,0xc6,0x44,
0x59,0x01,0xeb,0xa4,0xf6,0x44,0x51,0x02,0x74,0x07,0xfb,0x81,
0xc6,0x80,0x00,0xff,0x24,0x80,0x4c,0x51,0x02,0xb0,0x05,0xee,
0xb0,0x82,0x22,0x44,0x5f,0xf6,0xd0,0x22,0x44,0x75,0x88,0x44,
0x75,0xee,0xf6,0x44,0x29,0x10,0x74,0x10,0x80,0x4c,0x54,0x04,
0x80,0x4c,0x58,0x04,0x80,0x74,0x50,0x08,0xc7,0x04,0xc3,0x03,
0xfb,0x81,0xc6,0x80,0x00,0xff,0x24,0x26,0xc6,0x05,0xff,0x47,
0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0xa7,0x32,0xff,0xf6,0x44,
0x29,0x80,0x74,0x0a,0x8a,0xdc,0xc0,0xeb,0x04,0x2e,0x8a,0xbf,
0xb1,0x01,0x26,0x88,0x3d,0x47,0x23,0x7c,0x16,0x3b,0x7c,0x14,
0x74,0x89,0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x80,0xe9,
0x2e,0xff,0x1e,0x2e,0x8e,0x1e,0xc1,0x03,0xff,0x06,0x1c,0x0e,
0x60,0xbe,0x00,0x14,0xeb,0x0f,0x90,0x1e,0x2e,0x8e,0x1e,0xc1,
0x03,0xff,0x06,0x1a,0x0e,0x60,0xbe,0x00,0x10,0xb9,0x08,0x00,
0x8b,0x54,0x20,0xb0,0x03,0xee,0x90,0x90,0x32,0xff,0xec,0x8a,
0xd8,0x02,0xd8,0x2e,0xff,0xa7,0xa9,0x00,0x81,0xc6,0x00,0x01,
0x8b,0x54,0x20,0x0b,0xd2,0xe0,0xe4,0xb8,0x00,0x80,0xba,0x22,
0xff,0xef,0x61,0x1f,0xcf,0x81,0xce,0x80,0x00,0x8b,0x54,0x20,
0xff,0x06,0x20,0x0e,0xb0,0x01,0xee,0x8a,0x44,0x71,0x24,0xe7,
0x88,0x44,0x71,0xee,0xc6,0x44,0x49,0x02,0x80,0x4c,0x50,0x20,
0xc7,0x04,0xc3,0x03,0x81,0xe6,0x7f,0xff,0x8b,0x54,0x20,0xeb,
0xae,0x81,0xce,0x80,0x00,0x8b,0x54,0x20,0xff,0x06,0x22,0x0e,
0xec,0x0a,0xc0,0x79,0x7a,0x80,0x4c,0x51,0x10,0xc7,0x44,0x06,
0xe1,0x08,0xc6,0x44,0x63,0x04,0xf6,0x44,0x51,0x04,0x74,0x08,
0x80,0x64,0x51,0xfb,0x80,0x64,0x53,0x3f,0xf6,0x44,0x28,0x01,
0x75,0x59,0xf6,0x44,0x28,0x02,0x75,0x4f,0x8b,0x7c,0x12,0x8c,
0xc3,0x8e,0x44,0x10,0xf6,0x44,0x28,0x08,0x74,0x1e,0xb0,0xff,
0xaa,0x23,0x7c,0x16,0x3b,0x7c,0x14,0x74,0x26,0x32,0xc0,0xf6,
0x44,0x29,0x80,0x74,0x02,0xb0,0x10,0xaa,0x23,0x7c,0x16,0x3b,
0x7c,0x14,0x74,0x13,0x32,0xc0,0xaa,0x23,0x7c,0x16,0x3b,0x7c,
0x14,0x74,0x08,0x8e,0xc3,0x89,0x7c,0x12,0xeb,0x15,0x90,0x8e,
0xc3,0x4f,0x23,0x7c,0x16,0x89,0x7c,0x12,0xc6,0x44,0x59,0x01,
0xeb,0x05,0x90,0x80,0x4c,0x4f,0x01,0xb0,0x10,0xee,0x81,0xe6,
0x7f,0xff,0x8b,0x54,0x20,0xe9,0x17,0xff,0xff,0x06,0x1e,0x0e,
0xe9,0x10,0xff,0x1e,0x2e,0x8e,0x1e,0xc1,0x03,0x50,0x52,0x55,
0x8b,0xec,0x8b,0x46,0x08,0xa3,0x12,0x0e,0x32,0xe4,0xa0,0x22,
0x0c,0xa3,0x10,0x0e,0xff,0x06,0x00,0x0e,0x83,0x06,0x0e,0x0e,
0x0a,0x83,0x3e,0x04,0x0e,0x00,0x74,0x31,0x8b,0x16,0x00,0x0e,
0x2b,0x16,0x02,0x0e,0x3b,0x16,0x04,0x0e,0x72,0x23,0x8b,0x16,
0x00,0x0e,0x89,0x16,0x02,0x0e,0x8b,0x16,0x18,0x0d,0x3b,0x16,
0x1a,0x0d,0x74,0x11,0x80,0x3e,0x10,0x0c,0x01,0x74,0x16,0xb0,
0x00,0x90,0xe6,0x00,0x0c,0x08,0x90,0xe6,0x00,0xb8,0x00,0x80,
0xba,0x22,0xff,0xef,0x5d,0x5a,0x58,0x1f,0xcf,0xb0,0x80,0xe6,
0x00,0xa0,0x11,0x0c,0x0c,0x10,0xa2,0x11,0x0c,0xeb,0xe6,0x1e,
0x2e,0x8e,0x1e,0xc1,0x03,0xff,0x06,0x28,0x0e,0x55,0x8b,0xec,
0x8b,0x6e,0x02,0x89,0x2e,0x16,0x0e,0x5d,0x1f,0xcf,0x1e,0x2e,
0x8e,0x1e,0xc1,0x03,0xff,0x06,0x24,0x0e,0x55,0x8b,0xec,0x8b,
0x6e,0x02,0x89,0x2e,0x14,0x0e,0x5d,0x80,0x3e,0x10,0x0c,0x01,
0x75,0x12,0x50,0xa0,0x11,0x0c,0x0c,0x01,0xa2,0x11,0x0c,0xe4,
0x00,0x90,0x90,0x24,0x7f,0xe6,0x00,0x58,0x1f,0xcf,0x1e,0x06,
0x60,0xb8,0x00,0x80,0xba,0x22,0xff,0xef,0x2e,0x8e,0x1e,0xc1,
0x03,0x2e,0x8e,0x06,0xc1,0x03,0x2e,0xff,0x06,0x30,0x0d,0xfc,
0xff,0x26,0x2e,0x0e,0x00,0x00,0xfb,0x40,0x43,0x41,0x42,0x46,
0x47,0x45,0xeb,0xf6,0xc3,0x00,0x00,0x8f,0x06,0x2e,0x0e,0x2e,
0xff,0x06,0x3d,0x0d,0xb8,0x00,0x00,0xba,0x58,0xff,0xef,0xb8,
0x00,0xe0,0xba,0x5e,0xff,0xef,0x61,0x07,0x1f,0xcf,0xc2,0xfe,
0xff,0x8b,0x7c,0x0a,0x2b,0x7c,0x0c,0x23,0x7c,0x0e,0x3b,0x7c,
0x18,0x77,0x2e,0xc6,0x44,0x4d,0x00,0x80,0x4c,0x4f,0x02,0xeb,
0x5a,0x90,0x8b,0x7c,0x0a,0x3b,0x7c,0x0c,0x75,0x1b,0x8b,0x3e,
0x10,0x0d,0x3b,0x3e,0x12,0x0d,0x75,0x53,0xf6,0x44,0x4b,0xff,
0x75,0x4d,0xc6,0x44,0x4c,0x00,0x80,0x4c,0x4f,0x04,0xeb,0x43,
0x90,0xf6,0x44,0x50,0x10,0x75,0x3c,0xeb,0x09,0x90,0x8b,0x7c,
0x0a,0x2b,0x7c,0x0c,0x74,0x31,0x80,0x4c,0x50,0x10,0x80,0x4c,
0x4b,0x10,0xc7,0x04,0xc3,0x03,0xeb,0x23,0x90,0xfa,0x8b,0x36,
0x08,0x0e,0x8b,0x54,0x20,0xec,0x8a,0xf8,0x8a,0x5c,0x54,0x32,
0xfb,0xf6,0x44,0x4d,0xff,0x75,0x8e,0xf6,0x44,0x4c,0xff,0x75,
0xa1,0xf6,0x44,0x50,0x10,0x74,0xc7,0xec,0x32,0xc3,0x22,0xf8,
0x83,0x2e,0x10,0x0e,0x01,0x78,0x05,0xd0,0x6c,0x49,0x72,0x45,
0x8b,0x7c,0x12,0x2b,0x7c,0x14,0x74,0x22,0x80,0x7c,0x4e,0x00,
0x74,0x1c,0x23,0x7c,0x16,0x03,0xff,0x3b,0x7c,0x16,0x73,0x43,
0x8b,0x0e,0x0e,0x0e,0x2b,0x4c,0x6e,0x3b,0x4c,0x22,0x73,0x37,
0x80,0x7c,0x49,0x00,0x74,0x31,0xf6,0x44,0x51,0x02,0x75,0x3c,
0xec,0x32,0xc3,0x22,0xf8,0x80,0xe7,0x38,0xfb,0x89,0x1e,0x30,
0x0e,0xbe,0x00,0x10,0xff,0x14,0xeb,0x61,0x90,0xb0,0x01,0xee,
0x8a,0x44,0x71,0x0c,0x10,0x88,0x44,0x71,0xee,0x80,0x64,0x50,
0xdf,0xc7,0x04,0xc3,0x03,0xeb,0xa5,0xc6,0x44,0x4e,0x00,0x8b,
0x0e,0x0e,0x0e,0x89,0x4c,0x6e,0x80,0x4c,0x4f,0x08,0xeb,0xbe,
0x8b,0x7c,0x12,0x2b,0x7c,0x14,0x23,0x7c,0x16,0x3b,0x7c,0x1a,
0x73,0xb6,0x80,0x64,0x51,0xfd,0xf6,0x44,0x29,0x10,0x74,0x10,
0x80,0x64,0x54,0xfb,0x80,0x4c,0x58,0x04,0x80,0x74,0x50,0x08,
0xc7,0x04,0xc3,0x03,0xb0,0x05,0xee,0xb0,0x82,0x22,0x44,0x5f,
0x0a,0x44,0x75,0x88,0x44,0x75,0xee,0xeb,0x8b,0xfa,0x8b,0x36,
0x08,0x0e,0x8b,0x1e,0x30,0x0e,0x8a,0xcb,0xe5,0x80,0x23,0x44,
0x2e,0x74,0x02,0xf6,0xd1,0x80,0xe1,0x40,0x0a,0xf9,0x8a,0xdf,
0x22,0x5c,0x55,0x30,0x5c,0x54,0x32,0xfb,0x88,0x7c,0x55,0x0a,
0x5c,0x58,0x88,0x5c,0x58,0x22,0x5c,0x56,0x75,0x24,0x80,0x7c,
0x4f,0x00,0x75,0x22,0xfb,0x03,0x74,0x1e,0x89,0x36,0x08,0x0e,
0xff,0x06,0x26,0x0e,0x8b,0x3e,0x12,0x0d,0x3b,0x3e,0x10,0x0d,
0x75,0x46,0xbe,0x00,0x10,0xff,0x14,0xe9,0xd3,0xfe,0x80,0x4c,
0x4f,0x20,0x8b,0x3e,0x18,0x0d,0x8a,0x44,0x48,0x8a,0x64,0x4f,
0x89,0x85,0x00,0x08,0x8a,0x44,0x54,0x8a,0x64,0x57,0x89,0x85,
0x02,0x08,0x83,0xc7,0x04,0x81,0xe7,0xfc,0x03,0x3b,0x3e,0x1a,
0x0d,0x74,0x13,0x88,0x44,0x57,0xc6,0x44,0x4f,0x00,0x8a,0x44,
0x56,0xf6,0xd0,0x20,0x44,0x58,0x89,0x3e,0x18,0x0d,0xeb,0xa4,
0xff,0x06,0x2c,0x0e,0xbe,0x00,0x10,0xff,0x14,0xfa,0x8b,0x3e,
0x12,0x0d,0x81,0xc7,0x00,0x04,0x8a,0x5d,0x01,0x83,0xe3,0x0f,
0x03,0xdb,0x2e,0x8b,0xb7,0x89,0x00,0x8b,0x54,0x20,0x0b,0xd2,
0x74,0x0d,0x8a,0x1d,0x83,0xe3,0x1f,0x03,0xdb,0xfa,0x2e,0xff,
0xa7,0x9c,0x0f,0xff,0x06,0x2a,0x0e,0x8b,0x3e,0x12,0x0d,0x8b,
0x36,0x18,0x0d,0x8b,0x9d,0x00,0x04,0x89,0x9c,0x00,0x08,0x8b,
0x9d,0x02,0x04,0x89,0x9c,0x02,0x08,0x83,0xc6,0x04,0x81,0xe6,
0xfc,0x03,0x3b,0x36,0x1a,0x0d,0x74,0x04,0x89,0x36,0x18,0x0d,
0xfb,0x8b,0x3e,0x12,0x0d,0x83,0xc7,0x04,0x81,0xe7,0xfc,0x03,
0x89,0x3e,0x12,0x0d,0xbe,0x00,0x10,0xff,0x14,0xe9,0x1d,0xfe,
0xdc,0x0f,0xe4,0x0f,0xec,0x0f,0x0d,0x10,0x1c,0x10,0x57,0x0f,
0x2f,0x10,0x57,0x0f,0x3b,0x10,0x54,0x10,0x83,0x10,0xcf,0x10,
0xdb,0x10,0xe4,0x10,0xeb,0x10,0x35,0x11,0x7d,0x11,0x83,0x11,
0xa1,0x11,0xb9,0x11,0xf2,0x11,0x38,0x12,0x03,0x13,0x0c,0x13,
0x57,0x0f,0x57,0x0f,0x57,0x0f,0x57,0x0f,0x57,0x0f,0x57,0x0f,
0x57,0x0f,0x57,0x0f,0x8b,0x45,0x02,0x89,0x44,0x1a,0xeb,0xa0,
0x8b,0x45,0x02,0x89,0x44,0x1c,0xeb,0x98,0x8b,0x45,0x02,0x8b,
0x5c,0x0a,0x2b,0x5c,0x0c,0x23,0x5c,0x0e,0x8b,0x4c,0x0a,0x2b,
0xc8,0x23,0x4c,0x0e,0x3b,0xd9,0x76,0x06,0x23,0x44,0x0e,0x89,
0x44,0x0c,0xe9,0x77,0xff,0x80,0x4c,0x53,0x80,0x80,0x4c,0x54,
0x01,0x80,0x4c,0x58,0x01,0xe9,0x68,0xff,0x80,0x64,0x53,0x3f,
0x80,0x64,0x54,0xfe,0x80,0x4c,0x58,0x01,0x80,0x64,0x51,0xfb,
0xe9,0x55,0xff,0x8b,0x45,0x02,0x88,0x44,0x5a,0x88,0x64,0x5b,
0xe9,0x49,0xff,0x8b,0x45,0x02,0x0b,0xc0,0x74,0x03,0x89,0x44,
0x24,0x80,0x4c,0x50,0x04,0x80,0x4c,0x4b,0x04,0xc7,0x04,0xc3,
0x03,0xe9,0x30,0xff,0x8b,0x5d,0x02,0xf6,0xd7,0x22,0x7c,0x54,
0x0a,0xdf,0x8a,0x44,0x54,0x32,0xc3,0x24,0x82,0x30,0x44,0x54,
0xb0,0x05,0xee,0x8a,0x44,0x75,0x32,0xd8,0x8a,0x7c,0x5f,0xf6,
0xd7,0x22,0xdf,0x80,0xe3,0x82,0x32,0xc3,0x88,0x44,0x75,0xee,
0xe9,0x01,0xff,0x8b,0x5d,0x02,0xf6,0xc7,0x04,0x75,0x08,0x80,
0x64,0x53,0x3f,0x80,0x64,0x51,0xfb,0x8a,0x44,0x29,0x32,0xc7,
0xa8,0x10,0x74,0x0e,0xf6,0x44,0x51,0x02,0x74,0x08,0x80,0x74,
0x50,0x08,0xc7,0x04,0xc3,0x03,0x88,0x5c,0x28,0x88,0x7c,0x29,
0xb4,0x60,0xf6,0xc3,0x10,0x74,0x03,0x80,0xcc,0x10,0x8a,0x44,
0x62,0xf6,0xc3,0x20,0x74,0x02,0x24,0x7f,0x89,0x44,0x34,0xc7,
0x44,0x06,0xe1,0x08,0xe9,0xb5,0xfe,0x8b,0x45,0x02,0x88,0x44,
0x5c,0x88,0x64,0x5d,0xe9,0xa9,0xfe,0x8b,0x45,0x02,0x89,0x44,
0x18,0xe9,0xa0,0xfe,0xff,0x1e,0x24,0x0d,0xe9,0x99,0xfe,0xf6,
0x44,0x51,0x02,0x75,0x41,0x8b,0x44,0x12,0x2b,0x44,0x14,0x23,
0x44,0x16,0x3b,0x44,0x1a,0x72,0x33,0x80,0x4c,0x51,0x02,0xf6,
0x44,0x29,0x10,0x74,0x10,0x80,0x4c,0x54,0x04,0x80,0x4c,0x58,
0x04,0x80,0x74,0x50,0x08,0xc7,0x04,0xc3,0x03,0xf6,0x44,0x5f,
0x82,0x74,0x13,0xb0,0x05,0xee,0x8a,0x44,0x75,0xb4,0x82,0x22,
0x64,0x5f,0xf6,0xd4,0x22,0xc4,0x88,0x44,0x75,0xee,0xe9,0x4f,
0xfe,0xf6,0x44,0x51,0x02,0x74,0x3f,0x8b,0x44,0x12,0x2b,0x44,
0x14,0x23,0x44,0x16,0x3b,0x44,0x1c,0x73,0xe9,0x80,0x64,0x51,
0xfd,0xf6,0x44,0x29,0x10,0x74,0x10,0x80,0x64,0x54,0xfb,0x80,
0x4c,0x58,0x04,0x80,0x74,0x50,0x08,0xc7,0x04,0xc3,0x03,0xf6,
0x44,0x5f,0x02,0x74,0x11,0xb0,0x05,0xee,0x8a,0x44,0x75,0xb4,
0x82,0x22,0x64,0x5f,0x0a,0xc4,0x88,0x44,0x75,0xee,0xe9,0x07,
0xfe,0xe8,0x8a,0x02,0xe9,0x01,0xfe,0x8b,0x45,0x02,0xbb,0x10,
0x27,0xf7,0xe3,0xbb,0x0f,0x00,0xf7,0xf3,0xa3,0x06,0x0e,0xba,
0x52,0xff,0xef,0xba,0x50,0xff,0xb8,0x00,0x00,0xef,0xe9,0xe3,
0xfd,0x8b,0x45,0x02,0x3a,0x06,0x22,0x0c,0x72,0x0c,0x3b,0x06,
0x1a,0x0c,0x77,0x06,0xe8,0xab,0x01,0xe9,0xce,0xfd,0xe9,0x9e,
0xfd,0x8b,0x45,0x02,0x88,0x44,0x2a,0x88,0x64,0x2b,0x0b,0xc0,
0x75,0x07,0x80,0x64,0x50,0xfe,0xeb,0x10,0x90,0xf6,0x44,0x50,
0x01,0x75,0x09,0x80,0x4c,0x50,0x01,0xc7,0x44,0x30,0x00,0x00,
0xa8,0x80,0x75,0x07,0xc6,0x44,0x60,0x00,0xeb,0x05,0x90,0xc6,
0x44,0x60,0x7f,0xc7,0x04,0xc3,0x03,0xe9,0x92,0xfd,0x8b,0x5d,
0x02,0xf6,0xd7,0x22,0x7c,0x5f,0x0a,0xdf,0x8a,0xfb,0x88,0x5c,
0x5f,0x8a,0x44,0x52,0x8a,0x64,0x53,0x8b,0xcb,0x33,0xc8,0x81,
0xe1,0x38,0x38,0x33,0xc1,0x88,0x44,0x52,0x88,0x64,0x53,0xb0,
0x05,0xee,0xf6,0xd3,0x22,0x5c,0x54,0xf6,0x44,0x51,0x02,0x75,
0x02,0x0a,0xdf,0x8a,0x44,0x75,0x32,0xd8,0x80,0xe3,0x82,0x32,
0xc3,0x88,0x44,0x75,0xee,0xe9,0x4c,0xfd,0x8b,0x5d,0x02,0x88,
0x5c,0x2c,0x88,0x7c,0x2d,0x8b,0xcb,0x83,0xe3,0x0f,0x03,0xdb,
0x80,0x3e,0x10,0x0c,0x01,0x75,0x1f,0xa1,0x0e,0x0c,0x86,0xe0,
0x3d,0x32,0x31,0x73,0x15,0xf6,0xc5,0x04,0x75,0x08,0x2e,0x8b,
0x9f,0x69,0x01,0xeb,0x1b,0x90,0x2e,0x8b,0x9f,0x89,0x01,0xeb,
0x13,0x90,0xf6,0xc5,0x04,0x75,0x08,0x2e,0x8b,0x9f,0x29,0x01,
0xeb,0x06,0x90,0x2e,0x8b,0x9f,0x49,0x01,0xb0,0x0c,0xee,0x8a,
0xc3,0x88,0x44,0x7c,0xee,0xb0,0x0d,0x90,0x90,0xee,0x8a,0xc7,
0x88,0x44,0x7d,0xee,0xb0,0x04,0xee,0xb0,0x44,0xf6,0xc1,0x40,
0x74,0x0c,0xf6,0xc1,0x80,0x74,0x05,0x04,0x04,0xeb,0x03,0x90,
0x0c,0x08,0xf6,0xc5,0x01,0x74,0x09,0x0c,0x01,0xf6,0xc5,0x02,
0x75,0x02,0x0c,0x02,0x88,0x44,0x74,0xee,0xb0,0x03,0x90,0x90,
0xee,0x8a,0xd9,0x80,0xe3,0x30,0xc0,0xeb,0x04,0x32,0xff,0x2e,
0x8a,0xa7,0xa9,0x01,0x8a,0x44,0x73,0x24,0x3f,0x0a,0xc4,0x88,
0x44,0x73,0xee,0x90,0x90,0xb0,0x05,0xee,0xd0,0xec,0x8a,0x44,
0x75,0x24,0x9f,0x0a,0xc4,0x88,0x44,0x75,0xee,0x2e,0x8a,0x87,
0xad,0x01,0x88,0x44,0x62,0xf6,0x44,0x28,0x20,0x74,0x02,0x24,
0x7f,0x88,0x44,0x34,0xe9,0x81,0xfc,0x8a,0x45,0x02,0x88,0x44,
0x5e,0xe9,0x78,0xfc,0x8b,0x45,0x02,0xba,0x5a,0xff,0xef,0x9c,
0xff,0x36,0x26,0x0d,0xff,0x36,0x24,0x0d,0x1e,0x06,0x60,0x8b,
0x36,0x0a,0x0e,0xc7,0x04,0x3f,0x0d,0xe9,0x5a,0xfc,0xb8,0x00,
0x00,0x8e,0xc0,0x8b,0xf0,0x8b,0xf8,0x2e,0x8b,0x9c,0x49,0x00,
0x83,0xc6,0x02,0x26,0x89,0x1d,0x26,0x8c,0x4d,0x02,0x83,0xc7,
0x04,0x81,0xff,0x80,0x00,0x72,0xe8,0x26,0xc7,0x05,0xcb,0x0c,
0x26,0x8c,0x4d,0x02,0x83,0xc7,0x04,0x81,0xff,0x00,0x04,0x72,
0xee,0xc3,0xc1,0xe0,0x06,0x8b,0xd8,0x8c,0xda,0x81,0xc2,0x00,
0x04,0x8b,0xfa,0x8a,0x0e,0x22,0x0c,0xb5,0x00,0xbe,0x00,0x10,
0x33,0xc0,0x89,0x44,0x0a,0x89,0x44,0x0c,0x89,0x44,0x12,0x89,
0x44,0x14,0x81,0xc6,0x80,0x00,0xe2,0xee,0x89,0x36,0x0a,0x0e,
0xb8,0x01,0x00,0x8b,0xd0,0xb3,0x00,0x8a,0x0e,0x22,0x0c,0xb5,
0x00,0xbe,0x00,0x10,0x2b,0xda,0x72,0x29,0x89,0x44,0x16,0x81,
0xc6,0x80,0x00,0xe2,0xf3,0x8a,0x0e,0x22,0x0c,0xb5,0x00,0xbe,
0x00,0x10,0x2b,0xda,0x72,0x13,0x89,0x44,0x0e,0x81,0xc6,0x80,
0x00,0xe2,0xf3,0x8b,0xd0,0x03,0xc0,0x81,0xfa,0x00,0x02,0x72,
0xca,0x8a,0x0e,0x22,0x0c,0xb5,0x00,0xbe,0x00,0x10,0x89,0x7c,
0x10,0x8b,0x44,0x16,0x03,0xf8,0x8b,0xd7,0xc1,0xe0,0x04,0x48,
0x89,0x44,0x16,0x81,0xc6,0x80,0x00,0xe2,0xe9,0x8a,0x0e,0x22,
0x0c,0xb5,0x00,0xbe,0x00,0x10,0x89,0x7c,0x08,0x8b,0x44,0x0e,
0x03,0xf8,0x8b,0xd7,0xc1,0xe0,0x04,0x48,0x89,0x44,0x0e,0x81,
0xc6,0x80,0x00,0xe2,0xe9,0xc3,0xc7,0x04,0x20,0x04,0xc7,0x44,
0x06,0xe1,0x08,0x8b,0xc6,0x2d,0x00,0x10,0xb1,0x80,0xf6,0xf1,
0x88,0x44,0x48,0xc7,0x44,0x0a,0x00,0x00,0xc7,0x44,0x0c,0x00,
0x00,0xc7,0x44,0x12,0x00,0x00,0xc7,0x44,0x14,0x00,0x00,0xc7,
0x44,0x18,0x00,0x00,0xc7,0x44,0x1a,0x00,0x00,0xc7,0x44,0x1c,
0xff,0xff,0x8a,0x5c,0x48,0x83,0xe3,0x0f,0x03,0xdb,0x8b,0x97,
0x90,0x0c,0x89,0x54,0x20,0xb8,0x01,0x00,0x8a,0x4c,0x48,0xd3,
0xe0,0x89,0x44,0x2e,0xc7,0x44,0x24,0x19,0x00,0xc7,0x44,0x26,
0x00,0x00,0xc6,0x44,0x4a,0x00,0xc7,0x44,0x30,0x00,0x00,0xc7,
0x44,0x32,0x00,0x00,0xc6,0x44,0x4c,0x00,0xc6,0x44,0x4d,0x00,
0xc6,0x44,0x4e,0x00,0xc6,0x44,0x4f,0x00,0xc6,0x44,0x50,0x00,
0xc6,0x44,0x4b,0x00,0xc6,0x44,0x51,0x00,0xc6,0x44,0x28,0x00,
0xc6,0x44,0x29,0x00,0xc6,0x44,0x2a,0x00,0xc6,0x44,0x2b,0x00,
0xc6,0x44,0x54,0x00,0xc6,0x44,0x57,0x00,0xc6,0x44,0x55,0x00,
0xc6,0x44,0x56,0x00,0xc6,0x44,0x58,0x00,0xc6,0x44,0x52,0x04,
0xc6,0x44,0x53,0x04,0xc6,0x44,0x5f,0x00,0xc6,0x44,0x2c,0x3d,
0xc6,0x44,0x2d,0x00,0xc7,0x44,0x34,0xff,0x60,0xc6,0x44,0x62,
0xff,0xc6,0x44,0x5d,0x13,0xc6,0x44,0x5c,0x11,0xc6,0x44,0x5e,
0x00,0xc6,0x44,0x60,0x23,0xc6,0x44,0x61,0x23,0x0b,0xd2,0x75,
0x03,0xe9,0xd9,0x00,0xb0,0x09,0xee,0x8a,0x4c,0x48,0xb0,0x80,
0xd2,0xe8,0xee,0xc6,0x44,0x70,0x00,0xb0,0x01,0xee,0xb0,0x11,
0x88,0x44,0x71,0xee,0xb0,0x02,0x90,0x90,0xee,0x8a,0x44,0x48,
0xc0,0xe0,0x03,0x24,0xf0,0x88,0x44,0x72,0xee,0xb0,0x03,0x90,
0x90,0xee,0xb0,0xc0,0x88,0x44,0x73,0xee,0xb0,0x04,0x90,0x90,
0xee,0xb0,0x44,0x88,0x44,0x74,0xee,0xb0,0x05,0x90,0xee,0xb0,
0x60,0x88,0x44,0x75,0xee,0xc6,0x44,0x76,0x00,0xc6,0x44,0x77,
0x00,0xc6,0x44,0x78,0x00,0xb0,0x09,0xee,0xb0,0x09,0x88,0x44,
0x79,0xee,0xc6,0x44,0x7a,0x00,0xb0,0x0b,0xee,0xb0,0x52,0x88,
0x44,0x7b,0xee,0x80,0x3e,0x10,0x0c,0x01,0x75,0x21,0xa1,0x0e,
0x0c,0x86,0xe0,0x3d,0x32,0x31,0x73,0x17,0xb0,0x0c,0xee,0xb0,
0x18,0x88,0x44,0x7c,0xee,0xb0,0x0d,0x90,0x90,0xee,0xb0,0x00,
0x88,0x44,0x7d,0xee,0xeb,0x15,0x90,0xb0,0x0c,0xee,0xb0,0x16,
0x88,0x44,0x7c,0xee,0xb0,0x0d,0x90,0x90,0xee,0xb0,0x00,0x88,
0x44,0x7d,0xee,0xb0,0x0e,0x90,0x90,0xee,0xb0,0x03,0x88,0x44,
0x7e,0xee,0xb0,0x0f,0x90,0x90,0xee,0xb0,0x80,0x88,0x44,0x7f,
0xee,0xb0,0x03,0x90,0x90,0xee,0x8a,0x44,0x73,0x0c,0x01,0x88,
0x44,0x73,0xee,0x90,0x90,0xb0,0x05,0xee,0x8a,0x44,0x75,0x0c,
0x08,0x88,0x44,0x75,0xee,0xc3,0xfa,0x8c,0xd8,0x25,0x00,0xf0,
0x8e,0xd0,0xbc,0xfe,0x1f,0x8c,0xd8,0x25,0x00,0xf0,0x8e,0xd8,
0x80,0x3e,0x40,0x0d,0x01,0x75,0x51,0xa1,0x0e,0x0c,0x86,0xe0,
0x3d,0x30,0x32,0x73,0x47,0x8b,0x1e,0x20,0x0c,0x8a,0x16,0x23,
0x0c,0xc6,0x06,0x23,0x0c,0x00,0x83,0xfb,0x00,0x74,0x07,0xfe,
0xca,0xc6,0x06,0x23,0x0c,0x01,0x88,0x16,0x22,0x0c,0xbe,0x10,
0x0c,0xbf,0x90,0x0c,0xb9,0x08,0x00,0x1e,0x07,0xfc,0xf3,0xa5,
0xbf,0xa0,0x0c,0xb8,0x00,0x00,0xb9,0x08,0x00,0xf3,0xab,0xc7,
0x06,0x1a,0x0c,0x70,0x00,0xa0,0x40,0x0d,0xa2,0x10,0x0c,0xc6,
0x06,0x11,0x0c,0x00,0x2e,0x8c,0x1e,0xc1,0x03,0xc7,0x06,0x18,
0x0e,0x02,0x00,0xe8,0xec,0xfc,0xc7,0x06,0x24,0x0d,0x5a,0x0d,
0x8c,0x0e,0x26,0x0d,0xc7,0x06,0x18,0x0e,0x06,0x00,0xa1,0x1a,
0x0c,0xe8,0x0a,0xfd,0xc7,0x06,0x18,0x0e,0x0a,0x00,0xbe,0x00,
0x10,0xc7,0x44,0x1e,0x80,0x00,0xe8,0xa5,0xfd,0x81,0xc6,0x80,
0x00,0x81,0xfe,0x00,0x18,0x72,0xee,0xa0,0x22,0x0c,0xb4,0x80,
0xf6,0xe4,0xbe,0x00,0x10,0x03,0xf0,0x89,0x36,0x0a,0x0e,0x29,
0x44,0x9e,0xc7,0x06,0x00,0x0e,0x00,0x00,0xc7,0x06,0x02,0x0e,
0x00,0x00,0xc7,0x06,0x04,0x0e,0x00,0x00,0xc7,0x06,0x06,0x0e,
0x9a,0x02,0xba,0x52,0xff,0xa1,0x06,0x0e,0xef,0xba,0x50,0xff,
0xb8,0x00,0x00,0xef,0xba,0x56,0xff,0xb8,0x05,0xe0,0xef,0xba,
0x5e,0xff,0xb8,0x00,0x40,0xef,0xba,0x66,0xff,0xb8,0x00,0x40,
0xef,0xc7,0x06,0x10,0x0d,0x00,0x00,0xc7,0x06,0x12,0x0d,0x00,
0x00,0xc7,0x06,0x14,0x0d,0x00,0x04,0xc7,0x06,0x16,0x0d,0xfc,
0x03,0xc7,0x06,0x18,0x0d,0x00,0x00,0xc7,0x06,0x1a,0x0d,0x00,
0x00,0xc7,0x06,0x1c,0x0d,0x00,0x08,0xc7,0x06,0x1e,0x0d,0xfc,
0x03,0xb0,0x00,0x90,0xe6,0x00,0xc7,0x06,0x18,0x0e,0x32,0x00,
0xba,0x38,0xff,0xb8,0x11,0x00,0xef,0xba,0x3a,0xff,0xb8,0x08,
0x00,0xef,0xba,0x3c,0xff,0xb8,0x08,0x00,0xef,0xba,0x3e,0xff,
0xb8,0x08,0x00,0x80,0x3e,0x22,0x0c,0x08,0x76,0x03,0xb8,0x12,
0x00,0xef,0xba,0x32,0xff,0xb8,0x05,0x00,0xef,0xba,0x28,0xff,
0xb8,0x6c,0x00,0xef,0xba,0x22,0xff,0xb8,0x00,0x80,0xef,0xc7,
0x06,0x18,0x0e,0x33,0x00,0xc7,0x06,0x20,0x0d,0x4f,0x00,0xc7,
0x06,0x21,0x0d,0x53,0x00,0x8b,0x36,0x0a,0x0e,0xc7,0x04,0x3c,
0x0d,0xc7,0x06,0x08,0x0e,0x00,0x10,0xe9,0x63,0xf6,0x40,0x28,
0x23,0x29,0x20,0x24,0x49,0x64,0x3a,0x20,0x78,0x61,0x63,0x6f,
0x6f,0x6b,0x2e,0x61,0x73,0x6d,0x2c,0x76,0x20,0x37,0x2e,0x32,
0x35,0x20,0x31,0x39,0x39,0x35,0x2f,0x30,0x31,0x2f,0x31,0x32,
0x20,0x32,0x30,0x3a,0x35,0x39,0x3a,0x32,0x31,0x20,0x6d,0x69,
0x6c,0x74,0x20,0x45,0x78,0x70,0x20,0x24,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
#define CSTART 0x400L
#define CMAX 0x800L
#define ISTART 0x800L
#define IMAX 0xC00L
#define CIN 0xD10L
#define GLOBAL 0xD10L
#define EIN 0xD18L
#define FEPSTAT 0xD20L
#define CHANSTRUCT 0x1000L
#define RXTXBUF 0x4000L
struct global_data {
volatile ushort cin;
volatile ushort cout;
volatile ushort cstart;
volatile ushort cmax;
volatile ushort ein;
volatile ushort eout;
volatile ushort istart;
volatile ushort imax;
};
struct board_chan {
int filler1;
int filler2;
volatile ushort tseg;
volatile ushort tin;
volatile ushort tout;
volatile ushort tmax;
volatile ushort rseg;
volatile ushort rin;
volatile ushort rout;
volatile ushort rmax;
volatile ushort tlow;
volatile ushort rlow;
volatile ushort rhigh;
volatile ushort incr;
volatile ushort etime;
volatile ushort edelay;
volatile unchar *dev;
volatile ushort iflag;
volatile ushort oflag;
volatile ushort cflag;
volatile ushort gmask;
volatile ushort col;
volatile ushort delay;
volatile ushort imask;
volatile ushort tflush;
int filler3;
int filler4;
int filler5;
int filler6;
volatile unchar num;
volatile unchar ract;
volatile unchar bstat;
volatile unchar tbusy;
volatile unchar iempty;
volatile unchar ilow;
volatile unchar idata;
volatile unchar eflag;
volatile unchar tflag;
volatile unchar rflag;
volatile unchar xmask;
volatile unchar xval;
volatile unchar mstat;
volatile unchar mchange;
volatile unchar mint;
volatile unchar lstat;
volatile unchar mtran;
volatile unchar orun;
volatile unchar startca;
volatile unchar stopca;
volatile unchar startc;
volatile unchar stopc;
volatile unchar vnext;
volatile unchar hflow;
volatile unchar fillc;
volatile unchar ochar;
volatile unchar omask;
unchar filler7;
unchar filler8[28];
};
#define SRXLWATER 0xE0
#define SRXHWATER 0xE1
#define STOUT 0xE2
#define PAUSETX 0xE3
#define RESUMETX 0xE4
#define SAUXONOFFC 0xE6
#define SENDBREAK 0xE8
#define SETMODEM 0xE9
#define SETIFLAGS 0xEA
#define SONOFFC 0xEB
#define STXLWATER 0xEC
#define PAUSERX 0xEE
#define RESUMERX 0xEF
#define SETBUFFER 0xF2
#define SETCOOKED 0xF3
#define SETHFLOW 0xF4
#define SETCTRLFLAGS 0xF5
#define SETVNEXT 0xF6
#define BREAK_IND 0x01
#define LOWTX_IND 0x02
#define EMPTYTX_IND 0x04
#define DATA_IND 0x08
#define MODEMCHG_IND 0x20
#define RTS 0x02
#define CD 0x08
#define DSR 0x10
#define CTS 0x20
#define RI 0x40
#define DTR 0x80
/* These are termios bits as the FEP understands them */
/* c_cflag bit meaning */
#define FEP_CBAUD 0000017
#define FEP_B0 0000000 /* hang up */
#define FEP_B50 0000001
#define FEP_B75 0000002
#define FEP_B110 0000003
#define FEP_B134 0000004
#define FEP_B150 0000005
#define FEP_B200 0000006
#define FEP_B300 0000007
#define FEP_B600 0000010
#define FEP_B1200 0000011
#define FEP_B1800 0000012
#define FEP_B2400 0000013
#define FEP_B4800 0000014
#define FEP_B9600 0000015
#define FEP_B19200 0000016
#define FEP_B38400 0000017
#define FEP_EXTA FEP_B19200
#define FEP_EXTB FEP_B38400
#define FEP_CSIZE 0000060
#define FEP_CS5 0000000
#define FEP_CS6 0000020
#define FEP_CS7 0000040
#define FEP_CS8 0000060
#define FEP_CSTOPB 0000100
#define FEP_CREAD 0000200
#define FEP_PARENB 0000400
#define FEP_PARODD 0001000
#define FEP_HUPCL 0002000
#define FEP_CLOCAL 0004000
#define FEP_CIBAUD 03600000 /* input baud rate (not used) */
#define FEP_CRTSCTS 020000000000 /* flow control */
/*
* linux/drivers/char/pcxx.c
*
* Written by Troy De Jongh, November, 1994
*
* Copyright (C) 1994,1995 Troy De Jongh
* This software may be used and distributed according to the terms
* of the GNU General Public License.
*
* This driver is for the DigiBoard PC/Xe and PC/Xi line of products.
*
* This driver does NOT support DigiBoard's fastcook FEP option and
* does not support the transparent print (i.e. digiprint) option.
*
* This Driver is currently maintained by Christoph Lameter (christoph@lameter.com)
*
* Please contact digi for support issues at digilnux@dgii.com.
* Some more information can be found at
* http://lameter.com/digi.
*
* 1.5.2 Fall 1995 Bug fixes by David Nugent
* 1.5.3 March 9, 1996 Christoph Lameter: Fixed 115.2K Support. Memory
* allocation harmonized with 1.3.X Series.
* 1.5.4 March 30, 1996 Christoph Lameter: Fixup for 1.3.81. Use init_bh
* instead of direct assignment to kernel arrays.
* 1.5.5 April 5, 1996 Major device numbers corrected.
* Mike McLagan<mike.mclagan@linux.org>: Add setup
* variable handling, instead of using the old pcxxconfig.h
* 1.5.6 April 16, 1996 Christoph Lameter: Pointer cleanup, macro cleanup.
* Call out devices changed to /dev/cudxx.
* 1.5.7 July 22, 1996 Martin Mares: CLOCAL fix, pcxe_table clearing.
* David Nugent: Bug in pcxe_open.
* Brian J. Murrell: Modem Control fixes, Majors correctly assigned
* 1.6.1 April 6, 1997 Bernhard Kaindl: fixed virtual memory access for 2.1
* i386-kernels and use on other archtitectures, Allowing use
* as module, added module parameters, added switch to enable
* verbose messages to assist user during card configuration.
* Currently only tested on a PC/Xi card, but should work on Xe
* and Xeve also.
* 1.6.2 August, 7, 2000: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
* get rid of panics, release previously allocated resources
* 1.6.3 August, 23, 2000: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
* cleaned up wrt verify_area.
* Christoph Lameter: Update documentation, email addresses
* and URLs. Remove some obsolete code.
*
*/
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/ioport.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/string.h>
#include <linux/fcntl.h>
#include <linux/ptrace.h>
#include <linux/delay.h>
#include <linux/serial.h>
#include <linux/tty_driver.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/bitops.h>
#ifndef MODULE
#include <linux/ctype.h> /* We only need it for parsing the "digi="-line */
#endif
#include <asm/system.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <asm/semaphore.h>
#define VERSION "1.6.3"
#include "digi.h"
#include "fep.h"
#include "pcxx.h"
#include "digi_fep.h"
#include "digi_bios.h"
/*
* Define one default setting if no digi= config line is used.
* Default is altpin = disabled, 16 ports, I/O 200h, Memory 0D0000h
*/
static struct board_info boards[MAX_DIGI_BOARDS] = { {
/* Board is enabled */ ENABLED,
/* Type is auto-detected */ 0,
/* altping is disabled */ DISABLED,
/* number of ports = 16 */ 16,
/* io address is 0x200 */ 0x200,
/* card memory at 0xd0000 */ 0xd0000,
/* first minor device no. */ 0
} };
static int verbose = 0;
static int debug = 0;
#ifdef MODULE
/* Variables for insmod */
static int io[] = {0, 0, 0, 0};
static int membase[] = {0, 0, 0, 0};
static int memsize[] = {0, 0, 0, 0};
static int altpin[] = {0, 0, 0, 0};
static int numports[] = {0, 0, 0, 0};
MODULE_AUTHOR("Bernhard Kaindl");
MODULE_DESCRIPTION("Digiboard PC/X{i,e,eve} driver");
MODULE_LICENSE("GPL");
module_param(verbose, bool, 0644);
module_param(debug, bool, 0644);
module_param_array(io, int, NULL, 0);
module_param_array(membase, int, NULL, 0);
module_param_array(memsize, int, NULL, 0);
module_param_array(altpin, int, NULL, 0);
module_param_array(numports, int, NULL, 0);
#endif /* MODULE */
static int numcards = 1;
static int nbdevs = 0;
static struct channel *digi_channels;
int pcxx_ncook=sizeof(pcxx_cook);
int pcxx_nbios=sizeof(pcxx_bios);
#define pcxxassert(x, msg) if(!(x)) pcxx_error(__LINE__, msg)
#define FEPTIMEOUT 200000
#define SERIAL_TYPE_NORMAL 1
#define PCXE_EVENT_HANGUP 1
static struct tty_driver *pcxe_driver;
static struct timer_list pcxx_timer;
static void pcxxpoll(unsigned long dummy);
static void fepcmd(struct channel *, int, int, int, int, int);
static void pcxe_put_char(struct tty_struct *, unsigned char);
static void pcxe_flush_chars(struct tty_struct *);
static void pcxx_error(int, char *);
static void pcxe_close(struct tty_struct *, struct file *);
static int pcxe_ioctl(struct tty_struct *, struct file *, unsigned int, unsigned long);
static void pcxe_set_termios(struct tty_struct *, struct termios *);
static int pcxe_write(struct tty_struct *, const unsigned char *, int);
static int pcxe_write_room(struct tty_struct *);
static int pcxe_chars_in_buffer(struct tty_struct *);
static void pcxe_flush_buffer(struct tty_struct *);
static void doevent(int);
static void receive_data(struct channel *);
static void pcxxparam(struct tty_struct *, struct channel *ch);
static void do_softint(void *);
static inline void pcxe_sched_event(struct channel *, int);
static void pcxe_start(struct tty_struct *);
static void pcxe_stop(struct tty_struct *);
static void pcxe_throttle(struct tty_struct *);
static void pcxe_unthrottle(struct tty_struct *);
static void digi_send_break(struct channel *ch, int msec);
static void shutdown(struct channel *);
static void setup_empty_event(struct tty_struct *tty, struct channel *ch);
static inline void memwinon(struct board_info *b, unsigned int win);
static inline void memwinoff(struct board_info *b, unsigned int win);
static inline void globalwinon(struct channel *ch);
static inline void rxwinon(struct channel *ch);
static inline void txwinon(struct channel *ch);
static inline void memoff(struct channel *ch);
static inline void assertgwinon(struct channel *ch);
static inline void assertmemoff(struct channel *ch);
static int pcxe_tiocmget(struct tty_struct *tty, struct file *file);
static int pcxe_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear);
#define TZ_BUFSZ 4096
/* function definitions */
/*****************************************************************************/
static void cleanup_board_resources(void)
{
int crd, i;
struct board_info *bd;
struct channel *ch;
for(crd = 0; crd < numcards; crd++) {
bd = &boards[crd];
ch = digi_channels + bd->first_minor;
if (bd->region)
release_region(bd->port, 4);
for(i = 0; i < bd->numports; i++, ch++)
if (ch->tmp_buf)
kfree(ch->tmp_buf);
}
}
static void __exit pcxe_cleanup(void)
{
unsigned long flags;
int e1;
printk(KERN_NOTICE "Unloading PC/Xx version %s\n", VERSION);
save_flags(flags);
cli();
del_timer_sync(&pcxx_timer);
if ((e1 = tty_unregister_driver(pcxe_driver)))
printk("SERIAL: failed to unregister serial driver (%d)\n", e1);
put_tty_driver(pcxe_driver);
cleanup_board_resources();
kfree(digi_channels);
restore_flags(flags);
}
static inline struct channel *chan(register struct tty_struct *tty)
{
if (tty) {
register struct channel *ch=(struct channel *)tty->driver_data;
if (ch >= digi_channels && ch < digi_channels+nbdevs) {
if (ch->magic==PCXX_MAGIC)
return ch;
}
}
return NULL;
}
/* These inline routines are to turn board memory on and off */
static inline void memwinon(struct board_info *b, unsigned int win)
{
if(b->type == PCXEVE)
outb_p(FEPWIN|win, b->port+1);
else
outb_p(inb(b->port)|FEPMEM, b->port);
}
static inline void memwinoff(struct board_info *b, unsigned int win)
{
outb_p(inb(b->port)&~FEPMEM, b->port);
if(b->type == PCXEVE)
outb_p(0, b->port + 1);
}
static inline void globalwinon(struct channel *ch)
{
if(ch->board->type == PCXEVE)
outb_p(FEPWIN, ch->board->port+1);
else
outb_p(FEPMEM, ch->board->port);
}
static inline void rxwinon(struct channel *ch)
{
if(ch->rxwin == 0)
outb_p(FEPMEM, ch->board->port);
else
outb_p(ch->rxwin, ch->board->port+1);
}
static inline void txwinon(struct channel *ch)
{
if(ch->txwin == 0)
outb_p(FEPMEM, ch->board->port);
else
outb_p(ch->txwin, ch->board->port+1);
}
static inline void memoff(struct channel *ch)
{
outb_p(0, ch->board->port);
if(ch->board->type == PCXEVE)
outb_p(0, ch->board->port+1);
}
static inline void assertgwinon(struct channel *ch)
{
if(ch->board->type != PCXEVE)
pcxxassert(inb(ch->board->port) & FEPMEM, "Global memory off");
}
static inline void assertmemoff(struct channel *ch)
{
if(ch->board->type != PCXEVE)
pcxxassert(!(inb(ch->board->port) & FEPMEM), "Memory on");
}
static inline void pcxe_sched_event(struct channel *info, int event)
{
info->event |= 1 << event;
schedule_work(&info->tqueue);
}
static void pcxx_error(int line, char *msg)
{
printk("pcxx_error (DigiBoard): line=%d %s\n", line, msg);
}
static int pcxx_waitcarrier(struct tty_struct *tty,struct file *filp,struct channel *info)
{
DECLARE_WAITQUEUE(wait, current);
int retval = 0;
int do_clocal = 0;
if (tty->termios->c_cflag & CLOCAL)
do_clocal = 1;
/*
* Block waiting for the carrier detect and the line to become free
*/
retval = 0;
add_wait_queue(&info->open_wait, &wait);
info->count--;
info->blocked_open++;
for (;;) {
cli();
globalwinon(info);
info->omodem |= DTR|RTS;
fepcmd(info, SETMODEM, DTR|RTS, 0, 10, 1);
memoff(info);
sti();
set_current_state(TASK_INTERRUPTIBLE);
if(tty_hung_up_p(filp) || (info->asyncflags & ASYNC_INITIALIZED) == 0) {
if(info->asyncflags & ASYNC_HUP_NOTIFY)
retval = -EAGAIN;
else
retval = -ERESTARTSYS;
break;
}
if ((info->asyncflags & ASYNC_CLOSING) == 0 &&
(do_clocal || (info->imodem & info->dcd)))
break;
if(signal_pending(current)) {
retval = -ERESTARTSYS;
break;
}
schedule();
}
current->state = TASK_RUNNING;
remove_wait_queue(&info->open_wait, &wait);
if(!tty_hung_up_p(filp))
info->count++;
info->blocked_open--;
return retval;
}
int pcxe_open(struct tty_struct *tty, struct file * filp)
{
volatile struct board_chan *bc;
struct channel *ch;
unsigned long flags;
int line;
int boardnum;
int retval;
line = tty->index;
if(line < 0 || line >= nbdevs) {
printk("line out of range in pcxe_open\n");
tty->driver_data = NULL;
return(-ENODEV);
}
for(boardnum=0;boardnum<numcards;boardnum++)
if ((line >= boards[boardnum].first_minor) &&
(line < boards[boardnum].first_minor + boards[boardnum].numports))
break;
if(boardnum >= numcards || boards[boardnum].status == DISABLED ||
(line - boards[boardnum].first_minor) >= boards[boardnum].numports) {
tty->driver_data = NULL; /* Mark this device as 'down' */
return(-ENODEV);
}
ch = digi_channels+line;
if(ch->brdchan == 0) {
tty->driver_data = NULL;
return(-ENODEV);
}
/*
* If the device is in the middle of being closed, then block
* until it's done, and then try again.
*/
if(ch->asyncflags & ASYNC_CLOSING) {
interruptible_sleep_on(&ch->close_wait);
if(ch->asyncflags & ASYNC_HUP_NOTIFY)
return -EAGAIN;
else
return -ERESTARTSYS;
}
save_flags(flags);
cli();
ch->count++;
tty->driver_data = ch;
ch->tty = tty;
if ((ch->asyncflags & ASYNC_INITIALIZED) == 0) {
unsigned int head;
globalwinon(ch);
ch->statusflags = 0;
bc=ch->brdchan;
ch->imodem = bc->mstat;
head = bc->rin;
bc->rout = head;
ch->tty = tty;
pcxxparam(tty,ch);
ch->imodem = bc->mstat;
bc->idata = 1;
ch->omodem = DTR|RTS;
fepcmd(ch, SETMODEM, DTR|RTS, 0, 10, 1);
memoff(ch);
ch->asyncflags |= ASYNC_INITIALIZED;
}
restore_flags(flags);
if(ch->asyncflags & ASYNC_CLOSING) {
interruptible_sleep_on(&ch->close_wait);
if(ch->asyncflags & ASYNC_HUP_NOTIFY)
return -EAGAIN;
else
return -ERESTARTSYS;
}
if (!(filp->f_flags & O_NONBLOCK)) {
/* this has to be set in order for the "block until
* CD" code to work correctly. i'm not sure under
* what circumstances asyncflags should be set to
* ASYNC_NORMAL_ACTIVE though
* brian@ilinx.com
*/
ch->asyncflags |= ASYNC_NORMAL_ACTIVE;
if ((retval = pcxx_waitcarrier(tty, filp, ch)) != 0)
return retval;
}
ch->asyncflags |= ASYNC_NORMAL_ACTIVE;
return 0;
}
static void shutdown(struct channel *info)
{
unsigned long flags;
volatile struct board_chan *bc;
struct tty_struct *tty;
if (!(info->asyncflags & ASYNC_INITIALIZED))
return;
save_flags(flags);
cli();
globalwinon(info);
bc = info->brdchan;
if(bc)
bc->idata = 0;
tty = info->tty;
/*
* If we're a modem control device and HUPCL is on, drop RTS & DTR.
*/
if(tty->termios->c_cflag & HUPCL) {
info->omodem &= ~(RTS|DTR);
fepcmd(info, SETMODEM, 0, DTR|RTS, 10, 1);
}
memoff(info);
info->asyncflags &= ~ASYNC_INITIALIZED;
restore_flags(flags);
}
static void pcxe_close(struct tty_struct * tty, struct file * filp)
{
struct channel *info;
if ((info=chan(tty))!=NULL) {
unsigned long flags;
save_flags(flags);
cli();
if(tty_hung_up_p(filp)) {
/* flag that somebody is done with this module */
restore_flags(flags);
return;
}
/* this check is in serial.c, it won't hurt to do it here too */
if ((tty->count == 1) && (info->count != 1)) {
/*
* Uh, oh. tty->count is 1, which means that the tty
* structure will be freed. Info->count should always
* be one in these conditions. If it's greater than
* one, we've got real problems, since it means the
* serial port won't be shutdown.
*/
printk("pcxe_close: bad serial port count; tty->count is 1, info->count is %d\n", info->count);
info->count = 1;
}
if (info->count-- > 1) {
restore_flags(flags);
return;
}
if (info->count < 0) {
info->count = 0;
}
info->asyncflags |= ASYNC_CLOSING;
tty->closing = 1;
if(info->asyncflags & ASYNC_INITIALIZED) {
setup_empty_event(tty,info);
tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
}
if(tty->driver->flush_buffer)
tty->driver->flush_buffer(tty);
tty_ldisc_flush(tty);
shutdown(info);
tty->closing = 0;
info->event = 0;
info->tty = NULL;
if(info->blocked_open) {
if(info->close_delay) {
msleep_interruptible(jiffies_to_msecs(info->close_delay));
}
wake_up_interruptible(&info->open_wait);
}
info->asyncflags &= ~(ASYNC_NORMAL_ACTIVE|ASYNC_CLOSING);
wake_up_interruptible(&info->close_wait);
restore_flags(flags);
}
}
void pcxe_hangup(struct tty_struct *tty)
{
struct channel *ch;
if ((ch=chan(tty))!=NULL) {
unsigned long flags;
save_flags(flags);
cli();
shutdown(ch);
ch->event = 0;
ch->count = 0;
ch->tty = NULL;
ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE;
wake_up_interruptible(&ch->open_wait);
restore_flags(flags);
}
}
static int pcxe_write(struct tty_struct * tty, const unsigned char *buf, int count)
{
struct channel *ch;
volatile struct board_chan *bc;
int total, remain, size, stlen;
unsigned int head, tail;
unsigned long flags;
/* printk("Entering pcxe_write()\n"); */
if ((ch=chan(tty))==NULL)
return 0;
bc = ch->brdchan;
size = ch->txbufsize;
/*
* All data is now local
*/
total = 0;
save_flags(flags);
cli();
globalwinon(ch);
head = bc->tin & (size - 1);
tail = bc->tout;
if (tail != bc->tout)
tail = bc->tout;
tail &= (size - 1);
if (head >= tail) {
remain = size - (head - tail) - 1;
stlen = size - head;
}
else {
remain = tail - head - 1;
stlen = remain;
}
count = min(remain, count);
txwinon(ch);
while (count > 0) {
stlen = min(count, stlen);
memcpy(ch->txptr + head, buf, stlen);
buf += stlen;
count -= stlen;
total += stlen;
head += stlen;
if (head >= size) {
head = 0;
stlen = tail;
}
}
ch->statusflags |= TXBUSY;
globalwinon(ch);
bc->tin = head;
if ((ch->statusflags & LOWWAIT) == 0) {
ch->statusflags |= LOWWAIT;
bc->ilow = 1;
}
memoff(ch);
restore_flags(flags);
return(total);
}
static void pcxe_put_char(struct tty_struct *tty, unsigned char c)
{
pcxe_write(tty, &c, 1);
return;
}
static int pcxe_write_room(struct tty_struct *tty)
{
struct channel *ch;
int remain;
remain = 0;
if ((ch=chan(tty))!=NULL) {
volatile struct board_chan *bc;
unsigned int head, tail;
unsigned long flags;
save_flags(flags);
cli();
globalwinon(ch);
bc = ch->brdchan;
head = bc->tin & (ch->txbufsize - 1);
tail = bc->tout;
if (tail != bc->tout)
tail = bc->tout;
tail &= (ch->txbufsize - 1);
if((remain = tail - head - 1) < 0 )
remain += ch->txbufsize;
if (remain && (ch->statusflags & LOWWAIT) == 0) {
ch->statusflags |= LOWWAIT;
bc->ilow = 1;
}
memoff(ch);
restore_flags(flags);
}
return remain;
}
static int pcxe_chars_in_buffer(struct tty_struct *tty)
{
int chars;
unsigned int ctail, head, tail;
int remain;
unsigned long flags;
struct channel *ch;
volatile struct board_chan *bc;
if ((ch=chan(tty))==NULL)
return(0);
save_flags(flags);
cli();
globalwinon(ch);
bc = ch->brdchan;
tail = bc->tout;
head = bc->tin;
ctail = ch->mailbox->cout;
if(tail == head && ch->mailbox->cin == ctail && bc->tbusy == 0)
chars = 0;
else {
head = bc->tin & (ch->txbufsize - 1);
tail &= (ch->txbufsize - 1);
if((remain = tail - head - 1) < 0 )
remain += ch->txbufsize;
chars = (int)(ch->txbufsize - remain);
/*
* Make it possible to wakeup anything waiting for output
* in tty_ioctl.c, etc.
*/
if(!(ch->statusflags & EMPTYWAIT))
setup_empty_event(tty,ch);
}
memoff(ch);
restore_flags(flags);
return(chars);
}
static void pcxe_flush_buffer(struct tty_struct *tty)
{
unsigned int tail;
volatile struct board_chan *bc;
struct channel *ch;
unsigned long flags;
if ((ch=chan(tty))==NULL)
return;
save_flags(flags);
cli();
globalwinon(ch);
bc = ch->brdchan;
tail = bc->tout;
fepcmd(ch, STOUT, (unsigned) tail, 0, 0, 0);
memoff(ch);
restore_flags(flags);
tty_wakeup(tty);
}
static void pcxe_flush_chars(struct tty_struct *tty)
{
struct channel * ch;
if ((ch=chan(tty))!=NULL) {
unsigned long flags;
save_flags(flags);
cli();
if ((ch->statusflags & TXBUSY) && !(ch->statusflags & EMPTYWAIT))
setup_empty_event(tty,ch);
restore_flags(flags);
}
}
#ifndef MODULE
/*
* Driver setup function when linked into the kernel to optionally parse multible
* "digi="-lines and initialize the driver at boot time. No probing.
*/
void __init pcxx_setup(char *str, int *ints)
{
struct board_info board;
int i, j, last;
char *temp, *t2;
unsigned len;
numcards=0;
memset(&board, 0, sizeof(board));
for(last=0,i=1;i<=ints[0];i++)
switch(i)
{
case 1:
board.status = ints[i];
last = i;
break;
case 2:
board.type = ints[i];
last = i;
break;
case 3:
board.altpin = ints[i];
last = i;
break;
case 4:
board.numports = ints[i];
last = i;
break;
case 5:
board.port = ints[i];
last = i;
break;
case 6:
board.membase = ints[i];
last = i;
break;
default:
printk("PC/Xx: Too many integer parms\n");
return;
}
while (str && *str)
{
/* find the next comma or terminator */
temp = str;
while (*temp && (*temp != ','))
temp++;
if (!*temp)
temp = NULL;
else
*temp++ = 0;
i = last + 1;
switch(i)
{
case 1:
len = strlen(str);
if (strncmp("Disable", str, len) == 0)
board.status = 0;
else
if (strncmp("Enable", str, len) == 0)
board.status = 1;
else
{
printk("PC/Xx: Invalid status %s\n", str);
return;
}
last = i;
break;
case 2:
for(j=0;j<PCXX_NUM_TYPES;j++)
if (strcmp(board_desc[j], str) == 0)
break;
if (i<PCXX_NUM_TYPES)
board.type = j;
else
{
printk("PC/Xx: Invalid board name: %s\n", str);
return;
}
last = i;
break;
case 3:
len = strlen(str);
if (strncmp("Disable", str, len) == 0)
board.altpin = 0;
else
if (strncmp("Enable", str, len) == 0)
board.altpin = 1;
else
{
printk("PC/Xx: Invalid altpin %s\n", str);
return;
}
last = i;
break;
case 4:
t2 = str;
while (isdigit(*t2))
t2++;
if (*t2)
{
printk("PC/Xx: Invalid port count %s\n", str);
return;
}
board.numports = simple_strtoul(str, NULL, 0);
last = i;
break;
case 5:
t2 = str;
while (isxdigit(*t2))
t2++;
if (*t2)
{
printk("PC/Xx: Invalid io port address %s\n", str);
return;
}
board.port = simple_strtoul(str, NULL, 16);
last = i;
break;
case 6:
t2 = str;
while (isxdigit(*t2))
t2++;
if (*t2)
{
printk("PC/Xx: Invalid memory base %s\n", str);
return;
}
board.membase = simple_strtoul(str, NULL, 16);
last = i;
break;
default:
printk("PC/Xx: Too many string parms\n");
return;
}
str = temp;
}
if (last < 6)
{
printk("PC/Xx: Insufficient parms specified\n");
return;
}
/* I should REALLY validate the stuff here */
memcpy(&boards[numcards],&board, sizeof(board));
printk("PC/Xx: Added board %i, %s %s %i ports at 0x%4.4X base 0x%6.6X\n",
numcards, board_desc[board.type], board_mem[board.type],
board.numports, board.port, (unsigned int) board.membase);
/* keep track of my initial minor number */
if (numcards)
boards[numcards].first_minor = boards[numcards-1].first_minor + boards[numcards-1].numports;
else
boards[numcards].first_minor = 0;
/* yeha! string parameter was successful! */
numcards++;
}
#endif
static struct tty_operations pcxe_ops = {
.open = pcxe_open,
.close = pcxe_close,
.write = pcxe_write,
.put_char = pcxe_put_char,
.flush_chars = pcxe_flush_chars,
.write_room = pcxe_write_room,
.chars_in_buffer = pcxe_chars_in_buffer,
.flush_buffer = pcxe_flush_buffer,
.ioctl = pcxe_ioctl,
.throttle = pcxe_throttle,
.unthrottle = pcxe_unthrottle,
.set_termios = pcxe_set_termios,
.stop = pcxe_stop,
.start = pcxe_start,
.hangup = pcxe_hangup,
.tiocmget = pcxe_tiocmget,
.tiocmset = pcxe_tiocmset,
};
/*
* function to initialize the driver with the given parameters, which are either
* the default values from this file or the parameters given at boot.
*/
static int __init pcxe_init(void)
{
ulong memory_seg=0, memory_size=0;
int lowwater, enabled_cards=0, i, crd, shrinkmem=0, topwin = 0xff00L, botwin=0x100L;
int ret = -ENOMEM;
unchar *fepos, *memaddr, *bios, v;
volatile struct global_data *gd;
volatile struct board_chan *bc;
struct board_info *bd;
struct channel *ch;
printk(KERN_NOTICE "Digiboard PC/X{i,e,eve} driver v%s\n", VERSION);
#ifdef MODULE
for (i = 0; i < MAX_DIGI_BOARDS; i++) {
if (io[i]) {
numcards = 0;
break;
}
}
if (numcards == 0) {
int first_minor = 0;
for (i = 0; i < MAX_DIGI_BOARDS; i++) {
if (io[i] == 0) {
boards[i].port = 0;
boards[i].status = DISABLED;
}
else {
boards[i].port = (ushort)io[i];
boards[i].status = ENABLED;
boards[i].first_minor = first_minor;
numcards=i+1;
}
if (membase[i])
boards[i].membase = (ulong)membase[i];
else
boards[i].membase = 0xD0000;
if (memsize[i])
boards[i].memsize = (ulong)(memsize[i] * 1024);
else
boards[i].memsize = 0;
if (altpin[i])
boards[i].altpin = ON;
else
boards[i].altpin = OFF;
if (numports[i])
boards[i].numports = (ushort)numports[i];
else
boards[i].numports = 16;
boards[i].region = NULL;
first_minor += boards[i].numports;
}
}
#endif
if (numcards <= 0)
{
printk("PC/Xx: No cards configured, driver not active.\n");
return -EIO;
}
#if 1
if (debug)
for (i = 0; i < numcards; i++) {
printk("Card %d:status=%d, port=0x%x, membase=0x%lx, memsize=0x%lx, altpin=%d, numports=%d, first_minor=%d\n",
i+1,
boards[i].status,
boards[i].port,
boards[i].membase,
boards[i].memsize,
boards[i].altpin,
boards[i].numports,
boards[i].first_minor);
}
#endif
for (i=0;i<numcards;i++)
nbdevs += boards[i].numports;
if (nbdevs <= 0)
{
printk("PC/Xx: No devices activated, driver not active.\n");
return -EIO;
}
pcxe_driver = alloc_tty_driver(nbdevs);
if (!pcxe_driver)
return -ENOMEM;
/*
* this turns out to be more memory efficient, as there are no
* unused spaces.
*/
digi_channels = kmalloc(sizeof(struct channel) * nbdevs, GFP_KERNEL);
if (!digi_channels) {
printk(KERN_ERR "Unable to allocate digi_channel struct\n");
put_tty_driver(pcxe_driver);
return -ENOMEM;
}
memset(digi_channels, 0, sizeof(struct channel) * nbdevs);
init_timer(&pcxx_timer);
pcxx_timer.function = pcxxpoll;
pcxe_driver->owner = THIS_MODULE;
pcxe_driver->name = "ttyD";
pcxe_driver->devfs_name = "pcxe/";
pcxe_driver->major = DIGI_MAJOR;
pcxe_driver->minor_start = 0;
pcxe_driver->type = TTY_DRIVER_TYPE_SERIAL;
pcxe_driver->subtype = SERIAL_TYPE_NORMAL;
pcxe_driver->init_termios = tty_std_termios;
pcxe_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL;
pcxe_driver->flags = TTY_DRIVER_REAL_RAW;
tty_set_operations(pcxe_driver, &pcxe_ops);
for(crd=0; crd < numcards; crd++) {
bd = &boards[crd];
outb(FEPRST, bd->port);
mdelay(1);
for(i=0; (inb(bd->port) & FEPMASK) != FEPRST; i++) {
if(i > 100) {
printk("PC/Xx: Board not found at port 0x%x! Check switch settings.\n",
bd->port);
bd->status = DISABLED;
break;
}
#ifdef MODULE
schedule();
#endif
mdelay(10);
}
if(bd->status == DISABLED)
continue;
v = inb(bd->port);
if((v & 0x1) == 0x1) {
if((v & 0x30) == 0) { /* PC/Xi 64K card */
memory_seg = 0xf000;
memory_size = 0x10000;
}
if((v & 0x30) == 0x10) { /* PC/Xi 128K card */
memory_seg = 0xe000;
memory_size = 0x20000;
}
if((v & 0x30) == 0x20) { /* PC/Xi 256K card */
memory_seg = 0xc000;
memory_size = 0x40000;
}
if((v & 0x30) == 0x30) { /* PC/Xi 512K card */
memory_seg = 0x8000;
memory_size = 0x80000;
}
bd->type = PCXI;
} else {
if((v & 0x1) == 0x1) {
bd->status = DISABLED; /* PC/Xm unsupported card */
printk("PC/Xx: PC/Xm at 0x%x not supported!!\n", bd->port);
continue;
} else {
if(v & 0xC0) {
topwin = 0x1f00L;
outb((((ulong)bd->membase>>8) & 0xe0) | 0x10, bd->port+2);
outb(((ulong)bd->membase>>16) & 0xff, bd->port+3);
bd->type = PCXEVE; /* PC/Xe 8K card */
} else {
bd->type = PCXE; /* PC/Xe 64K card */
}
memory_seg = 0xf000;
memory_size = 0x10000;
}
}
if (verbose)
printk("Configuring card %d as a %s %ldK card. io=0x%x, mem=%lx-%lx\n",
crd+1, board_desc[bd->type], memory_size/1024,
bd->port,bd->membase,bd->membase+memory_size-1);
if (boards[crd].memsize == 0)
boards[crd].memsize = memory_size;
else
if (boards[crd].memsize != memory_size) {
printk("PC/Xx: memory size mismatch:supplied=%lx(%ldK) probed=%ld(%ldK)\n",
boards[crd].memsize, boards[crd].memsize / 1024,
memory_size, memory_size / 1024);
continue;
}
memaddr = (unchar *)phys_to_virt(bd->membase);
if (verbose)
printk("Resetting board and testing memory access:");
outb(FEPRST|FEPMEM, bd->port);
for(i=0; (inb(bd->port) & FEPMASK) != (FEPRST|FEPMEM); i++) {
if(i > 1000) {
printk("\nPC/Xx: %s not resetting at port 0x%x! Check switch settings.\n",
board_desc[bd->type], bd->port);
bd->status = DISABLED;
break;
}
#ifdef MODULE
schedule();
#endif
mdelay(1);
}
if(bd->status == DISABLED)
continue;
memwinon(bd,0);
*(ulong *)(memaddr + botwin) = 0xa55a3cc3;
*(ulong *)(memaddr + topwin) = 0x5aa5c33c;
if(*(ulong *)(memaddr + botwin) != 0xa55a3cc3 ||
*(ulong *)(memaddr + topwin) != 0x5aa5c33c) {
printk("PC/Xx: Failed memory test at %lx for %s at port %x, check switch settings.\n",
bd->membase, board_desc[bd->type], bd->port);
bd->status = DISABLED;
continue;
}
if (verbose)
printk(" done.\n");
for(i=0; i < 16; i++) {
memaddr[MISCGLOBAL+i] = 0;
}
if(bd->type == PCXI || bd->type == PCXE) {
bios = memaddr + BIOSCODE + ((0xf000 - memory_seg) << 4);
if (verbose)
printk("Downloading BIOS to 0x%lx:", virt_to_phys(bios));
memcpy(bios, pcxx_bios, pcxx_nbios);
if (verbose)
printk(" done.\n");
outb(FEPMEM, bd->port);
if (verbose)
printk("Waiting for BIOS to become ready");
for(i=1; i <= 30; i++) {
if(*(ushort *)((ulong)memaddr + MISCGLOBAL) == *(ushort *)"GD" ) {
goto load_fep;
}
if (verbose) {
printk(".");
if (i % 50 == 0)
printk("\n");
}
#ifdef MODULE
schedule();
#endif
mdelay(50);
}
printk("\nPC/Xx: BIOS download failed for board at 0x%x(addr=%lx-%lx)!\n",
bd->port, bd->membase, bd->membase+bd->memsize);
bd->status = DISABLED;
continue;
}
if(bd->type == PCXEVE) {
bios = memaddr + (BIOSCODE & 0x1fff);
memwinon(bd,0xff);
memcpy(bios, pcxx_bios, pcxx_nbios);
outb(FEPCLR, bd->port);
memwinon(bd,0);
for(i=0; i <= 1000; i++) {
if(*(ushort *)((ulong)memaddr + MISCGLOBAL) == *(ushort *)"GD" ) {
goto load_fep;
}
if (verbose) {
printk(".");
if (i % 50 == 0)
printk("\n");
}
#ifdef MODULE
schedule();
#endif
mdelay(10);
}
printk("\nPC/Xx: BIOS download failed on the %s at 0x%x!\n",
board_desc[bd->type], bd->port);
bd->status = DISABLED;
continue;
}
load_fep:
fepos = memaddr + FEPCODE;
if(bd->type == PCXEVE)
fepos = memaddr + (FEPCODE & 0x1fff);
if (verbose)
printk(" ok.\nDownloading FEP/OS to 0x%lx:", virt_to_phys(fepos));
memwinon(bd, (FEPCODE >> 13));
memcpy(fepos, pcxx_cook, pcxx_ncook);
memwinon(bd, 0);
if (verbose)
printk(" done.\n");
*(ushort *)((ulong)memaddr + MBOX + 0) = 2;
*(ushort *)((ulong)memaddr + MBOX + 2) = memory_seg + FEPCODESEG;
*(ushort *)((ulong)memaddr + MBOX + 4) = 0;
*(ushort *)((ulong)memaddr + MBOX + 6) = FEPCODESEG;
*(ushort *)((ulong)memaddr + MBOX + 8) = 0;
*(ushort *)((ulong)memaddr + MBOX + 10) = pcxx_ncook;
outb(FEPMEM|FEPINT, bd->port);
outb(FEPMEM, bd->port);
for(i=0; *(ushort *)((ulong)memaddr + MBOX); i++) {
if(i > 2000) {
printk("PC/Xx: Command failed for the %s at 0x%x!\n",
board_desc[bd->type], bd->port);
bd->status = DISABLED;
break;
}
#ifdef MODULE
schedule();
#endif
mdelay(1);
}
if(bd->status == DISABLED)
continue;
if (verbose)
printk("Waiting for FEP/OS to become ready");
*(ushort *)(memaddr + FEPSTAT) = 0;
*(ushort *)(memaddr + MBOX + 0) = 1;
*(ushort *)(memaddr + MBOX + 2) = FEPCODESEG;
*(ushort *)(memaddr + MBOX + 4) = 0x4L;
outb(FEPINT, bd->port);
outb(FEPCLR, bd->port);
memwinon(bd, 0);
for(i=1; *(ushort *)((ulong)memaddr + FEPSTAT) != *(ushort *)"OS"; i++) {
if(i > 1000) {
printk("\nPC/Xx: FEP/OS download failed on the %s at 0x%x!\n",
board_desc[bd->type], bd->port);
bd->status = DISABLED;
break;
}
if (verbose) {
printk(".");
if (i % 50 == 0)
printk("\n%5d",i/50);
}
#ifdef MODULE
schedule();
#endif
mdelay(1);
}
if(bd->status == DISABLED)
continue;
if (verbose)
printk(" ok.\n");
ch = digi_channels+bd->first_minor;
pcxxassert(ch < digi_channels+nbdevs, "ch out of range");
bc = (volatile struct board_chan *)((ulong)memaddr + CHANSTRUCT);
gd = (volatile struct global_data *)((ulong)memaddr + GLOBAL);
if((bd->type == PCXEVE) && (*(ushort *)((ulong)memaddr+NPORT) < 3))
shrinkmem = 1;
bd->region = request_region(bd->port, 4, "PC/Xx");
if (!bd->region) {
printk(KERN_ERR "I/O port 0x%x is already used\n", bd->port);
ret = -EBUSY;
goto cleanup_boards;
}
for(i=0; i < bd->numports; i++, ch++, bc++) {
if(((ushort *)((ulong)memaddr + PORTBASE))[i] == 0) {
ch->brdchan = 0;
continue;
}
ch->brdchan = bc;
ch->mailbox = gd;
INIT_WORK(&ch->tqueue, do_softint, ch);
ch->board = &boards[crd];
#ifdef DEFAULT_HW_FLOW
ch->digiext.digi_flags = RTSPACE|CTSPACE;
#endif
if(boards[crd].altpin) {
ch->dsr = CD;
ch->dcd = DSR;
ch->digiext.digi_flags |= DIGI_ALTPIN;
} else {
ch->dcd = CD;
ch->dsr = DSR;
}
ch->magic = PCXX_MAGIC;
ch->boardnum = crd;
ch->channelnum = i;
ch->dev = bd->first_minor + i;
ch->tty = 0;
if(shrinkmem) {
fepcmd(ch, SETBUFFER, 32, 0, 0, 0);
shrinkmem = 0;
}
if(bd->type != PCXEVE) {
ch->txptr = memaddr+((bc->tseg-memory_seg) << 4);
ch->rxptr = memaddr+((bc->rseg-memory_seg) << 4);
ch->txwin = ch->rxwin = 0;
} else {
ch->txptr = memaddr+(((bc->tseg-memory_seg) << 4) & 0x1fff);
ch->txwin = FEPWIN | ((bc->tseg-memory_seg) >> 9);
ch->rxptr = memaddr+(((bc->rseg-memory_seg) << 4) & 0x1fff);
ch->rxwin = FEPWIN | ((bc->rseg-memory_seg) >>9 );
}
ch->txbufsize = bc->tmax + 1;
ch->rxbufsize = bc->rmax + 1;
ch->tmp_buf = kmalloc(ch->txbufsize,GFP_KERNEL);
init_MUTEX(&ch->tmp_buf_sem);
if (!ch->tmp_buf) {
printk(KERN_ERR "Unable to allocate memory for temp buffers\n");
goto cleanup_boards;
}
lowwater = ch->txbufsize >= 2000 ? 1024 : ch->txbufsize/2;
fepcmd(ch, STXLWATER, lowwater, 0, 10, 0);
fepcmd(ch, SRXLWATER, ch->rxbufsize/4, 0, 10, 0);
fepcmd(ch, SRXHWATER, 3 * ch->rxbufsize/4, 0, 10, 0);
bc->edelay = 100;
bc->idata = 1;
ch->startc = bc->startc;
ch->stopc = bc->stopc;
ch->startca = bc->startca;
ch->stopca = bc->stopca;
ch->fepcflag = 0;
ch->fepiflag = 0;
ch->fepoflag = 0;
ch->fepstartc = 0;
ch->fepstopc = 0;
ch->fepstartca = 0;
ch->fepstopca = 0;
ch->close_delay = 50;
ch->count = 0;
ch->blocked_open = 0;
init_waitqueue_head(&ch->open_wait);
init_waitqueue_head(&ch->close_wait);
ch->asyncflags = 0;
}
if (verbose)
printk("Card No. %d ready: %s (%s) I/O=0x%x Mem=0x%lx Ports=%d\n",
crd+1, board_desc[bd->type], board_mem[bd->type], bd->port,
bd->membase, bd->numports);
else
printk("PC/Xx: %s (%s) I/O=0x%x Mem=0x%lx Ports=%d\n",
board_desc[bd->type], board_mem[bd->type], bd->port,
bd->membase, bd->numports);
memwinoff(bd, 0);
enabled_cards++;
}
if (enabled_cards <= 0) {
printk(KERN_NOTICE "PC/Xx: No cards enabled, no driver.\n");
ret = -EIO;
goto cleanup_boards;
}
ret = tty_register_driver(pcxe_driver);
if(ret) {
printk(KERN_ERR "Couldn't register PC/Xe driver\n");
goto cleanup_boards;
}
/*
* Start up the poller to check for events on all enabled boards
*/
mod_timer(&pcxx_timer, HZ/25);
if (verbose)
printk(KERN_NOTICE "PC/Xx: Driver with %d card(s) ready.\n", enabled_cards);
return 0;
cleanup_boards:
cleanup_board_resources();
kfree(digi_channels);
put_tty_driver(pcxe_driver);
return ret;
}
module_init(pcxe_init)
module_exit(pcxe_cleanup)
static void pcxxpoll(unsigned long dummy)
{
unsigned long flags;
int crd;
volatile unsigned int head, tail;
struct channel *ch;
struct board_info *bd;
save_flags(flags);
cli();
for(crd=0; crd < numcards; crd++) {
bd = &boards[crd];
ch = digi_channels+bd->first_minor;
if(bd->status == DISABLED)
continue;
assertmemoff(ch);
globalwinon(ch);
head = ch->mailbox->ein;
tail = ch->mailbox->eout;
if(head != tail)
doevent(crd);
memoff(ch);
}
mod_timer(&pcxx_timer, jiffies + HZ/25);
restore_flags(flags);
}
static void doevent(int crd)
{
volatile struct board_info *bd;
static struct tty_struct *tty;
volatile struct board_chan *bc;
volatile unchar *eventbuf;
volatile unsigned int head;
volatile unsigned int tail;
struct channel *ch;
struct channel *chan0;
int channel, event, mstat, lstat;
bd = &boards[crd];
chan0 = digi_channels+bd->first_minor;
pcxxassert(chan0 < digi_channels+nbdevs, "ch out of range");
assertgwinon(chan0);
while ((tail = chan0->mailbox->eout) != (head = chan0->mailbox->ein)) {
assertgwinon(chan0);
eventbuf = (volatile unchar *)phys_to_virt(bd->membase + tail + ISTART);
channel = eventbuf[0];
event = eventbuf[1];
mstat = eventbuf[2];
lstat = eventbuf[3];
ch=chan0+channel;
if ((unsigned)channel >= bd->numports || !ch) {
printk("physmem=%lx, tail=%x, head=%x\n", bd->membase, tail, head);
printk("doevent(%x) channel %x, event %x, mstat %x, lstat %x\n",
crd, (unsigned)channel, event, (unsigned)mstat, lstat);
if(channel >= bd->numports)
ch = chan0;
bc = ch->brdchan;
goto next;
}
if ((bc = ch->brdchan) == NULL)
goto next;
if (event & DATA_IND) {
receive_data(ch);
assertgwinon(ch);
}
if (event & MODEMCHG_IND) {
ch->imodem = mstat;
if (ch->asyncflags & ASYNC_NORMAL_ACTIVE) {
if (ch->asyncflags & ASYNC_CHECK_CD) {
if (mstat & ch->dcd) {
wake_up_interruptible(&ch->open_wait);
} else {
pcxe_sched_event(ch, PCXE_EVENT_HANGUP);
}
}
}
}
tty = ch->tty;
if (tty) {
if (event & BREAK_IND) {
tty->flip.count++;
*tty->flip.flag_buf_ptr++ = TTY_BREAK;
*tty->flip.char_buf_ptr++ = 0;
#if 0
if (ch->asyncflags & ASYNC_SAK)
do_SAK(tty);
#endif
tty_schedule_flip(tty);
}
if (event & LOWTX_IND) {
if (ch->statusflags & LOWWAIT) {
ch->statusflags &= ~LOWWAIT;
tty_wakeup(tty);
}
}
if (event & EMPTYTX_IND) {
ch->statusflags &= ~TXBUSY;
if (ch->statusflags & EMPTYWAIT) {
ch->statusflags &= ~EMPTYWAIT;
tty_wakeup(tty);
}
}
}
next:
globalwinon(ch);
if(!bc) printk("bc == NULL in doevent!\n");
else bc->idata = 1;
chan0->mailbox->eout = (tail+4) & (IMAX-ISTART-4);
globalwinon(chan0);
}
}
static void
fepcmd(struct channel *ch, int cmd, int word_or_byte, int byte2, int ncmds,
int bytecmd)
{
unchar *memaddr;
unsigned int head, tail;
long count;
int n;
if(ch->board->status == DISABLED)
return;
assertgwinon(ch);
memaddr = (unchar *)phys_to_virt(ch->board->membase);
head = ch->mailbox->cin;
if(head >= (CMAX-CSTART) || (head & 03)) {
printk("line %d: Out of range, cmd=%x, head=%x\n", __LINE__, cmd, head);
return;
}
if(bytecmd) {
*(unchar *)(memaddr+head+CSTART+0) = cmd;
*(unchar *)(memaddr+head+CSTART+1) = ch->dev - ch->board->first_minor;
*(unchar *)(memaddr+head+CSTART+2) = word_or_byte;
*(unchar *)(memaddr+head+CSTART+3) = byte2;
} else {
*(unchar *)(memaddr+head+CSTART+0) = cmd;
*(unchar *)(memaddr+head+CSTART+1) = ch->dev - ch->board->first_minor;
*(ushort*)(memaddr+head+CSTART+2) = word_or_byte;
}
head = (head+4) & (CMAX-CSTART-4);
ch->mailbox->cin = head;
count = FEPTIMEOUT;
while(1) {
count--;
if(count == 0) {
printk("Fep not responding in fepcmd()\n");
return;
}
head = ch->mailbox->cin;
tail = ch->mailbox->cout;
n = (head-tail) & (CMAX-CSTART-4);
if(n <= ncmds * (sizeof(short)*4))
break;
/* Seems not to be good here: schedule(); */
}
}
static unsigned termios2digi_c(struct channel *ch, unsigned cflag)
{
unsigned res = 0;
if (cflag & CBAUDEX)
{
ch->digiext.digi_flags |= DIGI_FAST;
res |= FEP_HUPCL;
/* This gets strange but if we don't do this we will get 78600
* instead of 115200. 57600 is mapped to 50 baud yielding 57600 in
* FAST mode. 115200 is mapped to 75. We need to map it to 110 to
* do 115K
*/
if (cflag & B115200) res|=1;
}
else ch->digiext.digi_flags &= ~DIGI_FAST;
res |= cflag & (CBAUD | PARODD | PARENB | CSTOPB | CSIZE | CLOCAL);
return res;
}
static unsigned termios2digi_i(struct channel *ch, unsigned iflag)
{
unsigned res = iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|IXON|IXANY|IXOFF);
if(ch->digiext.digi_flags & DIGI_AIXON)
res |= IAIXON;
return res;
}
static unsigned termios2digi_h(struct channel *ch, unsigned cflag)
{
unsigned res = 0;
if(cflag & CRTSCTS) {
ch->digiext.digi_flags |= (RTSPACE|CTSPACE);
res |= (CTS | RTS);
}
if(ch->digiext.digi_flags & RTSPACE)
res |= RTS;
if(ch->digiext.digi_flags & DTRPACE)
res |= DTR;
if(ch->digiext.digi_flags & CTSPACE)
res |= CTS;
if(ch->digiext.digi_flags & DSRPACE)
res |= ch->dsr;
if(ch->digiext.digi_flags & DCDPACE)
res |= ch->dcd;
if (res & RTS)
ch->digiext.digi_flags |= RTSPACE;
if (res & CTS)
ch->digiext.digi_flags |= CTSPACE;
return res;
}
static void pcxxparam(struct tty_struct *tty, struct channel *ch)
{
volatile struct board_chan *bc;
unsigned int head;
unsigned mval, hflow, cflag, iflag;
struct termios *ts;
bc = ch->brdchan;
assertgwinon(ch);
ts = tty->termios;
if((ts->c_cflag & CBAUD) == 0) {
head = bc->rin;
bc->rout = head;
head = bc->tin;
fepcmd(ch, STOUT, (unsigned) head, 0, 0, 0);
mval = 0;
} else {
cflag = termios2digi_c(ch, ts->c_cflag);
if(cflag != ch->fepcflag) {
ch->fepcflag = cflag;
fepcmd(ch, SETCTRLFLAGS, (unsigned) cflag, 0, 0, 0);
}
if(cflag & CLOCAL)
ch->asyncflags &= ~ASYNC_CHECK_CD;
else {
ch->asyncflags |= ASYNC_CHECK_CD;
}
mval = DTR | RTS;
}
iflag = termios2digi_i(ch, ts->c_iflag);
if(iflag != ch->fepiflag) {
ch->fepiflag = iflag;
fepcmd(ch, SETIFLAGS, (unsigned int) ch->fepiflag, 0, 0, 0);
}
bc->mint = ch->dcd;
if((ts->c_cflag & CLOCAL) || (ch->digiext.digi_flags & DIGI_FORCEDCD))
if(ch->digiext.digi_flags & DIGI_FORCEDCD)
bc->mint = 0;
ch->imodem = bc->mstat;
hflow = termios2digi_h(ch, ts->c_cflag);
if(hflow != ch->hflow) {
ch->hflow = hflow;
fepcmd(ch, SETHFLOW, hflow, 0xff, 0, 1);
}
/* mval ^= ch->modemfake & (mval ^ ch->modem); */
if(ch->omodem != mval) {
ch->omodem = mval;
fepcmd(ch, SETMODEM, mval, RTS|DTR, 0, 1);
}
if(ch->startc != ch->fepstartc || ch->stopc != ch->fepstopc) {
ch->fepstartc = ch->startc;
ch->fepstopc = ch->stopc;
fepcmd(ch, SONOFFC, ch->fepstartc, ch->fepstopc, 0, 1);
}
if(ch->startca != ch->fepstartca || ch->stopca != ch->fepstopca) {
ch->fepstartca = ch->startca;
ch->fepstopca = ch->stopca;
fepcmd(ch, SAUXONOFFC, ch->fepstartca, ch->fepstopca, 0, 1);
}
}
static void receive_data(struct channel *ch)
{
volatile struct board_chan *bc;
struct tty_struct *tty;
unsigned int tail, head, wrapmask;
int n;
int piece;
struct termios *ts=0;
unchar *rptr;
int rc;
int wrapgap;
globalwinon(ch);
if (ch->statusflags & RXSTOPPED)
return;
tty = ch->tty;
if(tty)
ts = tty->termios;
bc = ch->brdchan;
if(!bc) {
printk("bc is NULL in receive_data!\n");
return;
}
wrapmask = ch->rxbufsize - 1;
head = bc->rin;
head &= wrapmask;
tail = bc->rout & wrapmask;
n = (head-tail) & wrapmask;
if(n == 0)
return;
/*
* If CREAD bit is off or device not open, set TX tail to head
*/
if(!tty || !ts || !(ts->c_cflag & CREAD)) {
bc->rout = head;
return;
}
if(tty->flip.count == TTY_FLIPBUF_SIZE) {
/* printk("tty->flip.count = TTY_FLIPBUF_SIZE\n"); */
return;
}
if(bc->orun) {
bc->orun = 0;
printk("overrun! DigiBoard device %s\n", tty->name);
}
rxwinon(ch);
rptr = tty->flip.char_buf_ptr;
rc = tty->flip.count;
while(n > 0) {
wrapgap = (head >= tail) ? head - tail : ch->rxbufsize - tail;
piece = (wrapgap < n) ? wrapgap : n;
/*
* Make sure we don't overflow the buffer
*/
if ((rc + piece) > TTY_FLIPBUF_SIZE)
piece = TTY_FLIPBUF_SIZE - rc;
if (piece == 0)
break;
memcpy(rptr, ch->rxptr + tail, piece);
rptr += piece;
rc += piece;
tail = (tail + piece) & wrapmask;
n -= piece;
}
tty->flip.count = rc;
tty->flip.char_buf_ptr = rptr;
globalwinon(ch);
bc->rout = tail;
/* Must be called with global data */
tty_schedule_flip(ch->tty);
return;
}
static int pcxe_tiocmget(struct tty_struct *tty, struct file *file)
{
struct channel *ch = (struct channel *) tty->driver_data;
volatile struct board_chan *bc;
unsigned long flags;
int mflag = 0;
int mstat;
if(ch)
bc = ch->brdchan;
else {
printk("ch is NULL in %s!\n", __FUNCTION__);
return(-EINVAL);
}
save_flags(flags);
cli();
globalwinon(ch);
mstat = bc->mstat;
memoff(ch);
restore_flags(flags);
if(mstat & DTR)
mflag |= TIOCM_DTR;
if(mstat & RTS)
mflag |= TIOCM_RTS;
if(mstat & CTS)
mflag |= TIOCM_CTS;
if(mstat & ch->dsr)
mflag |= TIOCM_DSR;
if(mstat & RI)
mflag |= TIOCM_RI;
if(mstat & ch->dcd)
mflag |= TIOCM_CD;
return mflag;
}
static int pcxe_tiocmset(struct tty_struct *tty, struct file *file,
unsigned int set, unsigned int clear)
{
struct channel *ch = (struct channel *) tty->driver_data;
volatile struct board_chan *bc;
unsigned long flags;
if(ch)
bc = ch->brdchan;
else {
printk("ch is NULL in %s!\n", __FUNCTION__);
return(-EINVAL);
}
save_flags(flags);
cli();
/*
* I think this modemfake stuff is broken. It doesn't
* correctly reflect the behaviour desired by the TIOCM*
* ioctls. Therefore this is probably broken.
*/
if (set & TIOCM_DTR) {
ch->modemfake |= DTR;
ch->modem |= DTR;
}
if (set & TIOCM_RTS) {
ch->modemfake |= RTS;
ch->modem |= RTS;
}
if (clear & TIOCM_DTR) {
ch->modemfake |= DTR;
ch->modem &= ~DTR;
}
if (clear & TIOCM_RTS) {
ch->modemfake |= RTS;
ch->modem &= ~RTS;
}
globalwinon(ch);
pcxxparam(tty,ch);
memoff(ch);
restore_flags(flags);
return 0;
}
static int pcxe_ioctl(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned long arg)
{
struct channel *ch = (struct channel *) tty->driver_data;
volatile struct board_chan *bc;
int retval;
unsigned int mflag, mstat;
unsigned char startc, stopc;
unsigned long flags;
digiflow_t dflow;
if(ch)
bc = ch->brdchan;
else {
printk("ch is NULL in pcxe_ioctl!\n");
return(-EINVAL);
}
save_flags(flags);
switch(cmd) {
case TCSBRK: /* SVID version: non-zero arg --> no break */
retval = tty_check_change(tty);
if(retval)
return retval;
setup_empty_event(tty,ch);
tty_wait_until_sent(tty, 0);
if(!arg)
digi_send_break(ch, HZ/4); /* 1/4 second */
return 0;
case TCSBRKP: /* support for POSIX tcsendbreak() */
retval = tty_check_change(tty);
if(retval)
return retval;
setup_empty_event(tty,ch);
tty_wait_until_sent(tty, 0);
digi_send_break(ch, arg ? arg*(HZ/10) : HZ/4);
return 0;
case TIOCGSOFTCAR:
return put_user(C_CLOCAL(tty) ? 1 : 0, (unsigned int *)arg);
case TIOCSSOFTCAR:
{
unsigned int value;
if (get_user(value, (unsigned int *) arg))
return -EFAULT;
tty->termios->c_cflag = ((tty->termios->c_cflag & ~CLOCAL) | (value ? CLOCAL : 0));
}
return 0;
case TIOCMODG:
mflag = pcxe_tiocmget(tty, file);
if (put_user(mflag, (unsigned int *) arg))
return -EFAULT;
break;
case TIOCMODS:
if (get_user(mstat, (unsigned int *) arg))
return -EFAULT;
return pcxe_tiocmset(tty, file, mstat, ~mstat);
case TIOCSDTR:
cli();
ch->omodem |= DTR;
globalwinon(ch);
fepcmd(ch, SETMODEM, DTR, 0, 10, 1);
memoff(ch);
restore_flags(flags);
break;
case TIOCCDTR:
ch->omodem &= ~DTR;
cli();
globalwinon(ch);
fepcmd(ch, SETMODEM, 0, DTR, 10, 1);
memoff(ch);
restore_flags(flags);
break;
case DIGI_GETA:
if (copy_to_user((char*)arg, &ch->digiext, sizeof(digi_t)))
return -EFAULT;
break;
case DIGI_SETAW:
case DIGI_SETAF:
if(cmd == DIGI_SETAW) {
setup_empty_event(tty,ch);
tty_wait_until_sent(tty, 0);
}
else {
tty_ldisc_flush(tty);
}
/* Fall Thru */
case DIGI_SETA:
if (copy_from_user(&ch->digiext, (char*)arg, sizeof(digi_t)))
return -EFAULT;
#ifdef DEBUG_IOCTL
printk("ioctl(DIGI_SETA): flags = %x\n", ch->digiext.digi_flags);
#endif
if(ch->digiext.digi_flags & DIGI_ALTPIN) {
ch->dcd = DSR;
ch->dsr = CD;
} else {
ch->dcd = CD;
ch->dsr = DSR;
}
cli();
globalwinon(ch);
pcxxparam(tty,ch);
memoff(ch);
restore_flags(flags);
break;
case DIGI_GETFLOW:
case DIGI_GETAFLOW:
cli();
globalwinon(ch);
if(cmd == DIGI_GETFLOW) {
dflow.startc = bc->startc;
dflow.stopc = bc->stopc;
} else {
dflow.startc = bc->startca;
dflow.stopc = bc->stopca;
}
memoff(ch);
restore_flags(flags);
if (copy_to_user((char*)arg, &dflow, sizeof(dflow)))
return -EFAULT;
break;
case DIGI_SETAFLOW:
case DIGI_SETFLOW:
if(cmd == DIGI_SETFLOW) {
startc = ch->startc;
stopc = ch->stopc;
} else {
startc = ch->startca;
stopc = ch->stopca;
}
if (copy_from_user(&dflow, (char*)arg, sizeof(dflow)))
return -EFAULT;
if(dflow.startc != startc || dflow.stopc != stopc) {
cli();
globalwinon(ch);
if(cmd == DIGI_SETFLOW) {
ch->fepstartc = ch->startc = dflow.startc;
ch->fepstopc = ch->stopc = dflow.stopc;
fepcmd(ch,SONOFFC,ch->fepstartc,ch->fepstopc,0, 1);
} else {
ch->fepstartca = ch->startca = dflow.startc;
ch->fepstopca = ch->stopca = dflow.stopc;
fepcmd(ch, SAUXONOFFC, ch->fepstartca, ch->fepstopca, 0, 1);
}
if(ch->statusflags & TXSTOPPED)
pcxe_start(tty);
memoff(ch);
restore_flags(flags);
}
break;
default:
return -ENOIOCTLCMD;
}
return 0;
}
static void pcxe_set_termios(struct tty_struct *tty, struct termios *old_termios)
{
struct channel *info;
if ((info=chan(tty))!=NULL) {
unsigned long flags;
save_flags(flags);
cli();
globalwinon(info);
pcxxparam(tty,info);
memoff(info);
if ((old_termios->c_cflag & CRTSCTS) &&
((tty->termios->c_cflag & CRTSCTS) == 0))
tty->hw_stopped = 0;
if(!(old_termios->c_cflag & CLOCAL) &&
(tty->termios->c_cflag & CLOCAL))
wake_up_interruptible(&info->open_wait);
restore_flags(flags);
}
}
static void do_softint(void *private_)
{
struct channel *info = (struct channel *) private_;
if(info && info->magic == PCXX_MAGIC) {
struct tty_struct *tty = info->tty;
if (tty && tty->driver_data) {
if(test_and_clear_bit(PCXE_EVENT_HANGUP, &info->event)) {
tty_hangup(tty);
wake_up_interruptible(&info->open_wait);
info->asyncflags &= ~ASYNC_NORMAL_ACTIVE;
}
}
}
}
static void pcxe_stop(struct tty_struct *tty)
{
struct channel *info;
if ((info=chan(tty))!=NULL) {
unsigned long flags;
save_flags(flags);
cli();
if ((info->statusflags & TXSTOPPED) == 0) {
globalwinon(info);
fepcmd(info, PAUSETX, 0, 0, 0, 0);
info->statusflags |= TXSTOPPED;
memoff(info);
}
restore_flags(flags);
}
}
static void pcxe_throttle(struct tty_struct * tty)
{
struct channel *info;
if ((info=chan(tty))!=NULL) {
unsigned long flags;
save_flags(flags);
cli();
if ((info->statusflags & RXSTOPPED) == 0) {
globalwinon(info);
fepcmd(info, PAUSERX, 0, 0, 0, 0);
info->statusflags |= RXSTOPPED;
memoff(info);
}
restore_flags(flags);
}
}
static void pcxe_unthrottle(struct tty_struct *tty)
{
struct channel *info;
if ((info=chan(tty)) != NULL) {
unsigned long flags;
/* Just in case output was resumed because of a change in Digi-flow */
save_flags(flags);
cli();
if(info->statusflags & RXSTOPPED) {
volatile struct board_chan *bc;
globalwinon(info);
bc = info->brdchan;
fepcmd(info, RESUMERX, 0, 0, 0, 0);
info->statusflags &= ~RXSTOPPED;
memoff(info);
}
restore_flags(flags);
}
}
static void pcxe_start(struct tty_struct *tty)
{
struct channel *info;
if ((info=chan(tty))!=NULL) {
unsigned long flags;
save_flags(flags);
cli();
/* Just in case output was resumed because of a change in Digi-flow */
if(info->statusflags & TXSTOPPED) {
volatile struct board_chan *bc;
globalwinon(info);
bc = info->brdchan;
if(info->statusflags & LOWWAIT)
bc->ilow = 1;
fepcmd(info, RESUMETX, 0, 0, 0, 0);
info->statusflags &= ~TXSTOPPED;
memoff(info);
}
restore_flags(flags);
}
}
void digi_send_break(struct channel *ch, int msec)
{
unsigned long flags;
save_flags(flags);
cli();
globalwinon(ch);
/*
* Maybe I should send an infinite break here, schedule() for
* msec amount of time, and then stop the break. This way,
* the user can't screw up the FEP by causing digi_send_break()
* to be called (i.e. via an ioctl()) more than once in msec amount
* of time. Try this for now...
*/
fepcmd(ch, SENDBREAK, msec, 0, 10, 0);
memoff(ch);
restore_flags(flags);
}
static void setup_empty_event(struct tty_struct *tty, struct channel *ch)
{
volatile struct board_chan *bc;
unsigned long flags;
save_flags(flags);
cli();
globalwinon(ch);
ch->statusflags |= EMPTYWAIT;
bc = ch->brdchan;
bc->iempty = 1;
memoff(ch);
restore_flags(flags);
}
#define FEPCODESEG 0x0200L
#define FEPCODE 0x2000L
#define BIOSCODE 0xf800L
#define MISCGLOBAL 0x0C00L
#define NPORT 0x0C22L
#define MBOX 0x0C40L
#define PORTBASE 0x0C90L
#define FEPCLR 0x00
#define FEPMEM 0x02
#define FEPRST 0x04
#define FEPINT 0x08
#define FEPMASK 0x0e
#define FEPWIN 0x80
/* Maximum Number of Boards supported */
#define MAX_DIGI_BOARDS 4
#define PCXX_NUM_TYPES 4
#define PCXI 0
#define PCXE 1
#define PCXEVE 2
#define PCXEM 3
static char *board_desc[] = {
"PC/Xi",
"PC/Xe",
"PC/Xeve",
"PC/Xem",
};
static char *board_mem[] = {
"64k",
"64k",
"8k",
"32k",
};
#define STARTC 021
#define STOPC 023
#define IAIXON 0x2000
struct board_info {
unchar status;
unchar type;
unchar altpin;
ushort numports;
ushort port;
ulong membase;
ulong memsize;
ushort first_minor;
void *region;
};
#define TXSTOPPED 0x01
#define LOWWAIT 0x02
#define EMPTYWAIT 0x04
#define RXSTOPPED 0x08
#define TXBUSY 0x10
#define DISABLED 0
#define ENABLED 1
#define OFF 0
#define ON 1
#define FEPTIMEOUT 200000
#define SERIAL_TYPE_NORMAL 1
#define PCXE_EVENT_HANGUP 1
#define PCXX_MAGIC 0x5c6df104L
struct channel {
/* --------- Board/channel information ---------- */
long magic;
unchar boardnum;
unchar channelnum;
uint dev;
struct tty_struct *tty;
struct board_info *board;
volatile struct board_chan *brdchan;
volatile struct global_data *mailbox;
int asyncflags;
int count;
int blocked_open;
int close_delay;
unsigned long event;
wait_queue_head_t open_wait;
wait_queue_head_t close_wait;
struct work_struct tqueue;
/* ------------ Async control data ------------- */
unchar modemfake; /* Modem values to be forced */
unchar modem; /* Force values */
ulong statusflags;
unchar omodem; /* FEP output modem status */
unchar imodem; /* FEP input modem status */
unchar hflow;
unchar dsr;
unchar dcd;
unchar stopc;
unchar startc;
unchar stopca;
unchar startca;
unchar fepstopc;
unchar fepstartc;
unchar fepstopca;
unchar fepstartca;
ushort fepiflag;
ushort fepcflag;
ushort fepoflag;
/* ---------- Transmit/receive system ---------- */
unchar txwin;
unchar rxwin;
ushort txbufsize;
ushort rxbufsize;
unchar *txptr;
unchar *rxptr;
unchar *tmp_buf; /* Temp buffer */
struct semaphore tmp_buf_sem;
/* ---- Termios data ---- */
ulong c_iflag;
ulong c_cflag;
ulong c_lflag;
ulong c_oflag;
struct digi_struct digiext;
ulong dummy[8];
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment