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

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

?? ht6560b.c

?? linux-2.6.15.6
?? C
字號:
/* *  linux/drivers/ide/legacy/ht6560b.c		Version 0.07	Feb  1, 2000 * *  Copyright (C) 1995-2000  Linus Torvalds & author (see below) *//* * *  Version 0.01        Initial version hacked out of ide.c * *  Version 0.02        Added support for PIO modes, auto-tune * *  Version 0.03        Some cleanups * *  Version 0.05        PIO mode cycle timings auto-tune using bus-speed * *  Version 0.06        Prefetch mode now defaults no OFF. To set *                      prefetch mode OFF/ON use "hdparm -p8/-p9". *                      Unmask irq is disabled when prefetch mode *                      is enabled. * *  Version 0.07        Trying to fix CD-ROM detection problem. *                      "Prefetch" mode bit OFF for ide disks and *                      ON for anything else. * * *  HT-6560B EIDE-controller support *  To activate controller support use kernel parameter "ide0=ht6560b". *  Use hdparm utility to enable PIO mode support. * *  Author:    Mikko Ala-Fossi            <maf@iki.fi> *             Jan Evert van Grootheest   <janevert@iae.nl> * *  Try:  http://www.maf.iki.fi/~maf/ht6560b/ */#define HT6560B_VERSION "v0.07"#undef REALLY_SLOW_IO		/* most systems can safely undef this */#include <linux/module.h>#include <linux/config.h>#include <linux/types.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/ide.h>#include <linux/init.h>#include <asm/io.h>/* #define DEBUG */  /* remove comments for DEBUG messages *//* * The special i/o-port that HT-6560B uses to configuration: *    bit0 (0x01): "1" selects secondary interface *    bit2 (0x04): "1" enables FIFO function *    bit5 (0x20): "1" enables prefetched data read function  (???) * * The special i/o-port that HT-6560A uses to configuration: *    bit0 (0x01): "1" selects secondary interface *    bit1 (0x02): "1" enables prefetched data read function *    bit2 (0x04): "0" enables multi-master system	      (?) *    bit3 (0x08): "1" 3 cycle time, "0" 2 cycle time	      (?) */#define HT_CONFIG_PORT	  0x3e6#define HT_CONFIG(drivea) (u8)(((drivea)->drive_data & 0xff00) >> 8)/* * FIFO + PREFETCH (both a/b-model) */#define HT_CONFIG_DEFAULT 0x1c /* no prefetch *//* #define HT_CONFIG_DEFAULT 0x3c */ /* with prefetch */#define HT_SECONDARY_IF	  0x01#define HT_PREFETCH_MODE  0x20/* * ht6560b Timing values: * * I reviewed some assembler source listings of htide drivers and found * out how they setup those cycle time interfacing values, as they at Holtek * call them. IDESETUP.COM that is supplied with the drivers figures out * optimal values and fetches those values to drivers. I found out that * they use IDE_SELECT_REG to fetch timings to the ide board right after * interface switching. After that it was quite easy to add code to * ht6560b.c. * * IDESETUP.COM gave me values 0x24, 0x45, 0xaa, 0xff that worked fine * for hda and hdc. But hdb needed higher values to work, so I guess * that sometimes it is necessary to give higher value than IDESETUP * gives.   [see cmd640.c for an extreme example of this. -ml] * * Perhaps I should explain something about these timing values: * The higher nibble of value is the Recovery Time  (rt) and the lower nibble * of the value is the Active Time  (at). Minimum value 2 is the fastest and * the maximum value 15 is the slowest. Default values should be 15 for both. * So 0x24 means 2 for rt and 4 for at. Each of the drives should have * both values, and IDESETUP gives automatically rt=15 st=15 for CDROMs or * similar. If value is too small there will be all sorts of failures. * * Timing byte consists of *	High nibble:  Recovery Cycle Time  (rt) *	     The valid values range from 2 to 15. The default is 15. * *	Low nibble:   Active Cycle Time	   (at) *	     The valid values range from 2 to 15. The default is 15. * * You can obtain optimized timing values by running Holtek IDESETUP.COM * for DOS. DOS drivers get their timing values from command line, where * the first value is the Recovery Time and the second value is the * Active Time for each drive. Smaller value gives higher speed. * In case of failures you should probably fall back to a higher value. */#define HT_TIMING(drivea) (u8)((drivea)->drive_data & 0x00ff)#define HT_TIMING_DEFAULT 0xff/* * This routine handles interface switching for the peculiar hardware design * on the F.G.I./Holtek HT-6560B VLB IDE interface. * The HT-6560B can only enable one IDE port at a time, and requires a * silly sequence (below) whenever we switch between primary and secondary. *//* * This routine is invoked from ide.c to prepare for access to a given drive. */static void ht6560b_selectproc (ide_drive_t *drive){	unsigned long flags;	static u8 current_select = 0;	static u8 current_timing = 0;	u8 select, timing;		local_irq_save(flags);		select = HT_CONFIG(drive);	timing = HT_TIMING(drive);		if (select != current_select || timing != current_timing) {		current_select = select;		current_timing = timing;		if (drive->media != ide_disk || !drive->present)			select |= HT_PREFETCH_MODE;		(void) HWIF(drive)->INB(HT_CONFIG_PORT);		(void) HWIF(drive)->INB(HT_CONFIG_PORT);		(void) HWIF(drive)->INB(HT_CONFIG_PORT);		(void) HWIF(drive)->INB(HT_CONFIG_PORT);		HWIF(drive)->OUTB(select, HT_CONFIG_PORT);		/*		 * Set timing for this drive:		 */		HWIF(drive)->OUTB(timing, IDE_SELECT_REG);		(void) HWIF(drive)->INB(IDE_STATUS_REG);#ifdef DEBUG		printk("ht6560b: %s: select=%#x timing=%#x\n",			drive->name, select, timing);#endif	}	local_irq_restore(flags);}/* * Autodetection and initialization of ht6560b */static int __init try_to_init_ht6560b(void){	u8 orig_value;	int i;		/* Autodetect ht6560b */	if ((orig_value = inb(HT_CONFIG_PORT)) == 0xff)		return 0;		for (i=3;i>0;i--) {		outb(0x00, HT_CONFIG_PORT);		if (!( (~inb(HT_CONFIG_PORT)) & 0x3f )) {			outb(orig_value, HT_CONFIG_PORT);			return 0;		}	}	outb(0x00, HT_CONFIG_PORT);	if ((~inb(HT_CONFIG_PORT))& 0x3f) {		outb(orig_value, HT_CONFIG_PORT);		return 0;	}	/*	 * Ht6560b autodetected	 */	outb(HT_CONFIG_DEFAULT, HT_CONFIG_PORT);	outb(HT_TIMING_DEFAULT, 0x1f6);  /* IDE_SELECT_REG */	(void) inb(0x1f7);               /* IDE_STATUS_REG */		printk("\nht6560b " HT6560B_VERSION	       ": chipset detected and initialized"#ifdef DEBUG	       " with debug enabled"#endif		);	return 1;}static u8 ht_pio2timings(ide_drive_t *drive, u8 pio){	int active_time, recovery_time;	int active_cycles, recovery_cycles;	ide_pio_data_t d;	int bus_speed = system_bus_clock();	        if (pio) {		pio = ide_get_best_pio_mode(drive, pio, 5, &d);				/*		 *  Just like opti621.c we try to calculate the		 *  actual cycle time for recovery and activity		 *  according system bus speed.		 */		active_time = ide_pio_timings[pio].active_time;		recovery_time = d.cycle_time 			- active_time			- ide_pio_timings[pio].setup_time;		/*		 *  Cycle times should be Vesa bus cycles		 */		active_cycles   = (active_time   * bus_speed + 999) / 1000;		recovery_cycles = (recovery_time * bus_speed + 999) / 1000;		/*		 *  Upper and lower limits		 */		if (active_cycles   < 2)  active_cycles   = 2;		if (recovery_cycles < 2)  recovery_cycles = 2;		if (active_cycles   > 15) active_cycles   = 15;		if (recovery_cycles > 15) recovery_cycles = 0;  /* 0==16 */		#ifdef DEBUG		printk("ht6560b: drive %s setting pio=%d recovery=%d (%dns) active=%d (%dns)\n", drive->name, pio, recovery_cycles, recovery_time, active_cycles, active_time);#endif				return (u8)((recovery_cycles << 4) | active_cycles);	} else {		#ifdef DEBUG		printk("ht6560b: drive %s setting pio=0\n", drive->name);#endif				return HT_TIMING_DEFAULT;    /* default setting */	}}/* *  Enable/Disable so called prefetch mode */static void ht_set_prefetch(ide_drive_t *drive, u8 state){	unsigned long flags;	int t = HT_PREFETCH_MODE << 8;		spin_lock_irqsave(&ide_lock, flags);		/*	 *  Prefetch mode and unmask irq seems to conflict	 */	if (state) {		drive->drive_data |= t;   /* enable prefetch mode */		drive->no_unmask = 1;		drive->unmask = 0;	} else {		drive->drive_data &= ~t;  /* disable prefetch mode */		drive->no_unmask = 0;	}		spin_unlock_irqrestore(&ide_lock, flags);	#ifdef DEBUG	printk("ht6560b: drive %s prefetch mode %sabled\n", drive->name, (state ? "en" : "dis"));#endif}static void tune_ht6560b (ide_drive_t *drive, u8 pio){	unsigned long flags;	u8 timing;		switch (pio) {	case 8:         /* set prefetch off */	case 9:         /* set prefetch on */		ht_set_prefetch(drive, pio & 1);		return;	}		timing = ht_pio2timings(drive, pio);		spin_lock_irqsave(&ide_lock, flags);		drive->drive_data &= 0xff00;	drive->drive_data |= timing;		spin_unlock_irqrestore(&ide_lock, flags);	#ifdef DEBUG	printk("ht6560b: drive %s tuned to pio mode %#x timing=%#x\n", drive->name, pio, timing);#endif}/* Can be called directly from ide.c. */int __init ht6560b_init(void){	ide_hwif_t *hwif, *mate;	int t;	hwif = &ide_hwifs[0];	mate = &ide_hwifs[1];	if (!request_region(HT_CONFIG_PORT, 1, hwif->name)) {		printk(KERN_NOTICE "%s: HT_CONFIG_PORT not found\n",			__FUNCTION__);		return -ENODEV;	}	if (!try_to_init_ht6560b()) {		printk(KERN_NOTICE "%s: HBA not found\n", __FUNCTION__);		goto release_region;	}	hwif->chipset = ide_ht6560b;	hwif->selectproc = &ht6560b_selectproc;	hwif->tuneproc = &tune_ht6560b;	hwif->serialized = 1;	/* is this needed? */	hwif->mate = mate;	mate->chipset = ide_ht6560b;	mate->selectproc = &ht6560b_selectproc;	mate->tuneproc = &tune_ht6560b;	mate->serialized = 1;	/* is this needed? */	mate->mate = hwif;	mate->channel = 1;	/*	 * Setting default configurations for drives	 */	t = (HT_CONFIG_DEFAULT << 8);	t |= HT_TIMING_DEFAULT;	hwif->drives[0].drive_data = t;	hwif->drives[1].drive_data = t;	t |= (HT_SECONDARY_IF << 8);	mate->drives[0].drive_data = t;	mate->drives[1].drive_data = t;	probe_hwif_init(hwif);	probe_hwif_init(mate);	create_proc_ide_interfaces();	return 0;release_region:	release_region(HT_CONFIG_PORT, 1);	return -ENODEV;}#ifdef MODULEmodule_init(ht6560b_init);#endifMODULE_AUTHOR("See Local File");MODULE_DESCRIPTION("HT-6560B EIDE-controller support");MODULE_LICENSE("GPL");

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国模套图日韩精品一区二区| 天堂一区二区在线免费观看| 国产69精品久久久久毛片| 久久久国际精品| 成人在线视频一区| 亚洲天堂成人在线观看| 91麻豆国产福利精品| 亚洲18女电影在线观看| 日韩欧美一区二区免费| 国产美女视频91| 国产精品久久久久久一区二区三区| 99久久久久久| 日韩精品1区2区3区| 久久青草欧美一区二区三区| 99精品视频中文字幕| 亚洲bdsm女犯bdsm网站| 国产无人区一区二区三区| 色综合天天天天做夜夜夜夜做| 一区二区三区在线观看欧美| 欧美一区在线视频| 成人免费观看av| 亚洲成a人片综合在线| 久久女同精品一区二区| 色噜噜夜夜夜综合网| 免费在线看一区| 色综合久久综合网欧美综合网| 欧美性高清videossexo| 亚洲综合色区另类av| 成人精品gif动图一区| 日韩在线一区二区三区| 成人一区二区在线观看| 亚洲与欧洲av电影| 久久久久久久久久美女| 色哟哟国产精品| 精品一区二区三区的国产在线播放 | 亚洲精品第1页| 欧美一级片在线看| 色综合久久久久综合体| 久久99国产精品成人| 一区二区久久久| 久久婷婷国产综合国色天香| 欧美亚州韩日在线看免费版国语版| 国产专区综合网| 亚洲一区二区三区自拍| 亚洲国产精品精华液2区45| 欧美日韩一区二区三区在线看| 久久91精品久久久久久秒播| 自拍偷在线精品自拍偷无码专区 | 全部av―极品视觉盛宴亚洲| 中文字幕乱码日本亚洲一区二区 | 欧美久久久影院| 99久久婷婷国产综合精品电影| 免费不卡在线视频| 亚洲自拍欧美精品| 中文字幕一区二区三区不卡在线| 日韩欧美高清dvd碟片| 欧美性感一类影片在线播放| 成人av动漫网站| 国产suv精品一区二区6| 精品制服美女久久| 日韩专区一卡二卡| 天天综合日日夜夜精品| 亚洲精品网站在线观看| 综合激情成人伊人| 最新国产精品久久精品| 国产欧美日本一区视频| 久久亚洲精品国产精品紫薇| 日韩免费视频一区| 91精品福利在线一区二区三区| 欧美视频中文字幕| 欧美午夜一区二区| 在线观看日韩国产| 在线免费一区三区| 色88888久久久久久影院按摩| 91日韩在线专区| 色综合天天综合网天天狠天天| 成人三级伦理片| jlzzjlzz亚洲女人18| 岛国精品在线播放| 不卡的电影网站| 波波电影院一区二区三区| 成人免费观看av| 91亚洲永久精品| 91久久精品日日躁夜夜躁欧美| 99精品热视频| 日本精品免费观看高清观看| 一本大道综合伊人精品热热| 欧美在线一二三| 欧美人狂配大交3d怪物一区| 欧美一区二区在线免费播放 | 国产自产2019最新不卡| 国产精品亚洲成人| 99久久99精品久久久久久| 91官网在线观看| 51精品秘密在线观看| 精品欧美乱码久久久久久| 国产亚洲美州欧州综合国| 国产精品国产a| 一级日本不卡的影视| 日精品一区二区三区| 激情综合色丁香一区二区| 成人一区二区三区视频在线观看| 99久久综合狠狠综合久久| 在线视频综合导航| 欧美videossexotv100| 久久午夜电影网| 亚洲日本一区二区三区| 午夜激情综合网| 国产精品白丝jk黑袜喷水| 一本久道中文字幕精品亚洲嫩| 欧美视频日韩视频| 久久伊人蜜桃av一区二区| 日韩一区中文字幕| 欧美aⅴ一区二区三区视频| 国产成人av一区二区三区在线观看| 99精品黄色片免费大全| 欧美精品成人一区二区三区四区| 欧美精品一区二区三区一线天视频| 日本一区二区三区在线观看| 亚洲国产毛片aaaaa无费看| 国产精品亚洲成人| 欧美色窝79yyyycom| 国产片一区二区三区| 亚洲国产婷婷综合在线精品| 国产乱人伦偷精品视频不卡 | 欧美日韩中文另类| 国产日韩欧美精品在线| 亚洲成国产人片在线观看| 国产激情视频一区二区三区欧美| 色婷婷综合五月| 久久久噜噜噜久久中文字幕色伊伊| 亚洲精品视频免费看| 国内精品久久久久影院色| 欧美性大战久久久| 国产精品二区一区二区aⅴ污介绍| 天天色图综合网| 91在线精品一区二区| 久久日韩精品一区二区五区| 亚洲国产婷婷综合在线精品| 成人动漫中文字幕| 久久男人中文字幕资源站| 日韩国产成人精品| 欧美伊人久久大香线蕉综合69| 国产女人水真多18毛片18精品视频 | 亚洲电影视频在线| 欧美三级一区二区| 日韩av一级电影| 欧美日韩综合色| 午夜影院在线观看欧美| 日韩一区二区三区在线| 亚洲精品中文在线影院| 风间由美一区二区av101| 日韩欧美一二三| 日韩电影免费在线观看网站| 在线精品国精品国产尤物884a| 久久久精品免费免费| 狠狠色综合播放一区二区| 这里只有精品视频在线观看| 亚洲高清在线精品| 在线观看亚洲成人| 亚洲永久精品大片| 色综合久久六月婷婷中文字幕| 国产精品麻豆久久久| 丁香啪啪综合成人亚洲小说| 久久蜜臀中文字幕| 国产一区二区不卡在线| 国产亚洲精品精华液| 高清在线成人网| 国产欧美一区二区三区在线老狼| 国产一区二区福利| 中文字幕欧美激情一区| av一本久道久久综合久久鬼色| 中文字幕av一区二区三区免费看| 国产成人免费xxxxxxxx| 成人精品视频网站| 国产乱国产乱300精品| 国产亚洲精品福利| 成人av在线资源网| 亚洲欧美日韩一区二区| aaa欧美色吧激情视频| 一区二区三区四区在线播放| 欧美中文字幕一区| 婷婷久久综合九色综合绿巨人| 在线电影国产精品| 激情综合五月天| 国产精品天天看| 日本黄色一区二区| 午夜国产精品影院在线观看| 日韩精品一区二区三区中文不卡| 韩国毛片一区二区三区| 国产精品国产自产拍在线| 在线观看亚洲精品| 久久精品99久久久| 国产精品久久久久久久浪潮网站| 91免费看`日韩一区二区| 亚洲成人av中文| 国产亚洲一区字幕| 欧美亚洲综合在线| 国产主播一区二区| 亚洲精品视频免费看|