[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/44] Introduce BCM2838 SoC
From: |
Peter Maydell |
Subject: |
Re: [PATCH 04/44] Introduce BCM2838 SoC |
Date: |
Thu, 3 Aug 2023 17:31:27 +0100 |
On Wed, 26 Jul 2023 at 14:52, Sergey Kambalin <serg.oker@gmail.com> wrote:
>
> Signed-off-by: Sergey Kambalin <sergey.kambalin@auriga.com>
> ---
> hw/arm/bcm2838.c | 110 +++++++++++++++++++++++++++
> hw/arm/bcm2838_peripherals.c | 72 ++++++++++++++++++
> hw/arm/meson.build | 2 +
> include/hw/arm/bcm2838.h | 26 +++++++
> include/hw/arm/bcm2838_peripherals.h | 36 +++++++++
> 5 files changed, 246 insertions(+)
> create mode 100644 hw/arm/bcm2838.c
> create mode 100644 hw/arm/bcm2838_peripherals.c
> create mode 100644 include/hw/arm/bcm2838.h
> create mode 100644 include/hw/arm/bcm2838_peripherals.h
>
> diff --git a/hw/arm/bcm2838.c b/hw/arm/bcm2838.c
> new file mode 100644
> index 0000000000..dd650c8148
> --- /dev/null
> +++ b/hw/arm/bcm2838.c
> @@ -0,0 +1,110 @@
> +/*
> + * BCM2838 SoC emulation
> + *
> + * Copyright (C) 2022 Ovchinnikov Vitalii <vitalii.ovchinnikov@auriga.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +
> +#include "qemu/osdep.h"
> +#include "qapi/error.h"
> +#include "qemu/module.h"
> +#include "hw/arm/raspi_platform.h"
> +#include "hw/sysbus.h"
> +#include "hw/arm/bcm2838.h"
> +#include "trace.h"
> +
> +struct BCM2838Class {
> + /*< private >*/
> + BCM283XBaseClass parent_class;
> + /*< public >*/
> + hwaddr peri_low_base; /* Lower peripheral base address seen by the CPU */
> + hwaddr gic_base; /* GIC base address inside ARM local peripherals region
> */
Are these actually variable across different BCM2838 versions?
If not, don't bother making them configurable like this, just
have a #define of the address values and use it directly.
The BCM283[567] code only does this for peri_base and
ctrl_base so it can have one class that handles all three SoCs.
> +};
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 04/44] Introduce BCM2838 SoC,
Peter Maydell <=