1# Copyright 2019 The Hafnium Authors.
2#
3# Use of this source code is governed by a BSD-style
4# license that can be found in the LICENSE file or at
5# https://opensource.org/licenses/BSD-3-Clause.
6
7import("args.gni")
8
9# aarch64 PL011 implementation of putchar for debugging.
10source_set("pl011") {
11  sources = [
12    "pl011.c",
13  ]
14  deps = [
15    "//src/arch/aarch64:arch",
16  ]
17
18  assert(defined(pl011_base_address),
19         "\"pl011_base_address\" must be defined for ${target_name}.")
20
21  assert(defined(pl011_clock),
22         "\"pl011_clock\" must be defined for ${target_name}.")
23
24  assert(defined(pl011_baudrate),
25         "\"pl011_baudrate\" must be defined for ${target_name}.")
26
27  defines = [
28    "PL011_BASE=${pl011_base_address}",
29    "PL011_CLOCK=${pl011_clock}",
30    "PL011_BAUDRATE=${pl011_baudrate}",
31  ]
32}
33