# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

menu "Serial devices support"
depends on ADK_TARGET_WITH_SERIAL || ADK_TARGET_QEMU || ADK_TARGET_VBOX || ADK_TARGET_SIM || ADK_TARGET_GENERIC

config ADK_KERNEL_SERIAL_8250_CONSOLE
	bool

config ADK_KERNEL_SERIAL_8250_PNP
	bool

config ADK_KERNEL_SERIAL_ARC_CONSOLE
	bool

config ADK_KERNEL_SERIAL_XILINX_PS_UART_CONSOLE
	bool

config ADK_KERNEL_SERIAL_IMX_CONSOLE
	bool

config ADK_KERNEL_SERIAL_OF_PLATFORM
	bool

config ADK_KERNEL_SERIAL_OMAP_CONSOLE
	bool

config ADK_KERNEL_SERIAL_UARTLITE_CONSOLE
	bool

config ADK_KERNEL_SERIAL_ETRAXFS_CONSOLE
	bool

config ADK_KERNEL_SERIAL_MCF_CONSOLE
	bool

config ADK_KERNEL_SERIAL_PMACZILOG_TTYS
	bool

config ADK_KERNEL_SERIAL_PMACZILOG_CONSOLE
	bool

config ADK_KERNEL_SERIAL_SH_SCI_CONSOLE
	bool

config ADK_KERNEL_SERIAL_AMBA_PL011_CONSOLE
	bool

config ADK_KERNEL_SERIAL_SUNCORE
	bool

config ADK_KERNEL_SERIAL_SUNSU_CONSOLE
	bool

config ADK_KERNEL_DA_CONSOLE
	bool

config ADK_KERNEL_SERIAL_IP22_ZILOG_CONSOLE
	bool

config ADK_KERNEL_SERIAL_BFIN_CONSOLE
	bool

config ADK_KERNEL_SERIAL_BFIN_UART0
	bool

config ADK_KERNEL_SERIAL_BFIN_UART1
	bool

config ADK_KERNEL_SERIAL_8250_INGENIC
	bool

config ADK_KERNEL_SERIAL_BFIN
	bool "BFIN serial driver"
	select ADK_KERNEL_SERIAL_BFIN_CONSOLE
	select ADK_KERNEL_SERIAL_BFIN_UART0
	select ADK_KERNEL_SERIAL_BFIN_UART1
	depends on ADK_TARGET_ARCH_BFIN
	default y if ADK_TARGET_ARCH_BFIN

config ADK_KERNEL_SERIAL_8250
	bool "8250 serial driver"
	select ADK_KERNEL_SERIAL_OF_PLATFORM if ADK_TARGET_SYSTEM_XILINX_KINTEX7 \
						|| ADK_TARGET_SYSTEM_IMGTEC_CI20 \
						|| ADK_TARGET_SYSTEM_QEMU_XTENSA \
						|| ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_ML605 \
						|| ADK_TARGET_SYSTEM_QEMU_NIOS2 \
						|| ADK_TARGET_SYSTEM_QEMU_OR1K \
						|| ADK_TARGET_SYSTEM_SIM_OR1K
	select ADK_KERNEL_SERIAL_8250_PNP if ADK_TARGET_SYSTEM_PCENGINES_APU
	select ADK_KERNEL_SERIAL_8250_CONSOLE
	select ADK_KERNEL_SERIAL_8250_INGENIC if ADK_TARGET_SYSTEM_IMGTEC_CI20
	depends on ADK_TARGET_SYSTEM_XILINX_KINTEX7 \
		|| ADK_TARGET_SYSTEM_IMGTEC_CI20 \
		|| ADK_TARGET_SYSTEM_LINKSYS_NSLU2 \
		|| ADK_TARGET_SYSTEM_ANDES_AG101P \
		|| ADK_TARGET_SYSTEM_PCENGINES_APU \
		|| ADK_TARGET_SYSTEM_PCENGINES_ALIX \
		|| ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_ML605 \
		|| ADK_TARGET_SYSTEM_QEMU_MIPS \
		|| ADK_TARGET_SYSTEM_QEMU_MIPS64 \
		|| ADK_TARGET_SYSTEM_SGI_O2 \
		|| ADK_TARGET_SYSTEM_QEMU_NIOS2 \
		|| ADK_TARGET_SYSTEM_QEMU_OR1K \
		|| ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO \
		|| ADK_TARGET_SYSTEM_QEMU_X86 \
		|| ADK_TARGET_SYSTEM_QEMU_X86_64 \
		|| ADK_TARGET_SYSTEM_QEMU_XTENSA \
		|| ADK_TARGET_SYSTEM_SIM_OR1K \
		|| ADK_TARGET_SYSTEM_IBM_X40 \
		|| ADK_TARGET_SYSTEM_GENERIC_NDS32 \
		|| ADK_TARGET_SYSTEM_GENERIC_X86 \
		|| ADK_TARGET_SYSTEM_GENERIC_X86_64 \
		|| ADK_TARGET_SYSTEM_MIKROTIK_RB532 \
		|| ADK_TARGET_SYSTEM_MIKROTIK_RB4XX \
		|| ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
	default y if ADK_TARGET_SYSTEM_XILINX_KINTEX7
	default y if ADK_TARGET_SYSTEM_IMGTEC_CI20
	default y if ADK_TARGET_SYSTEM_LINKSYS_NSLU2
	default y if ADK_TARGET_SYSTEM_ANDES_AG101P
	default y if ADK_TARGET_SYSTEM_PCENGINES_APU
	default y if ADK_TARGET_SYSTEM_PCENGINES_ALIX
	default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_ML605
	default y if ADK_TARGET_SYSTEM_QEMU_MIPS
	default y if ADK_TARGET_SYSTEM_QEMU_MIPS64
	default y if ADK_TARGET_SYSTEM_SGI_O2
	default y if ADK_TARGET_SYSTEM_QEMU_NIOS2
	default y if ADK_TARGET_SYSTEM_QEMU_OR1K
	default y if ADK_TARGET_SYSTEM_QEMU_PPC_BAMBOO
	default y if ADK_TARGET_SYSTEM_QEMU_X86
	default y if ADK_TARGET_SYSTEM_QEMU_X86_64
	default y if ADK_TARGET_SYSTEM_QEMU_XTENSA
	default y if ADK_TARGET_SYSTEM_SIM_OR1K
	default y if ADK_TARGET_SYSTEM_IBM_X40
	default y if ADK_TARGET_SYSTEM_GENERIC_NDS32
	default y if ADK_TARGET_SYSTEM_GENERIC_X86
	default y if ADK_TARGET_SYSTEM_GENERIC_X86_64
	default y if ADK_TARGET_SYSTEM_MIKROTIK_RB532
	default y if ADK_TARGET_SYSTEM_MIKROTIK_RB4XX
	default y if ADK_TARGET_SYSTEM_SOLIDRUN_CLEARFOG
	default n
	help
	  Serial driver for 8250 UART chip.

