summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ti/netcp_core.c
diff options
context:
space:
mode:
authorKaricheri, Muralidharan <m-karicheri2@ti.com>2015-01-29 18:15:51 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-31 17:33:07 -0800
commit58c11b5faed6913f73f2763d3a85e4a668e8ba2b (patch)
tree94b1e068f2a91fd553d18d534eeec8ca619dc1e0 /drivers/net/ethernet/ti/netcp_core.c
parent932eb7638ad7d9145620178992044b5e87356969 (diff)
downloadtalos-obmc-linux-58c11b5faed6913f73f2763d3a85e4a668e8ba2b.tar.gz
talos-obmc-linux-58c11b5faed6913f73f2763d3a85e4a668e8ba2b.zip
drivers: net: cpsw: make cpsw_ale.c a module to allow re-use on Keystone
NetCP on Keystone has cpsw ale function similar to other TI SoCs and this driver is re-used. To allow both ti cpsw and keystone netcp to re-use the driver, convert the cpsw ale to a module and configure it through Kconfig option CONFIG_TI_CPSW_ALE. Currently it is statically linked to both TI CPSW and NetCP and this causes issues when the above drivers are built as dynamic modules. This patch addresses this issue While at it, fix the Makefile and code to build both netcp_core and netcp_ethss as dynamic modules. This is needed to support arm allmodconfig. This also requires exporting of API calls provided by netcp_core so that both the above can be dynamic modules. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Mugunthan V N <mugunthanvnm@ti.com> Tested-by: Mugunthan V N <mugunthanvnm@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/netcp_core.c')
-rw-r--r--drivers/net/ethernet/ti/netcp_core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c
index ba3002ec710a..a31a8c3c8e7c 100644
--- a/drivers/net/ethernet/ti/netcp_core.c
+++ b/drivers/net/ethernet/ti/netcp_core.c
@@ -354,6 +354,7 @@ fail:
netcp_unregister_module(module);
return ret;
}
+EXPORT_SYMBOL_GPL(netcp_register_module);
static void netcp_release_module(struct netcp_device *netcp_device,
struct netcp_module *module)
@@ -414,6 +415,7 @@ void netcp_unregister_module(struct netcp_module *module)
mutex_unlock(&netcp_modules_lock);
}
+EXPORT_SYMBOL_GPL(netcp_unregister_module);
void *netcp_module_get_intf_data(struct netcp_module *module,
struct netcp_intf *intf)
@@ -425,6 +427,7 @@ void *netcp_module_get_intf_data(struct netcp_module *module,
return intf_modpriv->module_priv;
return NULL;
}
+EXPORT_SYMBOL_GPL(netcp_module_get_intf_data);
/* Module TX and RX Hook management */
struct netcp_hook_list {
@@ -459,6 +462,7 @@ int netcp_register_txhook(struct netcp_intf *netcp_priv, int order,
return 0;
}
+EXPORT_SYMBOL_GPL(netcp_register_txhook);
int netcp_unregister_txhook(struct netcp_intf *netcp_priv, int order,
netcp_hook_rtn *hook_rtn, void *hook_data)
@@ -480,6 +484,7 @@ int netcp_unregister_txhook(struct netcp_intf *netcp_priv, int order,
spin_unlock_irqrestore(&netcp_priv->lock, flags);
return -ENOENT;
}
+EXPORT_SYMBOL_GPL(netcp_unregister_txhook);
int netcp_register_rxhook(struct netcp_intf *netcp_priv, int order,
netcp_hook_rtn *hook_rtn, void *hook_data)
@@ -1226,6 +1231,7 @@ int netcp_txpipe_close(struct netcp_tx_pipe *tx_pipe)
}
return 0;
}
+EXPORT_SYMBOL_GPL(netcp_txpipe_close);
int netcp_txpipe_open(struct netcp_tx_pipe *tx_pipe)
{
@@ -1267,6 +1273,7 @@ err:
tx_pipe->dma_channel = NULL;
return ret;
}
+EXPORT_SYMBOL_GPL(netcp_txpipe_open);
int netcp_txpipe_init(struct netcp_tx_pipe *tx_pipe,
struct netcp_device *netcp_device,
@@ -1278,6 +1285,7 @@ int netcp_txpipe_init(struct netcp_tx_pipe *tx_pipe,
tx_pipe->dma_queue_id = dma_queue_id;
return 0;
}
+EXPORT_SYMBOL_GPL(netcp_txpipe_init);
static struct netcp_addr *netcp_addr_find(struct netcp_intf *netcp,
const u8 *addr,
OpenPOWER on IntegriCloud