8722ff8c |
1 | /* |
2 | * Filename: rsXX_cfg.h |
3 | * |
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 | * This program is free software; you can redistribute it and/or |
11 | * modify it under the terms of the GNU General Public License as |
12 | * published by the Free Software Foundation; either version 2 of the |
13 | * License, or (at your option) any later version. |
14 | * |
15 | * This program is distributed in the hope that it will be useful, but |
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 | * General Public License for more details. |
19 | * |
20 | * You should have received a copy of the GNU General Public License |
21 | * along with this program; if not, write to the Free Software Foundation, |
22 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | */ |
24 | |
25 | #ifndef __RSXX_CFG_H__ |
26 | #define __RSXX_CFG_H__ |
27 | |
28 | /* NOTE: Config values will be saved in network byte order (i.e. Big endian) */ |
29 | #include <linux/types.h> |
30 | |
31 | /* |
32 | * The card config version must match the driver's expected version. If it does |
33 | * not, the DMA interfaces will not be attached and the user will need to |
34 | * initialize/upgrade the card configuration using the card config utility. |
35 | */ |
36 | #define RSXX_CFG_VERSION 4 |
37 | |
38 | struct card_cfg_hdr { |
39 | __u32 version; |
40 | __u32 crc; |
41 | }; |
42 | |
43 | struct card_cfg_data { |
44 | __u32 block_size; |
45 | __u32 stripe_size; |
46 | __u32 vendor_id; |
47 | __u32 cache_order; |
48 | struct { |
49 | __u32 mode; /* Disabled, manual, auto-tune... */ |
50 | __u32 count; /* Number of intr to coalesce */ |
51 | __u32 latency;/* Max wait time (in ns) */ |
52 | } intr_coal; |
53 | }; |
54 | |
55 | struct rsxx_card_cfg { |
56 | struct card_cfg_hdr hdr; |
57 | struct card_cfg_data data; |
58 | }; |
59 | |
60 | /* Vendor ID Values */ |
9bb3c446 |
61 | #define RSXX_VENDOR_ID_IBM 0 |
8722ff8c |
62 | #define RSXX_VENDOR_ID_DSI 1 |
63 | #define RSXX_VENDOR_COUNT 2 |
64 | |
65 | /* Interrupt Coalescing Values */ |
66 | #define RSXX_INTR_COAL_DISABLED 0 |
67 | #define RSXX_INTR_COAL_EXPLICIT 1 |
68 | #define RSXX_INTR_COAL_AUTO_TUNE 2 |
69 | |
70 | |
71 | #endif /* __RSXX_CFG_H__ */ |
72 | |