30 #include <linux/module.h>
31 #include <linux/netdevice.h>
39 #define TSCAN1_MAXDEV 4
44 #define TSCAN1_VERSION 2
48 #define TSCAN1_JUMPERS 6
51 #define TSCAN1_ID1_VALUE 0xf6
52 #define TSCAN1_ID2_VALUE 0xb9
55 #define TSCAN1_MODE_ENABLE 0x40
58 #define TSCAN1_JP4 0x10
59 #define TSCAN1_JP5 0x20
62 #define TSCAN1_PLD_ADDRESS 0x150
65 #define TSCAN1_PLD_SIZE 8
68 #define TSCAN1_SJA1000_SIZE 32
71 #define TSCAN1_SJA1000_XTAL 16000000
74 static const unsigned short tscan1_sja1000_addresses[]
__devinitconst = {
75 0x100, 0x120, 0x180, 0x1a0, 0x200, 0x240, 0x280, 0x320
95 unsigned long pld_base, sja1000_base;
119 dev_err(dev,
"invalid JP4:JP5 setting (no IRQ)\n");
136 priv = netdev_priv(netdev);
144 for (i = 0; i <
ARRAY_SIZE(tscan1_sja1000_addresses); i++) {
145 sja1000_base = tscan1_sja1000_addresses[
i];
157 netdev_info(netdev,
"TS-CAN1 at 0x%lx 0x%lx irq %d\n",
158 pld_base, sja1000_base, irq);
167 dev_err(dev,
"failed to assign SJA1000 IO address\n");
178 unsigned long pld_base, sja1000_base;
184 priv = netdev_priv(netdev);
198 static struct isa_driver tscan1_isa_driver = {
199 .probe = tscan1_probe,
206 static int __init tscan1_init(
void)
212 static void __exit tscan1_exit(
void)