if RTOS

source "drivers/hal/bugfix/Kconfig"
config RTOS_HAL_AER_NO_RESET_LINK
	bool "support aer fatal error not to reset pcie link"
	default n
	depends on PCIEAER
	help
	  some hardware does not want to reset the pcie link in
	  pcie aer irq. The reason is that the reset link on specific
	  hardware will fail with a high probability. Finally it causes
	  fmea detection and reboot the whole system.

	  this option provide bootargs to allow the users to decide which
	  boards do not reset the pcie link.

config RTOS_HAL_DISABLE_TTY_FLOWCONTROL
	bool "disable tty flowcontrol"
	default n
	help
	 The user will do the test with short circuiting of
	 the serial rx and tx, which may trigger the tty
	 flow control and the system will crash.
	 To fix this problem, we disable tty port flow control if
	 n8N is set in cmdline, like console=ttyAMA0,115200n8N.

config RTOS_HAL_PCI_DOMAIN
	bool "support pci domain"
	default n
	select PCI_DOMAINS_GENERIC
	help
	  support pci domain number configuration through device tree
	  this option is only used to select PCI_DOMAINS_GENERIC

config RTOS_HAL_SCSI_DEVICE_OFFLINE_NOTIFY
	bool "support callback chain when scsi device is set to offline"
	default n
	depends on SCSI
	help
	  support callback chain when scsi device is set to offline

config RTOS_HAL_PCI_MSI_CALLBACK
	bool "support kernel invocation of pci msi hooks"
	default n
	depends on PCI_MSI
	select PCI_MSI_ARCH_FALLBACKS
	help
	  this option is only used to select CONFIG_PCI_MSI_ARCH_FALLBACKS,
	  which enable kernel to invoke the pci msi hooks registered by
	  the users

config RTOS_HAL_EARLY_IOREMAP
	bool "support early ioremap"
	default y if ARM
	select GENERIC_EARLY_IOREMAP
	help
	  support early ioremap

config RTOS_HAL_FIQ_SUPPORT_RESERVED_MEMORY
	bool "fiq support reserve mem buffer"
	default n
	depends on FIQ_GLUE
	help
	  cpu context buffer support reserve mem

config RTOS_HAL_FIQ_GLUE_GUESTOS
	bool "support guestOS fiq"
	default n
	depends on FIQ_GLUE && ARM64
	help
	  support guestOS fiq

config RTOS_HAL_FIQ_GLUE_EARLY
	bool "support early fiq"
	default n
	depends on FIQ_GLUE && (ARM || ARM64)
	help
	  support fiq during early stage of kernel start
	  when selected, an init of fiq will be executed
	  in start_kernel function, init fail should not
	  affect the following process.
	  when unselected, no difference visiable.

config RTOS_DROL
	bool "dts regs operations language support"
	default y if HISI_WATCHDOG
	default y if ARCH_HISI && SMP
	depends on OF
	help
	  this option enables the dts regs operations language support

config RTOS_GPIO_LOCK
	bool "add rtos_gpio_lock and rtos_gpio_unlock function"
	default n
	help
	  add rtos_gpio_lock and rtos_gpio_unlock function, some
	  rtos feature may need it.

config HISI_WATCHDOG
	bool "HISI watchdog support"
	select RTOS_GPIO_LOCK
	help
	  This option enables the watch dog module.

config CACHE_ECC_RECORD_ENABLE
	bool "Call cache notify when reboot/panic"
	default y
	depends on ARCH_HISI && !MACH_SD511X
	help
	  This option enble cache_ecc_check notifier

config HISI_EARLY_DIE_NOTIFIER
	bool "Enable call notifier at entry of die"
	depends on CACHE_ECC_RECORD_ENABLE
	help
	  This option enables early die notifier.

config HISI_USR_DIE_NOTIFIER
	bool "Enable call notifier at entry of user die"
	depends on CACHE_ECC_RECORD_ENABLE
	help
	  This option enables usr die notifier.

