summaryrefslogtreecommitdiffstats
path: root/linux
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-12 13:22:10 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-23 14:55:21 +0100
commita7d252c645c59e877fe468e4c3e33dde47381d7c (patch)
tree29b3324538fdf70ad00f19e03c80fda2b76808cb /linux
parent95fe5b1f46607bebf80fb843f2e89f58e0d0e1f7 (diff)
downloadrtems-libbsd-a7d252c645c59e877fe468e4c3e33dde47381d7c.tar.bz2
dpaa: Add and use bman_new_pool_for_bpid()
Update #3277.
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c5
-rw-r--r--linux/drivers/soc/fsl/qbman/bman.c11
-rw-r--r--linux/include/soc/fsl/bman.h3
3 files changed, 19 insertions, 0 deletions
diff --git a/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 00ffebdf..bf7a2771 100644
--- a/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/linux/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -571,6 +571,11 @@ static int dpaa_bp_alloc_pool(struct dpaa_bp *dpaa_bp)
dpaa_bp->bpid = (u8)bman_get_bpid(dpaa_bp->pool);
}
+#ifdef __rtems__
+ else {
+ dpaa_bp->pool = bman_new_pool_for_bpid(dpaa_bp->bpid);
+ }
+#endif /* __rtems__ */
if (dpaa_bp->seed_cb) {
err = dpaa_bp->seed_cb(dpaa_bp);
diff --git a/linux/drivers/soc/fsl/qbman/bman.c b/linux/drivers/soc/fsl/qbman/bman.c
index 44e4ee4b..50923fb1 100644
--- a/linux/drivers/soc/fsl/qbman/bman.c
+++ b/linux/drivers/soc/fsl/qbman/bman.c
@@ -720,6 +720,17 @@ err:
return NULL;
}
EXPORT_SYMBOL(bman_new_pool);
+#ifdef __rtems__
+struct bman_pool *
+bman_new_pool_for_bpid(u8 bpid)
+{
+ struct bman_pool *pool;
+
+ pool = malloc(sizeof(*pool), M_KMALLOC, M_WAITOK | M_ZERO);
+ pool->bpid = bpid;
+ return (pool);
+}
+#endif /* __rtems__ */
void bman_free_pool(struct bman_pool *pool)
{
diff --git a/linux/include/soc/fsl/bman.h b/linux/include/soc/fsl/bman.h
index eaaf56df..8cc22082 100644
--- a/linux/include/soc/fsl/bman.h
+++ b/linux/include/soc/fsl/bman.h
@@ -86,6 +86,9 @@ struct bman_pool;
* Creates a pool object, and returns a reference to it or NULL on error.
*/
struct bman_pool *bman_new_pool(void);
+#ifdef __rtems__
+struct bman_pool *bman_new_pool_for_bpid(u8 bpid);
+#endif /* __rtems__ */
/**
* bman_free_pool - Deallocates a Buffer Pool object