// SPDX-License-Identifier: GPL-2.0-only /* * pata-cs5535.c - CS5535 PATA for new ATA layer * (C) 2005-2006 Red Hat Inc * Alan Cox <alan@lxorguk.ukuu.org.uk> * * based upon cs5535.c from AMD <Jens.Altmann@amd.com> as cleaned up and * made readable and Linux style by Wolfgang Zuleger <wolfgang.zuleger@gmx.de> * and Alexander Kiausch <alex.kiausch@t-online.de> * * Loosely based on the piix & svwks drivers. * * Documentation: * Available from AMD web site. * TODO * Review errata to see if serializing is necessary
*/
/** * cs5535_cable_detect - detect cable type * @ap: Port to detect on * * Perform cable detection for ATA66 capable cable. Return a libata * cable type.
*/
/** * cs5535_set_piomode - PIO setup * @ap: ATA interface * @adev: device on the interface * * Set our PIO requirements. The CS5535 is pretty clean about all this
*/
int mode = adev->pio_mode - XFER_PIO_0; int cmdmode = mode;
/* Command timing has to be for the lowest of the pair of devices */ if (pair) { int pairmode = pair->pio_mode - XFER_PIO_0;
cmdmode = min(mode, pairmode); /* Write the other drive timing register if it changed */ if (cmdmode < pairmode)
wrmsr(ATAC_CH0D0_PIO + 2 * pair->devno,
pio_cmd_timings[cmdmode] << 16 | pio_timings[pairmode], 0);
} /* Write the drive timing register */
wrmsr(ATAC_CH0D0_PIO + 2 * adev->devno,
pio_cmd_timings[cmdmode] << 16 | pio_timings[mode], 0);
/* Set the PIO "format 1" bit in the DMA timing register */
rdmsr(ATAC_CH0D0_DMA + 2 * adev->devno, reg, dummy);
wrmsr(ATAC_CH0D0_DMA + 2 * adev->devno, reg | 0x80000000UL, 0);
}
/** * cs5535_set_dmamode - DMA timing setup * @ap: ATA interface * @adev: Device being configured *
*/
/** * cs5535_init_one - Initialise a CS5530 * @dev: PCI device * @id: Entry in match table * * Install a driver for the newly found CS5530 companion chip. Most of * this is just housekeeping. We have to set the chip up correctly and * turn off various bits of emulation magic.
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.