arm: drop last bits from deprecated boards
v2 cover arm: drop last bits from deprecated boards
This series is the remaining patches not yet applied from my "arm:
Drop deprecated boards" series; this is essentially the device removals which didn't get review in that series and/or which had some discussion about whether we should remove them.
To summarise the remaining removals:
* max1110 and max1111 are SSI devices so in theory could be created by users on the command line. However I found no evidence of doing this when I did a web search for "device max1110", and the utility of doing so is unclear to me since it's not possible for the command line device to have its ADC inputs or its interrupt line output wired up to anything.
* max7310 is an I2C GPIO controller, so it has the same "in theory a user could create this on the command line but in practice it's pretty useless because there's no way to wire up the GPIO lines to anything" status.
* the microdrive device can only be used with our PCMCIA bus emulation, and we no longer have any boards using that, so I think these are uncontroversially deleteable. Some boards we still have should in theory have a PCMCIA controller (strongarm, kzm, sh7750), but we don't model those controllers and none of those boards are sufficiently interesting or active that it's likely anybody will ever add one.
* The ECC code is entirely unused now; this is an uncontroversial removal of dead code, and I only didn't put it in my pullreq because it wasn't reviewed yet.
* Consensus on the v1 series was that we could get rid of -portrait/-rotate even though in theory you could use them on a non-pxa2xx machine type to achieve the odd effect of rotating mouse input. I've added a section to removed-features.rst about this and beefed up the patch commit message.
Of these, I think we should definitely be dropping microdrive, pcmcia, ecc, and the portrait/rotate options, and I didn't hear any dissenting opinions on v1.
For max111x and max7310: these are fairly small (a couple of hundred lines each) and not too badly behind the curve for code quality/API usage (in particular they're both QOM devices), so I could fairly easily be persuaded that they should stay. However I would like in that case to see:
(a) what's the use case/user ? (e.g. examples of "I'm actually using this on the command line, like this" or "I'm using this in the machine model I plan to submit in the next six months")
(b) some kind of testing of them (which we can write based on the answer to a.)
thanks
-- PMM
Peter Maydell (6):
hw/adc: Remove MAX111X device
hw/gpio: Remove MAX7310 device
hw/ide: Remove DSCM-1XXXX microdrive device model
hw: Remove PCMCIA subsystem
hw/block: Remove ecc
vl.c: Remove pxa2xx-specific -portrait and -rotate options
docs/about/removed-features.rst | 22 ++ include/hw/adc/max111x.h | 56 --- include/hw/block/flash.h | 11 - include/hw/pcmcia.h | 66 ---- include/sysemu/sysemu.h | 1 - hw/adc/max111x.c | 236 ------------ hw/block/ecc.c | 91 ----- hw/gpio/max7310.c | 217 ----------- hw/ide/microdrive.c | 644 -------------------------------- hw/pcmcia/pcmcia.c | 24 -- system/globals.c | 1 - system/vl.c | 11 - ui/input.c | 36 -- hw/Kconfig | 1 - hw/adc/Kconfig | 3 - hw/adc/meson.build | 1 - hw/arm/Kconfig | 1 - hw/block/Kconfig | 3 - hw/block/meson.build | 1 - hw/gpio/Kconfig | 4 - hw/gpio/meson.build | 1 - hw/ide/Kconfig | 6 - hw/ide/meson.build | 1 - hw/meson.build | 1 - hw/misc/Kconfig | 1 - hw/pcmcia/Kconfig | 2 - hw/pcmcia/meson.build | 1 - qemu-options.hx | 16 - 28 files changed, 22 insertions(+), 1437 deletions(-) delete mode 100644 include/hw/adc/max111x.h delete mode 100644 include/hw/pcmcia.h delete mode 100644 hw/adc/max111x.c delete mode 100644 hw/block/ecc.c delete mode 100644 hw/gpio/max7310.c delete mode 100644 hw/ide/microdrive.c delete mode 100644 hw/pcmcia/pcmcia.c delete mode 100644 hw/pcmcia/Kconfig delete mode 100644 hw/pcmcia/meson.build
Signature · 1 line
2.34.1
PATCH v2 1/6 hw/adc: Remove MAX111X device
The MAX111X ADC device was used only by the XScale-based Zaurus machine types. Now they have all been removed, we can drop this device model too.
Because this device is an SSI device, in theory it could be created by users on the command line for boards with a different SSI controller, but we don't believe users are doing this -- it would be impossible on the command line to connect up the GPIO inputs which correspond to ADC inputs, or the GPIO output which is an interrupt line. The only example a web search produces for "device max1111" or "device max1110" is our own bug report
https://gitlab.com/qemu-project/qemu/-/issues/2228
where it's used as an example of a bogus command that causes an assertion in an aspeed machine type that wasn't expecting anything other than flash devices on its SMC bus.
--- include/hw/adc/max111x.h | 56 ---------- hw/adc/max111x.c | 236 --------------------------------------- hw/adc/Kconfig | 3 - hw/adc/meson.build | 1 - 4 files changed, 296 deletions(-) delete mode 100644 include/hw/adc/max111x.h delete mode 100644 hw/adc/max111x.c
include/hw/adc/max111x.h deleted +0 -56
@@ -1,56 +0,0 @@ -/* -* Maxim MAX1110/1111 ADC chip emulation. -* -* Copyright (c) 2006 Openedhand Ltd. -* Written by Andrzej Zaborowski <[email protected]> -* -* This code is licensed under the GNU GPLv2. -* -* 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_MISC_MAX111X_H -#define HW_MISC_MAX111X_H - -#include "hw/ssi/ssi.h" -#include "qom/object.h" - -/* -* This is a model of the Maxim MAX1110/1111 ADC chip, which for QEMU -* is an SSI slave device. It has either 4 (max1110) or 8 (max1111) -* 8-bit ADC channels. -* -* QEMU interface: -* + GPIO inputs 0..3 (for max1110) or 0..7 (for max1111): set the value -* of each ADC input, as an unsigned 8-bit value -* + GPIO output 0: interrupt line -* + Properties "input0" to "input3" (max1110) or "input0" to "input7" -* (max1111): initial reset values for ADC inputs. -* -* Known bugs: -* + the interrupt line is not correctly implemented, and will never -* be lowered once it has been asserted. -*/ -struct MAX111xState { -SSIPeripheral parent_obj; - -qemu_irq interrupt; -/* Values of inputs at system reset (settable by QOM property) */ -uint8_t reset_input[8 ]; - -uint8_t tb1, rb2, rb3; -int cycle; - -uint8_t input[8 ]; -int inputs, com; -}; - -#define TYPE_MAX_111X "max111x" - -OBJECT_DECLARE_SIMPLE_TYPE(MAX111xState, MAX_111X) - -#define TYPE_MAX_1110 "max1110" -#define TYPE_MAX_1111 "max1111" - -#endif
hw/adc/max111x.c deleted +0 -236
236 lines not on this page · raw message
hw/adc/Kconfig +0 -3
@@ -1,5 +1,2 @@ config STM32F2XX_ADC bool - -config MAX111X - bool
hw/adc/meson.build +0 -1
@@ -2,4 +2,3 @@ system_ss.add(when: 'CONFIG_STM32F2XX_ADC', if_true: files('stm32f2xx_adc.c')) system_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files('aspeed_adc.c')) system_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_adc.c')) system_ss.add(when: 'CONFIG_ZYNQ', if_true: files('zynq-xadc.c')) -system_ss.add(when: 'CONFIG_MAX111X', if_true: files('max111x.c'))
Signature · 1 line
2.34.1
Re: [PATCH v2 1/6] hw/adc: Remove MAX111X device
Quoted 17 lines · Peter Maydell
The MAX111X ADC device was used only by the XScale-based Zaurus machine types. Now they have all been removed, we can drop this device model too.
Because this device is an SSI device, in theory it could be created by users on the command line for boards with a different SSI controller, but we don't believe users are doing this -- it would be impossible on the command line to connect up the GPIO inputs which correspond to ADC inputs, or the GPIO output which is an interrupt line. The only example a web search produces for "device max1111" or "device max1110" is our own bug report
https://gitlab.com/qemu-project/qemu/-/issues/2228
where it's used as an example of a bogus command that causes an assertion in an aspeed machine type that wasn't expecting anything other than flash devices on its SMC bus.Signed-off-by Peter Maydell <[email protected]>
Quoted 8 lines
--- include/hw/adc/max111x.h | 56 ---------- hw/adc/max111x.c | 236 --------------------------------------- hw/adc/Kconfig | 3 - hw/adc/meson.build | 1 - 4 files changed, 296 deletions(-)delete mode 100644
include/hw/adc/max111x.h
delete mode 100644hw/adc/max111x.c
PATCH v2 2/6 hw/gpio: Remove MAX7310 device
In reply to Peter MaydellThe MAX7310 GPIO controller was used only by the XScale-based Zaurus machine types. Now they have been removed we can remove this device model as well.
Because this device is an I2C device, in theory it could be created by users on the command line for boards with a different I2c controller, but we don't believe users are doing this -- it would be impossible on the command line to connect up the GPIO inputs/outputs. The only example a web search produces for "device max7310" is a user trying to create this because they didn't realize that there was no way to manipulate the GPIO lines.
--- hw/gpio/max7310.c | 217 -------------------------------------------- hw/gpio/Kconfig | 4 - hw/gpio/meson.build | 1 - 3 files changed, 222 deletions(-) delete mode 100644 hw/gpio/max7310.c
hw/gpio/max7310.c deleted +0 -217
@@ -1,217 +0,0 @@ -/* -* MAX7310 8-port GPIO expansion chip. -* -* Copyright (c) 2006 Openedhand Ltd. -* Written by Andrzej Zaborowski <[email protected]> -* -* This file is licensed under GNU GPL. -*/ - -#include "qemu/osdep.h" -#include "hw/i2c/i2c.h" -#include "hw/irq.h" -#include "migration/vmstate.h" -#include "qemu/log.h" -#include "qemu/module.h" -#include "qom/object.h" - -#define TYPE_MAX7310 "max7310" -OBJECT_DECLARE_SIMPLE_TYPE(MAX7310State, MAX7310) - -struct MAX7310State { -I2CSlave parent_obj; - -int i2c_command_byte; -int len; - -uint8_t level; -uint8_t direction; -uint8_t polarity; -uint8_t status; -uint8_t command; -qemu_irq handler[8 ]; -qemu_irq *gpio_in; -}; - -static void max7310_reset (DeviceState *dev) -{ -MAX7310State *s =MAX7310 (dev); - - s->level &= s->direction; - s->direction =0xff ; - s->polarity =0xf0 ; - s->status =0x01 ; - s->command =0x00 ; -} - -static uint8_t max7310_rx (I2CSlave *i2c) -{ -MAX7310State *s =MAX7310 (i2c); - -switch (s->command) { -case 0x00 :/* Input port */ -return s->level ^ s->polarity; - -case 0x01 :/* Output port */ -return s->level & ~s->direction; - -case 0x02 :/* Polarity inversion */ -return s->polarity; - -case 0x03 :/* Configuration */ -return s->direction; - -case 0x04 :/* Timeout */ -return s->status; - -case 0xff :/* Reserved */ -return 0xff ; - -default : -qemu_log_mask (LOG_UNIMP ,"%s: Unsupported register 0x02%" PRIx8"\n" , - __func__, s->command); -break ; - } -return 0xff ; -} - -static int max7310_tx (I2CSlave *i2c,uint8_t data) -{ -MAX7310State *s =MAX7310 (i2c); -uint8_t diff; -int line; - -if (s->len ++ >1 ) { -#ifdef VERBOSE -printf ("%s: message too long (%i bytes)\n" , __func__, s->len); -#endif -return 1 ; - } - -if (s->i2c_command_byte) { - s->command = data; - s->i2c_command_byte =0 ; -return 0 ; - } - -switch (s->command) { -case 0x01 :/* Output port */ -for (diff = (data ^ s->level) & ~s->direction; diff; - diff &= ~(1 << line)) { - line =ctz32 (diff); -if (s->handler[line]) -qemu_set_irq (s->handler[line], (data >> line) &1 ); - } - s->level = (s->level & s->direction) | (data & ~s->direction); -break ; - -case 0x02 :/* Polarity inversion */ - s->polarity = data; -break ; - -case 0x03 :/* Configuration */ - s->level &= ~(s->direction ^ data); - s->direction = data; -break ; - -case 0x04 :/* Timeout */ - s->status = data; -break ; - -case 0x00 :/* Input port - ignore writes */ -break ; -default : -qemu_log_mask (LOG_UNIMP ,"%s: Unsupported register 0x02%" PRIx8"\n" , - __func__, s->command); -return 1 ; - } - -return 0 ; -} - -static int max7310_event (I2CSlave *i2c,enum i2c_event event) -{ -MAX7310State *s =MAX7310 (i2c); - s->len =0 ; - -switch (event) { -case I2C_START_SEND : - s->i2c_command_byte =1 ; -break ; -case I2C_FINISH : -#ifdef VERBOSE -if (s->len ==1 ) -printf ("%s: message too short (%i bytes)\n" , __func__, s->len); -#endif -break ; -default : -break ; - } - -return 0 ; -} - -static const VMStateDescription vmstate_max7310 = { - .name ="max7310" , - .version_id =0 , - .minimum_version_id =0 , - .fields = (const VMStateField []) { -VMSTATE_INT32 (i2c_command_byte, MAX7310State), -VMSTATE_INT32 (len, MAX7310State), -VMSTATE_UINT8 (level, MAX7310State), -VMSTATE_UINT8 (direction, MAX7310State), -VMSTATE_UINT8 (polarity, MAX7310State), -VMSTATE_UINT8 (status, MAX7310State), -VMSTATE_UINT8 (command, MAX7310State), -VMSTATE_I2C_SLAVE (parent_obj, MAX7310State), -VMSTATE_END_OF_LIST () - } -}; - -static void max7310_gpio_set (void *opaque,int line,int level) -{ -MAX7310State *s = (MAX7310State *) opaque; -assert (line >=0 && line <ARRAY_SIZE (s->handler)); - -if (level) - s->level |= s->direction & (1 << line); -else - s->level &= ~(s->direction & (1 << line)); -} - -/* MAX7310 is SMBus-compatible (can be used with only SMBus protocols), -* but also accepts sequences that are not SMBus so return an I2C device. */ -static void max7310_realize (DeviceState *dev,Error **errp) -{ -MAX7310State *s =MAX7310 (dev); - -qdev_init_gpio_in (dev, max7310_gpio_set,ARRAY_SIZE (s->handler)); -qdev_init_gpio_out (dev, s->handler,ARRAY_SIZE (s->handler)); -} - -static void max7310_class_init (ObjectClass *klass,void *data) -{ -DeviceClass *dc =DEVICE_CLASS (klass); -I2CSlaveClass *k =I2C_SLAVE_CLASS (klass); - - dc->realize = max7310_realize; - k->event = max7310_event; - k->recv = max7310_rx; - k->send = max7310_tx; -device_class_set_legacy_reset (dc, max7310_reset); - dc->vmsd = &vmstate_max7310; -} - -static const TypeInfo max7310_info = { - .name =TYPE_MAX7310 , - .parent =TYPE_I2C_SLAVE , - .instance_size =sizeof (MAX7310State), - .class_init = max7310_class_init, -}; - -static void max7310_register_types (void ) -{ -type_register_static (&max7310_info); -} - -type_init (max7310_register_types)
hw/gpio/Kconfig +0 -4
@@ -1,7 +1,3 @@ -config MAX7310 - bool - depends on I2C - config PL061 bool
hw/gpio/meson.build +0 -1
@@ -1,7 +1,6 @@ system_ss.add(when: 'CONFIG_GPIO_KEY', if_true: files('gpio_key.c')) system_ss.add(when: 'CONFIG_GPIO_MPC8XXX', if_true: files('mpc8xxx.c')) system_ss.add(when: 'CONFIG_GPIO_PWR', if_true: files('gpio_pwr.c')) -system_ss.add(when: 'CONFIG_MAX7310', if_true: files('max7310.c')) system_ss.add(when: 'CONFIG_PCA9552', if_true: files('pca9552.c')) system_ss.add(when: 'CONFIG_PCA9554', if_true: files('pca9554.c')) system_ss.add(when: 'CONFIG_PL061', if_true: files('pl061.c'))
Signature · 1 line
2.34.1
Re: [PATCH v2 2/6] hw/gpio: Remove MAX7310 device
Quoted 12 lines · Peter Maydell
The MAX7310 GPIO controller was used only by the XScale-based Zaurus machine types. Now they have been removed we can remove this device model as well.
Because this device is an I2C device, in theory it could be created by users on the command line for boards with a different I2c controller, but we don't believe users are doing this -- it would be impossible on the command line to connect up the GPIO inputs/outputs. The only example a web search produces for "device max7310" is a user trying to create this because they didn't realize that there was no way to manipulate the GPIO lines.
Quoted 7 lines
Signed-off-by Peter Maydell <[email protected]>--- hw/gpio/max7310.c | 217 -------------------------------------------- hw/gpio/Kconfig | 4 - hw/gpio/meson.build | 1 - 3 files changed, 222 deletions(-)delete mode 100644
hw/gpio/max7310.c
PATCH v2 3/6 hw/ide: Remove DSCM-1XXXX microdrive device model
In reply to Peter MaydellThe DSCM-1XXXX microdrive device model was used only by the XScale-based Zaurus machine types. Now they have been removed, we can delete this device too.
--- include/hw/pcmcia.h | 3 - hw/ide/microdrive.c | 644 -------------------------------------------- hw/ide/Kconfig | 6 - hw/ide/meson.build | 1 - 4 files changed, 654 deletions(-) delete mode 100644 hw/ide/microdrive.c
include/hw/pcmcia.h +0 -3
@@ -60,7 +60,4 @@ struct PCMCIACardClass {#define CISTPL_END 0xff/* Tuple End */ #define CISTPL_ENDMARK 0xff -/* dscm1xxxx.c */ -PCMCIACardState *dscm1xxxx_init (DriveInfo *bdrv); -#endif
hw/ide/microdrive.c deleted +0 -644
644 lines not on this page · raw message
hw/ide/Kconfig +0 -6
@@ -43,12 +43,6 @@ config IDE_VIA bool select IDE_PCI -config MICRODRIVE - bool - select IDE_BUS - select IDE_DEV - depends on PCMCIA - config AHCI bool select IDE_BUS
hw/ide/meson.build +0 -1
@@ -13,4 +13,3 @@ system_ss.add(when: 'CONFIG_IDE_PCI', if_true: files('pci.c')) system_ss.add(when: 'CONFIG_IDE_PIIX', if_true: files('piix.c', 'ioport.c')) system_ss.add(when: 'CONFIG_IDE_SII3112', if_true: files('sii3112.c')) system_ss.add(when: 'CONFIG_IDE_VIA', if_true: files('via.c')) -system_ss.add(when: 'CONFIG_MICRODRIVE', if_true: files('microdrive.c'))
Signature · 1 line
2.34.1
Re: [PATCH v2 3/6] hw/ide: Remove DSCM-1XXXX microdrive device model
Quoted 4 lines · Peter Maydell
The DSCM-1XXXX microdrive device model was used only by the XScale-based Zaurus machine types. Now they have been removed, we can delete this device too.
Quoted 8 lines
Signed-off-by Peter Maydell <[email protected]>--- include/hw/pcmcia.h | 3 - hw/ide/microdrive.c | 644 -------------------------------------------- hw/ide/Kconfig | 6 - hw/ide/meson.build | 1 - 4 files changed, 654 deletions(-)delete mode 100644
hw/ide/microdrive.c
PATCH v2 4/6 hw: Remove PCMCIA subsystem
In reply to Peter MaydellThe only PCMCIA subsystem was the PXA2xx SoC and the machines using it, which have now been removed. Although in theory we have a few machine types which have PCMCIA (e.g. kzm, the strongarm machines, sh4's sh7750), none of those machines implement their PCMCIA controller, and they're all old and no longer very interesting machine types.
Rather than keeping all the PCMCIA code in-tree without any active users of it, delete it. If we need PCMCIA in future we can always resurrect it.
--- include/hw/pcmcia.h | 63 ------------------------------------------- hw/pcmcia/pcmcia.c | 24 ----------------- hw/Kconfig | 1 - hw/meson.build | 1 - hw/pcmcia/Kconfig | 2 -- hw/pcmcia/meson.build | 1 - 6 files changed, 92 deletions(-) delete mode 100644 include/hw/pcmcia.h delete mode 100644 hw/pcmcia/pcmcia.c delete mode 100644 hw/pcmcia/Kconfig delete mode 100644 hw/pcmcia/meson.build
include/hw/pcmcia.h deleted +0 -63
@@ -1,63 +0,0 @@ -#ifndef HW_PCMCIA_H -#define HW_PCMCIA_H - -/* PCMCIA/Cardbus */ - -#include "hw/qdev-core.h" -#include "qom/object.h" - -typedef struct PCMCIASocket { -qemu_irq irq; -bool attached; -}PCMCIASocket ; - -#define TYPE_PCMCIA_CARD "pcmcia-card" -OBJECT_DECLARE_TYPE(PCMCIACardState, PCMCIACardClass, PCMCIA_CARD) - -struct PCMCIACardState { -/*< private >*/ -DeviceState parent_obj; -/*< public >*/ - -PCMCIASocket *slot; -}; - -struct PCMCIACardClass { -/*< private >*/ -DeviceClass parent_class; -/*< public >*/ - -int (*attach)(PCMCIACardState *state); -int (*detach)(PCMCIACardState *state); - -const uint8_t *cis; -int cis_len; - -/* Only valid if attached */ -uint8_t (*attr_read)(PCMCIACardState *card,uint32_t address); -void (*attr_write)(PCMCIACardState *card,uint32_t address,uint8_t value); -uint16_t (*common_read)(PCMCIACardState *card,uint32_t address); -void (*common_write)(PCMCIACardState *card, -uint32_t address,uint16_t value); -uint16_t (*io_read)(PCMCIACardState *card,uint32_t address); -void (*io_write)(PCMCIACardState *card,uint32_t address,uint16_t value); -}; - -#define CISTPL_DEVICE 0x01/* 5V Device Information Tuple */ -#define CISTPL_NO_LINK 0x14/* No Link Tuple */ -#define CISTPL_VERS_1 0x15/* Level 1 Version Tuple */ -#define CISTPL_JEDEC_C 0x18/* JEDEC ID Tuple */ -#define CISTPL_JEDEC_A 0x19/* JEDEC ID Tuple */ -#define CISTPL_CONFIG 0x1a/* Configuration Tuple */ -#define CISTPL_CFTABLE_ENTRY 0x1b/* 16-bit PCCard Configuration */ -#define CISTPL_DEVICE_OC 0x1c/* Additional Device Information */ -#define CISTPL_DEVICE_OA 0x1d/* Additional Device Information */ -#define CISTPL_DEVICE_GEO 0x1e/* Additional Device Information */ -#define CISTPL_DEVICE_GEO_A 0x1f/* Additional Device Information */ -#define CISTPL_MANFID 0x20/* Manufacture ID Tuple */ -#define CISTPL_FUNCID 0x21/* Function ID Tuple */ -#define CISTPL_FUNCE 0x22/* Function Extension Tuple */ -#define CISTPL_END 0xff/* Tuple End */ -#define CISTPL_ENDMARK 0xff - -#endif
hw/pcmcia/pcmcia.c deleted +0 -24
@@ -1,24 +0,0 @@ -/* -* PCMCIA emulation -* -* Copyright 2013 SUSE LINUX Products GmbH -*/ - -#include "qemu/osdep.h" -#include "qemu/module.h" -#include "hw/pcmcia.h" - -static const TypeInfo pcmcia_card_type_info = { - .name =TYPE_PCMCIA_CARD , - .parent =TYPE_DEVICE , - .instance_size =sizeof (PCMCIACardState), - .abstract = true, - .class_size =sizeof (PCMCIACardClass), -}; - -static void pcmcia_register_types (void ) -{ -type_register_static (&pcmcia_card_type_info); -} - -type_init (pcmcia_register_types)
hw/Kconfig +0 -1
@@ -27,7 +27,6 @@ source nvme/Kconfig source nvram/Kconfig source pci-bridge/Kconfig source pci-host/Kconfig -source pcmcia/Kconfig source pci/Kconfig source remote/Kconfig source rtc/Kconfig
hw/meson.build +0 -1
@@ -27,7 +27,6 @@ subdir('nvram') subdir('pci') subdir('pci-bridge') subdir('pci-host') -subdir('pcmcia') subdir('rtc') subdir('scsi') subdir('sd')
hw/pcmcia/Kconfig deleted +0 -2
@@ -1,2 +0,0 @@ -config PCMCIA - bool
hw/pcmcia/meson.build deleted +0 -1
@@ -1 +0,0 @@ -system_ss.add(when: 'CONFIG_PCMCIA', if_true: files('pcmcia.c'))
Signature · 1 line
2.34.1
PATCH v2 5/6 hw/block: Remove ecc
In reply to Peter MaydellThe ecc.c code was used only by the PXA2xx and OMAP2 SoC devices, which we have removed, so it is now completely unused.
Note that hw/misc/eccmemctl.c does not in fact use any of the code frome ecc.c, so that KConfig dependency was incorrect.
--- include/hw/block/flash.h | 11 ----- hw/block/ecc.c | 91 ---------------------------------------- hw/arm/Kconfig | 1 - hw/block/Kconfig | 3 -- hw/block/meson.build | 1 - hw/misc/Kconfig | 1 - 6 files changed, 108 deletions(-) delete mode 100644 hw/block/ecc.c
include/hw/block/flash.h +0 -11
@@ -62,17 +62,6 @@ uint32_t nand_getbuswidth(DeviceState *dev);#define NAND_MFR_HYNIX 0xad#define NAND_MFR_MICRON 0x2c -/* ecc.c */ -typedef struct { -uint8_t cp;/* Column parity */ -uint16_t lp[2 ];/* Line parity */ -uint16_t count; -}ECCState ; - -uint8_t ecc_digest (ECCState *s,uint8_t sample); -void ecc_reset (ECCState *s); -extern const VMStateDescription vmstate_ecc_state; -/* m25p80.c */ #define TYPE_M25P80 "m25p80-generic"
hw/block/ecc.c deleted +0 -91
91 lines not on this page · raw message
hw/arm/Kconfig +0 -1
@@ -146,7 +146,6 @@ config OMAP bool select FRAMEBUFFER select I2C - select ECC select NAND select PFLASH_CFI01 select SD
hw/block/Kconfig +0 -3
@@ -22,9 +22,6 @@ config PFLASH_CFI01 config PFLASH_CFI02 bool -config ECC - bool - config VIRTIO_BLK bool default y
hw/block/meson.build +0 -1
@@ -3,7 +3,6 @@ system_ss.add(files( 'cdrom.c', 'hd-geometry.c' )) -system_ss.add(when: 'CONFIG_ECC', if_true: files('ecc.c')) system_ss.add(when: 'CONFIG_FDC', if_true: files('fdc.c')) system_ss.add(when: 'CONFIG_FDC_ISA', if_true: files('fdc-isa.c')) system_ss.add(when: 'CONFIG_FDC_SYSBUS', if_true: files('fdc-sysbus.c'))
hw/misc/Kconfig +0 -1
@@ -74,7 +74,6 @@ config IVSHMEM_DEVICE config ECCMEMCTL bool - select ECC config IMX bool
Signature · 1 line
2.34.1
Re: [PATCH v2 5/6] hw/block: Remove ecc
Quoted 15 lines · Peter Maydell
The
ecc.ccode was used only by the PXA2xx and OMAP2 SoC devices, which we have removed, so it is now completely unused.Note that
hw/misc/eccmemctl.cdoes not in fact use any of the code fromeecc.c, so that KConfig dependency was incorrect.Signed-off-by Peter Maydell <[email protected]>--- include/hw/block/flash.h | 11 ----- hw/block/ecc.c | 91 ---------------------------------------- hw/arm/Kconfig | 1 - hw/block/Kconfig | 3 -- hw/block/meson.build | 1 - hw/misc/Kconfig | 1 - 6 files changed, 108 deletions(-)
Quoted 1 line
delete mode 100644
hw/block/ecc.c
PATCH v2 6/6 vl.c: Remove pxa2xx-specific -portrait and -rotate options
In reply to Peter MaydellThe ``-portrait`` and ``-rotate`` options were documented as only working with the PXA LCD device, and all the machine types using that display device were removed in 9.2.
These options were intended to simulate a mobile device being rotated by the user, and had three effects:
* the display output was rotated by 90, 180 or 270 degrees (implemented in the PXA display device models)
* the mouse/trackpad input was rotated the opposite way (implemented in generic code)
* the machine model would signal to the guest about its orientation
(implemented by e.g. the spitz machine model)
Of these three things, the input-rotation was coded without being restricted to boards which supported the full set of device-rotation handling, so in theory the options were usable on other machine models with odd effects (rotating input but not display output). But this was never intended or documented behaviour, so we can reasonably drop these command line arguments without a formal deprecate-and-drop cycle for them.
Remove the options, and their implementation and documentation. Describe the removal in removed-features.rst.
--- docs/about/removed-features.rst | 22 ++++++++++++++++++++ include/sysemu/sysemu.h | 1 - system/globals.c | 1 - system/vl.c | 11 ---------- ui/input.c | 36 --------------------------------- qemu-options.hx | 16 --------------- 6 files changed, 22 insertions(+), 65 deletions(-)
docs/about/removed-features.rst +22 -0
@@ -517,6 +517,28 @@ The virtio-blk SCSI passthrough feature is a legacy VIRTIO feature. VIRTIO 1.0 and later do not support it because the virtio-scsi device was introduced for full SCSI support. Use virtio-scsi instead when SCSI passthrough is required. +``-portrait`` and ``-rotate`` (since 9.2) +''''''''''''''''''''''''''''''''''''''''' + +The ``-portrait`` and ``-rotate`` options were documented as only +working with the PXA LCD device, and all the machine types using +that display device were removed in 9.2, so these options also +have been dropped. + +These options were intended to simulate a mobile device being +rotated by the user, and had three effects: + +* the display output was rotated by 90, 180 or 270 degrees +* the mouse/trackpad input was rotated the opposite way +* the machine model would signal to the guest about its + orientation + +Of these three things, the input-rotation was coded without being +restricted to boards which supported the full set of device-rotation +handling, so in theory the options were usable on other machine models +to produce an odd effect (rotating input but not display output). But +this was never intended or documented behaviour, so we have dropped +the options along with the machine models they were intended for. User-mode emulator command line arguments -----------------------------------------
include/sysemu/sysemu.h +0 -1
@@ -41,7 +41,6 @@ extern int graphic_height;extern int graphic_depth;extern int display_opengl;extern const char *keyboard_layout; -extern int graphic_rotate;extern int old_param;extern uint8_t *boot_splash_filedata;extern bool enable_mlock;
system/globals.c +0 -1
@@ -40,7 +40,6 @@ int autostart = 1;int vga_interface_type =VGA_NONE ;bool vga_interface_created;Chardev *parallel_hds[MAX_PARALLEL_PORTS ]; -int graphic_rotate;QEMUOptionRom option_rom[MAX_OPTION_ROMS ];int nb_option_roms;int old_param;
system/vl.c +0 -11
@@ -2910,17 +2910,6 @@ void qemu_init(int argc, char **argv) nographic = true; dpy.type =DISPLAY_TYPE_NONE ;break ; -case QEMU_OPTION_portrait: - graphic_rotate =90 ; -break ; -case QEMU_OPTION_rotate: - graphic_rotate =strtol (optarg, (char **) &optarg,10 ); -if (graphic_rotate !=0 && graphic_rotate !=90 && - graphic_rotate !=180 && graphic_rotate !=270 ) { -error_report ("only 90, 180, 270 deg rotation is available" ); -exit (1 ); - } -break ;case QEMU_OPTION_kernel:qdict_put_str (machine_opts_dict,"kernel" , optarg);break ;
ui/input.c +0 -36
@@ -174,37 +174,6 @@ void qmp_input_send_event(const char *device,qemu_input_event_sync (); } -static int qemu_input_transform_invert_abs_value (int value) -{ -return (int64_t )INPUT_EVENT_ABS_MAX - value +INPUT_EVENT_ABS_MIN ; -} - -static void qemu_input_transform_abs_rotate (InputEvent *evt) -{ -InputMoveEvent *move = evt->u.abs.data; -switch (graphic_rotate) { -case 90 : -if (move->axis ==INPUT_AXIS_X ) { - move->axis =INPUT_AXIS_Y ; - }else if (move->axis ==INPUT_AXIS_Y ) { - move->axis =INPUT_AXIS_X ; - move->value =qemu_input_transform_invert_abs_value (move->value); - } -break ; -case 180 : - move->value =qemu_input_transform_invert_abs_value (move->value); -break ; -case 270 : -if (move->axis ==INPUT_AXIS_X ) { - move->axis =INPUT_AXIS_Y ; - move->value =qemu_input_transform_invert_abs_value (move->value); - }else if (move->axis ==INPUT_AXIS_Y ) { - move->axis =INPUT_AXIS_X ; - } -break ; - } -} -static void qemu_input_event_trace (QemuConsole *src,InputEvent *evt) {const char *name;
@@ -340,11 +309,6 @@ void qemu_input_event_send_impl(QemuConsole *src, InputEvent *evt)qemu_input_event_trace (src, evt); -/* pre processing */ -if (graphic_rotate && (evt->type ==INPUT_EVENT_KIND_ABS )) { -qemu_input_transform_abs_rotate (evt); - } -/* send event */ s =qemu_input_find_handler (1 << evt->type, src);if (!s) {
qemu-options.hx +0 -16
@@ -2377,22 +2377,6 @@ SRST pick the first available. (Since 2.9) ERST -DEF("portrait", 0, QEMU_OPTION_portrait, - "-portrait rotate graphical output 90 deg left (only PXA LCD)\n", - QEMU_ARCH_ALL) -SRST -``-portrait`` - Rotate graphical output 90 deg left (only PXA LCD). -ERST - -DEF("rotate", HAS_ARG, QEMU_OPTION_rotate, - "-rotate <deg> rotate graphical output some deg left (only PXA LCD)\n", - QEMU_ARCH_ALL) -SRST -``-rotate deg`` - Rotate graphical output some deg left (only PXA LCD). -ERST - DEF("vga", HAS_ARG, QEMU_OPTION_vga, "-vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none]\n" " select video card type\n", QEMU_ARCH_ALL)
Signature · 1 line
2.34.1
Quoted 46 lines · Peter Maydell
This series is the remaining patches not yet applied from my "arm:
Drop deprecated boards" series; this is essentially the device removals which didn't get review in that series and/or which had some discussion about whether we should remove them.To summarise the remaining removals:
* max1110 and max1111 are SSI devices so in theory could be created by users on the command line. However I found no evidence of doing this when I did a web search for "device max1110", and the utility of doing so is unclear to me since it's not possible for the command line device to have its ADC inputs or its interrupt line output wired up to anything.
* max7310 is an I2C GPIO controller, so it has the same "in theory a user could create this on the command line but in practice it's pretty useless because there's no way to wire up the GPIO lines to anything" status.
* the microdrive device can only be used with our PCMCIA bus emulation, and we no longer have any boards using that, so I think these are uncontroversially deleteable. Some boards we still have should in theory have a PCMCIA controller (strongarm, kzm, sh7750), but we don't model those controllers and none of those boards are sufficiently interesting or active that it's likely anybody will ever add one.
* The ECC code is entirely unused now; this is an uncontroversial removal of dead code, and I only didn't put it in my pullreq because it wasn't reviewed yet.
* Consensus on the v1 series was that we could get rid of -portrait/-rotate even though in theory you could use them on a non-pxa2xx machine type to achieve the odd effect of rotating mouse input. I've added a section toremoved-features.rstabout this and beefed up the patch commit message.Of these, I think we should definitely be dropping microdrive, pcmcia, ecc, and the portrait/rotate options, and I didn't hear any dissenting opinions on v1.
For max111x and max7310: these are fairly small (a couple of hundred lines each) and not too badly behind the curve for code quality/API usage (in particular they're both QOM devices), so I could fairly easily be persuaded that they should stay. However I would like in that case to see:
Quoted 6 lines
(a) what's the use case/user ? (e.g. examples of "I'm actually using this on the command line, like this" or "I'm using this in the machine model I plan to submit in the next six months")
(b) some kind of testing of them (which we can write based on the answer to a.)
I have no trouble deleting them now and resurrecting if and when they ever get used, especially since I think that has low odds.
Quoted 7 lines
Peter Maydell (6):
hw/adc: Remove MAX111X device
hw/gpio: Remove MAX7310 device
hw/ide: Remove DSCM-1XXXX microdrive device model
hw: Remove PCMCIA subsystem
hw/block: Remove ecc
vl.c: Remove pxa2xx-specific -portrait and -rotate options
Series:
r~