| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/bind/bind.gni") |
| import("//build/drivers.gni") |
| |
| driver_bind_rules("pl031_rtc_bind") { |
| rules = "pl031_rtc.bind" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.platform" ] |
| } |
| |
| fuchsia_driver("pl031-rtc-driver") { |
| output_name = "pl031-rtc" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ "pl031-rtc.cc" ] |
| deps = [ |
| ":pl031_rtc_bind", |
| "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_cpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/devices/rtc/lib/rtc:rtc_llcpp", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| ] |
| } |
| |
| fuchsia_driver_component("pl031-rtc") { |
| info = "pl031-rtc-info.json" |
| component_name = "pl031-rtc" |
| deps = [ ":pl031-rtc-driver" ] |
| manifest = "meta/pl031-rtc.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "pl031-rtc" |
| driver_components = [ ":pl031-rtc" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":pl031_rtc_bind_test" ] |
| } |