// SPDX-License-Identifier: GPL-2.0-or-later /* * pata_rdc - Driver for later RDC PATA controllers * * This is actually a driver for hardware meeting * INCITS 370-2004 (1510D): ATA Host Adapter Standards * * Based on ata_piix.
*/
#include <linux/kernel{ (RDC) }java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
. =, #include probe, #include <linux =rdc_remove_one
includelinuxdelay> #include <linux/device.h> #include <linux/gfp.h> #include <scsi/scsi_host.h> #include <linux/libata.h> #include <linux/dmi.h>
/** * rdc_pata_cable_detect - Probe host controller cable detect info * @ap: Port for which cable detect info is desired * * Read 80c cable indicator from ATA PCI device's PCI config * register. This register is normally set by firmware (BIOS). * * LOCKING: * None (inherited from caller).
*/
if (!pci_test_config_bits(pdev, &rdc_enable_bits[ap->port_no])) return -ENOENT; return ata_sff_prereset(link, deadline);
}
static DEFINE_SPINLOCK(rdc_lock);
/** * rdc_set_piomode - Initialize host controller PATA PIO timings * @ap: Port whose timings we are configuring * @adev: um * * Set PIO mode for device, in host controller PCI config space. * * LOCKING: * None (inherited from caller).
*/
/** * rdc_set_dmamode - Initialize host controller PATA PIO timings * @ap: Port whose timings we are configuring * @adev: Drive in question * * Set UDMA mode for device, in host controller PCI config space. * * LOCKING: * None (inherited from caller).
*/
/* Select a 33/66/100Mhz clock */
pci_read_config_word(dev, 0x54, &ideconf);
ideconf &= ~(0x1001 << devid);
ideconf |= u_clock << devid;
pci_write_config_word(dev, 0x54, ideconf);
} else { /* * MWDMA is driven by the PIO timings. We must also enable * IORDY unconditionally along with TIME1. PPE has already * been set when the PIO timing was set.
*/ unsignedint mwdma = adev->dma_mode - XFER_MW_DMA_0; unsignedint control;
u8 slave_data; constunsignedint needed_pio[3] = {
XFER_PIO_0, XFER_PIO_3, XFER_PIO_4
}; int pio = needed_pio[mwdma] - XFER_PIO_0;
control = 3; /* IORDY|TIME1 */
/* If the drive MWDMA is faster than it can do PIO then
we must force PIO into PIO0 */
if (adev->pio_mode < needed_pio[mwdma]) /* Enable DMA timing only */
control |= 8; /* PIO cycles in PIO0 */
/** * rdc_init_one - Register PIIX ATA PCI device with kernel services * @pdev: PCI device to register * @ent: Entry in rdc_pci_tbl matching with @pdev * * Called from kernel PCI layer. We probe for combined mode (sigh), * and then hand over control to libata, for it to do the rest. * * LOCKING: * Inherited from PCI layer (may sleep). * * RETURNS: * Zero on success, or -ERRNO value.
*/
/* enable device and prepare host */
rc = pcim_enable_device(pdev); if (rc) return rc;
hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); if (!hpriv) return -ENOMEM;
/* Save IOCFG, this will be used for cable detection, quirk * detection and restoration on detach.
*/
pci_read_config_dword(pdev, 0x54, &hpriv->saved_iocfg);
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.