aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/libata.tmpl49
-rw-r--r--Documentation/DocBook/tracepoint.tmpl13
2 files changed, 29 insertions, 33 deletions
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl
index ba9975771503..ff3e5bec1c24 100644
--- a/Documentation/DocBook/libata.tmpl
+++ b/Documentation/DocBook/libata.tmpl
@@ -107,10 +107,6 @@ void (*dev_config) (struct ata_port *, struct ata_device *);
107 issue of SET FEATURES - XFER MODE, and prior to operation. 107 issue of SET FEATURES - XFER MODE, and prior to operation.
108 </para> 108 </para>
109 <para> 109 <para>
110 Called by ata_device_add() after ata_dev_identify() determines
111 a device is present.
112 </para>
113 <para>
114 This entry may be specified as NULL in ata_port_operations. 110 This entry may be specified as NULL in ata_port_operations.
115 </para> 111 </para>
116 112
@@ -154,8 +150,8 @@ unsigned int (*mode_filter) (struct ata_port *, struct ata_device *, unsigned in
154 150
155 <sect2><title>Taskfile read/write</title> 151 <sect2><title>Taskfile read/write</title>
156 <programlisting> 152 <programlisting>
157void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf); 153void (*sff_tf_load) (struct ata_port *ap, struct ata_taskfile *tf);
158void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); 154void (*sff_tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
159 </programlisting> 155 </programlisting>
160 156
161 <para> 157 <para>
@@ -164,36 +160,35 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf);
164 hardware registers / DMA buffers, to obtain the current set of 160 hardware registers / DMA buffers, to obtain the current set of
165 taskfile register values. 161 taskfile register values.
166 Most drivers for taskfile-based hardware (PIO or MMIO) use 162 Most drivers for taskfile-based hardware (PIO or MMIO) use
167 ata_tf_load() and ata_tf_read() for these hooks. 163 ata_sff_tf_load() and ata_sff_tf_read() for these hooks.
168 </para> 164 </para>
169 165
170 </sect2> 166 </sect2>
171 167
172 <sect2><title>PIO data read/write</title> 168 <sect2><title>PIO data read/write</title>
173 <programlisting> 169 <programlisting>
174void (*data_xfer) (struct ata_device *, unsigned char *, unsigned int, int); 170void (*sff_data_xfer) (struct ata_device *, unsigned char *, unsigned int, int);
175 </programlisting> 171 </programlisting>
176 172
177 <para> 173 <para>
178All bmdma-style drivers must implement this hook. This is the low-level 174All bmdma-style drivers must implement this hook. This is the low-level
179operation that actually copies the data bytes during a PIO data 175operation that actually copies the data bytes during a PIO data
180transfer. 176transfer.
181Typically the driver 177Typically the driver will choose one of ata_sff_data_xfer_noirq(),
182will choose one of ata_pio_data_xfer_noirq(), ata_pio_data_xfer(), or 178ata_sff_data_xfer(), or ata_sff_data_xfer32().
183ata_mmio_data_xfer().
184 </para> 179 </para>
185 180
186 </sect2> 181 </sect2>
187 182
188 <sect2><title>ATA command execute</title> 183 <sect2><title>ATA command execute</title>
189 <programlisting> 184 <programlisting>
190void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); 185void (*sff_exec_command)(struct ata_port *ap, struct ata_taskfile *tf);
191 </programlisting> 186 </programlisting>
192 187
193 <para> 188 <para>
194 causes an ATA command, previously loaded with 189 causes an ATA command, previously loaded with
195 ->tf_load(), to be initiated in hardware. 190 ->tf_load(), to be initiated in hardware.
196 Most drivers for taskfile-based hardware use ata_exec_command() 191 Most drivers for taskfile-based hardware use ata_sff_exec_command()
197 for this hook. 192 for this hook.
198 </para> 193 </para>
199 194
@@ -218,8 +213,8 @@ command.
218 213
219 <sect2><title>Read specific ATA shadow registers</title> 214 <sect2><title>Read specific ATA shadow registers</title>
220 <programlisting> 215 <programlisting>
221u8 (*check_status)(struct ata_port *ap); 216u8 (*sff_check_status)(struct ata_port *ap);
222u8 (*check_altstatus)(struct ata_port *ap); 217u8 (*sff_check_altstatus)(struct ata_port *ap);
223 </programlisting> 218 </programlisting>
224 219
225 <para> 220 <para>
@@ -227,20 +222,14 @@ u8 (*check_altstatus)(struct ata_port *ap);
227 hardware. On some hardware, reading the Status register has 222 hardware. On some hardware, reading the Status register has
228 the side effect of clearing the interrupt condition. 223 the side effect of clearing the interrupt condition.
229 Most drivers for taskfile-based hardware use 224 Most drivers for taskfile-based hardware use
230 ata_check_status() for this hook. 225 ata_sff_check_status() for this hook.
231 </para>
232 <para>
233 Note that because this is called from ata_device_add(), at
234 least a dummy function that clears device interrupts must be
235 provided for all drivers, even if the controller doesn't
236 actually have a taskfile status register.
237 </para> 226 </para>
238 227
239 </sect2> 228 </sect2>
240 229
241 <sect2><title>Select ATA device on bus</title> 230 <sect2><title>Select ATA device on bus</title>
242 <programlisting> 231 <programlisting>
243void (*dev_select)(struct ata_port *ap, unsigned int device); 232void (*sff_dev_select)(struct ata_port *ap, unsigned int device);
244 </programlisting> 233 </programlisting>
245 234
246 <para> 235 <para>
@@ -251,9 +240,7 @@ void (*dev_select)(struct ata_port *ap, unsigned int device);
251 </para> 240 </para>
252 <para> 241 <para>
253 Most drivers for taskfile-based hardware use 242 Most drivers for taskfile-based hardware use
254 ata_std_dev_select() for this hook. Controllers which do not 243 ata_sff_dev_select() for this hook.
255 support second drives on a port (such as SATA contollers) will
256 use ata_noop_dev_select().
257 </para> 244 </para>
258 245
259 </sect2> 246 </sect2>
@@ -441,13 +428,13 @@ void (*irq_clear) (struct ata_port *);
441 to struct ata_host_set. 428 to struct ata_host_set.
442 </para> 429 </para>
443 <para> 430 <para>
444 Most legacy IDE drivers use ata_interrupt() for the 431 Most legacy IDE drivers use ata_sff_interrupt() for the
445 irq_handler hook, which scans all ports in the host_set, 432 irq_handler hook, which scans all ports in the host_set,
446 determines which queued command was active (if any), and calls 433 determines which queued command was active (if any), and calls
447 ata_host_intr(ap,qc). 434 ata_sff_host_intr(ap,qc).
448 </para> 435 </para>
449 <para> 436 <para>
450 Most legacy IDE drivers use ata_bmdma_irq_clear() for the 437 Most legacy IDE drivers use ata_sff_irq_clear() for the
451 irq_clear() hook, which simply clears the interrupt and error 438 irq_clear() hook, which simply clears the interrupt and error
452 flags in the DMA status register. 439 flags in the DMA status register.
453 </para> 440 </para>
@@ -496,10 +483,6 @@ void (*host_stop) (struct ata_host_set *host_set);
496 data from port at this time. 483 data from port at this time.
497 </para> 484 </para>
498 <para> 485 <para>
499 Many drivers use ata_port_stop() as this hook, which frees the
500 PRD table.
501 </para>
502 <para>
503 ->host_stop() is called after all ->port_stop() calls 486 ->host_stop() is called after all ->port_stop() calls
504have completed. The hook must finalize hardware shutdown, release DMA 487have completed. The hook must finalize hardware shutdown, release DMA
505and other resources, etc. 488and other resources, etc.
diff --git a/Documentation/DocBook/tracepoint.tmpl b/Documentation/DocBook/tracepoint.tmpl
index 8bca1d5cec09..e8473eae2a20 100644
--- a/Documentation/DocBook/tracepoint.tmpl
+++ b/Documentation/DocBook/tracepoint.tmpl
@@ -16,6 +16,15 @@
16 </address> 16 </address>
17 </affiliation> 17 </affiliation>
18 </author> 18 </author>
19 <author>
20 <firstname>William</firstname>
21 <surname>Cohen</surname>
22 <affiliation>
23 <address>
24 <email>wcohen@redhat.com</email>
25 </address>
26 </affiliation>
27 </author>
19 </authorgroup> 28 </authorgroup>
20 29
21 <legalnotice> 30 <legalnotice>
@@ -91,4 +100,8 @@
91!Iinclude/trace/events/signal.h 100!Iinclude/trace/events/signal.h
92 </chapter> 101 </chapter>
93 102
103 <chapter id="block">
104 <title>Block IO</title>
105!Iinclude/trace/events/block.h
106 </chapter>
94</book> 107</book>