ata-promise.c (230132) | ata-promise.c (233282) |
---|---|
1/*- 2 * Copyright (c) 1998 - 2008 S��ren Schmidt <sos@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 - 2008 S��ren Schmidt <sos@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/ata/chipsets/ata-promise.c 230132 2012-01-15 13:23:18Z uqs $"); | 28__FBSDID("$FreeBSD: head/sys/dev/ata/chipsets/ata-promise.c 233282 2012-03-21 16:59:39Z marius $"); |
29 30#include "opt_ata.h" 31#include <sys/param.h> 32#include <sys/module.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/ata.h> 36#include <sys/bus.h> --- 87 unchanged lines hidden (view full) --- 124 TAILQ_HEAD(, host_packet) queue; 125 int busy; 126}; 127 128static int 129ata_promise_probe(device_t dev) 130{ 131 struct ata_pci_controller *ctlr = device_get_softc(dev); | 29 30#include "opt_ata.h" 31#include <sys/param.h> 32#include <sys/module.h> 33#include <sys/systm.h> 34#include <sys/kernel.h> 35#include <sys/ata.h> 36#include <sys/bus.h> --- 87 unchanged lines hidden (view full) --- 124 TAILQ_HEAD(, host_packet) queue; 125 int busy; 126}; 127 128static int 129ata_promise_probe(device_t dev) 130{ 131 struct ata_pci_controller *ctlr = device_get_softc(dev); |
132 struct ata_chip_id *idx; 133 static struct ata_chip_id ids[] = | 132 const struct ata_chip_id *idx; 133 static const struct ata_chip_id const ids[] = |
134 {{ ATA_PDC20246, 0, PR_OLD, 0x00, ATA_UDMA2, "PDC20246" }, 135 { ATA_PDC20262, 0, PR_NEW, 0x00, ATA_UDMA4, "PDC20262" }, 136 { ATA_PDC20263, 0, PR_NEW, 0x00, ATA_UDMA4, "PDC20263" }, 137 { ATA_PDC20265, 0, PR_NEW, 0x00, ATA_UDMA5, "PDC20265" }, 138 { ATA_PDC20267, 0, PR_NEW, 0x00, ATA_UDMA5, "PDC20267" }, 139 { ATA_PDC20268, 0, PR_TX, PR_TX4, ATA_UDMA5, "PDC20268" }, 140 { ATA_PDC20269, 0, PR_TX, 0x00, ATA_UDMA6, "PDC20269" }, 141 { ATA_PDC20270, 0, PR_TX, PR_TX4, ATA_UDMA5, "PDC20270" }, --- 307 unchanged lines hidden (view full) --- 449 450static int 451ata_promise_setmode(device_t dev, int target, int mode) 452{ 453 device_t parent = device_get_parent(dev); 454 struct ata_pci_controller *ctlr = device_get_softc(parent); 455 struct ata_channel *ch = device_get_softc(dev); 456 int devno = (ch->unit << 1) + target; | 134 {{ ATA_PDC20246, 0, PR_OLD, 0x00, ATA_UDMA2, "PDC20246" }, 135 { ATA_PDC20262, 0, PR_NEW, 0x00, ATA_UDMA4, "PDC20262" }, 136 { ATA_PDC20263, 0, PR_NEW, 0x00, ATA_UDMA4, "PDC20263" }, 137 { ATA_PDC20265, 0, PR_NEW, 0x00, ATA_UDMA5, "PDC20265" }, 138 { ATA_PDC20267, 0, PR_NEW, 0x00, ATA_UDMA5, "PDC20267" }, 139 { ATA_PDC20268, 0, PR_TX, PR_TX4, ATA_UDMA5, "PDC20268" }, 140 { ATA_PDC20269, 0, PR_TX, 0x00, ATA_UDMA6, "PDC20269" }, 141 { ATA_PDC20270, 0, PR_TX, PR_TX4, ATA_UDMA5, "PDC20270" }, --- 307 unchanged lines hidden (view full) --- 449 450static int 451ata_promise_setmode(device_t dev, int target, int mode) 452{ 453 device_t parent = device_get_parent(dev); 454 struct ata_pci_controller *ctlr = device_get_softc(parent); 455 struct ata_channel *ch = device_get_softc(dev); 456 int devno = (ch->unit << 1) + target; |
457 u_int32_t timings[][2] = { | 457 static const uint32_t timings[][2] = { |
458 /* PR_OLD PR_NEW mode */ 459 { 0x004ff329, 0x004fff2f }, /* PIO 0 */ 460 { 0x004fec25, 0x004ff82a }, /* PIO 1 */ 461 { 0x004fe823, 0x004ff026 }, /* PIO 2 */ 462 { 0x004fe622, 0x004fec24 }, /* PIO 3 */ 463 { 0x004fe421, 0x004fe822 }, /* PIO 4 */ 464 { 0x004567f3, 0x004acef6 }, /* MWDMA 0 */ 465 { 0x004467f3, 0x0048cef6 }, /* MWDMA 1 */ --- 814 unchanged lines hidden --- | 458 /* PR_OLD PR_NEW mode */ 459 { 0x004ff329, 0x004fff2f }, /* PIO 0 */ 460 { 0x004fec25, 0x004ff82a }, /* PIO 1 */ 461 { 0x004fe823, 0x004ff026 }, /* PIO 2 */ 462 { 0x004fe622, 0x004fec24 }, /* PIO 3 */ 463 { 0x004fe421, 0x004fe822 }, /* PIO 4 */ 464 { 0x004567f3, 0x004acef6 }, /* MWDMA 0 */ 465 { 0x004467f3, 0x0048cef6 }, /* MWDMA 1 */ --- 814 unchanged lines hidden --- |