1 /* SPDX-License-Identifier: GPL-2.0 2 * 3 * mcp251xfd - Microchip MCP251xFD Family CAN controller driver 4 * 5 * Copyright (c) 2019, 2020, 2021 Pengutronix, 6 * Marc Kleine-Budde <kernel@pengutronix.de> 7 */ 8 9 #ifndef _MCP251XFD_DUMP_H 10 #define _MCP251XFD_DUMP_H 11 12 #define MCP251XFD_DUMP_MAGIC 0x1825434d 13 14 enum mcp251xfd_dump_object_type { 15 MCP251XFD_DUMP_OBJECT_TYPE_REG, 16 MCP251XFD_DUMP_OBJECT_TYPE_TEF, 17 MCP251XFD_DUMP_OBJECT_TYPE_RX, 18 MCP251XFD_DUMP_OBJECT_TYPE_TX, 19 MCP251XFD_DUMP_OBJECT_TYPE_END = -1, 20 }; 21 22 enum mcp251xfd_dump_object_ring_key { 23 MCP251XFD_DUMP_OBJECT_RING_KEY_HEAD, 24 MCP251XFD_DUMP_OBJECT_RING_KEY_TAIL, 25 MCP251XFD_DUMP_OBJECT_RING_KEY_BASE, 26 MCP251XFD_DUMP_OBJECT_RING_KEY_NR, 27 MCP251XFD_DUMP_OBJECT_RING_KEY_FIFO_NR, 28 MCP251XFD_DUMP_OBJECT_RING_KEY_OBJ_NUM, 29 MCP251XFD_DUMP_OBJECT_RING_KEY_OBJ_SIZE, 30 __MCP251XFD_DUMP_OBJECT_RING_KEY_MAX, 31 }; 32 33 struct mcp251xfd_dump_object_header { 34 __le32 magic; 35 __le32 type; 36 __le32 offset; 37 __le32 len; 38 }; 39 40 struct mcp251xfd_dump_object_reg { 41 __le32 reg; 42 __le32 val; 43 }; 44 45 #endif 46