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

rt2x00debug.h (1362B)


      1/* SPDX-License-Identifier: GPL-2.0-or-later */
      2/*
      3	Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
      4	<http://rt2x00.serialmonkey.com>
      5
      6 */
      7
      8/*
      9	Module: rt2x00debug
     10	Abstract: Data structures for the rt2x00debug.
     11 */
     12
     13#ifndef RT2X00DEBUG_H
     14#define RT2X00DEBUG_H
     15
     16struct rt2x00_dev;
     17
     18/**
     19 * enum rt2x00debugfs_entry_flags: Flags for debugfs registry entry
     20 *
     21 * @RT2X00DEBUGFS_OFFSET: rt2x00lib should pass the register offset
     22 *	as argument when using the callback function read()/write()
     23 */
     24enum rt2x00debugfs_entry_flags {
     25	RT2X00DEBUGFS_OFFSET	= (1 << 0),
     26};
     27
     28#define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type)		\
     29struct reg##__name {						\
     30	__type (*read)(struct rt2x00_dev *rt2x00dev,		\
     31		     const unsigned int word);			\
     32	void (*write)(struct rt2x00_dev *rt2x00dev,		\
     33		      const unsigned int word, __type data);	\
     34								\
     35	unsigned int flags;					\
     36								\
     37	unsigned int word_base;					\
     38	unsigned int word_size;					\
     39	unsigned int word_count;				\
     40} __name
     41
     42struct rt2x00debug {
     43	/*
     44	 * Reference to the modules structure.
     45	 */
     46	struct module *owner;
     47
     48	/*
     49	 * Register access entries.
     50	 */
     51	RT2X00DEBUGFS_REGISTER_ENTRY(csr, u32);
     52	RT2X00DEBUGFS_REGISTER_ENTRY(eeprom, u16);
     53	RT2X00DEBUGFS_REGISTER_ENTRY(bbp, u8);
     54	RT2X00DEBUGFS_REGISTER_ENTRY(rf, u32);
     55	RT2X00DEBUGFS_REGISTER_ENTRY(rfcsr, u8);
     56};
     57
     58#endif /* RT2X00DEBUG_H */