blob: d1bc7f42fadc4cc04494878659b11154731ad8c7 [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 \
Sachin Shashidhar07b00612018-05-18 15:10:50 -070012 nss_bridge_log.o \
Cemil Coskun1c9c3922018-01-23 16:21:49 -080013 nss_c2c_tx.o \
Sachin Shashidharabe73e72018-05-18 17:55:04 -070014 nss_c2c_tx_log.o \
Cemil Coskun1c9c3922018-01-23 16:21:49 -080015 nss_c2c_tx_stats.o \
Cemil Coskunaf7c5eb2018-01-24 12:07:08 -080016 nss_c2c_rx.o \
17 nss_c2c_rx_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070018 nss_capwap.o \
Sachin Shashidhare6babc52018-05-29 15:20:40 -070019 nss_capwap_log.o \
Yu Huang8c107082017-07-24 14:58:26 -070020 nss_capwap_stats.o \
Suman Ghosh85f353a2019-06-03 14:47:32 +053021 nss_clmap.o \
22 nss_clmap_log.o \
23 nss_clmap_stats.o \
Sol Kavy2783c072014-04-05 12:53:13 -070024 nss_cmn.o \
25 nss_core.o \
Guojun Jin1cb79522015-06-22 22:34:22 -070026 nss_coredump.o \
Sakthi Vignesh Radhakrishnan150c5592019-07-02 10:17:44 -070027 nss_drv_stats.o \
Wayne Tand5058cb2020-01-07 14:39:16 -080028 nss_drv_strings.o \
Ankit Dhanuka9b430252014-08-12 13:53:41 +053029 nss_dynamic_interface.o \
Sachin Shashidhar0aa96152018-06-05 16:57:49 -070030 nss_dynamic_interface_log.o \
Amit Gupta74cdf4b2019-09-17 17:53:45 +053031 nss_dynamic_interface_stats.o \
Shashank Balashankar512cb602016-08-01 17:57:42 -070032 nss_edma.o \
Yu Huang8c107082017-07-24 14:58:26 -070033 nss_edma_stats.o \
Wayne Tan336f34e2020-01-07 12:10:44 -080034 nss_edma_strings.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070035 nss_eth_rx.o \
Yu Huang8c107082017-07-24 14:58:26 -070036 nss_eth_rx_stats.o \
Wayne Tan83d53fc2020-01-07 11:50:53 -080037 nss_eth_rx_strings.o \
Sakthi Vignesh Radhakrishnan150c5592019-07-02 10:17:44 -070038 nss_gmac_stats.o \
ratheesh kannotheb2a0a82017-05-04 09:20:17 +053039 nss_gre.o \
Sachin Shashidhar159a64a2018-07-31 16:16:51 -070040 nss_gre_log.o \
Yu Huang8c107082017-07-24 14:58:26 -070041 nss_gre_stats.o \
Ankit Dhanuka607508d2014-08-21 20:20:34 +053042 nss_gre_redir.o \
Sachin Shashidhar3d890cf2018-07-31 20:13:52 -070043 nss_gre_redir_log.o \
Gaurav Pathak0c504c92017-12-08 15:20:38 +053044 nss_gre_redir_lag_ds.o \
Sachin Shashidhar85658892018-08-03 12:39:11 -070045 nss_gre_redir_lag_ds_log.o \
Gaurav Pathak0c504c92017-12-08 15:20:38 +053046 nss_gre_redir_lag_ds_stats.o \
47 nss_gre_redir_lag_us.o \
Sachin Shashidharc35ebd02018-08-03 13:16:19 -070048 nss_gre_redir_lag_us_log.o \
Gaurav Pathak0c504c92017-12-08 15:20:38 +053049 nss_gre_redir_lag_us_stats.o \
Yu Huang8c107082017-07-24 14:58:26 -070050 nss_gre_redir_stats.o \
Aniruddha Paulb28a8272019-07-04 19:32:00 +053051 nss_gre_redir_mark.o \
52 nss_gre_redir_mark_log.o \
53 nss_gre_redir_mark_stats.o \
Thomas Wu71c5ecc2016-06-21 11:15:52 -070054 nss_gre_tunnel.o \
Sachin Shashidhar37dbc0f2018-08-06 12:31:18 -070055 nss_gre_tunnel_log.o \
Yu Huang8c107082017-07-24 14:58:26 -070056 nss_gre_tunnel_stats.o \
Sol Kavya55c9a52014-04-08 14:33:16 -070057 nss_if.o \
Manish Verma8a56a482019-05-20 12:46:31 +053058 nss_igs.o \
Manish Verma30fbe182019-06-17 21:02:24 +053059 nss_igs_stats.o \
Samarjeet Banerjeed99d9d02014-04-08 18:51:00 +053060 nss_init.o \
Sol Kavy2783c072014-04-05 12:53:13 -070061 nss_ipv4.o \
Yu Huang8c107082017-07-24 14:58:26 -070062 nss_ipv4_stats.o \
Wayne Tan5b7b6e92020-01-21 12:26:44 -080063 nss_ipv4_strings.o \
Suruchi Agarwale3940e72016-07-06 15:56:51 -070064 nss_ipv4_log.o \
Selin Dag6d9b0c12014-11-04 18:27:21 -080065 nss_ipv4_reasm.o \
Yu Huang8c107082017-07-24 14:58:26 -070066 nss_ipv4_reasm_stats.o \
Sol Kavy879eb8b2014-04-07 19:11:31 -070067 nss_ipv6.o \
Yu Huang8c107082017-07-24 14:58:26 -070068 nss_ipv6_stats.o \
Suruchi Agarwale3940e72016-07-06 15:56:51 -070069 nss_ipv6_log.o \
Selin Dag60a2f5b2015-06-29 14:39:49 -070070 nss_ipv6_reasm.o \
Yu Huang8c107082017-07-24 14:58:26 -070071 nss_ipv6_reasm_stats.o \
ratheesh kannoth7af985d2015-06-24 15:08:40 +053072 nss_l2tpv2.o \
Sachin Shashidhar015c28a2018-08-06 19:11:00 -070073 nss_l2tpv2_log.o \
Yu Huang8c107082017-07-24 14:58:26 -070074 nss_l2tpv2_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070075 nss_lag.o \
Sachin Shashidhar384d2aa2018-08-06 19:27:55 -070076 nss_lag_log.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070077 nss_log.o \
78 nss_lso_rx.o \
Yu Huang8c107082017-07-24 14:58:26 -070079 nss_lso_rx_stats.o \
ratheesh kannotha1245c32015-11-04 16:45:43 +053080 nss_map_t.o \
Sachin Shashidharba18a4f2018-08-07 10:45:19 -070081 nss_map_t_log.o \
Yu Huang8c107082017-07-24 14:58:26 -070082 nss_map_t_stats.o \
Suruchi Sumanf7e29822019-09-11 11:53:53 +053083 nss_match.o \
84 nss_match_log.o \
85 nss_match_stats.o \
Casey Chencfa28352018-04-21 01:03:02 -070086 nss_meminfo.o \
Manish Vermab778ea42019-11-19 21:08:14 +053087 nss_mirror.o \
88 nss_mirror_log.o \
89 nss_mirror_stats.o \
Stephen Wang38e89bc2014-11-06 11:34:45 -080090 nss_n2h.o \
Yu Huang8c107082017-07-24 14:58:26 -070091 nss_n2h_stats.o \
Wayne Tand5058cb2020-01-07 14:39:16 -080092 nss_n2h_strings.o \
Sivanesan Rajapupathi5c31b212016-01-06 16:21:57 -050093 nss_oam.o \
Sachin Shashidhara802cc32018-08-07 11:06:17 -070094 nss_oam_log.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070095 nss_phys_if.o \
Tanmay V Jagdale20490fb2017-02-09 17:32:31 +053096 nss_pm.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070097 nss_profiler.o \
Jackson Bockusc2a4e682017-06-23 11:59:29 -070098 nss_project.o \
Stephen Wang90c67de2016-04-26 15:15:59 -070099 nss_portid.o \
Sachin Shashidhar3a441362018-08-07 16:48:53 -0700100 nss_portid_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700101 nss_portid_stats.o \
Amit Gupta316729b2016-08-12 12:21:15 +0530102 nss_ppe.o \
Sachin Shashidhardd7229c2018-08-07 17:33:42 -0700103 nss_ppe_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700104 nss_ppe_stats.o \
Amit Gupta6d8d0b12019-09-17 18:08:58 +0530105 nss_ppe_vp.o \
106 nss_ppe_vp_log.o \
107 nss_ppe_vp_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700108 nss_pppoe.o \
Sachin Shashidhar626131e2018-08-08 11:29:58 -0700109 nss_pppoe_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700110 nss_pppoe_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700111 nss_pptp.o \
Sachin Shashidhar94beadf2018-08-08 11:43:54 -0700112 nss_pptp_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700113 nss_pptp_stats.o \
Cemil Coskuncdcd1dd2019-01-28 13:35:31 -0800114 nss_pvxlan.o \
115 nss_pvxlan_log.o \
116 nss_pvxlan_stats.o \
Yu Huang6b2f0be2017-10-18 16:11:49 -0700117 nss_qrfs.o \
Sachin Shashidhar0fc1a142018-08-08 14:15:27 -0700118 nss_qrfs_log.o \
Yu Huange189d8a2018-01-04 17:45:57 -0800119 nss_qrfs_stats.o \
Cemil Coskun537f3022019-11-15 16:13:21 -0800120 nss_rmnet_rx.o \
121 nss_rmnet_rx_stats.o \
122 nss_rps.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700123 nss_shaper.o \
124 nss_sjack.o \
Sachin Shashidhar1f8ccf82018-08-08 14:32:13 -0700125 nss_sjack_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700126 nss_sjack_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700127 nss_stats.o \
Wayne Tanb45933c2020-01-06 17:19:25 -0800128 nss_strings.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700129 nss_tstamp.o \
Cemil Coskun58d27732019-05-22 13:39:14 -0700130 nss_tstamp_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700131 nss_tun6rd.o \
Sachin Shashidhar47430452018-08-13 16:36:18 -0700132 nss_tun6rd_log.o \
Stephen Wangec5a85c2016-09-08 23:32:27 -0700133 nss_trustsec_tx.o \
Sachin Shashidhar91287482018-08-13 15:32:39 -0700134 nss_trustsec_tx_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700135 nss_trustsec_tx_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700136 nss_tunipip6.o \
Sachin Shashidhar4529cea2018-08-13 16:58:32 -0700137 nss_tunipip6_log.o \
Casey Chen3589c452018-09-20 15:27:41 -0700138 nss_tx_msg_sync.o \
Jackson Bockusb40398c2017-10-03 11:01:37 -0700139 nss_unaligned.o \
140 nss_unaligned_log.o \
141 nss_unaligned_stats.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700142 nss_virt_if.o \
Yu Huang8c107082017-07-24 14:58:26 -0700143 nss_virt_if_stats.o \
Stephen Wangbce06672016-12-02 15:11:35 -0800144 nss_vlan.o \
Sachin Shashidharadca0c82018-08-19 18:42:22 -0700145 nss_vlan_log.o \
Apoorv Gupta9e184d42019-07-09 12:46:42 +0530146 nss_vxlan.o \
147 nss_vxlan_log.o \
148 nss_vxlan_stats.o \
mandrewc00308f2016-11-15 23:25:08 +0530149 nss_tstamp.o \
Bharath M Kumarcc666e92014-12-24 19:17:28 +0530150 nss_wifi.o \
Sachin Shashidhar9449ad12018-08-19 22:08:01 -0700151 nss_wifi_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700152 nss_wifi_stats.o \
Varsha Mishrae58d93b2017-05-20 20:54:41 +0530153 nss_wifi_vdev.o \
Stephen Wang90c67de2016-04-26 15:15:59 -0700154 nss_wifi_if.o \
Yu Huang8c107082017-07-24 14:58:26 -0700155 nss_wifi_if_stats.o \
156 nss_wifili.o \
Sachin Shashidharc7b2e002018-08-20 13:52:51 -0700157 nss_wifili_log.o \
Yu Huang8c107082017-07-24 14:58:26 -0700158 nss_wifili_stats.o
Sol Kavy2783c072014-04-05 12:53:13 -0700159
Stephen Wang5901def2016-05-09 16:21:03 -0700160# Base NSS data plane/HAL support
161qca-nss-drv-objs += nss_data_plane/nss_data_plane.o
Stephen Wang90c67de2016-04-26 15:15:59 -0700162qca-nss-drv-objs += nss_hal/nss_hal.o
163
Ram Chandra Jangir461e3db2017-04-05 12:34:29 +0530164ifeq ($(SoC),$(filter $(SoC),ipq806x ipq40xx))
ratheesh kannoth92467812018-06-25 17:47:36 +0530165qca-nss-drv-objs += nss_data_plane/nss_data_plane_gmac.o \
166 nss_hal/ipq806x/nss_hal_pvt.o \
167 nss_dtls.o \
168 nss_dtls_log.o \
169 nss_dtls_stats.o \
170 nss_crypto.o \
171 nss_crypto_log.o \
172 nss_ipsec_log.o \
173 nss_ipsec.o
Stephen Wang90c67de2016-04-26 15:15:59 -0700174ccflags-y += -I$(obj)/nss_hal/ipq806x -DNSS_HAL_IPQ806X_SUPPORT
Stephen Wangd800d732017-01-19 16:24:36 -0800175endif
Sol Kavy2783c072014-04-05 12:53:13 -0700176
Ram Chandra Jangir461e3db2017-04-05 12:34:29 +0530177ifeq ($(SoC),$(filter $(SoC),ipq807x ipq807x_64))
ratheesh kannoth92467812018-06-25 17:47:36 +0530178qca-nss-drv-objs += nss_data_plane/nss_data_plane_edma.o \
179 nss_hal/ipq807x/nss_hal_pvt.o \
180 nss_dtls_cmn.o \
181 nss_dtls_cmn_log.o \
182 nss_crypto_cmn.o \
183 nss_crypto_cmn_log.o \
184 nss_ipsec_cmn_log.o \
Bhaskar Valaboju3aea9fe2018-10-08 11:37:08 +0530185 nss_ipsec_cmn.o \
186 nss_qvpn.o \
187 nss_qvpn_stats.o \
Ratheesh Kannoth65edb2d2020-01-23 09:08:46 +0530188 nss_qvpn_log.o \
189 nss_tls.o \
190 nss_tls_log.o
Stephen Wang02636862018-04-05 22:13:12 -0700191ccflags-y += -I$(obj)/nss_hal/ipq807x -DNSS_HAL_IPQ807x_SUPPORT -DNSS_MULTI_H2N_DATA_RING_SUPPORT
Stephen Wangbe348022016-05-02 17:11:34 -0700192endif
193
Suman Ghosh3f940232018-08-17 20:43:03 +0530194ifeq ($(SoC),$(filter $(SoC),ipq60xx ipq60xx_64))
195qca-nss-drv-objs += nss_data_plane/nss_data_plane_edma.o \
196 nss_hal/ipq60xx/nss_hal_pvt.o \
197 nss_dtls_cmn.o \
198 nss_dtls_cmn_log.o \
199 nss_crypto_cmn.o \
ratheesh kannoth92467812018-06-25 17:47:36 +0530200 nss_crypto_cmn_log.o \
201 nss_ipsec_cmn_log.o \
Sourav Poddar4243cdd2019-06-14 17:57:23 +0530202 nss_ipsec_cmn.o \
203 nss_qvpn.o \
204 nss_qvpn_stats.o \
Ratheesh Kannoth65edb2d2020-01-23 09:08:46 +0530205 nss_qvpn_log.o \
206 nss_tls.o \
207 nss_tls_log.o
Suman Ghosh3f940232018-08-17 20:43:03 +0530208ccflags-y += -I$(obj)/nss_hal/ipq60xx -DNSS_HAL_IPQ60XX_SUPPORT -DNSS_MULTI_H2N_DATA_RING_SUPPORT
209endif
210
Subhash Kumar Katnpally0aab4f82019-11-25 12:38:39 +0530211ifeq ($(SoC),$(filter $(SoC),ipq50xx ipq50xx_64))
212qca-nss-drv-objs += nss_data_plane/nss_data_plane_edma.o \
213 nss_hal/ipq50xx/nss_hal_pvt.o \
Kiran Kumar C.S.K874b3572020-01-06 20:51:10 +0530214 nss_dtls_cmn.o \
215 nss_dtls_cmn_log.o \
Subhash Kumar Katnpally0aab4f82019-11-25 12:38:39 +0530216 nss_crypto_cmn.o \
217 nss_crypto_cmn_log.o \
218 nss_ipsec_cmn_log.o \
219 nss_ipsec_cmn.o
220ccflags-y += -I$(obj)/nss_hal/ipq50xx -DNSS_HAL_IPQ50XX_SUPPORT -DNSS_MULTI_H2N_DATA_RING_SUPPORT
221endif
222
Stephen Wang5901def2016-05-09 16:21:03 -0700223ccflags-y += -I$(obj)/nss_hal/include -I$(obj)/nss_data_plane/include -I$(obj)/exports -DNSS_DEBUG_LEVEL=0 -DNSS_PKT_STATS_ENABLED=1
224
Thomas Wu6d90b412018-07-10 11:38:35 -0700225ccflags-y += -DNSS_PM_DEBUG_LEVEL=0 -DNSS_SKB_REUSE_SUPPORT=1
Arunkumar Tba9b4a02016-11-07 11:41:14 +0530226ccflags-y += -Werror
Pamidipati, Vijayc6ae5662013-06-10 11:03:55 +0530227
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800228ifneq ($(findstring 3.4, $(KERNELVERSION)),)
pavirf22fa142019-01-08 17:33:05 +0530229NSS_CCFLAGS = -DNSS_DT_SUPPORT=0 -DNSS_FW_DBG_SUPPORT=1 -DNSS_PM_SUPPORT=1
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800230else
pavirf22fa142019-01-08 17:33:05 +0530231NSS_CCFLAGS = -DNSS_DT_SUPPORT=1 -DNSS_FW_DBG_SUPPORT=0 -DNSS_PM_SUPPORT=0
Stephen Wang90c67de2016-04-26 15:15:59 -0700232
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800233ccflags-y += -I$(obj)
234endif
235
Thomas Wu862394c2017-05-03 15:54:11 -0700236# Fabric scaling is supported in 3.14 and 4.4 only
Stephen Wang463f1cf2016-03-29 15:25:51 -0700237ifneq ($(findstring 3.14, $(KERNELVERSION)),)
Stephen Wang90c67de2016-04-26 15:15:59 -0700238NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1
Murat Sezginc3f318f2017-05-25 13:02:13 -0700239else ifneq ($(findstring 4.4, $(KERNELVERSION)),)
Thomas Wu862394c2017-05-03 15:54:11 -0700240NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=1
Stephen Wang463f1cf2016-03-29 15:25:51 -0700241else
Stephen Wang90c67de2016-04-26 15:15:59 -0700242NSS_CCFLAGS += -DNSS_FABRIC_SCALING_SUPPORT=0
Stephen Wang463f1cf2016-03-29 15:25:51 -0700243endif
244
Arunkumar T28b2d742015-06-16 22:15:58 +0530245# Disable Frequency scaling
246ifeq "$(NSS_FREQ_SCALE_DISABLE)" "y"
247ccflags-y += -DNSS_FREQ_SCALE_SUPPORT=0
248else
Sachin Shashidhar6dd9cfc2018-07-31 14:44:37 -0700249qca-nss-drv-objs += \
250 nss_freq.o \
Gaurao Chaudhari7c5d01e2019-09-16 10:34:48 -0700251 nss_freq_log.o \
252 nss_freq_stats.o
Arunkumar T28b2d742015-06-16 22:15:58 +0530253ccflags-y += -DNSS_FREQ_SCALE_SUPPORT=1
254endif
255
Sundarajan Srinivasan4691ba62014-11-07 11:24:07 -0800256ccflags-y += $(NSS_CCFLAGS)
257
258export NSS_CCFLAGS
259
Pamidipati, Vijayc6ae5662013-06-10 11:03:55 +0530260obj ?= .