@@ -51,6 +51,7 @@ void prueth_cleanup_rx_chns(struct prueth_emac *emac,
51
51
if (rx_chn -> rx_chn )
52
52
k3_udma_glue_release_rx_chn (rx_chn -> rx_chn );
53
53
}
54
+ EXPORT_SYMBOL_GPL (prueth_cleanup_rx_chns );
54
55
55
56
void prueth_cleanup_tx_chns (struct prueth_emac * emac )
56
57
{
@@ -71,6 +72,7 @@ void prueth_cleanup_tx_chns(struct prueth_emac *emac)
71
72
memset (tx_chn , 0 , sizeof (* tx_chn ));
72
73
}
73
74
}
75
+ EXPORT_SYMBOL_GPL (prueth_cleanup_tx_chns );
74
76
75
77
void prueth_ndev_del_tx_napi (struct prueth_emac * emac , int num )
76
78
{
@@ -84,6 +86,7 @@ void prueth_ndev_del_tx_napi(struct prueth_emac *emac, int num)
84
86
netif_napi_del (& tx_chn -> napi_tx );
85
87
}
86
88
}
89
+ EXPORT_SYMBOL_GPL (prueth_ndev_del_tx_napi );
87
90
88
91
void prueth_xmit_free (struct prueth_tx_chn * tx_chn ,
89
92
struct cppi5_host_desc_t * desc )
@@ -120,6 +123,7 @@ void prueth_xmit_free(struct prueth_tx_chn *tx_chn,
120
123
121
124
k3_cppi_desc_pool_free (tx_chn -> desc_pool , first_desc );
122
125
}
126
+ EXPORT_SYMBOL_GPL (prueth_xmit_free );
123
127
124
128
int emac_tx_complete_packets (struct prueth_emac * emac , int chn ,
125
129
int budget , bool * tdown )
@@ -264,6 +268,7 @@ int prueth_ndev_add_tx_napi(struct prueth_emac *emac)
264
268
prueth_ndev_del_tx_napi (emac , i );
265
269
return ret ;
266
270
}
271
+ EXPORT_SYMBOL_GPL (prueth_ndev_add_tx_napi );
267
272
268
273
int prueth_init_tx_chns (struct prueth_emac * emac )
269
274
{
@@ -344,6 +349,7 @@ int prueth_init_tx_chns(struct prueth_emac *emac)
344
349
prueth_cleanup_tx_chns (emac );
345
350
return ret ;
346
351
}
352
+ EXPORT_SYMBOL_GPL (prueth_init_tx_chns );
347
353
348
354
int prueth_init_rx_chns (struct prueth_emac * emac ,
349
355
struct prueth_rx_chn * rx_chn ,
@@ -453,6 +459,7 @@ int prueth_init_rx_chns(struct prueth_emac *emac,
453
459
prueth_cleanup_rx_chns (emac , rx_chn , max_rflows );
454
460
return ret ;
455
461
}
462
+ EXPORT_SYMBOL_GPL (prueth_init_rx_chns );
456
463
457
464
int prueth_dma_rx_push (struct prueth_emac * emac ,
458
465
struct sk_buff * skb ,
@@ -490,6 +497,7 @@ int prueth_dma_rx_push(struct prueth_emac *emac,
490
497
return k3_udma_glue_push_rx_chn (rx_chn -> rx_chn , 0 ,
491
498
desc_rx , desc_dma );
492
499
}
500
+ EXPORT_SYMBOL_GPL (prueth_dma_rx_push );
493
501
494
502
u64 icssg_ts_to_ns (u32 hi_sw , u32 hi , u32 lo , u32 cycle_time_ns )
495
503
{
@@ -505,6 +513,7 @@ u64 icssg_ts_to_ns(u32 hi_sw, u32 hi, u32 lo, u32 cycle_time_ns)
505
513
506
514
return ns ;
507
515
}
516
+ EXPORT_SYMBOL_GPL (icssg_ts_to_ns );
508
517
509
518
void emac_rx_timestamp (struct prueth_emac * emac ,
510
519
struct sk_buff * skb , u32 * psdata )
@@ -636,7 +645,7 @@ static int prueth_tx_ts_cookie_get(struct prueth_emac *emac)
636
645
}
637
646
638
647
/**
639
- * emac_ndo_start_xmit - EMAC Transmit function
648
+ * icssg_ndo_start_xmit - EMAC Transmit function
640
649
* @skb: SKB pointer
641
650
* @ndev: EMAC network adapter
642
651
*
@@ -647,7 +656,7 @@ static int prueth_tx_ts_cookie_get(struct prueth_emac *emac)
647
656
*
648
657
* Return: enum netdev_tx
649
658
*/
650
- enum netdev_tx emac_ndo_start_xmit (struct sk_buff * skb , struct net_device * ndev )
659
+ enum netdev_tx icssg_ndo_start_xmit (struct sk_buff * skb , struct net_device * ndev )
651
660
{
652
661
struct cppi5_host_desc_t * first_desc , * next_desc , * cur_desc ;
653
662
struct prueth_emac * emac = netdev_priv (ndev );
@@ -806,6 +815,7 @@ enum netdev_tx emac_ndo_start_xmit(struct sk_buff *skb, struct net_device *ndev)
806
815
netif_tx_stop_queue (netif_txq );
807
816
return NETDEV_TX_BUSY ;
808
817
}
818
+ EXPORT_SYMBOL_GPL (icssg_ndo_start_xmit );
809
819
810
820
static void prueth_tx_cleanup (void * data , dma_addr_t desc_dma )
811
821
{
@@ -831,6 +841,7 @@ irqreturn_t prueth_rx_irq(int irq, void *dev_id)
831
841
832
842
return IRQ_HANDLED ;
833
843
}
844
+ EXPORT_SYMBOL_GPL (prueth_rx_irq );
834
845
835
846
void prueth_emac_stop (struct prueth_emac * emac )
836
847
{
@@ -855,6 +866,7 @@ void prueth_emac_stop(struct prueth_emac *emac)
855
866
rproc_shutdown (prueth -> rtu [slice ]);
856
867
rproc_shutdown (prueth -> pru [slice ]);
857
868
}
869
+ EXPORT_SYMBOL_GPL (prueth_emac_stop );
858
870
859
871
void prueth_cleanup_tx_ts (struct prueth_emac * emac )
860
872
{
@@ -867,8 +879,9 @@ void prueth_cleanup_tx_ts(struct prueth_emac *emac)
867
879
}
868
880
}
869
881
}
882
+ EXPORT_SYMBOL_GPL (prueth_cleanup_tx_ts );
870
883
871
- int emac_napi_rx_poll (struct napi_struct * napi_rx , int budget )
884
+ int icssg_napi_rx_poll (struct napi_struct * napi_rx , int budget )
872
885
{
873
886
struct prueth_emac * emac = prueth_napi_to_emac (napi_rx );
874
887
int rx_flow = emac -> is_sr1 ?
@@ -905,6 +918,7 @@ int emac_napi_rx_poll(struct napi_struct *napi_rx, int budget)
905
918
906
919
return num_rx ;
907
920
}
921
+ EXPORT_SYMBOL_GPL (icssg_napi_rx_poll );
908
922
909
923
int prueth_prepare_rx_chan (struct prueth_emac * emac ,
910
924
struct prueth_rx_chn * chn ,
@@ -930,6 +944,7 @@ int prueth_prepare_rx_chan(struct prueth_emac *emac,
930
944
931
945
return 0 ;
932
946
}
947
+ EXPORT_SYMBOL_GPL (prueth_prepare_rx_chan );
933
948
934
949
void prueth_reset_tx_chan (struct prueth_emac * emac , int ch_num ,
935
950
bool free_skb )
@@ -944,6 +959,7 @@ void prueth_reset_tx_chan(struct prueth_emac *emac, int ch_num,
944
959
k3_udma_glue_disable_tx_chn (emac -> tx_chns [i ].tx_chn );
945
960
}
946
961
}
962
+ EXPORT_SYMBOL_GPL (prueth_reset_tx_chan );
947
963
948
964
void prueth_reset_rx_chan (struct prueth_rx_chn * chn ,
949
965
int num_flows , bool disable )
@@ -956,11 +972,13 @@ void prueth_reset_rx_chan(struct prueth_rx_chn *chn,
956
972
if (disable )
957
973
k3_udma_glue_disable_rx_chn (chn -> rx_chn );
958
974
}
975
+ EXPORT_SYMBOL_GPL (prueth_reset_rx_chan );
959
976
960
- void emac_ndo_tx_timeout (struct net_device * ndev , unsigned int txqueue )
977
+ void icssg_ndo_tx_timeout (struct net_device * ndev , unsigned int txqueue )
961
978
{
962
979
ndev -> stats .tx_errors ++ ;
963
980
}
981
+ EXPORT_SYMBOL_GPL (icssg_ndo_tx_timeout );
964
982
965
983
static int emac_set_ts_config (struct net_device * ndev , struct ifreq * ifr )
966
984
{
@@ -1024,7 +1042,7 @@ static int emac_get_ts_config(struct net_device *ndev, struct ifreq *ifr)
1024
1042
- EFAULT : 0 ;
1025
1043
}
1026
1044
1027
- int emac_ndo_ioctl (struct net_device * ndev , struct ifreq * ifr , int cmd )
1045
+ int icssg_ndo_ioctl (struct net_device * ndev , struct ifreq * ifr , int cmd )
1028
1046
{
1029
1047
switch (cmd ) {
1030
1048
case SIOCGHWTSTAMP :
@@ -1037,9 +1055,10 @@ int emac_ndo_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
1037
1055
1038
1056
return phy_do_ioctl (ndev , ifr , cmd );
1039
1057
}
1058
+ EXPORT_SYMBOL_GPL (icssg_ndo_ioctl );
1040
1059
1041
- void emac_ndo_get_stats64 (struct net_device * ndev ,
1042
- struct rtnl_link_stats64 * stats )
1060
+ void icssg_ndo_get_stats64 (struct net_device * ndev ,
1061
+ struct rtnl_link_stats64 * stats )
1043
1062
{
1044
1063
struct prueth_emac * emac = netdev_priv (ndev );
1045
1064
@@ -1058,9 +1077,10 @@ void emac_ndo_get_stats64(struct net_device *ndev,
1058
1077
stats -> tx_errors = ndev -> stats .tx_errors ;
1059
1078
stats -> tx_dropped = ndev -> stats .tx_dropped ;
1060
1079
}
1080
+ EXPORT_SYMBOL_GPL (icssg_ndo_get_stats64 );
1061
1081
1062
- int emac_ndo_get_phys_port_name (struct net_device * ndev , char * name ,
1063
- size_t len )
1082
+ int icssg_ndo_get_phys_port_name (struct net_device * ndev , char * name ,
1083
+ size_t len )
1064
1084
{
1065
1085
struct prueth_emac * emac = netdev_priv (ndev );
1066
1086
int ret ;
@@ -1071,6 +1091,7 @@ int emac_ndo_get_phys_port_name(struct net_device *ndev, char *name,
1071
1091
1072
1092
return 0 ;
1073
1093
}
1094
+ EXPORT_SYMBOL_GPL (icssg_ndo_get_phys_port_name );
1074
1095
1075
1096
/* get emac_port corresponding to eth_node name */
1076
1097
int prueth_node_port (struct device_node * eth_node )
@@ -1089,6 +1110,7 @@ int prueth_node_port(struct device_node *eth_node)
1089
1110
else
1090
1111
return PRUETH_PORT_INVALID ;
1091
1112
}
1113
+ EXPORT_SYMBOL_GPL (prueth_node_port );
1092
1114
1093
1115
/* get MAC instance corresponding to eth_node name */
1094
1116
int prueth_node_mac (struct device_node * eth_node )
@@ -1107,6 +1129,7 @@ int prueth_node_mac(struct device_node *eth_node)
1107
1129
else
1108
1130
return PRUETH_MAC_INVALID ;
1109
1131
}
1132
+ EXPORT_SYMBOL_GPL (prueth_node_mac );
1110
1133
1111
1134
void prueth_netdev_exit (struct prueth * prueth ,
1112
1135
struct device_node * eth_node )
@@ -1132,6 +1155,7 @@ void prueth_netdev_exit(struct prueth *prueth,
1132
1155
free_netdev (emac -> ndev );
1133
1156
prueth -> emac [mac ] = NULL ;
1134
1157
}
1158
+ EXPORT_SYMBOL_GPL (prueth_netdev_exit );
1135
1159
1136
1160
int prueth_get_cores (struct prueth * prueth , int slice , bool is_sr1 )
1137
1161
{
@@ -1182,6 +1206,7 @@ int prueth_get_cores(struct prueth *prueth, int slice, bool is_sr1)
1182
1206
1183
1207
return 0 ;
1184
1208
}
1209
+ EXPORT_SYMBOL_GPL (prueth_get_cores );
1185
1210
1186
1211
void prueth_put_cores (struct prueth * prueth , int slice )
1187
1212
{
@@ -1194,6 +1219,7 @@ void prueth_put_cores(struct prueth *prueth, int slice)
1194
1219
if (prueth -> pru [slice ])
1195
1220
pru_rproc_put (prueth -> pru [slice ]);
1196
1221
}
1222
+ EXPORT_SYMBOL_GPL (prueth_put_cores );
1197
1223
1198
1224
#ifdef CONFIG_PM_SLEEP
1199
1225
static int prueth_suspend (struct device * dev )
@@ -1250,3 +1276,9 @@ static int prueth_resume(struct device *dev)
1250
1276
const struct dev_pm_ops prueth_dev_pm_ops = {
1251
1277
SET_SYSTEM_SLEEP_PM_OPS (prueth_suspend , prueth_resume )
1252
1278
};
1279
+ EXPORT_SYMBOL_GPL (prueth_dev_pm_ops );
1280
+
1281
+ MODULE_AUTHOR (
"Roger Quadros <[email protected] >" );
1282
+ MODULE_AUTHOR (
"Md Danish Anwar <[email protected] >" );
1283
+ MODULE_DESCRIPTION ("PRUSS ICSSG Ethernet Driver Common Module" );
1284
+ MODULE_LICENSE ("GPL" );
0 commit comments