| # 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/cpp/library_headers.gni") |
| import("//build/unification/zx_library.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ "tests" ] |
| } |
| |
| library_headers("ddk-headers") { |
| headers = [ |
| "ddk/metadata/bad-block.h", |
| "ddk/metadata/buttons.h", |
| "ddk/metadata/camera.h", |
| "ddk/metadata/clock.h", |
| "ddk/metadata/display.h", |
| "ddk/metadata/gpio.h", |
| "ddk/metadata/gpt.h", |
| "ddk/metadata/i2c.h", |
| "ddk/metadata/init-step.h", |
| "ddk/metadata/lights.h", |
| "ddk/metadata/nand.h", |
| "ddk/metadata/power.h", |
| "ddk/metadata/pwm.h", |
| "ddk/metadata/spi.h", |
| "ddk/metadata/test.h", |
| "ddk/trace/event.h", |
| "ddk/binding_priv.h", |
| "ddk/debug.h", |
| "ddk/device.h", |
| "ddk/driver.h", |
| "ddk/fragment-device.h", |
| "ddk/io-buffer.h", |
| "ddk/metadata.h", |
| "ddk/mmio-buffer.h", |
| "ddk/phys-iter.h", |
| "ddk/protodefs.h", |
| "hw/arch_ops.h", |
| "hw/inout.h", |
| "hw/pci.h", |
| "hw/reg.h", |
| "hw/sdio.h", |
| "hw/sdmmc.h", |
| ] |
| public_deps = [ |
| # <ddk/io-buffer.h> has #include <zircon/syscalls.h>. |
| |
| "//zircon/system/ulib/ddk-platform-defs", |
| "//zircon/system/ulib/mmio-ptr", |
| "//zircon/system/ulib/syslog:syslog-headers", |
| |
| # TODO(fxbug.dev/3156): Exporting this dependency causes problems in the legacy |
| # build. Instead, users of the ddk library that actually use this header |
| # have to also express a dependency on the trace library. |
| # <ddk/trace/event.h> has #include <trace/internal/event_common.h>. |
| #"//zircon/system/ulib/trace", |
| ] |
| } |
| |
| zx_library("ddk") { |
| sdk = "source" |
| sdk_publishable = false |
| sources = [ |
| "io-buffer.c", |
| "macros.h", |
| "mmio-buffer.c", |
| "phys-iter.c", |
| ] |
| public_deps = [ ":ddk-headers" ] |
| deps = [ "//zircon/public/lib/sync" ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| shared_library("ddk-metadata") { |
| sources = [ "include/ddk/usb-peripheral-config.h" ] |
| |
| public_deps = [ |
| # <ddk/usb-peripheral-config.h> has #include <fuchsia/hardware/usb/peripheral/c/fidl.h>. |
| "//sdk/fidl/fuchsia.hardware.usb.peripheral:fuchsia.hardware.usb.peripheral_c", |
| ] |
| } |
| |
| library_headers("ddk-deprecated-binding-headers") { |
| headers = [ "ddk/binding.h" ] |
| public_deps = [ ":ddk" ] |
| visibility = [ |
| "//src/connectivity/bluetooth/core/bt-host:*", |
| "//src/connectivity/bluetooth/core/bt-host:driver", |
| "//src/connectivity/bluetooth/hci/emulator:*", |
| "//src/connectivity/bluetooth/hci/passthrough:*", |
| "//src/connectivity/bluetooth/hci/transport/uart:*", |
| "//src/connectivity/bluetooth/hci/transport/usb:*", |
| "//src/connectivity/bluetooth/hci/vendor/atheros:*", |
| "//src/connectivity/bluetooth/hci/vendor/broadcom:*", |
| "//src/connectivity/bluetooth/hci/vendor/mediatek:*", |
| "//src/connectivity/bluetooth/profiles/bt-hog:driver", |
| "//src/connectivity/ethernet/drivers/rndis-host:*", |
| "//src/connectivity/openthread/drivers/ot-radio:*", |
| "//src/connectivity/openthread/tests/fake-drivers/fake-ot-radio:*", |
| "//src/connectivity/ppp/drivers/serial-ppp:driver", |
| "//src/connectivity/telephony/drivers/qmi-fake-transport:*", |
| "//src/connectivity/telephony/drivers/qmi-usb-transport:qmi_driver_src", |
| "//src/connectivity/telephony/tests/fake-drivers/at-fake-transport:*", |
| "//src/connectivity/telephony/tests/fake-drivers/usb-qmi-function:*", |
| "//src/connectivity/wlan/drivers/testing:*", |
| "//src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac:*", |
| "//src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac:core", |
| "//src/connectivity/wlan/drivers/third_party/broadcom/brcmfmac:debug", |
| "//src/connectivity/wlan/drivers/wlan:*", |
| "//src/connectivity/wlan/testing/wlantap-driver:*", |
| "//src/devices/bin/driver_host:*", |
| "//src/devices/bin/driver_host:driver-host-test-child-driver", |
| "//src/devices/bin/driver_host:driver-host-test-driver", |
| "//src/devices/bin/driver_manager:*", |
| "//src/devices/block/drivers/ahci:shared", |
| "//src/devices/block/drivers/aml-sdmmc:*", |
| "//src/devices/block/drivers/as370-sdhci:*", |
| "//src/devices/block/drivers/block-verity:*", |
| "//src/devices/block/drivers/bootpart:*", |
| "//src/devices/block/drivers/core:shared", |
| "//src/devices/block/drivers/ftl:*", |
| "//src/devices/block/drivers/gpt:*", |
| "//src/devices/block/drivers/gpt:gpt-device-test", |
| "//src/devices/block/drivers/mbr:*", |
| "//src/devices/block/drivers/msm8x53-sdhci:*", |
| "//src/devices/block/drivers/mtk-sdmmc:*", |
| "//src/devices/block/drivers/mtk-sdmmc:mtk-sdmmc-test", |
| "//src/devices/block/drivers/nvme:*", |
| "//src/devices/block/drivers/pci-sdhci:*", |
| "//src/devices/block/drivers/ramdisk:*", |
| "//src/devices/block/drivers/sdhci:*", |
| "//src/devices/block/drivers/sdhci:sdhci-test", |
| "//src/devices/block/drivers/sdmmc:*", |
| "//src/devices/block/drivers/sdmmc:sdmmc-test", |
| "//src/devices/block/drivers/ums-function:*", |
| "//src/devices/block/drivers/usb-mass-storage:block", |
| "//src/devices/block/drivers/virtio:*", |
| "//src/devices/block/drivers/zxcrypt:*", |
| "//src/devices/block/lib/scsi:*", |
| "//src/devices/block/lib/scsi/tests:*", |
| "//src/devices/board/drivers/as370:*", |
| "//src/devices/board/drivers/astro:*", |
| "//src/devices/board/drivers/c18:*", |
| "//src/devices/board/drivers/integration-test:*", |
| "//src/devices/board/drivers/machina:*", |
| "//src/devices/board/drivers/msm8998:*", |
| "//src/devices/board/drivers/msm8x53-som:*", |
| "//src/devices/board/drivers/mt8167s_ref:*", |
| "//src/devices/board/drivers/nelson:*", |
| "//src/devices/board/drivers/qemu-arm64:*", |
| "//src/devices/board/drivers/sherlock:*", |
| "//src/devices/board/drivers/vim2:*", |
| "//src/devices/board/drivers/vim3:*", |
| "//src/devices/board/drivers/vs680-evk:*", |
| "//src/devices/board/drivers/x86:*", |
| "//src/devices/bus/drivers/pci:*", |
| "//src/devices/bus/drivers/platform:*", |
| "//src/devices/bus/drivers/platform/test:*", |
| "//src/devices/bus/lib/virtio", |
| "//src/devices/clock/drivers/amlogic-clk:*", |
| "//src/devices/clock/drivers/as370-clk:*", |
| "//src/devices/clock/drivers/as370-clk:as370-clk-test", |
| "//src/devices/clock/drivers/clock:*", |
| "//src/devices/clock/drivers/msm8x53-clk:*", |
| "//src/devices/clock/drivers/mtk-clk:*", |
| "//src/devices/clock/drivers/vs680-clk:*", |
| "//src/devices/cpu/drivers/aml-cpu:*", |
| "//src/devices/cpu/drivers/aml-cpu-legacy:*", |
| "//src/devices/fw/drivers/qcom-pil:*", |
| "//src/devices/gpio/drivers/aml-axg-gpio:*", |
| "//src/devices/gpio/drivers/aml-gxl-gpio:*", |
| "//src/devices/gpio/drivers/as370-gpio:*", |
| "//src/devices/gpio/drivers/gpio:*", |
| "//src/devices/gpio/drivers/gpio:gpio-test", |
| "//src/devices/gpio/drivers/gpio-test:*", |
| "//src/devices/gpio/drivers/mt-8167:*", |
| "//src/devices/gpio/drivers/qcom-gpio:*", |
| "//src/devices/i2c/drivers/aml-i2c:*", |
| "//src/devices/i2c/drivers/intel-i2c:*", |
| "//src/devices/i2c/drivers/mt8167-i2c:*", |
| "//src/devices/internal/drivers/fragment:*", |
| "//src/devices/light-sensor/drivers/ams-light:*", |
| "//src/devices/light-sensor/drivers/lite-on:*", |
| "//src/devices/mcu/drivers/vim3-mcu:*", |
| "//src/devices/misc/drivers/builtin:*", |
| "//src/devices/misc/drivers/cpu-trace:*", |
| "//src/devices/misc/drivers/test:*", |
| "//src/devices/misc/drivers/virtio-rng:*", |
| "//src/devices/misc/drivers/virtio-socket:*", |
| "//src/devices/ml/drivers/aml-nna:*", |
| "//src/devices/ml/drivers/usb-harriet:*", |
| "//src/devices/nand/drivers/aml-rawnand:*", |
| "//src/devices/nand/drivers/broker:*", |
| "//src/devices/nand/drivers/cadence-hpnfc:*", |
| "//src/devices/nand/drivers/nand:*", |
| "//src/devices/nand/drivers/nand/tests:*", |
| "//src/devices/nand/drivers/nandpart:*", |
| "//src/devices/nand/drivers/ram-nand:*", |
| "//src/devices/nand/drivers/skip-block:common", |
| "//src/devices/power/drivers/aml-meson-power:*", |
| "//src/devices/power/drivers/msm8x53-power:*", |
| "//src/devices/power/drivers/mtk-power:*", |
| "//src/devices/power/drivers/power:*", |
| "//src/devices/power/drivers/power:power-test", |
| "//src/devices/power/drivers/silergy:*", |
| "//src/devices/power/drivers/vs680-power:*", |
| "//src/devices/pwm/drivers/aml-pwm:*", |
| "//src/devices/pwm/drivers/aml-pwm-init:*", |
| "//src/devices/pwm/drivers/pwm:common", |
| "//src/devices/ram/drivers/aml-ram:common", |
| "//src/devices/rtc/drivers/fallback:*", |
| "//src/devices/rtc/drivers/intel-rtc:*", |
| "//src/devices/rtc/drivers/nxp:*", |
| "//src/devices/rtc/drivers/pl031-rtc:*", |
| "//src/devices/scpi/drivers/aml-scpi-s912:*", |
| "//src/devices/securemem/drivers/aml-securemem:*", |
| "//src/devices/serial/drivers/aml-uart:*", |
| "//src/devices/serial/drivers/ftdi:*", |
| "//src/devices/serial/drivers/intel-serialio:*", |
| "//src/devices/serial/drivers/uart16550:*", |
| "//src/devices/serial/drivers/usb-cdc-acm:*", |
| "//src/devices/serial/drivers/usb-cdc-acm:fake-usb-cdc-acm", |
| "//src/devices/serial/drivers/virtio-console:*", |
| "//src/devices/shareddma/drivers/syn-dma:*", |
| "//src/devices/spi/drivers/aml-spi:*", |
| "//src/devices/spi/drivers/mtk-spi:*", |
| "//src/devices/sysmem/drivers/sysmem:*", |
| "//src/devices/tee/drivers/optee:*", |
| "//src/devices/temperature/drivers/shtv3:*", |
| "//src/devices/temperature/drivers/tmp112:*", |
| "//src/devices/tests/bind-debugger-test:*", |
| "//src/devices/tests/bind-fail-test:*", |
| "//src/devices/tests/ddk-environment-test:*", |
| "//src/devices/tests/ddk-fidl-test:*", |
| "//src/devices/tests/ddk-instance-lifecycle-test:*", |
| "//src/devices/tests/ddk-lifecycle:*", |
| "//src/devices/tests/ddk-metadata-test:*", |
| "//src/devices/tests/ddk-power:*", |
| "//src/devices/tests/ddk-runcompatibilityhook:*", |
| "//src/devices/tests/ddk-schedule-work:*", |
| "//src/devices/tests/driver-inspect-test:*", |
| "//src/devices/tests/isolateddevmgr:*", |
| "//src/devices/tests/mock-device:*", |
| "//src/devices/tests/sysdev:*", |
| "//src/devices/tests/unit-test-test:*", |
| "//src/devices/thermal/drivers/aml-thermal-s905d2g:*", |
| "//src/devices/thermal/drivers/aml-thermal-s905d2g-legacy:*", |
| "//src/devices/thermal/drivers/aml-thermal-s912:*", |
| "//src/devices/thermal/drivers/as370-thermal:*", |
| "//src/devices/thermal/drivers/astro-thermistor:*", |
| "//src/devices/thermal/drivers/astro-thermistor/test:*", |
| "//src/devices/thermal/drivers/mtk-thermal:*", |
| "//src/devices/thermal/drivers/mtk-thermal:mtk-thermal-test", |
| "//src/devices/thermal/drivers/vs680-thermal:*", |
| "//src/devices/usb/drivers/aml-usb-phy-v2:*", |
| "//src/devices/usb/drivers/as370-usb-phy:*", |
| "//src/devices/usb/drivers/dwc2:*", |
| "//src/devices/usb/drivers/mt-musb-host:common", |
| "//src/devices/usb/drivers/mt-musb-peripheral:*", |
| "//src/devices/usb/drivers/nelson-usb-phy:*", |
| "//src/devices/usb/drivers/usb-bus:*", |
| "//src/devices/usb/drivers/usb-bus:common", |
| "//src/devices/usb/drivers/usb-composite:*", |
| "//src/devices/usb/drivers/usb-dfu:*", |
| "//src/devices/usb/drivers/usb-hub:*", |
| "//src/devices/usb/drivers/usb-peripheral:*", |
| "//src/devices/usb/drivers/usb-peripheral-test:*", |
| "//src/devices/usb/drivers/usb-virtual-bus:*", |
| "//src/devices/usb/drivers/xhci:*", |
| "//src/devices/usb/drivers/xhci-rewrite:*", |
| "//src/devices/usb/tests/usb-hci-test:*", |
| "//src/graphics/display/drivers/aml-canvas:*", |
| "//src/graphics/display/drivers/aml-canvas:aml-canvas-test", |
| "//src/graphics/display/drivers/amlogic-display:*", |
| "//src/graphics/display/drivers/display:shared", |
| "//src/graphics/display/drivers/dsi-dw:*", |
| "//src/graphics/display/drivers/dsi-mt:*", |
| "//src/graphics/display/drivers/fake:*", |
| "//src/graphics/display/drivers/fake:fake-display", |
| "//src/graphics/display/drivers/goldfish-display:*", |
| "//src/graphics/display/drivers/intel-i915:*", |
| "//src/graphics/display/drivers/intel-i915:intel-i915-test", |
| "//src/graphics/display/drivers/mt8167s-display:*", |
| "//src/graphics/display/drivers/simple:*", |
| "//src/graphics/display/drivers/ssd1306:*", |
| "//src/graphics/display/drivers/vim-display:*", |
| "//src/graphics/drivers/aml-gpu:*", |
| "//src/graphics/drivers/msd-arm-mali:msd_arm_entry", |
| "//src/graphics/drivers/msd-arm-mali:msd_arm_test_entry", |
| "//src/graphics/drivers/msd-img-rgx/mtk:*", |
| "//src/graphics/drivers/msd-img-rgx/no_hardware:*", |
| "//src/graphics/drivers/msd-intel-gen/src:*", |
| "//src/graphics/drivers/msd-qcom-adreno:msd_qcom_entry", |
| "//src/graphics/drivers/msd-qcom-adreno:msd_qcom_entry_test", |
| "//src/graphics/drivers/msd-vsi-vip:msd_vsi_entry", |
| "//src/graphics/drivers/msd-vsi-vip:msd_vsi_test_entry", |
| "//src/graphics/drivers/virtio:*", |
| "//src/graphics/lib/magma/src/magma_util/platform/zircon:*", |
| "//src/lib/isolated_devmgr:crash-device", |
| "//src/media/audio/drivers/as370-pdm-input:*", |
| "//src/media/audio/drivers/as370-tdm-output:*", |
| "//src/media/audio/drivers/codecs/alc5514:*", |
| "//src/media/audio/drivers/codecs/alc5663:*", |
| "//src/media/audio/drivers/codecs/alc5663/tests:*", |
| "//src/media/audio/drivers/codecs/max98927:*", |
| "//src/media/audio/drivers/intel-hda/controller:*", |
| "//src/media/audio/drivers/mt8167-tdm-input:*", |
| "//src/media/audio/drivers/mt8167-tdm-output:*", |
| "//src/media/audio/drivers/nelson-pdm-input:*", |
| "//src/media/audio/drivers/nelson-tdm-output:*", |
| "//src/media/audio/drivers/sherlock-pdm-input:*", |
| "//src/media/audio/drivers/sherlock-pdm-input/test:sherlock-audio-in-test", |
| "//src/media/audio/drivers/usb-audio:*", |
| "//src/media/audio/drivers/virtual_audio:virtual_audio_driver", |
| "//src/media/audio/lib/simple-codec:*", |
| "//src/media/drivers/amlogic_decoder:*", |
| "//src/storage/fvm/driver:shared", |
| "//src/ui/backlight/drivers/sg-micro:*", |
| "//src/ui/backlight/drivers/ti-lp8556:*", |
| "//src/ui/backlight/drivers/ti-lp8556:ti-lp8556-test", |
| "//src/ui/input/drivers/bma253:*", |
| "//src/ui/input/drivers/focaltech:*", |
| "//src/ui/input/drivers/ft8201:*", |
| "//src/ui/input/drivers/goodix:*", |
| "//src/ui/input/drivers/goodix:gt92xx-test", |
| "//src/ui/input/drivers/hid:*", |
| "//src/ui/input/drivers/hid-buttons:common", |
| "//src/ui/input/drivers/hid-input-report:*", |
| "//src/ui/input/drivers/hidctl:*", |
| "//src/ui/input/drivers/i2c-hid:*", |
| "//src/ui/input/drivers/i2c-hid:i2c-hid-test", |
| "//src/ui/input/drivers/pc-ps2:*", |
| "//src/ui/input/drivers/usb-hid:*", |
| "//src/ui/input/drivers/usb-hid:usb-one-endpoint-hid-fake-usb", |
| "//src/ui/input/drivers/usb-hid:usb-two-endpoint-hid-fake-usb", |
| "//src/ui/input/drivers/virtio:*", |
| "//src/ui/light/drivers/aml-light:*", |
| "//src/ui/light/drivers/gpio-light:*", |
| "//zircon/system/ulib/driver-info:*", |
| "//zircon/third_party/dev/ethernet/e1000:*", |
| ] |
| } |
| |
| # This target should only be used in vendor repositories, where we can't add the target to the |
| # visibility list above. |
| library_headers("ddk-deprecated-binding-headers-for-vendors") { |
| headers = [ "ddk/binding.h" ] |
| public_deps = [ ":ddk" ] |
| } |
| |
| library_headers("ddk-device-headers") { |
| headers = [ "ddk/device.h" ] |
| } |