menu "Cesa options"
	depends on MV_INCLUDE_CESA

config  MV_CESA
	bool "Support for Marvell Cryptographic Engine and Security Acceleration(CESA)"
	default y

config  MV_CESA_TOOL_ARMADA
	bool "Support for Marvell CESA Tool"
	default y
	depends on MV_CESA
	select MV_CESA_TOOL
	---help---

config MV_CESA_CHANNELS
	int "Total CESA HW channels supported"
	depends on MV_CESA
	range 1 2 if ARCH_ARMADA_XP || ARCH_ARMADA38X || ARCH_ARMADA375
	range 1 1 if ARCH_ARMADA370
	default "2" if ARCH_ARMADA_XP || ARCH_ARMADA38X || ARCH_ARMADA375
	default "1" if ARCH_ARMADA370
	---help---
	Select the number of CESA channels to be used for crypto operations acceleration.


choice
        prompt "CESA Mode"
        depends on MV_CESA
        default MV_CESA_OCF_ARMADA

config	MV_CESA_OCF_ARMADA
	bool "Support for Marvell CESA OCF driver"
	depends on OCF_OCF
	select MV_CESA_OCF
	---help---
	Choosing this option will enable you to use the Marvell Cryptographic Engine and
	Security Accelerator, under the OCF package.

config  MV_CESA_TEST_ARMADA
	bool "Support for Marvell CESA test driver"
	depends on MV_CESA_TOOL_ARMADA
	select MV_CESA_TEST
	---help---
	Choosing this option will enable you to use the Marvell Cryptographic Engine and
	Security Accelerator, with the mv_cesa_tool in test mode.

config  MV_CESA_L2FW_ARMADA
	bool "Support for Marvell L2fw demo driver"
	depends on MV_ETH_L2SEC
	select MV_CESA_L2FW
	---help---
	Choosing this option will enable you to use the Marvell Cryptographic Engine and
	Security Accelerator, with the l2fw demo.
endchoice

choice
	prompt "CESA Features"
	depends on MV_CESA
	default MV_CESA_CHAIN_MODE if (ARCH_ARMADA370 || ARMADA_XP_REV_Z1)
	default MV_CESA_INT_COALESCING_SUPPORT if (ARMADA_XP_REV_A0 || ARMADA_XP_REV_B0 || \
						   ARCH_ARMADA38X || ARCH_ARMADA375)

config MV_CESA_CHAIN_MODE
	bool "Support CESA chain-mode"
	depends on MV_CESA
	---help---
	Choosing this option will enable CESA chain mode support.

config MV_CESA_INT_COALESCING_SUPPORT
	bool "Support Interrupt Coalescing"
	depends on MV_CESA && (ARMADA_XP_REV_A0 || ARMADA_XP_REV_B0 || ARCH_ARMADA38X || ARCH_ARMADA375)
	---help---
	Choosing this option will enable CESA interrupt coalescing support.

config MV_CESA_INT_PER_PACKET
	bool "Support interrupt per packet(no optimization)"
	depends on MV_CESA
	---help---
	Choosing this option will enforce CESA to work in interrupt per packet mode.

endchoice

config	MV_CESA_INT_COAL_THRESHOLD
	hex "Cryptographic Interrupt Coalescing Threshold"
	depends on MV_CESA_INT_COALESCING_SUPPORT
	range 0x0 0xff
	default 0x2
	---help---
	This field provides a way to minimize the number of interrupts to off load
	the CPU. It defines the number of <AccAndTDMAInt_CM> indications before
	asserting the <EopCoalInt> bit in the Cryptographic interrupt Cause Register.

config	MV_CESA_INT_COAL_TIME_THRESHOLD
	hex "Cryptographic Interrupt Coalescing Time Threshold"
	depends on MV_CESA_INT_COALESCING_SUPPORT
	range 0x0 0xffffff
	default 0xfffff
	---help---
	This field provides a way to ensure maximum delay between <AccAndTDMAInt_CM>
	assertion and assertion bit <EopCoalInt> in Cryptographic Interrupt Cause
	Register (even if the number of <AccAndTDMAInt_CM> indications did not
	reach the <EopCoalPacketTh> value).

config	MV_CESA_OCF
	depends on MV_CESA_OCF_ARMADA
	tristate

config  MV_CESA_TEST
	depends on MV_CESA_TEST_ARMADA
	bool

config  MV_CESA_TOOL
	depends on MV_CESA_TOOL_ARMADA
	tristate

endmenu

