Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * proteon.c: A network driver for Proteon ISA token ring cards. |
| 3 | * |
| 4 | * Based on tmspci written 1999 by Adam Fritzler |
| 5 | * |
| 6 | * Written 2003 by Jochen Friedrich |
| 7 | * |
| 8 | * This software may be used and distributed according to the terms |
| 9 | * of the GNU General Public License, incorporated herein by reference. |
| 10 | * |
| 11 | * This driver module supports the following cards: |
| 12 | * - Proteon 1392, 1392+ |
| 13 | * |
| 14 | * Maintainer(s): |
Joe Perches | 726a645 | 2008-02-03 16:36:24 +0200 | [diff] [blame] | 15 | * AF Adam Fritzler |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | * JF Jochen Friedrich jochen@scram.de |
| 17 | * |
| 18 | * Modification History: |
| 19 | * 02-Jan-03 JF Created |
| 20 | * |
| 21 | */ |
| 22 | static const char version[] = "proteon.c: v1.00 02/01/2003 by Jochen Friedrich\n"; |
| 23 | |
| 24 | #include <linux/module.h> |
| 25 | #include <linux/kernel.h> |
| 26 | #include <linux/delay.h> |
| 27 | #include <linux/errno.h> |
| 28 | #include <linux/pci.h> |
| 29 | #include <linux/init.h> |
| 30 | #include <linux/netdevice.h> |
| 31 | #include <linux/trdevice.h> |
Russell King | d052d1b | 2005-10-29 19:07:23 +0100 | [diff] [blame] | 32 | #include <linux/platform_device.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | |
| 34 | #include <asm/system.h> |
| 35 | #include <asm/io.h> |
| 36 | #include <asm/irq.h> |
| 37 | #include <asm/pci.h> |
| 38 | #include <asm/dma.h> |
| 39 | |
| 40 | #include "tms380tr.h" |
| 41 | |
| 42 | #define PROTEON_IO_EXTENT 32 |
| 43 | |
| 44 | /* A zero-terminated list of I/O addresses to be probed. */ |
| 45 | static unsigned int portlist[] __initdata = { |
| 46 | 0x0A20, 0x0E20, 0x1A20, 0x1E20, 0x2A20, 0x2E20, 0x3A20, 0x3E20,// Prot. |
| 47 | 0x4A20, 0x4E20, 0x5A20, 0x5E20, 0x6A20, 0x6E20, 0x7A20, 0x7E20,// Prot. |
| 48 | 0x8A20, 0x8E20, 0x9A20, 0x9E20, 0xAA20, 0xAE20, 0xBA20, 0xBE20,// Prot. |
| 49 | 0xCA20, 0xCE20, 0xDA20, 0xDE20, 0xEA20, 0xEE20, 0xFA20, 0xFE20,// Prot. |
| 50 | 0 |
| 51 | }; |
| 52 | |
| 53 | /* A zero-terminated list of IRQs to be probed. */ |
| 54 | static unsigned short irqlist[] = { |
| 55 | 7, 6, 5, 4, 3, 12, 11, 10, 9, |
| 56 | 0 |
| 57 | }; |
| 58 | |
| 59 | /* A zero-terminated list of DMAs to be probed. */ |
| 60 | static int dmalist[] __initdata = { |
| 61 | 5, 6, 7, |
| 62 | 0 |
| 63 | }; |
| 64 | |
| 65 | static char cardname[] = "Proteon 1392\0"; |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 66 | static u64 dma_mask = ISA_MAX_ADDRESS; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | static int proteon_open(struct net_device *dev); |
| 68 | static void proteon_read_eeprom(struct net_device *dev); |
| 69 | static unsigned short proteon_setnselout_pins(struct net_device *dev); |
| 70 | |
| 71 | static unsigned short proteon_sifreadb(struct net_device *dev, unsigned short reg) |
| 72 | { |
| 73 | return inb(dev->base_addr + reg); |
| 74 | } |
| 75 | |
| 76 | static unsigned short proteon_sifreadw(struct net_device *dev, unsigned short reg) |
| 77 | { |
| 78 | return inw(dev->base_addr + reg); |
| 79 | } |
| 80 | |
| 81 | static void proteon_sifwriteb(struct net_device *dev, unsigned short val, unsigned short reg) |
| 82 | { |
| 83 | outb(val, dev->base_addr + reg); |
| 84 | } |
| 85 | |
| 86 | static void proteon_sifwritew(struct net_device *dev, unsigned short val, unsigned short reg) |
| 87 | { |
| 88 | outw(val, dev->base_addr + reg); |
| 89 | } |
| 90 | |
| 91 | static int __init proteon_probe1(struct net_device *dev, int ioaddr) |
| 92 | { |
| 93 | unsigned char chk1, chk2; |
| 94 | int i; |
| 95 | |
| 96 | if (!request_region(ioaddr, PROTEON_IO_EXTENT, cardname)) |
| 97 | return -ENODEV; |
| 98 | |
| 99 | |
| 100 | chk1 = inb(ioaddr + 0x1f); /* Get Proteon ID reg 1 */ |
| 101 | if (chk1 != 0x1f) |
| 102 | goto nodev; |
| 103 | |
| 104 | chk1 = inb(ioaddr + 0x1e) & 0x07; /* Get Proteon ID reg 0 */ |
| 105 | for (i=0; i<16; i++) { |
| 106 | chk2 = inb(ioaddr + 0x1e) & 0x07; |
| 107 | if (((chk1 + 1) & 0x07) != chk2) |
| 108 | goto nodev; |
| 109 | chk1 = chk2; |
| 110 | } |
| 111 | |
| 112 | dev->base_addr = ioaddr; |
| 113 | return (0); |
| 114 | nodev: |
| 115 | release_region(ioaddr, PROTEON_IO_EXTENT); |
| 116 | return -ENODEV; |
| 117 | } |
| 118 | |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 119 | static int __init setup_card(struct net_device *dev, struct device *pdev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | { |
| 121 | struct net_local *tp; |
| 122 | static int versionprinted; |
| 123 | const unsigned *port; |
| 124 | int j,err = 0; |
| 125 | |
| 126 | if (!dev) |
| 127 | return -ENOMEM; |
| 128 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 129 | if (dev->base_addr) /* probe specific location */ |
| 130 | err = proteon_probe1(dev, dev->base_addr); |
| 131 | else { |
| 132 | for (port = portlist; *port; port++) { |
| 133 | err = proteon_probe1(dev, *port); |
| 134 | if (!err) |
| 135 | break; |
| 136 | } |
| 137 | } |
| 138 | if (err) |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 139 | goto out5; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 140 | |
| 141 | /* At this point we have found a valid card. */ |
| 142 | |
| 143 | if (versionprinted++ == 0) |
| 144 | printk(KERN_DEBUG "%s", version); |
| 145 | |
| 146 | err = -EIO; |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 147 | pdev->dma_mask = &dma_mask; |
Jochen Friedrich | 84c3ea0 | 2005-08-19 21:05:56 -0400 | [diff] [blame] | 148 | if (tmsdev_init(dev, pdev)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 149 | goto out4; |
| 150 | |
| 151 | dev->base_addr &= ~3; |
| 152 | |
| 153 | proteon_read_eeprom(dev); |
| 154 | |
Johannes Berg | e174961 | 2008-10-27 15:59:26 -0700 | [diff] [blame] | 155 | printk(KERN_DEBUG "proteon.c: Ring Station Address: %pM\n", |
| 156 | dev->dev_addr); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | |
| 158 | tp = netdev_priv(dev); |
| 159 | tp->setnselout = proteon_setnselout_pins; |
| 160 | |
| 161 | tp->sifreadb = proteon_sifreadb; |
| 162 | tp->sifreadw = proteon_sifreadw; |
| 163 | tp->sifwriteb = proteon_sifwriteb; |
| 164 | tp->sifwritew = proteon_sifwritew; |
| 165 | |
| 166 | memcpy(tp->ProductID, cardname, PROD_ID_SIZE + 1); |
| 167 | |
| 168 | tp->tmspriv = NULL; |
| 169 | |
| 170 | dev->open = proteon_open; |
| 171 | dev->stop = tms380tr_close; |
| 172 | |
| 173 | if (dev->irq == 0) |
| 174 | { |
| 175 | for(j = 0; irqlist[j] != 0; j++) |
| 176 | { |
| 177 | dev->irq = irqlist[j]; |
| 178 | if (!request_irq(dev->irq, tms380tr_interrupt, 0, |
| 179 | cardname, dev)) |
| 180 | break; |
| 181 | } |
| 182 | |
| 183 | if(irqlist[j] == 0) |
| 184 | { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 185 | printk(KERN_INFO "proteon.c: AutoSelect no IRQ available\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 186 | goto out3; |
| 187 | } |
| 188 | } |
| 189 | else |
| 190 | { |
| 191 | for(j = 0; irqlist[j] != 0; j++) |
| 192 | if (irqlist[j] == dev->irq) |
| 193 | break; |
| 194 | if (irqlist[j] == 0) |
| 195 | { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 196 | printk(KERN_INFO "proteon.c: Illegal IRQ %d specified\n", |
| 197 | dev->irq); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 198 | goto out3; |
| 199 | } |
| 200 | if (request_irq(dev->irq, tms380tr_interrupt, 0, |
| 201 | cardname, dev)) |
| 202 | { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 203 | printk(KERN_INFO "proteon.c: Selected IRQ %d not available\n", |
| 204 | dev->irq); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | goto out3; |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | if (dev->dma == 0) |
| 210 | { |
| 211 | for(j = 0; dmalist[j] != 0; j++) |
| 212 | { |
| 213 | dev->dma = dmalist[j]; |
| 214 | if (!request_dma(dev->dma, cardname)) |
| 215 | break; |
| 216 | } |
| 217 | |
| 218 | if(dmalist[j] == 0) |
| 219 | { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 220 | printk(KERN_INFO "proteon.c: AutoSelect no DMA available\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 221 | goto out2; |
| 222 | } |
| 223 | } |
| 224 | else |
| 225 | { |
| 226 | for(j = 0; dmalist[j] != 0; j++) |
| 227 | if (dmalist[j] == dev->dma) |
| 228 | break; |
| 229 | if (dmalist[j] == 0) |
| 230 | { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 231 | printk(KERN_INFO "proteon.c: Illegal DMA %d specified\n", |
| 232 | dev->dma); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 233 | goto out2; |
| 234 | } |
| 235 | if (request_dma(dev->dma, cardname)) |
| 236 | { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 237 | printk(KERN_INFO "proteon.c: Selected DMA %d not available\n", |
| 238 | dev->dma); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 239 | goto out2; |
| 240 | } |
| 241 | } |
| 242 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | err = register_netdev(dev); |
| 244 | if (err) |
| 245 | goto out; |
| 246 | |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 247 | printk(KERN_DEBUG "%s: IO: %#4lx IRQ: %d DMA: %d\n", |
| 248 | dev->name, dev->base_addr, dev->irq, dev->dma); |
| 249 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 250 | return 0; |
| 251 | out: |
| 252 | free_dma(dev->dma); |
| 253 | out2: |
| 254 | free_irq(dev->irq, dev); |
| 255 | out3: |
| 256 | tmsdev_term(dev); |
| 257 | out4: |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 258 | release_region(dev->base_addr, PROTEON_IO_EXTENT); |
| 259 | out5: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 260 | return err; |
| 261 | } |
| 262 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 263 | /* |
| 264 | * Reads MAC address from adapter RAM, which should've read it from |
| 265 | * the onboard ROM. |
| 266 | * |
| 267 | * Calling this on a board that does not support it can be a very |
| 268 | * dangerous thing. The Madge board, for instance, will lock your |
| 269 | * machine hard when this is called. Luckily, its supported in a |
| 270 | * separate driver. --ASF |
| 271 | */ |
| 272 | static void proteon_read_eeprom(struct net_device *dev) |
| 273 | { |
| 274 | int i; |
| 275 | |
| 276 | /* Address: 0000:0000 */ |
| 277 | proteon_sifwritew(dev, 0, SIFADX); |
| 278 | proteon_sifwritew(dev, 0, SIFADR); |
| 279 | |
| 280 | /* Read six byte MAC address data */ |
| 281 | dev->addr_len = 6; |
| 282 | for(i = 0; i < 6; i++) |
| 283 | dev->dev_addr[i] = proteon_sifreadw(dev, SIFINC) >> 8; |
| 284 | } |
| 285 | |
Hannes Eder | 27cd6ae | 2008-12-26 00:07:15 -0800 | [diff] [blame] | 286 | static unsigned short proteon_setnselout_pins(struct net_device *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 287 | { |
| 288 | return 0; |
| 289 | } |
| 290 | |
| 291 | static int proteon_open(struct net_device *dev) |
| 292 | { |
| 293 | struct net_local *tp = netdev_priv(dev); |
| 294 | unsigned short val = 0; |
| 295 | int i; |
| 296 | |
| 297 | /* Proteon reset sequence */ |
| 298 | outb(0, dev->base_addr + 0x11); |
| 299 | mdelay(20); |
| 300 | outb(0x04, dev->base_addr + 0x11); |
| 301 | mdelay(20); |
| 302 | outb(0, dev->base_addr + 0x11); |
| 303 | mdelay(100); |
| 304 | |
| 305 | /* set control/status reg */ |
| 306 | val = inb(dev->base_addr + 0x11); |
| 307 | val |= 0x78; |
| 308 | val &= 0xf9; |
| 309 | if(tp->DataRate == SPEED_4) |
| 310 | val |= 0x20; |
| 311 | else |
| 312 | val &= ~0x20; |
| 313 | |
| 314 | outb(val, dev->base_addr + 0x11); |
| 315 | outb(0xff, dev->base_addr + 0x12); |
| 316 | for(i = 0; irqlist[i] != 0; i++) |
| 317 | { |
| 318 | if(irqlist[i] == dev->irq) |
| 319 | break; |
| 320 | } |
| 321 | val = i; |
| 322 | i = (7 - dev->dma) << 4; |
| 323 | val |= i; |
| 324 | outb(val, dev->base_addr + 0x13); |
| 325 | |
| 326 | return tms380tr_open(dev); |
| 327 | } |
| 328 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 329 | #define ISATR_MAX_ADAPTERS 3 |
| 330 | |
| 331 | static int io[ISATR_MAX_ADAPTERS]; |
| 332 | static int irq[ISATR_MAX_ADAPTERS]; |
| 333 | static int dma[ISATR_MAX_ADAPTERS]; |
| 334 | |
| 335 | MODULE_LICENSE("GPL"); |
| 336 | |
| 337 | module_param_array(io, int, NULL, 0); |
| 338 | module_param_array(irq, int, NULL, 0); |
| 339 | module_param_array(dma, int, NULL, 0); |
| 340 | |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 341 | static struct platform_device *proteon_dev[ISATR_MAX_ADAPTERS]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 342 | |
Russell King | 3ae5eae | 2005-11-09 22:32:44 +0000 | [diff] [blame] | 343 | static struct platform_driver proteon_driver = { |
| 344 | .driver = { |
| 345 | .name = "proteon", |
| 346 | }, |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 347 | }; |
| 348 | |
| 349 | static int __init proteon_init(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 350 | { |
| 351 | struct net_device *dev; |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 352 | struct platform_device *pdev; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | int i, num = 0, err = 0; |
| 354 | |
Russell King | 3ae5eae | 2005-11-09 22:32:44 +0000 | [diff] [blame] | 355 | err = platform_driver_register(&proteon_driver); |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 356 | if (err) |
| 357 | return err; |
| 358 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 359 | for (i = 0; i < ISATR_MAX_ADAPTERS ; i++) { |
| 360 | dev = alloc_trdev(sizeof(struct net_local)); |
| 361 | if (!dev) |
| 362 | continue; |
| 363 | |
| 364 | dev->base_addr = io[i]; |
| 365 | dev->irq = irq[i]; |
| 366 | dev->dma = dma[i]; |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 367 | pdev = platform_device_register_simple("proteon", |
| 368 | i, NULL, 0); |
Akinobu Mita | 9d4df9e | 2006-10-29 03:52:14 +0900 | [diff] [blame] | 369 | if (IS_ERR(pdev)) { |
| 370 | free_netdev(dev); |
| 371 | continue; |
| 372 | } |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 373 | err = setup_card(dev, &pdev->dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 374 | if (!err) { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 375 | proteon_dev[i] = pdev; |
Russell King | 3ae5eae | 2005-11-09 22:32:44 +0000 | [diff] [blame] | 376 | platform_set_drvdata(pdev, dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 377 | ++num; |
| 378 | } else { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 379 | platform_device_unregister(pdev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 380 | free_netdev(dev); |
| 381 | } |
| 382 | } |
| 383 | |
| 384 | printk(KERN_NOTICE "proteon.c: %d cards found.\n", num); |
| 385 | /* Probe for cards. */ |
| 386 | if (num == 0) { |
| 387 | printk(KERN_NOTICE "proteon.c: No cards found.\n"); |
Akinobu Mita | 9d4df9e | 2006-10-29 03:52:14 +0900 | [diff] [blame] | 388 | platform_driver_unregister(&proteon_driver); |
| 389 | return -ENODEV; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 390 | } |
Akinobu Mita | 9d4df9e | 2006-10-29 03:52:14 +0900 | [diff] [blame] | 391 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 392 | } |
| 393 | |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 394 | static void __exit proteon_cleanup(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 395 | { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 396 | struct net_device *dev; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 397 | int i; |
| 398 | |
| 399 | for (i = 0; i < ISATR_MAX_ADAPTERS ; i++) { |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 400 | struct platform_device *pdev = proteon_dev[i]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 402 | if (!pdev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 403 | continue; |
Russell King | 3ae5eae | 2005-11-09 22:32:44 +0000 | [diff] [blame] | 404 | dev = platform_get_drvdata(pdev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 405 | unregister_netdev(dev); |
| 406 | release_region(dev->base_addr, PROTEON_IO_EXTENT); |
| 407 | free_irq(dev->irq, dev); |
| 408 | free_dma(dev->dma); |
| 409 | tmsdev_term(dev); |
| 410 | free_netdev(dev); |
Russell King | 3ae5eae | 2005-11-09 22:32:44 +0000 | [diff] [blame] | 411 | platform_set_drvdata(pdev, NULL); |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 412 | platform_device_unregister(pdev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 413 | } |
Russell King | 3ae5eae | 2005-11-09 22:32:44 +0000 | [diff] [blame] | 414 | platform_driver_unregister(&proteon_driver); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 415 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 416 | |
Jochen Friedrich | 504ff16 | 2005-07-27 01:14:50 -0700 | [diff] [blame] | 417 | module_init(proteon_init); |
| 418 | module_exit(proteon_cleanup); |