From: Alistair Francis <alistair23@gmail.com>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: "open list:RISC-V" <qemu-riscv@nongnu.org>,
Bin Meng <bin.meng@windriver.com>,
Alistair Francis <Alistair.Francis@wdc.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 08/12] hw/riscv: Move sifive_uart model to hw/char
Date: Fri, 4 Sep 2020 10:36:50 -0700 [thread overview]
Message-ID: <CAKmqyKMJQV5W88uU5LK4LXt-30qLNFGowdvAXqPjRSCFBSKwfg@mail.gmail.com> (raw)
In-Reply-To: <1599129623-68957-9-git-send-email-bmeng.cn@gmail.com>
On Thu, Sep 3, 2020 at 3:48 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> From: Bin Meng <bin.meng@windriver.com>
>
> This is an effort to clean up the hw/riscv directory. Ideally it
> should only contain the RISC-V SoC / machine codes plus generic
> codes. Let's move sifive_uart model to hw/char directory.
>
> Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
>
> include/hw/{riscv => char}/sifive_uart.h | 0
> hw/{riscv => char}/sifive_uart.c | 2 +-
> hw/riscv/sifive_e.c | 2 +-
> hw/riscv/sifive_u.c | 2 +-
> hw/char/Kconfig | 3 +++
> hw/char/meson.build | 1 +
> hw/riscv/Kconfig | 2 ++
> hw/riscv/meson.build | 1 -
> 8 files changed, 9 insertions(+), 4 deletions(-)
> rename include/hw/{riscv => char}/sifive_uart.h (100%)
> rename hw/{riscv => char}/sifive_uart.c (99%)
>
> diff --git a/include/hw/riscv/sifive_uart.h b/include/hw/char/sifive_uart.h
> similarity index 100%
> rename from include/hw/riscv/sifive_uart.h
> rename to include/hw/char/sifive_uart.h
> diff --git a/hw/riscv/sifive_uart.c b/hw/char/sifive_uart.c
> similarity index 99%
> rename from hw/riscv/sifive_uart.c
> rename to hw/char/sifive_uart.c
> index 9350482..3a00ba7 100644
> --- a/hw/riscv/sifive_uart.c
> +++ b/hw/char/sifive_uart.c
> @@ -24,7 +24,7 @@
> #include "chardev/char-fe.h"
> #include "hw/hw.h"
> #include "hw/irq.h"
> -#include "hw/riscv/sifive_uart.h"
> +#include "hw/char/sifive_uart.h"
>
> /*
> * Not yet implemented:
> diff --git a/hw/riscv/sifive_e.c b/hw/riscv/sifive_e.c
> index 0ddcf15..40bbf53 100644
> --- a/hw/riscv/sifive_e.c
> +++ b/hw/riscv/sifive_e.c
> @@ -39,9 +39,9 @@
> #include "hw/misc/unimp.h"
> #include "target/riscv/cpu.h"
> #include "hw/riscv/riscv_hart.h"
> -#include "hw/riscv/sifive_uart.h"
> #include "hw/riscv/sifive_e.h"
> #include "hw/riscv/boot.h"
> +#include "hw/char/sifive_uart.h"
> #include "hw/intc/sifive_clint.h"
> #include "hw/intc/sifive_plic.h"
> #include "hw/misc/sifive_e_prci.h"
> diff --git a/hw/riscv/sifive_u.c b/hw/riscv/sifive_u.c
> index faca2e8..4f12a93 100644
> --- a/hw/riscv/sifive_u.c
> +++ b/hw/riscv/sifive_u.c
> @@ -46,9 +46,9 @@
> #include "hw/misc/unimp.h"
> #include "target/riscv/cpu.h"
> #include "hw/riscv/riscv_hart.h"
> -#include "hw/riscv/sifive_uart.h"
> #include "hw/riscv/sifive_u.h"
> #include "hw/riscv/boot.h"
> +#include "hw/char/sifive_uart.h"
> #include "hw/intc/sifive_clint.h"
> #include "hw/intc/sifive_plic.h"
> #include "chardev/char.h"
> diff --git a/hw/char/Kconfig b/hw/char/Kconfig
> index 91da92f..939bc44 100644
> --- a/hw/char/Kconfig
> +++ b/hw/char/Kconfig
> @@ -58,3 +58,6 @@ config AVR_USART
>
> config MCHP_PFSOC_MMUART
> bool
> +
> +config SIFIVE_UART
> + bool
> diff --git a/hw/char/meson.build b/hw/char/meson.build
> index 3db623e..196ac91 100644
> --- a/hw/char/meson.build
> +++ b/hw/char/meson.build
> @@ -30,6 +30,7 @@ softmmu_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210_uart.c'))
> softmmu_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_uart.c'))
> softmmu_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_aux.c'))
> softmmu_ss.add(when: 'CONFIG_RENESAS_SCI', if_true: files('renesas_sci.c'))
> +softmmu_ss.add(when: 'CONFIG_SIFIVE_UART', if_true: files('sifive_uart.c'))
> softmmu_ss.add(when: 'CONFIG_SH4', if_true: files('sh_serial.c'))
> softmmu_ss.add(when: 'CONFIG_STM32F2XX_USART', if_true: files('stm32f2xx_usart.c'))
> softmmu_ss.add(when: 'CONFIG_MCHP_PFSOC_MMUART', if_true: files('mchp_pfsoc_mmuart.c'))
> diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig
> index a0e256c..a046157 100644
> --- a/hw/riscv/Kconfig
> +++ b/hw/riscv/Kconfig
> @@ -15,6 +15,7 @@ config SIFIVE_E
> select SIFIVE_CLINT
> select SIFIVE_GPIO
> select SIFIVE_PLIC
> + select SIFIVE_UART
> select SIFIVE_E_PRCI
> select UNIMP
>
> @@ -27,6 +28,7 @@ config SIFIVE_U
> select SIFIVE_GPIO
> select SIFIVE_PDMA
> select SIFIVE_PLIC
> + select SIFIVE_UART
> select SIFIVE_U_OTP
> select SIFIVE_U_PRCI
> select UNIMP
> diff --git a/hw/riscv/meson.build b/hw/riscv/meson.build
> index 619bf80..da32148 100644
> --- a/hw/riscv/meson.build
> +++ b/hw/riscv/meson.build
> @@ -5,7 +5,6 @@ riscv_ss.add(when: 'CONFIG_HART', if_true: files('riscv_hart.c'))
> riscv_ss.add(when: 'CONFIG_OPENTITAN', if_true: files('opentitan.c'))
> riscv_ss.add(when: 'CONFIG_RISCV_VIRT', if_true: files('virt.c'))
> riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_test.c'))
> -riscv_ss.add(when: 'CONFIG_SIFIVE', if_true: files('sifive_uart.c'))
> riscv_ss.add(when: 'CONFIG_SIFIVE_E', if_true: files('sifive_e.c'))
> riscv_ss.add(when: 'CONFIG_SIFIVE_U', if_true: files('sifive_u.c'))
> riscv_ss.add(when: 'CONFIG_SPIKE', if_true: files('spike.c'))
> --
> 2.7.4
>
>
next prev parent reply other threads:[~2020-09-04 18:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 10:40 [PATCH 00/12] hw/riscv: Clean up the directory Bin Meng
2020-09-03 10:40 ` [PATCH 01/12] hw/riscv: Move sifive_e_prci model to hw/misc Bin Meng
2020-09-04 17:24 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 02/12] hw/riscv: Move sifive_u_prci " Bin Meng
2020-09-04 17:25 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 03/12] hw/riscv: Move sifive_u_otp " Bin Meng
2020-09-04 17:26 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 04/12] hw/riscv: Move sifive_gpio model to hw/gpio Bin Meng
2020-09-04 17:28 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 05/12] hw/riscv: Move sifive_clint model to hw/intc Bin Meng
2020-09-04 17:30 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 06/12] hw/riscv: Move sifive_plic " Bin Meng
2020-09-04 17:34 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 07/12] hw/riscv: Move riscv_htif model to hw/char Bin Meng
2020-09-04 17:36 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 08/12] hw/riscv: Move sifive_uart " Bin Meng
2020-09-04 17:36 ` Alistair Francis [this message]
2020-09-03 10:40 ` [PATCH 09/12] hw/riscv: Move sifive_test model to hw/misc Bin Meng
2020-09-04 17:41 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 10/12] hw/riscv: Always build riscv_hart.c Bin Meng
2020-09-04 17:42 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 11/12] hw/riscv: Drop CONFIG_SIFIVE Bin Meng
2020-09-04 17:42 ` Alistair Francis
2020-09-03 10:40 ` [PATCH 12/12] hw/riscv: Sort the Kconfig options in alphabetical order Bin Meng
2020-09-04 17:44 ` Alistair Francis
2020-09-03 10:56 ` [PATCH 00/12] hw/riscv: Clean up the directory Peter Maydell
2020-09-06 16:05 ` Alistair Francis
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=CAKmqyKMJQV5W88uU5LK4LXt-30qLNFGowdvAXqPjRSCFBSKwfg@mail.gmail.com \
--to=alistair23@gmail.com \
--cc=Alistair.Francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@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).