1# Copyright (c) 2023 Intel Corporation. 2# 3# SPDX-License-Identifier: BSD-3-Clause 4 5if(CONFIG_INTEL_HAL) 6 7 set(BSP_SEDI_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../bsp_sedi) 8 9 zephyr_interface_library_named(BSP_SEDI) 10 target_link_libraries(zephyr_interface INTERFACE BSP_SEDI) 11 target_include_directories(BSP_SEDI INTERFACE ${BSP_SEDI_SRC}/include/driver) 12 13 zephyr_library_named(modules_intel_hal) 14 zephyr_library_link_libraries(BSP_SEDI) 15 16 zephyr_library_sources(${BSP_SEDI_SRC}/drivers/rtc/sedi_rtc.c) 17 zephyr_library_sources_ifdef(CONFIG_I2C_SEDI ${BSP_SEDI_SRC}/drivers/i2c/sedi_i2c_dw_apb_200a.c) 18 zephyr_library_sources_ifdef(CONFIG_UART_SEDI ${BSP_SEDI_SRC}/drivers/usart/sedi_dw_uart.c) 19 zephyr_library_sources_ifdef(CONFIG_GPIO_SEDI ${BSP_SEDI_SRC}/drivers/gpio/sedi_gpio.c) 20 zephyr_library_sources_ifdef(CONFIG_SPI_SEDI ${BSP_SEDI_SRC}/drivers/spi/sedi_spi_dw_apb.c) 21 if(CONFIG_DMA_SEDI OR CONFIG_I2C_SEDI OR CONFIG_SPI_SEDI) 22 zephyr_library_sources(${BSP_SEDI_SRC}/drivers/dma/sedi_dma_ann_1p0.c) 23 endif() 24 zephyr_library_sources_ifdef(CONFIG_IPM_SEDI ${BSP_SEDI_SRC}/drivers/ipc/sedi_ipc.c) 25 zephyr_library_sources(${BSP_SEDI_SRC}/drivers/hpet/sedi_hpet.c) 26 27 if(DEFINED CONFIG_SOC_FAMILY_INTEL_ISH) 28 zephyr_library_sources_ifdef(CONFIG_PM ${BSP_SEDI_SRC}/soc/intel_ish/pm/ish_pm.c) 29 zephyr_library_sources_ifdef(CONFIG_PM ${BSP_SEDI_SRC}/soc/intel_ish/pm/ish_dma.c) 30 zephyr_library_sources_ifdef(CONFIG_PM ${BSP_SEDI_SRC}/soc/intel_ish/pm/aon/aon_task.c) 31 zephyr_library_sources_ifdef(CONFIG_PM ${BSP_SEDI_SRC}/soc/intel_ish/pm/aon/ipapg.S) 32 endif() 33 34 target_include_directories(BSP_SEDI INTERFACE ${BSP_SEDI_SRC}/soc/common/include) 35 36 set(BSP_SEDI_SOC_DIR ${BSP_SEDI_SRC}/soc/${SOC_FAMILY}) 37 target_include_directories(BSP_SEDI INTERFACE ${BSP_SEDI_SOC_DIR}/include) 38 if(EXISTS ${BSP_SEDI_SOC_DIR}/sedi_soc.c) 39 zephyr_library_sources(${BSP_SEDI_SOC_DIR}/sedi_soc.c) 40 endif() 41 42 add_subdirectory(subsys/logging/backends) 43endif() 44