All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/50] hppa: general improvements and tidy-ups
@ 2022-05-04  9:25 Mark Cave-Ayland
  2022-05-04  9:25 ` [PATCH v2 01/50] dino: checkpatch fixes Mark Cave-Ayland
                   ` (50 more replies)
  0 siblings, 51 replies; 104+ messages in thread
From: Mark Cave-Ayland @ 2022-05-04  9:25 UTC (permalink / raw)
  To: richard.henderson, deller, qemu-devel

This patchset started off when I noticed that dino.c was accessing parent_obj
directly rather than using a QOM cast. After fixing that I noticed quite a few
other improvements that could be done to bring hppa up to our recommended
coding standards.

The main aim of this patchset is to de-couple the dino and lasi devices from
the board using QOM to handle the initialisation instead of having global
device init functions. Included in this is switching the onboard devices
over to use qdev GPIOs for wiring instead of directly allocating QEMU IRQs.

Along the way I've renamed the board config from CONFIG_DINO to
CONFIG_HPPA_B160L since that better represents the machine type, and then
used CONFIG_DINO and CONFIG_LASI for the appropriate devices which have been
moved to hw/pci-host/dino.c and hw/misc/lasi.c respectively.

After the reorganisation it was trivial to remove hppa_sys.h and the majority
of pci.c which wasn't being used. Finally I tidied up the use of the QOM
machine type macros in machine.c.

The result has been lightly tested with a tiny Linux image I had lying around
for testing my recent ESP changes, so more testing is welcome. There is a bit
more work to be done sorting out the lasips2 device init and machine init, but
since the patchset is already quite big I can follow up with that once this
series has been merged.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

v2:
- Rebase onto master
- Add R-B tag to patch 1 from Richard
- Add A-B tag from Helge to entire series
- Update patch 12 to use CONFIG_HPPA_B160L instead of CONFIG_HPPA_GENERIC and
  also update the machine description


Mark Cave-Ayland (50):
  dino: checkpatch fixes
  dino: move registers from dino_init() to DINO_PCI_BRIDGE init function
  dino: move PCI bus initialisation to dino_pcihost_init()
  dino: move PCI windows initialisation to dino_pcihost_init()
  dino: add memory-as property containing a link to the memory address
    space
  dino: move pci_setup_iommu() to dino_pcihost_init()
  dino: move PCI bus master address space setup to
    dino_pcihost_realize()
  dino: move initial register configuration to new dino_pcihost_reset()
    function
  dino: use QOM cast instead of directly referencing parent_obj
  dino: return PCIBus from dino_init() using qdev_get_child_bus()
  dino: split declarations from dino.c into dino.h
  hppa: use new CONFIG_HPPA_B160L option instead of CONFIG_DINO to build
    hppa machine
  dino: change dino_init() to return the DINO device instead of PCIBus
  machine.c: map DINO device during board configuration
  dino.h: add defines for DINO IRQ numbers
  dino: define IRQ inputs as qdev GPIOs
  dino: wire up serial IRQ using a qdev GPIO in machine.c
  dino: remove unused dino_set_timer_irq() IRQ handler
  hppa: move dino_init() from dino.c to machine.c
  dino: use numerical constant for iar0 and iar1 reset values
  dino: move DINO HPA constants from hppa_hardware.h to dino.h
  dino: move from hw/hppa to hw/pci-host
  lasi: checkpatch fixes
  lasi: move memory region initialisation to new lasi_init() function
  lasi: move register memory mapping from lasi.c to machine.c
  lasi: move initialisation of iar and rtc to new lasi_reset() function
  lasi: move LASIState and associated QOM structures to lasi.h
  lasi: replace lasi_get_irq() with defined constants
  lasi: define IRQ inputs as qdev GPIOs
  lasi: use qdev GPIOs to wire up IRQs in lasi_initfn()
  lasi: fix serial port initialisation
  lasi: update lasi_initfn() to return LASIState
  lasi: move LAN initialisation to machine.c
  lasi: move parallel port initialisation to machine.c
  lasi: move second serial port initialisation to machine.c
  lasi: move PS2 initialisation to machine.c
  lasi: remove address space parameter from lasi_initfn()
  lasi: move lasi_initfn() to machine.c
  lasi: use constants for device register offsets
  lasi: use numerical constant for iar reset value
  hppa: move device headers from hppa_sys.h into individual .c files
  lasi: move from hw/hppa to hw/misc
  hppa: move hppa_pci_ignore_ops from pci.c to machine.c
  hppa: remove hw/hppa/pci.c
  hppa: remove unused trace-events from from hw/hppa
  hppa: move enable_lan() define from hppa_sys.h to machine.c
  hppa: remove the empty hppa_sys.h file
  hppa: use MACHINE QOM macros for defining the hppa machine
  hppa: fold machine_hppa_machine_init() into
    machine_hppa_machine_init_class_init()
  hppa: simplify machine function names in machine.c

 MAINTAINERS                              |   4 +
 configs/devices/hppa-softmmu/default.mak |   2 +-
 hw/hppa/Kconfig                          |   5 +-
 hw/hppa/hppa_hardware.h                  |   5 -
 hw/hppa/hppa_sys.h                       |  24 ---
 hw/hppa/machine.c                        | 124 +++++++++---
 hw/hppa/meson.build                      |   2 +-
 hw/hppa/pci.c                            |  88 ---------
 hw/hppa/trace-events                     |  14 --
 hw/misc/Kconfig                          |   3 +
 hw/{hppa => misc}/lasi.c                 | 161 ++++------------
 hw/misc/meson.build                      |   3 +
 hw/misc/trace-events                     |   5 +
 hw/pci-host/Kconfig                      |   4 +
 hw/{hppa => pci-host}/dino.c             | 231 +++++++----------------
 hw/pci-host/meson.build                  |   3 +
 hw/pci-host/trace-events                 |   5 +
 include/hw/misc/lasi.h                   |  78 ++++++++
 include/hw/pci-host/dino.h               | 146 ++++++++++++++
 meson.build                              |   1 -
 20 files changed, 463 insertions(+), 445 deletions(-)
 delete mode 100644 hw/hppa/hppa_sys.h
 delete mode 100644 hw/hppa/pci.c
 delete mode 100644 hw/hppa/trace-events
 rename hw/{hppa => misc}/lasi.c (60%)
 rename hw/{hppa => pci-host}/dino.c (71%)
 create mode 100644 include/hw/misc/lasi.h
 create mode 100644 include/hw/pci-host/dino.h

