3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-02-12 10:15:54 +00:00
Brooklyn/drivers/net/can/spi/mcp251xfd/mcp251xfd-ram.h
crowetic a94b3d14aa Brooklyn+ (PLUS) changes
Changes included (and more):

1. Dynamic RAM merge

2. Real-time page scan and allocation

3. Cache compression

4. Real-time IRQ checks

5. Dynamic I/O allocation for Java heap

6. Java page migration

7. Contiguous memory allocation

8. Idle pages tracking

9. Per CPU RAM usage tracking

10. ARM NEON scalar multiplication library

11. NEON/ARMv8 crypto extensions

12. NEON SHA, Blake, RIPEMD crypto extensions

13. Parallel NEON crypto engine for multi-algo based CPU stress reduction
2022-05-12 10:47:00 -07:00

63 lines
1.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0
*
* mcp251xfd - Microchip MCP251xFD Family CAN controller driver
*
* Copyright (c) 2021, 2022 Pengutronix,
* Marc Kleine-Budde <kernel@pengutronix.de>
*/
#ifndef _MCP251XFD_RAM_H
#define _MCP251XFD_RAM_H
#include <linux/ethtool.h>
#define CAN_RAM_NUM_MAX (-1)
enum can_ram_mode {
CAN_RAM_MODE_CAN,
CAN_RAM_MODE_CANFD,
__CAN_RAM_MODE_MAX
};
struct can_ram_obj_config {
u8 size[__CAN_RAM_MODE_MAX];
u8 def[__CAN_RAM_MODE_MAX];
u8 min;
u8 max;
u8 fifo_num;
u8 fifo_depth_min;
u8 fifo_depth_coalesce_min;
};
struct can_ram_config {
const struct can_ram_obj_config rx;
const struct can_ram_obj_config tx;
u16 size;
u8 fifo_depth;
};
struct can_ram_layout {
u8 default_rx;
u8 default_tx;
u8 max_rx;
u8 max_tx;
u8 cur_rx;
u8 cur_tx;
u8 rx_coalesce;
u8 tx_coalesce;
};
void can_ram_get_layout(struct can_ram_layout *layout,
const struct can_ram_config *config,
const struct ethtool_ringparam *ring,
const struct ethtool_coalesce *ec,
const bool fd_mode);
#endif