1 /* 2 * 3 * SPDX-License-Identifier: GPL-2.0 4 * 5 * Copyright (C) 2011-2018 ARM or its affiliates 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; version 2. 10 * This program is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 13 * for more details. 14 * You should have received a copy of the GNU General Public License along 15 * with this program; if not, write to the Free Software Foundation, Inc., 16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 * 18 */ 19 20 #ifndef __SYSTEM_PROFILER_H__ 21 #define __SYSTEM_PROFILER_H__ 22 23 #include "acamera_types.h" 24 25 /** 26 * Return system CPU frequency 27 * 28 * @return frequency - on success 29 * -1 - on error 30 */ 31 int32_t cpu_get_freq( void ); 32 33 34 /** 35 * Initialize system clock 36 * 37 * 38 * @return none 39 */ 40 void cpu_start_clocks( void ); 41 42 43 /** 44 * Stop system clock 45 * 46 * The function returns the time difference between the current time and 47 * previous call of cpu_start_clocks 48 * 49 * 50 * @return time - on success 51 * -1 - on error 52 */ 53 uint64_t cpu_stop_clocks( void ); 54 55 56 /** 57 * Initialize profiler 58 * 59 * @return none 60 */ 61 void cpu_init_profiler( void ); 62 63 uint32_t acamera_isp_io_get_counter( void ); 64 65 #endif /* __SYSTEM_PROFILER_H__ */ 66