config HISI_EARLY_RESET_NOTIFIER
	bool "Enable call notifier at entry of reboot"
	depends on CACHE_ECC_RECORD_ENABLE
	help
	  This option enable early reset notifier

config HISI_EARLY_PANIC_NOTIFIER
	bool "Enable call notifier at entry of panic"
	depends on CACHE_ECC_RECORD_ENABLE
	help
	  This option enables early panic notifier.

config RTOS_HAL_EASY_DFX_ENABLE
	bool "Enable rtos easy dfx notifier"
	default n
	help
	  This option enable all rtos dfx notifier in
	    1)panic
	    2)kernel die
	    3)user handled fault
	    4)user unhandled fault
	    5)system restart
	    6)ppc machine_check

config RTOS_LED
	bool "LED support"
	default n
	select RTOS_GPIO_LOCK
	help
	  This option enables the LED module.

config RTOS_EARLY_LED
	bool "early LED support"
	default n
	depends on RTOS_LED
	help
	  If early LED is enabled, led will shine
	  fed before timer initialized, which will
	  keep light signal available when initializing ddr

config RTOS_CHECK_PAGE_ATTR
	bool "enable check page attributes"
	default n
	depends on (ARM64 || ARM)
	help
	  enable page attributes check. If this is enabled,
	  user then can insert some ranges with attributes
	  constraint to ensure our desired page attribute is
	  not changed
	  If you are unsure, say N.

