menu "GRSPFI SpaceFibre drivers"

config GRLIB_GRSPFI
	tristate "GRSPFI kernel library"
	select REGMAP_MMIO
	default n
	depends on SPARC_LEON || RISCV
	help
	  This enables the GRSPFI kernel library.

config GRLIB_GRSPFI_CHARDEV
	tristate "GRSPFI character driver"
	select GRLIB_GRSPFI
	select DMA_SHARED_BUFFER
	# User space normally allocates the packet buffers from the CMA heap.
	# imply, not select: DMA_CMA needs architecture support.
	imply CMA
	imply DMA_CMA
	imply DMABUF_HEAPS
	imply DMABUF_HEAPS_CMA
	default n
	depends on SPARC_LEON || RISCV
	help
	  This enables the GRSPFI character driver.

	  User space passes packet buffers as dma-bufs. Each packet must be in
	  physically contiguous memory below 4 GiB, which in practice means
	  the CMA dma-buf heap (DMABUF_HEAPS_CMA, which needs DMA_CMA and its
	  architecture support). Without such a heap user space has no
	  buffers to give the driver.

endmenu # GRSPFI SpaceFibre drivers
