blob: 0d4e070bc3cfe4d6d524c9bfa1b4bfba3d90c37b [file] [log] [blame]
# 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/components.gni")
import("//build/drivers.gni")
import("//build/test.gni")
group("tests") {
testonly = true
deps = [ ":amlogic-clk-test" ]
}
driver_bind_rules("aml-clk-bind") {
rules = "aml-clk.bind"
header_output = "aml-clk-bind.h"
bind_output = "amlogic-clk.bindbc"
tests = "bind-tests.json"
deps = [
"//src/devices/bind/fuchsia.amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
fuchsia_driver("amlogic-clk-driver") {
output_name = "amlogic-clk"
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [
"aml-clk.cc",
"aml-fclk-rates.cc",
]
deps = [
":aml-clk-bind",
"//sdk/banjo/fuchsia.hardware.clockimpl:fuchsia.hardware.clockimpl_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.clock:fuchsia.hardware.clock_llcpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fidl",
"//zircon/system/ulib/hwreg",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
]
}
fuchsia_driver_component("amlogic-clk") {
component_name = "amlogic-clk"
deps = [ ":amlogic-clk-driver" ]
info = "amlogic-clk-info.json"
colocate = true
root_resource = true
}
test("amlogic-clk-test-bin") {
output_name = "amlogic-clk-test"
sources = [
"aml-clk-test.cc",
"aml-clk.cc",
"aml-fclk-rates.cc",
]
deps = [
":aml-clk-bind",
"//sdk/banjo/fuchsia.hardware.clockimpl:fuchsia.hardware.clockimpl_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.clock:fuchsia.hardware.clock_llcpp",
"//sdk/lib/fdio",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/amlogic",
"//src/devices/lib/mmio",
"//src/devices/testing/no_ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fidl",
"//zircon/system/ulib/hwreg",
"//zircon/system/ulib/mmio-ptr:mmio-ptr-fake",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("amlogic-clk-test") {
deps = [
":aml-clk-bind_test",
":amlogic-clk-test-bin",
]
}