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