UPSTREAM: libpayload: split "Drivers" config section in Kconfig

Move the configuration of the timer, storage and USB drivers from the
main Kconfig to three separate ones stored in the respective
directories.

This reduces the LOC of Kconfig and makes it more manageable.

BUG=None
BRANCH=None
TEST=None

Change-Id: Iab88c135c3dc5d2e4a9859ecdab31bbb70b699b8
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/15914
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/367372
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
This commit is contained in:
Antonello Dettori 2016-07-27 12:41:04 +02:00 committed by chrome-bot
commit 498622cbad
4 changed files with 306 additions and 267 deletions

View file

@ -363,273 +363,9 @@ config SPEAKER
depends on ARCH_X86
default y if !CHROMEOS
config STORAGE
bool "Support for storage devices"
default y if !CHROMEOS
help
Select this option if you want support for storage devices (like
hard drives, memory sticks or optical drives).
config STORAGE_64BIT_LBA
bool "Use 64-bit integers to address sectors"
depends on STORAGE
default n
help
If this is selected, sectors will be addressed by an 64-bit integer.
Select this to support LBA-48 for ATA drives.
config STORAGE_ATA
bool "Support ATA drives (i.e. hard drives)"
depends on STORAGE
default y
help
Select this option if you want support for ATA storage devices
(i.e. hard drives).
config STORAGE_ATAPI
bool "Support ATAPI drives (i.e. optical drives)"
depends on STORAGE
default y
select STORAGE_ATA
help
Select this option if you want support for ATAPI storage devices
(i.e. optical drives like CD or DVD drives).
config STORAGE_AHCI
bool "Support for AHCI host controllers"
depends on STORAGE && (STORAGE_ATA || STORAGE_ATAPI) && PCI
default y
help
Select this option if you want support for SATA controllers in
AHCI mode.
config STORAGE_AHCI_ONLY_TESTED
bool "Only enable tested controllers"
depends on STORAGE_AHCI
default y
help
If this option is selected only AHCI controllers which are known
to work will be used.
config TIMER_RDTSC
bool
default y
depends on ARCH_X86
choice
prompt "Timer driver"
default TIMER_NONE
depends on !ARCH_X86
config TIMER_NONE
bool "None"
help
The timer driver is provided by the payload itself.
config TIMER_MCT
bool "Exynos MCT"
config TIMER_TEGRA_1US
bool "Tegra 1us"
config TIMER_IPQ806X
bool "Timer for ipq806x platforms"
config TIMER_ARMADA38X
bool "Timer for armada38x platforms"
help
This is the timer driver for marvell armada38x
platforms.
config TIMER_IPQ40XX
bool "Timer for ipq40xx platforms"
help
This is the timer driver for QCA IPQ40xx based
platforms.
config TIMER_RK3288
bool "Timer for Rockchip RK3288"
config TIMER_RK3399
bool "Timer for Rockchip RK3399"
config TIMER_CYGNUS
bool "Timer for Cygnus"
config TIMER_IMG_PISTACHIO
bool "Timer for IMG Pistachio"
config TIMER_MTK
bool "Timer for MediaTek MT8173"
endchoice
config ARMADA38X_TIMER_FREQ
int "Hardware timer frequency"
depends on TIMER_ARMADA38X
default 25000000
config ARMADA38X_TIMER_REG
hex "Timer register address"
default 0xF1020314
depends on TIMER_ARMADA38X
config TIMER_GENERIC_HZ
int "Generic Timer Frequency"
default 500000000 if TIMER_CYGNUS
default 48000000 if TIMER_IPQ40XX
default 6250000 if TIMER_IPQ806X
default 24000000 if TIMER_MCT
default 13000000 if TIMER_MTK
default 24000000 if TIMER_RK3288
default 24000000 if TIMER_RK3399
default 1000000 if TIMER_TEGRA_1US
default 0
help
Clock frequency of generic time counter in Hertz. Leave at 0 to
disable when using a non-generic timer driver.
config TIMER_GENERIC_REG
hex "Generic Timer Register Address"
default 0x19020200 if TIMER_CYGNUS
default 0x004A2000 if TIMER_IPQ40XX
default 0x0200A028 if TIMER_IPQ806X
default 0x101C0100 if TIMER_MCT
default 0x10008048 if TIMER_MTK
default 0xff810028 if TIMER_RK3288
default 0xff850008 if TIMER_RK3399
default 0x60005010 if TIMER_TEGRA_1US
default 0x0
help
Register address to read generic time counter from.
config TIMER_GENERIC_HIGH_REG
hex "Generic Timer High Register Address"
default 0x19020204 if TIMER_CYGNUS
default 0x004A2004 if TIMER_IPQ40XX
default 0x101C0104 if TIMER_MCT
default 0xff81002C if TIMER_RK3288
default 0xff85000C if TIMER_RK3399
default 0x0
help
Register address to read high 32 bits of generic time counter from.
Leave at 0x0 for 32-bit counters.
config USB
bool "USB Support"
default y
config USB_UHCI
bool "Support for USB UHCI controllers"
depends on USB && ARCH_X86
default y if !CHROMEOS
help
Select this option if you are going to use USB 1.1 on an Intel based
system.
config USB_OHCI
bool "Support for USB OHCI controllers"
depends on USB
default y if !CHROMEOS
help
Select this option if you are going to use USB 1.1 on a non-Intel based
system.
config USB_EHCI
bool "Support for USB EHCI controllers"
depends on USB
default y if !CHROMEOS
help
Select this option if you want to use USB 2.0
config USB_XHCI
bool "Support for USB xHCI controllers"
depends on USB
default y if !CHROMEOS
help
Select this option if you want to use USB 3.0
config USB_XHCI_MTK_QUIRK
bool "Support for USB xHCI controllers on MTK SoC"
depends on USB_XHCI
help
Select this option if you want to use USB 3.0 on MTK platform.
config USB_DWC2
bool "Support for USB DesignWare HCD controllers"
depends on USB
help
Select this option if you want to use DesignWare USB 2.0 host controller
config USB_HID
bool "Support for USB keyboards"
depends on USB
default y
help
Select this option if you want to use devices complying to the
USB HID (Human Interface Device) standard. Such devices are for
example keyboards and mice. Currently only keyboards are supported.
Say Y here unless you know exactly what you are doing.
config USB_HUB
bool "Support for USB hubs"
depends on USB
default y
help
Select this option if you want to compile in support for USB hubs.
Say Y here unless you know exactly what you are doing.
config USB_EHCI_HOSTPC_ROOT_HUB_TT
bool "Support for USB EHCI ROOT HUB that has TT"
depends on USB_EHCI
default n
help
Select this option if USB EHCI root hub supports TT (Transaction
Translator).
To support this TT feature we read port-speed from non-standard
register HOSTPC (offset 84h of Operational Register base).
config USB_MSC
bool "Support for USB storage"
depends on USB
default y
help
Select this option if you want to compile in support for USB mass
storage devices (USB memory sticks, hard drives, CDROM/DVD drives)
Say Y here unless you know exactly what you are doing.
config USB_GEN_HUB
bool
default n if (!USB_HUB && !USB_XHCI)
default y if (USB_HUB || USB_XHCI)
config USB_PCI
bool "Auto-scan PCI bus for USB host controllers"
depends on USB
default y if ARCH_X86
default n
config UDC
bool "USB device mode support"
default n
help
Select this option to add support for running as
a USB device.
config UDC_CI
bool "ChipIdea driver for USB device mode"
depends on UDC
default n
help
Select this option to add the driver for ChipIdea
USB device controller.
config UDC_DWC2
bool "Designware driver for USB device mode"
depends on UDC
default n
help
Select this option to add the driver for Designware
USB device controller.
source "drivers/timer/Kconfig"
source "drivers/storage/Kconfig"
source "drivers/usb/Kconfig"
endmenu

