0001
0002
0003
0004
0005
0006
0007 #ifndef _FSL_DPIO_CMD_H
0008 #define _FSL_DPIO_CMD_H
0009
0010
0011 #define DPIO_VER_MAJOR 4
0012 #define DPIO_VER_MINOR 2
0013
0014
0015
0016 #define DPIO_CMD_ID_OFFSET 4
0017 #define DPIO_CMD_BASE_VERSION 1
0018
0019 #define DPIO_CMD(id) (((id) << DPIO_CMD_ID_OFFSET) | DPIO_CMD_BASE_VERSION)
0020
0021
0022 #define DPIO_CMDID_CLOSE DPIO_CMD(0x800)
0023 #define DPIO_CMDID_OPEN DPIO_CMD(0x803)
0024 #define DPIO_CMDID_GET_API_VERSION DPIO_CMD(0xa03)
0025 #define DPIO_CMDID_ENABLE DPIO_CMD(0x002)
0026 #define DPIO_CMDID_DISABLE DPIO_CMD(0x003)
0027 #define DPIO_CMDID_GET_ATTR DPIO_CMD(0x004)
0028 #define DPIO_CMDID_RESET DPIO_CMD(0x005)
0029 #define DPIO_CMDID_SET_STASHING_DEST DPIO_CMD(0x120)
0030
0031 struct dpio_cmd_open {
0032 __le32 dpio_id;
0033 };
0034
0035 #define DPIO_CHANNEL_MODE_MASK 0x3
0036
0037 struct dpio_rsp_get_attr {
0038
0039 __le32 id;
0040 __le16 qbman_portal_id;
0041 u8 num_priorities;
0042 u8 channel_mode;
0043
0044 __le64 qbman_portal_ce_addr;
0045
0046 __le64 qbman_portal_ci_addr;
0047
0048 __le32 qbman_version;
0049 __le32 pad1;
0050
0051 __le32 clk;
0052 };
0053
0054 struct dpio_stashing_dest {
0055 u8 sdest;
0056 };
0057
0058 #endif