19d4fa1a1SMauro Carvalho Chehab /* 29d4fa1a1SMauro Carvalho Chehab * Support for Intel Camera Imaging ISP subsystem. 39d4fa1a1SMauro Carvalho Chehab * Copyright (c) 2010-2015, Intel Corporation. 49d4fa1a1SMauro Carvalho Chehab * 59d4fa1a1SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify it 69d4fa1a1SMauro Carvalho Chehab * under the terms and conditions of the GNU General Public License, 79d4fa1a1SMauro Carvalho Chehab * version 2, as published by the Free Software Foundation. 89d4fa1a1SMauro Carvalho Chehab * 99d4fa1a1SMauro Carvalho Chehab * This program is distributed in the hope it will be useful, but WITHOUT 109d4fa1a1SMauro Carvalho Chehab * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 119d4fa1a1SMauro Carvalho Chehab * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 129d4fa1a1SMauro Carvalho Chehab * more details. 139d4fa1a1SMauro Carvalho Chehab */ 149d4fa1a1SMauro Carvalho Chehab 159d4fa1a1SMauro Carvalho Chehab #ifndef __GP_TIMER_LOCAL_H_INCLUDED__ 169d4fa1a1SMauro Carvalho Chehab #define __GP_TIMER_LOCAL_H_INCLUDED__ 179d4fa1a1SMauro Carvalho Chehab 189d4fa1a1SMauro Carvalho Chehab #include "gp_timer_global.h" /*GP_TIMER_SEL 199d4fa1a1SMauro Carvalho Chehab GP_TIMER_SIGNAL_SELECT*/ 209d4fa1a1SMauro Carvalho Chehab 219d4fa1a1SMauro Carvalho Chehab #include "gp_timer_defs.h" /*HIVE_GP_TIMER_xxx registers*/ 229d4fa1a1SMauro Carvalho Chehab #include "hive_isp_css_defs.h" /*HIVE_GP_TIMER_NUM_COUNTERS 239d4fa1a1SMauro Carvalho Chehab HIVE_GP_TIMER_NUM_IRQS*/ 249d4fa1a1SMauro Carvalho Chehab 259d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_RESET_REG HIVE_GP_TIMER_RESET_REG_IDX 269d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_OVERALL_ENABLE HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX 279d4fa1a1SMauro Carvalho Chehab 289d4fa1a1SMauro Carvalho Chehab /*Register offsets for timers [1,7] can be obtained 299d4fa1a1SMauro Carvalho Chehab * by adding (GP_TIMERx_ID * sizeof(uint32_t))*/ 309d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_ENABLE_ID(timer_id) HIVE_GP_TIMER_ENABLE_REG_IDX(timer_id) 319d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_VALUE_ID(timer_id) HIVE_GP_TIMER_VALUE_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS) 329d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_COUNT_TYPE_ID(timer_id) HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS) 339d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_SIGNAL_SELECT_ID(timer_id) HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS) 349d4fa1a1SMauro Carvalho Chehab 359d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_IRQ_TRIGGER_VALUE_ID(irq_id) HIVE_GP_TIMER_IRQ_TRIGGER_VALUE_REG_IDX(irq_id, HIVE_GP_TIMER_NUM_COUNTERS) 369d4fa1a1SMauro Carvalho Chehab 379d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_IRQ_TIMER_SELECT_ID(irq_id) \ 389d4fa1a1SMauro Carvalho Chehab HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq_id, HIVE_GP_TIMER_NUM_COUNTERS, HIVE_GP_TIMER_NUM_IRQS) 399d4fa1a1SMauro Carvalho Chehab 409d4fa1a1SMauro Carvalho Chehab #define _REG_GP_TIMER_IRQ_ENABLE_ID(irq_id) \ 419d4fa1a1SMauro Carvalho Chehab HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq_id, HIVE_GP_TIMER_NUM_COUNTERS, HIVE_GP_TIMER_NUM_IRQS) 429d4fa1a1SMauro Carvalho Chehab 439d4fa1a1SMauro Carvalho Chehab #endif /*__GP_TIMER_LOCAL_H_INCLUDED__*/ 44