Commit 9d0031fc authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.37pre2

parent 11297b7c
......@@ -26,6 +26,8 @@ devices.txt
- plain ASCII listing of all the nodes in /dev/ with major minor #'s
digiboard.txt
- info on the Digiboard PC/X{i,e,eve} multiport boards.
digiepca.txt
- info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards.
exception.txt
- how linux v2.1 handles exceptions without verify_area etc.
ez.txt
......
......@@ -4036,6 +4036,16 @@ CONFIG_SERIAL_CONSOLE
N here so that they can use the serial port for modem, mouse or some
other device.
Digi Intl. epca support
CONFIG_DIGIEPCA
This is a driver for Digi Internationals Xx, Xeve, and Xem
series of cards. This driver supports the original PC (ISA) boards as
well as PCI, and EISA. If you have a card like this, say Y here and read
the file Documentation/digiepca.txt. NOTE: This driver is seperate from
the driver written and copyrighted by Troy De Jongh. Because they both
attempt (In some cases) to access the same hardware only one of these
drivers (CONFIG_DIGIEPCA or CONFIG_DIGI) should be selected.
Digiboard PC/Xx Support
CONFIG_DIGI
This is a driver for the Digiboard PC/Xe, PC/Xi, and PC/Xeve cards
......@@ -5317,7 +5327,7 @@ CONFIG_MSDOS_PARTITION
# LocalWords: mgetty sendfax gert greenie muc lowlevel Lasermate LanManager io
# LocalWords: OOPSes trackball binghamton mobileip ncr IOMAPPED settags ns ser
# LocalWords: setsync NEGO MPARITY autotuning prefetch PIIX cdwrite utils rc
# LocalWords: PCWATCHDOG berkprod bitgate boldt ucsb jf kyoto jp euc Tetsuyasu
# LocalWords: PCWATCHDOG berkprod bitgate boldt ucsb jf kyoto jp euc Tetsuyasu
# LocalWords: YAMADA tetsu cauchy nslab ntt nevod perm su doc kaf kheops wsc
# LocalWords: traduc Bourgin dbourgin helptext menuconfig kfill READMEs HOWTOs
# LocalWords: IDEDISK IDEFLOPPY EIDE firewalls QMAGIC ZMAGIC LocalWords opti
......
The Digi Intl. epca driver.
----------------------------
The Digi Intl. epca driver for Linux supports the following boards:
Digi PC/Xem, PC/Xr, PC/Xe, PC/Xi, PC/Xeve
Digi EISA/Xem, PCI/Xem, PCI/Xr
Limitations:
------------
Currently the driver only autoprobes for supported PCI boards.
The Linux MAKEDEV command does not support generating the Digiboard
Devices. Users executing digiConfig to setup EISA and PC series cards
will have their device nodes automaticly constructed (cud?? for ~CLOCAL,
and ttyD?? for CLOCAL). Users wishing to boot their board from the LILO
prompt, or those users booting PCI cards may use buildDIGI to construct
the necessary nodes.
Notes:
------
This driver may be configured via LILO. For users who have already configured
their driver using digiConfig, configuring from lilo will override previous
settings. Multiple boards may be configured by issuing multiple LILO command
lines. For examples see the bottom of this document.
Device names start at 0 and continue up. Beware of this as previous Digi
drivers started device names with 1.
PCI boards are auto-detected and configured by the driver. PCI boards will
be allocated device numbers (internally) begining with the lowest PCI slot
first. In other words a PCI card in slot 3 will always have higher device
nodes than a PCI card in slot 1.
LILO config examples:
---------------------
Using LILO's APPEND command, a string of comma separated identifiers or
integers can be used to configure supported boards. The six values in order
are:
Enable/Disable this card or Override,
Type of card: PC/Xe (AccelePort) (0), PC/Xeve (1), PC/Xem or PC/Xr (2),
EISA/Xem (3), PC/64Xe (4), PC/Xi (5),
Enable/Disable alternate pin arrangement,
Number of ports on this card,
I/O Port where card is configured (in HEX if using string identifiers),
Base of memory window (in HEX if using string identifiers),
NOTE : PCI boards are auto-detected and configured. Do not attempt to
configure PCI boards with the LILO append comand. If you wish to override
previous configuration data (As set by digiConfig), but you do not wish to
configure any specific card (Example if there are PCI cards in the system)
the following override command will accomplish this:
-> append="digi=2"
Samples:
append="digiepca=E,PC/Xe,D,16,200,D0000"
or
append="digi=1,0,0,16,512,851968"
Supporting Tools:
-----------------
Supporting tools include digiDload, digiConfig, buildPCI, and ditty. See
/usr/src/linux/Documentation/README.epca.dir/user.doc for more details. Note,
this driver REQUIRES that digiDload be executed prior to it being used.
Failure to do this will result in an ENODEV error.
The latest version of the tool package is available at:
ftp://ftp.dgii.com/drivers/linux/released/async/
Documentation:
--------------
Complete documentation for this product may be found in the tool package.
Sources of information and support:
-----------------------------------
Digi Intl. support site for this product:
-> digilnux@dgii.com
Related information and information concerning other drivers supporting
Digi Intl. products:
-> FTP: ftp://dgii.com
-> Webpage: http://www.dgii.com
-> Webpage: http://private.fuller.edu/clameter/digi.html
-> Mailing List: digiboard@list.fuller.edu Note write e-mail to subscribe
common ListServ commands will not work.
Acknowledgments:
----------------
Much of this work (And even text) was derived from a similar document
supporting the original public domain DigiBoard driver Copyright (C)
1994,1995 Troy De Jongh. Many thanks to Christoph Lameter
(clameter@fuller.edu) and Mike McLagan (mike.mclagan@linux.org) who authored
and contributed to the original document.
......@@ -342,6 +342,13 @@ M: clameter@fuller.edu
L: digiboard@list.fuller.edu
S: Maintained
DIGI INTL. EPCA DRIVER:
P: Daniel Taylor
M: support@dgii.com
M: digilnux@dgii.com
L: digiboard@list.fuller.edu
S: Maintained
RISCOM8 DRIVER:
P: Dmitry Gorodchanin
M: begemot@bgm.rosprint.net
......
......@@ -110,45 +110,24 @@ ENOSYS = 38
addl $4,%esp; \
iret
#ifdef __SMP__
/* Get the processor ID multiplied by 4 */
#if 0
#define GET_PROCESSOR_OFFSET(reg) \
movl SYMBOL_NAME(apic_reg), reg; \
movl 32(reg), reg; \
shrl $22, reg; \
andl $0x3C, reg;
#define GET_CURRENT(reg) \
GET_PROCESSOR_OFFSET(reg) \
movl SYMBOL_NAME(current_set)(reg),reg
#endif
#define GET_CURRENT(reg) \
movl %esp, reg; \
andl $-8192, reg;
#else
#define GET_CURRENT(reg) \
movl SYMBOL_NAME(current_set),reg
#endif
ENTRY(lcall7)
pushfl # We get a different stack layout with call gates,
pushl %eax # which has to be cleaned up later..
SAVE_ALL
GET_CURRENT(%ebx)
movl EIP(%esp),%eax # due to call gates, this is eflags, not eip..
movl CS(%esp),%edx # this is eip..
movl EFLAGS(%esp),%ecx # and this is cs..
movl %eax,EFLAGS(%esp) #
movl %edx,EIP(%esp) # Now we move them to their "normal" places
movl %ecx,CS(%esp) #
movl %esp,%eax
GET_CURRENT(%edx)
pushl %eax
movl exec_domain(%edx),%edx # Get the execution domain
movl %esp,%ebx
pushl %ebx
andl $-8192,%ebx # GET_CURRENT
movl exec_domain(%ebx),%edx # Get the execution domain
movl 4(%edx),%edx # Get the lcall7 handler for the domain
call *%edx
popl %eax
......@@ -159,6 +138,7 @@ ENTRY(lcall7)
ALIGN
.globl ret_from_smpfork
ret_from_smpfork:
GET_CURRENT(%ebx)
btrl $0, SYMBOL_NAME(scheduler_lock)
jmp ret_from_sys_call
#endif /* __SMP__ */
......@@ -190,7 +170,6 @@ ret_from_sys_call:
ret_with_reschedule:
cmpl $0,SYMBOL_NAME(need_resched)
jne reschedule
GET_CURRENT(%ebx)
movl blocked(%ebx),%eax
movl %eax,%esi # save blocked in %esi for signal handling
notl %eax
......@@ -235,6 +214,7 @@ ret_from_exception:
jne handle_bottom_half
ALIGN
ret_from_intr:
GET_CURRENT(%ebx)
movl EFLAGS(%esp),%eax # mix EFLAGS and CS
movb CS(%esp),%al
testl $(VM_MASK | 3),%eax # return to VM86 mode or non-supervisor?
......
......@@ -40,19 +40,20 @@ startup_32:
/*
* New page tables may be in 4Mbyte page mode and may
* be using the global pages.
*
* NOTE! We have to correct for the fact that we're
* not yet offset 0xC0000000..
*/
#define mmu_cr4_features $128+16
#define cr4_bits mmu_cr4_features-0xC0000000
#ifdef GAS_KNOWS_CR4
movl %cr4,%eax # Turn on 4Mb pages
orl mmu_cr4_features,%eax
orl cr4_bits,%eax
movl %eax,%cr4
#else
.byte 0x0f,0x20,0xe0
orl mmu_cr4_features,%eax
orl cr4_bits,%eax
.byte 0x0f,0x22,0xe0
#endif
movl %eax,%cr3 /* flush TLB as per app note */
movl %cr0,%eax
#endif
/*
* Setup paging (the tables are already set up, just switch them on)
......
......@@ -36,8 +36,6 @@ EXPORT_SYMBOL(__intel_bh_counter);
/* Networking helper routines. */
EXPORT_SYMBOL(csum_partial_copy);
EXPORT_SYMBOL(synchronize_irq);
#ifdef __SMP__
EXPORT_SYMBOL(apic_reg); /* Needed internally for the I386 inlines */
EXPORT_SYMBOL(cpu_data);
......@@ -47,6 +45,7 @@ EXPORT_SYMBOL(smp_invalidate_needed);
EXPORT_SYMBOL_NOVERS(__lock_kernel);
/* Global SMP irq stuff */
EXPORT_SYMBOL(synchronize_irq);
EXPORT_SYMBOL(global_irq_holder);
EXPORT_SYMBOL(__global_cli);
EXPORT_SYMBOL(__global_sti);
......
......@@ -44,8 +44,8 @@ extern volatile unsigned long smp_local_timer_ticks[1+NR_CPUS];
#define CR0_NE 32
static unsigned char cache_21 = 0xff;
static unsigned char cache_A1 = 0xff;
/* This contains the irq mask for both irq controllers */
static unsigned long cached_irq_mask = 0xffff;
unsigned int local_irq_count[NR_CPUS];
#ifdef __SMP__
......@@ -58,32 +58,33 @@ int __intel_bh_counter;
static unsigned int int_count[NR_CPUS][NR_IRQS] = {{0},};
#endif
static inline void mask_irq(unsigned int irq_nr)
static inline void ack_irq(int irq_nr)
{
unsigned char mask;
if (irq_nr & 8) {
outb(0x20,0xA0);
}
outb(0x20,0x20);
}
mask = 1 << (irq_nr & 7);
if (irq_nr < 8) {
cache_21 |= mask;
outb(cache_21,0x21);
static inline void set_irq_mask(int irq_nr)
{
if (irq_nr & 8) {
outb(cached_irq_mask>>8,0xA1);
} else {
cache_A1 |= mask;
outb(cache_A1,0xA1);
outb(cached_irq_mask,0x21);
}
}
static inline void mask_irq(unsigned int irq_nr)
{
set_bit(irq_nr, &cached_irq_mask);
set_irq_mask(irq_nr);
}
static inline void unmask_irq(unsigned int irq_nr)
{
unsigned char mask;
mask = ~(1 << (irq_nr & 7));
if (irq_nr < 8) {
cache_21 &= mask;
outb(cache_21,0x21);
} else {
cache_A1 &= mask;
outb(cache_A1,0xA1);
}
clear_bit(irq_nr, &cached_irq_mask);
set_irq_mask(irq_nr);
}
void disable_irq(unsigned int irq_nr)
......@@ -134,7 +135,8 @@ void enable_irq(unsigned int irq_nr)
#error make irq stub building NR_IRQS dependent and remove me.
#endif
BUILD_TIMER_IRQ(FIRST,0,0x01)
BUILD_COMMON_IRQ()
BUILD_IRQ(FIRST,0,0x01)
BUILD_IRQ(FIRST,1,0x02)
BUILD_IRQ(FIRST,2,0x04)
BUILD_IRQ(FIRST,3,0x08)
......@@ -158,10 +160,6 @@ BUILD_SMP_INTERRUPT(stop_cpu_interrupt)
BUILD_SMP_TIMER_INTERRUPT(apic_timer_interrupt)
#endif
/*
* Pointers to the low-level handlers: first the general ones, then the
* fast ones, then the bad ones.
*/
static void (*interrupt[17])(void) = {
IRQ0_interrupt, IRQ1_interrupt, IRQ2_interrupt, IRQ3_interrupt,
IRQ4_interrupt, IRQ5_interrupt, IRQ6_interrupt, IRQ7_interrupt,
......@@ -169,17 +167,6 @@ static void (*interrupt[17])(void) = {
IRQ12_interrupt, IRQ13_interrupt, IRQ14_interrupt, IRQ15_interrupt
};
static void (*bad_interrupt[16])(void) = {
bad_IRQ0_interrupt, bad_IRQ1_interrupt,
bad_IRQ2_interrupt, bad_IRQ3_interrupt,
bad_IRQ4_interrupt, bad_IRQ5_interrupt,
bad_IRQ6_interrupt, bad_IRQ7_interrupt,
bad_IRQ8_interrupt, bad_IRQ9_interrupt,
bad_IRQ10_interrupt, bad_IRQ11_interrupt,
bad_IRQ12_interrupt, bad_IRQ13_interrupt,
bad_IRQ14_interrupt, bad_IRQ15_interrupt
};
/*
* Initial irq handlers.
*/
......@@ -520,25 +507,34 @@ void __global_restore_flags(unsigned long flags)
* SMP cross-CPU interrupts have their own specific
* handlers).
*/
asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
asmlinkage void do_IRQ(struct pt_regs regs)
{
int irq = regs.orig_eax & 0xff;
struct irqaction * action;
int do_random, cpu = smp_processor_id();
int status, cpu = smp_processor_id();
irq_enter(cpu, irq);
mask_irq(irq);
ack_irq(irq);
kstat.interrupts[irq]++;
/* Return with this interrupt masked if no action */
status = 0;
action = *(irq + irq_action);
do_random = 0;
while (action) {
do_random |= action->flags;
action->handler(irq, action->dev_id, regs);
action = action->next;
if (action) {
do {
status |= action->flags;
action->handler(irq, action->dev_id, &regs);
action = action->next;
} while (action);
if (status & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
__cli();
unmask_irq(irq);
}
if (do_random & SA_SAMPLE_RANDOM)
add_interrupt_randomness(irq);
irq_exit(cpu, irq);
irq_exit(cpu, irq);
/*
* This should be conditional: we should really get
* a return code from the irq handler to tell us
......@@ -635,10 +631,6 @@ void free_irq(unsigned int irq, void *dev_id)
save_flags(flags);
cli();
*p = action->next;
if (!irq[irq_action]) {
mask_irq(irq);
set_intr_gate(0x20+irq,bad_interrupt[irq]);
}
restore_flags(flags);
kfree(action);
return;
......@@ -648,7 +640,7 @@ void free_irq(unsigned int irq, void *dev_id)
unsigned long probe_irq_on (void)
{
unsigned int i, irqs = 0, irqmask;
unsigned int i, irqs = 0;
unsigned long delay;
/* first, enable any unassigned irqs */
......@@ -664,19 +656,17 @@ unsigned long probe_irq_on (void)
/* about 100ms delay */;
/* now filter out any obviously spurious interrupts */
irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21;
return irqs & ~irqmask;
return irqs & ~cached_irq_mask;
}
int probe_irq_off (unsigned long irqs)
{
unsigned int i, irqmask;
unsigned int i;
irqmask = (((unsigned int)cache_A1)<<8) | (unsigned int)cache_21;
#ifdef DEBUG
printk("probe_irq_off: irqs=0x%04lx irqmask=0x%04x\n", irqs, irqmask);
printk("probe_irq_off: irqs=0x%04lx irqmask=0x%04x\n", irqs, cached_irq_mask);
#endif
irqs &= irqmask;
irqs &= cached_irq_mask;
if (!irqs)
return 0;
i = ffz(~irqs);
......@@ -699,7 +689,7 @@ __initfunc(void init_IRQ(void))
outb(LATCH >> 8 , 0x40); /* MSB */
for (i = 0; i < NR_IRQS ; i++)
set_intr_gate(0x20+i,bad_interrupt[i]);
set_intr_gate(0x20+i,interrupt[i]);
#ifdef __SMP__
/*
......
......@@ -23,10 +23,7 @@ static inline void irq_enter(int cpu, int irq)
hardirq_enter(cpu);
while (test_bit(0,&global_irq_lock)) {
if ((unsigned char) cpu == global_irq_holder) {
static int printed = 0;
if (!printed)
printk("BAD! Local interrupts enabled, global disabled\n");
printed++;
printk("BAD! Local interrupts enabled, global disabled\n");
break;
}
STUCK;
......@@ -36,7 +33,6 @@ static inline void irq_enter(int cpu, int irq)
static inline void irq_exit(int cpu, int irq)
{
__cli();
hardirq_exit(cpu);
release_irqlock(cpu);
}
......@@ -89,54 +85,6 @@ static inline void irq_exit(int cpu, int irq)
"pop %es\n\t" \
"iret"
/*
* The "inb" instructions are not needed, but seem to change the timings
* a bit - without them it seems that the harddisk driver won't work on
* all hardware. Arghh.
*/
#define ACK_FIRST(mask,nr) \
"inb $0x21,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\torb $" #mask ","SYMBOL_NAME_STR(cache_21)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
"outb %al,$0x21\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tmovb $0x20,%al\n\t" \
"outb %al,$0x20\n\t"
#define ACK_SECOND(mask,nr) \
"inb $0xA1,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\torb $" #mask ","SYMBOL_NAME_STR(cache_A1)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
"outb %al,$0xA1\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tmovb $0x20,%al\n\t" \
"outb %al,$0xA0\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\toutb %al,$0x20\n\t"
#define UNBLK_FIRST(mask) \
"inb $0x21,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_21)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_21)",%al\n\t" \
"outb %al,$0x21\n\t"
#define UNBLK_SECOND(mask) \
"inb $0xA1,%al\n\t" \
"jmp 1f\n" \
"1:\tjmp 1f\n" \
"1:\tandb $~(" #mask "),"SYMBOL_NAME_STR(cache_A1)"\n\t" \
"movb "SYMBOL_NAME_STR(cache_A1)",%al\n\t" \
"outb %al,$0xA1\n\t"
#define IRQ_NAME2(nr) nr##_interrupt(void)
#define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
#define BAD_IRQ_NAME(nr) IRQ_NAME2(bad_IRQ##nr)
......@@ -176,45 +124,21 @@ SYMBOL_NAME_STR(x) ":\n\t" \
#endif /* __SMP__ */
#define BUILD_IRQ(chip,nr,mask) \
asmlinkage void IRQ_NAME(nr); \
asmlinkage void BAD_IRQ_NAME(nr); \
#define BUILD_COMMON_IRQ() \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
"pushl $-"#nr"-2\n\t" \
"\n" __ALIGN_STR"\n" \
"common_interrupt:\n\t" \
SAVE_ALL \
ACK_##chip(mask,(nr&7)) \
"movl %esp,%eax\n\t" \
"pushl %eax\n\t" \
"pushl $" #nr "\n\t" \
"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
"addl $8,%esp\n\t" \
UNBLK_##chip(mask) \
"jmp ret_from_intr\n" \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
SAVE_MOST \
ACK_##chip(mask,(nr&7)) \
RESTORE_MOST);
"pushl $ret_from_intr\n\t" \
"jmp "SYMBOL_NAME_STR(do_IRQ));
#define BUILD_TIMER_IRQ(chip,nr,mask) \
#define BUILD_IRQ(chip,nr,mask) \
asmlinkage void IRQ_NAME(nr); \
asmlinkage void BAD_IRQ_NAME(nr); \
__asm__( \
"\n"__ALIGN_STR"\n" \
SYMBOL_NAME_STR(bad_IRQ) #nr "_interrupt:\n\t" \
SYMBOL_NAME_STR(IRQ) #nr "_interrupt:\n\t" \
"pushl $-"#nr"-2\n\t" \
SAVE_ALL \
ACK_##chip(mask,(nr&7)) \
"movl %esp,%eax\n\t" \
"pushl %eax\n\t" \
"pushl $" #nr "\n\t" \
"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
"addl $8,%esp\n\t" \
UNBLK_##chip(mask) \
"jmp ret_from_intr\n");
"pushl $"#nr"-256\n\t" \
"jmp common_interrupt");
/*
* x86 profiling function, SMP safe. We might want to do this in
......
......@@ -678,8 +678,6 @@ __initfunc(void initialize_secondary(void))
{
struct thread_struct * p = &current->tss;
printk("current = %p, real_esp = %p, real_eip = %p\n", current, p->esp, p->eip);
printk("start_secondary = %p, cpu=%d\n", start_secondary, smp_processor_id());
/*
* We don't actually need to load the full TSS,
* just the stack pointer and the eip.
......
......@@ -19,7 +19,10 @@ if [ "$CONFIG_SERIAL_EXTENDED" = "y" ]; then
fi
bool 'Non-standard serial port support' CONFIG_SERIAL_NONSTANDARD
if [ "$CONFIG_SERIAL_NONSTANDARD" = "y" ]; then
tristate 'Digiboard PC/Xx Support' CONFIG_DIGI
tristate 'Digiboard Intelligent Async Support' CONFIG_DIGIEPCA
if [ "$CONFIG_DIGIEPCA" = "n" ]; then
tristate 'Digiboard PC/Xx Support' CONFIG_DIGI
fi
tristate 'Cyclades async mux support' CONFIG_CYCLADES
bool 'Stallion multiport serial support' CONFIG_STALDRV
if [ "$CONFIG_STALDRV" = "y" ]; then
......
......@@ -61,6 +61,14 @@ else
endif
endif
ifeq ($(CONFIG_DIGIEPCA),y)
L_OBJS += epca.o
else
ifeq ($(CONFIG_DIGIEPCA),m)
M_OBJS += epca.o
endif
endif
ifeq ($(CONFIG_CYCLADES),y)
L_OBJS += cyclades.o
else
......
user.doc
Digi International driver package for the PC/Xe, PC/Xi, PC/Xr, PC/Xem as well
the EISA and PCI variants of these boards where applicable.
Copyright (C) 1996 Digi International. Written by Ronnie Sanford digilnux@dgii.com
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (At your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along
with this program; if not write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
This document describes the software used with the Digi/Linux driver package.
The four user programs listed below are described in this document:
1. digiConfig -> Application that configures the Digi driver.
2. digiDload -> Application which initializes the Digi hardware.
3. buildPCI -> Application which provides the user a method of
building device nodes for PCI devices.
4. ditty -> Application which provides the user a method of
configuring terminal options on Digi hardware.
--------------------------------------------------------------------------
1. Configuring driver/kernel for Digi products
--------------------------------------------------------------------------
The Digi driver must be configured each time Digi hardware is added
or removed. There are two supported methods of doing this. The
first method configures the driver dynamically at boot time but requires
the user to utilize the lilo loader. This method is the preffered method
as it does not require the rebuilding of the kernel. In order to use lilo
to configure Digi boards at boot time an appropriate append command should
be added to /etc/lilo.conf below the appropriate label decleration.
See footer 4. The append commands format is a string of comma seperated
identifiers or integers used to configure supported boards. These six
values in order are:
Enable/Disable this card or Override,
Type of card: PC/Xe (AccelePort) (0), PC/Xeve (1), PC/Xem or PC/Xr (2),
EISA/Xem (3), PC/Xe (64K) (4), PC/Xi (5).
Enable/Disable alternate pin arrangement,
Number of ports on this card,
I/O Port where card is configured (in HEX if using string identifiers),
Base of memory window (in HEX if using string identifiers)
A sample append command is given below which if used would configure and
enable a PC/Xe with 8 ports, at i/o address 200, memory address 0xd0000
with alt pin turned off. The lilo.conf file should look like this:
image = /vmlinuz
root = /dev/hda2
label = vmlinuz
append="digiepca=E,PC/Xe,D,8,200,D0000"
likewise the below will perform the same function:
image = /vmlinuz
root = /dev/hda2
label = vmlinuz
append="digiepca=1,0,0,8,512,851968"
Note:
PCI boards are auto-detected and configured (Hence their codes are
not given here). Do not attempt to configure PCI boards with the lilo
append command.
If configuration data has been specified by using digiConfig (Described
below), and you wish to override this configuration using lilo without
specifying a specific card (Example if there are PCI cards in the system)
the following override command will accomplish this:
-> append="digiepca=2"
If lilo is not enabled, the second method of configuring Digi hardware
will have to be used. digiConfig is an application that can be used
to inform the system of any additions, deletions, or modifications
involving Digi hardware. To use this method the operator executes
digiConfig anytime an EISA or ISA card is added that he wishes to use.
This routine is also used to remove cards from the system, and to modify
parameters of those cards already present in the system. Upon being
executed digiConfig modifies files accessed by the Digi driver. To make
these changes permanent; the operating system must be recompiled. After
the operating system has been recompiled and booted, the changes made with
digiConfig will be introduced to the user. This program MUST be executed
every time Digi EISA/ISA hardware configuration changes. Note, it is not
necessary to execute digiConfig in order to configure the Digi PCI cards.
These cards are self-identifying and will be recognized by the driver.
They cannot be displayed using digiConfig nor will digiConfig build the
device nodes their device nodes. See footer 1.
To execute digiConfig; simply type: digiConfig
The application will query you for the type, memory address, port
address, number of ports, alt pin disposition and status of each board
that exist on the system. Note, currently this driver only supports
PC/Xe, PC/Xeve, PC/Xi, PC/Xr, and PC/Xem as well as their EISA and PCI
implementations if applicable. All supported cards (Other than PCI) that
are present should be registered via digiConfig. See footer 2.
After all cards have been configured select exit. The system will then
inform you if any changes have been made, and ask you if it is okay to
make these changes permanent. If the data entered is correct, select okay.
Selecting cancel will prevent the changes from becoming active. digiConfig
can then be re-executed to configure the system again.
--------------------------------------------------------------------------
2. Initializing Digi hardware with digiDload
--------------------------------------------------------------------------
digiDload is the application executed after the Digi driver has been
loaded. It is responsible for initializing the hardware and leaving
it in a state such that the Digi board may be operated by the user.
The application may be placed anywhere on the path, but its related
support files must be located in /etc/digi. The related files are:
sxfep.bin
sxbios.bin
xxfep.bin
xxbios.bin
The format for this command is "digiDload [v]". If given the "v"
option turns on verbosity. If not given the application runs in quite
mode. To execute the program simply type:
digiDload
Upon completion digiDload will generate the below message:
"digiDload complete: Card initialized"
At this point the card is configured and ready for normal usage. See
technotes.doc for information on how how ports are determined and
assigned.
--------------------------------------------------------------------------
3. Build PCI device nodes with buildPCI
--------------------------------------------------------------------------
buildPCI is an application useful for building the necessary device nodes
for Digi PCI cards. It is reccomended that this tool be used because the
current digiConfig application does not provide this function for PCI cards
(Though it does build device nodes for non-PCI cards). To use this program
execute the following:first install the driver, and execute digiDload (See above). After digiDload
has sucessfully loaded, execute the following:
buildPCI <arg1> <arg2>
Where arg1 is the number of ports connected to Digi cards that are not PCI
(As shown by the digiConfig utility), and arg2 is the number of ports
connected to Digi cards that are PCI.
Note, buildPCI only has to be ran once to build the necessary device
nodes. Though this program may be executed at anytime, we reccomend
delaying execution until the first time you install the package and after
digiDload has been executed.
--------------------------------------------------------------------------
4. Setting Terminal Options with ditty
--------------------------------------------------------------------------
ditty is a utility program that sets and displays the terminal options
for Digi intelligent serial products. See man ditty for detailed information.
Footnotes:
1. The 1.2.x kernel does not provide a method of mapping the high
addresses (Normally higher than RAM) associated with PCI. For this
reason, this driver disables PCI support while running under the 1.2.x
kernels.
2. PCI cards should not and cannot be registered with digiConfig. After
the driver has been loaded buildPCI may be executed to construct the
necessary device nodes. This step is not necessary for system not
having Digi PCI cards.
3. This is because we forsee a time when buildPCI may auto-detect the
available Digi PCI cards and this would only work if the program is
executed after digiDload.
4. A complete example is given in install.doc.
-------------CHANGES--------------------
All changes should be recorded here. All changes should be explained in
verbose detail.
-----------------------------------------------------------------------
Programmer : Ronnie Sanford
Date : June 1, 1996
Description (Verbose) : Initial release of driver package.
Files affected : all
Release version : 1.0.0f (BETA)
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Programmer : Ronnie Sanford
Date : August 7, 1996
Description (Verbose) : Made several modifications to provide PCI and EISA
support:
1. We now allocate the termios structures based on
the maximum number of channels that COULD be
available to the system. We no longer use the
number of channels declared in epcaconfig.h
(NBDEVS) as the total channel number. This is
because this value does not represent channels
available to potential PCI cards. This new
larger value is also passed back to the os in
the num field of tty_driver.
2. Added code to copy the previous board structure
(Now called static_boards) into a new local
copy of the boards structure. This has been
done so that PCI cards may be added to this
board array and later referenced (And even
queried.).
3. Added code to pc_init that checks for supported
PCI cards. If found this code initializes a new
entry into the drivers local board structure
with the PCI cards address, and type, etc.. It
also bumps the card count (num_cards).
4. Modified code in post_fep_init so that when this
routine is executed the number of ports supported
by a particular PCI card will be determined and
loaded into the board structure. It would be
much better if this code was placed in pc_init
(Because we could then report to the os the true
number of ports available; not just the max), but
since the card has to be booted to determine the
number of ports it supports, we are forced to do it
after DIGI_INIT has called post_fep_init. In the
future we may attempt to read the num ports
attached directly (address 0x1ac).
5. Added board types to epca.h in support of various
PCI boards (Some of which do not exist yet).
Added procedures for these boards throughout the
code. Note, windowing is not necessary for PCI
boards.
6. Added code supporting the EISA/XEM. This included
modifying epca.h with the new board type and
adding this type into the driver. The EISA/XEM
is basically identical to the PC/XEM, other than
it's base address does not have to be (And cannot
be configured directly).
7. Modified digiConfig to prompt for EISA/XEM cards.
Files affected : epca.c, epca.h, digi1.h, digiConfig
Release version : 1.0.0g (BETA)
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Programmer : Ronnie Sanford
Date : August 21, 1996
Description (Verbose) : Made the following modifications:
1. A problem affecting hard flow control was found
in the termios2digi_h routine. Specifically,
when the user activated hard flow control using
the CRTSCTS specification, the values used to
program hard flow control on the board were
incorrect. The solution was to change a line
that read "res |= ((ch->m_dtr) | (ch->m_rts));"
to "res |= ((ch->m_cts) | (ch->m_rts));" This
line only applies if cflag & CRTSCTS. Special
thanks to Matt Robinson (matt@mania.com.au) who
found and fixed this problem.
2. In previous betas the cud device was set to CLOCAL
on driver boot up. Likewise the ttyD device was
set to ~CLOCAL. This has been fixed in this driver.
Now ttyD is CLOCAL and cud is ~CLOCAL. The fix
for this can be found in pc_init.
3. In ditty.c many changes were made to eliminate bugs
and warning messages. Two ioctl calls were eliminated
as well a problem involving using the returned baud
index to determine the drivers baud rate. Newer
Linux kernels support higher baud rates by using
0x1000 bit. When the returned value (ored with
0x1000) was used to reference our fbaud table a
serious memory problem occured. This has been fixed.
4. Added a request_region call to post_fep_init. This
should cause the i/o ports being used to be
registered with proc.
5. Modified digiConfig to set all cud and ttyD devices
to read/write all permission.
6. Developed a new apps called buildPCI that provides
an easy way to build device nodes for PCI cards.
7. Modified user.doc and technotes.doc document the
use of buildPCI.
Files affected : epca.c, ditty.c, digiConfig, user.doc, technotes.doc
Release version : 1.0.0 (Official release)
-----------------------------------------------------------------------
Programmer : Ronnie Sanford
Date : August 21, 1996
Description (Verbose) : Made the following modifications:
1. Removed code from pc_close which closes the
drivers line discipline and restores its original
line discipline. This is currently unecessary,
though future fast cook enhancements may require
this.
2. Removed code in block_til_ready that set the
asyncflags to either ASYNC_CALLOUT_ACTIVE, or
ASYNC_NORMAL_ACTIVE. This code was redundant
as it already existed in block_til_ready.
3. Added code in block_til_ready to cause a return
prior to schedule being called if the device
was a CALLOUT device. CALLOUT devices never
block on CD. (This was a serious bug that
prevented the CALLOUT devices (ttyD) from
functioning properly in some instances.
Make a change in the MODEMCHG_IND case of doevent
such that it does not require ASYNC_CALLOUT_ACTIVE
or ASYNC_NORMAL_ACTIVE to be set in order to
unblock an open (Using wait_interruptible).
Thanks to Mike McLagan (mike.mclagan@linux.org)
for diagnosing and fixing this problem.
4. Made changes to the disposition of CLOCAL on
both SERIAL NORMAL and CALLOUT devices. Both
device types now have CLOCAL active at default.
This may be changed with a stty command.
5. Made changes to digiConfig such that it checks
major.h (If valid) for the correct major
numbers to use.
Files affected : epca.c, digiConfig
Release version : 1.0.1a
-----------------------------------------------------------------------
Programmer : Ronnie Sanford
Date : September 17, 1996
Description (Verbose) : Made the following modifications:
1. Modified pc_open such that it no longer checks
the cflag value returned by termios2digi_c for
CLOCAL. Digi hardware does not use this value
and thus termios2digi_c rightly screens this
value out. This driver checks for CLOCAL using
the drivers cflag value as known by the Linux OS.
(The value passed into termios2digi_c)
2. Modified termios2digi_c to screen out the
CBAUDEX in CBAUD. This error caused parity to
automaticaly be enabled on at higher baud rates.
3. Added the "disable_bh()" call to the shutdown
subroutine. Hopefully this will allow the driver
to correctly clean up after itself when used as a
module.
4. Added support for the PC/XI and 64K PC/XE cards.
This involved primarily modifying digiDload to
initialize and boot the new cards; however
driver modifications were also required to
provide the proper windowing for the newly
supported cards. (Code was also added to
determine the memory segment of the XI card as
that card may have more than 64K. Currently
digiDload assumes a 64K XI card.)
5. Added subroutine called epca_setup that can be
called during LILO boot up. This provides the
user an easy way to change cards; without
running digiConfig and without recompiling the
kernel. Added code in pc_init and pc_open to
support the epca_setup routine. pc_init checks
the liloconfig flag (Which is set by epca_setup)
to determine if the driver is using the LILO
arguments. If not pc_init loads the board data
found in epcaconfig.h; if so it DOESN'T load
epcaconfig data depending on epca_setup to handle
board configuration. pc_open has been modified
such that it checks to insure that no errors
occured during the LILO boot process. If a
user attempts to boot the driver (via. LILO)
with incorrect data, the open will fail.
6. Modified the windowing routines pcxe_rxwinon
and pcxe_txwinon routines. A bug existed such
that those routines checked to see if the rxwin
and txwin flags were reset. If so they assumed
the board was an XI or 64K XE. Furthermore since
these flags were never initialized in our driver
sometimes they were 0 and therefore caused a
memory fault (Or at least a window overrun). This
code has been removed since the pcxe shares
nothing in common with the 64K XI and XE.
7. Added code in pc_init to set the memory_seg for
the various boards. This code was necessary to
correct a bug in the PCXE, PCXEVE code where
receive and transmit pointers were being calculated
from an uninitialized variable (memory_seg).
8. Modified digiConfig to allow 64K PC/XI and 64K
PC/XE cards to be configured.
9. Made changes to support the new 2.1.x development
kernel. In particular this required changing all
references to vremap to ioremap.
10. Modified digiConfig such that it now generates
node names corresponding to their internal
as opposed to the label on the port itself. Nodes
(ttyD?? and cud??) now start at 0. Example:
ttyD0 and cud0 represent port 1 on any supported
Digi product. A similar change has been made
in buildPCI.c.
12. At the early portion of post_fep_init if a PCI
card is detected a warning message could be given
incorrectly if 64 ports were attached to a PCI
card. The below line :
epcaassert(bd->numports > 64,"PCI returned a invalid number of ports");
was changed to :
epcaassert(bd->numports <= 64,"PCI returned a invalid number of ports");
Remember that epcaassert checks for NOT true.
Special thanks to Daniel Taylor for fixing this.
13. Modified the epcaparam routine. In version 100
and 101a there was a line that looked like the
below:
if (ch->omodem != mval)
The problem with this line was that the first time
through omodem was not initialized. Secondly, since
many TIOC commands did not alter mval (They use
a different variable) changes made by these commands
could be lost. This line was changed to:
mval ^= ch->modemfake & (mval ^ ch->modem);
if (ch->omodem ^ mval)
14. Modified digiConfig in such a way that it checks
the version number of the kernel and if it finds
a 2.x.x kernel or higher it reads the necessary
major numbers for cud and ttyD devices from major.h.
This was also done in prior versions but these
versions required a #define which identified the
kernel as a version which did not have major numbers
assigned to Digi systems. This #define is no
longer required allowing the same source tree for
multiple kernel releases.
15. Used macros to replace kernel specific calls such
as put_fs_long, get_fs_long, put_user, and get_user
the kernel version is now detected and the macro
is defined as to correspond with the kernel it
is being compiled into. Again this was done to
allow one source tree for multiple kernel releases.
16. Added support for the new 2.1.x development kernels
to digiInstall.
Files affected : epca.c, digiConfig
Release version : 1.1.0
-----------------------------------------------------------------------
Programmer : Daniel Taylor
Date : April 25, 1997
Description (Verbose) : Updated driver:
1. Fixed DCD bug. (&tq_scheduler)
2. Removed BH handler code, as it was only handling
hangups, and not being called for that.
3. Namespace cleanup (DIGI_TIMER2 => DIGI_TIMER)
4. Updated to 2.1.36, removed #ifdefs for earlier
kernel revisions.
Files affected : epca.c
Release version : 1.1.1 (BETA)
-----------------------------------------------------------------------
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1763,6 +1763,9 @@ __initfunc(int tty_init(void))
#ifdef CONFIG_DIGI
pcxe_init();
#endif
#ifdef CONFIG_DIGIEPCA
pc_init();
#endif
#ifdef CONFIG_RISCOM8
riscom8_init();
#endif
......
......@@ -12,7 +12,7 @@
extern __inline__ void prim_spin_lock(struct spinlock *sp)
{
int processor=hard_smp_processor_id();
int processor=smp_processor_id();
/*
* Grab the lock bit
......
/* Definitions for DigiBoard ditty(1) command. */
#if !defined(TIOCMODG)
#define TIOCMODG ('d'<<8) | 250 /* get modem ctrl state */
#define TIOCMODS ('d'<<8) | 251 /* set modem ctrl state */
#endif
#if !defined(TIOCMSET)
#define TIOCMSET ('d'<<8) | 252 /* set modem ctrl state */
#define TIOCMGET ('d'<<8) | 253 /* set modem ctrl state */
#endif
#if !defined(TIOCMBIC)
#define TIOCMBIC ('d'<<8) | 254 /* set modem ctrl state */
#define TIOCMBIS ('d'<<8) | 255 /* set modem ctrl state */
#endif
#if !defined(TIOCSDTR)
#define TIOCSDTR ('e'<<8) | 0 /* set DTR */
#define TIOCCDTR ('e'<<8) | 1 /* clear DTR */
#endif
/************************************************************************
* Ioctl command arguments for DIGI parameters.
************************************************************************/
#define DIGI_GETA ('e'<<8) | 94 /* Read params */
#define DIGI_SETA ('e'<<8) | 95 /* Set params */
#define DIGI_SETAW ('e'<<8) | 96 /* Drain & set params */
#define DIGI_SETAF ('e'<<8) | 97 /* Drain, flush & set params */
#define DIGI_GETFLOW ('e'<<8) | 99 /* Get startc/stopc flow */
/* control characters */
#define DIGI_SETFLOW ('e'<<8) | 100 /* Set startc/stopc flow */
/* control characters */
#define DIGI_GETAFLOW ('e'<<8) | 101 /* Get Aux. startc/stopc */
/* flow control chars */
#define DIGI_SETAFLOW ('e'<<8) | 102 /* Set Aux. startc/stopc */
/* flow control chars */
#define DIGI_GETINFO ('e'<<8) | 103 /* Fill in digi_info */
#define DIGI_POLLER ('e'<<8) | 104 /* Turn on/off poller */
#define DIGI_INIT ('e'<<8) | 105 /* Allow things to run. */
struct digiflow_struct
{
unsigned char startc; /* flow cntl start char */
unsigned char stopc; /* flow cntl stop char */
};
typedef struct digiflow_struct digiflow_t;
/************************************************************************
* Values for digi_flags
************************************************************************/
#define DIGI_IXON 0x0001 /* Handle IXON in the FEP */
#define DIGI_FAST 0x0002 /* Fast baud rates */
#define RTSPACE 0x0004 /* RTS input flow control */
#define CTSPACE 0x0008 /* CTS output flow control */
#define DSRPACE 0x0010 /* DSR output flow control */
#define DCDPACE 0x0020 /* DCD output flow control */
#define DTRPACE 0x0040 /* DTR input flow control */
#define DIGI_FORCEDCD 0x0100 /* Force carrier */
#define DIGI_ALTPIN 0x0200 /* Alternate RJ-45 pin config */
#define DIGI_AIXON 0x0400 /* Aux flow control in fep */
/************************************************************************
* Values for digiDload
************************************************************************/
#define NORMAL 0
#define PCI_CTL 1
#define SIZE8 0
#define SIZE16 1
#define SIZE32 2
/************************************************************************
* Structure used with ioctl commands for DIGI parameters.
************************************************************************/
struct digi_struct
{
unsigned short digi_flags; /* Flags (see above) */
};
typedef struct digi_struct digi_t;
struct digi_info
{
unsigned long board; /* Which board is this ? */
unsigned char status; /* Alive or dead */
unsigned char type; /* see epca.h */
unsigned char subtype; /* For future XEM, XR, etc ... */
unsigned short numports; /* Number of ports configured */
unsigned char *port; /* I/O Address */
unsigned char *membase; /* DPR Address */
unsigned char *version; /* For future ... */
unsigned short windowData; /* For future ... */
} ;
#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 FEP_HUPCL 0002000
#if 0
#define RTS 0x02
#define CD 0x08
#define DSR 0x10
#define CTS 0x20
#define RI 0x40
#define DTR 0x80
#endif
/*************************************************************************
* Defines and structure definitions for PCI BIOS Interface
*************************************************************************/
#define PCIMAX 32 /* maximum number of PCI boards */
#define PCI_VENDOR_DIGI 0x114F
#define PCI_DEVICE_EPC 0x0002
#define PCI_DEVICE_RIGHTSWITCH 0x0003 /* For testing */
#define PCI_DEVICE_XEM 0x0004
#define PCI_DEVICE_XR 0x0005
#define PCI_DEVICE_CX 0x0006
#define PCI_DEVICE_XRJ 0x0009 /* Jupiter boards with */
#define PCI_DEVICE_EPCJ 0x000a /* PLX 9060 chip for PCI */
/*
* On the PCI boards, there is no IO space allocated
* The I/O registers will be in the first 3 bytes of the
* upper 2MB of the 4MB memory space. The board memory
* will be mapped into the low 2MB of the 4MB memory space
*/
/* Potential location of PCI Bios from E0000 to FFFFF*/
#define PCI_BIOS_SIZE 0x00020000
/* Size of Memory and I/O for PCI (4MB) */
#define PCI_RAM_SIZE 0x00400000
/* Size of Memory (2MB) */
#define PCI_MEM_SIZE 0x00200000
/* Offset of I/0 in Memory (2MB) */
#define PCI_IO_OFFSET 0x00200000
#define MEMOUTB(basemem, pnum, setmemval) *(caddr_t)((basemem) + ( PCI_IO_OFFSET | pnum << 4 | pnum )) = (setmemval)
#define MEMINB(basemem, pnum) *(caddr_t)((basemem) + (PCI_IO_OFFSET | pnum << 4 | pnum )) /* for PCI I/O */
#define XEMPORTS 0xC02
#define XEPORTS 0xC22
#define MAX_ALLOC 0x100
#define MAXBOARDS 12
#define FEPCODESEG 0x0200L
#define FEPCODE 0x2000L
#define BIOSCODE 0xf800L
#define MISCGLOBAL 0x0C00L
#define NPORT 0x0C22L
#define MBOX 0x0C40L
#define PORTBASE 0x0C90L
/* Begin code defines used for epca_setup */
#define INVALID_BOARD_TYPE 0x1
#define INVALID_NUM_PORTS 0x2
#define INVALID_MEM_BASE 0x4
#define INVALID_PORT_BASE 0x8
#define INVALID_BOARD_STATUS 0x10
#define INVALID_ALTPIN 0x20
/* End code defines used for epca_setup */
#define FEPCLR 0x00
#define FEPMEM 0x02
#define FEPRST 0x04
#define FEPINT 0x08
#define FEPMASK 0x0e
#define FEPWIN 0x80
#define PCXE 0
#define PCXEVE 1
#define PCXEM 2
#define EISAXEM 3
#define PC64XE 4
#define PCXI 5
#define PCIXEM 7
#define PCICX 8
#define PCIXR 9
#define PCIXRJ 10
#define EPCA_NUM_TYPES 6
static char *board_desc[] =
{
"PC/Xe",
"PC/Xeve",
"PC/Xem",
"EISA/Xem",
"PC/64Xe",
"PC/Xi",
"unknown",
"PCI/Xem",
"PCI/CX",
"PCI/Xr",
"PCI/Xrj",
};
#define STARTC 021
#define STOPC 023
#define IAIXON 0x2000
#define TXSTOPPED 0x1
#define LOWWAIT 0x2
#define EMPTYWAIT 0x4
#define RXSTOPPED 0x8
#define TXBUSY 0x10
#define DISABLED 0
#define ENABLED 1
#define OFF 0
#define ON 1
#define FEPTIMEOUT 200000
#define SERIAL_TYPE_NORMAL 1
#define SERIAL_TYPE_CALLOUT 2
#define SERIAL_TYPE_INFO 3
#define EPCA_EVENT_HANGUP 1
#define EPCA_MAGIC 0x5c6df104L
struct channel
{
long magic;
unchar boardnum;
unchar channelnum;
unchar omodem; /* FEP output modem status */
unchar imodem; /* FEP input modem status */
unchar modemfake; /* Modem values to be forced */
unchar modem; /* Force values */
unchar hflow;
unchar dsr;
unchar dcd;
unchar m_rts ; /* The bits used in whatever FEP */
unchar m_dcd ; /* is indiginous to this board to */
unchar m_dsr ; /* represent each of the physical */
unchar m_cts ; /* handshake lines */
unchar m_ri ;
unchar m_dtr ;
unchar stopc;
unchar startc;
unchar stopca;
unchar startca;
unchar fepstopc;
unchar fepstartc;
unchar fepstopca;
unchar fepstartca;
unchar txwin;
unchar rxwin;
ushort fepiflag;
ushort fepcflag;
ushort fepoflag;
ushort txbufhead;
ushort txbufsize;
ushort rxbufhead;
ushort rxbufsize;
int close_delay;
int count;
int blocked_open;
int event;
int asyncflags;
uint dev;
long session;
long pgrp;
ulong statusflags;
ulong c_iflag;
ulong c_cflag;
ulong c_lflag;
ulong c_oflag;
unchar *txptr;
unchar *rxptr;
unchar *tmp_buf;
struct board_info *board;
volatile struct board_chan *brdchan;
struct digi_struct digiext;
struct tty_struct *tty;
struct termios normal_termios;
struct termios callout_termios;
struct wait_queue *open_wait;
struct wait_queue *close_wait;
struct tq_struct tqueue;
volatile struct global_data *mailbox;
};
struct board_info
{
unchar status;
unchar type;
unchar altpin;
ushort numports;
unchar *port;
unchar *membase;
unchar *re_map_port;
unchar *re_map_membase;
ulong memory_seg;
void ( * memwinon ) (struct board_info *, unsigned int) ;
void ( * memwinoff ) (struct board_info *, unsigned int) ;
void ( * globalwinon ) (struct channel *) ;
void ( * txwinon ) (struct channel *) ;
void ( * rxwinon ) (struct channel *) ;
void ( * memoff ) (struct channel *) ;
void ( * assertgwinon ) (struct channel *) ;
void ( * assertmemoff ) (struct channel *) ;
unchar poller_inhibited ;
};
#define NUMCARDS 1
#define NBDEVS 2
struct board_info static_boards[NUMCARDS]={
{ ENABLED, 0, OFF, 2, (unchar*) 0x320, (unchar*) 0xd0000 },
};
/* DO NOT HAND EDIT THIS FILE! */
......@@ -288,6 +288,7 @@ extern int lp_init(void);
extern int pty_init(void);
extern int tty_init(void);
extern int pcxe_init(void);
extern int pc_init(void);
extern int vcs_init(void);
extern int cy_init(void);
extern int stl_init(void);
......@@ -330,11 +331,15 @@ extern int n_tty_ioctl(struct tty_struct * tty, struct file * file,
/* serial.c */
extern long serial_console_init(long kmem_start, long kmem_end);
/* pcxx.c */
extern int pcxe_open(struct tty_struct *tty, struct file *filp);
/* epca.c */
extern int pc_open(struct tty_struct *tty, struct file *filp);
/* console.c */
extern void update_screen(int new_console);
......
......@@ -175,6 +175,9 @@ extern void teles_setup(char *str, int *ints);
#ifdef CONFIG_ISDN_DRV_HISAX
extern void HiSax_setup(char *str, int *ints);
#endif
#ifdef CONFIG_DIGIEPCA
extern void epca_setup(char *str, int *ints);
#endif
#ifdef CONFIG_ISDN_DRV_PCBIT
extern void pcbit_setup(char *str, int *ints);
#endif
......@@ -481,6 +484,9 @@ struct {
#ifdef CONFIG_DIGI
{ "digi=", pcxx_setup },
#endif
#ifdef CONFIG_DIGIEPCA
{ "digiepca=", epca_setup },
#endif
#ifdef CONFIG_RISCOM8
{ "riscom8=", riscom8_setup },
#endif
......
......@@ -520,7 +520,7 @@ static void exit_notify(void)
NORET_TYPE void do_exit(long code)
{
if (in_interrupt()) {
local_irq_count[hard_smp_processor_id()] = 0; /* Not really correct */
local_irq_count[smp_processor_id()] = 0; /* Not really correct */
printk("Aiee, killing interrupt handler\n");
}
fake_volatile:
......
......@@ -28,7 +28,7 @@
#include <asm/uaccess.h>
#define LOG_BUF_LEN (8192*4)
#define LOG_BUF_LEN 8192
static char buf[1024];
......
......@@ -62,7 +62,7 @@ static inline void run_bottom_halves(void)
asmlinkage void do_bottom_half(void)
{
int cpu = hard_smp_processor_id();
int cpu = smp_processor_id();
if (hardirq_trylock(cpu)) {
if (softirq_trylock()) {
......
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