diff options
author | Alexandre Bounine <alexandre.bounine@idt.com> | 2013-07-03 18:08:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:08:05 -0400 |
commit | ed5edee2f8547d5c2b28de21cb1471aaea71ee0a (patch) | |
tree | 3efad73b8afcbce1e37ea499f6c3d8cc2a7feac2 /Documentation/rapidio | |
parent | 3bdbb62fe97537252b22f700009863eeb51aa750 (diff) |
rapidio: documentation update
Update RapidIO documentation files to reflect modularization changes.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/rapidio')
-rw-r--r-- | Documentation/rapidio/rapidio.txt | 98 | ||||
-rw-r--r-- | Documentation/rapidio/sysfs.txt | 1 |
2 files changed, 86 insertions, 13 deletions
diff --git a/Documentation/rapidio/rapidio.txt b/Documentation/rapidio/rapidio.txt index a9c16c979da2..717f5aa388b1 100644 --- a/Documentation/rapidio/rapidio.txt +++ b/Documentation/rapidio/rapidio.txt | |||
@@ -73,28 +73,44 @@ data structure. This structure includes lists of all devices and local master | |||
73 | ports that form the same network. It also contains a pointer to the default | 73 | ports that form the same network. It also contains a pointer to the default |
74 | master port that is used to communicate with devices within the network. | 74 | master port that is used to communicate with devices within the network. |
75 | 75 | ||
76 | 2.5 Device Drivers | ||
77 | |||
78 | RapidIO device-specific drivers follow Linux Kernel Driver Model and are | ||
79 | intended to support specific RapidIO devices attached to the RapidIO network. | ||
80 | |||
81 | 2.6 Subsystem Interfaces | ||
82 | |||
83 | RapidIO interconnect specification defines features that may be used to provide | ||
84 | one or more common service layers for all participating RapidIO devices. These | ||
85 | common services may act separately from device-specific drivers or be used by | ||
86 | device-specific drivers. Example of such service provider is the RIONET driver | ||
87 | which implements Ethernet-over-RapidIO interface. Because only one driver can be | ||
88 | registered for a device, all common RapidIO services have to be registered as | ||
89 | subsystem interfaces. This allows to have multiple common services attached to | ||
90 | the same device without blocking attachment of a device-specific driver. | ||
91 | |||
76 | 3. Subsystem Initialization | 92 | 3. Subsystem Initialization |
77 | --------------------------- | 93 | --------------------------- |
78 | 94 | ||
79 | In order to initialize the RapidIO subsystem, a platform must initialize and | 95 | In order to initialize the RapidIO subsystem, a platform must initialize and |
80 | register at least one master port within the RapidIO network. To register mport | 96 | register at least one master port within the RapidIO network. To register mport |
81 | within the subsystem controller driver initialization code calls function | 97 | within the subsystem controller driver's initialization code calls function |
82 | rio_register_mport() for each available master port. | 98 | rio_register_mport() for each available master port. |
83 | 99 | ||
84 | RapidIO subsystem uses subsys_initcall() or device_initcall() to perform | ||
85 | controller initialization (depending on controller device type). | ||
86 | |||
87 | After all active master ports are registered with a RapidIO subsystem, | 100 | After all active master ports are registered with a RapidIO subsystem, |
88 | an enumeration and/or discovery routine may be called automatically or | 101 | an enumeration and/or discovery routine may be called automatically or |
89 | by user-space command. | 102 | by user-space command. |
90 | 103 | ||
104 | RapidIO subsystem can be configured to be built as a statically linked or | ||
105 | modular component of the kernel (see details below). | ||
106 | |||
91 | 4. Enumeration and Discovery | 107 | 4. Enumeration and Discovery |
92 | ---------------------------- | 108 | ---------------------------- |
93 | 109 | ||
94 | 4.1 Overview | 110 | 4.1 Overview |
95 | ------------ | 111 | ------------ |
96 | 112 | ||
97 | RapidIO subsystem configuration options allow users to specify enumeration and | 113 | RapidIO subsystem configuration options allow users to build enumeration and |
98 | discovery methods as statically linked components or loadable modules. | 114 | discovery methods as statically linked components or loadable modules. |
99 | An enumeration/discovery method implementation and available input parameters | 115 | An enumeration/discovery method implementation and available input parameters |
100 | define how any given method can be attached to available RapidIO mports: | 116 | define how any given method can be attached to available RapidIO mports: |
@@ -115,8 +131,8 @@ several methods to initiate an enumeration and/or discovery process: | |||
115 | endpoint waits for enumeration to be completed. If the specified timeout | 131 | endpoint waits for enumeration to be completed. If the specified timeout |
116 | expires the discovery process is terminated without obtaining RapidIO network | 132 | expires the discovery process is terminated without obtaining RapidIO network |
117 | information. NOTE: a timed out discovery process may be restarted later using | 133 | information. NOTE: a timed out discovery process may be restarted later using |
118 | a user-space command as it is described later if the given endpoint was | 134 | a user-space command as it is described below (if the given endpoint was |
119 | enumerated successfully. | 135 | enumerated successfully). |
120 | 136 | ||
121 | (b) Statically linked enumeration and discovery process can be started by | 137 | (b) Statically linked enumeration and discovery process can be started by |
122 | a command from user space. This initiation method provides more flexibility | 138 | a command from user space. This initiation method provides more flexibility |
@@ -138,15 +154,42 @@ When a network scan process is started it calls an enumeration or discovery | |||
138 | routine depending on the configured role of a master port: host or agent. | 154 | routine depending on the configured role of a master port: host or agent. |
139 | 155 | ||
140 | Enumeration is performed by a master port if it is configured as a host port by | 156 | Enumeration is performed by a master port if it is configured as a host port by |
141 | assigning a host device ID greater than or equal to zero. A host device ID is | 157 | assigning a host destination ID greater than or equal to zero. The host |
142 | assigned to a master port through the kernel command line parameter "riohdid=", | 158 | destination ID can be assigned to a master port using various methods depending |
143 | or can be configured in a platform-specific manner. If the host device ID for | 159 | on RapidIO subsystem build configuration: |
144 | a specific master port is set to -1, the discovery process will be performed | 160 | |
145 | for it. | 161 | (a) For a statically linked RapidIO subsystem core use command line parameter |
162 | "rapidio.hdid=" with a list of destination ID assignments in order of mport | ||
163 | device registration. For example, in a system with two RapidIO controllers | ||
164 | the command line parameter "rapidio.hdid=-1,7" will result in assignment of | ||
165 | the host destination ID=7 to the second RapidIO controller, while the first | ||
166 | one will be assigned destination ID=-1. | ||
167 | |||
168 | (b) If the RapidIO subsystem core is built as a loadable module, in addition | ||
169 | to the method shown above, the host destination ID(s) can be specified using | ||
170 | traditional methods of passing module parameter "hdid=" during its loading: | ||
171 | - from command line: "modprobe rapidio hdid=-1,7", or | ||
172 | - from modprobe configuration file using configuration command "options", | ||
173 | like in this example: "options rapidio hdid=-1,7". An example of modprobe | ||
174 | configuration file is provided in the section below. | ||
175 | |||
176 | NOTES: | ||
177 | (i) if "hdid=" parameter is omitted all available mport will be assigned | ||
178 | destination ID = -1; | ||
179 | (ii) the "hdid=" parameter in systems with multiple mports can have | ||
180 | destination ID assignments omitted from the end of list (default = -1). | ||
181 | |||
182 | If the host device ID for a specific master port is set to -1, the discovery | ||
183 | process will be performed for it. | ||
146 | 184 | ||
147 | The enumeration and discovery routines use RapidIO maintenance transactions | 185 | The enumeration and discovery routines use RapidIO maintenance transactions |
148 | to access the configuration space of devices. | 186 | to access the configuration space of devices. |
149 | 187 | ||
188 | NOTE: If RapidIO switch-specific device drivers are built as loadable modules | ||
189 | they must be loaded before enumeration/discovery process starts. | ||
190 | This requirement is cased by the fact that enumeration/discovery methods invoke | ||
191 | vendor-specific callbacks on early stages. | ||
192 | |||
150 | 4.2 Automatic Start of Enumeration and Discovery | 193 | 4.2 Automatic Start of Enumeration and Discovery |
151 | ------------------------------------------------ | 194 | ------------------------------------------------ |
152 | 195 | ||
@@ -266,7 +309,36 @@ method's module initialization routine calls rio_register_scan() to attach | |||
266 | an enumerator to a specified mport device (or devices). The basic enumerator | 309 | an enumerator to a specified mport device (or devices). The basic enumerator |
267 | implementation demonstrates this process. | 310 | implementation demonstrates this process. |
268 | 311 | ||
269 | 5. References | 312 | 4.6 Using Loadable RapidIO Switch Drivers |
313 | ----------------------------------------- | ||
314 | |||
315 | In the case when RapidIO switch drivers are built as loadable modules a user | ||
316 | must ensure that they are loaded before the enumeration/discovery starts. | ||
317 | This process can be automated by specifying pre- or post- dependencies in the | ||
318 | RapidIO-specific modprobe configuration file as shown in the example below. | ||
319 | |||
320 | File /etc/modprobe.d/rapidio.conf: | ||
321 | ---------------------------------- | ||
322 | |||
323 | # Configure RapidIO subsystem modules | ||
324 | |||
325 | # Set enumerator host destination ID (overrides kernel command line option) | ||
326 | options rapidio hdid=-1,2 | ||
327 | |||
328 | # Load RapidIO switch drivers immediately after rapidio core module was loaded | ||
329 | softdep rapidio post: idt_gen2 idtcps tsi57x | ||
330 | |||
331 | # OR : | ||
332 | |||
333 | # Load RapidIO switch drivers just before rio-scan enumerator module is loaded | ||
334 | softdep rio-scan pre: idt_gen2 idtcps tsi57x | ||
335 | |||
336 | -------------------------- | ||
337 | |||
338 | NOTE: In the example above, one of "softdep" commands must be removed or | ||
339 | commented out to keep required module loading sequence. | ||
340 | |||
341 | A. References | ||
270 | ------------- | 342 | ------------- |
271 | 343 | ||
272 | [1] RapidIO Trade Association. RapidIO Interconnect Specifications. | 344 | [1] RapidIO Trade Association. RapidIO Interconnect Specifications. |
diff --git a/Documentation/rapidio/sysfs.txt b/Documentation/rapidio/sysfs.txt index 19878179da4c..271438c0617f 100644 --- a/Documentation/rapidio/sysfs.txt +++ b/Documentation/rapidio/sysfs.txt | |||
@@ -40,6 +40,7 @@ device_rev - returns the device revision level | |||
40 | (see 4.1 for switch specific details) | 40 | (see 4.1 for switch specific details) |
41 | lprev - returns name of previous device (switch) on the path to the device | 41 | lprev - returns name of previous device (switch) on the path to the device |
42 | that that owns this attribute | 42 | that that owns this attribute |
43 | modalias - returns the device modalias | ||
43 | 44 | ||
44 | In addition to the files listed above, each device has a binary attribute file | 45 | In addition to the files listed above, each device has a binary attribute file |
45 | that allows read/write access to the device configuration registers using | 46 | that allows read/write access to the device configuration registers using |