/* Perform cable detection for ATA66 capable cable. Return a libata cable type.  */
static int cs5536_cable_detect(struct ata_port *ap)
/* Perform cable detection for ATA66 capable cable. Return a libata cable type.  */
static int cs5536_cable_detect(struct ata_port *ap)
{
	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
	u32 cfg;
	cs5536_read(pdev, CFG, &cfg);
	if (cfg & (IDE_CFG_CABLE << ap->port_no))
		return ATA_CBL_PATA80;
	else
		return ATA_CBL_PATA40;
}