linux/drivers/rapidio/switches/idt_gen3.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * IDT RXS Gen.3 Serial RapidIO switch family support
 *
 * Copyright 2016 Integrated Device Technology, Inc.
 */

#include <linux/stat.h>
#include <linux/module.h>
#include <linux/rio.h>
#include <linux/rio_drv.h>
#include <linux/rio_ids.h>
#include <linux/delay.h>

#include <asm/page.h>
#include "../rio.h"

#define RIO_EM_PW_STAT
#define RIO_PW_CTL
#define RIO_PW_CTL_PW_TMR
#define RIO_PW_ROUTE

#define RIO_EM_DEV_INT_EN

#define RIO_PLM_SPx_IMP_SPEC_CTL(x)
#define RIO_PLM_SPx_IMP_SPEC_CTL_SOFT_RST

#define RIO_PLM_SPx_PW_EN(x)
#define RIO_PLM_SPx_PW_EN_OK2U
#define RIO_PLM_SPx_PW_EN_LINIT

#define RIO_BC_L2_Gn_ENTRYx_CSR(n, x)
#define RIO_SPx_L2_Gn_ENTRYy_CSR(x, n, y)

static int
idtg3_route_add_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
		       u16 table, u16 route_destid, u8 route_port)
{}

static int
idtg3_route_get_entry(struct rio_mport *mport, u16 destid, u8 hopcount,
		       u16 table, u16 route_destid, u8 *route_port)
{}

static int
idtg3_route_clr_table(struct rio_mport *mport, u16 destid, u8 hopcount,
		       u16 table)
{}

/*
 * This routine performs device-specific initialization only.
 * All standard EM configuration should be performed at upper level.
 */
static int
idtg3_em_init(struct rio_dev *rdev)
{}


/*
 * idtg3_em_handler - device-specific error handler
 *
 * If the link is down (PORT_UNINIT) does nothing - this is considered
 * as link partner removal from the port.
 *
 * If the link is up (PORT_OK) - situation is handled as *new* device insertion.
 * In this case ERR_STOP bits are cleared by issuing soft reset command to the
 * reporting port. Inbound and outbound ackIDs are cleared by the reset as well.
 * This way the port is synchronized with freshly inserted device (assuming it
 * was reset/powered-up on insertion).
 *
 * TODO: This is not sufficient in a situation when a link between two devices
 * was down and up again (e.g. cable disconnect). For that situation full ackID
 * realignment process has to be implemented.
 */
static int
idtg3_em_handler(struct rio_dev *rdev, u8 pnum)
{}

static struct rio_switch_ops idtg3_switch_ops =;

static int idtg3_probe(struct rio_dev *rdev, const struct rio_device_id *id)
{}

static void idtg3_remove(struct rio_dev *rdev)
{}

/*
 * Gen3 switches repeat sending PW messages until a corresponding event flag
 * is cleared. Use shutdown notification to disable generation of port-write
 * messages if their destination node is shut down.
 */
static void idtg3_shutdown(struct rio_dev *rdev)
{}

static const struct rio_device_id idtg3_id_table[] =;

static struct rio_driver idtg3_driver =;

static int __init idtg3_init(void)
{}

static void __exit idtg3_exit(void)
{}

device_initcall(idtg3_init);
module_exit(idtg3_exit);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();