1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3* Filename: rsXX_cfg.h
4*
5* Authors: Joshua Morris <josh.h.morris@us.ibm.com>
6*	Philip Kelleher <pjk1939@linux.vnet.ibm.com>
7*
8* (C) Copyright 2013 IBM Corporation
9*/
10
11#ifndef __RSXX_CFG_H__
12#define __RSXX_CFG_H__
13
14/* NOTE: Config values will be saved in network byte order (i.e. Big endian) */
15#include <linux/types.h>
16
17/*
18 * The card config version must match the driver's expected version. If it does
19 * not, the DMA interfaces will not be attached and the user will need to
20 * initialize/upgrade the card configuration using the card config utility.
21 */
22#define RSXX_CFG_VERSION	4
23
24struct card_cfg_hdr {
25	__u32	version;
26	__u32	crc;
27};
28
29struct card_cfg_data {
30	__u32	block_size;
31	__u32	stripe_size;
32	__u32	vendor_id;
33	__u32	cache_order;
34	struct {
35		__u32	mode;	/* Disabled, manual, auto-tune... */
36		__u32	count;	/* Number of intr to coalesce     */
37		__u32	latency;/* Max wait time (in ns)          */
38	} intr_coal;
39};
40
41struct rsxx_card_cfg {
42	struct card_cfg_hdr	hdr;
43	struct card_cfg_data	data;
44};
45
46/* Vendor ID Values */
47#define RSXX_VENDOR_ID_IBM		0
48#define RSXX_VENDOR_ID_DSI		1
49#define RSXX_VENDOR_COUNT		2
50
51/* Interrupt Coalescing Values */
52#define RSXX_INTR_COAL_DISABLED           0
53#define RSXX_INTR_COAL_EXPLICIT           1
54#define RSXX_INTR_COAL_AUTO_TUNE          2
55
56
57#endif /* __RSXX_CFG_H__ */
58
59