MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / pcmcia / pd6729.c
blob4f00c9dda0754ba562d59d78e602b98598f17187
1 /*
2 * Driver for the Cirrus PD6729 PCI-PCMCIA bridge.
4 * Based on the i82092.c driver.
6 * This software may be used and distributed according to the terms of
7 * the GNU General Public License, incorporated herein by reference.
8 */
10 #include <linux/kernel.h>
11 #include <linux/config.h>
12 #include <linux/module.h>
13 #include <linux/pci.h>
14 #include <linux/init.h>
15 #include <linux/workqueue.h>
16 #include <linux/interrupt.h>
17 #include <linux/device.h>
19 #include <pcmcia/cs_types.h>
20 #include <pcmcia/ss.h>
21 #include <pcmcia/cs.h>
23 #include <asm/system.h>
24 #include <asm/io.h>
26 #include "pd6729.h"
27 #include "i82365.h"
28 #include "cirrus.h"
30 MODULE_LICENSE("GPL");
31 MODULE_DESCRIPTION("Driver for the Cirrus PD6729 PCI-PCMCIA bridge");
32 MODULE_AUTHOR("Jun Komuro <komurojun@mbn.nifty.com>");
34 #define MAX_SOCKETS 2
37 * simple helper functions
38 * External clock time, in nanoseconds. 120 ns = 8.33 MHz
40 #define to_cycles(ns) ((ns)/120)
42 static spinlock_t port_lock = SPIN_LOCK_UNLOCKED;
44 /* basic value read/write functions */
46 static unsigned char indirect_read(struct pd6729_socket *socket, unsigned short reg)
48 unsigned long port;
49 unsigned char val;
50 unsigned long flags;
52 spin_lock_irqsave(&port_lock, flags);
53 reg += socket->number * 0x40;
54 port = socket->io_base;
55 outb(reg, port);
56 val = inb(port + 1);
57 spin_unlock_irqrestore(&port_lock, flags);
59 return val;
62 static unsigned short indirect_read16(struct pd6729_socket *socket, unsigned short reg)
64 unsigned long port;
65 unsigned short tmp;
66 unsigned long flags;
68 spin_lock_irqsave(&port_lock, flags);
69 reg = reg + socket->number * 0x40;
70 port = socket->io_base;
71 outb(reg, port);
72 tmp = inb(port + 1);
73 reg++;
74 outb(reg, port);
75 tmp = tmp | (inb(port + 1) << 8);
76 spin_unlock_irqrestore(&port_lock, flags);
78 return tmp;
81 static void indirect_write(struct pd6729_socket *socket, unsigned short reg, unsigned char value)
83 unsigned long port;
84 unsigned long flags;
86 spin_lock_irqsave(&port_lock, flags);
87 reg = reg + socket->number * 0x40;
88 port = socket->io_base;
89 outb(reg, port);
90 outb(value, port + 1);
91 spin_unlock_irqrestore(&port_lock, flags);
94 static void indirect_setbit(struct pd6729_socket *socket, unsigned short reg, unsigned char mask)
96 unsigned long port;
97 unsigned char val;
98 unsigned long flags;
100 spin_lock_irqsave(&port_lock, flags);
101 reg = reg + socket->number * 0x40;
102 port = socket->io_base;
103 outb(reg, port);
104 val = inb(port + 1);
105 val |= mask;
106 outb(reg, port);
107 outb(val, port + 1);
108 spin_unlock_irqrestore(&port_lock, flags);
111 static void indirect_resetbit(struct pd6729_socket *socket, unsigned short reg, unsigned char mask)
113 unsigned long port;
114 unsigned char val;
115 unsigned long flags;
117 spin_lock_irqsave(&port_lock, flags);
118 reg = reg + socket->number * 0x40;
119 port = socket->io_base;
120 outb(reg, port);
121 val = inb(port + 1);
122 val &= ~mask;
123 outb(reg, port);
124 outb(val, port + 1);
125 spin_unlock_irqrestore(&port_lock, flags);
128 static void indirect_write16(struct pd6729_socket *socket, unsigned short reg, unsigned short value)
130 unsigned long port;
131 unsigned char val;
132 unsigned long flags;
134 spin_lock_irqsave(&port_lock, flags);
135 reg = reg + socket->number * 0x40;
136 port = socket->io_base;
138 outb(reg, port);
139 val = value & 255;
140 outb(val, port + 1);
142 reg++;
144 outb(reg, port);
145 val = value >> 8;
146 outb(val, port + 1);
147 spin_unlock_irqrestore(&port_lock, flags);
150 /* Interrupt handler functionality */
152 static irqreturn_t pd6729_interrupt(int irq, void *dev, struct pt_regs *regs)
154 struct pd6729_socket *socket = (struct pd6729_socket *)dev;
155 int i;
156 int loopcount = 0;
157 int handled = 0;
158 unsigned int events, active = 0;
160 while (1) {
161 loopcount++;
162 if (loopcount > 20) {
163 printk(KERN_ERR "pd6729: infinite eventloop in interrupt\n");
164 break;
167 active = 0;
169 for (i = 0; i < MAX_SOCKETS; i++) {
170 unsigned int csc;
172 /* card status change register */
173 csc = indirect_read(&socket[i], I365_CSC);
174 if (csc == 0) /* no events on this socket */
175 continue;
177 handled = 1;
178 events = 0;
180 if (csc & I365_CSC_DETECT) {
181 events |= SS_DETECT;
182 dprintk("Card detected in socket %i!\n", i);
185 if (indirect_read(&socket[i], I365_INTCTL) & I365_PC_IOCARD) {
186 /* For IO/CARDS, bit 0 means "read the card" */
187 events |= (csc & I365_CSC_STSCHG) ? SS_STSCHG : 0;
188 } else {
189 /* Check for battery/ready events */
190 events |= (csc & I365_CSC_BVD1) ? SS_BATDEAD : 0;
191 events |= (csc & I365_CSC_BVD2) ? SS_BATWARN : 0;
192 events |= (csc & I365_CSC_READY) ? SS_READY : 0;
195 if (events) {
196 pcmcia_parse_events(&socket[i].socket, events);
198 active |= events;
201 if (active == 0) /* no more events to handle */
202 break;
204 return IRQ_RETVAL(handled);
207 /* socket functions */
209 static void set_bridge_state(struct pd6729_socket *socket)
211 indirect_write(socket, I365_GBLCTL, 0x00);
212 indirect_write(socket, I365_GENCTL, 0x00);
214 indirect_setbit(socket, I365_INTCTL, 0x08);
217 static int pd6729_get_status(struct pcmcia_socket *sock, u_int *value)
219 struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
220 unsigned int status;
221 unsigned int data;
222 struct pd6729_socket *t;
224 /* Interface Status Register */
225 status = indirect_read(socket, I365_STATUS);
226 *value = 0;
228 if ((status & I365_CS_DETECT) == I365_CS_DETECT) {
229 *value |= SS_DETECT;
233 * IO cards have a different meaning of bits 0,1
234 * Also notice the inverse-logic on the bits
236 if (indirect_read(socket, I365_INTCTL) & I365_PC_IOCARD) {
237 /* IO card */
238 if (!(status & I365_CS_STSCHG))
239 *value |= SS_STSCHG;
240 } else {
241 /* non I/O card */
242 if (!(status & I365_CS_BVD1))
243 *value |= SS_BATDEAD;
244 if (!(status & I365_CS_BVD2))
245 *value |= SS_BATWARN;
248 if (status & I365_CS_WRPROT)
249 *value |= SS_WRPROT; /* card is write protected */
251 if (status & I365_CS_READY)
252 *value |= SS_READY; /* card is not busy */
254 if (status & I365_CS_POWERON)
255 *value |= SS_POWERON; /* power is applied to the card */
257 t = (socket->number) ? socket : socket + 1;
258 indirect_write(t, PD67_EXT_INDEX, PD67_EXTERN_DATA);
259 data = indirect_read16(t, PD67_EXT_DATA);
260 *value |= (data & PD67_EXD_VS1(socket->number)) ? 0 : SS_3VCARD;
262 return 0;
266 static int pd6729_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
268 struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
269 unsigned char reg, vcc, vpp;
271 state->flags = 0;
272 state->Vcc = 0;
273 state->Vpp = 0;
274 state->io_irq = 0;
275 state->csc_mask = 0;
278 * First the power status of the socket
279 * PCTRL - Power Control Register
281 reg = indirect_read(socket, I365_POWER);
283 if (reg & I365_PWR_AUTO)
284 state->flags |= SS_PWR_AUTO; /* Automatic Power Switch */
286 if (reg & I365_PWR_OUT)
287 state->flags |= SS_OUTPUT_ENA; /* Output signals are enabled */
289 vcc = reg & I365_VCC_MASK; vpp = reg & I365_VPP1_MASK;
291 if (reg & I365_VCC_5V) {
292 state->Vcc = (indirect_read(socket, PD67_MISC_CTL_1) &
293 PD67_MC1_VCC_3V) ? 33 : 50;
295 if (vpp == I365_VPP1_5V) {
296 if (state->Vcc == 50)
297 state->Vpp = 50;
298 else
299 state->Vpp = 33;
301 if (vpp == I365_VPP1_12V)
302 state->Vpp = 120;
306 * Now the IO card, RESET flags and IO interrupt
307 * IGENC, Interrupt and General Control
309 reg = indirect_read(socket, I365_INTCTL);
311 if ((reg & I365_PC_RESET) == 0)
312 state->flags |= SS_RESET;
313 if (reg & I365_PC_IOCARD)
314 state->flags |= SS_IOCARD; /* This is an IO card */
316 /* Set the IRQ number */
317 state->io_irq = socket->socket.pci_irq;
320 * Card status change
321 * CSCICR, Card Status Change Interrupt Configuration
323 reg = indirect_read(socket, I365_CSCINT);
325 if (reg & I365_CSC_DETECT)
326 state->csc_mask |= SS_DETECT; /* Card detect is enabled */
328 if (state->flags & SS_IOCARD) {/* IO Cards behave different */
329 if (reg & I365_CSC_STSCHG)
330 state->csc_mask |= SS_STSCHG;
331 } else {
332 if (reg & I365_CSC_BVD1)
333 state->csc_mask |= SS_BATDEAD;
334 if (reg & I365_CSC_BVD2)
335 state->csc_mask |= SS_BATWARN;
336 if (reg & I365_CSC_READY)
337 state->csc_mask |= SS_READY;
340 return 0;
343 static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
345 struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
346 unsigned char reg;
348 /* First, set the global controller options */
350 set_bridge_state(socket);
352 /* Values for the IGENC register */
354 reg = 0;
355 /* The reset bit has "inverse" logic */
356 if (!(state->flags & SS_RESET))
357 reg = reg | I365_PC_RESET;
358 if (state->flags & SS_IOCARD)
359 reg = reg | I365_PC_IOCARD;
361 /* IGENC, Interrupt and General Control Register */
362 indirect_write(socket, I365_INTCTL, reg);
364 /* Power registers */
366 reg = I365_PWR_NORESET; /* default: disable resetdrv on resume */
368 if (state->flags & SS_PWR_AUTO) {
369 dprintk("Auto power\n");
370 reg |= I365_PWR_AUTO; /* automatic power mngmnt */
372 if (state->flags & SS_OUTPUT_ENA) {
373 dprintk("Power Enabled\n");
374 reg |= I365_PWR_OUT; /* enable power */
377 switch (state->Vcc) {
378 case 0:
379 break;
380 case 33:
381 dprintk("setting voltage to Vcc to 3.3V on socket %i\n",
382 socket->number);
383 reg |= I365_VCC_5V;
384 indirect_setbit(socket, PD67_MISC_CTL_1, PD67_MC1_VCC_3V);
385 break;
386 case 50:
387 dprintk("setting voltage to Vcc to 5V on socket %i\n",
388 socket->number);
389 reg |= I365_VCC_5V;
390 indirect_resetbit(socket, PD67_MISC_CTL_1, PD67_MC1_VCC_3V);
391 break;
392 default:
393 dprintk("pd6729: pd6729_set_socket called with invalid VCC power value: %i\n",
394 state->Vcc);
395 return -EINVAL;
398 switch (state->Vpp) {
399 case 0:
400 dprintk("not setting Vpp on socket %i\n", socket->number);
401 break;
402 case 33:
403 case 50:
404 dprintk("setting Vpp to Vcc for socket %i\n", socket->number);
405 reg |= I365_VPP1_5V;
406 break;
407 case 120:
408 dprintk("setting Vpp to 12.0\n");
409 reg |= I365_VPP1_12V;
410 break;
411 default:
412 dprintk("pd6729: pd6729_set_socket called with invalid VPP power value: %i\n",
413 state->Vpp);
414 return -EINVAL;
417 /* only write if changed */
418 if (reg != indirect_read(socket, I365_POWER))
419 indirect_write(socket, I365_POWER, reg);
421 /* Now, specifiy that all interrupts are to be done as PCI interrupts */
422 indirect_write(socket, PD67_EXT_INDEX, PD67_EXT_CTL_1);
423 indirect_write(socket, PD67_EXT_DATA, PD67_EC1_INV_MGMT_IRQ | PD67_EC1_INV_CARD_IRQ);
425 /* Enable specific interrupt events */
427 reg = 0x00;
428 if (state->csc_mask & SS_DETECT) {
429 reg |= I365_CSC_DETECT;
431 if (state->flags & SS_IOCARD) {
432 if (state->csc_mask & SS_STSCHG)
433 reg |= I365_CSC_STSCHG;
434 } else {
435 if (state->csc_mask & SS_BATDEAD)
436 reg |= I365_CSC_BVD1;
437 if (state->csc_mask & SS_BATWARN)
438 reg |= I365_CSC_BVD2;
439 if (state->csc_mask & SS_READY)
440 reg |= I365_CSC_READY;
442 reg |= 0x30; /* management IRQ: PCI INTA# = "irq 3" */
443 indirect_write(socket, I365_CSCINT, reg);
445 reg = indirect_read(socket, I365_INTCTL);
446 reg |= 0x03; /* card IRQ: PCI INTA# = "irq 3" */
447 indirect_write(socket, I365_INTCTL, reg);
449 /* now clear the (probably bogus) pending stuff by doing a dummy read */
450 (void)indirect_read(socket, I365_CSC);
452 return 0;
455 static int pd6729_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io)
457 struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
458 unsigned char map, ioctl;
460 map = io->map;
462 /* Check error conditions */
463 if (map > 1) {
464 dprintk("pd6729_set_io_map with invalid map");
465 return -EINVAL;
468 /* Turn off the window before changing anything */
469 if (indirect_read(socket, I365_ADDRWIN) & I365_ENA_IO(map))
470 indirect_resetbit(socket, I365_ADDRWIN, I365_ENA_IO(map));
472 /* dprintk("set_io_map: Setting range to %x - %x\n", io->start, io->stop);*/
474 /* write the new values */
475 indirect_write16(socket, I365_IO(map)+I365_W_START, io->start);
476 indirect_write16(socket, I365_IO(map)+I365_W_STOP, io->stop);
478 ioctl = indirect_read(socket, I365_IOCTL) & ~I365_IOCTL_MASK(map);
480 if (io->flags & MAP_0WS) ioctl |= I365_IOCTL_0WS(map);
481 if (io->flags & MAP_16BIT) ioctl |= I365_IOCTL_16BIT(map);
482 if (io->flags & MAP_AUTOSZ) ioctl |= I365_IOCTL_IOCS16(map);
484 indirect_write(socket, I365_IOCTL, ioctl);
486 /* Turn the window back on if needed */
487 if (io->flags & MAP_ACTIVE)
488 indirect_setbit(socket, I365_ADDRWIN, I365_ENA_IO(map));
490 return 0;
493 static int pd6729_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *mem)
495 struct pd6729_socket *socket = container_of(sock, struct pd6729_socket, socket);
496 unsigned short base, i;
497 unsigned char map;
499 map = mem->map;
500 if (map > 4) {
501 printk("pd6729_set_mem_map: invalid map");
502 return -EINVAL;
505 if ((mem->res->start > mem->res->end) || (mem->speed > 1000)) {
506 printk("pd6729_set_mem_map: invalid address / speed");
507 /* printk("invalid mem map for socket %i : %lx to %lx with a start of %x\n",
508 sock, mem->res->start, mem->res->end, mem->card_start); */
509 return -EINVAL;
512 /* Turn off the window before changing anything */
513 if (indirect_read(socket, I365_ADDRWIN) & I365_ENA_MEM(map))
514 indirect_resetbit(socket, I365_ADDRWIN, I365_ENA_MEM(map));
516 /* write the start address */
517 base = I365_MEM(map);
518 i = (mem->res->start >> 12) & 0x0fff;
519 if (mem->flags & MAP_16BIT)
520 i |= I365_MEM_16BIT;
521 if (mem->flags & MAP_0WS)
522 i |= I365_MEM_0WS;
523 indirect_write16(socket, base + I365_W_START, i);
525 /* write the stop address */
527 i= (mem->res->end >> 12) & 0x0fff;
528 switch (to_cycles(mem->speed)) {
529 case 0:
530 break;
531 case 1:
532 i |= I365_MEM_WS0;
533 break;
534 case 2:
535 i |= I365_MEM_WS1;
536 break;
537 default:
538 i |= I365_MEM_WS1 | I365_MEM_WS0;
539 break;
542 indirect_write16(socket, base + I365_W_STOP, i);
544 /* Take care of high byte */
545 indirect_write(socket, PD67_EXT_INDEX, PD67_MEM_PAGE(map));
546 indirect_write(socket, PD67_EXT_DATA, mem->res->start >> 24);
548 /* card start */
550 i = ((mem->card_start - mem->res->start) >> 12) & 0x3fff;
551 if (mem->flags & MAP_WRPROT)
552 i |= I365_MEM_WRPROT;
553 if (mem->flags & MAP_ATTRIB) {
554 /* dprintk("requesting attribute memory for socket %i\n",
555 socket->number);*/
556 i |= I365_MEM_REG;
557 } else {
558 /* dprintk("requesting normal memory for socket %i\n",
559 socket->number);*/
561 indirect_write16(socket, base + I365_W_OFF, i);
563 /* Enable the window if necessary */
564 if (mem->flags & MAP_ACTIVE)
565 indirect_setbit(socket, I365_ADDRWIN, I365_ENA_MEM(map));
567 return 0;
570 static int pd6729_suspend(struct pcmcia_socket *sock)
572 return pd6729_set_socket(sock, &dead_socket);
575 static int pd6729_init(struct pcmcia_socket *sock)
577 int i;
578 struct resource res = { .end = 0x0fff };
579 pccard_io_map io = { 0, 0, 0, 0, 1 };
580 pccard_mem_map mem = { .res = &res, };
582 pd6729_set_socket(sock, &dead_socket);
583 for (i = 0; i < 2; i++) {
584 io.map = i;
585 pd6729_set_io_map(sock, &io);
587 for (i = 0; i < 5; i++) {
588 mem.map = i;
589 pd6729_set_mem_map(sock, &mem);
592 return 0;
596 /* the pccard structure and its functions */
597 static struct pccard_operations pd6729_operations = {
598 .init = pd6729_init,
599 .suspend = pd6729_suspend,
600 .get_status = pd6729_get_status,
601 .get_socket = pd6729_get_socket,
602 .set_socket = pd6729_set_socket,
603 .set_io_map = pd6729_set_io_map,
604 .set_mem_map = pd6729_set_mem_map,
607 static int __devinit pd6729_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
609 int i, j, ret;
610 char configbyte;
611 struct pd6729_socket *socket;
613 socket = kmalloc(sizeof(struct pd6729_socket) * MAX_SOCKETS, GFP_KERNEL);
614 if (!socket)
615 return -ENOMEM;
617 memset(socket, 0, sizeof(struct pd6729_socket) * MAX_SOCKETS);
619 if ((ret = pci_enable_device(dev)))
620 goto err_out_free_mem;
622 printk(KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge at 0x%lx on irq %d\n",
623 pci_resource_start(dev, 0), dev->irq);
624 printk(KERN_INFO "pd6729: configured as a %d socket device.\n", MAX_SOCKETS);
626 * Since we have no memory BARs some firmware we may not
627 * have had PCI_COMMAND_MEM enabled, yet the device needs
628 * it.
630 pci_read_config_byte(dev, PCI_COMMAND, &configbyte);
631 if (!(configbyte & PCI_COMMAND_MEMORY)) {
632 printk(KERN_DEBUG "pd6729: Enabling PCI_COMMAND_MEMORY.\n");
633 configbyte |= PCI_COMMAND_MEMORY;
634 pci_write_config_byte(dev, PCI_COMMAND, configbyte);
637 ret = pci_request_regions(dev, "pd6729");
638 if (ret) {
639 printk(KERN_INFO "pd6729: pci request region failed.\n");
640 goto err_out_disable;
643 for (i = 0; i < MAX_SOCKETS; i++) {
644 socket[i].io_base = pci_resource_start(dev, 0);
645 socket[i].socket.features |= SS_CAP_PCCARD;
646 socket[i].socket.map_size = 0x1000;
647 socket[i].socket.irq_mask = 0;
648 socket[i].socket.pci_irq = dev->irq;
649 socket[i].socket.owner = THIS_MODULE;
651 socket[i].number = i;
653 socket[i].socket.ops = &pd6729_operations;
654 socket[i].socket.dev.dev = &dev->dev;
655 socket[i].socket.driver_data = &socket[i];
658 pci_set_drvdata(dev, socket);
660 /* Register the interrupt handler */
661 if ((ret = request_irq(dev->irq, pd6729_interrupt, SA_SHIRQ, "pd6729", socket))) {
662 printk(KERN_ERR "pd6729: Failed to register irq %d, aborting\n", dev->irq);
663 goto err_out_free_res;
666 for (i = 0; i < MAX_SOCKETS; i++) {
667 ret = pcmcia_register_socket(&socket[i].socket);
668 if (ret) {
669 printk(KERN_INFO "pd6729: pcmcia_register_socket failed.\n");
670 for (j = 0; j < i ; j++)
671 pcmcia_unregister_socket(&socket[j].socket);
672 goto err_out_free_res2;
676 return 0;
678 err_out_free_res2:
679 free_irq(dev->irq, socket);
680 err_out_free_res:
681 pci_release_regions(dev);
682 err_out_disable:
683 pci_disable_device(dev);
685 err_out_free_mem:
686 kfree(socket);
687 return ret;
690 static void __devexit pd6729_pci_remove(struct pci_dev *dev)
692 int i;
693 struct pd6729_socket *socket = pci_get_drvdata(dev);
695 for (i = 0; i < MAX_SOCKETS; i++)
696 pcmcia_unregister_socket(&socket[i].socket);
698 free_irq(dev->irq, socket);
699 pci_release_regions(dev);
700 pci_disable_device(dev);
702 kfree(socket);
705 static int pd6729_socket_suspend(struct pci_dev *dev, u32 state)
707 return pcmcia_socket_dev_suspend(&dev->dev, state);
710 static int pd6729_socket_resume(struct pci_dev *dev)
712 return pcmcia_socket_dev_resume(&dev->dev);
715 static struct pci_device_id pd6729_pci_ids[] = {
717 .vendor = PCI_VENDOR_ID_CIRRUS,
718 .device = PCI_DEVICE_ID_CIRRUS_6729,
719 .subvendor = PCI_ANY_ID,
720 .subdevice = PCI_ANY_ID,
724 MODULE_DEVICE_TABLE(pci, pd6729_pci_ids);
726 static struct pci_driver pd6729_pci_drv = {
727 .name = "pd6729",
728 .id_table = pd6729_pci_ids,
729 .probe = pd6729_pci_probe,
730 .remove = __devexit_p(pd6729_pci_remove),
731 .suspend = pd6729_socket_suspend,
732 .resume = pd6729_socket_resume,
735 static int pd6729_module_init(void)
737 return pci_module_init(&pd6729_pci_drv);
740 static void pd6729_module_exit(void)
742 pci_unregister_driver(&pd6729_pci_drv);
745 module_init(pd6729_module_init);
746 module_exit(pd6729_module_exit);