RapidIO Subsystem Guide

Matt Porter


      
      
     

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.

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.

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

For more details see the file COPYING in the source distribution of Linux.


Table of Contents

1. Introduction
2. Known Bugs and Limitations
Bugs
Limitations
3. RapidIO driver interface
Functions
rio_local_read_config_32 — Read 32 bits from local configuration space
rio_local_write_config_32 — Write 32 bits to local configuration space
rio_local_read_config_16 — Read 16 bits from local configuration space
rio_local_write_config_16 — Write 16 bits to local configuration space
rio_local_read_config_8 — Read 8 bits from local configuration space
rio_local_write_config_8 — Write 8 bits to local configuration space
rio_read_config_32 — Read 32 bits from configuration space
rio_write_config_32 — Write 32 bits to configuration space
rio_read_config_16 — Read 16 bits from configuration space
rio_write_config_16 — Write 16 bits to configuration space
rio_read_config_8 — Read 8 bits from configuration space
rio_write_config_8 — Write 8 bits to configuration space
rio_send_doorbell — Send a doorbell message to a device
rio_init_mbox_res — Initialize a RIO mailbox resource
rio_init_dbell_res — Initialize a RIO doorbell resource
RIO_DEVICE — macro used to describe a specific RIO device
rio_add_outb_message — Add RIO message to an outbound mailbox queue
rio_add_inb_buffer — Add buffer to an inbound mailbox queue
rio_get_inb_message — Get A RIO message from an inbound mailbox queue
rio_name — Get the unique RIO device identifier
rio_get_drvdata — Get RIO driver specific data
rio_set_drvdata — Set RIO driver specific data
rio_dev_get — Increments the reference count of the RIO device structure
rio_dev_put — Release a use of the RIO device structure
rio_register_driver — register a new RIO driver
rio_unregister_driver — unregister a RIO driver
rio_local_get_device_id — Get the base/extended device id for a port
rio_request_inb_mbox — request inbound mailbox service
rio_release_inb_mbox — release inbound mailbox message service
rio_request_outb_mbox — request outbound mailbox service
rio_release_outb_mbox — release outbound mailbox message service
rio_request_inb_dbell — request inbound doorbell message service
rio_release_inb_dbell — release inbound doorbell message service
rio_request_outb_dbell — request outbound doorbell message range
rio_release_outb_dbell — release outbound doorbell message range
rio_get_asm — Begin or continue searching for a RIO device by vid/did/asm_vid/asm_did
rio_get_device — Begin or continue searching for a RIO device by vid/did
4. Internals
Structures
struct rio_dev — RIO device info
struct rio_msg — RIO message event
struct rio_dbell — RIO doorbell event
struct rio_mport — RIO master port info
struct rio_net — RIO network info
struct rio_switch — RIO switch info
struct rio_ops — Low-level RIO configuration space operations
struct rio_driver — RIO driver info
struct rio_device_id — RIO device identifier
struct rio_route_ops — Per-switch route operations
Enumeration and Discovery
rio_get_device_id — Get the base/extended device id for a device
rio_set_device_id — Set the base/extended device id for a device
rio_local_set_device_id — Set the base/extended device id for a port
rio_clear_locks — Release all host locks and signal enumeration complete
rio_enum_host — Set host lock and initialize host destination ID
rio_device_has_destid — Test if a device contains a destination ID register
rio_release_dev — Frees a RIO device struct
rio_is_switch — Tests if a RIO device has switch capabilities
rio_route_set_ops — Sets routing operations for a particular vendor switch
rio_add_device — Adds a RIO device to the device model
rio_setup_device — Allocates and sets up a RIO device
rio_sport_is_active — Tests if a switch port has an active connection.
rio_route_add_entry — Add a route entry to a switch routing table
rio_route_get_entry — Read a route entry in a switch routing table
rio_get_host_deviceid_lock — Reads the Host Device ID Lock CSR on a device
rio_get_swpinfo_inport — Gets the ingress port number
rio_get_swpinfo_tports — Gets total number of ports on the switch
rio_net_add_mport — Add a master port to a RIO network
rio_enum_peer — Recursively enumerate a RIO network through a master port
rio_enum_complete — Tests if enumeration of a network is complete
rio_disc_peer — Recursively discovers a RIO network through a master port
rio_mport_is_active — Tests if master port link is active
rio_alloc_net — Allocate and configure a new RIO network
rio_enum_mport — Start enumeration through a master port
rio_build_route_tables — Generate route tables from switch route entries
rio_enum_timeout — Signal that enumeration timed out
rio_disc_mport — Start discovery through a master port
Driver functionality
rio_setup_inb_dbell — bind inbound doorbell callback
rio_mport_get_feature — query for devices' extended features
RIO_LOP_READ — Generate rio_local_read_config_* functions
RIO_LOP_WRITE — Generate rio_local_write_config_* functions
RIO_OP_READ — Generate rio_mport_read_config_* functions
RIO_OP_WRITE — Generate rio_mport_write_config_* functions
Device model support
rio_match_device — Tell if a RIO device has a matching RIO device id structure
rio_device_probe — Tell if a RIO device structure has a matching RIO
rio_device_remove — Remove a RIO device from the system
rio_match_bus — Tell if a RIO device structure has a matching RIO
rio_bus_init — Register the RapidIO bus with the device model
Sysfs support
rio_create_sysfs_dev_files — create RIO specific sysfs files
rio_remove_sysfs_dev_files — cleanup RIO specific sysfs files
PPC32 support
platform_rio_init — Do platform specific RIO init
ppc_rio_init — Do PPC32 RIO init
rio_hw_add_outb_message — Add message to the MPC85xx outbound message queue
rio_hw_add_inb_buffer — Add buffer to the MPC85xx inbound message queue
rio_hw_get_inb_message — Fetch inbound message from the MPC85xx message unit
mpc85xx_rio_doorbell_send — Send a MPC85xx doorbell message
mpc85xx_local_config_read — Generate a MPC85xx local config space read
mpc85xx_local_config_write — Generate a MPC85xx local config space write
mpc85xx_rio_config_read — Generate a MPC85xx read maintenance transaction
mpc85xx_rio_config_write — Generate a MPC85xx write maintenance transaction
mpc85xx_rio_tx_handler — MPC85xx outbound message interrupt handler
rio_open_outb_mbox — Initialize MPC85xx outbound mailbox
rio_close_outb_mbox — Shut down MPC85xx outbound mailbox
mpc85xx_rio_rx_handler — MPC85xx inbound message interrupt handler
rio_open_inb_mbox — Initialize MPC85xx inbound mailbox
rio_close_inb_mbox — Shut down MPC85xx inbound mailbox
mpc85xx_rio_dbell_handler — MPC85xx doorbell interrupt handler
mpc85xx_rio_doorbell_init — MPC85xx doorbell interface init
mpc85xx_rio_setup — Setup MPC85xx RapidIO interface
5. Credits