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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? systffs.c

?? Kontron的ETX-P3T的BSP的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* sysTffs.c - PC Pentium/Pentium2/Pentium3 system-dependent TrueFFS library *//* Copyright 1984-1997 Wind River Systems, Inc. */#include "copyright_wrs.h"/* FAT-FTL Lite Software Development Kit * Copyright (C) M-Systems Ltd. 1995-1997	*//*modification history--------------------01t,30apr01,yp  removing assumption that Disk On Chip support will always be                 present01s,14dec00,mks  removed references to pc386 and pc486. SPR 63032.01r,29nov00,yp  cleaning up so we can build as BSP stub01q,31may99,yp  Added comments suggested in SPR #2531901p,21apr98,yp   added tffs to files included from there01o,26mar98,hdn  added DOC2_XXX macros along with windowBaseAddress().01n,11mar98,yp   made including tffsConfig.c conditional so man page		 generation does not include it.01m,09mar98,kbw  made man page edits to fix problems found by QE01l,04mar98,kbw  made man page edits01k,13feb98,hdn  commented out pcVccOff() to fix multi drive testing.01j,19jan98,hdn  fixed pcVccXX, pcVppXX. added timeout in while loop.01i,18dec97,hdn  added comment.  cleaned up.01h,11dec97,hdn  added our PCMCIA library support.01g,05dec97,hdn  added flDelayMsecs(), socketTable[]. cleanup.01f,25nov97,hdn  made each interface functions configurable.01e,24nov97,hdn  made each socket interface configurable.01d,11nov97,hdn  made flDelayLoop() dummy function.01c,11nov97,hdn  fixed comments, copyright.01b,05nov97,hdn  cleaned up.01a,09oct97,and  written by Andray in M-Systems*//*DESCRIPTIONThis library provides board-specific hardware access routines for TrueFFS.  In effect, these routines comprise the socket component driver (or drivers)for your flash device hardware.  At socket registration time, TrueFFS stores pointers to the functions of this socket component driver in an 'FLSocket' structure.  When TrueFFS needs to access the flash device, it uses these functions.  Because this file is, for the most part, a device driver that exports its functionality by registering function pointers with TrueFFS, very few of the functions defined here are externally callable.  For the record, these external functions are flFitInSocketWindow() and flDelayLoop().  You should never have any need to call these functions.  However, one of the most import functions defined in this file is neitherreferenced in an 'FLSocket' structure, nor is it externally callable.  Thisfunction is sysTffsInit().  TrueFFS calls this function at initialization time to register socket component drivers for all the flash devices attached to your target.  It is this call to sysTffs() that results in assigning drive numbers to the flash devices on your target hardware.  Drive numbers are assigned by the order in which the socket component drivers are registered.The first to be registered is drive 0, the second is drive 1, and so on up to 4.  As shipped, TrueFFS supports up to five flash drives.  After registering socket component drivers for a flash device, you may format the flash medium even though there is not yet a block device driverassociated with the flash (see the reference entry for the tffsDevCreate() routine).  To format the flash medium for use with TrueFFS, call tffsDevFormat() or, for some BSPs, sysTffsFormat().  The sysTffsFormat() routine is an optional but BSP-specific externally callable helper function.  Internally, it calls tffsDevFormat() with a pointer to a 'FormatParams' structure initialized to values that leave a space on the flash device for a boot image. This space is outside the region managed by TrueFFS.  This special region is necessary for boot images because the normal translation and wear-leveling services of TrueFFS are incompatible with the needs of the boot program and the boot image it relies upon.  To write a boot image (or any other data) into this area, use tffsBootImagePut().  INCLUDE FILES: flsocket.hSEE ALSO : tffsDevFormat tffsRawio*//* includes */#include "vxWorks.h"#include "config.h"#include "tffs/flsocket.h"#include "tffs/pcic.h"/* defines */#define INCLUDE_MTD_I28F016#define INCLUDE_MTD_I28F008#define INCLUDE_MTD_AMD#undef  INCLUDE_MTD_CFISCS#undef  INCLUDE_MTD_WAMD#define INCLUDE_TL_FTL#undef  INCLUDE_TL_SSFDC       #undef	INCLUDE_SOCKET_DOC		/* DOC socket interface */#define	INCLUDE_SOCKET_PCIC0		/* PCIC socket interface 0 */#define	INCLUDE_SOCKET_PCIC1		/* PCIC socket interface 1 */#define INCLUDE_TFFS_BOOT_IMAGE		/* include tffsBootImagePut() */#define	WINDOW_ID	0		/* PCIC window used (0-4) */#define	VPP_DELAY_MSEC	100		/* Millisecs to wait for Vpp ramp up */#define	DOC2_SCAN_ADRS_0 0xc8000	/* start of mem range to scan for DOC2 */#define	DOC2_SCAN_ADRS_1 0xf0000	/* end of mem range to scan for DOC2 */#define	PC_BASE_ADRS_0	0xd8000		/* base addr for socket 0 */#define	PC_BASE_ADRS_1	0xda000		/* base addr for socket 1 */#define KILL_TIME_FUNC	 ((iz * iz) / (iz + iz)) / ((iy + iz) / (iy * iz))#define PC_WINDOW	1		/* PCIC window no. used by TFFS */#define PC_EXTRAWS	1		/* PCIC wait state used by TFFS */#define PC_SOCKET_NAME_DOC "DOC"	/* DOC socket name for DOC */#define PC_SOCKET_NAME_0 "PCMCIA-0"	/* PCIC socket name for socket 0 */#define PC_SOCKET_NAME_1 "PCMCIA-1"	/* PCIC socket name for socket 1 *//* externs */#ifdef INCLUDE_SOCKET_DOCIMPORT unsigned windowBaseAddress (unsigned driveNo, unsigned long startAddr,                                   unsigned long endAddr);   /* nfdc2148.c */#endif /* INCLUDE_SOCKET_DOC */IMPORT PCMCIA_CTRL pcmciaCtrl;/* globals */char pcDriveNo[2] = {NONE, NONE};	/* drive number of the sockets *//* locals */LOCAL UINT32 sysTffsMsecLoopCount = 0;	/* loop count to consume milli sec */#ifndef	INCLUDE_PCMCIALOCAL FLMutex flPcicMutex = NULL;	/* protects PCIC register access  */                                        /* in multi-threaded environments */#endif	/* INCLUDE_PCMCIA *//* forward declarations */#ifdef	INCLUDE_SOCKET_DOCLOCAL FLStatus		docRegister (void);LOCAL unsigned		docWindowBaseAddress (unsigned driveNo);LOCAL FLBoolean		docCardDetected (FLSocket vol);LOCAL void		docVccOn (FLSocket vol);LOCAL void		docVccOff (FLSocket vol);#ifdef	SOCKET_12_VOLTSLOCAL FLStatus		docVppOn (FLSocket vol);LOCAL void		docVppOff (FLSocket vol);#endif	/* SOCKET_12_VOLTS */LOCAL FLStatus		docInitSocket (FLSocket vol);LOCAL void		docSetWindow (FLSocket vol);LOCAL void		docSetMappingContext (FLSocket vol, unsigned page);LOCAL FLBoolean		docGetAndClearCardChangeIndicator (FLSocket vol);LOCAL FLBoolean		docWriteProtected (FLSocket vol);#ifdef	EXITLOCAL void		docFreeSocket (FLSocket vol);#endif	/* EXIT */#endif	/* INCLUDE_SOCKET_DOC */#if	defined (INCLUDE_SOCKET_PCIC0) || defined (INCLUDE_SOCKET_PCIC1)LOCAL FLStatus		pcRegister (int socketNo, unsigned int baseAddress);#ifndef	INCLUDE_PCMCIALOCAL unsigned char	flInportb (unsigned portId);LOCAL void		flOutportb (unsigned portId, unsigned char value);LOCAL unsigned char	get365 (FLSocket vol, unsigned char reg);LOCAL void		set365 (FLSocket vol, unsigned char reg, 				unsigned char value);#endif	/* INCLUDE_PCMCIA */LOCAL FLBoolean		pcCardDetected (FLSocket vol);LOCAL void		pcVccOn (FLSocket vol);LOCAL void		pcVccOff (FLSocket vol);#ifdef	SOCKET_12_VOLTSLOCAL FLStatus		pcVppOn (FLSocket vol);LOCAL void		pcVppOff (FLSocket vol);#endif	/* SOCKET_12_VOLTS */LOCAL FLStatus		pcInitSocket (FLSocket vol);LOCAL void		pcSetWindow (FLSocket vol);LOCAL void		pcSetMappingContext (FLSocket vol, unsigned page);LOCAL FLBoolean		pcGetAndClearCardChangeIndicator (FLSocket vol);LOCAL FLBoolean		pcWriteProtected (FLSocket vol);#ifdef	EXITLOCAL void		pcFreeSocket (FLSocket vol);#endif	/* EXIT */#endif	/* defined (INCLUDE_SOCKET_PCIC0) || defined (INCLUDE_SOCKET_PCIC1) */#ifndef DOC#include "tffs/tffsConfig.c"#endif /* DOC *//********************************************************************************* sysTffsInit - board level initialization for TFFS** This routine calls the socket registration routines for the socket component* drivers that will be used with this BSP. The order of registration signifies* the logical drive number given to the drive associated with the socket.** RETURNS: N/A*/LOCAL void sysTffsInit (void)    {    UINT32 ix = 0;    UINT32 iy = 1;    UINT32 iz = 2;    int oldTick;    /* we assume followings:     *   - no interrupts except timer is happening.     *   - the loop count that consumes 1 msec is in 32 bit.     * it should be done in the early stage of usrRoot() in tffsDrv().  */    oldTick = tickGet();    while (oldTick == tickGet())	/* wait for next clock interrupt */	;    oldTick = tickGet();    while (oldTick == tickGet())	/* loop one clock tick */	{	iy = KILL_TIME_FUNC;		/* consume time */	ix++;				/* increment the counter */	}        sysTffsMsecLoopCount = ix * sysClkRateGet() / 1000;#ifdef	INCLUDE_SOCKET_DOC    (void) docRegister ();			/* Disk On Chip */#endif	/* INCLUDE_SOCKET_DOC */#ifdef	INCLUDE_SOCKET_PCIC0    (void) pcRegister (0, PC_BASE_ADRS_0);	/* flash card on socket 0 */#endif	/* INCLUDE_SOCKET_PCIC0 */#ifdef	INCLUDE_SOCKET_PCIC1    (void) pcRegister (1, PC_BASE_ADRS_1);	/* flash card on socket 1 */#endif	/* INCLUDE_SOCKET_PCIC1 */    }#ifdef	INCLUDE_SOCKET_DOC/********************************************************************************* docRegister - registration routine for M-Systems Disk On Chip (DOC) *		socket component driver** This routine populates the 'vol' structure for a logical drive with the* socket component driver routines for the M-System DOC. All socket routines* are referanced through the 'vol' structure and never from here directly** RETURNS: flOK, or flTooManyComponents if there're too many drives,*                or flAdapterNotFound if there's no controller.*/LOCAL FLStatus docRegister (void)    {    FLSocket vol;    if (noOfDrives >= DRIVES)        return (flTooManyComponents);    pVol = flSocketOf (noOfDrives);    vol.window.baseAddress =	docWindowBaseAddress (vol.volNo);    if (vol.window.baseAddress == 0)        return (flAdapterNotFound);    vol.cardDetected =		docCardDetected;    vol.VccOn =			docVccOn;    vol.VccOff =		docVccOff;#ifdef SOCKET_12_VOLTS    vol.VppOn =			docVppOn;    vol.VppOff =		docVppOff;#endif    vol.initSocket =		docInitSocket;    vol.setWindow =		docSetWindow;    vol.setMappingContext =	docSetMappingContext;    vol.getAndClearCardChangeIndicator = docGetAndClearCardChangeIndicator;    vol.writeProtected =	docWriteProtected;#ifdef EXIT    vol.freeSocket =		docFreeSocket;#endif    tffsSocket[noOfDrives] = PC_SOCKET_NAME_DOC;    noOfDrives++;    return (flOK);    } /********************************************************************************* docWindowBaseAddress - Return the host base address of the DOC2 window** This routine Return the host base address of the window.* It scans the host address range from DOC2_SCAN_ADRS_0 to DOC2_SCAN_ADRS_1* (inclusive) attempting to identify DiskOnChip 2000 memory window.** RETURNS: Host physical address of window divided by 4 KB*/LOCAL unsigned docWindowBaseAddress    (    unsigned driveNo		/* drive number */    )    {    return (windowBaseAddress (driveNo, DOC2_SCAN_ADRS_0, DOC2_SCAN_ADRS_1));    }/********************************************************************************* docCardDetected - detect if a card is present (inserted)** This routine detects if a card is present (inserted).** RETURNS: TRUE, or FALSE if the card is not present.*/LOCAL FLBoolean docCardDetected    (    FLSocket vol		/* pointer identifying drive */    )    {    return (TRUE);    }/********************************************************************************* docVccOn - turn on Vcc (3.3/5 Volts)** This routine turns on Vcc (3.3/5 Volts).  Vcc must be known to be good* on exit.** RETURNS: N/A*/LOCAL void docVccOn    (    FLSocket vol		/* pointer identifying drive */    )    {    }/********************************************************************************* docVccOff - turn off Vcc (3.3/5 Volts)** This routine turns off Vcc (3.3/5 Volts). ** RETURNS: N/A*/LOCAL void docVccOff    (    FLSocket vol		/* pointer identifying drive */    )    {    }#ifdef SOCKET_12_VOLTS/********************************************************************************* docVppOn - turns on Vpp (12 Volts)** This routine turns on Vpp (12 Volts). Vpp must be known to be good on exit.** RETURNS: flOK always*/LOCAL FLStatus docVppOn    (    FLSocket vol		/* pointer identifying drive */    )    {    return (flOK);    }/********************************************************************************* docVppOff - turns off Vpp (12 Volts)** This routine turns off Vpp (12 Volts).** RETURNS: N/A*/LOCAL void docVppOff    (    FLSocket vol		/* pointer identifying drive */    )    {    }#endif	/* SOCKET_12_VOLTS *//********************************************************************************* docInitSocket - perform all necessary initializations of the socket** This routine performs all necessary initializations of the socket.** RETURNS: flOK always*/LOCAL FLStatus docInitSocket    (    FLSocket vol		/* pointer identifying drive */    )    {    return (flOK);    }/********************************************************************************* docSetWindow - set current window attributes, Base address, size, etc** This routine sets current window hardware attributes: Base address, size,* speed and bus width.  The requested settings are given in the 'vol.window' * structure.  If it is not possible to set the window size requested in* 'vol.window.size', the window size should be set to a larger value, * if possible. In any case, 'vol.window.size' should contain the * actual window size (in 4 KB units) on exit.** RETURNS: N/A*/LOCAL void docSetWindow    (    FLSocket vol		/* pointer identifying drive */    )    {    }/********************************************************************************* docSetMappingContext - sets the window mapping register to a card address** This routine sets the window mapping register to a card address.* The window should be set to the value of 'vol.window.currentPage',* which is the card address divided by 4 KB. An address over 128MB,* (page over 32K) specifies an attribute-space address. On entry to this * routine vol.window.currentPage is the page already mapped into the window.* (In otherwords the page that was mapped by the last call to this routine.)** The page to map is guaranteed to be on a full window-size boundary.** RETURNS: N/A*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品日韩综合观看成人91| 亚洲图片激情小说| 欧美色老头old∨ideo| 懂色av一区二区夜夜嗨| 国产成人精品一区二区三区四区 | 成人免费毛片片v| 成人成人成人在线视频| av激情综合网| 欧美唯美清纯偷拍| 7777女厕盗摄久久久| 欧美一区二区三区视频在线观看| 69堂成人精品免费视频| 69堂成人精品免费视频| 久久久久久久久久电影| 亚洲日本在线天堂| 亚洲午夜电影在线| 蜜臀av亚洲一区中文字幕| 精品无码三级在线观看视频| 国产成人亚洲精品狼色在线| 成人av高清在线| 在线国产亚洲欧美| 日韩视频一区在线观看| 国产亚洲精品aa| 中文字幕一区二区三| 亚洲午夜精品久久久久久久久| 亚洲v日本v欧美v久久精品| 久久精品国产久精国产爱| 成人精品一区二区三区中文字幕| 在线亚洲高清视频| 欧美成人a在线| 亚洲精品亚洲人成人网| 麻豆91精品91久久久的内涵| 波多野结衣中文字幕一区二区三区| 91国在线观看| 久久精品一区蜜桃臀影院| 一区二区在线看| 国产一区二区不卡在线| 欧美亚洲自拍偷拍| 久久女同互慰一区二区三区| 亚洲午夜成aⅴ人片| 国产不卡视频在线观看| 欧美日本韩国一区| 中文字幕一区二区三区不卡在线 | 日韩欧美一区二区在线视频| 中文幕一区二区三区久久蜜桃| 日韩不卡一区二区| 一本色道a无线码一区v| 337p日本欧洲亚洲大胆色噜噜| 一区二区三区在线观看网站| 国产成人精品免费视频网站| 91精品麻豆日日躁夜夜躁| 综合色中文字幕| 成人夜色视频网站在线观看| 欧美大胆一级视频| 三级一区在线视频先锋 | 国产成+人+日韩+欧美+亚洲| 欧美喷潮久久久xxxxx| 亚洲色图视频网| 国产精品性做久久久久久| 欧美高清视频一二三区 | 成人永久看片免费视频天堂| 欧美一级高清片| 秋霞影院一区二区| 精品1区2区3区| 亚洲综合网站在线观看| 91在线一区二区| 日韩毛片视频在线看| 成人免费观看男女羞羞视频| 久久久久久久久久久久久久久99 | 日韩精品午夜视频| 欧美色欧美亚洲另类二区| 亚洲综合偷拍欧美一区色| 91黄色在线观看| 亚洲精品乱码久久久久久| proumb性欧美在线观看| 国产精品久久久久影院亚瑟| aaa国产一区| 亚洲视频一区在线| 色屁屁一区二区| 亚洲一区二区三区在线| 欧美日韩国产高清一区二区三区| 亚洲成av人片www| 欧美一级精品在线| 黄页视频在线91| 国产亚洲精品aa| 色哟哟在线观看一区二区三区| 亚洲男人的天堂网| 7777精品伊人久久久大香线蕉最新版| 亚洲国产精品影院| 精品国产一区二区在线观看| 精品亚洲成av人在线观看| 国产女人18水真多18精品一级做| 99精品在线免费| 视频一区免费在线观看| 久久久久国产精品人| 不卡一区二区中文字幕| 亚洲bt欧美bt精品| 久久一区二区三区四区| 91亚洲精品一区二区乱码| 婷婷丁香久久五月婷婷| 国产亚洲欧洲一区高清在线观看| 99久久免费国产| 日本在线不卡视频| 国产精品看片你懂得| 欧美肥妇free| 波多野结衣中文字幕一区 | www.成人网.com| 亚洲成人7777| 国产色产综合色产在线视频| 在线观看三级视频欧美| 紧缚奴在线一区二区三区| 亚洲人成网站影音先锋播放| 日韩免费电影网站| 91免费在线播放| 精品制服美女久久| 亚洲最大成人网4388xx| www国产精品av| 欧美午夜精品久久久久久超碰| 韩国在线一区二区| 天天av天天翘天天综合网| 亚洲国产精品国自产拍av| 91精品午夜视频| 色狠狠一区二区三区香蕉| 韩国视频一区二区| 亚洲电影在线播放| ㊣最新国产の精品bt伙计久久| 精品久久久久久久久久久久久久久久久| 99riav久久精品riav| 国产福利一区在线| 麻豆成人久久精品二区三区小说| 一区二区三区在线观看视频| 中文字幕在线观看一区| 精品国产乱码久久| 欧美一区三区二区| 色呦呦国产精品| 99riav久久精品riav| 福利91精品一区二区三区| 久久精品99久久久| 奇米在线7777在线精品| 午夜欧美视频在线观看| 一区二区在线观看不卡| 国产精品国产三级国产有无不卡 | 亚洲免费毛片网站| 国产日产欧美一区二区三区 | 成人夜色视频网站在线观看| 韩国av一区二区三区四区| 免费三级欧美电影| 日韩av一级片| 日韩成人dvd| 国产最新精品精品你懂的| 毛片av中文字幕一区二区| 男男成人高潮片免费网站| 美女国产一区二区| 国产一区二区三区免费播放| 国产福利一区在线| 99精品久久99久久久久| 在线免费精品视频| 欧美日韩另类国产亚洲欧美一级| 欧美年轻男男videosbes| 欧美一区二区在线不卡| 精品剧情在线观看| 日本一区二区动态图| 亚洲精品成人在线| 午夜不卡av免费| 韩国av一区二区三区四区| 成人av网站在线| 91成人看片片| 91精品一区二区三区在线观看| 欧美tickling挠脚心丨vk| 久久精品视频网| 亚洲综合一二区| 久久99最新地址| 91在线国产福利| 3751色影院一区二区三区| 久久久综合网站| 亚洲综合一区在线| 久久国产精品99久久人人澡| 成人一区二区三区| 88在线观看91蜜桃国自产| 久久日一线二线三线suv| 亚洲男同性恋视频| 精品午夜久久福利影院| 97超碰欧美中文字幕| 91麻豆精品国产91久久久久久| 久久久久久久久99精品| 亚洲影院理伦片| 国产91色综合久久免费分享| 在线免费不卡视频| 国产日韩影视精品| 亚瑟在线精品视频| 成人高清在线视频| 欧美一级欧美一级在线播放| 国产精品灌醉下药二区| 日本视频一区二区| 欧美在线视频日韩| 国产日产欧美精品一区二区三区| 亚洲综合成人在线视频| 丰满岳乱妇一区二区三区| 在线播放日韩导航| 一区二区三区四区不卡在线|