Aaron Williams | 0449c43 | 2022-04-07 09:11:14 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | /* |
| 3 | * Copyright (C) 2018-2022 Marvell International Ltd. |
| 4 | * |
| 5 | * Helper functions for FPA setup. |
| 6 | */ |
| 7 | |
| 8 | #include <errno.h> |
| 9 | #include <log.h> |
| 10 | #include <time.h> |
| 11 | #include <linux/delay.h> |
| 12 | |
| 13 | #include <mach/cvmx-regs.h> |
| 14 | #include <mach/cvmx-csr.h> |
| 15 | #include <mach/cvmx-bootmem.h> |
| 16 | #include <mach/octeon-model.h> |
| 17 | #include <mach/cvmx-fuse.h> |
| 18 | #include <mach/octeon-feature.h> |
| 19 | #include <mach/cvmx-qlm.h> |
| 20 | #include <mach/octeon_qlm.h> |
| 21 | #include <mach/cvmx-pcie.h> |
| 22 | #include <mach/cvmx-coremask.h> |
| 23 | #include <mach/cvmx-range.h> |
| 24 | #include <mach/cvmx-global-resources.h> |
| 25 | |
| 26 | #include <mach/cvmx-agl-defs.h> |
| 27 | #include <mach/cvmx-bgxx-defs.h> |
| 28 | #include <mach/cvmx-ciu-defs.h> |
| 29 | #include <mach/cvmx-gmxx-defs.h> |
| 30 | #include <mach/cvmx-gserx-defs.h> |
| 31 | #include <mach/cvmx-ilk-defs.h> |
| 32 | #include <mach/cvmx-ipd-defs.h> |
| 33 | #include <mach/cvmx-pcsx-defs.h> |
| 34 | #include <mach/cvmx-pcsxx-defs.h> |
| 35 | #include <mach/cvmx-pki-defs.h> |
| 36 | #include <mach/cvmx-pko-defs.h> |
| 37 | #include <mach/cvmx-xcv-defs.h> |
| 38 | |
| 39 | #include <mach/cvmx-hwpko.h> |
| 40 | #include <mach/cvmx-ilk.h> |
| 41 | #include <mach/cvmx-ipd.h> |
| 42 | #include <mach/cvmx-pki.h> |
| 43 | #include <mach/cvmx-pko3.h> |
| 44 | #include <mach/cvmx-pko3-queue.h> |
| 45 | #include <mach/cvmx-pko3-resources.h> |
| 46 | #include <mach/cvmx-pip.h> |
| 47 | |
| 48 | #include <mach/cvmx-helper.h> |
| 49 | #include <mach/cvmx-helper-board.h> |
| 50 | #include <mach/cvmx-helper-cfg.h> |
| 51 | |
| 52 | #include <mach/cvmx-helper-bgx.h> |
| 53 | #include <mach/cvmx-helper-cfg.h> |
| 54 | #include <mach/cvmx-helper-util.h> |
| 55 | #include <mach/cvmx-helper-pki.h> |
| 56 | #include <mach/cvmx-helper-pko.h> |
| 57 | |
| 58 | /** |
| 59 | * @INTERNAL |
| 60 | * OBSOLETE |
| 61 | * |
| 62 | * Allocate memory for and initialize a single FPA pool. |
| 63 | * |
| 64 | * @param pool Pool to initialize |
| 65 | * @param buffer_size Size of buffers to allocate in bytes |
| 66 | * @param buffers Number of buffers to put in the pool. Zero is allowed |
| 67 | * @param name String name of the pool for debugging purposes |
| 68 | * @return Zero on success, non-zero on failure |
| 69 | * |
| 70 | * This function is only for transition, will be removed. |
| 71 | */ |
| 72 | int __cvmx_helper_initialize_fpa_pool(int pool, u64 buffer_size, u64 buffers, |
| 73 | const char *name) |
| 74 | { |
| 75 | return cvmx_fpa_setup_pool(pool, name, NULL, buffer_size, buffers); |
| 76 | } |