1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
From fb2390ac7b8fc635bc136a400419fd3eec1d006f Mon Sep 17 00:00:00 2001
From: Madalin Bucur <madalin.bucur@nxp.com>
Date: Wed, 7 Jun 2017 16:10:34 +0300
Subject: [PATCH] dpa_eth: remove unused code
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
.../ethernet/freescale/sdk_dpaa/dpaa_eth_base.c | 58 ----------------------
.../ethernet/freescale/sdk_dpaa/dpaa_eth_base.h | 1 -
2 files changed, 59 deletions(-)
--- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.c
@@ -165,64 +165,6 @@ _return_of_node_put:
}
EXPORT_SYMBOL(dpa_bp_probe);
-int dpa_bp_shared_port_seed(struct dpa_bp *bp)
-{
- void __iomem **ptr;
-
- /* In MAC-less and Shared-MAC scenarios the physical
- * address of the buffer pool in device tree is set
- * to 0 to specify that another entity (USDPAA) will
- * allocate and seed the buffers
- */
- if (!bp->paddr)
- return 0;
-
- /* allocate memory region for buffers */
- devm_request_mem_region(bp->dev, bp->paddr,
- bp->size * bp->config_count, KBUILD_MODNAME);
- /* managed ioremap unmapping */
- ptr = devres_alloc(devm_ioremap_release, sizeof(*ptr), GFP_KERNEL);
- if (!ptr)
- return -EIO;
-#ifndef CONFIG_PPC
- bp->vaddr = ioremap_cache_ns(bp->paddr, bp->size * bp->config_count);
-#else
- bp->vaddr = ioremap_prot(bp->paddr, bp->size * bp->config_count, 0);
-#endif
- if (bp->vaddr == NULL) {
- pr_err("Could not map memory for pool %d\n", bp->bpid);
- devres_free(ptr);
- return -EIO;
- }
- *ptr = bp->vaddr;
- devres_add(bp->dev, ptr);
-
- /* seed pool with buffers from that memory region */
- if (bp->seed_pool) {
- int count = bp->target_count;
- dma_addr_t addr = bp->paddr;
-
- while (count) {
- struct bm_buffer bufs[8];
- uint8_t num_bufs = 0;
-
- do {
- BUG_ON(addr > 0xffffffffffffull);
- bufs[num_bufs].bpid = bp->bpid;
- bm_buffer_set64(&bufs[num_bufs++], addr);
- addr += bp->size;
-
- } while (--count && (num_bufs < 8));
-
- while (bman_release(bp->pool, bufs, num_bufs, 0))
- cpu_relax();
- }
- }
-
- return 0;
-}
-EXPORT_SYMBOL(dpa_bp_shared_port_seed);
-
int dpa_bp_create(struct net_device *net_dev, struct dpa_bp *dpa_bp,
size_t count)
{
--- a/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h
+++ b/drivers/net/ethernet/freescale/sdk_dpaa/dpaa_eth_base.h
@@ -45,6 +45,5 @@ struct dpa_bp * __cold __must_check /* _
dpa_bp_probe(struct platform_device *_of_dev, size_t *count);
int dpa_bp_create(struct net_device *net_dev, struct dpa_bp *dpa_bp,
size_t count);
-int dpa_bp_shared_port_seed(struct dpa_bp *bp);
#endif /* __DPAA_ETH_BASE_H */
|