menu "GRSPW SpaceWire drivers"

config GRLIB_GRSPWROUTER
	tristate "GRSPW Router"
	default n
	depends on SPARC_LEON || RISCV
	help
	  This enables the GRSPW Router APB-Register interface driver. The 
	  GRSPW Router is VHDL-model of a highly configurable SpaceWire router
	  developed by Frontgrade Gaisler.

config GRLIB_GRSPW
        tristate "GRLIB GRSPW kernel library"
        default n
	depends on SPARC_LEON || RISCV
        help
          This adds the GRLIB GRSPW/GRSPW2 SpaceWire core kernel library,
          it is required by the GRSPW-user driver.

config GRLIB_GRSPWU
        tristate "GRLIB GRSPW driver"
        default n
	depends on SPARC_LEON || RISCV
	select GRLIB_GRSPW
	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
        help
          Add this GRLIB GRSPW/GRSPW2 SpaceWire core driver if you want to
	  be able to access the SpaceWire core(s) from User Space.

	  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 # GRSPW SpaceWire drivers
