1 #
2 # Copyright (c) 2016 - 2020, Texas Instruments Incorporated
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
8 #
9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 #
12 # * Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
15 #
16 # * Neither the name of Texas Instruments Incorporated nor the names of
17 # its contributors may be used to endorse or promote products derived
18 # from this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #
32 SOC_INDP_LIB_SOCS=k2h k2k k2l k2e k2g c6657 c6678 omapl137 omapl138 am571x am572x am574x am335x am437x
33 SOC_DEP_LIB_SOCS=tda2xx tda3xx tda2px dra75x tda2ex dra72x dra78x j721e am77x j7200 am65xx am64x tpr12
35 PACKAGE_SRCS_COMMON = makefile SPI.h MCSPI.h spi_component.mk .gitignore \
36 docs/ReleaseNotes_SPI_LLD.pdf docs/ESPI_FW_DESIGN_GUIDE.docx \
37 src/SPI_drv.c src/SPI_osal.h src/src_files_common.mk src/Module.xs \
38 build config_mk.bld package.bld package.xdc package.xs Settings.xdc.xdt SPIver.h SPIver.h.xdt
41 ifeq ($(SOC),$(filter $(SOC), $(SOC_INDP_LIB_SOCS) ))
42 # All src/v1 files
43 SRCDIR = . src src/v1
44 INCDIR = . src src/v1
45 SRCS_COMMON += SPI_drv.c SPI_v1.c QSPI_v1.c
46 PACKAGE_SRCS_COMMON += src/v1
48 # All src/v0 files
49 SRCDIR += src/v0
50 INCDIR += src/v0
51 SRCS_COMMON += SPI_v0.c OSPI_v0.c QSPI_v0.c
52 PACKAGE_SRCS_COMMON += src/v0
54 # All src/v2 files
55 ifeq ($(SOC),$(filter $(SOC), am335x, am437x))
56 SRCDIR += src/v2
57 INCDIR += src/v2
58 SRCS_COMMON += ESPI_v2.c
59 PACKAGE_SRCS_COMMON += src/v2 build/makefile_icss_espi.mk
60 endif
62 endif
65 ifeq ($(SOC),$(filter $(SOC),$(SOC_DEP_LIB_SOCS) ))
66 # TDA & J7 targets include SPI_V1, QSPI_V1(for Sitara) , OSPI_V1(For J7)
67 SRCDIR = . src src/v1
68 INCDIR = . src src/v1
70 SRCS_COMMON += SPI_drv.c
72 ifneq ($(SOC),$(filter $(SOC), tpr12))
73 SRCS_COMMON += SPI_v1.c
74 PACKAGE_SRCS_COMMON += src/v1/SPI_v1.c soc/SPI_v1.h
75 endif
77 ifeq ($(SOC),$(filter $(SOC), tda2xx tda2px dra75x tda2ex dra72x tda3xx dra78x tpr12))
78 SRCS_COMMON += QSPI_v1.c
79 PACKAGE_SRCS_COMMON += src/v1/QSPI_v1.c soc/QSPI_v1.h
80 endif
82 ifeq ($(SOC),$(filter $(SOC), j721e am77x j7200 am65xx am64x))
83 SRCDIR += src/v0
84 INCDIR += src/v0
85 SRCS_COMMON += OSPI_v0.c
86 PACKAGE_SRCS_COMMON += src/v0/OSPI_v0.c src/v0/OSPI_v0.h
87 endif
89 endif