Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexandre Bounine and committed by
Linus Torvalds
ed5edee2 3bdbb62f

+86 -13
+85 -13
Documentation/rapidio/rapidio.txt
··· 73 73 ports that form the same network. It also contains a pointer to the default 74 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 92 3. Subsystem Initialization 77 93 --------------------------- 78 94 79 95 In order to initialize the RapidIO subsystem, a platform must initialize and 80 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 98 rio_register_mport() for each available master port. 83 - 84 - RapidIO subsystem uses subsys_initcall() or device_initcall() to perform 85 - controller initialization (depending on controller device type). 86 99 87 100 After all active master ports are registered with a RapidIO subsystem, 88 101 an enumeration and/or discovery routine may be called automatically or 89 102 by user-space command. 103 + 104 + RapidIO subsystem can be configured to be built as a statically linked or 105 + modular component of the kernel (see details below). 90 106 91 107 4. Enumeration and Discovery 92 108 ---------------------------- ··· 110 94 4.1 Overview 111 95 ------------ 112 96 113 - RapidIO subsystem configuration options allow users to specify enumeration and 97 + RapidIO subsystem configuration options allow users to build enumeration and 114 98 discovery methods as statically linked components or loadable modules. 115 99 An enumeration/discovery method implementation and available input parameters 116 100 define how any given method can be attached to available RapidIO mports: ··· 131 115 endpoint waits for enumeration to be completed. If the specified timeout 132 116 expires the discovery process is terminated without obtaining RapidIO network 133 117 information. NOTE: a timed out discovery process may be restarted later using 134 - a user-space command as it is described later if the given endpoint was 135 - enumerated successfully. 118 + a user-space command as it is described below (if the given endpoint was 119 + enumerated successfully). 136 120 137 121 (b) Statically linked enumeration and discovery process can be started by 138 122 a command from user space. This initiation method provides more flexibility ··· 154 138 routine depending on the configured role of a master port: host or agent. 155 139 156 140 Enumeration is performed by a master port if it is configured as a host port by 157 - assigning a host device ID greater than or equal to zero. A host device ID is 158 - assigned to a master port through the kernel command line parameter "riohdid=", 159 - or can be configured in a platform-specific manner. If the host device ID for 160 - a specific master port is set to -1, the discovery process will be performed 161 - for it. 141 + assigning a host destination ID greater than or equal to zero. The host 142 + destination ID can be assigned to a master port using various methods depending 143 + on RapidIO subsystem build configuration: 144 + 145 + (a) For a statically linked RapidIO subsystem core use command line parameter 146 + "rapidio.hdid=" with a list of destination ID assignments in order of mport 147 + device registration. For example, in a system with two RapidIO controllers 148 + the command line parameter "rapidio.hdid=-1,7" will result in assignment of 149 + the host destination ID=7 to the second RapidIO controller, while the first 150 + one will be assigned destination ID=-1. 151 + 152 + (b) If the RapidIO subsystem core is built as a loadable module, in addition 153 + to the method shown above, the host destination ID(s) can be specified using 154 + traditional methods of passing module parameter "hdid=" during its loading: 155 + - from command line: "modprobe rapidio hdid=-1,7", or 156 + - from modprobe configuration file using configuration command "options", 157 + like in this example: "options rapidio hdid=-1,7". An example of modprobe 158 + configuration file is provided in the section below. 159 + 160 + NOTES: 161 + (i) if "hdid=" parameter is omitted all available mport will be assigned 162 + destination ID = -1; 163 + (ii) the "hdid=" parameter in systems with multiple mports can have 164 + destination ID assignments omitted from the end of list (default = -1). 165 + 166 + If the host device ID for a specific master port is set to -1, the discovery 167 + process will be performed for it. 162 168 163 169 The enumeration and discovery routines use RapidIO maintenance transactions 164 170 to access the configuration space of devices. 171 + 172 + NOTE: If RapidIO switch-specific device drivers are built as loadable modules 173 + they must be loaded before enumeration/discovery process starts. 174 + This requirement is cased by the fact that enumeration/discovery methods invoke 175 + vendor-specific callbacks on early stages. 165 176 166 177 4.2 Automatic Start of Enumeration and Discovery 167 178 ------------------------------------------------ ··· 309 266 an enumerator to a specified mport device (or devices). The basic enumerator 310 267 implementation demonstrates this process. 311 268 312 - 5. References 269 + 4.6 Using Loadable RapidIO Switch Drivers 270 + ----------------------------------------- 271 + 272 + In the case when RapidIO switch drivers are built as loadable modules a user 273 + must ensure that they are loaded before the enumeration/discovery starts. 274 + This process can be automated by specifying pre- or post- dependencies in the 275 + RapidIO-specific modprobe configuration file as shown in the example below. 276 + 277 + File /etc/modprobe.d/rapidio.conf: 278 + ---------------------------------- 279 + 280 + # Configure RapidIO subsystem modules 281 + 282 + # Set enumerator host destination ID (overrides kernel command line option) 283 + options rapidio hdid=-1,2 284 + 285 + # Load RapidIO switch drivers immediately after rapidio core module was loaded 286 + softdep rapidio post: idt_gen2 idtcps tsi57x 287 + 288 + # OR : 289 + 290 + # Load RapidIO switch drivers just before rio-scan enumerator module is loaded 291 + softdep rio-scan pre: idt_gen2 idtcps tsi57x 292 + 293 + -------------------------- 294 + 295 + NOTE: In the example above, one of "softdep" commands must be removed or 296 + commented out to keep required module loading sequence. 297 + 298 + A. References 313 299 ------------- 314 300 315 301 [1] RapidIO Trade Association. RapidIO Interconnect Specifications.
+1
Documentation/rapidio/sysfs.txt
··· 40 40 (see 4.1 for switch specific details) 41 41 lprev - returns name of previous device (switch) on the path to the device 42 42 that that owns this attribute 43 + modalias - returns the device modalias 43 44 44 45 In addition to the files listed above, each device has a binary attribute file 45 46 that allows read/write access to the device configuration registers using