config ADK_KERNEL_DA_TTY
	bool "METAG serial driver"
	select ADK_KERNEL_DA_CONSOLE
	depends on ADK_TARGET_SYSTEM_QEMU_METAG
	default y if ADK_TARGET_SYSTEM_QEMU_METAG
	default n
	help
	  Serial driver for Qemu METAG Emulation.

config ADK_KERNEL_SERIAL_SUNSU
	bool "Sun Sparc64 serial driver"
	select ADK_KERNEL_SERIAL_SUNSU_CONSOLE
	select ADK_KERNEL_SERIAL_SUNCORE
	depends on ADK_TARGET_SYSTEM_QEMU_SPARC64
	default y if ADK_TARGET_SYSTEM_QEMU_SPARC64
	default n
	help
	  Serial driver for Sun SPARC64.

config ADK_KERNEL_SERIAL_ETRAXFS
	bool "ETRAXFS serial driver"
	select ADK_KERNEL_SERIAL_ETRAXFS_CONSOLE
	depends on ADK_TARGET_SYSTEM_QEMU_CRIS
	default y if ADK_TARGET_SYSTEM_QEMU_CRIS
	default n
	help
	  Serial driver for ETRAXFS CRISv32 Qemu Emulation.

config ADK_KERNEL_SERIAL_ARC
	bool "ARC serial driver"
	select ADK_KERNEL_SERIAL_ARC_CONSOLE
	depends on ADK_TARGET_SYSTEM_NSIM_ARCV1 \
		|| ADK_TARGET_SYSTEM_NSIM_ARCV2
	default y if ADK_TARGET_SYSTEM_NSIM_ARCV1
	default y if ADK_TARGET_SYSTEM_NSIM_ARCV2
	default n
	help
	  Serial driver for nSIM ARC simulator.

config ADK_KERNEL_SERIAL_XILINX_PS_UART
	bool "Cadence serial driver"
	select ADK_KERNEL_SERIAL_XILINX_PS_UART_CONSOLE
	depends on ADK_TARGET_SYSTEM_QEMU_ARM_XILINX_ZYNQ
	default y if ADK_TARGET_SYSTEM_QEMU_ARM_XILINX_ZYNQ
	default n
	help
	  Serial driver for Xilinx Zynq.

config ADK_KERNEL_SERIAL_IMX
	bool "IMX serial driver"
	select ADK_KERNEL_SERIAL_IMX_CONSOLE
	depends on ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
	default y if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
	default n
	help
	  Serial driver for IMX6 chip.

