blob: 5332ce7cea02bf83a350fbf4cddb032ed1f3fa36 [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/config/fuchsia/rules.gni")
import("//build/test.gni")
bind_rules("aml_spi_bind") {
rules = "aml_spi.bind"
output = "aml_spi_bind.h"
tests = "bind_tests.json"
deps = [
"//src/devices/bind/amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
group("common") {
public_deps = [
":aml_spi_bind",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.spiimpl",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//src/lib/vmo_store",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/sync",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/zxc",
]
}
test("aml-spi-test-bin") {
output_name = "aml-spi-test"
sources = [
"aml-spi-test.cc",
"aml-spi.cc",
]
deps = [
":common",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp_mock",
"//src/devices/bus/testing/fake-pdev",
"//src/devices/testing/fake_ddk",
"//zircon/public/lib/zxtest",
]
}
fuchsia_unittest_package("aml-spi-test") {
deps = [ ":aml-spi-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":aml-spi-test",
":aml_spi_bind_test",
]
}
driver_module("aml-spi") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
sources = [ "aml-spi.cc" ]
deps = [ ":common" ]
}