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