config ADK_KERNEL_SERIAL_AMBA_PL011
	bool "AMBA PL011 serial driver"
	select ADK_KERNEL_SERIAL_AMBA_PL011_CONSOLE
	select ADK_KERNEL_SERIAL_OF_PLATFORM
	select ADK_KERNEL_SERIAL_8250
	select ADK_KERNEL_SERIAL_8250_CONSOLE
	depends on ADK_TARGET_BOARD_BCM28XX \
		|| ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE \
		|| ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB \
		|| ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU \
		|| ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9
	default y if ADK_TARGET_BOARD_BCM28XX
	default y if ADK_TARGET_SYSTEM_QEMU_ARM_REALVIEW_EB_MPCORE
	default y if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB
	default y if ADK_TARGET_SYSTEM_QEMU_ARM_VERSATILEPB_NOMMU
	default y if ADK_TARGET_SYSTEM_QEMU_ARM_VEXPRESS_A9
	default n
	help
	  Serial driver for AMBA PL011 chip.

config ADK_KERNEL_SERIAL_SH_SCI
	bool "sci serial driver"
	select ADK_KERNEL_SERIAL_SH_SCI_CONSOLE
	depends on ADK_TARGET_SYSTEM_SIM_H8300H
	default y if ADK_TARGET_SYSTEM_SIM_H8300H
	default n
	help
	  Serial driver for SCI chip.

config ADK_KERNEL_SERIAL_MCF
	bool "coldfire serial driver"
	select ADK_KERNEL_SERIAL_MCF_CONSOLE
	depends on ADK_TARGET_SYSTEM_QEMU_M68K_MCF5208
	default y if ADK_TARGET_SYSTEM_QEMU_M68K_MCF5208
	default n
	help
	  Serial driver for Qemu coldfire.

config ADK_KERNEL_SERIAL_PMACZILOG
	bool "pmac serial driver"
	select ADK_KERNEL_SERIAL_PMACZILOG_TTYS
	select ADK_KERNEL_SERIAL_PMACZILOG_CONSOLE
	depends on ADK_TARGET_SYSTEM_QEMU_M68K_Q800 \
		|| ADK_TARGET_SYSTEM_QEMU_PPC_MACPPC
	default y if ADK_TARGET_SYSTEM_QEMU_M68K_Q800
	default y if ADK_TARGET_SYSTEM_QEMU_PPC_MACPPC
	default n
	help
	  Serial driver for PMAC Q800 M68K and MACPPC.

config ADK_KERNEL_SERIAL_OMAP
	bool "omap serial driver"
	select ADK_KERNEL_SERIAL_8250
	select ADK_KERNEL_SERIAL_8250_CONSOLE
	select ADK_KERNEL_SERIAL_OMAP_CONSOLE
	depends on ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
	default y if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
	default n
	help
	  Serial driver for Beaglebone Black

config ADK_KERNEL_SERIAL_UARTLITE
	bool "uartlite serial driver"
	select ADK_KERNEL_SERIAL_UARTLITE_CONSOLE
	depends on ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_S3ADSP1800 \
		|| ADK_TARGET_SYSTEM_NUMATO_MIMASV2
	default y if ADK_TARGET_SYSTEM_QEMU_MICROBLAZE_S3ADSP1800
	default y if ADK_TARGET_SYSTEM_NUMATO_MIMASV2
	default n
	help
	  Serial driver for UART lite hardware.

config ADK_KERNEL_SERIAL_IP22_ZILOG
	bool "SGI IP22 (Indy) serial driver"
	select ADK_KERNEL_SERIAL_IP22_ZILOG_CONSOLE
	depends on ADK_TARGET_SYSTEM_SGI_INDY
	default y if ADK_TARGET_SYSTEM_SGI_INDY
	default n
	help
	  Serial driver for SGI Indy.

config ADK_KERNEL_SERIAL_ATMEL
	bool "AT32 serial driver"
	select ADK_KERNEL_SERIAL_ATMEL_CONSOLE
	select ADK_KERNEL_SERIAL_ATMEL_PDC
	select ADK_KERNEL_BOARD_GRASSHOPPER_USART1 if ADK_TARGET_SYSTEM_GRASSHOPPER
	depends on ADK_TARGET_CPU_AVR32
	default y if ADK_TARGET_SYSTEM_GRASSHOPPER
	default n
	help
	  Serial driver for AVR32 Grasshopper boards

config ADK_KERNEL_BOARD_GRASSHOPPER_USART0
	bool "Enable USART0 on AVR32 Grasshopper boards"
	depends on ADK_KERNEL_SERIAL_ATMEL && ADK_TARGET_SYSTEM_GRASSHOPPER
	default n
	help
	  Enable second USART on Grasshoper boards

endmenu
