linux/include/uapi/linux/switchtec_ioctl.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * Microsemi Switchtec PCIe Driver
 * Copyright (c) 2017, Microsemi Corporation
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope 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.
 *
 */

#ifndef _UAPI_LINUX_SWITCHTEC_IOCTL_H
#define _UAPI_LINUX_SWITCHTEC_IOCTL_H

#include <linux/types.h>

#define SWITCHTEC_IOCTL_PART_CFG0
#define SWITCHTEC_IOCTL_PART_CFG1
#define SWITCHTEC_IOCTL_PART_IMG0
#define SWITCHTEC_IOCTL_PART_IMG1
#define SWITCHTEC_IOCTL_PART_NVLOG
#define SWITCHTEC_IOCTL_PART_VENDOR0
#define SWITCHTEC_IOCTL_PART_VENDOR1
#define SWITCHTEC_IOCTL_PART_VENDOR2
#define SWITCHTEC_IOCTL_PART_VENDOR3
#define SWITCHTEC_IOCTL_PART_VENDOR4
#define SWITCHTEC_IOCTL_PART_VENDOR5
#define SWITCHTEC_IOCTL_PART_VENDOR6
#define SWITCHTEC_IOCTL_PART_VENDOR7
#define SWITCHTEC_IOCTL_PART_BL2_0
#define SWITCHTEC_IOCTL_PART_BL2_1
#define SWITCHTEC_IOCTL_PART_MAP_0
#define SWITCHTEC_IOCTL_PART_MAP_1
#define SWITCHTEC_IOCTL_PART_KEY_0
#define SWITCHTEC_IOCTL_PART_KEY_1

#define SWITCHTEC_NUM_PARTITIONS_GEN3
#define SWITCHTEC_NUM_PARTITIONS_GEN4

/* obsolete: for compatibility with old userspace software */
#define SWITCHTEC_IOCTL_NUM_PARTITIONS

struct switchtec_ioctl_flash_info {};

#define SWITCHTEC_IOCTL_PART_ACTIVE
#define SWITCHTEC_IOCTL_PART_RUNNING

struct switchtec_ioctl_flash_part_info {};

struct switchtec_ioctl_event_summary_legacy {};

struct switchtec_ioctl_event_summary {};

#define SWITCHTEC_IOCTL_EVENT_STACK_ERROR
#define SWITCHTEC_IOCTL_EVENT_PPU_ERROR
#define SWITCHTEC_IOCTL_EVENT_ISP_ERROR
#define SWITCHTEC_IOCTL_EVENT_SYS_RESET
#define SWITCHTEC_IOCTL_EVENT_FW_EXC
#define SWITCHTEC_IOCTL_EVENT_FW_NMI
#define SWITCHTEC_IOCTL_EVENT_FW_NON_FATAL
#define SWITCHTEC_IOCTL_EVENT_FW_FATAL
#define SWITCHTEC_IOCTL_EVENT_TWI_MRPC_COMP
#define SWITCHTEC_IOCTL_EVENT_TWI_MRPC_COMP_ASYNC
#define SWITCHTEC_IOCTL_EVENT_CLI_MRPC_COMP
#define SWITCHTEC_IOCTL_EVENT_CLI_MRPC_COMP_ASYNC
#define SWITCHTEC_IOCTL_EVENT_GPIO_INT
#define SWITCHTEC_IOCTL_EVENT_PART_RESET
#define SWITCHTEC_IOCTL_EVENT_MRPC_COMP
#define SWITCHTEC_IOCTL_EVENT_MRPC_COMP_ASYNC
#define SWITCHTEC_IOCTL_EVENT_DYN_PART_BIND_COMP
#define SWITCHTEC_IOCTL_EVENT_AER_IN_P2P
#define SWITCHTEC_IOCTL_EVENT_AER_IN_VEP
#define SWITCHTEC_IOCTL_EVENT_DPC
#define SWITCHTEC_IOCTL_EVENT_CTS
#define SWITCHTEC_IOCTL_EVENT_HOTPLUG
#define SWITCHTEC_IOCTL_EVENT_IER
#define SWITCHTEC_IOCTL_EVENT_THRESH
#define SWITCHTEC_IOCTL_EVENT_POWER_MGMT
#define SWITCHTEC_IOCTL_EVENT_TLP_THROTTLING
#define SWITCHTEC_IOCTL_EVENT_FORCE_SPEED
#define SWITCHTEC_IOCTL_EVENT_CREDIT_TIMEOUT
#define SWITCHTEC_IOCTL_EVENT_LINK_STATE
#define SWITCHTEC_IOCTL_EVENT_GFMS
#define SWITCHTEC_IOCTL_EVENT_INTERCOMM_REQ_NOTIFY
#define SWITCHTEC_IOCTL_EVENT_UEC
#define SWITCHTEC_IOCTL_MAX_EVENTS

#define SWITCHTEC_IOCTL_EVENT_LOCAL_PART_IDX
#define SWITCHTEC_IOCTL_EVENT_IDX_ALL

#define SWITCHTEC_IOCTL_EVENT_FLAG_CLEAR
#define SWITCHTEC_IOCTL_EVENT_FLAG_EN_POLL
#define SWITCHTEC_IOCTL_EVENT_FLAG_EN_LOG
#define SWITCHTEC_IOCTL_EVENT_FLAG_EN_CLI
#define SWITCHTEC_IOCTL_EVENT_FLAG_EN_FATAL
#define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_POLL
#define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_LOG
#define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_CLI
#define SWITCHTEC_IOCTL_EVENT_FLAG_DIS_FATAL
#define SWITCHTEC_IOCTL_EVENT_FLAG_UNUSED

struct switchtec_ioctl_event_ctl {};

#define SWITCHTEC_IOCTL_PFF_VEP
struct switchtec_ioctl_pff_port {};

#define SWITCHTEC_IOCTL_FLASH_INFO
#define SWITCHTEC_IOCTL_FLASH_PART_INFO
#define SWITCHTEC_IOCTL_EVENT_SUMMARY
#define SWITCHTEC_IOCTL_EVENT_SUMMARY_LEGACY
#define SWITCHTEC_IOCTL_EVENT_CTL
#define SWITCHTEC_IOCTL_PFF_TO_PORT
#define SWITCHTEC_IOCTL_PORT_TO_PFF

#endif