// SPDX-License-Identifier: GPL-2.0-or-later /* * RapidIO configuration space access support * * Copyright 2005 MontaVista Software, Inc. * Matt Porter <[email protected]> */ #include <linux/rio.h> #include <linux/module.h> #include <linux/rio_drv.h> /* * Wrappers for all RIO configuration access functions. They just check * alignment and call the low-level functions pointed to by rio_mport->ops. */ #define RIO_8_BAD … #define RIO_16_BAD … #define RIO_32_BAD … /** * RIO_LOP_READ - Generate rio_local_read_config_* functions * @size: Size of configuration space read (8, 16, 32 bits) * @type: C type of value argument * @len: Length of configuration space read (1, 2, 4 bytes) * * Generates rio_local_read_config_* functions used to access * configuration space registers on the local device. */ #define RIO_LOP_READ(size,type,len) … /** * RIO_LOP_WRITE - Generate rio_local_write_config_* functions * @size: Size of configuration space write (8, 16, 32 bits) * @type: C type of value argument * @len: Length of configuration space write (1, 2, 4 bytes) * * Generates rio_local_write_config_* functions used to access * configuration space registers on the local device. */ #define RIO_LOP_WRITE(size,type,len) … RIO_LOP_READ(…) RIO_LOP_READ(…) RIO_LOP_READ(…) RIO_LOP_WRITE(…) RIO_LOP_WRITE(…) RIO_LOP_WRITE(…) EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); /** * RIO_OP_READ - Generate rio_mport_read_config_* functions * @size: Size of configuration space read (8, 16, 32 bits) * @type: C type of value argument * @len: Length of configuration space read (1, 2, 4 bytes) * * Generates rio_mport_read_config_* functions used to access * configuration space registers on the local device. */ #define RIO_OP_READ(size,type,len) … /** * RIO_OP_WRITE - Generate rio_mport_write_config_* functions * @size: Size of configuration space write (8, 16, 32 bits) * @type: C type of value argument * @len: Length of configuration space write (1, 2, 4 bytes) * * Generates rio_mport_write_config_* functions used to access * configuration space registers on the local device. */ #define RIO_OP_WRITE(size,type,len) … RIO_OP_READ(…) RIO_OP_READ(…) RIO_OP_READ(…) RIO_OP_WRITE(…) RIO_OP_WRITE(…) RIO_OP_WRITE(…) EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); EXPORT_SYMBOL_GPL(…); /** * rio_mport_send_doorbell - Send a doorbell message * * @mport: RIO master port * @destid: RIO device destination ID * @data: Doorbell message data * * Send a doorbell message to a RIO device. The doorbell message * has a 16-bit info field provided by the data argument. */ int rio_mport_send_doorbell(struct rio_mport *mport, u16 destid, u16 data) { … } EXPORT_SYMBOL_GPL(…);