blob: 3e813fe9173c9fc3e8385eee7cb99da3a0a53c5e [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")
bind_rules("aml-scpi-s912-bind") {
rules = "aml-scpi-s912.bind"
output = "aml-scpi-s912-bind.h"
tests = "aml-scpi-s912-bind-test.json"
deps = [ "//src/devices/bind/amlogic.platform" ]
}
bind_rules("aml-mailbox-s912-bind") {
rules = "aml-mailbox-s912.bind"
output = "aml-mailbox-s912-bind.h"
tests = "aml-mailbox-s912-bind-test.json"
deps = [
"//src/devices/bind/amlogic.platform",
"//src/devices/bind/fuchsia.platform",
]
}
group("aml-scpi-s912") {
deps = [
":aml-scpi-s912.mailbox",
":scpi",
]
}
driver_module("aml-scpi-s912.mailbox") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
if (is_fuchsia) {
configs += [ "//build/unification/config:zircon-migrated" ]
}
sources = [ "aml-mailbox.cc" ]
deps = [
":aml-mailbox-s912-bind",
"//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.gpio:fuchsia.hardware.gpio_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.i2c",
"//sdk/banjo/fuchsia.hardware.mailbox",
"//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zx",
]
}
driver_module("scpi") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
if (is_fuchsia) {
configs += [ "//build/unification/config:zircon-migrated" ]
}
sources = [ "aml-scpi.cc" ]
deps = [
":aml-scpi-s912-bind",
"//sdk/banjo/fuchsia.hardware.mailbox",
"//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.scpi",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/bus/lib/device-protocol-platform-device",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/sync",
]
}
group("tests") {
testonly = true
deps = [
":aml-mailbox-s912-bind_test",
":aml-scpi-s912-bind_test",
]
}