summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/ti-common
diff options
context:
space:
mode:
authorKhoronzhuk, Ivan <ivan.khoronzhuk@ti.com>2014-09-05 19:02:48 +0300
committerTom Rini <trini@ti.com>2014-10-23 11:27:04 -0400
commit9ea9021ac466f5ccc8b6238cbce37428bb58f887 (patch)
tree0b024accfec5fab8ba0f9b52151a5095602baf7b /arch/arm/include/asm/ti-common
parentef4547176d0fa4d43d060a58c0c902add7fe0aed (diff)
downloadtalos-obmc-uboot-9ea9021ac466f5ccc8b6238cbce37428bb58f887.tar.gz
talos-obmc-uboot-9ea9021ac466f5ccc8b6238cbce37428bb58f887.zip
dma: keystone_nav: generalize driver usage
The keystone_nav driver is general driver intended to be used for working with queue manager and pktdma for different IPs like NETCP, AIF, FFTC, etc. So the it's API shouldn't be named like it works only with one of them, it should be general names. The names with prefix like netcp_* rather do for drivers/net/keystone_net.c driver. So it's good to generalize this driver to be used for different IP's and delete confusion with real NETCP driver. The current netcp_* functions of keystone navigator can be used for other settings of pktdma, not only for NETCP. The API of this driver is used by the keystone_net driver to work with NETCP, so net driver also should be corrected. For convenience collect pkdma configurations in drivers/dma/keystone_nav_cfg.c. Acked-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Diffstat (limited to 'arch/arm/include/asm/ti-common')
-rw-r--r--arch/arm/include/asm/ti-common/keystone_nav.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/include/asm/ti-common/keystone_nav.h b/arch/arm/include/asm/ti-common/keystone_nav.h
index 646c2f3a56..696d8c6fc0 100644
--- a/arch/arm/include/asm/ti-common/keystone_nav.h
+++ b/arch/arm/include/asm/ti-common/keystone_nav.h
@@ -169,6 +169,8 @@ struct pktdma_cfg {
u32 rx_flow; /* flow that is used for RX */
};
+extern struct pktdma_cfg netcp_pktdma;
+
/*
* packet dma user allocates memory for rx buffers
* and describe it in the following structure
@@ -180,10 +182,10 @@ struct rx_buff_desc {
u32 rx_flow;
};
-int netcp_close(void);
-int netcp_init(struct rx_buff_desc *rx_buffers);
-int netcp_send(u32 *pkt, int num_bytes, u32 swinfo2);
-void *netcp_recv(u32 **pkt, int *num_bytes);
-void netcp_release_rxhd(void *hd);
+int ksnav_close(struct pktdma_cfg *pktdma);
+int ksnav_init(struct pktdma_cfg *pktdma, struct rx_buff_desc *rx_buffers);
+int ksnav_send(struct pktdma_cfg *pktdma, u32 *pkt, int num_bytes, u32 swinfo2);
+void *ksnav_recv(struct pktdma_cfg *pktdma, u32 **pkt, int *num_bytes);
+void ksnav_release_rxhd(struct pktdma_cfg *pktdma, void *hd);
#endif /* _KEYSTONE_NAV_H_ */
OpenPOWER on IntegriCloud