goldish: onwards, upwards 8)
Subsystems (8)
cover goldish: onwards, upwards 8)
Use devm_ where it seems to make sense, clean up comments, documentation and some reservation and error paths. This makes it smaller and tighter again.
---
Arve Hjønnevåg (4):
goldfish: tty driver
goldfish: framebuffer
goldfish: real time clock
goldfish: NAND flash driver
Brian Swetland (1):
goldfish: virtual input event driver
David 'Digit' Turner (1):
goldfish: add QEMU pipe driver
Jun Nakajima (2):
goldfish: platform device for x86
goldfish: add the goldfish virtual bus
Mike Lockwood (2):
goldfish: emulated MMC device
goldfish: power device
arch/x86/Kconfig | 12 + arch/x86/platform/Makefile | 1 arch/x86/platform/goldfish/Makefile | 1 arch/x86/platform/goldfish/goldfish.c | 51 ++ drivers/input/keyboard/Kconfig | 11 + drivers/input/keyboard/Makefile | 1 drivers/input/keyboard/goldfish_events.c | 187 +++++++++ drivers/mmc/host/Kconfig | 7 drivers/mmc/host/Makefile | 1 drivers/mmc/host/goldfish.c | 566 +++++++++++++++++++++++++++ drivers/mtd/devices/Kconfig | 7 drivers/mtd/devices/Makefile | 3 drivers/mtd/devices/goldfish_nand.c | 444 +++++++++++++++++++++ drivers/mtd/devices/goldfish_nand_reg.h | 72 +++ drivers/platform/Kconfig | 4 drivers/platform/Makefile | 1 drivers/platform/goldfish/Kconfig | 5 drivers/platform/goldfish/Makefile | 5 drivers/platform/goldfish/goldfish_pipe.c | 611 +++++++++++++++++++++++++++++ drivers/platform/goldfish/pdev_bus.c | 240 +++++++++++ drivers/power/Kconfig | 8 drivers/power/Makefile | 1 drivers/power/goldfish_battery.c | 234 +++++++++++ drivers/rtc/Kconfig | 9 drivers/rtc/Makefile | 1 drivers/rtc/rtc-goldfish.c | 140 +++++++ drivers/tty/Kconfig | 6 drivers/tty/Makefile | 1 drivers/tty/goldfish.c | 333 ++++++++++++++++ drivers/video/Kconfig | 9 drivers/video/Makefile | 1 drivers/video/goldfishfb.c | 316 +++++++++++++++ 32 files changed, 3287 insertions(+), 2 deletions(-) create mode 100644 arch/x86/platform/goldfish/Makefile create mode 100644 arch/x86/platform/goldfish/goldfish.c create mode 100644 drivers/input/keyboard/goldfish_events.c create mode 100644 drivers/mmc/host/goldfish.c create mode 100644 drivers/mtd/devices/goldfish_nand.c create mode 100644 drivers/mtd/devices/goldfish_nand_reg.h create mode 100644 drivers/platform/goldfish/Kconfig create mode 100644 drivers/platform/goldfish/Makefile create mode 100644 drivers/platform/goldfish/goldfish_pipe.c create mode 100644 drivers/platform/goldfish/pdev_bus.c create mode 100644 drivers/power/goldfish_battery.c create mode 100644 drivers/rtc/rtc-goldfish.c create mode 100644 drivers/tty/goldfish.c create mode 100644 drivers/video/goldfishfb.c
PATCH 1/10 goldfish: platform device for x86
From: Jun Nakajima <[email protected]>
Based on code by Jun Nakajima but stripped of all the old x86 mach-foo stuff and turned into a single file for the Goldfish virtual bus layer.
The actual created platform device and bus enumeration is portable between the ARM and x86 Goldfish emulations.
[Ported to 3.7 and reorganised so that we can keep most of the code
shared properly]
---
arch/x86/Kconfig | 12 ++++++++ arch/x86/platform/Makefile | 1 + arch/x86/platform/goldfish/Makefile | 1 + arch/x86/platform/goldfish/goldfish.c | 51 +++++++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 arch/x86/platform/goldfish/Makefile create mode 100644 arch/x86/platform/goldfish/goldfish.c
arch/x86/Kconfig +12 -0
@@ -322,6 +322,10 @@ config X86_BIGSMP ---help--- This option is needed for the systems that have more than 8 CPUs +config GOLDFISH + def_bool y + depends on X86_GOLDFISH + if X86_32 config X86_EXTENDED_PLATFORM bool "Support for extended (non-PC) x86 platforms"
@@ -404,6 +408,14 @@ config X86_UV # Following is an alphabetically sorted list of 32 bit extended platforms # Please maintain the alphabetic order if and when there are additions +config X86_GOLDFISH + bool "Goldfish (Virtual Platform)" + depends on X86_32 + ---help--- + Enable support for the Goldfish virtual platform used primarily + for Android development. Unless you are building for the Android + Goldfish emulator say N here. + config X86_INTEL_CE bool "CE4100 TV platform" depends on PCI
arch/x86/platform/Makefile +1 -0
@@ -2,6 +2,7 @@ obj-y += ce4100/ obj-y += efi/ obj-y += geode/ +obj-y += goldfish/ obj-y += iris/ obj-y += mrst/ obj-y += olpc/
arch/x86/platform/goldfish/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_GOLDFISH) += goldfish.o
arch/x86/platform/goldfish/goldfish.c new file +51 -0
51 lines not on this page · raw message
PATCH 2/10 goldfish: add the goldfish virtual bus
In reply to Alan CoxFrom: Jun Nakajima <[email protected]>
This imports the current Google code and cleans it up slightly to use pr_ and to properly request its resources.
Goldfish is an emulator used for Android development. It has a virtual bus where the emulator passes platform device information to the guest which then creates the appropriate devices.
This part of the emulation is not architecture specific so should not be hiding in architecture trees as it does in the Google Android tree. The constants it uses do depend on the platform and the platform creates the bus device which then talks to the emulator to ascertain the actual devices present.
---
drivers/platform/Makefile | 1 drivers/platform/goldfish/Makefile | 4 + drivers/platform/goldfish/pdev_bus.c | 240 ++++++++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 drivers/platform/goldfish/Makefile create mode 100644 drivers/platform/goldfish/pdev_bus.c
drivers/platform/Makefile +1 -0
@@ -4,3 +4,4 @@ obj-$(CONFIG_X86) += x86/ obj-$(CONFIG_OLPC) += olpc/ +obj-$(CONFIG_GOLDFISH) += goldfish/
drivers/platform/goldfish/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +# +# Makefile for Goldfish platform specific drivers +# +obj-$(CONFIG_GOLDFISH) += pdev_bus.o
drivers/platform/goldfish/pdev_bus.c new file +240 -0
240 lines not on this page · raw message
PATCH 3/10 goldfish: tty driver
In reply to Alan CoxFrom: Arve Hjønnevåg <[email protected]>
This provides a console driver for the Goldfish virtual platform. The original is from Arve with changes from Jun Nakajima and Tom Keel. This has been then been ported to the current kernel and to the tty port mechanism by Alan Cox. In the process it gained proper POSIX semantics and vhangup works. The default name is not ttyS as this belongs to the 8250 driver. Instead ttyGFx is now used.
In the normal usage case the first port serves as a kernel logging console and the second one carries various other data streams for the emulation.
---
drivers/tty/Kconfig | 6 + drivers/tty/Makefile | 1 drivers/tty/goldfish.c | 333 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 340 insertions(+) create mode 100644 drivers/tty/goldfish.c
drivers/tty/Kconfig +6 -0
@@ -388,3 +388,9 @@ config PPC_EARLY_DEBUG_EHV_BC_HANDLE If the number you specify is not a valid byte channel handle, then there simply will be no early console output. This is true also if you don't boot under a hypervisor at all. + +config GOLDFISH_TTY + tristate "Goldfish TTY Driver" + depends on GOLDFISH + help + Console and system TTY driver for the Goldfish virtual platform.
drivers/tty/Makefile +1 -0
@@ -27,5 +27,6 @@ obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o obj-$(CONFIG_SYNCLINK) += synclink.o obj-$(CONFIG_PPC_EPAPR_HV_BYTECHAN) += ehv_bytechan.o +obj-$(CONFIG_GOLDFISH_TTY) += goldfish.o obj-y += ipwireless/
drivers/tty/goldfish.c new file +333 -0
333 lines not on this page · raw message
PATCH 4/10 goldfish: virtual input event driver
In reply to Alan CoxFrom: Brian Swetland <[email protected]>
This device is a direct pipe from "hardware" to the input event subsystem, allowing us to avoid having to route "keypad" style events through an AT keyboard driver (gross!)
As with the other submissions this driver is cross architecture.
---
drivers/input/keyboard/Kconfig | 11 ++ drivers/input/keyboard/Makefile | 1 drivers/input/keyboard/goldfish_events.c | 187 ++++++++++++++++++++++++++++++ 3 files changed, 199 insertions(+) create mode 100644 drivers/input/keyboard/goldfish_events.c
drivers/input/keyboard/Kconfig +11 -0
@@ -479,6 +479,17 @@ config KEYBOARD_SAMSUNG To compile this driver as a module, choose M here: the module will be called samsung-keypad. +config KEYBOARD_GOLDFISH_EVENTS + depends on GOLDFISH + tristate "Generic Input Event device for Goldfish" + help + Say Y here to get an input event device for the Goldfish virtual + device emulator. + + To compile this driver as a module, choose M here: the + module will be called goldfish-events. + + config KEYBOARD_STOWAWAY tristate "Stowaway keyboard" select SERIO
drivers/input/keyboard/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o obj-$(CONFIG_KEYBOARD_DAVINCI) += davinci_keyscan.o obj-$(CONFIG_KEYBOARD_EP93XX) += ep93xx_keypad.o +obj-$(CONFIG_KEYBOARD_GOLDFISH_EVENTS) += goldfish_events.o obj-$(CONFIG_KEYBOARD_GPIO) += gpio_keys.o obj-$(CONFIG_KEYBOARD_GPIO_POLLED) += gpio_keys_polled.o obj-$(CONFIG_KEYBOARD_TCA6416) += tca6416-keypad.o
drivers/input/keyboard/goldfish_events.c new file +187 -0
187 lines not on this page · raw message
PATCH 5/10 goldfish: framebuffer
In reply to Alan CoxFrom: Arve Hjønnevåg <[email protected]>
Framebuffer support for the Goldfish emulator. This takes the Google emulator and applies the x86 cleanups as well as moving the blank methods to the usual Linux place and dropping the Android early suspend logic (for now at least, that can be looked at as Android and upstream converge). Dropped various oddities like setting MTRRs on a virtual frame buffer emulation...
With the drivers so far you can now boot a Linux initrd and have fun.
---
drivers/video/Kconfig | 9 + drivers/video/Makefile | 1 drivers/video/goldfishfb.c | 316 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 326 insertions(+) create mode 100644 drivers/video/goldfishfb.c
drivers/video/Kconfig +9 -0
@@ -2183,6 +2183,15 @@ config FB_XILINX framebuffer. ML300 carries a 640*480 LCD display on the board, ML403 uses a standard DB15 VGA connector. +config FB_GOLDFISH + tristate "Goldfish Framebuffer" + depends on FB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Framebuffer driver for Goldfish Virtual Platform + config FB_COBALT tristate "Cobalt server LCD frame buffer support" depends on FB && (MIPS_COBALT || MIPS_SEAD3)
drivers/video/Makefile +1 -0
@@ -98,6 +98,7 @@ obj-$(CONFIG_FB_ATMEL) += atmel_lcdfb.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o +obj-$(CONFIG_FB_GOLDFISH) += goldfishfb.o obj-$(CONFIG_FB_68328) += 68328fb.o obj-$(CONFIG_FB_GBE) += gbefb.o obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o
drivers/video/goldfishfb.c new file +316 -0
316 lines not on this page · raw message
PATCH 6/10 goldfish: emulated MMC device
In reply to Alan CoxFrom: Mike Lockwood <[email protected]>
This driver handles the virtual MMC device present in the Goldfish emulator. The patch folds together initial work from Mike Lockwood and patches by San Mehat, Jun Nakajima and Tom Keel <[email protected]> plus cleanups by Alan Cox to get it all into 3.6 shape.
---
drivers/mmc/host/Kconfig | 7 + drivers/mmc/host/Makefile | 1 drivers/mmc/host/goldfish.c | 566 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 574 insertions(+) create mode 100644 drivers/mmc/host/goldfish.c
drivers/mmc/host/Kconfig +7 -0
@@ -372,6 +372,13 @@ config MMC_DAVINCI If you have an DAVINCI board with a Multimedia Card slot, say Y or M here. If unsure, say N. +config MMC_GOLDFISH + tristate "goldfish qemu Multimedia Card Interface support" + depends on GOLDFISH + help + This selects the Goldfish Multimedia card Interface emulation + found on the Goldfish Android virtual device emulation. + config MMC_SPI tristate "MMC/SD/SDIO over SPI" depends on SPI_MASTER && !HIGHMEM && HAS_DMA
drivers/mmc/host/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o obj-$(CONFIG_MMC_MSM) += msm_sdcc.o obj-$(CONFIG_MMC_MVSDIO) += mvsdio.o obj-$(CONFIG_MMC_DAVINCI) += davinci_mmc.o +obj-$(CONFIG_MMC_GOLDFISH) += goldfish.o obj-$(CONFIG_MMC_SPI) += mmc_spi.o ifeq ($(CONFIG_OF),y) obj-$(CONFIG_MMC_SPI) += of_mmc_spi.o
drivers/mmc/host/goldfish.c new file +566 -0
566 lines not on this page · raw message
PATCH 7/10 goldfish: power device
In reply to Alan CoxFrom: Mike Lockwood <[email protected]>
Add the emulated power driver for the Goldfish platform.
This folds together the code from the Google tree, Jun Nakajima's cleanups and x86 porting work, and then a tidy up to pass checkpatch.
---
drivers/power/Kconfig | 8 + drivers/power/Makefile | 1 drivers/power/goldfish_battery.c | 234 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 242 insertions(+), 1 deletion(-) create mode 100644 drivers/power/goldfish_battery.c
drivers/power/Kconfig +7 -1
@@ -346,8 +346,14 @@ config AB8500_BM help Say Y to include support for AB8500 battery management. -source "drivers/power/reset/Kconfig" +config BATTERY_GOLDFISH + tristate "Goldfish battery driver" + depends on GOLDFISH + help + Say Y to enable support for the battery and AC power in the + Goldfish emulator. +source "drivers/power/reset/Kconfig" endif # POWER_SUPPLY source "drivers/power/avs/Kconfig"
drivers/power/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o obj-$(CONFIG_BATTERY_DS2780) += ds2780_battery.o obj-$(CONFIG_BATTERY_DS2781) += ds2781_battery.o obj-$(CONFIG_BATTERY_DS2782) += ds2782_battery.o +obj-$(CONFIG_BATTERY_GOLDFISH) += goldfish_battery.o obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o
drivers/power/goldfish_battery.c new file +234 -0
234 lines not on this page · raw message
PATCH 8/10 goldfish: real time clock
In reply to Alan CoxFrom: Arve Hjønnevåg <[email protected]>
Gets the current time from the host. Alarms are not supported yet.
---
drivers/rtc/Kconfig | 9 +++ drivers/rtc/Makefile | 1 drivers/rtc/rtc-goldfish.c | 140 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 drivers/rtc/rtc-goldfish.c
drivers/rtc/Kconfig +9 -0
@@ -998,6 +998,15 @@ config RTC_DRV_BFIN This driver can also be built as a module. If so, the module will be called rtc-bfin. +config RTC_DRV_GOLDFISH + tristate "GOLDFISH" + depends on GOLDFISH + help + RTC driver for Goldfish Virtual Platform + + This driver can also be built as a module. If so, the module + will be called rtc-goldfish. + config RTC_DRV_RS5C313 tristate "Ricoh RS5C313" depends on SH_LANDISK
drivers/rtc/Makefile +1 -0
@@ -52,6 +52,7 @@ obj-$(CONFIG_RTC_DRV_EM3027) += rtc-em3027.o obj-$(CONFIG_RTC_DRV_EP93XX) += rtc-ep93xx.o obj-$(CONFIG_RTC_DRV_FM3130) += rtc-fm3130.o obj-$(CONFIG_RTC_DRV_GENERIC) += rtc-generic.o +obj-$(CONFIG_RTC_DRV_GOLDFISH) += rtc-goldfish.o obj-$(CONFIG_RTC_DRV_HID_SENSOR_TIME) += rtc-hid-sensor-time.o obj-$(CONFIG_RTC_DRV_IMXDI) += rtc-imxdi.o obj-$(CONFIG_RTC_DRV_ISL1208) += rtc-isl1208.o
drivers/rtc/rtc-goldfish.c new file +140 -0
140 lines not on this page · raw message
PATCH 9/10 goldfish: add QEMU pipe driver
In reply to Alan CoxFrom: David 'Digit' Turner <[email protected]>
A QEMU pipe is a very fast communication channel between the guest system and the emulator. Usage from the guest is simply something like;
// connect to special device
fd = open("/dev/qemu_pipe", O_RDWR); // tell which service we want to talk to (must be zero-terminated) write(fd, "pipeName", strlen("pipeName")+1);
// do read()/write() through fd now
...
// close channel close(fd);
---
drivers/platform/Kconfig | 4 drivers/platform/goldfish/Kconfig | 5 drivers/platform/goldfish/Makefile | 1 drivers/platform/goldfish/goldfish_pipe.c | 611 +++++++++++++++++++++++++++++ 4 files changed, 621 insertions(+) create mode 100644 drivers/platform/goldfish/Kconfig create mode 100644 drivers/platform/goldfish/goldfish_pipe.c
drivers/platform/Kconfig +4 -0
@@ -1,3 +1,7 @@ if X86 source "drivers/platform/x86/Kconfig" endif +if GOLDFISH +source "drivers/platform/goldfish/Kconfig" +endif +
drivers/platform/goldfish/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config GOLDFISH_PIPE + tristate "Goldfish virtual device for QEMU pipes" + ---help--- + This is a virtual device to drive the QEMU pipe interface used by + the Goldfish Android Virtual Device.
drivers/platform/goldfish/Makefile +1 -0
@@ -2,3 +2,4 @@ # Makefile for Goldfish platform specific drivers # obj-$(CONFIG_GOLDFISH) += pdev_bus.o +obj-$(CONFIG_GOLDFISH_PIPE) += goldfish_pipe.o
drivers/platform/goldfish/goldfish_pipe.c new file +611 -0
611 lines not on this page · raw message
PATCH 10/10 goldfish: NAND flash driver
In reply to Alan CoxFrom: Arve Hjønnevåg <[email protected]>
Fold together the NAND driver for Goldfish from Arve with cleanups by Jun Nakajima and a tidy up to 3.7 and checkpatch.
---
drivers/mtd/devices/Kconfig | 7 drivers/mtd/devices/Makefile | 3 drivers/mtd/devices/goldfish_nand.c | 444 +++++++++++++++++++++++++++++++ drivers/mtd/devices/goldfish_nand_reg.h | 72 +++++ 4 files changed, 525 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/devices/goldfish_nand.c create mode 100644 drivers/mtd/devices/goldfish_nand_reg.h
drivers/mtd/devices/Kconfig +7 -0
@@ -343,4 +343,11 @@ config MTD_DOCPROBE_55AA LinuxBIOS or if you need to recover a DiskOnChip Millennium on which you have managed to wipe the first block. +config MTD_GOLDFISH_NAND + tristate "Goldfish NAND device" + depends on GOLDFISH + help + Drives the emulated NAND flash device on the Google Goldfish + Android virtual device. + endmenu
drivers/mtd/devices/Makefile +2 -1
@@ -20,5 +20,6 @@ obj-$(CONFIG_MTD_M25P80) += m25p80.o obj-$(CONFIG_MTD_SPEAR_SMI) += spear_smi.o obj-$(CONFIG_MTD_SST25L) += sst25l.o obj-$(CONFIG_MTD_BCM47XXSFLASH) += bcm47xxsflash.o +obj-$(CONFIG_MTD_GOLDFISH_NAND) += goldfish_nand.o -CFLAGS_docg3.o += -I$(src) +CFLAGS_docg3.o += -I$(src)
drivers/mtd/devices/goldfish_nand.c new file +444 -0
444 lines not on this page · raw message
drivers/mtd/devices/goldfish_nand_reg.h new file +72 -0
72 lines not on this page · raw message