/* Returns 1 if the PATA port may be active. We know how to check this for the 6145 but not the other devices  */
static int marvell_pata_active(struct pci_dev *pdev)
/* Returns 1 if the PATA port may be active. We know how to check this for the 6145 but not the other devices  */
static int marvell_pata_active(struct pci_dev *pdev)
{
	int i;
	u32 devices;
	void __iomem *barp;
	if (pdev->device != 0x6145)
		return 1;
	barp = pci_iomap(pdev, 5, 0x10);
	if (barp == NULL)
		return -ENOMEM;
	printk("BAR5:");
	for(i = 0; i <= 0x0F; i++)
		printk("%02X:%02X ", i, ioread8(barp + i));
	printk("\n");
	devices = ioread32(barp + 0x0C);
	pci_iounmap(pdev, barp);
	if (devices & 0x10)
		return 1;
	return 0;
}