1 /* 2 * Copyright (C) 2012-2017 ARM Limited or its affiliates. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License 14 * along with this program; if not, see <http://www.gnu.org/licenses/>. 15 */ 16 17 /* pseudo cc_hal.h for cc7x_perf_test_driver (to be able to include code from 18 * CC drivers). 19 */ 20 21 #ifndef __CC_HAL_H__ 22 #define __CC_HAL_H__ 23 24 #include <linux/io.h> 25 26 #define READ_REGISTER(_addr) ioread32((_addr)) 27 #define WRITE_REGISTER(_addr, _data) iowrite32((_data), (_addr)) 28 29 #define CC_HAL_WRITE_REGISTER(offset, val) \ 30 WRITE_REGISTER(cc_base + (offset), val) 31 #define CC_HAL_READ_REGISTER(offset) READ_REGISTER(cc_base + (offset)) 32 33 #endif 34