18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*      cops.h: LocalTalk driver for Linux.
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci *      Authors:
58c2ecf20Sopenharmony_ci *      - Jay Schulist <jschlst@samba.org>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef __LINUX_COPSLTALK_H
98c2ecf20Sopenharmony_ci#define __LINUX_COPSLTALK_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifdef __KERNEL__
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci/* Max LLAP size we will accept. */
148c2ecf20Sopenharmony_ci#define MAX_LLAP_SIZE		603
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/* Tangent */
178c2ecf20Sopenharmony_ci#define TANG_CARD_STATUS        1
188c2ecf20Sopenharmony_ci#define TANG_CLEAR_INT          1
198c2ecf20Sopenharmony_ci#define TANG_RESET              3
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci#define TANG_TX_READY           1
228c2ecf20Sopenharmony_ci#define TANG_RX_READY           2
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci/* Dayna */
258c2ecf20Sopenharmony_ci#define DAYNA_CMD_DATA          0
268c2ecf20Sopenharmony_ci#define DAYNA_CLEAR_INT         1
278c2ecf20Sopenharmony_ci#define DAYNA_CARD_STATUS       2
288c2ecf20Sopenharmony_ci#define DAYNA_INT_CARD          3
298c2ecf20Sopenharmony_ci#define DAYNA_RESET             4
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#define DAYNA_RX_READY          0
328c2ecf20Sopenharmony_ci#define DAYNA_TX_READY          1
338c2ecf20Sopenharmony_ci#define DAYNA_RX_REQUEST        3
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci/* Same on both card types */
368c2ecf20Sopenharmony_ci#define COPS_CLEAR_INT  1
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci/* LAP response codes received from the cards. */
398c2ecf20Sopenharmony_ci#define LAP_INIT        1       /* Init cmd */
408c2ecf20Sopenharmony_ci#define LAP_INIT_RSP    2       /* Init response */
418c2ecf20Sopenharmony_ci#define LAP_WRITE       3       /* Write cmd */
428c2ecf20Sopenharmony_ci#define DATA_READ       4       /* Data read */
438c2ecf20Sopenharmony_ci#define LAP_RESPONSE    4       /* Received ALAP frame response */
448c2ecf20Sopenharmony_ci#define LAP_GETSTAT     5       /* Get LAP and HW status */
458c2ecf20Sopenharmony_ci#define LAP_RSPSTAT     6       /* Status response */
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci#endif
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci/*
508c2ecf20Sopenharmony_ci *	Structure to hold the firmware information.
518c2ecf20Sopenharmony_ci */
528c2ecf20Sopenharmony_cistruct ltfirmware
538c2ecf20Sopenharmony_ci{
548c2ecf20Sopenharmony_ci        unsigned int length;
558c2ecf20Sopenharmony_ci        const unsigned char *data;
568c2ecf20Sopenharmony_ci};
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci#define DAYNA 1
598c2ecf20Sopenharmony_ci#define TANGENT 2
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#endif
62