linux/drivers/net/ethernet/microchip/fdma/fdma_api.c

// SPDX-License-Identifier: GPL-2.0+

#include "fdma_api.h"

#include <linux/bits.h>
#include <linux/etherdevice.h>
#include <linux/types.h>

/* Add a DB to a DCB, providing a callback for getting the DB dataptr. */
static int __fdma_db_add(struct fdma *fdma, int dcb_idx, int db_idx, u64 status,
			 int (*cb)(struct fdma *fdma, int dcb_idx,
				   int db_idx, u64 *dataptr))
{}

/* Add a DB to a DCB, using the callback set in the fdma_ops struct. */
int fdma_db_add(struct fdma *fdma, int dcb_idx, int db_idx, u64 status)
{}

/* Add a DCB with callbacks for getting the DB dataptr and the DCB nextptr. */
int __fdma_dcb_add(struct fdma *fdma, int dcb_idx, u64 info, u64 status,
		   int (*dcb_cb)(struct fdma *fdma, int dcb_idx, u64 *nextptr),
		   int (*db_cb)(struct fdma *fdma, int dcb_idx, int db_idx,
				u64 *dataptr))
{}
EXPORT_SYMBOL_GPL();

/* Add a DCB, using the preset callbacks in the fdma_ops struct. */
int fdma_dcb_add(struct fdma *fdma, int dcb_idx, u64 info, u64 status)
{}
EXPORT_SYMBOL_GPL();

/* Initialize the DCB's and DB's. */
int fdma_dcbs_init(struct fdma *fdma, u64 info, u64 status)
{}
EXPORT_SYMBOL_GPL();

/* Allocate coherent DMA memory for FDMA. */
int fdma_alloc_coherent(struct device *dev, struct fdma *fdma)
{}
EXPORT_SYMBOL_GPL();

/* Allocate physical memory for FDMA. */
int fdma_alloc_phys(struct fdma *fdma)
{}
EXPORT_SYMBOL_GPL();

/* Free coherent DMA memory. */
void fdma_free_coherent(struct device *dev, struct fdma *fdma)
{}
EXPORT_SYMBOL_GPL();

/* Free virtual memory. */
void fdma_free_phys(struct fdma *fdma)
{}
EXPORT_SYMBOL_GPL();

/* Get the size of the FDMA memory */
u32 fdma_get_size(struct fdma *fdma)
{}
EXPORT_SYMBOL_GPL();

/* Get the size of the FDMA memory. This function is only applicable if the
 * dataptr addresses and DCB's are in contiguous memory.
 */
u32 fdma_get_size_contiguous(struct fdma *fdma)
{}
EXPORT_SYMBOL_GPL();