/* SPDX-License-Identifier: GPL-2.0-only */ #include #pragma once #ifdef pr_fmt #undef pr_fmt #endif #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt struct cpunet_hw; /* Initialization */ struct cpunet_hw *cpunet_hw_init(struct device *dev, irq_handler_t clb, void *data); void cpunet_hw_exit(struct cpunet_hw *hw); /* Query hardware properties */ unsigned int cpunet_hw_buffer_size(void); unsigned int cpunet_hw_max_num(void); /* Receiving messages */ int cpunet_hw_rx(struct cpunet_hw *hw, const void **data, unsigned int *len); void cpunet_hw_rx_done(struct cpunet_hw *hw); /* Sending messages */ void *cpunet_hw_tx_alloc(struct cpunet_hw *hw); void cpunet_hw_tx(struct cpunet_hw *hw, unsigned int length); bool cpunet_hw_tx_full(struct cpunet_hw *hw); /* Interrupt configuration */ void cpunet_hw_ack_int(struct cpunet_hw *hw); void cpunet_hw_enable_int(struct cpunet_hw *hw); void cpunet_hw_disable_int(struct cpunet_hw *hw);