1#
2# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
3#
4# SPDX-License-Identifier: GPL-2.0-only
5#
6
7cmake_minimum_required(VERSION 3.7.2)
8
9declare_platform(allwinnerA20 KernelPlatformAllwinnerA20 PLAT_ALLWINNERA20 KernelSel4ArchAarch32)
10
11if(KernelPlatformAllwinnerA20)
12    declare_seL4_arch(aarch32)
13    set(KernelArmCortexA7 ON)
14    set(KernelArchArmV7a ON)
15    config_set(KernelARMPlatform ARM_PLAT allwinnerA20)
16
17    # MCS is not supported on allwinnerA20. It requires a timer driver that
18    # implements the tickless programming requirements.
19    set(KernelPlatformSupportsMCS OFF)
20
21    list(APPEND KernelDTSList "tools/dts/allwinnerA20.dts")
22    list(APPEND KernelDTSList "src/plat/allwinnerA20/overlay-allwinnerA20.dts")
23
24    declare_default_headers(
25        TIMER_FREQUENCY 24000000
26        MAX_IRQ 122
27        NUM_PPI 32
28        TIMER drivers/timer/arm_generic.h
29        INTERRUPT_CONTROLLER arch/machine/gic_v2.h
30    )
31endif()
32
33add_sources(
34    DEP "KernelPlatformAllwinnerA20"
35    CFILES src/plat/allwinnerA20/machine/l2cache.c src/arch/arm/machine/gic_v2.c
36)
37