Adaptation/GUID-092F414B-2279-4ADB-970F-75DAB8A80BD7.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-092F414B-2279-4ADB-970F-75DAB8A80BD7" xml:lang="en"><title>SDIO Testing Guide</title><shortdesc>How to run unit tests of the SDIO platform-specific layer.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<prereq id="GUID-A029444C-0BF1-4D78-88EF-48AFBC35606B">       <p>Before
running this test, you must do the following:<ul>
<li><p>Port the SDIO Controller for your platform (see <xref href="GUID-9BBDFF77-5E2C-4E13-BEB3-716CC80B3375.dita">SDIO Implementation
Guide</xref>)</p></li>
<li><p>Build the test ROM.</p></li>
<li><p>Boot the device with the test ROM.</p></li>
</ul></p>     </prereq>
<context id="GUID-88D222F5-0078-42E9-B1AF-67C32056EDBE"> <p>After
you have ported the SDIO Controller on your platform, you can test
it using the provided unit test application, SDIOTest. </p><p>The
test application runs in a text shell and is made of two parts:<ul>
<li><p>The test program, <filepath>sdiotest.exe</filepath> tests the
Controller in isolation, at the interface level.</p></li>
<li><p>The test driver,  <filepath>d_sdioif.ldd</filepath> uses the SDIO API, which is a kernel-side interface.</p> </li>
</ul></p><p>The source code of the test application is in <filepath>/e32utils/sdio/source/</filepath>.</p><p>You must build <filepath>d_sdioif.ldd</filepath> for the appropriate platform and <filepath>sdiotest.exe</filepath> for the appropriate CPU architecture.</p><p>To include the two test components in a ROM, specify the <filepath>sdiotests.iby</filepath> file in your command line when building
the image, such as in the following example:<codeblock xml:space="preserve">rom.bat -v h4hrp -i armv5 --symbol –t sdiotests.iby -m USE_SDIO_SD_MMC</codeblock></p><p>The SDIOTest utility is not an automated test: it performs
various unitary operations which can be used to validate the behavior
of the SDIO Controller. First, you request an operation by pressing
the corresponding key on the command line. Then, you compare the resulting
display with the data expected from the card. </p><p>The following
steps provide an example of how to test your port.</p>     </context>
<steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-2-1-10-1-5-1-9-1-1-8-1-7-1-3-3">
<step id="GUID-A295D44C-B646-4C27-842F-E11828BD2C6B"><cmd>Run the
SDIOTest application.</cmd>
</step>
<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-2-1-10-1-5-1-9-1-1-8-1-7-1-3-3-2"><cmd>Power up
the stack by pressing the <userinput>P</userinput> key.</cmd>
<stepresult><p>The stack must report that no card is present.</p></stepresult>
</step>
<step id="GUID-7F13CFE3-7B78-42EF-8BEA-682435B5F228"><cmd>Insert a
card and power it up.</cmd>
<stepresult><p>The stack must report that a card is present. </p></stepresult>
</step>
<step id="GUID-5FB0E930-1590-44FF-8C44-4DD842065C5E"><cmd>Read the
card information by pressing the <userinput>I</userinput> key.</cmd>
<stepresult><p>The data returned by the stack must match the data
sheet you have for the card.</p></stepresult>
</step>
<step id="GUID-6798C237-7567-4BC8-9D69-358871167864"><cmd>Read the
common control registers by pressing the <userinput>R</userinput> key.</cmd>
<stepresult><p>The values must match the expected card data.</p></stepresult>
</step>
<step id="GUID-39001CA5-47E5-4340-B70C-13C4AD2A0266"><cmd>Read the
common configuration by pressing the <userinput>C</userinput> key.</cmd>
<stepresult><p>The values must match the expected card data.</p></stepresult>
</step>
<step id="GUID-CF489FD9-D291-4FFB-9FC7-F1EB5C80416F"><cmd>Read information
about the I/O function by pressing the <userinput>F</userinput> key.</cmd>
<stepresult><p>The data returned by the stack must match the I/O specifications
of the card.</p></stepresult>
</step>
<step id="GUID-EB45AEEA-6EEA-4B9E-B0C4-A2BF66252812"><cmd>Quit the
test by pressing the <userinput>Q</userinput> key.</cmd>
</step>
</steps>
</taskbody></task>