hw: Move ARM_SYSCTL_GPIO definitions to arm sysctl specific header
PATCH 1/1 hw: Move ARM_SYSCTL_GPIO definitions to arm sysctl specific header
include/hw/arm/primecell.h used to be more expansive, but now the only thing it defines is the ARM_SYSCTL_GPIO_* constants for the GPIO lines for the arm-sysctl system-control device used on the Realview, Versatile and Versatile Express boards.
Replace it with a header file specific to that device.
virt.c and vmapple.c included primecell.h despite not using the constants it defined; there we can simply drop the include entirely.
---
Trivial cleanup; I was trying out emacs eglot and it flagged up that virt.c includes primecell.h unnecessarily, which led me to this.
--- MAINTAINERS | 2 +- hw/arm/realview.c | 2 +- hw/arm/vexpress.c | 2 +- hw/arm/virt.c | 1 - hw/misc/arm_sysctl.c | 2 +- hw/vmapple/vmapple.c | 1 - include/hw/arm/primecell.h | 12 ------------ include/hw/misc/arm_sysctl.h | 16 ++++++++++++++++ 8 files changed, 20 insertions(+), 18 deletions(-) delete mode 100644 include/hw/arm/primecell.h create mode 100644 include/hw/misc/arm_sysctl.h
MAINTAINERS +1 -1
@@ -761,7 +761,6 @@ F: hw/ssi/pl022.c F: include/hw/ssi/pl022.h F: hw/rtc/pl031.c F: include/hw/rtc/pl031.h -F: include/hw/arm/primecell.h F: hw/timer/cmsdk-apb-timer.c F: include/hw/timer/cmsdk-apb-timer.h F: tests/qtest/cmsdk-apb-timer-test.c
@@ -1106,6 +1105,7 @@ F: hw/*/versatile* F: hw/i2c/arm_sbcon_i2c.c F: include/hw/i2c/arm_sbcon_i2c.h F: hw/misc/arm_sysctl.c +F: include/hw/misc/arm_sysctl.h F: docs/system/arm/versatile.rst Virt
hw/arm/realview.c +1 -1
@@ -12,9 +12,9 @@#include "cpu.h" #include "hw/core/sysbus.h" #include "hw/arm/boot.h" -#include "hw/arm/primecell.h" #include "hw/arm/machines-qom.h" #include "hw/core/split-irq.h" +#include "hw/misc/arm_sysctl.h" #include "hw/net/lan9118.h" #include "hw/net/smc91c111.h" #include "hw/pci/pci.h"
hw/arm/vexpress.c +1 -1
@@ -26,8 +26,8 @@#include "qemu/datadir.h" #include "hw/core/sysbus.h" #include "hw/arm/boot.h" -#include "hw/arm/primecell.h" #include "hw/arm/machines-qom.h" +#include "hw/misc/arm_sysctl.h" #include "hw/net/lan9118.h" #include "hw/i2c/i2c.h" #include "net/net.h"
hw/arm/virt.c +0 -1
@@ -36,7 +36,6 @@#include "monitor/qdev.h" #include "hw/core/sysbus.h" #include "hw/arm/boot.h" -#include "hw/arm/primecell.h" #include "hw/arm/virt.h" #include "hw/arm/machines-qom.h" #include "hw/block/flash.h"
hw/misc/arm_sysctl.c +1 -1
@@ -14,8 +14,8 @@#include "system/runstate.h" #include "qemu/bitops.h" #include "hw/core/sysbus.h" +#include "hw/misc/arm_sysctl.h" #include "migration/vmstate.h" -#include "hw/arm/primecell.h" #include "qemu/log.h" #include "qemu/module.h" #include "qom/object.h"
hw/vmapple/vmapple.c +0 -1
@@ -32,7 +32,6 @@#include "hw/core/sysbus.h" #include "hw/usb/usb.h" #include "hw/arm/boot.h" -#include "hw/arm/primecell.h" #include "hw/char/pl011.h" #include "hw/intc/arm_gic.h" #include "hw/intc/arm_gicv3_common.h"
include/hw/arm/primecell.h deleted +0 -12
@@ -1,12 +0,0 @@ -#ifndef PRIMECELL_H -#define PRIMECELL_H - -/* Declarations for ARM PrimeCell based periperals. */ -/* Also includes some devices that are currently only used by the -ARM boards. */ - -/* arm_sysctl GPIO lines */ -#define ARM_SYSCTL_GPIO_MMC_WPROT 0 -#define ARM_SYSCTL_GPIO_MMC_CARDIN 1 - -#endif
include/hw/misc/arm_sysctl.h new file +16 -0
@@ -0,0 +1,16 @@ +/* +* Status and system control registers for ARM RealView/Versatile boards. +* +* Copyright (c) Linaro Ltd +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#ifndef HW_MISC_ARM_SYSCTL_H +#define HW_MISC_ARM_SYSCTL_H + +/* arm_sysctl inbound GPIO lines */ +#define ARM_SYSCTL_GPIO_MMC_WPROT 0 +#define ARM_SYSCTL_GPIO_MMC_CARDIN 1 + +#endif
Signature · 1 line
2.43.0
Quoted 25 lines · Peter Maydell
include/hw/arm/primecell.hused to be more expansive, but now the only thing it defines is the ARM_SYSCTL_GPIO_* constants for the GPIO lines for the arm-sysctl system-control device used on the Realview, Versatile and Versatile Express boards.Replace it with a header file specific to that device.
virt.candvmapple.cincludedprimecell.hdespite not using the constants it defined; there we can simply drop the include entirely.Signed-off-by Peter Maydell <[email protected]>---
Trivial cleanup; I was trying out emacs eglot and it flagged up thatvirt.cincludesprimecell.hunnecessarily, which led me to this.--- MAINTAINERS | 2 +- hw/arm/realview.c | 2 +- hw/arm/vexpress.c | 2 +- hw/arm/virt.c | 1 - hw/misc/arm_sysctl.c | 2 +- hw/vmapple/vmapple.c | 1 - include/hw/arm/primecell.h | 12 ------------ include/hw/misc/arm_sysctl.h | 16 ++++++++++++++++ 8 files changed, 20 insertions(+), 18 deletions(-)
Quoted 2 lines
delete mode 100644
include/hw/arm/primecell.h
create mode 100644include/hw/misc/arm_sysctl.h