fdc.c (89c9c53da05197f657dfe8e0bdda6941a2e9a0d4) | fdc.c (6fba12f206cd18d7ae4524ac2845cf94571bca40) |
---|---|
1/* 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu) --- 756 unchanged lines hidden (view full) --- 765 "cannot reserve control I/O port range (control port)\n"); 766 return ENXIO; 767 } 768 fdc->ctlt = rman_get_bustag(fdc->res_ctl); 769 fdc->ctlh = rman_get_bushandle(fdc->res_ctl); 770 } 771 772 fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, | 1/* 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Libretto PCMCIA floppy support by David Horwitt (dhorwitt@ucsd.edu) --- 756 unchanged lines hidden (view full) --- 765 "cannot reserve control I/O port range (control port)\n"); 766 return ENXIO; 767 } 768 fdc->ctlt = rman_get_bustag(fdc->res_ctl); 769 fdc->ctlh = rman_get_bushandle(fdc->res_ctl); 770 } 771 772 fdc->res_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, |
773 &fdc->rid_irq, RF_ACTIVE); | 773 &fdc->rid_irq, RF_ACTIVE | RF_SHAREABLE); |
774 if (fdc->res_irq == 0) { 775 device_printf(dev, "cannot reserve interrupt line\n"); 776 return ENXIO; 777 } 778 779 if ((fdc->flags & FDC_NODMA) == 0) { 780 fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, 781 &fdc->rid_drq, 782 RF_ACTIVE); 783 if (fdc->res_drq == 0) { 784 device_printf(dev, "cannot reserve DMA request line\n"); | 774 if (fdc->res_irq == 0) { 775 device_printf(dev, "cannot reserve interrupt line\n"); 776 return ENXIO; 777 } 778 779 if ((fdc->flags & FDC_NODMA) == 0) { 780 fdc->res_drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, 781 &fdc->rid_drq, 782 RF_ACTIVE); 783 if (fdc->res_drq == 0) { 784 device_printf(dev, "cannot reserve DMA request line\n"); |
785 return ENXIO; 786 } 787 fdc->dmachan = rman_get_start(fdc->res_drq); | 785 fdc->flags |= FDC_NODMA; 786 } else 787 fdc->dmachan = rman_get_start(fdc->res_drq); |
788 } 789 790 return 0; 791} 792 793static void 794fdc_release_resources(struct fdc_data *fdc) 795{ --- 1931 unchanged lines hidden --- | 788 } 789 790 return 0; 791} 792 793static void 794fdc_release_resources(struct fdc_data *fdc) 795{ --- 1931 unchanged lines hidden --- |