summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/spi/mcp251xfd/mcp251xfd-dump.h
blob: e7560b0712ebc8687f10f66fb016290373d9badd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* SPDX-License-Identifier: GPL-2.0
 *
 * mcp251xfd - Microchip MCP251xFD Family CAN controller driver
 *
 * Copyright (c) 2019, 2020, 2021 Pengutronix,
 *               Marc Kleine-Budde <kernel@pengutronix.de>
 */

#ifndef _MCP251XFD_DUMP_H
#define _MCP251XFD_DUMP_H

#define MCP251XFD_DUMP_MAGIC 0x1825434d

enum mcp251xfd_dump_object_type {
	MCP251XFD_DUMP_OBJECT_TYPE_REG,
	MCP251XFD_DUMP_OBJECT_TYPE_TEF,
	MCP251XFD_DUMP_OBJECT_TYPE_RX,
	MCP251XFD_DUMP_OBJECT_TYPE_TX,
	MCP251XFD_DUMP_OBJECT_TYPE_END = -1,
};

enum mcp251xfd_dump_object_ring_key {
	MCP251XFD_DUMP_OBJECT_RING_KEY_HEAD,
	MCP251XFD_DUMP_OBJECT_RING_KEY_TAIL,
	MCP251XFD_DUMP_OBJECT_RING_KEY_BASE,
	MCP251XFD_DUMP_OBJECT_RING_KEY_NR,
	MCP251XFD_DUMP_OBJECT_RING_KEY_FIFO_NR,
	MCP251XFD_DUMP_OBJECT_RING_KEY_OBJ_NUM,
	MCP251XFD_DUMP_OBJECT_RING_KEY_OBJ_SIZE,
	__MCP251XFD_DUMP_OBJECT_RING_KEY_MAX,
};

struct mcp251xfd_dump_object_header {
	__le32 magic;
	__le32 type;
	__le32 offset;
	__le32 len;
};

struct mcp251xfd_dump_object_reg {
	__le32 reg;
	__le32 val;
};

#endif