goldfish: refactor goldfish platform configs

On new virtual devices, the goldfish virtual bus can be replaced with
autoprobing infrastructure like Device Tree.  Refactor the goldfish
kernel configs to better accommodate this.

Move the goldfish platform into a menuconfig in the style of the chrome
platform, and separate the goldfish bus into its own config option.

Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Jin Qian <jinqian@android.com>
[Corrected a tristate to bool]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Hackmann 2016-01-06 14:04:13 +00:00 committed by Greg Kroah-Hartman
parent 92e963f50f
commit bd2f348db5
3 changed files with 20 additions and 3 deletions

View File

@ -4,8 +4,7 @@ endif
if MIPS if MIPS
source "drivers/platform/mips/Kconfig" source "drivers/platform/mips/Kconfig"
endif endif
if GOLDFISH
source "drivers/platform/goldfish/Kconfig" source "drivers/platform/goldfish/Kconfig"
endif
source "drivers/platform/chrome/Kconfig" source "drivers/platform/chrome/Kconfig"

View File

@ -1,5 +1,23 @@
menuconfig GOLDFISH
bool "Platform support for Goldfish virtual devices"
depends on X86_32 || X86_64 || ARM || ARM64
---help---
Say Y here to get to see options for the Goldfish virtual platform.
This option alone does not add any kernel code.
Unless you are building for the Android Goldfish emulator say N here.
if GOLDFISH
config GOLDFISH_BUS
bool "Goldfish platform bus"
---help---
This is a virtual bus to host Goldfish Android Virtual Devices.
config GOLDFISH_PIPE config GOLDFISH_PIPE
tristate "Goldfish virtual device for QEMU pipes" tristate "Goldfish virtual device for QEMU pipes"
---help--- ---help---
This is a virtual device to drive the QEMU pipe interface used by This is a virtual device to drive the QEMU pipe interface used by
the Goldfish Android Virtual Device. the Goldfish Android Virtual Device.
endif # GOLDFISH

View File

@ -1,5 +1,5 @@
# #
# Makefile for Goldfish platform specific drivers # Makefile for Goldfish platform specific drivers
# #
obj-$(CONFIG_GOLDFISH) += pdev_bus.o obj-$(CONFIG_GOLDFISH_BUS) += pdev_bus.o
obj-$(CONFIG_GOLDFISH_PIPE) += goldfish_pipe.o obj-$(CONFIG_GOLDFISH_PIPE) += goldfish_pipe.o