pci.h

来自「基于psos操作系统的dec21140驱动」· C头文件 代码 · 共 85 行

H
85
字号
/*
 *  +-------------------------------------------------------------------+
 *  | Copyright (c) 1999,2000 TriMedia Technologies Inc.                |
 *  |                                                                   |
 *  | This software  is furnished under a license  and may only be used |
 *  | and copied in accordance with the terms  and conditions of such a |
 *  | license  and with  the inclusion of this  copyright notice.  This |
 *  | software or any other copies of this software may not be provided |
 *  | or otherwise  made available  to any other person.  The ownership |
 *  | and title of this software is not transferred.                    |
 *  |                                                                   |
 *  | The information  in this software  is subject  to change  without |
 *  | any  prior notice  and should not be construed as a commitment by |
 *  | TriMedia Technologies.                                            |
 *  |                                                                   |
 *  | This  code  and  information  is  provided  "as is"  without  any |
 *  | warranty of any kind,  either expressed or implied, including but |
 *  | not limited  to the implied warranties  of merchantability and/or |
 *  | fitness for any particular purpose.                               |
 *  +-------------------------------------------------------------------+
 *
 *
 *  Module name              : pci.h    1.4
 *
 *  Last update              : 14:58:10 - 00/06/19
 *
 *  Title                    : PCI access functions
 *
 *  Description              : This module provides the PCI access 
 *                             functions that are used by the ethernet
 *                             driver (dec21140.c).
 *
 *                             NOTE: this driver should use the tmPCI
 *                                   device library instead.
 *                                
 */

/*--------------------------- Includes ---------------------------------------*/

#ifndef _PCI_H
#define _PCI_H

#include <tm1/mmio.h>

/*--------------------------- Functions --------------------------------------*/

void pci_write_config_dword(unsigned int bus,
			    unsigned int dn,
			    unsigned int fn,
			    unsigned int addr,
			    unsigned int val);

void pci_write_config_word(unsigned int bus,
			   unsigned int dn,
			   unsigned int fn,
			   unsigned int addr,
			   unsigned short val);

void pci_write_config_byte(unsigned int bus,
			   unsigned int dn,
			   unsigned int fn,
			   unsigned int addr,
			   unsigned char val);


unsigned int pci_read_config_dword(unsigned int bus,
				   unsigned int dn,
				   unsigned int fn,
				   unsigned int addr);


unsigned short pci_read_config_word(unsigned int bus,
				    unsigned int dn,
				    unsigned int fn,
				    unsigned int addr);


unsigned char pci_read_config_byte(unsigned int bus,
				   unsigned int dn,
				   unsigned int fn,
				   unsigned int addr);


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?