| # 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") |
| |
| driver_bind_rules("aml_nna_bind") { |
| rules = "aml_nna.bind" |
| bind_output = "aml-nna.bindbc" |
| tests = "bind_tests.json" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_bindlib", |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.devicetree", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| fuchsia_driver("aml-nna-driver") { |
| output_name = "aml-nna" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ "aml-nna.cc" ] |
| deps = [ |
| ":aml_nna_bind", |
| "//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_cpp", |
| "//src/devices/bind/fuchsia.platform:fuchsia.platform_cpp", |
| "//src/devices/bind/fuchsia.verisilicon.platform:fuchsia.verisilicon.platform_cpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/driver:driver", |
| "//src/devices/lib/mmio", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/hwreg", |
| ] |
| } |
| |
| fuchsia_driver_component("aml-nna") { |
| component_name = "aml-nna" |
| deps = [ ":aml-nna-driver" ] |
| info = "aml-nna-info.json" |
| manifest = "meta/aml-nna.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "aml-nna" |
| driver_components = [ ":aml-nna" ] |
| } |
| |
| test("aml-nna-test-bin") { |
| output_name = "aml-nna-test" |
| sources = [ |
| "aml-nna-test.cc", |
| "aml-nna.cc", |
| ] |
| deps = [ |
| ":aml_nna_bind", |
| "//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_cpp", |
| "//src/devices/bind/fuchsia.platform:fuchsia.platform_cpp", |
| "//src/devices/bind/fuchsia.verisilicon.platform:fuchsia.verisilicon.platform_cpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/mmio", |
| "//src/devices/registers/testing/mock-registers", |
| "//src/devices/testing/mock-ddk", |
| "//src/devices/testing/mock-mmio-reg-zxtest", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/hwreg", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("aml-nna-test") { |
| deps = [ ":aml-nna-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":aml-nna-test", |
| ":aml_nna_bind_test", |
| ] |
| } |