Lines Matching +full:device +full:- +full:sram
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
8 * cc_sram_mgr_init() - Initializes SRAM pool.
9 * The pool starts right at the beginning of SRAM.
12 * @drvdata: Associated device driver context
20 struct device *dev = drvdata_to_dev(drvdata); in cc_sram_mgr_init()
22 if (drvdata->hw_rev < CC_HW_REV_712) { in cc_sram_mgr_init()
26 dev_err(dev, "Invalid SRAM offset 0x%x\n", start); in cc_sram_mgr_init()
27 return -EINVAL; in cc_sram_mgr_init()
31 drvdata->sram_free_offset = start; in cc_sram_mgr_init()
36 * cc_sram_alloc() - Allocate buffer from SRAM pool.
38 * @drvdata: Associated device driver context
42 * Address offset in SRAM or NULL_SRAM_ADDR for failure.
46 struct device *dev = drvdata_to_dev(drvdata); in cc_sram_alloc()
54 if (size > (CC_CC_SRAM_SIZE - drvdata->sram_free_offset)) { in cc_sram_alloc()
56 size, drvdata->sram_free_offset); in cc_sram_alloc()
60 p = drvdata->sram_free_offset; in cc_sram_alloc()
61 drvdata->sram_free_offset += size; in cc_sram_alloc()
67 * cc_set_sram_desc() - Create const descriptors sequence to
68 * set values in given array into SRAM.
72 * @dst: The target SRAM buffer to set into