qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Alexander Graf <graf@amazon.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bartekgola@gmail.com>,
	Magnus Damm <magnus.damm@gmail.com>
Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH QEMU v2 1/5] ARM: PL061: Move TYPE_PL061 to hw/gpio/pl061.h
Date: Thu, 23 Apr 2020 11:01:14 +0200	[thread overview]
Message-ID: <20200423090118.11199-2-geert+renesas@glider.be> (raw)
In-Reply-To: <20200423090118.11199-1-geert+renesas@glider.be>

Move the definition of TYPE_PL061 to a new header file, so it can be
used outside the driver.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
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 */
-- 
2.17.1



  reply	other threads:[~2020-04-23  9:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23  9:01 [PATCH QEMU v2 0/5] Add a GPIO backend Geert Uytterhoeven
2020-04-23  9:01 ` Geert Uytterhoeven [this message]
2020-04-23  9:22   ` [PATCH QEMU v2 1/5] ARM: PL061: Move TYPE_PL061 to hw/gpio/pl061.h Philippe Mathieu-Daudé
2020-04-23  9:01 ` [PATCH QEMU v2 2/5] ARM: PL061: Extract pl061_create_fdt() Geert Uytterhoeven
2020-04-23  9:23   ` Philippe Mathieu-Daudé
2020-04-23  9:01 ` [PATCH QEMU v2 3/5] Add a GPIO backend using libgpiod Geert Uytterhoeven
2020-04-23  9:28   ` Philippe Mathieu-Daudé
2020-04-23  9:41     ` Geert Uytterhoeven
2020-04-23 10:06       ` Philippe Mathieu-Daudé
2020-04-23  9:01 ` [PATCH QEMU v2 4/5] ARM: PL061: Add gpiodev support Geert Uytterhoeven
2020-04-23  9:33   ` Philippe Mathieu-Daudé
2020-04-23 10:08     ` Philippe Mathieu-Daudé
2020-07-16 14:10       ` Geert Uytterhoeven
2020-04-23  9:01 ` [PATCH QEMU v2 5/5] hw/arm/virt: Add dynamic PL061 GPIO support Geert Uytterhoeven
2020-04-23  9:13 ` [PATCH QEMU v2 0/5] Add a GPIO backend no-reply
2020-04-23  9:34 ` no-reply
2020-04-23  9:40 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200423090118.11199-2-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=bartekgola@gmail.com \
    --cc=graf@amazon.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).