1# Copyright (c) 2020-2022 Huawei Device Co., Ltd. All rights reserved. 2# 3# Redistribution and use in source and binary forms, with or without modification, 4# are permitted provided that the following conditions are met: 5# 6# 1. Redistributions of source code must retain the above copyright notice, this list of 7# conditions and the following disclaimer. 8# 9# 2. Redistributions in binary form must reproduce the above copyright notice, this list 10# of conditions and the following disclaimer in the documentation and/or other materials 11# provided with the distribution. 12# 13# 3. Neither the name of the copyright holder nor the names of its contributors may be used 14# to endorse or promote products derived from this software without specific prior written 15# permission. 16# 17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 19# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 21# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 29include $(LITEOSTOPDIR)/../../drivers/hdf_core/adapter/khdf/liteos/lite.mk 30 31MODULE_NAME := hdf_platform 32HDF_FRAMEWORKS = $(LITEOSTOPDIR)/../../drivers/hdf_core/framework 33 34LOCAL_INCLUDE := $(LITEOSTOPDIR)/../../base/hiviewdfx/interfaces/kits \ 35 $(LITEOSTOPDIR)/../../third_party/mtd-utils/include \ 36 $(LITEOSTOPDIR)/../../drivers/khdf/liteos/model/storage/include \ 37 38ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM), y) 39 LOCAL_SRCS += ./src/plat_common.c \ 40 $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_device.c \ 41 $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_event.c \ 42 $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_manager.c \ 43 $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_queue.c \ 44 $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_common.c 45endif 46 47ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_TRACE), y) 48 LOCAL_SRCS += ./src/platform_trace.c \ 49 $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_trace_transfer.c 50else 51 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_trace_unopen.c 52endif 53 54ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_DUMPER), y) 55 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_dumper.c 56else 57 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/fwk/platform_dumper_unopen.c 58endif 59 60ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_I2C), y) 61 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/i2c/i2c_if.c \ 62 $(HDF_FRAMEWORKS)/support/platform/src/i2c/i2c_core.c \ 63 $(HDF_FRAMEWORKS)/support/platform/src/i2c/i2c_msg.c 64 LOCAL_SRCS += ./src/i2c_dev.c 65endif 66 67ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_ADC), y) 68 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/adc/adc_if.c \ 69 $(HDF_FRAMEWORKS)/support/platform/src/adc/adc_core.c 70endif 71 72ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_DAC), y) 73 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/dac/dac_if.c \ 74 $(HDF_FRAMEWORKS)/support/platform/src/dac/dac_core.c 75endif 76 77LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/i3c/i3c_if.c \ 78$(HDF_FRAMEWORKS)/support/platform/src/i3c/i3c_core.c 79 80ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_GPIO), y) 81 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/gpio/gpio_if.c \ 82 $(HDF_FRAMEWORKS)/support/platform/src/gpio/gpio_core.c \ 83 $(HDF_FRAMEWORKS)/support/platform/src/gpio/gpio_manager.c \ 84 $(HDF_FRAMEWORKS)/support/platform/src/gpio/gpio_service.c 85 LOCAL_SRCS += ./src/gpio_dev.c 86endif 87 88ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_PIN), y) 89 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/pin/pin_if.c \ 90 $(HDF_FRAMEWORKS)/support/platform/src/pin/pin_core.c 91endif 92 93ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_WATCHDOG), y) 94 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/watchdog/watchdog_if.c \ 95 $(HDF_FRAMEWORKS)/support/platform/src/watchdog/watchdog_core.c 96endif 97 98ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_SPI), y) 99 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/spi/spi_if.c \ 100 $(HDF_FRAMEWORKS)/support/platform/src/spi/spi_core.c 101 LOCAL_SRCS += ./src/spi_dev.c 102endif 103 104ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_PWM), y) 105 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_if.c \ 106 $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_core.c 107endif 108 109ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_HDMI), y) 110 LOCAL_SRCS += \ 111 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_cec.c \ 112 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_common.c \ 113 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_core.c \ 114 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_ddc.c \ 115 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_dfm.c \ 116 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_dispatch.c \ 117 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_edid.c \ 118 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_event.c \ 119 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_frl.c \ 120 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_hdcp.c \ 121 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_hdr.c \ 122 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_if.c \ 123 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_infoframe.c \ 124 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_ncts.c \ 125 $(HDF_FRAMEWORKS)/support/platform/src/hdmi/hdmi_scdc.c 126endif 127 128ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_PCIE), y) 129 LOCAL_SRCS += \ 130 $(HDF_FRAMEWORKS)/support/platform/src/pcie/pcie_core.c \ 131 $(HDF_FRAMEWORKS)/support/platform/src/pcie/pcie_dispatch.c \ 132 $(HDF_FRAMEWORKS)/support/platform/src/pcie/pcie_if.c 133endif 134 135ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_RTC), y) 136 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/rtc/rtc_if.c \ 137 $(HDF_FRAMEWORKS)/support/platform/src/rtc/rtc_core.c \ 138 $(HDF_FRAMEWORKS)/support/platform/src/rtc/rtc_base.c \ 139 $(HDF_FRAMEWORKS)/support/platform/src/rtc/rtc_service.c 140endif 141 142ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_MIPI_DSI), y) 143 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/mipi/mipi_dsi_if.c \ 144 $(HDF_FRAMEWORKS)/support/platform/src/mipi/mipi_dsi_core.c 145endif 146 147ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_MIPI_CSI), y) 148 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/mipi/mipi_csi_if.c \ 149 $(HDF_FRAMEWORKS)/support/platform/src/mipi/mipi_csi_core.c 150endif 151 152ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_DMAC), y) 153 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/dma/dmac_core.c 154endif 155 156ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_UART), y) 157 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/uart/uart_if.c \ 158 $(HDF_FRAMEWORKS)/support/platform/src/uart/uart_core.c \ 159 $(HDF_FRAMEWORKS)/support/platform/src/uart/uart_service.c 160 LOCAL_SRCS += ./src/uart_dev.c 161endif 162 163ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_I2S), y) 164 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/i2s/i2s_if.c \ 165 $(HDF_FRAMEWORKS)/support/platform/src/i2s/i2s_core.c 166endif 167 168 169ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_REGULATOR), y) 170 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/regulator/regulator_if.c \ 171 $(HDF_FRAMEWORKS)/support/platform/src/regulator/regulator_core.c \ 172 $(HDF_FRAMEWORKS)/support/platform/src/regulator/regulator_tree_mgr.c 173endif 174 175ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_TIMER), y) 176 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/timer/timer_if.c \ 177 $(HDF_FRAMEWORKS)/support/platform/src/timer/timer_core.c 178endif 179 180ifeq ($(LOSCFG_DRIVERS_HDF_PLATFORM_CAN), y) 181 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/can/can_client.c \ 182 $(HDF_FRAMEWORKS)/support/platform/src/can/can_core.c \ 183 $(HDF_FRAMEWORKS)/support/platform/src/can/can_if.c \ 184 $(HDF_FRAMEWORKS)/support/platform/src/can/can_mail.c \ 185 $(HDF_FRAMEWORKS)/support/platform/src/can/can_manager.c \ 186 $(HDF_FRAMEWORKS)/support/platform/src/can/can_msg.c \ 187 $(HDF_FRAMEWORKS)/support/platform/src/can/can_service.c 188endif 189 190include $(HDF_DRIVER) 191