View file

@ -0,0 +1,59 @@
##
## This file is part of the coreboot project.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; version 2 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
config STORAGE
bool "Support for storage devices"
default y if !CHROMEOS
help
Select this option if you want support for storage devices (like
hard drives, memory sticks or optical drives).
config STORAGE_64BIT_LBA
bool "Use 64-bit integers to address sectors"
depends on STORAGE
default n
help
If this is selected, sectors will be addressed by an 64-bit integer.
Select this to support LBA-48 for ATA drives.
config STORAGE_ATA
bool "Support ATA drives (i.e. hard drives)"
depends on STORAGE
default y
help
Select this option if you want support for ATA storage devices
(i.e. hard drives).
config STORAGE_ATAPI
bool "Support ATAPI drives (i.e. optical drives)"
depends on STORAGE
default y
select STORAGE_ATA
help
Select this option if you want support for ATAPI storage devices
(i.e. optical drives like CD or DVD drives).
config STORAGE_AHCI
bool "Support for AHCI host controllers"
depends on STORAGE && (STORAGE_ATA || STORAGE_ATAPI) && PCI
default y
help
Select this option if you want support for SATA controllers in
AHCI mode.
config STORAGE_AHCI_ONLY_TESTED
bool "Only enable tested controllers"
depends on STORAGE_AHCI
default y
help
If this option is selected only AHCI controllers which are known
to work will be used.

View file

