if ARCH_PENSANDO

menu "Pensando SoC drivers"

choice
    prompt "SoC Select"
    default ARCH_PENSANDO_ELBA_SOC
    help
      Select the AMD Pensando SoC variant this kernel is built for.
      The Elba, Giglio and Salina SoCs share most drivers but differ
      in memory, PCIe and peripheral layout, so exactly one must be
      chosen to pull in the correct register maps and device tree.

config ARCH_PENSANDO_ELBA_SOC
	bool "Elba SoC"
	select DMA_OPS
	select REGMAP_SPI
	help
	  Support for the AMD Pensando Elba SoC, a multi-core ARMv8
	  data-processing unit (DPU). Selects the Elba register maps,
	  DMA operations and the SPI regmap used by the on-board CPLD
	  and the rest of the Pensando SoC service drivers.

config ARCH_PENSANDO_GIGLIO_SOC
	bool "Giglio SoC"
	help
	  Support for the AMD Pensando Giglio SoC, a multi-core ARMv8
	  data-processing unit (DPU). Selects the Giglio register maps
	  and peripheral layout shared with the other Pensando SoC
	  service drivers.

config ARCH_PENSANDO_SALINA_SOC
	bool "Salina SoC"
	select DMA_OPS
	help
	  Support for the AMD Pensando Salina SoC, a multi-core ARMv8
	  data-processing unit (DPU) with four DDR5 memory controllers.
	  Selects the Salina register maps and DMA operations used by
	  the Pensando SoC service drivers.
endchoice

config PENSANDO_SOC_CAPMEM
	tristate "/dev/capmem driver for the Pensando SoCs"
	depends on OF
	default y
	help
	  Provides the /dev/capmem character device that lets userspace
	  mmap the large reserved DMA memory regions handed off by U-Boot
	  on the Pensando SoCs. Used by the dataplane and pciemgr tools
	  to map coherent and non-coherent SoC memory. Say Y, or M to
	  build it as a module.

config PENSANDO_SOC_CAPMEM_HUGEPAGE
	tristate "Enable hugepage support in capmem"
	select TRANSPARENT_HUGEPAGE
	default n
	help
	  Enable transparent hugepage backing for the capmem driver so
	  that mappings of the reserved SoC memory regions use PMD-sized
	  pages. This lowers TLB pressure for the large dataplane buffers
	  at the cost of pulling in TRANSPARENT_HUGEPAGE. If unsure, say
	  N.

config PENSANDO_SOC_PCIE
	tristate "PCIe driver for Pensando SoCs"
	depends on OF
	default y
	help
	  Provides the kernel-assist interface used by the userspace
	  pciemgr to drive the Pensando SoC PCIe controller. Handles the
	  privileged register access, reset and SError hooks that pciemgr
	  cannot perform from userspace. Say Y, or M to build it as a
	  module.

config PENSANDO_SOC_RSTCAUSE
	tristate "Pensando reset cause driver"
	depends on OF
	default y
	help
	  Records and exports the cause of the last SoC reset (watchdog,
	  panic, power-on or software reboot) through sysfs and updates
	  the persistent reset-cause register on reboot and panic. Useful
	  for diagnosing unexpected restarts in the field. Say Y, or M to
	  build it as a module.

config PENSANDO_SOC_CRASH
	tristate "Pensando crash driver"
	depends on OF
	default y
	help
	  On panic this driver dumps the kernel log buffer into a
	  reserved flash region on the Pensando SoC so the crash can be
	  retrieved and decoded after the next boot. Provides post-mortem
	  diagnostics for headless DPU deployments. Say Y, or M to build
	  it as a module.

config PENSANDO_SOC_BSM
	bool "Pensando SoC Boot State Machine"
	depends on OF
	default y
	help
	  Exposes the Pensando SoC Boot State Machine (BSM) state through
	  sysfs, reporting the firmware boot stage and progress recorded
	  by the boot ROM and U-Boot. Used to track and debug the
	  multi-stage secure boot flow. If unsure, say Y.

config PENSANDO_SOC_BSM_ENABLE
	bool "Enable the Boot State Machine in the kernel"
        depends on PENSANDO_SOC_BSM
	help
	  Re-arm the Boot State Machine when the kernel starts so that a
	  subsequent unexpected reset is detected and recovered by the
	  boot firmware. Only takes effect when PENSANDO_SOC_BSM is
	  enabled. If unsure, say N.

config PENSANDO_SOC_PENFW
	bool "Pensando penfw driver"
	default n
	help
	  Provides the penfw character device and sysfs interface used to
	  query and update the secure-boot configuration of the Pensando
	  SoC through Arm SMC calls into the secure firmware. Used by
	  provisioning tools to read fuse and key state. If unsure, say
	  N.

config PENSANDO_SOC_SBUS
	tristate "Pensando sbus read/write driver"
	depends on OF
	default y
	help
	  Provides a character device for indirect read/write access to
	  the Pensando SoC serial bus (SBus), used to reach the SerDes
	  and other analog IP blocks for tuning and diagnostics. Say Y,
	  or M to build it as a module.

endmenu

endif
