blob: b46de3a437962a6f217e3b9cb8bf8618f0d17d36 [file] [log] [blame]
Pamidipati, Vijayc6ae5662013-06-10 11:03:55 +05301# ###################################################
2# # Makefile for the NSS driver
3# ###################################################
4
Abhishek Rastogibc74e432013-04-02 10:28:22 +05305obj-m += qca-nss-drv.o
Sol Kavy2783c072014-04-05 12:53:13 -07006
Sol Kavy879eb8b2014-04-07 19:11:31 -07007#
8# List the files that belong to the driver in alphabetical order.
9#
Sol Kavy2783c072014-04-05 12:53:13 -070010qca-nss-drv-objs := \
Sakthi Vignesh Radhakrishnan4577f9b2016-08-23 11:29:40 -070011 nss_bridge.o \
Cemil Coskun1c9c3922018-01-23 16:21:49 -080012 nss_c2c_tx.o \
13 nss_c2c_tx_stats.o \
Cemil Coskunaf7c5eb2018-01-24 12:07:08 -080014 nss_c2c_rx.o \
15 nss_c2c_rx_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070016 nss_capwap.o \
Yu Huang8c107082017-07-24 14:58:26 -070017 nss_capwap_stats.o \
Sol Kavy2783c072014-04-05 12:53:13 -070018 nss_cmn.o \
19 nss_core.o \
Guojun Jin1cb79522015-06-22 22:34:22 -070020 nss_coredump.o \
Ankit Dhanuka9b430252014-08-12 13:53:41 +053021 nss_dynamic_interface.o \
Shashank Balashankar512cb602016-08-01 17:57:42 -070022 nss_edma.o \
Yu Huang8c107082017-07-24 14:58:26 -070023 nss_edma_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070024 nss_eth_rx.o \
Yu Huang8c107082017-07-24 14:58:26 -070025 nss_eth_rx_stats.o \
ratheesh kannotheb2a0a82017-05-04 09:20:17 +053026 nss_gre.o \
Yu Huang8c107082017-07-24 14:58:26 -070027 nss_gre_stats.o \
Ankit Dhanuka607508d2014-08-21 20:20:34 +053028 nss_gre_redir.o \
Yu Huang8c107082017-07-24 14:58:26 -070029 nss_gre_redir_stats.o \
Thomas Wu71c5ecc2016-06-21 11:15:52 -070030 nss_gre_tunnel.o \
Yu Huang8c107082017-07-24 14:58:26 -070031 nss_gre_tunnel_stats.o \
Sol Kavya55c9a52014-04-08 14:33:16 -070032 nss_if.o \
Samarjeet Banerjeed99d9d02014-04-08 18:51:00 +053033 nss_init.o \
34 nss_ipsec.o \
Sol Kavy2783c072014-04-05 12:53:13 -070035 nss_ipv4.o \
Yu Huang8c107082017-07-24 14:58:26 -070036 nss_ipv4_stats.o \
Suruchi Agarwale3940e72016-07-06 15:56:51 -070037 nss_ipv4_log.o \
Selin Dag6d9b0c12014-11-04 18:27:21 -080038 nss_ipv4_reasm.o \
Yu Huang8c107082017-07-24 14:58:26 -070039 nss_ipv4_reasm_stats.o \
Sol Kavy879eb8b2014-04-07 19:11:31 -070040 nss_ipv6.o \
Yu Huang8c107082017-07-24 14:58:26 -070041 nss_ipv6_stats.o \
Suruchi Agarwale3940e72016-07-06 15:56:51 -070042 nss_ipv6_log.o \
Selin Dag60a2f5b2015-06-29 14:39:49 -070043 nss_ipv6_reasm.o \
Yu Huang8c107082017-07-24 14:58:26 -070044 nss_ipv6_reasm_stats.o \
ratheesh kannoth7af985d2015-06-24 15:08:40 +053045 nss_l2tpv2.o \
Yu Huang8c107082017-07-24 14:58:26 -070046 nss_l2tpv2_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070047 nss_lag.o \
48 nss_log.o \
49 nss_lso_rx.o \
Yu Huang8c107082017-07-24 14:58:26 -070050 nss_lso_rx_stats.o \
ratheesh kannotha1245c32015-11-04 16:45:43 +053051 nss_map_t.o \
Yu Huang8c107082017-07-24 14:58:26 -070052 nss_map_t_stats.o \
Stephen Wang38e89bc2014-11-06 11:34:45 -080053 nss_n2h.o \
Yu Huang8c107082017-07-24 14:58:26 -070054 nss_n2h_stats.o \
Sivanesan Rajapupathi5c31b212016-01-06 16:21:57 -050055 nss_oam.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070056 nss_phys_if.o \
Tanmay V Jagdale20490fb2017-02-09 17:32:31 +053057 nss_pm.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070058 nss_profiler.o \
Jackson Bockusc2a4e682017-06-23 11:59:29 -070059 nss_project.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070060 nss_portid.o \
Yu Huang8c107082017-07-24 14:58:26 -070061 nss_portid_stats.o \
Amit Gupta316729b2016-08-12 12:21:15 +053062 nss_ppe.o \
Yu Huang8c107082017-07-24 14:58:26 -070063 nss_ppe_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070064 nss_pppoe.o \
Yu Huang8c107082017-07-24 14:58:26 -070065 nss_pppoe_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070066 nss_pptp.o \
Yu Huang8c107082017-07-24 14:58:26 -070067 nss_pptp_stats.o \
Cemil Coskun9165c762017-12-04 14:35:24 -080068 nss_rps.o \
Yu Huang6b2f0be2017-10-18 16:11:49 -070069 nss_qrfs.o \
Yu Huange189d8a2018-01-04 17:45:57 -080070 nss_qrfs_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070071 nss_shaper.o \
72 nss_sjack.o \
Yu Huang8c107082017-07-24 14:58:26 -070073 nss_sjack_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070074 nss_stats.o \
75 nss_tstamp.o \
76 nss_tun6rd.o \
Stephen Wangec5a85c2016-09-08 23:32:27 -070077 nss_trustsec_tx.o \
Yu Huang8c107082017-07-24 14:58:26 -070078 nss_trustsec_tx_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070079 nss_tunipip6.o \
80 nss_virt_if.o \
Yu Huang8c107082017-07-24 14:58:26 -070081 nss_virt_if_stats.o \
Stephen Wangbce06672016-12-02 15:11:35 -080082 nss_vlan.o \
mandrewc00308f2016-11-15 23:25:08 +053083 nss_tstamp.o \
Bharath M Kumarcc666e92014-12-24 19:17:28 +053084 nss_wifi.o \
Yu Huang8c107082017-07-24 14:58:26 -070085 nss_wifi_stats.o \
Varsha Mishrae58d93b2017-05-20 20:54:41 +053086 nss_wifi_vdev.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070087 nss_wifi_if.o \
Yu Huang8c107082017-07-24 14:58:26 -070088 nss_wifi_if_stats.o \
89 nss_wifili.o \
90 nss_wifili_stats.o
Sol Kavy2783c072014-04-05 12:53:13 -070091
92#
93# TODO: Deprecated files should be removed before merge
94#
Yu Huang8c107082017-07-24 14:58:26 -070095qca-nss-drv-objs += nss_tx_rx_virt_if.o \
96 nss_tx_rx_virt_if_stats.o
Stephen Wang90c67de2016-04-26 15:15:59 -070097
Stephen Wang5901def2016-05-09 16:21:03 -070098# Base NSS data plane/HAL support
99qca-nss-drv-objs += nss_data_plane/nss_data_plane.o
Stephen Wang90c67de2016-04-26 15:15:59 -0700100qca-nss-drv-objs += nss_hal/nss_hal.o
101
Ram Chandra Jangir461e3db2017-04-05 12:34:29 +0530102ifeq ($(SoC),$(filter $(SoC),ipq806x ipq40xx))
Stephen Wang5901def2016-05-09 16:21:03 -0700103qca-nss-drv-objs += nss_data_plane/nss_data_plane_gmac.o \
Sourav Poddar5f8b9c52017-02-04 11:41:46 +0530104 nss_hal/ipq806x/nss_hal_pvt.o \
Tanmay V Jagdale7aa82732017-08-28 15:44:00 +0530105 nss_dtls.o \
106 nss_dtls_stats.o \
Sourav Poddar5f8b9c52017-02-04 11:41:46 +0530107 nss_crypto.o
Stephen Wang90c67de2016-04-26 15:15:59 -0700108ccflags-y += -I$(obj)/nss_hal/ipq806x -DNSS_HAL_IPQ806X_SUPPORT
Stephen Wangd800d732017-01-19 16:24:36 -0800109endif
Sol Kavy2783c072014-04-05 12:53:13 -0700110
Ram Chandra Jangir461e3db2017-04-05 12:34:29 +0530111ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64))
Stephen Wangdf8323b2016-05-09 22:51:22 -0700112qca-nss-drv-objs += nss_data_plane/nss_data_plane_edma.o \
Sourav Poddar5f8b9c52017-02-04 11:41:46 +0530113 nss_hal/ipq807x/nss_hal_pvt.o \
Tanmay V Jagdale7aa82732017-08-28 15:44:00 +0530114 nss_dtls_cmn.o \
Sourav Poddar5f8b9c52017-02-04 11:41:46 +0530115 nss_crypto_cmn.o
Stephen Wangbe348022016-05-02 17:11:34 -0700116ccflags-y += -I$(obj)/nss_hal/ipq807x -DNSS_HAL_IPQ807x_SUPPORT
117endif
118
Stephen Wang5901def2016-05-09 16:21:03 -0700119ccflags-y += -I$(obj)/nss_hal/include -I$(obj)/nss_data_plane/include -I$(obj)/exports -DNSS_DEBUG_LEVEL=0 -DNSS_PKT_STATS_ENABLED=1
120
Anish Nataraj05d31f62016-08-17 17:07:14 +0530121ccflags-y += -DNSS_PM_DEBUG_LEVEL=0 -DNSS_SKB_RECYCLE_SUPPORT=1
Selin Dag4b6b62b2017-12-01 14:21:34 -0800122ifneq ($(findstring 4.4, $(KERNELVERSION)),)
Selin Dagb00992f2017-10-18 14:40:56 -0700123ccflags-y += -DNSS_CACHED_RING=1
Selin Dag4b6b62b2017-12-01 14:21:34 -0800124else
125ccflags-y += -DNSS_CACHED_RING=0
126endif
Arunkumar Tba9b4a02016-11-07 11:41:14 +0530127ccflags-y += -Werror
Pamidipati, Vijayc6ae5662013-06-10 11:03:55 +0530128
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800129ifneq ($(findstring 3.4, $(KERNELVERSION)),)
Ankit Dhanuka4ac3c9f2015-08-10 16:03:00 +0530130NSS_CCFLAGS = -DNSS_DT_SUPPORT=0 -DNSS_FW_DBG_SUPPORT=1 -DNSS_PM_SUPPORT=1 -DNSS_EMPTY_BUFFER_SIZE=1984
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800131else
Radha krishna Simha Jiguru69224582015-11-04 15:28:58 +0530132NSS_CCFLAGS = -DNSS_DT_SUPPORT=1 -DNSS_FW_DBG_SUPPORT=0 -DNSS_PM_SUPPORT=0 -DNSS_EMPTY_BUFFER_SIZE=1984
Stephen Wang90c67de2016-04-26 15:15:59 -0700133
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800134ccflags-y += -I$(obj)
135endif
136
Thomas Wu862394c2017-05-03 15:54:11 -0700137# Fabric scaling is supported in 3.14 and 4.4 only
Stephen Wang463f1cf2016-03-29 15:25:51 -0700138ifneq ($(findstring 3.14, $(KERNELVERSION)),)
Stephen Wang90c67de2016-04-26 15:15:59 -0700139NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1
Murat Sezginc3f318f2017-05-25 13:02:13 -0700140else ifneq ($(findstring 4.4, $(KERNELVERSION)),)
Thomas Wu862394c2017-05-03 15:54:11 -0700141NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1
Stephen Wang463f1cf2016-03-29 15:25:51 -0700142else
Stephen Wang90c67de2016-04-26 15:15:59 -0700143NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=0
Stephen Wang463f1cf2016-03-29 15:25:51 -0700144endif
145
Arunkumar T28b2d742015-06-16 22:15:58 +0530146# Disable Frequency scaling
147ifeq "$(NSS_FREQ_SCALE_DISABLE)" "y"
148ccflags-y += -DNSS_FREQ_SCALE_SUPPORT=0
149else
150qca-nss-drv-objs += nss_freq.o
151ccflags-y += -DNSS_FREQ_SCALE_SUPPORT=1
152endif
153
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800154ccflags-y += $(NSS_CCFLAGS)
155
156export NSS_CCFLAGS
157
Pamidipati, Vijayc6ae5662013-06-10 11:03:55 +0530158obj ?= .