Commit Graph

5 Commits

Author SHA1 Message Date
Phil Sutter b98f504639 pata-rb532-cf: remove set_irq_type from finish_io
The driver has been tested without the call to set_irq_type at this
point and occurs to work fine, so it should be safe to remove it.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-01-27 02:13:03 -05:00
Phil Sutter 03f60840fa [libata] pata_rb532_cf: fix signature of the xfer function
Per definition, this function should return the number of bytes
consumed. As the original parameter "buflen" is being decremented inside
the read/write loop, save it in "retlen" at the beginning.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-01 13:49:17 -05:00
Phil Sutter 9f14786e27 [libata] pata_rb532_cf: fix and rename register definitions
The original standalone driver uses a custom address for the error
register. Use it in pata_rb532_cf, too.

Rename two register definitions:
- The address offset 0x0800 in fact is the ATA base, not ATA command
  address.
- The offset 0x0C00 is not a regular ATA data address, but a buffered one
  allowing 4-byte IO.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-12-01 13:49:08 -05:00
Alan Cox a57c1bade5 libata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl
- Make ata_sff_altstatus private so nobody uses it by mistake
- Drop the 400nS delay from it

Add

ata_sff_irq_status	-	encapsulates the IRQ check logic

This function keeps the existing behaviour for altstatus using devices. I
actually suspect the logic was wrong before the changes but -rc isn't the
time to play with that

ata_sff_sync		-	ensure writes hit the device

Really we want an io* operation for 'is posted' eg ioisposted(ioaddr) so
that we can fix the nasty delay this causes on most systems.

- ata_sff_pause		-	400nS delay

Ensure the command hit the device and delay 400nS

- ata_sff_dma_pause

Ensure the I/O hit the device and enforce an HDMA1:0 transition delay.
Requires altstatus register exists, BUG if not so we don't risk
corruption in MWDMA modes. (UDMA the checksum will save your backside in
theory)

The only other complication then is devices with their own handlers.
rb532 can use dma_pause but scc needs to access its own altstatus
register for internal errata workarounds so directly call the drivers own
altstatus function.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-06-04 06:40:41 -04:00
Ralf Baechle 3dd654bfdf [MIPS] ATA: Rename routerboard 500 to 532
The platform is actually named routerboard 532 so let's call it this.  This
patch only rename files, Kconfig and C symbols; no functional changes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-29 02:16:25 -04:00