ata-highpoint.c (230132) | ata-highpoint.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-highpoint.c 230132 2012-01-15 13:23:18Z uqs $"); | 28__FBSDID("$FreeBSD: head/sys/dev/ata/chipsets/ata-highpoint.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> --- 30 unchanged lines hidden (view full) --- 67 68/* 69 * HighPoint chipset support functions 70 */ 71static int 72ata_highpoint_probe(device_t dev) 73{ 74 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> --- 30 unchanged lines hidden (view full) --- 67 68/* 69 * HighPoint chipset support functions 70 */ 71static int 72ata_highpoint_probe(device_t dev) 73{ 74 struct ata_pci_controller *ctlr = device_get_softc(dev); |
75 struct ata_chip_id *idx; 76 static struct ata_chip_id ids[] = | 75 const struct ata_chip_id *idx; 76 static const struct ata_chip_id const ids[] = |
77 {{ ATA_HPT374, 0x07, HPT_374, 0, ATA_UDMA6, "HPT374" }, 78 { ATA_HPT372, 0x02, HPT_372, 0, ATA_UDMA6, "HPT372N" }, 79 { ATA_HPT372, 0x01, HPT_372, 0, ATA_UDMA6, "HPT372" }, 80 { ATA_HPT371, 0x01, HPT_372, 0, ATA_UDMA6, "HPT371" }, 81 { ATA_HPT366, 0x05, HPT_372, 0, ATA_UDMA6, "HPT372" }, 82 { ATA_HPT366, 0x03, HPT_370, 0, ATA_UDMA5, "HPT370" }, 83 { ATA_HPT366, 0x02, HPT_366, 0, ATA_UDMA4, "HPT368" }, 84 { ATA_HPT366, 0x00, HPT_366, HPT_OLD, ATA_UDMA4, "HPT366" }, --- 73 unchanged lines hidden (view full) --- 158 159static int 160ata_highpoint_setmode(device_t dev, int target, int mode) 161{ 162 device_t parent = device_get_parent(dev); 163 struct ata_pci_controller *ctlr = device_get_softc(parent); 164 struct ata_channel *ch = device_get_softc(dev); 165 int devno = (ch->unit << 1) + target; | 77 {{ ATA_HPT374, 0x07, HPT_374, 0, ATA_UDMA6, "HPT374" }, 78 { ATA_HPT372, 0x02, HPT_372, 0, ATA_UDMA6, "HPT372N" }, 79 { ATA_HPT372, 0x01, HPT_372, 0, ATA_UDMA6, "HPT372" }, 80 { ATA_HPT371, 0x01, HPT_372, 0, ATA_UDMA6, "HPT371" }, 81 { ATA_HPT366, 0x05, HPT_372, 0, ATA_UDMA6, "HPT372" }, 82 { ATA_HPT366, 0x03, HPT_370, 0, ATA_UDMA5, "HPT370" }, 83 { ATA_HPT366, 0x02, HPT_366, 0, ATA_UDMA4, "HPT368" }, 84 { ATA_HPT366, 0x00, HPT_366, HPT_OLD, ATA_UDMA4, "HPT366" }, --- 73 unchanged lines hidden (view full) --- 158 159static int 160ata_highpoint_setmode(device_t dev, int target, int mode) 161{ 162 device_t parent = device_get_parent(dev); 163 struct ata_pci_controller *ctlr = device_get_softc(parent); 164 struct ata_channel *ch = device_get_softc(dev); 165 int devno = (ch->unit << 1) + target; |
166 u_int32_t timings33[][4] = { 167 /* HPT366 HPT370 HPT372 HPT374 mode */ | 166 static const uint32_t timings33[][4] = { 167 /* HPT366 HPT370 HPT372 HPT374 mode */ |
168 { 0x40d0a7aa, 0x06914e57, 0x0d029d5e, 0x0ac1f48a }, /* PIO 0 */ 169 { 0x40d0a7a3, 0x06914e43, 0x0d029d26, 0x0ac1f465 }, /* PIO 1 */ 170 { 0x40d0a753, 0x06514e33, 0x0c829ca6, 0x0a81f454 }, /* PIO 2 */ 171 { 0x40c8a742, 0x06514e22, 0x0c829c84, 0x0a81f443 }, /* PIO 3 */ 172 { 0x40c8a731, 0x06514e21, 0x0c829c62, 0x0a81f442 }, /* PIO 4 */ 173 { 0x20c8a797, 0x26514e97, 0x2c82922e, 0x228082ea }, /* MWDMA 0 */ 174 { 0x20c8a732, 0x26514e33, 0x2c829266, 0x22808254 }, /* MWDMA 1 */ 175 { 0x20c8a731, 0x26514e21, 0x2c829262, 0x22808242 }, /* MWDMA 2 */ --- 51 unchanged lines hidden --- | 168 { 0x40d0a7aa, 0x06914e57, 0x0d029d5e, 0x0ac1f48a }, /* PIO 0 */ 169 { 0x40d0a7a3, 0x06914e43, 0x0d029d26, 0x0ac1f465 }, /* PIO 1 */ 170 { 0x40d0a753, 0x06514e33, 0x0c829ca6, 0x0a81f454 }, /* PIO 2 */ 171 { 0x40c8a742, 0x06514e22, 0x0c829c84, 0x0a81f443 }, /* PIO 3 */ 172 { 0x40c8a731, 0x06514e21, 0x0c829c62, 0x0a81f442 }, /* PIO 4 */ 173 { 0x20c8a797, 0x26514e97, 0x2c82922e, 0x228082ea }, /* MWDMA 0 */ 174 { 0x20c8a732, 0x26514e33, 0x2c829266, 0x22808254 }, /* MWDMA 1 */ 175 { 0x20c8a731, 0x26514e21, 0x2c829262, 0x22808242 }, /* MWDMA 2 */ --- 51 unchanged lines hidden --- |