18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * INET An implementation of the TCP/IP protocol suite for the LINUX 48c2ecf20Sopenharmony_ci * operating system. INET is implemented using the BSD Socket 58c2ecf20Sopenharmony_ci * interface as the means of communication with the user level. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Global definitions for the Frame relay interface. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Version: @(#)if_ifrad.h 0.20 13 Apr 96 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Author: Mike McLagan <mike.mclagan@linux.org> 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * Changes: 148c2ecf20Sopenharmony_ci * 0.15 Mike McLagan Structure packing 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * 0.20 Mike McLagan New flags for S508 buffer handling 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or 198c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License 208c2ecf20Sopenharmony_ci * as published by the Free Software Foundation; either version 218c2ecf20Sopenharmony_ci * 2 of the License, or (at your option) any later version. 228c2ecf20Sopenharmony_ci */ 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci#ifndef _UAPISDLA_H 258c2ecf20Sopenharmony_ci#define _UAPISDLA_H 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* adapter type */ 288c2ecf20Sopenharmony_ci#define SDLA_TYPES 298c2ecf20Sopenharmony_ci#define SDLA_S502A 5020 308c2ecf20Sopenharmony_ci#define SDLA_S502E 5021 318c2ecf20Sopenharmony_ci#define SDLA_S503 5030 328c2ecf20Sopenharmony_ci#define SDLA_S507 5070 338c2ecf20Sopenharmony_ci#define SDLA_S508 5080 348c2ecf20Sopenharmony_ci#define SDLA_S509 5090 358c2ecf20Sopenharmony_ci#define SDLA_UNKNOWN -1 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* port selection flags for the S508 */ 388c2ecf20Sopenharmony_ci#define SDLA_S508_PORT_V35 0x00 398c2ecf20Sopenharmony_ci#define SDLA_S508_PORT_RS232 0x02 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* Z80 CPU speeds */ 428c2ecf20Sopenharmony_ci#define SDLA_CPU_3M 0x00 438c2ecf20Sopenharmony_ci#define SDLA_CPU_5M 0x01 448c2ecf20Sopenharmony_ci#define SDLA_CPU_7M 0x02 458c2ecf20Sopenharmony_ci#define SDLA_CPU_8M 0x03 468c2ecf20Sopenharmony_ci#define SDLA_CPU_10M 0x04 478c2ecf20Sopenharmony_ci#define SDLA_CPU_16M 0x05 488c2ecf20Sopenharmony_ci#define SDLA_CPU_12M 0x06 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci/* some private IOCTLs */ 518c2ecf20Sopenharmony_ci#define SDLA_IDENTIFY (FRAD_LAST_IOCTL + 1) 528c2ecf20Sopenharmony_ci#define SDLA_CPUSPEED (FRAD_LAST_IOCTL + 2) 538c2ecf20Sopenharmony_ci#define SDLA_PROTOCOL (FRAD_LAST_IOCTL + 3) 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci#define SDLA_CLEARMEM (FRAD_LAST_IOCTL + 4) 568c2ecf20Sopenharmony_ci#define SDLA_WRITEMEM (FRAD_LAST_IOCTL + 5) 578c2ecf20Sopenharmony_ci#define SDLA_READMEM (FRAD_LAST_IOCTL + 6) 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_cistruct sdla_mem { 608c2ecf20Sopenharmony_ci int addr; 618c2ecf20Sopenharmony_ci int len; 628c2ecf20Sopenharmony_ci void __user *data; 638c2ecf20Sopenharmony_ci}; 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#define SDLA_START (FRAD_LAST_IOCTL + 7) 668c2ecf20Sopenharmony_ci#define SDLA_STOP (FRAD_LAST_IOCTL + 8) 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci/* some offsets in the Z80's memory space */ 698c2ecf20Sopenharmony_ci#define SDLA_NMIADDR 0x0000 708c2ecf20Sopenharmony_ci#define SDLA_CONF_ADDR 0x0010 718c2ecf20Sopenharmony_ci#define SDLA_S502A_NMIADDR 0x0066 728c2ecf20Sopenharmony_ci#define SDLA_CODE_BASEADDR 0x0100 738c2ecf20Sopenharmony_ci#define SDLA_WINDOW_SIZE 0x2000 748c2ecf20Sopenharmony_ci#define SDLA_ADDR_MASK 0x1FFF 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci/* largest handleable block of data */ 778c2ecf20Sopenharmony_ci#define SDLA_MAX_DATA 4080 788c2ecf20Sopenharmony_ci#define SDLA_MAX_MTU 4072 /* MAX_DATA - sizeof(fradhdr) */ 798c2ecf20Sopenharmony_ci#define SDLA_MAX_DLCI 24 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci/* this should be the same as frad_conf */ 828c2ecf20Sopenharmony_cistruct sdla_conf { 838c2ecf20Sopenharmony_ci short station; 848c2ecf20Sopenharmony_ci short config; 858c2ecf20Sopenharmony_ci short kbaud; 868c2ecf20Sopenharmony_ci short clocking; 878c2ecf20Sopenharmony_ci short max_frm; 888c2ecf20Sopenharmony_ci short T391; 898c2ecf20Sopenharmony_ci short T392; 908c2ecf20Sopenharmony_ci short N391; 918c2ecf20Sopenharmony_ci short N392; 928c2ecf20Sopenharmony_ci short N393; 938c2ecf20Sopenharmony_ci short CIR_fwd; 948c2ecf20Sopenharmony_ci short Bc_fwd; 958c2ecf20Sopenharmony_ci short Be_fwd; 968c2ecf20Sopenharmony_ci short CIR_bwd; 978c2ecf20Sopenharmony_ci short Bc_bwd; 988c2ecf20Sopenharmony_ci short Be_bwd; 998c2ecf20Sopenharmony_ci}; 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci/* this should be the same as dlci_conf */ 1028c2ecf20Sopenharmony_cistruct sdla_dlci_conf { 1038c2ecf20Sopenharmony_ci short config; 1048c2ecf20Sopenharmony_ci short CIR_fwd; 1058c2ecf20Sopenharmony_ci short Bc_fwd; 1068c2ecf20Sopenharmony_ci short Be_fwd; 1078c2ecf20Sopenharmony_ci short CIR_bwd; 1088c2ecf20Sopenharmony_ci short Bc_bwd; 1098c2ecf20Sopenharmony_ci short Be_bwd; 1108c2ecf20Sopenharmony_ci short Tc_fwd; 1118c2ecf20Sopenharmony_ci short Tc_bwd; 1128c2ecf20Sopenharmony_ci short Tf_max; 1138c2ecf20Sopenharmony_ci short Tb_max; 1148c2ecf20Sopenharmony_ci}; 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci 1178c2ecf20Sopenharmony_ci#endif /* _UAPISDLA_H */ 118