-- 
2.20.1



^ permalink raw reply	[flat|nested] 104+ messages in thread

end of thread, other threads:[~2022-05-08 13:31 UTC | newest]

Thread overview: 104+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04  9:25 [PATCH v2 00/50] hppa: general improvements and tidy-ups Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 01/50] dino: checkpatch fixes Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 02/50] dino: move registers from dino_init() to DINO_PCI_BRIDGE init function Mark Cave-Ayland
2022-05-04 15:44   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 03/50] dino: move PCI bus initialisation to dino_pcihost_init() Mark Cave-Ayland
2022-05-04 16:50   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 04/50] dino: move PCI windows " Mark Cave-Ayland
2022-05-04 16:51   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 05/50] dino: add memory-as property containing a link to the memory address space Mark Cave-Ayland
2022-05-04 16:52   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 06/50] dino: move pci_setup_iommu() to dino_pcihost_init() Mark Cave-Ayland
2022-05-04 16:54   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 07/50] dino: move PCI bus master address space setup to dino_pcihost_realize() Mark Cave-Ayland
2022-05-04 16:55   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 08/50] dino: move initial register configuration to new dino_pcihost_reset() function Mark Cave-Ayland
2022-05-04 16:55   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 09/50] dino: use QOM cast instead of directly referencing parent_obj Mark Cave-Ayland
2022-05-04 16:56   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 10/50] dino: return PCIBus from dino_init() using qdev_get_child_bus() Mark Cave-Ayland
2022-05-04 16:56   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 11/50] dino: split declarations from dino.c into dino.h Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 12/50] hppa: use new CONFIG_HPPA_B160L option instead of CONFIG_DINO to build hppa machine Mark Cave-Ayland
2022-05-04 15:41   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 13/50] dino: change dino_init() to return the DINO device instead of PCIBus Mark Cave-Ayland
2022-05-05 17:41   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 14/50] machine.c: map DINO device during board configuration Mark Cave-Ayland
2022-05-05 17:44   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 15/50] dino.h: add defines for DINO IRQ numbers Mark Cave-Ayland
2022-05-05 17:45   ` Richard Henderson
2022-05-05 17:46   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 16/50] dino: define IRQ inputs as qdev GPIOs Mark Cave-Ayland
2022-05-05 17:47   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 17/50] dino: wire up serial IRQ using a qdev GPIO in machine.c Mark Cave-Ayland
2022-05-05 17:48   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 18/50] dino: remove unused dino_set_timer_irq() IRQ handler Mark Cave-Ayland
2022-05-05 17:49   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 19/50] hppa: move dino_init() from dino.c to machine.c Mark Cave-Ayland
2022-05-05 17:50   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 20/50] dino: use numerical constant for iar0 and iar1 reset values Mark Cave-Ayland
2022-05-05 17:52   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 21/50] dino: move DINO HPA constants from hppa_hardware.h to dino.h Mark Cave-Ayland
2022-05-05 17:52   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 22/50] dino: move from hw/hppa to hw/pci-host Mark Cave-Ayland
2022-05-05 17:55   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 23/50] lasi: checkpatch fixes Mark Cave-Ayland
2022-05-04 15:44   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 24/50] lasi: move memory region initialisation to new lasi_init() function Mark Cave-Ayland
2022-05-05 18:08   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 25/50] lasi: move register memory mapping from lasi.c to machine.c Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 26/50] lasi: move initialisation of iar and rtc to new lasi_reset() function Mark Cave-Ayland
2022-05-06  4:19   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 27/50] lasi: move LASIState and associated QOM structures to lasi.h Mark Cave-Ayland
2022-05-06  4:20   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 28/50] lasi: replace lasi_get_irq() with defined constants Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 29/50] lasi: define IRQ inputs as qdev GPIOs Mark Cave-Ayland
2022-05-06  4:26   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 30/50] lasi: use qdev GPIOs to wire up IRQs in lasi_initfn() Mark Cave-Ayland
2022-05-08  2:21   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 31/50] lasi: fix serial port initialisation Mark Cave-Ayland
2022-05-08  2:23   ` Richard Henderson
2022-05-08  2:33   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 32/50] lasi: update lasi_initfn() to return LASIState Mark Cave-Ayland
2022-05-08  2:35   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 33/50] lasi: move LAN initialisation to machine.c Mark Cave-Ayland
2022-05-08  2:37   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 34/50] lasi: move parallel port " Mark Cave-Ayland
2022-05-08  2:41   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 35/50] lasi: move second serial " Mark Cave-Ayland
2022-05-08  2:50   ` Richard Henderson
2022-05-08  8:50     ` Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 36/50] lasi: move PS2 " Mark Cave-Ayland
2022-05-08  2:52   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 37/50] lasi: remove address space parameter from lasi_initfn() Mark Cave-Ayland
2022-05-08  2:53   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 38/50] lasi: move lasi_initfn() to machine.c Mark Cave-Ayland
2022-05-08  2:54   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 39/50] lasi: use constants for device register offsets Mark Cave-Ayland
2022-05-08  3:04   ` Richard Henderson
2022-05-08  8:56     ` Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 40/50] lasi: use numerical constant for iar reset value Mark Cave-Ayland
2022-05-08  2:58   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 41/50] hppa: move device headers from hppa_sys.h into individual .c files Mark Cave-Ayland
2022-05-08  2:59   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 42/50] lasi: move from hw/hppa to hw/misc Mark Cave-Ayland
2022-05-08  3:07   ` Richard Henderson
2022-05-08  9:09     ` Mark Cave-Ayland
2022-05-04  9:25 ` [PATCH v2 43/50] hppa: move hppa_pci_ignore_ops from pci.c to machine.c Mark Cave-Ayland
2022-05-08  3:13   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 44/50] hppa: remove hw/hppa/pci.c Mark Cave-Ayland
2022-05-08  3:14   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 45/50] hppa: remove unused trace-events from from hw/hppa Mark Cave-Ayland
2022-05-08  3:15   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 46/50] hppa: move enable_lan() define from hppa_sys.h to machine.c Mark Cave-Ayland
2022-05-08  3:17   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 47/50] hppa: remove the empty hppa_sys.h file Mark Cave-Ayland
2022-05-08  3:17   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 48/50] hppa: use MACHINE QOM macros for defining the hppa machine Mark Cave-Ayland
2022-05-08  3:18   ` Richard Henderson
2022-05-04  9:25 ` [PATCH v2 49/50] hppa: fold machine_hppa_machine_init() into machine_hppa_machine_init_class_init() Mark Cave-Ayland
2022-05-08  3:19   ` Richard Henderson
2022-05-04  9:26 ` [PATCH v2 50/50] hppa: simplify machine function names in machine.c Mark Cave-Ayland
2022-05-08  3:19   ` Richard Henderson
2022-05-08  9:21 ` [PATCH v2 00/50] hppa: general improvements and tidy-ups Mark Cave-Ayland
2022-05-08 13:30   ` Richard Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.