<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
        "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
	<!ENTITY rapidio SYSTEM "rapidio.xml">
	]>

<book id="RapidIO-Guide">
 <bookinfo>
  <title>RapidIO Subsystem Guide</title>

  <authorgroup>
   <author>
    <firstname>Matt</firstname>
    <surname>Porter</surname>
    <affiliation>
     <address>
      <email>mporter@kernel.crashing.org</email>
      <email>mporter@mvista.com</email>
     </address>
    </affiliation>
   </author>
  </authorgroup>

  <copyright>
   <year>2005</year>
   <holder>MontaVista Software, Inc.</holder>
  </copyright>

  <legalnotice>
   <para>
     This documentation is free software; you can redistribute
     it and/or modify it under the terms of the GNU General Public
     License version 2 as published by the Free Software Foundation.
   </para>

   <para>
     This program is distributed in the hope that it will be
     useful, but WITHOUT ANY WARRANTY; without even the implied
     warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     See the GNU General Public License for more details.
   </para>

   <para>
     You should have received a copy of the GNU General Public
     License along with this program; if not, write to the Free
     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
     MA 02111-1307 USA
   </para>

   <para>
     For more details see the file COPYING in the source
     distribution of Linux.
   </para>
  </legalnotice>
 </bookinfo>

<toc></toc>

  <chapter id="intro">
      <title>Introduction</title>
  <para>
	RapidIO is a high speed switched fabric interconnect with
	features aimed at the embedded market.  RapidIO provides
	support for memory-mapped I/O as well as message-based
	transactions over the switched fabric network. RapidIO has
	a standardized discovery mechanism not unlike the PCI bus
	standard that allows simple detection of devices in a
	network.
  </para>
  <para>
  	This documentation is provided for developers intending
	to support RapidIO on new architectures, write new drivers,
	or to understand the subsystem internals.
  </para>
  </chapter>

  <chapter id="bugs">
     <title>Known Bugs and Limitations</title>

     <sect1 id="known_bugs">
     	<title>Bugs</title>
	  <para>None. ;)</para>
     </sect1>
     <sect1 id="Limitations">
     	<title>Limitations</title>
	  <para>
	    <orderedlist>
	      <listitem><para>Access/management of RapidIO memory regions is not supported</para></listitem>
	      <listitem><para>Multiple host enumeration is not supported</para></listitem>
	    </orderedlist>
	 </para>
     </sect1>
  </chapter>

  <chapter id="drivers">
     	<title>RapidIO driver interface</title>
	<para>
		Drivers are provided a set of calls in order
		to interface with the subsystem to gather info
		on devices, request/map memory region resources,
		and manage mailboxes/doorbells.
	</para>
	<sect1 id="Functions">
		<title>Functions</title>
<!-- include/linux/rio_drv.h -->
<refentry id="API-rio-local-read-config-32">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_read_config_32</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_read_config_32</refname>
 <refpurpose>
  Read 32 bits from local configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_local_read_config_32 </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u32 * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into local configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Pointer to read data into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads 32 bits of data from the specified offset within the local
   device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-local-write-config-32">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_write_config_32</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_write_config_32</refname>
 <refpurpose>
     Write 32 bits to local configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_local_write_config_32 </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u32 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into local configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Data to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes 32 bits of data to the specified offset within the local
   device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-local-read-config-16">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_read_config_16</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_read_config_16</refname>
 <refpurpose>
     Read 16 bits from local configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_local_read_config_16 </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u16 * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into local configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Pointer to read data into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads 16 bits of data from the specified offset within the local
   device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-local-write-config-16">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_write_config_16</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_write_config_16</refname>
 <refpurpose>
     Write 16 bits to local configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_local_write_config_16 </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u16 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into local configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Data to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes 16 bits of data to the specified offset within the local
   device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-local-read-config-8">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_read_config_8</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_read_config_8</refname>
 <refpurpose>
     Read 8 bits from local configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_local_read_config_8 </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u8 * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into local configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Pointer to read data into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads 8 bits of data from the specified offset within the local
   device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-local-write-config-8">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_write_config_8</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_write_config_8</refname>
 <refpurpose>
     Write 8 bits to local configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_local_write_config_8 </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u8 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into local configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Data to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes 8 bits of data to the specified offset within the local
   device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-read-config-32">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_read_config_32</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_read_config_32</refname>
 <refpurpose>
     Read 32 bits from configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_read_config_32 </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u32 * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into device configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Pointer to read data into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads 32 bits of data from the specified offset within the
   RIO device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-write-config-32">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_write_config_32</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_write_config_32</refname>
 <refpurpose>
     Write 32 bits to configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_write_config_32 </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u32 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into device configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Data to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes 32 bits of data to the specified offset within the
   RIO device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-read-config-16">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_read_config_16</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_read_config_16</refname>
 <refpurpose>
     Read 16 bits from configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_read_config_16 </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u16 * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into device configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Pointer to read data into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads 16 bits of data from the specified offset within the
   RIO device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-write-config-16">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_write_config_16</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_write_config_16</refname>
 <refpurpose>
     Write 16 bits to configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_write_config_16 </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u16 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into device configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Data to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes 16 bits of data to the specified offset within the
   RIO device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-read-config-8">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_read_config_8</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_read_config_8</refname>
 <refpurpose>
     Read 8 bits from configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_read_config_8 </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u8 * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into device configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Pointer to read data into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads 8 bits of data from the specified offset within the
   RIO device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-write-config-8">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_write_config_8</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_write_config_8</refname>
 <refpurpose>
     Write 8 bits to configuration space
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_write_config_8 </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>u8 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into device configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Data to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes 8 bits of data to the specified offset within the
   RIO device's configuration space.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-send-doorbell">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_send_doorbell</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_send_doorbell</refname>
 <refpurpose>
     Send a doorbell message to a device
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_send_doorbell </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u16 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Doorbell message data
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Send a doorbell message to a RIO device. The doorbell message
   has a 16-bit info field provided by the <parameter>data</parameter> argument.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-init-mbox-res">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_init_mbox_res</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_init_mbox_res</refname>
 <refpurpose>
     Initialize a RIO mailbox resource
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_init_mbox_res </function></funcdef>
   <paramdef>struct resource * <parameter>res</parameter></paramdef>
   <paramdef>int <parameter>start</parameter></paramdef>
   <paramdef>int <parameter>end</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>res</parameter></term>
   <listitem>
    <para>
     resource struct
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>start</parameter></term>
   <listitem>
    <para>
     start of mailbox range
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>end</parameter></term>
   <listitem>
    <para>
     end of mailbox range
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   This function is used to initialize the fields of a resource
   for use as a mailbox resource.  It initializes a range of
   mailboxes using the start and end arguments.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-init-dbell-res">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_init_dbell_res</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_init_dbell_res</refname>
 <refpurpose>
     Initialize a RIO doorbell resource
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_init_dbell_res </function></funcdef>
   <paramdef>struct resource * <parameter>res</parameter></paramdef>
   <paramdef>u16 <parameter>start</parameter></paramdef>
   <paramdef>u16 <parameter>end</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>res</parameter></term>
   <listitem>
    <para>
     resource struct
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>start</parameter></term>
   <listitem>
    <para>
     start of doorbell range
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>end</parameter></term>
   <listitem>
    <para>
     end of doorbell range
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   This function is used to initialize the fields of a resource
   for use as a doorbell resource.  It initializes a range of
   doorbell messages using the start and end arguments.
</para>
</refsect1>
</refentry>

