| # 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.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", |
| ] |
| } |
| |
| 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.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", |
| ] |
| } |
| |
| 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", |
| ] |
| } |