if SOC_BRCMSTB

config BRCMSTB_BMEM
	bool "Enable BMEM reserved A/V memory"
	depends on HAVE_MEMBLOCK && (ARCH_BRCMSTB || BMIPS_GENERIC) && BRCMSTB_MEMORY_API
	help
	  The A/V peripherals (managed by the PI/Nexus middleware) require
	  large, contiguous memory regions to be set aside at boot time.  This
	  option sets those up in a default config that reserves most of
	  memory.  Also allows the user to manually define region sizes and
	  locations using the 'bmem' command line param.  Allows for O_DIRECT
	  I/O using these regions, mmap() from user programs, and
	  ioremap() from kernel drivers.

	  If you are planning to use Broadcom middleware, choose Y here.

config BRCMSTB_CMA
	bool "Broadcom STB CMA"
	depends on ARCH_BRCMSTB && (ARM || ARM64) && CMA && BRCMSTB_MEMORY_API
	help
	  This driver provides the ioctls for manipulating with the reserved
	  areas used by Broadcom middleware, as well as the functions for the
	  kernel interface.  It also provides register and reserve functions
	  for setting up the CMA regions it uses at early boot.

	  If you are planning to use Broadcom middleware, choose Y here.

config BRCMSTB_HUGEPAGES
	bool "Broadcom STB Huge Page Allocator"
	depends on ARCH_BRCMSTB && (ARM || ARM64) && CMA && BRCMSTB_MEMORY_API && !NUMA
	default y
	select ZONE_MOVABLE
	help
	  This driver implements a contiguous memory allocator that steals 2MB
	  huge pages from a ZONE_MOVABLE memory zone for use by the Broadcom
	  middleware. This allows better sharing of memory with applications
	  than is available with the fixed boot-time allocations of bmem. It
	  also avoids issues encountered by standard CMA when using large
	  allocations.

	  If you are planning to use Broadcom middleware, choose Y here.

config BRCMSTB_DPFE
	bool "Broadcom STB DDR PHY Front End Driver"
	depends on (ARCH_BRCMSTB && (ARM || ARM64)) || COMPILE_TEST
	default y
	help
	  The DPFE driver provides a sysfs interface to the DCPU residing
	  within the DDR PHY. This interface provides information about the
	  DRAM, including the refresh rate. The refresh rate can be used as
	  an indicator for DRAM temperature (higher refresh rate means
	  hotter DRAM).

	  If you would like an indirect indicator for DRAM temperature at
	  run time, say Y here.

config BRCMSTB_MEMORY_API
	bool "Enable BRCMSTB memory API"
	depends on HAVE_MEMBLOCK && (ARCH_BRCMSTB || BMIPS_GENERIC)
	select LIBFDT
	help
	  This provides information on how system memory is arranged so that
	  Broadcom STB middleware can determine how to set up its memory heaps.

	  If you are planning to use Broadcom middleware, choose Y here.

config BRCMSTB_AUTOMAP_BMEM
	bool "Enable Auto Mapping of BMEM regions"
	default n
	depends on ARM64 && BRCMSTB_BMEM
	select PAGE_AUTOMAP
	help
	  If BMEM is direct mapped by the kernel the ARM64 may speculatively
	  fetch into secured regions.  This option allows BMEM regions to
	  remain unmapped unless a user space process maps pages from a BMEM
	  region, in which case those pages will be automatically direct
	  mapped into the kernel to allow O_DIRECT to be used with those
	  pages.

config BRCMSTB_PM
	bool "Support suspend/resume for STB platforms"
	default y
	depends on PM
	depends on ARCH_BRCMSTB || BMIPS_GENERIC

config BRCMSTB_PM_DEBUG
	bool "Add debugfs interface for STB suspend/resume driver"
	default y
	depends on BRCMSTB_PM && PM_DEBUG && DEBUG_FS
	help
	  This option enables debugfs support for the STB suspend/resume
	  driver. Specifically, for memory regions to be included or excluded
	  from hashing.

	  If you are unsure, choose Y here.

config BRCMSTB_SRPD
	tristate "Support enabling DDR self-refresh modes"
	help
	  Provides a sysfs interface for setting the self-refresh timeout
	  value on Broadcom STB memory controllers.

config BRCMSTB_WKTMR
	tristate "Support wake-up timer"
	default BRCMSTB_PM

# Perform memory hashing before entering S3, using XPT DMA
config BRCMSTB_XPT_HASH
	select BRCMSTB_MEMORY_API
	default !BMIPS_GENERIC
	bool

config BRCMSTB_NEXUS_API
	tristate "Support for Nexus APIs"
	help
	   Provides APIs for Nexus kernel-mode driver to facilitate
	   sharing of resources: IRQs, GPIOs, Pinmuxing etc.

config BRCMSTB_NEXUS_SPI_API
	tristate
	depends on SPI_MASTER
	default SPI_BRCMSTB_MSPI || SPI_BCM2835

config BRCMSTB_NEXUS_CLK_API
	bool
	depends on BRCMSTB_NEXUS_API
	default BRCMSTB_NEXUS_API
	help
	   Provides an API for Nexus to enable and disable select
	   Linux clocks using an integer clock id.

config BRCMSTB_NEXUS_RESET_API
	bool
	depends on BRCMSTB_NEXUS_API
	default BRCMSTB_NEXUS_API
	help
	   Provides an API for Nexus to reset select
	   Linux cores using an integer reset id.

config BRCMSTB_BBSI
	tristate "Support for BBSI chips"
	default y
	depends on SPI_MASTER
	help
	    Provides APIs for accessing BBSI devices over SPI.

config BRCMSTB_SCMI_VPUCOM
	bool "Support for VPUCOM protocol via SCMI"
	default ARM_SCMI_PROTOCOL
	depends on ARM_SCMI_PROTOCOL
	help
	    Uses SCMI mailbox for VPUCOM messages.

endif # SOC_BRCMSTB

#####################################################################
# Hidden options
#####################################################################

config BRCMSTB
	bool