<refentry id="API-RIO-DEVICE">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>RIO_DEVICE</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>RIO_DEVICE</refname>
 <refpurpose>
     macro used to describe a specific RIO device
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef> <function>RIO_DEVICE </function></funcdef>
   <paramdef> <parameter>dev</parameter></paramdef>
   <paramdef> <parameter>ven</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>dev</parameter></term>
   <listitem>
    <para>
     the 16 bit RIO device ID
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>ven</parameter></term>
   <listitem>
    <para>
     the 16 bit RIO vendor ID
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   This macro is used to create a struct rio_device_id that matches a
   specific device.  The assembly vendor and assembly device fields
   will be set to <constant>RIO_ANY_ID</constant>.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-add-outb-message">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_add_outb_message</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_add_outb_message</refname>
 <refpurpose>
     Add RIO message to an outbound mailbox queue
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_add_outb_message </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>void * <parameter>buffer</parameter></paramdef>
   <paramdef>size_t <parameter>len</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port containing the outbound queue
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device the message is be sent to
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     The outbound mailbox queue
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>buffer</parameter></term>
   <listitem>
    <para>
     Pointer to the message buffer
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length of the message buffer
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds a RIO message buffer to an outbound mailbox queue for
   transmission. Returns 0 on success.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-add-inb-buffer">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_add_inb_buffer</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_add_inb_buffer</refname>
 <refpurpose>
     Add buffer to an inbound mailbox queue
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_add_inb_buffer </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>void * <parameter>buffer</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port containing the inbound mailbox
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     The inbound mailbox number
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>buffer</parameter></term>
   <listitem>
    <para>
     Pointer to the message buffer
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds a buffer to an inbound mailbox queue for reception. Returns
   0 on success.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-get-inb-message">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_inb_message</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_inb_message</refname>
 <refpurpose>
     Get A RIO message from an inbound mailbox queue
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void * <function>rio_get_inb_message </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port containing the inbound mailbox
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     The inbound mailbox number
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Get a RIO message from an inbound mailbox queue. Returns 0 on success.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-name">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_name</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_name</refname>
 <refpurpose>
     Get the unique RIO device identifier
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>char * <function>rio_name </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Get the unique RIO device identifier. Returns the device
   identifier string.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-get-drvdata">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_drvdata</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_drvdata</refname>
 <refpurpose>
     Get RIO driver specific data
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void * <function>rio_get_drvdata </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Get RIO driver specific data. Returns a pointer to the
   driver specific data.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-set-drvdata">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_set_drvdata</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_set_drvdata</refname>
 <refpurpose>
     Set RIO driver specific data
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_set_drvdata </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>void * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Pointer to driver specific data
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Set RIO driver specific data. device struct driver data pointer
   is set to the <parameter>data</parameter> argument.
</para>
</refsect1>
</refentry>

<!-- drivers/rapidio/rio-driver.c -->
<refentry id="API-rio-dev-get">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_dev_get</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_dev_get</refname>
 <refpurpose>
  Increments the reference count of the RIO device structure
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>struct rio_dev * <function>rio_dev_get </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device being referenced
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Each live reference to a device should be refcounted.
   </para><para>

   Drivers for RIO devices should normally record such references in
   their <function>probe</function> methods, when they bind to a device, and release
   them by calling <function>rio_dev_put</function>, in their <function>disconnect</function> methods.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-dev-put">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_dev_put</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_dev_put</refname>
 <refpurpose>
     Release a use of the RIO device structure
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_dev_put </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device being disconnected
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Must be called when a user of a device is finished with it.
   When the last user of the device calls this function, the
   memory of the device is freed.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-register-driver">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_register_driver</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_register_driver</refname>
 <refpurpose>
     register a new RIO driver
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_register_driver </function></funcdef>
   <paramdef>struct rio_driver * <parameter>rdrv</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdrv</parameter></term>
   <listitem>
    <para>
     the RIO driver structure to register
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds a <structname>struct rio_driver</structname> to the list of registered drivers
   Returns a negative value on error, otherwise 0. If no error
   occurred, the driver remains registered even if no device
   was claimed during registration.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-unregister-driver">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_unregister_driver</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_unregister_driver</refname>
 <refpurpose>
     unregister a RIO driver
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_unregister_driver </function></funcdef>
   <paramdef>struct rio_driver * <parameter>rdrv</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdrv</parameter></term>
   <listitem>
    <para>
     the RIO driver structure to unregister
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Deletes the <structname>struct rio_driver</structname> from the list of registered RIO
   drivers, gives it a chance to clean up by calling its <function>remove</function>
   function for each device it was responsible for, and marks those
   devices as driverless.
</para>
</refsect1>
</refentry>

<!-- drivers/rapidio/rio.c -->
<refentry id="API-rio-local-get-device-id">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_get_device_id</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_get_device_id</refname>
 <refpurpose>
  Get the base/extended device id for a port
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>u16 <function>rio_local_get_device_id </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     RIO master port from which to get the deviceid
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads the base/extended device id from the local device
   implementing the master port. Returns the 8/16-bit device
   id.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-request-inb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_request_inb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_request_inb_mbox</refname>
 <refpurpose>
     request inbound mailbox service
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_request_inb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>void * <parameter>dev_id</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>int <parameter>entries</parameter></paramdef>
   <paramdef>void (*<parameter>minb</parameter>)
     <funcparams>struct rio_mport * mport, void *dev_id, int mbox, 				       int slot</funcparams></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port from which to allocate the mailbox resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_id</parameter></term>
   <listitem>
    <para>
     Device specific pointer to pass on event
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox number to claim
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>entries</parameter></term>
   <listitem>
    <para>
     Number of entries in inbound mailbox queue
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>minb</parameter></term>
   <listitem>
    <para>
     Callback to execute when inbound message is received
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Requests ownership of an inbound mailbox resource and binds
   a callback function to the resource. Returns <constant>0</constant> on success.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-release-inb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_release_inb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_release_inb_mbox</refname>
 <refpurpose>
     release inbound mailbox message service
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_release_inb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port from which to release the mailbox resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox number to release
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Releases ownership of an inbound mailbox resource. Returns 0
   if the request has been satisfied.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-request-outb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_request_outb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_request_outb_mbox</refname>
 <refpurpose>
     request outbound mailbox service
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_request_outb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>void * <parameter>dev_id</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>int <parameter>entries</parameter></paramdef>
   <paramdef>void (*<parameter>moutb</parameter>)
     <funcparams>struct rio_mport * mport, void *dev_id, int mbox, int slot</funcparams></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port from which to allocate the mailbox resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_id</parameter></term>
   <listitem>
    <para>
     Device specific pointer to pass on event
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox number to claim
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>entries</parameter></term>
   <listitem>
    <para>
     Number of entries in outbound mailbox queue
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>moutb</parameter></term>
   <listitem>
    <para>
     Callback to execute when outbound message is sent
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Requests ownership of an outbound mailbox resource and binds
   a callback function to the resource. Returns 0 on success.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-release-outb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_release_outb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_release_outb_mbox</refname>
 <refpurpose>
     release outbound mailbox message service
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_release_outb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port from which to release the mailbox resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox number to release
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Releases ownership of an inbound mailbox resource. Returns 0
   if the request has been satisfied.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-request-inb-dbell">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_request_inb_dbell</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_request_inb_dbell</refname>
 <refpurpose>
     request inbound doorbell message service
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_request_inb_dbell </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>void * <parameter>dev_id</parameter></paramdef>
   <paramdef>u16 <parameter>start</parameter></paramdef>
   <paramdef>u16 <parameter>end</parameter></paramdef>
   <paramdef>void (*<parameter>dinb</parameter>)
     <funcparams>struct rio_mport * mport, void *dev_id, u16 src, 					u16 dst, u16 info</funcparams></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port from which to allocate the doorbell resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_id</parameter></term>
   <listitem>
    <para>
     Device specific pointer to pass on event
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>start</parameter></term>
   <listitem>
    <para>
     Doorbell info range start
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>end</parameter></term>
   <listitem>
    <para>
     Doorbell info range end
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dinb</parameter></term>
   <listitem>
    <para>
     Callback to execute when doorbell is received
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Requests ownership of an inbound doorbell resource and binds
   a callback function to the resource. Returns 0 if the request
   has been satisfied.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-release-inb-dbell">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_release_inb_dbell</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_release_inb_dbell</refname>
 <refpurpose>
     release inbound doorbell message service
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_release_inb_dbell </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>u16 <parameter>start</parameter></paramdef>
   <paramdef>u16 <parameter>end</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port from which to release the doorbell resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>start</parameter></term>
   <listitem>
    <para>
     Doorbell info range start
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>end</parameter></term>
   <listitem>
    <para>
     Doorbell info range end
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Releases ownership of an inbound doorbell resource and removes
   callback from the doorbell event list. Returns 0 if the request
   has been satisfied.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-request-outb-dbell">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_request_outb_dbell</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_request_outb_dbell</refname>
 <refpurpose>
     request outbound doorbell message range
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>struct resource * <function>rio_request_outb_dbell </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>u16 <parameter>start</parameter></paramdef>
   <paramdef>u16 <parameter>end</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device from which to allocate the doorbell resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>start</parameter></term>
   <listitem>
    <para>
     Doorbell message range start
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>end</parameter></term>
   <listitem>
    <para>
     Doorbell message range end
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Requests ownership of a doorbell message range. Returns a resource
   if the request has been satisfied or <constant>NULL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-release-outb-dbell">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_release_outb_dbell</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_release_outb_dbell</refname>
 <refpurpose>
     release outbound doorbell message range
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_release_outb_dbell </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>struct resource * <parameter>res</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device from which to release the doorbell resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>res</parameter></term>
   <listitem>
    <para>
     Doorbell resource to be freed
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Releases ownership of a doorbell message range. Returns 0 if the
   request has been satisfied.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-get-asm">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_asm</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_asm</refname>
 <refpurpose>
     Begin or continue searching for a RIO device by vid/did/asm_vid/asm_did
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>struct rio_dev * <function>rio_get_asm </function></funcdef>
   <paramdef>u16 <parameter>vid</parameter></paramdef>
   <paramdef>u16 <parameter>did</parameter></paramdef>
   <paramdef>u16 <parameter>asm_vid</parameter></paramdef>
   <paramdef>u16 <parameter>asm_did</parameter></paramdef>
   <paramdef>struct rio_dev * <parameter>from</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>vid</parameter></term>
   <listitem>
    <para>
     RIO vid to match or <constant>RIO_ANY_ID</constant> to match all vids
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>did</parameter></term>
   <listitem>
    <para>
     RIO did to match or <constant>RIO_ANY_ID</constant> to match all dids
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>asm_vid</parameter></term>
   <listitem>
    <para>
     RIO asm_vid to match or <constant>RIO_ANY_ID</constant> to match all asm_vids
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>asm_did</parameter></term>
   <listitem>
    <para>
     RIO asm_did to match or <constant>RIO_ANY_ID</constant> to match all asm_dids
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>from</parameter></term>
   <listitem>
    <para>
     Previous RIO device found in search, or <constant>NULL</constant> for new search
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Iterates through the list of known RIO devices. If a RIO device is
   found with a matching <parameter>vid</parameter>, <parameter>did</parameter>, <parameter>asm_vid</parameter>, <parameter>asm_did</parameter>, the reference
   count to the device is incrememted and a pointer to its device
   structure is returned. Otherwise, <constant>NULL</constant> is returned. A new search
   is initiated by passing <constant>NULL</constant> to the <parameter>from</parameter> argument. Otherwise, if
   <parameter>from</parameter> is not <constant>NULL</constant>, searches continue from next device on the global
   list. The reference count for <parameter>from</parameter> is always decremented if it is
   not <constant>NULL</constant>.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-get-device">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_device</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_device</refname>
 <refpurpose>
     Begin or continue searching for a RIO device by vid/did
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>struct rio_dev * <function>rio_get_device </function></funcdef>
   <paramdef>u16 <parameter>vid</parameter></paramdef>
   <paramdef>u16 <parameter>did</parameter></paramdef>
   <paramdef>struct rio_dev * <parameter>from</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>vid</parameter></term>
   <listitem>
    <para>
     RIO vid to match or <constant>RIO_ANY_ID</constant> to match all vids
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>did</parameter></term>
   <listitem>
    <para>
     RIO did to match or <constant>RIO_ANY_ID</constant> to match all dids
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>from</parameter></term>
   <listitem>
    <para>
     Previous RIO device found in search, or <constant>NULL</constant> for new search
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Iterates through the list of known RIO devices. If a RIO device is
   found with a matching <parameter>vid</parameter> and <parameter>did</parameter>, the reference count to the
   device is incrememted and a pointer to its device structure is returned.
   Otherwise, <constant>NULL</constant> is returned. A new search is initiated by passing <constant>NULL</constant>
   to the <parameter>from</parameter> argument. Otherwise, if <parameter>from</parameter> is not <constant>NULL</constant>, searches
   continue from next device on the global list. The reference count for
   <parameter>from</parameter> is always decremented if it is not <constant>NULL</constant>.
