lib: utils/timer: Add Andes fdt timer support
authorYu Chien Peter Lin <peterlin@andestech.com>
Fri, 14 Oct 2022 00:32:46 +0000 (08:32 +0800)
committerAnup Patel <anup@brainfault.org>
Sun, 23 Oct 2022 04:56:39 +0000 (10:26 +0530)
commitef9f02e7fba47412d6c057ba78fd3d89cb4e5fc3
treeb74d62fd2260c139112ec40eb90975f08ffa2f65
parent88f58a3694c936791eb875d3cc85f1cde41c3d09
lib: utils/timer: Add Andes fdt timer support

Since we can get the PLMT base address and timer frequency from
device tree, move plmt timer device to fdt timer framework.

dts example (Quad-core AX45MP):

  cpus {
      ...
      timebase-frequency = <0x3938700>;
      ...
  }
  soc {
      ...
      plmt0@e6000000 {
          compatible = "andestech,plmt0";
          reg = <0x00 0xe6000000 0x00 0x100000>;
          interrupts-extended = <&cpu0_intc 0x07
                                 &cpu1_intc 0x07
                                 &cpu2_intc 0x07
                                 &cpu3_intc 0x07>;
      };
      ...
  }

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
13 files changed:
include/sbi_utils/fdt/fdt_helper.h
include/sbi_utils/timer/andes_plmt.h [new file with mode: 0644]
lib/utils/fdt/fdt_helper.c
lib/utils/timer/Kconfig
lib/utils/timer/andes_plmt.c [new file with mode: 0644]
lib/utils/timer/fdt_timer_plmt.c [new file with mode: 0644]
lib/utils/timer/objects.mk
platform/andes/ae350/Kconfig
platform/andes/ae350/objects.mk
platform/andes/ae350/platform.c
platform/andes/ae350/platform.h
platform/andes/ae350/plmt.c [deleted file]
platform/andes/ae350/plmt.h [deleted file]