linux/drivers/usb/serial/io_ti.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*****************************************************************************
 *
 *	Copyright (C) 1997-2002 Inside Out Networks, Inc.
 *
 *	Feb-16-2001	DMI	Added I2C structure definitions
 *	May-29-2002	gkh	Ported to Linux
 *
 *
 ******************************************************************************/

#ifndef _IO_TI_H_
#define _IO_TI_H_

/* Address Space */
#define DTK_ADDR_SPACE_XDATA
#define DTK_ADDR_SPACE_I2C_TYPE_II
#define DTK_ADDR_SPACE_I2C_TYPE_III

/* UART Defines */
#define UMPMEM_BASE_UART1
#define UMPMEM_BASE_UART2
#define UMPMEM_OFFS_UART_LSR

/* Bits per character */
#define UMP_UART_CHAR5BITS
#define UMP_UART_CHAR6BITS
#define UMP_UART_CHAR7BITS
#define UMP_UART_CHAR8BITS

/* Parity */
#define UMP_UART_NOPARITY
#define UMP_UART_ODDPARITY
#define UMP_UART_EVENPARITY
#define UMP_UART_MARKPARITY
#define UMP_UART_SPACEPARITY

/* Stop bits */
#define UMP_UART_STOPBIT1
#define UMP_UART_STOPBIT15
#define UMP_UART_STOPBIT2

/* Line status register masks */
#define UMP_UART_LSR_OV_MASK
#define UMP_UART_LSR_PE_MASK
#define UMP_UART_LSR_FE_MASK
#define UMP_UART_LSR_BR_MASK
#define UMP_UART_LSR_ER_MASK
#define UMP_UART_LSR_RX_MASK
#define UMP_UART_LSR_TX_MASK

#define UMP_UART_LSR_DATA_MASK

/* Port Settings Constants) */
#define UMP_MASK_UART_FLAGS_RTS_FLOW
#define UMP_MASK_UART_FLAGS_RTS_DISABLE
#define UMP_MASK_UART_FLAGS_PARITY
#define UMP_MASK_UART_FLAGS_OUT_X_DSR_FLOW
#define UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW
#define UMP_MASK_UART_FLAGS_OUT_X
#define UMP_MASK_UART_FLAGS_OUT_XA
#define UMP_MASK_UART_FLAGS_IN_X
#define UMP_MASK_UART_FLAGS_DTR_FLOW
#define UMP_MASK_UART_FLAGS_DTR_DISABLE
#define UMP_MASK_UART_FLAGS_RECEIVE_MS_INT
#define UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR

#define UMP_DMA_MODE_CONTINOUS
#define UMP_PIPE_TRANS_TIMEOUT_ENA
#define UMP_PIPE_TRANSFER_MODE_MASK
#define UMP_PIPE_TRANS_TIMEOUT_MASK

/* Purge port Direction Mask Bits */
#define UMP_PORT_DIR_OUT
#define UMP_PORT_DIR_IN

/* Address of Port 0 */
#define UMPM_UART1_PORT

/* Commands */
#define UMPC_SET_CONFIG
#define UMPC_OPEN_PORT
#define UMPC_CLOSE_PORT
#define UMPC_START_PORT
#define UMPC_STOP_PORT
#define UMPC_TEST_PORT
#define UMPC_PURGE_PORT

/* Force the Firmware to complete the current Read */
#define UMPC_COMPLETE_READ
/* Force UMP back into BOOT Mode */
#define UMPC_HARDWARE_RESET
/*
 * Copy current download image to type 0xf2 record in 16k I2C
 * firmware will change 0xff record to type 2 record when complete
 */
#define UMPC_COPY_DNLD_TO_I2C

/*
 * Special function register commands
 * wIndex is register address
 * wValue is MSB/LSB mask/data
 */
#define UMPC_WRITE_SFR

/* wIndex is register address */
#define UMPC_READ_SFR

/* Set or Clear DTR (wValue bit 0 Set/Clear)	wIndex ModuleID (port) */
#define UMPC_SET_CLR_DTR

/* Set or Clear RTS (wValue bit 0 Set/Clear)	wIndex ModuleID (port) */
#define UMPC_SET_CLR_RTS

/* Set or Clear LOOPBACK (wValue bit 0 Set/Clear) wIndex ModuleID (port) */
#define UMPC_SET_CLR_LOOPBACK

/* Set or Clear BREAK (wValue bit 0 Set/Clear)	wIndex ModuleID (port) */
#define UMPC_SET_CLR_BREAK

/* Read MSR wIndex ModuleID (port) */
#define UMPC_READ_MSR

/* Toolkit commands */
/* Read-write group */
#define UMPC_MEMORY_READ
#define UMPC_MEMORY_WRITE

/*
 *	UMP DMA Definitions
 */
#define UMPD_OEDB1_ADDRESS
#define UMPD_OEDB2_ADDRESS

struct out_endpoint_desc_block {};


/*
 * TYPE DEFINITIONS
 * Structures for Firmware commands
 */
/* UART settings */
struct ump_uart_config {};


/*
 * TYPE DEFINITIONS
 * Structures for USB interrupts
 */
/* Interrupt packet structure */
struct ump_interrupt {};


#define TIUMP_GET_PORT_FROM_CODE(c)
#define TIUMP_GET_FUNC_FROM_CODE(c)
#define TIUMP_INTERRUPT_CODE_LSR
#define TIUMP_INTERRUPT_CODE_MSR

#endif