2 * Copyright 2013-2016 Freescale Semiconductor Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the above-listed copyright holders nor the
13 * names of any contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
16 * ALTERNATIVELY, this software may be distributed under the terms of the
17 * GNU General Public License ("GPL") as published by the Free Software
18 * Foundation, either version 2 of that License or (at your option) any
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
33 #ifndef _FSL_DPIO_CMD_H
34 #define _FSL_DPIO_CMD_H
37 #define DPIO_VER_MAJOR 4
38 #define DPIO_VER_MINOR 2
40 /* Command Versioning */
42 #define DPIO_CMD_ID_OFFSET 4
43 #define DPIO_CMD_BASE_VERSION 1
45 #define DPIO_CMD(id) (((id) << DPIO_CMD_ID_OFFSET) | DPIO_CMD_BASE_VERSION)
48 #define DPIO_CMDID_CLOSE DPIO_CMD(0x800)
49 #define DPIO_CMDID_OPEN DPIO_CMD(0x803)
50 #define DPIO_CMDID_GET_API_VERSION DPIO_CMD(0xa03)
51 #define DPIO_CMDID_ENABLE DPIO_CMD(0x002)
52 #define DPIO_CMDID_DISABLE DPIO_CMD(0x003)
53 #define DPIO_CMDID_GET_ATTR DPIO_CMD(0x004)
55 struct dpio_cmd_open {
59 #define DPIO_CHANNEL_MODE_MASK 0x3
61 struct dpio_rsp_get_attr {
64 __le16 qbman_portal_id;
68 __le64 qbman_portal_ce_addr;
70 __le64 qbman_portal_ci_addr;
75 #endif /* _FSL_DPIO_CMD_H */