config RTOS_HAL_SERIAL_HIUART
	bool "hiuart support"
	default n
	help
	  support hiuart (SD6157's uart)

config RTOS_HAL_SERIAL_HIUARTV600
	bool "hiuartv600 support"
	default n
	help
	  support hiuartv600

config RTOS_HAL_HISI_CLEAR_UART_IRQ
	bool "Hisilicon 1382 can`t report uart irq fix"
	default n
	depends on TTY && HAS_IOMEM
	help
	  This option is used to workaround Hisilicon 1382
	  can`t report uart irq fix. Before registering
	  serial port interrupts, clear interrupt-related
	  registers to avoid bug.

config RTOS_HAL_RENAME_8250_CONSOLE
	bool "rename 8250 serial console support"
	default n
	depends on SERIAL_8250_CONSOLE && OF
	help
	  support rename 8250 console name

config RTOS_HAL_TTY_TIOCSTI_BUGFIX
	bool "bugfix for tty ioctl tiocsti"
	default y
	depends on TTY
	help
	  Open a serial port that is not configured in the DTS,
	  and use the ioctl command TIOCSTI to simulate serial
	  port input. When the register is accessed,
	  the base address uport->iobase is a null pointer,
	  causing a kernel panic. Now check the TTY_IO_ERR flag
	  for blocking.

config RTOS_NETDEV_HIFE0
	bool "netdev named HIFE0"
	default y if HI13X1_GMAC
	help
	  The user wants the network device to be named HiFE0

config RTOS_HAL_RENESAS_USB_HANDOFF
	bool "pci usb host handoff for renesas"
	default n
	depends on USB && PCI
	help
	  support disable renesas handoff via cmdline

config RTOS_HAL_CACHE_L2X0
	bool "Enable the L2x0 outer cache controller"
	default n
	select CACHE_L2X0
	help
	  This option enables the L2x0 PrimeCell.
	  l2c_aux_val and l2c_aux_mask should be
	  configured in the cache's dts node.

config RTOS_HAL_SUPPORT_GICV3_FOR_AARCH32
	bool "Support gicv3 for AARCH32"
	default n
	select ARM_GIC_V3
	help
	  Support gicv3 for AARCH32

config RTOS_MKHEADER_UIMAGE
	bool "Use mkimage or self-developed mkheader"
	default n
	help
	  Use mkimage or self-developed mkheader

config RTOS_HAL_SUPPORT_16CORE_GIC
	bool "support the hisi gic used by hi1381/hi1215"
	depends on ARM_GIC
	default n
	help
	  the standard gicv2 only support 8 cores, but
	  the gic of hi1381/hi1215 supports 16 cores.

config RTOS_HAL_PCIE_AER_NOTIFY
	bool "PCIE aer notify"
	default n
	depends on PCI

config RTOS_HAL_GHES_CALLBACK
	bool "add ghes callback for control whether panic is required"
	default n
	depends on ACPI_APEI_GHES
	help
	  In some device, if the time which panic spend exceed the limit
	  (eg: 2 second), all reserve memory will be clean by BIOS. Because
	  __ghes_panic spend too much time, so we provide callback function
	  which can print error logs and reboot in callback function.

config RTOS_HAL_WORKAROUND_8250_CLOSE_TIMEOUT
        bool "workaround the problem that uart 8250 close timeout "
		default n
		depends on SERIAL_8250
		help
			workaround the problem that 8250 uart colse timeout.

config RTOS_HAL_ACPI_OP
	bool "support read acpi data early"
	default n
	depends on ACPI
	help
	  support read acpi data after acpi_subsystem_init()

config RTOS_HAL_UART_COMPAT_IOCTL
	bool "support uart compat ioctl"
	default n
	depends on COMPAT
	help
		support uart compat ioctl

config RTOS_HAL_PINCTRL_GROUPS
	bool "Support pinctrl groups function"
	default n
	depends on PINCTRL
	select GENERIC_PINCTRL_GROUPS
	help
	  Say Y here to turn CONFIG_GENERIC_PINCTRL_GROUPS to Y

config RTOS_HAL_PINCTRL_FUNCTIONS
	bool "Support pinctrl dividing pin by function"
	default n
	depends on PINCTRL
	select GENERIC_PINMUX_FUNCTIONS
	help
	  Say Y here to turn CONFIG_GENERIC_PINMUX_FUNCTIONS to Y

config RTOS_HAL_PINCTRL_PINCONF
	bool "Support pinctrl pinconf"
	default n
	depends on PINCTRL
	select GENERIC_PINCONF
	help
	  Pin configuration offers some interfaces to configure pinctrl
	  system, drivers using it need select the pinconf related config
	  independently, we offer this config to select pinconf forcely,
	  Say Y here to turn CONFIG_GENERIC_PINCONF to Y


config RTOS_HAL_PCIE_INIT_SERVICE_IRQ_HOOK
	bool "Support pcie init service irq hook"
	default n
	depends on PCIEAER
	help
	  Support pcie init service irq hook

config RTOS_HAL_ARCH_TIMER_JUMP_DFX
	bool "support arm64 arch timer exception debug"
	default n
	depends on ARM_ARCH_TIMER && ARM64
	help
	  when arm64 arch timer jump, we can print debug info. acpi parameter "timer_max_gap"
	  can control the max time gap between two arch_timer_read_counter call. acpi parameter
	  "syscnt_phys_addr" can be obtained system_counter_register physical address.
	  system_counter_register's value can replace the arch timer counter value in function
	  arch_counter_get_cntpct when the arch timer counter jump for 3 consecutive times.

config RTOS_HAL_ENABLE_RESET_VISIBLE
	bool "Enable Simple Reset Controller and STM32MP157 Reset Driver Visible"
	default n
	depends on RESET_CONTROLLER
	help
	  This config enable simple reset controller driver and the RCC
	  reset controller driver for STM32 MPUs always visible.

config RTOS_HAL_UART_CLEAR_MBIGEN_ACTIVE
	bool "support 8250 uart clear mbigen active"
	default n
	depends on HISILICON_IRQ_MBIGEN
	help
	  support 8250 uart clear mbigen active after request irq.
	  If not do this, the uart may not work after initialization
	  in some hisi soc, such as sd6801 and sd6801e.
	  Say Y here to workaround 8250 uart problem.

config RTOS_HAL_HISI_MDIO_HANDLE
	bool "hisilicon mdio handle"
	default n
	depends on HNS_MDIO
	help
	  Some boards (8261/6802 etc.) have a different arch of
	  mdio, which should be processed separately.
	  8261 should set gpio register for initialization of
	  phy.
endif
