#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/capability.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/in.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/moduleparam.h>
#include <linux/netdevice.h>
#include <linux/hdlc.h>
#include <asm/io.h>
#include "hd64570.h"
#include "hd64570.c"
Go to the source code of this file.
|
#define | pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|
#define | DEBUG_RINGS |
|
#define | USE_WINDOWSIZE 16384 |
|
#define | USE_BUS16BITS 1 |
|
#define | CLOCK_BASE 9830400 /* 9.8304 MHz */ |
|
#define | MAX_PAGES 16 /* 16 RAM pages at max */ |
|
#define | MAX_RAM_SIZE 0x80000 /* 512 KB */ |
|
#define | MAX_RAM_SIZE (MAX_PAGES * USE_WINDOWSIZE) |
|
#define | N2_IOPORTS 0x10 |
|
#define | NEED_DETECT_RAM |
|
#define | NEED_SCA_MSCI_INTR |
|
#define | MAX_TX_BUFFERS 10 |
|
#define | N2_PCR 0 |
|
#define | PCR_RUNSCA 1 /* Run 64570 */ |
|
#define | PCR_VPM 2 /* Enable VPM - needed if using RAM above 1 MB */ |
|
#define | PCR_ENWIN 4 /* Open window */ |
|
#define | PCR_BUS16 8 /* 16-bit bus */ |
|
#define | N2_BAR 2 |
|
#define | N2_PSR 4 |
|
#define | WIN16K 0x00 |
|
#define | WIN32K 0x20 |
|
#define | WIN64K 0x40 |
|
#define | PSR_WINBITS 0x60 |
|
#define | PSR_DMAEN 0x80 |
|
#define | PSR_PAGEBITS 0x0F |
|
#define | N2_MCR 6 |
|
#define | CLOCK_OUT_PORT1 0x80 |
|
#define | CLOCK_OUT_PORT0 0x40 |
|
#define | TX422_PORT1 0x20 |
|
#define | TX422_PORT0 0x10 |
|
#define | DSR_PORT1 0x08 |
|
#define | DSR_PORT0 0x04 |
|
#define | DTR_PORT1 0x02 |
|
#define | DTR_PORT0 0x01 |
|
#define | sca_reg(reg, card) |
|
#define | sca_in(reg, card) inb(sca_reg(reg, card)) |
|
#define | sca_out(value, reg, card) outb(value, sca_reg(reg, card)) |
|
#define | sca_inw(reg, card) inw(sca_reg(reg, card)) |
|
#define | sca_outw(value, reg, card) outw(value, sca_reg(reg, card)) |
|
#define | port_to_card(port) ((port)->card) |
|
#define | log_node(port) ((port)->log_node) |
|
#define | phy_node(port) ((port)->phy_node) |
|
#define | winsize(card) (USE_WINDOWSIZE) |
|
#define | winbase(card) ((card)->winbase) |
|
#define | get_port(card, port) |
|
#define CLOCK_BASE 9830400 /* 9.8304 MHz */ |
Definition at line 47 of file n2.c.
#define CLOCK_OUT_PORT0 0x40 |
Definition at line 88 of file n2.c.
#define CLOCK_OUT_PORT1 0x80 |
Definition at line 87 of file n2.c.
Definition at line 43 of file n2.c.
Definition at line 92 of file n2.c.
Definition at line 91 of file n2.c.
Definition at line 94 of file n2.c.
Definition at line 93 of file n2.c.
Value:
Definition at line 147 of file n2.c.
#define log_node |
( |
|
port | ) |
((port)->log_node) |
Definition at line 143 of file n2.c.
Definition at line 48 of file n2.c.
#define MAX_RAM_SIZE 0x80000 /* 512 KB */ |
Definition at line 52 of file n2.c.
Definition at line 52 of file n2.c.
#define MAX_TX_BUFFERS 10 |
Definition at line 57 of file n2.c.
Definition at line 72 of file n2.c.
Definition at line 54 of file n2.c.
Definition at line 86 of file n2.c.
Definition at line 64 of file n2.c.
Definition at line 76 of file n2.c.
Definition at line 55 of file n2.c.
#define NEED_SCA_MSCI_INTR |
Definition at line 56 of file n2.c.
#define PCR_BUS16 8 /* 16-bit bus */ |
Definition at line 68 of file n2.c.
#define PCR_ENWIN 4 /* Open window */ |
Definition at line 67 of file n2.c.
#define PCR_RUNSCA 1 /* Run 64570 */ |
Definition at line 65 of file n2.c.
#define PCR_VPM 2 /* Enable VPM - needed if using RAM above 1 MB */ |
Definition at line 66 of file n2.c.
#define phy_node |
( |
|
port | ) |
((port)->phy_node) |
Definition at line 144 of file n2.c.
Definition at line 142 of file n2.c.
#define pr_fmt |
( |
|
fmt | ) |
KBUILD_MODNAME ": " fmt |
Definition at line 19 of file n2.c.
Definition at line 81 of file n2.c.
#define PSR_PAGEBITS 0x0F |
Definition at line 82 of file n2.c.
Definition at line 80 of file n2.c.
Definition at line 137 of file n2.c.
Definition at line 139 of file n2.c.
Definition at line 138 of file n2.c.
Definition at line 140 of file n2.c.
Value:
((
reg) & 0x0F) | (((
reg) & 0xF0) << 6))
Definition at line 135 of file n2.c.
Definition at line 90 of file n2.c.
Definition at line 89 of file n2.c.
Definition at line 46 of file n2.c.
#define USE_WINDOWSIZE 16384 |
Definition at line 45 of file n2.c.
Definition at line 77 of file n2.c.
Definition at line 78 of file n2.c.
Definition at line 79 of file n2.c.
#define winbase |
( |
|
card | ) |
((card)->winbase) |
Definition at line 146 of file n2.c.
Definition at line 145 of file n2.c.
MODULE_AUTHOR |
( |
"Krzysztof Halasa <khc@pm.waw.pl>" |
| ) |
|
module_exit |
( |
n2_cleanup |
| ) |
|
MODULE_LICENSE |
( |
"GPL v2" |
| ) |
|
module_param |
( |
hw |
, |
|
|
charp |
, |
|
|
0444 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
hw |
, |
|
|
" |
io, |
|
|
irq |
, |
|
|
ram |
, |
|
|
ports:io |
, |
|
|
irq |
, |
|
|
..." |
|
|
) |
| |