aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/tx4938ide.c
Commit message (Collapse)AuthorAgeFilesLines
* ide: remove hw_regs_t typedefBartlomiej Zolnierkiewicz2009-05-171-1/+1
| | | | | | | | | Remove hw_regs_t typedef and rename struct hw_regs_s to struct ide_hw. There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass number of ports to ide_host_{alloc,add}() (v2)Bartlomiej Zolnierkiewicz2009-05-171-3/+2
| | | | | | | | | | | | | | Pass number of ports to ide_host_{alloc,add}() and then update all users accordingly. v2: - drop no longer needed NULL initializers in buddha.c, cmd640.c and gayle.c (noticed by Sergei) There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tx493[89]ide: Remove big endian version of tx493[89]ide_tf_{load,read}Atsushi Nemoto2009-04-081-87/+2
| | | | | | | | | Now tx493[89]ide_tf_{load,read} do not contain word I/O operations. They are endian-free now. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>, Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: turn selectproc() method into dev_select() method (take 5)Sergei Shtylyov2009-03-311-0/+1
| | | | | | | | | | | Turn selectproc() method into dev_select() method by teaching it to write to the device register and moving it from 'struct ide_port_ops' to 'struct ide_tp_ops'. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: benh@kernel.crashing.org Cc: petkovbb@gmail.com [bart: add ->dev_select to at91_ide.c and tx4939.c (__BIG_ENDIAN case)] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move data register access out of tf_{read|load}() methods (take 2)Sergei Shtylyov2009-03-311-15/+0
| | | | | | | | | Move IDE_FTFLAG_{IN|OUT}_DATA flag handling out of tf_{read|load}() methods into the only two functions where these flags actually need to be handled: do_rw_taskfile() and ide_complete_cmd()... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: call {in|out}put_data() methods from tf_{read|load}() methods (take 2)Sergei Shtylyov2009-03-311-8/+7
| | | | | | | | | Handle IDE_FTFLAG_{IN|OUT}_DATA flags in tf_{read|load}() methods by calling {in|out}put_data() methods to transfer 2 bytes -- this will allow us to move that handling out of those methods altogether... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: rename IDE_TFLAG_IN_[HOB_]FEATURESergei Shtylyov2009-03-311-9/+8
| | | | | | | | | | The feature register has never been readable -- when its location is read, one gets the error register value; hence rename IDE_TFLAG_IN_[HOB_]FEATURE into IDE_TFLAG_IN_[HOB_]ERROR and introduce the 'hob_error' field into the 'struct ide_taskfile' (despite the error register not really depending on the HOB bit). Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: turn set_irq() method into write_devctl() methodSergei Shtylyov2009-03-311-2/+1
| | | | | | | | Turn set_irq() method with its software reset hack into write_devctl() method (for just writing a value into the device control register) at last... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ATA_HOBSergei Shtylyov2009-03-311-2/+2
| | | | | | | Make use of ATA_HOB instead of hard-coded value in the tf_read() method. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass command instead of request to ide_pio_datablock()Bartlomiej Zolnierkiewicz2009-03-271-2/+2
| | | | | | | | | | | | | | | * Add IDE_TFLAG_FS taskfile flag and set it for REQ_TYPE_FS requests. * Convert ->{in,out}put_data methods to take command instead of request as an argument. Then convert pre_task_out_intr(), task_end_request(), task_error(), task_in_unexpected(), ide_pio_sector(), ide_pio_multi() and ide_pio_datablock() in similar way. * Rename task_end_request() to ide_finish_cmd(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_task_t typedefBartlomiej Zolnierkiewicz2009-03-271-31/+31
| | | | | | | | | | | | | | While at it: - rename struct ide_task_s to struct ide_cmd - remove stale comments from idedisk_{read_native,set}_max_address() - drop unused 'cmd' argument from ide_{cmd,task}_ioctl() - drop unused 'task' argument from tx4939ide_tf_load_fixup() - rename ide_complete_task() to ide_complete_cmd() - use consistent naming for struct ide_cmd variables There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "flagged" taskfile flags to struct ide_taskfile (v2)Bartlomiej Zolnierkiewicz2009-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | * Add ->ftf_flags field to struct ide_taskfile and convert flags for TASKFILE ioctl to use it. * Rename "flagged" taskfile flags: - IDE_TFLAG_FLAGGED -> IDE_FTFLAG_FLAGGED - IDE_TFLAG_FLAGGED_SET_IN_FLAGS -> IDE_FTFLAG_SET_IN_FLAGS - IDE_TFLAG_{OUT,IN}_DATA -> IDE_FTFLAG_{OUT,IN}_DATA v2: * Remember to fully update ide-h8300.c, scc_pata.c and tx493{8,9}ide.c (thanks to Stephen Rothwell for noticing). There should be no functional changes caused by this patch. Cc: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: include <asm/ide.h> only when neededBartlomiej Zolnierkiewicz2009-03-271-0/+2
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tx4938ide: Fix build error due to read_sff_dma_status movingAtsushi Nemoto2009-01-141-1/+0
| | | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove chipset type fixup from ide_host_register()Bartlomiej Zolnierkiewicz2009-01-021-0/+1
| | | | | | | | | | | * Set chipset type explicitly in tx4938ide and tx4939ide host drivers (all other host drivers were updated already). * Remove no longer used chipset type fixup from ide_host_register(). Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tx493x: fix indentationBartlomiej Zolnierkiewicz2009-01-021-5/+5
| | | | | | | | Trivial CodingStyle fixup for tx4938ide and tx4939ide drivers. Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tx493[89]ide: Fix length for __ide_flush_dcache_rangeAtsushi Nemoto2008-12-291-2/+2
| | | | | | | | | This fixes data corruption on PIO mode. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: stable <stable@kernel.org> Cc: sshtylyov@ru.mvista.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tx4938ide: Avoid underflow on calculation of a wait cycleAtsushi Nemoto2008-11-021-2/+3
| | | | | | | | | Make 'wt' variable signed while it can be negative during calculation. Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: sshtylyov@ru.mvista.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tx4938ide: Do not call devm_ioremap for whole 128KBAtsushi Nemoto2008-11-021-11/+16
| | | | | | | | | | | Call devm_ioremap() for CS0 and CS1 separetely. And some style cleanups. Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: ralf@linux-mips.org Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* tx4938ide: Check minimum cycle time and SHWT range (v2)Atsushi Nemoto2008-11-021-1/+8
| | | | | | | | | | | | | | SHWT value is used as address valid to -CSx assertion and -CSx to -DIOx assertion setup time, and contrarywise, -DIOx to -CSx release and -CSx release to address invalid hold time, so it actualy applies 4 times and so constitutes -DIOx recovery time. Check requirement of the recovery time and cycle time. Also check SHWT maximum value. Suggested-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: ralf@linux-mips.org Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: Add tx4938ide driver (v2)Atsushi Nemoto2008-10-231-0/+310
This is the driver for the Toshiba TX4938 SoC EBUS controller ATA mode. It has custom set_pio_mode and some hacks for big endian. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: ralf@linux-mips.org Cc: sshtylyov@ru.mvista.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>