1 /* 2 * Copyright (c) 2026 Justin Hibbits 3 * 4 * SPDX-License-Identifier: BSD-2-Clause 5 */ 6 7 #ifndef BMAN_VAR_H 8 #define BMAN_VAR_H 9 10 #include "dpaa_common.h" 11 #include "portals.h" 12 13 #define BMAN_MAX_POOLS 64 14 #define BMAN_MAX_POOLS_1023 8 15 16 DPAA_RING_DECLARE(bman_rcr); 17 18 struct bman_mc { 19 uint8_t polarity; 20 bool busy; 21 }; 22 23 struct bman_portal_softc { 24 struct dpaa_portal_softc sc_base; 25 26 struct bman_mc mc; 27 struct bman_rcr_ring sc_rcr; 28 struct bman_pool *sc_pools[BMAN_MAX_POOLS]; 29 }; 30 31 struct bman_pool { 32 uint32_t bpid; 33 bm_depletion_handler dep_cb; 34 void *arg; 35 }; 36 37 DPCPU_DECLARE(struct bman_portal_softc *, bman_affine_portal); 38 39 int bman_release(struct bman_pool *pool, const struct bman_buffer *bufs, 40 uint8_t count); 41 42 void bman_portal_enable_scn(struct bman_portal_softc *, struct bman_pool *); 43 44 #endif 45