[PATCH] drivers/ide: PATA driver for Celleb

Alan alan at lxorguk.ukuu.org.uk
Tue Nov 21 22:49:53 EST 2006


> We use a drivers/ide driver because its design is more suitable for
> SCC IDE controller than libata driver. Since SCC supports only 32bit

Understand that drivers/ide will be going away at some point long term
but not for a while.

> read/write, we must override many callbacks of ata_port_operations
> by modifying generic helpers. Each time the libata common code is
> updated, we must update those modified helpers. It is very hard for us.
> But we will try to implement the libata driver as needed.

It would be good to do so - the future is libata. It may also help because
it may indicate places were libata not your code should change in order to
get a nicer interface.


> +/* PIO transfer mode  table */
> +/* JCHST */
> +static unsigned long JCHSTtbl[2][7] = {

const...

> +	switch (speed) {
> +	case XFER_UDMA_6:
> +		idx = 6;
> +		break;

These values are carefully arranged so you can do

	if (speed >= XFER_UDMA_0)
		idx = speed - XFER_UDMA_0;
	else
		return 1;


Otherwise looks ready to merge.

Alan



More information about the Linuxppc-dev mailing list