diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2024-08-09 17:37:56 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2024-08-12 11:40:16 +0100 |
| commit | ed5031ad5d4c4c3b6eee6ab21aa95ccfc9dffdd4 (patch) | |
| tree | 243798d61022a37dc5e576f769f72e555d36fb52 /include | |
| parent | 446e5e8b4515e9a7be69ef6a29852975289bb6f0 (diff) | |
| download | focaccia-qemu-ed5031ad5d4c4c3b6eee6ab21aa95ccfc9dffdd4.tar.gz focaccia-qemu-ed5031ad5d4c4c3b6eee6ab21aa95ccfc9dffdd4.zip | |
arm/virt: place power button pin number on a define
Having magic numbers inside the code is not a good idea, as it is error-prone. So, instead, create a macro with the number definition. Link: https://lore.kernel.org/qemu-devel/CAFEAcA-PYnZ-32MRX+PgvzhnoAV80zBKMYg61j2f=oHaGfwSsg@mail.gmail.com/ Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-id: ef0e7f5fca6cd94eda415ecee670c3028c671b74.1723121692.git.mchehab+huawei@kernel.org Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hw/arm/virt.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index ab961bb6a9..a4d937ed45 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -47,6 +47,9 @@ /* See Linux kernel arch/arm64/include/asm/pvclock-abi.h */ #define PVTIME_SIZE_PER_CPU 64 +/* GPIO pins */ +#define GPIO_PIN_POWER_BUTTON 3 + enum { VIRT_FLASH, VIRT_MEM, |