/*
 * RapidIO interconnect services
 * (RapidIO Interconnect Specification, http://www.rapidio.org)
 *
 * Copyright 2005 MontaVista Software, Inc.
 * Matt Porter <mporter@kernel.crashing.org>
 *
 * Add DirectI/O and /dev interface
 *
 * Copyright 2010 Texas Instruments Incorporated
 * Aurelien Jacquiot <a-jacquiot@ti.com>
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of  the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */

#ifndef LINUX_RIO_H
#define LINUX_RIO_H

#include <linux/ioctl.h>

/* Device Ioctl */
#define RIO_DIO_BASE_SET     _IOR('R', 0, int) /* Set base offset */
#define RIO_DIO_BASE_GET     _IOW('R', 1, int) /* Get base offset */
#define RIO_DIO_MODE_SET     _IOR('R', 2, int) /* Set Direct I/O mode */
#define RIO_DIO_MODE_GET     _IOW('R', 3, int) /* Get Direct I/O mode */
#define RIO_DBELL_TX         _IOR('R', 4, int) /* Sent a doorbell */
#define RIO_DBELL_RX         _IOR('R', 5, int) /* Receive a doorbell */

/* Direct I/O modes */
#define RIO_DIO_MODE_READ    0x0000
#define RIO_DIO_MODE_WRITER  0x0001
#define RIO_DIO_MODE_WRITE   0x0002
#define RIO_DIO_MODE_SWRITE  0x0003

#endif				/* LINUX_RIO_H */
