[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH QEMU v2 1/5] ARM: PL061: Move TYPE_PL061 to hw/gpio/pl061.h
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH QEMU v2 1/5] ARM: PL061: Move TYPE_PL061 to hw/gpio/pl061.h |
Date: |
Thu, 23 Apr 2020 11:22:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 4/23/20 11:01 AM, Geert Uytterhoeven wrote:
> Move the definition of TYPE_PL061 to a new header file, so it can be
> used outside the driver.
>
> Signed-off-by: Geert Uytterhoeven <address@hidden>
> ---
> v2:
> - New.
> ---
> MAINTAINERS | 1 +
> hw/gpio/pl061.c | 2 +-
> include/hw/gpio/pl061.h | 16 ++++++++++++++++
> 3 files changed, 18 insertions(+), 1 deletion(-)
> create mode 100644 include/hw/gpio/pl061.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 8cbc1fac2bfcec86..e760f65270d29d5d 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -538,6 +538,7 @@ F: hw/dma/pl080.c
> F: include/hw/dma/pl080.h
> F: hw/dma/pl330.c
> F: hw/gpio/pl061.c
> +F: include/hw/gpio/pl061.h
> F: hw/input/pl050.c
> F: hw/intc/pl190.c
> F: hw/sd/pl181.c
> diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
> index 2a828260bdb0b946..e776c09e474216ef 100644
> --- a/hw/gpio/pl061.c
> +++ b/hw/gpio/pl061.c
> @@ -9,6 +9,7 @@
> */
>
> #include "qemu/osdep.h"
> +#include "hw/gpio/pl061.h"
> #include "hw/irq.h"
> #include "hw/sysbus.h"
> #include "migration/vmstate.h"
> @@ -33,7 +34,6 @@ static const uint8_t pl061_id[12] =
> static const uint8_t pl061_id_luminary[12] =
> { 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x18, 0x01, 0x0d, 0xf0, 0x05, 0xb1 };
>
> -#define TYPE_PL061 "pl061"
> #define PL061(obj) OBJECT_CHECK(PL061State, (obj), TYPE_PL061)
>
> typedef struct PL061State {
> diff --git a/include/hw/gpio/pl061.h b/include/hw/gpio/pl061.h
> new file mode 100644
> index 0000000000000000..78cc40c52679dc4e
> --- /dev/null
> +++ b/include/hw/gpio/pl061.h
> @@ -0,0 +1,16 @@
> +/*
> + * Arm PrimeCell PL061 General Purpose IO with additional Luminary Micro
> + * Stellaris bits.
> + *
> + * Copyright (c) 2007 CodeSourcery.
> + * Written by Paul Brook
> + *
> + * This code is licensed under the GPL.
> + */
> +
> +#ifndef PL061_GPIO_H
> +#define PL061_GPIO_H
> +
> +#define TYPE_PL061 "pl061"
> +
> +#endif /* PL061_GPIO_H */
>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
- [PATCH QEMU v2 0/5] Add a GPIO backend, Geert Uytterhoeven, 2020/04/23
- [PATCH QEMU v2 3/5] Add a GPIO backend using libgpiod, Geert Uytterhoeven, 2020/04/23
- [PATCH QEMU v2 4/5] ARM: PL061: Add gpiodev support, Geert Uytterhoeven, 2020/04/23
- [PATCH QEMU v2 1/5] ARM: PL061: Move TYPE_PL061 to hw/gpio/pl061.h, Geert Uytterhoeven, 2020/04/23
- Re: [PATCH QEMU v2 1/5] ARM: PL061: Move TYPE_PL061 to hw/gpio/pl061.h,
Philippe Mathieu-Daudé <=
- [PATCH QEMU v2 5/5] hw/arm/virt: Add dynamic PL061 GPIO support, Geert Uytterhoeven, 2020/04/23
- [PATCH QEMU v2 2/5] ARM: PL061: Extract pl061_create_fdt(), Geert Uytterhoeven, 2020/04/23
- Re: [PATCH QEMU v2 0/5] Add a GPIO backend, no-reply, 2020/04/23
- Re: [PATCH QEMU v2 0/5] Add a GPIO backend, no-reply, 2020/04/23
- Re: [PATCH QEMU v2 0/5] Add a GPIO backend, no-reply, 2020/04/23