mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 23:26:43 +07:00
74ba9207e1
Based on 1 normalized pattern(s): 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 this program is distributed in the hope that 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 you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 441 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
105 lines
3.6 KiB
C
105 lines
3.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/* $Id: cosa.h,v 1.6 1999/01/06 14:02:44 kas Exp $ */
|
|
|
|
/*
|
|
* Copyright (C) 1995-1997 Jan "Yenya" Kasprzak <kas@fi.muni.cz>
|
|
*/
|
|
|
|
#ifndef COSA_H__
|
|
#define COSA_H__
|
|
|
|
#include <linux/ioctl.h>
|
|
|
|
#ifdef __KERNEL__
|
|
/* status register - output bits */
|
|
#define SR_RX_DMA_ENA 0x04 /* receiver DMA enable bit */
|
|
#define SR_TX_DMA_ENA 0x08 /* transmitter DMA enable bit */
|
|
#define SR_RST 0x10 /* SRP reset */
|
|
#define SR_USR_INT_ENA 0x20 /* user interrupt enable bit */
|
|
#define SR_TX_INT_ENA 0x40 /* transmitter interrupt enable bit */
|
|
#define SR_RX_INT_ENA 0x80 /* receiver interrupt enable bit */
|
|
|
|
/* status register - input bits */
|
|
#define SR_USR_RQ 0x20 /* user interrupt request pending */
|
|
#define SR_TX_RDY 0x40 /* transmitter empty (ready) */
|
|
#define SR_RX_RDY 0x80 /* receiver data ready */
|
|
|
|
#define SR_UP_REQUEST 0x02 /* request from SRP to transfer data
|
|
up to PC */
|
|
#define SR_DOWN_REQUEST 0x01 /* SRP is able to transfer data down
|
|
from PC to SRP */
|
|
#define SR_END_OF_TRANSFER 0x03 /* SRP signalize end of
|
|
transfer (up or down) */
|
|
|
|
#define SR_CMD_FROM_SRP_MASK 0x03 /* mask to get SRP command */
|
|
|
|
/* bits in driver status byte definitions : */
|
|
#define SR_RDY_RCV 0x01 /* ready to receive packet */
|
|
#define SR_RDY_SND 0x02 /* ready to send packet */
|
|
#define SR_CMD_PND 0x04 /* command pending */ /* not currently used */
|
|
|
|
/* ???? */
|
|
#define SR_PKT_UP 0x01 /* transfer of packet up in progress */
|
|
#define SR_PKT_DOWN 0x02 /* transfer of packet down in progress */
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#define SR_LOAD_ADDR 0x4400 /* SRP microcode load address */
|
|
#define SR_START_ADDR 0x4400 /* SRP microcode start address */
|
|
|
|
#define COSA_LOAD_ADDR 0x400 /* SRP microcode load address */
|
|
#define COSA_MAX_FIRMWARE_SIZE 0x10000
|
|
|
|
/* ioctls */
|
|
struct cosa_download {
|
|
int addr, len;
|
|
char __user *code;
|
|
};
|
|
|
|
/* Reset the device */
|
|
#define COSAIORSET _IO('C',0xf0)
|
|
|
|
/* Start microcode at given address */
|
|
#define COSAIOSTRT _IOW('C',0xf1, int)
|
|
|
|
/* Read the block from the device memory */
|
|
#define COSAIORMEM _IOWR('C',0xf2, struct cosa_download *)
|
|
/* actually the struct cosa_download itself; this is to keep
|
|
* the ioctl number same as in 2.4 in order to keep the user-space
|
|
* utils compatible. */
|
|
|
|
/* Write the block to the device memory (i.e. download the microcode) */
|
|
#define COSAIODOWNLD _IOW('C',0xf2, struct cosa_download *)
|
|
/* actually the struct cosa_download itself; this is to keep
|
|
* the ioctl number same as in 2.4 in order to keep the user-space
|
|
* utils compatible. */
|
|
|
|
/* Read the device type (one of "srp", "cosa", and "cosa8" for now) */
|
|
#define COSAIORTYPE _IOR('C',0xf3, char *)
|
|
|
|
/* Read the device identification string */
|
|
#define COSAIORIDSTR _IOR('C',0xf4, char *)
|
|
/* Maximum length of the identification string. */
|
|
#define COSA_MAX_ID_STRING 128
|
|
|
|
/* Increment/decrement the module usage count :-) */
|
|
/* #define COSAIOMINC _IO('C',0xf5) */
|
|
/* #define COSAIOMDEC _IO('C',0xf6) */
|
|
|
|
/* Get the total number of cards installed */
|
|
#define COSAIONRCARDS _IO('C',0xf7)
|
|
|
|
/* Get the number of channels on this card */
|
|
#define COSAIONRCHANS _IO('C',0xf8)
|
|
|
|
/* Set the driver for the bus-master operations */
|
|
#define COSAIOBMSET _IOW('C', 0xf9, unsigned short)
|
|
|
|
#define COSA_BM_OFF 0 /* Bus-mastering off - use ISA DMA (default) */
|
|
#define COSA_BM_ON 1 /* Bus-mastering on - faster but untested */
|
|
|
|
/* Gets the busmaster status */
|
|
#define COSAIOBMGET _IO('C', 0xfa)
|
|
|
|
#endif /* !COSA_H__ */
|