| # 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("dwmac_bind") { |
| rules = "dwmac.bind" |
| tests = "bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.designware.platform", |
| "//src/devices/bind/fuchsia.ethernet", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| fuchsia_driver("dwmac-driver") { |
| output_name = "dwmac" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| sources = [ |
| "dwmac-debug.cc", |
| "dwmac.cc", |
| "pinned-buffer.cc", |
| ] |
| deps = [ |
| ":dwmac_bind", |
| "//sdk/banjo/fuchsia.hardware.ethernet:fuchsia.hardware.ethernet_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.ethernet.mac:fuchsia.hardware.ethernet.mac_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.test:fuchsia.hardware.test_banjo_cpp", |
| "//sdk/fidl/fuchsia.hardware.ethernet.board:fuchsia.hardware.ethernet.board_cpp", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/dev-operation", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_driver_component("dwmac") { |
| component_name = "dwmac" |
| deps = [ ":dwmac-driver" ] |
| info = "dwmac-info.json" |
| manifest = "meta/dwmac.cml" |
| } |
| |
| fuchsia_driver_package("package") { |
| package_name = "dwmac" |
| driver_components = [ ":dwmac" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":dwmac_bind_test" ] |
| } |