@ -0,0 +1,116 @@
##
## This file is part of the coreboot project.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; version 2 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
config TIMER_RDTSC
bool
default y
depends on ARCH_X86
choice
prompt "Timer driver"
default TIMER_NONE
depends on !ARCH_X86
config TIMER_NONE
bool "None"
help
The timer driver is provided by the payload itself.
config TIMER_MCT
bool "Exynos MCT"
config TIMER_TEGRA_1US
bool "Tegra 1us"
config TIMER_IPQ806X
bool "Timer for ipq806x platforms"
config TIMER_ARMADA38X
bool "Timer for armada38x platforms"
help
This is the timer driver for marvell armada38x
platforms.
config TIMER_IPQ40XX
bool "Timer for ipq40xx platforms"
help
This is the timer driver for QCA IPQ40xx based
platforms.
config TIMER_RK3288
bool "Timer for Rockchip RK3288"
config TIMER_RK3399
bool "Timer for Rockchip RK3399"
config TIMER_CYGNUS
bool "Timer for Cygnus"
config TIMER_IMG_PISTACHIO
bool "Timer for IMG Pistachio"
config TIMER_MTK
bool "Timer for MediaTek MT8173"
endchoice
config ARMADA38X_TIMER_FREQ
int "Hardware timer frequency"
depends on TIMER_ARMADA38X
default 25000000
config ARMADA38X_TIMER_REG
hex "Timer register address"
default 0xF1020314
depends on TIMER_ARMADA38X
config TIMER_GENERIC_HZ
int "Generic Timer Frequency"
default 500000000 if TIMER_CYGNUS
default 48000000 if TIMER_IPQ40XX
default 6250000 if TIMER_IPQ806X
default 24000000 if TIMER_MCT
default 13000000 if TIMER_MTK
default 24000000 if TIMER_RK3288
default 24000000 if TIMER_RK3399
default 1000000 if TIMER_TEGRA_1US
default 0
help
Clock frequency of generic time counter in Hertz. Leave at 0 to
disable when using a non-generic timer driver.
config TIMER_GENERIC_REG
hex "Generic Timer Register Address"
default 0x19020200 if TIMER_CYGNUS
default 0x004A2000 if TIMER_IPQ40XX
default 0x0200A028 if TIMER_IPQ806X
default 0x101C0100 if TIMER_MCT
default 0x10008048 if TIMER_MTK
default 0xff810028 if TIMER_RK3288
default 0xff850008 if TIMER_RK3399
default 0x60005010 if TIMER_TEGRA_1US
default 0x0
help
Register address to read generic time counter from.
config TIMER_GENERIC_HIGH_REG
hex "Generic Timer High Register Address"
default 0x19020204 if TIMER_CYGNUS
default 0x004A2004 if TIMER_IPQ40XX
default 0x101C0104 if TIMER_MCT
default 0xff81002C if TIMER_RK3288
default 0xff85000C if TIMER_RK3399
default 0x0
help
Register address to read high 32 bits of generic time counter from.
Leave at 0x0 for 32-bit counters.

View file

@ -0,0 +1,128 @@
##
## This file is part of the coreboot project.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; version 2 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
config USB
bool "USB Support"
default y
config USB_UHCI
bool "Support for USB UHCI controllers"
depends on USB && ARCH_X86
default y if !CHROMEOS
help
Select this option if you are going to use USB 1.1 on an Intel based
system.
config USB_OHCI
bool "Support for USB OHCI controllers"
depends on USB
default y if !CHROMEOS
help
Select this option if you are going to use USB 1.1 on a non-Intel based
system.
config USB_EHCI
bool "Support for USB EHCI controllers"
depends on USB
default y if !CHROMEOS
help
Select this option if you want to use USB 2.0
config USB_XHCI
bool "Support for USB xHCI controllers"
depends on USB
default y if !CHROMEOS
help
Select this option if you want to use USB 3.0
config USB_XHCI_MTK_QUIRK
bool "Support for USB xHCI controllers on MTK SoC"
depends on USB_XHCI
help
Select this option if you want to use USB 3.0 on MTK platform.
config USB_DWC2
bool "Support for USB DesignWare HCD controllers"
depends on USB
help
Select this option if you want to use DesignWare USB 2.0 host controller
config USB_HID
bool "Support for USB keyboards"
depends on USB
default y
help
Select this option if you want to use devices complying to the
USB HID (Human Interface Device) standard. Such devices are for
example keyboards and mice. Currently only keyboards are supported.
Say Y here unless you know exactly what you are doing.
config USB_HUB
bool "Support for USB hubs"
depends on USB
default y
help
Select this option if you want to compile in support for USB hubs.
Say Y here unless you know exactly what you are doing.
config USB_EHCI_HOSTPC_ROOT_HUB_TT
bool "Support for USB EHCI ROOT HUB that has TT"
depends on USB_EHCI
default n
help
Select this option if USB EHCI root hub supports TT (Transaction
Translator).
To support this TT feature we read port-speed from non-standard
register HOSTPC (offset 84h of Operational Register base).
config USB_MSC
bool "Support for USB storage"
depends on USB
default y
help
Select this option if you want to compile in support for USB mass
storage devices (USB memory sticks, hard drives, CDROM/DVD drives)
Say Y here unless you know exactly what you are doing.
config USB_GEN_HUB
bool
default n if (!USB_HUB && !USB_XHCI)
default y if (USB_HUB || USB_XHCI)
config USB_PCI
bool "Auto-scan PCI bus for USB host controllers"
depends on USB
default y if ARCH_X86
default n
config UDC
bool "USB device mode support"
default n
help
Select this option to add support for running as
a USB device.
config UDC_CI
bool "ChipIdea driver for USB device mode"
depends on UDC
default n
help
Select this option to add the driver for ChipIdea
USB device controller.
config UDC_DWC2
bool "Designware driver for USB device mode"
depends on UDC
default n
help
Select this option to add the driver for Designware
USB device controller.