diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-05-17 08:55:46 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2017-07-14 15:58:12 -0400 |
commit | 998ff0b5796d53af66a5604d6261f9385be7b6ae (patch) | |
tree | de5ce7beefeb54502dd3a443ab00a24b8a80d7da /Documentation/zorro.txt | |
parent | 29c8c4ac9525b15457266a8fb8bb59f366f5d65b (diff) |
zorro.txt: standardize document format
Each text file under Documentation follows a different
format. Some doesn't even have titles!
Change its representation to follow the adopted standard,
using ReST markups for it to be parseable by Sphinx:
- Use right marks for titles;
- Use authorship marks;
- Mark literals and literal blocks;
- Use autonumbered list for references.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/zorro.txt')
-rw-r--r-- | Documentation/zorro.txt | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/Documentation/zorro.txt b/Documentation/zorro.txt index d530971beb00..664072b017e3 100644 --- a/Documentation/zorro.txt +++ b/Documentation/zorro.txt | |||
@@ -1,12 +1,13 @@ | |||
1 | Writing Device Drivers for Zorro Devices | 1 | ======================================== |
2 | ---------------------------------------- | 2 | Writing Device Drivers for Zorro Devices |
3 | ======================================== | ||
3 | 4 | ||
4 | Written by Geert Uytterhoeven <geert@linux-m68k.org> | 5 | :Author: Written by Geert Uytterhoeven <geert@linux-m68k.org> |
5 | Last revised: September 5, 2003 | 6 | :Last revised: September 5, 2003 |
6 | 7 | ||
7 | 8 | ||
8 | 1. Introduction | 9 | Introduction |
9 | --------------- | 10 | ------------ |
10 | 11 | ||
11 | The Zorro bus is the bus used in the Amiga family of computers. Thanks to | 12 | The Zorro bus is the bus used in the Amiga family of computers. Thanks to |
12 | AutoConfig(tm), it's 100% Plug-and-Play. | 13 | AutoConfig(tm), it's 100% Plug-and-Play. |
@@ -20,12 +21,12 @@ There are two types of Zorro buses, Zorro II and Zorro III: | |||
20 | with Zorro II. The Zorro III address space lies outside the first 16 MB. | 21 | with Zorro II. The Zorro III address space lies outside the first 16 MB. |
21 | 22 | ||
22 | 23 | ||
23 | 2. Probing for Zorro Devices | 24 | Probing for Zorro Devices |
24 | ---------------------------- | 25 | ------------------------- |
25 | 26 | ||
26 | Zorro devices are found by calling `zorro_find_device()', which returns a | 27 | Zorro devices are found by calling ``zorro_find_device()``, which returns a |
27 | pointer to the `next' Zorro device with the specified Zorro ID. A probe loop | 28 | pointer to the ``next`` Zorro device with the specified Zorro ID. A probe loop |
28 | for the board with Zorro ID `ZORRO_PROD_xxx' looks like: | 29 | for the board with Zorro ID ``ZORRO_PROD_xxx`` looks like:: |
29 | 30 | ||
30 | struct zorro_dev *z = NULL; | 31 | struct zorro_dev *z = NULL; |
31 | 32 | ||
@@ -35,8 +36,8 @@ for the board with Zorro ID `ZORRO_PROD_xxx' looks like: | |||
35 | ... | 36 | ... |
36 | } | 37 | } |
37 | 38 | ||
38 | `ZORRO_WILDCARD' acts as a wildcard and finds any Zorro device. If your driver | 39 | ``ZORRO_WILDCARD`` acts as a wildcard and finds any Zorro device. If your driver |
39 | supports different types of boards, you can use a construct like: | 40 | supports different types of boards, you can use a construct like:: |
40 | 41 | ||
41 | struct zorro_dev *z = NULL; | 42 | struct zorro_dev *z = NULL; |
42 | 43 | ||
@@ -49,24 +50,24 @@ supports different types of boards, you can use a construct like: | |||
49 | } | 50 | } |
50 | 51 | ||
51 | 52 | ||
52 | 3. Zorro Resources | 53 | Zorro Resources |
53 | ------------------ | 54 | --------------- |
54 | 55 | ||
55 | Before you can access a Zorro device's registers, you have to make sure it's | 56 | Before you can access a Zorro device's registers, you have to make sure it's |
56 | not yet in use. This is done using the I/O memory space resource management | 57 | not yet in use. This is done using the I/O memory space resource management |
57 | functions: | 58 | functions:: |
58 | 59 | ||
59 | request_mem_region() | 60 | request_mem_region() |
60 | release_mem_region() | 61 | release_mem_region() |
61 | 62 | ||
62 | Shortcuts to claim the whole device's address space are provided as well: | 63 | Shortcuts to claim the whole device's address space are provided as well:: |
63 | 64 | ||
64 | zorro_request_device | 65 | zorro_request_device |
65 | zorro_release_device | 66 | zorro_release_device |
66 | 67 | ||
67 | 68 | ||
68 | 4. Accessing the Zorro Address Space | 69 | Accessing the Zorro Address Space |
69 | ------------------------------------ | 70 | --------------------------------- |
70 | 71 | ||
71 | The address regions in the Zorro device resources are Zorro bus address | 72 | The address regions in the Zorro device resources are Zorro bus address |
72 | regions. Due to the identity bus-physical address mapping on the Zorro bus, | 73 | regions. Due to the identity bus-physical address mapping on the Zorro bus, |
@@ -78,26 +79,26 @@ The treatment of these regions depends on the type of Zorro space: | |||
78 | explicitly using z_ioremap(). | 79 | explicitly using z_ioremap(). |
79 | 80 | ||
80 | Conversion from bus/physical Zorro II addresses to kernel virtual addresses | 81 | Conversion from bus/physical Zorro II addresses to kernel virtual addresses |
81 | and vice versa is done using: | 82 | and vice versa is done using:: |
82 | 83 | ||
83 | virt_addr = ZTWO_VADDR(bus_addr); | 84 | virt_addr = ZTWO_VADDR(bus_addr); |
84 | bus_addr = ZTWO_PADDR(virt_addr); | 85 | bus_addr = ZTWO_PADDR(virt_addr); |
85 | 86 | ||
86 | - Zorro III address space must be mapped explicitly using z_ioremap() first | 87 | - Zorro III address space must be mapped explicitly using z_ioremap() first |
87 | before it can be accessed: | 88 | before it can be accessed:: |
88 | 89 | ||
89 | virt_addr = z_ioremap(bus_addr, size); | 90 | virt_addr = z_ioremap(bus_addr, size); |
90 | ... | 91 | ... |
91 | z_iounmap(virt_addr); | 92 | z_iounmap(virt_addr); |
92 | 93 | ||
93 | 94 | ||
94 | 5. References | 95 | References |
95 | ------------- | 96 | ---------- |
96 | 97 | ||
97 | linux/include/linux/zorro.h | 98 | #. linux/include/linux/zorro.h |
98 | linux/include/uapi/linux/zorro.h | 99 | #. linux/include/uapi/linux/zorro.h |
99 | linux/include/uapi/linux/zorro_ids.h | 100 | #. linux/include/uapi/linux/zorro_ids.h |
100 | linux/arch/m68k/include/asm/zorro.h | 101 | #. linux/arch/m68k/include/asm/zorro.h |
101 | linux/drivers/zorro | 102 | #. linux/drivers/zorro |
102 | /proc/bus/zorro | 103 | #. /proc/bus/zorro |
103 | 104 | ||