menuconfig HIPCIE
	bool "Hisilicon PCI Express support"
	depends on PCI && (ARCH_HI3536 || ARCH_HI3531A)
	default y if PCI
	default n if ! PCI
	help
	Hisilicon PCI Express support
	Choose this selection to support PCI Express uses.

if HIPCIE

menu "PCI Express configs"

config PCIE0_SEL
        bool "PCI Express controller 0 sel"
        default n if ! PCI
        default y if PCI
        depends on PCI
        help
        PCI Express controller 0 sel.
        Set n to disable controller 0 as RC.
        set y to enable controller 0 to work at RC mode.

config PCIE0_DEVICES_MEM_SIZE
        hex "Total memory size of PCI Express EP devices"
        range 0x0 0x10000000 if ARCH_HI3536
        default "0x10000000" if ARCH_HI3536
	range 0x0 0x8000000 if ARCH_HI3531A
        default "0x8000000" if ARCH_HI3531A
        depends on PCIE0_SEL
        help
        Memory available for all pcie EP devices in pci subsystem.
        Hisilicon PCI Express controller provides up to 256MBytes address
	space for its subordinated devices.
	No IO address space is reserved, since to support PCI legacy devices
	which required IO address space.
        You can change this value as you please.

config PCIE0_DEVICES_CONFIG_SIZE
        hex "Sum of configuration header size mapped for all PCIe EP devices"
        range 0x0 0x10000000   if ARCH_HI3536
        default 0x800000       if ARCH_HI3536
	range 0x0 0x8000000    if ARCH_HI3531A
        default 0x800000       if ARCH_HI3531A
        depends on PCIE0_SEL
        help
	As to the PCIe address space configuration, address space for all EPs
	is up to 256Mbytes. But, normally people do not used that much. Each
	EP device will use 4Kbytes virtual address space for PCIe configuration header.
	Normally people will not use that much(256MB).
	Enlarge this value will require more system virtual address space.
	The DEFAULT value(8MB) is enough for most applications.

config LIMIT_MAX_RD_REQ_SIZE
	bool "limit pcie max read request size"
	default n
	depends on PCI && ARCH_HI3536
	help
	The default max read request size of pcie device is 512 Byte. When hi3536 use
	the card of pcie-to-sata to connect to the sata disk, with the default max read
	request size value of 512 byte, would cause the low bandwidth of VDP. If you enable
	the LIMIT_MAX_RD_REQ_SIZE config, the max read request size of pcie device would be
	set to 256 byte, and the problem of VDP low band width also be avoided.

config PCIE1_SEL
	bool "PCI Express controller 1 sel"
	default n if !PCI
	default y if PCI
	depends on PCI && ARCH_HI3531A
	help
	PCI Express controller 1 sel.
	Set n to disable controller 1,
	set y to enable controller 1 to work at RC mode.

config PCIE1_DEVICES_MEM_SIZE
	hex "Total memory size of PCI Express EP devices"
	range 0x0 0x8000000 if ARCH_HI3531A
	default "0x8000000" if ARCH_HI3531A
	depends on PCIE1_SEL
	help
	All memory size required by all devices in pci subsystem.
	Hisilicon PCI Express controller provide up to 128MBytes address
	space for its subordinated devices.
	No IO address space is reserved, since to support PCI legacy devices
	which required IO address space.
	You can change this value as you please.

config PCIE1_DEVICES_CONFIG_SIZE
	hex "Total configuration header size of PCI Express system devices"
	range 0x0 0x8000000    if ARCH_HI3531A
	default 0x800000       if ARCH_HI3531A
	depends on PCIE1_SEL
	help
	All configuration size required by devices connnect to
	Hisilicon PCI Express controller.
	NOTE: This will alloc memory from kernel,
	enlarge this will require the same memory.
	The default value is enough for most applications.

endmenu

endif