</para>
</refsect1>
</refentry>

	</sect1>
  </chapter>

  <chapter id="internals">
     <title>Internals</title>

     <para>
     This chapter contains the autogenerated documentation of the RapidIO
     subsystem.
     </para>

     <sect1 id="Structures"><title>Structures</title>
<!-- include/linux/rio.h -->
<refentry id="API-struct-rio-dev">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_dev</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_dev</refname>
 <refpurpose>
  RIO device info
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_dev {
  struct list_head global_list;
  struct list_head net_list;
  struct rio_net * net;
  u16 did;
  u16 vid;
  u32 device_rev;
  u16 asm_did;
  u16 asm_vid;
  u16 asm_rev;
  u16 efptr;
  u32 pef;
  u32 swpinfo;
  u32 src_ops;
  u32 dst_ops;
  u64 dma_mask;
  struct rio_switch * rswitch;
  struct rio_driver * driver;
  struct device dev;
  struct resource riores[RIO_MAX_DEV_RESOURCES];
  u16 destid;
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>global_list</term>
      <listitem><para>
Node in list of all RIO devices
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>net_list</term>
      <listitem><para>
Node in list of RIO devices in a network
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>net</term>
      <listitem><para>
Network this device is a part of
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>did</term>
      <listitem><para>
Device ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>vid</term>
      <listitem><para>
Vendor ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>device_rev</term>
      <listitem><para>
Device revision
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>asm_did</term>
      <listitem><para>
Assembly device ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>asm_vid</term>
      <listitem><para>
Assembly vendor ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>asm_rev</term>
      <listitem><para>
Assembly revision
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>efptr</term>
      <listitem><para>
Extended feature pointer
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>pef</term>
      <listitem><para>
Processing element features
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>swpinfo</term>
      <listitem><para>
Switch port info
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>src_ops</term>
      <listitem><para>
Source operation capabilities
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>dst_ops</term>
      <listitem><para>
Destination operation capabilities
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>dma_mask</term>
      <listitem><para>
Mask of bits of RIO address this device implements
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>rswitch</term>
      <listitem><para>
Pointer to <structname>struct rio_switch</structname> if valid for this device
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>driver</term>
      <listitem><para>
Driver claiming this device
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>dev</term>
      <listitem><para>
Device model device
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>riores[RIO_MAX_DEV_RESOURCES]</term>
      <listitem><para>
RIO resources this device owns
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>destid</term>
      <listitem><para>
Network destination ID
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
</refentry>

<refentry id="API-struct-rio-msg">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_msg</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_msg</refname>
 <refpurpose>
     RIO message event
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_msg {
  struct resource * res;
  void (* mcback) (struct rio_mport * mport, void *dev_id, int mbox, int slot);
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>res</term>
      <listitem><para>
   Mailbox resource
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>mcback</term>
      <listitem><para>
   Message event callback
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
</refentry>

<refentry id="API-struct-rio-dbell">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_dbell</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_dbell</refname>
 <refpurpose>
     RIO doorbell event
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_dbell {
  struct list_head node;
  struct resource * res;
  void (* dinb) (struct rio_mport *mport, void *dev_id, u16 src, u16 dst, u16 info);
  void * dev_id;
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>node</term>
      <listitem><para>
   Node in list of doorbell events
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>res</term>
      <listitem><para>
   Doorbell resource
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>dinb</term>
      <listitem><para>
   Doorbell event callback
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>dev_id</term>
      <listitem><para>
   Device specific pointer to pass on event
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
</refentry>

<refentry id="API-struct-rio-mport">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_mport</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_mport</refname>
 <refpurpose>
     RIO master port info
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_mport {
  struct list_head dbells;
  struct list_head node;
  struct list_head nnode;
  struct resource iores;
  struct resource riores[RIO_MAX_MPORT_RESOURCES];
  struct rio_msg inb_msg[RIO_MAX_MBOX];
  struct rio_msg outb_msg[RIO_MAX_MBOX];
  int host_deviceid;
  struct rio_ops * ops;
  unsigned char id;
  unsigned char index;
  unsigned char name[40];
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>dbells</term>
      <listitem><para>
   List of doorbell events
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>node</term>
      <listitem><para>
   Node in global list of master ports
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>nnode</term>
      <listitem><para>
   Node in network list of master ports
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>iores</term>
      <listitem><para>
   I/O mem resource that this master port interface owns
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>riores[RIO_MAX_MPORT_RESOURCES]</term>
      <listitem><para>
   RIO resources that this master port interfaces owns
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>inb_msg[RIO_MAX_MBOX]</term>
      <listitem><para>
   RIO inbound message event descriptors
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>outb_msg[RIO_MAX_MBOX]</term>
      <listitem><para>
   RIO outbound message event descriptors
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>host_deviceid</term>
      <listitem><para>
   Host device ID associated with this master port
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>ops</term>
      <listitem><para>
   configuration space functions
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>id</term>
      <listitem><para>
   Port ID, unique among all ports
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>index</term>
      <listitem><para>
   Port index, unique among all port interfaces of the same type
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>name[40]</term>
      <listitem><para>
   Port name string
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
</refentry>

<refentry id="API-struct-rio-net">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_net</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_net</refname>
 <refpurpose>
     RIO network info
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_net {
  struct list_head node;
  struct list_head devices;
  struct list_head mports;
  struct rio_mport * hport;
  unsigned char id;
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>node</term>
      <listitem><para>
   Node in global list of RIO networks
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>devices</term>
      <listitem><para>
   List of devices in this network
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>mports</term>
      <listitem><para>
   List of master ports accessing this network
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>hport</term>
      <listitem><para>
   Default port for accessing this network
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>id</term>
      <listitem><para>
   RIO network ID
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
</refentry>

<refentry id="API-struct-rio-switch">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_switch</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_switch</refname>
 <refpurpose>
     RIO switch info
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_switch {
  struct list_head node;
  u16 switchid;
  u16 hopcount;
  u16 destid;
  u8 route_table[RIO_MAX_ROUTE_ENTRIES];
  int (* add_entry) (struct rio_mport * mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 route_port);
  int (* get_entry) (struct rio_mport * mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 * route_port);
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>node</term>
      <listitem><para>
   Node in global list of switches
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>switchid</term>
      <listitem><para>
   Switch ID that is unique across a network
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>hopcount</term>
      <listitem><para>
   Hopcount to this switch
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>destid</term>
      <listitem><para>
   Associated destid in the path
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>route_table[RIO_MAX_ROUTE_ENTRIES]</term>
      <listitem><para>
   Copy of switch routing table
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>add_entry</term>
      <listitem><para>
   Callback for switch-specific route add function
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>get_entry</term>
      <listitem><para>
   Callback for switch-specific route get function
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
</refentry>

<refentry id="API-struct-rio-ops">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_ops</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_ops</refname>
 <refpurpose>
     Low-level RIO configuration space operations
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_ops {
  int (* lcread) (int index, u32 offset, int len, u32 * data);
  int (* lcwrite) (int index, u32 offset, int len, u32 data);
  int (* cread) (int index, u16 destid, u8 hopcount, u32 offset, int len,u32 * data);
  int (* cwrite) (int index, u16 destid, u8 hopcount, u32 offset, int len,u32 data);
  int (* dsend) (int index, u16 destid, u16 data);
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>lcread</term>
      <listitem><para>
   Callback to perform local (master port) read of config space.
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>lcwrite</term>
      <listitem><para>
   Callback to perform local (master port) write of config space.
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>cread</term>
      <listitem><para>
   Callback to perform network read of config space.
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>cwrite</term>
      <listitem><para>
   Callback to perform network write of config space.
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>dsend</term>
      <listitem><para>
   Callback to send a doorbell message.
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
</refentry>

<refentry id="API-struct-rio-driver">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_driver</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_driver</refname>
 <refpurpose>
     RIO driver info
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_driver {
  struct list_head node;
  char * name;
  const struct rio_device_id * id_table;
  int (* probe) (struct rio_dev * dev, const struct rio_device_id * id);
  void (* remove) (struct rio_dev * dev);
  int (* suspend) (struct rio_dev * dev, u32 state);
  int (* resume) (struct rio_dev * dev);
  int (* enable_wake) (struct rio_dev * dev, u32 state, int enable);
  struct device_driver driver;
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>node</term>
      <listitem><para>
   Node in list of drivers
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>name</term>
      <listitem><para>
   RIO driver name
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>id_table</term>
      <listitem><para>
   RIO device ids to be associated with this driver
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>probe</term>
      <listitem><para>
   RIO device inserted
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>remove</term>
      <listitem><para>
   RIO device removed
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>suspend</term>
      <listitem><para>
   RIO device suspended
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>resume</term>
      <listitem><para>
   RIO device awakened
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>enable_wake</term>
      <listitem><para>
   RIO device enable wake event
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>driver</term>
      <listitem><para>
   LDM driver struct
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
<refsect1>
<title>Description</title>
<para>
   Provides info on a RIO device driver for insertion/removal and
   power management purposes.
</para>
</refsect1>
</refentry>

<refentry id="API-struct-rio-device-id">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_device_id</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_device_id</refname>
 <refpurpose>
     RIO device identifier
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_device_id {
  u16 did;
  u16 vid;
  u16 asm_did;
  u16 asm_vid;
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>did</term>
      <listitem><para>
   RIO device ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>vid</term>
      <listitem><para>
   RIO vendor ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>asm_did</term>
      <listitem><para>
   RIO assembly device ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>asm_vid</term>
      <listitem><para>
   RIO assembly vendor ID
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
<refsect1>
<title>Description</title>
<para>
   Identifies a RIO device based on both the device/vendor IDs and
   the assembly device/vendor IDs.
</para>
</refsect1>
</refentry>

<refentry id="API-struct-rio-route-ops">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>struct rio_route_ops</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>struct rio_route_ops</refname>
 <refpurpose>
     Per-switch route operations
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <programlisting>
struct rio_route_ops {
  u16 vid;
  u16 did;
  int (* add_hook) (struct rio_mport * mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 route_port);
  int (* get_hook) (struct rio_mport * mport, u16 destid, u8 hopcount,u16 table, u16 route_destid, u8 * route_port);
};  </programlisting>
</refsynopsisdiv>
 <refsect1>
  <title>Members</title>
  <variablelist>
    <varlistentry>      <term>vid</term>
      <listitem><para>
   RIO vendor ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>did</term>
      <listitem><para>
   RIO device ID
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>add_hook</term>
      <listitem><para>
   Callback that adds a route entry
      </para></listitem>
    </varlistentry>
    <varlistentry>      <term>get_hook</term>
      <listitem><para>
   Callback that gets a route entry
      </para></listitem>
    </varlistentry>
  </variablelist>
 </refsect1>
<refsect1>
<title>Description</title>
<para>
   Defines the operations that are necessary to manipulate the route
   tables for a particular RIO switch device.
</para>
</refsect1>
</refentry>

     </sect1>
     <sect1 id="Enumeration_and_Discovery"><title>Enumeration and Discovery</title>
<!-- drivers/rapidio/rio-scan.c -->
<refentry id="API-rio-get-device-id">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_device_id</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_device_id</refname>
 <refpurpose>
  Get the base/extended device id for a device
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>u16 <function>rio_get_device_id </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     RIO master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID of device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Hopcount to device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads the base/extended device id from a device. Returns the
   8/16-bit device ID.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-set-device-id">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_set_device_id</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_set_device_id</refname>
 <refpurpose>
     Set the base/extended device id for a device
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_set_device_id </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
   <paramdef>u16 <parameter>did</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     RIO master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID of device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Hopcount to device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>did</parameter></term>
   <listitem>
    <para>
     Device ID value to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes the base/extended device id from a device.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-local-set-device-id">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_local_set_device_id</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_local_set_device_id</refname>
 <refpurpose>
     Set the base/extended device id for a port
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_local_set_device_id </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u16 <parameter>did</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     RIO master port
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>did</parameter></term>
   <listitem>
    <para>
     Device ID value to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Writes the base/extended device id from a device.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-clear-locks">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_clear_locks</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_clear_locks</refname>
 <refpurpose>
     Release all host locks and signal enumeration complete
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_clear_locks </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to issue transaction
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Marks the component tag CSR on each device with the enumeration
   complete flag. When complete, it then release the host locks on
   each device. Returns 0 on success or <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-enum-host">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_enum_host</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_enum_host</refname>
 <refpurpose>
     Set host lock and initialize host destination ID
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_enum_host </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to issue transaction
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Sets the local host master port lock and destination ID register
   with the host device ID value. The host device ID value is provided
   by the platform. Returns <constant>0</constant> on success or <constant>-1</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-device-has-destid">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_device_has_destid</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_device_has_destid</refname>
 <refpurpose>
     Test if a device contains a destination ID register
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_device_has_destid </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>int <parameter>src_ops</parameter></paramdef>
   <paramdef>int <parameter>dst_ops</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to issue transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>src_ops</parameter></term>
   <listitem>
    <para>
     RIO device source operations
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dst_ops</parameter></term>
   <listitem>
    <para>
     RIO device destination operations
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Checks the provided <parameter>src_ops</parameter> and <parameter>dst_ops</parameter> for the necessary transaction
   capabilities that indicate whether or not a device will implement a
   destination ID register. Returns 1 if true or 0 if false.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-release-dev">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_release_dev</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_release_dev</refname>
 <refpurpose>
     Frees a RIO device struct
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_release_dev </function></funcdef>
   <paramdef>struct device * <parameter>dev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>dev</parameter></term>
   <listitem>
    <para>
     LDM device associated with a RIO device struct
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Gets the RIO device struct associated a RIO device struct.
   The RIO device struct is freed.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-is-switch">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_is_switch</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_is_switch</refname>
 <refpurpose>
     Tests if a RIO device has switch capabilities
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_is_switch </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Gets the RIO device Processing Element Features register
   contents and tests for switch capabilities. Returns 1 if
   the device is a switch or 0 if it is not a switch.
   The RIO device struct is freed.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-route-set-ops">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_route_set_ops</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_route_set_ops</refname>
 <refpurpose>
     Sets routing operations for a particular vendor switch
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_route_set_ops </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Searches the RIO route ops table for known switch types. If the vid
   and did match a switch table entry, then set the <function>add_entry</function> and
   <function>get_entry</function> ops to the table entry values.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-add-device">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_add_device</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_add_device</refname>
 <refpurpose>
     Adds a RIO device to the device model
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_add_device </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     RIO device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds the RIO device to the global device list and adds the RIO
   device to the RIO device list.  Creates the generic sysfs nodes
   for an RIO device.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-setup-device">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_setup_device</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_setup_device</refname>
 <refpurpose>
     Allocates and sets up a RIO device
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>struct rio_dev * <function>rio_setup_device </function></funcdef>
   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
   <paramdef>int <parameter>do_enum</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>net</parameter></term>
   <listitem>
    <para>
     RIO network
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to send transactions
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Current destination ID
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Current hopcount
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>do_enum</parameter></term>
   <listitem>
    <para>
     Enumeration/Discovery mode flag
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Allocates a RIO device and configures fields based on configuration
   space contents. If device has a destination ID register, a destination
   ID is either assigned in enumeration mode or read from configuration
   space in discovery mode.  If the device has switch capabilities, then
   a switch is allocated and configured appropriately. Returns a pointer
   to a RIO device on success or NULL on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-sport-is-active">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_sport_is_active</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_sport_is_active</refname>
 <refpurpose>
     Tests if a switch port has an active connection.
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_sport_is_active </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
   <paramdef>int <parameter>sport</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to send transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Associated destination ID for switch
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Hopcount to reach switch
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>sport</parameter></term>
   <listitem>
    <para>
     Switch port number
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads the port error status CSR for a particular switch port to
   determine if the port has an active link.  Returns
   <constant>PORT_N_ERR_STS_PORT_OK</constant> if the port is active or <constant>0</constant> if it is
   inactive.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-route-add-entry">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_route_add_entry</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_route_add_entry</refname>
 <refpurpose>
     Add a route entry to a switch routing table
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_route_add_entry </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>struct rio_switch * <parameter>rswitch</parameter></paramdef>
   <paramdef>u16 <parameter>table</parameter></paramdef>
   <paramdef>u16 <parameter>route_destid</parameter></paramdef>
   <paramdef>u8 <parameter>route_port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port to send transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>rswitch</parameter></term>
   <listitem>
    <para>
     Switch device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>table</parameter></term>
   <listitem>
    <para>
     Routing table ID
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>route_destid</parameter></term>
   <listitem>
    <para>
     Destination ID to be routed
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>route_port</parameter></term>
   <listitem>
    <para>
     Port number to be routed
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Calls the switch specific <function>add_entry</function> method to add a route entry
   on a switch. The route table can be specified using the <parameter>table</parameter>
   argument if a switch has per port routing tables or the normal
   use is to specific all tables (or the global table) by passing
   <constant>RIO_GLOBAL_TABLE</constant> in <parameter>table</parameter>. Returns <constant>0</constant> on success or <constant>-EINVAL</constant>
   on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-route-get-entry">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_route_get_entry</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_route_get_entry</refname>
 <refpurpose>
     Read a route entry in a switch routing table
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_route_get_entry </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>struct rio_switch * <parameter>rswitch</parameter></paramdef>
   <paramdef>u16 <parameter>table</parameter></paramdef>
   <paramdef>u16 <parameter>route_destid</parameter></paramdef>
   <paramdef>u8 * <parameter>route_port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port to send transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>rswitch</parameter></term>
   <listitem>
    <para>
     Switch device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>table</parameter></term>
   <listitem>
    <para>
     Routing table ID
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>route_destid</parameter></term>
   <listitem>
    <para>
     Destination ID to be routed
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>route_port</parameter></term>
   <listitem>
    <para>
     Pointer to read port number into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Calls the switch specific <function>get_entry</function> method to read a route entry
   in a switch. The route table can be specified using the <parameter>table</parameter>
   argument if a switch has per port routing tables or the normal
   use is to specific all tables (or the global table) by passing
   <constant>RIO_GLOBAL_TABLE</constant> in <parameter>table</parameter>. Returns <constant>0</constant> on success or <constant>-EINVAL</constant>
   on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-get-host-deviceid-lock">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_host_deviceid_lock</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_host_deviceid_lock</refname>
 <refpurpose>
     Reads the Host Device ID Lock CSR on a device
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>u16 <function>rio_get_host_deviceid_lock </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to send transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of hops to the device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Used during enumeration to read the Host Device ID Lock CSR on a
   RIO device. Returns the value of the lock register.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-get-swpinfo-inport">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_swpinfo_inport</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_swpinfo_inport</refname>
 <refpurpose>
     Gets the ingress port number
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>u8 <function>rio_get_swpinfo_inport </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port to send transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID associated with the switch
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of hops to the device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Returns port number being used to access the switch device.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-get-swpinfo-tports">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_get_swpinfo_tports</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_get_swpinfo_tports</refname>
 <refpurpose>
     Gets total number of ports on the switch
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>u8 <function>rio_get_swpinfo_tports </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port to send transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID associated with the switch
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of hops to the device
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Returns total numbers of ports implemented by the switch device.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-net-add-mport">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_net_add_mport</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_net_add_mport</refname>
 <refpurpose>
     Add a master port to a RIO network
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_net_add_mport </function></funcdef>
   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>net</parameter></term>
   <listitem>
    <para>
     RIO network
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to add
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds a master port to the network list of associated master
   ports..
</para>
</refsect1>
</refentry>

<refentry id="API-rio-enum-peer">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_enum_peer</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_enum_peer</refname>
 <refpurpose>
     Recursively enumerate a RIO network through a master port
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_enum_peer </function></funcdef>
   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>net</parameter></term>
   <listitem>
    <para>
     RIO network being enumerated
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to send transactions
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of hops into the network
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Recursively enumerates a RIO network.  Transactions are sent via the
   master port passed in <parameter>port</parameter>.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-enum-complete">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_enum_complete</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_enum_complete</refname>
 <refpurpose>
     Tests if enumeration of a network is complete
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_enum_complete </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to send transaction
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Tests the Component Tag CSR for presence of the magic enumeration
   complete flag. Return <constant>1</constant> if enumeration is complete or <constant>0</constant> if
   enumeration is incomplete.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-disc-peer">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_disc_peer</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_disc_peer</refname>
 <refpurpose>
     Recursively discovers a RIO network through a master port
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_disc_peer </function></funcdef>
   <paramdef>struct rio_net * <parameter>net</parameter></paramdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>net</parameter></term>
   <listitem>
    <para>
     RIO network being discovered
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to send transactions
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Current destination ID in network
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of hops into the network
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Recursively discovers a RIO network.  Transactions are sent via the
   master port passed in <parameter>port</parameter>.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-mport-is-active">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_mport_is_active</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_mport_is_active</refname>
 <refpurpose>
     Tests if master port link is active
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_mport_is_active </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to test
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Reads the port error status CSR for the master port to
   determine if the port has an active link.  Returns
   <constant>PORT_N_ERR_STS_PORT_OK</constant> if the  master port is active
   or <constant>0</constant> if it is inactive.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-alloc-net">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_alloc_net</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_alloc_net</refname>
 <refpurpose>
     Allocate and configure a new RIO network
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>struct rio_net * <function>rio_alloc_net </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port associated with the RIO network
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Allocates a RIO network structure, initializes per-network
   list heads, and adds the associated master port to the
   network list of associated master ports. Returns a
   RIO network pointer on success or <constant>NULL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-update-route-tables">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_update_route_tables</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_update_route_tables</refname>
 <refpurpose>
     Updates route tables in switches
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_update_route_tables </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port associated with the RIO network
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   For each enumerated device, ensure that each switch in a system
   has correct routing entries. Add routes for devices that where
   unknown dirung the first enumeration pass through the switch.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-enum-mport">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_enum_mport</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_enum_mport</refname>
 <refpurpose>
     Start enumeration through a master port
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_enum_mport </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port to send transactions
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Starts the enumeration process. If somebody has enumerated our
   master port device, then give up. If not and we have an active
   link, then start recursive peer enumeration. Returns <constant>0</constant> if
   enumeration succeeds or <constant>-EBUSY</constant> if enumeration fails.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-build-route-tables">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_build_route_tables</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_build_route_tables</refname>
 <refpurpose>
     Generate route tables from switch route entries
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_build_route_tables </function></funcdef>
   <paramdef> <parameter>void</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>void</parameter></term>
   <listitem>
    <para>
     no arguments
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   </para><para>

   For each switch device, generate a route table by copying existing
   route entries from the switch.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-enum-timeout">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_enum_timeout</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_enum_timeout</refname>
 <refpurpose>
     Signal that enumeration timed out
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_enum_timeout </function></funcdef>
   <paramdef>unsigned long <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Address of timeout flag.
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   When the enumeration complete timer expires, set a flag that
   signals to the discovery process that enumeration did not
   complete in a sane amount of time.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-disc-mport">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_disc_mport</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_disc_mport</refname>
 <refpurpose>
     Start discovery through a master port
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_disc_mport </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port to send transactions
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Starts the discovery process. If we have an active link,
   then wait for the signal that enumeration is complete.
   When enumeration completion is signaled, start recursive
   peer discovery. Returns <constant>0</constant> if discovery succeeds or <constant>-EBUSY</constant>
   on failure.
</para>
</refsect1>
</refentry>

     </sect1>
     <sect1 id="Driver_functionality"><title>Driver functionality</title>
<!-- drivers/rapidio/rio.c -->
<refentry id="API-rio-setup-inb-dbell">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_setup_inb_dbell</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_setup_inb_dbell</refname>
 <refpurpose>
  bind inbound doorbell callback
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_setup_inb_dbell </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>void * <parameter>dev_id</parameter></paramdef>
   <paramdef>struct resource * <parameter>res</parameter></paramdef>
   <paramdef>void (*<parameter>dinb</parameter>)
     <funcparams>struct rio_mport * mport, void *dev_id, u16 src, u16 dst, 				  u16 info</funcparams></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     RIO master port to bind the doorbell callback
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_id</parameter></term>
   <listitem>
    <para>
     Device specific pointer to pass on event
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>res</parameter></term>
   <listitem>
    <para>
     Doorbell message resource
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dinb</parameter></term>
   <listitem>
    <para>
     Callback to execute when doorbell is received
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds a doorbell resource/callback pair into a port's
   doorbell event list. Returns 0 if the request has been
   satisfied.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-mport-get-feature">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_mport_get_feature</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_mport_get_feature</refname>
 <refpurpose>
     query for devices' extended features
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>u32 <function>rio_mport_get_feature </function></funcdef>
   <paramdef>struct rio_mport * <parameter>port</parameter></paramdef>
   <paramdef>int <parameter>local</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
   <paramdef>int <parameter>ftr</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>port</parameter></term>
   <listitem>
    <para>
     Master port to issue transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>local</parameter></term>
   <listitem>
    <para>
     Indicate a local master port or remote device access
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID of the device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of switch hops to the device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>ftr</parameter></term>
   <listitem>
    <para>
     Extended feature code
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Tell if a device supports a given RapidIO capability.
   Returns the offset of the requested extended feature
   block within the device's RIO configuration space or
   0 in case the device does not support it.  Possible
   values for <parameter>ftr</parameter>:
   </para><para>

   <constant>RIO_EFB_PAR_EP_ID</constant>		LP/LVDS EP Devices
   </para><para>

   <constant>RIO_EFB_PAR_EP_REC_ID</constant>	LP/LVDS EP Recovery Devices
   </para><para>

   <constant>RIO_EFB_PAR_EP_FREE_ID</constant>	LP/LVDS EP Free Devices
   </para><para>

   <constant>RIO_EFB_SER_EP_ID</constant>		LP/Serial EP Devices
   </para><para>

   <constant>RIO_EFB_SER_EP_REC_ID</constant>	LP/Serial EP Recovery Devices
   </para><para>

   <constant>RIO_EFB_SER_EP_FREE_ID</constant>	LP/Serial EP Free Devices
</para>
</refsect1>
</refentry>

<!-- drivers/rapidio/rio-access.c -->
<refentry id="API-RIO-LOP-READ">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>RIO_LOP_READ</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>RIO_LOP_READ</refname>
 <refpurpose>
  Generate rio_local_read_config_* functions
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef> <function>RIO_LOP_READ </function></funcdef>
   <paramdef> <parameter>size</parameter></paramdef>
   <paramdef> <parameter>type</parameter></paramdef>
   <paramdef> <parameter>len</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>size</parameter></term>
   <listitem>
    <para>
     Size of configuration space read (8, 16, 32 bits)
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>type</parameter></term>
   <listitem>
    <para>
     C type of value argument
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length of configuration space read (1, 2, 4 bytes)
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates rio_local_read_config_* functions used to access
   configuration space registers on the local device.
</para>
</refsect1>
</refentry>

<refentry id="API-RIO-LOP-WRITE">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>RIO_LOP_WRITE</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>RIO_LOP_WRITE</refname>
 <refpurpose>
     Generate rio_local_write_config_* functions
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef> <function>RIO_LOP_WRITE </function></funcdef>
   <paramdef> <parameter>size</parameter></paramdef>
   <paramdef> <parameter>type</parameter></paramdef>
   <paramdef> <parameter>len</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>size</parameter></term>
   <listitem>
    <para>
     Size of configuration space write (8, 16, 32 bits)
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>type</parameter></term>
   <listitem>
    <para>
     C type of value argument
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length of configuration space write (1, 2, 4 bytes)
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates rio_local_write_config_* functions used to access
   configuration space registers on the local device.
</para>
</refsect1>
</refentry>

<refentry id="API-RIO-OP-READ">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>RIO_OP_READ</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>RIO_OP_READ</refname>
 <refpurpose>
     Generate rio_mport_read_config_* functions
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef> <function>RIO_OP_READ </function></funcdef>
   <paramdef> <parameter>size</parameter></paramdef>
   <paramdef> <parameter>type</parameter></paramdef>
   <paramdef> <parameter>len</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>size</parameter></term>
   <listitem>
    <para>
     Size of configuration space read (8, 16, 32 bits)
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>type</parameter></term>
   <listitem>
    <para>
     C type of value argument
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length of configuration space read (1, 2, 4 bytes)
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates rio_mport_read_config_* functions used to access
   configuration space registers on the local device.
</para>
</refsect1>
</refentry>

<refentry id="API-RIO-OP-WRITE">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>RIO_OP_WRITE</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>RIO_OP_WRITE</refname>
 <refpurpose>
     Generate rio_mport_write_config_* functions
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef> <function>RIO_OP_WRITE </function></funcdef>
   <paramdef> <parameter>size</parameter></paramdef>
   <paramdef> <parameter>type</parameter></paramdef>
   <paramdef> <parameter>len</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>size</parameter></term>
   <listitem>
    <para>
     Size of configuration space write (8, 16, 32 bits)
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>type</parameter></term>
   <listitem>
    <para>
     C type of value argument
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length of configuration space write (1, 2, 4 bytes)
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates rio_mport_write_config_* functions used to access
   configuration space registers on the local device.
</para>
</refsect1>
</refentry>

     </sect1>
     <sect1 id="Device_model_support"><title>Device model support</title>
<!-- drivers/rapidio/rio-driver.c -->
<refentry id="API-rio-match-device">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_match_device</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_match_device</refname>
 <refpurpose>
  Tell if a RIO device has a matching RIO device id structure
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>const struct rio_device_id * <function>rio_match_device </function></funcdef>
   <paramdef>const struct rio_device_id * <parameter>id</parameter></paramdef>
   <paramdef>const struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>id</parameter></term>
   <listitem>
    <para>
     the RIO device id structure to match against
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     the RIO device structure to match against
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Used from driver probe and bus matching to check whether a RIO device
   matches a device id structure provided by a RIO driver. Returns the
   matching <structname>struct rio_device_id</structname> or <constant>NULL</constant> if there is no match.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-device-probe">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_device_probe</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_device_probe</refname>
 <refpurpose>
     Tell if a RIO device structure has a matching RIO
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_device_probe </function></funcdef>
   <paramdef>struct device * <parameter>dev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>dev</parameter></term>
   <listitem>
    <para>
     the RIO device structure to match against
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   return 0 and set rio_dev-&gt;driver when drv claims rio_dev, else error
</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   return 0 and set rio_dev-&gt;driver when drv claims rio_dev, else error
</para>
</refsect1>
</refentry>

<refentry id="API-rio-device-remove">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_device_remove</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_device_remove</refname>
 <refpurpose>
     Remove a RIO device from the system
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_device_remove </function></funcdef>
   <paramdef>struct device * <parameter>dev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>dev</parameter></term>
   <listitem>
    <para>
     the RIO device structure to match against
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Remove a RIO device from the system. If it has an associated
   driver, then run the driver <function>remove</function> method.  Then update
   the reference count.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-match-bus">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_match_bus</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_match_bus</refname>
 <refpurpose>
     Tell if a RIO device structure has a matching RIO
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_match_bus </function></funcdef>
   <paramdef>struct device * <parameter>dev</parameter></paramdef>
   <paramdef>struct device_driver * <parameter>drv</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>dev</parameter></term>
   <listitem>
    <para>
     the standard device structure to match against
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>drv</parameter></term>
   <listitem>
    <para>
     the standard driver structure containing the ids to match against
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Used by a driver to check whether a RIO device present in the
   system is in its list of supported devices. Returns 1 if
   there is a matching <structname>struct rio_device_id</structname> or 0 if there is
   no match.
</para>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Used by a driver to check whether a RIO device present in the
   system is in its list of supported devices. Returns 1 if
   there is a matching <structname>struct rio_device_id</structname> or 0 if there is
   no match.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-bus-init">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_bus_init</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_bus_init</refname>
 <refpurpose>
     Register the RapidIO bus with the device model
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int __init <function>rio_bus_init </function></funcdef>
   <paramdef> <parameter>void</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>void</parameter></term>
   <listitem>
    <para>
     no arguments
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   </para><para>

   Registers the RIO bus device and RIO bus type with the Linux
   device model.
</para>
</refsect1>
</refentry>

     </sect1>
     <sect1 id="Sysfs_support"><title>Sysfs support</title>
<!-- drivers/rapidio/rio-sysfs.c -->
<refentry id="API-rio-create-sysfs-dev-files">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_create_sysfs_dev_files</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_create_sysfs_dev_files</refname>
 <refpurpose>
  create RIO specific sysfs files
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_create_sysfs_dev_files </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     device whose entries should be created
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Create files when <parameter>rdev</parameter> is added to sysfs.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-remove-sysfs-dev-files">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_remove_sysfs_dev_files</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_remove_sysfs_dev_files</refname>
 <refpurpose>
     cleanup RIO specific sysfs files
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_remove_sysfs_dev_files </function></funcdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     device whose entries we should free
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Cleanup when <parameter>rdev</parameter> is removed from sysfs.
</para>
</refsect1>
</refentry>

     </sect1>
     <sect1 id="PPC32_support"><title>PPC32 support</title>
<!-- arch/powerpc/kernel/rio.c -->
<refentry id="API-platform-rio-init">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>platform_rio_init</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>platform_rio_init</refname>
 <refpurpose>
  Do platform specific RIO init
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>platform_rio_init </function></funcdef>
   <paramdef> <parameter>void</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>void</parameter></term>
   <listitem>
    <para>
     no arguments
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   </para><para>

   Any platform specific initialization of RapdIO
   hardware is done here as well as registration
   of any active master ports in the system.
</para>
</refsect1>
</refentry>

<refentry id="API-ppc-rio-init">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>ppc_rio_init</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>ppc_rio_init</refname>
 <refpurpose>
     Do PPC32 RIO init
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int __init <function>ppc_rio_init </function></funcdef>
   <paramdef> <parameter>void</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>void</parameter></term>
   <listitem>
    <para>
     no arguments
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   </para><para>

   Calls platform-specific RIO init code and then calls
   <function>rio_init_mports</function> to initialize any master ports that
   have been registered with the RIO subsystem.
</para>
</refsect1>
</refentry>

<!-- arch/powerpc/sysdev/fsl_rio.c -->
<refentry id="API-rio-hw-add-outb-message">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_hw_add_outb_message</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_hw_add_outb_message</refname>
 <refpurpose>
  Add message to the MPC85xx outbound message queue
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_hw_add_outb_message </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>struct rio_dev * <parameter>rdev</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>void * <parameter>buffer</parameter></paramdef>
   <paramdef>size_t <parameter>len</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port with outbound message queue
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>rdev</parameter></term>
   <listitem>
    <para>
     Target of outbound message
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Outbound mailbox
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>buffer</parameter></term>
   <listitem>
    <para>
     Message to add to outbound queue
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length of message
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds the <parameter>buffer</parameter> message to the MPC85xx outbound message queue. Returns
   <constant>0</constant> on success or <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-hw-add-inb-buffer">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_hw_add_inb_buffer</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_hw_add_inb_buffer</refname>
 <refpurpose>
     Add buffer to the MPC85xx inbound message queue
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_hw_add_inb_buffer </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>void * <parameter>buf</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port implementing the inbound message unit
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Inbound mailbox number
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>buf</parameter></term>
   <listitem>
    <para>
     Buffer to add to inbound queue
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Adds the <parameter>buf</parameter> buffer to the MPC85xx inbound message queue. Returns
   <constant>0</constant> on success or <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-hw-get-inb-message">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_hw_get_inb_message</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_hw_get_inb_message</refname>
 <refpurpose>
     Fetch inbound message from the MPC85xx message unit
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void * <function>rio_hw_get_inb_message </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port implementing the inbound message unit
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Inbound mailbox number
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Gets the next available inbound message from the inbound message queue.
   A pointer to the message is returned on success or NULL on failure.
</para>
</refsect1>
</refentry>

<!-- arch/powerpc/sysdev/fsl_rio.c -->
<refentry id="API-mpc85xx-rio-doorbell-send">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_doorbell_send</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_doorbell_send</refname>
 <refpurpose>
  Send a MPC85xx doorbell message
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>mpc85xx_rio_doorbell_send </function></funcdef>
   <paramdef>int <parameter>index</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u16 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>index</parameter></term>
   <listitem>
    <para>
     ID of RapidIO interface
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID of target device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     16-bit info field of RapidIO doorbell message
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Sends a MPC85xx doorbell message. Returns <constant>0</constant> on success or
   <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-local-config-read">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_local_config_read</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_local_config_read</refname>
 <refpurpose>
     Generate a MPC85xx local config space read
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>mpc85xx_local_config_read </function></funcdef>
   <paramdef>int <parameter>index</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>int <parameter>len</parameter></paramdef>
   <paramdef>u32 * <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>index</parameter></term>
   <listitem>
    <para>
     ID of RapdiIO interface
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length (in bytes) of the maintenance transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Value to be read into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates a MPC85xx local configuration space read. Returns <constant>0</constant> on
   success or <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-local-config-write">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_local_config_write</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_local_config_write</refname>
 <refpurpose>
     Generate a MPC85xx local config space write
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>mpc85xx_local_config_write </function></funcdef>
   <paramdef>int <parameter>index</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>int <parameter>len</parameter></paramdef>
   <paramdef>u32 <parameter>data</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>index</parameter></term>
   <listitem>
    <para>
     ID of RapdiIO interface
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length (in bytes) of the maintenance transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>data</parameter></term>
   <listitem>
    <para>
     Value to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates a MPC85xx local configuration space write. Returns <constant>0</constant> on
   success or <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-rio-config-read">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_config_read</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_config_read</refname>
 <refpurpose>
     Generate a MPC85xx read maintenance transaction
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>mpc85xx_rio_config_read </function></funcdef>
   <paramdef>int <parameter>index</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>int <parameter>len</parameter></paramdef>
   <paramdef>u32 * <parameter>val</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>index</parameter></term>
   <listitem>
    <para>
     ID of RapdiIO interface
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID of transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of hops to target device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length (in bytes) of the maintenance transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>val</parameter></term>
   <listitem>
    <para>
     Location to be read into
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates a MPC85xx read maintenance transaction. Returns <constant>0</constant> on
   success or <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-rio-config-write">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_config_write</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_config_write</refname>
 <refpurpose>
     Generate a MPC85xx write maintenance transaction
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>mpc85xx_rio_config_write </function></funcdef>
   <paramdef>int <parameter>index</parameter></paramdef>
   <paramdef>u16 <parameter>destid</parameter></paramdef>
   <paramdef>u8 <parameter>hopcount</parameter></paramdef>
   <paramdef>u32 <parameter>offset</parameter></paramdef>
   <paramdef>int <parameter>len</parameter></paramdef>
   <paramdef>u32 <parameter>val</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>index</parameter></term>
   <listitem>
    <para>
     ID of RapdiIO interface
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>destid</parameter></term>
   <listitem>
    <para>
     Destination ID of transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>hopcount</parameter></term>
   <listitem>
    <para>
     Number of hops to target device
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>offset</parameter></term>
   <listitem>
    <para>
     Offset into configuration space
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>len</parameter></term>
   <listitem>
    <para>
     Length (in bytes) of the maintenance transaction
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>val</parameter></term>
   <listitem>
    <para>
     Value to be written
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Generates an MPC85xx write maintenance transaction. Returns <constant>0</constant> on
   success or <constant>-EINVAL</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-rio-tx-handler">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_tx_handler</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_tx_handler</refname>
 <refpurpose>
     MPC85xx outbound message interrupt handler
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>irqreturn_t <function>mpc85xx_rio_tx_handler </function></funcdef>
   <paramdef>int <parameter>irq</parameter></paramdef>
   <paramdef>void * <parameter>dev_instance</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>irq</parameter></term>
   <listitem>
    <para>
     Linux interrupt number
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_instance</parameter></term>
   <listitem>
    <para>
     Pointer to interrupt-specific data
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Handles outbound message interrupts. Executes a register outbound
   mailbox event handler and acks the interrupt occurrence.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-open-outb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_open_outb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_open_outb_mbox</refname>
 <refpurpose>
     Initialize MPC85xx outbound mailbox
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_open_outb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>void * <parameter>dev_id</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>int <parameter>entries</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port implementing the outbound message unit
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_id</parameter></term>
   <listitem>
    <para>
     Device specific pointer to pass on event
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox to open
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>entries</parameter></term>
   <listitem>
    <para>
     Number of entries in the outbound mailbox ring
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Initializes buffer ring, request the outbound message interrupt,
   and enables the outbound message unit. Returns <constant>0</constant> on success and
   <constant>-EINVAL</constant> or <constant>-ENOMEM</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-close-outb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_close_outb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_close_outb_mbox</refname>
 <refpurpose>
     Shut down MPC85xx outbound mailbox
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_close_outb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port implementing the outbound message unit
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox to close
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Disables the outbound message unit, free all buffers, and
   frees the outbound message interrupt.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-rio-rx-handler">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_rx_handler</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_rx_handler</refname>
 <refpurpose>
     MPC85xx inbound message interrupt handler
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>irqreturn_t <function>mpc85xx_rio_rx_handler </function></funcdef>
   <paramdef>int <parameter>irq</parameter></paramdef>
   <paramdef>void * <parameter>dev_instance</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>irq</parameter></term>
   <listitem>
    <para>
     Linux interrupt number
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_instance</parameter></term>
   <listitem>
    <para>
     Pointer to interrupt-specific data
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Handles inbound message interrupts. Executes a registered inbound
   mailbox event handler and acks the interrupt occurrence.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-open-inb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_open_inb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_open_inb_mbox</refname>
 <refpurpose>
     Initialize MPC85xx inbound mailbox
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>rio_open_inb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>void * <parameter>dev_id</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
   <paramdef>int <parameter>entries</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port implementing the inbound message unit
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_id</parameter></term>
   <listitem>
    <para>
     Device specific pointer to pass on event
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox to open
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>entries</parameter></term>
   <listitem>
    <para>
     Number of entries in the inbound mailbox ring
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Initializes buffer ring, request the inbound message interrupt,
   and enables the inbound message unit. Returns <constant>0</constant> on success
   and <constant>-EINVAL</constant> or <constant>-ENOMEM</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-rio-close-inb-mbox">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>rio_close_inb_mbox</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>rio_close_inb_mbox</refname>
 <refpurpose>
     Shut down MPC85xx inbound mailbox
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>rio_close_inb_mbox </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
   <paramdef>int <parameter>mbox</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port implementing the inbound message unit
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>mbox</parameter></term>
   <listitem>
    <para>
     Mailbox to close
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Disables the inbound message unit, free all buffers, and
   frees the inbound message interrupt.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-rio-dbell-handler">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_dbell_handler</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_dbell_handler</refname>
 <refpurpose>
     MPC85xx doorbell interrupt handler
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>irqreturn_t <function>mpc85xx_rio_dbell_handler </function></funcdef>
   <paramdef>int <parameter>irq</parameter></paramdef>
   <paramdef>void * <parameter>dev_instance</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>irq</parameter></term>
   <listitem>
    <para>
     Linux interrupt number
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>dev_instance</parameter></term>
   <listitem>
    <para>
     Pointer to interrupt-specific data
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Handles doorbell interrupts. Parses a list of registered
   doorbell event handlers and executes a matching event handler.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-rio-doorbell-init">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_doorbell_init</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_doorbell_init</refname>
 <refpurpose>
     MPC85xx doorbell interface init
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>int <function>mpc85xx_rio_doorbell_init </function></funcdef>
   <paramdef>struct rio_mport * <parameter>mport</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>mport</parameter></term>
   <listitem>
    <para>
     Master port implementing the inbound doorbell unit
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Initializes doorbell unit hardware and inbound DMA buffer
   ring. Called from <function>mpc85xx_rio_setup</function>. Returns <constant>0</constant> on success
   or <constant>-ENOMEM</constant> on failure.
</para>
</refsect1>
</refentry>

<refentry id="API-mpc85xx-rio-setup">
<refentryinfo>
 <title>LINUX</title>
 <productname>Kernel Hackers Manual</productname>
 <date>February 2008</date>
</refentryinfo>
<refmeta>
 <refentrytitle><phrase>mpc85xx_rio_setup</phrase></refentrytitle>
 <manvolnum>9</manvolnum>
 <refmiscinfo class="version">2.6.25-rc2</refmiscinfo>
</refmeta>
<refnamediv>
 <refname>mpc85xx_rio_setup</refname>
 <refpurpose>
     Setup MPC85xx RapidIO interface
 </refpurpose>
</refnamediv>
<refsynopsisdiv>
 <title>Synopsis</title>
  <funcsynopsis><funcprototype>
   <funcdef>void <function>mpc85xx_rio_setup </function></funcdef>
   <paramdef>int <parameter>law_start</parameter></paramdef>
   <paramdef>int <parameter>law_size</parameter></paramdef>
  </funcprototype></funcsynopsis>
</refsynopsisdiv>
<refsect1>
 <title>Arguments</title>
 <variablelist>
  <varlistentry>
   <term><parameter>law_start</parameter></term>
   <listitem>
    <para>
     Starting physical address of RapidIO LAW
    </para>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term><parameter>law_size</parameter></term>
   <listitem>
    <para>
     Size of RapidIO LAW
    </para>
   </listitem>
  </varlistentry>
 </variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>
   Initializes MPC85xx RapidIO hardware interface, configures
   master port with system-specific info, and registers the
   master port with the RapidIO subsystem.
</para>
</refsect1>
</refentry>

     </sect1>
  </chapter>

  <chapter id="credits">
     <title>Credits</title>
	<para>
		The following people have contributed to the RapidIO
		subsystem directly or indirectly:
		<orderedlist>
			<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
			<listitem><para>Randy Vinson<email>rvinson@mvista.com</email></para></listitem>
			<listitem><para>Dan Malek<email>dan@embeddedalley.com</email></para></listitem>
		</orderedlist>
	</para>
	<para>
		The following people have contributed to this document:
		<orderedlist>
			<listitem><para>Matt Porter<email>mporter@kernel.crashing.org</email></para></listitem>
		</orderedlist>
	</para>
  </chapter>
</book>
