aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/rapidio
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2013-07-03 18:08:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:08:05 -0400
commited5edee2f8547d5c2b28de21cb1471aaea71ee0a (patch)
tree3efad73b8afcbce1e37ea499f6c3d8cc2a7feac2 /Documentation/rapidio
parent3bdbb62fe97537252b22f700009863eeb51aa750 (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.txt98
-rw-r--r--Documentation/rapidio/sysfs.txt1
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
73ports that form the same network. It also contains a pointer to the default 73ports that form the same network. It also contains a pointer to the default
74master port that is used to communicate with devices within the network. 74master port that is used to communicate with devices within the network.
75 75
762.5 Device Drivers
77
78RapidIO device-specific drivers follow Linux Kernel Driver Model and are
79intended to support specific RapidIO devices attached to the RapidIO network.
80
812.6 Subsystem Interfaces
82
83RapidIO interconnect specification defines features that may be used to provide
84one or more common service layers for all participating RapidIO devices. These
85common services may act separately from device-specific drivers or be used by
86device-specific drivers. Example of such service provider is the RIONET driver
87which implements Ethernet-over-RapidIO interface. Because only one driver can be
88registered for a device, all common RapidIO services have to be registered as
89subsystem interfaces. This allows to have multiple common services attached to
90the same device without blocking attachment of a device-specific driver.
91
763. Subsystem Initialization 923. Subsystem Initialization
77--------------------------- 93---------------------------
78 94
79In order to initialize the RapidIO subsystem, a platform must initialize and 95In order to initialize the RapidIO subsystem, a platform must initialize and
80register at least one master port within the RapidIO network. To register mport 96register at least one master port within the RapidIO network. To register mport
81within the subsystem controller driver initialization code calls function 97within the subsystem controller driver's initialization code calls function
82rio_register_mport() for each available master port. 98rio_register_mport() for each available master port.
83 99
84RapidIO subsystem uses subsys_initcall() or device_initcall() to perform
85controller initialization (depending on controller device type).
86
87After all active master ports are registered with a RapidIO subsystem, 100After all active master ports are registered with a RapidIO subsystem,
88an enumeration and/or discovery routine may be called automatically or 101an enumeration and/or discovery routine may be called automatically or
89by user-space command. 102by user-space command.
90 103
104RapidIO subsystem can be configured to be built as a statically linked or
105modular component of the kernel (see details below).
106
914. Enumeration and Discovery 1074. Enumeration and Discovery
92---------------------------- 108----------------------------
93 109
944.1 Overview 1104.1 Overview
95------------ 111------------
96 112
97RapidIO subsystem configuration options allow users to specify enumeration and 113RapidIO subsystem configuration options allow users to build enumeration and
98discovery methods as statically linked components or loadable modules. 114discovery methods as statically linked components or loadable modules.
99An enumeration/discovery method implementation and available input parameters 115An enumeration/discovery method implementation and available input parameters
100define how any given method can be attached to available RapidIO mports: 116define 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
138routine depending on the configured role of a master port: host or agent. 154routine depending on the configured role of a master port: host or agent.
139 155
140Enumeration is performed by a master port if it is configured as a host port by 156Enumeration is performed by a master port if it is configured as a host port by
141assigning a host device ID greater than or equal to zero. A host device ID is 157assigning a host destination ID greater than or equal to zero. The host
142assigned to a master port through the kernel command line parameter "riohdid=", 158destination ID can be assigned to a master port using various methods depending
143or can be configured in a platform-specific manner. If the host device ID for 159on RapidIO subsystem build configuration:
144a specific master port is set to -1, the discovery process will be performed 160
145for 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
182If the host device ID for a specific master port is set to -1, the discovery
183process will be performed for it.
146 184
147The enumeration and discovery routines use RapidIO maintenance transactions 185The enumeration and discovery routines use RapidIO maintenance transactions
148to access the configuration space of devices. 186to access the configuration space of devices.
149 187
188NOTE: If RapidIO switch-specific device drivers are built as loadable modules
189they must be loaded before enumeration/discovery process starts.
190This requirement is cased by the fact that enumeration/discovery methods invoke
191vendor-specific callbacks on early stages.
192
1504.2 Automatic Start of Enumeration and Discovery 1934.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
266an enumerator to a specified mport device (or devices). The basic enumerator 309an enumerator to a specified mport device (or devices). The basic enumerator
267implementation demonstrates this process. 310implementation demonstrates this process.
268 311
2695. References 3124.6 Using Loadable RapidIO Switch Drivers
313-----------------------------------------
314
315In the case when RapidIO switch drivers are built as loadable modules a user
316must ensure that they are loaded before the enumeration/discovery starts.
317This process can be automated by specifying pre- or post- dependencies in the
318RapidIO-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
338NOTE: In the example above, one of "softdep" commands must be removed or
339commented out to keep required module loading sequence.
340
341A. 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
44In addition to the files listed above, each device has a binary attribute file 45In addition to the files listed above, each device has a binary attribute file
45that allows read/write access to the device configuration registers using 46that allows read/write access to the device configuration registers using