18c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii
28c2ecf20Sopenharmony_ciDescription:
38c2ecf20Sopenharmony_ci		For each RapidIO device, the RapidIO subsystem creates files in
48c2ecf20Sopenharmony_ci		an individual subdirectory with the following name format of
58c2ecf20Sopenharmony_ci		device_name "nn:d:iiii", where:
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci		====   ========================================================
88c2ecf20Sopenharmony_ci		nn     two-digit hexadecimal ID of RapidIO network where the
98c2ecf20Sopenharmony_ci		       device resides
108c2ecf20Sopenharmony_ci		d      device type: 'e' - for endpoint or 's' - for switch
118c2ecf20Sopenharmony_ci		iiii   four-digit device destID for endpoints, or switchID for
128c2ecf20Sopenharmony_ci		       switches
138c2ecf20Sopenharmony_ci		====   ========================================================
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci		For example, below is a list of device directories that
168c2ecf20Sopenharmony_ci		represents a typical RapidIO network with one switch, one host,
178c2ecf20Sopenharmony_ci		and two agent endpoints, as it is seen by the enumerating host
188c2ecf20Sopenharmony_ci		(with destID = 1)::
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci		  /sys/bus/rapidio/devices/00:e:0000
218c2ecf20Sopenharmony_ci		  /sys/bus/rapidio/devices/00:e:0002
228c2ecf20Sopenharmony_ci		  /sys/bus/rapidio/devices/00:s:0001
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci		NOTE:
258c2ecf20Sopenharmony_ci		  An enumerating or discovering endpoint does not create a
268c2ecf20Sopenharmony_ci		  sysfs entry for itself, this is why an endpoint with destID=1
278c2ecf20Sopenharmony_ci		  is not shown in the list.
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciAttributes Common for All RapidIO Devices
308c2ecf20Sopenharmony_ci-----------------------------------------
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/did
338c2ecf20Sopenharmony_ciDate:		Nov, 2005
348c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
358c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
368c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
378c2ecf20Sopenharmony_ciDescription:
388c2ecf20Sopenharmony_ci		(RO) returns the device identifier
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/vid
418c2ecf20Sopenharmony_ciDate:		Nov, 2005
428c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
438c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
448c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
458c2ecf20Sopenharmony_ciDescription:
468c2ecf20Sopenharmony_ci		(RO) returns the device vendor identifier
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/device_rev
498c2ecf20Sopenharmony_ciDate:		Nov, 2005
508c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
518c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
528c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
538c2ecf20Sopenharmony_ciDescription:
548c2ecf20Sopenharmony_ci		(RO) returns the device revision level
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/asm_did
578c2ecf20Sopenharmony_ciDate:		Nov, 2005
588c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
598c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
608c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
618c2ecf20Sopenharmony_ciDescription:
628c2ecf20Sopenharmony_ci		(RO) returns identifier for the assembly containing the device
638c2ecf20Sopenharmony_ci
648c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/asm_rev
658c2ecf20Sopenharmony_ciDate:		Nov, 2005
668c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
678c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
688c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
698c2ecf20Sopenharmony_ciDescription:
708c2ecf20Sopenharmony_ci		(RO) returns revision level of the assembly containing the
718c2ecf20Sopenharmony_ci		device
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/asm_vid
748c2ecf20Sopenharmony_ciDate:		Nov, 2005
758c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
768c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
778c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
788c2ecf20Sopenharmony_ciDescription:
798c2ecf20Sopenharmony_ci		(RO) returns vendor identifier of the assembly containing the
808c2ecf20Sopenharmony_ci		device
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/destid
838c2ecf20Sopenharmony_ciDate:		Mar, 2011
848c2ecf20Sopenharmony_ciKernelVersion:	v2.6.3
858c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
868c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
878c2ecf20Sopenharmony_ciDescription:
888c2ecf20Sopenharmony_ci		(RO) returns device destination ID assigned by the enumeration
898c2ecf20Sopenharmony_ci		routine
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/lprev
928c2ecf20Sopenharmony_ciDate:		Mar, 2011
938c2ecf20Sopenharmony_ciKernelVersion:	v2.6.39
948c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
958c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
968c2ecf20Sopenharmony_ciDescription:
978c2ecf20Sopenharmony_ci		(RO) returns name of previous device (switch) on the path to the
988c2ecf20Sopenharmony_ci		device that that owns this attribute
998c2ecf20Sopenharmony_ci
1008c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/modalias
1018c2ecf20Sopenharmony_ciDate:		Jul, 2013
1028c2ecf20Sopenharmony_ciKernelVersion:	v3.11
1038c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1048c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1058c2ecf20Sopenharmony_ciDescription:
1068c2ecf20Sopenharmony_ci		(RO) returns the device modalias
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:d:iiii/config
1098c2ecf20Sopenharmony_ciDate:		Nov, 2005
1108c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
1118c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1128c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1138c2ecf20Sopenharmony_ciDescription:
1148c2ecf20Sopenharmony_ci		(RW) Binary attribute to read from and write to the device
1158c2ecf20Sopenharmony_ci		configuration registers using the RapidIO maintenance
1168c2ecf20Sopenharmony_ci		transactions. This attribute is similar in behaviour to the
1178c2ecf20Sopenharmony_ci		"config" attribute of PCI devices and provides an access to the
1188c2ecf20Sopenharmony_ci		RapidIO device registers using standard file read and write
1198c2ecf20Sopenharmony_ci		operations.
1208c2ecf20Sopenharmony_ci
1218c2ecf20Sopenharmony_ciRapidIO Switch Device Attributes
1228c2ecf20Sopenharmony_ci--------------------------------
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ciRapidIO switches have additional attributes in sysfs. RapidIO subsystem supports
1258c2ecf20Sopenharmony_cicommon and device-specific sysfs attributes for switches. Because switches are
1268c2ecf20Sopenharmony_ciintegrated into the RapidIO subsystem, it offers a method to create
1278c2ecf20Sopenharmony_cidevice-specific sysfs attributes by specifying a callback function that may be
1288c2ecf20Sopenharmony_ciset by the switch initialization routine during enumeration or discovery
1298c2ecf20Sopenharmony_ciprocess.
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:s:iiii/routes
1328c2ecf20Sopenharmony_ciDate:		Nov, 2005
1338c2ecf20Sopenharmony_ciKernelVersion:	v2.6.15
1348c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1358c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1368c2ecf20Sopenharmony_ciDescription:
1378c2ecf20Sopenharmony_ci		(RO) reports switch routing information in "destID port" format.
1388c2ecf20Sopenharmony_ci		This attribute reports only valid routing table entries, one
1398c2ecf20Sopenharmony_ci		line for each entry.
1408c2ecf20Sopenharmony_ci
1418c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:s:iiii/destid
1428c2ecf20Sopenharmony_ciDate:		Mar, 2011
1438c2ecf20Sopenharmony_ciKernelVersion:	v2.6.3
1448c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1458c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1468c2ecf20Sopenharmony_ciDescription:
1478c2ecf20Sopenharmony_ci		(RO) device destination ID of the associated device that defines
1488c2ecf20Sopenharmony_ci		a route to the switch
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:s:iiii/hopcount
1518c2ecf20Sopenharmony_ciDate:		Mar, 2011
1528c2ecf20Sopenharmony_ciKernelVersion:	v2.6.39
1538c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1548c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1558c2ecf20Sopenharmony_ciDescription:
1568c2ecf20Sopenharmony_ci		(RO) number of hops on the path to the switch
1578c2ecf20Sopenharmony_ci
1588c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:s:iiii/lnext
1598c2ecf20Sopenharmony_ciDate:		Mar, 2011
1608c2ecf20Sopenharmony_ciKernelVersion:	v2.6.39
1618c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1628c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1638c2ecf20Sopenharmony_ciDescription:
1648c2ecf20Sopenharmony_ci		(RO) returns names of devices linked to the switch except one of
1658c2ecf20Sopenharmony_ci		a device linked to the ingress port (reported as "lprev"). This
1668c2ecf20Sopenharmony_ci		is an array names with number of lines equal to number of ports
1678c2ecf20Sopenharmony_ci		in switch. If a switch port has no attached device, returns
1688c2ecf20Sopenharmony_ci		"null" instead of a device name.
1698c2ecf20Sopenharmony_ci
1708c2ecf20Sopenharmony_ciDevice-specific Switch Attributes
1718c2ecf20Sopenharmony_ci---------------------------------
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ciIDT_GEN2-
1748c2ecf20Sopenharmony_ci
1758c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/devices/nn:s:iiii/errlog
1768c2ecf20Sopenharmony_ciDate:		Oct, 2010
1778c2ecf20Sopenharmony_ciKernelVersion:	v2.6.37
1788c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1798c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1808c2ecf20Sopenharmony_ciDescription:
1818c2ecf20Sopenharmony_ci		(RO) reads contents of device error log until it is empty.
1828c2ecf20Sopenharmony_ci
1838c2ecf20Sopenharmony_ciRapidIO Bus Attributes
1848c2ecf20Sopenharmony_ci----------------------
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ciWhat:		/sys/bus/rapidio/scan
1878c2ecf20Sopenharmony_ciDate:		May, 2013
1888c2ecf20Sopenharmony_ciKernelVersion:	v3.11
1898c2ecf20Sopenharmony_ciContact:	Matt Porter <mporter@kernel.crashing.org>,
1908c2ecf20Sopenharmony_ci		Alexandre Bounine <alexandre.bounine@idt.com>
1918c2ecf20Sopenharmony_ciDescription:
1928c2ecf20Sopenharmony_ci		(WO) Allows to trigger enumeration discovery process from user
1938c2ecf20Sopenharmony_ci		space. To initiate an enumeration or discovery process on
1948c2ecf20Sopenharmony_ci		specific mport device, a user needs to write mport_ID (not
1958c2ecf20Sopenharmony_ci		RapidIO destination ID) into this file. The mport_ID is a
1968c2ecf20Sopenharmony_ci		sequential number (0 ...  RIO_MAX_MPORTS) assigned to the mport
1978c2ecf20Sopenharmony_ci		device. For example, for a machine with a single RapidIO
1988c2ecf20Sopenharmony_ci		controller, mport_ID for that controller always will be 0. To
1998c2ecf20Sopenharmony_ci		initiate RapidIO enumeration/discovery on all available mports a
2008c2ecf20Sopenharmony_ci		user must write '-1' (or RIO_MPORT_ANY) into this attribute
2018c2ecf20Sopenharmony_ci		file.
202