Lines Matching refs:brd
54 struct jsm_board *brd; in jsm_probe_one() local
69 brd = kzalloc(sizeof(*brd), GFP_KERNEL); in jsm_probe_one()
70 if (!brd) { in jsm_probe_one()
76 brd->boardnum = adapter_count++; in jsm_probe_one()
77 brd->pci_dev = pdev; in jsm_probe_one()
85 brd->maxports = 2; in jsm_probe_one()
94 brd->maxports = 4; in jsm_probe_one()
102 brd->maxports = 8; in jsm_probe_one()
106 brd->maxports = 1; in jsm_probe_one()
110 spin_lock_init(&brd->bd_intr_lock); in jsm_probe_one()
113 brd->rev = pdev->revision; in jsm_probe_one()
115 brd->irq = pdev->irq; in jsm_probe_one()
123 jsm_dbg(INIT, &brd->pci_dev, in jsm_probe_one()
137 brd->membase = pci_resource_start(pdev, 4); in jsm_probe_one()
138 brd->membase_end = pci_resource_end(pdev, 4); in jsm_probe_one()
140 if (brd->membase & 0x1) in jsm_probe_one()
141 brd->membase &= ~0x3; in jsm_probe_one()
143 brd->membase &= ~0xF; in jsm_probe_one()
145 brd->iobase = pci_resource_start(pdev, 1); in jsm_probe_one()
146 brd->iobase_end = pci_resource_end(pdev, 1); in jsm_probe_one()
147 brd->iobase = ((unsigned int)(brd->iobase)) & 0xFFFE; in jsm_probe_one()
150 brd->bd_ops = &jsm_cls_ops; in jsm_probe_one()
152 brd->bd_uart_offset = 0x8; in jsm_probe_one()
153 brd->bd_dividend = 921600; in jsm_probe_one()
155 brd->re_map_membase = ioremap(brd->membase, in jsm_probe_one()
157 if (!brd->re_map_membase) { in jsm_probe_one()
169 outb(0x43, brd->iobase + 0x4c); in jsm_probe_one()
186 jsm_dbg(INIT, &brd->pci_dev, "jsm_found_board - NEO adapter\n"); in jsm_probe_one()
189 brd->membase = pci_resource_start(pdev, 0); in jsm_probe_one()
190 brd->membase_end = pci_resource_end(pdev, 0); in jsm_probe_one()
192 if (brd->membase & 1) in jsm_probe_one()
193 brd->membase &= ~0x3; in jsm_probe_one()
195 brd->membase &= ~0xF; in jsm_probe_one()
198 brd->bd_ops = &jsm_neo_ops; in jsm_probe_one()
200 brd->bd_uart_offset = 0x200; in jsm_probe_one()
201 brd->bd_dividend = 921600; in jsm_probe_one()
203 brd->re_map_membase = ioremap(brd->membase, in jsm_probe_one()
205 if (!brd->re_map_membase) { in jsm_probe_one()
218 rc = request_irq(brd->irq, brd->bd_ops->intr, IRQF_SHARED, "JSM", brd); in jsm_probe_one()
220 dev_warn(&pdev->dev, "Failed to hook IRQ %d\n", brd->irq); in jsm_probe_one()
224 rc = jsm_tty_init(brd); in jsm_probe_one()
231 rc = jsm_uart_port_init(brd); in jsm_probe_one()
241 adapter_count, brd->rev, brd->irq); in jsm_probe_one()
243 pci_set_drvdata(pdev, brd); in jsm_probe_one()
248 jsm_remove_uart_port(brd); in jsm_probe_one()
249 free_irq(brd->irq, brd); in jsm_probe_one()
251 iounmap(brd->re_map_membase); in jsm_probe_one()
253 kfree(brd); in jsm_probe_one()
264 struct jsm_board *brd = pci_get_drvdata(pdev); in jsm_remove_one() local
273 outb(0x0, brd->iobase + 0x4c); in jsm_remove_one()
279 jsm_remove_uart_port(brd); in jsm_remove_one()
281 free_irq(brd->irq, brd); in jsm_remove_one()
282 iounmap(brd->re_map_membase); in jsm_remove_one()
285 for (i = 0; i < brd->maxports; i++) { in jsm_remove_one()
286 if (brd->channels[i]) { in jsm_remove_one()
287 kfree(brd->channels[i]->ch_rqueue); in jsm_remove_one()
288 kfree(brd->channels[i]->ch_equeue); in jsm_remove_one()
289 kfree(brd->channels[i]); in jsm_remove_one()
295 kfree(brd); in jsm_remove_one()
332 struct jsm_board *brd = pci_get_drvdata(pdev); in jsm_io_error_detected() local
334 jsm_remove_uart_port(brd); in jsm_io_error_detected()
355 struct jsm_board *brd = pci_get_drvdata(pdev); in jsm_io_resume() local
360 jsm_uart_port_init(brd); in jsm_io_resume()