blob: 73a151960a7e71c48c84aaf76900a4466e794ba9 [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/config/fuchsia/rules.gni")
import("//build/test.gni")
import("//src/sys/build/components.gni")
bind_rules("aml_usb_phy_bind") {
rules = "aml_usb_phy.bind"
output = "aml_usb_phy_bind.h"
tests = "test_bind.json"
deps = [ "//src/devices/bind/amlogic.platform" ]
}
driver_module("aml-usb-phy-v2") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
"//build/unification/config:zircon-migrated",
]
sources = [ "aml-usb-phy.cc" ]
deps = [
":aml_usb_phy_bind",
"//sdk/banjo/fuchsia.hardware.platform.device",
"//sdk/banjo/fuchsia.hardware.registers",
"//sdk/banjo/fuchsia.hardware.usb.modeswitch",
"//sdk/banjo/fuchsia.hardware.usb.phy",
"//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_llcpp",
"//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",
"//zircon/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/zx",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
test("aml-usb-phy-test-bin") {
configs += [
"//build/config:all_source",
"//build/unification/config:zircon-migrated",
]
sources = [
"aml-usb-phy-test.cc",
"aml-usb-phy.cc",
]
output_name = "aml-usb-phy-test"
deps = [
":aml_usb_phy_bind",
"//sdk/banjo/fuchsia.hardware.platform.device",
"//sdk/banjo/fuchsia.hardware.registers",
"//sdk/banjo/fuchsia.hardware.usb",
"//sdk/banjo/fuchsia.hardware.usb.modeswitch",
"//sdk/banjo/fuchsia.hardware.usb.phy",
"//sdk/banjo/fuchsia.hardware.usb.request",
"//sdk/fidl/fuchsia.hardware.registers:fuchsia.hardware.registers_llcpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/devices/registers/testing/mock-registers",
"//src/devices/testing/fake-mmio-reg",
"//src/devices/testing/fake_ddk",
"//src/devices/usb/lib/usb",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/pretty",
"//zircon/public/lib/sync",
"//zircon/public/lib/zxtest",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
fuchsia_unittest_package("aml-usb-phy-test") {
deps = [ ":aml-usb-phy-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":aml-usb-phy-test",
":aml_usb_phy_bind_test",
]
}