blob: 1046c6be01e0816e23deedfff7d1bb1bba01dc46 [file] [log] [blame]
David Brazdil3d7b88b2019-07-22 17:19:35 +01001# Copyright 2019 The Hafnium Authors.
2#
Andrew Walbran23417d82020-06-17 14:44:22 +01003# 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.
David Brazdil3d7b88b2019-07-22 17:19:35 +01006
Olivier Depreza7015472023-10-16 20:17:50 +02007import("args.gni")
8
David Brazdil3d7b88b2019-07-22 17:19:35 +01009source_set("rpi4") {
10}
Olivier Depreza7015472023-10-16 20:17:50 +020011
12source_set("mini_uart") {
13 sources = [ "mini_uart.c" ]
14
15 assert(gpio_base_address != 0,
16 "\"gpio_base_address\" must be defined for ${target_name}.")
17 assert(aux_base_address != 0,
18 "\"aux_base_address\" must be defined for ${target_name}.")
19 assert(core_freq_mhz != 0,
20 "\"core_freq_mhz\" must be defined for ${target_name}.")
21 assert(baudrate != 0, "\"baudrate\" must be defined for ${target_name}.")
22
23 defines = [
24 "GPIO_BASE=${gpio_base_address}",
25 "AUX_BASE=${aux_base_address}",
26 "CORE_FREQ_MHZ=${core_freq_mhz}",
27 "BAUDRATE=${baudrate}",
28 ]
29}