亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sis5513.c

?? ep9315平臺下硬盤驅(qū)動的源碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* * linux/drivers/ide/pci/sis5513.c		Version 0.14ac	Sept 11, 2002 * * Copyright (C) 1999-2000	Andre Hedrick <andre@linux-ide.org> * Copyright (C) 2002		Lionel Bouton <Lionel.Bouton@inet6.fr>, Maintainer * May be copied or modified under the terms of the GNU General Public License * * * Thanks : * * SiS Taiwan		: for direct support and hardware. * Daniela Engert	: for initial ATA100 advices and numerous others. * John Fremlin, Manfred Spraul, Dave Morgan, Peter Kjellerstedt	: *			  for checking code correctness, providing patches. * * * Original tests and design on the SiS620/5513 chipset. * ATA100 tests and design on the SiS735/5513 chipset. * ATA16/33 support from specs * ATA133 support for SiS961/962 by L.C. Chang <lcchang@sis.com.tw> * * Documentation: *	SiS chipset documentation available under NDA to companies not *	individuals only. *//* * Notes/Special cases: * - SiS5513 derivatives usually have the same PCI IDE register layout when *  supporting the same UDMA modes. * - There are exceptions : *  . SiS730 and SiS550 use the same layout than ATA_66 chipsets but support *   ATA_100 *  . ATA_133 capable chipsets mark a shift in SiS chipset designs : previously *   south and northbridge were integrated, making IDE (a southbridge function) *   capabilities easily deduced from the northbridge PCI id. With ATA_133, *   chipsets started to be split in the usual north/south bridges chips *   -> the driver needs to detect the correct southbridge when faced to newest *   northbridges. *  . On ATA133 capable chipsets when bit 30 of dword at 0x54 is 1 the *   configuration space is moved from 0x40 to 0x70. */#include <linux/config.h>#include <linux/types.h>#include <linux/module.h>#include <linux/kernel.h>#include <linux/delay.h>#include <linux/timer.h>#include <linux/mm.h>#include <linux/ioport.h>#include <linux/blkdev.h>#include <linux/hdreg.h>#include <linux/interrupt.h>#include <linux/pci.h>#include <linux/init.h>#include <linux/ide.h>#include <asm/io.h>#include <asm/irq.h>#include "ide_modes.h"#include "sis5513.h"/* When DEBUG is defined it outputs initial PCI config register   values and changes made to them by the driver */// #define DEBUG/* When BROKEN_LEVEL is defined it limits the DMA mode   at boot time to its value */// #define BROKEN_LEVEL XFER_SW_DMA_0/* Miscellaneous flags */#define SIS5513_LATENCY		0x01/* registers layout and init values are chipset family dependant *//* 1/ define families */#define ATA_00		0x00#define ATA_16		0x01#define ATA_33		0x02#define ATA_66		0x03#define ATA_100a	0x04 // SiS730 is ATA100 with ATA66 layout#define ATA_100		0x05#define ATA_133a	0x06 // SiS961b with 133 support#define ATA_133		0x07 // SiS962/* 2/ variable holding the controller chipset family value */static u8 chipset_family;/* * Debug code: following IDE config registers' changes */#ifdef DEBUG/* Copy of IDE Config registers fewer will be used * Some odd chipsets hang if unused registers are accessed * -> We only access them in #DEBUG code (then we'll see if SiS did * it right from day one) */static u8 ide_regs_copy[0xff];/* Read config registers, print differences from previous read */static void sis5513_load_verify_registers(struct pci_dev* dev, char* info) {	int i;	u8 reg_val;	u8 changed=0;	printk("SIS5513: %s, changed registers:\n", info);	for(i=0; i<=0xff; i++) {		pci_read_config_byte(dev, i, &reg_val);		if (reg_val != ide_regs_copy[i]) {			printk("%02x: %02x -> %02x\n",			       i, ide_regs_copy[i], reg_val);			ide_regs_copy[i]=reg_val;			changed=1;		}	}	if (!changed) {		printk("none\n");	}}/* Load config registers, no printing */static void sis5513_load_registers(struct pci_dev* dev) {	int i;	for(i=0; i<=0xff; i++) {		pci_read_config_byte(dev, i, &(ide_regs_copy[i]));	}}/* Print config space registers a la "lspci -vxxx" */static void sis5513_print_registers(struct pci_dev* dev, char* marker) {	int i,j;	sis5513_load_registers(dev);	printk("SIS5513 %s\n", marker);	for(i=0; i<=0xf; i++) {		printk("SIS5513 dump: %d" "0:", i);		for(j=0; j<=0xf; j++) {			printk(" %02x", ide_regs_copy[(i<<16)+j]);		}		printk("\n");	}}#endif/* * Devices supported */static const struct {	const char *name;	u16 host_id;	u8 chipset_family;	u8 flags;} SiSHostChipInfo[] = {	{ "SiS752",	PCI_DEVICE_ID_SI_752,	ATA_133,	0 },	{ "SiS751",	PCI_DEVICE_ID_SI_751,	ATA_133,	0 },	{ "SiS750",	PCI_DEVICE_ID_SI_750,	ATA_133,	0 },	{ "SiS748",	PCI_DEVICE_ID_SI_748,	ATA_133,	0 },	{ "SiS746",	PCI_DEVICE_ID_SI_746,	ATA_133,	0 },	{ "SiS745",	PCI_DEVICE_ID_SI_745,	ATA_133,	0 },	{ "SiS740",	PCI_DEVICE_ID_SI_740,	ATA_100,	0 },	{ "SiS735",	PCI_DEVICE_ID_SI_735,	ATA_100,	SIS5513_LATENCY },	{ "SiS730",	PCI_DEVICE_ID_SI_730,	ATA_100a,	SIS5513_LATENCY },	{ "SiS652",	PCI_DEVICE_ID_SI_652,	ATA_133,	0 },	{ "SiS651",	PCI_DEVICE_ID_SI_651,	ATA_133,	0 },	{ "SiS650",	PCI_DEVICE_ID_SI_650,	ATA_133,	0 },	{ "SiS648",	PCI_DEVICE_ID_SI_648,	ATA_133,	0 },	{ "SiS646",	PCI_DEVICE_ID_SI_646,	ATA_133,	0 },	{ "SiS645",	PCI_DEVICE_ID_SI_645,	ATA_133,	0 },	{ "SiS635",	PCI_DEVICE_ID_SI_635,	ATA_100,	SIS5513_LATENCY },	{ "SiS640",	PCI_DEVICE_ID_SI_640,	ATA_66,		SIS5513_LATENCY },	{ "SiS630",	PCI_DEVICE_ID_SI_630,	ATA_66,		SIS5513_LATENCY },	{ "SiS620",	PCI_DEVICE_ID_SI_620,	ATA_66,		SIS5513_LATENCY },	{ "SiS550",	PCI_DEVICE_ID_SI_550,	ATA_100a,	0},	{ "SiS540",	PCI_DEVICE_ID_SI_540,	ATA_66,		0},	{ "SiS530",	PCI_DEVICE_ID_SI_530,	ATA_66,		0},	{ "SiS5600",	PCI_DEVICE_ID_SI_5600,	ATA_33,		0},	{ "SiS5598",	PCI_DEVICE_ID_SI_5598,	ATA_33,		0},	{ "SiS5597",	PCI_DEVICE_ID_SI_5597,	ATA_33,		0},	{ "SiS5591",	PCI_DEVICE_ID_SI_5591,	ATA_33,		0},	{ "SiS5513",	PCI_DEVICE_ID_SI_5513,	ATA_16,		0},	{ "SiS5511",	PCI_DEVICE_ID_SI_5511,	ATA_16,		0},};/* Cycle time bits and values vary across chip dma capabilities   These three arrays hold the register layout and the values to set.   Indexed by chipset_family and (dma_mode - XFER_UDMA_0) *//* {ATA_00, ATA_16, ATA_33, ATA_66, ATA_100a, ATA_100, ATA_133} */static u8 cycle_time_offset[] = {0,0,5,4,4,0,0};static u8 cycle_time_range[] = {0,0,2,3,3,4,4};static u8 cycle_time_value[][XFER_UDMA_6 - XFER_UDMA_0 + 1] = {	{0,0,0,0,0,0,0}, /* no udma */	{0,0,0,0,0,0,0}, /* no udma */	{3,2,1,0,0,0,0}, /* ATA_33 */	{7,5,3,2,1,0,0}, /* ATA_66 */	{7,5,3,2,1,0,0}, /* ATA_100a (730 specific), differences are on cycle_time range and offset */	{11,7,5,4,2,1,0}, /* ATA_100 */	{15,10,7,5,3,2,1}, /* ATA_133a (earliest 691 southbridges) */	{15,10,7,5,3,2,1}, /* ATA_133 */};/* CRC Valid Setup Time vary across IDE clock setting 33/66/100/133   See SiS962 data sheet for more detail */static u8 cvs_time_value[][XFER_UDMA_6 - XFER_UDMA_0 + 1] = {	{0,0,0,0,0,0,0}, /* no udma */	{0,0,0,0,0,0,0}, /* no udma */	{2,1,1,0,0,0,0},	{4,3,2,1,0,0,0},	{4,3,2,1,0,0,0},	{6,4,3,1,1,1,0},	{9,6,4,2,2,2,2},	{9,6,4,2,2,2,2},};/* Initialize time, Active time, Recovery time vary across   IDE clock settings. These 3 arrays hold the register value   for PIO0/1/2/3/4 and DMA0/1/2 mode in order */static u8 ini_time_value[][8] = {	{0,0,0,0,0,0,0,0},	{0,0,0,0,0,0,0,0},	{2,1,0,0,0,1,0,0},	{4,3,1,1,1,3,1,1},	{4,3,1,1,1,3,1,1},	{6,4,2,2,2,4,2,2},	{9,6,3,3,3,6,3,3},	{9,6,3,3,3,6,3,3},};static u8 act_time_value[][8] = {	{0,0,0,0,0,0,0,0},	{0,0,0,0,0,0,0,0},	{9,9,9,2,2,7,2,2},	{19,19,19,5,4,14,5,4},	{19,19,19,5,4,14,5,4},	{28,28,28,7,6,21,7,6},	{38,38,38,10,9,28,10,9},	{38,38,38,10,9,28,10,9},};static u8 rco_time_value[][8] = {	{0,0,0,0,0,0,0,0},	{0,0,0,0,0,0,0,0},	{9,2,0,2,0,7,1,1},	{19,5,1,5,2,16,3,2},	{19,5,1,5,2,16,3,2},	{30,9,3,9,4,25,6,4},	{40,12,4,12,5,34,12,5},	{40,12,4,12,5,34,12,5},};static struct pci_dev *host_dev = NULL;/* * Printing configuration *//* Used for chipset type printing at boot time */static char* chipset_capability[] = {	"ATA", "ATA 16",	"ATA 33", "ATA 66",	"ATA 100", "ATA 100",	"ATA 133", "ATA 133"};#if defined(DISPLAY_SIS_TIMINGS) && defined(CONFIG_PROC_FS)#include <linux/stat.h>#include <linux/proc_fs.h>static u8 sis_proc = 0;static struct pci_dev *bmide_dev;static char* cable_type[] = {	"80 pins",	"40 pins"};static char* recovery_time[] ={	"12 PCICLK", "1 PCICLK",	"2 PCICLK", "3 PCICLK",	"4 PCICLK", "5 PCICLCK",	"6 PCICLK", "7 PCICLCK",	"8 PCICLK", "9 PCICLCK",	"10 PCICLK", "11 PCICLK",	"13 PCICLK", "14 PCICLK",	"15 PCICLK", "15 PCICLK"};static char* active_time[] = {	"8 PCICLK", "1 PCICLCK",	"2 PCICLK", "3 PCICLK",	"4 PCICLK", "5 PCICLK",	"6 PCICLK", "12 PCICLK"};static char* cycle_time[] = {	"Reserved", "2 CLK",	"3 CLK", "4 CLK",	"5 CLK", "6 CLK",	"7 CLK", "8 CLK",	"9 CLK", "10 CLK",	"11 CLK", "12 CLK",	"13 CLK", "14 CLK",	"15 CLK", "16 CLK"};/* Generic add master or slave info function */static char* get_drives_info (char *buffer, u8 pos){	u8 reg00, reg01, reg10, reg11; /* timing registers */	u32 regdw0, regdw1;	char* p = buffer;/* Postwrite/Prefetch */	if (chipset_family < ATA_133) {		pci_read_config_byte(bmide_dev, 0x4b, &reg00);		p += sprintf(p, "Drive %d:        Postwrite %s \t \t Postwrite %s\n",			     pos, (reg00 & (0x10 << pos)) ? "Enabled" : "Disabled",			     (reg00 & (0x40 << pos)) ? "Enabled" : "Disabled");		p += sprintf(p, "                Prefetch  %s \t \t Prefetch  %s\n",			     (reg00 & (0x01 << pos)) ? "Enabled" : "Disabled",			     (reg00 & (0x04 << pos)) ? "Enabled" : "Disabled");		pci_read_config_byte(bmide_dev, 0x40+2*pos, &reg00);		pci_read_config_byte(bmide_dev, 0x41+2*pos, &reg01);		pci_read_config_byte(bmide_dev, 0x44+2*pos, &reg10);		pci_read_config_byte(bmide_dev, 0x45+2*pos, &reg11);	} else {		u32 reg54h;		u8 drive_pci = 0x40;		pci_read_config_dword(bmide_dev, 0x54, &reg54h);		if (reg54h & 0x40000000) {			// Configuration space remapped to 0x70			drive_pci = 0x70;		}		pci_read_config_dword(bmide_dev, (unsigned long)drive_pci+8*pos, &regdw0);		pci_read_config_dword(bmide_dev, (unsigned long)drive_pci+8*pos+4, &regdw1);		p += sprintf(p, "Drive %d:\n", pos);	}/* UDMA */	if (chipset_family >= ATA_133) {		p += sprintf(p, "                UDMA %s \t \t \t UDMA %s\n",			     (regdw0 & 0x04) ? "Enabled" : "Disabled",			     (regdw1 & 0x04) ? "Enabled" : "Disabled");		p += sprintf(p, "                UDMA Cycle Time    %s \t UDMA Cycle Time    %s\n",			     cycle_time[(regdw0 & 0xF0) >> 4],			     cycle_time[(regdw1 & 0xF0) >> 4]);	} else if (chipset_family >= ATA_33) {		p += sprintf(p, "                UDMA %s \t \t \t UDMA %s\n",			     (reg01 & 0x80) ? "Enabled" : "Disabled",			     (reg11 & 0x80) ? "Enabled" : "Disabled");		p += sprintf(p, "                UDMA Cycle Time    ");		switch(chipset_family) {			case ATA_33:	p += sprintf(p, cycle_time[(reg01 & 0x60) >> 5]); break;			case ATA_66:			case ATA_100a:	p += sprintf(p, cycle_time[(reg01 & 0x70) >> 4]); break;			case ATA_100:			case ATA_133a:	p += sprintf(p, cycle_time[reg01 & 0x0F]); break;			case ATA_133:			default:	p += sprintf(p, "133+ ?"); break;		}		p += sprintf(p, " \t UDMA Cycle Time    ");		switch(chipset_family) {			case ATA_33:	p += sprintf(p, cycle_time[(reg11 & 0x60) >> 5]); break;			case ATA_66:			case ATA_100a:	p += sprintf(p, cycle_time[(reg11 & 0x70) >> 4]); break;			case ATA_100:			case ATA_133a:  p += sprintf(p, cycle_time[reg11 & 0x0F]); break;			case ATA_133:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区啪啪| 国产精品影视天天线| 欧美视频中文一区二区三区在线观看| 国产日产欧美一区| youjizz久久| 一区二区三区精品视频在线| 色狠狠桃花综合| 国产成人免费视频网站高清观看视频| 久久久久久电影| 成人a区在线观看| 亚洲综合在线第一页| 欧美高清激情brazzers| 久久爱www久久做| 国产日韩亚洲欧美综合| 91在线丨porny丨国产| 亚洲高清一区二区三区| 日韩欧美亚洲另类制服综合在线| 国产呦精品一区二区三区网站| 久久精品亚洲国产奇米99| 国产成人免费在线观看| 亚洲国产一区二区视频| 欧美videos大乳护士334| 91亚洲精品乱码久久久久久蜜桃| 午夜精品成人在线视频| 久久精品综合网| 欧美色精品在线视频| 国产真实乱对白精彩久久| 亚洲精品国产视频| 精品日韩一区二区三区 | 国产三级久久久| 色乱码一区二区三区88| 国内成+人亚洲+欧美+综合在线 | 欧美xxxxx裸体时装秀| 成人激情小说乱人伦| 亚洲mv大片欧洲mv大片精品| 久久免费午夜影院| 欧美色视频在线| 福利91精品一区二区三区| 亚洲va中文字幕| 亚洲欧洲国产日韩| 欧美大胆一级视频| 色老头久久综合| 国产成人精品aa毛片| 日本午夜一区二区| 夜夜嗨av一区二区三区中文字幕| 精品国产电影一区二区| 欧美午夜免费电影| 国产福利一区二区三区视频| 婷婷综合久久一区二区三区| 综合色天天鬼久久鬼色| 久久精品一二三| 欧美一区二区日韩一区二区| 色综合久久天天综合网| 国产乱人伦偷精品视频不卡 | 国产成人av电影| 日韩av在线播放中文字幕| 亚洲精品欧美专区| 国产精品少妇自拍| 久久久www免费人成精品| 91精品国产综合久久久久久久| 一本到不卡免费一区二区| 成人动漫一区二区三区| 国产一级精品在线| 国产一区二区三区国产| 黄色日韩网站视频| 另类小说视频一区二区| 三级久久三级久久| 一区二区三区在线看| 中文字幕一区二区在线观看| 国产日韩av一区二区| 国产目拍亚洲精品99久久精品| 亚洲h在线观看| 亚洲一区二区三区小说| 一区二区三区在线免费播放| 亚洲欧美日本在线| 亚洲乱码国产乱码精品精可以看| 国产精品乱码久久久久久| 国产精品欧美综合在线| 国产精品久久精品日日| 国产精品成人午夜| 亚洲精品国产精华液| 亚洲图片欧美视频| 日韩中文字幕91| 日韩在线一二三区| 精品一区二区在线观看| 国产美女主播视频一区| 成人av资源网站| 99re视频精品| 在线观看91视频| 欧美一区二区三区在线电影| 日韩视频中午一区| 久久久久久麻豆| 国产精品人人做人人爽人人添 | 欧美午夜免费电影| 欧美精品在线视频| 91精品国产综合久久婷婷香蕉 | 欧美性极品少妇| 欧美亚洲综合在线| 欧美一区午夜精品| 久久九九99视频| 亚洲另类中文字| 日本一区中文字幕| 国产福利91精品一区| 91污片在线观看| 欧美精品久久天天躁| 精品黑人一区二区三区久久| 久久久亚洲高清| 亚洲自拍偷拍九九九| 久久国产福利国产秒拍| 成人av电影在线| 欧美精品电影在线播放| 国产色产综合色产在线视频 | 91精品国产乱| 中文字幕 久热精品 视频在线| 一区二区三区在线影院| 韩国精品主播一区二区在线观看 | 不卡视频在线观看| 欧美妇女性影城| 国产精品成人免费| 老鸭窝一区二区久久精品| 99久久99久久综合| 精品欧美黑人一区二区三区| 亚洲精品视频在线观看网站| 久久99深爱久久99精品| 亚洲国产精品成人久久综合一区| 亚洲综合色网站| 国产成人精品免费一区二区| 欧美电影一区二区| 亚洲色图欧洲色图婷婷| 国产在线乱码一区二区三区| 欧美综合天天夜夜久久| 国产欧美综合色| 免费在线看成人av| 在线观看免费亚洲| 中文一区二区完整视频在线观看| 日韩av二区在线播放| 97aⅴ精品视频一二三区| 久久中文字幕电影| 欧美a一区二区| 欧美伊人精品成人久久综合97 | 国产视频在线观看一区二区三区| 日韩福利电影在线| 色激情天天射综合网| 中文字幕中文字幕在线一区| 国内精品国产三级国产a久久 | 日韩精品一区二区三区三区免费| 一区二区久久久| 93久久精品日日躁夜夜躁欧美| 亚洲精品一区二区三区99| 秋霞影院一区二区| 3atv一区二区三区| 午夜精品福利一区二区蜜股av| 欧美综合亚洲图片综合区| 亚洲激情第一区| 91麻豆精品视频| 亚洲特级片在线| 懂色av中文一区二区三区| 国产三级久久久| 国产精品538一区二区在线| 精品国产3级a| 精品亚洲aⅴ乱码一区二区三区| 日韩三级视频在线看| 麻豆国产精品777777在线| 日韩一区二区高清| 乱中年女人伦av一区二区| 日韩精品中文字幕一区| 美日韩一区二区| 精品卡一卡二卡三卡四在线| 久久国产精品露脸对白| 久久五月婷婷丁香社区| 国产成人午夜片在线观看高清观看| 精品国产伦一区二区三区免费| 久久97超碰色| 久久久国产精品午夜一区ai换脸| 国产黄人亚洲片| 国产精品第一页第二页第三页| 99久久精品免费看| 亚洲免费av高清| 91.麻豆视频| 狠狠色丁香婷综合久久| 日本一区免费视频| 色香色香欲天天天影视综合网| 本田岬高潮一区二区三区| 国产精品日产欧美久久久久| 一本高清dvd不卡在线观看| 亚洲观看高清完整版在线观看| 欧美日韩成人一区| 精久久久久久久久久久| 亚洲国产精品成人综合色在线婷婷| 91免费在线播放| 日韩精品一二三| 国产日产亚洲精品系列| 日本电影亚洲天堂一区| 日本成人在线视频网站| 国产欧美日韩精品一区| 欧美伊人久久久久久午夜久久久久| 久久国产日韩欧美精品| 1024成人网色www| 欧美精品三级日韩久久| 国产成人精品免费在线|