cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

cs5536_mfgpt.h (795B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/*
      3 * cs5536 mfgpt header file
      4 */
      5
      6#ifndef _CS5536_MFGPT_H
      7#define _CS5536_MFGPT_H
      8
      9#include <cs5536/cs5536.h>
     10#include <cs5536/cs5536_pci.h>
     11
     12#ifdef CONFIG_CS5536_MFGPT
     13extern void setup_mfgpt0_timer(void);
     14extern void disable_mfgpt0_counter(void);
     15extern void enable_mfgpt0_counter(void);
     16#else
     17static inline void __maybe_unused setup_mfgpt0_timer(void)
     18{
     19}
     20static inline void __maybe_unused disable_mfgpt0_counter(void)
     21{
     22}
     23static inline void __maybe_unused enable_mfgpt0_counter(void)
     24{
     25}
     26#endif
     27
     28#define MFGPT_TICK_RATE 14318000
     29#define COMPARE	 ((MFGPT_TICK_RATE + HZ/2) / HZ)
     30
     31#define MFGPT_BASE	mfgpt_base
     32#define MFGPT0_CMP2	(MFGPT_BASE + 2)
     33#define MFGPT0_CNT	(MFGPT_BASE + 4)
     34#define MFGPT0_SETUP	(MFGPT_BASE + 6)
     35
     36#endif /*!_CS5536_MFGPT_H */