18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/**
38c2ecf20Sopenharmony_ci * ipoctal.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * driver for the IPOCTAL boards
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci * Copyright (C) 2009-2012 CERN (www.cern.ch)
88c2ecf20Sopenharmony_ci * Author: Nicolas Serafini, EIC2 SA
98c2ecf20Sopenharmony_ci * Author: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
108c2ecf20Sopenharmony_ci */
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifndef _IPOCTAL_H_
138c2ecf20Sopenharmony_ci#define _IPOCTAL_H_
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define NR_CHANNELS		8
168c2ecf20Sopenharmony_ci#define IPOCTAL_MAX_BOARDS	16
178c2ecf20Sopenharmony_ci#define MAX_DEVICES		(NR_CHANNELS * IPOCTAL_MAX_BOARDS)
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci/**
208c2ecf20Sopenharmony_ci * struct ipoctal_stats -- Stats since last reset
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * @tx: Number of transmitted bytes
238c2ecf20Sopenharmony_ci * @rx: Number of received bytes
248c2ecf20Sopenharmony_ci * @overrun: Number of overrun errors
258c2ecf20Sopenharmony_ci * @parity_err: Number of parity errors
268c2ecf20Sopenharmony_ci * @framing_err: Number of framing errors
278c2ecf20Sopenharmony_ci * @rcv_break: Number of break received
288c2ecf20Sopenharmony_ci */
298c2ecf20Sopenharmony_cistruct ipoctal_stats {
308c2ecf20Sopenharmony_ci	unsigned long tx;
318c2ecf20Sopenharmony_ci	unsigned long rx;
328c2ecf20Sopenharmony_ci	unsigned long overrun_err;
338c2ecf20Sopenharmony_ci	unsigned long parity_err;
348c2ecf20Sopenharmony_ci	unsigned long framing_err;
358c2ecf20Sopenharmony_ci	unsigned long rcv_break;
368c2ecf20Sopenharmony_ci};
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci#endif /* _IPOCTAL_H_ */
39