Subject: [PATCH v2 1/3] PATA host controller driver for ep93xx

From: [email-masked] (Rafal Prylowski)
Date: Wed, 04 Apr 2012 09:39:24 +0200

On 2012-04-03 20:25, H Hartley Sweeten wrote:
>> +     /* allocate host */
>> +     host = ata_host_alloc(&pdev->dev, 1);
>> +     if (!host) {
>> +             err = -ENXIO;
>> +             goto err_rel_dma;
>> +     }
>> +
>> +     ep93xx_pata_clear_regs(ide_base);
>> +
>> +     host->n_ports = 1;
> 
> Just a question. Does the single port handle both devices that the ep93xx ide
> interface supports?

Yes, single port should handle both master and slave devices on one cable,
provided that ATA_FLAG_SLAVE_POSS is set in port flags:

>> +     host->private_data = drv_data;
>> +
>> +     ap = host->ports[0];
>> +     ap->dev = &pdev->dev;
>> +     ap->ops = &ep93xx_pata_port_ops;
>> +     ap->flags |= ATA_FLAG_SLAVE_POSS;

Btw, I noticed that host->n_ports is already set in ata_host_alloc, so I'll
remove unneeded line from the driver.

I just tested two disks on one cable, and it works correctly (my previous tests
were limited to only one disk or CF card).

Thanks,
RP