blob: 7ca35fcfb4796f8609ca6b96842bcd49d281d130 [file] [log] [blame]
Kristofer Jonsson537c71c2020-05-05 14:17:22 +02001/*
2 * Copyright (c) 2019-2020 Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Licensed under the Apache License, Version 2.0 (the License); you may
7 * not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
14 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19/*****************************************************************************
20 * Includes
21 *****************************************************************************/
22
23#include "ethosu55_interface.h"
24#include "ethosu_common.h"
Bhavik Pateldae5be02020-06-18 15:25:15 +020025#include "ethosu_driver.h"
26#include "pmu_ethosu.h"
27
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020028#include <assert.h>
Per Åstrande07b1f92020-09-28 08:31:46 +020029#include <inttypes.h>
Bhavik Pateldae5be02020-06-18 15:25:15 +020030#include <stddef.h>
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020031
32/*****************************************************************************
33 * Defines
34 *****************************************************************************/
35
36#define COMMA ,
37#define SEMICOLON ;
38
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020039#define EVTYPE(A, name) \
40 case PMU_EVENT_TYPE_##name: \
41 return ETHOSU_PMU_##name
42
43#define EVID(A, name) (PMU_EVENT_TYPE_##name)
44
Bhavik Patel8e32b0b2020-06-23 13:48:25 +020045#define ETHOSU_PMCCNTR_CFG_START_STOP_EVENT_MASK (0x3FF)
46
47#define NPU_REG_PMEVCNTR(x) (NPU_REG_PMEVCNTR0 + ((x) * sizeof(uint32_t)))
48#define NPU_REG_PMEVTYPER(x) (NPU_REG_PMEVTYPER0 + ((x) * sizeof(uint32_t)))
49
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020050/*****************************************************************************
51 * Variables
52 *****************************************************************************/
53
Bhavik Pateldae5be02020-06-18 15:25:15 +020054/**
55 * NOTE: A pointer to ethosu_driver will be added to the PMU functions
56 * when multi-NPU functionality is implemented later. We shall use a
57 * shared ethosu_driver instance till then.
58 * */
59extern struct ethosu_driver ethosu_drv;
60
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020061static const enum pmu_event_type eventbyid[] = {EXPAND_PMU_EVENT_TYPE(EVID, COMMA)};
62
63/*****************************************************************************
64 * Functions
65 *****************************************************************************/
66
67enum ethosu_pmu_event_type pmu_event_type(uint32_t id)
68{
69 switch (id)
70 {
71 EXPAND_PMU_EVENT_TYPE(EVTYPE, SEMICOLON);
Per Åstrande07b1f92020-09-28 08:31:46 +020072 default:
73 LOG_ERR("Unknown PMU event id: 0x%" PRIx32 "\n", id);
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020074 }
75
76 return ETHOSU_PMU_SENTINEL;
77}
78
79uint32_t pmu_event_value(enum ethosu_pmu_event_type event)
80{
Per Åstrand51c18ba2020-09-28 11:25:36 +020081 int a = event;
82 if ((a < ETHOSU_PMU_SENTINEL) && (a >= ETHOSU_PMU_NO_EVENT))
83 {
84 return eventbyid[event];
85 }
86 else
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020087 {
88 return (uint32_t)(-1);
89 }
Kristofer Jonsson537c71c2020-05-05 14:17:22 +020090}
91
92void ethosu_pmu_driver_init(void)
93{
94#ifdef PMU_AUTOINIT
Bhavik Pateldae5be02020-06-18 15:25:15 +020095 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCR, INIT_PMCR);
96 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCNTENSET, INIT_PMCNTENSET);
97 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCNTENCLR, INIT_PMCNTENCLR);
98 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMOVSSET, INIT_PMOVSSET);
99 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMOVSCLR, INIT_PMOVSCLR);
100 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMINTSET, INIT_PMINTSET);
101 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMINTCLR, INIT_PMINTCLR);
102 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_LO, INIT_PMCCNTR);
103 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_HI, INIT_PMCCNTR);
104 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_CFG, INIT_PMCCNTR_CFG);
Kristofer Jonsson537c71c2020-05-05 14:17:22 +0200105
106 for (int i = 0; i < ETHOSU_PMU_NCOUNTERS; i++)
107 {
Bhavik Pateldae5be02020-06-18 15:25:15 +0200108 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMEVCNTR(i), 0);
109 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMEVTYPER(i), 0);
Kristofer Jonsson537c71c2020-05-05 14:17:22 +0200110 }
111#endif
112}
113
114void ethosu_pmu_driver_exit(void) {}
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200115
116void ETHOSU_PMU_Enable(void)
117{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200118 LOG_DEBUG("%s:\n", __FUNCTION__);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200119 struct pmcr_r pmcr;
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200120 pmcr.word = ethosu_drv.dev.pmcr;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200121 pmcr.cnt_en = 1;
Bhavik Pateldae5be02020-06-18 15:25:15 +0200122 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCR, pmcr.word);
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200123 ethosu_drv.dev.pmcr = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCR);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200124}
125
126void ETHOSU_PMU_Disable(void)
127{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200128 LOG_DEBUG("%s:\n", __FUNCTION__);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200129 struct pmcr_r pmcr;
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200130 pmcr.word = ethosu_drv.dev.pmcr;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200131 pmcr.cnt_en = 0;
Bhavik Pateldae5be02020-06-18 15:25:15 +0200132 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCR, pmcr.word);
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200133 ethosu_drv.dev.pmcr = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCR);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200134}
135
136void ETHOSU_PMU_Set_EVTYPER(uint32_t num, enum ethosu_pmu_event_type type)
137{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200138 ASSERT(num < ETHOSU_PMU_NCOUNTERS);
139 uint32_t val = pmu_event_value(type);
140 LOG_DEBUG("%s: num=%u, type=%d, val=%u\n", __FUNCTION__, num, type, val);
141 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMEVTYPER(num), val);
142 ethosu_drv.dev.pmu_evtypr[num] = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMEVTYPER(num));
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200143}
144
145enum ethosu_pmu_event_type ETHOSU_PMU_Get_EVTYPER(uint32_t num)
146{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200147 ASSERT(num < ETHOSU_PMU_NCOUNTERS);
148 uint32_t val = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMEVTYPER(num));
149 enum ethosu_pmu_event_type type = pmu_event_type(val);
150 LOG_DEBUG("%s: num=%u, type=%d, val=%u\n", __FUNCTION__, num, type, val);
151 return type;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200152}
153
154void ETHOSU_PMU_CYCCNT_Reset(void)
155{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200156 LOG_DEBUG("%s:\n", __FUNCTION__);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200157 struct pmcr_r pmcr;
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200158 pmcr.word = ethosu_drv.dev.pmcr;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200159 pmcr.cycle_cnt_rst = 1;
Bhavik Pateldae5be02020-06-18 15:25:15 +0200160 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCR, pmcr.word);
Kristofer Jonsson77514da2020-09-23 08:46:41 +0200161 ethosu_drv.dev.pmcr = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCR);
162 ethosu_drv.dev.pmccntr = 0;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200163}
164
165void ETHOSU_PMU_EVCNTR_ALL_Reset(void)
166{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200167 LOG_DEBUG("%s:\n", __FUNCTION__);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200168 struct pmcr_r pmcr;
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200169 pmcr.word = ethosu_drv.dev.pmcr;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200170 pmcr.event_cnt_rst = 1;
Bhavik Pateldae5be02020-06-18 15:25:15 +0200171 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCR, pmcr.word);
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200172 ethosu_drv.dev.pmcr = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCR);
173
174 for (uint32_t i = 0; i < ETHOSU_PMU_NCOUNTERS; i++)
175 {
176 ethosu_drv.dev.pmu_evcntr[i] = 0;
177 }
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200178}
179
180void ETHOSU_PMU_CNTR_Enable(uint32_t mask)
181{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200182 LOG_DEBUG("%s: mask=0x%08x\n", __FUNCTION__, mask);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200183 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCNTENSET, mask);
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200184 ethosu_drv.dev.pmcnten = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCNTENSET);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200185}
186
187void ETHOSU_PMU_CNTR_Disable(uint32_t mask)
188{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200189 LOG_DEBUG("%s: mask=0x%08x\n", __FUNCTION__, mask);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200190 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCNTENCLR, mask);
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200191 ethosu_drv.dev.pmcnten = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCNTENSET);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200192}
193
Bhavik Pateldae5be02020-06-18 15:25:15 +0200194uint32_t ETHOSU_PMU_CNTR_Status(void)
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200195{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200196 uint32_t val = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCNTENSET);
197 LOG_DEBUG("%s: mask=0x%08x\n", __FUNCTION__, val);
198 return val;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200199}
200
201uint64_t ETHOSU_PMU_Get_CCNTR(void)
202{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200203 uint64_t val = (((uint64_t)ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_HI)) << 32) |
204 ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_LO);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200205
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200206 LOG_DEBUG("%s: val=%llu, pmccntr=%llu\n", __FUNCTION__, val, ethosu_drv.dev.pmccntr);
207
208 // Return the cached value in case the NPU was powered off
209 if (ethosu_drv.dev.pmccntr > val)
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200210 {
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200211 return ethosu_drv.dev.pmccntr;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200212 }
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200213
214 return val;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200215}
216
217void ETHOSU_PMU_Set_CCNTR(uint64_t val)
218{
219 uint32_t mask = ETHOSU_PMU_CNTR_Status();
220
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200221 LOG_DEBUG("%s: val=%llu\n", __FUNCTION__, val);
222
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200223 if (mask & ETHOSU_PMU_CCNT_Msk)
224 {
225 ETHOSU_PMU_CNTR_Disable(ETHOSU_PMU_CCNT_Msk);
226 }
227
Bhavik Pateldae5be02020-06-18 15:25:15 +0200228 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_LO, (val & MASK_0_31_BITS));
229 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_HI, (val & MASK_32_47_BITS) >> 32);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200230
231 if (mask & ETHOSU_PMU_CCNT_Msk)
232 {
233 ETHOSU_PMU_CNTR_Enable(ETHOSU_PMU_CCNT_Msk);
234 }
235}
236
237uint32_t ETHOSU_PMU_Get_EVCNTR(uint32_t num)
238{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200239 ASSERT(num < ETHOSU_PMU_NCOUNTERS);
240 uint32_t val = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMEVCNTR(num));
241 LOG_DEBUG("%s: num=%u, val=%u, pmu_evcntr=%u\n", __FUNCTION__, num, val, ethosu_drv.dev.pmu_evcntr[num]);
242
243 // Return the cached value in case the NPU was powered off
244 if (ethosu_drv.dev.pmu_evcntr[num] > val)
245 {
246 return ethosu_drv.dev.pmu_evcntr[num];
247 }
248
249 return val;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200250}
251
252void ETHOSU_PMU_Set_EVCNTR(uint32_t num, uint32_t val)
253{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200254 ASSERT(num < ETHOSU_PMU_NCOUNTERS);
255 LOG_DEBUG("%s: num=%u, val=%u\n", __FUNCTION__, num, val);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200256 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMEVCNTR(num), val);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200257}
258
259uint32_t ETHOSU_PMU_Get_CNTR_OVS(void)
260{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200261 LOG_DEBUG("%s:\n", __FUNCTION__);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200262 return ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMOVSSET);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200263}
264
265// TODO: check if this function name match with the description &
266// implementation.
267void ETHOSU_PMU_Set_CNTR_OVS(uint32_t mask)
268{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200269 LOG_DEBUG("%s:\n", __FUNCTION__);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200270 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMOVSCLR, mask);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200271}
272
273void ETHOSU_PMU_Set_CNTR_IRQ_Enable(uint32_t mask)
274{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200275 LOG_DEBUG("%s: mask=0x%08x\n", __FUNCTION__, mask);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200276 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMINTSET, mask);
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200277 ethosu_drv.dev.pmint = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMINTSET);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200278}
279
280void ETHOSU_PMU_Set_CNTR_IRQ_Disable(uint32_t mask)
281{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200282 LOG_DEBUG("%s: mask=0x%08x\n", __FUNCTION__, mask);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200283 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMINTCLR, mask);
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200284 ethosu_drv.dev.pmint = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMINTSET);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200285}
286
Bhavik Pateldae5be02020-06-18 15:25:15 +0200287uint32_t ETHOSU_PMU_Get_IRQ_Enable(void)
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200288{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200289 uint32_t mask = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMINTSET);
290 LOG_DEBUG("%s: mask=0x%08x\n", __FUNCTION__, mask);
291 return mask;
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200292}
293
294void ETHOSU_PMU_CNTR_Increment(uint32_t mask)
295{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200296 LOG_DEBUG("%s:\n", __FUNCTION__);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200297 uint32_t cntrs_active = ETHOSU_PMU_CNTR_Status();
298
299 if (mask & ETHOSU_PMU_CCNT_Msk)
300 {
301 if (mask & ETHOSU_PMU_CCNT_Msk)
302 {
303 ETHOSU_PMU_CNTR_Disable(ETHOSU_PMU_CCNT_Msk);
304 uint64_t val = ETHOSU_PMU_Get_CCNTR() + 1;
Bhavik Pateldae5be02020-06-18 15:25:15 +0200305 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_LO, (val & MASK_0_31_BITS));
306 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_HI, (val & MASK_32_47_BITS) >> 32);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200307 if (cntrs_active & ETHOSU_PMU_CCNT_Msk)
308 {
309 ETHOSU_PMU_CNTR_Enable(ETHOSU_PMU_CCNT_Msk);
310 }
311 }
312 }
313 for (int i = 0; i < ETHOSU_PMU_NCOUNTERS; i++)
314 {
315 uint32_t cntr = (0x0001 << i);
316
317 if (mask & cntr)
318 {
319 ETHOSU_PMU_CNTR_Disable(cntr);
Bhavik Pateldae5be02020-06-18 15:25:15 +0200320 uint32_t val = ethosu_read_reg(&ethosu_drv.dev, NPU_REG_PMEVCNTR(i));
321 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMEVCNTR(i), val + 1);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200322 if (cntrs_active & cntr)
323 {
324 ETHOSU_PMU_CNTR_Enable(cntr);
325 }
326 }
327 }
328}
329
330void ETHOSU_PMU_PMCCNTR_CFG_Set_Start_Event(uint32_t start_event)
331{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200332 LOG_DEBUG("%s: start_event=%u\n", __FUNCTION__, start_event);
333 struct pmccntr_cfg_r *cfg = (struct pmccntr_cfg_r *)&ethosu_drv.dev.pmccntr_cfg;
334 cfg->CYCLE_CNT_CFG_START = start_event & ETHOSU_PMCCNTR_CFG_START_STOP_EVENT_MASK;
335 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_CFG, cfg->word);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200336}
337
338void ETHOSU_PMU_PMCCNTR_CFG_Set_Stop_Event(uint32_t stop_event)
339{
Kristofer Jonssonef387ea2020-08-25 16:32:21 +0200340 LOG_DEBUG("%s: stop_event=%u\n", __FUNCTION__, stop_event);
341 struct pmccntr_cfg_r *cfg = (struct pmccntr_cfg_r *)&ethosu_drv.dev.pmccntr_cfg;
342 cfg->CYCLE_CNT_CFG_STOP = stop_event & ETHOSU_PMCCNTR_CFG_START_STOP_EVENT_MASK;
343 ethosu_write_reg(&ethosu_drv.dev, NPU_REG_PMCCNTR_CFG, cfg->word);
Bhavik Patel8e32b0b2020-06-23 13:48:25 +0200344}