📄 flashmem.ax(1).toc1.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>sysTffs Libraries </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a></a><a href="flashMem.aX%281%29.TOC.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="flashMem.aX%281%29.TOC.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="flashMem.aX%281%29.TOC2.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h2 class="H1"><i><a name="4451"> sysTffs </a></i></h2></font><h4 class="SH"><a name="4452"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="4453"><div class="aX"><b class="file">sysTffs</b> - BSP-specific TrueFFS library </div></a></dl></dl><h4 class="SH"><a name="4454"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><div class="Item"><a name="4456"> </a><b><i>flFitInSocketWindow</i></b><b>( )</b> - check if flash array fits in socket window </div><dd><div class="Item"><a name="4459"> </a><b><i>flDelayLoop</i></b><b>( )</b> - consume the specified time </div></dl><dl class="margin"><dd><pre class="Code"><b><a name="4460">long int flFitInSocketWindow (long int chipSize, int interleaving, long int windowSize) </a></b><dd> <b><a name="4463">void flDelayLoop (int cycles) </a></b></pre></dl></dl><h4 class="SH"><a name="4464"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="4465"> </a>This 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 <b>FLSocket</b> structure. When TrueFFS needs to access the flash device, it uses these functions.</p><dd><p class="Body"><a name="4466"> </a>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 <b><i>flFitInSocketWindow</i></b><b>( )</b> and <b><i>flDelayLoop</i></b><b>( )</b>. You should never have any need to call these functions.</p><dd><p class="Body"><a name="4467"> </a>However, one of the most import functions defined in this file is neither referenced in an <b>FLSocket</b> structure, nor is it externally callable. This function is <b><i>sysTffsInit</i></b><b>( )</b>. 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 <b><i>sysTffs</i></b><b>( )</b> 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 four. As shipped, TrueFFS supports up to five flash drives.</p><dd><p class="Body"><a name="4468"> </a>After registering socket component drivers for a flash device, you may format the flash medium even though there is not yet a block device driver associated with the flash (see the reference entry for the <b><i>tffsDevCreate</i></b><b>( )</b> routine). To format the flash medium for use with TrueFFS, call <b><i>tffsDevFormat</i></b><b>( )</b> or, for some BSPs, <b><i>sysTffsFormat</i></b><b>( )</b>.</p><dd><p class="Body"><a name="4469"> </a>The <b><i>sysTffsFormat</i></b><b>( )</b> routine is an optional but BSP-specific externally callable helper function. Internally, it calls <b><i>tffsDevFormat</i></b><b>( )</b> with a pointer to a <b>FormatParams</b> 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 <b><i>tffsBootImagePut</i></b><b>( )</b>.</p><dd><p class="Body"><a name="4470"> </a>Finally, this file also contains define statements for symbolic constants that determine which MTDs, translation layer modules, and other utilities are ultimately included in TrueFFS. These defines are as follows:</p></dl><dl class="margin"><dd><div class="Item"><a name="4471"> </a><b>INCLUDE_TL_NFTL</b> </div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4752"> </a>To include the NAND-based translation layer module. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4472"> </a>INCLUDE_TL_FTL</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4754"> </a>To include the NOR-based translation layer module. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4473"> </a>INCLUDE_TL_SSFDC</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4756"> </a>To include the SSFDC-appropriate translation layer module. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4474"> </a>INCLUDE_MTD_I28F016</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4758"> </a>For Intel 28f016 flash devices. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4475"> </a>INCLUDE_MTD_I28F008</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4760"> </a>For Intel 28f008 flash devices. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4476"> </a>INCLUDE_MTD_I28F008_BAJA</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4762"> </a>For Intel 28f008 flash devices on the Heurikon Baja 4700. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4477"> </a>INCLUDE_MTD_AMD</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4764"> </a>For AMD, Fujitsu: 29F0{40,80,16} 8-bit flash devices. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4478"> </a>INCLUDE_MTD_CDSN</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4766"> </a>For Toshiba, Samsung: NAND CDSN flash devices. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4479"> </a>INCLUDE_MTD_DOC2</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4768"> </a>For Toshiba, Samsung: NAND DOC flash devices. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4480"> </a>INCLUDE_MTD_CFISCS</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4770"> </a>For CFI/SCS flash devices. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4481"> </a>INCLUDE_MTD_WAMD</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4772"> </a>For AMD, Fujitsu 29F0{40,80,16} 16-bit flash devices. </li></ul></p></dl><dl class="margin"><dd><div class="Item"><a name="4482"> </a>INCLUDE_TFFS_BOOT_IMAGE</div></dl><dl class="margin"><p class="listspace"><ul class="Dash" type="circle"><li><a name="4774"> </a>To include <b><i>tffsBootImagePut</i></b><b>( )</b> in TrueFFS for Tornado. </li></ul></p></dl><dl class="margin"><dd><p class="Body"><a name="4483"> </a>To exclude any of the modules mentioned above, edit <b>sysTffs.c</b> and undefine its associated symbolic constant. </p></dl></dl><h4 class="SH"><a name="4486"> </a>INCLUDE FILES </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="4487"> </a><b>flsocket.h</b>, <b>tffsDrv.h</b> </p></dl></dl><h4 class="SH"><a name="4488"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="4489"> </a><b>tffsDrv</b> <b>tffsConfig</b> </p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a></a><a href="flashMem.aX%281%29.TOC.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="flashMem.aX%281%29.TOC.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="flashMem.aX%281%29.TOC2.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -