| # 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") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":mt8167_bind_test", |
| ":mt8167s-ref-test", |
| ] |
| } |
| |
| bind_rules("mt8167_bind") { |
| rules = "mt8167.bind" |
| output = "mt8167_bind.h" |
| tests = "bind_tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.google.platform", |
| "//src/devices/bind/fuchsia.mediatek.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_module("mt8167s_ref") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| if (is_fuchsia) { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| } |
| sources = [ |
| "mt8167-audio.cc", |
| "mt8167-backlight.cc", |
| "mt8167-buttons.cc", |
| "mt8167-clk.cc", |
| "mt8167-display.cc", |
| "mt8167-gpio.cc", |
| "mt8167-gpu.cc", |
| "mt8167-i2c.cc", |
| "mt8167-msdc0.cc", |
| "mt8167-msdc2.cc", |
| "mt8167-power.cc", |
| "mt8167-soc.cc", |
| "mt8167-sysmem.cc", |
| "mt8167-thermal.cc", |
| "mt8167-touch.cc", |
| "mt8167-usb.cc", |
| "mt8167.cc", |
| ] |
| deps = [ |
| ":mt8167_bind", |
| "//sdk/banjo/fuchsia.hardware.clockimpl", |
| "//sdk/banjo/fuchsia.hardware.gpio", |
| "//sdk/banjo/fuchsia.hardware.gpioimpl:fuchsia.hardware.gpioimpl_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.bus", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.power", |
| "//sdk/banjo/fuchsia.hardware.powerimpl", |
| "//sdk/banjo/fuchsia.sysmem", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/focaltech", |
| "//src/devices/lib/mmio", |
| "//src/devices/lib/mt8167", |
| "//src/graphics/display/lib/device-protocol-display", |
| "//src/lib/ddk", |
| "//src/lib/ddk:ddk-metadata-headers", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| ] |
| |
| # TODO(fxbug.dev/47406): restore some form of data dependency on cleo and mt8167s_ref |
| # boot shims. |
| } |
| |
| test("mt8167s-ref-test-bin") { |
| if (is_fuchsia) { |
| configs += [ |
| "//build/unification/config:zircon-migrated", |
| "//build/config:all_source", |
| ] |
| } |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| output_name = "mt8167s-ref-test" |
| sources = [ |
| "mt8167-audio.cc", |
| "mt8167-backlight.cc", |
| "mt8167-buttons.cc", |
| "mt8167-clk.cc", |
| "mt8167-display.cc", |
| "mt8167-gpio.cc", |
| "mt8167-gpu.cc", |
| "mt8167-i2c.cc", |
| "mt8167-msdc0.cc", |
| "mt8167-msdc2.cc", |
| "mt8167-power.cc", |
| "mt8167-soc.cc", |
| "mt8167-sysmem.cc", |
| "mt8167-test.cc", |
| "mt8167-thermal.cc", |
| "mt8167-touch.cc", |
| "mt8167-usb.cc", |
| "mt8167.cc", |
| ] |
| deps = [ |
| ":mt8167_bind", |
| "//sdk/banjo/fuchsia.hardware.clockimpl", |
| "//sdk/banjo/fuchsia.hardware.gpio", |
| "//sdk/banjo/fuchsia.hardware.gpioimpl:fuchsia.hardware.gpioimpl_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.platform.bus", |
| "//sdk/banjo/fuchsia.hardware.platform.device", |
| "//sdk/banjo/fuchsia.hardware.power", |
| "//sdk/banjo/fuchsia.hardware.powerimpl", |
| "//sdk/banjo/fuchsia.sysmem", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//sdk/lib/fdio", |
| "//src/devices/lib/driver", |
| "//src/devices/lib/focaltech", |
| "//src/devices/lib/mmio", |
| "//src/devices/lib/mt8167", |
| "//src/graphics/display/lib/device-protocol-display", |
| "//src/lib/ddk", |
| "//src/lib/ddk:ddk-metadata-headers", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/mmio-ptr:mmio-ptr-fake", |
| ] |
| } |
| |
| fuchsia_unittest_package("mt8167s-ref-test") { |
| deps = [ ":mt8167s-ref-test-bin" ] |
| } |