| # 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/drivers.gni") |
| |
| driver_bind_rules("aml_eth_bind") { |
| rules = "aml_eth.bind" |
| tests = "bind-tests.json" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_bindlib", |
| "//src/devices/bind/fuchsia.amlogic.platform", |
| "//src/devices/bind/fuchsia.devicetree", |
| "//src/devices/bind/fuchsia.gpio:fuchsia.gpio", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| fuchsia_driver("aml-ethernet-driver") { |
| output_name = "aml-ethernet" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ "aml-ethernet.cc" ] |
| deps = [ |
| ":aml_eth_bind", |
| "//sdk/banjo/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.ethernet.board:fuchsia.hardware.ethernet.board_cpp", |
| "//sdk/fidl/fuchsia.hardware.gpio:fuchsia.hardware.gpio_cpp", |
| "//sdk/lib/component/outgoing/cpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/i2c/lib/device-protocol-i2c-channel", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/driver:driver_runtime", |
| "//src/devices/lib/mmio", |
| "//src/devices/usb/lib/usb", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/pretty", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_driver_component("aml-ethernet") { |
| component_name = "aml-ethernet" |
| deps = [ ":aml-ethernet-driver" ] |
| info = "aml-ethernet-info.json" |
| manifest = "meta/aml-ethernet.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "aml-ethernet" |
| driver_components = [ ":aml-ethernet" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":aml_eth_bind_test" ] |
| } |