On Mon, Oct 29, 2018 at 4:21 PM Philippe Mathieu-Daudé
<phi...@redhat.com> wrote:
>
> From: Guenter Roeck <li...@roeck-us.net>
>
> QEMU already supports pl330. Instantiate it for smdkc210.
>
> Signed-off-by: Guenter Roeck <li...@roeck-us.net>
> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>
> [PMD: Use pl330_init from "hw/dma/pl330.h"]
> Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com>

Reviewed-by: Alistair Francis <alistair.fran...@wdc.com>

Alistair

> ---
>  hw/arm/exynos4_boards.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
> index 750162cc95..b36f407a52 100644
> --- a/hw/arm/exynos4_boards.c
> +++ b/hw/arm/exynos4_boards.c
> @@ -32,6 +32,7 @@
>  #include "hw/arm/arm.h"
>  #include "exec/address-spaces.h"
>  #include "hw/arm/exynos4210.h"
> +#include "hw/dma/pl330.h"
>  #include "hw/boards.h"
>
>  #undef DEBUG
> @@ -49,6 +50,9 @@
>  #endif
>
>  #define SMDK_LAN9118_BASE_ADDR      0x05000000
> +#define SMDK_PL330_BASE0_ADDR       0x12680000
> +#define SMDK_PL330_BASE1_ADDR       0x12690000
> +#define SMDK_PL330_BASE2_ADDR       0x12850000
>
>  typedef enum Exynos4BoardType {
>      EXYNOS4_BOARD_NURI,
> @@ -171,6 +175,14 @@ static void smdkc210_init(MachineState *machine)
>
>      lan9215_init(SMDK_LAN9118_BASE_ADDR,
>              qemu_irq_invert(s->soc->irq_table[exynos4210_get_irq(37, 1)]));
> +
> +    pl330_init(SMDK_PL330_BASE0_ADDR,
> +            qemu_irq_invert(s->soc->irq_table[exynos4210_get_irq(35, 1)]), 
> 32);
> +    pl330_init(SMDK_PL330_BASE1_ADDR,
> +            qemu_irq_invert(s->soc->irq_table[exynos4210_get_irq(36, 1)]), 
> 32);
> +    pl330_init(SMDK_PL330_BASE2_ADDR,
> +            qemu_irq_invert(s->soc->irq_table[exynos4210_get_irq(34, 1)]), 
> 1);
> +
>      arm_load_kernel(ARM_CPU(first_cpu), &exynos4_board_binfo);
>  }
>
> --
> 2.17.2
>
>

Reply via email to