linux/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer_local.h
<<
>>
Prefs
   1/*
   2 * Support for Intel Camera Imaging ISP subsystem.
   3 * Copyright (c) 2010-2015, Intel Corporation.
   4 *
   5 * This program is free software; you can redistribute it and/or modify it
   6 * under the terms and conditions of the GNU General Public License,
   7 * version 2, as published by the Free Software Foundation.
   8 *
   9 * This program is distributed in the hope it will be useful, but WITHOUT
  10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  12 * more details.
  13 */
  14
  15#ifndef __GP_TIMER_LOCAL_H_INCLUDED__
  16#define  __GP_TIMER_LOCAL_H_INCLUDED__
  17
  18#include "gp_timer_global.h" /*GP_TIMER_SEL
  19                                GP_TIMER_SIGNAL_SELECT*/
  20
  21#include "gp_timer_defs.h"    /*HIVE_GP_TIMER_xxx registers*/
  22#include "hive_isp_css_defs.h" /*HIVE_GP_TIMER_NUM_COUNTERS
  23                                 HIVE_GP_TIMER_NUM_IRQS*/
  24
  25#define _REG_GP_TIMER_RESET_REG HIVE_GP_TIMER_RESET_REG_IDX
  26#define _REG_GP_TIMER_OVERALL_ENABLE HIVE_GP_TIMER_OVERALL_ENABLE_REG_IDX
  27
  28/*Register offsets for timers [1,7] can be obtained
  29 * by adding (GP_TIMERx_ID * sizeof(uint32_t))*/
  30#define _REG_GP_TIMER_ENABLE_ID(timer_id)        HIVE_GP_TIMER_ENABLE_REG_IDX(timer_id)
  31#define _REG_GP_TIMER_VALUE_ID(timer_id)         HIVE_GP_TIMER_VALUE_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS)
  32#define _REG_GP_TIMER_COUNT_TYPE_ID(timer_id)    HIVE_GP_TIMER_COUNT_TYPE_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS)
  33#define _REG_GP_TIMER_SIGNAL_SELECT_ID(timer_id) HIVE_GP_TIMER_SIGNAL_SELECT_REG_IDX(timer_id, HIVE_GP_TIMER_NUM_COUNTERS)
  34
  35
  36#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)
  37
  38#define _REG_GP_TIMER_IRQ_TIMER_SELECT_ID(irq_id)   \
  39        HIVE_GP_TIMER_IRQ_TIMER_SELECT_REG_IDX(irq_id, HIVE_GP_TIMER_NUM_COUNTERS, HIVE_GP_TIMER_NUM_IRQS)
  40
  41#define _REG_GP_TIMER_IRQ_ENABLE_ID(irq_id) \
  42        HIVE_GP_TIMER_IRQ_ENABLE_REG_IDX(irq_id, HIVE_GP_TIMER_NUM_COUNTERS, HIVE_GP_TIMER_NUM_IRQS)
  43
  44
  45#endif  /*__GP_TIMER_LOCAL_H_INCLUDED__*/
  46