📄 hal_pci.h
字号:
/************************************************************************
* Philips ISP1362 hardware access layer driver for
* Intel X86 PCI platform
*
* (c) 2002 Koninklijke Philips Electronics N.V., All rights reserved
*
* This source code and any compilation or derivative thereof is the
* proprietary information of Koninklijke Philips Electronics N.V.
* and is confidential in nature.
* Under no circumstances is this software to be exposed to or placed
* under an Open Source License of any type without the expressed
* written permission of Koninklijke Philips Electronics N.V.
*
* File Name: hal_pci.h
*
* History:
*
* Version Date Author Comments
* -------------------------------------------------
* 1.0 09/23/02 SYARRA Initial Creation
* 04/10/03 SYARRA Added Comments for IO access
*
* Note: use tab space 4
************************************************************************/
#ifndef __HAL_PCI_H__
#define __HAL_PCI_H__
#include "linux/pci.h"
/* The following delays must be maintained
* Command to Data phase
* Read Register: 300 nsec
* Read Buffer: 462 nsec
*
* Write Register:
* Write Buffer:
*
* Data to Data phase:
* Read: 110 nsec
* Write: 0 nsec
* Refer Hc Programmed IO timing on Data Sheet */
#define isp1362_command(reg,dev) outw(reg,dev->io_cmd)
#define isp1362_read8(dev) inb(dev->io_data)
#define isp1362_write8(data,dev) outb(data,dev->io_data)
#define isp1362_read16(dev) inw(dev->io_data)
#define isp1362_write16(data,dev) outw(data,dev->io_data)
#define isp1362_cmd_delay() do{}while(0)
#define isp1362_data_delay() do{}while(0)
#define isp1362_printk printk
#define isp1362_udelay udelay
#define isp1362_mdelay mdelay
#define isp1362_vendor_id 0x04CC
#define isp1362_product_id 0x1A62
#define isp1362_product_string { 60,3, \
'1',0, '3',0, '6',0, '2',0, '-',0, 'O',0, 'T',0, 'G',0, ' ',0, \
'M',0, 'A',0, 'S',0, 'S',0, ' ',0, \
'S',0, 't',0, 'o',0, 'r',0, 'a',0, 'g',0, 'e',0, ' ',0, \
'P',0, 'C',0, 'I',0, \
' ',0, 'K',0, 'i',0, 't',0 }
#define isp1362_mfg_string { 46,3, \
'P',0, 'h',0, 'i',0, 'l',0, 'i',0, 'p',0, 's',0, \
' ',0, 'S',0, 'e',0, 'm',0, 'i',0, \
'c',0, 'o',0, 'n',0, 'd',0, 'u',0, 'c',0, 't',0, 'o',0, 'r',0, 's',0 }
#define isp1362_targeted_peripheral { \
{match_flags:USB_DEVICE_ID_MATCH_DEVICE, \
idVendor:isp1362_vendor_id, \
idProduct:isp1362_product_id} \
}
typedef struct isp1362_hal {
__u8 io_usage; /* Number of drivers using IO */
__u8 irq_usage; /* NUmber of drivers using INT channel */
} isp1362_hal_t;
#define DRIVER_VERSION "v1.0"
extern int isp1362_hw_isr;
extern int isp1362_hw_lock;
#define isp1362_in_interrupt() isp1362_hw_isr
#define isp1362_in_int_lock(irq) isp1362_hw_lock
#define isp1362_set_int_lock(irq) isp1362_hw_lock = 1
#define isp1362_clear_int_lock(irq) isp1362_hw_lock = 0
#endif /* __HAL_PCI_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -