hw: Remove "hw/devices.h"
Subsystems (4)
cover hw: Remove "hw/devices.h"
Hi,
As the first comment describes, the "hw/devices.h" contains declarations for "Devices that have nowhere better to go."
This series remove it, creating new headers for devices covered there. MAINTAINERS is updated.
I also included 2 cleanups while working on this, in "qemu/typedefs.h" and "hw/net/ne2000-isa.h" header guard.
Please review.
Phil.
Philippe Mathieu-Daudé (16):
hw/arm/aspeed: Use TYPE_TMP105/TYPE_PCA9552 instead of hardcoded
string
hw: Remove unused 'hw/devices.h' include
hw/devices: Remove unused TC6393XB_RAM definition hw/devices: Move TC6393XB declarations into a new header hw/devices: Move Blizzard declarations into a new header hw/devices: Move CBus declarations into a new header hw/devices: Move Gamepad declarations into a new header
MAINTAINERS: Add missing entries for the TI touchscreen devices hw/devices: Move TI touchscreen declarations into a new header
typedefs: Remove MouseTransformInfo
typedefs: Remove PS2State
hw/devices: Move LAN9118 declarations into a new header hw/net/ne2000-isa: Add guards to the header hw/net/lan9118: Export TYPE_LAN9118 and use it instead of hardcoded
string
hw/devices: Move SMSC 91C111 declaration into a new header RFC hw/net/smc91c111: Convert init helper into an inline function
MAINTAINERS | 8 +++ hw/alpha/typhoon.c | 1 - hw/arm/allwinner-a10.c | 1 - hw/arm/aspeed.c | 13 +++-- hw/arm/collie.c | 1 - hw/arm/cubieboard.c | 1 - hw/arm/exynos4_boards.c | 3 +- hw/arm/gumstix.c | 2 +- hw/arm/highbank.c | 1 - hw/arm/integratorcp.c | 2 +- hw/arm/kzm.c | 2 +- hw/arm/mainstone.c | 2 +- hw/arm/mps2-tz.c | 4 +- hw/arm/mps2.c | 2 +- hw/arm/musicpal.c | 1 - hw/arm/nrf51_soc.c | 1 - hw/arm/nseries.c | 4 +- hw/arm/palm.c | 2 +- hw/arm/realview.c | 3 +- hw/arm/spitz.c | 1 - hw/arm/stellaris.c | 2 +- hw/arm/tosa.c | 2 +- hw/arm/versatilepb.c | 2 +- hw/arm/vexpress.c | 2 +- hw/arm/virt.c | 1 - hw/arm/z2.c | 1 - hw/display/blizzard.c | 2 +- hw/display/sm501.c | 1 - hw/display/tc6393xb.c | 2 +- hw/hppa/dino.c | 1 - hw/input/stellaris_input.c | 2 +- hw/input/tsc2005.c | 2 +- hw/input/tsc210x.c | 4 +- hw/intc/allwinner-a10-pic.c | 1 - hw/lm32/lm32_boards.c | 1 - hw/lm32/milkymist.c | 1 - hw/microblaze/petalogix_ml605_mmu.c | 1 - hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 - hw/misc/cbus.c | 2 +- hw/net/dp8393x.c | 1 - hw/net/lan9118.c | 3 +- hw/net/smc91c111.c | 19 +------- hw/ppc/virtex_ml507.c | 1 - hw/sh4/r2d.c | 1 - hw/tricore/tricore_testboard.c | 1 - hw/usb/tusb6010.c | 1 - include/hw/arm/omap.h | 6 +-- include/hw/devices.h | 62 ------------------------ include/hw/display/blizzard.h | 21 ++++++++ include/hw/display/tc6393xb.h | 25 ++++++++++ include/hw/input/gamepad.h | 11 +++++ include/hw/input/ps2.h | 2 + include/hw/input/ti_uwire_tsc.h | 28 +++++++++++ include/hw/misc/cbus.h | 31 ++++++++++++ include/hw/net/lan9118.h | 23 +++++++++ include/hw/net/ne2000-isa.h | 6 +++ include/hw/net/smc91c111.h | 41 ++++++++++++++++ include/qemu/typedefs.h | 3 -- include/ui/console.h | 4 +- 59 files changed, 236 insertions(+), 140 deletions(-) delete mode 100644 include/hw/devices.h create mode 100644 include/hw/display/blizzard.h create mode 100644 include/hw/display/tc6393xb.h create mode 100644 include/hw/input/gamepad.h create mode 100644 include/hw/input/ti_uwire_tsc.h create mode 100644 include/hw/misc/cbus.h create mode 100644 include/hw/net/lan9118.h create mode 100644 include/hw/net/smc91c111.h
Signature · 1 line
2.17.2
PATCH 1/16 hw/arm/aspeed: Use TYPE_TMP105/TYPE_PCA9552 instead of hardcoded string
--- hw/arm/aspeed.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
hw/arm/aspeed.c +9 -4
@@ -19,6 +19,8 @@#include "hw/arm/aspeed_soc.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" +#include "hw/misc/pca9552.h" +#include "hw/misc/tmp105.h" #include "qemu/log.h" #include "sysemu/block-backend.h" #include "hw/loader.h"
@@ -267,7 +269,8 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bmc) eeprom_buf);/* The AST2500 EVB expects a LM75 but a TMP105 is compatible */ -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),7 ),"tmp105" ,0x4d ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),7 ),TYPE_TMP105 , +0x4d );/* The AST2500 EVB does not have an RTC. Let's pretend that one is * plugged on the I2C bus header */
@@ -288,13 +291,15 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)AspeedSoCState *soc = &bmc->soc;uint8_t *eeprom_buf =g_malloc0 (8 *1024 ); -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),3 ),"pca9552" ,0x60 ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),3 ),TYPE_PCA9552 , +0x60 );i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),4 ),"tmp423" ,0x4c );i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),5 ),"tmp423" ,0x4c );/* The Witherspoon expects a TMP275 but a TMP105 is compatible */ -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),9 ),"tmp105" ,0x4a ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),9 ),TYPE_TMP105 , +0x4a );/* The witherspoon board expects Epson RX8900 I2C RTC but a ds1338 is * good enough */
@@ -302,7 +307,7 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)smbus_eeprom_init_one (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),0x51 , eeprom_buf); -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),"pca9552" , +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),TYPE_PCA9552 ,0x60 ); }
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 01/16] hw/arm/aspeed: Use TYPE_TMP105/TYPE_PCA9552 instead of hardcoded string
Quoted 48 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/arm/aspeed.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)hw/arm/aspeed.c +8
-3@@ -19,6 +19,8 @@#include "hw/arm/aspeed_soc.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" +#include "hw/misc/pca9552.h" +#include "hw/misc/tmp105.h" #include "qemu/log.h" #include "sysemu/block-backend.h" #include "hw/loader.h" @@ -267,7 +269,8 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bmc) eeprom_buf);/* The AST2500 EVB expects a LM75 but a TMP105 is compatible */ -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),7 ),"tmp105" ,0x4d ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),7 ),TYPE_TMP105 , +0x4d );/* The AST2500 EVB does not have an RTC. Let's pretend that one is * plugged on the I2C bus header */ @@ -288,13 +291,15 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)AspeedSoCState *soc = &bmc->soc;uint8_t *eeprom_buf =g_malloc0 (8 *1024 ); -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),3 ),"pca9552" ,0x60 ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),3 ),TYPE_PCA9552 , +0x60 );i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),4 ),"tmp423" ,0x4c );i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),5 ),"tmp423" ,0x4c );/* The Witherspoon expects a TMP275 but a TMP105 is compatible */ -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),9 ),"tmp105" ,0x4a ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),9 ),TYPE_TMP105 , +0x4a );/* The witherspoon board expects Epson RX8900 I2C RTC but a ds1338 is * good enough */
hw/arm/aspeed.c static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc) · line 313
Quoted 8 lines
hw/arm/aspeed.c +1
-1@@ -302,7 +307,7 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)smbus_eeprom_init_one (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),0x51 , eeprom_buf); -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),"pca9552" , +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),TYPE_PCA9552 ,0x60 ); }
Re: [Qemu-arm] [PATCH 01/16] hw/arm/aspeed: Use TYPE_TMP105/TYPE_PCA9552 instead of hardcoded string
In reply to Philippe Mathieu-DaudéQuoted 1 line · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Thanks,
C.
Quoted 55 lines
--- hw/arm/aspeed.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)hw/arm/aspeed.c +9
-4@@ -19,6 +19,8 @@#include "hw/arm/aspeed_soc.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" +#include "hw/misc/pca9552.h" +#include "hw/misc/tmp105.h" #include "qemu/log.h" #include "sysemu/block-backend.h" #include "hw/loader.h" @@ -267,7 +269,8 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bmc) eeprom_buf);/* The AST2500 EVB expects a LM75 but a TMP105 is compatible */ -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),7 ),"tmp105" ,0x4d ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),7 ),TYPE_TMP105 , +0x4d );/* The AST2500 EVB does not have an RTC. Let's pretend that one is * plugged on the I2C bus header */ @@ -288,13 +291,15 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)AspeedSoCState *soc = &bmc->soc;uint8_t *eeprom_buf =g_malloc0 (8 *1024 ); -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),3 ),"pca9552" ,0x60 ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),3 ),TYPE_PCA9552 , +0x60 );i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),4 ),"tmp423" ,0x4c );i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),5 ),"tmp423" ,0x4c );/* The Witherspoon expects a TMP275 but a TMP105 is compatible */ -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),9 ),"tmp105" ,0x4a ); +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),9 ),TYPE_TMP105 , +0x4a );/* The witherspoon board expects Epson RX8900 I2C RTC but a ds1338 is * good enough */ @@ -302,7 +307,7 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState *bmc)smbus_eeprom_init_one (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),0x51 , eeprom_buf); -i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),"pca9552" , +i2c_create_slave (aspeed_i2c_get_bus (DEVICE (&soc->i2c),11 ),TYPE_PCA9552 ,0x60 ); }
PATCH 2/16 hw: Remove unused 'hw/devices.h' include
In reply to Philippe Mathieu-Daudé--- hw/alpha/typhoon.c | 1 - hw/arm/allwinner-a10.c | 1 - hw/arm/collie.c | 1 - hw/arm/cubieboard.c | 1 - hw/arm/highbank.c | 1 - hw/arm/mps2-tz.c | 1 - hw/arm/musicpal.c | 1 - hw/arm/nrf51_soc.c | 1 - hw/arm/spitz.c | 1 - hw/arm/virt.c | 1 - hw/arm/z2.c | 1 - hw/display/sm501.c | 1 - hw/hppa/dino.c | 1 - hw/intc/allwinner-a10-pic.c | 1 - hw/lm32/lm32_boards.c | 1 - hw/lm32/milkymist.c | 1 - hw/microblaze/petalogix_ml605_mmu.c | 1 - hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 - hw/net/dp8393x.c | 1 - hw/ppc/virtex_ml507.c | 1 - hw/sh4/r2d.c | 1 - hw/tricore/tricore_testboard.c | 1 - hw/usb/tusb6010.c | 1 - 23 files changed, 23 deletions(-)
hw/alpha/typhoon.c +0 -1
@@ -11,7 +11,6 @@#include "qapi/error.h" #include "cpu.h" #include "hw/hw.h" -#include "hw/devices.h" #include "sysemu/sysemu.h" #include "alpha_sys.h" #include "exec/address-spaces.h"
hw/arm/allwinner-a10.c +0 -1
@@ -20,7 +20,6 @@#include "qemu-common.h" #include "cpu.h" #include "hw/sysbus.h" -#include "hw/devices.h" #include "hw/arm/allwinner-a10.h" static void aw_a10_init (Object *obj)
hw/arm/collie.c +0 -1
@@ -12,7 +12,6 @@#include "hw/hw.h" #include "hw/sysbus.h" #include "hw/boards.h" -#include "hw/devices.h" #include "strongarm.h" #include "hw/arm/arm.h" #include "hw/block/flash.h"
hw/arm/cubieboard.c +0 -1
@@ -20,7 +20,6 @@#include "qemu-common.h" #include "cpu.h" #include "hw/sysbus.h" -#include "hw/devices.h" #include "hw/boards.h" #include "hw/arm/allwinner-a10.h"
hw/arm/highbank.c +0 -1
@@ -21,7 +21,6 @@#include "qapi/error.h" #include "hw/sysbus.h" #include "hw/arm/arm.h" -#include "hw/devices.h" #include "hw/loader.h" #include "net/net.h" #include "sysemu/kvm.h"
hw/arm/mps2-tz.c +0 -1
@@ -49,7 +49,6 @@#include "hw/arm/iotkit.h" #include "hw/dma/pl080.h" #include "hw/ssi/pl022.h" -#include "hw/devices.h" #include "net/net.h" #include "hw/core/split-irq.h"
hw/arm/musicpal.c +0 -1
@@ -15,7 +15,6 @@#include "cpu.h" #include "hw/sysbus.h" #include "hw/arm/arm.h" -#include "hw/devices.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h"
hw/arm/nrf51_soc.c +0 -1
@@ -14,7 +14,6 @@#include "hw/arm/arm.h" #include "hw/sysbus.h" #include "hw/boards.h" -#include "hw/devices.h" #include "hw/misc/unimp.h" #include "exec/address-spaces.h" #include "sysemu/sysemu.h"
hw/arm/spitz.c +0 -1
@@ -21,7 +21,6 @@#include "hw/ssi/ssi.h" #include "hw/block/flash.h" #include "qemu/timer.h" -#include "hw/devices.h" #include "hw/arm/sharpsl.h" #include "ui/console.h" #include "hw/audio/wm8750.h"
hw/arm/virt.c +0 -1
@@ -37,7 +37,6 @@#include "hw/vfio/vfio-calxeda-xgmac.h" #include "hw/vfio/vfio-amd-xgbe.h" #include "hw/display/ramfb.h" -#include "hw/devices.h" #include "net/net.h" #include "sysemu/device_tree.h" #include "sysemu/numa.h"
hw/arm/z2.c +0 -1
@@ -15,7 +15,6 @@#include "hw/hw.h" #include "hw/arm/pxa.h" #include "hw/arm/arm.h" -#include "hw/devices.h" #include "hw/i2c/i2c.h" #include "hw/ssi/ssi.h" #include "hw/boards.h"
hw/display/sm501.c +0 -1
@@ -32,7 +32,6 @@#include "hw/hw.h" #include "hw/char/serial.h" #include "ui/console.h" -#include "hw/devices.h" #include "hw/sysbus.h" #include "hw/pci/pci.h" #include "hw/i2c/i2c.h"
hw/hppa/dino.c +0 -1
@@ -15,7 +15,6 @@#include "qapi/error.h" #include "cpu.h" #include "hw/hw.h" -#include "hw/devices.h" #include "sysemu/sysemu.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bus.h"
hw/intc/allwinner-a10-pic.c +0 -1
@@ -17,7 +17,6 @@#include "qemu/osdep.h" #include "hw/sysbus.h" -#include "hw/devices.h" #include "sysemu/sysemu.h" #include "hw/intc/allwinner-a10-pic.h" #include "qemu/log.h"
hw/lm32/lm32_boards.c +0 -1
@@ -25,7 +25,6 @@#include "hw/sysbus.h" #include "hw/hw.h" #include "hw/block/flash.h" -#include "hw/devices.h" #include "hw/boards.h" #include "hw/loader.h" #include "elf.h"
hw/lm32/milkymist.c +0 -1
@@ -27,7 +27,6 @@#include "hw/block/flash.h" #include "sysemu/sysemu.h" #include "sysemu/qtest.h" -#include "hw/devices.h" #include "hw/boards.h" #include "hw/loader.h" #include "elf.h"
hw/microblaze/petalogix_ml605_mmu.c +0 -1
@@ -35,7 +35,6 @@#include "net/net.h" #include "hw/block/flash.h" #include "sysemu/sysemu.h" -#include "hw/devices.h" #include "hw/boards.h" #include "hw/char/serial.h" #include "exec/address-spaces.h"
hw/microblaze/petalogix_s3adsp1800_mmu.c +0 -1
@@ -33,7 +33,6 @@#include "net/net.h" #include "hw/block/flash.h" #include "sysemu/sysemu.h" -#include "hw/devices.h" #include "hw/boards.h" #include "exec/address-spaces.h" #include "hw/char/xilinx_uartlite.h"
hw/net/dp8393x.c +0 -1
@@ -19,7 +19,6 @@#include "qemu/osdep.h" #include "hw/sysbus.h" -#include "hw/devices.h" #include "net/net.h" #include "qapi/error.h" #include "qemu/timer.h"
hw/ppc/virtex_ml507.c +0 -1
@@ -31,7 +31,6 @@#include "hw/block/flash.h" #include "sysemu/sysemu.h" #include "sysemu/qtest.h" -#include "hw/devices.h" #include "hw/boards.h" #include "sysemu/device_tree.h" #include "hw/loader.h"
hw/sh4/r2d.c +0 -1
@@ -31,7 +31,6 @@#include "hw/sysbus.h" #include "hw/hw.h" #include "hw/sh4/sh.h" -#include "hw/devices.h" #include "sysemu/sysemu.h" #include "hw/boards.h" #include "hw/pci/pci.h"
hw/tricore/tricore_testboard.c +0 -1
@@ -24,7 +24,6 @@#include "qemu-common.h" #include "cpu.h" #include "hw/hw.h" -#include "hw/devices.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/boards.h"
hw/usb/tusb6010.c +0 -1
@@ -24,7 +24,6 @@#include "hw/usb.h" #include "hw/arm/omap.h" #include "hw/irq.h" -#include "hw/devices.h" #include "hw/sysbus.h" #define TYPE_TUSB6010 "tusb6010"
Signature · 1 line
2.17.2
Re: [Qemu-devel] [Qemu-ppc] [PATCH 02/16] hw: Remove unused 'hw/devices.h' include
hw/display/sm501.c line 37
Quoted 12 lines · Philippe Mathieu-Daudé
hw/display/sm501.c +0
-1@@ -32,7 +32,6 @@#include "hw/hw.h" #include "hw/char/serial.h" #include "ui/console.h" -#include "hw/devices.h" #include "hw/sysbus.h" #include "hw/pci/pci.h" #include "hw/i2c/i2c.h"
Looks like I forgot to drop this include in ca8a110470
Re: [Qemu-arm] [Qemu-devel] [PATCH 02/16] hw: Remove unused 'hw/devices.h' include
In reply to Philippe Mathieu-DaudéQuoted 18 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/alpha/typhoon.c | 1 - hw/arm/allwinner-a10.c | 1 - hw/arm/collie.c | 1 - hw/arm/cubieboard.c | 1 - hw/arm/highbank.c | 1 - hw/arm/mps2-tz.c | 1 - hw/arm/musicpal.c | 1 - hw/arm/nrf51_soc.c | 1 - hw/arm/spitz.c | 1 - hw/arm/virt.c | 1 - hw/arm/z2.c | 1 - hw/display/sm501.c | 1 - hw/hppa/dino.c | 1 - hw/intc/allwinner-a10-pic.c | 1 - hw/lm32/lm32_boards.c | 1 - hw/lm32/milkymist.c | 1 -
Quoted 8 lines
hw/microblaze/petalogix_ml605_mmu.c | 1 - hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 - hw/net/dp8393x.c | 1 - hw/ppc/virtex_ml507.c | 1 - hw/sh4/r2d.c | 1 - hw/tricore/tricore_testboard.c | 1 - hw/usb/tusb6010.c | 1 - 23 files changed, 23 deletions(-)
Works for me.
PATCH 3/16 hw/devices: Remove unused TC6393XB_RAM definition
In reply to Philippe Mathieu-DaudéIntroduced in 64b40bc54a9, this definition is no more used since a0b753dfd39. Remove it.
--- include/hw/devices.h | 1 - 1 file changed, 1 deletion(-)
include/hw/devices.h +0 -1
@@ -51,7 +51,6 @@ void retu_key_event(void *retu, int state);/* tc6393xb.c */ typedef struct TC6393xbState TC6393xbState ; -#define TC6393XB_RAM 0x110000/* amount of ram for Video and USB */ TC6393xbState *tc6393xb_init (struct MemoryRegion *sysmem,uint32_t base,qemu_irq irq); void tc6393xb_gpio_out_set(TC6393xbState *s, int line,
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 03/16] hw/devices: Remove unused TC6393XB_RAM definition
Quoted 14 lines · Philippe Mathieu-Daudé
Introduced in
64b40bc54a9, this definition is no more used sincea0b753dfd39. Remove it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/devices.h | 1 - 1 file changed, 1 deletion(-)include/hw/devices.h +0
-0
include/hw/devices.h void retu_key_event(void *retu, int state); · line 56
Quoted 7 lines
include/hw/devices.h +0
-1@@ -51,7 +51,6 @@ void retu_key_event(void *retu, int state);/* tc6393xb.c */ typedef struct TC6393xbState TC6393xbState ; -#define TC6393XB_RAM 0x110000/* amount of ram for Video and USB */ TC6393xbState *tc6393xb_init (struct MemoryRegion *sysmem,uint32_t base,qemu_irq irq); void tc6393xb_gpio_out_set(TC6393xbState *s, int line,
I think I'd simply squash this into the next patch and mention it in the patch description there that you removed the #define.
Thomas
Re: [Qemu-arm] [PATCH 03/16] hw/devices: Remove unused TC6393XB_RAM definition
Quoted 15 lines · Thomas Huth
Quoted 14 lines · Philippe Mathieu-Daudé
Introduced in
64b40bc54a9, this definition is no more used sincea0b753dfd39. Remove it.Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/devices.h | 1 - 1 file changed, 1 deletion(-)include/hw/devices.h +0
-0@@ -51,7 +51,6 @@ void retu_key_event(void *retu, int state);
Quoted 10 lines
include/hw/devices.h void retu_key_event(void *retu, int state); · line 56
Quoted 7 lines
include/hw/devices.h +0
-1/* tc6393xb.c */ typedef struct TC6393xbState TC6393xbState ; -#define TC6393XB_RAM 0x110000/* amount of ram for Video and USB */ TC6393xbState *tc6393xb_init (struct MemoryRegion *sysmem,uint32_t base,qemu_irq irq); void tc6393xb_gpio_out_set(TC6393xbState *s, int line,I think I'd simply squash this into the next patch and mention it in the patch description there that you removed the #define.
OK.
PATCH 4/16 hw/devices: Move TC6393XB declarations into a new header
In reply to Philippe Mathieu-Daudé--- MAINTAINERS | 1 + hw/arm/tosa.c | 2 +- hw/display/tc6393xb.c | 2 +- include/hw/devices.h | 9 --------- include/hw/display/tc6393xb.h | 25 +++++++++++++++++++++++++ 5 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 include/hw/display/tc6393xb.h
MAINTAINERS +1 -0
@@ -685,6 +685,7 @@ F: hw/gpio/zaurus.c F: hw/misc/mst_fpga.c F: include/hw/arm/pxa.h F: include/hw/arm/sharpsl.h +F: include/hw/display/tc6393xb.h SABRELITE / i.MX6 M: Peter Maydell <[email protected]>
hw/arm/tosa.c +1 -1
@@ -16,10 +16,10 @@#include "hw/hw.h" #include "hw/arm/pxa.h" #include "hw/arm/arm.h" -#include "hw/devices.h" #include "hw/arm/sharpsl.h" #include "hw/pcmcia.h" #include "hw/boards.h" +#include "hw/display/tc6393xb.h" #include "hw/i2c/i2c.h" #include "hw/ssi/ssi.h" #include "hw/sysbus.h"
hw/display/tc6393xb.c +1 -1
@@ -14,7 +14,7 @@#include "qapi/error.h" #include "qemu/host-utils.h" #include "hw/hw.h" -#include "hw/devices.h" +#include "hw/display/tc6393xb.h" #include "hw/block/flash.h" #include "ui/console.h" #include "ui/pixel_ops.h"
include/hw/devices.h +0 -9
@@ -49,13 +49,4 @@ void *tahvo_init(qemu_irq irq, int betty);void retu_key_event (void *retu,int state); -/* tc6393xb.c */ -typedef struct TC6393xbState TC6393xbState ; -TC6393xbState *tc6393xb_init (struct MemoryRegion *sysmem, -uint32_t base,qemu_irq irq); -void tc6393xb_gpio_out_set (TC6393xbState *s,int line, -qemu_irq handler); -qemu_irq *tc6393xb_gpio_in_get (TC6393xbState *s); -qemu_irq tc6393xb_l3v_get (TC6393xbState *s); -#endif
include/hw/display/tc6393xb.h new file +25 -0
@@ -0,0 +1,25 @@ +/* +* Toshiba TC6393XB I/O Controller. +* Found in Sharp Zaurus SL-6000 (tosa) or some +* Toshiba e-Series PDAs. +* +* Copyright (c) 2007 Hervé Poussineau +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_DISPLAY_TC6393XB_H +#define HW_DISPLAY_TC6393XB_H + +#include "exec/memory.h" +#include "hw/irq.h" + +typedef struct TC6393xbState TC6393xbState ; + +TC6393xbState *tc6393xb_init (struct MemoryRegion *sysmem, +uint32_t base,qemu_irq irq); +void tc6393xb_gpio_out_set (TC6393xbState *s,int line,qemu_irq handler); +qemu_irq *tc6393xb_gpio_in_get (TC6393xbState *s); +qemu_irq tc6393xb_l3v_get (TC6393xbState *s); + +#endif
Signature · 1 line
2.17.2
PATCH 5/16 hw/devices: Move Blizzard declarations into a new header
In reply to Philippe Mathieu-Daudé--- MAINTAINERS | 1 + hw/arm/nseries.c | 1 + hw/display/blizzard.c | 2 +- include/hw/devices.h | 7 ------- include/hw/display/blizzard.h | 21 +++++++++++++++++++++ 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 include/hw/display/blizzard.h
MAINTAINERS +1 -0
@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: include/hw/display/blizzard.h Palm M: Andrzej Zaborowski <[email protected]>
hw/arm/nseries.c +1 -0
@@ -31,6 +31,7 @@#include "hw/boards.h" #include "hw/i2c/i2c.h" #include "hw/devices.h" +#include "hw/display/blizzard.h" #include "hw/block/flash.h" #include "hw/hw.h" #include "hw/bt.h"
hw/display/blizzard.c +1 -1
@@ -21,7 +21,7 @@#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h" -#include "hw/devices.h" +#include "hw/display/blizzard.h" #include "ui/pixel_ops.h" typedef void (*blizzard_fn_t )(uint8_t *,const uint8_t *,unsigned int );
include/hw/devices.h +0 -7
@@ -28,13 +28,6 @@ void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);/* stellaris_input.c */ void stellaris_gamepad_init (int n,qemu_irq *irq,const int *keycode); -/* blizzard.c */ -void *s1d13745_init (qemu_irq gpio_int); -void s1d13745_write (void *opaque,int dc,uint16_t value); -void s1d13745_write_block (void *opaque,int dc, -void *buf,size_t len,int pitch); -uint16_t s1d13745_read (void *opaque,int dc); -/* cbus.c */ typedef struct { qemu_irq clk;
include/hw/display/blizzard.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* Epson S1D13744/S1D13745 (Blizzard/Hailstorm/Tornado) LCD/TV controller. +* +* Copyright (C) 2008 Nokia Corporation +* Written by Andrzej Zaborowski <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_DISPLAY_BLIZZARD_H +#define HW_DISPLAY_BLIZZARD_H + +#include "hw/irq.h" + +void *s1d13745_init (qemu_irq gpio_int); +void s1d13745_write (void *opaque,int dc,uint16_t value); +void s1d13745_write_block (void *opaque,int dc, +void *buf,size_t len,int pitch); +uint16_t s1d13745_read (void *opaque,int dc); + +#endif
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 05/16] hw/devices: Move Blizzard declarations into a new header
Quoted 15 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 1 + hw/arm/nseries.c | 1 + hw/display/blizzard.c | 2 +- include/hw/devices.h | 7 ------- include/hw/display/blizzard.h | 21 +++++++++++++++++++++ 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 include/hw/display/blizzard.hMAINTAINERS +0
-0
MAINTAINERS M: Peter Maydell <[email protected]> · line 643
Quoted 4 lines
MAINTAINERS +1
-0@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: include/hw/display/blizzard.h
While you're at it, also add an entry for hw/display/blizzard.c here?
Quoted 51 lines
MAINTAINERS +0
-0Palm M: Andrzej Zaborowski <[email protected]>hw/arm/nseries.c +1
-0@@ -31,6 +31,7 @@#include "hw/boards.h" #include "hw/i2c/i2c.h" #include "hw/devices.h" +#include "hw/display/blizzard.h" #include "hw/block/flash.h" #include "hw/hw.h" #include "hw/bt.h" hw/display/blizzard.c +1
-1@@ -21,7 +21,7 @@#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h" -#include "hw/devices.h" +#include "hw/display/blizzard.h" #include "ui/pixel_ops.h" typedef void (*blizzard_fn_t )(uint8_t *,const uint8_t *,unsigned int );include/hw/devices.h +0
-7@@ -28,13 +28,6 @@ void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);/* stellaris_input.c */ void stellaris_gamepad_init (int n,qemu_irq *irq,const int *keycode); -/* blizzard.c */ -void *s1d13745_init (qemu_irq gpio_int); -void s1d13745_write (void *opaque,int dc,uint16_t value); -void s1d13745_write_block (void *opaque,int dc, -void *buf,size_t len,int pitch); -uint16_t s1d13745_read (void *opaque,int dc); -/* cbus.c */ typedef struct { qemu_irq clk;include/hw/display/blizzard.h new file +0
-0
include/hw/display/blizzard.h line 5
Quoted 5 lines
include/hw/display/blizzard.h new file +5
-0@@ -0,0 +1,21 @@ +/* +* Epson S1D13744/S1D13745 (Blizzard/Hailstorm/Tornado) LCD/TV controller. +* +* Copyright (C) 2008 Nokia Corporation +* Written by Andrzej Zaborowski <[email protected]>
I don't think that this e-mail address is still valid since that company has been bought up > 10 years ago... so it likely does not make sense to mention it in new files anymore. So just mention the name?
Quoted 6 lines
include/hw/display/blizzard.h new file +5
-0+* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_DISPLAY_BLIZZARD_H +#define HW_DISPLAY_BLIZZARD_H
include/hw/display/blizzard.h line 21
Quoted 10 lines
include/hw/display/blizzard.h new file +10
-0+ +#include "hw/irq.h" + +void *s1d13745_init (qemu_irq gpio_int); +void s1d13745_write (void *opaque,int dc,uint16_t value); +void s1d13745_write_block (void *opaque,int dc, +void *buf,size_t len,int pitch); +uint16_t s1d13745_read (void *opaque,int dc); + +#endif
Re: [Qemu-devel] [PATCH 05/16] hw/devices: Move Blizzard declarations into a new header
Quoted 11 lines · Thomas Huth
Quoted 10 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 1 + hw/arm/nseries.c | 1 + hw/display/blizzard.c | 2 +- include/hw/devices.h | 7 ------- include/hw/display/blizzard.h | 21 +++++++++++++++++++++ 5 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 include/hw/display/blizzard.h
Quoted 11 lines
MAINTAINERS M: Peter Maydell <[email protected]> · line 643
Quoted 9 lines
MAINTAINERS +1
-0@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: include/hw/display/blizzard.hWhile you're at it, also add an entry for
hw/display/blizzard.chere?
Good idea :)
Quoted 53 lines
Quoted 53 lines
MAINTAINERS +0
-0Palm M: Andrzej Zaborowski <[email protected]>hw/arm/nseries.c +1
-0@@ -31,6 +31,7 @@#include "hw/boards.h" #include "hw/i2c/i2c.h" #include "hw/devices.h" +#include "hw/display/blizzard.h" #include "hw/block/flash.h" #include "hw/hw.h" #include "hw/bt.h" hw/display/blizzard.c +1
-1@@ -21,7 +21,7 @@#include "qemu/osdep.h" #include "qemu-common.h" #include "ui/console.h" -#include "hw/devices.h" +#include "hw/display/blizzard.h" #include "ui/pixel_ops.h" typedef void (*blizzard_fn_t )(uint8_t *,const uint8_t *,unsigned int );include/hw/devices.h +0
-7@@ -28,13 +28,6 @@ void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);/* stellaris_input.c */ void stellaris_gamepad_init (int n,qemu_irq *irq,const int *keycode); -/* blizzard.c */ -void *s1d13745_init (qemu_irq gpio_int); -void s1d13745_write (void *opaque,int dc,uint16_t value); -void s1d13745_write_block (void *opaque,int dc, -void *buf,size_t len,int pitch); -uint16_t s1d13745_read (void *opaque,int dc); -/* cbus.c */ typedef struct { qemu_irq clk;include/hw/display/blizzard.h new file +1
-0@@ -0,0 +1,21 @@ +/*
Quoted 8 lines
include/hw/display/blizzard.h line 5
Quoted 4 lines
include/hw/display/blizzard.h new file +4
-0+* Epson S1D13744/S1D13745 (Blizzard/Hailstorm/Tornado) LCD/TV controller. +* +* Copyright (C) 2008 Nokia Corporation +* Written by Andrzej Zaborowski <[email protected]> I don't think that this e-mail address is still valid since that company has been bought up > 10 years ago... so it likely does not make sense to mention it in new files anymore. So just mention the name?
Sure, I had no idea.
TIL: check email domain when moving emails.
Quoted 10 lines
Quoted 10 lines
include/hw/display/blizzard.h new file +10
-0+* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_DISPLAY_BLIZZARD_H +#define HW_DISPLAY_BLIZZARD_H + +#include "hw/irq.h" + +void *s1d13745_init (qemu_irq gpio_int); +void s1d13745_write (void *opaque,int dc,uint16_t value);
Quoted 8 lines
include/hw/display/blizzard.h line 21
Quoted 6 lines
include/hw/display/blizzard.h new file +5
-0+void s1d13745_write_block (void *opaque,int dc, +void *buf,size_t len,int pitch); +uint16_t s1d13745_read (void *opaque,int dc); + +#endif Reviewed-by Thomas Huth <[email protected]>
Thanks!
PATCH 6/16 hw/devices: Move CBus declarations into a new header
In reply to Philippe Mathieu-Daudé--- MAINTAINERS | 1 + hw/arm/nseries.c | 1 + hw/misc/cbus.c | 2 +- include/hw/devices.h | 14 -------------- include/hw/misc/cbus.h | 31 +++++++++++++++++++++++++++++++ 5 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 include/hw/misc/cbus.h
MAINTAINERS +1 -0
@@ -641,6 +641,7 @@ L: [email protected] S: Odd Fixes F: hw/arm/nseries.c F: include/hw/display/blizzard.h +F: include/hw/misc/cbus.h Palm M: Andrzej Zaborowski <[email protected]>
hw/arm/nseries.c +1 -0
@@ -32,6 +32,7 @@#include "hw/i2c/i2c.h" #include "hw/devices.h" #include "hw/display/blizzard.h" +#include "hw/misc/cbus.h" #include "hw/block/flash.h" #include "hw/hw.h" #include "hw/bt.h"
hw/misc/cbus.c +1 -1
@@ -23,7 +23,7 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/irq.h" -#include "hw/devices.h" +#include "hw/misc/cbus.h" #include "sysemu/sysemu.h" //#define DEBUG
include/hw/devices.h +0 -14
@@ -28,18 +28,4 @@ void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);/* stellaris_input.c */ void stellaris_gamepad_init (int n,qemu_irq *irq,const int *keycode); -/* cbus.c */ -typedef struct { -qemu_irq clk; -qemu_irq dat; -qemu_irq sel; -}CBus ; -CBus *cbus_init (qemu_irq dat_out); -void cbus_attach (CBus *bus,void *slave_opaque); - -void *retu_init (qemu_irq irq,int vilma); -void *tahvo_init (qemu_irq irq,int betty); - -void retu_key_event (void *retu,int state); -#endif
include/hw/misc/cbus.h new file +31 -0
@@ -0,0 +1,31 @@ +/* +* CBUS three-pin bus and the Retu / Betty / Tahvo / Vilma / Avilma / +* Hinku / Vinku / Ahne / Pihi chips used in various Nokia platforms. +* Based on reverse-engineering of a linux driver. +* +* Copyright (C) 2008 Nokia Corporation +* Written by Andrzej Zaborowski <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_MISC_CBUS_H +#define HW_MISC_CBUS_H + +#include "hw/irq.h" + +typedef struct { +qemu_irq clk; +qemu_irq dat; +qemu_irq sel; +}CBus ; + +CBus *cbus_init (qemu_irq dat_out); +void cbus_attach (CBus *bus,void *slave_opaque); + +void *retu_init (qemu_irq irq,int vilma); +void *tahvo_init (qemu_irq irq,int betty); + +void retu_key_event (void *retu,int state); + +#endif
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 06/16] hw/devices: Move CBus declarations into a new header
Quoted 15 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 1 + hw/arm/nseries.c | 1 + hw/misc/cbus.c | 2 +- include/hw/devices.h | 14 -------------- include/hw/misc/cbus.h | 31 +++++++++++++++++++++++++++++++ 5 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 include/hw/misc/cbus.hMAINTAINERS +0
-0
MAINTAINERS L: [email protected] · line 644
Quoted 4 lines
MAINTAINERS +1
-0@@ -641,6 +641,7 @@ L: [email protected] S: Odd Fixes F: hw/arm/nseries.c F: include/hw/display/blizzard.h +F: include/hw/misc/cbus.h
(note: I've added an entry for cbus.c here:
https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00097.html
you likely got to rebase this patch in case it hits master before your patch)
Quoted 56 lines
MAINTAINERS +0
-0Palm M: Andrzej Zaborowski <[email protected]>hw/arm/nseries.c +1
-0@@ -32,6 +32,7 @@#include "hw/i2c/i2c.h" #include "hw/devices.h" #include "hw/display/blizzard.h" +#include "hw/misc/cbus.h" #include "hw/block/flash.h" #include "hw/hw.h" #include "hw/bt.h" hw/misc/cbus.c +1
-1@@ -23,7 +23,7 @@#include "qemu/osdep.h" #include "hw/hw.h" #include "hw/irq.h" -#include "hw/devices.h" +#include "hw/misc/cbus.h" #include "sysemu/sysemu.h" //#define DEBUG include/hw/devices.h +0
-14@@ -28,18 +28,4 @@ void tsc2005_set_transform(void *opaque, MouseTransformInfo *info);/* stellaris_input.c */ void stellaris_gamepad_init (int n,qemu_irq *irq,const int *keycode); -/* cbus.c */ -typedef struct { -qemu_irq clk; -qemu_irq dat; -qemu_irq sel; -}CBus ; -CBus *cbus_init (qemu_irq dat_out); -void cbus_attach (CBus *bus,void *slave_opaque); - -void *retu_init (qemu_irq irq,int vilma); -void *tahvo_init (qemu_irq irq,int betty); - -void retu_key_event (void *retu,int state); -#endif include/hw/misc/cbus.h new file +0
-0
include/hw/misc/cbus.h line 7
Quoted 7 lines
include/hw/misc/cbus.h new file +7
-0@@ -0,0 +1,31 @@ +/* +* CBUS three-pin bus and the Retu / Betty / Tahvo / Vilma / Avilma / +* Hinku / Vinku / Ahne / Pihi chips used in various Nokia platforms. +* Based on reverse-engineering of a linux driver. +* +* Copyright (C) 2008 Nokia Corporation +* Written by Andrzej Zaborowski <[email protected]>
I'd drop the invalid e-mail address here, too, I think.
Quoted 14 lines
include/hw/misc/cbus.h new file +13
-0+* This work is licensed under the terms of the GNU GPL, version 2 or later. +* See the COPYING file in the top-level directory. +*/ +#ifndef HW_MISC_CBUS_H +#define HW_MISC_CBUS_H + +#include "hw/irq.h" + +typedef struct { +qemu_irq clk; +qemu_irq dat; +qemu_irq sel; +}CBus ;
include/hw/misc/cbus.h line 31
Quoted 10 lines
include/hw/misc/cbus.h new file +10
-0+ +CBus *cbus_init (qemu_irq dat_out); +void cbus_attach (CBus *bus,void *slave_opaque); + +void *retu_init (qemu_irq irq,int vilma); +void *tahvo_init (qemu_irq irq,int betty); + +void retu_key_event (void *retu,int state); + +#endif
PATCH 7/16 hw/devices: Move Gamepad declarations into a new header
In reply to Philippe Mathieu-Daudé--- MAINTAINERS | 1 + hw/arm/stellaris.c | 2 +- hw/input/stellaris_input.c | 2 +- include/hw/devices.h | 3 --- include/hw/input/gamepad.h | 11 +++++++++++ 5 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 include/hw/input/gamepad.h
MAINTAINERS +1 -0
@@ -714,6 +714,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Maintained F: hw/*/stellaris* +F: include/hw/input/gamepad.h Versatile Express M: Peter Maydell <[email protected]>
hw/arm/stellaris.c +1 -1
@@ -12,7 +12,6 @@#include "hw/sysbus.h" #include "hw/ssi/ssi.h" #include "hw/arm/arm.h" -#include "hw/devices.h" #include "qemu/timer.h" #include "hw/i2c/i2c.h" #include "net/net.h"
@@ -22,6 +21,7 @@#include "sysemu/sysemu.h" #include "hw/arm/armv7m.h" #include "hw/char/pl011.h" +#include "hw/input/gamepad.h" #include "hw/misc/unimp.h" #include "cpu.h"
hw/input/stellaris_input.c +1 -1
@@ -8,7 +8,7 @@*/ #include "qemu/osdep.h" #include "hw/hw.h" -#include "hw/devices.h" +#include "hw/input/gamepad.h" #include "ui/console.h" typedef struct {
include/hw/devices.h +0 -3
@@ -25,7 +25,4 @@ void *tsc2005_init(qemu_irq pintdav);uint32_t tsc2005_txrx (void *opaque,uint32_t value,int len);void tsc2005_set_transform (void *opaque,MouseTransformInfo *info); -/* stellaris_input.c */ -void stellaris_gamepad_init (int n,qemu_irq *irq,const int *keycode); -#endif
include/hw/input/gamepad.h new file +11 -0
@@ -0,0 +1,11 @@ +#ifndef HW_INPUT_GAMEPAD_H +#define HW_INPUT_GAMEPAD_H + +/* Gamepad devices that have nowhere better to go. */ + +#include "hw/irq.h" + +/* stellaris_input.c */ +void stellaris_gamepad_init (int n,qemu_irq *irq,const int *keycode); + +#endif
Signature · 1 line
2.17.2
PATCH 8/16 MAINTAINERS: Add missing entries for the TI touchscreen devices
In reply to Philippe Mathieu-Daudé--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: hw/input/tsc2*.c F: include/hw/display/blizzard.h F: include/hw/misc/cbus.h
@@ -649,6 +650,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/palm.c +F: hw/input/tsc2*.c Raspberry Pi M: Peter Maydell <[email protected]>
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 08/16] MAINTAINERS: Add missing entries for the TI touchscreen devices
Quoted 18 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +1
-0@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: hw/input/tsc2*.c F: include/hw/display/blizzard.h F: include/hw/misc/cbus.h
MAINTAINERS M: Peter Maydell <[email protected]> · line 653
Quoted 4 lines
MAINTAINERS +1
-0@@ -649,6 +650,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/palm.c +F: hw/input/tsc2*.c
The Palm machine does not seem to use tsc2005, does it? So I think this entry here is wrong.
Thomas
Re: [Qemu-arm] [PATCH 08/16] MAINTAINERS: Add missing entries for the TI touchscreen devices
Hi Thomas,
Quoted 18 lines · Thomas Huth
Quoted 17 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +1
-0@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: hw/input/tsc2*.c F: include/hw/display/blizzard.h F: include/hw/misc/cbus.h
Quoted 8 lines
MAINTAINERS M: Peter Maydell <[email protected]> · line 653
Quoted 5 lines
MAINTAINERS +1
-0@@ -649,6 +650,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/palm.c +F: hw/input/tsc2*.cThe Palm machine does not seem to use tsc2005, does it? So I think this entry here is wrong.
It does use another touchscreen controller, the tsc2102, which in the next patch are declared in the same header (you suggested "tsc2xxx.h):
$ git grep tsc2.*init hw/arm/ hw/arm/nseries.c:284: s->ts.chip = tsc2301_init(penirq, kbirq, dav); hw/arm/nseries.c:306: s->ts.opaque = tsc2005_init(pintdav); hw/arm/palm.c:88: tsc = tsc2102_init(qdev_get_gpio_in(cpu->gpio, PALMTE_PINTDAV_GPIO));
Re: [Qemu-arm] [PATCH 08/16] MAINTAINERS: Add missing entries for the TI touchscreen devices
Quoted 30 lines · Philippe Mathieu-Daudé
Hi Thomas,
Quoted 18 lines · Thomas Huth
Quoted 17 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +1
-0@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: hw/input/tsc2*.c F: include/hw/display/blizzard.h F: include/hw/misc/cbus.hQuoted 8 lines
MAINTAINERS M: Peter Maydell <[email protected]> · line 653
Quoted 5 lines
MAINTAINERS +1
-0@@ -649,6 +650,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/palm.c +F: hw/input/tsc2*.cThe Palm machine does not seem to use tsc2005, does it? So I think this entry here is wrong.
Quoted 2 lines
It does use another touchscreen controller, the tsc2102, which in the next patch are declared in the same header (you suggested "
tsc2xxx.h):
So using the tsc2*.c wildcard for the *C* file is still wrong here, isn't it?
Thomas
Re: [Qemu-devel] [PATCH 08/16] MAINTAINERS: Add missing entries for the TI touchscreen devices
Quoted 31 lines · Thomas Huth
Quoted 30 lines · Philippe Mathieu-Daudé
Hi Thomas,
Quoted 26 lines · Thomas Huth
Quoted 18 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +1
-0@@ -640,6 +640,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/nseries.c +F: hw/input/tsc2*.c F: include/hw/display/blizzard.h F: include/hw/misc/cbus.hMAINTAINERS M: Peter Maydell <[email protected]> · line 653
Quoted 4 lines
MAINTAINERS +1
-0@@ -649,6 +650,7 @@ M: Peter Maydell <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/palm.c +F: hw/input/tsc2*.cThe Palm machine does not seem to use tsc2005, does it? So I think this entry here is wrong.
Quoted 5 lines
Quoted 2 lines
It does use another touchscreen controller, the tsc2102, which in the next patch are declared in the same header (you suggested "
tsc2xxx.h):So using the tsc2*.c wildcard for the *C* file is still wrong here, isn't it?
Oh I got it now! Yes, you are right :) I'll update.
PATCH 9/16 hw/devices: Move TI touchscreen declarations into a new header
In reply to Philippe Mathieu-DaudéSince uWireSlave is only used in this new header, there is no need to expose it via "qemu/typedefs.h".
--- MAINTAINERS | 2 ++ hw/arm/nseries.c | 2 +- hw/arm/palm.c | 2 +- hw/input/tsc2005.c | 2 +- hw/input/tsc210x.c | 4 ++-- include/hw/arm/omap.h | 6 +----- include/hw/devices.h | 14 -------------- include/hw/input/ti_uwire_tsc.h | 28 ++++++++++++++++++++++++++++ include/qemu/typedefs.h | 1 - 9 files changed, 36 insertions(+), 25 deletions(-) create mode 100644 include/hw/input/ti_uwire_tsc.h
MAINTAINERS +2 -0
@@ -642,6 +642,7 @@ S: Odd Fixes F: hw/arm/nseries.c F: hw/input/tsc2*.c F: include/hw/display/blizzard.h +F: include/hw/input/ti_uwire_tsc.h F: include/hw/misc/cbus.h Palm
@@ -651,6 +652,7 @@ L: [email protected] S: Odd Fixes F: hw/arm/palm.c F: hw/input/tsc2*.c +F: include/hw/input/ti_uwire_tsc.h Raspberry Pi M: Peter Maydell <[email protected]>
hw/arm/nseries.c +1 -1
@@ -30,8 +30,8 @@#include "ui/console.h" #include "hw/boards.h" #include "hw/i2c/i2c.h" -#include "hw/devices.h" #include "hw/display/blizzard.h" +#include "hw/input/ti_uwire_tsc.h" #include "hw/misc/cbus.h" #include "hw/block/flash.h" #include "hw/hw.h"
hw/arm/palm.c +1 -1
@@ -26,7 +26,7 @@#include "hw/arm/omap.h" #include "hw/boards.h" #include "hw/arm/arm.h" -#include "hw/devices.h" +#include "hw/input/ti_uwire_tsc.h" #include "hw/loader.h" #include "exec/address-spaces.h" #include "cpu.h"
hw/input/tsc2005.c +1 -1
@@ -23,7 +23,7 @@#include "hw/hw.h" #include "qemu/timer.h" #include "ui/console.h" -#include "hw/devices.h" +#include "hw/input/ti_uwire_tsc.h" #include "trace.h" #define TSC_CUT_RESOLUTION (value, p) ((value) >> (16 - (p ? 12 : 10)))
hw/input/tsc210x.c +2 -2
@@ -24,8 +24,8 @@#include "audio/audio.h" #include "qemu/timer.h" #include "ui/console.h" -#include "hw/arm/omap.h" /* For I2SCodec and uWireSlave */ -#include "hw/devices.h" +#include "hw/arm/omap.h" /* For I2SCodec */ +#include "hw/input/ti_uwire_tsc.h" #define TSC_DATA_REGISTERS_PAGE 0x0#define TSC_CONTROL_REGISTERS_PAGE 0x1
include/hw/arm/omap.h +1 -5
@@ -20,6 +20,7 @@#include "exec/memory.h" # define hw_omap_h "omap.h"#include "hw/irq.h" +#include "hw/input/ti_uwire_tsc.h" #include "target/arm/cpu-qom.h" #include "qemu/log.h"
@@ -679,11 +680,6 @@ qemu_irq *omap_mpuio_in_get(struct omap_mpuio_s *s);void omap_mpuio_out_set (struct omap_mpuio_s *s,int line,qemu_irq handler);void omap_mpuio_key (struct omap_mpuio_s *s,int row,int col,int down); -struct uWireSlave { -uint16_t (*receive)(void *opaque); -void (*send)(void *opaque,uint16_t data); -void *opaque; -};struct omap_uwire_s ;void omap_uwire_attach (struct omap_uwire_s *s,uWireSlave *slave,int chipselect);
include/hw/devices.h +0 -14
@@ -11,18 +11,4 @@ void smc91c111_init(NICInfo *, uint32_t, qemu_irq);/* lan9118.c */ void lan9118_init (NICInfo *,uint32_t ,qemu_irq ); -/* tsc210x.c */ -uWireSlave *tsc2102_init (qemu_irq pint); -uWireSlave *tsc2301_init (qemu_irq penirq,qemu_irq kbirq,qemu_irq dav); -I2SCodec *tsc210x_codec (uWireSlave *chip); -uint32_t tsc210x_txrx (void *opaque,uint32_t value,int len); -void tsc210x_set_transform (uWireSlave *chip, -MouseTransformInfo *info); -void tsc210x_key_event (uWireSlave *chip,int key,int down); - -/* tsc2005.c */ -void *tsc2005_init (qemu_irq pintdav); -uint32_t tsc2005_txrx (void *opaque,uint32_t value,int len); -void tsc2005_set_transform (void *opaque,MouseTransformInfo *info); -#endif
include/hw/input/ti_uwire_tsc.h new file +28 -0
@@ -0,0 +1,28 @@ +#ifndef HW_INPUT_TI_UWIRE_TOUCHSCREEN_H +#define HW_INPUT_TI_UWIRE_TOUCHSCREEN_H + +/* TI 4/8-wire resistive touch screen converters */ + +#include "hw/irq.h" +#include "ui/console.h" + +typedef struct uWireSlave { +uint16_t (*receive)(void *opaque); +void (*send)(void *opaque,uint16_t data); +void *opaque; +}uWireSlave ; + +/* tsc210x.c */ +uWireSlave *tsc2102_init (qemu_irq pint); +uWireSlave *tsc2301_init (qemu_irq penirq,qemu_irq kbirq,qemu_irq dav); +I2SCodec *tsc210x_codec (uWireSlave *chip); +uint32_t tsc210x_txrx (void *opaque,uint32_t value,int len); +void tsc210x_set_transform (uWireSlave *chip,MouseTransformInfo *info); +void tsc210x_key_event (uWireSlave *chip,int key,int down); + +/* tsc2005.c */ +void *tsc2005_init (qemu_irq pintdav); +uint32_t tsc2005_txrx (void *opaque,uint32_t value,int len); +void tsc2005_set_transform (void *opaque,MouseTransformInfo *info); + +#endif
include/qemu/typedefs.h +0 -1
@@ -111,7 +111,6 @@ typedef struct SerialState SerialState;typedef struct SHPCDevice SHPCDevice ;typedef struct SMBusDevice SMBusDevice ;typedef struct SSIBus SSIBus ; -typedef struct uWireSlave uWireSlave ;typedef struct VirtIODevice VirtIODevice ;typedef struct Visitor Visitor ;typedef void SaveStateHandler (QEMUFile *f,void *opaque);
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 09/16] hw/devices: Move TI touchscreen declarations into a new header
Quoted 4 lines · Philippe Mathieu-Daudé
Since uWireSlave is only used in this new header, there is no need to expose it via "
qemu/typedefs.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>
Quoted 9 lines
--- MAINTAINERS | 2 ++ hw/arm/nseries.c | 2 +- hw/arm/palm.c | 2 +- hw/input/tsc2005.c | 2 +- hw/input/tsc210x.c | 4 ++-- include/hw/arm/omap.h | 6 +----- include/hw/devices.h | 14 -------------- include/hw/input/ti_uwire_tsc.h | 28 ++++++++++++++++++++++++++++
I'd maybe rather name the new file "tsc2xxx.h" instead, so that it resembles the names of the .c files. Just my 0.02 €.
Thomas
Re: [Qemu-arm] [PATCH 09/16] hw/devices: Move TI touchscreen declarations into a new header
Quoted 15 lines · Thomas Huth
Quoted 4 lines · Philippe Mathieu-Daudé
Since uWireSlave is only used in this new header, there is no need to expose it via "
qemu/typedefs.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>Quoted 9 lines
--- MAINTAINERS | 2 ++ hw/arm/nseries.c | 2 +- hw/arm/palm.c | 2 +- hw/input/tsc2005.c | 2 +- hw/input/tsc210x.c | 4 ++-- include/hw/arm/omap.h | 6 +----- include/hw/devices.h | 14 -------------- include/hw/input/ti_uwire_tsc.h | 28 ++++++++++++++++++++++++++++
Quoted 2 lines
I'd maybe rather name the new file "
tsc2xxx.h" instead, so that it resembles the names of the .c files. Just my 0.02 €.
Good idea :)
PATCH 10/16 typedefs: Remove MouseTransformInfo
In reply to Philippe Mathieu-DaudéMouseTransformInfo is only used in "ui/console.h", there is no need to expose it via "qemu/typedefs.h".
--- include/qemu/typedefs.h | 1 - include/ui/console.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-)
include/qemu/typedefs.h +0 -1
@@ -56,7 +56,6 @@ typedef struct MigrationIncomingState MigrationIncomingState;typedef struct MigrationState MigrationState ;typedef struct Monitor Monitor ;typedef struct MonitorDef MonitorDef ; -typedef struct MouseTransformInfo MouseTransformInfo ;typedef struct MSIMessage MSIMessage ;typedef struct NetClientState NetClientState ;typedef struct NetFilterState NetFilterState ;
include/ui/console.h +2 -2
@@ -65,13 +65,13 @@ void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry);void kbd_put_ledstate (int ledstate); -struct MouseTransformInfo { +typedef struct MouseTransformInfo {/* Touchscreen resolution */ int x;int y;/* Calibration values as used/generated by tslib */ int a[7 ]; -}; +}MouseTransformInfo ;void hmp_mouse_set (Monitor *mon,const QDict *qdict);
Signature · 1 line
2.17.2
PATCH 11/16 typedefs: Remove PS2State
In reply to Philippe Mathieu-DaudéPS2State is only used in "hw/input/ps2.h", there is no need to expose it via "qemu/typedefs.h".
--- include/hw/input/ps2.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
include/hw/input/ps2.h +2 -0
@@ -31,6 +31,8 @@#define PS2_MOUSE_BUTTON_SIDE 0x08#define PS2_MOUSE_BUTTON_EXTRA 0x10 +typedef struct PS2State PS2State ; +/* ps2.c */ void *ps2_kbd_init (void (*update_irq)(void *,int ),void *update_arg);void *ps2_mouse_init (void (*update_irq)(void *,int ),void *update_arg);
include/qemu/typedefs.h +0 -1
@@ -82,7 +82,6 @@ typedef struct PixelFormat PixelFormat;typedef struct PostcopyDiscardState PostcopyDiscardState ;typedef struct Property Property ;typedef struct PropertyInfo PropertyInfo ; -typedef struct PS2State PS2State ;typedef struct QEMUBH QEMUBH ;typedef struct QemuConsole QemuConsole ;typedef struct QemuDmaBuf QemuDmaBuf ;
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 11/16] typedefs: Remove PS2State
Quoted 28 lines · Philippe Mathieu-Daudé
PS2State is only used in "
hw/input/ps2.h", there is no need to expose it via "qemu/typedefs.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/input/ps2.h | 2 ++ include/qemu/typedefs.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)include/hw/input/ps2.h +2
-0@@ -31,6 +31,8 @@#define PS2_MOUSE_BUTTON_SIDE 0x08#define PS2_MOUSE_BUTTON_EXTRA 0x10 +typedef struct PS2State PS2State ; +/* ps2.c */ void *ps2_kbd_init (void (*update_irq)(void *,int ),void *update_arg);void *ps2_mouse_init (void (*update_irq)(void *,int ),void *update_arg);include/qemu/typedefs.h +0
-0
include/qemu/typedefs.h typedef struct PixelFormat PixelFormat; · line 87
Quoted 7 lines
include/qemu/typedefs.h +0
-1@@ -82,7 +82,6 @@ typedef struct PixelFormat PixelFormat;typedef struct PostcopyDiscardState PostcopyDiscardState ;typedef struct Property Property ;typedef struct PropertyInfo PropertyInfo ; -typedef struct PS2State PS2State ;typedef struct QEMUBH QEMUBH ;typedef struct QemuConsole QemuConsole ;typedef struct QemuDmaBuf QemuDmaBuf ;
PATCH 12/16 hw/devices: Move LAN9118 declarations into a new header
In reply to Philippe Mathieu-Daudé--- hw/arm/kzm.c | 2 +- hw/arm/mps2.c | 2 +- hw/arm/realview.c | 1 + hw/arm/vexpress.c | 2 +- hw/net/lan9118.c | 2 +- include/hw/devices.h | 3 --- include/hw/net/lan9118.h | 21 +++++++++++++++++++++ 7 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 include/hw/net/lan9118.h
hw/arm/kzm.c +1 -1
@@ -22,7 +22,7 @@#include "qemu/error-report.h" #include "exec/address-spaces.h" #include "net/net.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/char/serial.h" #include "sysemu/qtest.h"
hw/arm/mps2.c +1 -1
@@ -36,7 +36,7 @@#include "hw/timer/cmsdk-apb-timer.h" #include "hw/timer/cmsdk-apb-dualtimer.h" #include "hw/misc/mps2-scc.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "net/net.h" typedef enum MPS2FPGAType {
hw/arm/realview.c +1 -0
@@ -15,6 +15,7 @@#include "hw/arm/arm.h" #include "hw/arm/primecell.h" #include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/pci/pci.h" #include "net/net.h" #include "sysemu/sysemu.h"
hw/arm/vexpress.c +1 -1
@@ -28,7 +28,7 @@#include "hw/sysbus.h" #include "hw/arm/arm.h" #include "hw/arm/primecell.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/i2c/i2c.h" #include "net/net.h" #include "sysemu/sysemu.h"
hw/net/lan9118.c +1 -1
@@ -14,7 +14,7 @@#include "hw/sysbus.h" #include "net/net.h" #include "net/eth.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "sysemu/sysemu.h" #include "hw/ptimer.h" #include "qemu/log.h"
include/hw/devices.h +0 -3
@@ -8,7 +8,4 @@/* smc91c111.c */ void smc91c111_init (NICInfo *,uint32_t ,qemu_irq ); -/* lan9118.c */ -void lan9118_init (NICInfo *,uint32_t ,qemu_irq ); -#endif
include/hw/net/lan9118.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* SMSC LAN9118 Ethernet interface emulation +* +* Copyright (c) 2009 CodeSourcery, LLC. +* Written by Paul Brook +* +* This code is licensed under the GNU GPL v2 +* +* Contributions after 2012-01-13 are licensed under the terms of the +* GNU GPL, version 2 or (at your option) any later version. +*/ + +#ifndef HW_NET_LAN9118_H +#define HW_NET_LAN9118_H + +#include "hw/irq.h" +#include "net/net.h" + +void lan9118_init (NICInfo *,uint32_t ,qemu_irq ); + +#endif
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 12/16] hw/devices: Move LAN9118 declarations into a new header
Quoted 94 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/arm/kzm.c | 2 +- hw/arm/mps2.c | 2 +- hw/arm/realview.c | 1 + hw/arm/vexpress.c | 2 +- hw/net/lan9118.c | 2 +- include/hw/devices.h | 3 --- include/hw/net/lan9118.h | 21 +++++++++++++++++++++ 7 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 include/hw/net/lan9118.hhw/arm/kzm.c +1
-1@@ -22,7 +22,7 @@#include "qemu/error-report.h" #include "exec/address-spaces.h" #include "net/net.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/char/serial.h" #include "sysemu/qtest.h" hw/arm/mps2.c +1
-1@@ -36,7 +36,7 @@#include "hw/timer/cmsdk-apb-timer.h" #include "hw/timer/cmsdk-apb-dualtimer.h" #include "hw/misc/mps2-scc.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "net/net.h" typedef enum MPS2FPGAType {hw/arm/realview.c +1
-0@@ -15,6 +15,7 @@#include "hw/arm/arm.h" #include "hw/arm/primecell.h" #include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/pci/pci.h" #include "net/net.h" #include "sysemu/sysemu.h" hw/arm/vexpress.c +1
-1@@ -28,7 +28,7 @@#include "hw/sysbus.h" #include "hw/arm/arm.h" #include "hw/arm/primecell.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/i2c/i2c.h" #include "net/net.h" #include "sysemu/sysemu.h" hw/net/lan9118.c +1
-1@@ -14,7 +14,7 @@#include "hw/sysbus.h" #include "net/net.h" #include "net/eth.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "sysemu/sysemu.h" #include "hw/ptimer.h" #include "qemu/log.h" include/hw/devices.h +0
-3@@ -8,7 +8,4 @@/* smc91c111.c */ void smc91c111_init (NICInfo *,uint32_t ,qemu_irq ); -/* lan9118.c */ -void lan9118_init (NICInfo *,uint32_t ,qemu_irq ); -#endif include/hw/net/lan9118.h new file +0
-0
include/hw/net/lan9118.h line 10
Quoted 10 lines
include/hw/net/lan9118.h new file +10
-0@@ -0,0 +1,21 @@ +/* +* SMSC LAN9118 Ethernet interface emulation +* +* Copyright (c) 2009 CodeSourcery, LLC. +* Written by Paul Brook +* +* This code is licensed under the GNU GPL v2 +* +* Contributions after 2012-01-13 are licensed under the terms of the +* GNU GPL, version 2 or (at your option) any later version.
Since your contribution here is after 2012 and the file content is also just a trivial one-line prototype, please change the license code to say GPLv2+ only right from the start. We should avoid these v2 + v2+ statements in new files.
include/hw/net/lan9118.h line 21
Quoted 12 lines
include/hw/net/lan9118.h new file +11
-0+*/ + +#ifndef HW_NET_LAN9118_H +#define HW_NET_LAN9118_H + +#include "hw/irq.h" +#include "net/net.h" + +void lan9118_init (NICInfo *,uint32_t ,qemu_irq ); + +#endif
Thomas
Re: [Qemu-arm] [PATCH 12/16] hw/devices: Move LAN9118 declarations into a new header
Quoted 102 lines · Thomas Huth
Quoted 101 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/arm/kzm.c | 2 +- hw/arm/mps2.c | 2 +- hw/arm/realview.c | 1 + hw/arm/vexpress.c | 2 +- hw/net/lan9118.c | 2 +- include/hw/devices.h | 3 --- include/hw/net/lan9118.h | 21 +++++++++++++++++++++ 7 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 include/hw/net/lan9118.hhw/arm/kzm.c +1
-1@@ -22,7 +22,7 @@#include "qemu/error-report.h" #include "exec/address-spaces.h" #include "net/net.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/char/serial.h" #include "sysemu/qtest.h" hw/arm/mps2.c +1
-1@@ -36,7 +36,7 @@#include "hw/timer/cmsdk-apb-timer.h" #include "hw/timer/cmsdk-apb-dualtimer.h" #include "hw/misc/mps2-scc.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "net/net.h" typedef enum MPS2FPGAType {hw/arm/realview.c +1
-0@@ -15,6 +15,7 @@#include "hw/arm/arm.h" #include "hw/arm/primecell.h" #include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/pci/pci.h" #include "net/net.h" #include "sysemu/sysemu.h" hw/arm/vexpress.c +1
-1@@ -28,7 +28,7 @@#include "hw/sysbus.h" #include "hw/arm/arm.h" #include "hw/arm/primecell.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "hw/i2c/i2c.h" #include "net/net.h" #include "sysemu/sysemu.h" hw/net/lan9118.c +1
-1@@ -14,7 +14,7 @@#include "hw/sysbus.h" #include "net/net.h" #include "net/eth.h" -#include "hw/devices.h" +#include "hw/net/lan9118.h" #include "sysemu/sysemu.h" #include "hw/ptimer.h" #include "qemu/log.h" include/hw/devices.h +0
-3@@ -8,7 +8,4 @@/* smc91c111.c */ void smc91c111_init (NICInfo *,uint32_t ,qemu_irq ); -/* lan9118.c */ -void lan9118_init (NICInfo *,uint32_t ,qemu_irq ); -#endif include/hw/net/lan9118.h new file +7
-0@@ -0,0 +1,21 @@ +/* +* SMSC LAN9118 Ethernet interface emulation +* +* Copyright (c) 2009 CodeSourcery, LLC. +* Written by Paul Brook +* +* This code is licensed under the GNU GPL v2
Quoted 8 lines
include/hw/net/lan9118.h line 10
Quoted 3 lines
include/hw/net/lan9118.h new file +3
-0+* +* Contributions after 2012-01-13 are licensed under the terms of the +* GNU GPL, version 2 or (at your option) any later version. Since your contribution here is after 2012 and the file content is also just a trivial one-line prototype, please change the license code to say GPLv2+ only right from the start. We should avoid these v2 + v2+ statements in new files.
OK.
Quoted 16 lines
include/hw/net/lan9118.h line 21
Quoted 13 lines
include/hw/net/lan9118.h new file +11
-0+*/ + +#ifndef HW_NET_LAN9118_H +#define HW_NET_LAN9118_H + +#include "hw/irq.h" +#include "net/net.h" + +void lan9118_init (NICInfo *,uint32_t ,qemu_irq ); + +#endif Thomas
PATCH 13/16 hw/net/ne2000-isa: Add guards to the header
In reply to Philippe Mathieu-Daudé--- include/hw/net/ne2000-isa.h | 6 ++++++ 1 file changed, 6 insertions(+)
include/hw/net/ne2000-isa.h +6 -0
@@ -6,6 +6,10 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ + +#ifndef HW_NET_NE2K_ISA_H +#define HW_NET_NE2K_ISA_H +#include "hw/hw.h" #include "hw/qdev.h" #include "hw/isa/isa.h"
@@ -31,3 +35,5 @@ static inline ISADevice *isa_ne2000_init(ISABus *bus, int base, int irq, }return d; } + +#endif
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 13/16] hw/net/ne2000-isa: Add guards to the header
Quoted 22 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- include/hw/net/ne2000-isa.h | 6 ++++++ 1 file changed, 6 insertions(+)include/hw/net/ne2000-isa.h +4
-0@@ -6,6 +6,10 @@* This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ + +#ifndef HW_NET_NE2K_ISA_H +#define HW_NET_NE2K_ISA_H +#include "hw/hw.h" #include "hw/qdev.h" #include "hw/isa/isa.h"
include/hw/net/ne2000-isa.h static inline ISADevice *isa_ne2000_init(ISABus *bus, int base, int irq, · line 39
Quoted 5 lines
include/hw/net/ne2000-isa.h +2
-0@@ -31,3 +35,5 @@ static inline ISADevice *isa_ne2000_init(ISABus *bus, int base, int irq, }return d; } + +#endif
PATCH 14/16 hw/net/lan9118: Export TYPE_LAN9118 and use it instead of hardcoded string
In reply to Philippe Mathieu-Daudé--- hw/arm/exynos4_boards.c | 3 ++- hw/arm/mps2-tz.c | 3 ++- hw/net/lan9118.c | 1 - include/hw/net/lan9118.h | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-)
hw/arm/exynos4_boards.c +2 -1
@@ -32,6 +32,7 @@#include "hw/arm/arm.h" #include "exec/address-spaces.h" #include "hw/arm/exynos4210.h" +#include "hw/net/lan9118.h" #include "hw/boards.h" #undef DEBUG
@@ -92,7 +93,7 @@ static void lan9215_init(uint32_t base, qemu_irq irq)/* This should be a 9215 but the 9118 is close enough */ if (nd_table[0 ].used) {qemu_check_nic_model (&nd_table[0 ],"lan9118" ); - dev =qdev_create (NULL ,"lan9118" ); + dev =qdev_create (NULL ,TYPE_LAN9118 );qdev_set_nic_properties (dev, &nd_table[0 ]);qdev_prop_set_uint32 (dev,"mode_16bit" ,1 );qdev_init_nofail (dev);
hw/arm/mps2-tz.c +2 -1
@@ -49,6 +49,7 @@#include "hw/arm/iotkit.h" #include "hw/dma/pl080.h" #include "hw/ssi/pl022.h" +#include "hw/net/lan9118.h" #include "net/net.h" #include "hw/core/split-irq.h"
@@ -219,7 +220,7 @@ static MemoryRegion *make_eth_dev(MPS2TZMachineState *mms, void *opaque,* except that it doesn't support the checksum-offload feature. */ qemu_check_nic_model (nd,"lan9118" ); - mms->lan9118 =qdev_create (NULL ,"lan9118" ); + mms->lan9118 =qdev_create (NULL ,TYPE_LAN9118 );qdev_set_nic_properties (mms->lan9118, nd);qdev_init_nofail (mms->lan9118);
hw/net/lan9118.c +0 -1
@@ -175,7 +175,6 @@ static const VMStateDescription vmstate_lan9118_packet = { } }; -#define TYPE_LAN9118 "lan9118"#define LAN9118 (obj) OBJECT_CHECK(lan9118_state, (obj), TYPE_LAN9118) typedef struct {
include/hw/net/lan9118.h +2 -0
@@ -16,6 +16,8 @@#include "hw/irq.h" #include "net/net.h" +#define TYPE_LAN9118 "lan9118" +void lan9118_init (NICInfo *,uint32_t ,qemu_irq );#endif
Signature · 1 line
2.17.2
PATCH 15/16 hw/devices: Move SMSC 91C111 declaration into a new header
In reply to Philippe Mathieu-DaudéThis commit finally deletes "hw/devices.h".
--- hw/arm/gumstix.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/mainstone.c | 2 +- hw/arm/realview.c | 2 +- hw/arm/versatilepb.c | 2 +- hw/net/smc91c111.c | 2 +- include/hw/devices.h | 11 ----------- include/hw/net/smc91c111.h | 18 ++++++++++++++++++ 8 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 include/hw/devices.h create mode 100644 include/hw/net/smc91c111.h
hw/arm/gumstix.c +1 -1
@@ -40,7 +40,7 @@#include "hw/arm/pxa.h" #include "net/net.h" #include "hw/block/flash.h" -#include "hw/devices.h" +#include "hw/net/smc91c111.h" #include "hw/boards.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h"
hw/arm/integratorcp.c +1 -1
@@ -12,10 +12,10 @@#include "qemu-common.h" #include "cpu.h" #include "hw/sysbus.h" -#include "hw/devices.h" #include "hw/boards.h" #include "hw/arm/arm.h" #include "hw/misc/arm_integrator_debug.h" +#include "hw/net/smc91c111.h" #include "net/net.h" #include "exec/address-spaces.h" #include "sysemu/sysemu.h"
hw/arm/mainstone.c +1 -1
@@ -18,7 +18,7 @@#include "hw/arm/pxa.h" #include "hw/arm/arm.h" #include "net/net.h" -#include "hw/devices.h" +#include "hw/net/smc91c111.h" #include "hw/boards.h" #include "hw/block/flash.h" #include "hw/sysbus.h"
hw/arm/realview.c +1 -1
@@ -14,8 +14,8 @@#include "hw/sysbus.h" #include "hw/arm/arm.h" #include "hw/arm/primecell.h" -#include "hw/devices.h" #include "hw/net/lan9118.h" +#include "hw/net/smc91c111.h" #include "hw/pci/pci.h" #include "net/net.h" #include "sysemu/sysemu.h"
hw/arm/versatilepb.c +1 -1
@@ -13,7 +13,7 @@#include "cpu.h" #include "hw/sysbus.h" #include "hw/arm/arm.h" -#include "hw/devices.h" +#include "hw/net/smc91c111.h" #include "net/net.h" #include "sysemu/sysemu.h" #include "hw/pci/pci.h"
hw/net/smc91c111.c +1 -1
@@ -10,7 +10,7 @@#include "qemu/osdep.h" #include "hw/sysbus.h" #include "net/net.h" -#include "hw/devices.h" +#include "hw/net/smc91c111.h" #include "qemu/log.h" /* For crc32 */ #include <zlib.h>
include/hw/devices.h deleted +0 -11
@@ -1,11 +0,0 @@ -#ifndef QEMU_DEVICES_H -#define QEMU_DEVICES_H - -/* Devices that have nowhere better to go. */ - -#include "hw/hw.h" - -/* smc91c111.c */ -void smc91c111_init (NICInfo *,uint32_t ,qemu_irq ); - -#endif
include/hw/net/smc91c111.h new file +18 -0
@@ -0,0 +1,18 @@ +/* +* SMSC 91C111 Ethernet interface emulation +* +* Copyright (c) 2005 CodeSourcery, LLC. +* Written by Paul Brook +* +* This code is licensed under the GPL +*/ + +#ifndef HW_NET_SMC91C111_H +#define HW_NET_SMC91C111_H + +#include "hw/irq.h" +#include "net/net.h" + +void smc91c111_init (NICInfo *,uint32_t ,qemu_irq ); + +#endif
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 15/16] hw/devices: Move SMSC 91C111 declaration into a new header
Quoted 15 lines · Philippe Mathieu-Daudé
This commit finally deletes "
hw/devices.h".Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- hw/arm/gumstix.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/mainstone.c | 2 +- hw/arm/realview.c | 2 +- hw/arm/versatilepb.c | 2 +- hw/net/smc91c111.c | 2 +- include/hw/devices.h | 11 ----------- include/hw/net/smc91c111.h | 18 ++++++++++++++++++ 8 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 include/hw/devices.h create mode 100644 include/hw/net/smc91c111.h
[...]
include/hw/net/smc91c111.h line 7
Quoted 13 lines
include/hw/net/smc91c111.h new file +7
-0@@ -0,0 +1,18 @@ +/* +* SMSC 91C111 Ethernet interface emulation +* +* Copyright (c) 2005 CodeSourcery, LLC. +* Written by Paul Brook +* +* This code is licensed under the GPL
I'd like to suggest to use here GPLv2+, too, since just "GPL" is quite inaccurate.
include/hw/net/smc91c111.h line 18
Quoted 12 lines
include/hw/net/smc91c111.h new file +11
-0+*/ + +#ifndef HW_NET_SMC91C111_H +#define HW_NET_SMC91C111_H + +#include "hw/irq.h" +#include "net/net.h" + +void smc91c111_init (NICInfo *,uint32_t ,qemu_irq ); + +#endif
Thomas
PATCH 16/16 RFC hw/net/smc91c111: Convert init helper into an inline function
In reply to Philippe Mathieu-Daudé---
As init helper in "hw/char/pl011.h"
--- hw/net/smc91c111.c | 17 ----------------- include/hw/net/smc91c111.h | 25 ++++++++++++++++++++++++- 2 files changed, 24 insertions(+), 18 deletions(-)
hw/net/smc91c111.c +0 -17
@@ -18,7 +18,6 @@/* Number of 2k memory pages available. */ #define NUM_PACKETS 4 -#define TYPE_SMC91C111 "smc91c111"#define SMC91C111 (obj) OBJECT_CHECK(smc91c111_state, (obj), TYPE_SMC91C111) typedef struct {
@@ -809,20 +808,4 @@ static void smc91c111_register_types(void)type_register_static (&smc91c111_info); } -/* Legacy helper function. Should go away when machine config files are -implemented. */ -void smc91c111_init (NICInfo *nd,uint32_t base,qemu_irq irq) -{ -DeviceState *dev; -SysBusDevice *s; - -qemu_check_nic_model (nd,"smc91c111" ); - dev =qdev_create (NULL ,TYPE_SMC91C111 ); -qdev_set_nic_properties (dev, nd); -qdev_init_nofail (dev); - s =SYS_BUS_DEVICE (dev); -sysbus_mmio_map (s,0 , base); -sysbus_connect_irq (s,0 , irq); -} -type_init (smc91c111_register_types)
include/hw/net/smc91c111.h +24 -1
@@ -10,9 +10,32 @@#ifndef HW_NET_SMC91C111_H #define HW_NET_SMC91C111_H +#include "hw/qdev.h" #include "hw/irq.h" +#include "hw/sysbus.h" #include "net/net.h" -void smc91c111_init (NICInfo *,uint32_t ,qemu_irq ); +#define TYPE_SMC91C111 "smc91c111" + +/* +* Legacy helper function. Should go away when machine config files are +* implemented. +*/ +static inline DeviceState *smc91c111_init (NICInfo *nd, +uint32_t base,qemu_irq irq) +{ +DeviceState *dev; +SysBusDevice *s; + +qemu_check_nic_model (nd,"smc91c111" ); + dev =qdev_create (NULL ,TYPE_SMC91C111 ); +qdev_set_nic_properties (dev, nd); +qdev_init_nofail (dev); + s =SYS_BUS_DEVICE (dev); +sysbus_mmio_map (s,0 , base); +sysbus_connect_irq (s,0 , irq); + +return dev; +}#endif
Signature · 1 line
2.17.2
Re: [Qemu-arm] [PATCH 16/16] RFC hw/net/smc91c111: Convert init helper into an inline function
Quoted 7 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
As init helper in "hw/char/pl011.h"--- hw/net/smc91c111.c | 17 ----------------- include/hw/net/smc91c111.h | 25 ++++++++++++++++++++++++- 2 files changed, 24 insertions(+), 18 deletions(-)
Why? If you move code around like this, you should mention the reason in the patch description.
Thomas
Re: [Qemu-devel] [PATCH 16/16] RFC hw/net/smc91c111: Convert init helper into an inline function
Quoted 11 lines · Thomas Huth
Quoted 7 lines · Philippe Mathieu-Daudé
Signed-off-by Philippe Mathieu-Daudé <[email protected]>---
As init helper in "hw/char/pl011.h"--- hw/net/smc91c111.c | 17 ----------------- include/hw/net/smc91c111.h | 25 ++++++++++++++++++++++++- 2 files changed, 24 insertions(+), 18 deletions(-)Why? If you move code around like this, you should mention the reason in the patch description.
Oops this one wasn't supposed to be sent, I planned to drop it before sending but probably forgot because it was late friday :/