18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci* Filename: rsXX_cfg.h 48c2ecf20Sopenharmony_ci* 58c2ecf20Sopenharmony_ci* Authors: Joshua Morris <josh.h.morris@us.ibm.com> 68c2ecf20Sopenharmony_ci* Philip Kelleher <pjk1939@linux.vnet.ibm.com> 78c2ecf20Sopenharmony_ci* 88c2ecf20Sopenharmony_ci* (C) Copyright 2013 IBM Corporation 98c2ecf20Sopenharmony_ci*/ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#ifndef __RSXX_CFG_H__ 128c2ecf20Sopenharmony_ci#define __RSXX_CFG_H__ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/* NOTE: Config values will be saved in network byte order (i.e. Big endian) */ 158c2ecf20Sopenharmony_ci#include <linux/types.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * The card config version must match the driver's expected version. If it does 198c2ecf20Sopenharmony_ci * not, the DMA interfaces will not be attached and the user will need to 208c2ecf20Sopenharmony_ci * initialize/upgrade the card configuration using the card config utility. 218c2ecf20Sopenharmony_ci */ 228c2ecf20Sopenharmony_ci#define RSXX_CFG_VERSION 4 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_cistruct card_cfg_hdr { 258c2ecf20Sopenharmony_ci __u32 version; 268c2ecf20Sopenharmony_ci __u32 crc; 278c2ecf20Sopenharmony_ci}; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_cistruct card_cfg_data { 308c2ecf20Sopenharmony_ci __u32 block_size; 318c2ecf20Sopenharmony_ci __u32 stripe_size; 328c2ecf20Sopenharmony_ci __u32 vendor_id; 338c2ecf20Sopenharmony_ci __u32 cache_order; 348c2ecf20Sopenharmony_ci struct { 358c2ecf20Sopenharmony_ci __u32 mode; /* Disabled, manual, auto-tune... */ 368c2ecf20Sopenharmony_ci __u32 count; /* Number of intr to coalesce */ 378c2ecf20Sopenharmony_ci __u32 latency;/* Max wait time (in ns) */ 388c2ecf20Sopenharmony_ci } intr_coal; 398c2ecf20Sopenharmony_ci}; 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_cistruct rsxx_card_cfg { 428c2ecf20Sopenharmony_ci struct card_cfg_hdr hdr; 438c2ecf20Sopenharmony_ci struct card_cfg_data data; 448c2ecf20Sopenharmony_ci}; 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci/* Vendor ID Values */ 478c2ecf20Sopenharmony_ci#define RSXX_VENDOR_ID_IBM 0 488c2ecf20Sopenharmony_ci#define RSXX_VENDOR_ID_DSI 1 498c2ecf20Sopenharmony_ci#define RSXX_VENDOR_COUNT 2 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci/* Interrupt Coalescing Values */ 528c2ecf20Sopenharmony_ci#define RSXX_INTR_COAL_DISABLED 0 538c2ecf20Sopenharmony_ci#define RSXX_INTR_COAL_EXPLICIT 1 548c2ecf20Sopenharmony_ci#define RSXX_INTR_COAL_AUTO_TUNE 2 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#endif /* __RSXX_CFG_H__ */ 588c2ecf20Sopenharmony_ci 59