Hi,
On 01/09/2020 11.59, Bastian Koppelmann wrote:
> From: Andreas Konopik <[email protected]>
>
> Signed-off-by: Andreas Konopik <[email protected]>
> Signed-off-by: David Brenken <[email protected]>
> Signed-off-by: Georg Hofstetter <[email protected]>
> Signed-off-by: Robert Rasche <[email protected]>
> Signed-off-by: Lars Biermanski <[email protected]>
> Message-Id: <[email protected]>
> Signed-off-by: Bastian Koppelmann <[email protected]>
> [BK: Fixed build system to use meson]
> ---
> hw/tricore/Kconfig | 8 ++
> hw/tricore/meson.build | 2 +
> hw/tricore/tc27x_soc.c | 246 +++++++++++++++++++++++++++++++++
> hw/tricore/triboard.c | 102 ++++++++++++++
> include/hw/tricore/tc27x_soc.h | 139 +++++++++++++++++++
> include/hw/tricore/triboard.h | 53 +++++++
> 6 files changed, 550 insertions(+)
> create mode 100644 hw/tricore/tc27x_soc.c
> create mode 100644 hw/tricore/triboard.c
> create mode 100644 include/hw/tricore/tc27x_soc.h
> create mode 100644 include/hw/tricore/triboard.h
>
> diff --git a/hw/tricore/Kconfig b/hw/tricore/Kconfig
> index 9313409309..44d3e906a1 100644
> --- a/hw/tricore/Kconfig
> +++ b/hw/tricore/Kconfig
> @@ -1,2 +1,10 @@
> config TRICORE
> bool
> + select TRIBOARD
> +
> +config TRIBOARD
> + bool
> + select TC27X_SOC
I think it would be more common to do it the other way round: TRIBOARD
should select TRICORE, and then use "CONFIG_TRIBOARD=y" in the
default-configs/tricore-softmmu.mak file instead.
(We usually set CONFIG_SOMEBOARD=y in the default-configs/*.mak files,
and the boards then select the required components)
> +config TC27X_SOC
> + bool
> diff --git a/hw/tricore/meson.build b/hw/tricore/meson.build
> index 579aa13c78..305f7f27db 100644
> --- a/hw/tricore/meson.build
> +++ b/hw/tricore/meson.build
> @@ -1,4 +1,6 @@
> tricore_ss = ss.source_set()
> tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c'))
> +tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tc27x_soc.c'))
> +tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('triboard.c'))
You should maybe rather use CONFIG_TRIBOARD and CONFIG_TC27X_SOC here
since you've also introduced these symbols in the Kconfig file.
Thomas