|
Linux Kernel
3.7.1
|
#include <linux/types.h>#include <linux/dma-mapping.h>#include <linux/interrupt.h>#include <linux/of_platform.h>#include <linux/slab.h>#include "fsl_rio.h"Go to the source code of this file.
Data Structures | |
| struct | rio_msg_regs |
| struct | rio_dbell_regs |
| struct | rio_pw_regs |
| struct | rio_tx_desc |
| struct | rio_msg_tx_ring |
| struct | rio_msg_rx_ring |
| struct | fsl_rmu |
| struct | rio_dbell_msg |
Macros | |
| #define | GET_RMM_HANDLE(mport) (((struct rio_priv *)(mport->priv))->rmm_handle) |
| #define | IRQ_RIO_PW(m) (((struct fsl_rio_pw *)(m))->pwirq) |
| #define | IRQ_RIO_BELL(m) (((struct fsl_rio_dbell *)(m))->bellirq) |
| #define | IRQ_RIO_TX(m) (((struct fsl_rmu *)(GET_RMM_HANDLE(m)))->txirq) |
| #define | IRQ_RIO_RX(m) (((struct fsl_rmu *)(GET_RMM_HANDLE(m)))->rxirq) |
| #define | RIO_MIN_TX_RING_SIZE 2 |
| #define | RIO_MAX_TX_RING_SIZE 2048 |
| #define | RIO_MIN_RX_RING_SIZE 2 |
| #define | RIO_MAX_RX_RING_SIZE 2048 |
| #define | RIO_IPWMR_SEN 0x00100000 |
| #define | RIO_IPWMR_QFIE 0x00000100 |
| #define | RIO_IPWMR_EIE 0x00000020 |
| #define | RIO_IPWMR_CQ 0x00000002 |
| #define | RIO_IPWMR_PWE 0x00000001 |
| #define | RIO_IPWSR_QF 0x00100000 |
| #define | RIO_IPWSR_TE 0x00000080 |
| #define | RIO_IPWSR_QFI 0x00000010 |
| #define | RIO_IPWSR_PWD 0x00000008 |
| #define | RIO_IPWSR_PWB 0x00000004 |
| #define | RIO_EPWISR 0x10010 |
| #define | RIO_EPWISR_PINT1 0x80000000 |
| #define | RIO_EPWISR_PINT2 0x40000000 |
| #define | RIO_EPWISR_MU 0x00000002 |
| #define | RIO_EPWISR_PW 0x00000001 |
| #define | IPWSR_CLEAR 0x98 |
| #define | OMSR_CLEAR 0x1cb3 |
| #define | IMSR_CLEAR 0x491 |
| #define | IDSR_CLEAR 0x91 |
| #define | ODSR_CLEAR 0x1c00 |
| #define | LTLEECSR_ENABLE_ALL 0xFFC000FC |
| #define | RIO_LTLEECSR 0x060c |
| #define | RIO_IM0SR 0x64 |
| #define | RIO_IM1SR 0x164 |
| #define | RIO_OM0SR 0x4 |
| #define | RIO_OM1SR 0x104 |
| #define | RIO_DBELL_WIN_SIZE 0x1000 |
| #define | RIO_MSG_OMR_MUI 0x00000002 |
| #define | RIO_MSG_OSR_TE 0x00000080 |
| #define | RIO_MSG_OSR_QOI 0x00000020 |
| #define | RIO_MSG_OSR_QFI 0x00000010 |
| #define | RIO_MSG_OSR_MUB 0x00000004 |
| #define | RIO_MSG_OSR_EOMI 0x00000002 |
| #define | RIO_MSG_OSR_QEI 0x00000001 |
| #define | RIO_MSG_IMR_MI 0x00000002 |
| #define | RIO_MSG_ISR_TE 0x00000080 |
| #define | RIO_MSG_ISR_QFI 0x00000010 |
| #define | RIO_MSG_ISR_DIQI 0x00000001 |
| #define | RIO_MSG_DESC_SIZE 32 |
| #define | RIO_MSG_BUFFER_SIZE 4096 |
| #define | DOORBELL_DMR_DI 0x00000002 |
| #define | DOORBELL_DSR_TE 0x00000080 |
| #define | DOORBELL_DSR_QFI 0x00000010 |
| #define | DOORBELL_DSR_DIQI 0x00000001 |
| #define | DOORBELL_MESSAGE_SIZE 0x08 |
Functions | |
| void | msg_unit_error_handler (void) |
| int | fsl_rio_pw_enable (struct rio_mport *mport, int enable) |
| int | fsl_rio_port_write_init (struct fsl_rio_pw *pw) |
| int | fsl_rio_doorbell_send (struct rio_mport *mport, int index, u16 destid, u16 data) |
| int | fsl_add_outb_message (struct rio_mport *mport, struct rio_dev *rdev, int mbox, void *buffer, size_t len) |
| int | fsl_open_outb_mbox (struct rio_mport *mport, void *dev_id, int mbox, int entries) |
| void | fsl_close_outb_mbox (struct rio_mport *mport, int mbox) |
| int | fsl_open_inb_mbox (struct rio_mport *mport, void *dev_id, int mbox, int entries) |
| void | fsl_close_inb_mbox (struct rio_mport *mport, int mbox) |
| int | fsl_add_inb_buffer (struct rio_mport *mport, int mbox, void *buf) |
| void * | fsl_get_inb_message (struct rio_mport *mport, int mbox) |
| int | fsl_rio_doorbell_init (struct fsl_rio_dbell *dbell) |
| int | fsl_rio_setup_rmu (struct rio_mport *mport, struct device_node *node) |
| #define IRQ_RIO_BELL | ( | m | ) | (((struct fsl_rio_dbell *)(m))->bellirq) |
| #define IRQ_RIO_PW | ( | m | ) | (((struct fsl_rio_pw *)(m))->pwirq) |
| #define IRQ_RIO_RX | ( | m | ) | (((struct fsl_rmu *)(GET_RMM_HANDLE(m)))->rxirq) |
| #define IRQ_RIO_TX | ( | m | ) | (((struct fsl_rmu *)(GET_RMM_HANDLE(m)))->txirq) |
| int fsl_add_outb_message | ( | struct rio_mport * | mport, |
| struct rio_dev * | rdev, | ||
| int | mbox, | ||
| void * | buffer, | ||
| size_t | len | ||
| ) |
fsl_add_outb_message - Add message to the MPC85xx outbound message queue : Master port with outbound message queue : Target of outbound message : Outbound mailbox : Message to add to outbound queue : Length of message
Adds the message to the MPC85xx outbound message queue. Returns %0 on success or %-EINVAL on failure.
fsl_open_inb_mbox - Initialize MPC85xx inbound mailbox : Master port implementing the inbound message unit : Device specific pointer to pass on event : Mailbox to open : Number of entries in the inbound mailbox ring
Initializes buffer ring, request the inbound message interrupt, and enables the inbound message unit. Returns %0 on success and %-EINVAL or %-ENOMEM on failure.
fsl_open_outb_mbox - Initialize MPC85xx outbound mailbox : Master port implementing the outbound message unit : Device specific pointer to pass on event : Mailbox to open : Number of entries in the outbound mailbox ring
Initializes buffer ring, request the outbound message interrupt, and enables the outbound message unit. Returns %0 on success and %-EINVAL or %-ENOMEM on failure.
| int fsl_rio_doorbell_init | ( | struct fsl_rio_dbell * | dbell | ) |
fsl_rio_doorbell_init - MPC85xx doorbell interface init : Master port implementing the inbound doorbell unit
Initializes doorbell unit hardware and inbound DMA buffer ring. Called from fsl_rio_setup(). Returns %0 on success or %-ENOMEM on failure.
fsl_rio_doorbell_send - Send a MPC85xx doorbell message : RapidIO master port info : ID of RapidIO interface : Destination ID of target device : 16-bit info field of RapidIO doorbell message
Sends a MPC85xx doorbell message. Returns %0 on success or %-EINVAL on failure.
| int fsl_rio_port_write_init | ( | struct fsl_rio_pw * | pw | ) |
fsl_rio_port_write_init - MPC85xx port write interface init : Master port implementing the port write unit
Initializes port write unit hardware and DMA buffer ring. Called from fsl_rio_setup(). Returns %0 on success or %-ENOMEM on failure.
| int fsl_rio_setup_rmu | ( | struct rio_mport * | mport, |
| struct device_node * | node | ||
| ) |
1.8.2