summaryrefslogtreecommitdiffstats
path: root/Documentation/zorro.txt
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-05-17 08:55:46 -0400
committerJonathan Corbet <corbet@lwn.net>2017-07-14 15:58:12 -0400
commit998ff0b5796d53af66a5604d6261f9385be7b6ae (patch)
treede5ce7beefeb54502dd3a443ab00a24b8a80d7da /Documentation/zorro.txt
parent29c8c4ac9525b15457266a8fb8bb59f366f5d65b (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.txt59
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 ---------------------------------------- 2Writing Device Drivers for Zorro Devices
3========================================
3 4
4Written by Geert Uytterhoeven <geert@linux-m68k.org> 5:Author: Written by Geert Uytterhoeven <geert@linux-m68k.org>
5Last revised: September 5, 2003 6:Last revised: September 5, 2003
6 7
7 8
81. Introduction 9Introduction
9--------------- 10------------
10 11
11The Zorro bus is the bus used in the Amiga family of computers. Thanks to 12The Zorro bus is the bus used in the Amiga family of computers. Thanks to
12AutoConfig(tm), it's 100% Plug-and-Play. 13AutoConfig(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
232. Probing for Zorro Devices 24Probing for Zorro Devices
24---------------------------- 25-------------------------
25 26
26Zorro devices are found by calling `zorro_find_device()', which returns a 27Zorro devices are found by calling ``zorro_find_device()``, which returns a
27pointer to the `next' Zorro device with the specified Zorro ID. A probe loop 28pointer to the ``next`` Zorro device with the specified Zorro ID. A probe loop
28for the board with Zorro ID `ZORRO_PROD_xxx' looks like: 29for 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
39supports different types of boards, you can use a construct like: 40supports 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
523. Zorro Resources 53Zorro Resources
53------------------ 54---------------
54 55
55Before you can access a Zorro device's registers, you have to make sure it's 56Before you can access a Zorro device's registers, you have to make sure it's
56not yet in use. This is done using the I/O memory space resource management 57not yet in use. This is done using the I/O memory space resource management
57functions: 58functions::
58 59
59 request_mem_region() 60 request_mem_region()
60 release_mem_region() 61 release_mem_region()
61 62
62Shortcuts to claim the whole device's address space are provided as well: 63Shortcuts 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
684. Accessing the Zorro Address Space 69Accessing the Zorro Address Space
69------------------------------------ 70---------------------------------
70 71
71The address regions in the Zorro device resources are Zorro bus address 72The address regions in the Zorro device resources are Zorro bus address
72regions. Due to the identity bus-physical address mapping on the Zorro bus, 73regions. 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
945. References 95References
95------------- 96----------
96 97
97linux/include/linux/zorro.h 98#. linux/include/linux/zorro.h
98linux/include/uapi/linux/zorro.h 99#. linux/include/uapi/linux/zorro.h
99linux/include/uapi/linux/zorro_ids.h 100#. linux/include/uapi/linux/zorro_ids.h
100linux/arch/m68k/include/asm/zorro.h 101#. linux/arch/m68k/include/asm/zorro.h
101linux/drivers/zorro 102#. linux/drivers/zorro
102/proc/bus/zorro 103#. /proc/bus/zorro
103 104