64 lines
1.7 KiB
Python
64 lines
1.7 KiB
Python
load("//build/kernel/kleaf:kernel.bzl", "ddk_headers", "ddk_module")
|
|
load("//common_drivers:amlogic_utils.bzl", "m_k_files", "kernel_select")
|
|
|
|
m_k_files()
|
|
|
|
ddk_module(
|
|
name = "amlogic-spi",
|
|
srcs = glob([
|
|
"**/*.h",
|
|
]),
|
|
conditional_srcs = {
|
|
"CONFIG_AMLOGIC_SPI": {
|
|
True: [
|
|
"module-init.c",
|
|
"spi-meson-mem.c",
|
|
],
|
|
},
|
|
"CONFIG_AMLOGIC_SPI_MESON_SPICC": {
|
|
True: ["spi-meson-spicc.c"],
|
|
},
|
|
"CONFIG_AMLOGIC_SPI_MESON_SPICC_V2": {
|
|
True: ["spi-meson-spicc-v2.c"],
|
|
},
|
|
"CONFIG_SPI_AMLOGIC_SPISG": {
|
|
True: ["spi-amlogic-spisg.c"],
|
|
},
|
|
"CONFIG_SPI_AMLOGIC_SPIAO": {
|
|
True: ["spi-amlogic-spiao.c"],
|
|
},
|
|
"CONFIG_AMLOGIC_SPI_MESON_SPIFC": {
|
|
True: ["spi-meson-spifc.c"],
|
|
},
|
|
"CONFIG_AMLOGIC_SPI_MESON_SPIFC_V2": {
|
|
True: ["spi-meson-spifc-v2.c"],
|
|
},
|
|
"CONFIG_AMLOGIC_SPI_MESON_SPICC_SLAVE": {
|
|
True: [
|
|
"spi-meson-spicc-slave.c",
|
|
"vmem.c",
|
|
],
|
|
},
|
|
"CONFIG_AMLOGIC_SPI_NFC": {
|
|
True: [
|
|
"spi_nfc.c",
|
|
"nfc.c",
|
|
],
|
|
},
|
|
"CONFIG_SPICC_TEST": {
|
|
True: ["spicc_test.c"],
|
|
},
|
|
},
|
|
hdrs = [
|
|
],
|
|
local_defines = ["pr_fmt(fmt)=\"[spi]: \" fmt"],
|
|
out = "amlogic-spi.ko",
|
|
kernel_build = kernel_select(),
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//common_drivers/drivers/gki_tool:amlogic-gkitool",
|
|
"//common_drivers/drivers/debug:amlogic-debug-iotrace",
|
|
"//common_drivers/drivers/debug:amlogic-debug",
|
|
],
|
|
)
|