--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,4 @@
+33bd282ab944036070609a35154c4ec6b5620e77 PDK_3.0.b
+7cd561e7f75e5756a46b8c59364dd9b285c68f50 PDK_3.0.c
+dc9b4bd57f72022c45b4dd06c087b7b44a46c697 PDK_3.0.d
+344fc5a7c938446f43f8e0429cb3fea76bb24df8 PDK_3.0.e
--- a/omap3530/beagle_drivers/keytran/keymap.cpp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagle_drivers/keytran/keymap.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -143,6 +143,7 @@
{'0', '9'}, // scancode range 2
{'A', 'Z'}, // scancode range 3
{EStdKeyF1, EStdKeyDictaphoneRecord}, // scancode range 4
+ {EStdKeyDevice0,EStdKeyDeviceF},
};
LOCAL_D const TUint16 convKeyCodes_base[]=
@@ -263,7 +264,47 @@
EKeySliderUp,
EKeyDictaphonePlay,
EKeyDictaphoneStop,
- EKeyDictaphoneRecord
+ EKeyDictaphoneRecord,
+
+
+ EKeyDevice0,
+ EKeyDevice1,
+ EKeyDevice2,
+ EKeyDevice3,
+ EKeyDevice4,
+ EKeyDevice5,
+ EKeyDevice6,
+ EKeyDevice7,
+ EKeyDevice8,
+ EKeyDevice9,
+ EKeyDeviceA,
+ EKeyDeviceB,
+ EKeyDeviceC,
+ EKeyDeviceE,
+ EKeyDeviceE,
+ EKeyDeviceF,
+
+
+ EKeyApplication0,
+ EKeyApplication1,
+ EKeyApplication2,
+ EKeyApplication3,
+ EKeyApplication4,
+ EKeyApplication5,
+ EKeyApplication6,
+ EKeyApplication7,
+ EKeyApplication8,
+ EKeyApplication9,
+ EKeyApplicationA,
+ EKeyApplicationB,
+ EKeyApplicationC,
+ EKeyApplicationD,
+ EKeyApplicationE,
+ EKeyApplicationF,
+
+ EKeyYes,
+ EKeyNo,
+
};
--- a/omap3530/beagle_drivers/keytran/keymap.mmp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagle_drivers/keytran/keymap.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -30,6 +30,7 @@
linkas ekdata.dll
systeminclude +/include
+OS_LAYER_SYSTEMINCLUDE
sourcepath .
source keymap.cpp
--- a/omap3530/beagle_drivers/lcd/lcd.cpp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagle_drivers/lcd/lcd.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -138,8 +138,19 @@
// TO DO: (mandatory)
// define the physical screen dimensions
// This is only example code... you need to modify it for your hardware
+
+
+/*
+Modified to scale up the display size to a 640x640 , which could be used for VGA layouts as well
+
const TUint KConfigLcdWidth = 360;//640; // 640 pixels per line
const TUint KConfigLcdHeight = 640;//480; // 480 lines per panel
+*/
+
+const TUint KConfigLcdWidth = 640; // 640 pixels per line
+const TUint KConfigLcdHeight = 640; // 640 lines per panel
+
+
// TO DO: (mandatory)
// define the characteristics of the LCD display
@@ -155,8 +166,13 @@
// A TWIP is a 20th of a point. A point is a 72nd of an inch
// Therefore a TWIP is a 1440th of an inch
// This is only example code... you need to modify it for your hardware
-const TInt KConfigLcdWidthInTwips = 9638;//10800; // = 6.69 inches //15*1440;
-const TInt KConfigLcdHeightInTwips = 7370;//11232;//5616; // = 5.11 inches //12*1440;
+//const TInt KConfigLcdWidthInTwips = 9638;//10800; // = 6.69 inches //15*1440;
+//const TInt KConfigLcdHeightInTwips = 7370;//11232;//5616; // = 5.11 inches //12*1440;
+
+// Modified Twips in accordance with VGA changes - Not sure if it helps or is needed
+
+const TInt KConfigLcdWidthInTwips = 2670; // = 6.69 inches //15*1440;
+const TInt KConfigLcdHeightInTwips = 3550; //5616; // = 5.11 inches //12*1440;
// TO DO: (mandatory)
// define the available display modes
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/medwb/bld.inf Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,17 @@
+// ===========================
+//
+// Copyright Cypress Semiconductor Corporation, 2006-2009,
+// All Rights Reserved
+// UNPUBLISHED, LICENSED SOFTWARE.
+//
+// CONFIDENTIAL AND PROPRIETARY INFORMATION
+// WHICH IS THE PROPERTY OF CYPRESS.
+//
+// ===========================
+
+
+PRJ_PLATFORMS
+ARMV5
+
+PRJ_MMPFILES
+medwb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/medwb/medwb.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1149 @@
+/* Cypress West Bridge API source file
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+#include "locmedia.h"
+#include "platform.h"
+//#include "variantmediadef.h"
+#include <assp\omap3530_assp\CyAsSymbianStorageDriver.h>
+
+//#define REGIST_MEDIA_USE_MMC
+#define _MEDWB_DEBUG_1_
+//#define _MEDWB_DEBUG_2_
+
+//#define INTERVAL_FOR_WB 15 // 15 -- OK
+#define WB_BUFFER_SIZE 2*(65536 + 512)
+#define WB_RETRY_COUNT 2
+
+//const TInt KStackNumber = 0;
+const TInt KDiskSectorSize=512;
+const TInt KDiskSectorShift=9;
+//const TInt KIdleCurrentInMilliAmps = 1;
+
+const TInt KMBRFirstPartitionEntry=0x1BE;
+
+TUint8 ptrWBBuffer[WB_BUFFER_SIZE];
+
+
+template <class T>
+inline T UMin(T aLeft,T aRight)
+ {return(aLeft<aRight ? aLeft : aRight);}
+
+
+class DPhysicalDeviceMediaWB : public DPhysicalDevice
+ {
+public:
+ DPhysicalDeviceMediaWB();
+
+ virtual TInt Install();
+ virtual void GetCaps(TDes8& aDes) const;
+ virtual TInt Create(DBase*& aChannel, TInt aMediaId, const TDesC8* aInfo, const TVersion& aVer);
+ virtual TInt Validate(TInt aDeviceType, const TDesC8* aInfo, const TVersion& aVer);
+ virtual TInt Info(TInt aFunction, TAny* a1);
+ };
+
+
+class DMediaDriverWB : public DMediaDriver
+ {
+public:
+ DMediaDriverWB(TInt aMediaId);
+ ~DMediaDriverWB();
+ // ...from DMediaDriver
+ virtual void Close();
+ // replacing pure virtual
+ virtual void Disconnect(DLocalDrive* aLocalDrive, TThreadMessage*);
+ virtual TInt Request(TLocDrvRequest& aRequest);
+ virtual TInt PartitionInfo(TPartitionInfo& anInfo);
+ virtual void NotifyPowerDown();
+ virtual void NotifyEmergencyPowerDown();
+ // For creation by DPhysicalDeviceMediaMmcFlash
+ TInt DoCreate(TInt aMediaId);
+
+private:
+
+private:
+ // MMC device specific stuff
+ TInt DoRead(TLocDrvRequest&);
+ TInt DoWrite(TLocDrvRequest&);
+ TInt DoFormat(TLocDrvRequest&);
+ TInt Caps(TLocDrv& aDrive, TLocalDriveCapsV6& aInfo);
+
+
+ TInt DecodePartitionInfo();
+ TInt WritePartitionInfo();
+ TInt GetDefaultPartitionInfo(TMBRPartitionEntry& aPartitionEntry);
+ TInt CreateDefaultPartition();
+
+
+
+ static void SetPartitionEntry(TPartitionEntry* aEntry, TUint aFirstSector, TUint aNumSectors);
+
+ TInt CheckDevice(int aReqType);
+
+ void Reset();
+
+private:
+ TInt iMediaId;
+ TPartitionInfo* iPartitionInfo;
+ TBool iMbrMissing;
+ TUint iHiddenSectors; // bootup / password
+
+ TUint8* ptrWriteBuf; // start of current buffer region
+ TUint8* ptrReadBuf; // start of current buffer region
+ TInt read_size;
+ TInt read_pos;
+
+ TInt iUnitSize;
+ TInt iBlockSize;
+ };
+
+// ======== DPhysicalDeviceMediaMmcFlash ========
+
+
+DPhysicalDeviceMediaWB::DPhysicalDeviceMediaWB()
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("=mmd:ctr");
+ #endif
+ iUnitsMask = 0x01;
+ iVersion = TVersion(KMediaDriverInterfaceMajorVersion,KMediaDriverInterfaceMinorVersion,KMediaDriverInterfaceBuildVersion);
+ }
+
+
+TInt DPhysicalDeviceMediaWB::Install()
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("=mmd:ins");
+ #endif
+ _LIT(KDrvNm, "Media.WB");
+ return SetName(&KDrvNm);
+ }
+
+
+void DPhysicalDeviceMediaWB::GetCaps(TDes8& /* aDes */) const
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("=mmd:cap");
+ #endif
+ }
+
+
+TInt DPhysicalDeviceMediaWB::Info(TInt aFunction, TAny* /*a1*/)
+//
+// Return the priority of this media driver
+//
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("=mmd:info");
+ #endif
+ if (aFunction==EPriority)
+ return KMediaDriverPriorityNormal;
+ // Don't close media driver when peripheral bus powers down. This avoids the need for Caps() to power up the stack.
+ if (aFunction==EMediaDriverPersistent)
+ return KErrNone;
+ return KErrNotSupported;
+ }
+
+TInt DPhysicalDeviceMediaWB::Validate(TInt aDeviceType, const TDesC8* /*aInfo*/, const TVersion& aVer)
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("=mmd:validate aDeviceType %d\n", aDeviceType);
+ #endif
+ if (!Kern::QueryVersionSupported(iVersion,aVer))
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("Validate -> KErrNotSupported\n");
+ #endif
+ return KErrNotSupported;
+ }
+ if (aDeviceType!=MEDIA_DEVICE_MMC)
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("Validate -> Wrong DeviceType\n");
+ #endif
+ return KErrNotSupported;
+ }
+ return KErrNone;
+ }
+
+
+TInt DPhysicalDeviceMediaWB::Create(DBase*& aChannel, TInt aMediaId, const TDesC8* /*aInfo*/, const TVersion& aVer)
+//
+// Create an MMC Card media driver.
+//
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("=mmd:crt");
+ #endif
+ if (!Kern::QueryVersionSupported(iVersion,aVer))
+ return KErrNotSupported;
+
+ DMediaDriverWB* pD = new DMediaDriverWB(aMediaId);
+ aChannel=pD;
+
+ TInt r=KErrNoMemory;
+ if (pD)
+ r=pD->DoCreate(aMediaId);
+
+ #ifdef REGIST_MEDIA_USE_MMC
+ if (r==KErrNone)
+ pD->OpenMediaDriverComplete(KErrNone);
+ #endif
+ __KTRACE_OPT(KPBUSDRV, Kern::Printf("<mmd:mdf"));
+ return r;
+ }
+
+
+
+// Helper
+template <class T>
+inline T* KernAlloc(const TUint32 n)
+ { return static_cast<T*>(Kern::Alloc(n * sizeof(T))); }
+
+// ---- ctor, open, close, dtor ----
+
+#pragma warning( disable : 4355 ) // this used in initializer list
+DMediaDriverWB::DMediaDriverWB(TInt aMediaId)
+ :DMediaDriver(aMediaId),
+ iMediaId(iPrimaryMedia->iNextMediaId)
+ {
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("=mmd:wb");
+ // NB aMedia Id = the media ID of the primary media, iMediaId = the media ID of this media
+ Kern::Printf("DMediaDriverWB(), iMediaId %d, aMediaId %d\n", iMediaId, aMediaId);
+ #endif
+ }
+
+#pragma warning( default : 4355 )
+TInt DMediaDriverWB::DoCreate(TInt /*aMediaId*/)
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf(">mmd:opn");
+ #endif
+ iUnitSize = CyAsSymbianStorageDriver::GetUnitSize();
+ iBlockSize = CyAsSymbianStorageDriver::GetBlockSize();
+ if( iBlockSize == 0 )
+ iBlockSize = 1;
+
+ read_pos = 0x7FFFFFFF;
+ read_size = 0;
+
+ // get card characteristics
+ SetTotalSizeInBytes(CyAsSymbianStorageDriver::GetMediaSize());
+
+ // get buffer memory from EPBUS
+ ptrReadBuf = ptrWBBuffer;
+ ptrWriteBuf = &ptrWBBuffer[65536+512];
+
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("<mmd:opn");
+ #endif
+ return(KErrNone);
+ }
+
+void DMediaDriverWB::Close()
+//
+// Close the media driver - also called on media change
+//
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("=mmd:cls");
+ #endif
+ EndInCritical();
+ //CompleteRequest(KErrNotReady);
+ DMediaDriver::Close();
+ }
+
+
+DMediaDriverWB::~DMediaDriverWB()
+ {
+
+ }
+
+
+// ---- media access ----
+
+TInt DMediaDriverWB::DoRead(TLocDrvRequest& iCurrentReq)
+//
+// set up iReqStart, iReqEnd and iReqCur and launch first read. Subsequent reads
+// will be launched from the callback DFC.
+//
+ {
+ Int64 pos=iCurrentReq.Pos();
+ Int64 length=iCurrentReq.Length();
+ TInt r;
+ if (length<0 || pos<0 || (pos+length)>KMaxTInt)
+ return KErrGeneral;
+ TInt p=(TInt)pos;
+ TInt l=(TInt)length;
+
+ if (p+l>CyAsSymbianStorageDriver::GetMediaSize())
+ return KErrGeneral;
+
+ TInt pos_block = p / iBlockSize;
+ TInt pos_offset = p % iBlockSize;
+ TInt size_block = l / iBlockSize;
+ TInt size_offset = l % iBlockSize;
+
+ TUint buf_offset = 0;
+ TInt local_pos;
+
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("WB::Read> real (%d@%d)", l, p);
+ Kern::Printf("WB::Read> pos_block - %d", pos_block) ;
+ Kern::Printf("WB::Read> pos_offset - %d", pos_offset) ;
+ Kern::Printf("WB::Read> size_block - %d", size_block) ;
+ Kern::Printf("WB::Read> size_offset - %d", size_offset) ;
+ #endif
+
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ if( pos_block == read_pos )
+ {
+ if( read_size < l )
+ {
+ buf_offset = read_size;
+ size_block = (l-read_size) / iBlockSize;
+ size_offset = (l-read_size) % iBlockSize;
+
+ local_pos = pos_block + (read_size /iBlockSize);
+ }
+ else
+ {
+ TPtrC8 des((ptrReadBuf+pos_offset), l);
+
+ r = iCurrentReq.WriteRemote(&des, 0);
+
+ return r;
+ }
+ }
+ #if 0
+ else if( (read_pos + (read_size/iBlockSize)) > pos_block )
+ {
+ TInt adjust_offset;
+ TInt adjust_size;
+ adjust_offset = (read_pos - pos_block) * iBlockSize;
+ adjust_size = read_size - adjust_offset;
+
+ memcpy(ptrReadBuf, &ptrReadBuf[adjust_offset], adjust_size );
+
+ read_pos = pos_block;
+ read_size = adjust_size;
+
+ if( read_size < l )
+ {
+ buf_offset = read_size;
+ size_block = (l-read_size) / iBlockSize;
+ size_offset = (l-read_size) % iBlockSize;
+
+ local_pos = pos_block + (read_size /iBlockSize);
+ }
+ else
+ {
+ TPtrC8 des((ptrReadBuf+pos_offset), l);
+
+ r = iCurrentReq.WriteRemote(&des, 0);
+
+ return r;
+ }
+ }
+ #endif
+ else
+ local_pos = read_pos = pos_block;
+
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("WB::Read> local_pos - %d", local_pos) ;
+ Kern::Printf("WB::Read> buf_offset - %d", buf_offset) ;
+ #endif
+
+
+ if( size_block )
+ {
+ CyAsSymbianStorageDriver::Read(local_pos, size_block, (void *)(ptrReadBuf+buf_offset));
+ local_pos += size_block;
+ buf_offset += (size_block*iBlockSize);
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ }
+
+ if( pos_offset || size_offset )
+ {
+ CyAsSymbianStorageDriver::Read(local_pos, 1, (void *)(ptrReadBuf+buf_offset) );
+ local_pos += size_block;
+ buf_offset += iBlockSize;
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ }
+
+ read_size = buf_offset;
+
+ TPtrC8 des((ptrReadBuf+pos_offset), l);
+
+ r = iCurrentReq.WriteRemote(&des, 0);
+
+ return r;
+ }
+
+
+TInt DMediaDriverWB::DoWrite(TLocDrvRequest& iCurrentReq)
+//
+// set up iReqStart, iReqEnd, and iReqCur, and launch first write. Any subsequent
+// writes are launched from the session end DFC. LaunchWrite() handles pre-reading
+// any sectors that are only partially modified.
+//
+ {
+ Int64 pos = iCurrentReq.Pos();
+ Int64 length = iCurrentReq.Length();
+ TInt r;
+ if (length<0 || pos<0 || (pos+length)>KMaxTInt)
+ return KErrGeneral;
+ TInt p=(TInt)pos;
+ TInt l=(TInt)length;
+
+ if (p+l>CyAsSymbianStorageDriver::GetMediaSize())
+ return KErrGeneral;
+
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("WB::Write> (%d@%d)", l, p);
+ #endif
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+
+ TInt pos_block = p / iBlockSize;
+ TInt pos_offset = p % iBlockSize;
+ TInt size_block = l / iBlockSize;
+ TInt size_offset = l % iBlockSize;
+
+ TUint buf_offset = 0;
+ TInt local_pos;
+ TInt w_block_size = 0;
+
+ local_pos = pos_block;
+
+ if( size_block )
+ {
+ CyAsSymbianStorageDriver::Read(local_pos, size_block, (void *)(ptrWriteBuf+buf_offset));
+ local_pos += size_block;
+ buf_offset += (size_block*iBlockSize);
+ w_block_size += size_block;
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ }
+
+ if( pos_offset || size_offset )
+ {
+ CyAsSymbianStorageDriver::Read(local_pos, 1, (void *)(ptrWriteBuf+buf_offset) );
+ local_pos += size_block;
+ buf_offset += iBlockSize;
+ w_block_size ++;
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ }
+
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("WB::Write> pos_block - %d", pos_block) ;
+ Kern::Printf("WB::Write> pos_offset - %d", pos_offset) ;
+ Kern::Printf("WB::Write> size_block - %d", size_block) ;
+ Kern::Printf("WB::Write> size_offset - %d", size_offset) ;
+ #endif
+
+ TPtr8 des((ptrWriteBuf+pos_offset), l);
+
+ if ( (r = iCurrentReq.ReadRemote(&des,0)) !=KErrNone)
+ {
+ return r;
+ }
+
+
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("WB::Write> local_pos - %d", local_pos) ;
+ Kern::Printf("WB::Write> w_block_size - %d", w_block_size) ;
+ #endif
+
+ CyAsSymbianStorageDriver::Write(local_pos, w_block_size, ptrWriteBuf);
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ return r;
+ }
+
+
+TInt DMediaDriverWB::DoFormat(TLocDrvRequest& iCurrentReq)
+ {
+ Int64 pos = iCurrentReq.Pos();
+ Int64 length = iCurrentReq.Length();
+ TInt r;
+ if (length<0 || pos<0 || (pos+length)>KMaxTInt)
+ return KErrGeneral;
+ TInt p=(TInt)pos;
+ TInt l=(TInt)length;
+
+ if (p+l>CyAsSymbianStorageDriver::GetMediaSize())
+ return KErrGeneral;
+
+ #ifdef _MEDWB_DEBUG_1_
+ Kern::Printf("WB::Format> (%d@%d)", l, p);
+ #endif
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ TInt pos_block = p / iBlockSize;
+ TInt pos_offset = p % iBlockSize;
+ TInt size_block = l / iBlockSize;
+ TInt size_offset = l % iBlockSize;
+
+ TUint buf_offset = 0;
+ TInt local_pos;
+ TInt w_block_size = 0;
+
+ local_pos = pos_block;
+
+ if( size_block )
+ {
+ CyAsSymbianStorageDriver::Read(local_pos, size_block, (void *)(ptrWriteBuf+buf_offset));
+ local_pos += size_block;
+ buf_offset += (size_block*iBlockSize);
+ w_block_size += size_block;
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ }
+
+ if( pos_offset || size_offset )
+ {
+ CyAsSymbianStorageDriver::Read(local_pos, 1, (void *)(ptrWriteBuf+buf_offset) );
+ local_pos += size_block;
+ buf_offset += iBlockSize;
+ w_block_size ++;
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ }
+
+ memclr(ptrWriteBuf + pos_offset, l);
+
+ CyAsSymbianStorageDriver::Write(local_pos, w_block_size, ptrWriteBuf);
+ #ifdef INTERVAL_FOR_WB
+ NKern::Sleep(INTERVAL_FOR_WB);
+ #endif
+ return r;
+ }
+
+
+TInt DMediaDriverWB::PartitionInfo(TPartitionInfo& anInfo)
+//
+// Read the partition information for the media. If the user supplied a password,
+// then unlock the card before trying to read the first sector.
+//
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf(">mmd:rpi");
+ #endif
+ iPartitionInfo = &anInfo;
+
+ // Assume MBR will be present or is not required
+ iMbrMissing = EFalse;
+
+ TInt r = DecodePartitionInfo();
+
+
+ if(r == KErrLocked)
+ {
+ // If the media is locked, we present a default partition entry to the local
+ // media subsystem, which will be updated when the media is finally unlocked.
+ r = CreateDefaultPartition();
+ if (r != KErrNone)
+ return r;
+ return KErrLocked;
+ }
+
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("<mmd:rpi:%d", r);
+ #endif
+ // KErrNone indicates asynchronous completion
+ return r;
+ }
+
+
+
+
+
+TInt DMediaDriverWB::DecodePartitionInfo()
+//
+// decode partition info that was read into internal buffer
+//
+ {
+ TInt partitionCount=iPartitionInfo->iPartitionCount=0;
+ TInt defaultPartitionNumber=-1;
+ TMBRPartitionEntry* pe;
+ const TUint KMBRFirstPartitionOffsetAligned = KMBRFirstPartitionOffset & ~3;
+ TInt i;
+
+ CyAsSymbianStorageDriver::Read(0, 1, (void *)ptrReadBuf);
+ read_pos = 0;
+ read_size = 512;
+ // Read of the first sector successful so check for a Master Boot Record
+ if (*(TUint16*)(&ptrReadBuf[KMBRSignatureOffset])!=0xAA55)
+ goto mbr_done;
+
+ __ASSERT_COMPILE(KMBRFirstPartitionOffsetAligned + KMBRMaxPrimaryPartitions * sizeof(TMBRPartitionEntry) <= KMBRSignatureOffset);
+
+ memmove(&ptrReadBuf[0], &ptrReadBuf[2],
+ KMBRFirstPartitionOffsetAligned + KMBRMaxPrimaryPartitions * sizeof(TMBRPartitionEntry));
+
+
+ for (i=0, pe = (TMBRPartitionEntry*)(&ptrReadBuf[KMBRFirstPartitionOffsetAligned]);
+ pe->iPartitionType != 0 && i < KMBRMaxPrimaryPartitions;i++,pe++)
+ {
+ if (pe->IsDefaultBootPartition())
+ {
+ SetPartitionEntry(&iPartitionInfo->iEntry[0],pe->iFirstSector,pe->iNumSectors);
+ defaultPartitionNumber=i;
+ partitionCount++;
+ break;
+ }
+ }
+
+ // Now add any other partitions
+ for (i=0, pe = (TMBRPartitionEntry*)(&ptrReadBuf[KMBRFirstPartitionOffsetAligned]);
+ pe->iPartitionType != 0 && i < KMBRMaxPrimaryPartitions;i++,pe++)
+ {
+ TBool validPartition = ETrue; // assume partition valid
+
+ if (defaultPartitionNumber==i)
+ {
+ // Already sorted
+ }
+
+ // FAT partition ?
+ else if (pe->IsValidDosPartition() || pe->IsValidFAT32Partition())
+ {
+ SetPartitionEntry(&iPartitionInfo->iEntry[partitionCount],pe->iFirstSector,pe->iNumSectors);
+ #ifdef _MEDWB_DEBUG_1_
+ Kern::Printf("WB: FAT partition found at sector #%u", pe->iFirstSector);
+ #endif
+ partitionCount++;
+ }
+ else
+ {
+ validPartition = EFalse;
+ }
+
+ if (validPartition && partitionCount == 1)
+ iHiddenSectors = pe->iFirstSector;
+
+ }
+
+ // Check the validity of the partition address boundaries
+ // If there is any
+ if(partitionCount > 0)
+ {
+ const TInt64 deviceSize = CyAsSymbianStorageDriver::GetMediaSize();
+ TPartitionEntry& part = iPartitionInfo->iEntry[partitionCount - 1];
+ // Check that the card address space boundary is not exceeded by the last partition
+ // In case of only 1 partition in the media check also it
+ if(part.iPartitionBaseAddr + part.iPartitionLen > deviceSize)
+ {
+ Kern::Printf("WB: MBR partition exceeds card memory space");
+ // Adjust the partition length to card address boundary
+ part.iPartitionLen = (deviceSize - part.iPartitionBaseAddr);
+
+ // Check that the base address contained valid information
+ if(part.iPartitionLen <= 0)
+ {
+ Kern::Printf("WB: Invalid base address");
+ // Invalid MBR - assume the boot sector is in the first sector
+ defaultPartitionNumber =-1;
+ partitionCount=0;
+ }
+ }
+ // More than one partition. Go through all of them
+ if (partitionCount > 0)
+ {
+ for(i=partitionCount-1; i>0; i--)
+ {
+ const TPartitionEntry& curr = iPartitionInfo->iEntry[i];
+ TPartitionEntry& prev = iPartitionInfo->iEntry[i-1];
+ // Check if partitions overlap
+ if(curr.iPartitionBaseAddr < (prev.iPartitionBaseAddr + prev.iPartitionLen))
+ {
+ Kern::Printf("WB: Overlapping partitions");
+ // Adjust the partition length to not overlap the next partition
+ prev.iPartitionLen = (curr.iPartitionBaseAddr - prev.iPartitionBaseAddr);
+
+ // Check that the base address contained valid information
+ if(prev.iPartitionLen <= 0)
+ {
+ Kern::Printf("WB: Invalid base address");
+ // Invalid MBR - assume the boot sector is in the first sector
+ defaultPartitionNumber=(-1);
+ partitionCount=0;
+ }
+ }
+ }
+ }
+ }
+
+mbr_done:
+ if (defaultPartitionNumber==(-1) && partitionCount==0)
+ {
+ Kern::Printf("WB:PartitionInfo no MBR");
+ {
+ // Assume it has no MBR, and the Boot Sector is in the 1st sector
+ SetPartitionEntry(&iPartitionInfo->iEntry[0],0,I64LOW(CyAsSymbianStorageDriver::GetMediaSize()>>KDiskSectorShift));
+ iHiddenSectors=0;
+ }
+ partitionCount=1;
+ }
+
+ iPartitionInfo->iPartitionCount=partitionCount;
+ iPartitionInfo->iMediaSizeInBytes=TotalSizeInBytes();
+ #ifdef _MEDWB_DEBUG_1_
+
+ Kern::Printf("<Mmc:PartitionInfo (C:%d)",iPartitionInfo->iPartitionCount);
+ Kern::Printf(" Partition1 (B:%xH L:%xH)",I64LOW(iPartitionInfo->iEntry[0].iPartitionBaseAddr),I64LOW(iPartitionInfo->iEntry[0].iPartitionLen));
+ Kern::Printf(" Partition2 (B:%xH L:%xH)",I64LOW(iPartitionInfo->iEntry[1].iPartitionBaseAddr),I64LOW(iPartitionInfo->iEntry[1].iPartitionLen));
+ Kern::Printf(" Partition3 (B:%xH L:%xH)",I64LOW(iPartitionInfo->iEntry[2].iPartitionBaseAddr),I64LOW(iPartitionInfo->iEntry[2].iPartitionLen));
+ Kern::Printf(" Partition4 (B:%xH L:%xH)",I64LOW(iPartitionInfo->iEntry[3].iPartitionBaseAddr),I64LOW(iPartitionInfo->iEntry[3].iPartitionLen));
+
+
+ Kern::Printf(" iMediaSizeInBytes (%d)",iPartitionInfo->iMediaSizeInBytes);
+ Kern::Printf(" iHiddenSectors (%d)",iHiddenSectors);
+ #endif
+
+ #ifdef _MEDWB_DEBUG_3_
+
+ TMBRPartitionEntry cPe;
+ if(GetDefaultPartitionInfo(cPe) == KErrNone)
+ {
+ pe = (TMBRPartitionEntry*)(&ptrReadBuf[0]);
+
+ Kern::Printf("-------------------------------------------");
+ Kern::Printf("-- Partition Entry Validation/Comparison --");
+ Kern::Printf("-------------------------------------------");
+ Kern::Printf("-- iX86BootIndicator [%02x:%02x] %c -", pe->iX86BootIndicator, cPe.iX86BootIndicator, pe->iX86BootIndicator == cPe.iX86BootIndicator ? ' ' : 'X');
+ Kern::Printf("-- iStartHead [%02x:%02x] %c -", pe->iStartHead, cPe.iStartHead, pe->iStartHead == cPe.iStartHead ? ' ' : 'X');
+ Kern::Printf("-- iStartSector [%02x:%02x] %c -", pe->iStartSector, cPe.iStartSector, pe->iStartSector == cPe.iStartSector ? ' ' : 'X');
+ Kern::Printf("-- iStartCylinder [%02x:%02x] %c -", pe->iStartCylinder, cPe.iStartCylinder, pe->iStartCylinder == cPe.iStartCylinder ? ' ' : 'X');
+ Kern::Printf("-- iPartitionType [%02x:%02x] %c -", pe->iPartitionType, cPe.iPartitionType, pe->iPartitionType == cPe.iPartitionType ? ' ' : 'X');
+ Kern::Printf("-- iEndHead [%02x:%02x] %c -", pe->iEndHead, cPe.iEndHead, pe->iEndHead == cPe.iEndHead ? ' ' : 'X');
+ Kern::Printf("-- iEndSector [%02x:%02x] %c -", pe->iEndSector, cPe.iEndSector, pe->iEndSector == cPe.iEndSector ? ' ' : 'X');
+ Kern::Printf("-- iEndCylinder [%02x:%02x] %c -", pe->iEndCylinder, cPe.iEndCylinder, pe->iEndCylinder == cPe.iEndCylinder ? ' ' : 'X');
+ Kern::Printf("-- iFirstSector [%08x:%08x] %c -", pe->iFirstSector, cPe.iFirstSector, pe->iFirstSector == cPe.iFirstSector ? ' ' : 'X');
+ Kern::Printf("-- iNumSectors [%08x:%08x] %c -", pe->iNumSectors, cPe.iNumSectors, pe->iNumSectors == cPe.iNumSectors ? ' ' : 'X');
+ Kern::Printf("-------------------------------------------");
+ }
+ #endif
+
+ return(KErrNone);
+ }
+
+
+TInt DMediaDriverWB::WritePartitionInfo()
+/**
+ Write the default partition table to freshly formatted media
+ @return Standard Symbian OS Error Code
+ */
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf(">mmd:wpi");
+ #endif
+ TMBRPartitionEntry partitionEntry;
+ TInt err = GetDefaultPartitionInfo(partitionEntry);
+ if(err == KErrNone)
+ {
+ TUint8 *iPartitionBuf;
+
+ iPartitionBuf = new TUint8[KDiskSectorSize];
+
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("mmd:MBR/Partition Table");
+ Kern::Printf(" Boot ID : %02xh", partitionEntry.iX86BootIndicator);
+ Kern::Printf(" Start Head : %02xh", partitionEntry.iStartHead);
+ Kern::Printf(" Start Sector : %02xh", partitionEntry.iStartSector);
+ Kern::Printf(" Start Cyclinder : %02xh", partitionEntry.iStartCylinder);
+ Kern::Printf(" System ID : %02xh", partitionEntry.iPartitionType);
+ Kern::Printf(" End Head : %02xh", partitionEntry.iEndHead);
+ Kern::Printf(" End Sector : %02xh", partitionEntry.iEndSector);
+ Kern::Printf(" End Cyclinder : %02xh", partitionEntry.iEndCylinder);
+ Kern::Printf(" Relative Sector : %08xh", partitionEntry.iFirstSector);
+ Kern::Printf(" Number of Sectors: %08xh", partitionEntry.iNumSectors);
+ #endif
+ //
+ // Clear all other partition entries and align the partition info into the minor buffer for writing...
+ //
+ memclr(iPartitionBuf, KDiskSectorSize);
+ memcpy(&iPartitionBuf[KMBRFirstPartitionEntry], &partitionEntry, sizeof(TMBRPartitionEntry));
+
+ *(TUint16*)(&iPartitionBuf[KMBRSignatureOffset]) = 0xAA55;
+
+ err = CyAsSymbianStorageDriver::Write(0, 1, iPartitionBuf);
+
+ //
+ // Write the partition table and engage the read to validate and complete the mount process
+ //
+ delete iPartitionBuf;
+ iMbrMissing = EFalse;
+ }
+
+ #ifdef _MEDWB_DEBUG_3_
+ __KTRACE_OPT(KPBUSDRV, Kern::Printf("<mmd:wpi:%d", err));
+ #endif
+
+ return(err);
+ }
+
+
+TInt DMediaDriverWB::CreateDefaultPartition()
+ {
+ TMBRPartitionEntry defPartition;
+ TInt r = GetDefaultPartitionInfo(defPartition);
+ if (r == KErrNone)
+ {
+ SetPartitionEntry(&iPartitionInfo->iEntry[0], defPartition.iFirstSector, defPartition.iNumSectors);
+ iHiddenSectors = defPartition.iFirstSector;
+ iPartitionInfo->iPartitionCount = 1;
+ iPartitionInfo->iMediaSizeInBytes = TotalSizeInBytes();
+ }
+ return r;
+ }
+
+TInt DMediaDriverWB::GetDefaultPartitionInfo(TMBRPartitionEntry& aPartitionEntry)
+/**
+ Calculates the default patition information for an specific card.
+ @param aPartitionEntry The TMBRPartitionEntry to be filled in with the format parameters
+ @return Standard Symbian OS Error Code
+ */
+ {
+ memclr(&aPartitionEntry, sizeof(TMBRPartitionEntry));
+
+ const TUint32 KTotalSectors = I64LOW(CyAsSymbianStorageDriver::GetMediaSize() >> KDiskSectorShift);
+
+ aPartitionEntry.iFirstSector = (CyAsSymbianStorageDriver::GetEraseBlockSize()>> KDiskSectorShift);
+ aPartitionEntry.iNumSectors = KTotalSectors - aPartitionEntry.iFirstSector;
+ aPartitionEntry.iX86BootIndicator = 0x00;
+
+ if(aPartitionEntry.iNumSectors < 32680)
+ {
+ aPartitionEntry.iPartitionType = KPartitionTypeFAT12;
+ }
+ else if(aPartitionEntry.iNumSectors < 65536)
+ {
+ aPartitionEntry.iPartitionType = KPartitionTypeFAT16small;
+ }
+ else if (aPartitionEntry.iNumSectors < 1048576)
+ {
+ aPartitionEntry.iPartitionType = KPartitionTypeFAT16;
+ }
+ else
+ {
+ aPartitionEntry.iPartitionType = KPartitionTypeWin95FAT32;
+ }
+
+ return(KErrNone);
+ }
+
+void DMediaDriverWB::SetPartitionEntry(TPartitionEntry* aEntry, TUint aFirstSector, TUint aNumSectors)
+//
+// auxiliary static function to record partition information in TPartitionEntry object
+//
+ {
+ aEntry->iPartitionBaseAddr=aFirstSector;
+ aEntry->iPartitionBaseAddr<<=KDiskSectorShift;
+ aEntry->iPartitionLen=aNumSectors;
+ aEntry->iPartitionLen<<=KDiskSectorShift;
+ aEntry->iPartitionType=KPartitionTypeFAT12;
+ }
+
+// ---- device status, callback DFC ----
+
+TInt DMediaDriverWB::CheckDevice(int aReqType)
+//
+// Check the device before initiating a command
+//
+ {
+
+ __KTRACE_OPT(KPBUSDRV, Kern::Printf(">wb:cd:%d",aReqType));
+
+ TInt r=KErrNone;
+#if 0
+ if (!iCard->IsReady())
+ r=KErrNotReady;
+
+ // The card must be locked if attempting to unlock during RPI, and
+ // unlocked at all other times.
+ else if (aReqType!=EMReqTypeUnlockPswd && iCard->IsLocked())
+ r=KErrLocked;
+ // Don't perform Password setting for WriteProtected cards,
+ // unable to recover (ForcedErase) if password lost.
+ else if (aReqType==EMReqTypeChangePswd)
+ {
+ if (iCard->MediaType()==EMultiMediaROM)
+ {
+ r=KErrAccessDenied;
+ }
+ }
+ else if (iMbrMissing && aReqType==EMReqTypeNormalRd)
+ r=KErrCorrupt;
+
+ // Don't perform write operations when the mechanical write protect switch is set
+ else if (aReqType==EMReqTypeNormalWr && iCard->IsWriteProtected())
+ r=KErrAccessDenied;
+ // Don't perform write/format operations on MMC ROM cards
+ else if (iMediaType==EMultiMediaROM && aReqType == EMReqTypeNormalWr)
+ r=KErrAccessDenied;
+#endif
+ __KTRACE_OPT(KPBUSDRV, Kern::Printf("<wb:cd:%d", r));
+ return(r);
+ }
+
+
+// ---- request management ----
+
+TInt DMediaDriverWB::Caps(TLocDrv& aDrive, TLocalDriveCapsV6& aInfo)
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf(">WB::Caps ");
+ #endif
+ // Fill buffer with current media caps.
+ aInfo.iType = EMediaHardDisk;
+ aInfo.iBattery = EBatNotSupported;
+ aInfo.iDriveAtt = KDriveAttLocal;
+ aInfo.iMediaAtt = KMediaAttFormattable;
+
+ //if(CyAsSymbianStorageDriver::GetIsLocked())
+ // aInfo.iMediaAtt |= KMediaAttLockable;
+ //if (iCard->HasPassword())
+ //aInfo.iMediaAtt |= KMediaAttHasPassword;
+
+ if ( !CyAsSymbianStorageDriver::GetIsWriteable())
+ aInfo.iMediaAtt |= KMediaAttWriteProtected;
+ if (CyAsSymbianStorageDriver::GetIsLocked())
+ aInfo.iMediaAtt |= KMediaAttLocked;
+
+ aInfo.iFileSystemId = KDriveFileSysFAT;
+
+ // Format is performed in multiples of the erase sector (or multiple block) size
+ aInfo.iMaxBytesPerFormat = CyAsSymbianStorageDriver::GetBlockSize();
+
+ // Set serial number to CID
+ aInfo.iSerialNumLength = 16;
+ for (TUint i=0; i<16; i++)
+ aInfo.iSerialNum[i] = 0;
+
+ // Get block size & erase block size to allow the file system to align first usable cluster correctly
+ aInfo.iBlockSize = CyAsSymbianStorageDriver::GetBlockSize();
+ aInfo.iEraseBlockSize = CyAsSymbianStorageDriver::GetEraseBlockSize();
+
+ if ( CyAsSymbianStorageDriver::GetIsRemovable())
+ aInfo.iDriveAtt|= KDriveAttRemovable;
+
+ // Must return KErrCompletion to indicate that this
+ // is a synchronous version of the function
+ return KErrNone;
+ }
+
+
+void DMediaDriverWB::NotifyPowerDown()
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf(">Mmc:NotifyPowerDown");
+ #endif
+
+ EndInCritical();
+
+ //CompleteRequest(KErrNotReady);
+ }
+
+void DMediaDriverWB::NotifyEmergencyPowerDown()
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf(">Ata:NotifyEmergencyPowerDown");
+ #endif
+ //TInt r=KErrNotReady;
+ //if (iCritical)
+ // r=KErrAbort;
+ EndInCritical();
+
+ // need to cancel the session as the stack doesn't take too kindly to having the same session engaged more than once.
+
+ //CompleteRequest(r);
+ }
+
+TInt DMediaDriverWB::Request(TLocDrvRequest& aRequest)
+ {
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("MmcMd:Req %08x id %d",&aRequest,aRequest.Id());
+ #endif
+ TInt r=KErrNotSupported;
+ TInt id=aRequest.Id();
+
+ NKern::ThreadEnterCS();
+
+ TUint partitionType = aRequest.Drive()->iPartitionType;
+ TBool readOnly = (partitionType == KPartitionTypeRofs || partitionType == KPartitionTypeROM);
+
+ switch (id)
+ {
+ case DLocalDrive::ECaps:
+ {
+ TLocalDriveCapsV6& c = *(TLocalDriveCapsV6*)aRequest.RemoteDes();
+ TLocDrv& drive = *aRequest.Drive();
+ r = Caps(drive, c);
+ c.iSize = drive.iPartitionLen;
+ c.iPartitionType = drive.iPartitionType;
+ c.iHiddenSectors = (TUint) (drive.iPartitionBaseAddr >> KDiskSectorShift);
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("caps : c.iSize = %d ", c.iSize);
+ Kern::Printf("caps : c.iPartitionType = %d ", c.iPartitionType);
+ Kern::Printf("caps : c.iHiddenSectors = %d ", c.iHiddenSectors);
+ #endif
+ }
+ break;
+ case DLocalDrive::EQueryDevice:
+ Kern::Printf(">WB::EQueryDevice ");
+ r = KErrNotSupported;
+ break;
+
+ case DLocalDrive::ERead:
+ r=DoRead(aRequest);
+ break;
+ case DLocalDrive::EWrite:
+ if (readOnly)
+ return KErrNotSupported;
+ r=DoWrite(aRequest);
+ break;
+ case DLocalDrive::EFormat:
+ if (readOnly)
+ return KErrNotSupported;
+ r=DoFormat(aRequest);
+ break;
+
+
+ case DLocalDrive::EPasswordUnlock:
+ case DLocalDrive::EPasswordLock:
+ case DLocalDrive::EPasswordClear:
+ case DLocalDrive::EPasswordErase:
+ case DLocalDrive::EWritePasswordStore:
+ Kern::Printf(">WB::EPassword ");
+ break;
+ case DLocalDrive::EEnlarge:
+ case DLocalDrive::EReduce:
+ Kern::Printf(">WB::EReduce ");
+ default:
+ Kern::Printf(">WB::default ");
+ r=KErrNotSupported;
+ break;
+ }
+
+ NKern::ThreadLeaveCS();
+ #ifdef _MEDWB_DEBUG_3_
+ Kern::Printf("MmcMd:Req %08x cmp %d",&aRequest,r);
+ #endif
+ return r;
+ }
+
+void DMediaDriverWB::Disconnect(DLocalDrive* aLocalDrive, TThreadMessage* aMsg)
+ {
+ // Complete using the default implementation
+ DMediaDriver::Disconnect(aLocalDrive, aMsg);
+ }
+
+
+DECLARE_EXTENSION_PDD()
+ {
+ // NB if the media driver has been defined as a kernel extension in the .OBY/.IBY file
+ // i.e the "extension" keyword has been used rather than "device", then an instance of
+ // DPhysicalDeviceMediaMmcFlash will already have been created by InitExtension(). In this
+ // case the kernel will see that an object of the same name already exists and delete the
+ // new one.
+ return new DPhysicalDeviceMediaWB;
+ }
+#ifdef REGIST_MEDIA_USE_MMC
+DECLARE_STANDARD_EXTENSION()
+ {
+ Kern::Printf("Creating WestBridge PDD");
+
+ DPhysicalDeviceMediaWB* device = new DPhysicalDeviceMediaWB;
+
+ TInt r;
+ if (device==NULL)
+ r=KErrNoMemory;
+ else
+ r=Kern::InstallPhysicalDevice(device);
+ Kern::Printf("Installing WestBridge PDD in kernel returned %d",r);
+
+ if( CyAsSymbianStorageDriver::Open() )
+ Kern::Printf("**CyAsSymbianStorageDriver::Open() - Success");
+ else
+ Kern::Printf("**CyAsSymbianStorageDriver::Open() - Fail");
+
+ Kern::Printf("WestBridge extension entry point drive returns %d",r);
+ return r;
+ }
+
+#else
+static const TInt WBDriveNumbers[1]={1};
+_LIT(KWBDriveName,"WestBridge");
+
+DECLARE_STANDARD_EXTENSION()
+ {
+ __KTRACE_OPT(KBOOT,Kern::Printf("Registering WB drive"));
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("Registering WB drive");
+ #endif
+ TInt r=KErrNoMemory;
+ DPrimaryMediaBase* pM=new DPrimaryMediaBase;
+ if (pM)
+ {
+ r=LocDrv::RegisterMediaDevice(MEDIA_DEVICE_MMC,1,&WBDriveNumbers[0],pM,1,KWBDriveName);
+ }
+
+
+ if( CyAsSymbianStorageDriver::Open() )
+ {
+ #ifdef _MEDWB_DEBUG_1_
+ Kern::Printf("**CyAsSymbianStorageDriver::Open() - Success");
+ #endif
+ }
+ else
+ {
+ #ifdef _MEDWB_DEBUG_1_
+ Kern::Printf("**CyAsSymbianStorageDriver::Open() - Fail");
+ #endif
+ }
+
+ __KTRACE_OPT(KBOOT,Kern::Printf("Registering WB drive - return %d",r));
+ #ifdef _MEDWB_DEBUG_2_
+ Kern::Printf("Registering WB drive - return %d",r);
+ #endif
+
+ return r;
+ }
+
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/medwb/medwb.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,45 @@
+// ===========================
+//
+// Copyright Cypress Semiconductor Corporation, 2006-2009,
+// All Rights Reserved
+// UNPUBLISHED, LICENSED SOFTWARE.
+//
+// CONFIDENTIAL AND PROPRIETARY INFORMATION
+// WHICH IS THE PROPERTY OF CYPRESS.
+//
+// ===========================
+
+
+#include "beagle/variant.mmh"
+#include "kernel/kern_ext.mmh"
+#include "drivers/elocd.mmh"
+
+OS_LAYER_SYSTEMINCLUDE_SYMBIAN
+USERINCLUDE ../../../../../os/kernelhwsrv/kernel/eka/include/drivers
+
+target VariantTarget(medwb,pdd)
+targettype pdd
+
+//Define this macro to create an MBR when formatting low-capacity MMC cards :
+//macro SYMBIAN_CREATE_MBR_ON_LOW_CAPACITY_MMC
+
+source medwb.cpp
+
+library elocd.lib
+//library VariantTarget(wb,lib)
+library wb.lib
+
+linkas medwb.pdd
+
+start wins
+win32_headers
+end
+
+epocallowdlldata
+
+UID 0x100039d0 0x100000d9
+VENDORID 0x70000001
+
+capability all
+
+SMPSAFE
--- a/omap3530/beagle_drivers/serialmouse/serialmouse.cpp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagle_drivers/serialmouse/serialmouse.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -40,6 +40,8 @@
# define CURSOR_SIZE 5
#endif
+// AndyS Add support for sending keyboard events
+#define STDKEY(x) (0x1FFF&(x))
LOCAL_C TInt halFunction(TAny* aPtr, TInt aFunction, TAny* a1, TAny* a2)
{
@@ -75,10 +77,13 @@
if (r!=KErrNone)
return r;
+ Kern::Printf("TSerialMouse initialising");
__KTRACE_OPT(KBOOT,Kern::Printf("+TSerialMouse::Init")) ;
-
+/*
iDebugPort = Kern::SuperPage().iDebugPort; // Get the debug port number
+ Kern::Printf("Debugport=%d", iDebugPort);
+
if( Arm::EDebugPortJTAG == iDebugPort )
{
__KTRACE_OPT(KBOOT,Kern::Printf("-TSerialMouse::Init: JTAG not supported"));
@@ -91,7 +96,7 @@
// We don't want to return an error here, just don't bother to initialize
return KErrNone;
}
-
+*/
// Register with the power resource manager
//r = PowerResourceManager::RegisterClient( iPrmClientId, KName );
@@ -102,6 +107,9 @@
//__KTRACE_OPT(KBOOT,Kern::Printf("+TSerialMouse::Init:PRM client ID=%x", iPrmClientId )) ;
+ Prcm::SetClockState(iUart.PrcmInterfaceClk(), Prcm::EClkOn);
+ Prcm::SetClockState(iUart.PrcmFunctionClk(), Prcm::EClkOn);
+
r =Interrupt::Bind( iUart.InterruptId(),Isr,this);
if ( r < 0 )
{
@@ -132,7 +140,9 @@
iUart.Enable();
Interrupt::Enable(iUart.InterruptId());
-
+
+ Kern::Printf("TSerialMouse initialised ID=%d", iUart.InterruptId());
+
return KErrNone;
}
@@ -180,7 +190,6 @@
{
const TUint8 b = iKey;
-
if ( b & 1<<6 )
{
// Beginning of a new frame
@@ -202,6 +211,8 @@
const TBool isLeftButtonDown = iB0& 1<<5;
const TBool isRightButtonDown = iB0& 1<<4;
+ Kern::Printf("Mouse dx=%d dy=%d lmb=%d", x_increment, y_increment, isLeftButtonDown);
+
# ifdef _FRAME_BUFFER_CURSOR_
iLastX = iX;
iLastY = iY;
@@ -223,8 +234,15 @@
if ( rightButtonEvent )
{
- e.Set( isRightButtonDown ? TRawEvent::EButton2Down : TRawEvent::EButton2Up, iX, iY );
- Kern::AddEvent(e);
+ if(isRightButtonDown)
+ {
+ e.Set( isRightButtonDown ? TRawEvent::EButton2Down : TRawEvent::EButton2Up, iX, iY );
+ Kern::AddEvent(e);
+ }
+ else
+ {
+ AddKey(EStdKeyApplication0);
+ }
//DBG_PRINT1(_L(" right:%S"), isRightButtonDown?&_L("down"):&_L("up") );
}
@@ -408,6 +426,21 @@
__ASSERT_ALWAYS( r == KErrNone, Kern::Fault( "SERKEY-Cr", r ) );
}
+// AndyS support for sending keypresses
+void TSerialMouse::AddKey( TUint aKey )
+ {
+ const TUint8 stdKey = STDKEY(aKey);
+
+ TRawEvent e;
+
+ Kern::Printf("AddKey %d", stdKey);
+
+ e.Set( TRawEvent::EKeyDown, stdKey, 0 );
+ Kern::AddEvent( e );
+ e.Set( TRawEvent::EKeyUp, stdKey, 0 );
+ Kern::AddEvent( e );
+}
+
//
// Kernel Extension entry point
--- a/omap3530/beagle_drivers/serialmouse/serialmouse.h Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagle_drivers/serialmouse/serialmouse.h Wed Apr 14 10:04:00 2010 +0100
@@ -39,6 +39,9 @@
void Clip(TInt& aX, TInt& aY);
void GetScreenInfo();
+ // AndyS support for sending keyboard events
+ void AddKey( TUint aKey );
+
enum TState { ENormal, EEscapingStart, EEscapingType1, EEscapingType2 };
private:
TDfc iKeyDfc;
@@ -61,7 +64,7 @@
TInt iLastY;
TBool iLastLeftButtonDown;
TBool iLastRightButtonDown;
-
+
#ifdef _FRAME_BUFFER_CURSOR_
void DrawCursor(TInt x, TInt y);
void Blit(TInt x, TInt y, TUint16 aColour);
--- a/omap3530/beagle_drivers/serialmouse/serialmouse.mmh Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagle_drivers/serialmouse/serialmouse.mmh Wed Apr 14 10:04:00 2010 +0100
@@ -22,9 +22,11 @@
library VariantTarget(ecust,lib)
library AsspTarget(kaomap3530,lib)
library AsspTarget(uart,lib)
+library AsspTarget(prcm,lib)
//library resman.lib
systeminclude +/include/drivers
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
targettype kext
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/soundsc/bld.inf Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,22 @@
+// Copyright (c) 2009 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:
+//
+// Description:
+// omap3530/beagle_drivers/soundsc/bld.inf
+//
+
+PRJ_PLATFORMS
+ARMV5
+
+PRJ_MMPFILES
+soundsc
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/soundsc/shared_sound.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 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:
+*
+* Description:
+*
+*/
+
+#ifndef __BEAGLESHARED_SOUND_H__
+#define __BEAGLESHARED_SOUND_H__
+
+#include <soundsc.h>
+
+#ifdef _DEBUG
+#define BEAGLE_SOUND_DEBUG(x...) Kern::Printf(x)
+#else
+#define BEAGLE_SOUND_DEBUG(x...)
+#endif
+
+class DDriverBeagleSoundScPddFactory;
+
+class DDriverBeagleSoundScPdd : public DSoundScPdd
+ {
+public:
+
+ DDriverBeagleSoundScPdd();
+ ~DDriverBeagleSoundScPdd();
+ TInt DoCreate();
+ void GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo);
+ void Caps(TDes8& aCapsBuf) const;
+ TInt MaxTransferLen() const;
+ TInt SetConfig(const TDesC8& aConfigBuf);
+ TInt SetVolume(TInt aVolume);
+ TInt StartTransfer();
+ TInt TransferData(TUint aTransferID, TLinAddr aLinAddr, TPhysAddr aPhysAddr, TInt aNumBytes);
+ void StopTransfer();
+ TInt PauseTransfer();
+ TInt ResumeTransfer();
+ TInt PowerUp();
+ void PowerDown();
+ TInt CustomConfig(TInt aFunction, TAny* aParam);
+ void Callback(TUint aTransferID, TInt aTransferResult, TInt aBytesTransferred);
+
+ void SetCaps();
+ // There was a change in the signature for DfcQ() which
+ // is a pure virtual method in the parent.
+ // for Symbian^2
+ TDfcQue* DfcQ();
+ // for Symbian^3
+ TDfcQue* DfcQ(TInt aUnit);
+
+ TInt CalculateBufferTime(TInt aNumBytes);
+
+public:
+
+ DDriverBeagleSoundScPddFactory* iPhysicalDevice;
+
+ class TTransferArrayInfo{
+
+public:
+ TUint iTransferID;
+ TLinAddr iLinAddr;
+ TInt iNumBytes;
+ TInt iPlayTime;
+ };
+
+ RArray<TTransferArrayInfo> iTransferArray;
+
+ NTimer iTimer;
+
+ TInt iUnitType; //Play or Record
+
+private:
+
+ TSoundFormatsSupportedV02 iCaps;
+
+ TCurrentSoundFormatV02 iConfig;
+
+
+
+ };
+
+
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/soundsc/shared_txsound.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,316 @@
+/*
+* Copyright (c) 2009 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:
+*
+* Description:
+*
+*/
+
+#include "shared_sound.h"
+#include "variant_sound.h"
+
+void TimerCallback(TAny* aData)
+ {
+ DDriverBeagleSoundScPdd * soundscpdd = (DDriverBeagleSoundScPdd*) aData;
+
+ soundscpdd->Callback(soundscpdd->iTransferArray[0].iTransferID, KErrNone, soundscpdd->iTransferArray[0].iNumBytes);
+
+ }
+
+
+DDriverBeagleSoundScPdd::DDriverBeagleSoundScPdd() : iTimer(TimerCallback,this)
+ {
+
+ }
+
+DDriverBeagleSoundScPdd::~DDriverBeagleSoundScPdd()
+ {
+ iTimer.Cancel();
+ }
+
+
+TInt DDriverBeagleSoundScPdd::DoCreate()
+ {
+
+ SetCaps();
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::DoCreate TxPdd");
+
+ return KErrNone;
+ }
+
+void DDriverBeagleSoundScPdd::GetChunkCreateInfo(TChunkCreateInfo& aChunkCreateInfo)
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::GetChunkCreateInfo TxPdd");
+
+ aChunkCreateInfo.iType = TChunkCreateInfo::ESharedKernelMultiple;
+ aChunkCreateInfo.iMapAttr = EMapAttrFullyBlocking; // No caching
+ aChunkCreateInfo.iOwnsMemory = ETrue; // Using RAM pages
+ aChunkCreateInfo.iDestroyedDfc = NULL; // No chunk destroy DFC
+ }
+
+void DDriverBeagleSoundScPdd::Caps(TDes8& aCapsBuf) const
+ {
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::Caps TxPdd");
+
+ // Fill the structure with zeros in case it is a newer version than we know about
+ aCapsBuf.FillZ(aCapsBuf.MaxLength());
+
+ // And copy the capabilities into the packaged structure
+ TPtrC8 ptr((const TUint8*) &iCaps, sizeof(iCaps));
+ aCapsBuf = ptr.Left(Min(ptr.Length(), aCapsBuf.MaxLength()));
+ }
+
+TInt DDriverBeagleSoundScPdd::SetConfig(const TDesC8& aConfigBuf)
+ {
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::SetConfig TxPdd");
+
+ // Read the new configuration from the LDD
+ TCurrentSoundFormatV02 config;
+ TPtr8 ptr((TUint8*) &config, sizeof(config));
+ Kern::InfoCopy(ptr, aConfigBuf);
+
+ iConfig = config;
+
+ return KErrNone;
+ }
+
+
+TInt DDriverBeagleSoundScPdd::SetVolume(TInt aVolume)
+ {
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::Setvolume TxPdd");
+
+ return KErrNone;
+ }
+
+
+TInt DDriverBeagleSoundScPdd::StartTransfer()
+ {
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::starttransfer TxPdd");
+
+ //Prepare for transfer
+ return KErrNone;
+
+ }
+
+TInt DDriverBeagleSoundScPdd::CalculateBufferTime(TInt aNumBytes)
+ {
+
+ TUint samplerate=0;
+
+ // Let the compiler perform an integer division of rates
+ switch(iConfig.iRate)
+ {
+ case ESoundRate7350Hz: samplerate = 7350; break;
+ case ESoundRate8000Hz: samplerate = 8000; break;
+ case ESoundRate8820Hz: samplerate = 8820; break;
+ case ESoundRate9600Hz: samplerate = 9600; break;
+ case ESoundRate11025Hz: samplerate = 11025; break;
+ case ESoundRate12000Hz: samplerate = 12000; break;
+ case ESoundRate14700Hz: samplerate = 14700; break;
+ case ESoundRate16000Hz: samplerate = 16000; break;
+ case ESoundRate22050Hz: samplerate = 22050; break;
+ case ESoundRate24000Hz: samplerate = 24000; break;
+ case ESoundRate29400Hz: samplerate = 29400; break;
+ case ESoundRate32000Hz: samplerate = 32000; break;
+ case ESoundRate44100Hz: samplerate = 44100; break;
+ case ESoundRate48000Hz: samplerate = 48000; break;
+ }
+
+
+ // integer division by number of channels
+ aNumBytes /= iConfig.iChannels;
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::iChannels =%d", iConfig.iChannels);
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::iEncoding =%d", iConfig.iEncoding);
+
+ // integer division by bytes per sample
+ switch(iConfig.iEncoding)
+ {
+ case ESoundEncoding8BitPCM: break;
+ case ESoundEncoding16BitPCM: aNumBytes /= 2; break;
+ case ESoundEncoding24BitPCM: aNumBytes /= 3; break;
+ }
+
+ return (aNumBytes * 1000) / samplerate; //return time in milliseconds
+
+
+ }
+
+TInt DDriverBeagleSoundScPdd::TransferData(TUint aTransferID, TLinAddr aLinAddr, TPhysAddr /*aPhysAddr*/, TInt aNumBytes)
+ {
+
+ //function wil get called multiple times while transfer is in progress therefore keep fifo queue of requests
+ TTransferArrayInfo transfer;
+
+ transfer.iTransferID = aTransferID;
+ transfer.iLinAddr = aLinAddr;
+ transfer.iNumBytes = aNumBytes;
+
+ //calculate the amount of time required to play/record buffer
+ TInt buffer_play_time = CalculateBufferTime(aNumBytes);
+ TInt timerticks = NKern::TimerTicks(buffer_play_time);
+ transfer.iPlayTime = timerticks;
+
+ iTransferArray.Append(transfer);
+
+ //Timer will callback when correct time has elapsed, will return KErrInUse if transfer
+ //already active, this is ok becuase will be started again in callback
+ TInt err = iTimer.OneShot(timerticks, ETrue);
+
+
+ return KErrNone;
+ }
+
+void DDriverBeagleSoundScPdd::StopTransfer()
+ {
+ // Stop transfer
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::stoptransfer TxPdd");
+
+ //If timer is currently active then cancel it and call back buffer
+ if(iTimer.Cancel())
+ {
+ Callback(iTransferArray[0].iTransferID, KErrNone, iTransferArray[0].iNumBytes);
+ }
+
+
+ }
+
+
+TInt DDriverBeagleSoundScPdd::PauseTransfer()
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::pausetransfer TxPdd");
+ //Pause Transfer
+
+ return KErrNone;
+ }
+
+
+TInt DDriverBeagleSoundScPdd::ResumeTransfer()
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::resumetransfer TxPdd");
+ //Resume Transfer
+
+ return KErrNone;
+ }
+
+TInt DDriverBeagleSoundScPdd::PowerUp()
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::PowerUp TxPdd");
+ return KErrNone;
+ }
+
+void DDriverBeagleSoundScPdd::PowerDown()
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::Powerdown TxPdd");
+ }
+
+TInt DDriverBeagleSoundScPdd::CustomConfig(TInt /*aFunction*/,TAny* /*aParam*/)
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::customconfig TxPdd");
+ return KErrNotSupported;
+ }
+
+
+void DDriverBeagleSoundScPdd::Callback(TUint aTransferID, TInt aTransferResult, TInt aBytesTransferred)
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::playcallback TxPdd");
+ //Callback when Transfer completes or is stopped
+
+ iTransferArray.Remove(0);
+
+ if(iUnitType == KSoundScTxUnit0)
+ {
+ Ldd()->PlayCallback(aTransferID, aTransferResult, aBytesTransferred);
+ }
+ else if(iUnitType == KSoundScRxUnit0)
+ {
+ Ldd()->RecordCallback(aTransferID, aTransferResult, aBytesTransferred);
+ }
+
+ if( iTransferArray.Count()>0)
+ {
+ iTimer.OneShot(iTransferArray[0].iPlayTime, ETrue);
+ }
+
+ }
+
+TDfcQue*DDriverBeagleSoundScPdd::DfcQ(TInt /* aUnit*/ )
+ {
+ return this->DfcQ();
+ }
+
+TDfcQue*DDriverBeagleSoundScPdd::DfcQ()
+ {
+ return iPhysicalDevice->iDfcQ;
+ }
+
+TInt DDriverBeagleSoundScPdd::MaxTransferLen() const
+ {
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::MaxTransferLen TxPdd");
+
+ TInt maxlength = 200*1024;
+ return maxlength;
+ }
+
+
+void DDriverBeagleSoundScPdd::SetCaps()
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPdd::SetCaps TxPdd");
+
+ if(iUnitType == KSoundScTxUnit0)
+ {
+ // The data transfer direction for this unit is play
+ iCaps.iDirection = ESoundDirPlayback;
+ }
+ else if(iUnitType == KSoundScRxUnit0)
+ {
+ // The data transfer direction for this unit is record
+ iCaps.iDirection = ESoundDirRecord;
+ }
+
+ // This unit supports both mono and stereo
+ iCaps.iChannels = (KSoundMonoChannel | KSoundStereoChannel);
+
+ // This unit supports only some of the sample rates offered by Symbian OS
+ iCaps.iRates = (KSoundRate8000Hz | KSoundRate11025Hz | KSoundRate12000Hz | KSoundRate16000Hz |
+ KSoundRate22050Hz | KSoundRate24000Hz | KSoundRate32000Hz | KSoundRate44100Hz |
+ KSoundRate48000Hz);
+
+ // This unit only supports 16bit PCM encoding
+ iCaps.iEncodings = KSoundEncoding16BitPCM;
+
+ // This unit only supports interleaved data format when playing stereo; that is, a PCM data
+ // stream where the left and right channel samples are interleaved as L-R-L-R-L-R etc.
+ iCaps.iDataFormats = KSoundDataFormatInterleaved;
+
+ // The iRequestMinSize member is named badly. It is actually the value of which the length samples
+ // must be a multiple of. ie. The sample length % iRequestMinSize must == 0. This value must always
+ // be a power of 2
+ iCaps.iRequestMinSize = 4;
+
+ // The logarithm to base 2 of the alignment required for request arguments. DMA requests must be
+ // aligned to a 32 bit boundary
+ iCaps.iRequestAlignment = 2;
+
+ // This unit is not capable of detecting changes in hardware configuration
+ iCaps.iHwConfigNotificationSupport = EFalse;
+ }
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/soundsc/soundsc.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* Copyright (c) 2009 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:
+*
+* Description:
+*
+*/
+
+#include "beagle/variant.mmh"
+#include "kernel/kern_ext.mmh"
+
+SYSTEMINCLUDE /epoc32/include/drivers
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
+
+
+TARGET VariantTarget(soundsc,pdd)
+TARGETTYPE pdd
+ROMTARGET soundsc.pdd
+
+SOURCE shared_txsound.cpp
+SOURCE variant_sound.cpp
+
+CAPABILITY all
+EPOCALLOWDLLDATA
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/soundsc/variant_sound.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2009 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:
+*
+* Description:
+*
+*/
+
+#include "variant_sound.h"
+
+_LIT(KSoundScPddName, "SoundSc.Beagle");
+
+
+DECLARE_STANDARD_PDD()
+ {
+ return new DDriverBeagleSoundScPddFactory;
+ }
+
+
+DDriverBeagleSoundScPddFactory::DDriverBeagleSoundScPddFactory()
+ {
+
+ iUnitsMask = ((1 << KSoundScTxUnit0) | (1 << KSoundScRxUnit0));
+
+ iVersion = RSoundSc::VersionRequired();
+ }
+
+
+TInt DDriverBeagleSoundScPddFactory::Install()
+ {
+ _LIT(KAudioDFC, "AUDIO DFC");
+ // Get a pointer to the the McBSP's DFC Queue so that handling of both McBSP callbacks and requests
+ // made to the LDD from user mode can be processed in the same thread, to avoid the use of semaphores
+ TInt r = Kern::DfcQCreate(iDfcQ, 26, &KAudioDFC);
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::PDD install");
+
+ if(r==KErrNone)
+ {
+ // All PDD factories must have a unique name
+ TInt r = SetName(&KSoundScPddName);
+ }
+
+ return r;
+ }
+
+void DDriverBeagleSoundScPddFactory::GetCaps(TDes8& /*aDes*/) const
+ {
+ }
+
+
+TInt DDriverBeagleSoundScPddFactory::Validate(TInt aUnit, const TDesC8* /*aInfo*/, const TVersion& aVer)
+ {
+ // Check that the version requested is less than or equal to the version of this PDD
+ if (!Kern::QueryVersionSupported(RSoundSc::VersionRequired(), aVer))
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::Validate KErrNotSup1");
+ return KErrNotSupported;
+ }
+
+ // Check the unit number specifies either playback or recording
+ if ((aUnit != KSoundScTxUnit0) && (aUnit != KSoundScRxUnit0))
+ {
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::Validate KErrNotSup2");
+ return KErrNotSupported;
+ }
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::Validate KErrNone");
+ return KErrNone;
+ }
+
+TInt DDriverBeagleSoundScPddFactory::Create(DBase*& aChannel, TInt aUnit, const TDesC8* /*aInfo*/, const TVersion& /*aVer*/)
+ {
+
+ DSoundScPdd* pD = NULL;
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::PDD create aUnit %d TxUnitId %d", aUnit, KSoundScTxUnit0);
+
+ // Assume failure
+ TInt r = KErrNoMemory;
+ aChannel = NULL;
+
+
+ DDriverBeagleSoundScPdd* pTxD = new DDriverBeagleSoundScPdd;
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::TxPdd %d", pTxD);
+
+ if (pTxD)
+ {
+ pD = pTxD;
+
+ // Save a pointer to the factory so that it is accessible by the PDD and call the PDD's
+ // second stage constructor
+ pTxD->iPhysicalDevice = this;
+
+ pTxD->iUnitType = aUnit; // Either KSoundScTxUnit0 or KSoundScRxUnit0 (play or record)
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::TxPdd2 %d", pTxD);
+
+ r = pTxD->DoCreate();
+
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::Create ret %d", r);
+
+ }
+
+ // If everything succeeded, save a pointer to the PDD. This should only be done if DoCreate() succeeded,
+ // as some LDDs have been known to access this pointer even if Create() returns an error!
+ if (r == KErrNone)
+ {
+ aChannel = pD;
+ BEAGLE_SOUND_DEBUG("DDriverBeagleSoundScPddFactory::TxPdd set AChannel %d", aChannel);
+ }
+ else
+ {
+ delete pD;
+ }
+
+ return r;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/soundsc/variant_sound.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 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:
+*
+* Description:
+*
+*/
+
+#ifndef __BEAGLEVARIANT_SOUND_H__
+#define __BEAGLEVARIANT_SOUND_H__
+
+#include "shared_sound.h"
+
+class DDriverBeagleSoundScPddFactory : public DPhysicalDevice
+ {
+public:
+
+ DDriverBeagleSoundScPddFactory();
+ TInt Install();
+ void GetCaps(TDes8 &aDes) const;
+ TInt Create(DBase*& aChannel, TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+ TInt Validate(TInt aUnit, const TDesC8* anInfo, const TVersion &aVer);
+
+public:
+
+ /** The DFC queue to be used by both the LDD and the PDD to serialise access to the PDD */
+ TDfcQue* iDfcQ;
+
+ };
+
+#endif
--- a/omap3530/beagle_drivers/usbv/usbv.mmp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagle_drivers/usbv/usbv.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -23,6 +23,7 @@
noexportlibrary
systeminclude +/include/drivers
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
sourcepath .
source usbv.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/hal/cyashalbeagleboard.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1306 @@
+// Copyright (c) 1994-2009 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:
+//
+// Description:
+// omap3530/beagle_drivers/wb/cyashalbeagleboard_spi.cpp
+//
+
+#include <kern_priv.h>
+#include <beagle/beagle_gpio.h>
+#include <beagle/variant.h>
+#include <assp/omap3530_assp/omap3530_assp_priv.h>
+#include <assp/omap3530_assp/omap3530_irqmap.h> // GPIO interrupts
+#include <assp/omap3530_assp/omap3530_gpio.h>
+
+#include <assp.h> // Required for definition of TIsr
+
+#include <cyasregs.h> // Astoria register definitions
+
+#ifdef __CY_ASTORIA_BEAGLEBOARD_SPI__HAL__
+
+#include "cyashalbeagleboard_spi.h"
+#include "cyaserr.h"
+#include "cyasregs.h"
+#include "cyasdma.h"
+#include "cyasintr.h"
+#ifdef FIRMWARE_NOPPORT
+
+#ifdef OVERCLOCK_SD
+#include "cyastfw_sd_mmc_rel_nopport_Ast121_68.h"
+#else
+#include "cyastfw_sd_mmc_rel_nopport.h"
+#endif
+
+#else
+
+#ifdef OVERCLOCK_SD
+#include "cyastfw_sd_mmc_rel_silicon_Ast121_68.h"
+#else
+#include "cyastfw_sd_mmc_rel_silicon.h"
+#endif
+
+#endif
+
+#include "cyasusbinit.h"
+
+/*
+ * For performance reasons, we handle storage endpoint transfers upto 4 KB
+ * within the HAL itself.
+ */
+#define CYASSTORAGE_WRITE_EP_NUM (4)
+#define CYASSTORAGE_READ_EP_NUM (8)
+#define CYASSTORAGE_MAX_XFER_SIZE (2*32768)
+
+/*#define MONITOR_THREAD 1*/
+#define INT_DE 1
+
+/* DFC queue */
+TDfc* gpDfc;
+
+/*
+ * The type of DMA operation, per endpoint
+ */
+typedef enum CyAsHalDmaType
+{
+ CyAsHalRead,
+ CyAsHalWrite,
+ CyAsHalNone
+} CyAsHalDmaType ;
+
+typedef struct CyAsHalEndpointDma
+{
+ CyBool buffer_valid ;
+ uint16_t *data_p ;
+ uint32_t size ;
+ /*struct scatterlist* sg_p ;
+ uint16_t scatter_index ;*/
+ uint32_t bytes_xfered ;
+ uint16_t transfer_cnt ;
+ CyAsHalDmaType type ;
+ CyBool pending ;
+} CyAsHalEndpointDma ;
+
+/*
+ * The list of OMAP devices (should be one)
+ */
+static CyAsOmapDevKernel *m_omap_list_p = 0 ;
+
+/*
+ * The callback to call after DMA operations are complete
+ */
+static CyAsHalDmaCompleteCallback callback = 0 ;
+
+/*
+ * Pending data size for the endpoints
+ */
+static CyAsHalEndpointDma EndPoints[16] ;
+
+/* Forward declaration */
+static void CyHandleDRQInterrupt(CyAsOmapDevKernel *dev_p) ;
+
+static volatile uint32_t Intr_Disabled = 0 ;
+static volatile CyAsHalDeviceTag gDevTag = 0 ;
+
+#define CYAS_INT_MASK (CY_AS_MEM_P0_INTR_REG_MCUINT | CY_AS_MEM_P0_INTR_REG_MBINT | \
+ CY_AS_MEM_P0_INTR_REG_PMINT | CY_AS_MEM_P0_INTR_REG_PLLLOCKINT)
+#define CYAS_DRQ_MASK (CY_AS_MEM_P0_INTR_REG_DRQINT)
+
+
+static void
+CyAstoriaISR (
+ void *dev_id)
+{
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyAstoriaISR...");
+#endif
+ gpDfc->Add();
+
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("Disable interrupt");
+#endif
+ /* Disable Interrupt Here, it will be re-enabled by DFCs */
+ GPIO::DisableInterrupt(KGPIO_INT) ;
+}
+
+static void
+CyAstoriaIntHandler_DFC (
+ TAny *aPtr)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)aPtr ;
+ uint16_t read_val = 0 ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyAstoriaIntHandler called...");
+#endif
+ {
+ read_val = CyAsHalReadRegister((CyAsHalDeviceTag)dev_p, CY_AS_MEM_P0_INTR_REG) ;
+ if (read_val & CYAS_INT_MASK)
+ {
+ CyAsIntrServiceInterrupt((CyAsHalDeviceTag)dev_p) ;
+ }
+
+ if (read_val & CYAS_DRQ_MASK)
+ {
+ CyHandleDRQInterrupt(dev_p) ;
+ }
+ }
+ GPIO::EnableInterrupt(KGPIO_INT) ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("Enable interrupt\n");
+#endif
+}
+
+extern TmtpAstDev * g_pAstDevice ;
+
+static int
+CyAsHalConfigureInterrupts (
+ void *dev_p,
+ void *handler)
+{
+
+ return CyAsHalBeagleBoard__SetupISR(handler, dev_p) ;
+}
+//nxz-debug
+void
+MyOmapStartIntr(CyAsHalDeviceTag tag)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag ;
+ int ret ;
+
+ const uint16_t mask = CY_AS_MEM_P0_INTR_REG_DRQINT | CY_AS_MEM_P0_INTR_REG_MBINT ;
+
+ /* Setup DFC */
+ gpDfc = new TDfc( CyAstoriaIntHandler_DFC, tag, Kern::DfcQue0(), 1 ) ;
+
+ /* Register for interrupts */
+ ret = CyAsHalConfigureInterrupts (dev_p,(void*)CyAstoriaISR) ;
+ if ( ret != 0 )
+ Kern::Printf("ERROR: CyAsHalConfigureInterrupts failed\n");
+
+ /* enable only MBox & DRQ interrupts for now */
+ CyAsHalWriteRegister((CyAsHalDeviceTag)dev_p, CY_AS_MEM_P0_INT_MASK_REG, mask) ;
+}
+
+volatile CyBool interrupt_fired = CyFalse;
+
+//This is the Diagnostics Interrupt Handler
+void
+MyIntTestHandler(
+ void *dev_id)
+{
+ CyAsOmapDevKernel * dev_tag = (CyAsOmapDevKernel*) dev_id ;
+
+ Kern::Printf("Diag: CyAsDiagIntHandler called\n");
+
+ if(interrupt_fired == CyFalse)
+ {
+ Kern::Printf("Diag: CyAsDiagIntHandler, first instance of INT# \n");
+ interrupt_fired = CyTrue;
+
+ //return INT to high state, only called for override testing
+ CyAsHalWriteRegister(dev_tag, CY_AS_MEM_P0_VM_SET, 0x0745);
+ }
+ //return INT to high state, only called for override testing
+ CyAsHalWriteRegister(dev_tag, CY_AS_MEM_P0_VM_SET, 0x0745);
+
+}
+
+
+
+/*
+* These are the functions that are not part of the HAL layer, but are required to be called
+* for this HAL.
+*/
+int StartOMAPKernel(const char *pgm, CyAsHalDeviceTag *tag, CyBool debug)
+{
+ CyAsOmapDevKernel *dev_p ;
+ CyAsHalSleepChannel channel ;
+ int i;
+
+ (void)debug ; /* No debug mode support as of now */
+
+ Kern::Printf ("<1>startOMAPKernel called\n");
+
+ /*
+ * Initialize the HAL level endpoint DMA data.
+ */
+ for(i = 0 ; i < sizeof(EndPoints)/sizeof(EndPoints[0]) ; i++)
+ {
+ EndPoints[i].data_p = 0 ;
+ EndPoints[i].pending = CyFalse ;
+ EndPoints[i].size = 0 ;
+ EndPoints[i].type = CyAsHalNone ;
+ EndPoints[i].bytes_xfered = 0 ;
+ EndPoints[i].transfer_cnt = 0 ;
+ }
+
+ dev_p = (CyAsOmapDevKernel *)CyAsHalAlloc(sizeof(CyAsOmapDevKernel)) ;
+ if (dev_p == 0)
+ {
+ Kern::Printf("<1>%s: out of memory allocating OMAP device structure\n", pgm) ;
+ return 0 ;
+ }
+ dev_p->m_sig = CY_AS_OMAP_KERNEL_HAL_SIG ;
+ dev_p->m_addr_base = 0 ;
+
+ CyAsHalBeagleBoard__ConfigureSPI();
+
+#ifdef HW_TEST
+{
+ uint16_t readVal = 0 ;
+ uint16_t timeOutCounter = 0 ;
+ uint16_t errCnt = 0 ;
+
+ Kern::Printf( "<1> Regsiter Test ------------->\n") ;
+
+ readVal = CyAsHalReadRegister(dev_p, CY_AS_MEM_CM_WB_CFG_ID) ;
+ Kern::Printf("ID reg 0x%04x\n",readVal);
+ if ( readVal != 0xa200 )
+ {
+ Kern::Printf("ERROR: Wrong Antioch ID reg value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0xa200);
+ Kern::Printf("ERROR: Act: 0x%04x\n",readVal);
+ errCnt++;
+ }
+
+ readVal = CyAsHalReadRegister(dev_p, CY_AS_MEM_P0_VM_SET) ;
+ Kern::Printf("P0_VM_SET 0x%04x\n",readVal);
+ if ( readVal != 0x45 )
+ {
+ Kern::Printf("ERROR: Wrong Antioch P0_VM_SET reg value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0x45);
+ Kern::Printf("ERROR: Act: 0x%04x\n",readVal);
+ errCnt++;
+ }
+
+ readVal = CyAsHalReadRegister(dev_p, CY_AS_MEM_P0_RSE_ALLOCATE) ;
+ Kern::Printf("P0_RSE_ALLOCATE 0x%04x\n",readVal);
+ if ( readVal != 0x26 )
+ {
+ Kern::Printf("ERROR: Wrong Antioch P0_RSE_ALLOCATE reg value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0x26);
+ Kern::Printf("ERROR: Act: 0x%04x\n",readVal);
+ errCnt++;
+ }
+
+ CyAsHalWriteRegister(dev_p, CY_AS_MEM_MCU_MAILBOX0, 0x0);
+ CyAsHalWriteRegister(dev_p, CY_AS_MEM_MCU_MAILBOX1, 0xFFFF);
+ CyAsHalWriteRegister(dev_p, CY_AS_MEM_MCU_MAILBOX2, 0xAAAA);
+ CyAsHalWriteRegister(dev_p, CY_AS_MEM_MCU_MAILBOX3, 0x5555);
+
+ readVal = CyAsHalReadRegister(dev_p, CY_AS_MEM_MCU_MAILBOX0) ;
+ Kern::Printf("mailbox0 0x%04x\n",readVal);
+ if ( readVal != 0x0 )
+ {
+ Kern::Printf("ERROR: Wrong Antioch MAILBOX0 reg value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0x0);
+ Kern::Printf("ERROR: Act: 0x%04x\n",readVal);
+ errCnt++;
+ }
+
+ readVal = CyAsHalReadRegister(dev_p, CY_AS_MEM_MCU_MAILBOX1) ;
+ Kern::Printf("mailbox1 0x%04x\n",readVal);
+ if ( readVal != 0xffff )
+ {
+ Kern::Printf("ERROR: Wrong Antioch MAILBOX1 reg value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0xffff);
+ Kern::Printf("ERROR: Act: 0x%04x\n",readVal);
+ errCnt++;
+ }
+
+ readVal = CyAsHalReadRegister(dev_p, CY_AS_MEM_MCU_MAILBOX2) ;
+ Kern::Printf("mailbox2 0x%04x\n",readVal);
+ if ( readVal != 0xaaaa )
+ {
+ Kern::Printf("ERROR: Wrong Antioch MAILBOX2 reg value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0xaaaa);
+ Kern::Printf("ERROR: Act: 0x%04x\n",readVal);
+ errCnt++;
+ }
+
+ readVal = CyAsHalReadRegister(dev_p, CY_AS_MEM_MCU_MAILBOX3) ;
+ Kern::Printf("mailbox3 0x%04x\n",readVal);
+ if ( readVal != 0x5555 )
+ {
+ Kern::Printf("ERROR: Wrong Antioch MAILBOX3 reg value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0x5555);
+ Kern::Printf("ERROR: Act: 0x%04x\n",readVal);
+ errCnt++;
+ }
+
+ Kern::Printf( "<1> Interrupt Test ------------->\n") ;
+ Kern::Printf("Checking that INT# can execute Procesor ISR:\n");
+
+ CyAsHalConfigureInterrupts (dev_p,(void*)MyIntTestHandler) ;
+
+ //overrid default INT# value, cause Astoria to assert INT#
+ CyAsHalWriteRegister(dev_p, CY_AS_MEM_P0_VM_SET, 0x0545);
+
+ do {
+ timeOutCounter++;
+ }while((interrupt_fired == CyFalse) && (timeOutCounter < 255));
+
+ if(interrupt_fired == CyTrue)
+ {
+ Kern::Printf("INT# fired Processor ISR\n");
+ }
+ else
+ {
+ Kern::Printf("ERROR: INT# did not fire processor ISR %i\n", interrupt_fired);
+ errCnt++;
+ }
+
+ if ( errCnt == 0 )
+ {
+ Kern::Printf("HW test passed!!\n") ;
+ }
+ else
+ Kern::Printf("HW test failed (%d)\n",errCnt) ;
+
+ Kern::Printf("Reset Astoria\n") ;
+ CyAsHalWriteRegister(dev_p, CY_AS_MEM_RST_CTRL_REG, CY_AS_MEM_RST_CTRL_REG_HARD) ;
+ return 0 ;
+}
+#endif
+
+ /*
+ * Now perform a hard reset of the device to have the new settings take
+ * effect
+ */
+ Kern::Printf("<1>West Bridge Device Enters hard reset\n") ;
+ CyAsHalWriteRegister(dev_p, CY_AS_MEM_RST_CTRL_REG, CY_AS_MEM_RST_CTRL_REG_HARD) ;
+
+ /*
+ * Sleep for 100 ms to be sure reset is complete.
+ */
+ Kern::Printf("<1>Sleep 100ms\n") ;
+ CyAsHalCreateSleepChannel (&channel) ;
+ CyAsHalSleepOn(&channel, 100) ;
+ CyAsHalDestroySleepChannel(&channel) ;
+ Kern::Printf("<1>MyOmapStartIntr\n") ;
+ MyOmapStartIntr(dev_p);
+
+ dev_p->m_next_p = m_omap_list_p ;
+ m_omap_list_p = dev_p ;
+
+ *tag = dev_p ;
+ gDevTag = dev_p ;
+
+ return 1 ;
+}
+
+int StopOMAPKernel(const char *pgm, CyAsHalDeviceTag tag)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag ;
+
+ if (0 == dev_p)
+ return 1 ;
+
+ Kern::Printf ("<1>StopOMAPKernel called\n");
+ if (dev_p->m_sig != CY_AS_OMAP_KERNEL_HAL_SIG)
+ {
+ Kern::Printf("<1>%s: %s: bad TAG parameter passed to function\n", pgm, __FUNCTION__) ;
+ return 1 ;
+ }
+
+ Kern::Printf ("<1>West Bridge OMAP Kernel: Done cleaning thread\n") ;
+ /* TODO: */
+
+ CyAsHalFree(dev_p) ;
+
+ return 1 ;
+}
+
+
+/*************************************************************************************************
+*
+* Below are the functions that communicate with the West Bridge device. These are system dependent
+* and must be defined by the HAL layer for a given system.
+*
+*************************************************************************************************/
+
+void
+CyAsHalWriteEP(CyAsHalDeviceTag tag, uint16_t addr, uint8_t* data, uint16_t size)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag ;
+GPIO::DisableInterrupt(KGPIO_INT) ;
+
+ /* Do additional error checks while in debug mode. */
+ if (dev_p->m_sig != CY_AS_OMAP_KERNEL_HAL_SIG)
+ {
+ Kern::Printf("<1>%s: bad TAG parameter passed to function\n", __FUNCTION__) ;
+ return ;
+ }
+
+ if (addr & 0x80)
+ {
+ Kern::Printf ("<1>West Bridge write EP address 0x%x out of range\n", addr);
+ return ;
+ }
+
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteEP(addr, data, size) ;
+GPIO::EnableInterrupt(KGPIO_INT) ;
+ return ;
+}
+
+void
+CyAsHalReadEP(CyAsHalDeviceTag tag, uint16_t addr, uint8_t* data, uint16_t size)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag ;
+GPIO::DisableInterrupt(KGPIO_INT) ;
+
+ /* Do additional error checks while in debug mode. */
+ if (dev_p->m_sig != CY_AS_OMAP_KERNEL_HAL_SIG)
+ {
+ Kern::Printf("<1>%s: bad TAG parameter passed to function\n", __FUNCTION__) ;
+ return ;
+ }
+
+ if (addr & 0x80)
+ {
+ Kern::Printf ("<1>West Bridge write EP address 0x%x out of range\n", addr);
+ return ;
+ }
+
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadEP(addr, data, size) ;
+GPIO::EnableInterrupt(KGPIO_INT) ;
+ return ;
+}
+
+/*
+* This function must be defined to write a register within the West Bridge
+* device. The addr value is the address of the register to write with
+* respect to the base address of the West Bridge device.
+*/
+void
+CyAsHalWriteRegister(CyAsHalDeviceTag tag, uint16_t addr, uint16_t data)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag ;
+GPIO::DisableInterrupt(KGPIO_INT) ;
+
+ /* Do additional error checks while in debug mode. */
+ if (dev_p->m_sig != CY_AS_OMAP_KERNEL_HAL_SIG)
+ {
+ Kern::Printf("<1>%s: bad TAG parameter passed to function\n", __FUNCTION__) ;
+ return ;
+ }
+
+ if (addr > CYAS_DEV_MAX_ADDR)
+ {
+ Kern::Printf ("<1>West Bridge write address 0x%x out of range\n", addr);
+ return ;
+ }
+
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg((TUint32) addr, (TUint16) data) ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyAsHalWriteRegister(0x%02x,0x%04x)\n",addr,data) ;
+#endif
+GPIO::EnableInterrupt(KGPIO_INT) ;
+ return ;
+
+}
+
+/*
+* This function must be defined to read a register from the West Bridge
+* device. The addr value is the address of the register to read with
+* respect to the base address of the West Bridge device.
+*/
+uint16_t
+CyAsHalReadRegister(CyAsHalDeviceTag tag, uint16_t addr)
+{
+ uint16_t data = 0 ;
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag ;
+GPIO::DisableInterrupt(KGPIO_INT) ;
+
+ if (dev_p->m_sig != CY_AS_OMAP_KERNEL_HAL_SIG)
+ {
+ Kern::Printf("<1>%s: bad TAG parameter passed to function\n", __FUNCTION__) ;
+ return 0 ;
+ }
+
+ if (addr > CYAS_DEV_MAX_ADDR)
+ {
+ Kern::Printf("<1>West Bridge read address 0x%x out of range\n", addr) ;
+ return 0 ;
+ }
+
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg((TUint32) addr, (TUint16*) &data) ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyAsHalReadRegister(0x%02x,0x%04x)\n",addr,data) ;
+#endif
+GPIO::EnableInterrupt(KGPIO_INT) ;
+ return data ;
+}
+
+static void
+CyServiceEPDmaReadRequest(CyAsOmapDevKernel *dev_p, uint8_t ep)
+{
+ CyAsHalDeviceTag tag = (CyAsHalDeviceTag)dev_p ;
+ uint16_t v ;
+ uint32_t size ;
+ uint16_t addr = CY_AS_MEM_P0_EP2_DMA_REG + ep - 2 ;
+ uint8_t *dptr = (uint8_t*)EndPoints[ep].data_p ;
+
+
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyServiceEPDmaReadRequest...");
+#endif
+ /* Read the amount of data available */
+ v = CyAsHalReadRegister(tag, addr) ;
+ size = v & CY_AS_MEM_P0_EPn_DMA_REG_COUNT_MASK ;
+
+ CyAsHalReadEP(tag, ep, dptr, size) ;
+
+ /*
+ * Now, reset the DMAVAL bit indicating that the data has been read
+ */
+
+ CyAsHalWriteRegister(tag, addr, 0) ;
+
+ EndPoints[ep].pending = CyFalse ;
+ EndPoints[ep].type = CyAsHalNone ;
+ EndPoints[ep].buffer_valid = CyFalse ;
+
+ if (callback)
+ callback(tag, ep, size, CY_AS_ERROR_SUCCESS) ;
+}
+
+static void
+CyServiceEPDmaWriteRequest(CyAsOmapDevKernel *dev_p, uint8_t ep)
+{
+ CyAsHalDeviceTag tag = (CyAsHalDeviceTag)dev_p ;
+ uint16_t addr = CY_AS_MEM_P0_EP2_DMA_REG + ep - 2 ;
+ uint8_t *dptr = (uint8_t *)EndPoints[ep].data_p ;
+ uint32_t size ;
+
+
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyServiceEPDmaWriteRequest...");
+#endif
+
+ if ( ep == CYASSTORAGE_WRITE_EP_NUM )
+ {
+ if ( EndPoints[ep].size == 0x180 )
+ {
+ size = 0x180 ;
+ }
+ else
+ size = 0x200 ;
+ }
+ else
+ size = EndPoints[ep].size ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("Service DMA write request EP%d, size=%d, ep.size=%d\n",ep,size,EndPoints[ep].size);
+#endif
+ #if 1
+ CyAsHalWriteEP(tag, ep, dptr, size) ;
+ #else
+ {
+ uint16_t v ;
+ int i ;
+ for(i = 0 ; i < size / 2 ; i++)
+ {
+ v = dptr[0] | (dptr[1] << 8) ;
+ CyAsHalWriteRegister(tag, ep, v) ;
+ dptr++ ;
+ dptr++ ;
+ }
+ }
+ #endif
+
+ /*
+ * Now, write the DMAVAL bit to indicate we are done transferring data and that the data
+ * can now be sent via USB to the USB host, sent to storage, or used internally.
+ */
+ CyAsHalWriteRegister(tag, addr, size) ;
+
+ /* We have sent the data, mark it as false */
+ EndPoints[ep].pending = CyFalse ;
+ EndPoints[ep].type = CyAsHalNone ;
+ EndPoints[ep].buffer_valid = CyFalse ;
+
+ /*
+ * Finally, tell the USB subsystem that the data is gone and we can accept the
+ * next request if one exists.
+ */
+ if (callback)
+ callback(tag, ep, size, CY_AS_ERROR_SUCCESS) ;
+}
+
+static void
+CyHandleDRQInterrupt(CyAsOmapDevKernel *dev_p)
+{
+ uint16_t v ;
+ static uint8_t service_ep = 2 ;
+ static CyBool indrq = CyFalse ;
+
+ /*Kern::Printf("<1>DRQ interrupt detected\n") ;*/
+ if (indrq)
+ {
+#ifndef NDEBUG
+
+ Kern::Printf("<1>+++++++++ Nested DRQ interrupt detected\n") ;
+ v = CyAsHalReadRegister((CyAsHalDeviceTag)dev_p, CY_AS_MEM_P0_INTR_REG) ;
+ Kern::Printf("<1>+++++++++ INTR_REG = %04x\n",v) ;
+ v = CyAsHalReadRegister((CyAsHalDeviceTag)dev_p, CY_AS_MEM_P0_DRQ) ;
+ Kern::Printf("<1>+++++++++ DRQ_REG = %04x\n",v) ;
+#endif
+ return ;
+ }
+
+ indrq = CyTrue ;
+
+ /*
+ * We have received a DMA interrupt
+ */
+ v = CyAsHalReadRegister((CyAsHalDeviceTag)dev_p, CY_AS_MEM_P0_DRQ) ;
+ if (v == 0)
+ {
+#ifndef NDEBUG
+ /*Stray DRQ is possible because we will check DRQ register before exit handler*/
+ Kern::Printf("<1>+++++++++ Stray DRQ interrupt detected\n") ;
+#endif
+ indrq = CyFalse;
+ return ;
+ }
+
+ /*
+ * Now, pick a given DMA request to handle, for now, we just go round robin. Each bit
+ * position in the service_mask represents an endpoint from EP2 to EP15. We rotate through
+ * each of the endpoints to find one that needs to be serviced.
+ */
+ while ((v & (1 << service_ep)) == 0)
+ {
+ if (service_ep == 15)
+ service_ep = 2 ;
+ else
+ service_ep++ ;
+ }
+
+ if ((v & (1 << service_ep)) == 0)
+ {
+ Kern::Printf("<1>+++++++++ Internal error, this should not happen\n") ;
+ indrq = CyFalse;
+ return ;
+ }
+
+ if (EndPoints[service_ep].type == CyAsHalWrite)
+ CyServiceEPDmaWriteRequest(dev_p, service_ep) ;
+ else if (EndPoints[service_ep].type == CyAsHalRead)
+ CyServiceEPDmaReadRequest(dev_p, service_ep) ;
+
+#ifndef NDEBUG
+ else
+ {
+ Kern::Printf("+++++++ Interrupt occurred, but there is no DMA operation pending - check DRQ_MASK logic\n") ;
+ }
+#endif
+
+ /* Now bump the EP ahead, so other endpoints get a shot before the one we just serviced */
+ if (EndPoints[service_ep].type == CyAsHalNone)
+ {
+ if (service_ep == 15)
+ service_ep = 2 ;
+ else
+ service_ep++ ;
+ }
+
+ indrq = CyFalse ;
+}
+
+void
+CyAsHalDmaCancelRequest(CyAsHalDeviceTag tag, uint8_t ep)
+{
+ if (EndPoints[ep].pending)
+ CyAsHalWriteRegister(tag, CY_AS_MEM_P0_EP2_DMA_REG + ep - 2, 0) ;
+
+ EndPoints[ep].buffer_valid = CyFalse ;
+}
+
+/*
+* This function must be defined to transfer a block of data to the West Bridge device. This
+* function can use the burst write (DMA) capabilities of West Bridge to do this, or it can
+* just copy the data using writes.
+*/
+void
+CyAsHalDmaSetupWrite(CyAsHalDeviceTag tag, uint8_t ep, void *buf, uint32_t size, uint16_t maxsize)
+{
+ uint32_t addr ;
+ uint16_t v ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyAsHalDmaSetupWrite (%d,%d)",size,maxsize);
+#endif
+ /* No EP0 or EP1 traffic should get here */
+ CyAsHalAssert(ep != 0 && ep != 1) ;
+
+ /*
+ * If this asserts, we have an ordering problem. Another DMA request is coming down
+ * before the previous one has completed.
+ */
+ CyAsHalAssert(EndPoints[ep].buffer_valid == CyFalse) ;
+
+ /*
+ * Store the data for the interrupt service routine
+ */
+ EndPoints[ep].buffer_valid = CyTrue ;
+ EndPoints[ep].data_p = (uint16_t*)buf ;
+ EndPoints[ep].size = size ;
+ EndPoints[ep].type = CyAsHalWrite ;
+
+ /*
+ * Tell West Bridge we are ready to send data on the given endpoint
+ */
+ {
+ addr = CY_AS_MEM_P0_EP2_DMA_REG + ep - 2 ;
+ v = (size & CY_AS_MEM_P0_EPn_DMA_REG_COUNT_MASK) | CY_AS_MEM_P0_EPn_DMA_REG_DMAVAL ;
+ }
+
+ CyAsHalWriteRegister(tag, addr, v) ;
+
+}
+
+/*
+* This function must be defined to transfer a block of data from the West Bridge device. This
+* function can use the burst read (DMA) capabilities of West Bridge to do this, or it can just
+* copy the data using reads.
+*/
+void
+CyAsHalDmaSetupRead(CyAsHalDeviceTag tag, uint8_t ep, void *buf, uint32_t size, uint16_t maxsize)
+{
+ uint32_t addr ;
+ uint16_t v ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("CyAsHalDmaSetupRead (%d,%d)",size,maxsize);
+#endif
+ /* No EP0 or EP1 traffic should get here */
+ CyAsHalAssert(ep != 0 && ep != 1) ;
+ CyAsHalAssert(EndPoints[ep].buffer_valid == CyFalse) ;
+
+ EndPoints[ep].buffer_valid = CyTrue ;
+ EndPoints[ep].data_p = (uint16_t*)buf ;
+ EndPoints[ep].size = size ;
+ EndPoints[ep].type = CyAsHalRead ;
+
+ /*
+ * Program the EP DMA register for Storage endpoints only.
+ */
+ if (ep == 2)
+ {
+ if (size == 1)
+ size = 2 ;
+
+ addr = CY_AS_MEM_P0_EP2_DMA_REG + ep - 2 ;
+ v = (size & CY_AS_MEM_P0_EPn_DMA_REG_COUNT_MASK) | CY_AS_MEM_P0_EPn_DMA_REG_DMAVAL;
+ CyAsHalWriteRegister(tag, addr, v );
+ }
+ else if (ep == CYASSTORAGE_READ_EP_NUM)
+ {
+ addr = CY_AS_MEM_P0_EP8_DMA_REG ;
+
+ /* This transfer is always done in 512 byte chunks. */
+ v = 0x200 | CY_AS_MEM_P0_EPn_DMA_REG_DMAVAL ;
+ CyAsHalWriteRegister(tag, addr, v) ;
+ }
+}
+
+/*
+* This function must be defined to allow the West Bridge API to register a callback function that is
+* called when a DMA transfer is complete.
+*/
+void
+CyAsHalDmaRegisterCallback(CyAsHalDeviceTag tag, CyAsHalDmaCompleteCallback cb)
+{
+ callback = cb ;
+}
+
+/*
+* This function must be defined to return the maximum size of DMA request that can be handled
+* on the given endpoint. The return value should be the maximum size in bytes that the DMA
+* module can handle.
+*/
+uint32_t
+CyAsHalDmaMaxRequestSize(CyAsHalDeviceTag tag, CyAsEndPointNumber_t ep)
+{
+ /* Storage reads and writes are always done in 512 byte blocks. So, we do the count
+ handling within the HAL, and save on some of the data transfer delay.
+ */
+ if ((ep == CYASSTORAGE_READ_EP_NUM) || (ep == CYASSTORAGE_WRITE_EP_NUM))
+ return CYASSTORAGE_MAX_XFER_SIZE;
+ else
+ /*
+ * For the USB - Processor endpoints, the maximum transfer size depends on
+ * the speed of USB operation. So, we use the following constant to
+ * indicate to the API that splitting of the data into chunks less than
+ * or equal to the max transfer size should be handled internally.
+ */
+ return CY_AS_DMA_MAX_SIZE_HW_SIZE;
+}
+
+/*
+ * This function must be defined to set the state of the WAKEUP pin on the West Bridge device. Generally
+ * this is done via a GPIO of some type.
+ */
+CyBool
+CyAsHalSetWakeupPin(CyAsHalDeviceTag tag, CyBool state)
+{
+ /* Not supported as of now. */
+ return CyFalse ;
+}
+
+void
+CyAsHalPllLockLossHandler(CyAsHalDeviceTag tag)
+{
+ Kern::Printf("Error: West Bridge PLL has lost lock\n") ;
+ Kern::Printf("Please check the input voltage levels and clock, and restart the system\n") ;
+}
+
+#define CYASHAL_REGISTERS_TO_SAVE_COUNT (12)
+static uint16_t gAstoriaRegCache[CYASHAL_REGISTERS_TO_SAVE_COUNT][2] = {
+ {CY_AS_MEM_P0_ENDIAN, 0x0000},
+ {CY_AS_MEM_PMU_UPDATE, 0x0000},
+ {CY_AS_MEM_P0_VM_SET, 0x0000},
+ {CY_AS_MEM_P0_INT_MASK_REG, 0x0000},
+ {CY_AS_MEM_P0_RSE_ALLOCATE, 0x0000},
+ {CY_AS_MEM_P0_RSE_MASK, 0x0000},
+ {CY_AS_MEM_P0_DRQ_MASK, 0x0000},
+ {CY_AS_MEM_IROS_SLB_DATARET, 0x0000},
+ {CY_AS_MEM_IROS_IO_CFG, 0x0000},
+ {CY_AS_MEM_IROS_PLL_CFG, 0x0000},
+ {CY_AS_MEM_IROS_PXB_DATARET, 0x0000},
+ {CY_AS_MEM_IROS_SLEEP_CFG, 0x0000}
+};
+
+void
+CyAsHalReadRegsBeforeStandby (
+ CyAsHalDeviceTag tag)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag;
+ int i, pos;
+
+ if (dev_p->m_sig != CY_AS_OMAP_KERNEL_HAL_SIG)
+ {
+ Kern::Printf("%s: bad TAG parameter passed to function\n", __FUNCTION__);
+ return;
+ }
+
+ {
+ for (i = 0; i < CYASHAL_REGISTERS_TO_SAVE_COUNT; i++)
+ {
+ gAstoriaRegCache[i][1] = CyAsHalReadRegister (tag, gAstoriaRegCache[i][0]);
+
+ /* Special handling required for the RSE_ALLOCATE register, so as to
+ ensure that the SD_IO pin ownership is set correctly.
+ */
+ if (gAstoriaRegCache[i][0] == CY_AS_MEM_P0_RSE_ALLOCATE)
+ {
+ /* For each of the 4 two bits fields in the register, set it to 'b01 if the
+ * resource is currently allocated to the P port, and 'b10 if it is currently
+ * allocated to Astoria.
+ */
+ for (pos = 0; pos < 8; pos+= 2)
+ {
+ if (((gAstoriaRegCache[i][1] >> pos) & 0x03) == 0x03)
+ gAstoriaRegCache[i][1] = (gAstoriaRegCache[i][1] & (0xFF ^ (0x03 << pos))) | (0x01 << pos);
+ else
+ gAstoriaRegCache[i][1] = (gAstoriaRegCache[i][1] & (0xFF ^ (0x03 << pos))) | (0x02 << pos);
+ }
+ }
+ }
+ }
+}
+
+void
+CyAsHalRestoreRegsAfterStandby (
+ CyAsHalDeviceTag tag)
+{
+ CyAsOmapDevKernel *dev_p = (CyAsOmapDevKernel *)tag;
+ int i;
+
+ if (dev_p->m_sig != CY_AS_OMAP_KERNEL_HAL_SIG)
+ {
+ Kern::Printf("%s: bad TAG parameter passed to function\n", __FUNCTION__);
+ return;
+ }
+
+ {
+ /* Write 0xFF into the mask register so that all fields can be updated.
+ The mask will get updated to its proper value later.
+ */
+ CyAsHalWriteRegister (tag, CY_AS_MEM_P0_RSE_MASK, 0xFF);
+ for (i = 0; i < CYASHAL_REGISTERS_TO_SAVE_COUNT; i++)
+ {
+ CyAsHalWriteRegister (tag, gAstoriaRegCache[i][0], gAstoriaRegCache[i][1]);
+ }
+ }
+}
+
+void
+CyAsHalInitDevRegisters(
+ CyAsHalDeviceTag tag,
+ CyBool is_standby_wakeup)
+{
+ (void)tag;
+ (void)is_standby_wakeup;
+ Kern::Printf("CyAsHalInitDevRegisters...");
+ return ;
+}
+
+
+void
+CyAsHalPrintMessage2(const char* msg)
+{
+ Kern::Printf("%s",msg);
+}
+
+/*************************************************************************************************
+*
+* Below are the functions that must be defined to provide the basic operating system services
+* required by the API.
+*
+*************************************************************************************************/
+
+/*
+ * This function is required by the API to allocate memory. This function is expected to work
+ * exactly like malloc().
+ */
+void *
+CyAsHalAlloc(uint32_t cnt)
+{
+ void *ret_p ;
+ /*ret_p = kmalloc(cnt, GFP_KERNEL) ;*/
+ ret_p = (void*) new TUint8[cnt];
+ return ret_p ;
+}
+
+/*
+ * This function is required by the API to free memory allocated with CyAsHalAlloc(). This function is
+ * expected to work exacly like free().
+ */
+void
+CyAsHalFree(void *mem_p)
+{
+ delete [] (mem_p) ;
+}
+
+/*
+ * Allocator that can be used in interrupt context. We have to ensure that the kmalloc
+ * call does not sleep in this case.
+ */
+void *
+CyAsHalCBAlloc(uint32_t cnt)
+{
+ void *ret_p ;
+
+ /* TODO:
+ ret_p = kmalloc(cnt, GFP_ATOMIC) ;*/
+ ret_p = (void*) new TUint8[cnt];
+ return ret_p ;
+}
+
+/*
+ * This function is required to set a block of memory to a specific value. This function is
+ * expected to work exactly like memset()
+ */
+void
+CyAsHalMemSet(void *ptr, uint8_t value, uint32_t cnt)
+{
+ /*uint32_t i ;
+ uint8_t* b = (uint8_t*) ptr ;
+ for ( i = 0 ; i < cnt ; i++ )
+ *b = value ;
+ TODO: */
+ memset(ptr, value, cnt) ;
+}
+
+
+/*
+ * This function is expected to create a sleep channel. The data structure that represents the
+ * sleep channel is given by the pointer in the argument.
+ */
+CyBool
+CyAsHalCreateSleepChannel(CyAsHalSleepChannel *channel)
+{
+ /* TODO:
+ init_waitqueue_head(&channel->wq) ;
+ return CyTrue ;*/
+ if (channel)
+ channel->wq = 0 ;
+ return CyTrue ;
+}
+
+/*
+ * This function is expected to destroy a sleep channel. The data structure that represents the
+ * sleep channel is given by the pointer in the argument.
+ */
+CyBool
+CyAsHalDestroySleepChannel(CyAsHalSleepChannel *channel)
+{
+ /* TODO:
+ return CyTrue ;*/
+ channel->wq =1 ;
+ return CyTrue ;
+}
+
+CyBool
+CyAsHalSleepOn(CyAsHalSleepChannel *channel, uint32_t ms)
+{
+ /* TODO:
+ interruptible_sleep_on_timeout (&channel->wq, (ms * HZ/1000)) ;
+ return CyTrue ;*/
+
+ NKern::Sleep(ms);
+ return CyTrue;
+}
+
+CyBool
+CyAsHalWake(CyAsHalSleepChannel *channel)
+{
+
+ /* TODO:
+ wake_up (&channel->wq) ;
+ return CyTrue ;*/
+ channel->wq = 1 ;
+ return CyTrue ;
+
+}
+
+uint32_t
+CyAsHalDisableInterrupts()
+{
+ uint16_t v = CyAsHalReadRegister(gDevTag,CY_AS_MEM_P0_INT_MASK_REG);
+ if ( !Intr_Disabled )
+ {
+ CyAsHalWriteRegister(gDevTag,CY_AS_MEM_P0_INT_MASK_REG,0);
+ }
+ Intr_Disabled++ ;
+ return (uint32_t)v ;
+}
+
+void
+CyAsHalEnableInterrupts(uint32_t val)
+{
+ Intr_Disabled-- ;
+ if ( !Intr_Disabled )
+ {
+ val = CYAS_INT_MASK | CYAS_DRQ_MASK ;
+ CyAsHalWriteRegister(gDevTag,CY_AS_MEM_P0_INT_MASK_REG,(uint16_t)val);
+ /*CyAsHalWriteRegister(gDevTag,CY_AS_MEM_P0_INT_MASK_REG,0x1800);*/
+ }
+}
+
+void
+CyAsHalSleep150 (void) /* Sleep atleast 150ns */
+{
+ uint32_t i, j;
+
+ j = 0;
+ for (i = 0; i < 100; i++)
+ j += (~i);
+}
+
+int j = 0;
+void
+CyAsHalSleep(uint32_t ms)
+{
+ int i;
+
+ while (ms--)
+ {
+ i = 60000;
+ while (i--)
+ {
+ j += ((i * ~i) + 3 * i + 79);
+ }
+ }
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+int gInitComplete = 0 ;
+
+/*
+ * This callback function is called for events from the MISC module. The primary event
+ * processed by this function is the CyAsEventMiscInitialized which is sent once the
+ * West Bridge device is initialized and ready to accept requests.
+ */
+static void
+CyMiscCallback(CyAsDeviceHandle h, CyAsMiscEventType evtype, void *evdata)
+{
+ (void)h ;
+ (void)evdata ;
+
+ switch(evtype)
+ {
+ case CyAsEventMiscInitialized:
+ Kern::Printf("Firmware initialized");
+ gInitComplete = CyTrue ;
+ break ;
+ default:
+ break ;
+ }
+}
+
+int
+CyAsHalAstoriaInit(void)
+{
+ uint32_t ret = 0 ;
+ char* pgm = "Beagleboard HAL";
+ CyAsDeviceHandle dev_handle ;
+ CyAsDeviceConfig config ;
+ CyAsHalDeviceTag tag ;
+
+ if (!StartOMAPKernel(pgm, &tag, CyFalse))
+ {
+#ifndef HW_TEST
+ Kern::Printf("ERROR: Cannot start OMAPKernel\n") ;
+#endif
+ return 1 ;
+ }
+
+ /*
+ * Create a handle to a West Bridge device. It tag is used to identifiy the specific hardware
+ * we are talking to.
+ */
+ Kern::Printf("** Create API device\n") ;
+ ret = CyAsMiscCreateDevice(&dev_handle, tag) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("%s: cannot initailize the West Bridge API - code %d\n", pgm, ret) ;
+ return 1 ;
+ }
+ Kern::Printf("** API device created\n") ;
+
+ /*
+ * Configure the physical bus so we can talk to the West Bridge device. This is the first required
+ * API call after creating a device.
+ */
+ Kern::Printf("** API device configuring...\n");
+ memset(&config, 0, sizeof(config)) ;
+ ret = CyAsMiscConfigureDevice(dev_handle, &config) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("%s: cannot configure the West Bridge device - code %d\n", pgm, ret) ;
+ return 1 ;
+ }
+ Kern::Printf("** API device configured\n") ;
+
+ /*
+ * Register a callback to process events from the MISC module.
+ */
+ Kern::Printf("** Register Callback...\n") ;
+ ret = CyAsMiscRegisterCallback(dev_handle, CyMiscCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("%s: cannot configure the West Bridge device - code %d\n", pgm, ret) ;
+ return 1 ;
+ }
+ Kern::Printf("** Register Callback done\n") ;
+ /*
+ * Download the firmware to the device. Until the firmware has been downloaded, the West Bridge
+ * device cannot response to requests from the P port processor.
+ */
+ Kern::Printf("** Download firmware...\n") ;
+#ifdef FIRMWARE_NOPPORT
+
+#ifdef OVERCLOCK_SD
+ ret = CyAsMiscDownloadFirmware(dev_handle, CyAnFirmware.fw_image,
+ (uint16_t)CYANFW_SIZE, 0, 0) ;
+#else
+ ret = CyAsMiscDownloadFirmware(dev_handle, cyastfw_sd_mmc_rel_nopport_array.fw_image,
+ (uint16_t)CYASTFW_SD_MMC_REL_NOPPORT_SIZE, 0, 0) ;
+#endif
+
+#else
+
+#ifdef OVERCLOCK_SD
+ ret = CyAsMiscDownloadFirmware(dev_handle, CyAnFirmware.fw_image,
+ (uint16_t)CYANFW_SIZE, 0, 0) ;
+#else
+ ret = CyAsMiscDownloadFirmware(dev_handle, cyastfw_sd_mmc_rel_silicon_array.fw_image,
+ (uint16_t)CYASTFW_SD_MMC_REL_SILICON_SIZE, 0, 0) ;
+#endif
+
+#endif
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("%s: cannot download the antioch firmware - code %d\n", pgm, ret) ;
+ return 1 ;
+ }
+ Kern::Printf("** API device loaded firmware\n") ;
+
+ /*
+ * Note, if a firmware image is not provided, the firmware can still be loaded if the West Bridge device
+ * is in DEBUG mode. In debug mode, the firmware can be loaded via USB. In general however, the firmware
+ * should be loaded via the P Port and therefore a firmware file name should be provided.
+ */
+
+ /*
+ * Wait for the initialization event telling me that the firmware
+ * has completed initialization and is ready to go. The sleep of 100 ms
+ * is used to insure that we do not burn too many CPU cycles while waiting on
+ * the firmware initialization to finish.
+ */
+#ifndef FIRMWARE_NOPPORT
+ while (!gInitComplete)
+ {
+ NKern::Sleep(1000);
+ }
+
+ Kern::Printf("Firmware donwloaded successfully!!") ;
+#if 0
+#ifdef STORAGE_TEST
+ ret = CyAsSymbianStorageTest("Symbian WB Test",dev_handle, tag);
+ if ( !ret )
+ {
+ Kern::Printf("%s: CyAsSymbianStorageTest failed - code %d\n", pgm, ret) ;
+ return 1 ;
+ }
+ Kern::Printf("** CyAsSymbianStorageTest done\n") ;
+#else
+ ret = CyAsAPIUsbInit("Symbian WB Test",dev_handle, tag);
+ if ( !ret )
+ {
+ Kern::Printf("%s: CyAsAPIUsbInit failed - code %d\n", pgm, ret) ;
+ return 1 ;
+ }
+ Kern::Printf("** CyAsAPIUsbInit done\n") ;
+#endif
+#endif
+
+#endif
+
+ ret = CyAsAPIGetHandle(dev_handle, tag);
+ Kern::Printf("** CyAsAPIGetHandle done\n") ;
+
+ return 0 ;
+}
+
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+#else
+/*
+* Some compilers do not like empty C files, so if the OMAP hal is not being
+* compiled, we compile this single function. We do this so that for a given target
+* HAL there are not multiple sources for the HAL functions.
+*/
+void MyOMAPKernelHalDummyFunction(
+ void)
+{
+}
+
+#endif
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/hal/cyashalbeagleboard.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,347 @@
+/* Cypress West Bridge HAL for beagleboard SPI Symbian header file (cyashalbeagleboard_spi.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+/*
+ * This file contains the defintion of the hardware abstraction layer on beagleboard
+ * talking to the West Bridge device through SPI interface
+ */
+
+
+#ifndef _INCLUDED_CYASHALBEAGLEBOARD_H_
+#define _INCLUDED_CYASHALBEAGLEBOARD_H_
+
+typedef struct CyAsHalSleepChannel_t {
+ /* TODO:
+ wait_queue_head_t wq ;*/
+ int wq ;
+} CyAsHalSleepChannel ;
+typedef CyAsHalSleepChannel CyAnHalSleepChannel;
+
+#include "cyastypes.h"
+#include "cyas_cplus_start.h"
+
+typedef enum CyAsHalInterfaceMode
+{
+ CyAsHalCRAMMode = 0,
+ CyAsHalSRAMMode = 1,
+ CyAsHalADMMode = 2,
+ CyAsHalPNANDLBD8Mode = 3,
+ CyAsHalPNANDLBD16Mode = 4,
+ CyAsHalPNANDSBD8Mode = 5,
+ CyAsHalPNANDSBD16Mode = 6,
+ CyAsHalSPIMode = 7,
+ CyAsHalLNAMode = 8,
+ CyAsHalUnknownMode = 9
+} CyAsHalInterfaceMode;
+
+/*************************************************************************************************
+ *
+ * Below are the data structures that must be defined by the HAL layer
+ *
+ *************************************************************************************************/
+
+/*
+ * The HAL layer must define a TAG for identifying a specific West Bridge device in the system.
+ * In this case the tag is a void * which is really an OMAP device pointer
+ */
+typedef void * CyAsHalDeviceTag ;
+typedef CyAsHalDeviceTag CyAnHalDeviceTag;
+
+/* This must be included after the CyAsHalDeviceTag type is defined */
+#include "cyashalcb.h"
+
+/*************************************************************************************************
+ *
+ * Below are the functions that communicate with the West Bridge device. These are system dependent
+ * and must be defined by the HAL layer for a given system.
+ *
+ *************************************************************************************************/
+
+/*
+ * This function must be defined to write a register within the West Bridge
+ * device. The addr value is the address of the register to write with
+ * respect to the base address of the West Bridge device.
+ */
+extern void
+CyAsHalWriteRegister(CyAsHalDeviceTag tag, uint16_t addr, uint16_t data) ;
+#define CyAnHalWriteRegister(tag, addr, data) CyAsHalWriteRegister((CyAsHalDeviceTag)(tag), (addr), (data))
+
+/*
+ * This function must be defined to read a register from the West Bridge
+ * device. The addr value is the address of the register to read with
+ * respect to the base address of the West Bridge device.
+ */
+uint16_t
+CyAsHalReadRegister(CyAsHalDeviceTag tag, uint16_t addr) ;
+#define CyAnHalReadRegister(tag, addr) CyAsHalReadRegister((CyAsHalDeviceTag)(tag), (addr))
+
+/*
+ * This function must be defined to transfer a block of data to the West Bridge device. This
+ * function can use the burst write (DMA) capabilities of West Bridge to do this, or it can
+ * just copy the data using writes.
+ */
+extern void
+CyAsHalDmaSetupWrite(CyAsHalDeviceTag tag, uint8_t ep, void *buf, uint32_t size, uint16_t maxsize) ;
+#define CyAnHalDmaSetupWrite(tag, ep, buf, sz, max) \
+ CyAsHalDmaSetupWrite((CyAsHalDeviceTag)(tag), (ep), (buf), (sz), (max))
+
+/*
+ * This function must be defined to transfer a block of data from the West Bridge device. This
+ * function can use the burst read (DMA) capabilities of West Bridge to do this, or it can just
+ * copy the data using reads.
+ */
+extern void
+CyAsHalDmaSetupRead(CyAsHalDeviceTag tag, uint8_t ep, void *buf, uint32_t size, uint16_t maxsize) ;
+#define CyAnHalDmaSetupRead(tag, ep, buf, sz, max) \
+ CyAsHalDmaSetupRead((CyAsHalDeviceTag)(tag), (ep), (buf), (sz), (max))
+
+/*
+ * This function must be defined to cancel any pending DMA request.
+ */
+extern void
+CyAsHalDmaCancelRequest(CyAsHalDeviceTag tag, uint8_t ep) ;
+#define CyAnHalDmaCancelRequest(tag, ep) CyAsHalDmaCancelRequest((CyAsHalDeviceTag)(tag), (ep))
+
+/*
+ * This function must be defined to allow the West Bridge API to register a callback function that is
+ * called when a DMA transfer is complete.
+ */
+extern void
+CyAsHalDmaRegisterCallback(CyAsHalDeviceTag tag, CyAsHalDmaCompleteCallback cb) ;
+#define CyAnHalDmaRegisterCallback(tag, cb) \
+ CyAsHalDmaRegisterCallback((CyAsHalDeviceTag)(tag), (CyAsHalDmaRegisterCallback)(cb))
+
+/*
+ * This function must be defined to return the maximum size of DMA request that can be handled
+ * on the given endpoint. The return value should be the maximum size in bytes that the DMA
+ * module can handle.
+ */
+extern uint32_t
+CyAsHalDmaMaxRequestSize(CyAsHalDeviceTag tag, CyAsEndPointNumber_t ep) ;
+#define CyAnHalDmaMaxRequestSize(tag, ep) \
+ CyAsHalDmaMaxRequestSize((CyAsHalDeviceTag)(tag), (CyAsEndPointNumber_t)(ep))
+
+/*
+ * This function must be defined to set the state of the WAKEUP pin on the West Bridge device. Generally
+ * this is done via a GPIO of some type.
+ */
+extern CyBool
+CyAsHalSetWakeupPin(CyAsHalDeviceTag tag, CyBool state) ;
+#define CyAnHalSetWakeupPin(tag, state) CyAsHalSetWakeupPin((CyAsHalDeviceTag)(tag), (state))
+
+/*
+ * This function is called when the West Bridge PLL loses lock, because
+ * of a problem in the supply voltage or the input clock.
+ */
+extern void
+CyAsHalPllLockLossHandler(CyAsHalDeviceTag tag) ;
+#define CyAnHalPllLockLossHandler(tag) CyAsHalPllLockLossHandler((CyAsHalDeviceTag)(tag))
+
+/*
+ * Function to re-synchronise connection between Processor and West Bridge.
+ * This is a no-operation for this HAL.
+ */
+extern CyBool
+CyAsHalSyncDeviceClocks(CyAsHalDeviceTag tag) ;
+#define CyAsHalSyncDeviceClocks(tag) (CyTrue)
+
+/*
+ * Function to re-initialize West Bridge register when waking up from standby.
+ * This is a no-operation for this HAL.
+ */
+extern void
+CyAsHalInitDevRegisters(CyAsHalDeviceTag tag, CyBool is_standby_wakeup ) ;
+
+
+/*
+ * Function to read and save register values before Astoria is put into standby mode.
+ */
+extern void
+CyAsHalReadRegsBeforeStandby (
+ CyAsHalDeviceTag tag) ;
+
+/*
+ * Function to restore original values to registers after Astoria wakes up from standby mode.
+ */
+extern void
+CyAsHalRestoreRegsAfterStandby (
+ CyAsHalDeviceTag tag) ;
+
+/*************************************************************************************************
+ *
+ * Below are the functions that must be defined to provide the basic operating system services
+ * required by the API.
+ *
+ *************************************************************************************************/
+
+/*
+ * This function is required by the API to allocate memory. This function is expected to work
+ * exactly like malloc().
+ */
+void *
+CyAsHalAlloc(uint32_t cnt) ;
+#define CyAnHalAlloc(cnt) CyAsHalAlloc(cnt)
+
+/*
+ * This function is required by the API to free memory allocated with CyAsHalAlloc(). This function is
+ * expected to work exacly like free().
+ */
+void
+CyAsHalFree(void *mem_p) ;
+#define CyAnHalFree(ptr) CyAsHalFree(ptr)
+
+/*
+ * This function is required by the API to allocate memory during a callback. This function must be able to
+ * provide storage at inturupt time.
+ */
+void *
+CyAsHalCBAlloc(uint32_t cnt) ;
+#define CyAnHalCBAlloc(cnt) CyAsHalCBAlloc(cnt)
+
+/*
+ * This function is required by the API to free memory allocated with CyAsHalCBAlloc.
+ */
+void
+CyAsHalCBFree(void *mem_p) ;
+#define CyAsHalCBFree(ptr) CyAsHalFree(ptr)
+#define CyAnHalCBFree(ptr) CyAsHalFree(ptr)
+
+/*
+ * This function is required to set a block of memory to a specific value. This function is
+ * expected to work exactly like memset()
+ */
+void
+CyAsHalMemSet(void *ptr, uint8_t value, uint32_t cnt) ;
+#define CyAnHalMemSet(ptr, value, cnt) CyAsHalMemSet((ptr), (value), (cnt))
+
+/*
+ * This function is expected to create a sleep channel. The data structure that represents the
+ * sleep channel is given by the pointer in the argument.
+ */
+CyBool
+CyAsHalCreateSleepChannel(CyAsHalSleepChannel *channel) ;
+#define CyAnHalCreateSleepChannel(ch) CyAsHalCreateSleepChannel((CyAsHalSleepChannel *)(ch))
+
+/*
+ * This function is expected to destroy a sleep channel. The data structure that represents the
+ * sleep channel is given by the pointer in the argument.
+ */
+CyBool
+CyAsHalDestroySleepChannel(CyAsHalSleepChannel *channel) ;
+#define CyAnHalDestroySleepChannel(ch) CyAsHalDestroySleepChannel((CyAsHalSleepChannel *)(ch))
+
+CyBool
+CyAsHalSleepOn(CyAsHalSleepChannel *channel, uint32_t ms) ;
+#define CyAnHalSleepOn(ch, ms) CyAsHalSleepOn((CyAsHalSleepChannel *)(ch), (ms))
+
+CyBool
+CyAsHalWake(CyAsHalSleepChannel *channel) ;
+#define CyAnHalWake(ch) CyAsHalWake((CyAsHalSleepChannel *)(ch))
+
+uint32_t
+CyAsHalDisableInterrupts(void) ;
+#define CyAnHalDisableInterrupts() CyAsHalDisableInterrupts()
+
+void
+CyAsHalEnableInterrupts(uint32_t);
+#define CyAnHalEnableInterrupts(msk) CyAsHalEnableInterrupts(msk)
+
+void
+CyAsHalSleep150(void) ;
+#define CyAnHalSleep150() CyAsHalSleep150()
+
+void
+CyAsHalSleep(uint32_t ms) ;
+#define CyAnHalSleep(ms) CyAsHalSleep(ms)
+
+#define CyAsHalIsPolling() (CyFalse)
+#define CyAsHalDisablePolling()
+#define CyAsHalEnablePolling()
+
+#define CyAnHalIsPolling() (CyFalse)
+#define CyAnHalDisablePolling()
+#define CyAnHalEnablePolling()
+
+#define CyAsHalPrintMessage
+//#define CyAsHalPrintMessage Kern::Printf
+#define CyAnHalPrintMessage CyAsHalPrintMessage
+
+void
+CyAsHalPrintMessage2(const char* msg);
+
+/*#define CyAsHalAssert(cond) if (!(cond)) { CyAsHalPrintMessage ("Assertion failed at %s:%d\n", __FILE__, __LINE__); }*/
+#define CyAsHalAssert(cond)
+#define CyAnHalAssert(cond) CyAsHalAssert(cond)
+
+/*
+ As this is a completely interrupt driven HAL, there is no
+ need to implement the following functions.
+ */
+
+/*
+ * These are the functions that are not part of the HAL layer, but are required to be called
+ * for this HAL.
+ */
+int StartBeagleboardHal(const char *pgm, CyAsHalDeviceTag *tag, CyBool debug) ;
+int StopBeagleboardHal(const char *pgm, CyAsHalDeviceTag tag) ;
+
+/*
+ * Constants
+ */
+#define CY_AS_OMAP_KERNEL_HAL_SIG (0x1441)
+
+#define CYAS_DEV_MAX_ADDR (0xFF)
+#define CYAS_DEV_ADDR_RANGE (CYAS_DEV_MAX_ADDR << 16)
+
+/* The base address is added in the kernel module code. */
+#define CYAS_DEV_CALC_ADDR(addr) (addr << 16)
+
+/*
+ * Data structures
+ */
+typedef struct CyAsOmapDevKernel
+{
+ /* This is the signature for this data structure */
+ unsigned int m_sig ;
+
+ /* Address base of West Bridge Device */
+ void *m_addr_base ;
+
+ /* This is a pointer to the next West Bridge device in the system */
+ struct CyAsOmapDevKernel *m_next_p ;
+
+ /* This is for thread sync */
+ /* TODO: struct completion thread_complete ;*/
+
+ /* This is for thread to wait for interrupts */
+ CyAsHalSleepChannel thread_sc ;
+
+ /* This is for thread to exit upon StopOmapKernel */
+ int thread_flag ; /* set 1 to exit */
+
+} CyAsOmapDevKernel ;
+
+extern int
+CyAsHalAstoriaInit(void);
+
+#include "cyas_cplus_end.h"
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/hal/cyashalbeagleboard_spi.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,927 @@
+// Copyright (c) 1994-2009 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:
+//
+// Description:
+// omap3530/beagle_drivers/wb/cyashalbeagleboard_spi.cpp
+//
+
+#include <kern_priv.h>
+#include <beagle/beagle_gpio.h>
+#include <beagle/variant.h>
+#include <assp/omap3530_assp/omap3530_assp_priv.h>
+#include <assp/omap3530_assp/omap3530_irqmap.h> // GPIO interrupts
+#include <assp/omap3530_assp/omap3530_gpio.h>
+
+#include <assp.h> // Required for definition of TIsr
+
+#include <cyasregs.h> // Astoria register definitions
+#include <cyashalbeagleboard_spi.h>
+#include <cyashalbeagleboard.h>
+
+int gConfigured = 0 ;
+
+/***********************************************************************/
+/******************************* ISR **********************************/
+/***********************************************************************/
+
+int
+CyAsHalBeagleBoard__SetupISR(void* handler, void* ptr)
+{
+
+ //Set up the button to proivde a panic button invoking Fault()
+ if(KErrNone != GPIO::SetPinDirection(KGPIO_INT, GPIO::EInput))
+ return KErrArgument;
+
+ GPIO::SetPinMode(KGPIO_INT, GPIO::EEnabled);
+
+ if(KErrNone !=GPIO::BindInterrupt(KGPIO_INT, (TGpioIsr)handler, (TAny*)ptr))
+ return KErrArgument;
+
+ /*EEdgeFalling*/
+ if(KErrNone !=GPIO::SetInterruptTrigger(KGPIO_INT, GPIO::ELevelLow))
+ return KErrArgument;
+
+ if(KErrNone !=GPIO::EnableInterrupt(KGPIO_INT))
+ {
+ GPIO::UnbindInterrupt(KGPIO_INT);
+ return KErrInUse;
+ }
+ return 0 ;
+}
+
+static void
+ManualTriggerISRTest(void)
+{
+ GPIO::TGpioState intState = GPIO::EHigh ;
+
+ GPIO::GetInputState(KGPIO_INT, intState);
+ Kern::Printf("KGPIO_INT before INT is %d", intState);
+
+ //Set INT to LOW state
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(CY_AS_MEM_P0_VM_SET, 0x0545) ;
+ GPIO::GetInputState(KGPIO_INT, intState);
+ Kern::Printf("KGPIO_INT after INT is %d", intState);
+
+ //return INT to HIGH state
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(CY_AS_MEM_P0_VM_SET, 0x0745) ;
+ GPIO::GetInputState(KGPIO_INT, intState);
+ Kern::Printf("KGPIO_INT after INT is %d", intState);
+}
+
+TUint32 gISRCnt = 1 ;
+TDfc* gpMyDfc;
+
+static void myTestDFCFn(
+ TAny *aPtr)
+{
+
+ TUint32* gpISRCnt = (TUint32*)aPtr ;
+ Kern::Printf("myTestDFCFn called (%d)",*gpISRCnt);
+
+ *gpISRCnt += 1;
+
+ Kern::Printf("Enable interrupt");
+ GPIO::EnableInterrupt(KGPIO_INT) ;
+}
+
+static void myISR(TAny* aPtr)
+{
+ Kern::Printf("AstoriaISR");
+ gpMyDfc->Add();
+
+ Kern::Printf("Disable interrupt");
+ /* Disable Interrupt Here, it will be re-enabled by DFCs
+ GPIO::DisableInterrupt(KGPIO_INT) ;*/
+}
+
+/***********************************************************************/
+/**************************** SPI Driver *******************************/
+/***********************************************************************/
+
+extern void
+McSPI4Ch0_SetXFERLEVEL(TUint16 wcnt, TUint8 afl, TUint8 ael)
+{
+ TUint32 r = wcnt ;
+
+ r <<= 16 ;
+ r |= (afl & 0x3f) << 8 ;
+ r |= (ael & 0x3f) ;
+
+ AsspRegister::Write32(KMcSPI4_XFERLEVEL, r);
+}
+
+inline void McSPI4Ch0_Enable(void)
+{
+ /* Enable channel 0 */
+ AsspRegister::Write32(KMcSPI4_CH0CTRL, 0x1);
+}
+
+inline void McSPI4Ch0_Disable(void)
+{
+ /* Disable channel 0 */
+ AsspRegister::Write32(KMcSPI4_CH0CTRL, 0x0);
+}
+
+inline void McSPI4Ch0_TransmitMode(void)
+{
+ AsspRegister::Modify32(KMcSPI4_CH0CONF, 0x0, 0x1<<13);
+}
+
+inline void McSPI4Ch0_TransmitAndReceiveMode(void)
+{
+ AsspRegister::Modify32(KMcSPI4_CH0CONF, 0x1<<13, 0x0);
+}
+
+extern
+void McSPI4Ch0_SyncSlave(void)
+{
+ Kern::Printf("Sync With SPI slave not implemented\n");
+}
+
+inline void CheckForTxEmpty(void)
+{
+ TUint32 r ;
+ for(;;)
+ {
+ r = AsspRegister::Read32(KMcSPI4_CH0STAT);
+ if ( r & 0x2)
+ {
+ break;
+ }
+ Kern::Printf("Waiting for TX empty.");
+ }
+}
+
+inline void CheckForRxFull(void)
+{
+ TUint32 r ;
+ for(;;)
+ {
+ r = AsspRegister::Read32(KMcSPI4_CH0STAT);
+ if ( r & 0x1)
+ {
+ break;
+ }
+ Kern::Printf("Waiting for RX full.");
+ }
+}
+
+inline void CheckForTxEmptyRxFull(void)
+{
+ TUint32 r ;
+ for(;;)
+ {
+ r = AsspRegister::Read32(KMcSPI4_CH0STAT);
+ if ( r & 0x3)
+ {
+ break;
+ }
+ Kern::Printf("Waiting for TX empty and RX full.");
+ }
+}
+
+extern void
+McSPI4Ch0_DumpAstoriaRegs(int allReg)
+{
+ int i ;
+ TUint16 regVal = 0 ;
+
+ for ( i = 0x80 ; i < 0xfb ; i++ )
+ {
+ if ( (i == 0x84) ||
+ ((i >= 0x87) && (i <= 0x8f)) ||
+ (i == 0x93) ||
+ ((i >= 0x96) && (i <= 0x97)) ||
+ (i == 0x99) ||
+ ((i >= 0x9b) && (i <= 0x9f)) ||
+ ((i >= 0xb0) && (i <= 0xbf)) ||
+ ((i >= 0xc6) && (i <= 0xd8)) ||
+ ((i >= 0xe3) && (i <= 0xef)) ||
+ ((i >= 0xf4) && (i <= 0xf7)) )
+ {
+ /*skip*/
+ continue ;
+ }
+
+ regVal = 0 ;
+ if ( allReg )
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(i, ®Val) ;
+ else
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(CY_AS_MEM_CM_WB_CFG_ID, ®Val) ;
+ Kern::Printf("REG[%02x] = 0x%04x", i, regVal);
+ }
+}
+
+static int
+AstoriaRegTest(int type)
+{
+ int errCnt = 0 ;
+ int i ;
+ for ( i= 0 ; i < 100 ; i++ )
+ {
+ TUint16 regVal0 = 0, regVal1 = 0, regVal2 = 0, regVal3 = 0 ;
+ TUint16 expVal = 0 ;
+
+ if ( type == 1 )
+ {
+ Kern::Printf("Write/Read Register with sequential value...");
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf8, (i+1)) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf9, (i+2)) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfa, (i+3)) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfb, (i+4)) ;
+ }
+ else if ( type == 2 )
+ {
+ Kern::Printf("Write/Read 0xffff and 0x0 ...");
+ if ( i % 2 == 0 )
+ {
+ expVal = 0xffff ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf8, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf9, ~expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfa, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfb, ~expVal) ;
+
+ }
+ else
+ {
+ expVal = 0x0 ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf8, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf9, ~expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfa, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfb, ~expVal) ;
+ }
+ }
+ else if ( type == 3 )
+ {
+ Kern::Printf("Write/Read 0x5555 and 0xaaaa ...");
+ if ( i % 2 == 0 )
+ {
+ expVal = 0x5555 ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf8, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf9, ~expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfa, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfb, ~expVal) ;
+ }
+ else
+ {
+ expVal = 0xaaaa ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf8, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xf9, ~expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfa, expVal) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(0xfb, ~expVal) ;
+ }
+ }
+
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(0xf8, ®Val0) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(0xf9, ®Val1) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(0xfa, ®Val2) ;
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(0xfb, ®Val3) ;
+
+ if ( (type == 1) &&
+ ( (regVal0 != (i+1)) ||
+ (regVal1 != (i+2)) ||
+ (regVal2 != (i+3)) ||
+ (regVal3 != (i+4)) ))
+ {
+ Kern::Printf("ERROR: Write register failed (%d)\n",i);
+ Kern::Printf("ERROR: Exp[0]: 0x%04x\n",i+1);
+ Kern::Printf("ERROR: Act[0]: 0x%04x\n",regVal0);
+ Kern::Printf("ERROR: Exp[1]: 0x%04x\n",i+2);
+ Kern::Printf("ERROR: Act[1]: 0x%04x\n",regVal1);
+ Kern::Printf("ERROR: Exp[2]: 0x%04x\n",i+3);
+ Kern::Printf("ERROR: Act[2]: 0x%04x\n",regVal2);
+ Kern::Printf("ERROR: Exp[3]: 0x%04x\n",i+4);
+ Kern::Printf("ERROR: Act[3]: 0x%04x\n",regVal3);
+
+ errCnt++ ;
+ if ( errCnt > 10 )
+ return 1;
+ }
+ else if ( (type != 1 ) &&
+ ((regVal0 != expVal) ||
+ (regVal1 != ((~expVal)&0xffff)) ||
+ (regVal2 != expVal) ||
+ (regVal3 != ((~expVal)&0xffff)) ))
+ {
+ Kern::Printf("ERROR: Write register failed (%d)\n",i);
+ Kern::Printf("ERROR: Exp[0]: 0x%04x\n",expVal);
+ Kern::Printf("ERROR: Act[0]: 0x%04x\n",regVal0);
+ Kern::Printf("ERROR: Exp[1]: 0x%04x\n",(~expVal)&0xffff);
+ Kern::Printf("ERROR: Act[1]: 0x%04x\n",regVal1);
+ Kern::Printf("ERROR: Exp[2]: 0x%04x\n",expVal);
+ Kern::Printf("ERROR: Act[2]: 0x%04x\n",regVal2);
+ Kern::Printf("ERROR: Exp[3]: 0x%04x\n",(~expVal)&0xffff);
+ Kern::Printf("ERROR: Act[3]: 0x%04x\n",regVal3);
+
+ errCnt++ ;
+ if ( errCnt > 10 )
+ return 1 ;
+ }
+
+ }
+ Kern::Printf("Register test PASSED!!\n");
+ return 0 ;
+}
+
+/******************************************************************************/
+/******************************************************************************/
+/******************************************************************************/
+
+static void
+DumpMcSPI4Reg(void)
+{
+ TUint32 r ;
+ TUint32 i;
+
+ for ( i = KMcSPI4_SYSCONFIG ; i <= KMcSPI4_RX0 ; i+=0x4 )
+ {
+ r = AsspRegister::Read32(i);
+ switch (i)
+ {
+ case KMcSPI4_SYSCONFIG:
+ Kern::Printf("KMcSPI4_SYSCONFIG = (0x%08x)", r);
+ break;
+ case KMcSPI4_SYSSTATUS:
+ Kern::Printf("KMcSPI4_SYSSTATUS = (0x%08x)", r);
+ break;
+ case KMcSPI4_IRQSTATUS:
+ Kern::Printf("KMcSPI4_IRQSTATUS = (0x%08x)", r);
+ break;
+ case KMcSPI4_IRQENABLE:
+ Kern::Printf("KMcSPI4_IRQENABLE = (0x%08x)", r);
+ break;
+ case KMcSPI4_WAKEUPEN:
+ Kern::Printf("KMcSPI4_WAKEUPEN = (0x%08x)", r);
+ break;
+ case KMcSPI4_SYST:
+ Kern::Printf("KMcSPI4_SYST = (0x%08x)", r);
+ break;
+ case KMcSPI4_MODULCTRL:
+ Kern::Printf("KMcSPI4_MODULCTRL = (0x%08x)", r);
+ break;
+ case KMcSPI4_CH0CONF:
+ Kern::Printf("KMcSPI4_CH0CONF = (0x%08x)", r);
+ break;
+ case KMcSPI4_CH0STAT:
+ Kern::Printf("KMcSPI4_CH0STAT = (0x%08x)", r);
+ break;
+ case KMcSPI4_CH0CTRL:
+ Kern::Printf("KMcSPI4_CH0CTRL = (0x%08x)", r);
+ break;
+ case KMcSPI4_TX0:
+ Kern::Printf("KMcSPI4_TX0 = (0x%08x)", r);
+ break;
+ case KMcSPI4_RX0:
+ Kern::Printf("KMcSPI4_RX0 = (0x%08x)", r);
+ break;
+ case KMcSPI4_XFERLEVEL:
+ Kern::Printf("KMcSPI4_XFERLEVEL = (0x%08x)", r);
+ break;
+ default:
+ Kern::Printf("ERROR: unknow register value", r);
+ }
+ }
+
+ r = AsspRegister::Read32(KMcSPI4_XFERLEVEL);
+ Kern::Printf("KMcSPI4_XFERLEVEL = (0x%08x)\n", r);
+}
+
+inline TUint32 constructSPIConfigReg(
+ TUint8 PHA,
+ TUint8 POL,
+ TUint8 CLKD,
+ TUint8 EPOL,
+ TUint8 WL,
+ TUint8 TRM,
+ TUint8 DMAW,
+ TUint8 DMAR,
+ TUint8 DPE0,
+ TUint8 DPE1,
+ TUint8 IS,
+ TUint8 TURBO,
+ TUint8 FORCE,
+ TUint8 SPIENSLV,
+ TUint8 SBE,
+ TUint8 SBPOL,
+ TUint8 TCS,
+ TUint8 FFEW,
+ TUint8 FFER,
+ TUint8 CLKG)
+{
+ TUint32 r = 0 ;
+
+ r = ( CLKG & 0x1 ) << 29;
+ r |= ( FFER & 0x1 ) << 28;
+ r |= ( FFEW & 0x1 ) << 27;
+ r |= ( TCS & 0x3 ) << 25;
+ r |= ( SBPOL & 0x1 ) << 24;
+ r |= ( SBE & 0x1 ) << 23;
+ r |= ( SPIENSLV & 0x3 ) << 21;
+ r |= ( FORCE & 0x1 ) << 20;
+ r |= ( TURBO & 0x1 ) << 19;
+ r |= ( IS & 0x1 ) << 18;
+ r |= ( DPE1 & 0x1 ) << 17;
+ r |= ( DPE0 & 0x1 ) << 16;
+ r |= ( DMAR & 0x1 ) << 15;
+ r |= ( DMAW & 0x1 ) << 14;
+ r |= ( TRM & 0x3 ) << 12;
+ r |= ( WL & 0x1f ) << 7;
+ r |= ( EPOL & 0x1 ) << 6;
+ r |= ( CLKD & 0xf ) << 2;
+ r |= ( POL & 0x1 ) << 1;
+ r |= PHA & 0x1;
+ return r ;
+}
+
+static void ConfigMcSPI4Ch0(void)
+{
+ TUint32 r ;
+ Kern::Printf("Configure McSPI4 CH0...\n");
+
+ /* Enable McSPI4 functional clock */
+ r = AsspRegister::Read32(KCM_FCLKEN1_CORE);
+ AsspRegister::Write32(KCM_FCLKEN1_CORE, (r | 0x200000));
+
+ /* Enable McSPI4 interface clock */
+ r = AsspRegister::Read32(KCM_ICLKEN1_CORE);
+ AsspRegister::Write32(KCM_ICLKEN1_CORE, (r | 0x200000));
+
+ /* Software reset McSPI4 */
+ AsspRegister::Write32(KMcSPI4_SYSCONFIG, 0x1);
+
+ /* Wait until RESETDONE is set in SYSSTATUS */
+ do
+ {
+ r = AsspRegister::Read32(KMcSPI4_SYSSTATUS);
+ Kern::Printf("KMcSPI4_SYSSTATUS = (0x%08x)\n", r);
+ }while((r & 0x1) != 1);
+
+ /* Disable channel 0 */
+ McSPI4Ch0_Disable();
+
+ /* Disable all interrupts */
+ AsspRegister::Write32(KMcSPI4_IRQENABLE, 0x0);
+
+ /* Clear all interrupts */
+ AsspRegister::Write32(KMcSPI4_IRQSTATUS, 0x1777f);
+
+ /* Set Master mode */
+#ifdef SINGLE_CHANNEL_MASTER_MODE
+ AsspRegister::Write32(KMcSPI4_MODULCTRL, 0x1);
+#else
+ AsspRegister::Write32(KMcSPI4_MODULCTRL, 0x0);
+#endif
+
+
+ /* Config clock, wl */
+ r = constructSPIConfigReg(
+ 0x0, /*PHA*/
+ 0x0, /*POL*/
+ 0x2, /*CLKD (divider 2 = 12MHz)3 = 6MHz*/
+ 0x1, /*EPOL (active low)*/
+ 0x7, /*WL (8bit)*/
+ 0x0, /*TRM (Transmit and receive mode)*/
+ 0x0, /*DMAW (DMAW disable) TODO*/
+ 0x0, /*DMAR (DMAR disable) TODO*/
+ 0x1, /*DPE0 (spim_somi no transmission)*/
+ 0x0, /*DPE1 (spim_simo transmission)*/
+ 0x0, /*IS (spim_somi reception)*/
+ 0x0, /*TURBO (mutli spi-word transfer)*/
+ 0x0, /*FORCE TODO*/
+ 0x0, /*SPIENSLV (not used)*/
+ 0x0, /*SBE (no start bit) TODO*/
+ 0x0, /*SBPOL (start bit polarity) */
+ 0x0, /*TCS (cs time control) TODO*/
+ 0x0, /*FFEW (FIFO enabled) TODO*/
+ 0x0, /*FFER (FIFO enabled) TODO*/
+ 0x0 /*CLKG (One clock cycle granularity)*/
+ );
+
+ AsspRegister::Write32(KMcSPI4_CH0CONF, r);
+
+}
+
+static void
+SetPADConfigRegister(void)
+{
+ TUint32 r ;
+ Kern::Printf("Set PAD configuration registers...\n");
+
+ /* MUXMODE = 1, INPUTENABLE for SOMI */
+ AsspRegister::Write32(KPADCONFIG_McSPI4_SIMO_P12_0, 0x1010001);
+
+ r = AsspRegister::Read32(KPADCONFIG_McSPI4_CS0_P16_16);
+ AsspRegister::Write32(KPADCONFIG_McSPI4_CS0_P16_16, ((r & 0xffff) | 0x10000));
+
+ /* NOTE:
+ we must set SPI clock INPUTENABLE bit otherwise the RX register will not
+ latch any data */
+ AsspRegister::Write32(KPADCONFIG_McSPI4_CLK_P20_0, 0x40001 | 0x0100);
+
+ /* MUXMODE = 4 */
+ r = AsspRegister::Read32(KPADCONFIG_GPIO183_P23_0);
+ //AsspRegister::Write32(KPADCONFIG_GPIO183_P23_0, ((r & 0xffff0000) | 0x4 | 0x8 | 0x0100));
+ AsspRegister::Write32(KPADCONFIG_GPIO183_P23_0, ((r & 0xffff0000) | 0x4 ));
+
+ r = AsspRegister::Read32(KPADCONFIG_GPIO168_P24_16);
+ AsspRegister::Write32(KPADCONFIG_GPIO168_P24_16, ((r & 0xffff) | 0x40000 | 0x01000000));
+
+}
+
+static void
+ReadPADConfigRegister(void)
+{
+ TUint32 r ;
+
+ Kern::Printf("Reading PAD configuration registers...");
+ r = AsspRegister::Read32(KPADCONFIG_McSPI4_SIMO_P12_0);
+ Kern::Printf("KPADCONFIG_McSPI4_SIMO_P12_0 = (0x%08x)", r);
+
+ r = AsspRegister::Read32(KPADCONFIG_McSPI4_SIMO_P18_16);
+ Kern::Printf("KPADCONFIG_McSPI4_SIMO_P18_16 = (0x%08x)", r);
+
+ r = AsspRegister::Read32(KPADCONFIG_McSPI4_CS0_P16_16);
+ Kern::Printf("KPADCONFIG_McSPI4_CS0_P16_16 = (0x%08x)", r);
+
+ r = AsspRegister::Read32(KPADCONFIG_McSPI4_CLK_P20_0);
+ Kern::Printf("KPADCONFIG_McSPI4_CLK_P20_0 = (0x%08x)", r);
+
+ r = AsspRegister::Read32(KPADCONFIG_GPIO157_P22_16);
+ Kern::Printf("KPADCONFIG_GPIO157_P22_16 = (0x%08x)", r);
+
+ r = AsspRegister::Read32(KPADCONFIG_GPIO183_P23_0);
+ Kern::Printf("KPADCONFIG_GPIO183_P23_0 = (0x%08x)", r);
+
+ r = AsspRegister::Read32(KPADCONFIG_GPIO168_P24_16);
+ Kern::Printf("KPADCONFIG_GPIO168_P24_16 = (0x%08x)", r);
+
+}
+
+/***********************************************************************/
+/**************************** Public *******************************/
+/***********************************************************************/
+
+void
+CyAsHalBeagleBoardMcSPI4Ch0_WriteEP(TUint32 addr, TUint8* buff, TUint16 size)
+{
+ TUint8 size_l = size ;
+ TUint8 size_h = (size >> 8)&0x7f ;
+ TUint16 size16 = size / 2 ;
+ TUint8* p = buff ;
+
+ TUint32 r ;
+
+ r = 0x00800000;
+ r |= (addr & 0xff) << 8 ;
+ r |= size_l << 24 ;
+ r |= size_h << 16 ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("WB SPI write packet header = (0x%08x)", r);
+#endif
+ /* Set McSPI4Ch0 to Transmit only mode for write */
+ McSPI4Ch0_TransmitMode();
+
+ McSPI4Ch0_Enable();
+
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r>>8);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r>>16);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r>>24);
+
+ while(size16 != 0)
+ {
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, *(p+1));
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, *p);
+
+/*#ifdef SPI_DEBUG_LOG
+ Kern::Printf("0x%02x", *(p+1));
+ Kern::Printf("0x%02x", *p);
+#endif*/
+ p+=2 ;
+ size16-- ;
+ }
+
+ CheckForTxEmpty();
+
+ McSPI4Ch0_Disable();
+
+ /*
+ * Change back to Transmit and Receive mode for RegRead
+ */
+ McSPI4Ch0_TransmitAndReceiveMode();
+
+}
+
+void
+CyAsHalBeagleBoardMcSPI4Ch0_ReadEP(TUint32 addr, TUint8* buff, TUint16 size)
+{
+ TUint8 size_l = size ;
+ TUint8 size_h = (size >> 8)&0x7f ;
+ TUint16 size16 = size / 2 ;
+ TUint32 r ;
+
+ r = 0x00000000;
+ r |= (addr & 0xff) << 8 ;
+ r |= size_l << 24 ;
+ r |= size_h << 16 ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("WB SPI read packet header = (0x%08x)", r);
+#endif
+
+ McSPI4Ch0_Enable();
+
+ {
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+ AsspRegister::Write32(KMcSPI4_TX0, r>>8);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+
+ AsspRegister::Write32(KMcSPI4_TX0, r>>16);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+ AsspRegister::Write32(KMcSPI4_TX0, r>>24);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+ while(size16 != 0)
+ {
+ AsspRegister::Write32(KMcSPI4_TX0, 0);
+ CheckForTxEmptyRxFull();
+ *(buff+1) = AsspRegister::Read32(KMcSPI4_RX0);
+
+ AsspRegister::Write32(KMcSPI4_TX0, 0);
+ CheckForTxEmptyRxFull();
+ *buff = AsspRegister::Read32(KMcSPI4_RX0);
+
+ buff+=2;
+ size16--;
+
+ }
+
+ }
+
+ McSPI4Ch0_Disable();
+
+}
+
+void
+CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(TUint32 addr, TUint16 value)
+{
+ TUint32 r ;
+
+ r = 0x02800000;
+ r |= (addr & 0xff) << 8 ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("WB SPI write packet header = (0x%08x), value = (0x%04x)", r, value);
+#endif
+
+ /* Set McSPI4Ch0 to Transmit only mode for write */
+ McSPI4Ch0_TransmitMode();
+
+ McSPI4Ch0_Enable();
+
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r>>8);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r>>16);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r>>24);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, value>>8);
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, value & 0xff );
+ CheckForTxEmpty();
+
+ McSPI4Ch0_Disable();
+
+ /*
+ * Change back to Transmit and Receive mode for RegRead
+ */
+ McSPI4Ch0_TransmitAndReceiveMode();
+}
+
+void
+CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(TUint32 addr, TUint16* value)
+{
+ TUint32 r ;
+
+ r = 0x02000000;
+ r |= (addr & 0xff) << 8 ;
+#ifdef SPI_DEBUG_LOG
+ Kern::Printf("WB SPI read packet header = (0x%08x)", r);
+#endif
+
+ McSPI4Ch0_Enable();
+
+ {
+ TUint16 v ;
+
+ CheckForTxEmpty();
+ AsspRegister::Write32(KMcSPI4_TX0, r);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+ AsspRegister::Write32(KMcSPI4_TX0, r>>8);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+
+ AsspRegister::Write32(KMcSPI4_TX0, r>>16);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+ AsspRegister::Write32(KMcSPI4_TX0, r>>24);
+ CheckForTxEmptyRxFull();
+ AsspRegister::Read32(KMcSPI4_RX0);
+
+ AsspRegister::Write32(KMcSPI4_TX0, 0);
+ CheckForTxEmptyRxFull();
+ v = AsspRegister::Read32(KMcSPI4_RX0);
+ *value = v << 8;
+
+ AsspRegister::Write32(KMcSPI4_TX0, 0);
+ CheckForTxEmptyRxFull();
+ v = AsspRegister::Read32(KMcSPI4_RX0);
+ *value |= v & 0xff;
+
+ }
+
+ McSPI4Ch0_Disable();
+
+}
+
+int
+CyAsHalBeagleBoard__ConfigureSPI(void)
+{
+ /*Configure PAD*/
+ ReadPADConfigRegister();
+ SetPADConfigRegister();
+ ReadPADConfigRegister();
+
+ /*Configure McSPI4*/
+ ConfigMcSPI4Ch0();
+ DumpMcSPI4Reg();
+
+ McSPI4Ch0_Enable();
+
+ if(KErrNone != GPIO::SetPinMode(KGPIO_183, GPIO::EEnabled))
+ Kern::Printf("ERROR: SetPinMode failed!");
+
+ if(KErrNone != GPIO::SetPinDirection(KGPIO_183, GPIO::EOutput))
+ Kern::Printf("ERROR: SetPinDirection failed!");
+
+ if(KErrNone != GPIO::SetOutputState(KGPIO_183, GPIO::EHigh))
+ Kern::Printf("ERROR: SetOutputState failed!");
+
+ gConfigured = 1 ;
+ return 0 ;
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+extern int
+CyAsHalBeagleBoard__Test(void)
+{
+ int i ;
+ int errCnt = 0 ;
+
+ if ( !gConfigured )
+ {
+ CyAsHalBeagleBoard__ConfigureSPI();
+ }
+
+ {
+ TUint16 regVal = 0 ;
+
+ Kern::Printf("Read Astoria ID register\n");
+
+ CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(0x80, ®Val) ;
+
+ if ( regVal != 0xA200 )
+ {
+ Kern::Printf("ERROR: Wrong ID register value\n");
+ Kern::Printf("ERROR: Exp: 0x%04x\n",0xa200);
+ Kern::Printf("ERROR: Act: 0x%04x\n",regVal);
+ errCnt++;
+ return errCnt ;
+ }
+ else
+ {
+ Kern::Printf("ID register read successful 0x%04x\n",regVal);
+ }
+ }
+
+ {
+ Kern::Printf("Register test...\n");
+ for ( i = 1 ; i < 4 ; i++ )
+ {
+ if ( AstoriaRegTest(i) != 0 )
+ {
+ errCnt++ ;
+ return errCnt ;
+ }
+ }
+
+ }
+
+ {
+
+ Kern::Printf("Interrupt test...\n");
+
+ /* Setup DFC */
+ gpMyDfc = new TDfc( myTestDFCFn, (void*)(&gISRCnt), Kern::DfcQue0(), 1 ) ;
+ CyAsHalBeagleBoard__SetupISR((void*)myISR,(void*)(0));
+
+ for ( i = 0 ; i < 5 ; i++ )
+ {
+ Kern::Printf("Manually trigger interrupt (%d)\n",i);
+
+ ManualTriggerISRTest();
+
+
+ if (gISRCnt != i+1)
+ {
+ Kern::Printf("ISR called (%d)\n",gISRCnt);
+ }
+ else
+ {
+ Kern::Printf("ISR didn't call (%d)\n",gISRCnt);
+ Kern::Printf("Interrupt test failed\n");
+ errCnt++ ;
+ return errCnt ;
+ }
+ }
+ }
+
+ Kern::Printf("CyAsHalBeagleBoard__Test Successful!\n");
+
+ /*if ( gIndex == 1 )
+ {
+ GPIO::TGpioState aState ;
+
+ GPIO::GetOutputState(KGPIO_183, aState);
+
+ if ( aState == GPIO::EHigh )
+ {
+ if(KErrNone != GPIO::SetOutputState(KGPIO_183, GPIO::ELow))
+ Kern::Printf("ERROR: SetOutputState failed!");
+ }
+ else
+ {
+ if(KErrNone != GPIO::SetOutputState(KGPIO_183, GPIO::EHigh))
+ Kern::Printf("ERROR: SetOutputState failed!");
+ }
+ gIndex = 0 ;
+ }*/
+
+ /*
+ if ( gIndex == 2 )
+ {
+ McSPI4Ch0_DumpAstoriaRegs(0);
+ }
+
+ if ( gIndex == 3 )
+ {
+ McSPI4Ch0_DumpAstoriaRegs(1);
+ gIndex = 0 ;
+ }
+ */
+ return 0 ;
+}
+
+/******************************************************************************/
+/******************************************************************************/
+/******************************************************************************/
+
+
+
+
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/hal/cyashalbeagleboard_spi.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,67 @@
+#ifndef _CYASHALBEAGLEBOARD_SPI_H_
+#define _CYASHALBEAGLEBOARD_SPI_H_
+
+#include <kern_priv.h>
+#include <beagle/beagle_gpio.h>
+#include <beagle/variant.h>
+#include <assp/omap3530_assp/omap3530_assp_priv.h>
+#include <assp/omap3530_assp/omap3530_irqmap.h> // GPIO interrupts
+#include <assp/omap3530_assp/omap3530_gpio.h>
+
+#include <assp.h> // Required for definition of TIsr
+
+const TUint KGPIO_183 = 183;
+const TUint KGPIO_INT = 168;
+
+//#define SINGLE_CHANNEL_MASTER_MODE
+
+/* PRCM registers */
+const TUint KCM_FCLKEN1_CORE = Omap3530HwBase::TVirtual<0x48004A00>::Value;
+const TUint KCM_ICLKEN1_CORE = Omap3530HwBase::TVirtual<0x48004A10>::Value;
+
+const TUint32 KCONTROL_SEC_CTRL = Omap3530HwBase::TVirtual<0x480022B0>::Value;
+
+/* Pad configuration registers */
+const TUint32 KPADCONFIG_McSPI4_SIMO_P12_0 = Omap3530HwBase::TVirtual<0x48002190>::Value;
+const TUint32 KPADCONFIG_McSPI4_SIMO_P18_16 = Omap3530HwBase::TVirtual<0x48002190>::Value;
+const TUint32 KPADCONFIG_McSPI4_CS0_P16_16 = Omap3530HwBase::TVirtual<0x48002194>::Value;
+const TUint32 KPADCONFIG_McSPI4_CLK_P20_0 = Omap3530HwBase::TVirtual<0x4800218c>::Value;
+const TUint32 KPADCONFIG_GPIO157_P22_16 = Omap3530HwBase::TVirtual<0x4800218c>::Value;
+const TUint32 KPADCONFIG_GPIO183_P23_0 = Omap3530HwBase::TVirtual<0x480021c0>::Value;
+const TUint32 KPADCONFIG_GPIO168_P24_16 = Omap3530HwBase::TVirtual<0x480021bc>::Value;
+
+/* SPI configuration registers */
+const TUint32 KMcSPI4_SYSCONFIG = Omap3530HwBase::TVirtual<0x480BA010>::Value;
+const TUint32 KMcSPI4_SYSSTATUS = Omap3530HwBase::TVirtual<0x480BA014>::Value;
+const TUint32 KMcSPI4_IRQSTATUS = Omap3530HwBase::TVirtual<0x480BA018>::Value;
+const TUint32 KMcSPI4_IRQENABLE = Omap3530HwBase::TVirtual<0x480BA01c>::Value;
+const TUint32 KMcSPI4_WAKEUPEN = Omap3530HwBase::TVirtual<0x480BA020>::Value;
+const TUint32 KMcSPI4_SYST = Omap3530HwBase::TVirtual<0x480BA024>::Value;
+const TUint32 KMcSPI4_MODULCTRL = Omap3530HwBase::TVirtual<0x480BA028>::Value;
+const TUint32 KMcSPI4_CH0CONF = Omap3530HwBase::TVirtual<0x480BA02c>::Value;
+const TUint32 KMcSPI4_CH0STAT = Omap3530HwBase::TVirtual<0x480BA030>::Value;
+const TUint32 KMcSPI4_CH0CTRL = Omap3530HwBase::TVirtual<0x480BA034>::Value;
+const TUint32 KMcSPI4_TX0 = Omap3530HwBase::TVirtual<0x480BA038>::Value;
+const TUint32 KMcSPI4_RX0 = Omap3530HwBase::TVirtual<0x480BA03c>::Value;
+const TUint32 KMcSPI4_XFERLEVEL = Omap3530HwBase::TVirtual<0x480BA07c>::Value;
+/**/
+
+extern int
+CyAsHalBeagleBoard__ConfigureSPI(void);
+
+extern int
+CyAsHalBeagleBoard__SetupISR(void* handler, void* ptr);
+
+extern void
+CyAsHalBeagleBoardMcSPI4Ch0_ReadReg(TUint32 addr, TUint16* value);
+
+extern void
+CyAsHalBeagleBoardMcSPI4Ch0_WriteReg(TUint32 addr, TUint16 value);
+
+extern void
+CyAsHalBeagleBoardMcSPI4Ch0_ReadEP(TUint32 addr, TUint8* buff, TUint16 size);
+
+extern void
+CyAsHalBeagleBoardMcSPI4Ch0_WriteEP(TUint32 addr, TUint8* buff, TUint16 size);
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyanch9.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,27 @@
+/* Cypress West Bridge API header file (cyanch9.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANCH9_H_
+#define _INCLUDED_CYANCH9_H_
+
+#include <cyasch9.h>
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyanerr.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,404 @@
+/* Cypress West Bridge API header file (cyanerr.h)
+ ## Symbols for backward compatibility with previous releases of Antioch SDK.
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANERR_H_
+#define _INCLUDED_CYANERR_H_
+
+#include "cyaserr.h"
+
+#ifndef __doxygen__
+
+/*
+ * Function completed successfully.
+ */
+#define CY_AN_ERROR_SUCCESS (CY_AS_ERROR_SUCCESS)
+
+/*
+ * A function trying to acquire a resource was unable to do so.
+ */
+#define CY_AN_ERROR_NOT_ACQUIRED (CY_AS_ERROR_NOT_ACQUIRED)
+
+/*
+ * A function trying to acquire a resource was unable to do so.
+ */
+#define CY_AN_ERROR_NOT_RELEASED (CY_AS_ERROR_NOT_RELEASED)
+
+/*
+ * The West Bridge firmware is not loaded.
+ */
+#define CY_AN_ERROR_NO_FIRMWARE (CY_AS_ERROR_NO_FIRMWARE)
+
+/*
+ * A timeout occurred waiting on a response from the West Bridge device
+ */
+#define CY_AN_ERROR_TIMEOUT (CY_AS_ERROR_TIMEOUT)
+
+/*
+ * A request to download firmware was made while not in the CONFIG mode
+ */
+#define CY_AN_ERROR_NOT_IN_CONFIG_MODE (CY_AS_ERROR_NOT_IN_CONFIG_MODE)
+
+/*
+ * This error is returned if the firmware size specified is too invalid.
+ */
+#define CY_AN_ERROR_INVALID_SIZE (CY_AS_ERROR_INVALID_SIZE)
+
+/*
+ * This error is returned if a request is made to acquire a resource that has
+ * already been acquired.
+ */
+#define CY_AN_ERROR_RESOURCE_ALREADY_OWNED (CY_AS_ERROR_RESOURCE_ALREADY_OWNED)
+
+/*
+ * This error is returned if a request is made to release a resource that has
+ * not previously been acquired.
+ */
+#define CY_AN_ERROR_RESOURCE_NOT_OWNED (CY_AS_ERROR_RESOURCE_NOT_OWNED)
+
+/*
+ * This error is returned when a request is made for a media that does not exist
+ */
+#define CY_AN_ERROR_NO_SUCH_MEDIA (CY_AS_ERROR_NO_SUCH_MEDIA)
+
+/*
+ * This error is returned when a request is made for a device that does not exist
+ */
+#define CY_AN_ERROR_NO_SUCH_DEVICE (CY_AS_ERROR_NO_SUCH_DEVICE)
+
+/*
+ * This error is returned when a request is made for a unit that does not exist
+ */
+#define CY_AN_ERROR_NO_SUCH_UNIT (CY_AS_ERROR_NO_SUCH_UNIT)
+
+/*
+ * This error is returned when a request is made for a block that does not exist
+ */
+#define CY_AN_ERROR_INVALID_BLOCK (CY_AS_ERROR_INVALID_BLOCK)
+
+/*
+ * This error is returned when an invalid trace level is set.
+ */
+#define CY_AN_ERROR_INVALID_TRACE_LEVEL (CY_AS_ERROR_INVALID_TRACE_LEVEL)
+
+/*
+ * This error is returned when West Bridge is already in the standby state
+ * and an attempt is made to put West Bridge into this state again.
+ */
+#define CY_AN_ERROR_ALREADY_STANDBY (CY_AS_ERROR_ALREADY_STANDBY)
+
+/*
+ * This error is returned when the API needs to set a pin on the
+ * West Bridge device, but this is not supported by the underlying HAL
+ * layer.
+ */
+#define CY_AN_ERROR_SETTING_WAKEUP_PIN (CY_AS_ERROR_SETTING_WAKEUP_PIN)
+
+/*
+ * This error is returned when a module is being started that has
+ * already been started.
+ */
+#define CY_AN_ERROR_ALREADY_RUNNING (CY_AS_ERROR_ALREADY_RUNNING)
+
+/*
+ * This error is returned when a module is being stopped that has
+ * already been stopped.
+ */
+#define CY_AN_ERROR_NOT_RUNNING (CY_AS_ERROR_NOT_RUNNING)
+
+/*
+ * This error is returned when the caller tries to claim a media that has already been
+ * claimed.
+ */
+#define CY_AN_ERROR_MEDIA_ALREADY_CLAIMED (CY_AS_ERROR_MEDIA_ALREADY_CLAIMED)
+
+/*
+ * This error is returned when the caller tries to release a media that has already been
+ * released.
+ */
+#define CY_AN_ERROR_MEDIA_NOT_CLAIMED (CY_AS_ERROR_MEDIA_NOT_CLAIMED)
+
+/*
+ * This error is returned when canceling trying to cancel an asynchronous operation when
+ * an async operation is not pending.
+ */
+#define CY_AN_ERROR_NO_OPERATION_PENDING (CY_AS_ERROR_NO_OPERATION_PENDING)
+
+/*
+ * This error is returned when an invalid endpoint number is provided to an API call.
+ */
+#define CY_AN_ERROR_INVALID_ENDPOINT (CY_AS_ERROR_INVALID_ENDPOINT)
+
+/*
+ * This error is returned when an invalid descriptor type
+ * is specified in an API call.
+ */
+#define CY_AN_ERROR_INVALID_DESCRIPTOR (CY_AS_ERROR_INVALID_DESCRIPTOR)
+
+/*
+ * This error is returned when an invalid descriptor index
+ * is specified in an API call.
+ */
+#define CY_AN_ERROR_BAD_INDEX (CY_AS_ERROR_BAD_INDEX)
+
+/*
+ * This error is returned if trying to set a USB descriptor
+ * when in the P port enumeration mode.
+ */
+#define CY_AN_ERROR_BAD_ENUMERATION_MODE (CY_AS_ERROR_BAD_ENUMERATION_MODE)
+
+/*
+ * This error is returned when the endpoint configuration specified
+ * is not valid.
+ */
+#define CY_AN_ERROR_INVALID_CONFIGURATION (CY_AS_ERROR_INVALID_CONFIGURATION)
+
+/*
+ * This error is returned when the API cannot verify it is connected
+ * to an West Bridge device.
+ */
+#define CY_AN_ERROR_NO_ANTIOCH (CY_AS_ERROR_NO_ANTIOCH)
+
+/*
+ * This error is returned when an API function is called and CyAnMiscConfigureDevice
+ * has not been called to configure West Bridge for the current environment.
+ */
+#define CY_AN_ERROR_NOT_CONFIGURED (CY_AS_ERROR_NOT_CONFIGURED)
+
+/*
+ * This error is returned when West Bridge cannot allocate memory required for
+ * internal API operations.
+ */
+#define CY_AN_ERROR_OUT_OF_MEMORY (CY_AS_ERROR_OUT_OF_MEMORY)
+
+/*
+ * This error is returned when a module is being started that has
+ * already been started.
+ */
+#define CY_AN_ERROR_NESTED_SLEEP (CY_AS_ERROR_NESTED_SLEEP)
+
+/*
+ * This error is returned when an operation is attempted on an endpoint that has
+ * been disabled.
+ */
+#define CY_AN_ERROR_ENDPOINT_DISABLED (CY_AS_ERROR_ENDPOINT_DISABLED)
+
+/*
+ * This error is returned when a call is made to an API function when the device is in
+ * standby.
+ */
+#define CY_AN_ERROR_IN_STANDBY (CY_AS_ERROR_IN_STANDBY)
+
+/*
+ * This error is returned when an API call is made with an invalid handle value.
+ */
+#define CY_AN_ERROR_INVALID_HANDLE (CY_AS_ERROR_INVALID_HANDLE)
+
+/*
+ * This error is returned when an invalid response is returned from the West Bridge device.
+ */
+#define CY_AN_ERROR_INVALID_RESPONSE (CY_AS_ERROR_INVALID_RESPONSE)
+
+/*
+ * This error is returned from the callback function for any asynchronous read or write
+ * request that is canceled.
+ */
+#define CY_AN_ERROR_CANCELED (CY_AS_ERROR_CANCELED)
+
+/*
+ * This error is returned when the call to create sleep channel fails
+ * in the HAL layer.
+ */
+#define CY_AN_ERROR_CREATE_SLEEP_CHANNEL_FAILED (CY_AS_ERROR_CREATE_SLEEP_CHANNEL_FAILED)
+
+/*
+ * This error is returned when the call to CyAnMiscLeaveStandby
+ * is made and the device is not in standby.
+ */
+#define CY_AN_ERROR_NOT_IN_STANDBY (CY_AS_ERROR_NOT_IN_STANDBY)
+
+/*
+ * This error is returned when the call to destroy sleep channel fails
+ * in the HAL layer.
+ */
+#define CY_AN_ERROR_DESTROY_SLEEP_CHANNEL_FAILED (CY_AS_ERROR_DESTROY_SLEEP_CHANNEL_FAILED)
+
+/*
+ * This error is returned when an invalid resource is specified to a call
+ * to CyAnMiscAcquireResource() or CyAnMiscReleaseResource()
+ */
+#define CY_AN_ERROR_INVALID_RESOURCE (CY_AS_ERROR_INVALID_RESOURCE)
+
+/*
+ * This error occurs when an operation is requested on an endpoint that has
+ * a currently pending async operation.
+ */
+#define CY_AN_ERROR_ASYNC_PENDING (CY_AS_ERROR_ASYNC_PENDING)
+
+/*
+ * This error is returned when a call to CyAnStorageCancelAsync() or
+ * CyAnUsbCancelAsync() is made when no asynchronous request is pending.
+ */
+#define CY_AN_ERROR_ASYNC_NOT_PENDING (CY_AS_ERROR_ASYNC_NOT_PENDING)
+
+/*
+ * This error is returned when a request is made to put the West Bridge device
+ * into standby mode while the USB stack is still active.
+ */
+#define CY_AN_ERROR_USB_RUNNING (CY_AS_ERROR_USB_RUNNING)
+
+/*
+ * A request for in the wrong direction was issued on an endpoint.
+ */
+#define CY_AN_ERROR_USB_BAD_DIRECTION (CY_AS_ERROR_USB_BAD_DIRECTION)
+
+/*
+ * An invalid request was received
+ */
+#define CY_AN_ERROR_INVALID_REQUEST (CY_AS_ERROR_INVALID_REQUEST)
+
+/*
+ * An ACK request was requested while no setup packet was pending.
+ */
+#define CY_AN_ERROR_NO_SETUP_PACKET_PENDING (CY_AS_ERROR_NO_SETUP_PACKET_PENDING)
+
+/*
+ * A call was made to a API function that cannot be called from a callback.
+ */
+#define CY_AN_ERROR_INVALID_IN_CALLBACK (CY_AS_ERROR_INVALID_IN_CALLBACK)
+
+/*
+ * A call was made to CyAnUsbSetEndPointConfig() before CyAnUsbSetPhysicalConfiguration()
+ * was called.
+ */
+#define CY_AN_ERROR_ENDPOINT_CONFIG_NOT_SET (CY_AS_ERROR_ENDPOINT_CONFIG_NOT_SET)
+
+/*
+ * The physical endpoint referenced is not valid in the current physical configuration
+ */
+#define CY_AN_ERROR_INVALID_PHYSICAL_ENDPOINT (CY_AS_ERROR_INVALID_PHYSICAL_ENDPOINT)
+
+/*
+ * The data supplied to the CyAnMiscDownloadFirmware() call is not aligned on a
+ * WORD (16 bit) boundary.
+ */
+#define CY_AN_ERROR_ALIGNMENT_ERROR (CY_AS_ERROR_ALIGNMENT_ERROR)
+
+/*
+ * A call was made to destroy the West Bridge device, but the USB stack or the storage
+ * stack was will running.
+ */
+#define CY_AN_ERROR_STILL_RUNNING (CY_AS_ERROR_STILL_RUNNING)
+
+/*
+ * A call was made to the API for a function that is not yet supported.
+ */
+#define CY_AN_ERROR_NOT_YET_SUPPORTED (CY_AS_ERROR_NOT_YET_SUPPORTED)
+
+/*
+ * A NULL callback was provided where a non-NULL callback was required
+ */
+#define CY_AN_ERROR_NULL_CALLBACK (CY_AS_ERROR_NULL_CALLBACK)
+
+/*
+ * This error is returned when a request is made to put the West Bridge device
+ * into standby mode while the storage stack is still active.
+ */
+#define CY_AN_ERROR_STORAGE_RUNNING (CY_AS_ERROR_STORAGE_RUNNING)
+
+/*
+ * This error is returned when an operation is attempted that cannot be completed while
+ * the USB stack is connected to a USB host.
+ */
+#define CY_AN_ERROR_USB_CONNECTED (CY_AS_ERROR_USB_CONNECTED)
+
+/*
+ * This error is returned when a USB disconnect is attempted and the West Bridge device is
+ * not connected.
+ */
+#define CY_AN_ERROR_USB_NOT_CONNECTED (CY_AS_ERROR_USB_NOT_CONNECTED)
+
+/*
+ * This error is returned when an P2S storage operation attempted and data could not be
+ * read or written to the storage media.
+ */
+#define CY_AN_ERROR_MEDIA_ACCESS_FAILURE (CY_AS_ERROR_MEDIA_ACCESS_FAILURE)
+
+/*
+ * This error is returned when an P2S storage operation attempted and the media is write
+ * protected.
+ */
+#define CY_AN_ERROR_MEDIA_WRITE_PROTECTED (CY_AS_ERROR_MEDIA_WRITE_PROTECTED)
+
+/*
+ * This error is returned when an attempt is made to cancel a request that has
+ * already been sent to the West Bridge.
+ */
+#define CY_AN_ERROR_OPERATION_IN_TRANSIT (CY_AS_ERROR_OPERATION_IN_TRANSIT)
+
+/*
+ * This error is returned when an invalid parameter is passed to one of the APIs.
+ */
+#define CY_AN_ERROR_INVALID_PARAMETER (CY_AS_ERROR_INVALID_PARAMETER)
+
+/*
+ * This error is returned if an API is not supported by the current West Bridge device
+ * or the active firmware version.
+ */
+#define CY_AN_ERROR_NOT_SUPPORTED (CY_AS_ERROR_NOT_SUPPORTED)
+
+/*
+ * This error is returned when a call is made to one of the Storage or
+ * USB APIs while the device is in suspend mode.
+ */
+#define CY_AN_ERROR_IN_SUSPEND (CY_AS_ERROR_IN_SUSPEND)
+
+/*
+ * This error is returned when the call to CyAnMiscLeaveSuspend
+ * is made and the device is not in suspend mode.
+ */
+#define CY_AN_ERROR_NOT_IN_SUSPEND (CY_AS_ERROR_NOT_IN_SUSPEND)
+
+/*
+ * This error is returned when a command that is disabled by USB is called.
+ */
+#define CY_AN_ERROR_FEATURE_NOT_ENABLED (CY_AS_ERROR_FEATURE_NOT_ENABLED)
+
+/*
+ * This error is returned when an Async storage read or write is called before a
+ * query device call is issued.
+ */
+#define CY_AN_ERROR_QUERY_DEVICE_NEEDED (CY_AS_ERROR_QUERY_DEVICE_NEEDED)
+
+/*
+ * This error is returned when a call is made to USB or STORAGE Start or Stop before
+ * a prior Start or Stop has finished.
+ */
+#define CY_AN_ERROR_STARTSTOP_PENDING (CY_AS_ERROR_STARTSTOP_PENDING)
+
+/*
+ * This error is returned when a request is made for a bus that does not exist
+ */
+#define CY_AN_ERROR_NO_SUCH_BUS (CY_AS_ERROR_NO_SUCH_BUS)
+
+#endif /* __doxygen__ */
+
+#endif /* _INCLUDED_CYANERR_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyanmedia.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,48 @@
+/* Cypress West Bridge API header file (cyanmedia.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANMEDIA_H_
+#define _INCLUDED_CYANMEDIA_H_
+
+#include "cyas_cplus_start.h"
+
+/* Summary
+ Specifies a specific type of media supported by West Bridge
+
+ Description
+ The West Bridge device supports five specific types of media as storage/IO devices
+ attached to it's S-Port. This type is used to indicate the type of
+ media being referenced in any API call.
+*/
+#include "cyasmedia.h"
+#define CyAnMediaNand CyAsMediaNand /* Flash NAND memory (may be SLC or MLC) */
+#define CyAnMediaSDFlash CyAsMediaSDFlash /* An SD flash memory device */
+#define CyAnMediaMMCFlash CyAsMediaMMCFlash /* An MMC flash memory device */
+#define CyAnMediaCEATA CyAsMediaCEATA /* A CE-ATA disk drive */
+#define CyAnMediaSDIO CyAsMediaSDIO /* SDIO device. */
+#define CyAnMediaMaxMediaValue CyAsMediaMaxMediaValue
+
+typedef CyAsMediaType CyAnMediaType;
+
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYANMEDIA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyanmisc.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,538 @@
+/* Cypress West Bridge API header file (cyanmisc.h)
+ ## Version for backward compatibility with previous Antioch SDK releases.
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANMISC_H_
+#define _INCLUDED_CYANMISC_H_
+
+#include "cyantypes.h"
+#include <cyasmisc.h>
+#include "cyanmedia.h"
+#include "cyas_cplus_start.h"
+
+#define CY_AN_LEAVE_STANDBY_DELAY_CLOCK (CY_AS_LEAVE_STANDBY_DELAY_CLOCK)
+#define CY_AN_RESET_DELAY_CLOCK (CY_AS_RESET_DELAY_CLOCK)
+
+#define CY_AN_LEAVE_STANDBY_DELAY_CRYSTAL (CY_AS_LEAVE_STANDBY_DELAY_CRYSTAL)
+#define CY_AN_RESET_DELAY_CRYSTAL (CY_AS_RESET_DELAY_CRYSTAL)
+
+/* Defines to convert the old CyAn names to the new
+ * CyAs names
+ */
+typedef CyAsDeviceHandle CyAnDeviceHandle;
+
+#define CyAnDeviceDackAck CyAsDeviceDackAck
+#define CyAnDeviceDackEob CyAsDeviceDackEob
+typedef CyAsDeviceDackMode CyAnDeviceDackMode;
+
+typedef CyAsDeviceConfig CyAnDeviceConfig;
+
+#define CyAnResourceUSB CyAsBusUSB
+#define CyAnResourceSDIO_MMC CyAsBus_1
+#define CyAnResourceNand CyAsBus_0
+typedef CyAsResourceType CyAnResourceType;
+
+#define CyAnResetSoft CyAsResetSoft
+#define CyAnResetHard CyAsResetHard
+typedef CyAsResetType CyAnResetType;
+typedef CyAsFunctCBType CyAnFunctCBType;
+typedef CyAsFunctionCallback CyAnFunctionCallback;
+
+#define CyAnEventMiscInitialized CyAsEventMiscInitialized
+#define CyAnEventMiscAwake CyAsEventMiscAwake
+#define CyAnEventMiscHeartBeat CyAsEventMiscHeartBeat
+#define CyAnEventMiscWakeup CyAsEventMiscWakeup
+#define CyAnEventMiscDeviceMismatch CyAsEventMiscDeviceMismatch
+typedef CyAsMiscEventType CyAnMiscEventType;
+typedef CyAsMiscEventCallback CyAnMiscEventCallback;
+
+#define CyAnMiscGpio_0 CyAsMiscGpio_0
+#define CyAnMiscGpio_1 CyAsMiscGpio_1
+#define CyAnMiscGpio_Nand_CE CyAsMiscGpio_Nand_CE
+#define CyAnMiscGpio_Nand_CE2 CyAsMiscGpio_Nand_CE2
+#define CyAnMiscGpio_Nand_WP CyAsMiscGpio_Nand_WP
+#define CyAnMiscGpio_Nand_CLE CyAsMiscGpio_Nand_CLE
+#define CyAnMiscGpio_Nand_ALE CyAsMiscGpio_Nand_ALE
+#define CyAnMiscGpio_UValid CyAsMiscGpio_UValid
+#define CyAnMiscGpio_SD_POW CyAsMiscGpio_SD_POW
+typedef CyAsMiscGpio CyAnMiscGpio;
+
+#define CY_AN_SD_DEFAULT_FREQ CY_AS_SD_DEFAULT_FREQ
+#define CY_AN_SD_RATED_FREQ CY_AS_SD_RATED_FREQ
+typedef CyAsLowSpeedSDFreq CyAnLowSpeedSDFreq;
+
+#define CY_AN_HS_SD_FREQ_48 CY_AS_HS_SD_FREQ_48
+#define CY_AN_HS_SD_FREQ_24 CY_AS_HS_SD_FREQ_24
+typedef CyAsHighSpeedSDFreq CyAnHighSpeedSDFreq;
+
+#define CyAnMiscActiveHigh CyAsMiscActiveHigh
+#define CyAnMiscActiveLow CyAsMiscActiveLow
+typedef CyAsMiscSignalPolarity CyAnMiscSignalPolarity;
+
+typedef CyAsGetFirmwareVersionData CyAnGetFirmwareVersionData;
+
+enum {
+ CYAN_FW_TRACE_LOG_NONE = 0,
+ CYAN_FW_TRACE_LOG_STATE,
+ CYAN_FW_TRACE_LOG_CALLS,
+ CYAN_FW_TRACE_LOG_STACK_TRACE,
+ CYAN_FW_TRACE_MAX_LEVEL
+};
+
+
+/***********************************/
+/***********************************/
+/* FUNCTIONS */
+/***********************************/
+/***********************************/
+
+
+EXTERN CyAnReturnStatus_t
+CyAnMiscCreateDevice(
+ CyAnDeviceHandle * handle_p,
+ CyAnHalDeviceTag tag
+ ) ;
+#define CyAnMiscCreateDevice(h, tag) CyAsMiscCreateDevice((CyAsDeviceHandle *)(h), (CyAsHalDeviceTag)(tag))
+
+EXTERN CyAnReturnStatus_t
+CyAnMiscDestroyDevice(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnMiscDestroyDevice(h) CyAsMiscDestroyDevice((CyAsDeviceHandle)(h))
+
+EXTERN CyAnReturnStatus_t
+CyAnMiscConfigureDevice(
+ CyAnDeviceHandle handle,
+ CyAnDeviceConfig *config_p
+ ) ;
+#define CyAnMiscConfigureDevice(h, cfg) CyAsMiscConfigureDevice((CyAsDeviceHandle)(h), (CyAsDeviceConfig *)(cfg))
+
+EXTERN CyAnReturnStatus_t
+CyAnMiscInStandby(
+ CyAnDeviceHandle handle,
+ CyBool *standby
+ ) ;
+#define CyAnMiscInStandby(h, standby) CyAsMiscInStandby((CyAsDeviceHandle)(h), (standby))
+
+/* Sync version of Download Firmware */
+EXTERN CyAnReturnStatus_t
+CyAnMiscDownloadFirmware(
+ CyAnDeviceHandle handle,
+ const void *fw_p,
+ uint16_t size
+ ) ;
+
+#define CyAnMiscDownloadFirmware(handle, fw_p, size) \
+ CyAsMiscDownloadFirmware((CyAsDeviceHandle)(handle), (fw_p), (size), 0, 0)
+
+/* Async version of Download Firmware */
+EXTERN CyAnReturnStatus_t
+CyAnMiscDownloadFirmwareEX(
+ CyAnDeviceHandle handle,
+ const void *fw_p,
+ uint16_t size,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+#define CyAnMiscDownloadFirmwareEX(h, fw_p, size, cb, client) \
+ CyAsMiscDownloadFirmware((CyAsDeviceHandle)(h), (fw_p), (size), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Get Firmware Version */
+EXTERN CyAnReturnStatus_t
+CyAsMiscGetFirmwareVersion_dep(CyAsDeviceHandle handle,
+ uint16_t *major,
+ uint16_t *minor,
+ uint16_t *build,
+ uint8_t *mediaType,
+ CyBool *isDebugMode);
+
+#define CyAnMiscGetFirmwareVersion(h, major, minor, bld, type, mode) \
+ CyAsMiscGetFirmwareVersion_dep((CyAsDeviceHandle)(h), (major), (minor), (bld), (type), (mode))
+
+/* Async version of Get Firmware Version*/
+EXTERN CyAnReturnStatus_t
+CyAnMiscGetFirmwareVersionEX(
+ CyAnDeviceHandle handle,
+ CyAnGetFirmwareVersionData* data,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscGetFirmwareVersionEX(h, data, cb, client) \
+ CyAsMiscGetFirmwareVersion((CyAsDeviceHandle)(h), (data), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Read MCU Register*/
+EXTERN CyAnReturnStatus_t
+CyAnMiscReadMCURegister(
+ CyAnDeviceHandle handle,
+ uint16_t address,
+ uint8_t *value
+ ) ;
+
+#define CyAnMiscReadMCURegister(handle, address, value) \
+ CyAsMiscReadMCURegister((CyAsDeviceHandle)(handle), (address), (value), 0, 0)
+
+/* Async version of Read MCU Register*/
+EXTERN CyAnReturnStatus_t
+CyAnMiscReadMCURegisterEX(
+ CyAnDeviceHandle handle,
+ uint16_t address,
+ uint8_t *value,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+#define CyAnMiscReadMCURegisterEX(h, addr, val, cb, client) \
+ CyAsMiscReadMCURegister((CyAsDeviceHandle)(h), (addr), (val), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Write MCU Register*/
+EXTERN CyAnReturnStatus_t
+CyAnMiscWriteMCURegister(
+ CyAnDeviceHandle handle,
+ uint16_t address,
+ uint8_t mask,
+ uint8_t value
+ ) ;
+#define CyAnMiscWriteMCURegister(handle, address, mask, value) \
+ CyAsMiscWriteMCURegister((CyAsDeviceHandle)(handle), (address), (mask), (value), 0, 0)
+
+/* Async version of Write MCU Register*/
+EXTERN CyAnReturnStatus_t
+CyAnMiscWriteMCURegisterEX(
+ CyAnDeviceHandle handle,
+ uint16_t address,
+ uint8_t mask,
+ uint8_t value,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscWriteMCURegisterEX(h, addr, mask, val, cb, client) \
+ CyAsMiscWriteMCURegister((CyAsDeviceHandle)(h), (addr), (mask), (val), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Write MCU Register*/
+EXTERN CyAnReturnStatus_t
+CyAnMiscReset(
+ CyAnDeviceHandle handle,
+ CyAnResetType type,
+ CyBool flush
+ ) ;
+#define CyAnMiscReset(handle, type, flush) \
+ CyAsMiscReset((CyAsDeviceHandle)(handle), (type), (flush), 0, 0)
+
+/* Async version of Write MCU Register*/
+EXTERN CyAnReturnStatus_t
+CyAnMiscResetEX(
+ CyAnDeviceHandle handle,
+ CyAnResetType type,
+ CyBool flush,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscResetEX(h, type, flush, cb, client) \
+ CyAsMiscReset((CyAsDeviceHandle)(h), (CyAsResetType)(type), (flush), (CyAsFunctionCallback)(cb), (client))
+
+/* Synchronous version of CyAnMiscAcquireResource. */
+EXTERN CyAnReturnStatus_t
+CyAnMiscAcquireResource(
+ CyAnDeviceHandle handle,
+ CyAnResourceType type,
+ CyBool force
+ ) ;
+#define CyAnMiscAcquireResource(h, type, force) \
+ CyAsMiscAcquireResource_dep((CyAsDeviceHandle)(h), (CyAsResourceType)(type), (force))
+
+/* Asynchronous version of CyAnMiscAcquireResource. */
+EXTERN CyAnReturnStatus_t
+CyAnMiscAcquireResourceEX(
+ CyAnDeviceHandle handle,
+ CyAnResourceType* type,
+ CyBool force,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscAcquireResourceEX(h, type_p, force, cb, client) \
+ CyAsMiscAcquireResource((CyAsDeviceHandle)(h), (CyAsResourceType *)(type_p), \
+ (force), (CyAsFunctionCallback)(cb), (client))
+
+/* The one and only version of Release resource */
+EXTERN CyAnReturnStatus_t
+CyAnMiscReleaseResource(
+ CyAnDeviceHandle handle,
+ CyAnResourceType type
+ ) ;
+#define CyAnMiscReleaseResource(h, type) \
+ CyAsMiscReleaseResource((CyAsDeviceHandle)(h), (CyAsResourceType)(type))
+
+/* Synchronous version of CyAnMiscSetTraceLevel. */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetTraceLevel(
+ CyAnDeviceHandle handle,
+ uint8_t level,
+ CyAnMediaType media,
+ uint32_t device,
+ uint32_t unit
+ ) ;
+
+#define CyAnMiscSetTraceLevel(handle, level, media, device, unit) \
+ CyAsMiscSetTraceLevel_dep((CyAsDeviceHandle)(handle), (level), (CyAsMediaType)(media), (device), (unit), 0, 0)
+
+/* Asynchronous version of CyAnMiscSetTraceLevel. */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetTraceLevelEX(
+ CyAnDeviceHandle handle,
+ uint8_t level,
+ CyAnMediaType media,
+ uint32_t device,
+ uint32_t unit,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscSetTraceLevelEX(h, level, media, device, unit, cb, client) \
+ CyAsMiscSetTraceLevel_dep((CyAsDeviceHandle)(h), (level), (CyAsMediaType)(media), (device), (unit), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* Synchronous version of CyAnMiscEnterStandby. */
+EXTERN CyAnReturnStatus_t
+CyAnMiscEnterStandby(
+ CyAnDeviceHandle handle,
+ CyBool pin
+ ) ;
+#define CyAnMiscEnterStandby(handle, pin) \
+ CyAsMiscEnterStandby((CyAsDeviceHandle)(handle), (pin), 0, 0)
+
+/* Synchronous version of CyAnMiscEnterStandby. */
+EXTERN CyAnReturnStatus_t
+CyAnMiscEnterStandbyEX(
+ CyAnDeviceHandle handle,
+ CyBool pin,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscEnterStandbyEX(h, pin, cb, client) \
+ CyAsMiscEnterStandby((CyAsDeviceHandle)(h), (pin), (CyAsFunctionCallback)(cb), (client))
+
+/* Only one version of CyAnMiscLeaveStandby. */
+EXTERN CyAnReturnStatus_t
+CyAnMiscLeaveStandby(
+ CyAnDeviceHandle handle,
+ CyAnResourceType type
+ ) ;
+#define CyAnMiscLeaveStandby(h, type) \
+ CyAsMiscLeaveStandby((CyAsDeviceHandle)(h), (CyAsResourceType)(type))
+
+/* The one version of Misc Register Callback */
+EXTERN CyAnReturnStatus_t
+CyAnMiscRegisterCallback(
+ CyAnDeviceHandle handle,
+ CyAnMiscEventCallback callback
+ ) ;
+#define CyAnMiscRegisterCallback(h, cb) \
+ CyAsMiscRegisterCallback((CyAsDeviceHandle)(h), (CyAsMiscEventCallback)(cb))
+
+/* The only version of SetLogLevel */
+EXTERN void
+CyAnMiscSetLogLevel(
+ uint8_t level
+ ) ;
+#define CyAnMiscSetLogLevel(level) CyAsMiscSetLogLevel(level)
+
+/* Sync version of Misc Storage Changed */
+EXTERN CyAnReturnStatus_t
+CyAnMiscStorageChanged(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnMiscStorageChanged(handle) \
+ CyAsMiscStorageChanged((CyAsDeviceHandle)(handle), 0, 0)
+
+/* Async version of Misc Storage Changed */
+EXTERN CyAnReturnStatus_t
+CyAnMiscStorageChangedEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscStorageChangedEX(h, cb, client) \
+ CyAsMiscStorageChanged((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Heartbeat control */
+EXTERN CyAnReturnStatus_t
+CyAnMiscHeartBeatControl(
+ CyAnDeviceHandle handle,
+ CyBool enable
+ ) ;
+#define CyAnMiscHeartBeatControl(handle, enable) \
+ CyAsMiscHeartBeatControl((CyAsDeviceHandle)(handle), (enable), 0, 0)
+
+/* Async version of Heartbeat control */
+EXTERN CyAnReturnStatus_t
+CyAnMiscHeartBeatControlEX(
+ CyAnDeviceHandle handle,
+ CyBool enable,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscHeartBeatControlEX(h, enable, cb, client) \
+ CyAsMiscHeartBeatControl((CyAsDeviceHandle)(h), (enable), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Get Gpio */
+EXTERN CyAnReturnStatus_t
+CyAnMiscGetGpioValue(
+ CyAnDeviceHandle handle,
+ CyAnMiscGpio pin,
+ uint8_t *value
+ ) ;
+#define CyAnMiscGetGpioValue(handle, pin, value) \
+ CyAsMiscGetGpioValue((CyAsDeviceHandle)(handle), (CyAsMiscGpio)(pin), (value), 0, 0)
+
+/* Async version of Get Gpio */
+EXTERN CyAnReturnStatus_t
+CyAnMiscGetGpioValueEX(
+ CyAnDeviceHandle handle,
+ CyAnMiscGpio pin,
+ uint8_t *value,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscGetGpioValueEX(h, pin, value, cb, client) \
+ CyAsMiscGetGpioValue((CyAsDeviceHandle)(h), (CyAsMiscGpio)(pin), (value), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Set Gpio */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetGpioValue(
+ CyAnDeviceHandle handle,
+ CyAnMiscGpio pin,
+ uint8_t value
+ ) ;
+#define CyAnMiscSetGpioValue(handle, pin, value) \
+ CyAsMiscSetGpioValue((CyAsDeviceHandle)(handle), (CyAsMiscGpio)(pin), (value), 0, 0)
+
+/* Async version of Set Gpio */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetGpioValueEX(
+ CyAnDeviceHandle handle,
+ CyAnMiscGpio pin,
+ uint8_t value,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscSetGpioValueEX(h, pin, value, cb, client) \
+ CyAsMiscSetGpioValue((CyAsDeviceHandle)(h), (CyAsMiscGpio)(pin), (value), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Enter suspend */
+EXTERN CyAnReturnStatus_t
+CyAnMiscEnterSuspend(
+ CyAnDeviceHandle handle,
+ CyBool usb_wakeup_en,
+ CyBool gpio_wakeup_en
+ ) ;
+#define CyAnMiscEnterSuspend(handle, usb_wakeup_en, gpio_wakeup_en) \
+ CyAsMiscEnterSuspend((CyAsDeviceHandle)(handle), (usb_wakeup_en), (gpio_wakeup_en), 0, 0)
+
+/* Async version of Enter suspend */
+EXTERN CyAnReturnStatus_t
+CyAnMiscEnterSuspendEX(
+ CyAnDeviceHandle handle,
+ CyBool usb_wakeup_en,
+ CyBool gpio_wakeup_en,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscEnterSuspendEX(h, usb_en, gpio_en, cb, client) \
+ CyAsMiscEnterSuspend((CyAsDeviceHandle)(h), (usb_en), (gpio_en), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Enter suspend */
+EXTERN CyAnReturnStatus_t
+CyAnMiscLeaveSuspend(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnMiscLeaveSuspend(handle) \
+ CyAsMiscLeaveSuspend((CyAsDeviceHandle)(handle), 0, 0)
+
+/* Async version of Enter suspend */
+EXTERN CyAnReturnStatus_t
+CyAnMiscLeaveSuspendEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+#define CyAnMiscLeaveSuspendEX(h, cb, client) \
+ CyAsMiscLeaveSuspend((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of SetLowSpeedSDFreq */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetLowSpeedSDFreq(
+ CyAnDeviceHandle handle,
+ CyAnLowSpeedSDFreq setting
+ ) ;
+#define CyAnMiscSetLowSpeedSDFreq(h, setting) \
+ CyAsMiscSetLowSpeedSDFreq((CyAsDeviceHandle)(h), (CyAsLowSpeedSDFreq)(setting), 0, 0)
+
+/* Async version of SetLowSpeedSDFreq */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetLowSpeedSDFreqEX(
+ CyAnDeviceHandle handle,
+ CyAnLowSpeedSDFreq setting,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscSetLowSpeedSDFreqEX(h, setting, cb, client) \
+ CyAsMiscSetLowSpeedSDFreq((CyAsDeviceHandle)(h), (CyAsLowSpeedSDFreq)(setting), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* SetHighSpeedSDFreq */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetHighSpeedSDFreq(
+ CyAnDeviceHandle handle,
+ CyAnHighSpeedSDFreq setting,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnMiscSetHighSpeedSDFreq(h, setting, cb, client) \
+ CyAsMiscSetHighSpeedSDFreq((CyAsDeviceHandle)(h), (CyAsHighSpeedSDFreq)(setting), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* ReserveLNABootArea */
+EXTERN CyAnReturnStatus_t
+CyAnMiscReserveLNABootArea(
+ CyAnDeviceHandle handle,
+ uint8_t numzones,
+ CyAnFunctionCallback cb,
+ uint32_t client);
+#define CyAnMiscReserveLNABootArea(h, num, cb, client) \
+ CyAsMiscReserveLNABootArea((CyAsDeviceHandle)(h), num, (CyAsFunctionCallback)(cb), \
+ (client))
+
+/* SetSDPowerPolarity */
+EXTERN CyAnReturnStatus_t
+CyAnMiscSetSDPowerPolarity(
+ CyAnDeviceHandle handle,
+ CyAnMiscSignalPolarity polarity,
+ CyAnFunctionCallback cb,
+ uint32_t client);
+#define CyAnMiscSetSDPowerPolarity(h, pol, cb, client) \
+ CyAsMiscSetSDPowerPolarity((CyAsDeviceHandle)(h), (CyAsMiscSignalPolarity)(pol), \
+ (CyAsFunctionCallback)(cb), (client))
+
+#include "cyas_cplus_end.h"
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyanregs.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,180 @@
+/* Cypress West Bridge API header file (cyanregs.h)
+ ## Register and field definitions for the Antioch device.
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANREG_H_
+#define _INCLUDED_CYANREG_H_
+
+#if !defined(__doxygen__)
+
+#define CY_AN_MEM_CM_WB_CFG_ID (0x80)
+#define CY_AN_MEM_CM_WB_CFG_ID_VER_MASK (0x000F)
+#define CY_AN_MEM_CM_WB_CFG_ID_HDID_MASK (0xFFF0)
+#define CY_AN_MEM_CM_WB_CFG_ID_HDID_ANTIOCH_VALUE (0xA100)
+#define CY_AN_MEM_CM_WB_CFG_ID_HDID_ASTORIA_FPGA_VALUE (0x6800)
+#define CY_AN_MEM_CM_WB_CFG_ID_HDID_ASTORIA_VALUE (0xA200)
+
+
+#define CY_AN_MEM_RST_CTRL_REG (0x81)
+#define CY_AN_MEM_RST_CTRL_REG_HARD (0x0003)
+#define CY_AN_MEM_RST_CTRL_REG_SOFT (0x0001)
+#define CY_AN_MEM_RST_RSTCMPT (0x0004)
+
+#define CY_AN_MEM_P0_ENDIAN (0x82)
+#define CY_AN_LITTLE_ENDIAN (0x0000)
+#define CY_AN_BIG_ENDIAN (0x0101)
+
+#define CY_AN_MEM_P0_VM_SET (0x83)
+#define CY_AN_MEM_P0_VM_SET_VMTYPE_MASK (0x0007)
+#define CY_AN_MEM_P0_VM_SET_VMTYPE_RAM (0x0005)
+#define CY_AN_MEM_P0_VM_SET_VMTYPE_VMWIDTH (0x0008)
+#define CY_AN_MEM_P0_VM_SET_VMTYPE_FLOWCTRL (0x0010)
+#define CY_AN_MEM_P0_VM_SET_IFMODE (0x0020)
+#define CY_AN_MEM_P0_VM_SET_CFGMODE (0x0040)
+#define CY_AN_MEM_P0_VM_SET_DACKEOB (0x0080)
+#define CY_AN_MEM_P0_VM_SET_OVERRIDE (0x0100)
+#define CY_AN_MEM_P0_VM_SET_INTOVERD (0x0200)
+#define CY_AN_MEM_P0_VM_SET_DRQOVERD (0x0400)
+#define CY_AN_MEM_P0_VM_SET_DRQPOL (0x0800)
+#define CY_AN_MEM_P0_VM_SET_DACKPOL (0x1000)
+
+
+#define CY_AN_MEM_P0_NV_SET (0x84)
+#define CY_AN_MEM_P0_NV_SET_WPSWEN (0x0001)
+#define CY_AN_MEM_P0_NV_SET_WPPOLAR (0x0002)
+
+#define CY_AN_MEM_PMU_UPDATE (0x85)
+#define CY_AN_MEM_PMU_UPDATE_UVALID (0x0001)
+#define CY_AN_MEM_PMU_UPDATE_USBUPDATE (0x0002)
+#define CY_AN_MEM_PMU_UPDATE_SDIOUPDATE (0x0004)
+
+#define CY_AN_MEM_P0_INTR_REG (0x90)
+#define CY_AN_MEM_P0_INTR_REG_MCUINT (0x0020)
+#define CY_AN_MEM_P0_INTR_REG_DRQINT (0x0800)
+#define CY_AN_MEM_P0_INTR_REG_MBINT (0x1000)
+#define CY_AN_MEM_P0_INTR_REG_PMINT (0x2000)
+#define CY_AN_MEM_P0_INTR_REG_PLLLOCKINT (0x4000)
+
+#define CY_AN_MEM_P0_INT_MASK_REG (0x91)
+#define CY_AN_MEM_P0_INT_MASK_REG_MMCUINT (0x0020)
+#define CY_AN_MEM_P0_INT_MASK_REG_MDRQINT (0x0800)
+#define CY_AN_MEM_P0_INT_MASK_REG_MMBINT (0x1000)
+#define CY_AN_MEM_P0_INT_MASK_REG_MPMINT (0x2000)
+#define CY_AN_MEM_P0_INT_MASK_REG_MPLLLOCKINT (0x4000)
+
+#define CY_AN_MEM_MCU_MB_STAT (0x92)
+#define CY_AN_MEM_P0_MCU_MBNOTRD (0x0001)
+
+#define CY_AN_MEM_P0_MCU_STAT (0x94)
+#define CY_AN_MEM_P0_MCU_STAT_CARDINS (0x0001)
+#define CY_AN_MEM_P0_MCU_STAT_CARDREM (0x0002)
+
+#define CY_AN_MEM_PWR_MAGT_STAT (0x95)
+#define CY_AN_MEM_PWR_MAGT_STAT_WAKEUP (0x0001)
+
+#define CY_AN_MEM_P0_RSE_ALLOCATE (0x98)
+#define CY_AN_MEM_P0_RSE_ALLOCATE_SDIOAVI (0x0001)
+#define CY_AN_MEM_P0_RSE_ALLOCATE_SDIOALLO (0x0002)
+#define CY_AN_MEM_P0_RSE_ALLOCATE_NANDAVI (0x0004)
+#define CY_AN_MEM_P0_RSE_ALLOCATE_NANDALLO (0x0008)
+#define CY_AN_MEM_P0_RSE_ALLOCATE_USBAVI (0x0010)
+#define CY_AN_MEM_P0_RSE_ALLOCATE_USBALLO (0x0020)
+
+#define CY_AN_MEM_P0_RSE_MASK (0x9A)
+#define CY_AN_MEM_P0_RSE_MASK_MSDIOBUS_RW (0x0003)
+#define CY_AN_MEM_P0_RSE_MASK_MNANDBUS_RW (0x00C0)
+#define CY_AN_MEM_P0_RSE_MASK_MUSBBUS_RW (0x0030)
+
+#define CY_AN_MEM_P0_DRQ (0xA0)
+#define CY_AN_MEM_P0_DRQ_EP2DRQ (0x0004)
+#define CY_AN_MEM_P0_DRQ_EP3DRQ (0x0008)
+#define CY_AN_MEM_P0_DRQ_EP4DRQ (0x0010)
+#define CY_AN_MEM_P0_DRQ_EP5DRQ (0x0020)
+#define CY_AN_MEM_P0_DRQ_EP6DRQ (0x0040)
+#define CY_AN_MEM_P0_DRQ_EP7DRQ (0x0080)
+#define CY_AN_MEM_P0_DRQ_EP8DRQ (0x0100)
+#define CY_AN_MEM_P0_DRQ_EP9DRQ (0x0200)
+#define CY_AN_MEM_P0_DRQ_EP10DRQ (0x0400)
+#define CY_AN_MEM_P0_DRQ_EP11DRQ (0x0800)
+#define CY_AN_MEM_P0_DRQ_EP12DRQ (0x1000)
+#define CY_AN_MEM_P0_DRQ_EP13DRQ (0x2000)
+#define CY_AN_MEM_P0_DRQ_EP14DRQ (0x4000)
+#define CY_AN_MEM_P0_DRQ_EP15DRQ (0x8000)
+
+#define CY_AN_MEM_P0_DRQ_MASK (0xA1)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP2DRQ (0x0004)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP3DRQ (0x0008)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP4DRQ (0x0010)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP5DRQ (0x0020)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP6DRQ (0x0040)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP7DRQ (0x0080)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP8DRQ (0x0100)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP9DRQ (0x0200)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP10DRQ (0x0400)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP11DRQ (0x0800)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP12DRQ (0x1000)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP13DRQ (0x2000)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP14DRQ (0x4000)
+#define CY_AN_MEM_P0_DRQ_MASK_MEP15DRQ (0x8000)
+
+#define CY_AN_MEM_P0_EP2_DMA_REG (0xA2)
+#define CY_AN_MEM_P0_EPn_DMA_REG_COUNT_MASK (0x7FF)
+#define CY_AN_MEM_P0_EPn_DMA_REG_DMAVAL (1 << 12)
+#define CY_AN_MEM_P0_EP3_DMA_REG (0xA3)
+#define CY_AN_MEM_P0_EP4_DMA_REG (0xA4)
+#define CY_AN_MEM_P0_EP5_DMA_REG (0xA5)
+#define CY_AN_MEM_P0_EP6_DMA_REG (0xA6)
+#define CY_AN_MEM_P0_EP7_DMA_REG (0xA7)
+#define CY_AN_MEM_P0_EP8_DMA_REG (0xA8)
+#define CY_AN_MEM_P0_EP9_DMA_REG (0xA9)
+#define CY_AN_MEM_P0_EP10_DMA_REG (0xAA)
+#define CY_AN_MEM_P0_EP11_DMA_REG (0xAB)
+#define CY_AN_MEM_P0_EP12_DMA_REG (0xAC)
+#define CY_AN_MEM_P0_EP13_DMA_REG (0xAD)
+#define CY_AN_MEM_P0_EP14_DMA_REG (0xAE)
+#define CY_AN_MEM_P0_EP15_DMA_REG (0xAF)
+
+#define CY_AN_MEM_IROS_IO_CFG (0xC1)
+#define CY_AN_MEM_IROS_IO_CFG_GPIODRVST_MASK (0x0003)
+#define CY_AN_MEM_IROS_IO_CFG_GPIOSLEW_MASK (0x0004)
+#define CY_AN_MEM_IROS_IO_CFG_PPIODRVST_MASK (0x0018)
+#define CY_AN_MEM_IROS_IO_CFG_PPIOSLEW_MASK (0x0020)
+#define CY_AN_MEM_IROS_IO_CFG_SSIODRVST_MASK (0x0300)
+#define CY_AN_MEM_IROS_IO_CFG_SSIOSLEW_MASK (0x0400)
+#define CY_AN_MEM_IROS_IO_CFG_SNIODRVST_MASK (0x1800)
+#define CY_AN_MEM_IROS_IO_CFG_SNIOSLEW_MASK (0x2000)
+
+#define CY_AN_MEM_PLL_LOCK_LOSS_STAT (0xC4)
+#define CY_AN_MEM_PLL_LOCK_LOSS_STAT_PLLSTAT (0x0800)
+
+#define CY_AN_MEM_P0_MAILBOX0 (0xF0)
+#define CY_AN_MEM_P0_MAILBOX1 (0xF1)
+#define CY_AN_MEM_P0_MAILBOX2 (0xF2)
+#define CY_AN_MEM_P0_MAILBOX3 (0xF3)
+
+#define CY_AN_MEM_MCU_MAILBOX0 (0xF8)
+#define CY_AN_MEM_MCU_MAILBOX1 (0xF9)
+#define CY_AN_MEM_MCU_MAILBOX2 (0xFA)
+#define CY_AN_MEM_MCU_MAILBOX3 (0xFB)
+
+#endif /* !defined(__doxygen__) */
+
+#endif /* _INCLUDED_CYANREG_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyansdkversion.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,30 @@
+/* Cypress Antioch Sdk Version file (cyansdkversion.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANSDK_VERSION_H_
+#define _INCLUDED_CYANSDK_VERSION_H_
+
+/* Antioch SDK version 1.3.2 */
+#define CYAN_MAJOR_VERSION (1)
+#define CYAN_MINOR_VERSION (3)
+#define CYAN_BUILD_NUMBER (473)
+
+#endif /*_INCLUDED_CYANSDK_VERSION_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyanstorage.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,371 @@
+/* Cypress West Bridge API header file (cyanstorage.h)
+ ## Header for backward compatibility with previous releases of Antioch SDK.
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANSTORAGE_H_
+#define _INCLUDED_CYANSTORAGE_H_
+#ifndef __doxygen__
+
+#include "cyanmedia.h"
+#include "cyanmisc.h"
+#include "cyasstorage.h"
+#include "cyas_cplus_start.h"
+
+#define CY_AN_LUN_PHYSICAL_DEVICE (CY_AS_LUN_PHYSICAL_DEVICE)
+#define CY_AN_STORAGE_EP_SIZE (CY_AS_STORAGE_EP_SIZE)
+
+#define CyAnStorageAntioch CyAsStorageAntioch
+#define CyAnStorageProcessor CyAsStorageProcessor
+#define CyAnStorageRemoved CyAsStorageRemoved
+#define CyAnStorageInserted CyAsStorageInserted
+#define CyAnSdioInterrupt CyAsSdioInterrupt
+typedef CyAsStorageEvent CyAnStorageEvent;
+
+#define CyAnOpRead CyAsOpRead
+#define CyAnOpWrite CyAsOpWrite
+typedef CyAsOperType CyAnOperType;
+
+typedef CyAsDeviceDesc CyAnDeviceDesc;
+
+typedef CyAsUnitDesc CyAnUnitDesc;
+
+typedef CyAsStorageCallback_dep CyAnStorageCallback;
+
+typedef CyAsStorageEventCallback_dep CyAnStorageEventCallback;
+
+#define CyAnSDReg_OCR CyAsSDReg_OCR
+#define CyAnSDReg_CID CyAsSDReg_CID
+#define CyAnSDReg_CSD CyAsSDReg_CSD
+typedef CyAsSDCardRegType CyAnSDCardRegType;
+
+typedef CyAsStorageQueryDeviceData_dep CyAnStorageQueryDeviceData ;
+
+typedef CyAsStorageQueryUnitData_dep CyAnStorageQueryUnitData ;
+
+typedef CyAsStorageSDRegReadData CyAnStorageSDRegReadData;
+
+#define CY_AN_SD_REG_OCR_LENGTH (CY_AS_SD_REG_OCR_LENGTH)
+#define CY_AN_SD_REG_CID_LENGTH (CY_AS_SD_REG_CID_LENGTH)
+#define CY_AN_SD_REG_CSD_LENGTH (CY_AS_SD_REG_CSD_LENGTH)
+#define CY_AN_SD_REG_MAX_RESP_LENGTH (CY_AS_SD_REG_MAX_RESP_LENGTH)
+
+/**** API Functions ******/
+
+/* Sync version of Storage Start */
+EXTERN CyAnReturnStatus_t
+CyAnStorageStart(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnStorageStart(handle) CyAsStorageStart((CyAsDeviceHandle)(handle), 0, 0)
+
+/* Async version of Storage Start */
+EXTERN CyAnReturnStatus_t
+CyAnStorageStartEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageStartEX(h, cb, client) \
+ CyAsStorageStart((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Storage Stop */
+EXTERN CyAnReturnStatus_t
+CyAnStorageStop(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnStorageStop(handle) CyAsStorageStop((CyAsDeviceHandle)(handle), 0, 0)
+
+/* Async version of Storage Stop */
+EXTERN CyAnReturnStatus_t
+CyAnStorageStopEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageStopEX(h, cb, client) \
+ CyAsStorageStop((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Register Call back api */
+EXTERN CyAnReturnStatus_t
+CyAnStorageRegisterCallback(
+ CyAnDeviceHandle handle,
+ CyAnStorageEventCallback callback
+ ) ;
+#define CyAnStorageRegisterCallback(h, cb) \
+ CyAsStorageRegisterCallback_dep((CyAsDeviceHandle)(h), (CyAsStorageEventCallback_dep)(cb))
+
+/* Sync version of Storage Claim */
+EXTERN CyAnReturnStatus_t
+CyAnStorageClaim(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type
+ ) ;
+#define CyAnStorageClaim(h, type) \
+ CyAsStorageClaim_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type))
+
+/* Async version of Storage Claim */
+EXTERN CyAnReturnStatus_t
+CyAnStorageClaimEX(
+ CyAnDeviceHandle handle,
+ CyAnMediaType* type,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageClaimEX(h, type_p, cb, client) \
+ CyAsStorageClaim_dep_EX((CyAsDeviceHandle)(h), (CyAsMediaType *)(type_p), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync Version of Storage Release */
+EXTERN CyAnReturnStatus_t
+CyAnStorageRelease(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type
+ ) ;
+#define CyAnStorageRelease(h, type) \
+ CyAsStorageRelease_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type))
+
+/* Async Version of Storage Release */
+EXTERN CyAnReturnStatus_t
+CyAnStorageReleaseEX(
+ CyAnDeviceHandle handle,
+ CyAnMediaType* type,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageReleaseEX(h, type_p, cb, client) \
+ CyAsStorageRelease_dep_EX((CyAsDeviceHandle)(h), (CyAsMediaType *)(type_p), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Query Media */
+EXTERN CyAnReturnStatus_t
+CyAnStorageQueryMedia(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t * count
+ ) ;
+#define CyAnStorageQueryMedia(handle, type, count) \
+ CyAsStorageQueryMedia((CyAsDeviceHandle)(handle), (CyAsMediaType)(type), (count), 0, 0)
+
+/* Async version of Query Media */
+EXTERN CyAnReturnStatus_t
+CyAnStorageQueryMediaEX(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t * count,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageQueryMediaEX(h, type, count, cb, client) \
+ CyAsStorageQueryMedia((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (count), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Query device */
+EXTERN CyAnReturnStatus_t
+CyAnStorageQueryDevice(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t device,
+ CyAnDeviceDesc * desc_p
+ ) ;
+#define CyAnStorageQueryDevice(h, type, device, desc_p) \
+ CyAsStorageQueryDevice_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), (CyAsDeviceDesc *)(desc_p))
+
+/* Async version of Query device */
+EXTERN CyAnReturnStatus_t
+CyAnStorageQueryDeviceEX(
+ CyAnDeviceHandle handle,
+ CyAnStorageQueryDeviceData* data,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageQueryDeviceEX(h, data, cb, client) \
+ CyAsStorageQueryDevice_dep_EX((CyAsDeviceHandle)(h), (CyAsStorageQueryDeviceData_dep *)(data), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Query Unit */
+EXTERN CyAnReturnStatus_t
+CyAnStorageQueryUnit(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t device,
+ uint32_t unit,
+ CyAnUnitDesc * desc_p
+ ) ;
+#define CyAnStorageQueryUnit(h, type, device, unit, desc_p) \
+ CyAsStorageQueryUnit_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), (unit), (CyAsUnitDesc *)(desc_p))
+
+/* Async version of Query Unit */
+EXTERN CyAnReturnStatus_t
+CyAnStorageQueryUnitEX(
+ CyAnDeviceHandle handle,
+ CyAnStorageQueryUnitData* data_p,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageQueryUnitEX(h, data_p, cb, client) \
+ CyAsStorageQueryUnit_dep_EX((CyAsDeviceHandle)(h), (CyAsStorageQueryUnitData_dep *)(data_p), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of device control */
+EXTERN CyAnReturnStatus_t
+CyAnStorageDeviceControl(
+ CyAnDeviceHandle handle,
+ CyBool card_detect_en,
+ CyBool write_prot_en
+ ) ;
+#define CyAnStorageDeviceControl(handle, card_detect_en, write_prot_en) \
+ CyAsStorageDeviceControl_dep((CyAsDeviceHandle)(handle), (card_detect_en), (write_prot_en), 0, 0)
+
+/* Async version of device control */
+EXTERN CyAnReturnStatus_t
+CyAnStorageDeviceControlEX(
+ CyAnDeviceHandle handle,
+ CyBool card_detect_en,
+ CyBool write_prot_en,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageDeviceControlEX(h, det_en, prot_en, cb, client) \
+ CyAsStorageDeviceControl_dep((CyAsDeviceHandle)(h), (det_en), (prot_en), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync Read */
+EXTERN CyAnReturnStatus_t
+CyAnStorageRead(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t device,
+ uint32_t unit,
+ uint32_t block,
+ void * data_p,
+ uint16_t num_blocks
+ ) ;
+#define CyAnStorageRead(h, type, device, unit, block, data_p, nblks) \
+ CyAsStorageRead_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), (unit), (block), (data_p), (nblks))
+
+/* Async Read */
+EXTERN CyAnReturnStatus_t
+CyAnStorageReadAsync(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t device,
+ uint32_t unit,
+ uint32_t block,
+ void * data_p,
+ uint16_t num_blocks,
+ CyAnStorageCallback callback
+ ) ;
+#define CyAnStorageReadAsync(h, type, device, unit, block, data_p, nblks, cb) \
+ CyAsStorageReadAsync_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), (unit), (block), \
+ (data_p), (nblks), (CyAsStorageCallback_dep)(cb))
+
+/* Sync Write */
+EXTERN CyAnReturnStatus_t
+CyAnStorageWrite(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t device,
+ uint32_t unit,
+ uint32_t block,
+ void * data_p,
+ uint16_t num_blocks
+ ) ;
+#define CyAnStorageWrite(h, type, device, unit, block, data_p, nblks) \
+ CyAsStorageWrite_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), (unit), (block), (data_p), (nblks))
+
+/* Async Write */
+EXTERN CyAnReturnStatus_t
+CyAnStorageWriteAsync(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint32_t device,
+ uint32_t unit,
+ uint32_t block,
+ void * data_p,
+ uint16_t num_blocks,
+ CyAnStorageCallback callback
+ ) ;
+#define CyAnStorageWriteAsync(h, type, device, unit, block, data_p, nblks, cb) \
+ CyAsStorageWriteAsync_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), (unit), (block), \
+ (data_p), (nblks), (CyAsStorageCallback_dep)(cb))
+
+/* Cancel Async */
+EXTERN CyAnReturnStatus_t
+CyAnStorageCancelAsync(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnStorageCancelAsync(h) CyAsStorageCancelAsync((CyAsDeviceHandle)(h))
+
+/* Sync SD Register Read*/
+EXTERN CyAnReturnStatus_t
+CyAnStorageSDRegisterRead(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint8_t device,
+ CyAnSDCardRegType regType,
+ uint8_t readLen,
+ uint8_t *data_p
+ ) ;
+#define CyAnStorageSDRegisterRead(h, type, device, regType, len, data_p) \
+ CyAsStorageSDRegisterRead_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), \
+ (CyAsSDCardRegType)(regType), (len), (data_p))
+
+/*Async SD Register Read*/
+EXTERN CyAnReturnStatus_t
+CyAnStorageSDRegisterReadEX(
+ CyAnDeviceHandle handle,
+ CyAnMediaType type,
+ uint8_t device,
+ CyAnSDCardRegType regType,
+ CyAnStorageSDRegReadData *data_p,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnStorageSDRegisterReadEX(h, type, device, regType, data_p, cb, client) \
+ CyAsStorageSDRegisterRead_dep_EX((CyAsDeviceHandle)(h), (CyAsMediaType)(type), (device), \
+ (CyAsSDCardRegType)(regType), (CyAsStorageSDRegReadData *)(data_p), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* Create partition on storage device */
+EXTERN CyAnReturnStatus_t
+CyAnStorageCreatePPartition(
+ CyAnDeviceHandle handle,
+ CyAnMediaType media,
+ uint32_t device,
+ uint32_t size,
+ CyAnFunctionCallback cb,
+ uint32_t client) ;
+#define CyAnStorageCreatePPartition(h, media, dev, size, cb, client) \
+ CyAsStorageCreatePPartition_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(media), (dev), \
+ (size), (CyAsFunctionCallback)(cb), (client))
+
+/* Remove partition on storage device */
+EXTERN CyAnReturnStatus_t
+CyAnStorageRemovePPartition(
+ CyAnDeviceHandle handle,
+ CyAnMediaType media,
+ uint32_t device,
+ CyAnFunctionCallback cb,
+ uint32_t client) ;
+#define CyAnStorageRemovePPartition(h, media, dev, cb, client) \
+ CyAsStorageRemovePPartition_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(media), (dev), \
+ (CyAsFunctionCallback)(cb), (client))
+
+#include "cyas_cplus_end.h"
+#endif /*__doxygen__ */
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyantioch.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,35 @@
+/* Cypress West Bridge API header file (cyastioch.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANTIOCH_H_
+#define _INCLUDED_CYANTIOCH_H_
+
+#if !defined(__doxygen__)
+
+#include "cyanerr.h"
+#include "cyanmisc.h"
+#include "cyanstorage.h"
+#include "cyanusb.h"
+#include "cyanch9.h"
+
+#endif
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyantypes.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,30 @@
+/* Cypress West Bridge API header file (cyantypes.h)
+ ## Type definitions for backward compatibility with previous Antioch SDK releases.
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANTYPES_H_
+#define _INCLUDED_CYANTYPES_H_
+
+#include "cyastypes.h"
+typedef CyAsEndPointNumber_t CyAnEndPointNumber_t ;
+typedef CyAsReturnStatus_t CyAnReturnStatus_t ;
+typedef CyAsBusNumber_t CyAnBusNumber_t ;
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyanusb.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,552 @@
+/* Cypress West Bridge API header file (cyanusb.h)
+ ## Header for backward compatibility with previous Antioch SDK releases.
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYANUSB_H_
+#define _INCLUDED_CYANUSB_H_
+
+#if !defined(__doxygen__)
+
+#include "cyanmisc.h"
+#include "cyasusb.h"
+#include "cyas_cplus_start.h"
+
+#define CY_AN_MAX_USB_DESCRIPTOR_SIZE (CY_AS_MAX_USB_DESCRIPTOR_SIZE)
+
+typedef CyAsUsbInquiryData_dep CyAnUsbInquiryData;
+typedef CyAsUsbUnknownCommandData_dep CyAnUsbUnknownCommandData ;
+typedef CyAsUsbStartStopData_dep CyAnUsbStartStopData ;
+typedef CyAsMSCProgressData CyAnMSCProgressData ;
+
+#define CyAnUsbNandEnum CyAsUsbNandEnum
+#define CyAnUsbSDEnum CyAsUsbSDEnum
+#define CyAnUsbMMCEnum CyAsUsbMMCEnum
+#define CyAnUsbCEATAEnum CyAsUsbCEATAEnum
+typedef CyAsUsbMassStorageEnum CyAnUsbMassStorageEnum;
+
+#define CyAnUsbDescDevice CyAsUsbDescDevice
+#define CyAnUsbDescDeviceQual CyAsUsbDescDeviceQual
+#define CyAnUsbDescFSConfiguration CyAsUsbDescFSConfiguration
+#define CyAnUsbDescHSConfiguration CyAsUsbDescHSConfiguration
+#define CyAnUsbDescString CyAsUsbDescString
+typedef CyAsUsbDescType CyAnUsbDescType ;
+
+#define CyAnUsbIn CyAsUsbIn
+#define CyAnUsbOut CyAsUsbOut
+#define CyAnUsbInOut CyAsUsbInOut
+typedef CyAsUsbEndPointDir CyAnUsbEndPointDir ;
+
+
+#define CyAnUsbControl CyAsUsbControl
+#define CyAnUsbIso CyAsUsbIso
+#define CyAnUsbBulk CyAsUsbBulk
+#define CyAnUsbInt CyAsUsbInt
+typedef CyAsUsbEndPointType CyAnUsbEndPointType ;
+
+
+typedef CyAsUsbEnumControl_dep CyAnUsbEnumControl ;
+typedef CyAsUsbEndPointConfig CyAnUsbEndPointConfig ;
+
+#define CyAnUsbMSUnit0 CyAsUsbMSUnit0
+#define CyAnUsbMSUnit1 CyAsUsbMSUnit1
+#define CyAnUsbMSBoth CyAsUsbMSBoth
+typedef CyAsUsbMSType_t CyAnUsbMSType_t ;
+
+#define CyAnEventUsbSuspend CyAsEventUsbSuspend
+#define CyAnEventUsbResume CyAsEventUsbResume
+#define CyAnEventUsbReset CyAsEventUsbReset
+#define CyAnEventUsbSetConfig CyAsEventUsbSetConfig
+#define CyAnEventUsbSpeedChange CyAsEventUsbSpeedChange
+#define CyAnEventUsbSetupPacket CyAsEventUsbSetupPacket
+#define CyAnEventUsbStatusPacket CyAsEventUsbStatusPacket
+#define CyAnEventUsbInquiryBefore CyAsEventUsbInquiryBefore
+#define CyAnEventUsbInquiryAfter CyAsEventUsbInquiryAfter
+#define CyAnEventUsbStartStop CyAsEventUsbStartStop
+#define CyAnEventUsbUnknownStorage CyAsEventUsbUnknownStorage
+#define CyAnEventUsbMSCProgress CyAsEventUsbMSCProgress
+typedef CyAsUsbEvent CyAnUsbEvent;
+
+typedef CyAsUsbEventCallback_dep CyAnUsbEventCallback ;
+
+typedef CyAsUsbIoCallback CyAnUsbIoCallback;
+typedef CyAsUsbFunctionCallback CyAnUsbFunctionCallback;
+
+/******* USB Functions ********************/
+
+/* Sync Usb Start */
+extern CyAnReturnStatus_t
+CyAnUsbStart(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnUsbStart(handle) CyAsUsbStart((CyAsDeviceHandle)(handle), 0, 0)
+
+/*Async Usb Start */
+extern CyAnReturnStatus_t
+CyAnUsbStartEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbStartEX(h, cb, client) CyAsUsbStart((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync Usb Stop */
+extern CyAnReturnStatus_t
+CyAnUsbStop(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnUsbStop(handle) CyAsUsbStop((CyAsDeviceHandle)(handle), 0, 0)
+
+/*Async Usb Stop */
+extern CyAnReturnStatus_t
+CyAnUsbStopEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbStopEX(h, cb, client) CyAsUsbStop((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Register USB event callback */
+EXTERN CyAnReturnStatus_t
+CyAnUsbRegisterCallback(
+ CyAnDeviceHandle handle,
+ CyAnUsbEventCallback callback
+ ) ;
+#define CyAnUsbRegisterCallback(h, cb) \
+ CyAsUsbRegisterCallback_dep((CyAsDeviceHandle)(h), (CyAsUsbEventCallback_dep)(cb))
+
+/*Sync Usb connect */
+EXTERN CyAnReturnStatus_t
+CyAnUsbConnect(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnUsbConnect(handle) CyAsUsbConnect((CyAsDeviceHandle)(handle), 0, 0)
+
+/*Async Usb connect */
+extern CyAnReturnStatus_t
+CyAnUsbConnectEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbConnectEX(h, cb, client) \
+ CyAsUsbConnect((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/*Sync Usb disconnect */
+EXTERN CyAnReturnStatus_t
+CyAnUsbDisconnect(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnUsbDisconnect(handle) CyAsUsbDisconnect((CyAsDeviceHandle)(handle), 0, 0)
+
+/*Async Usb disconnect */
+extern CyAnReturnStatus_t
+CyAnUsbDisconnectEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbDisconnectEX(h, cb, client) \
+ CyAsUsbDisconnect((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of set enum config */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSetEnumConfig(
+ CyAnDeviceHandle handle,
+ CyAnUsbEnumControl * config_p
+ ) ;
+#define CyAnUsbSetEnumConfig(handle, config_p) \
+ CyAsUsbSetEnumConfig_dep((CyAsDeviceHandle)(handle), (CyAsUsbEnumControl_dep *)(config_p), 0, 0)
+
+/* Async version of set enum config */
+extern CyAnReturnStatus_t
+CyAnUsbSetEnumConfigEX(
+ CyAnDeviceHandle handle,
+ CyAnUsbEnumControl * config_p,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbSetEnumConfigEX(h, config_p, cb, client) \
+ CyAsUsbSetEnumConfig_dep((CyAsDeviceHandle)(h), (CyAsUsbEnumControl_dep *)(config_p), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of get enum config */
+EXTERN CyAnReturnStatus_t
+CyAnUsbGetEnumConfig(
+ CyAnDeviceHandle handle,
+ CyAnUsbEnumControl * config_p
+ ) ;
+#define CyAnUsbGetEnumConfig(handle, config_p) \
+ CyAsUsbGetEnumConfig_dep((CyAsDeviceHandle)(handle), (CyAsUsbEnumControl_dep *)(config_p), 0, 0)
+
+/* Async version of get enum config */
+extern CyAnReturnStatus_t
+CyAnUsbGetEnumConfigEX(
+ CyAnDeviceHandle handle,
+ CyAnUsbEnumControl * config_p,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbGetEnumConfigEX(h, config_p, cb, client) \
+ CyAsUsbGetEnumConfig_dep((CyAsDeviceHandle)(h), (CyAsUsbEnumControl_dep *)(config_p), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* Sync Version of Set descriptor */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSetDescriptor(
+ CyAnDeviceHandle handle,
+ CyAnUsbDescType type,
+ uint8_t index,
+ void * desc_p,
+ uint16_t length
+ ) ;
+#define CyAnUsbSetDescriptor(handle, type, index, desc_p, length) \
+ CyAsUsbSetDescriptor((CyAsDeviceHandle)(handle), (CyAsUsbDescType)(type), (index), (desc_p), (length), 0, 0)
+
+/* Async Version of Set descriptor */
+extern CyAnReturnStatus_t
+CyAnUsbSetDescriptorEX(
+ CyAnDeviceHandle handle,
+ CyAnUsbDescType type,
+ uint8_t index,
+ void * desc_p,
+ uint16_t length,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbSetDescriptorEX(h, type, index, desc_p, length, cb, client) \
+ CyAsUsbSetDescriptor((CyAsDeviceHandle)(h), (CyAsUsbDescType)(type), (index), (desc_p), (length), \
+ (CyAsFunctionCallback)(cb), (client))
+
+/* Only version of clear descriptors */
+EXTERN CyAnReturnStatus_t
+CyAnUsbClearDescriptors(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbClearDescriptors(h, cb, client) \
+ CyAsUsbClearDescriptors((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of get descriptor*/
+EXTERN CyAnReturnStatus_t
+CyAnUsbGetDescriptor(
+ CyAnDeviceHandle handle,
+ CyAnUsbDescType type,
+ uint8_t index,
+ void * desc_p,
+ uint32_t * length_p
+ ) ;
+#define CyAnUsbGetDescriptor(h, type, index, desc_p, length_p) \
+ CyAsUsbGetDescriptor_dep((CyAsDeviceHandle)(h), (CyAsUsbDescType)(type), (index), (desc_p), (length_p))
+
+typedef CyAsGetDescriptorData CyAnGetDescriptorData ;
+
+/* Async version of get descriptor */
+extern CyAnReturnStatus_t
+CyAnUsbGetDescriptorEX(
+ CyAnDeviceHandle handle,
+ CyAnUsbDescType type,
+ uint8_t index,
+ CyAnGetDescriptorData * data,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbGetDescriptorEX(h, type, index, data, cb, client) \
+ CyAsUsbGetDescriptor((CyAsDeviceHandle)(h), (CyAsUsbDescType)(type), (index), (CyAsGetDescriptorData *)(data), \
+ (CyAsFunctionCallback)(cb), (client))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbSetPhysicalConfiguration(
+ CyAnDeviceHandle handle,
+ uint8_t config
+ ) ;
+#define CyAnUsbSetPhysicalConfiguration(h, config) \
+ CyAsUsbSetPhysicalConfiguration((CyAsDeviceHandle)(h), (config))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbSetEndPointConfig(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnUsbEndPointConfig * config_p
+ ) ;
+#define CyAnUsbSetEndPointConfig(h, ep, config_p) \
+ CyAsUsbSetEndPointConfig((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsUsbEndPointConfig *)(config_p))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbGetEndPointConfig(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnUsbEndPointConfig * config_p
+ ) ;
+#define CyAnUsbGetEndPointConfig(h, ep, config_p) \
+ CyAsUsbGetEndPointConfig((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsUsbEndPointConfig *)(config_p))
+
+/* Sync version of commit */
+EXTERN CyAnReturnStatus_t
+CyAnUsbCommitConfig(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnUsbCommitConfig(handle) CyAsUsbCommitConfig((CyAsDeviceHandle)(handle), 0, 0)
+
+/* Async version of commit */
+extern CyAnReturnStatus_t
+CyAnUsbCommitConfigEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbCommitConfigEX(h, cb, client) \
+ CyAsUsbCommitConfig((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbReadData(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyBool pktread,
+ uint32_t dsize,
+ uint32_t * dataread,
+ void * data
+ ) ;
+#define CyAnUsbReadData(h, ep, pkt, dsize, dataread, data_p) \
+ CyAsUsbReadData((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (pkt), (dsize), (dataread), (data_p))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbReadDataAsync(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyBool pktread,
+ uint32_t dsize,
+ void * data,
+ CyAnUsbIoCallback callback
+ ) ;
+#define CyAnUsbReadDataAsync(h, ep, pkt, dsize, data_p, cb) \
+ CyAsUsbReadDataAsync((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (pkt), (dsize), (data_p), \
+ (CyAsUsbIoCallback)(cb))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbWriteData(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ uint32_t dsize,
+ void * data
+ ) ;
+#define CyAnUsbWriteData(h, ep, dsize, data_p) \
+ CyAsUsbWriteData((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (dsize), (data_p))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbWriteDataAsync(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ uint32_t dsize,
+ void * data,
+ CyBool spacket,
+ CyAnUsbIoCallback callback
+ ) ;
+#define CyAnUsbWriteDataAsync(h, ep, dsize, data_p, spacket, cb) \
+ CyAsUsbWriteDataAsync((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (dsize), (data_p), (spacket), \
+ (CyAsUsbIoCallback)(cb))
+
+EXTERN CyAnReturnStatus_t
+CyAnUsbCancelAsync(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep
+ ) ;
+#define CyAnUsbCancelAsync(h, ep) CyAsUsbCancelAsync((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep))
+
+/* Sync version of set stall */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSetStall(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnUsbFunctionCallback cb,
+ uint32_t client
+) ;
+#define CyAnUsbSetStall(h, ep, cb, client) \
+ CyAsUsbSetStall_dep((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsUsbFunctionCallback)(cb), (client))
+
+/* Async version of set stall */
+extern CyAnReturnStatus_t
+CyAnUsbSetStallEX(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnFunctionCallback cb,
+ uint32_t client
+) ;
+#define CyAnUsbSetStallEX(h, ep, cb, client) \
+ CyAsUsbSetStall((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsFunctionCallback)(cb), (client))
+
+/*Sync version of clear stall */
+EXTERN CyAnReturnStatus_t
+CyAnUsbClearStall(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnUsbFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbClearStall(h, ep, cb, client) \
+ CyAsUsbClearStall_dep((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsUsbFunctionCallback)(cb), (client))
+
+/*Sync version of clear stall */
+extern CyAnReturnStatus_t
+CyAnUsbClearStallEX(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbClearStallEX(h, ep, cb, client) \
+ CyAsUsbClearStall((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync get stall */
+EXTERN CyAnReturnStatus_t
+CyAnUsbGetStall(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyBool * stall_p
+ ) ;
+#define CyAnUsbGetStall(handle, ep, stall_p) \
+ CyAsUsbGetStall((CyAsDeviceHandle)(handle), (CyAsEndPointNumber_t)(ep), (stall_p), 0, 0)
+
+/* Async get stall */
+extern CyAnReturnStatus_t
+CyAnUsbGetStallEX(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyBool * stall_p,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbGetStallEX(h, ep, stall_p, cb, client) \
+ CyAsUsbGetStall((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (stall_p), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of Set Nak */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSetNak(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnUsbFunctionCallback cb,
+ uint32_t client
+) ;
+
+#define CyAnUsbSetNak(h, ep, cb, client) \
+ CyAsUsbSetNak_dep((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsUsbFunctionCallback)(cb), (client))
+
+/* Async version of Set Nak */
+extern CyAnReturnStatus_t
+CyAnUsbSetNakEX(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnFunctionCallback cb,
+ uint32_t client
+) ;
+#define CyAnUsbSetNakEX(h, ep, cb, client) \
+ CyAsUsbSetNak((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync version of clear nak */
+EXTERN CyAnReturnStatus_t
+CyAnUsbClearNak(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnUsbFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbClearNak(h, ep, cb, client) \
+ CyAsUsbClearNak_dep((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsUsbFunctionCallback)(cb), (client))
+
+/* Sync version of clear nak */
+extern CyAnReturnStatus_t
+CyAnUsbClearNakEX(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbClearNakEX(h, ep, cb, client) \
+ CyAsUsbClearNak((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync Get NAK */
+EXTERN CyAnReturnStatus_t
+CyAnUsbGetNak(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyBool * nak_p
+) ;
+#define CyAnUsbGetNak(handle, ep, nak_p) \
+ CyAsUsbGetNak((CyAsDeviceHandle)(handle), (CyAsEndPointNumber_t)(ep), (nak_p), 0, 0)
+
+/* Async Get NAK */
+EXTERN CyAnReturnStatus_t
+CyAnUsbGetNakEX(
+ CyAnDeviceHandle handle,
+ CyAnEndPointNumber_t ep,
+ CyBool * nak_p,
+ CyAnFunctionCallback cb,
+ uint32_t client
+) ;
+#define CyAnUsbGetNakEX(h, ep, nak_p, cb, client) \
+ CyAsUsbGetNak((CyAsDeviceHandle)(h), (CyAsEndPointNumber_t)(ep), (nak_p), (CyAsFunctionCallback)(cb), (client))
+
+/* Sync remote wakup */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSignalRemoteWakeup(
+ CyAnDeviceHandle handle
+ ) ;
+#define CyAnUsbSignalRemoteWakeup(handle) CyAsUsbSignalRemoteWakeup((CyAsDeviceHandle)(handle), 0, 0)
+
+/* Async remote wakup */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSignalRemoteWakeupEX(
+ CyAnDeviceHandle handle,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbSignalRemoteWakeupEX(h, cb, client) \
+ CyAsUsbSignalRemoteWakeup((CyAsDeviceHandle)(h), (CyAsFunctionCallback)(cb), (client))
+
+/* Only version of SetMSReportThreshold */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSetMSReportThreshold(
+ CyAnDeviceHandle handle,
+ uint32_t wr_sectors,
+ uint32_t rd_sectors,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbSetMSReportThreshold(h, wr_cnt, rd_cnt, cb, client) \
+ CyAsUsbSetMSReportThreshold((CyAsDeviceHandle)(h), wr_cnt, rd_cnt, (CyAsFunctionCallback)(cb), (client))
+
+/* Select storage partitions to be enumerated. */
+EXTERN CyAnReturnStatus_t
+CyAnUsbSelectMSPartitions (
+ CyAnDeviceHandle handle,
+ CyAnMediaType media,
+ uint32_t device,
+ CyAnUsbMSType_t type,
+ CyAnFunctionCallback cb,
+ uint32_t client
+ ) ;
+#define CyAnUsbSelectMSPartitions(h, media, dev, type, cb, client) \
+ CyAsUsbSelectMSPartitions_dep((CyAsDeviceHandle)(h), (CyAsMediaType)(media), (dev), \
+ (CyAsUsbMSType_t)(type), (CyAsFunctionCallback)(cb), (client))
+
+#include "cyas_cplus_end.h"
+#endif /*__doxygen__*/
+#endif /*_INCLUDED_CYANUSB_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyas_cplus_end.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,10 @@
+/*
+ * This file is included at the end of other include files. It basically turns off
+ * the C++ specific code words that insure this code is seen as C code even within
+ * a C++ compiler.
+ *
+ */
+
+#ifdef __cplusplus
+}
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyas_cplus_start.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,11 @@
+/*
+ * This file is included after all other headers files, but before any other
+ * definitions in the file. It basically insures that the definitions within
+ * the file are seen as C defintions even when compiled by a C++ compiler.
+ */
+
+#ifdef __cplusplus
+
+extern "C" {
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasch9.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,325 @@
+/* Cypress West Bridge API header file (cyasch9.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASCH9_H_
+#define _INCLUDED_CYASCH9_H_
+
+/*
+ * These chapter 9 USB 2.0 constants are provided for convenience
+ */
+
+#define CY_CH9_SETUP_TYPE_MASK (0x60) /* Used to mask off request type */
+#define CY_CH9_SETUP_STANDARD_REQUEST (0) /* Standard Request */
+#define CY_CH9_SETUP_CLASS_REQUEST (0x20) /* Class Request */
+#define CY_CH9_SETUP_VENDOR_REQUEST (0x40) /* Vendor Request */
+#define CY_CH9_SETUP_RESERVED_REQUEST (0x60) /* Reserved or illegal request */
+
+#define CY_CH9_SETUP_DEST_MASK (0x1f) /* Used to mask off the dest of the request */
+#define CY_CH9_SETUP_DEST_DEVICE (0)
+#define CY_CH9_SETUP_DEST_INTERFACE (1)
+#define CY_CH9_SETUP_DEST_ENDPOINT (2)
+#define CY_CH9_SETUP_DEST_OTHER (3)
+
+#define CY_CH9_SC_GET_STATUS (0x00) /* Setup command: Get Status */
+#define CY_CH9_SC_CLEAR_FEATURE (0x01) /* Setup command: Clear Feature */
+#define CY_CH9_SC_RESERVED (0x02) /* Setup command: Reserved */
+#define CY_CH9_SC_SET_FEATURE (0x03) /* Setup command: Set Feature */
+#define CY_CH9_SC_SET_ADDRESS (0x05) /* Setup command: Set Address */
+#define CY_CH9_SC_GET_DESCRIPTOR (0x06) /* Setup command: Get Descriptor */
+#define CY_CH9_SC_SET_DESCRIPTOR (0x07) /* Setup command: Set Descriptor */
+#define CY_CH9_SC_GET_CONFIGURATION (0x08) /* Setup command: Get Configuration */
+#define CY_CH9_SC_SET_CONFIGURATION (0x09) /* Setup command: Set Configuration */
+#define CY_CH9_SC_GET_INTERFACE (0x0a) /* Setup command: Get Interface */
+#define CY_CH9_SC_SET_INTERFACE (0x0b) /* Setup command: Set Interface */
+#define CY_CH9_SC_SYNC_FRAME (0x0c) /* Setup command: Sync Frame */
+#define CY_CH9_SC_ANCHOR_LOAD (0xa0) /* Setup command: Anchor load */
+
+#define CY_CH9_GD_DEVICE (0x01) /* Get descriptor: Device */
+#define CY_CH9_GD_CONFIGURATION (0x02) /* Get descriptor: Configuration */
+#define CY_CH9_GD_STRING (0x03) /* Get descriptor: String */
+#define CY_CH9_GD_INTERFACE (0x04) /* Get descriptor: Interface */
+#define CY_CH9_GD_ENDPOINT (0x05) /* Get descriptor: Endpoint */
+#define CY_CH9_GD_DEVICE_QUALIFIER (0x06) /* Get descriptor: Device Qualifier */
+#define CY_CH9_GD_OTHER_SPEED_CONFIGURATION (0x07) /* Get descriptor: Other Configuration */
+#define CY_CH9_GD_INTERFACE_POWER (0x08) /* Get descriptor: Interface Power */
+#define CY_CH9_GD_HID (0x21) /* Get descriptor: HID */
+#define CY_CH9_GD_REPORT (0x22) /* Get descriptor: Report */
+
+#define CY_CH9_GS_DEVICE (0x80) /* Get Status: Device */
+#define CY_CH9_GS_INTERFACE (0x81) /* Get Status: Interface */
+#define CY_CH9_GS_ENDPOINT (0x82) /* Get Status: End Point */
+
+#define CY_CH9_FT_DEVICE (0x00) /* Feature: Device */
+#define CY_CH9_FT_ENDPOINT (0x02) /* Feature: End Point */
+
+/*
+ * Language Codes
+ */
+
+#define CY_CH9_LANGID_AFRIKAANS (0x0436)
+#define CY_CH9_LANGID_ALBANIAN (0x041c)
+#define CY_CH9_LANGID_ARABIC_SAUDI_ARABIA (0x0401)
+#define CY_CH9_LANGID_ARABIC_IRAQ (0x0801)
+#define CY_CH9_LANGID_ARABIC_EGYPT (0x0c01)
+#define CY_CH9_LANGID_ARABIC_LIBYA (0x1001)
+#define CY_CH9_LANGID_ARABIC_ALGERIA (0x1401)
+#define CY_CH9_LANGID_ARABIC_MOROCCO (0x1801)
+#define CY_CH9_LANGID_ARABIC_TUNISIA (0x1c01)
+#define CY_CH9_LANGID_ARABIC_OMAN (0x2001)
+#define CY_CH9_LANGID_ARABIC_YEMEN (0x2401)
+#define CY_CH9_LANGID_ARABIC_SYRIA (0x2801)
+#define CY_CH9_LANGID_ARABIC_JORDAN (0x2c01)
+#define CY_CH9_LANGID_ARABIC_LEBANON (0x3001)
+#define CY_CH9_LANGID_ARABIC_KUWAIT (0x3401)
+#define CY_CH9_LANGID_ARABIC_UAE (0x3801)
+#define CY_CH9_LANGID_ARABIC_BAHRAIN (0x3c01)
+#define CY_CH9_LANGID_ARABIC_QATAR (0x4001)
+#define CY_CH9_LANGID_ARMENIAN (0x042b)
+#define CY_CH9_LANGID_ASSAMESE (0x044d)
+#define CY_CH9_LANGID_AZERI_LATIN (0x042c)
+#define CY_CH9_LANGID_AZERI_CYRILLIC (0x082c)
+#define CY_CH9_LANGID_BASQUE (0x042d)
+#define CY_CH9_LANGID_BELARUSSIAN (0x0423)
+#define CY_CH9_LANGID_BENGALI (0x0445)
+#define CY_CH9_LANGID_BULGARIAN (0x0402)
+#define CY_CH9_LANGID_BURMESE (0x0455)
+#define CY_CH9_LANGID_CATALAN (0x0403)
+#define CY_CH9_LANGID_CHINESE_TAIWAN (0x0404)
+#define CY_CH9_LANGID_CHINESE_PRC (0x0804)
+#define CY_CH9_LANGID_CHINESE_HONG_KONG_SAR_PRC (0x0c04)
+#define CY_CH9_LANGID_CHINESE_SINGAPORE (0x1004)
+#define CY_CH9_LANGID_CHINESE_MACAU_SAR (0x1404)
+#define CY_CH9_LANGID_CROATIAN (0x041a)
+#define CY_CH9_LANGID_CZECH (0x0405)
+#define CY_CH9_LANGID_DANISH (0x0406)
+#define CY_CH9_LANGID_DUTCH_NETHERLANDS (0x0413)
+#define CY_CH9_LANGID_DUTCH_BELGIUM (0x0813)
+#define CY_CH9_LANGID_ENGLISH_UNITED_STATES (0x0409)
+#define CY_CH9_LANGID_ENGLISH_UNITED_KINGDON (0x0809)
+#define CY_CH9_LANGID_ENGLISH_AUSTRALIAN (0x0c09)
+#define CY_CH9_LANGID_ENGLISH_CANADIAN (0x1009)
+#define CY_CH9_LANGID_ENGLISH_NEW Zealand (0x1409)
+#define CY_CH9_LANGID_ENGLISH_IRELAND (0x1809)
+#define CY_CH9_LANGID_ENGLISH_SOUTH Africa (0x1c09)
+#define CY_CH9_LANGID_ENGLISH_JAMAICA (0x2009)
+#define CY_CH9_LANGID_ENGLISH_CARIBBEAN (0x2409)
+#define CY_CH9_LANGID_ENGLISH_BELIZE (0x2809)
+#define CY_CH9_LANGID_ENGLISH_TRINIDAD (0x2c09)
+#define CY_CH9_LANGID_ENGLISH_ZIMBABWE (0x3009)
+#define CY_CH9_LANGID_ENGLISH_PHILIPPINES (0x3409)
+#define CY_CH9_LANGID_ESTONIAN (0x0425)
+#define CY_CH9_LANGID_FAEROESE (0x0438)
+#define CY_CH9_LANGID_FARSI (0x0429)
+#define CY_CH9_LANGID_FINNISH (0x040b)
+#define CY_CH9_LANGID_FRENCH_STANDARD (0x040c)
+#define CY_CH9_LANGID_FRENCH_BELGIAN (0x080c)
+#define CY_CH9_LANGID_FRENCH_CANADIAN (0x0c0c)
+#define CY_CH9_LANGID_FRENCH_SWITZERLAND (0x100c)
+#define CY_CH9_LANGID_FRENCH_LUXEMBOURG (0x140c)
+#define CY_CH9_LANGID_FRENCH_MONACO (0x180c)
+#define CY_CH9_LANGID_GEORGIAN (0x0437)
+#define CY_CH9_LANGID_GERMAN_STANDARD (0x0407)
+#define CY_CH9_LANGID_GERMAN_SWITZERLAND (0x0807)
+#define CY_CH9_LANGID_GERMAN_AUSTRIA (0x0c07)
+#define CY_CH9_LANGID_GERMAN_LUXEMBOURG (0x1007)
+#define CY_CH9_LANGID_GERMAN_LIECHTENSTEIN (0x1407)
+#define CY_CH9_LANGID_GREEK (0x0408)
+#define CY_CH9_LANGID_GUJARATI (0x0447)
+#define CY_CH9_LANGID_HEBREW (0x040d)
+#define CY_CH9_LANGID_HINDI (0x0439)
+#define CY_CH9_LANGID_HUNGARIAN (0x040e)
+#define CY_CH9_LANGID_ICELANDIC (0x040f)
+#define CY_CH9_LANGID_INDONESIAN (0x0421)
+#define CY_CH9_LANGID_ITALIAN_STANDARD (0x0410)
+#define CY_CH9_LANGID_ITALIAN_SWITZERLAND (0x0810)
+#define CY_CH9_LANGID_JAPANESE (0x0411)
+#define CY_CH9_LANGID_KANNADA (0x044b)
+#define CY_CH9_LANGID_KASHMIRI_INDIA (0x0860)
+#define CY_CH9_LANGID_KAZAKH (0x043f)
+#define CY_CH9_LANGID_KONKANI (0x0457)
+#define CY_CH9_LANGID_KOREAN (0x0412)
+#define CY_CH9_LANGID_KOREAN_JOHAB (0x0812)
+#define CY_CH9_LANGID_LATVIAN (0x0426)
+#define CY_CH9_LANGID_LITHUANIAN (0x0427)
+#define CY_CH9_LANGID_LITHUANIAN_CLASSIC (0x0827)
+#define CY_CH9_LANGID_MACEDONIAN (0x042f)
+#define CY_CH9_LANGID_MALAY_MALAYSIAN (0x043e)
+#define CY_CH9_LANGID_MALAY_BRUNEI_DARUSSALAM (0x083e)
+#define CY_CH9_LANGID_MALAYALAM (0x044c)
+#define CY_CH9_LANGID_MANIPURI (0x0458)
+#define CY_CH9_LANGID_MARATHI (0x044e)
+#define CY_CH9_LANGID_NEPALI_INDIA (0x0861)
+#define CY_CH9_LANGID_NORWEGIAN_BOKMAL (0x0414)
+#define CY_CH9_LANGID_NORWEGIAN_NYNORSK (0x0814)
+#define CY_CH9_LANGID_ORIYA (0x0448)
+#define CY_CH9_LANGID_POLISH (0x0415)
+#define CY_CH9_LANGID_PORTUGUESE_BRAZIL (0x0416)
+#define CY_CH9_LANGID_PORTUGUESE_STANDARD (0x0816)
+#define CY_CH9_LANGID_PUNJABI (0x0446)
+#define CY_CH9_LANGID_ROMANIAN (0x0418)
+#define CY_CH9_LANGID_RUSSIAN (0x0419)
+#define CY_CH9_LANGID_SANSKRIT (0x044f)
+#define CY_CH9_LANGID_SERBIAN_CYRILLIC (0x0c1a)
+#define CY_CH9_LANGID_SERBIAN_LATIN (0x081a)
+#define CY_CH9_LANGID_SINDHI (0x0459)
+#define CY_CH9_LANGID_SLOVAK (0x041b)
+#define CY_CH9_LANGID_SLOVENIAN (0x0424)
+#define CY_CH9_LANGID_SPANISH_TRADITIONAL_SORT (0x040a)
+#define CY_CH9_LANGID_SPANISH_MEXICAN (0x080a)
+#define CY_CH9_LANGID_SPANISH_MODERN_SORT (0x0c0a)
+#define CY_CH9_LANGID_SPANISH_GUATEMALA (0x100a)
+#define CY_CH9_LANGID_SPANISH_COSTA_RICA (0x140a)
+#define CY_CH9_LANGID_SPANISH_PANAMA (0x180a)
+#define CY_CH9_LANGID_SPANISH_DOMINICAN Republic (0x1c0a)
+#define CY_CH9_LANGID_SPANISH_VENEZUELA (0x200a)
+#define CY_CH9_LANGID_SPANISH_COLOMBIA (0x240a)
+#define CY_CH9_LANGID_SPANISH_PERU (0x280a)
+#define CY_CH9_LANGID_SPANISH_ARGENTINA (0x2c0a)
+#define CY_CH9_LANGID_SPANISH_ECUADOR (0x300a)
+#define CY_CH9_LANGID_SPANISH_CHILE (0x340a)
+#define CY_CH9_LANGID_SPANISH_URUGUAY (0x380a)
+#define CY_CH9_LANGID_SPANISH_PARAGUAY (0x3c0a)
+#define CY_CH9_LANGID_SPANISH_BOLIVIA (0x400a)
+#define CY_CH9_LANGID_SPANISH_EL_SALVADOR (0x440a)
+#define CY_CH9_LANGID_SPANISH_HONDURAS (0x480a)
+#define CY_CH9_LANGID_SPANISH_NICARAGUA (0x4c0a)
+#define CY_CH9_LANGID_SPANISH_PUERTO Rico (0x500a)
+#define CY_CH9_LANGID_SUTU (0x0430)
+#define CY_CH9_LANGID_SWAHILI_KENYA (0x0441)
+#define CY_CH9_LANGID_SWEDISH (0x041d)
+#define CY_CH9_LANGID_SWEDISH_FINLAND (0x081d)
+#define CY_CH9_LANGID_TAMIL (0x0449)
+#define CY_CH9_LANGID_TATAR_TATARSTAN (0x0444)
+#define CY_CH9_LANGID_TELUGU (0x044a)
+#define CY_CH9_LANGID_THAI (0x041e)
+#define CY_CH9_LANGID_TURKISH (0x041f)
+#define CY_CH9_LANGID_UKRAINIAN (0x0422)
+#define CY_CH9_LANGID_URDU_PAKISTAN (0x0420)
+#define CY_CH9_LANGID_URDU_INDIA (0x0820)
+#define CY_CH9_LANGID_UZBEK_LATIN (0x0443)
+#define CY_CH9_LANGID_UZBEK_CYRILLIC (0x0843)
+#define CY_CH9_LANGID_VIETNAMESE (0x042a)
+
+#pragma pack(push, 1)
+typedef struct CyCh9DeviceDesc
+{
+ uint8_t bLength ;
+ uint8_t bDescriptorType ;
+ uint16_t bcdUSB ;
+ uint8_t bDeviceClass ;
+ uint8_t bDeviceSubClass ;
+ uint8_t bDeviceProtocol ;
+ uint8_t bMaxPacketSize0 ;
+ uint16_t idVendor ;
+ uint16_t idProduct ;
+ uint16_t bcdDevice ;
+ uint8_t iManufacturer ;
+ uint8_t iProduct;
+ uint8_t iSerialNumber;
+ uint8_t bNumConfigurations;
+} CyCh9DeviceDesc ;
+#pragma pack(pop)
+
+#pragma pack(push,1)
+typedef struct CyCh9DeviceQualifierDesc
+{
+ uint8_t bLength ;
+ uint8_t bDescriptorType ;
+ uint16_t bcdUSB ;
+ uint8_t bDeviceClass ;
+ uint8_t bDeviceSubClass ;
+ uint8_t bDeviceProtocol ;
+ uint8_t bMaxPacketSize0 ;
+ uint8_t bNumConfigurations;
+ uint8_t reserved ;
+} CyCh9DeviceQualifierDesc ;
+#pragma pack(pop)
+
+#pragma pack(push,1)
+typedef struct CyCh9ConfigurationDesc
+{
+ uint8_t bLength ;
+ uint8_t bDescriptorType ;
+ uint16_t wTotalLength ;
+ uint8_t bNumInterfaces ;
+ uint8_t bConfigurationValue ;
+ uint8_t iConfiguration ;
+ uint8_t bmAttributes ;
+ uint8_t bMaxPower ;
+} CyCh9ConfigurationDesc ;
+#pragma pack(pop)
+
+#pragma pack(push,1)
+typedef struct CyCh9InterfaceDesc
+{
+ uint8_t bLength ;
+ uint8_t bDescriptorType ;
+ uint8_t bInterfaceNumber ;
+ uint8_t bAlternateSetting ;
+ uint8_t bNumEndpoints ;
+ uint8_t bInterfaceClass ;
+ uint8_t bInterfaceSubClass ;
+ uint8_t bInterfaceProtocol ;
+ uint8_t iInterface ;
+} CyCh9InterfaceDesc ;
+#pragma pack(pop)
+
+#pragma pack(push,1)
+typedef struct CyCh9EndpointDesc
+{
+ uint8_t bLength ;
+ uint8_t bDescriptorType ;
+ uint8_t bEndpointAddress ;
+ uint8_t bmAttributes ;
+ uint16_t wMaxPacketSize ;
+ uint8_t bInterval ;
+} CyCh9EndpointDesc ;
+#pragma pack(pop)
+
+/* Configuration attributes */
+#define CY_CH9_CONFIG_ATTR_RESERVED_BIT7 (0x80)
+#define CY_CH9_CONFIG_ATTR_SELF_POWERED (0x40)
+#define CY_CH9_CONFIG_ATTR_REMOTE_WAKEUP (0x20)
+
+#define CY_CH9_ENDPOINT_DIR_OUT (0)
+#define CY_CH9_ENDPOINT_DIR_IN (0x80)
+#define CY_CH9_MK_EP_ADDR(dir, num) ((dir) | ((num) & 0x0f))
+
+#define CY_CH9_ENDPOINT_ATTR_CONTROL (0)
+#define CY_CH9_ENDPOINT_ATTR_ISOCHRONOUS (1)
+#define CY_CH9_ENDPOINT_ATTR_BULK (2)
+#define CY_CH9_ENDPOINT_ATTR_INTERRUPT (3)
+
+#define CY_CH9_ENDPOINT_ATTR_NO_SYNC (0 << 2)
+#define CY_CH9_ENDPOINT_ATTR_ASYNCHRONOUS (1 << 2)
+#define CY_CH9_ENDPOINT_ATTR_ADAPTIVE (2 << 2)
+#define CY_CH9_ENDPOINT_ATTR_SYNCHRONOUS (3 << 2)
+
+#define CY_CH9_ENDPOINT_ATTR_DATA (0 << 4)
+#define CY_CH9_ENDPOINT_ATTR_FEEDBACK (1 << 4)
+#define CY_CH9_ENDPOINT_ATTR_IMPLICIT_FEEDBACK (2 << 4)
+#define CY_CH9_ENDPOINT_ATTR_RESERVED (3 << 4)
+
+#define CY_CH9_ENDPOINT_PKTSIZE_NONE (0 << 11)
+#define CY_CH9_ENDPOINT_PKTSIZE_ONE (1 << 11)
+#define CY_CH9_ENDPOINT_PKTSIZE_TWO (2 << 11)
+#define CY_CH9_ENDPOINT_PKTSIZE_RESERVED (3 << 11)
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyaserr.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1052 @@
+/* Cypress West Bridge API header file (cyaserr.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASERR_H_
+#define _INCLUDED_CYASERR_H_
+
+/*@@West Bridge Errors
+ Summary
+ This section lists the error codes for West Bridge.
+
+*/
+
+/* Summary
+ The function completed sucessfully
+*/
+#define CY_AS_ERROR_SUCCESS (0)
+
+/* Summary
+ A function trying to acquire a resource was unable to do so.
+
+ Description
+ This code indicates that a resource that the API was trying to claim
+ could not be claimed.
+
+ See Also
+ * CyAsMiscAcquireResource
+ * CyAsStorageClaim
+*/
+#define CY_AS_ERROR_NOT_ACQUIRED (1)
+
+/* Summary
+ A function trying to acquire a resource was unable to do so.
+
+ Description
+ The West Bridge API provides the capability to assign the storage media to
+ either the West Bridge device or the USB port. This error indicates the
+ P port was trying to release a storage media and was not able to do
+ so. This generally means it was not owned by the P port processor.
+
+ See Also
+ * CyAsStorageRelease
+*/
+#define CY_AS_ERROR_NOT_RELEASED (2)
+
+/* Summary
+ The West Bridge firmware is not loaded.
+
+ Description
+ Most of the API functions that are part of the West Bridge API rely on firmware
+ running on the West Bridge device. This error code is returned when one of
+ these functions is called and the firmware has not yet been loaded.
+
+ See Also
+ * CyAsMiscGetFirmwareVersion
+ * CyAsMiscReset
+ * CyAsMiscAcquireResource
+ * CyAsMiscReleaseResource
+ * CyAsMiscSetTraceLevel
+ * CyAsStorageStart
+ * CyAsStorageStop
+ * CyAsStorageRegisterCallback
+ * CyAsStorageClaim
+ * CyAsStorageRelease
+ * CyAsStorageQueryMedia
+ * CyAsStorageQueryDevice
+ * CyAsStorageQueryUnit
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+*/
+#define CY_AS_ERROR_NO_FIRMWARE (3)
+
+/* Summary
+ A timeout occurred waiting on a response from the West Bridge device
+
+ Description
+ When requests are made of the West Bridge device, a response is expected
+ within a given timeframe. If a response is not recevied within the
+ given timeframe, a timeout error occurs.
+*/
+#define CY_AS_ERROR_TIMEOUT (4)
+
+/* Summary
+ A request to download firmware was made while not in the CONFIG mode
+
+ Description
+ Firmware is downloaded via the CyAsMiscDownloadFirmware() function. This
+ function can only be called while in the CONFIG mode. This error indicates
+ that the CyAsMiscDownloadFirmware() call was made while not in the CONFIG
+ mode.
+
+ See Also
+ * CyAsMiscDownloadFirmware
+*/
+#define CY_AS_ERROR_NOT_IN_CONFIG_MODE (5)
+
+/* Summary
+ This error is returned if the firmware size specified is too invalid.
+
+ Description
+ If the size of the firmware to be downloaded into West Bridge is invalid, this
+ error is issued. Invalid firmware sizes are those greater than 24K or a
+ size of zero.
+
+ See Also
+ * CyAsMiscDownloadFirmare
+*/
+#define CY_AS_ERROR_INVALID_SIZE (6)
+
+/* Summary
+ This error is returned if a request is made to acquire a resource that has
+ already been acquired.
+
+ Description
+ This error is returned if a request is made to acquire a resource that has
+ already been acquired.
+
+ See Also
+ * CyAsMiscAcquireResource
+ * CyAsMiscReleaseResource
+*/
+#define CY_AS_ERROR_RESOURCE_ALREADY_OWNED (7)
+
+/* Summary
+ This error is returned if a request is made to release a resource that has
+ not previously been acquired.
+
+ Description
+ This error is returned if a request is made to release a resource that has
+ not previously been acquired.
+
+ See Also
+ * CyAsMiscAcquireResource
+ * CyAsMiscReleaseResource
+*/
+#define CY_AS_ERROR_RESOURCE_NOT_OWNED (8)
+
+/* Summary
+ This error is returned when a request is made for a media that does not exist
+
+ Description
+ This error is returned when a request is made that references a storage media that
+ does not exist. This error is returned when the storage media is not present in
+ the current system, or if the media value given is not valid.
+
+ See Also
+ * CyAsMiscSetTraceLevel
+ * CyAsStorageClaim
+ * CyAsStorageRelease
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+*/
+#define CY_AS_ERROR_NO_SUCH_MEDIA (9)
+
+/* Summary
+ This error is returned when a request is made for a device that does not exist
+
+ Description
+ This error is returned when a request is made that references a storage device
+ that does not exist. This error is returned when the device index is not present
+ in the current system, or if the device index exceeds 15.
+
+ See Also
+ * CyAsMiscSetTraceLevel
+ * CyAsStorageQueryDevice
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+*/
+#define CY_AS_ERROR_NO_SUCH_DEVICE (10)
+
+/* Summary
+ This error is returned when a request is made for a unit that does not exist
+
+ Description
+ This error is returned when a request is made that references a storage unit
+ that does not exist. This error is returned when the unit index is not present
+ in the current system, or if the unit index exceeds 255.
+
+ See Also
+ * CyAsMiscSetTraceLevel
+ * CyAsStorageQueryDevice
+ * CyAsStorageQueryUnit
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+*/
+#define CY_AS_ERROR_NO_SUCH_UNIT (11)
+
+/* Summary
+ This error is returned when a request is made for a block that does not exist
+
+ Description
+ This error is returned when a request is made that references a storage block
+ that does not exist. This error is returned when the block address reference
+ an address beyond the end of the unit selected.
+
+ See Also
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+*/
+#define CY_AS_ERROR_INVALID_BLOCK (12)
+
+/* Summary
+ This error is returned when an invalid trace level is set.
+
+ Description
+ This error is returned when the trace level request is greater
+ than three.
+
+ See Also
+ * CyAsMiscSetTraceLevel
+*/
+#define CY_AS_ERROR_INVALID_TRACE_LEVEL (13)
+
+/* Summary
+ This error is returned when West Bridge is already in the standby state
+ and an attempt is made to put West Bridge into this state again.
+
+ Description
+ This error is returned when West Bridge is already in the standby state
+ and an attempt is made to put West Bridge into this state again.
+
+ See Also
+ * CyAsMiscEnterStandby
+*/
+#define CY_AS_ERROR_ALREADY_STANDBY (14)
+
+/* Summary
+ This error is returned when the API needs to set a pin on the
+ West Bridge device, but this is not supported by the underlying HAL
+ layer.
+
+ Description
+ This error is returned when the API needs to set a pin on the
+ West Bridge device, but this is not supported by the underlying HAL
+ layer.
+
+ See Also
+ * CyAsMiscEnterStandby
+ * CyAsMiscLeaveStandby
+*/
+#define CY_AS_ERROR_SETTING_WAKEUP_PIN (15)
+
+/* Summary
+ This error is returned when a module is being started that has
+ already been started.
+
+ Description
+ This error is returned when a module is being started and that module
+ has already been started. This error does not occur with the CyAsStorageStart()
+ or CyAsUsbStart() functions as the storage and USB modules are reference counted.
+
+ Note
+ At the current time, this error is returned by module internal to the API but
+ not returned by any of the API functions.
+*/
+#define CY_AS_ERROR_ALREADY_RUNNING (16)
+
+/* Summary
+ This error is returned when a module is being stopped that has
+ already been stopped.
+
+ Description
+ This error is returned when a module is being stopped and that module
+ has already been stopped. This error does not occur with the CyAsStorageStop()
+ or CyAsUsbStop() functions as the storage and USB modules are reference counted.
+
+ Note
+ At the current time, this error is returned by module internal to the API but
+ not returned by any of the API functions.
+*/
+
+#define CY_AS_ERROR_NOT_RUNNING (17)
+
+/* Summary
+ This error is returned when the caller tries to claim a media that has already been
+ claimed.
+
+ Description
+ This error is returned when the caller tries to claim a media that has already been
+ claimed.
+
+ See Also
+ * CyAsStorageClaim
+*/
+#define CY_AS_ERROR_MEDIA_ALREADY_CLAIMED (18)
+
+/* Summary
+ This error is returned when the caller tries to release a media that has already been
+ released.
+
+ Description
+ This error is returned when the caller tries to release a media that has already been
+ released.
+
+ See Also
+ * CyAsStorageRelease
+*/
+#define CY_AS_ERROR_MEDIA_NOT_CLAIMED (19)
+
+/* Summary
+ This error is returned when canceling trying to cancel an asynchronous operation when
+ an async operation is not pending.
+
+ Description
+ This error is returned when a call is made to a function to cancel an asynchronous operation
+ and there is no asynchronous operation pending.
+
+ See Also
+ * CyAsStorageCancelAsync
+ * CyAsUsbCancelAsync
+*/
+#define CY_AS_ERROR_NO_OPERATION_PENDING (20)
+
+/* Summary
+ This error is returned when an invalid endpoint number is provided to an API call.
+
+ Description
+ This error is returned when an invalid endpoint number is specified in an API call. The
+ endpoint number may be invalid because it is greater than 15, or because it was a reference
+ to an endpoint that is invalid for West Bridge (2, 4, 6, or 8).
+
+ See Also
+ * CyAsUsbSetEndPointConfig
+ * CyAsUsbGetEndPointConfig
+ * CyAsUsbReadData
+ * CyAsUsbWriteData
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteDataAsync
+ * CyAsUsbSetStall
+ * CyAsUsbGetStall
+*/
+#define CY_AS_ERROR_INVALID_ENDPOINT (21)
+
+/* Summary
+ This error is returned when an invalid descriptor type
+ is specified in an API call.
+
+ Description
+ This error is returned when an invalid descriptor type
+ is specified in an API call.
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * CyAsUsbGetDescriptor
+*/
+#define CY_AS_ERROR_INVALID_DESCRIPTOR (22)
+
+/* Summary
+ This error is returned when an invalid descriptor index
+ is specified in an API call.
+
+ Description
+ This error is returned when an invalid descriptor index
+ is specified in an API call.
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * CyAsUsbGetDescriptor
+*/
+#define CY_AS_ERROR_BAD_INDEX (23)
+
+/* Summary
+ This error is returned if trying to set a USB descriptor
+ when in the P port enumeration mode.
+
+ Description
+ This error is returned if trying to set a USB descriptor
+ when in the P port enumeration mode.
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * CyAsUsbGetDescriptor
+*/
+#define CY_AS_ERROR_BAD_ENUMERATION_MODE (24)
+
+/* Summary
+ This error is returned when the endpoint configuration specified
+ is not valid.
+
+ Description
+ This error is returned when the endpoint configuration specified
+ is not valid.
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * CyAsUsbGetDescriptor
+ * CyAsUsbCommitConfig
+*/
+#define CY_AS_ERROR_INVALID_CONFIGURATION (25)
+
+/* Summary
+ This error is returned when the API cannot verify it is connected
+ to an West Bridge device.
+
+ Description
+ When the API is initialized, the API tries to read the ID register from
+ the West Bridge device. The value from this ID register should match the
+ value expected before communications with West Bridge are established. This
+ error means that the contents of the ID register cannot be verified.
+
+ See Also
+ * CyAsMiscConfigureDevice
+*/
+#define CY_AS_ERROR_NO_ANTIOCH (26)
+
+/* Summary
+ This error is returned when an API function is called and CyAsMiscConfigureDevice
+ has not been called to configure West Bridge for the current environment.
+
+ Description
+ This error is returned when an API function is called and CyAsMiscConfigureDevice
+ has not been called to configure West Bridge for the current environment.
+
+ See Also
+ * Almost all API function
+*/
+#define CY_AS_ERROR_NOT_CONFIGURED (27)
+
+/* Summary
+ This error is returned when West Bridge cannot allocate memory required for
+ internal API operations.
+
+ Description
+ This error is returned when West Bridge cannot allocate memory required for
+ internal API operations.
+
+ See Also
+ * Almost all API functoins
+*/
+#define CY_AS_ERROR_OUT_OF_MEMORY (28)
+
+/* Summary
+ This error is returned when a module is being started that has
+ already been started.
+
+ Description
+ This error is returned when a module is being started and that module
+ has already been started. This error does not occur with the CyAsStorageStart()
+ or CyAsUsbStart() functions as the storage and USB modules are reference counted.
+
+ Note
+ At the current time, this error is returned by module internal to the API but
+ not returned by any of the API functions.
+*/
+#define CY_AS_ERROR_NESTED_SLEEP (29)
+
+/* Summary
+ This error is returned when an operation is attempted on an endpoint that has
+ been disabled.
+
+ Description
+ This error is returned when an operation is attempted on an endpoint that has
+ been disabled.
+
+ See Also
+ * CyAsUsbReadData
+ * CyAsUsbWriteData
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteDataAsync
+*/
+#define CY_AS_ERROR_ENDPOINT_DISABLED (30)
+
+/* Summary
+ This error is returned when a call is made to an API function when the device is in
+ standby.
+
+ Description
+ When the West Bridge device is in standby, the only two API functions that can be called
+ are CyAsMiscInStandby() and CyAsMiscLeaveStandby(). Calling any other API function
+ will result in this error.
+
+ See Also
+*/
+#define CY_AS_ERROR_IN_STANDBY (31)
+
+/* Summary
+ This error is returned when an API call is made with an invalid handle value.
+
+ Description
+ This error is returned when an API call is made with an invalid handle value.
+
+ See Also
+*/
+#define CY_AS_ERROR_INVALID_HANDLE (32)
+
+/* Summary
+ This error is returned when an invalid response is returned from the West Bridge device.
+
+ Description
+ Many of the API calls result in requests made to the West Bridge device. This error occurs
+ when the response from West Bridge is invalid and generally indicates that the West Bridge device
+ should be reset.
+
+ See Also
+*/
+#define CY_AS_ERROR_INVALID_RESPONSE (33)
+
+/* Summary
+ This error is returned from the callback function for any asynchronous read or write
+ request that is canceled.
+
+ Description
+ When asynchronous requests are canceled, this error is passed to the callback function
+ associated with the request to indicate that the request has been canceled
+
+ See Also
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteDataAsync
+ * CyAsStorageCancelAsync
+ * CyAsUsbCancelAsync
+*/
+#define CY_AS_ERROR_CANCELED (34)
+
+/* Summary
+ This error is returned when the call to create sleep channel fails
+ in the HAL layer.
+
+ Description
+ This error is returned when the call to create sleep channel fails
+ in the HAL layer.
+
+ See Also
+ * CyAsMiscConfigureDevice
+*/
+#define CY_AS_ERROR_CREATE_SLEEP_CHANNEL_FAILED (35)
+
+/* Summary
+ This error is returned when the call to CyAsMiscLeaveStandby
+ is made and the device is not in standby.
+
+ Description
+ This error is returned when the call to CyAsMiscLeaveStandby
+ is made and the device is not in standby.
+
+ See Also
+*/
+#define CY_AS_ERROR_NOT_IN_STANDBY (36)
+
+/* Summary
+ This error is returned when the call to destroy sleep channel fails
+ in the HAL layer.
+
+ Description
+ This error is returned when the call to destroy sleep channel fails
+ in the HAL layer.
+
+ See Also
+ * CyAsMiscDestroyDevice
+*/
+#define CY_AS_ERROR_DESTROY_SLEEP_CHANNEL_FAILED (37)
+
+/* Summary
+ This error is returned when an invalid resource is specified to a call
+ to CyAsMiscAcquireResource() or CyAsMiscReleaseResource()
+
+ Description
+ This error is returned when an invalid resource is specified to a call
+ to CyAsMiscAcquireResource() or CyAsMiscReleaseResource()
+
+ See Also
+ * CyAsMiscAcquireResource
+ * CyAsMiscReleaseResource
+*/
+#define CY_AS_ERROR_INVALID_RESOURCE (38)
+
+/* Summary
+ This error occurs when an operation is requested on an endpoint that has
+ a currently pending async operation.
+
+ Description
+ There can only be a single asynchronous pending operation on a given endpoint and
+ while the operation is pending on other operation can occur on the endpoint. In
+ addition, the device cannot enter standby while any asynchronous operations are
+ pending.
+
+ See Also
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteDataAsync
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsUsbReadData
+ * CyAsUsbWriteData
+ * CyAsMiscEnterStandby
+*/
+#define CY_AS_ERROR_ASYNC_PENDING (39)
+
+/* Summary
+ This error is returned when a call to CyAsStorageCancelAsync() or
+ CyAsUsbCancelAsync() is made when no asynchronous request is pending.
+
+ Description
+ This error is returned when a call to CyAsStorageCancelAsync() or
+ CyAsUsbCancelAsync() is made when no asynchronous request is pending.
+
+ See Also
+ * CyAsStorageCancelAsync
+ * CyAsUsbCancelAsync
+*/
+#define CY_AS_ERROR_ASYNC_NOT_PENDING (40)
+
+/* Summary
+ This error is returned when a request is made to put the West Bridge device
+ into standby mode while the USB stack is still active.
+
+ Description
+ This error is returned when a request is made to put the West Bridge device
+ into standby mode while the USB stack is still active. You must call the
+ function CyAsUsbStop() in order to shut down the USB stack in order to go
+ into the standby mode.
+
+ See Also
+ * CyAsMiscEnterStandby
+*/
+#define CY_AS_ERROR_USB_RUNNING (41)
+
+/* Summary
+ A request for in the wrong direction was issued on an endpoint.
+
+ Description
+ This error is returned when a write is attempted on an OUT endpoint or
+ a read is attempted on an IN endpoint.
+
+ See Also
+ * CyAsUsbReadData
+ * CyAsUsbWriteData
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteDataAsync
+*/
+#define CY_AS_ERROR_USB_BAD_DIRECTION (42)
+
+/* Summary
+ An invalid request was received
+
+ Description
+ This error is isused if an invalid request is issued.
+*/
+#define CY_AS_ERROR_INVALID_REQUEST (43)
+
+/* Summary
+ An ACK request was requested while no setup packet was pending.
+
+ Description
+ This error is issued if CyAsUsbAckSetupPacket() is called when no setup packet is
+ pending.
+*/
+#define CY_AS_ERROR_NO_SETUP_PACKET_PENDING (44)
+
+/* Summary
+ A call was made to a API function that cannot be called from a callback.
+
+ Description
+ Only asynchronous functions can be called from within West Bridge callbacks.
+ This error results when an invalid function is called from a callback.
+*/
+#define CY_AS_ERROR_INVALID_IN_CALLBACK (45)
+
+/* Summary
+ A call was made to CyAsUsbSetEndPointConfig() before CyAsUsbSetPhysicalConfiguration()
+ was called.
+
+ Description
+ When logical endpoints are configured, you must define the physical endpoint for the
+ logical endpoint being configured. Therefore CyAsUsbSetPhysicalConfiguration() must
+ be called to define the physical endpoints before calling CyAsUsbSetEndPointConfig().
+*/
+#define CY_AS_ERROR_ENDPOINT_CONFIG_NOT_SET (46)
+
+/* Summary
+ The physical endpoint referenced is not valid in the current physical configuration
+
+ Description
+ When logical endpoints are configured, you must define the physical endpoint for the
+ logical endpoint being configured. Given the current physical configuration, the
+ physical endpoint referenced is not valid.
+*/
+#define CY_AS_ERROR_INVALID_PHYSICAL_ENDPOINT (47)
+
+/* Summary
+ The data supplied to the CyAsMiscDownloadFirmware() call is not aligned on a
+ WORD (16 bit) boundary.
+
+ Description
+ Many systems have problems with the transfer of data a word at a time when the
+ data is not word aligned. For this reason, we require that the firmware image
+ be aligned on a word boundary and be an even number of bytes. This error is returned
+ if these conditions are not met.
+*/
+#define CY_AS_ERROR_ALIGNMENT_ERROR (48)
+
+/* Summary
+ A call was made to destroy the West Bridge device, but the USB stack or the storage
+ stack was will running.
+
+ Description
+ Before calling CyAsMiscDestroyDevice to destroy an West Bridge device created via a
+ call to CyAsMiscCreateDevice, the USB and STORAGE stacks much be stopped via calls
+ to CyAsUsbStop and CyAsStorageStop. This error indicates that one of these two
+ stacks have not been stopped.
+*/
+#define CY_AS_ERROR_STILL_RUNNING (49)
+
+/* Summary
+ A call was made to the API for a function that is not yet supported.
+
+ Description
+ There are calls that are not yet supported that may be called through the API. This
+ is done to maintain compatibility in the future with the API. This error is returned
+ if you are asking for a capability that does not yet exist.
+*/
+#define CY_AS_ERROR_NOT_YET_SUPPORTED (50)
+
+/* Summary
+ A NULL callback was provided where a non-NULL callback was required
+
+ Description
+ When async IO function are called, a callback is required to indicate that the
+ IO has completed. This callback must be non-NULL.
+*/
+#define CY_AS_ERROR_NULL_CALLBACK (51)
+
+/* Summary
+ This error is returned when a request is made to put the West Bridge device
+ into standby mode while the storage stack is still active.
+
+ Description
+ This error is returned when a request is made to put the West Bridge device
+ into standby mode while the storage stack is still active. You must call the
+ function CyAsStorageStop() in order to shut down the storage stack in order to go
+ into the standby mode.
+
+ See Also
+ * CyAsMiscEnterStandby
+*/
+#define CY_AS_ERROR_STORAGE_RUNNING (52)
+
+/* Summary
+ This error is returned when an operation is attempted that cannot be completed while
+ the USB stack is connected to a USB host.
+
+ Description
+ This error is returned when an operation is attempted that cannot be completed while
+ the USB stack is connected to a USB host. In order to sucessfully complete the
+ desired operation, CyAsUsbDisconnect() must be called to disconnect from the host.
+*/
+#define CY_AS_ERROR_USB_CONNECTED (53)
+
+/* Summary
+ This error is returned when a USB disconnect is attempted and the West Bridge device is
+ not connected.
+
+ Description
+ This error is returned when a USB disconnect is attempted and the West Bridge device is
+ not connected.
+*/
+#define CY_AS_ERROR_USB_NOT_CONNECTED (54)
+
+/* Summary
+ This error is returned when an P2S storage operation attempted and data could not be
+ read or written to the storage media.
+
+ Description
+ This error is returned when an P2S storage operation attempted and data could not be
+ read or written to the storage media. If this error is recevied then a retry can be
+ done.
+*/
+#define CY_AS_ERROR_MEDIA_ACCESS_FAILURE (55)
+
+/* Summary
+ This error is returned when an P2S storage operation attempted and the media is write
+ protected.
+
+ Description
+ This error is returned when an P2S storage operation attempted and the media is write
+ protected.
+*/
+#define CY_AS_ERROR_MEDIA_WRITE_PROTECTED (56)
+
+/* Summary
+ This error is returned when an attempt is made to cancel a request that has
+ already been sent to the West Bridge.
+
+ Description
+ It is not possible to cancel an asynchronous storage read/write operation after
+ the actual data transfer with the West Bridge has started. This error is returned
+ if CyAsStorageCancelAsync is called to cancel such a request.
+ */
+#define CY_AS_ERROR_OPERATION_IN_TRANSIT (57)
+
+/* Summary
+ This error is returned when an invalid parameter is passed to one of the APIs.
+
+ Description
+ Some of the West Bridge APIs are applicable to only specific media types, devices
+ etc. This error code is returned when a API is called with an invalid parameter
+ type.
+ */
+#define CY_AS_ERROR_INVALID_PARAMETER (58)
+
+/* Summary
+ This error is returned if an API is not supported in the current setup.
+
+ Description
+ Some of the West Bridge APIs work only with specific device types or firmware images.
+ This error is returned when such APIs are called when the current device or firmware
+ does not support the invoked API function.
+ */
+#define CY_AS_ERROR_NOT_SUPPORTED (59)
+
+/* Summary
+ This error is returned when a call is made to one of the Storage or
+ USB APIs while the device is in suspend mode.
+
+ Description
+ This error is returned when a call is made to one of the storage or
+ USB APIs while the device is in suspend mode.
+ */
+#define CY_AS_ERROR_IN_SUSPEND (60)
+
+/* Summary
+ This error is returned when the call to CyAsMiscLeaveSuspend
+ is made and the device is not in suspend mode.
+
+ Description
+ This error is returned when the call to CyAsMiscLeaveSuspend
+ is made and the device is not in suspend mode.
+ */
+#define CY_AS_ERROR_NOT_IN_SUSPEND (61)
+
+/* Summary
+ This error is returned when a command that is disabled by USB is called.
+
+ Description
+ The remote wakeup capability should be exercised only if enabled by the USB host.
+ This error is returned when the CyAsUsbSignalRemoteWakeup API is called when the
+ feature has not been enabled by the USB host.
+ */
+#define CY_AS_ERROR_FEATURE_NOT_ENABLED (62)
+
+/* Summary
+ This error is returned when an Async storage read or write is called before a
+ query device call is issued.
+
+ Description
+ In order for the SDK to properly set up a DMA the block size of a given media
+ needs to be known. This is done by making a call to CyAsStorageQueryDevice. This
+ call only needs to be made once per device. If this call is not issued before
+ an Async read or write is issued this error code is returned.
+ */
+#define CY_AS_ERROR_QUERY_DEVICE_NEEDED (63)
+
+/* Summary
+ This error is returned when a call is made to USB or STORAGE Start or Stop before
+ a prior Start or Stop has finished.
+
+ Description
+ The USB and STORAGE start and stop functions can only be called if a prior start
+ or stop function call has fully completed. This means when an async EX call is made
+ you must wait until the callback for that call has been completed before calling
+ start or stop again.
+ */
+#define CY_AS_ERROR_STARTSTOP_PENDING (64)
+
+/* Summary
+ This error is returned when a request is made for a bus that does not exist
+
+ Description
+ This error is returned when a request is made that references a bus number that
+ does not exist. This error is returned when the bus number is not present in
+ the current system, or if the bus number given is not valid.
+
+ See Also
+ * CyAsMiscSetTraceLevel
+ * CyAsStorageClaim
+ * CyAsStorageRelease
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+*/
+#define CY_AS_ERROR_NO_SUCH_BUS (65)
+
+/* Summary
+ This error is returned when the bus corresponding to a media type cannot be resolved.
+
+ Description
+ In some S-Port configurations, the same media type may be supported on multiple
+ buses. In this case, it is not possible to resolve the target address based on the
+ media type. This error indicates that only bus-based addressing is supported
+ in a particular run-time configuration.
+
+ See Also
+ * CyAsMediaType
+ * CyAsBusNumber_t
+ */
+#define CY_AS_ERROR_ADDRESS_RESOLUTION_ERROR (66)
+
+/* Summary
+ This error is returned when an invalid command is passed to the CyAsStorageSDIOSync()
+ function.
+
+ Description
+ This error indiactes an unknown Command type was passed to the SDIO command handler
+ function.
+ */
+
+#define CY_AS_ERROR_INVALID_COMMAND (67)
+
+
+/* Summary
+ This error is returned when an invalid function /uninitialized function is passed to an SDIO
+ function.
+
+ Description
+ This error indiactes an unknown/uninitialized function number was passed to a SDIO
+ function.
+ */
+#define CY_AS_ERROR_INVALID_FUNCTION (68)
+
+/* Summary
+ This error is returned when an invalid block size is passed to CyAsSdioSetBlocksize().
+
+ Description
+ This error is returned when an invalid block size (greater than maximum block size supported)is
+ passed to CyAsSdioSetBlocksize().
+ */
+
+#define CY_AS_ERROR_INVALID_BLOCKSIZE (69)
+
+/* Summary
+ This error is returned when an tuple requested is not found.
+
+ Description
+ This error is returned when an tuple requested is not found.
+ */
+#define CY_AS_ERROR_TUPLE_NOT_FOUND (70)
+
+/* Summary
+ This error is returned when an extended IO operation to an SDIO function is
+ Aborted.
+ Description
+ This error is returned when an extended IO operation to an SDIO function is
+ Aborted. */
+#define CY_AS_ERROR_IO_ABORTED (71)
+
+/* Summary
+ This error is returned when an extended IO operation to an SDIO function is
+ Suspended.
+ Description
+ This error is returned when an extended IO operation to an SDIO function is
+ Suspended. */
+#define CY_AS_ERROR_IO_SUSPENDED (72)
+
+/* Summary
+ This error is returned when IO is attempted to a Suspended SDIO function.
+ Description
+ This error is returned when IO is attempted to a Suspended SDIO function. */
+#define CY_AS_ERROR_FUNCTION_SUSPENDED (73)
+
+/* Summary
+ This error is returned if an MTP function is called before MTPStart has completed.
+ Description
+ This error is returned if an MTP function is called before MTPStart has completed.
+*/
+#define CY_AS_ERROR_MTP_NOT_STARTED (74)
+
+/* Summary
+ This error is returned by API functions that are not valid in MTP mode (CyAsStorageClaim for example)
+ Description
+ This error is returned by API functions that are not valid in MTP mode (CyAsStorageClaim for example)
+*/
+#define CY_AS_ERROR_NOT_VALID_IN_MTP (75)
+
+/* Summary
+ This error is returned when an attempt is made to partition a storage device that is already
+ partitioned.
+
+ Description
+ This error is returned when an attempt is made to partition a storage device that is already
+ partitioned.
+*/
+#define CY_AS_ERROR_ALREADY_PARTITIONED (76)
+
+/* Summary
+ This error is returned when a call is made to CyAsUsbSelectMSPartitions after CyAsUsbSetEnumConfig
+ is called.
+
+ Description
+ This error is returned when a call is made to CyAsUsbSelectMSPartitions after CyAsUsbSetEnumConfig
+ is called.
+ */
+#define CY_AS_ERROR_INVALID_CALL_SEQUENCE (77)
+
+/* Summary
+ This error is returned when a StorageWrite opperation is attempted during an ongoing MTP transfer.
+ Description
+ This error is returned when a StorageWrite opperation is attempted during an ongoing MTP transfer.
+ A MTP transfer is initiated by a call to CyAsMTPInitSendObject or CyAsMTPInitGetObject and is not
+ finished until the CyAsMTPSendObjectComplete or CyAsMTPGetObjectComplete event is generated.
+*/
+#define CY_AS_ERROR_NOT_VALID_DURING_MTP (78)
+
+/* Summary
+ This error is returned when a StorageRead or StorageWrite is attempted while a UsbRead or UsbWrite on
+ a Turbo endpoint (2 or 6) is pending, or visa versa.
+ Description
+ When there is a pending usb read or write on a turbo endpoint (2 or 6) a storage read or write call
+ may not be performed. Similarly when there is a pending storage read or write a usb read or write may
+ not be performed on a turbo endpoint (2 or 6).
+*/
+#define CY_AS_ERROR_STORAGE_EP_TURBO_EP_CONFLICT (79)
+
+/* Summary
+ This error is returned when processor requests to reserve greater number of zones than available for
+ proc booting via lna firmware.
+
+ Description
+ Astoria does not allocate any nand zones for the processor in this case.
+*/
+#define CY_AS_ERROR_EXCEEDED_NUM_ZONES_AVAIL (80)
+
+#endif /* _INCLUDED_CYASERR_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyashal.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,85 @@
+/* Cypress West Bridge API header file (cyashal.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASHAL_H_
+#define _INCLUDED_CYASHAL_H_
+
+#if !defined(__doxygen__)
+
+/* The possible HAL layers defined and implemented by Cypress */
+/*nxz*/
+#ifdef __CY_ASTORIA_BEAGLEBOARD_SPI__HAL__
+#ifdef CY_HAL_DEFINED
+#error Only one HAL layer can be defined
+#endif
+
+#define CY_HAL_DEFINED
+
+#include "cyashalbeagleboard.h"
+#endif
+
+#ifdef __CY_ASTORIA_FPGA_HAL__
+#ifdef CY_HAL_DEFINED
+#error Only one HAL layer can be defined
+#endif
+
+#define CY_HAL_DEFINED
+
+#include "cyashalfpga.h"
+#endif
+
+/***** SCM User space HAL ****/
+#ifdef __CY_ASTORIA_SCM_HAL__
+#ifdef CY_HAL_DEFINED
+#error Only one HAL layer can be defined
+#endif
+
+#define CY_HAL_DEFINED
+
+#include "cyanhalscm.h"
+#endif
+/***** SCM User space HAL ****/
+
+/***** SCM Kernel HAL ****/
+#ifdef __CY_ASTORIA_SCM_KERNEL_HAL__
+#ifdef CY_HAL_DEFINED
+#error Only one HAL layer can be defined
+#endif
+
+#define CY_HAL_DEFINED
+
+#include "cyanhalscm_kernel.h"
+#endif
+/***** SCM Kernel HAL ****/
+
+#ifdef __CY_ASTORIA_CUSTOMER_HAL__
+#ifdef CY_HAL_DEFINED
+#error Only one HAL layer can be defined
+#endif
+
+#define CY_HAL_DEFINED
+#include "cyashal_customer.h"
+
+#endif
+
+#endif /* __doxygen__ */
+
+#endif /* _INCLUDED_CYASHAL_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyashalcb.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,42 @@
+/* Cypress West Bridge API header file (cyashalcb.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASHALCB_H_
+#define _INCLUDED_CYASHALCB_H_
+
+/* Summary
+ This type defines a callback function type called when a DMA operation has completed.
+
+ Description
+
+ See Also
+ * CyAsHalDmaRegisterCallback
+ * CyAsHalDmaSetupWrite
+ * CyAsHalDmaSetupRead
+*/
+typedef void (*CyAsHalDmaCompleteCallback)(
+ CyAsHalDeviceTag tag,
+ CyAsEndPointNumber_t ep,
+ uint32_t cnt,
+ CyAsReturnStatus_t ret) ;
+
+typedef CyAsHalDmaCompleteCallback CyAnHalDmaCompleteCallback;
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyashaldef.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,78 @@
+/* Cypress West Bridge API header file (cyashaldef.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASHALDEF_H_
+#define _INCLUDED_CYASHALDEF_H_
+
+/* Summary
+ If set to TRUE, the basic numeric types are defined by the West Bridge API code
+
+ Description
+ The West Bridge API relies on some basic integral types to be defined. These types include
+ uint8_t, int8_t, uint16_t, int16_t, uint32_t, and int32_t. If this macro is defined the
+ West Bridge API will define these types based on some basic assumptions. If this value is
+ set and the West Bridge API is used to set these types, the definition of these types must
+ be examined to insure that they are appropriate for the given target architecture and
+ compiler.
+
+ Notes
+ It is preferred that if the basic platform development environment defines these types
+ that the CY_DEFINE_BASIC_TYPES macro be undefined and the appropriate target system header
+ file be added to the file cyashaldef.h.
+*/
+#ifndef CY_DEFINE_BASIC_TYPES
+
+/*
+ * Include your target system header file that defines the basic types here if at all
+ * possible.
+ */
+#ifdef __CY_ASTORIA_SCM_KERNEL_HAL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
+#else
+
+/*
+ * Define the basic types. If these are not defined by your system, define these
+ * here by defining the symbol CY_DEFINE_BASIC_TYPES
+ */
+typedef signed char int8_t ;
+typedef signed short int16_t ;
+typedef signed int int32_t ;
+typedef unsigned char uint8_t ;
+typedef unsigned short uint16_t ;
+typedef unsigned int uint32_t ;
+
+/*nxz*/
+#include <e32def.h>
+
+
+#endif
+
+#if !defined(__doxygen__)
+typedef int CyBool ;
+#define CyTrue (1)
+#define CyFalse (0)
+#endif
+
+#endif /* _INCLUDED_CYASHALDEF_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyashaldoc.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,687 @@
+/* Cypress West Bridge API header file (cyashaldoc.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASHALDOC_H_
+#define _INCLUDED_CYASHALDOC_H_
+
+#include "cyashaldef.h"
+
+/*@@Hardware Abstraction Layer (HAL)
+ Summary
+ This software module is supplied by the user of the West Bridge API. This module contains the
+ software that is specific to the hardware implementation or operating system of the client
+ system.
+
+ * Sleep Channels *
+ A sleep channel is a operating system object that provides that capability for one
+ thread or process to sleep while waiting on the completion of some hardware event. The
+ hardware event is usually processed by a hardware interrupt and the interrupt handler
+ then wakes the thread or process that is sleeping.
+
+ A sleep channel provides the mechanism for this operation. A sleep channel is created and
+ initialized during the API initialization. When the API needs to wait for the hardware, the
+ API performs a SleepOn() operation on the sleep channel. When hardware event occurs, an
+ interrupt handler processes the event and then performs a Wake() operation on the sleep channel
+ to wake the sleeping process or thread.
+
+ * DMA Model *
+ When the West Bridge API needs to transfer USB or storage data to/from the West Bridge device, this is
+ done using a "DMA" operation. In this context the term DMA is used loosely as the West Bridge
+ API does not really care if the data is transferred using a burst read or write operation,
+ or if the data is transferred using programmed I/O operations. When a "DMA" operation is
+ needed, the West Bridge API calls either CyAsHalDmaSetupRead() or CyAsHalDmaSetupWrite() depending
+ on the direction of the data flow. The West Bridge API expects the "DMA" operation requested in
+ the call to be completed and the registered "DMA complete" callback to be called.
+
+ The West Bridge API looks at several factors to determine the size of the "DMA" request to
+ pass to the HAL layer. First the West Bridge API calls CyAsHalDmaMaxRequestSize() to determine
+ the maximum amount of data the HAL layer can accept for a "DMA" operation on the requested
+ endpoint. The West Bridge API will never exceed this value in a "DMA" request to the HAL
+ layer. The West Bridge API also sends the maximum amount of data the West Bridge device can
+ accept as part of the "DMA" request. If the amount of data in the "DMA" request to the HAL
+ layer exceeds the amount of data the West Bridge device can accept, it is expected that the
+ HAL layer has the ability to break the request into multiple operations.
+
+ If the HAL implementation requires the API to handle the size of the "DMA" requests for
+ one or more endpoints, the value CY_AS_DMA_MAX_SIZE_HW_SIZE can be returned from the
+ CyAsHalDmaMaxRequestSize() call. In this case, the API assumes that the maximum size of
+ each "DMA" request should be limited to the maximum that can be accepted by the endpoint
+ in question.
+
+ Notes
+ See the <install>/api/hal/scm_kernel/cyashalscm_kernel.c file for an example of how
+ the DMA request size can be managed by the HAL implementation.
+
+ * Interrupt Handling *
+ The HAL implementation is required to handle interrupts arriving from the West Bridge device,
+ and call the appropriate handlers. If the interrupt arriving is one of PLLLOCKINT,
+ PMINT, MBINT or MCUINT, the CyAsIntrServiceInterrupt API should be called to service the
+ interrupt. If the interrupt arriving is DRQINT, the HAL should identify the endpoint
+ corresponding to which the DRQ is being generated and perform the read/write transfer
+ from the West Bridge. See the <install>/api/hal/scm_kernel/cyashalscm_kernel.c or
+ <install>/api/hal/fpga/cyashalfpga.c reference HAL implementations for examples.
+
+ The HAL implementation can choose to poll the West Bridge interrupt status register instead
+ of using interrupts. In this case, the polling has to be performed from a different
+ thread/task than the one running the APIs. This is required because there are API calls
+ that block on the reception of data from the West Bridge, which is delivered only through
+ the interrupt handlers.
+
+ * Required Functions *
+ This section defines the types and functions that must be supplied in order to provide a
+ complete HAL layer for the West Bridge API.
+
+ Types that must be supplied:
+ * CyAsHalSleepChannel
+
+ Hardware functions that must be supplied:
+ * CyAsHalWriteRegister
+ * CyAsHalReadRegister
+ * CyAsHalDmaSetupWrite
+ * CyAsHalDmaSetupRead
+ * CyAsHalDmaCancelRequest
+ * CyAsHalDmaRegisterCallback
+ * CyAsHalDmaMaxRequestSize
+ * CyAsHalSetWakeupPin
+ * CyAsHalSyncDeviceClocks
+ * CyAsHalInitDevRegisters
+ * CyAsHalReadRegsBeforeStandby
+ * CyAsHalRestoreRegsAfterStandby
+
+ Operating system functions that must be supplied:
+ * CyAsHalAlloc
+ * CyAsHalFree
+ * CyAsHalCBAlloc
+ * CyAsHalCBFree
+ * CyAsHalMemSet
+ * CyAsHalCreateSleepChannel
+ * CyAsHalDestroySleepChannel
+ * CyAsHalSleepOn
+ * CyAsHalWake
+ * CyAsHalDisableInterrupts
+ * CyAsHalEnableInterrupts
+ * CyAsHalSleep150
+ * CyAsHalSleep
+ * CyAsHalAssert
+ * CyAsHalPrintMessage
+ * CyAsHalIsPolling
+*/
+
+/* Summary
+ This is the type that represents a sleep channel
+
+ Description
+ A sleep channel is an operating system object that, when a thread of control waits on the
+ sleep channel, the thread sleeps until another thread signals the sleep object. This object
+ is generally used when a high level API is called and must wait for a response that is
+ supplied in an interrupt handler. The thread calling the API is put into a sleep state and
+ when the reply arrives via the interrupt handler, the interrupt handler wakes the sleeping
+ thread to indicate that the expect reply is available.
+*/
+typedef struct CyAsHalSleepChannel
+{
+ int m_channel ; /* This structure is filled in with OS specific information
+ to implementat a sleep channel */
+} CyAsHalSleepChannel ;
+
+/* Summary
+ This function is called to write a register value
+
+ Description
+ This function is called to write a specific register to a specific value. The tag identifies the
+ device of interest. The address is relative to the base address of the West Bridge device.
+
+ Returns
+ Nothing
+
+ See Also
+ * CyAsHalDeviceTag
+ * CyAsHalReadRegister
+*/
+EXTERN void
+CyAsHalWriteRegister(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ uint16_t addr, /* The address we are writing to */
+ uint16_t value /* The value to write to the register */
+ ) ;
+
+/* Summary
+ This function is called to read a register value
+
+ Description
+ This function is called to read the contents of a specific register. The tag identifies the
+ device of interest. The address is relative to the base address of the West Bridge device.
+
+ Returns
+ Contents of the register
+
+ See Also
+ * CyAsHalDeviceTag
+ * CyAsHalWriteRegister
+*/
+EXTERN uint16_t
+CyAsHalReadRegister(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ uint16_t addr /* The address we are writing to */
+ ) ;
+
+/* Summary
+ This function initiates a DMA write operation to write to West Bridge
+
+ Description
+ This function initiates a DMA write operation. The request size will not exceed the value the HAL
+ layer returned via CyAsHalDmaMaxRequestSize(). This request size may exceed the size of what the
+ West Bridge device will accept as one packet and the HAL layer may need to divide the request into
+ multiple hardware DMA operations.
+
+ Returns
+ None
+
+ See Also
+ * CyAsHalDmaSetupRead
+ * CyAsHalDmaMaxRequestSize
+*/
+EXTERN void
+CyAsHalDmaSetupWrite(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint we are writing to */
+ void * buf_p, /* The data to write via DMA */
+ uint32_t size, /* The size of the data at buf_p */
+ uint16_t maxsize /* The maximum amount of data that the endpoint can accept as one packet */
+ ) ;
+
+/* Summary
+ This function initiates a DMA read operation from West Bridge
+
+ Description
+ This function initiates a DMA read operation. The request size will not exceed the value the
+ HAL layer returned via CyAsHalDmaMaxRequestSize(). This request size may exceed the size of what
+ the Anitoch will accept as one packet and the HAL layer may need to divide the request into multiple
+ hardware DMA operations.
+
+ Returns
+ None
+
+ See Also
+ * CyAsHalDmaSetupRead
+ * CyAsHalDmaMaxRequestSize
+*/
+EXTERN void
+CyAsHalDmaSetupRead(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint we are reading from */
+ void * buf_p, /* The buffer to read data into */
+ uint32_t size, /* The amount of data to read */
+ uint16_t maxsize /* The maximum amount of data that the endpoint can provide in one DMA operation */
+ ) ;
+
+/* Summary
+ This function cancels a pending DMA request
+
+ Description
+ This function cancels a pending DMA request that has been passed down to the hardware. The HAL layer
+ can elect to physically cancel the request if possible, or just ignore the results of the request if it
+ is not possible.
+
+ Returns
+ None
+*/
+EXTERN void
+CyAsHalDmaCancelRequest(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ CyAsEndPointNumber_t ep /* The endpoint we are reading from */
+ ) ;
+
+/* Summary
+ This function registers a callback function to be called when a DMA request is completed
+
+ Description
+ This function registers a callback that is called when a request issued via CyAsHalDmaSetupWrite() or
+ CyAsHalDmaSetupRead() has completed.
+
+ Returns
+ None
+
+ See Also
+ * CyAsHalDmaSetupWrite
+ * CyAsHalDmaSetupRead
+*/
+EXTERN void
+CyAsHalDmaRegisterCallback(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ CyAsHalDmaCompleteCallback cb /* The callback to call when a request has completed */
+ ) ;
+
+/* Summary
+ This function returns the maximum size of a DMA request that can be handled by the HAL.
+
+ Description
+ When DMA requests are passed to the HAL layer for processing, the HAL layer may have a limit
+ on the size of the request that can be handled. This function is called by the DMA manager
+ for an endpoint when DMA is enabled to get the maximum size of data the HAL layer can handle.
+ The DMA manager insures that a request is never sent to the HAL layer that exceeds the size
+ returned by this function.
+
+ Returns
+ the maximum size of DMA request the HAL layer can handle
+*/
+EXTERN uint32_t
+CyAsHalDmaMaxRequestSize(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ CyAsEndPointNumber_t ep /* The endpoint of interest */
+ ) ;
+
+/* Summary
+ This function sets the WAKEUP pin to a specific state on the West Bridge device.
+
+ Description
+ In order to enter the standby mode, the WAKEUP pin must be de-asserted. In order to resume from
+ standby mode, the WAKEUP pin must be asserted. This function provides the mechanism to do
+ this.
+
+ Returns
+ 1 if the pin was changed, 0 if the HAL layer does not support changing this pin
+*/
+EXTERN uint32_t
+CyAsHalSetWakeupPin(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ CyBool state /* The desired state of the wakeup pin */
+ ) ;
+
+/* Summary
+ Synchronise the West Bridge device clocks to re-establish device connectivity.
+
+ Description
+ When the Astoria bridge device is working in SPI mode, a long period of inactivity
+ can cause a loss of serial synchronisation between the processor and Astoria. This
+ function is called by the API when it detects such a condition, and is expected to take
+ the action required to re-establish clock synchronisation between the devices.
+
+ Returns
+ CyTrue if the attempt to re-synchronise is successful, CyFalse if not.
+ */
+EXTERN CyBool
+CyAsHalSyncDeviceClocks(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ ) ;
+
+/* Summary
+ Initialize West Bridge device registers that may have been modified while the device
+ was in standby.
+
+ Description
+ The content of some West Bridge registers may be lost when the device is placed in
+ standby mode. This function restores these register contents so that the device can
+ continue to function normally after it wakes up from standby mode.
+
+ This function is required to perform operations only when the API is being used with
+ the Astoria device in one of the PNAND modes or in the PSPI mode. It can be a
+ no-operation in all other cases.
+
+ Returns
+ None
+ */
+EXTERN void
+CyAsHalInitDevRegisters(
+ CyAsHalDeviceTag tag, /* The tag to ID a specific West Bridge device */
+ CyBool is_standby_wakeup /* Indicates whether this is a wake-up from standby. */
+ ) ;
+
+/* Summary
+ This function reads a set of P-port accessible device registers and stores their value
+ for later use.
+
+ Description
+ The West Bridge Astoria device silicon has a known problem when operating in SPI mode
+ on the P-port, where some of the device registers lose their value when the device
+ goes in and out of standby mode. The suggested work-around is to reset the Astoria
+ device as part of the wakeup procedure from standby.
+
+ This requires that the values of some of the P-port accessible registers be restored to
+ their pre-standby values after it has been reset. This HAL function can be used to read
+ and store the values of these registers at the point where the device is being placed
+ in standby mode.
+
+ Returns
+ None
+
+ See Also
+ * CyAsHalRestoreRegsAfterStandby
+ */
+EXTERN void
+CyAsHalReadRegsBeforeStandby(
+ CyAsHalDeviceTag tag /* The tag to ID a specific West Bridge device */
+ ) ;
+
+/* Summary
+ This function restores the old values to a set of P-port accessible device registers.
+
+ Description
+ This function is part of the work-around to a known West Bridge Astoria device error when
+ operating in SPI mode on the P-port. This function is used to restore a set of P-port
+ accessible registers to the values they had before the device was placed in standby
+ mode.
+
+ Returns
+ None
+
+ See Also
+ * CyAsHalRestoreRegsAfterStandby
+ */
+EXTERN void
+CyAsHalRestoreRegsAfterStandby(
+ CyAsHalDeviceTag tag /* The tag to ID a specific West Bridge device */
+ ) ;
+
+/*
+ * The functions below this comment are part of the HAL layer, as the HAL layer consists of the
+ * abstraction to both the hardware platform and the operating system. However; the functions below
+ * this comment all relate to the operating environment and not specifically to the hardware platform
+ * or specific device.
+ */
+
+/* Summary
+ This function allocates a block of memory
+
+ Description
+ This is the HAL layer equivalent of the malloc() function.
+
+ Returns
+ a pointer to a block of memory
+
+ See Also
+ * CyAsHalFree
+*/
+EXTERN void *
+CyAsHalAlloc(
+ uint32_t size /* The size of the memory block to allocate */
+ ) ;
+
+/* Summary
+ This function frees a previously allocated block of memory
+
+ Description
+ This is the HAL layer equivalent of the free() function.
+
+ Returns
+ None
+
+ See Also
+ * CyAsHalAlloc
+*/
+EXTERN void
+CyAsHalFree(
+ void * ptr /* Pointer to a memory block to free */
+ ) ;
+
+/* Summary
+ This function is a malloc equivalent that can be used from an
+ interrupt context.
+
+ Description
+ This function is a malloc equivalent that will be called from the
+ API in callbacks. This function is required to be able to provide
+ memory in interrupt context.
+
+ Notes
+ For platforms where it is not possible to allocate memory in interrupt
+ context, we provide a reference allocator that takes memory during
+ initialization and implements malloc/free using this memory.
+ See the <install>/api/hal/fpga/cyashalblkalloc.[ch] files for the
+ implementation, and the <install>/api/hal/fpga/cyashalfpga.c file
+ for an example of the use of this allocator.
+
+ Returns
+ A pointer to the allocated block of memory
+
+ See Also
+ * CyAsHalCBFree
+ * CyAsHalAlloc
+*/
+EXTERN void *
+CyAsHalCBAlloc(
+ uint32_t size /* The size of the memory block to allocate */
+ ) ;
+
+/* Summary
+ This function frees the memory allocated through the CyAsHalCBAlloc
+ call.
+
+ Description
+ This function frees memory allocated through the CyAsHalCBAlloc
+ call, and is also required to support calls from interrupt
+ context.
+
+ Returns
+ None
+
+ See Also
+ * CyAsHalCBAlloc
+ * CyAsHalFree
+*/
+EXTERN void
+CyAsHalCBFree(
+ void * ptr /* Pointer to the memory block to be freed */
+ ) ;
+
+/* Summary
+ This function sets a block of memory to a specific value
+
+ Description
+ This function is the HAL layer equivalent of the memset() function.
+
+ Returns
+ None
+*/
+EXTERN void
+CyAsMemSet(
+ void * ptr, /* A pointer to a block of memory to set */
+ uint8_t value, /* The value to set the memory to */
+ uint32_t cnt /* The number of bytes to set */
+ ) ;
+
+/* Summary
+ This function creates or initializes a sleep channel
+
+ Description
+ This function creates or initializes a sleep channel. The sleep channel defined using
+ the HAL data structure CyAsHalSleepChannel.
+
+ Returns
+ CyTrue is the initialization was sucessful, and CyFalse otherwise
+
+ See Also
+ * CyAsHalSleepChannel
+ * CyAsHalDestroySleepChannel
+ * CyAsHalSleepOn
+ * CyAsHalWake
+*/
+EXTERN CyBool
+CyAsHalCreateSleepChannel(
+ CyAsHalSleepChannel *chan /* Pointer to the sleep channel to create/initialize */
+ ) ;
+
+/* Summary
+ This function destroys an existing sleep channel
+
+ Description
+ This function destroys an existing sleep channel. The sleep channel is of type
+ CyAsHalSleepChannel.
+
+ Returns
+ CyTrue if the channel was destroyed, and CyFalse otherwise
+
+ See Also
+ * CyAsHalSleepChannel
+ * CyAsHalCreateSleepChannel
+ * CyAsHalSleepOn
+ * CyAsHalWake
+*/
+EXTERN CyBool
+CyAsHalDestroySleepChannel(
+ CyAsHalSleepChannel chan /* The sleep channel to destroy */
+ ) ;
+
+/* Summary
+ This function causes the calling process or thread to sleep until CyAsHalWake() is called
+
+ Description
+ This function causes the calling process or threadvto sleep. When CyAsHalWake() is called
+ on the same sleep channel, this processes or thread is then wakened and allowed to run
+
+ Returns
+ CyTrue if the thread or process is asleep, and CyFalse otherwise
+
+ See Also
+ * CyAsHalSleepChannel
+ * CyAsHalWake
+*/
+EXTERN CyBool
+CyAsHalSleepOn(
+ CyAsHalSleepChannel chan, /* The sleep channel to sleep on */
+ uint32_t ms /* The maximum time to sleep in milli-seconds */
+ ) ;
+
+/* Summary
+ This function casues the process or thread sleeping on the given sleep channel to wake
+
+ Description
+ This function causes the process or thread sleeping on the given sleep channel to wake. The
+ channel
+
+ Returns
+ CyTrue if the thread or process is awake, and CyFalse otherwise
+
+ See Also
+ * CyAsHalSleepChannel
+ * CyAsHalSleepOn
+*/
+EXTERN CyBool
+CyAsHalWake(
+ CyAsHalSleepChannel chan /* The sleep channel to wake */
+ ) ;
+
+/* Summary
+ This function disables interrupts, insuring that short bursts of code can be run without danger of interrupt
+ handlers running.
+
+ Description
+ There are cases within the API when lists must be manipulated by both the API and the associated
+ interrupt handlers. In these cases, interrupts must be disabled to insure the integrity of the list during the
+ modification. This function is used to disable interrupts during the short intervals where these lists are being
+ changed.
+
+ The HAL must have the ability to nest calls to CyAsHalDisableInterrupts and CyAsHalEnableInterrupts.
+
+ Returns
+ Any interrupt related state value which will be passed back into the subsequent CyAsHalEnableInterrupts call.
+
+ See Also
+ * CyAsHalEnableInterrupts
+*/
+EXTERN uint32_t
+CyAsHalDisableInterrupts() ;
+
+/* Summary
+ This function re-enables interrupts after a critical section of code in the API has been completed.
+
+ Description
+ There are cases within the API when lists must be manipulated by both the API and the associated
+ interrupt handlers. In these cases, interrupts must be disabled to insure the integrity of the list during the
+ modification. This function is used to enable interrupts after the short intervals where these lists are being
+ changed.
+
+ See Also
+ * CyAsHalDisableInterrupts
+*/
+EXTERN void
+CyAsHalEnableInterrupts(
+ uint32_t value /* Value returned by the previous CyAsHalDisableInterrupts call. */
+ ) ;
+
+/* Summary
+ This function sleeps for 150 ns.
+
+ Description
+ This function sleeps for 150 ns before allowing the calling function to continue. This function is used for a
+ specific purpose and the sleep required is at least 150 ns.
+*/
+EXTERN void
+CyAsHalSleep150(
+ ) ;
+
+/* Summary
+ This function sleeps for the given number of milliseconds
+
+ Description
+ This function sleeps for at least the given number of milliseonds
+*/
+EXTERN void
+CyAsHalSleep(
+ uint32_t ms
+ ) ;
+
+/* Summary
+ This function asserts when the condition evaluates to zero
+
+ Description
+ Within the API there are conditions which are checked to insure the integrity of the code. These conditions are
+ checked only within a DEBUG build. This function is used to check the condition and if the result evaluates to
+ zero, it should be considered a fatal error that should be reported to Cypress.
+*/
+EXTERN void
+CyAsHalAssert(
+ CyBool cond /* The condition to evaluate */
+ ) ;
+
+/* Summary
+ This function prints a message from the API to a human readable device
+
+ Description
+ There are places within the West Bridge API where printing a message is useful to the debug process. This function
+ provides the mechanism to print a message.
+
+ Returns
+ NONE
+*/
+EXTERN void
+CyAsHalPrintMessage(
+ const char * fmt_p, /* The message to print */
+ ... /* Variable arguments */
+ ) ;
+
+/* Summary
+ This function reports whether the HAL implementation uses polling to service
+ data coming from the West Bridge.
+
+ Description
+ This function reports whether the HAL implementation uses polling to service
+ data coming from the West Bridge.
+
+ Returns
+ CyTrue if the HAL polls the West Bridge Interrupt Status registers to complete operations,
+ CyFalse if the HAL is interrupt driven.
+ */
+EXTERN CyBool
+CyAsHalIsPolling (
+ void) ;
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasmedia.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,49 @@
+/* Cypress West Bridge API header file (cyasmedia.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASMEDIA_H_
+#define _INCLUDED_CYASMEDIA_H_
+
+#include "cyas_cplus_start.h"
+
+
+/* Summary
+ Specifies a specific type of media supported by West Bridge
+
+ Description
+ The West Bridge device supports five specific types of media as storage/IO devices
+ attached to it's S-Port. This type is used to indicate the type of
+ media being referenced in any API call.
+*/
+typedef enum CyAsMediaType
+{
+ CyAsMediaNand = 0x00, /* Flash NAND memory (may be SLC or MLC) */
+ CyAsMediaSDFlash = 0x01, /* An SD flash memory device */
+ CyAsMediaMMCFlash = 0x02, /* An MMC flash memory device */
+ CyAsMediaCEATA = 0x03, /* A CE-ATA disk drive */
+ CyAsMediaSDIO = 0x04, /* SDIO device. */
+ CyAsMediaMaxMediaValue = 0x05
+
+} CyAsMediaType ;
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYASMEDIA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasmisc.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1250 @@
+/* Cypress West Bridge API header file (cyasmisc.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASMISC_H_
+#define _INCLUDED_CYASMISC_H_
+
+#include "cyashal.h"
+#include "cyastypes.h"
+#include "cyasmedia.h"
+
+#include "cyas_cplus_start.h"
+
+#define CY_AS_LEAVE_STANDBY_DELAY_CLOCK (1)
+#define CY_AS_RESET_DELAY_CLOCK (1)
+
+#define CY_AS_LEAVE_STANDBY_DELAY_CRYSTAL (5)
+#define CY_AS_RESET_DELAY_CRYSTAL (5)
+
+/* The maximum number of buses supported */
+#define CY_AS_MAX_BUSES (2)
+
+/* The maximum number of storage devices supported per bus */
+#define CY_AS_MAX_STORAGE_DEVICES (1)
+
+#define CY_AS_FUNCTCBTYPE_DATA_MASK (0x60000000U)
+#define CY_AS_FUNCTCBTYPE_TYPE_MASK (0x1FFFFFFFU)
+
+#define CyAsFunctCBTypeGetType(t) ((CyAsFunctCBType)((t) & CY_AS_FUNCTCBTYPE_TYPE_MASK))
+#define CyAsFunctCBTypeContainsData(t) (((CyAsFunctCBType)((t) & CY_AS_FUNCTCBTYPE_DATA_MASK)) == CY_FUNCT_CB_DATA)
+
+/*****************************************************************************
+ * West Bridge Types
+ ****************************************************************************/
+
+/* Summary
+ Specifies a handle to an West Bridge device
+
+ Description
+ This type represents an opaque handle to an West Bridge device. This handle is
+ created via the CyAsMiscCreateDevice() function and is used in all subsequent
+ calls that communicate to the West Bridge device.
+
+ See Also
+ * CyAsMiscCreateDevice
+ * CyAsMiscDestroyDevice
+*/
+typedef void * CyAsDeviceHandle ;
+
+/* Summary
+ This data type gives the mode for the DACK# signal
+*/
+typedef enum CyAsDeviceDackMode
+{
+ CyAsDeviceDackAck, /* Operate in the ACK mode */
+ CyAsDeviceDackEob /* Operate in the EOB mode */
+} CyAsDeviceDackMode ;
+
+/* Summary
+ This data structure gives the options for all hardware features.
+
+ Description
+ This structure contains the information required to initialize the West Bridge hardware.
+ Any features of the device that can be configured by the caller are specified here.
+
+ See Also
+ * CyAsMiscConfigure
+*/
+typedef struct CyAsDeviceConfig
+{
+ CyBool srammode ; /* If TRUE, the P port is running in SRAM mode. */
+ CyBool sync ; /* If TRUE, the P port is synchronous, otherwise async */
+ CyBool dmaintr ; /* If TRUE, DMA req will be delivered via the interrupt signal */
+ CyAsDeviceDackMode dackmode ; /* Mode for the DACK# signal */
+ CyBool drqpol ; /* If TRUE, the DRQ line is active high, otherwise active low */
+ CyBool dackpol ; /* If TRUE, the DACK line is active high, otherwise active low */
+ CyBool crystal ; /* If TRUE, the clock is connected to a crystal, otherwise it is
+ connected to a clock */
+} CyAsDeviceConfig ;
+
+
+/* Summary
+ Specifies a resource that can be owned by either the West Bridge device or by the processor.
+
+ Description
+ This enumerated type identifies a resource that can be owned either by
+ the West Bridge device, or by the processor attached to the P port of the
+ West Bridge device.
+
+ See Also
+ * CyAsMiscAcquireResource
+ * CyAsMiscReleaseResource
+*/
+typedef enum CyAsResourceType
+{
+ CyAsBusUSB = 0, /* The USB D+ and D- pins */
+ CyAsBus_1 = 1, /* The SDIO bus */
+ CyAsBus_0 = 2 /* The NAND bus (not implemented) */
+} CyAsResourceType;
+
+/* Summary
+ Specifies the reset type for a software reset operation.
+
+ Description
+ When the West Bridge device is reset, there are two types of reset that are
+ possible. This type indicates the type of reset requested.
+
+ Notes
+ Both of these reset types are software based resets; and are distinct from
+ a chip level HARD reset that is applied through the reset pin on the West Bridge.
+
+ The CyAsResetSoft type resets only the on-chip micro-controller in the West Bridge.
+ In this case, the previously loaded firmware will continue running. However,
+ the Storage and USB stack operations will need to be restarted, as any state
+ relating to these would have been lost.
+
+ The CyAsResetHard type resets the entire West Bridge chip, and will need a fresh
+ configuration and firmware download.
+
+ See Also
+ * <LINK CyAsMiscReset>
+ */
+
+typedef enum CyAsResetType
+{
+ CyAsResetSoft, /* Just resets the West Bridge micro-controller */
+ CyAsResetHard /* Resets entire device, firmware must be reloaded and
+ the West Bridge device must be re-initialized */
+} CyAsResetType;
+
+
+
+/* Summary
+ This type specifies the polarity of the SD power pin.
+
+ Description
+ Sets the SD power pin ( port C, bit 6) to active low or active high.
+
+*/
+
+typedef enum CyAsMiscSignalPolarity
+{
+ CyAsMiscActiveHigh,
+ CyAsMiscActiveLow
+
+} CyAsMiscSignalPolarity ;
+
+
+
+/* Summary
+ This type specifies the type of the data returned by a Function Callback.
+
+ Description
+ CY_FUNCT_CB_NODATA - This callback does not return any additional information in the data field.
+ CY_FUNCT_CB_DATA - The data field is used, and the CyAsFunctCBType will also contain the type of this data.
+
+ See Also
+ CyAsFunctionCallback
+*/
+typedef enum CyAsFunctCBType
+{
+ CY_FUNCT_CB_INVALID = 0x0U,
+ CY_FUNCT_CB_MISC_GETFIRMWAREVERSION, /* Data from a CyAsMiscGetFirmwareVersion call. */
+ CY_FUNCT_CB_MISC_HEARTBEATCONTROL, /* Data from a CyAsMiscHeartBeatControl call. */
+ CY_FUNCT_CB_MISC_ACQUIRERESOURCE, /* Data from a CyAsMiscAcquireResource call. */
+ CY_FUNCT_CB_MISC_READMCUREGISTER, /* Data from a CyAsMiscReadMCURegister call. */
+ CY_FUNCT_CB_MISC_WRITEMCUREGISTER, /* Data from a CyAsMiscWriteMCURegister call. */
+ CY_FUNCT_CB_MISC_SETTRACELEVEL, /* Data from a CyAsMiscSetTraceLevel call. */
+ CY_FUNCT_CB_MISC_STORAGECHANGED, /* Data from a CyAsMiscStorageChanged call. */
+ CY_FUNCT_CB_MISC_GETGPIOVALUE, /* Data from a CyAsMiscGetGpioValue call. */
+ CY_FUNCT_CB_MISC_SETGPIOVALUE, /* Data from a CyAsMiscSetGpioValue call. */
+ CY_FUNCT_CB_MISC_DOWNLOADFIRMWARE, /* Data from a CyAsMiscDownloadFirmware call. */
+ CY_FUNCT_CB_MISC_ENTERSTANDBY, /* Data from a CyAsMiscEnterStandby call. */
+ CY_FUNCT_CB_MISC_ENTERSUSPEND, /* Data from a CyAsMiscEnterSuspend call. */
+ CY_FUNCT_CB_MISC_LEAVESUSPEND, /* Data from a CyAsMiscLeaveSuspend call. */
+ CY_FUNCT_CB_MISC_RESET, /* Data from a CyAsMiscReset call. */
+ CY_FUNCT_CB_MISC_SETSDFREQ, /* Data from a CyAsMiscSetLowSpeedSDFreq or CyAsMiscSetHighSpeedSDFreq call. */
+ CY_FUNCT_CB_MISC_RESERVELNABOOTAREA, /* Data from a CyAsMiscSwitchPnandMode call */
+ CY_FUNCT_CB_MISC_SETSDPOLARITY, /* Data from a CyAsMiscSetSDPowerPolarity call */
+
+ CY_FUNCT_CB_STOR_START, /* Data from a CyAsStorageStart call. */
+ CY_FUNCT_CB_STOR_STOP, /* Data from a CyAsStorageStop call. */
+ CY_FUNCT_CB_STOR_CLAIM, /* Data from a CyAsStorageClaim call. */
+ CY_FUNCT_CB_STOR_RELEASE, /* Data from a CyAsStorageRelease call. */
+ CY_FUNCT_CB_STOR_QUERYMEDIA, /* Data from a CyAsStorageQueryMedia call. */
+ CY_FUNCT_CB_STOR_QUERYBUS, /* Data from a CyAsStorageQueryBus call. */
+ CY_FUNCT_CB_STOR_QUERYDEVICE, /* Data from a CyAsStorageQueryDevice call. */
+ CY_FUNCT_CB_STOR_QUERYUNIT, /* Data from a CyAsStorageQueryUnit call. */
+ CY_FUNCT_CB_STOR_DEVICECONTROL, /* Data from a CyAsStorageDeviceControl call. */
+ CY_FUNCT_CB_STOR_SDREGISTERREAD, /* Data from a CyAsStorageSDRegisterRead call. */
+ CY_FUNCT_CB_STOR_PARTITION, /* Data from a CyAsStorageCreatePartition call. */
+ CY_FUNCT_CB_STOR_GETTRANSFERAMOUNT, /* Data from a CyAsStorageGetTransferAmount call. */
+ CY_FUNCT_CB_STOR_ERASE, /* Data from a CyAsStorageErase call. */
+ CY_FUNCT_CB_ABORT_P2S_XFER, /* Data from a CyAsStorageCancelAsync call. */
+ CY_FUNCT_CB_USB_START, /* Data from a CyAsUsbStart call. */
+ CY_FUNCT_CB_USB_STOP, /* Data from a CyAsUsbStop call. */
+ CY_FUNCT_CB_USB_CONNECT, /* Data from a CyAsUsbConnect call. */
+ CY_FUNCT_CB_USB_DISCONNECT, /* Data from a CyAsUsbDisconnect call. */
+ CY_FUNCT_CB_USB_SETENUMCONFIG, /* Data from a CyAsUsbSetEnumConfig call. */
+ CY_FUNCT_CB_USB_GETENUMCONFIG, /* Data from a CyAsUsbGetEnumConfig call. */
+ CY_FUNCT_CB_USB_SETDESCRIPTOR, /* Data from a CyAsUsbSetDescriptor call. */
+ CY_FUNCT_CB_USB_GETDESCRIPTOR, /* Data from a CyAsUsbGetDescriptor call. */
+ CY_FUNCT_CB_USB_COMMITCONFIG, /* Data from a CyAsUsbCommitConfig call. */
+ CY_FUNCT_CB_USB_GETNAK, /* Data from a CyAsUsbGetNak call. */
+ CY_FUNCT_CB_USB_GETSTALL, /* Data from a CyAsUsbGetStall call. */
+ CY_FUNCT_CB_USB_SIGNALREMOTEWAKEUP, /* Data from a CyAsUsbSignalRemoteWakeup call. */
+ CY_FUNCT_CB_USB_CLEARDESCRIPTORS, /* Data from a CyAnUsbClearDescriptors call. */
+ CY_FUNCT_CB_USB_SET_MSREPORT_THRESHOLD, /* Data from a CyAnUsbSetMSReportThreshold call. */
+ CY_FUNCT_CB_MTP_START, /* Data from a CyAsMTPStart call. */
+ CY_FUNCT_CB_MTP_STOP, /* Data from a CyAsMTPStop call. */
+ CY_FUNCT_CB_MTP_INIT_SEND_OBJECT, /* Data from a CyAsMTPInitSendObject call. */
+ CY_FUNCT_CB_MTP_CANCEL_SEND_OBJECT, /* Data from a CyAsMTPCancelSendObject call. */
+ CY_FUNCT_CB_MTP_INIT_GET_OBJECT, /* Data from a CyAsMTPInitGetObject call. */
+ CY_FUNCT_CB_MTP_CANCEL_GET_OBJECT, /* Data from a CyAsMTPCancelGetObject call. */
+ CY_FUNCT_CB_MTP_SEND_BLOCK_TABLE, /* Data from a CyAsMTPSendBlockTable call. */
+ CY_FUNCT_CB_MTP_STOP_STORAGE_ONLY, /* Data from a CyAsMTPStopStorageOnly call. */
+ CY_FUNCT_CB_NODATA = 0x40000000U,
+ CY_FUNCT_CB_DATA = 0x20000000U
+} CyAsFunctCBType ;
+
+/* Summary
+ This type specifies the general West Bridge function callback.
+
+ Description
+ This callback is supplied as an argument to all asynchronous functions in the API. It is
+ called after the asynchronous function has completed.
+
+ See Also
+ CyAsFunctCBType
+*/
+typedef void (*CyAsFunctionCallback)(
+ CyAsDeviceHandle handle,
+ CyAsReturnStatus_t status,
+ uint32_t client,
+ CyAsFunctCBType type,
+ void* data) ;
+
+/* Summary
+ This type specifies the general West Bridge event that has occurred.
+
+ Description
+ This type is used in the West Bridge misc callback function to indicate the type
+ of callback.
+
+ See Also
+*/
+typedef enum CyAsMiscEventType
+{
+ CyAsEventMiscInitialized = 0, /* This event is sent when West Bridge has finished
+ initialization and is ready to respond to
+ API calls. */
+
+ CyAsEventMiscAwake, /* This event is sent when West Bridge has left the
+ standby state and is ready to respond to commands
+ again. */
+
+ CyAsEventMiscHeartBeat, /* This event is sent periodically from the firmware
+ to the processor. */
+
+ CyAsEventMiscWakeup, /* This event is sent when the West Bridge has left the
+ suspend mode and is ready to respond to commands
+ again. */
+
+ CyAsEventMiscDeviceMismatch /* This event is sent when the firmware image downloaded
+ cannot run on the active West Bridge device. */
+} CyAsMiscEventType ;
+
+/* Summary
+ This type is the type of a callback function that is called when a West Bridge misc event occurs.
+
+ Description
+ At times West Bridge needs to inform the P port processor of events that have
+ occurred. These events are asynchronous to the thread of control on the P
+ port processor and as such are generally delivered via a callback function that
+ is called as part of an interrupt handler. This type defines the type of function
+ that must be provided as a callback function for West Bridge misc events.
+
+ See Also
+ * CyAsMiscEventType
+*/
+typedef void (*CyAsMiscEventCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsMiscEventType ev, /* The event type being reported */
+ void * evdata /* The data assocaited with the event being reported */
+) ;
+
+#ifndef __doxygen__
+/* Summary
+ This enum provides info of various firmware trace levels.
+
+ Description
+
+ See Also
+ * CyAsMiscSetTraceLevel
+*/
+enum {
+ CYAS_FW_TRACE_LOG_NONE = 0, /* Log nothing. */
+ CYAS_FW_TRACE_LOG_STATE, /* Log state information. */
+ CYAS_FW_TRACE_LOG_CALLS, /* Log function calls. */
+ CYAS_FW_TRACE_LOG_STACK_TRACE, /* Log function calls with args. */
+ CYAS_FW_TRACE_MAX_LEVEL /* Max trace level sentinel. */
+};
+#endif
+
+/* Summary
+ This enum lists the controllable GPIOs of the West Bridge device.
+
+ Description
+ The West Bridge device has GPIOs that can be used for user defined functions.
+ This enumeration lists the GPIOs that are available on the device.
+
+ Notes
+ All of the GPIOs except UVALID can only be accessed when using West Bridge
+ firmware images that support only SD/MMC/MMC+ storage devices. This
+ functionality is not supported in firmware images that support NAND
+ storage.
+
+ See Also
+ * CyAsMiscGetGpioValue
+ * CyAsMiscSetGpioValue
+ */
+typedef enum {
+ CyAsMiscGpio_0 = 0, /* GPIO[0] pin */
+ CyAsMiscGpio_1, /* GPIO[1] pin */
+ CyAsMiscGpio_Nand_CE, /* NAND_CE pin, output only */
+ CyAsMiscGpio_Nand_CE2, /* NAND_CE2 pin, output only */
+ CyAsMiscGpio_Nand_WP, /* NAND_WP pin, output only */
+ CyAsMiscGpio_Nand_CLE, /* NAND_CLE pin, output only */
+ CyAsMiscGpio_Nand_ALE, /* NAND_ALE pin, output only */
+ CyAsMiscGpio_SD_POW, /* SD_POW pin, output only, do not drive low while storage is active */
+ CyAsMiscGpio_UValid /* UVALID pin */
+} CyAsMiscGpio;
+
+/* Summary
+ This enum lists the set of clock frequencies that are supported for working
+ with low speed SD media.
+
+ Description
+ West Bridge firmware uses a clock frequency less than the maximum possible rate
+ for low speed SD media. This can be changed to a setting equal to the maximum
+ frequency as desired by the user. This enumeration lists the different
+ frequency settings that are supported.
+
+ See Also
+ * CyAsMiscSetLowSpeedSDFreq
+ */
+typedef enum CyAsLowSpeedSDFreq
+{
+ CY_AS_SD_DEFAULT_FREQ = 0, /* Approx. 21.82 MHz, default value */
+ CY_AS_SD_RATED_FREQ /* 24 MHz */
+} CyAsLowSpeedSDFreq ;
+
+/* Summary
+ This enum lists the set of clock frequencies that are supported for working
+ with high speed SD media.
+
+ Description
+ West Bridge firmware uses a 48 MHz clock by default to interface with high speed
+ SD/MMC media. This can be changed to 24 MHz if so desired by the user. This enum
+ lists the different frequencies that are supported.
+
+ See Also
+ * CyAsMiscSetHighSpeedSDFreq
+ */
+typedef enum CyAsHighSpeedSDFreq
+{
+ CY_AS_HS_SD_FREQ_48, /* 48 MHz, default value */
+ CY_AS_HS_SD_FREQ_24 /* 24 MHz */
+} CyAsHighSpeedSDFreq ;
+
+/* Summary
+ Struct encapsulating all information returned by the CyAsMiscGetFirmwareVersion call.
+
+ Description
+ This struct encapsulates all return values from the asynchronous
+ CyAsMiscGetFirmwareVersion call, so that a single data argument can be
+ passed to the user provided callback function.
+
+ See Also
+ * CyAsMiscGetFirmwareVersion
+ */
+typedef struct CyAsGetFirmwareVersionData
+{
+ uint16_t major; /* Return value for major version number for the firmware */
+ uint16_t minor; /* Return value for minor version number for the firmware */
+ uint16_t build; /* Return value for build version number for the firmware */
+ uint8_t mediaType; /* Return value for media types supported in the current firmware */
+ CyBool isDebugMode; /* Return value to indicate the release or debug mode of firmware */
+} CyAsGetFirmwareVersionData ;
+
+
+/*****************************************************************************
+ * West Bridge Functions
+ ****************************************************************************/
+
+/* Summary
+ This function creates a new West Bridge device and returns a handle to the device.
+
+ Description
+ This function initializes the API object that represents the West Bridge device and
+ returns a handle to this device. This handle is required for all West Bridge related
+ functions to identify the specific West Bridge device.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_OUT_OF_MEMORY
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscCreateDevice(
+ CyAsDeviceHandle * handle_p, /* Return value for handle to created device */
+ CyAsHalDeviceTag tag /* The HAL specific tag for this device */
+ ) ;
+
+/* Summary
+ This functions destroys a previously created West Bridge device.
+
+ Description
+ When an West Bridge device is created, an opaque handle is returned that represents
+ the device. This function destroys that handle and frees all resources associated
+ with the handle.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_STILL_RUNNING - The USB or STORAGE stacks are still running, they must be stopped before the device can be destroyed
+ * CY_AS_ERROR_DESTROY_SLEEP_CHANNEL_FAILED - the HAL layer failed to destroy a sleep channel
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscDestroyDevice(
+ CyAsDeviceHandle handle /* Handle to the device to destroy */
+ ) ;
+
+/* Summary
+ This function initializes the hardware for basic communication with West Bridge.
+
+ Description
+ This function intializes the hardware to establish basic communication with
+ the West Bridge device. This is always the first function called to initialize
+ communication with the West Bridge device.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the basic initialization was completed
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_IN_STANDBY
+ * CY_AS_ERROR_ALREADY_RUNNING
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_NO_ANTIOCH - cannot find the West Bridge device
+ * CY_AS_ERROR_CREATE_SLEEP_CHANNEL_FAILED - the HAL layer falied to create a sleep channel
+
+ See Also
+ * CyAsDeviceConfig
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscConfigureDevice(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsDeviceConfig *config_p /* Configuration information */
+ ) ;
+
+/* Summary
+ This function returns non-zero if West Bridge is in standby and zero otherwise.
+
+ Description
+ West Bridge supports a standby mode. This function is used to query West Bridge to determine
+ if West Bridge is in a standby mode.
+
+ * Valid In Asynchronous Callback: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscInStandby(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyBool *standby /* Return value for standby state */
+ ) ;
+
+/* Summary
+ This function downloads the firmware to West Bridge device.
+
+ Description
+ This function downloads firmware from a given location and with a given size
+ to the West Bridge device. After the firmware is downloaded the West Bridge device is
+ moved out of configuration mode causing the firmware to be executed. It is an
+ error to call this function when the device is not in configuration mode. The
+ device is in configuration mode on power up and may be placed in configuration
+ mode after power up with a hard reset.
+
+ Notes
+ The firmware must be on a word align boundary.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the firmware was sucessfully downloaded
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device was not configured
+ * CY_AS_ERROR_NOT_IN_CONFIG_MODE
+ * CY_AS_ERROR_INVALID_SIZE - the size of the firmware exceeded 32768 bytes
+ * CY_AS_ERROR_ALIGNMENT_ERROR
+ * CY_AS_ERROR_IN_STANDBY - trying to download while in standby mode
+ * CY_AS_ERROR_TIMEOUT
+
+ See Also
+ * CyAsMiscReset
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscDownloadFirmware(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ const void *fw_p, /* Pointer to the firmware to be downloaded */
+ uint16_t size, /* The size of the firmware in bytes */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+
+/* Summary
+ This function returns the version number of the firmware running in the West Bridge device.
+
+ Description
+ This function queries the West Bridge device and retreives the firmware version number. If
+ the firmware is not loaded an error is returned indicated no firmware has been loaded.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the firmware version number was retreived
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been downloaded to the device
+ * CY_AS_ERROR_IN_STANDBY
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscGetFirmwareVersion(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsGetFirmwareVersionData* data, /* Return values indicating the firmware version. */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+#if !defined(__doxygen__)
+
+/* Summary
+ This function reads and returns the contents of an MCU accessible register on the West Bridge.
+
+ Description
+ This function requests the firmware to read and return the contents of an MCU accessible
+ register through the mailboxes.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the register content was retrieved.
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
+ * CY_AS_ERROR_INVALID_RESPONSE - the firmware build does not support this command.
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscReadMCURegister(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ uint16_t address, /* Address of the register to read */
+ uint8_t *value, /* Return value for the MCU register content */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ This function writes to an MCU accessible register on the West Bridge.
+
+ Description
+ This function requests the firmware to write a specified value to an MCU accessible
+ register through the mailboxes.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Notes
+ This function is only for internal use by the West Bridge API layer. Calling
+ this function directly can cause device malfunction.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the register content was updated.
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
+ * CY_AS_ERROR_INVALID_RESPONSE - the firmware build does not support this command.
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscWriteMCURegister(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ uint16_t address, /* Address of the register to write */
+ uint8_t mask, /* Mask to be applied on the register contents. */
+ uint8_t value, /* Data to be ORed with the register contents. */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+#endif
+
+/* Summary
+ This function will reset the West Bridge device and software API.
+
+ Description
+ This function will reset the West Bridge device and software API. The reset operation can be
+ a hard reset or a soft reset. A hard reset will reset all aspects of the West Bridge device.
+ The device will enter the configuration state and the firmware will have to be reloaded. The
+ device will also have to be re-initialized. A soft reset just resets the West Bridge micro-
+ controller.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ When a hard reset is issued, the firmware that may have been previously loaded will be lost
+ and any configuration information set via CyAsMiscConfigureDevice() will be lost. This will be
+ reflected in the API maintained state of the device. In order to re-establish communications
+ with the West Bridge device, CyAsMiscConfigureDevice() and CyAsMiscDownloadFirmware() must be
+ called again.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the device has been reset
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_NOT_YET_SUPPORTED - current soft reset is not supported
+ * CY_AS_ERROR_ASYNC_PENDING - Reset is unable to flush pending async reads/writes in polling mode.
+
+
+ See Also
+ * CyAsMiscReset
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscReset(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsResetType type, /* The type of reset to perform */
+ CyBool flush, /* If true, flush all pending writes to mass storage
+ before performing the reset. */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ This function acquires a given resource.
+
+ Description
+ There are resources in the system that are shared between the West Bridge device and the processor
+ attached to the P port of the West Bridge device. This API provides a mechanism for the P port
+ processor to acquire ownership of a resource.
+
+ Notes
+ The ownership of the resources controlled by CyAsMiscAcquireResource() and CyAsMiscReleaseResource()
+ defaults to a known state at hardware reset. After the firmware is loaded and begins execution the
+ state of these resources may change. At any point if the P Port processor needs to acquire a resource
+ it should do so explicitly to be sure of ownership.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the p port sucessfully acquired the resource of interest
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_INVALID_RESOURCE
+ * CY_AS_ERROR_RESOURCE_ALREADY_OWNED - the p port already owns this resource
+ * CY_AS_ERROR_NOT_ACQUIRED - the resource cannot be acquired
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
+
+ See Also
+ * CyAsResourceType
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscAcquireResource(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsResourceType *resource, /* The resource to acquire */
+ CyBool force, /* If true, force West Bridge to release the resource */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ This function releases a given resource.
+
+ Description
+ There are resources in the system that are shared between the West Bridge device and the processor
+ attached to the P port of the West Bridge device. This API provides a mechanism for the P port
+ processor to release a resource that has previously been acquired via the CyAsMiscAcquireResource()
+ call.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the p port sucessfully released the resource of interest
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_INVALID_RESOURCE
+ * CY_AS_ERROR_RESOURCE_NOT_OWNED - the p port does not own the resource of interest
+
+ See Also
+ * CyAsResourceType
+ * CyAsMiscAcquireResource
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscReleaseResource(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsResourceType resource /* The resource to release */
+ ) ;
+
+#ifndef __doxygen__
+/* Summary
+ This function sets the trace level for the West Bridge firmware.
+
+ Description
+ The West Bridge firmware has the ability to store information about the state and execution path
+ of the firmware on a mass storage device attached to the West Bridge device. This function
+ configures the specific mass storage device to be used and the type of information to be
+ stored. This state information is used for debugging purposes and must be interpreted by a
+ Cypress provided tool.
+
+ *Trace Level*
+ The trace level indicates the amount of information to output.
+ * 0 = no trace information is output
+ * 1 = state information is output
+ * 2 = function call information is output
+ * 3 = function call, arguments, and return value information is output
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ The media device and unit specified in this call will be overwritten and any data currently stored
+ on this device and unit will be lost.
+
+ * NOT IMPLEMENTED YET
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the trace configuration has been sucessfully changed
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_NO_SUCH_UNIT - the unit specified does not exist
+ * CY_AS_ERROR_INVALID_TRACE_LEVEL - the trace level requested does not exist
+ * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscSetTraceLevel(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ uint8_t level, /* The trace level */
+ CyAsBusNumber_t bus, /* The bus for the output */
+ uint32_t device, /* The device for the output */
+ uint32_t unit, /* The unit for the output */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+#endif
+
+/* Summary
+ This function places West Bridge into the low power standby mode.
+
+ Description
+ This function places West Bridge into a low power (sleep) mode, and cannot be called while the
+ USB stack is active. This function first instructs the West Bridge firmware that the device is
+ about to be placed into sleep mode. This allows West Bridge to complete any pending storage
+ operations. After the West Bridge device has responded that pending operations are complete,
+ the device is placed in standby mode.
+
+ There are two methods of placing the device in standby mode. If the WAKEUP pin of the West Bridge
+ is connected to a GPIO on the processor, the pin is de-asserted (via the HAL layer) and West Bridge
+ enters into a sleep mode. If the WAKEUP pin is not accessible, the processor can write into
+ the power management control/status register on the West Bridge to put the device into sleep mode.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function completed and West Bridge is in sleep mode
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_ALREADY_STANDBY - the West Bridge device is already in sleep mode
+ * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
+ * CY_AS_ERROR_NOT_SUPPORTED - the HAL layer does not support changing the WAKEUP pin
+ * CY_AS_ERROR_USB_RUNNING - The USB stack is still running when the EnterStandby call is made
+ * CY_AS_ERROR_ASYNC_PENDING
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_SETTING_WAKEUP_PIN
+ * CY_AS_ERROR_ASYNC_PENDING - In polling mode EnterStandby can not be called until all pending
+ storage read/write requests have finished.
+
+ See Also
+ * CyAsMiscLeaveStandby
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscEnterStandbyEXU(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyBool pin, /* If true, use the wakeup pin, otherwise use the register */
+ CyBool uvalid_special, /* Set true to enable specific usages of the
+ UVALID signal, please refer to AN xx or ERRATA xx */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ This function is provided for backwards compatibility.
+
+ Description
+ Calling this function is the same as calling CyAsMiscEnterStandbyEx with True for the lowpower parameter.
+
+ See Also
+ * CyAsMiscEnterStandbyEx
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscEnterStandby(CyAsDeviceHandle handle,
+ CyBool pin,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+/* Summary
+ This function brings West Bridge out of sleep mode.
+
+ Description
+ This function asserts the WAKEUP pin (via the HAL layer). This brings the West Bridge out of the sleep
+ state and allows the West Bridge firmware to process the event causing the wakeup. When all processing
+ associated with the wakeup is complete, a callback function is called to tell the P port software that
+ the firmware processing associated with wakeup is complete.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns:
+ * CY_AS_ERROR_SUCCESS - the function completed and West Bridge is in sleep mode
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_SETTING_WAKEUP_PIN
+ * CY_AS_ERROR_NOT_IN_STANDBY - the West Bridge device is not in the sleep state
+ * CY_AS_ERROR_TIMEOUT - there was a timeout waiting for a response from the West Bridge firmware
+ * CY_AS_ERROR_NOT_SUPPORTED - the HAL layer does not support changing the WAKEUP pin
+
+ See Also
+ * CyAsMiscEnterStandby
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscLeaveStandby(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsResourceType resource /* The resource causing the wakeup */
+ ) ;
+
+/* Summary
+ This function registers a callback function to be called when an asynchronous West Bridge MISC event occurs.
+
+ Description
+ When asynchronous misc events occur, a callback function can be called to alert the calling program. This
+ functions allows the calling program to register a callback.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns:
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscRegisterCallback(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsMiscEventCallback callback /* The function to call */
+ ) ;
+
+/* Summary
+ This function sets the logging level for log messages.
+
+ Description
+ The API can print messages via the CyAsHalPrintMessage capability. This function sets the
+ level of detail seen when printing messages from the API.
+
+ * Valid In Asynchronous Callback:NO
+*/
+EXTERN void
+CyAsMiscSetLogLevel(
+ uint8_t level /* Level to set, 0 is fewer messages, 255 is all */
+ ) ;
+
+
+/* Summary
+ This function tells West Bridge that SD or MMC media has been inserted or removed.
+
+ Description
+ In some hardware configurations, SD or MMC media detection is handled outside of the
+ West Bridge device. This function is called when a change is detected to inform the
+ West Bridge firmware to check for storage media changes.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns:
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_IN_STANDBY
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsMiscStorageChanged
+
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscStorageChanged(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ This function instructs the West Bridge firmware to start/stop sending periodic
+ heartbeat messages to the processor.
+
+ Description
+ The West Bridge firmware can send heartbeat messages through the mailbox register
+ once every 500 ms. This message can be an overhead as it causes regular Mailbox
+ interrupts to happen, and is turned off by default. The message can be used to
+ test and verify that the West Bridge firmware is alive. This API can be used to
+ enable or disable the heartbeat message.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function completed successfully
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured yet
+ * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the West Bridge device
+
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscHeartBeatControl(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyBool enable, /* Message enable/disable selection */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ This function gets the current state of a GPIO pin on the West Bridge device.
+
+ Description
+ The West Bridge device has GPIO pins that can be used for user defined functions.
+ This function gets the current state of the specified GPIO pin. Calling this
+ function will configure the corresponding pin as an input.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ Only GPIO[0], GPIO[1] and UVALID pins can be used as GP inputs. Of these pins,
+ only the UVALID pin is supported by firmware images that include NAND storage
+ support.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function completed successfully
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured yet
+ * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the West Bridge device
+ * CY_AS_ERROR_BAD_INDEX - an invalid GPIO was specified
+ * CY_AS_ERROR_NOT_SUPPORTED - this feature is not supported by the firmware
+
+ See Also
+ * CyAsMiscGpio
+ * CyAsMiscSetGpioValue
+ */
+EXTERN CyAsReturnStatus_t
+CyAsMiscGetGpioValue(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsMiscGpio pin, /* Id of the GPIO pin to query */
+ uint8_t *value, /* Current value of the GPIO pin */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ This function updates the state of a GPIO pin on the West Bridge device.
+
+ Description
+ The West Bridge device has GPIO pins that can be used for user defined functions.
+ This function updates the output value driven on a specified GPIO pin. Calling this
+ function will configure the corresponding pin as an output.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ All of the pins listed under CyAsMiscGpio can be used as GP outputs. This feature
+ is note supported by firmware images that include NAND storage device support.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function completed successfully
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured yet
+ * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the West Bridge device
+ * CY_AS_ERROR_BAD_INDEX - an invalid GPIO was specified
+ * CY_AS_ERROR_NOT_SUPPORTED - this feature is not supported by firmware.
+
+ See Also
+ * CyAsMiscGpio
+ * CyAsMiscGetGpioValue
+ */
+EXTERN CyAsReturnStatus_t
+CyAsMiscSetGpioValue(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsMiscGpio pin, /* Id of the GPIO pin to set */
+ uint8_t value, /* Value to be set on the GPIO pin */
+ CyAsFunctionCallback cb, /* Callback to call when the operation is complete. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ Set the West Bridge device in the low power suspend mode.
+
+ Description
+ The West Bridge device has a low power suspend mode where the USB core and the internal
+ microcontroller are powered down. This function sets the West Bridge device into this
+ low power mode. This mode can only be entered when there is no active USB connection;
+ i.e., when USB has not been connected or is suspended; and there are no pending USB
+ or storage asynchronous calls.
+ The device will exit the suspend mode and resume handling USB and processor requests
+ when any activity is detected on the CE#, D+/D- or GPIO[0] lines.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ The GPIO[0] pin needs to be configured as an input for the gpio wakeup to work.
+ This flag should not be enabled if the pin is being used as a GP output.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the device was placed in suspend mode.
+ * CY_AS_ERROR_INVALID_HANDLE - the West Bridge handle passed in is invalid.
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not yet been configured.
+ * CY_AS_ERROR_NO_FIRMWARE - no firmware has been downloaded to the device.
+ * CY_AS_ERROR_IN_STANDBY - the device is already in sleep mode.
+ * CY_AS_ERROR_USB_CONNECTED - the USB connection is active.
+ * CY_AS_ERROR_ASYNC_PENDING - asynchronous storage/USB calls are pending.
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
+ * CY_AS_ERROR_INVALID_RESPONSE - command not recognised by firmware.
+
+ See Also
+ * CyAsMiscLeaveSuspend
+ */
+EXTERN CyAsReturnStatus_t
+CyAsMiscEnterSuspend(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyBool usb_wakeup_en, /* Control the USB wakeup source */
+ CyBool gpio_wakeup_en, /* Control the GPIO[0] wakeup source */
+ CyAsFunctionCallback cb, /* Callback to call when suspend mode entry is complete */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ Wake up the West Bridge device from suspend mode.
+
+ Description
+ This call wakes up the West Bridge device from suspend mode, and makes it ready
+ for accepting other commands from the API. A CyAsEventMiscWakeup event will
+ be delivered to the callback registered with CyAsMiscRegisterCallback to
+ indicate that the wake up is complete.
+
+ The CyAsEventMiscWakeup event will also be delivered if the wakeup happens
+ due to USB or GPIO activity.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the device was woken up from suspend mode.
+ * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured.
+ * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
+ * CY_AS_ERROR_NOT_IN_SUSPEND - the device is not in suspend mode.
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
+ * CY_AS_ERROR_TIMEOUT - failed to wake up the device.
+
+ See Also
+ * CyAsMiscEnterSuspend
+ */
+EXTERN CyAsReturnStatus_t
+CyAsMiscLeaveSuspend(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* Callback to call when device has resumed operation. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ Reserve first numzones zones of nand device for storing processor boot image. LNA firmware works
+ on the first numzones zones of nand to enable the processor to boot.
+
+ Description
+ This function reserves first numzones zones of nand device for storing processor boot image.
+ This fonction MUST be completed before starting the storage stack for the setting to be taken
+ into account.
+
+ * Valid In Asynchronous Callback: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - zones are reserved.
+
+*/
+EXTERN CyAsReturnStatus_t
+CyAsMiscReserveLNABootArea(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ uint8_t numzones, /* number of nand zones to reserve */
+ CyAsFunctionCallback cb, /* Callback to call when device has resumed operation. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* Summary
+ Select the clock frequency to be used when talking to low speed (non-high speed)
+ SD media.
+
+ Description
+ West Bridge firmware uses a clock frequency less than the maximum possible rate
+ for low speed SD media. This function selects the frequency setting from between
+ the default speed and the maximum speed. This fonction MUST be completed before
+ starting the storage stack for the setting to be taken into account.
+
+ * Valid in Asynchronous Callback: Yes (if cb is non-zero)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the operation completed successfully.
+ * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured.
+ * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
+ * CY_AS_ERROR_IN_SUSPEND - West Bridge is in low power suspend mode.
+ * CY_AS_ERROR_INVALID_PARAMETER - invalid frequency setting desired.
+ * CY_AS_ERROR_TIMEOUT - West Bridge device did not respond to the operation.
+ * CY_AS_ERROR_INVALID_RESPONSE - active firmware does not support the operation.
+
+ See Also
+ * CyAsLowSpeedSDFreq
+ */
+EXTERN CyAsReturnStatus_t
+CyAsMiscSetLowSpeedSDFreq(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsLowSpeedSDFreq setting, /* Frequency setting desired for low speed SD cards */
+ CyAsFunctionCallback cb, /* Callback to call on completion */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ Select the clock frequency to be used when talking to high speed SD/MMC media.
+
+ Description
+ West Bridge firmware uses a 48 MHz clock to interface with high speed SD/MMC
+ media. This clock rate can be restricted to 24 MHz if desired. This function
+ selects the frequency setting to be used. This fonction MUST be completed before
+ starting the storage stack for the setting to be taken into account.
+
+ * Valid in Asynchronous Callback: Yes (if cb is non-zero)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the operation completed successfully.
+ * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured.
+ * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
+ * CY_AS_ERROR_IN_SUSPEND - West Bridge is in low power suspend mode.
+ * CY_AS_ERROR_INVALID_PARAMETER - invalid frequency setting desired.
+ * CY_AS_ERROR_TIMEOUT - West Bridge device did not respond to the operation.
+ * CY_AS_ERROR_INVALID_RESPONSE - active firmware does not support the operation.
+
+ See Also
+ * CyAsLowSpeedSDFreq
+ */
+EXTERN CyAsReturnStatus_t
+CyAsMiscSetHighSpeedSDFreq(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsHighSpeedSDFreq setting, /* Frequency setting desired for high speed SD cards */
+ CyAsFunctionCallback cb, /* Callback to call on completion */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+/* Summary
+ Select the polarity of the SD_POW output driven by West Bridge.
+
+ Description
+ The SD_POW signal driven by West Bridge can be used to control the supply
+ of Vcc to the SD/MMC media connected to the device. This signal is driven
+ as an active high signal by default. This function can be used to change the
+ polarity of this signal if required. This fonction MUST be completed before
+ starting the storage stack for the setting to be taken into account.
+
+ * Valid in Asynchronous Callback: Yes (if cb is non-zero)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the operation completed successfully.
+ * CY_AS_ERROR_INVALID_HANDLE - invalid device handle passed in.
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured.
+ * CY_AS_ERROR_NO_FIRMWARE - firmware has not been downloaded to the device.
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to allocate memory for the operation.
+ * CY_AS_ERROR_IN_SUSPEND - West Bridge is in low power suspend mode.
+ * CY_AS_ERROR_INVALID_PARAMETER - invalid frequency setting desired.
+ * CY_AS_ERROR_TIMEOUT - West Bridge device did not respond to the operation.
+ * CY_AS_ERROR_INVALID_RESPONSE - active firmware does not support the operation.
+
+ See Also
+ * CyAsMiscSignalPolarity
+ */
+EXTERN CyAsReturnStatus_t
+CyAsMiscSetSDPowerPolarity(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsMiscSignalPolarity polarity, /* Desired polarity setting to the SD_POW signal. */
+ CyAsFunctionCallback cb, /* Callback to call on completion. */
+ uint32_t client /* Client data to be passed to the callback. */
+ ) ;
+
+/* For supporting deprecated functions */
+#include "cyasmisc_dep.h"
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYASMISC_H_ */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasmisc_dep.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,53 @@
+/* Cypress West Bridge API header file (cyasmisc_dep.h)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+/* This header will contain Antioch specific declaration
+ * of the APIs that are deprecated in Astoria SDK. This is
+ * for maintaining backward compatibility with prior releases
+ * of the Antioch SDK.
+ */
+#ifndef __INCLUDED_CYASMISC_DEP_H__
+#define __INCLUDED_CYASMISC_DEP_H__
+
+#ifndef __doxygen__
+
+EXTERN CyAsReturnStatus_t
+CyAsMiscAcquireResource_dep(CyAsDeviceHandle handle,
+ CyAsResourceType resource,
+ CyBool force);
+EXTERN CyAsReturnStatus_t
+CyAsMiscGetFirmwareVersion_dep(CyAsDeviceHandle handle,
+ uint16_t *major,
+ uint16_t *minor,
+ uint16_t *build,
+ uint8_t *mediaType,
+ CyBool *isDebugMode);
+EXTERN CyAsReturnStatus_t
+CyAsMiscSetTraceLevel_dep(CyAsDeviceHandle handle,
+ uint8_t level,
+ CyAsMediaType media,
+ uint32_t device,
+ uint32_t unit,
+ CyAsFunctionCallback cb,
+ uint32_t client);
+#endif /*__doxygen*/
+
+#endif /*__INCLUDED_CYANSTORAGE_DEP_H__*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasmtp.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,602 @@
+/* Cypress West Bridge API header file (cyasmtp.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASMTP_H_
+#define _INCLUDED_CYASMTP_H_
+
+#include "cyasmisc.h"
+
+#include "cyas_cplus_start.h"
+
+/*@@Media Transfer Protocol (MTP) Overview
+ Summary
+ The MTP API has been designed to allow MTP enabled West Bridge devices to implement
+ the MTP protocol while maintaining high performance. West Bridge has the capability
+ to enter into a Turbo mode during a MTP SendObject or GetObject operation enabling
+ it to directly stream the data into or out of the attached SD card with minimal
+ involvement from the Processor.
+
+ Description
+ The MTP API is designed to act as a pass through implementation of the MTP protocol
+ for all operations. Each MTP transaction received from the Host is passed through West Bridge
+ and along to the Processor. The Processor can then respond to the transaction and pass
+ data and/or responses back to the Host through West Bridge.
+
+ The MTP API also allows for a high speed handling of MTP SendObject and GetObject operations,
+ referred to as Turbo MTP. During a Turbo MTP operation West Bridge is responsible for reading
+ or writing the data for the MTP operation directly from or to the SD card with minimal
+ interaction from the Processor. The is done by having the Processor transfer a Block Table
+ to West Bridge which contains the locations on the SD card that need to be read or written.
+ During the handling of a Turbo Operation the Processor will then only periodically need to send
+ a new Block Table to West Bridge when the first is used up. See the CyAsMTPInitSendObject and
+ CyAsMTPInitGetObject functions for more details.
+
+ In order to enable the MTP API you must first have a MTP enabled West Bridge loaded with
+ MTP firmware. You then must start the USB and Storage APIs before starting the MTP API. See
+ CyAsMTPStart for more details.
+*/
+
+/*@@Endpoints
+ Summary
+ When using MTP firmware endpoints 2 and 6 are dedicated to bulk MTP traffic
+ and endpoint 1 is available for MTP events.
+
+ Description
+ When using a MTP enabled West Brdige device endpoints 2 and 6 are made available for
+ use to implement the MTP protocol. These endpoints have a few special restrictions noted
+ below but otherwise the existing USB APIs can be used normally with these endpoints.
+
+ 1. CyAsUsbSetNak, CyAsUsbClearNak, and CyAsUsbGetNak are disabled for these endpoints
+ 2. During a turbo operation CyAsUsbSetStall, CyAsUsbClearStall, and CyAsUsbGetStall are disabled.
+
+*/
+
+
+/* Summary
+ This constants defines the maximum number of
+ entries in the Block Table used to describe
+ the locations for Send/GetObject operations.
+
+ See Also
+ * CyAsMtpSendObject
+ * CyAsMtpGetObject
+*/
+#define CY_AS_MAX_BLOCK_TABLE_ENTRIES 64
+
+/* Summary
+ Endpoint to be used for MTP reads from the USB host.
+ */
+#define CY_AS_MTP_READ_ENDPOINT (2)
+
+/* Summary
+ Endpoint to be used fro MTP writes to the USB host.
+ */
+#define CY_AS_MTP_WRITE_ENDPOINT (6)
+
+/*****************************************************************************
+ * MTP Types
+ ****************************************************************************/
+
+/* Summary
+ The BlockTable used for turbo operations.
+
+ Description
+ This struct is used to specify the blocks
+ to be used for both read/write and send/getObject
+ operations.
+
+ The start block is a starting Logical Block Address
+ and num block is the number of blocks in that contiguous
+ region.
+
+ start_blocks[i]->[-------] <- start_blocks[i] + num_blocks[i]
+
+ If you need fewer than CY_AS_MAX_BLOCK_TABLE_ENTRIES
+ the remainder should be left empty. Empty is defined
+ as num_blocks equal to 0.
+
+ See Also
+ * CyAsMTPInitSendObject
+ * CyAsMTPInitGetObject
+
+*/
+typedef struct CyAsMTPBlockTable
+{
+ uint32_t start_blocks[CY_AS_MAX_BLOCK_TABLE_ENTRIES] ;
+ uint16_t num_blocks[CY_AS_MAX_BLOCK_TABLE_ENTRIES] ;
+} CyAsMTPBlockTable ;
+
+/* Summary
+ This type specifies the type of MTP event that has occurred.
+
+ Description
+ MTP events are used to communicate that West Bridge has
+ either finished the handling of the given operation, or
+ that it requires additional data to complete the operation.
+
+ In no case does West Bridge send any MTP protocol responses,
+ this always remain the responsibility of the client.
+
+ See Also
+ * CyAsMTPInitSendObject
+ * CyAsMTPInitGetObject
+ * CyAsMTPSendBlockTable
+
+*/
+typedef enum CyAsMTPEvent
+{
+ CyAsMTPSendObjectComplete, /* This event is sent when West Bridge
+ has finished writing the data from a
+ SendObject. West Bridge will -not- send
+ the MTP response. */
+ CyAsMTPGetObjectComplete, /* This event is sent when West Bridge
+ has finished sending the data for a
+ GetObject operation. West Bridge will
+ -not- send the MTP response. */
+ CyAsMTPBlockTableNeeded /* This event is called when West Bridge
+ needs a new BlockTable. This is only a
+ notification, to transfer a BlockTable
+ to West Bridge the CyAsMTPSendBlockTable
+ use the function. While West Bridge is waiting
+ for a BlockTable during a SendObject it
+ may need to NAK the Endpoint. It is important
+ that the CyAsMTPSendBlockTable call is made
+ in a timely manner as eventually a delay
+ will result in an USB reset. This event has
+ no data */
+} CyAsMTPEvent ;
+
+/* Summary
+ Data for the CyAsMTPSendObjectComplete event.
+
+ Description
+ Notification that a SendObject operation has been completed. The
+ status of the operation is given (to distinguish between a cancelled
+ and a success for example) as well as the block count. The blocks
+ are used in order based on the current block table. If more than
+ one block table was used for a given SendObject the count will
+ include the total number of blocks written.
+
+ This callback will be made only once per SendObject operation
+ and it will only be called after all of the data has been
+ committed to the SD card.
+
+ See Also
+ * CyAsMTPEvent
+
+ */
+typedef struct CyAsMTPSendObjectCompleteData
+{
+ CyAsReturnStatus_t status ;
+ uint32_t byte_count ;
+ uint32_t transaction_id ;
+} CyAsMTPSendObjectCompleteData ;
+
+/* Summary
+ Data for the CyAsMTPGetObjectComplete event.
+
+ Description
+ Notification that a GetObject has finished. This
+ event allows the P side to know when to send the MTP
+ response for the GetObject operation.
+
+ See Also
+ * CyAsMTPEvent
+
+*/
+typedef struct CyAsMTPGetObjectCompleteData
+{
+ CyAsReturnStatus_t status ;
+ uint32_t byte_count ;
+} CyAsMTPGetObjectCompleteData ;
+
+/* Summary
+ MTP Event callback.
+
+ Description
+ Callback used to communicate that a SendObject
+ operation has finished.
+
+ See Also
+ * CyAsMTPEvent
+*/
+typedef void (*CyAsMTPEventCallback)(
+ CyAsDeviceHandle handle,
+ CyAsMTPEvent evtype,
+ void* evdata
+ ) ;
+
+/* Summary
+ This is the callback function called after asynchronous API functions have completed.
+
+ Description
+ When calling API functions from callback routines (interrupt handlers usually) the async version of
+ these functions must be used. This callback is called when an asynchronous API function has completed.
+*/
+typedef void (*CyAsMTPFunctionCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsReturnStatus_t status, /* The error status of the operation */
+ uint32_t client /* A client supplied 32 bit tag */
+) ;
+
+/*****************************************************************************
+ * MTP Functions
+ ****************************************************************************/
+
+/* Summary
+ This function starts the MTP stack.
+
+ Description
+ Initializes West Bridge for MTP activity and registers the MTP
+ event callback.
+
+ Before calling CyAsMTPStart, CyAsUsbStart and CyAsStorageStart must be
+ called (in either order).
+
+ MTPStart must be called before the device is enumerated. Please
+ see the documentation for CyAsUsbSetEnumConfig and CyAsUsbEnumControl
+ for details on enumerating a device for MTP.
+
+ Calling MTPStart will not affect any ongoing P<->S traffic.
+
+ This requires a MTP firmware image to be loaded on West Bridge.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_IN_SUSPEND
+ * CY_AS_ERROR_INVALID_IN_CALLBACK
+ * CY_AS_ERROR_STARTSTOP_PENDING
+ * CY_AS_ERROR_NOT_RUNNING - CyAsUsbStart or CyAsStorageStart have not been called
+ * CY_AS_ERROR_NOT_SUPPORTED - West Bridge is not running firmware with MTP support
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+
+ See Also
+ * CyAsMTPStop
+ * CyAsUsbStart
+ * CyAsStorageStart
+ * CyAsUsbSetEnumConfig
+ * CyAsUsbEnumControl
+*/
+CyAsReturnStatus_t
+CyAsMTPStart(
+ CyAsDeviceHandle handle,
+ CyAsMTPEventCallback eventCB,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+
+/* Summary
+ This function stops the MTP stack.
+
+ Description
+ Stops all MTP activity. Any ongoing transfers are
+ canceled.
+
+ This will not cause a UsbDisconnect but all
+ MTP activity (both pass through and turbo) will
+ stop.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_NOT_RUNNING
+ * CY_AS_ERROR_IN_SUSPEND
+ * CY_AS_ERROR_INVALID_IN_CALLBACK
+ * CY_AS_ERROR_STARTSTOP_PENDING
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+
+ See Also
+ * CyAsMTPStart
+*/
+CyAsReturnStatus_t
+CyAsMTPStop(
+ CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+/* Summary
+ This function sets up a Turbo SendObject operation.
+
+ Description
+ Calling this function will setup West Bridge to
+ enable Tubo handling of the next SendObject
+ operation received. This will pass down the initial
+ block table to the firmware and setup a direct u->s
+ write for the SendObject operation.
+
+ If this function is not called before a SendObject
+ operation is seen the SendObject operation and data
+ will be passed along to the P port like any other MTP
+ command. It would then be the responsibility of the
+ client to perform a normal StorageWrite call to
+ store the data on the SD card. N.B. This will be
+ very slow compared with the Turbo handling.
+
+ The completion of this function only signals that
+ West Bridge has been set up to receive the next SendObject
+ operation. When the SendObject operation has been fully
+ handled and the data written to the SD card a separate
+ event will be triggered.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_IN_SUSPEND
+ * CY_AS_ERROR_NOT_RUNNING
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_ASYNC_PENDING
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_NOT_SUPPORTED - West Bridge is not running firmware with MTP support
+
+ See Also
+ * CyAsMTPCancelSendObject
+ * CyAsMTPInitGetObject
+ * CyAsMTPEvent
+ * CyAsMTPSendBlockTable
+*/
+CyAsReturnStatus_t
+CyAsMTPInitSendObject(
+ CyAsDeviceHandle handle,
+ CyAsMTPBlockTable* blk_table,
+ uint32_t num_bytes,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+/* Summary
+ This function cancels an ongoing MTP operation.
+
+ Description
+ Causes West Bridge to cancel an ongoing SendObject
+ operation. Note this is only a cancel to West Bridge,
+ the MTP operation still needs to be canceled by
+ sending a response.
+
+ West Bridge will automatically set a Stall on the endpoint
+ when the cancel is received.
+
+ This function is only valid after CyAsMTPInitSendObject
+ has been called, but before the CyAsMTPSendObjectComplete
+ event has been sent.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_RUNNING
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_NOT_SUPPORTED - West Bridge is not running firmware with MTP support
+ * CY_AS_ERROR_NO_OPERATION_PENDING
+
+ See Also
+ * CyAsMTPInitSendObject
+*/
+CyAsReturnStatus_t
+CyAsMTPCancelSendObject(
+ CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+/* Summary
+ This function sets up a turbo GetObject operation.
+
+ Description
+ Called by the P in response to a GetObject
+ operation. This provides West Bridge with the block
+ addresses for the Object data that needs to be
+ transferred.
+
+ It is the responsibility of the Processor to send the MTP operation
+ before calling CyAsMTPInitGetObject. West Bridge will then send the
+ data phase of the transaction, automatically creating the required container for
+ Data. Once all of the Data has been transferred a callback will be issued to
+ inform the Processor that the Data phase has completed allowing it to send
+ the required MTP response.
+
+ If an entire Block Table is used then after the
+ last block is transferred the CyAsMTPBtCallback
+ will be called to allow an additional Block Table(s)
+ to be specified.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_NOT_RUNNING
+ * CY_AS_ERROR_IN_SUSPEND
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_ASYNC_PENDING
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_NOT_SUPPORTED - West Bridge is not running firmware with MTP support
+
+ See Also
+ * CyAsMTPInitSendObject
+ * CyAsMTPCancelGetObject
+ * CyAsMTPEvent
+ * CyAsMTPSendBlockTable
+*/
+CyAsReturnStatus_t
+CyAsMTPInitGetObject(
+ CyAsDeviceHandle handle,
+ CyAsMTPBlockTable* table_p,
+ uint32_t num_bytes,
+ uint32_t transaction_id,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+/* Summary
+ This function cancels an ongoing turbo GetObject
+ operation.
+
+ Description
+ Causes West Bridge to cancel an ongoing GetObject
+ operation. Note this is only a cancel to West Bridge,
+ the MTP operation still needs to be canceled by
+ sending a response.
+
+ This function is only valid after CyAsMTPGetSendObject
+ has been called, but before the CyAsMTPGetObjectComplete
+ event has been sent.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_RUNNING
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_NOT_SUPPORTED - West Bridge is not running firmware with MTP support
+ * CY_AS_ERROR_NO_OPERATION_PENDING
+
+ See Also
+ * CyAsMTPInitGetObject
+*/
+CyAsReturnStatus_t
+CyAsMTPCancelGetObject(
+ CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+/* Summary
+ This function is used to transfer a BlockTable as part of
+ an ongoing MTP operation.
+
+ Description
+ This function is called in response to the CyAsMTPBlockTableNeeded
+ event. This allows the client to pass in a BlockTable structure to
+ West Bridge.
+
+ The memory associated with the table will be copied and can be
+ safely disposed of when the function returns if called synchronously,
+ or when the callback is made if called asynchronously.
+
+ This function is used for both SendObject and GetObject as both
+ can generate the CyAsMTPBlockTableNeeded event.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_NOT_CONFIGURED
+ * CY_AS_ERROR_NO_FIRMWARE
+ * CY_AS_ERROR_NOT_RUNNING
+ * CY_AS_ERROR_IN_SUSPEND
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_ASYNC_PENDING
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_NOT_SUPPORTED - West Bridge is not running firmware with MTP support
+
+ See Also
+ * CyAsMTPInitSendObject
+ * CyAsMTPInitGetObject
+*/
+CyAsReturnStatus_t
+CyAsMTPSendBlockTable(
+ CyAsDeviceHandle handle,
+ CyAsMTPBlockTable* table,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+/* Summary
+ This function is used to mark the start of a storage read/write burst from the
+ P port processor.
+
+ Description
+ This function is used to mark the start of a storage read/write burst from the
+ processor. All USB host access into the mass storage / MTP endpoints will be
+ blocked while the read/write burst is ongoing, and will be allowed to resume
+ only after CyAsMTPStorageOnlyStop is called. The burst mode is used to
+ reduce the firmware overhead due to configuring the internal data paths repeatedly,
+ and can help improve performance when a sequence of read/writes is performed in
+ a burst.
+
+ This function will not generate a special mailbox request, it will only set a flag
+ on the next Storage Read/Write operation. Until such a call is made West Bridge will
+ continue to accept incoming packets from the Host.
+
+ * Valid in Asynchronous Callback: YES
+
+ Returns
+ * CY_AS_ERROR_INVALID_HANDLE - Invalid West Bridge device handle was passed in.
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured.
+ * CY_AS_ERROR_NO_FIRMWARE - Firmware is not active on West Bridge device.
+ * CY_AS_ERROR_NOT_RUNNING - Storage stack is not running.
+ * CY_AS_ERROR_SUCCESS - Burst mode has been started.
+
+ See Also
+ * CyAsStorageReadWriteBurstStop
+ */
+CyAsReturnStatus_t
+CyAsMTPStorageOnlyStart (
+ CyAsDeviceHandle handle /* Handle to the West Bridge device. */
+ );
+
+/* Summary
+ This function is used to mark the end of a storage read/write burst from the
+ P port processor.
+
+ Description
+ This function is used to mark the end of a storage read/write burst from the
+ processor. At this point, USB access to the mass storage / MTP endpoints on
+ the West Bridge device will be re-enabled.
+
+ * Valid in Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_INVALID_HANDLE - Invalid West Bridge device handle was passed in.
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured.
+ * CY_AS_ERROR_NO_FIRMWARE - Firmware is not active on West Bridge device.
+ * CY_AS_ERROR_NOT_RUNNING - Storage stack is not running.
+ * CY_AS_ERROR_INVALID_IN_CALLBACK - This API cannot be called from a callback.
+ * CY_AS_ERROR_OUT_OF_MEMORY - Failed to allocate memory to process the request.
+ * CY_AS_ERROR_TIMEOUT - Failed to send request to firmware.
+ * CY_AS_ERROR_SUCCESS - Burst mode has been stopped.
+
+ See Also
+ * CyAsStorageReadWriteBurstStart
+ */
+CyAsReturnStatus_t
+CyAsMTPStorageOnlyStop (
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device. */
+ CyAsFunctionCallback cb,
+ uint32_t client
+ );
+
+#include "cyas_cplus_end.h"
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasregs.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,201 @@
+/* Cypress West Bridge API header file (cyasregs.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASREG_H_
+#define _INCLUDED_CYASREG_H_
+
+#if !defined(__doxygen__)
+
+#define CY_AS_MEM_CM_WB_CFG_ID (0x80)
+#define CY_AS_MEM_CM_WB_CFG_ID_VER_MASK (0x000F)
+#define CY_AS_MEM_CM_WB_CFG_ID_HDID_MASK (0xFFF0)
+#define CY_AS_MEM_CM_WB_CFG_ID_HDID_ANTIOCH_VALUE (0xA100)
+#define CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_FPGA_VALUE (0x6800)
+#define CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_VALUE (0xA200)
+
+
+#define CY_AS_MEM_RST_CTRL_REG (0x81)
+#define CY_AS_MEM_RST_CTRL_REG_HARD (0x0003)
+#define CY_AS_MEM_RST_CTRL_REG_SOFT (0x0001)
+#define CY_AS_MEM_RST_RSTCMPT (0x0004)
+
+#define CY_AS_MEM_P0_ENDIAN (0x82)
+#define CY_AS_LITTLE_ENDIAN (0x0000)
+#define CY_AS_BIG_ENDIAN (0x0101)
+
+#define CY_AS_MEM_P0_VM_SET (0x83)
+#define CY_AS_MEM_P0_VM_SET_VMTYPE_MASK (0x0007)
+#define CY_AS_MEM_P0_VM_SET_VMTYPE_RAM (0x0005)
+#define CY_AS_MEM_P0_VM_SET_VMTYPE_SRAM (0x0007)
+#define CY_AS_MEM_P0_VM_SET_VMTYPE_VMWIDTH (0x0008)
+#define CY_AS_MEM_P0_VM_SET_VMTYPE_FLOWCTRL (0x0010)
+#define CY_AS_MEM_P0_VM_SET_IFMODE (0x0020)
+#define CY_AS_MEM_P0_VM_SET_CFGMODE (0x0040)
+#define CY_AS_MEM_P0_VM_SET_DACKEOB (0x0080)
+#define CY_AS_MEM_P0_VM_SET_OVERRIDE (0x0100)
+#define CY_AS_MEM_P0_VM_SET_INTOVERD (0x0200)
+#define CY_AS_MEM_P0_VM_SET_DRQOVERD (0x0400)
+#define CY_AS_MEM_P0_VM_SET_DRQPOL (0x0800)
+#define CY_AS_MEM_P0_VM_SET_DACKPOL (0x1000)
+
+
+#define CY_AS_MEM_P0_NV_SET (0x84)
+#define CY_AS_MEM_P0_NV_SET_WPSWEN (0x0001)
+#define CY_AS_MEM_P0_NV_SET_WPPOLAR (0x0002)
+
+#define CY_AS_MEM_PMU_UPDATE (0x85)
+#define CY_AS_MEM_PMU_UPDATE_UVALID (0x0001)
+#define CY_AS_MEM_PMU_UPDATE_USBUPDATE (0x0002)
+#define CY_AS_MEM_PMU_UPDATE_SDIOUPDATE (0x0004)
+
+#define CY_AS_MEM_P0_INTR_REG (0x90)
+#define CY_AS_MEM_P0_INTR_REG_MCUINT (0x0020)
+#define CY_AS_MEM_P0_INTR_REG_DRQINT (0x0800)
+#define CY_AS_MEM_P0_INTR_REG_MBINT (0x1000)
+#define CY_AS_MEM_P0_INTR_REG_PMINT (0x2000)
+#define CY_AS_MEM_P0_INTR_REG_PLLLOCKINT (0x4000)
+
+#define CY_AS_MEM_P0_INT_MASK_REG (0x91)
+#define CY_AS_MEM_P0_INT_MASK_REG_MMCUINT (0x0020)
+#define CY_AS_MEM_P0_INT_MASK_REG_MDRQINT (0x0800)
+#define CY_AS_MEM_P0_INT_MASK_REG_MMBINT (0x1000)
+#define CY_AS_MEM_P0_INT_MASK_REG_MPMINT (0x2000)
+#define CY_AS_MEM_P0_INT_MASK_REG_MPLLLOCKINT (0x4000)
+
+#define CY_AS_MEM_MCU_MB_STAT (0x92)
+#define CY_AS_MEM_P0_MCU_MBNOTRD (0x0001)
+
+#define CY_AS_MEM_P0_MCU_STAT (0x94)
+#define CY_AS_MEM_P0_MCU_STAT_CARDINS (0x0001)
+#define CY_AS_MEM_P0_MCU_STAT_CARDREM (0x0002)
+
+#define CY_AS_MEM_PWR_MAGT_STAT (0x95)
+#define CY_AS_MEM_PWR_MAGT_STAT_WAKEUP (0x0001)
+
+#define CY_AS_MEM_P0_RSE_ALLOCATE (0x98)
+#define CY_AS_MEM_P0_RSE_ALLOCATE_SDIOAVI (0x0001)
+#define CY_AS_MEM_P0_RSE_ALLOCATE_SDIOALLO (0x0002)
+#define CY_AS_MEM_P0_RSE_ALLOCATE_NANDAVI (0x0004)
+#define CY_AS_MEM_P0_RSE_ALLOCATE_NANDALLO (0x0008)
+#define CY_AS_MEM_P0_RSE_ALLOCATE_USBAVI (0x0010)
+#define CY_AS_MEM_P0_RSE_ALLOCATE_USBALLO (0x0020)
+
+#define CY_AS_MEM_P0_RSE_MASK (0x9A)
+#define CY_AS_MEM_P0_RSE_MASK_MSDIOBUS_RW (0x0003)
+#define CY_AS_MEM_P0_RSE_MASK_MNANDBUS_RW (0x00C0)
+#define CY_AS_MEM_P0_RSE_MASK_MUSBBUS_RW (0x0030)
+
+#define CY_AS_MEM_P0_DRQ (0xA0)
+#define CY_AS_MEM_P0_DRQ_EP2DRQ (0x0004)
+#define CY_AS_MEM_P0_DRQ_EP3DRQ (0x0008)
+#define CY_AS_MEM_P0_DRQ_EP4DRQ (0x0010)
+#define CY_AS_MEM_P0_DRQ_EP5DRQ (0x0020)
+#define CY_AS_MEM_P0_DRQ_EP6DRQ (0x0040)
+#define CY_AS_MEM_P0_DRQ_EP7DRQ (0x0080)
+#define CY_AS_MEM_P0_DRQ_EP8DRQ (0x0100)
+#define CY_AS_MEM_P0_DRQ_EP9DRQ (0x0200)
+#define CY_AS_MEM_P0_DRQ_EP10DRQ (0x0400)
+#define CY_AS_MEM_P0_DRQ_EP11DRQ (0x0800)
+#define CY_AS_MEM_P0_DRQ_EP12DRQ (0x1000)
+#define CY_AS_MEM_P0_DRQ_EP13DRQ (0x2000)
+#define CY_AS_MEM_P0_DRQ_EP14DRQ (0x4000)
+#define CY_AS_MEM_P0_DRQ_EP15DRQ (0x8000)
+
+#define CY_AS_MEM_P0_DRQ_MASK (0xA1)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP2DRQ (0x0004)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP3DRQ (0x0008)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP4DRQ (0x0010)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP5DRQ (0x0020)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP6DRQ (0x0040)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP7DRQ (0x0080)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP8DRQ (0x0100)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP9DRQ (0x0200)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP10DRQ (0x0400)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP11DRQ (0x0800)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP12DRQ (0x1000)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP13DRQ (0x2000)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP14DRQ (0x4000)
+#define CY_AS_MEM_P0_DRQ_MASK_MEP15DRQ (0x8000)
+
+#define CY_AS_MEM_P0_EP2_DMA_REG (0xA2)
+#define CY_AS_MEM_P0_EPn_DMA_REG_COUNT_MASK (0x7FF)
+#define CY_AS_MEM_P0_EPn_DMA_REG_DMAVAL (1 << 12)
+#define CY_AS_MEM_P0_EP3_DMA_REG (0xA3)
+#define CY_AS_MEM_P0_EP4_DMA_REG (0xA4)
+#define CY_AS_MEM_P0_EP5_DMA_REG (0xA5)
+#define CY_AS_MEM_P0_EP6_DMA_REG (0xA6)
+#define CY_AS_MEM_P0_EP7_DMA_REG (0xA7)
+#define CY_AS_MEM_P0_EP8_DMA_REG (0xA8)
+#define CY_AS_MEM_P0_EP9_DMA_REG (0xA9)
+#define CY_AS_MEM_P0_EP10_DMA_REG (0xAA)
+#define CY_AS_MEM_P0_EP11_DMA_REG (0xAB)
+#define CY_AS_MEM_P0_EP12_DMA_REG (0xAC)
+#define CY_AS_MEM_P0_EP13_DMA_REG (0xAD)
+#define CY_AS_MEM_P0_EP14_DMA_REG (0xAE)
+#define CY_AS_MEM_P0_EP15_DMA_REG (0xAF)
+
+#define CY_AS_MEM_IROS_SLB_DATARET (0xC0)
+
+#define CY_AS_MEM_IROS_IO_CFG (0xC1)
+#define CY_AS_MEM_IROS_IO_CFG_GPIODRVST_MASK (0x0003)
+#define CY_AS_MEM_IROS_IO_CFG_GPIOSLEW_MASK (0x0004)
+#define CY_AS_MEM_IROS_IO_CFG_PPIODRVST_MASK (0x0018)
+#define CY_AS_MEM_IROS_IO_CFG_PPIOSLEW_MASK (0x0020)
+#define CY_AS_MEM_IROS_IO_CFG_SSIODRVST_MASK (0x0300)
+#define CY_AS_MEM_IROS_IO_CFG_SSIOSLEW_MASK (0x0400)
+#define CY_AS_MEM_IROS_IO_CFG_SNIODRVST_MASK (0x1800)
+#define CY_AS_MEM_IROS_IO_CFG_SNIOSLEW_MASK (0x2000)
+
+#define CY_AS_MEM_IROS_PLL_CFG (0xC2)
+
+#define CY_AS_MEM_IROS_PXB_DATARET (0xC3)
+
+#define CY_AS_MEM_PLL_LOCK_LOSS_STAT (0xC4)
+#define CY_AS_MEM_PLL_LOCK_LOSS_STAT_PLLSTAT (0x0800)
+
+#define CY_AS_MEM_IROS_SLEEP_CFG (0xC5)
+
+#define CY_AS_MEM_PNAND_CFG (0xDA)
+#define CY_AS_MEM_PNAND_CFG_IOWIDTH_MASK (0x0001)
+#define CY_AS_MEM_PNAND_CFG_IOWIDTH_8BIT (0x0000)
+#define CY_AS_MEM_PNAND_CFG_IOWIDTH_16BIT (0x0001)
+#define CY_AS_MEM_PNAND_CFG_BLKTYPE_MASK (0x0002)
+#define CY_AS_MEM_PNAND_CFG_BLKTYPE_SMALL (0x0002)
+#define CY_AS_MEM_PNAND_CFG_BLKTYPE_LARGE (0x0000)
+#define CY_AS_MEM_PNAND_CFG_EPABYTE_POS (4)
+#define CY_AS_MEM_PNAND_CFG_EPABYTE_MASK (0x0030)
+#define CY_AS_MEM_PNAND_CFG_EPABIT_POS (6)
+#define CY_AS_MEM_PNAND_CFG_EPABIT_MASK (0x00C0)
+#define CY_AS_MEM_PNAND_CFG_LNAEN_MASK (0x0100)
+
+#define CY_AS_MEM_P0_MAILBOX0 (0xF0)
+#define CY_AS_MEM_P0_MAILBOX1 (0xF1)
+#define CY_AS_MEM_P0_MAILBOX2 (0xF2)
+#define CY_AS_MEM_P0_MAILBOX3 (0xF3)
+
+#define CY_AS_MEM_MCU_MAILBOX0 (0xF8)
+#define CY_AS_MEM_MCU_MAILBOX1 (0xF9)
+#define CY_AS_MEM_MCU_MAILBOX2 (0xFA)
+#define CY_AS_MEM_MCU_MAILBOX3 (0xFB)
+
+#endif /* !defined(__doxygen__) */
+
+#endif /* _INCLUDED_CYASREG_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasstorage.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,2018 @@
+/* Cypress West Bridge API header file (cyasstorage.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASSTORAGE_H_
+#define _INCLUDED_CYASSTORAGE_H_
+
+#include "cyasmedia.h"
+#include "cyasmisc.h"
+#include "cyas_cplus_start.h"
+
+
+/*@@Storage APIs
+ Summary
+ This section documents the storage APIs supported by the West Bridge API.
+
+ Description
+ The storage API is based on some specific concepts which are referenced here.
+ * <LINK Storage API Overview>
+ * Addressing
+ * Ownership
+ * <LINK Asynchronous Versus Synchronous Operation>
+*/
+
+/*@@Storage API Overview
+ Summary
+ Storage devices are identified by media type. Each media type is considered a
+ single logical device.
+
+ Description
+ Each media type has a consistent block size and consists
+ of a set of logical blocks numbered from 0 to N - 1 where N is the size of the
+ media type in blocks. The mass storage APIs defined below provide the
+ capability to query for devices that are present, and read/write data to/from
+ these devices.
+*/
+
+/*@@Addressing
+ Summary
+ Blocks within a storage device are address by a hierarchal block address. This
+ address consists of the bus number, physical device, logical unit, and finally
+ block address.
+
+ Description
+ While currently only a single device of each media type is supported, the address
+ space reserves space in the future for multiple devices of each type. Therefore
+ the second element of the address is the specific device being addressed within
+ a given device type. For this release of the software, this value will always be
+ zero to address the first device.
+
+ The third element of the address is the logical unit. A device being managed
+ by West Bridge can be partitioned into multiple logical units. This partition
+ information is stored on each device itself. Currently, one of the storage devices
+ managed by West Bridge can be partitioned into two logical units.
+
+ Finally a logical block address is given within the logical unit to address an
+ individual block.
+*/
+
+/*@@Ownership
+ Summary
+ While West Bridge supports concurrent block level operations from both the USB port and
+ the processor port, this is not desirable in most situations as the file system
+ contained on the storage media cannot be accessed concurrently. To insure access
+ by only one of USB and the processor, the West Bridge API provides for ownership of storage
+ devices based on media type.
+
+ Description
+ The processor requests ownership of a given media type by calling CyAsStorageClaim().
+ The firmware in West Bridge releases control of the media and signals the processor through
+ the event callback registered with CyAsStorageRegisterCallback(). The specific event is
+ the CyAsStorageProcessor. The processor can later release the media via a call to
+ CyAsStorageRelease(). This call is immediate and no callback is required.
+
+ If the processor has claimed storage and the USB port is connected, West Bridge will need to
+ claim the storage to manage the mass storage device. West Bridge requests the storage through
+ the event callback registered with CyAsStorageRegisterCallback(). The specific event is
+ CyAsStorageAntioch and is named as such to reflect the USB view of storage. This callback
+ is a request for the processor to release storage. The storage is not actually released
+ until the processor calls CyAsStorageRelease().
+
+ Note that the CyAsStorageAntioch is only sent when the USB storage device is enumerated and
+ NOT at every USB operation. The ownership of a given storage media type is assumed to belong
+ to the processor until the USB connection is established. At that point, the storage ownership
+ is transferred to West Bridge. After the USB connection is broken, ownership can be transferred
+ back to the processor.
+*/
+
+/*@@Asynchronous Versus Synchronous Operation
+ Summary
+ When read or write operations are performed to the storage devices, these operations may be
+ synchronous or asynchronous. A synchronous operation is an operation where the read or write
+ operation is requested and the function does not return until the operation is complete. This
+ type of function is the easiest to use but does not provide for optimal usage of the P port
+ processor time.
+
+ Description
+ An asynchronous operation is one where the function returns as soon as the request is started.
+ The specific read and write request will complete at some time in the future and the P port
+ processor will be notified via a callback function. While asynchronous functions provide for
+ much better usage of the CPU, these function have more stringent requirements for use. First,
+ any buffer use for data transfer must be valid from the function call to request the operation
+ through when the callback function is called. This basically implies that stack based buffers
+ are not acceptable for asynchronous calls. Second, error handling must be deferred until the
+ callback function is called indicating any kind of error that may have occurred.
+*/
+
+/*@@Partitioning
+ Summary
+ West Bridge API and firmware support the creation of up to two logical partitions on one
+ of the storage devices that are managed by West Bridge. The partitions are managed through
+ the CyAsStorageCreatePPartition and CyAsStorageRemovePPartition APIs.
+
+ Description
+ The CyAsStorageCreatePPartition API is used to divide the total storage on a storage
+ device into two logical units or partitions. Since the partition information is stored
+ on the storage device in a custom format, partitions should only be created on fixed
+ storage devices (i.e., no removable SD/MMC cards). Any data stored on the device
+ before the creation of the partition, is liable to be lost when a partition is created.
+
+ The CyAsStorageRemovePPartition API is used to remove the stored partition information,
+ so that all of the device's capacity is treated as a single partition again.
+
+ When a storage device with two partitions (units) is being enumerated as a mass storage
+ device through the West Bridge, it is possible to select the partitions to be made
+ visible to the USB host. This is done through the CyAsUsbSelectMSPartitions API.
+*/
+
+/*****************************************************************************
+ * West Bridge Constants
+ ****************************************************************************/
+
+/* Summary
+ This constants indicates a raw device access to the read/write functions
+
+ Description
+ When performing reading and writing operations on the storage devices attached
+ to West Bridge, there are cases where writes need to happen to raw devices, versus
+ the units contained within a device. This is specifically required to manage
+ the partitions within physical devices. This constant is used in calls to
+ CyAsStorageRead(), CyAsStorageReadAsync(), CyAsStorageWrite() and
+ CyAsStorageWriteAsync(), to indicate that the raw physical device is being
+ accessed and not any specific unit on the device.
+
+ See Also
+ * CyAsStorageRead
+ * CyAsStorageReadAsync
+ * CyAsStorageWrite
+ * CyAsStorageWriteAsync
+*/
+#define CY_AS_LUN_PHYSICAL_DEVICE (0xffffffff)
+
+/* Summary
+ This constant represents the maximum DMA burst length supported on a storage
+ endpoint
+
+ Description
+ West Bridge reserves separate endpoints for accessing storage media through the
+ CyAsStorageRead() and CyAsStorageWrite() calls. The maximum size of these
+ endpoints is always 512 bytes, regardless of status and speed of the USB
+ connection.
+*/
+#define CY_AS_STORAGE_EP_SIZE (512)
+
+/*****************************************************************************
+ * West Bridge Types
+ ****************************************************************************/
+
+/* Summary
+ This type indicates the type of event in an event callback from West Bridge
+
+ Description
+ At times West Bridge needs to inform the P port processor of events that have
+ occurred. These events are asynchronous to the thread of control on the P
+ port processor and as such are generally delivered via a callback function that
+ is called as part of an interrupt handler. This type indicates the resonse for
+ the call to the callback function.
+
+ See Also
+ * CyAsStorageEventCallback
+ * CyAsStorageRegisterCallback
+*/
+typedef enum CyAsStorageEvent
+{
+ CyAsStorageAntioch, /* This event occurs when the West Bridge device has
+ detected a USB connect and has enumerated the
+ storage controlled by West Bridge to the USB port.
+ This event is the signal that the processor
+ needs to release the storage media. West Bridge will
+ not have control of the storage media until the
+ processor calls CyAsReleaseStorage() to release
+ the specific media. */
+
+ CyAsStorageProcessor, /* This event occurs when the processor has requested
+ ownership of a given media type and West Bridge has
+ released the media. This event is an indicator
+ that the transfer of ownership is complete and the
+ processor now owns the given media type. */
+
+ CyAsStorageRemoved, /* This event occurs when a removable media type has
+ been removed. */
+
+ CyAsStorageInserted, /* This event occurs when a removable media type has
+ been inserted. */
+
+ CyAsSdioInterrupt /* This event occurs when the West Bridge device ercieves an
+ interrrupt from an SDIO card */
+
+} CyAsStorageEvent ;
+
+/* Summary
+ This type gives the type of the operation in a storage operation callback
+
+ Description
+ This type is used in the callback function for asynchronous operation. This type
+ indicates whether it is a CyAsStorageRead() or CyAsStorageWrite() operation that
+ has completed.
+
+ See Also
+ * <LINK Asynchronous Versus Synchronous Operation>
+ * CyAsStorageRead
+ * CyAsStorageWrite
+*/
+typedef enum CyAsOperType
+{
+ CyAsOpRead, /* A data read operation */
+ CyAsOpWrite /* A data write operation */
+} CyAsOperType ;
+
+/* Summary
+ This data structure describes a specific type of media
+
+ Description
+ This data structure is the return value from the CyAsStorageQueryDevice
+ function. This structure provides information about the specific storage
+ device being queried.
+
+ See Also
+ * CyAsStorageQueryDevice
+*/
+typedef struct CyAsDeviceDesc
+{
+ CyAsMediaType type ; /* Type of device */
+ CyBool removable ; /* Is the device removable */
+ CyBool writeable ; /* Is the device writeable */
+ uint16_t block_size ; /* Basic block size for device */
+ uint32_t number_units ; /* Number of LUNs on the device */
+ CyBool locked ; /* Is the device password locked */
+ uint32_t erase_unit_size ; /* Size in bytes of an Erase Unit. Block erase operation
+ is only supported for SD storage, and the erase_unit_size
+ is invalid for all other kinds of storage. */
+} CyAsDeviceDesc ;
+
+/* Summary
+ This data structure describes a specific unit on a specific type of media
+
+ Description
+ This data structure is the return value from the CyAsStorageQueryUnit
+ function. This structure provides information about the specific unit.
+
+ See Also
+ * CyAsStorageQueryUnit
+*/
+typedef struct CyAsUnitDesc
+{
+ CyAsMediaType type ; /* Type of device */
+ uint16_t block_size ; /* Basic block size for device */
+ uint32_t start_block ; /* Physical start block for LUN */
+ uint32_t unit_size ; /* Number of blocks in the LUN */
+} CyAsUnitDesc ;
+
+/* Summary
+ This function type defines a callback to be called after an asynchronous operation
+
+ Description
+ This function type defines a callback function that is called at the completion of any
+ asynchronous read or write operation.
+
+ See Also
+ * CyAsStorageReadAsync()
+ * CyAsStorageWriteAsync()
+*/
+typedef void (*CyAsStorageCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device completing the storage operation */
+ CyAsBusNumber_t bus, /* The bus completing the operation */
+ uint32_t device, /* The device completing the operation */
+ uint32_t unit, /* The unit completing the operation */
+ uint32_t block_number, /* The block number of the completed operation */
+ CyAsOperType op, /* The type of operation */
+ CyAsReturnStatus_t status /* The error status */
+ ) ;
+
+/* Summary
+ This function type defines a callback to be called in the event of a storage related event
+
+ Description
+ At times West Bridge needs to inform the P port processor of events that have
+ occurred. These events are asynchronous to the thread of control on the P
+ port processor and as such are generally delivered via a callback function that
+ is called as part of an interrupt handler. This type defines the type of function
+ that must be provided as a callback function.
+
+ See Also
+ * CyAsStorageEvent
+ * CyAsStorageRegisterCallback
+*/
+typedef void (*CyAsStorageEventCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device sending the event notification */
+ CyAsBusNumber_t bus, /* The bus where the event happened */
+ uint32_t device, /* The device where the event happened */
+ CyAsStorageEvent evtype, /* The event type */
+ void *evdata /* Event related data */
+ ) ;
+
+/* Summary
+ This function type defines a callback to be called after an asynchronous sdio operation
+
+ Description
+ The Callback function is called at the completion of an asynchronous sdio read or write operation.
+
+ See Also
+ * CyAsSdioExtendedRead()
+ * CyAsSdioExtendedWrite()
+*/
+typedef void (*CyAsSdioCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device completing the storage operation */
+ CyAsBusNumber_t bus, /* The bus completing the operation */
+ uint32_t device, /* The device completing the operation */
+ uint32_t function, /* The function number of the completing the operation.
+ If the status of the operation is either CY_AS_ERROR_IO_ABORTED
+ or CY_AS_IO_SUSPENDED then the most significant word parameter will
+ contain the number of blocks still pending. */
+ uint32_t address, /* The base address of the completed operation */
+ CyAsOperType op, /* The type of operation */
+ CyAsReturnStatus_t status /* The status of the operation */
+ ) ;
+
+/* Summary
+ Enumeration of SD/MMC card registers that can be read through the API.
+
+ Description
+ Some of the registers on the SD/MMC card(s) attached to the West Bridge can be read
+ through the API layers. This type enumerates the registers that can be read.
+
+ See Also
+ * CyAsStorageSDRegisterRead
+ */
+typedef enum CyAsSDCardRegType
+{
+ CyAsSDReg_OCR = 0,
+ CyAsSDReg_CID,
+ CyAsSDReg_CSD
+} CyAsSDCardRegType ;
+
+/* Summary
+ Struct encapsulating parameters and return values for a CyAsStorageQueryDevice
+ call.
+
+ Description
+ This struct holds the input parameters and the return values for an asynchronous
+ CyAsStorageQueryDevice call.
+
+ See Also
+ * CyAsStorageQueryDevice
+ */
+typedef struct CyAsStorageQueryDeviceData
+{
+ CyAsBusNumber_t bus ; /* The bus with the device to query */
+ uint32_t device ; /* The logical device number to query */
+ CyAsDeviceDesc desc_p ; /* The return value for the device descriptor */
+} CyAsStorageQueryDeviceData ;
+
+
+/* Summary
+ Struct encapsulating parameters and return values for a CyAsStorageQueryUnit
+ call.
+
+ Description
+ This struct holds the input parameters and the return values for an asynchronous
+ CyAsStorageQueryUnit call.
+
+ See Also
+ * CyAsStorageQueryUnit
+ */
+typedef struct CyAsStorageQueryUnitData
+{
+ CyAsBusNumber_t bus ; /* The bus with the device to query */
+ uint32_t device ; /* The logical device number to query */
+ uint32_t unit ; /* The unit to query on the device */
+ CyAsUnitDesc desc_p ; /* The return value for the unit descriptor */
+} CyAsStorageQueryUnitData ;
+
+/* Summary
+ Struct encapsulating the input parameter and return values for a
+ CyAsStorageSDRegisterRead call.
+
+ Description
+ This struct holds the input parameter and return values for an asynchronous
+ CyAsStorageSDRegisterRead call.
+
+ See Also
+ * CyAsStorageSDRegisterRead
+ */
+typedef struct CyAsStorageSDRegReadData
+{
+ uint8_t *buf_p; /* Pointer to the result buffer. */
+ uint8_t length; /* Length of data to be copied in bytes. */
+} CyAsStorageSDRegReadData ;
+
+/* Summary
+ Controls which pins are used for card detection
+
+ Description
+ When a StorageDeviceControl call is made to enable or disable
+ card detection this enum is passed in to control which pin
+ is used for the detection.
+
+ See Also
+ * CyAsStorageDeviceControl
+*/
+typedef enum CyAsStorageCardDetect
+{
+ CyAsStorageDetect_GPIO,
+ CyAsStorageDetect_SDAT_3
+} CyAsStorageCardDetect ;
+
+#ifndef __doxygen__
+#define CyAsStorageDetect_GPIO_0 CyAsStorageDetect_GPIO
+
+#define CY_AS_SD_REG_OCR_LENGTH (4) /* Length of OCR value in bytes. */
+#define CY_AS_SD_REG_CID_LENGTH (16) /* Length of CID value in bytes. */
+#define CY_AS_SD_REG_CSD_LENGTH (16) /* Length of CSD value in bytes. */
+#define CY_AS_SD_REG_MAX_RESP_LENGTH (10) /* Max. length of register response in words. */
+
+#endif
+
+/* Summary
+ This data structure is the data passed via the evdata paramater on a usb event
+ callback for the mass storage device progress event.
+
+ Description
+ This data structure reports the number of sectors that have been written and read
+ on the USB mass storage device since the last event report. The corresponding
+ event is only sent when either the number of writes, or the number of reads has
+ crossed a pre-set threshold.
+
+ See Also
+ * CyAsUsbEventCallback
+ * CyAsUsbRegisterCallback
+*/
+typedef struct CyAsMSCProgressData
+{
+ uint32_t wr_count; /* Number of sectors written since the last event. */
+ uint32_t rd_count; /* Number of sectors read since the last event. */
+} CyAsMSCProgressData ;
+
+/* Summary
+Flag to set Direct Write operation to read back from the address written to.
+
+
+ See Also
+ *CyAsSdioDirectWrite()
+*/
+#define CY_SDIO_RAW (0x01)
+
+
+/* Summary
+Flag to set Extended Read and Write to perform IO using a FIFO
+i.e. read or write from the specified address only.
+
+ See Also
+ *CyAsSdioExtendedRead()
+ *CyAsSdioExtendedWrite()
+*/
+#define CY_SDIO_OP_FIFO (0x00)
+
+/* Summary
+Flag to set Extended Read and Write to perform incremental
+IO using the address provided as the base address.
+
+
+ See Also
+ *CyAsSdioExtendedRead()
+ *CyAsSdioExtendedWrite()
+*/
+#define CY_SDIO_OP_INCR (0x02)
+
+/* Summary
+Flag to set Extended Read and Write to Block Mode operation
+
+ See Also
+ *CyAsSdioExtendedRead()
+ *CyAsSdioExtendedWrite()
+*/
+#define CY_SDIO_BLOCKMODE (0x04)
+
+/* Summary
+Flag to set Extended Read and Write to Byte Mode operation
+
+ See Also
+ *CyAsSdioExtendedRead()
+ *CyAsSdioExtendedWrite()
+*/
+#define CY_SDIO_BYTEMODE (0x00)
+
+/* Summary
+Flag to force re/initialization of a function.
+
+Description
+If not set a call to CyAsSdioInitFunction()
+will not initialize a function that has been previously initialized.
+ See Also
+ *CyAsSdioInitFunction()
+ */
+#define CY_SDIO_FORCE_INIT (0x40)
+
+/* Summary
+Flag to re-enable the SDIO interrupts.
+
+Description
+Used with a direct read or direct write
+after the Interrupt triggerred by SDIO has been serviced and cleared to
+reset the West Bridge Sdio Interrupt.
+ See Also
+ *CyAsSdioDirectRead()
+ *CyAsSdioDirectWrite()
+*/
+
+#define CY_SDIO_REARM_INT (0x80)
+
+
+/* Summary
+ Flag to check if 4 bit support is enabled on a low speed card
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_4BLS (0x80)
+
+/* Summary
+ Flag to check if card is a low speed card
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_LSC (0x40)
+
+/* Summary
+ Flag to check if interrupt during multiblock data transfer is enabled
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_E4MI (0x20)
+
+/* Summary
+ Flag to check if interrupt during multiblock data transfer is supported
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_S4MI (0x10)
+
+/* Summary
+ Flag to check if card supports function suspending.
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_SBS (0x08)
+
+/* Summary
+ Flag to check if card supports SDIO Read-Wait
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_SRW (0x04)
+
+/* Summary
+ Flag to check if card supports multi-block transfers
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_SMB (0x02)
+
+/* Summary
+ Flag to check if card supports Direct IO commands during execution of an Extended
+ IO function
+ See Also
+ <link CyAsSDIOCard::card_capability> */
+#define CY_SDIO_SDC (0x01)
+
+/* Summary
+ Flag to check if function has a CSA area.
+ See Also
+ <link CyAsSDIOFunc::csa_bits> */
+#define CY_SDIO_CSA_SUP (0x40)
+
+/* Summary
+ Flag to check if CSA access is enabled.
+ See Also
+ <link CyAsSDIOFunc::csa_bits> */
+#define CY_SDIO_CSA_EN (0x80)
+
+/* Summary
+ Flag to check if CSA is Write protected.
+ See Also
+ <link CyAsSDIOFunc::csa_bits> */
+#define CY_SDIO_CSA_WP (0x01)
+
+/* Summary
+ Flag to check if CSA formatting is prohibited.
+ See Also
+ <link CyAsSDIOFunc::csa_bits> */
+#define CY_SDIO_CSA_NF (0x02)
+
+/* Summary
+ Flag to check if the function allows wake-up from low
+ power mode using some vendor specific method.
+ See Also
+ <link CyAsSDIOFunc::wakeup_support> */
+#define CY_SDIO_FN_WUS (0x01)
+
+
+/* Summary
+ This data structure stores SDIO function 0 parameters for a SDIO card
+*/
+typedef struct CyAsSDIOCard
+{
+ uint8_t num_functions; /* Number of functions present on the card. */
+ uint8_t memory_present; /* Memory present(Combo card) or not */
+ uint16_t manufacturer_Id; /* 16 bit manufacturer ID */
+ uint16_t manufacturer_info; /* Additional vendor specific info */
+ uint16_t maxblocksize; /* Max Block size for function 0 */
+ uint16_t blocksize; /* Block size used for function 0 */
+ uint8_t sdio_version; /* SDIO version supported by the card */
+ uint8_t card_capability; /* Card capability flags */
+} CyAsSDIOCard;
+
+/* Summary
+ This data structure stores SDIO function 1-7 parameters for a SDIO card
+*/
+typedef struct CyAsSDIOFunc
+{
+ uint8_t function_code; /* SDIO function code. 0 if non standard function */
+ uint8_t extended_func_code; /* Extended function type code for non-standard function */
+ uint16_t maxblocksize; /* Max IO Blocksize supported by the function */
+ uint16_t blocksize; /* IO Blocksize used by the function */
+ uint32_t card_psn; /* 32 bit product serial number for the function */
+ uint8_t csa_bits; /* Code storage area variables */
+ uint8_t wakeup_support; /* Function wake-up support */
+}CyAsSDIOFunc;
+
+/*****************************************************************************
+ * West Bridge Functions
+ ****************************************************************************/
+
+/* Summary
+ This function starts the West Bridge storage module.
+
+ Description
+ This function initializes the West Bridge storage software stack and readies this
+ module to service storage related requests. If the stack is already running,
+ the reference count for the stack is incremented.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the module started sucessfully
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsStorageStop
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageStart(
+ CyAsDeviceHandle handle, /* Handle to the device */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function stops the West Bridge storage module.
+
+ Description
+ This function decrements the reference count for the storage stack and if this count
+ is zero, the storage stack is shut down. The shutdown frees all resources associated
+ with the storage stack.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Notes
+ While all resources associated with the storage stack will be freed is a shutdown occurs,
+ resources associated with underlying layers of the software will not be freed if they
+ are shared by the USB stack and the USB stack is active. Specifically the DMA manager,
+ the interrupt manager, and the West Bridge communications module are all shared by both the
+ USB stack and the storage stack.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING
+ * CY_AS_ERROR_ASYNC_PENDING
+ * CY_AS_ERROR_OUT_OF_MEMORY
+
+ See Also
+ * CyAsStorageStart
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageStop(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function is used to register a callback function for the storage API.
+
+ Description
+ At times West Bridge needs to inform the P port processor of events that have
+ occurred. These events are asynchronous to the thread of control on the P
+ port processor and as such are generally delivered via a callback function that
+ is called as part of an interrupt handler. This function registers the callback
+ function that is called when an event occurs. Each call to this function
+ replaces any old callback function with a new callback function supplied on
+ the most recent call. This function can also be called with a callback function
+ of NULL in order to remove any existing callback function
+
+ * Valid In Asynchronous Callback:YES
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the function was registered sucessfully
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+
+ See Also
+ * CyAsStorageEventCallback
+ * CyAsStorageEvent
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageRegisterCallback(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsStorageEventCallback callback /* The callback function to call for async storage events */
+ ) ;
+
+/* Summary
+ This function claims a given media type.
+
+ Description
+ This function communicates to West Bridge that the processor wants control of the
+ given storage media type. Each media type can be claimed or released by the
+ processor independently. As the processor is the master for the storage,
+ West Bridge should release control of the requested media as soon as possible and
+ signal the processor via the CyAsStorageProcessor event.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ This function just notifies West Bridge that the storage is desired. The storage
+ has not actually been released by West Bridge until the registered callback function
+ is called with the CyAsStorageProcessor event
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - this request was sucessfully transmitted to the West Bridge device
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_MEDIA
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_NOT_ACQUIRED
+
+ See Also:
+ * CyAsStorageClaim
+ * CyAsStorageRelease
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageClaim(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* The bus to claim */
+ uint32_t device, /* The device to claim */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function releases a given media type.
+
+ Description
+ This function communicates to West Bridge that the processor has released control of
+ the given storage media type. Each media type can be claimed or released by the
+ processor independently. As the processor is the master for the storage, West Bridge
+ can now assume ownership of the media type. No callback or event is generated.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media was sucessfully released
+ * CY_AS_ERROR_MEDIA_NOT_CLAIMED - the media was not claimed by the P port
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_MEDIA
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsStorageClaim
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageRelease(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* The bus to release */
+ uint32_t device, /* The device to release */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function information about the number of devices present on a given bus
+
+ Description
+ This function retrieves information about how many devices on on the given
+ West Bridge bus.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ While the current implementation of West Bridge only supports one of logical device of
+ each media type, future versions WestBridge/Antioch may support multiple devices.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsStorageQueryDevice
+ * CyAsStorageQueryUnit
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryBus(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* The bus to query */
+ uint32_t * count, /* The return value containing the number of
+ devices present for this media type */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function information about the number of devices present for a given media type
+
+ Description
+ This function retrieves information about how many devices of a given media type
+ are attached to West Bridge.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Notes
+ While the current implementation of West Bridge only supports one of logical device of
+ each media type, future versions West Bridge may support multiple devices.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsStorageQueryMedia
+ * CyAsMediaType
+ * CyAsStorageQueryDevice
+ * CyAsStorageQueryUnit
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryMedia(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType type, /* The type of media to query */
+ uint32_t * count, /* The return value containing the number of
+ devices present for this media type */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function returns information about a given device of a specific media type
+
+ Description
+ This function retrieves information about a device of a given type of media. The
+ function is called with a given media type and device and a pointer to a media descriptor
+ (CyAsDeviceDesc). This function fills in the data in the media descriptor to provide
+ information about the attributes of the device of the given device.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Notes
+ Currently this API only supports a single logical device of each media type. Therefore
+ the only acceptable value for the parameter device is zero (0).
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_NO_SUCH_MEDIA
+ * CY_AS_ERROR_NO_SUCH_DEVICE
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsMediaType
+ * CyAsStorageQueryMedia
+ * CyAsStorageQueryUnit
+ * CyAsDeviceDesc
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryDevice(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsStorageQueryDeviceData* data, /* Parameters and return value for the query call */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function returns information about a given unit on a specific device
+
+ Description
+ This function retrieves information about a device of a given logical unit. The
+ function is called with a given media type, device address, unit address, and a
+ pointer to a unit descriptor (CyAsUnitDesc). This function fills in the data in
+ the unit descriptor to provide information about the attributes of the device of
+ the given logical unit.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_NO_SUCH_DEVICE
+ * CY_AS_ERROR_NO_SUCH_UNIT
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+
+ See Also
+ * CyAsMediaType
+ * CyAsStorageQueryMedia
+ * CyAsStorageQueryDevice
+ * CyAsUnitDesc
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryUnit(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsStorageQueryUnitData* data_p, /* Parameters and return value for the query call */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function enables/disables the handling of SD/MMC card detection and SD/MMC
+ write protection in West Bridge Firmware.
+
+ Description
+ If the detection of SD/MMC card insertion or removal is being done by the Processor
+ directly, the West Bridge firmware needs to be instructed to disable the card detect
+ feature. Also, if the hardware design does not use the SD_WP GPIO of the West Bridge to
+ handle SD card's write protect notch, the handling of write protection if firmware
+ should be disabled. This API is used to enable/disable the card detect and write
+ protect support in West Bridge firmware.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the feature controls were set successfully
+ * CY_AS_ERROR_NO_SUCH_BUS - the specified bus is invalid
+ * CY_AS_ERROR_NOT_SUPPORTED - function not supported on the device in the specified bus
+ * CY_AS_ERROR_IN_SUSPEND - the West Brdige device is in suspended mode
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageDeviceControl(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsBusNumber_t bus, /* The bus to control */
+ uint32_t device, /* The device to control */
+ CyBool card_detect_en, /* Enable/disable control for card detection */
+ CyBool write_prot_en, /* Enable/disable control for write protect handling */
+ CyAsStorageCardDetect config_detect, /* Control which pin is used for card detection */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+/* Summary
+ This function reads one or more blocks of data from the storage system.
+
+ Description
+ This function synchronously reads one or more blocks of data from the given media
+ type/device and places the data into the data buffer given. This function does not
+ return until the data is read and placed into the buffer.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ If the Samsung CEATA drive is the target for a read/write operation, the maximum
+ number of sectors that can be accessed through a single API call is limited to 2047.
+ Longer accesses addressed to a Samsung CEATA drive can result in time-out errors.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_NO_SUCH_UNIT - the unit specified does not exist
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_MEDIA_WRITE_PROTECTED - the media is write protected
+ * CY_AS_ERROR_INVALID_PARAMETER - Reads/Writes greater than 4095 logic blocks are not allowed
+
+ See Also
+ * CyAsStorageReadAsync
+ * CyAsStorageWrite
+ * CyAsStorageWriteAsync
+ * CyAsStorageCancelAsync
+ * <LINK Asynchronous Versus Synchronous Operation>
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageRead(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* The bus to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer where data will be placed */
+ uint16_t num_blocks /* The number of blocks to be read */
+ ) ;
+
+/* Summary
+ This function asynchronously reads one or more blocks of data from the storage system.
+
+ Description
+ This function asynchronously reads one or more blocks of data from the given media
+ type/device and places the data into the data buffer given. This function returns
+ as soon as the request is transmitted to the West Bridge device but before the data is
+ available. When the read is complete, the callback function is called to indicate the
+ data has been placed into the data buffer. Note that the data buffer must remain
+ valid from when the read is requested until the callback function is called.
+
+ * Valid In Asynchronous Callback: YES
+
+ Notes
+ If the Samsung CEATA drive is the target for a read/write operation, the maximum
+ number of sectors that can be accessed through a single API call is limited to 2047.
+ Longer accesses addressed to a Samsung CEATA drive can result in time-out errors.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_MEDIA_WRITE_PROTECTED - the media is write protected
+ * CY_AS_ERROR_QUERY_DEVICE_NEEDED - Before an asynchronous read can be issued
+ a call to CyAsStorageQueryDevice must be made
+ * CY_AS_ERROR_INVALID_PARAMETER - Reads/Writes greater than 4095 logic blocks are not allowed
+
+ See Also
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageWriteAsync
+ * CyAsStorageCancelAsync
+ * CyAsStorageQueryDevice
+ * <LINK Asynchronous Versus Synchronous Operation>
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageReadAsync(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* The bus to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer where data will be placed */
+ uint16_t num_blocks, /* The number of blocks to be read */
+ CyAsStorageCallback callback /* The function to call when the read is complete
+ or an error occurs */
+ ) ;
+
+/* Summary
+ This function writes one or more blocks of data to the storage system.
+
+ Description
+ This function synchronously writes one or more blocks of data to the given media/device.
+ This function does not return until the data is written into the media.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ If the Samsung CEATA drive is the target for a read/write operation, the maximum
+ number of sectors that can be accessed through a single API call is limited to 2047.
+ Longer accesses addressed to a Samsung CEATA drive can result in time-out errors.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_NO_SUCH_UNIT - the unit specified does not exist
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_MEDIA_WRITE_PROTECTED - the media is write protected
+ * CY_AS_ERROR_INVALID_PARAMETER - Reads/Writes greater than 4095 logic blocks are not allowed
+
+ See Also
+ * CyAsStorageRead
+ * CyAsStorageReadAsync
+ * CyAsStorageWriteAsync
+ * CyAsStorageCancelAsync
+ * <LINK Asynchronous Versus Synchronous Operation>
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageWrite(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* The bus to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer containing the data to be written */
+ uint16_t num_blocks /* The number of blocks to be written */
+ ) ;
+
+/* Summary
+ This function asynchronously writes one or more blocks of data to the storage system
+
+ Description
+ This function asynchronously writes one or more blocks of data to the given media type/device.
+ This function returns as soon as the request is transmitted to the West Bridge device
+ but before the data is actually written. When the write is complete, the callback
+ function is called to indicate the data has been physically written into the media.
+
+ * Valid In Asynchronous Callback: YES
+
+ Notes
+ If the Samsung CEATA drive is the target for a read/write operation, the maximum
+ number of sectors that can be accessed through a single API call is limited to 2047.
+ Longer accesses addressed to a Samsung CEATA drive can result in time-out errors.
+
+ Notes
+ The data buffer must remain valid from when the write is requested until the callback
+ function is called.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_MEDIA_WRITE_PROTECTED - the media is write protected
+ * CY_AS_ERROR_QUERY_DEVICE_NEEDED - A query device call is required before async writes are allowed
+ * CY_AS_ERROR_INVALID_PARAMETER - Reads/Writes greater than 4095 logic blocks are not allowed
+
+ See Also
+ * CyAsStorageRead
+ * CyAsStorageWrite
+ * CyAsStorageReadAsync
+ * CyAsStorageCancelAsync
+ * CyAsStorageQueryDevice
+ * <LINK Asynchronous Versus Synchronous Operation>
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageWriteAsync(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* The bus to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer where the data to be written is stored */
+ uint16_t num_blocks, /* The number of blocks to be written */
+ CyAsStorageCallback callback /* The function to call when the write is complete
+ or an error occurs */
+ ) ;
+
+/* Summary
+ This function aborts any outstanding asynchronous operation
+
+ Description
+ This function aborts any asynchronous block read or block write operation. As only a
+ single asynchronous block read or write operation is possible at one time, this aborts
+ the single operation in progress.
+
+ * Valid In Asynchronous Callback: YES
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_OPERATION_PENDING - no asynchronous operation is pending
+
+ See Also
+ * CyAsStorageRead
+ * CyAsStorageReadAsync
+ * CyAsStorageWrite
+ * CyAsStorageWriteAsync
+ * <LINK Asynchronous Versus Synchronous Operation>
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageCancelAsync(
+ CyAsDeviceHandle handle /* Handle to the device with outstanding async request */
+ ) ;
+
+/* Summary
+ This function is used to read the content of SD registers
+
+ Description
+ This function is used to read the contents of CSD, CID and CSD registers of the SD Card.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the read operation was successful
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_IN_SUSPEND - The West Bridge device is in suspend mode
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_INVALID_PARAMETER - The register type is invalid or the media is not supported on the bus
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to get memory to process request
+ * CY_AS_ERROR_INVALID_RESPONSE - communication failure with West Bridge firmware
+
+ See Also
+ * CyAsStorageSDRegReadData
+ */
+EXTERN CyAsReturnStatus_t
+CyAsStorageSDRegisterRead(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device. */
+ CyAsBusNumber_t bus, /* The bus to query */
+ uint8_t device, /* The device to query */
+ CyAsSDCardRegType regType, /* The type of register to read. */
+ CyAsStorageSDRegReadData *data_p, /* Output data buffer and length. */
+ CyAsFunctionCallback cb, /* Callback function to call when done. */
+ uint32_t client /* Call context to send to the cb function. */
+ ) ;
+
+/* Summary
+ Creates a partition starting at the given block and using the
+ remaining blocks on the card.
+
+ Description
+ Storage devices attached to West Bridge can be partitioned into two units.
+ The visibility of these units through the mass storage interface can be
+ individually controlled. This API is used to partition a device into two.
+
+ * Valid in Asynchronous Callback: Yes (if cb supplied)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the partition was successfully created
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_IN_SUSPEND - The West Bridge device is in suspend mode
+ * CY_AS_ERROR_USB_RUNNING - Partition cannot be created while USB stack is active
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to get memory to process request
+ * CY_AS_ERROR_INVALID_REQUEST - feature not supported by active device or firmware
+ * CY_AS_ERROR_INVALID_RESPONSE - communication failure with West Bridge firmware
+ * CY_AS_ERROR_ALREADY_PARTITIONED - the storage device already has been partitioned
+ * CY_AS_ERROR_INVALID_BLOCK - Size specified for the partition exceeds the actual device capacity
+
+ See Also
+ * <LINK Partitioning>
+ * CyAsStorageRemovePPartition
+ */
+EXTERN CyAsReturnStatus_t
+CyAsStorageCreatePPartition(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* Bus on which the device to be partitioned is connected */
+ uint32_t device, /* Device number to be partitioned */
+ uint32_t size, /* Size of partition number 0 in blocks */
+ CyAsFunctionCallback cb, /* Callback in case of async call */
+ uint32_t client /* Client context to pass to the callback */
+ );
+
+/* Summary
+ Removes the partition table on a storage device connected to the West Bridge.
+
+ Description
+ Storage devices attached to West Bridge can be partitioned into two units.
+ This partition information is stored on the device and is non-volatile. This
+ API is used to remove the stored partition information and make the entire
+ device visible as a single partition (unit).
+
+ * Valid in Asynchronous Callback: Yes (if cb supplied)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the partition was successfully deleted
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_IN_SUSPEND - The West Bridge device is in suspend mode
+ * CY_AS_ERROR_USB_RUNNING - Partition cannot be created while USB stack is active
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to get memory to process request
+ * CY_AS_ERROR_INVALID_REQUEST - operation not supported by active device/firmware
+ * CY_AS_ERROR_NO_SUCH_UNIT - the addressed device is not partitioned
+
+ See Also
+ * <LINK Partitioning>
+ * CyAsStorageCreatePPartition
+ */
+EXTERN CyAsReturnStatus_t
+CyAsStorageRemovePPartition(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* Bus on which device of interest is connected */
+ uint32_t device, /* Device number of interest */
+ CyAsFunctionCallback cb, /* Callback in case of async call */
+ uint32_t client /* Client context to pass to the callback */
+ );
+
+/* Summary
+ Returns the amount of data read/written to the given device from the USB host.
+
+ Description
+
+ * Valid in Asynchronous Callback: Yes (if cb supplied)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - API call completed successfully
+ * CY_AS_ERROR_INVALID_HANDLE - Invalid West Bridge device handle
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - No firmware image has been loaded on West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - Storage stack has not been started
+ * CY_AS_ERROR_NOT_SUPPORTED - This function is not supported by active firmware version
+ * CY_AS_ERROR_OUT_OF_MEMORY - Failed to get memory to process the request
+ * CY_AS_ERROR_TIMEOUT - West Bridge firmware did not respond to request
+ * CY_AS_ERROR_INVALID_RESPONSE - Unexpected reply from West Bridge firmware
+
+ See Also
+ * CyAsUsbSetMSReportThreshold
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageGetTransferAmount(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* Bus on which device of interest is connected */
+ uint32_t device, /* Device number of interest */
+ CyAsMSCProgressData *data_p, /* Return value containing read/write sector counts. */
+ CyAsFunctionCallback cb, /* Callback in case of async call */
+ uint32_t client /* Client context to pass to the callback */
+ ) ;
+
+/* Summary
+ Performs a Sector Erase on an attached SD Card
+
+ Description
+ This allows you to erase an attached SD card. The area to erase
+ is specified in terms of a starting Erase Unit and a number of
+ Erase Units. The size of each Erase Unit is defined in the
+ DeviceDesc returned from a StorageQueryDevice call and it can
+ differ between SD cards.
+
+ A large erase can take a while to complete depending on the SD
+ card. In such a case it is reccomended that an async call is made.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - API call completed successfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_MEDIA_WRITE_PROTECTED - the media is write protected
+ * CY_AS_ERROR_QUERY_DEVICE_NEEDED - A query device call is required before erase is allowed
+ * CY_AS_ERROR_NO_SUCH_BUS
+ * CY_AS_ERROR_NO_SUCH_DEVICE
+ * CY_AS_ERROR_NOT_SUPPORTED - Erase is currenly only supported on SD and using SD only firmware
+ * CY_AS_ERROR_OUT_OF_MEMORY
+
+ See Also
+ * CyAsStorageSDRegisterRead
+*/
+EXTERN CyAsReturnStatus_t
+CyAsStorageErase(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus, /* Bus on which device of interest is connected */
+ uint32_t device, /* Device number of interest */
+ uint32_t erase_unit, /* Erase Unit to start the erase */
+ uint16_t num_erase_units, /* Number of Erase Units to erase */
+ CyAsFunctionCallback cb, /* Callback in case of async call */
+ uint32_t client /* Client context to pass to the callback */
+ ) ;
+
+/* Summary
+ This function is used to read a Tuple from the SDIO CIS area.
+
+ Description
+ This function is used to read a Tuple from the SDIO CIS area.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_INVALID_REQUEST - an invalid IO request type was made
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+ * CY_AS_ERROR_INVALID_ENDPOINT - A DMA request was made to an invalid endpoint
+ * CY_AS_ERROR_ENDPOINT_DISABLED - A DMA request was made to a disabled endpoint
+
+*/
+CyAsReturnStatus_t
+CyAsSdioGetCISInfo(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ uint16_t tupleId, /* Id of tuple to be fetched */
+ uint8_t * data_p /* Buffer to hold tuple read from card.
+ Should be at least 256 bytes in size */
+ );
+
+
+/* Summary
+ This function is used to read properties of the SDIO card.
+
+ Description
+ This function is used to read properties of the SDIO card into a CyAsSDIOCard structure.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_SUCCESS - the card information was returned
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+
+*/
+CyAsReturnStatus_t
+CyAsSdioQueryCard(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ CyAsSDIOCard *data_p /* Buffer to store card properties */
+ );
+
+/* Summary
+ This function is used to reset a SDIO card.
+
+ Description
+ This function is used to reset a SDIO card by writing to the reset bit in the CCCR
+ and reinitializing the card.This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ */
+CyAsReturnStatus_t
+CyAsSdioResetCard(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device /* Device number */
+ );
+
+/* Summary
+ This function performs a Synchronous 1 byte read from the sdio device function.
+
+ Description
+ This function is used to perform a synchronous 1 byte read from an SDIO card function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+ * CY_AS_ERROR_FUNCTION_SUSPENDED - The function to which read was attempted is in suspend
+*/
+CyAsReturnStatus_t
+CyAsSdioDirectRead(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ uint32_t address, /* Address for IO */
+ uint8_t miscBuf, /* Set to CY_SDIO_REARM_INT to reinitialize SDIO interrupt */
+ uint8_t * data_p /* Buffer to hold byte read from card */
+ );
+
+/* Summary
+ This function performs a Synchronous 1 byte write to the sdio device function.
+
+ Description
+ This function is used to perform a synchronous 1 byte write to an SDIO card function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+ * CY_AS_ERROR_FUNCTION_SUSPENDED - The function to which write was attempted is in suspend
+*/
+CyAsReturnStatus_t
+CyAsSdioDirectWrite(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ uint32_t address, /* Address for IO */
+ uint8_t miscBuf, /* Set to CY_SDIO_REARM_INT to reinitialize SDIO interrupt,
+ Set to CY_SDIO_RAW for Read after Write */
+ uint16_t argument, /* Byte to write */
+ uint8_t * data_p /* Buffer to hold byte read from card in Read after write mode */
+ );
+
+/* Summary
+ This function is used to set the blocksize of an SDIO function.
+
+ Description
+ This function is used to set the blocksize of an SDIO function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+ * CY_AS_ERROR_INVALID_BLOCKSIZE - An incorrect blocksize was passed to the function.
+ * CY_AS_ERROR_FUNCTION_SUSPENDED - The function to which write was attempted is in suspend
+*/
+CyAsReturnStatus_t
+CyAsSdioSetBlocksize(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ uint16_t blocksize /* Block size to set. */
+ );
+
+/* Summary
+ This function is used to read Multibyte/Block data from a IO function.
+
+ Description
+ This function is used to read Multibyte/Block data from a IO function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: YES
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+ * CY_AS_ERROR_INVALID_BLOCKSIZE - An incorrect blocksize or block count was passed to the function.
+ * CY_AS_ERROR_FUNCTION_SUSPENDED - The function to which write was attempted is in suspend
+ * CY_AS_ERROR_IO_ABORTED - The IO operation was aborted
+ * CY_AS_ERROR_IO_SUSPENDED - The IO operation was suspended
+ * CY_AS_ERROR_INVALID_REQUEST - An invalid request was passed to the card.
+
+*/
+CyAsReturnStatus_t
+CyAsSdioExtendedRead(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ uint32_t address, /* Base Address for IO */
+ uint8_t miscBuf, /* Set to CY_SDIO_BLOCKMODE for block IO,
+ CY_SDIO_BYTEMODE for multibyte IO,
+ CY_SDIO_OP_FIFO to read multiple bytes from the same address,
+ CY_SDIO_OP_INCR to read bytes from the incrementing addresses */
+ uint16_t argument, /* Block/Byte count to read */
+ uint8_t * data_p, /* Buffer to hold data read from card */
+ CyAsSdioCallback callback /* Callback in case of Asyncronous call. 0 if Synchronous */
+ );
+
+/* Summary
+ This function is used to write Multibyte/Block data to a IO function.
+
+ Description
+ This function is used to write Multibyte/Block data to a IO function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: YES
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+ * CY_AS_ERROR_INVALID_BLOCKSIZE - An incorrect blocksize or block count was passed to the function.
+ * CY_AS_ERROR_FUNCTION_SUSPENDED - The function to which write was attempted is in suspend
+ * CY_AS_ERROR_IO_ABORTED - The IO operation was aborted
+ * CY_AS_ERROR_IO_SUSPENDED - The IO operation was suspended
+ * CY_AS_ERROR_INVALID_REQUEST - An invalid request was passed to the card.
+*/
+CyAsReturnStatus_t
+CyAsSdioExtendedWrite(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ uint32_t address, /* Base Address for IO */
+ uint8_t miscBuf, /* Set to CY_SDIO_BLOCKMODE for block IO,
+ CY_SDIO_BYTEMODE for multibyte IO,
+ CY_SDIO_OP_FIFO to write multiple bytes to the same address,
+ CY_SDIO_OP_INCR to write multiple bytes to incrementing addresses */
+ uint16_t argument, /* Block/Byte count to write
+ In case of byte mode the count should not exceed the block size
+ or 512, whichever is smaller.
+ In case of Block mode, maximum number of blocks is 511. */
+ uint8_t * data_p, /* Buffer to hold data to be written to card. */
+ CyAsSdioCallback callback /* Callback in case of Asyncronous call. 0 if Synchronous */
+ );
+
+/* Summary
+ This function is used to initialize a SDIO card function.
+
+ Description
+ This function is used to initialize a SDIO card function (1 - 7).
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+*/
+CyAsReturnStatus_t
+CyAsSdioInitFunction(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ uint8_t miscBuf /* Set to CY_SDIO_FORCE_INIT to reinitialize function */
+ );
+
+/* Summary
+ This function is used to get properties of a SDIO card function.
+
+ Description
+ This function is used to get properties of a SDIO card function(1 - 7) into a CyAsSDIOFunc structure.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the media specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO request was made to an invalid function
+*/
+CyAsReturnStatus_t
+CyAsSdioQueryFunction(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ CyAsSDIOFunc* data_p /* Buffer to store function properties */
+ );
+
+/* Summary
+ This function is used to Abort the current IO function.
+
+ Description
+ This function is used to Abort the current IO function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+*/
+CyAsReturnStatus_t
+CyAsSdioAbortFunction(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo /* IO function Number */
+ );
+
+/* Summary
+ This function is used to Disable IO to an SDIO function.
+
+ Description
+ This function is used to Disable IO to an SDIO function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+*/
+CyAsReturnStatus_t
+CyAsSdioDeInitFunction(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo /* IO function Number */
+ );
+
+/* Summary
+ This function is used to Suspend the current IO function.
+
+ Description
+ This function is used to Suspend the current IO function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+*/
+CyAsReturnStatus_t
+CyAsSdioSuspend(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo /* IO function Number */
+ );
+
+/* Summary
+ This function is used to resume a Suspended IO function.
+
+ Description
+ This function is used to resume a Suspended IO function.
+ This function is to be used only for IO to an SDIO card as
+ other media will not respond to the SDIO command set.
+
+ * Valid in Asynchronous Callback: NO
+ * Valid on Antioch device: NO
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_NOT_RUNNING - the storage stack has not been started
+ * CY_AS_ERROR_INVALID_HANDLE - an invalid handle was passed in
+ * CY_AS_ERROR_IN_SUSPEND - the West Bridge device is in suspend mode
+ * CY_AS_ERROR_SUCCESS - the media information was returned
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the stack is not running
+ * CY_AS_ERROR_NO_SUCH_BUS - the bus specified does not exist
+ * CY_AS_ERROR_NO_SUCH_DEVICE - the specified media/device pair does not exist
+ * CY_AS_ERROR_ASYNC_PENDING - an async operation is pending
+ * CY_AS_ERROR_OUT_OF_MEMORY - insufficient memory available
+ * CY_AS_ERROR_INVALID_RESPONSE - an error message was recieved from the firmware
+ * CY_AS_ERROR_MEDIA_ACCESS_FAILURE - there was error in reading from the media
+ * CY_AS_ERROR_INVALID_FUNCTION - An IO attempt was made to an invalid function
+ * CY_AS_ERROR_IO_ABORTED - The IO operation was aborted
+ * CY_AS_ERROR_IO_SUSPENDED - The IO operation was suspended
+ * CY_AS_ERROR_INVALID_REQUEST - An invalid request was passed to the card.
+
+*/
+CyAsReturnStatus_t
+CyAsSdioResume(
+ CyAsDeviceHandle handle, /* Handle to the Westbridge device */
+ CyAsBusNumber_t bus, /* Bus to use */
+ uint32_t device, /* Device number */
+ uint8_t nFunctionNo, /* IO function Number */
+ CyAsOperType op, /* Operation to resume (Read or Write) */
+ uint8_t miscBuf, /* Micellaneous buffer same as for Extended read and Write */
+ uint16_t pendingblockcount, /* Number of pending blocks for IO. Should be less
+ than or equal to the maximum defined for Extended
+ read and write */
+ uint8_t *data_p /* Buffer to continue the Suspended IO operation */
+ );
+
+
+
+/* For supporting deprecated functions */
+#include "cyasstorage_dep.h"
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYASSTORAGE_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasstorage_dep.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,228 @@
+/* Cypress West Bridge API header file (cyanstorage_dep.h)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+/* This header will contain Antioch specific declaration
+ * of the APIs that are deprecated in Astoria SDK. This is
+ * for maintaining backward compatibility
+ */
+#ifndef __INCLUDED_CYANSTORAGE_DEP_H__
+#define __INCLUDED_CYANSTORAGE_DEP_H__
+
+#ifndef __doxygen__
+
+typedef void (*CyAsStorageCallback_dep)(
+ CyAsDeviceHandle handle, /* Handle to the device completing the storage operation */
+ CyAsMediaType type, /* The media type completing the operation */
+ uint32_t device, /* The device completing the operation */
+ uint32_t unit, /* The unit completing the operation */
+ uint32_t block_number, /* The block number of the completed operation */
+ CyAsOperType op, /* The type of operation */
+ CyAsReturnStatus_t status /* The error status */
+ ) ;
+
+typedef void (*CyAsStorageEventCallback_dep)(
+ CyAsDeviceHandle handle, /* Handle to the device sending the event notification */
+ CyAsMediaType type, /* The media type */
+ CyAsStorageEvent evtype, /* The event type */
+ void *evdata /* Event related data */
+ ) ;
+
+typedef struct CyAsStorageQueryDeviceData_dep
+{
+ CyAsMediaType type ; /* The type of media to query */
+ uint32_t device ; /* The logical device number to query */
+ CyAsDeviceDesc desc_p ; /* The return value for the device descriptor */
+} CyAsStorageQueryDeviceData_dep ;
+
+typedef struct CyAsStorageQueryUnitData_dep
+{
+ CyAsMediaType type ; /* The type of media to query */
+ uint32_t device ; /* The logical device number to query */
+ uint32_t unit ; /* The unit to query on the device */
+ CyAsUnitDesc desc_p ; /* The return value for the unit descriptor */
+} CyAsStorageQueryUnitData_dep ;
+
+
+/************ FUNCTIONS *********************/
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageRegisterCallback_dep(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsStorageEventCallback_dep callback /* The callback function to call for async storage events */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageClaim_dep(CyAsDeviceHandle handle,
+ CyAsMediaType type
+ );
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageClaim_dep_EX(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType* type, /* The type of media to claim */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageRelease_dep(CyAsDeviceHandle handle,
+ CyAsMediaType type
+ );
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageRelease_dep_EX(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType* type, /* The type of media to release */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryDevice_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ CyAsDeviceDesc *desc_p
+ );
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryDevice_dep_EX(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsStorageQueryDeviceData_dep* data, /* Parameters and return value for the query call */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryUnit_dep(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType type, /* The type of media to query */
+ uint32_t device, /* The logical device number to query */
+ uint32_t unit, /* The unit to query on the device */
+ CyAsUnitDesc * unit_p /* The return value for the unit descriptor */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageQueryUnit_dep_EX(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsStorageQueryUnitData_dep* data_p, /* Parameters and return value for the query call */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageDeviceControl_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyBool card_detect_en, /* Enable/disable control for card detection */
+ CyBool write_prot_en, /* Enable/disable control for write protect handling */
+ CyAsFunctionCallback cb, /* Callback to be called when the operation is complete */
+ uint32_t client /* Client data to be passed to the callback */
+ ) ;
+
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageRead_dep(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType type, /* The type of media to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer where data will be placed */
+ uint16_t num_blocks /* The number of blocks to be read */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageReadAsync_dep(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType type, /* The type of media to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer where data will be placed */
+ uint16_t num_blocks, /* The number of blocks to be read */
+ CyAsStorageCallback_dep callback/* The function to call when the read is complete
+ or an error occurs */
+ ) ;
+EXTERN CyAsReturnStatus_t
+CyAsStorageWrite_dep(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType type, /* The type of media to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer containing the data to be written */
+ uint16_t num_blocks /* The number of blocks to be written */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageWriteAsync_dep(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsMediaType type, /* The type of media to access */
+ uint32_t device, /* The device to access */
+ uint32_t unit, /* The unit to access */
+ uint32_t block, /* The first block to access */
+ void * data_p, /* The buffer where the data to be written is stored */
+ uint16_t num_blocks, /* The number of blocks to be written */
+ CyAsStorageCallback_dep callback /* The function to call when the write is complete
+ or an error occurs */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageSDRegisterRead_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType type,
+ uint8_t device,
+ CyAsSDCardRegType regType,
+ uint8_t readLen,
+ uint8_t *data_p
+ );
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageSDRegisterRead_dep_EX(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device. */
+ CyAsMediaType type, /* The type of media to query */
+ uint8_t device, /* The device to query */
+ CyAsSDCardRegType regType, /* The type of register to read. */
+ CyAsStorageSDRegReadData *data_p, /* Output data buffer and length. */
+ CyAsFunctionCallback cb, /* Callback function to call when done. */
+ uint32_t client /* Call context to send to the cb function. */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageCreatePPartition_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ uint32_t size,
+ CyAsFunctionCallback cb,
+ uint32_t client) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsStorageRemovePPartition_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ CyAsFunctionCallback cb,
+ uint32_t client) ;
+
+#endif /*__doxygen*/
+
+#endif /*__INCLUDED_CYANSTORAGE_DEP_H__*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyastfw_sd_mmc_rel_nopport.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1091 @@
+#define CYASTFW_SD_MMC_REL_NOPPORT_SIZE 17314
+union {
+ uint8_t fw_image[CYASTFW_SD_MMC_REL_NOPPORT_SIZE] ;
+ uint16_t dummy_for_word_alignment ;
+} cyastfw_sd_mmc_rel_nopport_array = {
+ {
+ 0x02, 0x11, 0xe5, 0x02, 0x3c, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x3d, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x42, 0xa9, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x20, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3a, 0xa4, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e,
+ 0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08,
+ 0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83,
+ 0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08,
+ 0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa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fc, 0x08, 0xe6, 0xfd, 0x08, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x22, 0xe2, 0xfc, 0x08,
+ 0xe2, 0xfd, 0x08, 0xe2, 0xfe, 0x08, 0xe2, 0xff, 0x22, 0xe4, 0x93, 0xfc, 0x74, 0x01, 0x93, 0xfd,
+ 0x74, 0x02, 0x93, 0xfe, 0x74, 0x03, 0x93, 0xff, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xf9, 0x08, 0xe6,
+ 0xfa, 0x08, 0xe6, 0xcb, 0xf8, 0x22, 0xe2, 0xfb, 0x08, 0xe2, 0xf9, 0x08, 0xe2, 0xfa, 0x08, 0xe2,
+ 0xcb, 0xf8, 0x22, 0xe4, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf9, 0x74, 0x02, 0x93, 0xfa, 0x74, 0x03,
+ 0x93, 0xfb, 0x22, 0xec, 0xf6, 0x08, 0xed, 0xf6, 0x08, 0xee, 0xf6, 0x08, 0xef, 0xf6, 0x22, 0xec,
+ 0xf2, 0x08, 0xed, 0xf2, 0x08, 0xee, 0xf2, 0x08, 0xef, 0xf2, 0x22, 0xc1, 0x23, 0x41, 0x00, 0x60,
+ 0x00, 0x41, 0x00, 0x61, 0x00, 0x42, 0x00, 0xa9, 0x00, 0x40, 0x41, 0x00, 0xab, 0x00, 0x41, 0x00,
+ 0xac, 0x7c, 0x01, 0x4f, 0x00, 0x41, 0x00, 0xae, 0x00, 0xc1, 0x21, 0x02, 0x50, 0x00, 0x00, 0x41,
+ 0x00, 0xaf, 0x00, 0x42, 0x00, 0xb1, 0x00, 0x00, 0xc1, 0x22, 0x02, 0x52, 0x00, 0xb3, 0x41, 0x00,
+ 0xb0, 0x00, 0xc1, 0x24, 0x41, 0x00, 0xad, 0x00, 0x44, 0x04, 0x96, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x04, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x04, 0x87, 0x03, 0x90, 0x4a, 0x04, 0x89, 0x03,
+ 0x40, 0x03, 0x48, 0x03, 0x50, 0x03, 0x90, 0x00, 0x00, 0x48, 0x04, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x83, 0x00, 0x41, 0x04, 0x84, 0x00, 0x41, 0x04, 0x85, 0x00,
+ 0x41, 0x04, 0x86, 0x00, 0x02, 0x20, 0x00, 0x00, 0x41, 0x04, 0xa5, 0x00, 0xc1, 0x26, 0xc1, 0x28,
+ 0x41, 0x04, 0x30, 0x16, 0x41, 0x04, 0x31, 0x0a, 0x01, 0x14, 0x01, 0x01, 0x15, 0x01, 0x02, 0x16,
+ 0x00, 0x68, 0x41, 0x04, 0x9f, 0x00, 0x41, 0x04, 0xa0, 0x00, 0x41, 0x04, 0xa1, 0x00, 0x41, 0x04,
+ 0xa4, 0x01, 0x42, 0x00, 0xb7, 0x00, 0x00, 0xc1, 0x1e, 0x00, 0x74, 0x00, 0xc0, 0xe0, 0xc0, 0xe0,
+ 0x32, 0x00, 0x00, 0x00, 0x0b, 0x08, 0x03, 0x05, 0x24, 0x00, 0x02, 0x3a, 0x00, 0x03, 0x03, 0x00,
+ 0x03, 0x11, 0x00, 0x03, 0x12, 0x00, 0x05, 0x20, 0x00, 0x05, 0x21, 0x00, 0x05, 0x26, 0x00, 0x06,
+ 0x28, 0x00, 0x05, 0x04, 0x02, 0x06, 0x29, 0x00, 0x07, 0x27, 0x00, 0x05, 0x39, 0x00, 0xff, 0xff,
+ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0x4a, 0x00, 0x00, 0xe3, 0x4b, 0x00, 0x00, 0xe3,
+ 0x4c, 0x00, 0x00, 0xe3, 0x4d, 0xe3, 0x4e, 0xe3, 0x4f, 0xe3, 0x38, 0xe3, 0x39, 0xe3, 0x3a, 0xe3,
+ 0x3b, 0xe3, 0x18, 0xe3, 0x19, 0xe3, 0x1a, 0xe3, 0x1b, 0xe3, 0x12, 0xe3, 0x13, 0xe3, 0x14, 0xe3,
+ 0x15, 0x12, 0x38, 0x8b, 0x78, 0x80, 0xe2, 0x44, 0x04, 0xf2, 0xe2, 0x54, 0xf7, 0xf2, 0x22, 0xe0,
+ 0xfe, 0xa3, 0xe0, 0x24, 0x02, 0xf9, 0xe4, 0x3e, 0x22, 0x90, 0xe6, 0x48, 0x74, 0x88, 0xf0, 0x22,
+ 0x02, 0x20, 0x08, 0x00, 0x02, 0x30, 0x47, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x30, 0x08, 0x00,
+ 0x02, 0x20, 0xd5, 0x00, 0x02, 0x20, 0x4c, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00,
+ 0x02, 0x30, 0x4d, 0x00, 0x02, 0x30, 0x51, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x37, 0x8f, 0x00,
+ 0x02, 0x37, 0xf4, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00,
+ 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00,
+ 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00,
+ 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00,
+ 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00, 0x02, 0x27, 0xf8, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0xe4, 0xfe, 0x7d, 0x02, 0xef, 0x5d, 0x90, 0x00,
+ 0xb9, 0xf0, 0x90, 0xe6, 0x12, 0x70, 0x0b, 0x74, 0x22, 0xf0, 0x90, 0xe6, 0x14, 0x74, 0x62, 0xf0,
+ 0x80, 0x09, 0x74, 0xa2, 0xf0, 0x90, 0xe6, 0x14, 0x74, 0xe2, 0xf0, 0x90, 0x00, 0xb9, 0xe0, 0x30,
+ 0xe1, 0x01, 0x0e, 0x30, 0x19, 0x04, 0x30, 0x1a, 0x01, 0x0e, 0xee, 0x14, 0xff, 0x22, 0xff, 0xea,
+ 0x3c, 0xfe, 0xad, 0x07, 0xfc, 0xf0, 0xa3, 0xed, 0xf0, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0x22, 0x22,
+ 0x00, 0x00, 0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0xb4, 0x04, 0x17, 0x47, 0x02, 0x00,
+ 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00,
+ 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x02,
+ 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x86, 0x02, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00,
+ 0x00, 0x02, 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x86,
+ 0x02, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x1a, 0x03, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00,
+ 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x30, 0x00,
+ 0x31, 0x00, 0x10, 0x03, 0x43, 0x00, 0x79, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00,
+ 0x73, 0x00, 0x18, 0x03, 0x57, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x20, 0x00, 0x42, 0x00,
+ 0x72, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe4, 0x78,
+ 0x8a, 0xf2, 0x78, 0xb5, 0xf2, 0x71, 0x3e, 0x75, 0x4f, 0x01, 0x75, 0x52, 0x00, 0x75, 0x53, 0xb3,
+ 0xe5, 0x53, 0x30, 0xe0, 0x08, 0x05, 0x53, 0xe5, 0x53, 0x70, 0x02, 0x05, 0x52, 0x22, 0x34, 0x01,
+ 0xfe, 0xf0, 0xa3, 0xef, 0xf0, 0x22, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0,
+ 0xa3, 0xf0, 0x22, 0xe4, 0x78, 0x5c, 0xf2, 0x78, 0x5e, 0xf2, 0x22, 0x90, 0xe2, 0xa4, 0xf0, 0xe4,
+ 0x90, 0xe2, 0xa6, 0xf0, 0x22, 0xf0, 0xd1, 0x03, 0x90, 0xe6, 0x04, 0x74, 0x08, 0xf0, 0x22, 0x32,
+ 0x01, 0x00, 0x00, 0x24, 0x00, 0x80, 0x00, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x43, 0x79, 0x70, 0x72,
+ 0x65, 0x73, 0x73, 0x00, 0x41, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x20, 0x4e, 0x41, 0x4e, 0x44,
+ 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x80,
+ 0x00, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x43, 0x79, 0x70, 0x72, 0x65, 0x73, 0x73, 0x00, 0x41, 0x73,
+ 0x74, 0x6f, 0x72, 0x69, 0x61, 0x20, 0x53, 0x44, 0x20, 0x43, 0x61, 0x72, 0x64, 0x00, 0x30, 0x30,
+ 0x30, 0x31, 0x00, 0x00, 0x90, 0xe6, 0x82, 0xe0, 0x44, 0xc0, 0xf0, 0x43, 0x87, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82,
+ 0x45, 0x83, 0x70, 0xf9, 0x22, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xff, 0xe1, 0x02, 0x11, 0x6d, 0x74,
+ 0x00, 0xf5, 0x86, 0x90, 0xff, 0x41, 0x02, 0x11, 0x6d, 0xc0, 0x00, 0xc0, 0xe0, 0x15, 0x61, 0xa8,
+ 0x61, 0xe5, 0x9a, 0xf6, 0x15, 0x61, 0xa8, 0x61, 0xe5, 0x9b, 0xf6, 0xd0, 0xe0, 0xd0, 0x00, 0x22,
+ 0xc0, 0x00, 0xc0, 0xe0, 0x15, 0x61, 0xa8, 0x61, 0xe5, 0x9d, 0xf6, 0x15, 0x61, 0xa8, 0x61, 0xe5,
+ 0x9e, 0xf6, 0xd0, 0xe0, 0xd0, 0x00, 0x22, 0xc0, 0x00, 0xc0, 0xe0, 0xa8, 0x61, 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 0xde, 0xe7, 0x80, 0xbe, 0xe4, 0xf5, 0x27, 0xef, 0x70, 0x11, 0xe5, 0x4f, 0xc3, 0x94, 0x04, 0x40,
+ 0x51, 0x12, 0x38, 0x8b, 0x75, 0x4f, 0x03, 0x11, 0xe3, 0x80, 0x47, 0xe5, 0x4f, 0x24, 0xfd, 0x60,
+ 0x0c, 0x24, 0xfe, 0x60, 0x03, 0x04, 0x70, 0x37, 0x75, 0x27, 0x10, 0x80, 0x35, 0x90, 0xe2, 0xa6,
+ 0x74, 0x30, 0xf0, 0x74, 0x10, 0x11, 0xeb, 0x78, 0x5d, 0x74, 0xff, 0xf2, 0x53, 0x91, 0xef, 0x78,
+ 0x5c, 0x74, 0x3b, 0xf2, 0x12, 0x0e, 0xe1, 0x75, 0x4f, 0x04, 0x90, 0x00, 0xb9, 0xe0, 0x60, 0x03,
+ 0x12, 0x33, 0x08, 0x7f, 0x02, 0x12, 0x21, 0xb6, 0x78, 0x5e, 0x74, 0x1b, 0xf2, 0x80, 0x03, 0x75,
+ 0x27, 0x1b, 0xaf, 0x27, 0x22, 0x8d, 0x27, 0xac, 0x03, 0xe4, 0xfe, 0x12, 0x0f, 0xb8, 0xae, 0x07,
+ 0x90, 0x00, 0xb9, 0xe0, 0x90, 0x00, 0xac, 0x60, 0x1e, 0xe0, 0x44, 0x80, 0xff, 0xf0, 0xec, 0x54,
+ 0x1f, 0x25, 0xe0, 0x25, 0xe0, 0xfd, 0xef, 0x54, 0x83, 0x4d, 0xff, 0xf0, 0xee, 0x54, 0x03, 0xfe,
+ 0xef, 0x54, 0xfc, 0x4e, 0xf0, 0x80, 0x03, 0x74, 0x7c, 0xf0, 0x90, 0x00, 0x74, 0x12, 0x0e, 0xef,
+ 0x89, 0x82, 0xf5, 0x83, 0xec, 0xf0, 0x90, 0x00, 0x76, 0x12, 0x0e, 0xef, 0xf5, 0x83, 0x89, 0x82,
+ 0xec, 0xf0, 0xe5, 0x27, 0x70, 0x0b, 0x75, 0x4f, 0x03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x74, 0xff, 0xf0, 0x90, 0x00, 0xe4, 0xe0, 0xff, 0xef, 0x60, 0x04, 0x00, 0x1f, 0x80, 0xf9, 0x22,
+ 0x12, 0x43, 0x7f, 0xe4, 0xf5, 0x54, 0x12, 0x39, 0x81, 0xef, 0x60, 0x05, 0x75, 0x54, 0x0c, 0xe1,
+ 0x34, 0x12, 0x27, 0x84, 0x12, 0x2a, 0x15, 0x12, 0x37, 0x61, 0x4e, 0x70, 0x02, 0xe1, 0x34, 0x12,
+ 0x37, 0x7c, 0xe5, 0x34, 0x60, 0x06, 0x20, 0x24, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x15, 0xe4,
+ 0x30, 0x15, 0x0d, 0x12, 0x40, 0x94, 0x90, 0xe2, 0x34, 0x11, 0xf5, 0x12, 0x42, 0xfe, 0x80, 0x0a,
+ 0x12, 0x40, 0x85, 0x90, 0xe2, 0x1f, 0xe0, 0x44, 0x80, 0xf0, 0xb1, 0xf5, 0x12, 0x27, 0x84, 0x12,
+ 0x32, 0x04, 0x30, 0x15, 0x7d, 0x11, 0xf8, 0x12, 0x3f, 0xd2, 0x90, 0x04, 0x2a, 0xe0, 0x70, 0x02,
+ 0xa3, 0xe0, 0x70, 0x02, 0xe1, 0x05, 0xe5, 0x54, 0x60, 0x02, 0xe1, 0x05, 0x12, 0x2f, 0xed, 0x90,
+ 0xe2, 0x42, 0x74, 0x25, 0xf0, 0x90, 0xe2, 0x41, 0xe0, 0x70, 0x03, 0x00, 0x80, 0xf7, 0x7b, 0x04,
+ 0x7d, 0x26, 0x7f, 0x44, 0xb1, 0x89, 0x90, 0x04, 0x39, 0xe0, 0x60, 0x0b, 0xe5, 0x58, 0x24, 0x01,
+ 0xf5, 0x58, 0xe4, 0x35, 0x57, 0x80, 0x09, 0xe4, 0x25, 0x58, 0xf5, 0x58, 0xe5, 0x57, 0x34, 0x02,
+ 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 0xe4, 0x35, 0x55, 0xf5, 0x55, 0x12, 0x43, 0x5c, 0x12,
+ 0x27, 0x96, 0x7f, 0x10, 0x12, 0x3e, 0xfe, 0x12, 0x33, 0x08, 0x12, 0x28, 0x08, 0xef, 0x60, 0x07,
+ 0xe5, 0x54, 0x70, 0x03, 0x75, 0x54, 0x99, 0x12, 0x0e, 0xf9, 0x00, 0xf0, 0x00, 0x11, 0xf8, 0x00,
+ 0x80, 0x88, 0xc2, 0x29, 0x90, 0x00, 0xe2, 0x12, 0x43, 0x0b, 0x7b, 0x04, 0x7d, 0x26, 0x7f, 0x48,
+ 0x12, 0x27, 0xe8, 0x7f, 0x10, 0x12, 0x3e, 0xfe, 0xb1, 0xed, 0x90, 0xe2, 0x21, 0x74, 0x01, 0xf0,
+ 0xd1, 0x03, 0x12, 0x27, 0x96, 0xc2, 0x29, 0x90, 0xe2, 0x1f, 0xe0, 0x54, 0x7f, 0xf0, 0x00, 0xe4,
+ 0x90, 0xe2, 0x33, 0xf0, 0x00, 0x90, 0xe2, 0x31, 0x74, 0xff, 0xf0, 0x00, 0x90, 0x00, 0xe8, 0xe0,
+ 0xff, 0x60, 0x04, 0x90, 0xe2, 0x34, 0xf0, 0x00, 0xe5, 0x54, 0x60, 0x08, 0xb4, 0x99, 0x02, 0xff,
+ 0x22, 0x75, 0x54, 0x37, 0xe5, 0x34, 0x60, 0x1b, 0x85, 0x54, 0x5f, 0xe5, 0x54, 0x60, 0x07, 0xc2,
+ 0x16, 0x12, 0x2a, 0x42, 0x80, 0x0a, 0x90, 0x04, 0x96, 0x12, 0x0c, 0xe5, 0x00, 0x00, 0x00, 0x00,
+ 0x12, 0x2a, 0x3b, 0xaf, 0x54, 0x22, 0xc2, 0x20, 0xef, 0x60, 0x22, 0x12, 0x22, 0x17, 0x12, 0x42,
+ 0xd0, 0x30, 0x24, 0x0e, 0xe4, 0x90, 0xe6, 0x1b, 0xf0, 0xd2, 0x20, 0x74, 0xe0, 0x12, 0x37, 0x4b,
+ 0xf1, 0x95, 0xf1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, 0x70, 0x76, 0x90, 0x00, 0xac, 0xe0, 0x20, 0xe7, 0x02, 0x61, 0xdf, 0x54, 0x7c, 0x13, 0x13,
+ 0x54, 0x3f, 0x65, 0x43, 0x60, 0x02, 0x61, 0xdf, 0xef, 0x64, 0x01, 0x60, 0x02, 0x61, 0xdf, 0xd2,
+ 0x17, 0xe5, 0x40, 0x24, 0x02, 0x60, 0x33, 0x14, 0x60, 0x02, 0x61, 0xdf, 0xe5, 0x3f, 0x64, 0x21,
+ 0x60, 0x02, 0x61, 0xdf, 0xe5, 0x41, 0x60, 0x02, 0x61, 0xdf, 0x78, 0xbe, 0xe2, 0x60, 0x02, 0x61,
+ 0xdf, 0x53, 0x91, 0xef, 0x75, 0xa1, 0x01, 0x90, 0x00, 0xab, 0xf0, 0x7e, 0x00, 0x7f, 0x7a, 0x7b,
+ 0x1f, 0xfa, 0xfd, 0x12, 0x36, 0x60, 0xc2, 0x00, 0x61, 0x9b, 0xe5, 0x3f, 0x64, 0xa1, 0x60, 0x02,
+ 0x61, 0xdf, 0xe5, 0x41, 0x60, 0x02, 0x61, 0xdf, 0x78, 0xbe, 0xe2, 0x64, 0x01, 0x60, 0x02, 0x61,
+ 0xdf, 0x90, 0x00, 0xac, 0xe0, 0x54, 0x03, 0x41, 0xe6, 0x90, 0x00, 0xae, 0xe0, 0x64, 0x02, 0x60,
+ 0x02, 0x41, 0x37, 0xe5, 0x40, 0xb4, 0x09, 0x04, 0xf1, 0x96, 0x80, 0x14, 0xe5, 0x40, 0x70, 0x10,
+ 0xe5, 0x3f, 0xb4, 0x82, 0x0b, 0xd2, 0x17, 0xaf, 0x43, 0x11, 0x42, 0xef, 0x60, 0x02, 0x61, 0xdf,
+ 0x90, 0x00, 0xaf, 0xe0, 0x60, 0x02, 0x41, 0x2e, 0x90, 0x00, 0xac, 0xe0, 0x30, 0xe7, 0x38, 0xe5,
+ 0x40, 0x64, 0x06, 0x70, 0x2b, 0xe5, 0x42, 0x64, 0x02, 0x60, 0x06, 0xe5, 0x42, 0x64, 0x07, 0x70,
+ 0x1f, 0xd2, 0x21, 0x90, 0x00, 0x76, 0x91, 0xcd, 0x30, 0x24, 0x06, 0xe5, 0x42, 0x64, 0x02, 0x60,
+ 0x08, 0x20, 0x24, 0x13, 0xe5, 0x42, 0xb4, 0x07, 0x0e, 0x90, 0x00, 0x74, 0x91, 0xcd, 0x80, 0x07,
+ 0xe5, 0x40, 0xb4, 0x0b, 0x02, 0x91, 0xe1, 0xe5, 0x40, 0x64, 0x03, 0x70, 0x32, 0xe5, 0x3f, 0xb4,
+ 0x02, 0x15, 0xe5, 0x41, 0x70, 0x11, 0xe5, 0x43, 0x64, 0x02, 0x60, 0x05, 0xe5, 0x43, 0xb4, 0x86,
+ 0x06, 0xd2, 0x17, 0xaf, 0x43, 0x91, 0x5d, 0xe5, 0x3f, 0x70, 0x14, 0xe5, 0x41, 0xb4, 0x01, 0x08,
+ 0x90, 0x00, 0xb0, 0x74, 0x03, 0xf0, 0x80, 0x07, 0xe5, 0x41, 0xb4, 0x02, 0x02, 0xd2, 0x17, 0xe5,
+ 0x40, 0x64, 0x01, 0x70, 0x29, 0xe5, 0x3f, 0xb4, 0x02, 0x15, 0xe5, 0x41, 0x70, 0x11, 0xe5, 0x43,
+ 0x64, 0x02, 0x60, 0x05, 0xe5, 0x43, 0xb4, 0x86, 0x06, 0xd2, 0x17, 0xaf, 0x43, 0x71, 0xe7, 0xe5,
+ 0x3f, 0x70, 0x0b, 0xe5, 0x41, 0xb4, 0x01, 0x06, 0x90, 0x00, 0xb0, 0x74, 0x01, 0xf0, 0x30, 0x17,
+ 0x02, 0x61, 0x9b, 0xd2, 0x18, 0x61, 0x9b, 0x90, 0x00, 0xaf, 0xe0, 0x60, 0x02, 0x61, 0xdf, 0xd2,
+ 0x17, 0xe5, 0x40, 0x12, 0x0d, 0x2b, 0x1b, 0x10, 0x00, 0x1b, 0x39, 0x01, 0x1b, 0x70, 0x03, 0x1a,
+ 0x62, 0x06, 0x1b, 0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be, 0xe2, 0xa3, 0xf0, 0x90, 0x00, 0xb1, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x02, 0xd2,
+ 0x23, 0xd2, 0x22, 0xb1, 0xdf, 0x30, 0x17, 0x0e, 0x78, 0xa0, 0xe2, 0x44, 0x80, 0xf2, 0x22, 0x90,
+ 0xe6, 0xa0, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0xad, 0x07, 0xed, 0x54, 0x0f, 0xfc, 0xed, 0x60, 0x50,
+ 0x24, 0xfe, 0x60, 0x18, 0x24, 0x81, 0x60, 0x0e, 0x24, 0xfb, 0x60, 0x20, 0x24, 0x85, 0x70, 0x27,
+ 0xe4, 0x78, 0xa1, 0xf2, 0x80, 0x3a, 0xe4, 0x78, 0xa2, 0xf2, 0x80, 0x34, 0x90, 0x00, 0xab, 0xe0,
+ 0x70, 0x2e, 0x78, 0xa3, 0xf2, 0x7f, 0x02, 0x12, 0x21, 0xb6, 0x80, 0x24, 0x90, 0x00, 0xab, 0xe0,
+ 0x70, 0x1e, 0x78, 0xa5, 0xf2, 0x80, 0x19, 0xec, 0x11, 0x36, 0xfe, 0x74, 0x01, 0x93, 0x4e, 0x70,
+ 0x03, 0x7f, 0x15, 0x22, 0x75, 0xf0, 0x02, 0xec, 0x11, 0x39, 0x91, 0xc4, 0xe0, 0x54, 0xfd, 0xf0,
+ 0xed, 0x30, 0xe7, 0x03, 0x43, 0x04, 0x10, 0x91, 0xd6, 0xe0, 0x30, 0xe7, 0x0d, 0xed, 0x54, 0x0f,
+ 0xfc, 0xed, 0x20, 0xe7, 0x03, 0x43, 0x04, 0x10, 0x91, 0xd6, 0x7f, 0x00, 0x22, 0xef, 0x54, 0x0f,
+ 0xfe, 0xef, 0x14, 0x60, 0x1a, 0x14, 0x60, 0x1f, 0x24, 0x82, 0x60, 0x0b, 0x14, 0x60, 0x14, 0x24,
+ 0xfb, 0x60, 0x18, 0x24, 0x86, 0x70, 0x1b, 0x78, 0xa0, 0xe2,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0xe0, 0x09, 0x90, 0xe6, 0x49, 0x74, 0x02, 0xf0, 0x00, 0x80, 0xf2, 0x90, 0xe6, 0x18,
+ 0x74, 0x30, 0xf0, 0x00, 0xe4, 0x90, 0xe6, 0x04, 0xf0, 0x22, 0xd3, 0xed, 0x94, 0x01, 0xec, 0x94,
+ 0x00, 0x40, 0x1c, 0x90, 0xe6, 0xa4, 0xe0, 0x20, 0xe3, 0x04, 0x30, 0x1f, 0xf6, 0x22, 0x71, 0x29,
+ 0x12, 0x16, 0x03, 0x71, 0x29, 0x12, 0x16, 0x03, 0x90, 0xe6, 0x19, 0x74, 0x30, 0xf0, 0x22, 0x90,
+ 0xe6, 0xa4, 0xe0, 0x30, 0xe2, 0x04, 0x30, 0x1f, 0xf6, 0x22, 0x90, 0xe6, 0x94, 0xe0, 0xfe, 0xa3,
+ 0xe0, 0xfd, 0xed, 0xc3, 0x9b, 0xee, 0x9a, 0x40, 0xf1, 0x90, 0xe6, 0x49, 0x74, 0x04, 0xf0, 0x22,
+ 0x12, 0x43, 0x7f, 0x75, 0x38, 0x64, 0xe4, 0xf5, 0x39, 0xf5, 0x54, 0xe5, 0x34, 0x60, 0x03, 0x12,
+ 0x42, 0x7f, 0x90, 0x04, 0x32, 0xe0, 0x54, 0x03, 0x7f, 0x00, 0x70, 0x02, 0x7f, 0x01, 0xef, 0x70,
+ 0x0a, 0xb1, 0x1a, 0x74, 0x0d, 0xf0, 0x75, 0x54, 0x38, 0x81, 0xee, 0xf1, 0x84, 0x12, 0x39, 0x81,
+ 0xef, 0x60, 0x05, 0x75, 0x54, 0x0c, 0x81, 0xee, 0xf1, 0x84, 0x12, 0x2a, 0x15, 0x12, 0x37, 0x61,
+ 0x4e, 0x70, 0x02, 0x81, 0xee, 0xe4, 0x90, 0xe2, 0x34, 0xf0, 0xe5, 0x34, 0x70, 0x02, 0x81, 0x4a,
+ 0x30, 0x24, 0x02, 0x81, 0x4a, 0xf1, 0x84, 0x12, 0x32, 0x04, 0xe4, 0x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 0x1b, 0x26, 0xd8, 0x1e, 0x26, 0x14, 0x23, 0x26, 0x14, 0x25, 0x25, 0xcb, 0x28, 0x25, 0xe0,
+ 0x2a, 0x26, 0x6c, 0x2f, 0x27, 0x1f, 0xc1, 0x00, 0x00, 0x27, 0x25, 0xaf, 0x2a, 0x12, 0x39, 0x4a,
+ 0x50, 0x02, 0xe1, 0x40, 0x30, 0x13, 0x05, 0x20, 0x11, 0x02, 0xe1, 0x40, 0xd2, 0x14, 0x80, 0x13,
+ 0xaf, 0x2a, 0x12, 0x39, 0x4a, 0x50, 0x02, 0xe1, 0x40, 0x30, 0x13, 0x05, 0x30, 0x11, 0x02, 0xe1,
+ 0x40, 0xc2, 0x14, 0x75, 0x2f, 0x01, 0x75, 0x30, 0x00, 0x75, 0x31, 0x8b, 0xaf, 0x29, 0x12, 0x28,
+ 0x97, 0x8f, 0x28, 0x22, 0x20, 0x13, 0x02, 0xe1, 0x40, 0x12, 0x43, 0x88, 0x12, 0x30, 0xca, 0x8f,
+ 0x28, 0x7f, 0x00, 0x22, 0xe5, 0x27, 0x7f, 0x08, 0xb4, 0x23, 0x02, 0x7f, 0x0c, 0x8f, 0x2c, 0x20,
+ 0x13, 0x02, 0xe1, 0x40, 0xad, 0x27, 0xaf, 0x29, 0x12, 0x36, 0xb4, 0x8f, 0x28, 0xe5, 0x28, 0x60,
+ 0x0a, 0x74, 0x93, 0x25, 0x26, 0xb1, 0x20, 0x74, 0x03, 0xe1, 0x0a, 0xaf, 0x2c, 0x80, 0x7c, 0x30,
+ 0x13, 0x02, 0xe1, 0x40, 0xaf, 0x29, 0x12, 0x37, 0xe9, 0x8f, 0x28, 0xe5, 0x2b, 0xb4, 0x0a, 0x0c,
+ 0x74, 0x93, 0x25, 0x26, 0xb1, 0x20, 0xe5, 0x2b, 0xf0, 0x7f, 0x84, 0x22, 0xe5, 0x28, 0x60, 0x09,
+ 0x74, 0x93, 0x25, 0x26, 0xb1, 0x20, 0x74, 0x03, 0xf0, 0xaf, 0x28, 0x22, 0x7f, 0x00, 0x22, 0xe5,
+ 0x2b, 0x75, 0xf0, 0x03, 0xa4, 0x24, 0x81, 0xf5, 0x82, 0xe4, 0x34, 0x0e, 0xaf, 0x82, 0xf5, 0x2c,
+ 0x8f, 0x2d, 0x20, 0x13, 0x02, 0xe1, 0x40, 0x12, 0x36, 0x36, 0x7b, 0x12, 0x12, 0x37, 0x73, 0x12,
+ 0x36, 0x60, 0xf1, 0xfb, 0x78, 0x7c, 0x74, 0x70, 0xf2, 0xe4, 0xf2, 0x12, 0x43, 0x44, 0x70, 0x02,
+ 0x05, 0x2c, 0x75, 0x9e, 0x07, 0x74, 0x0a, 0xf2, 0x75, 0x9e, 0x0c, 0x12, 0x43, 0x44, 0x70, 0x02,
+ 0x05, 0x2c, 0xf5, 0x82, 0x85, 0x2c, 0x83, 0xe0, 0xf2, 0x7f, 0x12, 0x7e, 0x00, 0x80, 0x5a, 0x12,
+ 0x43, 0x99, 0x12, 0x32, 0x8a, 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x0a, 0x74, 0x93, 0x25, 0x26, 0xb1,
+ 0x20, 0x74, 0x03, 0xf0, 0x22, 0x7f, 0x00, 0x22, 0x12, 0x43, 0x99, 0x12, 0x42, 0x62, 0x8f, 0x28,
+ 0xe5, 0x28, 0x60, 0x09, 0x74, 0x93, 0x25, 0x26, 0xb1, 0x20, 0x74, 0x03, 0xf0, 0xaf, 0x28, 0x22,
+ 0x12, 0x43, 0x88, 0x12, 0x35, 0xd4, 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x19, 0x7f, 0x02, 0xb4, 0x8f,
+ 0x02, 0x7f, 0x0e, 0x74, 0x93, 0x25, 0x26, 0xb1, 0x20, 0xef, 0xf0, 0xa2, 0x12, 0x92, 0x16, 0x12,
+ 0x2a, 0x42, 0xaf, 0x28, 0x22, 0xaf, 0x9e, 0x7e, 0x00, 0x12, 0x38, 0xa8, 0x7f, 0x00, 0x22, 0x12,
+ 0x3a, 0x1b, 0x7f, 0x00, 0x22, 0x74, 0x93, 0x25, 0x26, 0xb1, 0x20, 0x74, 0x07, 0xf0, 0x30, 0x11,
+ 0x09, 0xa2, 0x12, 0x92, 0x16, 0x12, 0x2a, 0x42, 0x80, 0x03, 0x12, 0x39, 0xac, 0x7f, 0x86, 0x22,
+ 0x30, 0x11, 0x09, 0xa2, 0x12, 0x92, 0x16, 0x12, 0x2a, 0x42, 0x80, 0x03, 0x12, 0x39, 0xac, 0x74,
+ 0x93, 0x25, 0x26, 0xb1, 0x20, 0x74, 0x09, 0xf0, 0x7f, 0x98, 0x22, 0x12, 0x33, 0xe1, 0xc2, 0x2a,
+ 0x12, 0x15, 0xed, 0x90, 0xe2, 0x21, 0x74, 0x01, 0xf0, 0x12, 0x2c, 0xaf, 0xf1, 0xed, 0xf1, 0x96,
+ 0xef, 0x60, 0x03, 0xaf, 0x54, 0x22, 0xe4, 0xfb, 0x7d, 0x26, 0x7f, 0x34, 0xf1, 0xe8, 0xef, 0x60,
+ 0x02, 0xaf, 0x54, 0x22, 0xab, 0x35, 0xaa, 0x36, 0xa9, 0x37, 0x22, 0xe4, 0xf5, 0x58, 0xfb, 0x7f,
+ 0x18, 0x7d, 0x26, 0x12, 0x15, 0x89, 0x74, 0xff, 0xf5, 0x3a, 0xf5, 0x3b, 0x90, 0xe2, 0x22, 0xe0,
+ 0x54, 0x66, 0x70, 0x11, 0x12, 0x11, 0x75, 0xe5, 0x3b, 0x15, 0x3b, 0x70, 0x02, 0x15, 0x3a, 0xe5,
+ 0x3b, 0x45, 0x3a, 0x70, 0xe7, 0xe5, 0x54, 0x70, 0x26, 0x90, 0xe2, 0x22, 0xe0, 0x20, 0xe1, 0x0c,
+ 0x75, 0x54, 0x89, 0xb1, 0x1a, 0x74, 0x03, 0xf0, 0xd2, 0x07, 0x80, 0x13, 0x90, 0x04, 0x37, 0xe0,
+ 0x60, 0x0d, 0x90, 0xe2, 0x22, 0xe0, 0x54, 0x60, 0x60, 0x05, 0xb1, 0x17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6, 0x1a, 0x74, 0x40, 0xf0, 0x22, 0x12, 0x36, 0x44, 0x8f, 0x33, 0xe5, 0x33, 0xb4, 0x02,
+ 0x0c, 0xa2, 0x14, 0x92, 0x15, 0x75, 0x34, 0x03, 0x51, 0x26, 0x7f, 0x84, 0x22, 0x20, 0x14, 0x0f,
+ 0x30, 0x1b, 0x0c, 0xa2, 0x14, 0x92, 0x15, 0x75, 0x34, 0x0d, 0x51, 0x26, 0x7f, 0x38, 0x22, 0xe5,
+ 0x33, 0x64, 0x01, 0x70, 0x25, 0x90, 0x00, 0xdd, 0xe0, 0x20, 0xe0, 0x03, 0x12, 0x33, 0xcb, 0x12,
+ 0x33, 0xe1, 0x30, 0x14, 0x0e, 0x7f, 0x01, 0x12, 0x17, 0x56, 0x31, 0xf3, 0x12, 0x16, 0x10, 0x8f,
+ 0x32, 0x80, 0x07, 0x31, 0xf3, 0x12, 0x23, 0x30, 0x8f, 0x32, 0x11, 0x90, 0x20, 0x2a, 0x02, 0xf1,
+ 0x80, 0x30, 0x14, 0x23, 0x90, 0x00, 0xef, 0x12, 0x0c, 0xad, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02,
+ 0xc0, 0x03, 0x51, 0x0f, 0xe4, 0xfc, 0xfd, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0x12,
+ 0x0b, 0xc6, 0x90, 0x00, 0xef, 0x80, 0x21, 0x90, 0x00, 0xeb, 0x12, 0x0c, 0xad, 0xc0, 0x00, 0xc0,
+ 0x01, 0xc0, 0x02, 0xc0, 0x03, 0x51, 0x0f, 0xe4, 0xfc, 0xfd, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01,
+ 0xd0, 0x00, 0x12, 0x0b, 0xc6, 0x90, 0x00, 0xeb, 0x12, 0x0c, 0xd9, 0x30, 0x1e, 0x1e, 0x90, 0x00,
+ 0xf3, 0x12, 0x0c, 0xa1, 0x90, 0x00, 0xeb, 0x31, 0xe4, 0x50,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e, 0x01, 0xe4, 0x90, 0x00, 0xdb, 0xf0, 0xc2, 0x1b,
+ 0x90, 0x00, 0xdc, 0xe0, 0x60, 0x3c, 0xef, 0xd3, 0x94, 0x01, 0x40, 0x08, 0x90, 0x00, 0xdb, 0x74,
+ 0x01, 0xf0, 0xff, 0x22, 0xef, 0x60, 0x10, 0x90, 0x00, 0xb9, 0xe0, 0x30, 0xe0, 0x17, 0x20, 0x19,
+ 0x02, 0x80, 0x12, 0xd2, 0x1b, 0x80, 0x18, 0x90, 0x00, 0xb9, 0xe0, 0x30, 0xe0, 0x04, 0xe4, 0xfe,
+ 0x80, 0x0d, 0x20, 0x19, 0x08, 0x90, 0x00, 0xdb, 0x74, 0x01, 0xf0, 0x80, 0x02, 0xd2, 0x1b, 0xaf,
+ 0x06, 0x22, 0xef, 0x60, 0x03, 0x7f, 0x01, 0x22, 0x90, 0x00, 0xb9, 0xe0, 0x7f, 0x01, 0x30, 0xe0,
+ 0x02, 0x7f, 0x00, 0x22, 0x53, 0x91, 0xdf, 0x32, 0x75, 0x92, 0xe6, 0x90, 0xe6, 0x0d, 0x74, 0x01,
+ 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0xe6, 0x00, 0x74, 0x14, 0xf0, 0xc2, 0x88, 0x43, 0xb8, 0x04,
+ 0xe4, 0xf5, 0x8e, 0x78, 0x82, 0x74, 0x05, 0xf2, 0x75, 0xaf, 0x07, 0x78, 0x04, 0x74, 0x02, 0xf2,
+ 0x00, 0x00, 0x00, 0x78, 0x12, 0x74, 0xa2, 0xf2, 0x00, 0x00, 0x00, 0xe4, 0x78, 0x18, 0xf2, 0x00,
+ 0x00, 0x00, 0x78, 0x04, 0x74, 0x04, 0xf2, 0x00, 0x00, 0x00, 0x78, 0x13, 0x74, 0x22, 0xf2, 0x00,
+ 0x00, 0x00, 0x78, 0x19, 0x74, 0x20, 0xf2, 0x00, 0x00, 0x00, 0x78, 0x04, 0x74, 0x06, 0xf2, 0x00,
+ 0x00, 0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, 0x79, 0x8a, 0xaf, 0x29,
+ 0x22, 0xf5, 0x9a, 0x74, 0x00, 0xf5, 0x9b, 0xe4, 0x22, 0x90, 0x00, 0x8d, 0xe0, 0xfd, 0xaf, 0x29,
+ 0x22, 0x00
+ }
+} ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyastfw_sd_mmc_rel_nopport_Ast121_68.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1101 @@
+#define CYANFW_SIZE 17488
+union {
+ uint8_t fw_image[CYANFW_SIZE] ;
+ uint16_t dummy_for_word_alignment ;
+} CyAnFirmware = {
+ {
+ 0x02, 0x11, 0x54, 0x02, 0x3e, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x3e, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x43, 0x30, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x37, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3d, 0x81, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e,
+ 0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08,
+ 0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83,
+ 0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08,
+ 0xdf, 0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0xef, 0xa3, 0xa3, 0xa3, 0x80,
+ 0xdf, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x08, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x22, 0xe2, 0xfc, 0x08,
+ 0xe2, 0xfd, 0x08, 0xe2, 0xfe, 0x08, 0xe2, 0xff, 0x22, 0xe4, 0x93, 0xfc, 0x74, 0x01, 0x93, 0xfd,
+ 0x74, 0x02, 0x93, 0xfe, 0x74, 0x03, 0x93, 0xff, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xf9, 0x08, 0xe6,
+ 0xfa, 0x08, 0xe6, 0xcb, 0xf8, 0x22, 0xe2, 0xfb, 0x08, 0xe2, 0xf9, 0x08, 0xe2, 0xfa, 0x08, 0xe2,
+ 0xcb, 0xf8, 0x22, 0xe4, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf9, 0x74, 0x02, 0x93, 0xfa, 0x74, 0x03,
+ 0x93, 0xfb, 0x22, 0xec, 0xf6, 0x08, 0xed, 0xf6, 0x08, 0xee, 0xf6, 0x08, 0xef, 0xf6, 0x22, 0xec,
+ 0xf2, 0x08, 0xed, 0xf2, 0x08, 0xee, 0xf2, 0x08, 0xef, 0xf2, 0x22, 0xc1, 0x23, 0x41, 0x00, 0x60,
+ 0x00, 0x41, 0x00, 0x61, 0x00, 0x42, 0x00, 0xa9, 0x00, 0x40, 0x41, 0x00, 0xab, 0x00, 0x41, 0x00,
+ 0xac, 0x7c, 0x01, 0x4f, 0x00, 0x41, 0x00, 0xae, 0x00, 0xc1, 0x21, 0x02, 0x50, 0x00, 0x00, 0x41,
+ 0x00, 0xaf, 0x00, 0x42, 0x00, 0xb1, 0x00, 0x00, 0xc1, 0x22, 0x02, 0x52, 0x00, 0xb3, 0x41, 0x00,
+ 0xb0, 0x00, 0xc1, 0x24, 0x41, 0x00, 0xad, 0x00, 0x44, 0x04, 0x96, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x04, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x04, 0x87, 0x03, 0x90, 0x4a, 0x04, 0x89, 0x03,
+ 0x40, 0x03, 0x48, 0x03, 0x50, 0x03, 0x90, 0x00, 0x00, 0x48, 0x04, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x83, 0x00, 0x41, 0x04, 0x84, 0x00, 0x41, 0x04, 0x85, 0x00,
+ 0x41, 0x04, 0x86, 0x00, 0x02, 0x20, 0x00, 0x00, 0x41, 0x00, 0xff, 0x00, 0xc1, 0x26, 0xc1, 0x28,
+ 0x41, 0x04, 0x30, 0x16, 0x41, 0x04, 0x31, 0x07, 0x01, 0x14, 0x01, 0x01, 0x15, 0x02, 0x02, 0x16,
+ 0x00, 0xc5, 0x41, 0x04, 0x9f, 0x00, 0x41, 0x04, 0xa0, 0x00, 0x41, 0x04, 0xa1, 0x00, 0x41, 0x04,
+ 0xa4, 0x01, 0x42, 0x00, 0xb7, 0x00, 0x00, 0x41, 0x00, 0xfb, 0x00, 0xc1, 0x1e, 0x00, 0x74, 0x00,
+ 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x74,
+ 0x00, 0xf5, 0x86, 0x90, 0xff, 0xe1, 0x02, 0x0e, 0x87, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xff, 0x41,
+ 0x02, 0x0e, 0x87, 0xc0, 0x00, 0xc0, 0xe0, 0x15, 0x61, 0xa8, 0x61, 0xe5, 0x9a, 0xf6, 0x15, 0x61,
+ 0xa8, 0x61, 0xe5, 0x9b, 0xf6, 0xd0, 0xe0, 0xd0, 0x00, 0x22, 0xc0, 0x00, 0xc0, 0xe0, 0x15, 0x61,
+ 0xa8, 0x61, 0xe5, 0x9d, 0xf6, 0x15, 0x61, 0xa8, 0x61, 0xe5, 0x9e, 0xf6, 0xd0, 0xe0, 0xd0, 0x00,
+ 0x22, 0xc0, 0x00, 0xc0, 0xe0, 0xa8, 0x61, 0xe6, 0xf5, 0x9b, 0x05, 0x61, 0xa8, 0x61, 0xe6, 0xf5,
+ 0x9a, 0x05, 0x61, 0xd0, 0xe0, 0xd0, 0x00, 0x22, 0xc0, 0x00, 0xc0, 0xe0, 0xa8, 0x61, 0xe6, 0xf5,
+ 0x9e, 0x05, 0x61, 0xa8, 0x61, 0xe6, 0xf5, 0x9d, 0x05, 0x61, 0xd0, 0xe0, 0xd0, 0x00, 0x22, 0x22,
+ 0x02, 0x37, 0xff, 0x00, 0x02, 0x38, 0xd1, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xfe, 0x00,
+ 0x02, 0x21, 0x2a, 0x00, 0x02, 0x38, 0x43, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00,
+ 0x02, 0x38, 0xce, 0x00, 0x02, 0x39, 0x3c, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x39, 0xbe, 0x00,
+ 0x02, 0x3a, 0x8d, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00,
+ 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00,
+ 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00,
+ 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00,
+ 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00, 0x02, 0x38, 0xcb, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00,
+ 0x02, 0x10, 0xff, 0x00, 0x02, 0x10, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x08, 0x03, 0x05, 0x24,
+ 0x00, 0x02, 0x3a, 0x00, 0x03, 0x03, 0x00, 0x03, 0x11, 0x0c, 0x03, 0x12, 0x00, 0x05, 0x20, 0x00,
+ 0x05, 0x21, 0x00, 0x05, 0x26, 0x00, 0x06, 0x28, 0x00, 0x05, 0x04, 0x02, 0x02, 0x53, 0x02, 0x07,
+ 0x27, 0x00, 0x05, 0x39, 0x00, 0xff, 0xff, 0xff, 0xe3, 0x18, 0xe3, 0x19, 0xe3, 0x1a, 0xe3, 0x1b,
+ 0xe3, 0x12, 0xe3, 0x13, 0xe3, 0x14, 0xe3, 0x15, 0x90, 0xe6, 0x04, 0x74, 0x80, 0xf0, 0x22, 0x22,
+ 0x00, 0x00, 0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0xb4, 0x04, 0x17, 0x47, 0x02, 0x00,
+ 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00,
+ 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x02,
+ 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x86, 0x02, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00,
+ 0x00, 0x02, 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x86,
+ 0x02, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x1a, 0x03, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00,
+ 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x30, 0x00,
+ 0x31, 0x00, 0x10, 0x03, 0x43, 0x00, 0x79, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00,
+ 0x73, 0x00, 0x18, 0x03, 0x57, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x20, 0x00, 0x42, 0x00,
+ 0x72, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xe3, 0x4a, 0x00, 0x00, 0xe3, 0x4b, 0x00, 0x00, 0xe3, 0x4c, 0x00, 0x00,
+ 0xe3, 0x4d, 0xe3, 0x4e, 0xe3, 0x4f, 0xe3, 0x38, 0xe3, 0x39, 0xe3, 0x3a, 0xe3, 0x3b, 0x11, 0xdb,
+ 0x78, 0x80, 0xe2, 0x44, 0x04, 0xf2, 0xe2, 0x54, 0xf7, 0xf2, 0x22, 0x78, 0x80, 0xe2, 0x44, 0x0a,
+ 0xf2, 0x7f, 0x64, 0x7e, 0x00, 0x12, 0x1e, 0xe4, 0x78, 0x5d, 0x74, 0xff, 0xf2, 0x90, 0xe3, 0x5f,
+ 0xf0, 0x78, 0x5f, 0xf2, 0x53, 0x91, 0xef, 0x22, 0x7f, 0x10, 0x12, 0x1e, 0x3d, 0xef, 0x22, 0x32,
+ 0x01, 0x00, 0x00, 0x24, 0x00, 0x80, 0x00, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x43, 0x79, 0x70, 0x72,
+ 0x65, 0x73, 0x73, 0x00, 0x41, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x61, 0x20, 0x4e, 0x41, 0x4e, 0x44,
+ 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x80,
+ 0x00, 0x01, 0x1f, 0x00, 0x00, 0x00, 0x43, 0x79, 0x70, 0x72, 0x65, 0x73, 0x73, 0x00, 0x41, 0x73,
+ 0x74, 0x6f, 0x72, 0x69, 0x61, 0x20, 0x53, 0x44, 0x20, 0x43, 0x61, 0x72, 0x64, 0x00, 0x30, 0x30,
+ 0x30, 0x31, 0x00, 0x00, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x92, 0xe6, 0x75, 0x81, 0x61,
+ 0x02, 0x11, 0x9e, 0x02, 0x28, 0x0d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6,
+ 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c,
+ 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01,
+ 0x46, 0xf6, 0xdf, 0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0d,
+ 0xbb, 0xe4, 0x7e, 0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f,
+ 0xfe, 0xe4, 0x93, 0xa3, 0x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 0x01, 0x0e, 0x30, 0x19, 0x04,
+ 0x30, 0x1a, 0x01, 0x0e, 0xee, 0x14, 0xff, 0x22, 0xef, 0x44, 0x80, 0xfe, 0x12, 0x0f, 0xf8, 0x00,
+ 0xef, 0xf0, 0x00, 0xe4, 0xf0, 0x00, 0x90, 0xe6, 0x49, 0xee, 0xf0, 0x00, 0xf0, 0x30, 0x1d, 0x04,
+ 0x00, 0xf0, 0x00, 0xf0, 0x22, 0x8f, 0x27, 0x90, 0x00, 0xe3, 0x74, 0x01, 0xf0, 0x90, 0x00, 0xc8,
+ 0xe0, 0xf4, 0x55, 0x27, 0x70, 0x03, 0x7f, 0x10, 0x22, 0x7f, 0x01, 0x12, 0x41, 0x44, 0xe5, 0x27,
+ 0x54, 0x1e, 0x60, 0x0e, 0x12, 0x0f, 0xf8, 0x12, 0x0e, 0x99, 0xaf, 0x27, 0x12, 0x1f, 0x7f, 0x12,
+ 0x44, 0x02, 0x20, 0x1d, 0x04, 0x7f, 0x04, 0x51, 0x78, 0x12, 0x0f, 0xf8, 0x00, 0x74, 0x06, 0xf0,
+ 0x00, 0x74, 0x08, 0xf0, 0x00, 0xe4, 0xf0, 0x71, 0xa0, 0x7f, 0x00, 0x22, 0x8d, 0x27, 0xac, 0x03,
+ 0xe4, 0xfe, 0x51, 0x42, 0xae, 0x07, 0x90, 0x00, 0xb9, 0xe0, 0x90, 0x00, 0xac, 0x60, 0x1e, 0xe0,
+ 0x44, 0x80, 0xff, 0xf0, 0xec, 0x54, 0x1f, 0x25, 0xe0, 0x25, 0xe0, 0xfd, 0xef, 0x54, 0x83, 0x4d,
+ 0xff, 0xf0, 0xee, 0x54, 0x03, 0xfe, 0xef, 0x54, 0xfc, 0x4e, 0xf0, 0x80, 0x03, 0x74, 0x7c, 0xf0,
+ 0x90, 0x00, 0x74, 0x71, 0x96, 0x89, 0x82, 0xf5, 0x83, 0xec, 0xf0, 0x90, 0x00, 0x76, 0x71, 0x96,
+ 0xf5, 0x83, 0x89, 0x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, 0x37, 0xc5, 0x4e, 0x70, 0x02, 0x81,
+ 0xdb, 0x12, 0x42, 0x14, 0xe5, 0x34, 0x60, 0x06, 0x20, 0x24, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92,
+ 0x15, 0xe4, 0x30, 0x15, 0x0d, 0x12, 0x3f, 0x8f, 0x90, 0xe2, 0x34, 0xf1, 0x06, 0x12, 0x3b, 0x1b,
+ 0x80, 0x0a, 0x12, 0x3f, 0x80, 0x90, 0xe2, 0x1f, 0xe0, 0x44, 0x80, 0xf0, 0xb1, 0x05, 0x12, 0x2d,
+ 0xa3, 0x12, 0x2e, 0x25, 0x30, 0x15, 0x74, 0xf1, 0x09, 0x12, 0x3f, 0x9b, 0x90, 0x04, 0x2a, 0xe0,
+ 0x70, 0x02, 0xa3, 0xe0, 0x70, 0x02, 0x81, 0xac, 0xe5, 0x54, 0x60, 0x02, 0x81, 0xac, 0x12, 0x43,
+ 0xd9, 0x90, 0xe2, 0x41, 0xe0, 0x70, 0x03, 0x00, 0x80, 0xf7, 0x7b, 0x04, 0x7d, 0x26, 0x7f, 0x44,
+ 0xb1, 0x20, 0x90, 0x04, 0x39, 0xe0, 0x60, 0x0b, 0xe5, 0x58, 0x24, 0x01, 0xf5, 0x58, 0xe4, 0x35,
+ 0x57, 0x80, 0x09, 0xe4, 0x25, 0x58, 0xf5, 0x58, 0xe5, 0x57, 0x34, 0x02, 0xf5, 0x57, 0xe4, 0x35,
+ 0x56, 0xf5, 0x56, 0xe4, 0x35, 0x55, 0xf5, 0x55, 0x12, 0x43, 0xc0, 0xf1, 0x4d, 0x7f, 0x10, 0x12,
+ 0x1e, 0x3d, 0x71, 0xa0, 0x12, 0x36, 0xf6, 0xef, 0x60, 0x07, 0xe5, 0x54, 0x70, 0x03, 0x75, 0x54,
+ 0x99, 0xf1, 0xec, 0x00, 0xf0, 0x00, 0xf1, 0x09, 0x00, 0x80, 0x91, 0xc2, 0x29, 0x90, 0x00, 0xe2,
+ 0x12, 0x3f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22,
+ 0xfe, 0x13, 0x13, 0x54, 0x3f, 0x4f, 0x90, 0x04, 0x34, 0xf0, 0xe0, 0x70, 0x0c, 0x90, 0x04, 0x33,
+ 0xe0, 0x70, 0x06, 0x80, 0xb9, 0x75, 0x54, 0x8b, 0x22, 0x7f, 0x02, 0x12, 0x19, 0x2f, 0xef, 0x60,
+ 0x02, 0xe1, 0x05, 0x12, 0x3e, 0xe1, 0x12, 0x1f, 0xba, 0x60, 0x02, 0xe1, 0x05, 0x90, 0xe2, 0x09,
+ 0xe0, 0x30, 0xe3, 0x08, 0x90, 0x04, 0x3a, 0x74, 0x01, 0xf0, 0xc1, 0xec, 0x12, 0x3f, 0xbb, 0xf1,
+ 0x10, 0xef, 0x60, 0x02, 0xe1, 0x05, 0x12, 0x44, 0x18, 0x54, 0x1f, 0x64, 0x04, 0x60, 0x04, 0x75,
+ 0x54, 0x8a, 0x22, 0x7d, 0x08, 0x12, 0x43, 0xaa, 0x7b, 0x04, 0x7d, 0x26, 0x7f, 0xcc, 0xf1, 0x16,
+ 0xef, 0x60, 0x02, 0xe1, 0x05, 0x11, 0xf8, 0x60, 0x02, 0xe1, 0x05, 0x90, 0xfc, 0x00, 0xe0, 0x54,
+ 0x0f, 0x90, 0x04, 0x35, 0xf0, 0x90, 0xfc, 0x01, 0xe0, 0x30, 0xe2, 0x19, 0xf1, 0x10, 0xef, 0x60,
+ 0x02, 0xe1, 0x05, 0x12, 0x1c, 0xac, 0x75, 0x58, 0x02, 0xe4, 0xf1, 0x46, 0xef, 0x70, 0x76, 0x90,
+ 0xe2, 0x1f, 0x74, 0x06, 0xf0, 0x12, 0x1b, 0xca, 0x90, 0x04, 0x35, 0xe0, 0xd3, 0x94, 0x00, 0x40,
+ 0x4b, 0xe4, 0xf5, 0x55, 0x75, 0x56, 0xff, 0x75, 0x57, 0xff, 0x75, 0x58, 0xf1, 0x7d, 0x40, 0xff,
+ 0x12, 0x1f, 0x1c, 0xf1, 0x09, 0xe4, 0x90, 0xfc,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0x34, 0xff, 0xf5, 0x3b, 0x80, 0xbf, 0xe5, 0x54,
+ 0x70, 0x2c, 0x90, 0xe2, 0x31, 0xe0, 0x55, 0x3a, 0x70, 0x10, 0x20, 0x29, 0x0d, 0x75, 0x54, 0x89,
+ 0x12, 0x2b, 0x8f, 0x74, 0x03, 0xf0, 0xd2, 0x07, 0x80, 0x14, 0x90, 0x04, 0x37, 0xe0, 0x60, 0x0e,
+ 0x90, 0xe2, 0x22, 0xe0, 0x54, 0x60, 0x60, 0x06, 0x12, 0x2b, 0x8c, 0x74, 0x01, 0xf0, 0xaf, 0x54,
+ 0x22, 0xa3, 0xf0, 0xff, 0xb1, 0xfa, 0x90, 0xfc, 0x00, 0xe0, 0x22, 0xe5, 0x54, 0x70, 0x10, 0x91,
+ 0xac, 0x75, 0x57, 0x02, 0xe4, 0xfb, 0x7d, 0x26, 0x7f, 0x40, 0x12, 0x17, 0x16, 0xf1, 0x18, 0x22,
+ 0x7f, 0x05, 0x7e, 0x00, 0x8e, 0x30, 0x8f, 0x31, 0xe5, 0x31, 0x25, 0xe0, 0xf5, 0x31, 0xe5, 0x30,
+ 0x33, 0xf5, 0x30, 0xe5, 0x31, 0x15, 0x31, 0xae, 0x30, 0x70, 0x02, 0x15, 0x30, 0x4e, 0x60, 0x05,
+ 0x12, 0x0e, 0x7e, 0x80, 0xee, 0x22, 0x91, 0xac, 0x7b, 0x04, 0x7d, 0x26, 0x22, 0x90, 0xe6, 0x15,
+ 0x74, 0x22, 0xf0, 0xe4, 0x90, 0xe6, 0x1b, 0x22, 0xe4, 0xfd, 0x7f, 0x02, 0xae, 0x07, 0x90, 0xe2,
+ 0x2c, 0xed, 0xf0, 0x12, 0x15, 0x13, 0x90, 0xe2, 0x2d, 0xee, 0xf0, 0x22, 0xe4, 0xfc, 0x91, 0xac,
+ 0x30, 0x14, 0x05, 0x12, 0x34, 0x25, 0x7c, 0x26, 0xad, 0x04, 0xe4, 0xfb, 0x7f, 0x1c, 0x12, 0x15,
+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0x13,
+ 0x13, 0x54, 0x3f, 0x65, 0x43, 0x60, 0x02, 0xa1, 0xce, 0xef, 0x64, 0x01, 0x60, 0x02, 0xa1, 0xce,
+ 0xd2, 0x17, 0xe5, 0x40, 0x24, 0x02, 0x60, 0x33, 0x14, 0x60, 0x02, 0xa1, 0xce, 0xe5, 0x3f, 0x64,
+ 0x21, 0x60, 0x02, 0xa1, 0xce, 0xe5, 0x41, 0x60, 0x02, 0xa1, 0xce, 0x78, 0xbe, 0xe2, 0x60, 0x02,
+ 0xa1, 0xce, 0x53, 0x91, 0xef, 0x75, 0xa1, 0x01, 0x90, 0x00, 0xab, 0xf0, 0x7e, 0x00, 0x7f, 0x7a,
+ 0x7b, 0x1f, 0xfa, 0xfd, 0x12, 0x36, 0x3a, 0xc2, 0x00, 0xa1, 0x89, 0xe5, 0x3f, 0x64, 0xa1, 0x60,
+ 0x02, 0xa1, 0xce, 0xe5, 0x41, 0x60, 0x02, 0xa1, 0xce, 0x78, 0xbe, 0xe2, 0x64, 0x01, 0x60, 0x02,
+ 0xa1, 0xce, 0x90, 0x00, 0xac, 0xe0, 0x54, 0x03, 0x81, 0xcd, 0x90, 0x00, 0xae, 0xe0, 0x64, 0x02,
+ 0x60, 0x02, 0x81, 0x1c, 0xe5, 0x40, 0xb4, 0x09, 0x05, 0x12, 0x2f, 0xf9, 0x80, 0x14, 0xe5, 0x40,
+ 0x70, 0x10, 0xe5, 0x3f, 0xb4, 0x82, 0x0b, 0xd2, 0x17, 0xaf, 0x43, 0x51, 0x29, 0xef, 0x60, 0x02,
+ 0xa1, 0xce, 0x90, 0x00, 0xaf, 0xe0, 0x60, 0x02, 0x81, 0x13, 0x90, 0x00, 0xac, 0xe0, 0x30, 0xe7,
+ 0x3b, 0xe5, 0x40, 0x64, 0x06, 0x70, 0x2d, 0xe5, 0x42, 0x64, 0x02, 0x60, 0x06, 0xe5, 0x42, 0x64,
+ 0x07, 0x70, 0x21, 0xd2, 0x21, 0x90, 0x00, 0x76, 0x12, 0x44, 0x3e, 0x30, 0x24, 0x06, 0xe5, 0x42,
+ 0x64, 0x02, 0x60, 0x08, 0x20, 0x24, 0x15, 0xe5, 0x42, 0xb4, 0x07, 0x10, 0x90, 0x00, 0x74, 0x12,
+ 0x44, 0x3e, 0x80, 0x08, 0xe5, 0x40, 0xb4, 0x0b, 0x03, 0x12, 0x43, 0xca, 0xe5, 0x40, 0x64, 0x03,
+ 0x70, 0x32, 0xe5, 0x3f, 0xb4, 0x02, 0x15, 0xe5, 0x41, 0x70, 0x11, 0xe5, 0x43, 0x64, 0x02, 0x60,
+ 0x05, 0xe5, 0x43, 0xb4, 0x86, 0x06, 0xd2, 0x17, 0xaf, 0x43, 0xb1, 0xe8, 0xe5, 0x3f, 0x70, 0x14,
+ 0xe5, 0x41, 0xb4, 0x01, 0x08, 0x90, 0x00, 0xb0, 0x74, 0x03, 0xf0, 0x80, 0x07, 0xe5, 0x41, 0xb4,
+ 0x02, 0x02, 0xd2, 0x17, 0xe5, 0x40, 0x64, 0x01, 0x70, 0x29, 0xe5, 0x3f, 0xb4, 0x02, 0x15, 0xe5,
+ 0x41, 0x70, 0x11, 0xe5, 0x43, 0x64, 0x02, 0x60, 0x05, 0xe5, 0x43, 0xb4, 0x86, 0x06, 0xd2, 0x17,
+ 0xaf, 0x43, 0xd1, 0x3c, 0xe5, 0x3f, 0x70, 0x0b, 0xe5, 0x41, 0xb4, 0x01, 0x06, 0x90, 0x00, 0xb0,
+ 0x74, 0x01, 0xf0, 0x30, 0x17, 0x02, 0xa1, 0x89, 0xd2, 0x18, 0xa1, 0x89, 0x90, 0x00, 0xaf, 0xe0,
+ 0x60, 0x02, 0xa1, 0xce, 0xd2, 0x17, 0xe5, 0x40, 0x12, 0x0d, 0x2b, 0x24, 0xfb, 0x00, 0x25, 0x27,
+ 0x01, 0x25, 0x5e, 0x03, 0x24, 0x47, 0x06, 0x24, 0xf0, 0x08, 0x24, 0xdf, 0x09, 0x24, 0xc9, 0x0a,
+ 0x24, 0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e,
+ 0xe2, 0xa3, 0xf0, 0x90, 0x00, 0xb1, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x02, 0xd2, 0x23, 0xd2,
+ 0x22, 0x12, 0x3d, 0x10, 0x30, 0x17, 0x0e, 0x78, 0xa0, 0xe2, 0x44, 0x80, 0xf2, 0x22, 0x90, 0xe6,
+ 0xa0, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xf0, 0x74, 0x01, 0x78,
+ 0x8b, 0xf2, 0xe5, 0x52, 0x78, 0xb3, 0xf2, 0x22, 0xef, 0x54, 0x0f, 0xfe, 0xef, 0x14, 0x60, 0x1a,
+ 0x14, 0x60, 0x1f, 0x24, 0x82, 0x60, 0x0b, 0x14, 0x60, 0x14, 0x24, 0xfb, 0x60, 0x18, 0x24, 0x86,
+ 0x70, 0x1b, 0x78, 0xa0, 0xe2, 0x44, 0x01, 0xf2, 0x80, 0x2f, 0x78, 0xa1, 0x80, 0x0a, 0x78, 0xa2,
+ 0x80, 0x06, 0x78, 0xa3, 0x80, 0x02, 0x78, 0xa5, 0x74, 0x01, 0xf2, 0x80, 0x1c, 0x75, 0xf0, 0x02,
+ 0xee, 0x51, 0x20, 0xfc, 0x74, 0x01, 0x93, 0x4c, 0x70, 0x03, 0x7f, 0x15, 0x22, 0x75, 0xf0, 0x02,
+ 0xee, 0x51, 0x20, 0xd1, 0xb2, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00, 0x22, 0xad, 0x07, 0xed, 0x54,
+ 0x0f, 0xfc, 0xed, 0x60, 0x50, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x81, 0x60, 0x0e, 0x24, 0xfb, 0x60,
+ 0x20, 0x24, 0x85, 0x70, 0x27, 0xe4, 0x78, 0xa1, 0xf2, 0x80, 0x3a, 0xe4, 0x78, 0xa2, 0xf2, 0x80,
+ 0x34, 0x90, 0x00, 0xab, 0xe0, 0x70, 0x2e, 0x78,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af, 0x30, 0x08, 0x03, 0x12, 0x0e, 0xff, 0x30,
+ 0x09, 0x09, 0x30, 0x2a, 0x03, 0x12, 0x17, 0x1a, 0x12, 0x40, 0x9c, 0x30, 0x0a, 0x09, 0x30, 0x2a,
+ 0x03, 0x12, 0x17, 0x1a, 0x12, 0x40, 0x9d, 0x30, 0x0b, 0x09, 0x30, 0x2a, 0x03, 0x12, 0x17, 0x1a,
+ 0x12, 0x0f, 0xff, 0x30, 0x05, 0x0c, 0x90, 0x00, 0xe8, 0xe0, 0x60, 0x04, 0x7f, 0x01, 0x11, 0xdc,
+ 0xc2, 0x05, 0x30, 0x07, 0x03, 0x12, 0x34, 0xb2, 0x30, 0x0d, 0x89, 0x7f, 0xff, 0x30, 0x28, 0x05,
+ 0x12, 0x12, 0x95, 0x80, 0x03, 0x12, 0x40, 0x7a, 0xc2, 0x0d, 0x01, 0x54, 0x8f, 0x26, 0x75, 0x27,
+ 0x01, 0x12, 0x41, 0xe6, 0x31, 0x47, 0xf5, 0x28, 0xe4, 0xf5, 0x29, 0x12, 0x40, 0x6b, 0x74, 0xc5,
+ 0x25, 0x27, 0xf5, 0x82, 0xe4, 0x34, 0x00, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0xe2, 0x24, 0xf0, 0x00,
+ 0x12, 0x34, 0xd8, 0x12, 0x0e, 0x7e, 0x7f, 0x01, 0x12, 0x41, 0x44, 0x7f, 0x1e, 0x12, 0x1f, 0x7f,
+ 0x12, 0x13, 0xa0, 0x31, 0x47, 0x65, 0x28, 0x60, 0x2d, 0xe5, 0x26, 0x60, 0x13, 0x31, 0x47, 0xfe,
+ 0x45, 0x28, 0xff, 0xe5, 0x28, 0xd3, 0x9e, 0x7d, 0x00, 0x40, 0x02, 0x7d, 0x01, 0x12, 0x30, 0x4c,
+ 0xe5, 0x27, 0x60, 0x07, 0x90, 0x00, 0xb9, 0xe0, 0x20, 0xe0, 0x05, 0x90, 0x04, 0x93, 0x80, 0x03,
+ 0x90, 0x04,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, 0xf1, 0xb9, 0x50, 0x02, 0x61, 0x73, 0x30, 0x13, 0x05,
+ 0x20, 0x11, 0x02, 0x61, 0x73, 0xd2, 0x14, 0x80, 0x12, 0xaf, 0x2a, 0xf1, 0xb9, 0x50, 0x02, 0x61,
+ 0x73, 0x30, 0x13, 0x05, 0x30, 0x11, 0x02, 0x61, 0x73, 0xc2, 0x14, 0x75, 0x2f, 0x01, 0x75, 0x30,
+ 0x00, 0x75, 0x31, 0x8b, 0xaf, 0x29, 0x12, 0x31, 0x89, 0x8f, 0x28, 0x22, 0x20, 0x13, 0x02, 0x61,
+ 0x73, 0x12, 0x44, 0x35, 0xf1, 0x20, 0x8f, 0x28, 0x7f, 0x00, 0x22, 0xe5, 0x27, 0x7f, 0x08, 0xb4,
+ 0x23, 0x02, 0x7f, 0x0c, 0x8f, 0x2c, 0x20, 0x13, 0x02, 0x61, 0x73, 0xad, 0x27, 0xaf, 0x29, 0x12,
+ 0x42, 0x1d, 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x0a, 0x74, 0x93, 0x25, 0x26, 0x71, 0x95, 0x74, 0x03,
+ 0x61, 0x40, 0xaf, 0x2c, 0x80, 0x7d, 0x30, 0x13, 0x02, 0x61, 0x73, 0xaf, 0x29, 0x12, 0x42, 0xdd,
+ 0x8f, 0x28, 0xe5, 0x2b, 0xb4, 0x0a, 0x0c, 0x74, 0x93, 0x25, 0x26, 0x71, 0x95, 0xe5, 0x2b, 0xf0,
+ 0x7f, 0x84, 0x22, 0xe5, 0x28, 0x60, 0x09, 0x74, 0x93, 0x25, 0x26, 0x71, 0x95, 0x74, 0x03, 0xf0,
+ 0xaf, 0x28, 0x22, 0x7f, 0x00, 0x22, 0xe5, 0x2b, 0x75, 0xf0, 0x03, 0xa4, 0x24, 0xb8, 0xf5, 0x82,
+ 0xe4, 0x34, 0x0f, 0xaf, 0x82, 0xf5, 0x2c, 0x8f, 0x2d, 0x20, 0x13, 0x02, 0x61, 0x73, 0x12, 0x37,
+ 0xa7, 0x7b, 0x12, 0x12, 0x37, 0xe9, 0x12, 0x36, 0x3a, 0x12, 0x37, 0x2a, 0x78, 0x7c, 0x74, 0x70,
+ 0xf2, 0xe4, 0xf2, 0x12, 0x43, 0xf5, 0x70, 0x02, 0x05, 0x2c, 0x75, 0x9e, 0x07, 0x74, 0x0a, 0xf2,
+ 0x75, 0x9e, 0x0c, 0x12, 0x43, 0xf5, 0x70, 0x02, 0x05, 0x2c, 0xf5, 0x82, 0x85, 0x2c, 0x83, 0xe0,
+ 0xf2, 0x7f, 0x12, 0x7e, 0x00, 0x80, 0x67, 0xf1, 0xe9, 0x12, 0x31, 0x19, 0x8f, 0x28, 0xe5, 0x28,
+ 0x60, 0x1a, 0xb4, 0x9b, 0x0b, 0x74, 0x93, 0x25, 0x26, 0x71, 0x95, 0x74, 0x0c, 0xf0, 0x80, 0x09,
+ 0x74, 0x93, 0x25, 0x26, 0x71, 0x95, 0x74, 0x03, 0xf0, 0xaf, 0x28, 0x22, 0x7f, 0x00, 0x22, 0xf1,
+ 0xe9, 0x12, 0x42, 0xe9, 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x09, 0x74, 0x93, 0x25, 0x26, 0x71, 0x95,
+ 0x74, 0x03, 0xf0, 0xaf, 0x28, 0x22, 0x12, 0x44, 0x35, 0x12, 0x35, 0xd8, 0x8f, 0x28, 0xe5, 0x28,
+ 0x60, 0x18, 0x7f, 0x02, 0xb4, 0x8f, 0x02, 0x7f, 0x0e, 0x74, 0x93, 0x25, 0x26, 0x71, 0x95, 0xef,
+ 0xf0, 0xa2, 0x12, 0x92, 0x16, 0x71, 0x9d, 0xaf, 0x28, 0x22, 0xaf, 0x9e, 0x7e, 0x00, 0x12, 0x3b,
+ 0x28, 0x7f, 0x00, 0x22, 0x12, 0x3b, 0xd2, 0x7f, 0x00, 0x22, 0x74, 0x93, 0x25, 0x26, 0x71, 0x95,
+ 0x74, 0x07, 0xf0, 0x30, 0x11, 0x08, 0xa2, 0x12, 0x92, 0x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2, 0x78, 0x04, 0x74, 0x08, 0xf2, 0x78, 0x49, 0x74, 0x88, 0xf2, 0xf2, 0x12, 0x3f, 0x9b, 0xe4,
+ 0xfb, 0x7d, 0x26, 0x7f, 0x64, 0x12, 0x15, 0x20, 0x80, 0x75, 0x90, 0x04, 0x2a, 0xe0, 0x70, 0x02,
+ 0xa3, 0xe0, 0x60, 0x70, 0xe5, 0x54, 0x70, 0x6c, 0x12, 0x17, 0x09, 0x12, 0x37, 0xe0, 0x12, 0x37,
+ 0xbd, 0xfd, 0x90, 0xe6, 0xa3, 0xe0, 0x30, 0xe2, 0x03, 0x30, 0x1f, 0xf6, 0x90, 0xe6, 0x91, 0xe0,
+ 0xc3, 0x94, 0x40, 0x50, 0x03, 0x30, 0x1f, 0xf4, 0x20, 0x1f, 0x20, 0x7a, 0xf0, 0x79, 0x00, 0x74,
+ 0xf0, 0x12, 0x37, 0x30, 0x7f, 0x40, 0xae, 0x07, 0x1f, 0xee, 0x60, 0x05, 0x12, 0x37, 0xd7, 0x80,
+ 0xf5, 0x90, 0xe6, 0x49, 0x74, 0x82, 0xf0, 0x0d, 0xbd, 0x08, 0xc7, 0x90, 0xe6, 0x9c, 0x74, 0x02,
+ 0xf0, 0xe4, 0xa3, 0xf0, 0x12, 0x1e, 0x34, 0x8f, 0x39, 0x12, 0x34, 0x25, 0x12, 0x36, 0x97, 0x7d,
+ 0x26, 0x7f, 0x34, 0x12, 0x15, 0x20, 0x12, 0x43, 0xc0, 0xe5, 0x39, 0x60, 0x02, 0xf5, 0x54, 0x12,
+ 0x17, 0x4d, 0x80, 0x86, 0x12, 0x17, 0xfc, 0x78, 0x04, 0x74, 0x08, 0xf2, 0x78, 0x48, 0x74, 0x88,
+ 0xf2, 0xf2, 0x12, 0x17, 0x1a, 0xe5, 0x54, 0x60, 0x02, 0xa1, 0x6d, 0x90, 0x04, 0x96, 0x12, 0x0c,
+ 0xe5, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x6d, 0x90, 0x00, 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x4f, 0xfe, 0x90, 0x00, 0x06, 0x12, 0x0b, 0x4f, 0xfd, 0xed, 0xff,
+ 0x22, 0x90, 0xe2, 0x1f, 0xe0, 0x54, 0xdf, 0xf0, 0x22, 0x90, 0xe6, 0x01, 0x74, 0xa3, 0xf0, 0x90,
+ 0xe6, 0x09, 0x74, 0xff, 0xf0, 0x90, 0x00, 0xdd, 0xe0, 0x44, 0x01, 0xf0, 0x12, 0x3e, 0xa9, 0x80,
+ 0xe0, 0x74, 0xff, 0x90, 0x00, 0xfd, 0xf0, 0xa3, 0xf0, 0x74, 0xc5, 0x2f, 0x12, 0x29, 0x4b, 0x60,
+ 0x03, 0xed, 0x60, 0x03, 0x7f, 0x0a, 0x22, 0x91, 0x89, 0xef, 0x60, 0x03, 0x7f, 0x08, 0x22, 0x12,
+ 0x0c, 0x67, 0x8f, 0x0b, 0x8e, 0x0a, 0x8d, 0x09, 0x8c, 0x08, 0x51, 0x80, 0xf1, 0xc5, 0x51, 0x91,
+ 0x90, 0x04, 0x39, 0xe0, 0x70, 0x57, 0xaf, 0x0b, 0xae, 0x0a, 0xad, 0x09, 0x90, 0x04, 0x3b, 0x12,
+ 0x0c, 0xad, 0x91, 0x11, 0x71, 0xfa, 0xfd, 0x90, 0x04, 0x3b, 0x12, 0x0c, 0xad, 0x12, 0x1a, 0x43,
+ 0xb1, 0x31, 0xfc, 0x78, 0x09, 0x12, 0x0c, 0x54, 0xef, 0x24, 0xff, 0xf5, 0x13, 0xee, 0x34, 0xff,
+ 0xf5, 0x12, 0xed, 0x34, 0xff, 0xf5, 0x11, 0xec, 0x34, 0xff, 0xf5, 0x10, 0xaf, 0x13, 0xae, 0x12,
+ 0xad, 0x11, 0xfc, 0x71, 0xe8, 0xd3, 0x12, 0x0c, 0x30, 0x40, 0x03, 0x7f, 0x0c, 0x22, 0xaf, 0x13,
+ 0xae, 0x12, 0xad, 0x11, 0xac, 0x10, 0x91, 0x05, 0x40, 0x3e, 0x7f, 0x0c, 0x22, 0x71, 0xe8, 0xc0,
+ 0x00, 0x71, 0xf1, 0x12, 0x0c, 0x41, 0xd0, 0x00, 0x91, 0x11, 0x71, 0xf1, 0x12, 0x0c, 0x41, 0xa8,
+ 0x04, 0xa9, 0x05, 0xaa, 0x06, 0xab, 0x07, 0x71, 0xfa, 0xfd, 0x12, 0x1a, 0x43, 0x12, 0x0c, 0xa1,
+ 0x71, 0xe8, 0xd3, 0x12, 0x0c, 0x30, 0x40, 0x03, 0x7f, 0x0c, 0x22, 0x12, 0x1a, 0x6a, 0x12, 0x0c,
+ 0xa1, 0x91, 0x05, 0x40, 0x03, 0x7f, 0x0c, 0x22, 0x85, 0x0b, 0x58, 0x85, 0x0a, 0x57, 0x85, 0x09,
+ 0x56, 0x85, 0x08, 0x55, 0x7b, 0x01, 0x7d, 0x26, 0x7f, 0x80, 0x12, 0x17, 0x16, 0xef, 0x60, 0x03,
+ 0xaf, 0x54, 0x22, 0x85, 0x0f, 0x58, 0x85, 0x0e, 0x57, 0x85, 0x0d, 0x56, 0x85, 0x0c, 0x55, 0x7b,
+ 0x01, 0x7d, 0x26, 0x7f, 0x84, 0x12, 0x17, 0x16, 0xef, 0x60, 0x03, 0xaf, 0x54, 0x22, 0x12, 0x1c,
+ 0xac, 0x7b, 0x01, 0x7d, 0x26, 0x7f, 0x98, 0x12, 0x17, 0x16, 0xef, 0x60, 0x03, 0xaf, 0x54, 0x22,
+ 0xe4, 0xf5, 0x54, 0x91, 0x25, 0xd1, 0x97, 0x7d, 0x26, 0x7f, 0x34, 0x12, 0x17, 0x16, 0x90, 0x00,
+ 0xfd, 0x12, 0x43, 0xc3, 0xe5, 0x54, 0x60, 0x0a, 0x90, 0x00, 0xfd, 0xe0, 0x70, 0x02, 0xa3, 0xe0,
+ 0x70, 0xde, 0x12, 0x1f, 0xb2, 0x7f, 0x00, 0x22, 0xab, 0x0b, 0xaa, 0x0a, 0xa9, 0x09, 0xa8, 0x08,
+ 0x22, 0x90, 0x04, 0x3b, 0x12, 0x0c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0x01, 0x7a, 0x00, 0x79, 0x8a, 0xaf, 0x29, 0x22, 0xe0, 0xfe,
+ 0xa3, 0xe0, 0x8e, 0x50, 0xf5, 0x51, 0x22, 0xe4, 0x78, 0x5c, 0xf2, 0x78, 0x5e, 0xf2, 0x22, 0x00
+ }
+} ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyastfw_sd_mmc_rel_silicon.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1408 @@
+#define CYASTFW_SD_MMC_REL_SILICON_SIZE 22392
+union {
+ uint8_t fw_image[CYASTFW_SD_MMC_REL_SILICON_SIZE] ;
+ uint16_t dummy_for_word_alignment ;
+} cyastfw_sd_mmc_rel_silicon_array = {
+ {
+ 0x02, 0x10, 0xae, 0x02, 0x52, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x52, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x56, 0x1e, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0e, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0x99, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e,
+ 0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08,
+ 0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83,
+ 0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x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0xf5, 0x82, 0x88, 0x83, 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80,
+ 0xdf, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x08, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x22, 0xe2, 0xfc, 0x08,
+ 0xe2, 0xfd, 0x08, 0xe2, 0xfe, 0x08, 0xe2, 0xff, 0x22, 0xe4, 0x93, 0xfc, 0x74, 0x01, 0x93, 0xfd,
+ 0x74, 0x02, 0x93, 0xfe, 0x74, 0x03, 0x93, 0xff, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xf9, 0x08, 0xe6,
+ 0xfa, 0x08, 0xe6, 0xcb, 0xf8, 0x22, 0xe2, 0xfb, 0x08, 0xe2, 0xf9, 0x08, 0xe2, 0xfa, 0x08, 0xe2,
+ 0xcb, 0xf8, 0x22, 0xe4, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf9, 0x74, 0x02, 0x93, 0xfa, 0x74, 0x03,
+ 0x93, 0xfb, 0x22, 0xec, 0xf6, 0x08, 0xed, 0xf6, 0x08, 0xee, 0xf6, 0x08, 0xef, 0xf6, 0x22, 0xec,
+ 0xf2, 0x08, 0xed, 0xf2, 0x08, 0xee, 0xf2, 0x08, 0xef, 0xf2, 0x22, 0xc1, 0x26, 0x41, 0x00, 0x60,
+ 0x00, 0x41, 0x00, 0x61, 0x00, 0x42, 0x00, 0xa9, 0x00, 0x40, 0x41, 0x00, 0xab, 0x00, 0x41, 0x00,
+ 0xac, 0x7c, 0x01, 0x14, 0x00, 0x41, 0x00, 0xae, 0x00, 0xc1, 0x24, 0x02, 0x15, 0x00, 0x00, 0x41,
+ 0x00, 0xaf, 0x00, 0x42, 0x00, 0xb1, 0x00, 0x00, 0xc1, 0x25, 0x02, 0x17, 0x00, 0xb3, 0x41, 0x00,
+ 0xb0, 0x00, 0xc1, 0x27, 0x41, 0x00, 0xad, 0x00, 0x44, 0x04, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x04, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x04, 0x87, 0x03, 0x90, 0x4a, 0x04, 0x89, 0x03,
+ 0x40, 0x03, 0x48, 0x03, 0x50, 0x03, 0x90, 0x00, 0x00, 0x48, 0x04, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x83, 0x00, 0x41, 0x04, 0x84, 0x00, 0x41, 0x04, 0x85, 0x00,
+ 0x41, 0x04, 0x86, 0x00, 0x02, 0x20, 0x00, 0x00, 0x41, 0x00, 0xfd, 0x00, 0xc1, 0x2e, 0x41, 0x04,
+ 0x30, 0x16, 0x41, 0x04, 0x31, 0x0a, 0x01, 0x08, 0x01, 0x01, 0x09, 0x02, 0x02, 0x0a, 0x00, 0xc5,
+ 0x41, 0x04, 0xbf, 0x00, 0x41, 0x04, 0xc0, 0x00, 0x41, 0x04, 0xc1, 0x00, 0x41, 0x04, 0xc4, 0x01,
+ 0x42, 0x00, 0xb7, 0x00, 0x00, 0x41, 0x00, 0xfb, 0x00, 0xc1, 0x21, 0x00, 0x74, 0x00, 0xf5, 0x86,
+ 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x74, 0x00, 0xf5,
+ 0x86, 0x90, 0xff, 0xe1, 0x02, 0x0e, 0x85, 0x74, 0x00, 0xf5, 0x86, 0x90, 0xff, 0x41, 0x02, 0x0e,
+ 0x85, 0xc0, 0x00, 0xc0, 0xe0, 0x15, 0x5d, 0xa8, 0x5d, 0xe5, 0x9a, 0xf6, 0x15, 0x5d, 0xa8, 0x5d,
+ 0xe5, 0x9b, 0xf6, 0xd0, 0xe0, 0xd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, 0x00, 0x02, 0x37, 0xfa, 0x00,
+ 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x08, 0x03, 0x05, 0x24,
+ 0x00, 0x02, 0x3a, 0x00, 0x03, 0x03, 0x00, 0x03, 0x11, 0x0c, 0x03, 0x12, 0x00, 0x05, 0x20, 0x00,
+ 0x05, 0x21, 0x00, 0x05, 0x26, 0x00, 0x06, 0x28, 0x00, 0x05, 0x04, 0x02, 0x02, 0x53, 0x02, 0x07,
+ 0x27, 0x00, 0x05, 0x39, 0x00, 0xff, 0xff, 0xff, 0xe3, 0x18, 0xe3, 0x19, 0xe3, 0x1a, 0xe3, 0x1b,
+ 0xe3, 0x12, 0xe3, 0x13, 0xe3, 0x14, 0xe3, 0x15, 0x90, 0x04, 0x87, 0xe0, 0xfe, 0xa3, 0xe0, 0x22,
+ 0x00, 0x00, 0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0xb4, 0x04, 0x17, 0x47, 0x02, 0x00,
+ 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00,
+ 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x02,
+ 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x86, 0x02, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00,
+ 0x00, 0x02, 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x86,
+ 0x02, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x1a, 0x03, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00,
+ 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x30, 0x00,
+ 0x31, 0x00, 0x10, 0x03, 0x43, 0x00, 0x79, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00,
+ 0x73, 0x00, 0x18, 0x03, 0x57, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x20, 0x00, 0x42, 0x00,
+ 0x72, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7f,
+ 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x92, 0xe6, 0x75, 0x81, 0x5d, 0x02, 0x10, 0xf8, 0x02, 0x40, 0x27,
+ 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2, 0x08, 0xdf, 0xf4,
+ 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33, 0xc4, 0x54, 0x0f,
+ 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80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xfd, 0x60, 0x0c, 0x24, 0xfe, 0x60, 0x03, 0x04, 0x70, 0x39, 0x75, 0x34, 0x10, 0x80, 0x37, 0x90,
+ 0xe2, 0xa6, 0x74, 0x30, 0xf0, 0x74, 0x10, 0x12, 0x56, 0xbb, 0xf0, 0x78, 0x5d, 0x74, 0xff, 0xf2,
+ 0x53, 0x91, 0xef, 0x78, 0x5c, 0x74, 0x3b, 0xf2, 0x12, 0x50, 0xe1, 0x75, 0x14, 0x04, 0x90, 0x00,
+ 0xb9, 0xe0, 0x60, 0x03, 0x12, 0x41, 0xe3, 0x7f, 0x02, 0x12, 0x36, 0xf2, 0x78, 0x5e, 0x74, 0x1b,
+ 0xf2, 0x80, 0x03, 0x75, 0x34, 0x1b, 0xaf, 0x34, 0x22, 0xe4, 0xf5, 0x30, 0x90, 0x04, 0x81, 0xf0,
+ 0x53, 0x21, 0xf7, 0x90, 0x04, 0x77, 0xe0, 0x12, 0x0d, 0x2b, 0x12, 0x34, 0x00, 0x12, 0x39, 0x01,
+ 0x12, 0x3e, 0x02, 0x12, 0x4d, 0x04, 0x12, 0x81, 0x05, 0x12, 0x84, 0x06, 0x12, 0xaa, 0x07, 0x12,
+ 0xc5, 0x08, 0x12, 0xcc, 0x09, 0x13, 0x43, 0x0a, 0x12, 0xb1, 0x0d, 0x12, 0xbd, 0x0e, 0x14, 0x5d,
+ 0x13, 0x12, 0xdc, 0x14, 0x12, 0xef, 0x15, 0x14, 0x85, 0x17, 0x13, 0xf5, 0xa7, 0x13, 0xfc, 0xa8,
+ 0x00, 0x00, 0x14, 0xa9, 0x12, 0x3f, 0xfe, 0x61, 0x3f, 0x12, 0x30, 0xff, 0x61, 0x3f, 0x91, 0xb1,
+ 0xff, 0x31, 0x85, 0x91, 0xaf, 0x60, 0x02, 0x41, 0xeb, 0xf5, 0x5c, 0x41, 0xeb, 0x12, 0x0f, 0xf8,
+ 0xff, 0x24, 0x07, 0xf1, 0xa6, 0xe0, 0x90, 0x00, 0xb6, 0xf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0x7f, 0x00, 0x22, 0xf1, 0xde, 0x12, 0x4e, 0x58,
+ 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x09, 0x74, 0xb3, 0x25, 0x26, 0x91, 0xc8, 0x74, 0x03, 0xf0, 0xaf,
+ 0x28, 0x22, 0xf1, 0xee, 0x12, 0x47, 0x68, 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x18, 0x7f, 0x02, 0xb4,
+ 0x8f, 0x02, 0x7f, 0x0e, 0x74, 0xb3, 0x25, 0x26, 0x91, 0xc8, 0xef, 0xf0, 0xa2, 0x12, 0x92, 0x1b,
+ 0xf1, 0x53, 0xaf, 0x28, 0x22, 0xaf, 0x9e, 0x7e, 0x00, 0x12, 0x3b, 0x53, 0x7f, 0x00, 0x22, 0x74,
+ 0xb3, 0x25, 0x26, 0x91, 0xc8, 0x74, 0x07, 0xf0, 0x30, 0x11, 0x08, 0xa2, 0x12, 0x92, 0x1b, 0xf1,
+ 0x53, 0x80, 0x03, 0x12, 0x46, 0x1b, 0x7f, 0x86, 0x22, 0x74, 0x43, 0x12, 0x56, 0xe8, 0xe5, 0x2a,
+ 0xb4, 0x01, 0x04, 0x7f, 0x00, 0x80, 0x05, 0x90, 0x04, 0x37, 0xe0, 0xff, 0x90, 0x04, 0x85, 0xef,
+ 0xf0, 0xe4, 0x90, 0x04, 0x86, 0xf0, 0x90, 0x00, 0x87, 0xf0, 0xa3, 0xe0, 0x24, 0x04, 0xff, 0x7b,
+ 0x01, 0x7a, 0x00, 0x79, 0x87, 0x12, 0x2d, 0x51, 0x12, 0x3b, 0xf6, 0x7f, 0x00, 0x22, 0x30, 0x11,
+ 0x08, 0xa2, 0x12, 0x92, 0x1b, 0xf1, 0x53, 0x80, 0x03, 0x12, 0x46, 0x1b, 0x74, 0xb3, 0x25, 0x26,
+ 0x91, 0xc8, 0x74, 0x09, 0xf0, 0x7f, 0x98, 0x22, 0xff, 0xfe, 0xfd, 0xfc, 0x12, 0x0c, 0xad, 0xc3,
+ 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08,
+ 0xe0, 0x54, 0xfc, 0x64, 0x0c, 0x70, 0x37, 0x12, 0x57, 0x20, 0x54, 0x1f, 0x64, 0x02, 0x70, 0x2e,
+ 0x90, 0xe2, 0x08, 0x12, 0x56, 0xc7, 0xa3, 0xe0, 0x13, 0x13, 0x54, 0x3f, 0x4f, 0x90, 0x04, 0x33,
+ 0xf0, 0x90, 0xe2, 0x09, 0x12, 0x56, 0xc7, 0xa3, 0xe0, 0xfe, 0x13, 0x13, 0x54, 0x3f, 0x4f, 0x90,
+ 0x04, 0x34, 0xf0, 0xe0, 0x70, 0x0c, 0x90, 0x04, 0x33, 0xe0, 0x70, 0x06, 0x80, 0xb2, 0x75, 0x19,
+ 0x8b, 0x22, 0x7f, 0x02, 0xd1, 0x6d, 0xef, 0x60, 0x02, 0x21, 0xb4, 0x12, 0x52, 0xea, 0x12, 0x44,
+ 0x6b, 0x60, 0x02, 0x21, 0xb4, 0x90, 0xe2, 0x09, 0xe0, 0x30, 0xe3, 0x08, 0x90, 0x04, 0x3a, 0x74,
+ 0x01, 0xf0, 0x21, 0x9b, 0xb1, 0xb3, 0x12, 0x57, 0x19, 0x11, 0x5d, 0xef, 0x60, 0x02, 0x21, 0xb4,
+ 0x12, 0x57, 0x20, 0x54, 0x1f, 0x64, 0x04, 0x60, 0x04, 0x75, 0x19, 0x8a, 0x22, 0x7d, 0x08, 0x12,
+ 0x53, 0xd5, 0x7b, 0x04, 0x7d, 0x26, 0x7f, 0xcc, 0x11, 0x5d, 0xef, 0x60, 0x02, 0x21, 0xb4, 0x31,
+ 0xb5, 0x60, 0x02, 0x21, 0xb4, 0x90, 0xfc, 0x00, 0xe0, 0x54, 0x0f, 0x90, 0x04, 0x35, 0xf0, 0x90,
+ 0xfc, 0x01, 0xe0, 0x30, 0xe2, 0x1c, 0x12, 0x57, 0x19, 0x11, 0x5d, 0xef, 0x60, 0x02, 0x21, 0xb4,
+ 0x12, 0x1f, 0xf1, 0x75, 0x1d, 0x02, 0xe4, 0x11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0x08, 0xb4, 0x99,
+ 0x02, 0xff, 0x22, 0x75, 0x19, 0x37, 0xe5, 0x35, 0x60, 0x1b, 0x85, 0x19, 0x5b, 0xe5, 0x19, 0x60,
+ 0x07, 0xc2, 0x1b, 0x12, 0x17, 0x53, 0x80, 0x0a, 0x90, 0x04, 0xb6, 0x12, 0x0c, 0xe5, 0x00, 0x00,
+ 0x00, 0x00, 0x12, 0x45, 0x15, 0xaf, 0x19, 0x22, 0xf0, 0x12, 0x1e, 0xe2, 0x90, 0xe6, 0x04, 0x74,
+ 0x08, 0xf0, 0x22, 0x90, 0x04, 0x65, 0xe0, 0x54, 0x01, 0xff, 0x7e, 0x01, 0x90, 0x04, 0x35, 0xe0,
+ 0xfb, 0x70, 0x17, 0xef, 0x70, 0x0a, 0x90, 0x04, 0x66, 0xe0, 0x54, 0xfe, 0xc3, 0x13, 0x04, 0xfe,
+ 0xaf, 0x06, 0xe4, 0xfc, 0xfd, 0xfe, 0x78, 0x09, 0x80, 0x46, 0xeb, 0x64, 0x01, 0x70, 0x54, 0xf5,
+ 0x32, 0xfb, 0x7d, 0x26, 0x7f, 0xdc, 0x11, 0x5d, 0xef, 0x70, 0x48, 0x7d, 0x40, 0x12, 0x53, 0xd5,
+ 0x7b, 0x04, 0x11, 0x00, 0xef, 0x70, 0x3c, 0x31, 0xb5, 0x70, 0x38, 0x90, 0xfc, 0x0a, 0xe0, 0xff,
+ 0xc4, 0x54, 0x0f, 0xf5, 0x32, 0xf1, 0xf3, 0xb1, 0xac, 0xe5, 0x32, 0xd3, 0x94, 0x00, 0x40, 0x19,
+ 0xe5, 0x32, 0x94, 0x0a, 0x50, 0x13, 0xe4, 0xff, 0x7e, 0x20, 0xfd, 0xfc, 0xa9, 0x32, 0xa8, 0x01,
+ 0x12, 0x0c, 0x54, 0x90, 0x04, 0x3b, 0x02, 0x0c, 0xd9, 0x90, 0x04, 0x3b, 0x12, 0x0c, 0xe5, 0x00,
+ 0x00, 0x00, 0x00, 0x22, 0x12,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, 0x5e, 0xef, 0x64, 0x01, 0x70, 0x59, 0xd2, 0x17, 0xe5,
+ 0x42, 0x24, 0x02, 0x60, 0x32, 0x14, 0x60, 0x02, 0xa1, 0xe5, 0xe5, 0x41, 0x64, 0x21, 0x60, 0x02,
+ 0xa1, 0xe5, 0xe5, 0x43, 0x60, 0x02, 0xa1, 0xe5, 0x78, 0xbe, 0xe2, 0x60, 0x02, 0xa1, 0xe5, 0x53,
+ 0x91, 0xef, 0x75, 0xa1, 0x01, 0x90, 0x00, 0xab, 0xf0, 0x7e, 0x00, 0x7f, 0x7a, 0x7b, 0x1f, 0xfa,
+ 0xfd, 0xf1, 0x37, 0xc2, 0x00, 0xa1, 0xa0, 0xe5, 0x41, 0x64, 0xa1, 0x60, 0x02, 0xa1, 0xe5, 0xe5,
+ 0x43, 0x60, 0x02, 0xa1, 0xe5, 0x78, 0xbe, 0xe2, 0x64, 0x01, 0x60, 0x02, 0xa1, 0xe5, 0x90, 0x00,
+ 0xac, 0xe0, 0x54, 0x03, 0x81, 0xeb, 0xd2, 0x18, 0xa1, 0xa0, 0x90, 0x00, 0xae, 0xe0, 0x64, 0x02,
+ 0x60, 0x02, 0x81, 0x3a, 0xe5, 0x42, 0xb4, 0x09, 0x05, 0x12, 0x47, 0xf0, 0x80, 0x14, 0xe5, 0x42,
+ 0x70, 0x10, 0xe5, 0x41, 0xb4, 0x82, 0x0b, 0xd2, 0x17, 0xaf, 0x45, 0x51, 0x46, 0xef, 0x60, 0x02,
+ 0xa1, 0xe5, 0x90, 0x00, 0xaf, 0xe0, 0x60, 0x02, 0x81, 0x31, 0x90, 0x00, 0xac, 0xe0, 0x30, 0xe7,
+ 0x39, 0xe5, 0x42, 0x64, 0x06, 0x70, 0x2b, 0xe5, 0x44, 0x64, 0x02, 0x60, 0x06, 0xe5, 0x44, 0x64,
+ 0x07, 0x70, 0x1f, 0xd2, 0x24, 0x90, 0x00, 0x76, 0xf1, 0xe0, 0x30, 0x27, 0x06, 0xe5, 0x44, 0x64,
+ 0x02, 0x60, 0x08, 0x20, 0x27, 0x14, 0xe5, 0x44, 0xb4, 0x07, 0x0f, 0x90, 0x00, 0x74, 0xf1, 0xe0,
+ 0x80, 0x08, 0xe5, 0x42, 0xb4, 0x0b, 0x03, 0x12, 0x56, 0xd9, 0xe5, 0x42, 0x64, 0x03, 0x70, 0x32,
+ 0xe5, 0x41, 0xb4, 0x02, 0x15, 0xe5, 0x43, 0x70, 0x11, 0xe5, 0x45, 0x64, 0x02, 0x60, 0x05, 0xe5,
+ 0x45, 0xb4, 0x86, 0x06, 0xd2, 0x17, 0xaf, 0x45, 0xb1, 0xed, 0xe5, 0x41, 0x70, 0x14, 0xe5, 0x43,
+ 0xb4, 0x01, 0x08, 0x90, 0x00, 0xb0, 0x74, 0x03, 0xf0, 0x80, 0x07, 0xe5, 0x43, 0xb4, 0x02, 0x02,
+ 0xd2, 0x17, 0xe5, 0x42, 0x64, 0x01, 0x70, 0x29, 0xe5, 0x41, 0xb4, 0x02, 0x15, 0xe5, 0x43, 0x70,
+ 0x11, 0xe5, 0x45, 0x64, 0x02, 0x60, 0x05, 0xe5, 0x45, 0xb4, 0x86, 0x06, 0xd2, 0x17, 0xaf, 0x45,
+ 0xd1, 0x3f, 0xe5, 0x41, 0x70, 0x0b, 0xe5, 0x43, 0xb4, 0x01, 0x06, 0x90, 0x00, 0xb0, 0x74, 0x01,
+ 0xf0, 0x30, 0x17, 0x02, 0xa1, 0xa0, 0xd2, 0x18, 0xa1, 0xa0, 0x90, 0x00, 0xaf, 0xe0, 0x60, 0x02,
+ 0xa1, 0xe5, 0xd2, 0x17, 0xe5, 0x42, 0x12, 0x0d, 0x2b, 0x35, 0x13, 0x00, 0x35, 0x3e, 0x01, 0x35,
+ 0x75, 0x03, 0x34, 0x65, 0x06, 0x35, 0x0b, 0x08, 0x34, 0xfa, 0x09, 0x34, 0xe7, 0x0a, 0x34, 0xef,
+ 0x0b, 0x00, 0x00, 0x35, 0xe5, 0xe5, 0x44, 0x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xd2, 0x26, 0xd2, 0x25, 0x12, 0x2e, 0x89, 0x30, 0x17, 0x0e, 0x78, 0xa0,
+ 0xe2, 0x44, 0x80, 0xf2, 0x22, 0x90, 0xe6, 0xa0, 0xe0, 0x44, 0x01, 0xf0, 0x22, 0xef, 0x54, 0x0f,
+ 0xfe, 0xef, 0x14, 0x60, 0x1a, 0x14, 0x60, 0x1f, 0x24, 0x82, 0x60, 0x0b, 0x14, 0x60, 0x14, 0x24,
+ 0xfb, 0x60, 0x18, 0x24, 0x86, 0x70, 0x1b, 0x78, 0xa0, 0xe2, 0x44, 0x01, 0xf2, 0x80, 0x2d, 0x78,
+ 0xa1, 0x80, 0x0a, 0x78, 0xa2, 0x80, 0x06, 0x78, 0xa3, 0x80, 0x02, 0x78, 0xa5, 0x74, 0x01, 0xf2,
+ 0x80, 0x1a, 0x75, 0xf0, 0x02, 0xee, 0x51, 0x40, 0xd1, 0xb6, 0x4c, 0x70, 0x03, 0x7f, 0x15, 0x22,
+ 0x75, 0xf0, 0x02, 0xee, 0x51, 0x40, 0xd1, 0xd2, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00, 0x22, 0xad,
+ 0x07, 0xed, 0x54, 0x0f, 0xfc, 0xed, 0x60, 0x51, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x81, 0x60, 0x0e,
+ 0x24, 0xfb, 0x60, 0x1f, 0x24, 0x85, 0x70, 0x26, 0xe4, 0x78, 0xa1, 0xf2, 0x80, 0x3b, 0xe4, 0x78,
+ 0xa2, 0xf2, 0x80, 0x35, 0x90, 0x00, 0xab, 0xe0, 0x70, 0x2f, 0x78, 0xa3, 0xf2, 0x7f, 0x02, 0xd1,
+ 0xf2, 0x80, 0x26, 0x90, 0x00, 0xab, 0xe0, 0x70, 0x20, 0x78, 0xa5, 0xf2, 0x80, 0x1b, 0xec, 0x51,
+ 0x3d, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0x4e, 0x70, 0x03, 0x7f, 0x15, 0x22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0xef, 0x75, 0xa1, 0x00, 0x22, 0xf1, 0xf3, 0x32, 0xef, 0x54, 0x0f,
+ 0xfe, 0xd3, 0x94, 0x0f, 0x50, 0x07, 0xee, 0x12, 0x30, 0x3c, 0x4a, 0x70, 0x26, 0xee, 0x64, 0x01,
+ 0x70, 0x1a, 0xbd, 0x02, 0x17, 0xbf, 0x01, 0x05, 0x90, 0xe6, 0xa1, 0x80, 0x08, 0xef, 0x64, 0x81,
+ 0x70, 0x28, 0x90, 0xe6, 0xa2, 0xe0, 0x54, 0x01, 0xf5, 0x0f, 0x80, 0x1e, 0x7d, 0x15, 0x7f, 0x03,
+ 0x02, 0x2a, 0xeb, 0xee, 0x25, 0xe0, 0x24, 0x65, 0xf5, 0x82, 0xe4, 0x34, 0x11, 0x12, 0x36, 0xd0,
+ 0xe0, 0x5d, 0x7f, 0x00, 0x60, 0x02, 0x7f, 0x01, 0x8f, 0x0f, 0xbd, 0x02, 0x05, 0x75, 0x0d, 0x22,
+ 0x80, 0x03, 0x75, 0x0d, 0x26, 0x75, 0x0c, 0x83, 0xe4, 0xf5, 0x0e, 0xfd, 0xfb, 0xfe, 0x12, 0x28,
+ 0xc5, 0x02, 0x28, 0x36, 0xc2, 0x15, 0x12, 0x0f, 0xf8, 0xff, 0x12, 0x14, 0xb8, 0xf5, 0x34, 0x12,
+ 0x17, 0xd0, 0xa3, 0xe0, 0xf5, 0x35, 0x90, 0x00, 0xae, 0xe0, 0xb4, 0x02, 0x03, 0x7f, 0x18, 0x22,
+ 0xe5, 0x34, 0x24, 0xfe, 0x60, 0x14, 0x14, 0x60, 0x1e, 0x14, 0x60, 0x2f, 0x14, 0x60, 0x45, 0x24,
+ 0x04, 0x60, 0x02, 0x21, 0x20, 0x90, 0x00, 0x62, 0x80, 0x03, 0x90, 0x00, 0x64, 0xe0, 0xfe, 0xa3,
+ 0xe0, 0x8e, 0x36, 0xf5, 0x37, 0x80, 0x7c, 0x90, 0x00, 0x70, 0x31, 0xa4, 0xd2, 0x15, 0x90, 0x00,
+ 0x68, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x6c, 0x80, 0x12, 0x90, 0x00, 0x72, 0x31, 0xa4,
+ 0xd2, 0x15, 0x90, 0x00, 0x66, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x6e, 0xee, 0xf0, 0xa3,
+ 0xef, 0xf0, 0x80, 0x4f, 0x90, 0x00, 0x78, 0x31, 0xa4, 0x31, 0xd6, 0xf5, 0x82, 0x8c, 0x83, 0xe0,
+ 0xfd, 0xd3, 0x94, 0x08, 0x50, 0x14, 0xe5, 0x35, 0xfb, 0x7a, 0x00, 0xef, 0x2b, 0xff, 0xea, 0x3e,
+ 0xfe, 0xc3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x03, 0x40, 0x03, 0x7f, 0x17, 0x22, 0x90, 0x00, 0x78,
+ 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x75, 0xf0, 0x02, 0xed, 0x90, 0x00, 0x99, 0x12, 0x0d, 0x16, 0xee,
+ 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x78, 0xe4, 0x85, 0x35, 0xf0, 0x12, 0x0b, 0xb0, 0x80, 0x03,
+ 0x7f, 0x17, 0x22, 0x90, 0x04, 0x88, 0xe0, 0x24, 0x04, 0xff, 0x12, 0x1d, 0x36, 0xa9, 0x07, 0x7b,
+ 0x01, 0x8b, 0x38, 0xf5, 0x39, 0x89, 0x3a, 0xfc, 0xad, 0x01, 0xe5, 0x35, 0xfb, 0x31, 0xb0, 0x30,
+ 0x15, 0x5f, 0xe5, 0x37, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x36, 0xf5, 0x83, 0xe0, 0x30, 0xe6,
+ 0x08, 0x90, 0x00, 0xb0, 0x74, 0x01, 0xf0, 0x80, 0x05, 0xe4, 0x90, 0x00, 0xb0, 0xf0, 0x90, 0x00,
+ 0xb9, 0xe0, 0x60, 0x3d, 0x31, 0xc4, 0x24, 0x17, 0xf0, 0x31, 0xc4, 0x04, 0xf0, 0xe5, 0x34, 0xb4,
+ 0x03, 0x0e, 0x90, 0x00, 0x71, 0xe0, 0x90, 0x00, 0x70, 0x31, 0xb9, 0x90, 0x00, 0x76, 0x80, 0x0c,
+ 0x90, 0x00, 0x73, 0xe0, 0x90, 0x00, 0x72, 0x31, 0xb9, 0x90, 0x00, 0x74, 0xe0, 0xfe, 0xa3, 0xe0,
+ 0xaa, 0x06, 0x75, 0x38, 0x01, 0x8a, 0x39, 0xf5, 0x3a, 0xac, 0x39, 0xad, 0x3a, 0x7b, 0x17, 0x31,
+ 0xb0, 0x7f, 0x00, 0x22, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xac, 0x06, 0x8c, 0x36, 0xf5, 0x37, 0x22,
+ 0x7a, 0x00, 0xaf, 0x37, 0xae, 0x36, 0x02, 0x19, 0x58, 0x25, 0x35, 0xff, 0xe0, 0x34, 0x00, 0xf5,
+ 0x36, 0x8f, 0x37, 0x22, 0x74, 0x02, 0x25, 0x37, 0xf5, 0x37, 0xe4, 0x35, 0x36, 0xf5, 0x36, 0x85,
+ 0x37, 0x82, 0xf5, 0x83, 0xe0, 0x22, 0x90, 0x04, 0x87, 0xe0, 0xfc, 0xa3, 0xe0, 0x22, 0x90, 0x00,
+ 0xae, 0xe0, 0xb4, 0x02, 0x03, 0x7f, 0x18, 0x22, 0xef, 0x24, 0xfe, 0x60, 0x13, 0x14, 0x60, 0x19,
+ 0x14, 0x60, 0x20, 0x24, 0x03, 0x70, 0x2f, 0x90, 0x00, 0x62, 0x51, 0x5b, 0x7e, 0x12, 0x80, 0x29,
+ 0x90, 0x00, 0x64, 0x51, 0x5b, 0x7e, 0x0a, 0x80, 0x20, 0x90, 0x00, 0x68, 0x51, 0x5b, 0x90, 0x00,
+ 0x68, 0x80, 0x08, 0x90, 0x00, 0x66, 0x51, 0x5b, 0x90, 0x00, 0x66, 0x51, 0x7e, 0x90, 0x00, 0x02,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, 0x48, 0x74, 0x86, 0xf0, 0x00,
+ 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x31, 0x48, 0xe5, 0x14, 0xd3, 0x94, 0x04, 0x40, 0x02, 0x11, 0xb8,
+ 0xaf, 0x3d, 0x22, 0x91, 0xb5, 0x12, 0x47, 0x29, 0xe4, 0xf5, 0x39, 0x7f, 0x08, 0x11, 0xc3, 0xef,
+ 0x60, 0x03, 0x7f, 0x99, 0x22, 0x74, 0xf8, 0x91, 0xa4, 0xff, 0x91, 0xac, 0x0f, 0xbf, 0x40, 0xfa,
+ 0xe4, 0x90, 0xe6, 0x98, 0xf0, 0xa3, 0x74, 0x40, 0xf0, 0x05, 0x39, 0xe5, 0x39, 0xc3, 0x94, 0x08,
+ 0x40, 0xd9, 0x12, 0x25, 0xac, 0x7f, 0x00, 0x22, 0x90, 0xe6, 0x1a, 0x74, 0x40, 0xf0, 0x22, 0xb1,
+ 0x72, 0x8f, 0x33, 0xe5, 0x33, 0xb4, 0x02, 0x0d, 0xa2, 0x14, 0x92, 0x15, 0x75, 0x34, 0x03, 0x12,
+ 0x46, 0x04, 0x7f, 0x84, 0x22, 0x20, 0x14, 0x10, 0x30, 0x1e, 0x0d, 0xa2, 0x14, 0x92, 0x15, 0x75,
+ 0x34, 0x0d, 0x12, 0x46, 0x04, 0x7f, 0x38, 0x22, 0xe5, 0x33, 0x64, 0x01, 0x70, 0x24, 0x90, 0x00,
+ 0xdd, 0xe0, 0x20, 0xe0, 0x03, 0x12, 0x3e, 0x28, 0x12, 0x3c, 0x72, 0x30, 0x14, 0x0e, 0x7f, 0x01,
+ 0x12, 0x1e, 0xef, 0x51, 0x3a, 0x12, 0x24, 0x6b, 0x8f, 0x32, 0x80, 0x06, 0x51, 0x3a, 0x51, 0x43,
+ 0x8f, 0x32, 0x31, 0x48, 0x20, 0x2a, 0x03, 0x12, 0x3d, 0xb9, 0x30, 0x14, 0x26, 0x90, 0x00, 0xef,
+ 0x12, 0x0c, 0xad, 0xc0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0x75, 0x83, 0x00, 0x02, 0x0b, 0x7c, 0x12, 0x2e, 0x83, 0xef, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xeb,
+ 0xf0, 0xa3, 0xe5, 0x29, 0xf0, 0xa3, 0xe5, 0x2a, 0xf0, 0xa3, 0xe5, 0x2b, 0xf0, 0x74, 0xc0, 0x12,
+ 0x2f, 0xfc, 0x74, 0x7f, 0xf0, 0x7f, 0x01, 0x02, 0x2d, 0xf7, 0x75, 0x92, 0xe6, 0x90, 0xe6, 0x0d,
+ 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0xe6, 0x00, 0x74, 0x14, 0xf0, 0xc2, 0x88, 0x43,
+ 0xb8, 0x04, 0xe4, 0xf5, 0x8e, 0x78, 0x82, 0x74, 0x05, 0xf2, 0x75, 0xaf, 0x07, 0x78, 0x04, 0x74,
+ 0x02, 0xf2, 0x00, 0x00, 0x00, 0x78, 0x12, 0x74, 0xa2, 0xf2, 0x00, 0x00, 0x00, 0xe4, 0x78, 0x18,
+ 0xf2, 0x00, 0x00, 0x00, 0x78, 0x04, 0x74, 0x04, 0xf2, 0x00, 0x00, 0x00, 0x78, 0x13, 0x74, 0x22,
+ 0xf2, 0x00, 0x00, 0x00, 0x78, 0x19, 0x74, 0x20, 0xf2, 0x00, 0x00, 0x00, 0x78, 0x04, 0x74, 0x06,
+ 0xf2, 0x00, 0x00, 0x00, 0x78, 0x14, 0x74, 0xe2, 0xf2, 0x00, 0x00, 0x00, 0x78, 0x1a, 0x74, 0x40,
+ 0xf2, 0x00, 0x00, 0x00, 0x78, 0x04, 0x74, 0x08, 0xf2, 0x00, 0x00, 0x00, 0x78, 0x15, 0x74, 0x62,
+ 0xf2, 0x00, 0x00, 0x00, 0x78, 0x1b, 0x74, 0x40, 0xf2, 0x00, 0x00, 0x00, 0xe4, 0x78, 0x04, 0xf2,
+ 0x00, 0x00, 0x00, 0x90, 0xe3, 0x04, 0xf0, 0x90, 0xe2, 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 0x90, 0xe2, 0x1f, 0x74, 0x01, 0xf0, 0x80, 0x0c, 0x75, 0x1a, 0x03, 0x75,
+ 0x1b, 0xb7, 0x85, 0x31, 0x1c, 0x12, 0x20, 0x55, 0x90, 0xe2, 0x1e, 0x74, 0x14, 0xf0, 0x22, 0x90,
+ 0xe6, 0x15, 0x74, 0x22, 0xf0, 0xe4, 0x90, 0xe6, 0x1b, 0x22, 0xa3, 0xf0, 0xff, 0x12, 0x27, 0x96,
+ 0x90, 0xfc, 0x00, 0xe0, 0x22, 0xe4, 0xff, 0x12, 0x27, 0x84, 0x90, 0xe2, 0x1e, 0x74, 0x40, 0xf0,
+ 0x22, 0xe5, 0x19, 0x70, 0x12, 0x12, 0x1f, 0xf1, 0x75, 0x1c, 0x02, 0xe4, 0xfb, 0x7d, 0x26, 0x7f,
+ 0x40, 0x12, 0x20, 0x5d, 0x12, 0x27, 0xcb, 0x22, 0x12, 0x2e, 0xfe, 0x60, 0x03, 0xed, 0x60, 0x07,
+ 0x7d, 0x0a, 0x7f, 0x02, 0x02, 0x2a, 0xeb, 0xeb, 0x14, 0x60, 0x12, 0x14, 0x60, 0x17, 0x24, 0x02,
+ 0x70, 0x1c, 0x75, 0x2b, 0x04, 0x75, 0x2c, 0x45, 0x75, 0x2d, 0x05, 0x80, 0x11, 0x75, 0x2b, 0x04,
+ 0x75, 0x2c, 0x4a, 0x80, 0x06, 0x75, 0x2b, 0x04, 0x75, 0x2c, 0x5b, 0x75, 0x2d, 0x11, 0x90, 0x04,
+ 0x83, 0x74, 0x02, 0xf0, 0x90, 0x04, 0x84, 0x74, 0x15, 0xf0, 0xe4, 0x90, 0x04, 0x85, 0xf0, 0x90,
+ 0x04, 0x86, 0xe5, 0x2d, 0xf0, 0xaa, 0x2b, 0xa9, 0x2c, 0x7b, 0x01, 0xff, 0x02, 0x2d, 0x51, 0xad,
+ 0x07, 0x12, 0x47, 0x09, 0x74, 0x38, 0xf0, 0x12, 0x17, 0xb6, 0x90, 0x00, 0x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04, 0x22, 0x85, 0xe8, 0x5a, 0xe4, 0xf5, 0xe8, 0x02, 0x0e, 0xa1, 0x78, 0x34, 0x7c,
+ 0x00, 0x7a, 0x00, 0x79, 0x0c, 0x22, 0x90, 0xe2, 0x33, 0xf0, 0x12, 0x1e, 0xe2, 0xe4, 0x22, 0xc2,
+ 0xe8, 0x90, 0xe6, 0xb5, 0x74, 0x01, 0xf0, 0x22, 0x90, 0xe2, 0x34, 0xf0, 0x02, 0x1e, 0xe2, 0x90,
+ 0x04, 0xb0, 0xe0, 0xfd, 0x7c, 0x00, 0x22, 0xe4, 0x78, 0x5c, 0xf2, 0x78, 0x5e, 0xf2, 0x22, 0x34,
+ 0x01, 0xfe, 0xf0, 0xa3, 0xef, 0xf0, 0x22, 0x00
+ }
+} ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyastfw_sd_mmc_rel_silicon_Ast121_68.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1408 @@
+#define CYANFW_SIZE 22392
+union {
+ uint8_t fw_image[CYANFW_SIZE] ;
+ uint16_t dummy_for_word_alignment ;
+} CyAnFirmware = {
+ {
+ 0x02, 0x10, 0xae, 0x02, 0x52, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x52, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x56, 0x1e, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0e, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x19, 0x99, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e,
+ 0x88, 0x82, 0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c, 0x01, 0x14, 0x00, 0x41, 0x00, 0xae, 0x00, 0xc1, 0x24, 0x02, 0x15, 0x00, 0x00, 0x41,
+ 0x00, 0xaf, 0x00, 0x42, 0x00, 0xb1, 0x00, 0x00, 0xc1, 0x25, 0x02, 0x17, 0x00, 0xb3, 0x41, 0x00,
+ 0xb0, 0x00, 0xc1, 0x27, 0x41, 0x00, 0xad, 0x00, 0x44, 0x04, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x04, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45,
+ 0x04, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x04, 0x87, 0x03, 0x90, 0x4a, 0x04, 0x89, 0x03,
+ 0x40, 0x03, 0x48, 0x03, 0x50, 0x03, 0x90, 0x00, 0x00, 0x48, 0x04, 0x6c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x83, 0x00, 0x41, 0x04, 0x84, 0x00, 0x41, 0x04, 0x85, 0x00,
+ 0x41, 0x04, 0x86, 0x00, 0x02, 0x20, 0x00, 0x00, 0x41, 0x00, 0xfd, 0x00, 0xc1, 0x2e, 0x41, 0x04,
+ 0x30, 0x16, 0x41, 0x04, 0x31, 0x07, 0x01, 0x08, 0x01, 0x01, 0x09, 0x02, 0x02, 0x0a, 0x00, 0xc5,
+ 0x41, 0x04, 0xbf, 0x00, 0x41, 0x04, 0xc0, 0x00, 0x41, 0x04, 0xc1, 0x00, 0x41, 0x04, 0xc4, 0x01,
+ 0x42, 0x00, 0xb7, 0x00, 0x00, 0x41, 0x00, 0xfb, 0x00, 0xc1, 0x21, 0x00, 0x74, 0x00, 0xf5, 0x86,
+ 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9, 0x22, 0x74, 0x00, 0xf5,
+ 0x86,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, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00,
+ 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00,
+ 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00,
+ 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00, 0x02, 0x37, 0xfa, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00,
+ 0x02, 0x50, 0x6d, 0x00, 0x02, 0x50, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x08, 0x03, 0x05, 0x24,
+ 0x00, 0x02, 0x3a, 0x00, 0x03, 0x03, 0x00, 0x03, 0x11, 0x0c, 0x03, 0x12, 0x00, 0x05, 0x20, 0x00,
+ 0x05, 0x21, 0x00, 0x05, 0x26, 0x00, 0x06, 0x28, 0x00, 0x05, 0x04, 0x02, 0x02, 0x53, 0x02, 0x07,
+ 0x27, 0x00, 0x05, 0x39, 0x00, 0xff, 0xff, 0xff, 0xe3, 0x18, 0xe3, 0x19, 0xe3, 0x1a, 0xe3, 0x1b,
+ 0xe3, 0x12, 0xe3, 0x13, 0xe3, 0x14, 0xe3, 0x15, 0x90, 0x04, 0x87, 0xe0, 0xfe, 0xa3, 0xe0, 0x22,
+ 0x00, 0x00, 0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0xb4, 0x04, 0x17, 0x47, 0x02, 0x00,
+ 0x02, 0x03, 0x01, 0x01, 0x00, 0x00, 0x0a, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00,
+ 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00, 0x00, 0x02,
+ 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x00, 0x02, 0x00, 0x07, 0x05, 0x86, 0x02, 0x00,
+ 0x02, 0x00, 0x00, 0x00, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00,
+ 0x00, 0x02, 0x08, 0x06, 0x50, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x86,
+ 0x02, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x1a, 0x03, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00,
+ 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x30, 0x00,
+ 0x31, 0x00, 0x10, 0x03, 0x43, 0x00, 0x79, 0x00, 0x70, 0x00, 0x72, 0x00, 0x65, 0x00, 0x73, 0x00,
+ 0x73, 0x00, 0x18, 0x03, 0x57, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, 0x20, 0x00, 0x42, 0x00,
+ 0x72, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7f,
+ 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x92, 0xe6, 0x75, 0x81, 0x5d, 0x02, 0x10, 0xf8, 0x02, 0x40, 0x27,
+ 0xe4, 0x93, 0xa3, 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, 0xe3, 0x4f, 0xe3, 0x38, 0xe3,
+ 0x39, 0xe3, 0x3a, 0xe3, 0x3b, 0xe4, 0xf5, 0x34, 0xef, 0x70, 0x12, 0xe5, 0x14, 0xc3, 0x94, 0x04,
+ 0x40, 0x54, 0x12, 0x50, 0xc5, 0x75, 0x14, 0x03, 0x12, 0x57, 0x67, 0x80, 0x49, 0xe5, 0x14, 0x24,
+ 0xfd, 0x60, 0x0c, 0x24, 0xfe, 0x60, 0x03, 0x04, 0x70, 0x39, 0x75, 0x34, 0x10, 0x80, 0x37, 0x90,
+ 0xe2, 0xa6, 0x74, 0x30, 0xf0, 0x74, 0x10, 0x12, 0x56, 0xbb, 0xf0, 0x78, 0x5d, 0x74, 0xff, 0xf2,
+ 0x53, 0x91, 0xef, 0x78, 0x5c, 0x74, 0x3b, 0xf2, 0x12, 0x50, 0xe1, 0x75, 0x14, 0x04, 0x90, 0x00,
+ 0xb9, 0xe0, 0x60, 0x03, 0x12, 0x41, 0xe3, 0x7f, 0x02, 0x12, 0x36, 0xf2, 0x78, 0x5e, 0x74, 0x1b,
+ 0xf2, 0x80, 0x03, 0x75, 0x34, 0x1b, 0xaf, 0x34, 0x22, 0xe4, 0xf5, 0x30, 0x90, 0x04, 0x81, 0xf0,
+ 0x53, 0x21, 0xf7, 0x90, 0x04, 0x77, 0xe0, 0x12, 0x0d, 0x2b, 0x12, 0x34, 0x00, 0x12, 0x39, 0x01,
+ 0x12, 0x3e, 0x02, 0x12, 0x4d, 0x04, 0x12, 0x81, 0x05, 0x12, 0x84, 0x06, 0x12, 0xaa, 0x07, 0x12,
+ 0xc5, 0x08, 0x12, 0xcc, 0x09, 0x13, 0x43, 0x0a, 0x12, 0xb1, 0x0d, 0x12, 0xbd, 0x0e, 0x14, 0x5d,
+ 0x13, 0x12, 0xdc, 0x14, 0x12, 0xef, 0x15, 0x14, 0x85, 0x17, 0x13, 0xf5, 0xa7, 0x13, 0xfc, 0xa8,
+ 0x00, 0x00, 0x14, 0xa9, 0x12, 0x3f, 0xfe, 0x61, 0x3f, 0x12, 0x30, 0xff, 0x61, 0x3f, 0x91, 0xb1,
+ 0xff, 0x31, 0x85, 0x91, 0xaf, 0x60, 0x02, 0x41, 0xeb, 0xf5, 0x5c, 0x41, 0xeb, 0x12, 0x0f, 0xf8,
+ 0xff, 0x24, 0x07, 0xf1, 0xa6, 0xe0, 0x90, 0x00, 0xb6, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x90,
+ 0x04, 0xc2, 0xf0, 0x12, 0x3b, 0x02, 0xa3, 0xe0, 0xff, 0x90, 0x04, 0xc3, 0xf0, 0x12, 0x57, 0x05,
+ 0xf1, 0xd7, 0xe0, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xfb, 0xf1, 0xf7, 0x80,
+ 0x47, 0x02, 0x28, 0x02, 0xf1, 0xc3, 0xa3, 0xa3, 0xa3, 0xe0, 0x60, 0x14, 0x8f, 0x82, 0x8e, 0x83,
+ 0xa3, 0xe0, 0xff, 0x12, 0x35, 0xed, 0x91, 0xaf, 0x54, 0x0f, 0x70, 0x0c, 0xc2, 0x25, 0x80, 0x08,
+ 0x91, 0xb1, 0xff, 0x12, 0x36, 0x3f, 0x8f, 0x30, 0x80, 0x41, 0x91, 0xb1, 0xff, 0x7d, 0x02, 0x80,
+ 0x11, 0x12, 0x3b, 0x02, 0xa3, 0xe0, 0xff, 0x12, 0x57, 0x05, 0x02, 0x30, 0x04, 0x91, 0xb1, 0xff,
+ 0x7d, 0x04, 0x02, 0x37, 0xfd, 0x12, 0x38, 0x64, 0x8f, 0x30, 0x80, 0x1f, 0x91, 0xb1, 0xff, 0x12,
+ 0x39, 0xde, 0x8f, 0x30, 0xe5, 0x30, 0x70, 0x02, 0x81, 0xae, 0x80, 0x64, 0x90, 0x00, 0xae, 0xe0,
+ 0xb4, 0x02, 0x05, 0x75, 0x30, 0x18, 0x80, 0x03, 0x12, 0x18, 0x87, 0xad, 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66, 0xf1, 0xde, 0x12, 0x3b, 0xfe, 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x1a, 0xb4, 0x9b,
+ 0x0b, 0x74, 0xb3, 0x25, 0x26, 0x91, 0xc8, 0x74, 0x0c, 0xf0, 0x80, 0x09, 0x74, 0xb3, 0x25, 0x26,
+ 0x91, 0xc8, 0x74, 0x03, 0xf0, 0xaf, 0x28, 0x22, 0x7f, 0x00, 0x22, 0xf1, 0xde, 0x12, 0x4e, 0x58,
+ 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x09, 0x74, 0xb3, 0x25, 0x26, 0x91, 0xc8, 0x74, 0x03, 0xf0, 0xaf,
+ 0x28, 0x22, 0xf1, 0xee, 0x12, 0x47, 0x68, 0x8f, 0x28, 0xe5, 0x28, 0x60, 0x18, 0x7f, 0x02, 0xb4,
+ 0x8f, 0x02, 0x7f, 0x0e, 0x74, 0xb3, 0x25, 0x26, 0x91, 0xc8, 0xef, 0xf0, 0xa2, 0x12, 0x92, 0x1b,
+ 0xf1, 0x53, 0xaf, 0x28, 0x22, 0xaf, 0x9e, 0x7e, 0x00, 0x12, 0x3b, 0x53, 0x7f, 0x00, 0x22, 0x74,
+ 0xb3, 0x25, 0x26, 0x91, 0xc8, 0x74, 0x07, 0xf0, 0x30, 0x11, 0x08, 0xa2, 0x12, 0x92, 0x1b, 0xf1,
+ 0x53, 0x80, 0x03, 0x12, 0x46, 0x1b, 0x7f, 0x86, 0x22, 0x74, 0x43, 0x12, 0x56, 0xe8, 0xe5, 0x2a,
+ 0xb4, 0x01, 0x04, 0x7f, 0x00, 0x80, 0x05, 0x90, 0x04, 0x37, 0xe0, 0xff, 0x90, 0x04, 0x85, 0xef,
+ 0xf0, 0xe4, 0x90, 0x04, 0x86, 0xf0, 0x90, 0x00, 0x87, 0xf0, 0xa3, 0xe0, 0x24, 0x04, 0xff, 0x7b,
+ 0x01, 0x7a, 0x00, 0x79, 0x87, 0x12, 0x2d, 0x51, 0x12, 0x3b, 0xf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, 0x18, 0x7d, 0x26, 0x12, 0x1e, 0x6b,
+ 0x80, 0xa5, 0x75, 0x31, 0x02, 0x7f, 0x02, 0x12, 0x1d, 0x88, 0xe5, 0x19, 0x60, 0x02, 0x21, 0xb4,
+ 0xe4, 0xfb, 0x7d, 0x26, 0x7f, 0x0c, 0x11, 0x5d, 0xef, 0x60, 0x02, 0x21, 0xb4, 0x90, 0xe2, 0x08,
+ 0xe0, 0x54, 0xfc, 0x64, 0x0c, 0x70, 0x37, 0x12, 0x57, 0x20, 0x54, 0x1f, 0x64, 0x02, 0x70, 0x2e,
+ 0x90, 0xe2, 0x08, 0x12, 0x56, 0xc7, 0xa3, 0xe0, 0x13, 0x13, 0x54, 0x3f, 0x4f, 0x90, 0x04, 0x33,
+ 0xf0, 0x90, 0xe2, 0x09, 0x12, 0x56, 0xc7, 0xa3, 0xe0, 0xfe, 0x13, 0x13, 0x54, 0x3f, 0x4f, 0x90,
+ 0x04, 0x34, 0xf0, 0xe0, 0x70, 0x0c, 0x90, 0x04, 0x33, 0xe0, 0x70, 0x06, 0x80, 0xb2, 0x75, 0x19,
+ 0x8b, 0x22, 0x7f, 0x02, 0xd1, 0x6d, 0xef, 0x60, 0x02, 0x21, 0xb4, 0x12, 0x52, 0xea, 0x12, 0x44,
+ 0x6b, 0x60, 0x02, 0x21, 0xb4, 0x90, 0xe2, 0x09, 0xe0, 0x30, 0xe3, 0x08, 0x90, 0x04, 0x3a, 0x74,
+ 0x01, 0xf0, 0x21, 0x9b, 0xb1, 0xb3, 0x12, 0x57, 0x19, 0x11, 0x5d, 0xef, 0x60, 0x02, 0x21, 0xb4,
+ 0x12, 0x57, 0x20, 0x54, 0x1f, 0x64, 0x04, 0x60, 0x04, 0x75, 0x19, 0x8a, 0x22, 0x7d, 0x08, 0x12,
+ 0x53, 0xd5, 0x7b, 0x04, 0x7d, 0x26, 0x7f, 0xcc, 0x11, 0x5d, 0xef, 0x60, 0x02, 0x21, 0xb4, 0x31,
+ 0xb5, 0x60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xc2, 0x29, 0x90, 0xe2, 0x1f, 0xe0, 0x54, 0x7f, 0xf0,
+ 0x00, 0xe4, 0x90, 0xe2, 0x33, 0xf0, 0x00, 0x90, 0xe2, 0x31, 0x74, 0xff, 0xf0, 0x00, 0x90, 0x00,
+ 0xe8, 0xe0, 0xff, 0x60, 0x04, 0x90, 0xe2, 0x34, 0xf0, 0x00, 0xe5, 0x19, 0x60, 0x08, 0xb4, 0x99,
+ 0x02, 0xff, 0x22, 0x75, 0x19, 0x37, 0xe5, 0x35, 0x60, 0x1b, 0x85, 0x19, 0x5b, 0xe5, 0x19, 0x60,
+ 0x07, 0xc2, 0x1b, 0x12, 0x17, 0x53, 0x80, 0x0a, 0x90, 0x04, 0xb6, 0x12, 0x0c, 0xe5, 0x00, 0x00,
+ 0x00, 0x00, 0x12, 0x45, 0x15, 0xaf, 0x19, 0x22, 0xf0, 0x12, 0x1e, 0xe2, 0x90, 0xe6, 0x04, 0x74,
+ 0x08, 0xf0, 0x22, 0x90, 0x04, 0x65, 0xe0, 0x54, 0x01, 0xff, 0x7e, 0x01, 0x90, 0x04, 0x35, 0xe0,
+ 0xfb, 0x70, 0x17, 0xef, 0x70, 0x0a, 0x90, 0x04, 0x66, 0xe0, 0x54, 0xfe, 0xc3, 0x13, 0x04, 0xfe,
+ 0xaf, 0x06, 0xe4, 0xfc, 0xfd, 0xfe, 0x78, 0x09, 0x80, 0x46, 0xeb, 0x64, 0x01, 0x70, 0x54, 0xf5,
+ 0x32, 0xfb, 0x7d, 0x26, 0x7f, 0xdc, 0x11, 0x5d, 0xef, 0x70, 0x48, 0x7d, 0x40, 0x12, 0x53, 0xd5,
+ 0x7b, 0x04, 0x11, 0x00, 0xef, 0x70, 0x3c, 0x31, 0xb5, 0x70, 0x38, 0x90, 0xfc, 0x0a, 0xe0, 0xff,
+ 0xc4, 0x54, 0x0f, 0xf5, 0x32, 0xf1, 0xf3, 0xb1, 0xac, 0xe5, 0x32, 0xd3, 0x94, 0x00, 0x40, 0x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 0x01, 0xfd, 0x60, 0x04, 0xe5, 0x28, 0x60, 0x06,
+ 0x7e, 0x00, 0x7f, 0x00, 0x80, 0x11, 0xe5, 0x27, 0x60, 0x05, 0x90, 0x00, 0xc9, 0x80, 0x03, 0x90,
+ 0x00, 0xbb, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x04, 0x95, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x4e,
+ 0x70, 0x04, 0x7f, 0x01, 0xc1, 0x0d, 0x90, 0x04, 0x96, 0xe0, 0x90, 0x04, 0x98, 0xf0, 0x90, 0x04,
+ 0x95, 0xe0, 0x90, 0x04, 0x97, 0xf0, 0x90, 0x00, 0xdc, 0xe0, 0x90, 0x04, 0x9a, 0x60, 0x05, 0x74,
+ 0x02, 0xf0, 0x80, 0x03, 0x74, 0x01, 0xf0, 0xed, 0xb4, 0x01, 0x04, 0x7f, 0x01, 0x80, 0x16, 0x12,
+ 0x47, 0xc9, 0x7f, 0x00, 0x70, 0x02, 0x7f, 0x01, 0xef, 0x44, 0x80, 0xff, 0x90, 0x04, 0x3a, 0xe0,
+ 0xfe, 0x25, 0xe0, 0x4f, 0xff, 0x90, 0x04, 0x99, 0xef, 0xf0, 0x90, 0x04, 0x3b, 0xe0, 0x90, 0x04,
+ 0x9b, 0xf0, 0x90, 0x04, 0x3c, 0xe0, 0x90, 0x04, 0x9c, 0xf0, 0x90, 0x04, 0x3d, 0xe0, 0x90, 0x04,
+ 0x9d, 0xf0, 0x90, 0x04, 0x3e, 0xe0, 0x90, 0x04, 0x9e, 0xf0, 0xc2, 0xaf, 0x12, 0x47, 0x39, 0x74,
+ 0xc5, 0x25, 0x27, 0xf1, 0x01, 0x90, 0x04, 0x86, 0xf0, 0x74, 0x02, 0x12, 0x56, 0xe8, 0x7a, 0x04,
+ 0x79, 0x97, 0xf1, 0xe4, 0xd2, 0xaf, 0x22, 0x12, 0x57, 0x0f, 0x02, 0x40, 0xf0, 0x90, 0x03, 0x50,
+ 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, 0x22, 0x74, 0x82, 0x90, 0xe2, 0x65, 0xf0,
+ 0x90, 0xe2, 0x64, 0x22, 0xae, 0x05, 0xe4, 0xfd, 0xef, 0x54, 0x0f, 0xff, 0xd3, 0x94, 0x0f, 0x50,
+ 0x05, 0x11, 0x3b, 0x4a, 0x70, 0x04, 0x7d, 0x15, 0x80, 0x1c, 0x11, 0x3b, 0xf5, 0x82, 0x8a, 0x83,
+ 0xe0, 0xfc, 0xee, 0x60, 0x05, 0xec, 0x44, 0x05, 0x80, 0x03, 0xec, 0x54, 0xfa, 0xfe, 0x11, 0x3b,
+ 0xf5, 0x82, 0x8a, 0x83, 0xee, 0xf0, 0x7f, 0x03, 0x02, 0x2a, 0xeb, 0xef, 0x25, 0xe0, 0x24, 0x65,
+ 0xf5, 0x82, 0xe4, 0x34, 0x11, 0xf5, 0x83, 0xe4, 0x93, 0xfa, 0x74, 0x01, 0x93, 0x22, 0x7f, 0x02,
+ 0xe4, 0xfe, 0xee, 0x11, 0xb0, 0xe0, 0xfd, 0x20, 0xe6, 0x42, 0x11, 0xa5, 0x11, 0x45, 0xf5, 0x82,
+ 0x8a, 0x83, 0xe4, 0xf0, 0x90, 0xe3, 0x04, 0xef, 0xf0, 0x00, 0x00, 0x00, 0x44, 0x80, 0xfc, 0x90,
+ 0xe3, 0x49, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x53, 0x05, 0x03, 0xee, 0x60, 0x03, 0xbe, 0x02, 0x15,
+ 0xed, 0x70, 0x07, 0x90, 0xe3, 0x49, 0xec, 0xf0, 0x7d, 0x03, 0xbd, 0x03, 0x08, 0x90, 0xe3, 0x49,
+ 0xec, 0xf0, 0x00, 0x00, 0x00, 0x11, 0xa5, 0x11, 0xb9, 0x74, 0x11, 0xf0, 0x0f, 0x0f, 0x0e, 0xee,
+ 0x64, 0x04, 0x70, 0xae, 0x22, 0xee, 0x25, 0xe0, 0x24, 0xe8, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0x22,
+ 0x25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0x81, 0x31, 0x90, 0x00, 0xac, 0xe0, 0x30, 0xe7,
+ 0x39, 0xe5, 0x42, 0x64, 0x06, 0x70, 0x2b, 0xe5, 0x44, 0x64, 0x02, 0x60, 0x06, 0xe5, 0x44, 0x64,
+ 0x07, 0x70, 0x1f, 0xd2, 0x24, 0x90, 0x00, 0x76, 0xf1, 0xe0, 0x30, 0x27, 0x06, 0xe5, 0x44, 0x64,
+ 0x02, 0x60, 0x08, 0x20, 0x27, 0x14, 0xe5, 0x44, 0xb4, 0x07, 0x0f, 0x90, 0x00, 0x74, 0xf1, 0xe0,
+ 0x80, 0x08, 0xe5, 0x42, 0xb4, 0x0b, 0x03, 0x12, 0x56, 0xd9, 0xe5, 0x42, 0x64, 0x03, 0x70, 0x32,
+ 0xe5, 0x41, 0xb4, 0x02, 0x15, 0xe5, 0x43, 0x70, 0x11, 0xe5, 0x45, 0x64, 0x02, 0x60, 0x05, 0xe5,
+ 0x45, 0xb4, 0x86, 0x06, 0xd2, 0x17, 0xaf, 0x45, 0xb1, 0xed, 0xe5, 0x41, 0x70, 0x14, 0xe5, 0x43,
+ 0xb4, 0x01, 0x08, 0x90, 0x00, 0xb0, 0x74, 0x03, 0xf0, 0x80, 0x07, 0xe5, 0x43, 0xb4, 0x02, 0x02,
+ 0xd2, 0x17, 0xe5, 0x42, 0x64, 0x01, 0x70, 0x29, 0xe5, 0x41, 0xb4, 0x02, 0x15, 0xe5, 0x43, 0x70,
+ 0x11, 0xe5, 0x45, 0x64, 0x02, 0x60, 0x05, 0xe5, 0x45, 0xb4, 0x86, 0x06, 0xd2, 0x17, 0xaf, 0x45,
+ 0xd1, 0x3f, 0xe5, 0x41, 0x70, 0x0b, 0xe5, 0x43, 0xb4, 0x01, 0x06, 0x90, 0x00, 0xb0, 0x74, 0x01,
+ 0xf0, 0x30, 0x17, 0x02, 0xa1, 0xa0, 0xd2, 0x18, 0xa1, 0xa0, 0x90, 0x00, 0xaf, 0xe0, 0x60, 0x02,
+ 0xa1, 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14, 0x60, 0x1e, 0x14, 0x60, 0x2f, 0x14, 0x60, 0x45, 0x24,
+ 0x04, 0x60, 0x02, 0x21, 0x20, 0x90, 0x00, 0x62, 0x80, 0x03, 0x90, 0x00, 0x64, 0xe0, 0xfe, 0xa3,
+ 0xe0, 0x8e, 0x36, 0xf5, 0x37, 0x80, 0x7c, 0x90, 0x00, 0x70, 0x31, 0xa4, 0xd2, 0x15, 0x90, 0x00,
+ 0x68, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x6c, 0x80, 0x12, 0x90, 0x00, 0x72, 0x31, 0xa4,
+ 0xd2, 0x15, 0x90, 0x00, 0x66, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x6e, 0xee, 0xf0, 0xa3,
+ 0xef, 0xf0, 0x80, 0x4f, 0x90, 0x00, 0x78, 0x31, 0xa4, 0x31, 0xd6, 0xf5, 0x82, 0x8c, 0x83, 0xe0,
+ 0xfd, 0xd3, 0x94, 0x08, 0x50, 0x14, 0xe5, 0x35, 0xfb, 0x7a, 0x00, 0xef, 0x2b, 0xff, 0xea, 0x3e,
+ 0xfe, 0xc3, 0xef, 0x94, 0x40, 0xee, 0x94, 0x03, 0x40, 0x03, 0x7f, 0x17, 0x22, 0x90, 0x00, 0x78,
+ 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x75, 0xf0, 0x02, 0xed, 0x90, 0x00, 0x99, 0x12, 0x0d, 0x16, 0xee,
+ 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x00, 0x78, 0xe4, 0x85, 0x35, 0xf0, 0x12, 0x0b, 0xb0, 0x80, 0x03,
+ 0x7f, 0x17, 0x22, 0x90, 0x04, 0x88, 0xe0, 0x24, 0x04, 0xff, 0x12, 0x1d, 0x36, 0xa9, 0x07, 0x7b,
+ 0x01, 0x8b, 0x38, 0xf5, 0x39, 0x89, 0x3a, 0xfc, 0xad, 0x01, 0xe5, 0x35, 0xfb, 0x31, 0xb0, 0x30,
+ 0x15, 0x5f, 0xe5, 0x37, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x36, 0xf5, 0x83, 0xe0, 0x30, 0xe6,
+ 0x08, 0x90, 0x00, 0xb0, 0x74, 0x01, 0xf0, 0x80, 0x05, 0xe4, 0x90, 0x00, 0xb0, 0xf0, 0x90, 0x00,
+ 0xb9, 0xe0, 0x60, 0x3d, 0x31, 0xc4, 0x24, 0x17, 0xf0, 0x31, 0xc4, 0x04, 0xf0, 0xe5, 0x34, 0xb4,
+ 0x03, 0x0e, 0x90, 0x00, 0x71, 0xe0, 0x90, 0x00, 0x70, 0x31, 0xb9, 0x90, 0x00, 0x76, 0x80, 0x0c,
+ 0x90, 0x00, 0x73, 0xe0, 0x90, 0x00, 0x72, 0x31, 0xb9, 0x90, 0x00, 0x74, 0xe0, 0xfe, 0xa3, 0xe0,
+ 0xaa, 0x06, 0x75, 0x38, 0x01, 0x8a, 0x39, 0xf5, 0x3a, 0xac, 0x39, 0xad, 0x3a, 0x7b, 0x17, 0x31,
+ 0xb0, 0x7f, 0x00, 0x22, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xac, 0x06, 0x8c, 0x36, 0xf5, 0x37, 0x22,
+ 0x7a, 0x00, 0xaf, 0x37, 0xae, 0x36, 0x02, 0x19, 0x58, 0x25, 0x35, 0xff, 0xe0, 0x34, 0x00, 0xf5,
+ 0x36, 0x8f, 0x37, 0x22, 0x74, 0x02, 0x25, 0x37, 0xf5, 0x37, 0xe4, 0x35, 0x36, 0xf5, 0x36, 0x85,
+ 0x37, 0x82, 0xf5, 0x83, 0xe0, 0x22, 0x90, 0x04, 0x87, 0xe0, 0xfc, 0xa3, 0xe0, 0x22, 0x90, 0x00,
+ 0xae, 0xe0, 0xb4, 0x02, 0x03, 0x7f, 0x18, 0x22, 0xef, 0x24, 0xfe, 0x60, 0x13, 0x14, 0x60, 0x19,
+ 0x14, 0x60, 0x20, 0x24, 0x03, 0x70, 0x2f, 0x90, 0x00, 0x62, 0x51, 0x5b, 0x7e, 0x12, 0x80, 0x29,
+ 0x90, 0x00, 0x64, 0x51, 0x5b, 0x7e, 0x0a, 0x80, 0x20, 0x90, 0x00, 0x68, 0x51, 0x5b, 0x90, 0x00,
+ 0x68, 0x80, 0x08, 0x90, 0x00, 0x66, 0x51, 0x5b, 0x90, 0x00, 0x66, 0x51, 0x7e, 0x90, 0x00, 0x02,
+ 0x12, 0x0b, 0x4f, 0xfe, 0x80, 0x03, 0x7f, 0x17, 0x22, 0x51, 0x6d, 0xe4, 0xf0, 0xa3, 0xee, 0xf0,
+ 0x74, 0x03, 0x51, 0x74, 0x74, 0x24, 0x51, 0x6c, 0xe0, 0x90, 0x04, 0x85, 0x51, 0x6c, 0xa3, 0xe0,
+ 0x90, 0x04, 0x86, 0xf0, 0xee, 0x24, 0x02, 0xff, 0xe5, 0x35, 0x24, 0x02, 0xfd, 0xe4, 0x35, 0x34,
+ 0xfa, 0xa9, 0x05, 0x7b, 0x01, 0x12, 0x2d, 0x51, 0x7f, 0x00, 0x22, 0xe0, 0xfe, 0xa3, 0xe0, 0x24,
+ 0xfe, 0xf9, 0xee, 0x34, 0xff, 0xaf, 0x01, 0xf5, 0x34, 0x8f, 0x35, 0x22, 0xf0, 0x85, 0x35, 0x82,
+ 0x85, 0x34, 0x83, 0x22, 0x90, 0x04, 0x83, 0xf0, 0x90, 0x04, 0x84, 0x22, 0xe0, 0xfe, 0xa3, 0xe0,
+ 0xaa, 0x06, 0xf9, 0x7b, 0x01, 0x22, 0x8f, 0x2e, 0x12, 0x2e, 0xfe, 0x64, 0x01, 0x60, 0x0a, 0x90,
+ 0x00, 0xb7, 0x74, 0x11, 0xf0, 0xa3, 0x74, 0x3d, 0xf0, 0x90, 0x00, 0xb7, 0xe0, 0xfe, 0xa3, 0xe0,
+ 0x24, 0x04, 0x30, 0x1e, 0x08, 0x12, 0x17, 0xa6, 0x74, 0x05, 0xf0, 0x80, 0x05, 0x12, 0x17, 0xa6,
+ 0x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00, 0x00, 0x00, 0x00, 0xe5, 0x35, 0x60, 0x10, 0xe5, 0x19, 0x70, 0x0c, 0x90, 0x04,
+ 0x2a, 0xe0, 0x70, 0x04, 0xa3, 0xe0, 0x64, 0x80, 0x60, 0x1c, 0x12, 0x1f, 0xb9, 0xef, 0x70, 0x18,
+ 0x91, 0x21, 0x70, 0x0a, 0xa3, 0xe0, 0x70, 0x06, 0xa3, 0xe0, 0x54, 0xe0, 0x60, 0x0a, 0x12, 0x14,
+ 0xbf, 0x74, 0x01, 0xf0, 0x80, 0x02, 0xd2, 0x2a, 0xe4, 0x90, 0xe6, 0x18, 0xf0, 0xa3, 0x74, 0x20,
+ 0xf0, 0xe5, 0x19, 0x60, 0x03, 0x75, 0x19, 0x37, 0xb1, 0x1e, 0xff, 0x60, 0x04, 0x90, 0xe2, 0x34,
+ 0xf0, 0xe5, 0x35, 0x60, 0x10, 0x20, 0x22, 0x0d, 0xb1, 0x13, 0x60, 0x03, 0x12, 0x46, 0x1b, 0x85,
+ 0x19, 0x5b, 0x12, 0x45, 0x15, 0xb1, 0x48, 0xaf, 0x19, 0x22, 0xab, 0x36, 0xaa, 0x37, 0xa9, 0x38,
+ 0x22, 0x90, 0xe2, 0x08, 0xe0, 0x54, 0x03, 0x22, 0x7e, 0x32, 0xef, 0x60, 0x31, 0x12, 0x37, 0x8c,
+ 0x30, 0x27, 0x02, 0x7e, 0x0a, 0xaf, 0x06, 0x1e, 0xef, 0x60, 0x08, 0x90, 0x00, 0x7a, 0xe0, 0xf5,
+ 0x3b, 0x80, 0xf2, 0xe5, 0xaa, 0x20, 0xe0, 0x09, 0x90, 0xe6, 0x49, 0x74, 0x02, 0xf0, 0x00, 0x80,
+ 0xf2, 0x90, 0xe6, 0x18, 0x74, 0x30, 0xf0, 0x00, 0xe4, 0x90, 0xe6, 0x04, 0xf0, 0x22, 0xd3, 0xed,
+ 0x94, 0x01, 0xec, 0x94, 0x00, 0x40, 0x1c, 0x90, 0xe6, 0xa4, 0xe0,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31, 0x02,
+ 0x80, 0x2a, 0x90, 0xe2, 0x1f, 0x74, 0x05, 0xf0, 0x12, 0x25, 0xac, 0x71, 0xbf, 0xf0, 0x90, 0xfc,
+ 0x00, 0x74, 0x5a, 0xf0, 0xe4, 0x12, 0x2f, 0x87, 0x90, 0xe6, 0x9c, 0xf0, 0x74, 0x04, 0x71, 0xca,
+ 0x64, 0xa5, 0x60, 0x08, 0x90, 0xe2, 0x1f, 0x74, 0x01, 0xf0, 0x80, 0x0c, 0x75, 0x1a, 0x03, 0x75,
+ 0x1b, 0xb7, 0x85, 0x31, 0x1c, 0x12, 0x20, 0x55, 0x90, 0xe2, 0x1e, 0x74, 0x14, 0xf0, 0x22, 0x90,
+ 0xe6, 0x15, 0x74, 0x22, 0xf0, 0xe4, 0x90, 0xe6, 0x1b, 0x22, 0xa3, 0xf0, 0xff, 0x12, 0x27, 0x96,
+ 0x90, 0xfc, 0x00, 0xe0, 0x22, 0xe4, 0xff, 0x12, 0x27, 0x84, 0x90, 0xe2, 0x1e, 0x74, 0x40, 0xf0,
+ 0x22, 0xe5, 0x19, 0x70, 0x12, 0x12, 0x1f, 0xf1, 0x75, 0x1c, 0x02, 0xe4, 0xfb, 0x7d, 0x26, 0x7f,
+ 0x40, 0x12, 0x20, 0x5d, 0x12, 0x27, 0xcb, 0x22, 0x12, 0x2e, 0xfe, 0x60, 0x03, 0xed, 0x60, 0x07,
+ 0x7d, 0x0a, 0x7f, 0x02, 0x02, 0x2a, 0xeb, 0xeb, 0x14, 0x60, 0x12, 0x14, 0x60, 0x17, 0x24, 0x02,
+ 0x70, 0x1c, 0x75, 0x2b, 0x04, 0x75, 0x2c, 0x45, 0x75, 0x2d, 0x05, 0x80, 0x11, 0x75, 0x2b, 0x04,
+ 0x75, 0x2c, 0x4a, 0x80, 0x06, 0x75, 0x2b, 0x04, 0x75, 0x2c, 0x5b, 0x75, 0x2d, 0x11, 0x90, 0x04,
+ 0x83, 0x74, 0x02, 0xf0, 0x90, 0x04, 0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 0xfd, 0x22, 0x90,
+ 0x03, 0x51, 0xe0, 0xfb, 0xad, 0x28, 0xaf, 0x27, 0x22, 0xe4, 0xfb, 0x7d, 0x26, 0x7f, 0xdc, 0x22,
+ 0x90, 0xe2, 0x0b, 0xe0, 0x54, 0x78, 0x13, 0x13, 0x13, 0x22, 0x74, 0x74, 0x25, 0x51, 0xf5, 0x82,
+ 0xe4, 0x34, 0x04, 0x22, 0x85, 0xe8, 0x5a, 0xe4, 0xf5, 0xe8, 0x02, 0x0e, 0xa1, 0x78, 0x34, 0x7c,
+ 0x00, 0x7a, 0x00, 0x79, 0x0c, 0x22, 0x90, 0xe2, 0x33, 0xf0, 0x12, 0x1e, 0xe2, 0xe4, 0x22, 0xc2,
+ 0xe8, 0x90, 0xe6, 0xb5, 0x74, 0x01, 0xf0, 0x22, 0x90, 0xe2, 0x34, 0xf0, 0x02, 0x1e, 0xe2, 0x90,
+ 0x04, 0xb0, 0xe0, 0xfd, 0x7c, 0x00, 0x22, 0xe4, 0x78, 0x5c, 0xf2, 0x78, 0x5e, 0xf2, 0x22, 0x34,
+ 0x01, 0xfe, 0xf0, 0xa3, 0xef, 0xf0, 0x22, 0x00
+ }
+} ;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyastoria.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,35 @@
+/* Cypress West Bridge API header file (cyastioch.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASTORIA_H_
+#define _INCLUDED_CYASTORIA_H_
+
+#if !defined(__doxygen__)
+
+#include "cyaserr.h"
+#include "cyasmisc.h"
+#include "cyasstorage.h"
+#include "cyasusb.h"
+#include "cyasch9.h"
+
+#endif
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyastsdkversion.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,30 @@
+/* Cypress Astoria Sdk Version file (cyastsdkversion.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASTSDK_VERSION_H_
+#define _INCLUDED_CYASTSDK_VERSION_H_
+
+/* Astoria SDK version 1.2.1 */
+#define CYAS_MAJOR_VERSION (1)
+#define CYAS_MINOR_VERSION (2)
+#define CYAS_BUILD_NUMBER (197)
+
+#endif /*_INCLUDED_CYASTSDK_VERSION_H_*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyastypes.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,66 @@
+/* Cypress West Bridge API header file (cyastypes.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASTYPES_H_
+#define _INCLUDED_CYASTYPES_H_
+
+#include "cyashaldef.h"
+
+/* Types that are not available on specific platforms.
+ * These are used only in the reference HAL implementations and
+ * are not required for using the API.
+ */
+#ifdef __unix__
+typedef unsigned long DWORD;
+typedef void * LPVOID;
+#define WINAPI
+#define INFINITE (0xFFFFFFFF)
+#define PtrToUint(ptr) ((unsigned int)(ptr))
+#endif
+
+/* Basic types used by the entire API */
+
+/* Summary
+ This type represents an endpoint number
+*/
+typedef uint8_t CyAsEndPointNumber_t ;
+
+/* Summary
+ This type is used to return status information from an API call.
+*/
+typedef uint16_t CyAsReturnStatus_t ;
+
+/* Summary
+ This type represents a bus number
+*/
+typedef uint32_t CyAsBusNumber_t ;
+
+/* Summary
+ All APIs provided with this release are marked extern through this definition.
+ This definition can be changed to meet the scope changes required in the user
+ build environment.
+
+ For example, this can be changed to __declspec(exportdll) to enable exporting
+ the API from a DLL.
+ */
+#define EXTERN extern
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasusb.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1407 @@
+/* Cypress West Bridge API header file (cyasusb.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASUSB_H_
+#define _INCLUDED_CYASUSB_H_
+
+#include "cyasmisc.h"
+
+#include "cyas_cplus_start.h"
+
+/*@@Enumeration Model
+ Summary
+ The USB enumeration process is the process of communicating to the USB host information
+ about the capabilities of the connected device. This process is completed by servicing
+ requests for various types of descriptors. In the software APIs described below, this
+ process is controlled in one of two ways.
+
+ Description
+ There are advantages to either type of enumeration and this is why both models are supported.
+ P Port processor based enumeraton gives the P port processor maximum control and flexibility
+ for providing USB configuration information. However, this does require (near) real time data
+ responses from the P port processor during the enumeration process. West Bridge based enumeration
+ requires no real time information from the P port processor, ensuring the fastest possible
+ enumeration times.
+
+ * P Port Based Enumeration *
+ The first method for handling USB enumeration is for the processor client to handle all
+ endpoint zero requests for descriptors. This mode is configured by indicating to the API
+ that the processor wants to handle all endpoint zero requests. This is done by setting
+ bit 0 in the end_point_mask to a 1. The processor uses CyAsUsbReadDataAsync() to read
+ the request and CyAsUsbWriteDataAsync() to write the response.
+
+ * West Bridge Based Enumeration *
+ The second method for handling USB enumeration is the configuration information method.
+ Before enabling a connection from the West Bridge device to the USB connector, the P Port
+ processor sends information about the USB configuration to West Bridge through the configuration
+ APIs. This information is stored within the West Bridge device. When a USB cable is attached,
+ the West Bridge device then handles all descriptor requests based on the stored information.
+ Note that this method of enumeration only supports a single USB configuration.
+
+ In either model of enumeration, the processor client is responsible for ensuring that
+ the system meets USB Chapter 9 compliance requirements. This can be done by providing spec
+ compliant descriptors, and handling any setup packets that are sent to the client
+ appropriately.
+
+ Mass storage class compliance will be ensured by the West Bridge firmware when the mass
+ storage functionality is enabled.
+*/
+
+/*@@Endpoint Configuration
+ Summary
+ The West Bridge device has one 64-byte control endpoint, one 64-byte low bandwidth endpoint, four bulk
+ endpoints dedicated for mass storage usage, and up to ten bulk/interrupt/isochronous
+ endpoints that can be used for USB-to-Processor communication.
+
+ Description
+ The four storage endpoints (Endpoints 2, 4, 6 and 8) are reserved for accessing storage
+ devices attached to West Bridge and are not available for use by the processor. These are
+ used implicitly when using the storage API to read/write to the storage media.
+
+ Endpoint 0 is the standard USB control pipe used for all enumeration activity. Though
+ the endpoint buffer is not directly accessible from the processor, read/write activity
+ can be performed on this endpoint through the API layers. This endpoint is always
+ configured as a bi-directional control endpoint.
+
+ Endpoint 1 is a 64-byte endpoint that can be used for low bandwidth bulk/interrupt
+ activity. The physical buffer is not accessible from the processor, but can be read/written
+ through the API. As the data coming to this endpoint is being handled through the
+ software layers, there can be loss of data if a read call is not waiting when an OUT
+ packet arrives.
+
+ Endpoints 3, 5, 7, 9, 10, 11, 12, 13, 14 and 15 are ten configurable endpoints
+ mapped to parts of a total 4 KB FIFO buffer space on the West Bridge device. This 4 KB
+ physical buffer space is divided into up to four endpoints called PEP1, PEP2, PEP3 and PEP4
+ in this software document. There are multiple configurations in which this buffer space
+ can be used, and the size and number of buffers available to each physical endpoint
+ vary between these configurations. See the West Bridge PDD for details on the buffer
+ orientation corresponding to each configuration.
+
+ * Note *
+ PEPs 1, 2, 3 and 4 are called Physical EP 3, 5, 7 and 9 in the West Bridge PDD. The
+ sequential number scheme is used in the software to disambiguate these from the logical
+ endpoint numbers, and also for convenience of array indexing.
+*/
+
+#if !defined(__doxygen__)
+
+
+#endif
+
+/* Summary
+ This constants defines the maximum size of a USB descriptor when referenced via the
+ CyAsUsbSetDescriptor or CyAsUsbGetDescriptor functions.
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * CyAsUsbGetDescriptor
+*/
+#define CY_AS_MAX_USB_DESCRIPTOR_SIZE (128)
+
+/*****************************************************************************
+ * West Bridge Types
+ ****************************************************************************/
+
+
+/* Summary
+ This data structure is the data passed via the evdata paramater on a usb event
+ callback for the inquiry request.
+
+ Description
+ When a SCSI inquiry request arrives via the USB connection and the P Port has asked
+ to receive inquiry requests, this request is forwarded to the client via the USB
+ callback. This callback is called twice, once before the inquiry data is forwarded
+ to the host (CyAsEventUsbInquiryBefore) and once after the inquiry has been sent to the
+ USB host (CyAsEventUsbInquiryAfter). The evdata parameter is a pointer to this data
+ structure.
+
+ *CyAsEventUsbInquiryBefore*
+ If the client just wishes to see the inquiry request and associated data, then a simple
+ return from the callback will forward the inquiry response to the USB host. If the
+ client wishes to change the data returned to the USB host, the updated parameter must
+ be set to CyTrue and the memory area address by the data parameter should be updated.
+ The data pointer can be changed to point to a new memory area and the length field
+ changed to change the amount of data returned from the inquiry request. Note that the
+ data area pointed to by the data parameter must remain valid and the contents must
+ remain consistent until after the CyAsEventUsbInquiryAfter event has occurred. THE LENGTH
+ MUST BE LESS THAN 192 BYTES OR THE CUSTOM INQUIRY RESPONSE WILL NOT BE RETURNED. If the
+ length is too long, the default inquiry response will be returned.
+
+ *CyAsEventUsbInquiryAfter*
+ If the client needs to free any data, this event signals that the data associated with
+ the inquiry is no longer needed.
+
+ See Also
+ * CyAsUsbEventCallback
+ * CyAsUsbRegisterCallback
+*/
+typedef struct CyAsUsbInquiryData
+{
+ CyAsBusNumber_t bus ; /* The bus for the event */
+ uint32_t device ; /* The device the event */
+ uint8_t evpd ; /* The EVPD bit from the SCSI INQUIRY request */
+ uint8_t codepage ; /* The codepage in the inquiry request */
+ CyBool updated ; /* This bool must be set to CyTrue indicate that the inquiry
+ data was changed */
+ uint16_t length ; /* The length of the data */
+ void *data ; /* The inquiry data */
+} CyAsUsbInquiryData ;
+
+
+/* Summary
+ This data structure is the data passed via the evdata parameter on a usb event
+ callback for the unknown mass storage request.
+
+ Description
+ When a SCSI request is made that the mass storage firmware in West Bridge does not
+ know how to process, this request is passed to the processor for handling via
+ the usb callback. This data structure is used to pass the request and the
+ associated response. The user may set the status to indicate the status of the
+ request. The status value is the bCSWStatus value from the USB mass storage
+ Command Status Wrapper (0 = command passed, 1 = command failed). If the status
+ is set to command failed (1), the sense information should be set as well. For
+ more information about sense information, see the USB mass storage specification
+ as well as the SCSI specifications for block devices. By default the status is
+ initialized to 1 (failure) with a sense information of 05h/20h/00h which
+ indicates INVALID COMMAND.
+*/
+typedef struct CyAsUsbUnknownCommandData
+{
+ CyAsBusNumber_t bus ; /* The bus for the event */
+ uint32_t device ; /* The device for the event */
+ uint16_t reqlen ; /* The length of the requst (should be 16 bytes) */
+ void *request ; /* The request */
+
+ uint8_t status ; /* The returned status value for the command */
+ uint8_t key ; /* If status is failed, the sense key */
+ uint8_t asc ; /* If status is failed, the additional sense code */
+ uint8_t ascq ; /* If status if failed, the additional sense code qualifier */
+} CyAsUsbUnknownCommandData ;
+
+
+/* Summary
+ This data structure is the data passed via the evdata paramater on a usb event
+ callback for the start/stop request.
+
+ Description
+ When a SCSI start stop request arrives via the USB connection and the P Port has asked
+
+ See Also
+ * CyAsUsbEventCallback
+ * CyAsUsbRegisterCallback
+*/
+typedef struct CyAsUsbStartStopData
+{
+ CyAsBusNumber_t bus ; /* The bus for the event */
+ uint32_t device ; /* The device for the event */
+ CyBool start ; /* CyTrue means start request, CyFalse means stop request */
+ CyBool loej ; /* CyTrue means LoEj bit set, otherwise false */
+} CyAsUsbStartStopData ;
+
+/* Summary
+ This data type is used to indicate which mass storage devices are enumerated.
+
+ Description
+
+ See Also
+ * CyAsUsbEnumControl
+ * CyAsUsbSetEnumConfig
+*/
+typedef enum CyAsUsbMassStorageEnum
+{
+ CyAsUsbNandEnum = 0x01,
+ CyAsUsbSDEnum = 0x02,
+ CyAsUsbMMCEnum = 0x04,
+ CyAsUsbCEATAEnum = 0x08
+} CyAsUsbMassStorageEnum ;
+
+/* Summary
+ This data type specifies the type of descriptor to transfer to the West Bridge device
+
+ Description
+ During enumeration, if West Bridge is handling enumeration, the West Bridge device needs to USB descriptors
+ to complete the enumeration. The function CyAsUsbSetDescriptor() is used to transfer the descriptors
+ to the West Bridge device. This type is an argument to that function and specifies which descriptor
+ is being transferred.
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * CyAsUsbGetDescriptor
+*/
+typedef enum CyAsUsbDescType
+{
+ CyAsUsbDescDevice = 1, /* A device descriptor - See USB 2.0 specification Chapter 9 */
+ CyAsUsbDescDeviceQual = 2, /* A device descriptor qualifier - See USB 2.0 specification Chapter 9 */
+ CyAsUsbDescFSConfiguration = 3, /* A configuration descriptor for FS operation - See USB 2.0 specification Chapter 9 */
+ CyAsUsbDescHSConfiguration = 4, /* A configuration descriptor for HS operation - See USB 2.0 specification Chapter 9 */
+ CyAsUsbDescString = 5
+} CyAsUsbDescType ;
+
+/* Summary
+ This type specifies the direction of an endpoint
+
+ Description
+ This type is used when configuring the endpoint hardware to specify the direction
+ of the endpoint.
+
+ See Also
+ * CyAsUsbEndPointConfig
+ * CyAsUsbSetEndPointConfig
+ * CyAsUsbGetEndPointConfig
+*/
+typedef enum CyAsUsbEndPointDir
+{
+ CyAsUsbIn = 0, /* The endpoint direction is IN (West Bridge -> USB Host) */
+ CyAsUsbOut = 1, /* The endpoint direction is OUT (USB Host -> West Bridge) */
+ CyAsUsbInOut = 2 /* The endpoint direction is IN/OUT (valid only for EP 0 & 1) */
+} CyAsUsbEndPointDir ;
+
+/* Summary
+ This type specifies the type of an endpoint
+
+ Description
+ This type is used when configuring the endpoint hardware to specify the type of
+ endpoint.
+
+ See Also
+ * CyAsUsbEndPointConfig
+ * CyAsUsbSetEndPointConfig
+ * CyAsUsbGetEndPointConfig
+*/
+typedef enum CyAsUsbEndPointType
+{
+ CyAsUsbControl,
+ CyAsUsbIso,
+ CyAsUsbBulk,
+ CyAsUsbInt
+} CyAsUsbEndPointType ;
+
+/* Summary
+ This type is a structure used to indicate the top level configuration of the USB stack
+
+ Description
+ In order to configure the USB stack, the CyAsUsbSetEnumConfig() function is called to indicate
+ how mass storage is to be handled, the specific number of interfaces to be supported if
+ West Bridge is handling enumeration, and the end points of specifi interest. This structure
+ contains this information.
+
+ See Also
+ * CyAsUsbSetConfig
+ * CyAsUsbGetConfig
+ * <LINK Enumeration Model>
+*/
+typedef struct CyAsUsbEnumControl
+{
+ CyBool devices_to_enumerate[CY_AS_MAX_BUSES][CY_AS_MAX_STORAGE_DEVICES];
+ /* Designate which devices on which buses to enumerate */
+ CyBool antioch_enumeration ; /* If true, West Bridge will control enumeration. If this is false the
+ P port controls enumeration. If the P Port is controlling
+ enumeration, traffic will be received via endpoint zero. */
+ uint8_t mass_storage_interface ; /* This is the interface # to use for the mass storage interface,
+ if mass storage is enumerated. If mass storage is not enumerated
+ this value should be zero. */
+ uint8_t mtp_interface ; /* This is the interface # to use for the MTP interface,
+ if MTP is enumerated. If MTP is not enumerated
+ this value should be zero. */
+ CyBool mass_storage_callbacks ; /* If true, Inquiry, START/STOP, and unknown mass storage
+ requests cause a callback to occur for handling by the
+ baseband processor. */
+} CyAsUsbEnumControl ;
+
+
+/* Summary
+ This structure is used to configure a single endpoint
+
+ Description
+ This data structure contains all of the information required to configure the West Bridge hardware
+ associated with a given endpoint.
+
+ See Also
+ * CyAsUsbSetEndPointConfig
+ * CyAsUsbGetEndPointConfig
+*/
+typedef struct CyAsUsbEndPointConfig
+{
+ CyBool enabled ; /* If true, this endpoint is enabled */
+ CyAsUsbEndPointDir dir ; /* The direction of this endpoint */
+ CyAsUsbEndPointType type ; /* The type of endpoint */
+ CyAsEndPointNumber_t physical ; /* The physical endpoint #, 1, 2, 3, 4 */
+ uint16_t size ; /* The size of the endpoint in bytes */
+} CyAsUsbEndPointConfig ;
+
+/* Summary
+ List of partition enumeration combinations that can be selected on a partitioned
+ storage device.
+
+ Description
+ West Bridge firmware supports creating upto two partitions on mass storage
+ devices connected to West Bridge. When there are two partitions on a device,
+ the user can choose which of these partitions should be made visible to a USB
+ host through the mass storage interface. This enumeration lists the various
+ enumeration selections that can be made.
+
+ See Also
+ * CyAsStorageCreatePPartition
+ * CyAsStorageRemovePPartition
+ * CyAsUsbSelectMSPartitions
+ */
+typedef enum CyAsUsbMSType_t {
+ CyAsUsbMSUnit0 = 0, /* Enumerate only partition 0 as CD (autorun) device */
+ CyAsUsbMSUnit1, /* Enumerate only partition 1 as MS device (default setting) */
+ CyAsUsbMSBoth /* Enumerate both units */
+} CyAsUsbMSType_t ;
+
+/* Summary
+ This type specifies the type of USB event that has occurred
+
+ Description
+ This type is used in the USB event callback function to indicate the type of USB event
+ that has occurred. The callback function includes both this reasons for the callback
+ and a data parameter associated with the reason. The data parameter is used in a reason
+ specific way and is documented below with each reason.
+
+ See Also
+ * CyAsUsbIoCallback
+*/
+typedef enum CyAsUsbEvent
+{
+ CyAsEventUsbSuspend, /* This event is sent when West Bridge is put into the suspend
+ state by the USB host. The data parameter is not used and
+ will be zero. */
+ CyAsEventUsbResume, /* This event is sent when West Bridge is taken out of the
+ suspend state by the USB host. The data parameter is not
+ used and will be zero. */
+ CyAsEventUsbReset, /* This event is sent when a USB reset request is received
+ by the West Bridge device. The data parameter is not used and
+ will be zero. */
+ CyAsEventUsbSetConfig, /* This event is sent when a USB set configuration request is made.
+ The data parameter is a pointer to a uint16_t that contains the
+ configuration number. The configuration number may be zero to
+ indicate an unconfigure operation. */
+ CyAsEventUsbSpeedChange, /* This event is sent when the USB connection changes speed. This is
+ generally a transition from full speed to high speed. The parameter
+ to this event is a pointer to uint16_t that gives the speed of the
+ USB connection. Zero indicates full speed, one indicates high speed */
+ CyAsEventUsbSetupPacket, /* This event is sent when a setup packet is received. The data parameter
+ is a pointer to the eight bytes of setup data. */
+ CyAsEventUsbStatusPacket, /* This event is sent when a status packet is received. The data
+ parameter is not used. */
+ CyAsEventUsbInquiryBefore, /* This event is sent when mass storage receives an inquiry
+ request and we have asked to see these requests. */
+ CyAsEventUsbInquiryAfter, /* This event is sent when mass storage has finished processing an
+ inquiry request and any data associated with the request is no longer
+ required. */
+ CyAsEventUsbStartStop, /* This event is sent when mass storage receives a start/stop request and
+ we have asked to see these requests */
+ CyAsEventUsbClearFeature, /* This event is sent when a Clear Feature request is received. The data
+ parameter is the endpoint number. */
+ CyAsEventUsbUnknownStorage, /* This event is sent when mass storage receives a request that is not known
+ and we have asked to see these requests */
+ CyAsEventUsbMSCProgress /* This event is sent when the read/write activity on the USB mass
+ storage has crossed a pre-set level */
+} CyAsUsbEvent;
+
+/* Summary
+ This type is the type of a callback function that is called when a USB event occurs
+
+ Description
+ At times West Bridge needs to inform the P port processor of events that have
+ occurred. These events are asynchronous to the thread of control on the P
+ port processor and as such are generally delivered via a callback function that
+ is called as part of an interrupt handler. This type defines the type of function
+ that must be provided as a callback function for USB events.
+
+ See Also
+ * CyAsUsbEvent
+*/
+typedef void (*CyAsUsbEventCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsUsbEvent ev, /* The event type being reported */
+ void * evdata /* The data assocaited with the event being reported */
+) ;
+
+
+/* Summary
+ This type is the callback function called after an asynchronous USB read/write operation
+
+ Description
+ This function type defines a callback function that is called at the completion of any
+ asynchronous read or write operation.
+
+ See Also
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteDataAsync
+ * CY_AS_ERROR_CANCELED
+*/
+typedef void (*CyAsUsbIoCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsEndPointNumber_t ep, /* The endpoint that has completed an operation */
+ uint32_t count, /* THe amount of data transferred to/from USB */
+ void * buffer, /* The data buffer for the operation */
+ CyAsReturnStatus_t status /* The error status of the operation */
+) ;
+
+/* Summary
+ This type is the callback function called after asynchronous API functions have completed.
+
+ Description
+ When calling API functions from callback routines (interrupt handlers usually) the async version of
+ these functions must be used. This callback is called when an asynchronous API function has completed.
+*/
+typedef void (*CyAsUsbFunctionCallback)(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsReturnStatus_t status, /* The error status of the operation */
+ uint32_t client /* A client supplied 32 bit tag */
+) ;
+
+
+/*****************************************************************************
+ * West Bridge Functions
+ ****************************************************************************/
+
+/* Summary
+ This function starts the USB stack
+
+ Description
+ This function initializes the West Bridge USB software stack if it has not yet been stared.
+ This initializes any required data structures and powers up any USB specific portions of
+ the West Bridge hardware. If the stack had already been started, the USB stack reference count
+ is incremented.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Notes
+ This function cannot be called from any type of West Bridge callback.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_SUCCESS - the stack initialized and is ready for use
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+
+ See Also
+ * CyAsUsbStop
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbStart(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function stops the USB stack
+
+ Description
+ This function decrements the reference count for the USB stack and if this count
+ is zero, the USB stack is shut down. The shutdown frees all resources associated
+ with the USB stack.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ While all resources associated with the USB stack will be freed is a shutdown occurs,
+ resources associated with underlying layers of the software will not be freed if they
+ are shared by the storage stack and the storage stack is active. Specifically the DMA manager,
+ the interrupt manager, and the West Bridge communications module are all shared by both the
+ USB stack and the storage stack.
+
+ Returns
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+
+ See Also
+ * CyAsUsbStart
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbStop(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function registers a callback function to be called when an asynchronous USB event occurs
+
+ Description
+ When asynchronous USB events occur, a callback function can be called to alert the calling program. This
+ functions allows the calling program to register a callback.
+
+ * Valid In Asynchronous Callback: YES
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbRegisterCallback(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbEventCallback callback /* The function to call */
+ ) ;
+
+
+/* Summary
+ This function connects the West Bridge device D+ and D- signals physically to the USB host.
+
+ Description
+ The West Bridge device has the ability to programmatically disconnect the USB pins on the device
+ from the USB host. This feature allows for re-enumeration of the West Bridge device as a different
+ device when necessary. This function connects the D+ and D- signal physically to the USB host
+ if they have been previously disconnnected.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+
+ See Also
+ * CyAsUsbDisconnect
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbConnect(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function disconnects the West Bridge device D+ and D- signals physically from the USB host.
+
+ Description
+ The West Bridge device has the ability to programmatically disconnect the USB pins on the device
+ from the USB host. This feature allows for re-enumeration of the West Bridge device as a different
+ device when necessary. This function disconnects the D+ and D- signal physically from the USB host
+ if they have been previously connected.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+
+ See Also
+ * CyAsUsbConnect
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbDisconnect(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function configures the USB stack
+
+ Description
+ This function is used to configure the USB stack. It is used to indicate which endpoints are going to
+ be used, and how to deal with the mass storage USB device within West Bridge.
+
+ * Valid In Asynchronous Callback: Yes (if cb supplied)
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+
+ See Also
+ * CyAsUsbGetEnumConfig
+ * CyAsUsbEnumControl
+ */
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetEnumConfig(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbEnumControl * config_p, /* The USB configuration information */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function retreives the current configuration of the USB stack
+
+ Description
+ This function sends a request to West Bridge to retreive the current configuration
+
+ * Valid In Asynchronous Callback: Yes (if cb supplied)
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+
+ See Also
+ * CyAsUsbSetConfig
+ * CyAsUsbConfig
+ */
+EXTERN CyAsReturnStatus_t
+CyAsUsbGetEnumConfig(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbEnumControl* config_p, /* The return value for USB congifuration information */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function sets the USB descriptor
+
+ Description
+ This function is used to set the various descriptors assocaited with the USB enumeration
+ process. This function should only be called when the West Bridge enumeration model is selected.
+ Descriptors set using this function can be cleared by stopping the USB stack, or by calling
+ the CyAsUsbClearDescriptors function.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Notes
+ These descriptors are described in the USB 2.0 specification, Chapter 9.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_DESCRIPTOR - the descriptor passed is not valid
+ * CY_AS_ERROR_BAD_INDEX - a bad index was given for the type of descriptor given
+ * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor doing enumeration
+
+ See Also
+ * CyAsUsbGetDescriptor
+ * CyAsUsbClearDescriptors
+ * <LINK Enumeration Model>
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetDescriptor(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbDescType type, /* The type of descriptor */
+ uint8_t index, /* Only valid for string descriptors */
+ void * desc_p, /* The descriptor to be transferred */
+ uint16_t length, /* The length of the descriptor in bytes */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function clears all user descriptors stored on the West Bridge.
+
+ Description
+ This function is used to clear all descriptors that were previously
+ stored on the West Bridge through CyAsUsbSetDescriptor calls, and go back
+ to the default descriptor setup in the firmware. This function should
+ only be called when the Antioch enumeration model is selected.
+
+ * Valid In Asynchronous Callback: Yes (if cb supplied)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - all descriptors cleared successfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor is doing enumeration
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * <LINK Enumeration Model>
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbClearDescriptors(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+/* Summary
+ This structure contains the descriptor buffer to be filled by CyAsUsbGetDescriptor API.
+
+ Description
+ This data structure the buffer to hold the descriptor data, and an in/out parameter ti indicate the
+ lenght of the buffer and descriptor data in bytes.
+
+ See Also
+ * CyAsUsbGetDescriptor
+*/
+typedef struct CyAsGetDescriptorData
+{
+ void * desc_p; /* The buffer to hold the returned descriptor */
+ uint32_t length; /* This is an input and output parameter. Before the code this pointer
+ points to a uint32_t that contains the length of the buffer. After
+ the call, this value contains the amount of data actually returned. */
+
+} CyAsGetDescriptorData ;
+
+/* Summary
+ This function retreives a given descriptor from the West Bridge device
+
+ Description
+ This function retreives a USB descriptor from the West Bridge device. This function should only be called when the
+ West Bridge enumeration model is selected.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Notes
+ These descriptors are described in the USB 2.0 specification, Chapter 9.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_BAD_INDEX - a bad index was given for the type of descriptor given
+ * CY_AS_ERROR_BAD_ENUMERATION_MODE - this function cannot be called if the P port processor doing enumeration
+
+ See Also
+ * CyAsUsbSetDescriptor
+ * <LINK Enumeration Model>
+*/
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbGetDescriptor(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbDescType type, /* The type of descriptor */
+ uint8_t index, /* Index for string descriptor */
+ CyAsGetDescriptorData * data, /* Parameters and return value for the get descriptor call */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function sets the configuration of the physical endpoints into one of the
+ twelve supported configuration
+
+ Description
+ USB endpoints are mapped onto one of four physical endpoints in the device. Therefore
+ USB endpoints are known as logical endpoints and these logical endpoints are mapped to
+ one of four physical endpoints. In support of these four physical endpoints there is
+ four kilo-bytes of buffer spaces that can be used as buffers for these physical endpoints.
+ This 4K of buffer space can be configured in one of twelve ways. This function sets the
+ buffer configuration for the physical endpoints.
+
+ * Config 1: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 512), PEP4 (2 * 512)
+ * Config 2: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (4 * 512), PEP4 (N/A)
+ * Config 3: PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 1024), PEP4(N/A)
+ * Config 4: PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512)
+ * Config 5: PEP1 (4 * 512), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A)
+ * Config 6: PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A)
+ * Config 7: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512)
+ * Config 8: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A)
+ * Config 9: PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A)
+ * Config 10: PEP1 (3 * 512), PEP2 (N/A), PEP3 (3 * 512), PEP4 (2 * 512)
+ * Config 11: PEP1 (3 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (2 * 512)
+ * Config 12: PEP1 (4 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (N/A)
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_CONFIGURATION - the configuration given is not between 1 and 12
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetPhysicalConfiguration(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ uint8_t config /* The physical endpoint configuration number */
+ ) ;
+
+/* Summary
+ This function sets the hardware configuration for a given endpoint
+
+ Description
+ This function sets the hardware configuration for a given endpoint. This is the method to set the
+ direction of the endpoint, the type of endpoint, the size of the endpoint buffer, and the buffering
+ style for the endpoint.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ Add documentation about endpoint configuration limitations
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
+ * CY_AS_ERROR_INVALID_CONFIGURATION - the endpoint configuration given is not valid
+ * CY_AS_ERROR_ENDPOINT_CONFIG_NOT_SET - the physical endpoint configuration is not set
+
+ See Also
+ * CyAsUsbGetEndPointConfig
+ * CyAsUsbEndPointConfig
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetEndPointConfig(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsUsbEndPointConfig * config_p /* The configuration information for the endpoint */
+ ) ;
+
+/* Summary
+ This function retreives the hardware configuration for a given endpoint
+
+ Description
+ This function gets the hardware configuration for the given endpoint. This include information about
+ the direction of the endpoint, the type of endpoint, the size of the endpoint buffer, and the buffering
+ style for the endpoint.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
+
+ See Also
+ * CyAsUsbSetEndPointConfig
+ * CyAsUsbEndPointConfig
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbGetEndPointConfig(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest*/
+ CyAsUsbEndPointConfig * config_p /* The return value containing the endpoint config information */
+ ) ;
+
+/* Summary
+ This function commits the configuration information that has previously been set.
+
+ Description
+ The initialization process involves calling CyAsUsbSetEnumConfig() and CyAsUsbSetEndPointConfig(). These
+ functions do not actually send the configuration information to the West Bridge device. Instead, these
+ functions store away the configuration information and this CyAsUsbCommitConfig() actually finds the
+ best hardware configuration based on the requested endpoint configuration and sends thsi optimal
+ confiuration down to the West Bridge device.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - a configuration was found and sent to West Bridge
+ * CY_AS_ERROR_NOT_CONFIGURED - the West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - the firmware has not been loaded into West Bridge
+ * CY_AS_ERROR_INVALID_CONFIGURATION - the configuration requested is not possible
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+
+ See Also
+ * CyAsUsbSetEndPointConfig
+ * CyAsUsbSetEnumConfig
+*/
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbCommitConfig(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function reads data from a USB endpoint.
+
+ Description
+ This function reads data from an OUT. This function blocks until the read is complete.
+ If this is a packet read, a single received USB packet will complete the read. If this
+ is not a packet read, this function will block until all of the data requested has been
+ recevied.
+
+ * Valid In Asynchronous Callback: NO
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
+
+ See Also
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteData
+ * CyAsUsbWriteDataAsync
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbReadData(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyBool pktread, /* If CyTrue, this is a packet read */
+ uint32_t dsize, /* The amount of data to read */
+ uint32_t * dataread, /* The amount of data read */
+ void * data /* The buffer to hold the data read */
+ ) ;
+
+/* Summary
+ This function reads data from a USB endpoint
+
+ Description
+ This function reads data from an OUT endpoint. This function will return immediately and
+ the callback provided will be called when the read is complete. If this is a packet read,
+ then the callback will be called on the next received packet. If this is not a packet read,
+ the callback will be called when the requested data is received.
+
+ * Valid In Asynchronous Callback: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
+
+ See Also
+ * CyAsUsbReadData
+ * CyAsUsbWriteData
+ * CyAsUsbWriteDataAsync
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbReadDataAsync(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyBool pktread, /* If CyTrue, this is a packet read */
+ uint32_t dsize, /* The amount of data to read */
+ void * data, /* The buffer for storing the data */
+ CyAsUsbIoCallback callback /* The callback function to call when the data is read */
+ ) ;
+
+/* Summary
+ This function writes data to a USB endpoint
+
+ Description
+ This function writes data to an IN endpoint data buffer. Multiple USB packets may be sent
+ until all data requested has been sent. This function blocks until all of the data has been sent.
+
+ * Valid In Asynchronous Callback: NO
+
+ Notes
+ Calling this function with a dsize of zero will result in a zero length packet transmitted to the
+ USB host.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
+
+ See Also
+ * CyAsUsbReadData
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteDataAsync
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbWriteData(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint to write data to */
+ uint32_t dsize, /* The size of the data to write */
+ void * data /* The data buffer */
+ ) ;
+
+/* Summary
+ This function writes data to a USB endpoint
+
+ Description
+ This function writes data to an IN endpoint data buffer. This function returns immediately
+ and when the write completes, or if an error occurs, the callback function is called to indicate
+ completion of the write operation.
+
+ * Valid In Asynchronous Callback: YES
+
+ Notes
+ Calling this function with a dsize of zero will result in a zero length packet transmitted to the
+ USB host.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint parameter is invalid
+
+ See Also
+ * CyAsUsbReadData
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteData
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbWriteDataAsync(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint to write data to */
+ uint32_t dsize, /* The size of the data */
+ void * data, /* The buffer containing the data */
+ CyBool spacket, /* If true, send a short packet to terminate data */
+ CyAsUsbIoCallback callback /* The callback to call when the data is written */
+ ) ;
+
+/* Summary
+ This function aborts an outstanding asynchronous operation on a given endpoint
+
+ Description
+ This function aborts any outstanding operation that is pending on the given
+ endpoint.
+
+ * Valid In Asynchronous Callback: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - this module was shut down sucessfully
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_ASYNC_NOT_PENDING - no asynchronous USB operation was pending
+
+ See Also
+ * CyAsUsbReadData
+ * CyAsUsbReadDataAsync
+ * CyAsUsbWriteData
+ * CyAsUsbWriteDataAsync
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbCancelAsync(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep /* The endpoint of interest */
+ ) ;
+
+/* Summary
+ This function sets a stall condition on a given endpoint
+
+ Description
+ This function sets a stall condition on the given endpoint. If the callback function
+ is not zero, the function is executed asynchronously and the callback is called when
+ the function is completed. If the callback function is zero, this function executes
+ synchronously and will not return until the function has completed.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsUsbGetStall
+ * CyAsUsbClearStall
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetStall(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+) ;
+
+/* Summary
+ This function clears a stall condition on a given endpoint
+
+ Description
+ This function clears a stall condition on the given endpoint. If the callback function
+ is not zero, the function is executed asynchronously and the callback is called when
+ the function is completed. If the callback function is zero, this function executes
+ synchronously and will not return until the function has completed.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsUsbGetStall
+ * CyAsUsbSetStall
+*/
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbClearStall(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+
+/* Summary
+ This function returns the stall status for a given endpoint
+
+ Description
+ This function returns the stall status for a given endpoint
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_INVALID_IN_CALLBACK
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsUsbGetStall
+ * CyAsUsbSetStall
+ * CyAsUsbClearStall
+*/
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbGetStall(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyBool * stall_p, /* The return value for the stall state */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function sets a NAK condition on a given endpoint
+
+ Description
+ This function sets a NAK condition on the given endpoint. If the callback function
+ is not zero, the function is executed asynchronously and the callback is called when
+ the function is completed. If the callback function is zero, this function executes
+ synchronously and will not return until the function has completed.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsUsbGetNak
+ * CyAsUsbClearNak
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetNak(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+) ;
+
+/* Summary
+ This function clears a NAK condition on a given endpoint
+
+ Description
+ This function clears a NAK condition on the given endpoint. If the callback function
+ is not zero, the function is executed asynchronously and the callback is called when
+ the function is completed. If the callback function is zero, this function executes
+ synchronously and will not return until the function has completed.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_INVALID_IN_CALLBACK (only if no cb supplied)
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsUsbGetNak
+ * CyAsUsbSetNak
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbClearNak(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function returns the NAK status for a given endpoint
+
+ Description
+ This function returns the NAK status for a given endpoint
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given was invalid, or was not configured as an OUT endpoint
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_INVALID_IN_CALLBACK
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+
+ See Also
+ * CyAsUsbSetNak
+ * CyAsUsbClearNak
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbGetNak(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyBool * nak_p, /* The return value for the stall state */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+) ;
+
+/* Summary
+ This function triggers a USB remote wakeup from the Processor API
+
+ Description
+ When there is a Suspend condition on the USB bus, this function programmatically takes the USB bus out of thi suspend state.
+
+ * Valid In Asynchronous Callback: YES (if cb supplied)
+ * Nestable: YES
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE
+ * CY_AS_ERROR_INVALID_IN_CALLBACK
+ * CY_AS_ERROR_OUT_OF_MEMORY
+ * CY_AS_ERROR_INVALID_RESPONSE
+ * CY_AS_ERROR_NOT_IN_SUSPEND
+
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbSignalRemoteWakeup(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ This function sets the threshold levels for mass storage progress reports from the West Bridge.
+
+ Description
+ The West Bridge firmware can be configured to track the amount of read/write activity on
+ the mass storage device, and send progress reports when the activity level has crossed a
+ threshold level. This function sets the threshold levels for the progress reports.
+ Set wr_sectors and rd_sectors to 0, if the progress reports are to be turned off.
+
+ * Valid In Asynchronous Callback: Yes (if cb supplied)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the function succeeded
+ * CY_AS_ERROR_NOT_RUNNING - the USB stack is not running
+ * CY_AS_ERROR_TIMEOUT - a timeout occurred communicating with the West Bridge device
+ * CY_AS_ERROR_INVALID_HANDLE - Bad handle
+ * CY_AS_ERROR_INVALID_IN_CALLBACK - Synchronous call made while in callback
+ * CY_AS_ERROR_OUT_OF_MEMORY - Failed allocating memory for request processing
+ * CY_AS_ERROR_NOT_SUPPORTED - Firmware version does not support mass storage progress tracking
+ * CY_AS_ERROR_INVALID_RESPONSE - Unexpected response from Firmware
+
+ See Also
+ * CyAsUsbMSCProgressData
+ * CyAsEventUsbMSCProgress
+*/
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetMSReportThreshold(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ uint32_t wr_sectors, /* Number of sectors written before report is sent */
+ uint32_t rd_sectors, /* Number of sectors read before report is sent */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+/* Summary
+ Specify which of the partitions on a partitioned mass storage device should be made visible to
+ USB.
+
+ Description
+ West Bridge firmware supports the creation of upto two partitions on mass storage devices
+ connected to the West Bridge device. When there are two partitions on a device, the user
+ can choose which of these partitions should be made visible to the USB host through the
+ USB mass storage interface. This function allows the user to configure the partitions that
+ should be enumerated. At least one partition should be selected through this API. If neither
+ partition needs to be enumerated, use CyAsUsbSetEnumConfig to control this.
+
+ * Valid in Asynchronous callback: Yes (if cb supplied)
+ * Nestable: Yes
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - operation completed successfully
+ * CY_AS_ERROR_INVALID_HANDLE - invalid handle to the West Bridge device
+ * CY_AS_ERROR_NOT_CONFIGURED - West Bridge device has not been configured
+ * CY_AS_ERROR_NO_FIRMWARE - no firmware running on West Bridge device
+ * CY_AS_ERROR_NOT_RUNNING - USB stack has not been started
+ * CY_AS_ERROR_IN_SUSPEND - West Bridge device is in suspend mode
+ * CY_AS_ERROR_INVALID_CALL_SEQUENCE - this API has to be called before CyAsUsbSetEnumConfig
+ * CY_AS_ERROR_OUT_OF_MEMORY - failed to get memory to process the request
+ * CY_AS_ERROR_NO_SUCH_UNIT - Storage device addressed has not been partitioned
+ * CY_AS_ERROR_NOT_SUPPORTED - operation is not supported by active device/firmware.
+
+ See Also
+ * CyAsStorageCreatePPartition
+ * CyAsStorageRemovePPartition
+ * CyAsUsbMsType_t
+ */
+EXTERN CyAsReturnStatus_t
+CyAsUsbSelectMSPartitions (
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsBusNumber_t bus, /* Bus index of the device being addressed */
+ uint32_t device, /* Device id of the device being addressed */
+ CyAsUsbMSType_t type, /* Selection of partitions to be enumerated */
+ CyAsFunctionCallback cb, /* The callback, if async call */
+ uint32_t client /* Client supplied data */
+ );
+
+/* For supporting deprecated functions */
+#include "cyasusb_dep.h"
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYASUSB_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasusb_dep.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,175 @@
+/* Cypress West Bridge API header file (cyasusb_dep.h)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+/*
+ * This header will contain Antioch specific declaration
+ * of the APIs that are deprecated in Astoria SDK. This is
+ * for maintaining backward compatibility.
+ */
+
+#ifndef __INCLUDED_CYASUSB_DEP_H__
+#define __INCLUDED_CYASUSB_DEP_H__
+
+#ifndef __doxygen__
+
+/*
+ This data structure is the data passed via the evdata paramater on a usb event
+ callback for the inquiry request.
+*/
+
+typedef struct CyAsUsbInquiryData_dep
+{
+ CyAsMediaType media ; /* The media for the event */
+ uint8_t evpd ; /* The EVPD bit from the SCSI INQUIRY request */
+ uint8_t codepage ; /* The codepage in the inquiry request */
+ CyBool updated ; /* This bool must be set to CyTrue indicate that the inquiry
+ data was changed */
+ uint16_t length ; /* The length of the data */
+ void *data ; /* The inquiry data */
+} CyAsUsbInquiryData_dep ;
+
+
+typedef struct CyAsUsbUnknownCommandData_dep
+{
+ CyAsMediaType media ; /* The media for the event */
+ uint16_t reqlen ; /* The length of the requst (should be 16 bytes) */
+ void *request ; /* The request */
+
+ uint8_t status ; /* The returned status value for the command */
+ uint8_t key ; /* If status is failed, the sense key */
+ uint8_t asc ; /* If status is failed, the additional sense code */
+ uint8_t ascq ; /* If status if failed, the additional sense code qualifier */
+} CyAsUsbUnknownCommandData_dep ;
+
+
+typedef struct CyAsUsbStartStopData_dep
+{
+ CyAsMediaType media ; /* The media type for the event */
+ CyBool start ; /* CyTrue means start request, CyFalse means stop request */
+ CyBool loej ; /* CyTrue means LoEj bit set, otherwise false */
+} CyAsUsbStartStopData_dep ;
+
+
+typedef struct CyAsUsbEnumControl_dep
+{
+ uint8_t enum_mass_storage ; /* The bits in this member determine which mass storage devices
+ are enumerated. See CyAsUsbMassStorageEnum for more details. */
+ CyBool antioch_enumeration ; /* If true, West Bridge will control enumeration. If this is false the
+ Pport controls enumeration. If the P Port is controlling
+ enumeration, traffic will be received via endpoint zero. */
+ uint8_t mass_storage_interface ;/* This is the interface # to use for the mass storage interface,
+ if mass storage is enumerated. If mass storage is not enumerated
+ this value should be zero. */
+ CyBool mass_storage_callbacks ; /* If true, Inquiry, START/STOP, and unknown mass storage
+ requests cause a callback to occur for handling by the
+ baseband processor. */
+} CyAsUsbEnumControl_dep ;
+
+
+typedef void (*CyAsUsbEventCallback_dep)(
+ CyAsDeviceHandle handle, /* Handle to the device to configure */
+ CyAsUsbEvent ev, /* The event type being reported */
+ void * evdata /* The data assocaited with the event being reported */
+) ;
+
+
+
+/* Register Callback api */
+EXTERN CyAsReturnStatus_t
+CyAsUsbRegisterCallback_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbEventCallback_dep callback /* The function to call */
+ ) ;
+
+
+extern CyAsReturnStatus_t
+CyAsUsbSetEnumConfig_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbEnumControl_dep * config_p, /* The USB configuration information */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+
+extern CyAsReturnStatus_t
+CyAsUsbGetEnumConfig_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbEnumControl_dep* config_p, /* The return value for USB congifuration information */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+extern CyAsReturnStatus_t
+CyAsUsbGetDescriptor_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsUsbDescType type, /* The type of descriptor */
+ uint8_t index, /* Index for string descriptor */
+ void * desc_p, /* The buffer to hold the returned descriptor */
+ uint32_t * length_p /* This is an input and output parameter. Before the code this pointer
+ points to a uint32_t that contains the length of the buffer. After
+ the call, this value contains the amount of data actually returned. */
+ ) ;
+
+extern CyAsReturnStatus_t
+CyAsUsbSetStall_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsUsbFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbClearStall_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsUsbFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbSetNak_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsUsbFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbClearNak_dep(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsEndPointNumber_t ep, /* The endpoint of interest */
+ CyAsUsbFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+EXTERN CyAsReturnStatus_t
+CyAsUsbSelectMSPartitions_dep (
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ CyAsUsbMSType_t type,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ ) ;
+
+#endif /*__doxygen*/
+
+#endif /*__INCLUDED_CYANSTORAGE_DEP_H__*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/include/cyasusbdescs.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,267 @@
+#ifndef USBDESCS_H
+#define USBDESCS_H
+
+#include <cyastoria.h>
+#include <cyasmtp.h>
+
+char* UsbStrings[] =
+{
+ "Cypress Semiconductor", /* Manufacturer (device) - index 1 */
+#ifdef DEBUG_ZERO
+ #ifdef DEBUG_MSC
+ "Astoria MSC Device Symbian", /* 2 */
+ #else
+ "Astoria MTP Device Symbian", /* 2 */
+ #endif
+#else
+ "Astoria TMTP Device Symbian", /* 2 */
+#endif
+ "2222222222", /* 3 */
+ "Loopback Configuration", /* 4 */
+ "Loopback Interface" /* 5 */
+} ;
+
+CyCh9DeviceQualifierDesc device_qualifier =
+{
+ sizeof(CyCh9DeviceQualifierDesc),
+ CY_CH9_GD_DEVICE_QUALIFIER, /* DEVICE QUALIFIER TYPE */
+ 0x200, /* USB VERSION */
+ 0x00, /* DEVICE CLASS */
+ 0x00, /* DEVICE SUBCLASS */
+ 0x00, /* PROTOCOL */
+ 64, /* EP0 PACKET SIZE */
+ 1, /* NUMBER OF CONFIGURATIONS */
+ 0
+} ;
+
+/*
+* This is the basic device descriptor for this West Bridge test bench. This descriptor is returned
+* by this software for P port based enumeration.
+*/
+CyCh9DeviceDesc pport_device_desc =
+{
+ sizeof(CyCh9DeviceDesc),
+ CY_CH9_GD_DEVICE, /* DESCRIPTOR TYPE */
+ 0x200, /* USB VERSION */
+ 0x00, /* DEVICE CLASS */
+ 0x00, /* DEVICE SUBCLASS */
+ 0x00, /* PROTOCOL */
+ 64, /* EP0 packet size */
+#ifdef DEBUG_ZERO
+ 0x2,
+ 0x0,
+#else
+ 0x5, /* CYPRESS VENDOR ID */
+ 0x5, /* West Bridge (MADEUP) for composite device */
+#endif
+ 0x2, /* DEVICE VERSION */
+ 0x01, /* STRING ID FOR MANUF. */
+ 0x02, /* STRING ID FOR PRODUCT */
+ 0x03, /* STRING ID FOR SERIAL NUMBER */
+ 0x01 /* NUMBER OF CONFIGURATIONS */
+} ;
+
+CyCh9ConfigurationDesc ZeroDesc =
+{
+ sizeof(CyCh9ConfigurationDesc), /* Descriptor Length */
+ CY_CH9_GD_CONFIGURATION, /* Descriptor Type */
+ sizeof(CyCh9ConfigurationDesc),
+ 0, /* Number of Interfaces */
+ 1, /* Configuration Number */
+ 0, /* Configuration String */
+ CY_CH9_CONFIG_ATTR_RESERVED_BIT7, /* Configuration Attributes */
+ 50 /* Power Requirements */
+} ;
+
+#ifndef DEBUG_ZERO
+CyCh9ConfigurationDesc ConfigHSDesc =
+{
+ sizeof(CyCh9ConfigurationDesc), /* Descriptor Length */
+ CY_CH9_GD_CONFIGURATION, /* Descriptor Type */
+ sizeof(CyCh9ConfigurationDesc),
+ 0,
+ 1, /* Configuration Number */
+ 0, /* Configuration String */
+ CY_CH9_CONFIG_ATTR_RESERVED_BIT7, /* Configuration attributes */
+ 50 /* Power requirements */
+} ;
+
+CyCh9ConfigurationDesc ConfigFSDesc =
+{
+ sizeof(CyCh9ConfigurationDesc), /* Descriptor Length */
+ CY_CH9_GD_CONFIGURATION, /* Descriptor Type */
+ sizeof(CyCh9ConfigurationDesc),
+ 0,
+ 1, /* Configuration Number */
+ 0, /* Configuration String */
+ CY_CH9_CONFIG_ATTR_RESERVED_BIT7, /* Configuration attributes */
+ 50 /* Power requirements */
+} ;
+#else
+
+
+#ifdef DEBUG_MSC
+
+CyCh9ConfigurationDesc ConfigHSDesc =
+{
+ sizeof(CyCh9ConfigurationDesc), /* Descriptor Length */
+ CY_CH9_GD_CONFIGURATION, /* Descriptor Type */
+ sizeof(CyCh9ConfigurationDesc),
+ 0,
+ 1, /* Configuration Number */
+ 0, /* Configuration String */
+ CY_CH9_CONFIG_ATTR_RESERVED_BIT7, /* Configuration attributes */
+ 50 /* Power requirements */
+} ;
+
+CyCh9ConfigurationDesc ConfigFSDesc =
+{
+ sizeof(CyCh9ConfigurationDesc), /* Descriptor Length */
+ CY_CH9_GD_CONFIGURATION, /* Descriptor Type */
+ sizeof(CyCh9ConfigurationDesc),
+ 0,
+ 1, /* Configuration Number */
+ 0, /* Configuration String */
+ CY_CH9_CONFIG_ATTR_RESERVED_BIT7, /* Configuration attributes */
+ 50 /* Power requirements */
+} ;
+
+#else
+
+#pragma pack(push,1)
+typedef struct MyConfigDesc
+{
+ CyCh9ConfigurationDesc m_config ;
+ CyCh9InterfaceDesc m_interface ;
+ /*nxz-debug-z CyCh9EndpointDesc m_endpoints[2] ;*/
+ CyCh9EndpointDesc m_endpoints[3] ;
+
+} MyConfigDesc ;
+#pragma pack(pop)
+
+static MyConfigDesc ConfigFSDesc =
+{
+ /*Configuration Descriptor*/
+ {
+ sizeof(CyCh9ConfigurationDesc), /* Desc Length */
+ CY_CH9_GD_CONFIGURATION, /* Desc Type */
+ /* nxz-debug-z sizeof(CyCh9ConfigurationDesc)+ sizeof(CyCh9InterfaceDesc) + 2 * sizeof(CyCh9EndpointDesc),*/
+ sizeof(CyCh9ConfigurationDesc)+ sizeof(CyCh9InterfaceDesc) + 3 * sizeof(CyCh9EndpointDesc),
+ 1, /* Num of Interface */
+ 1, /* Configuration Value */
+ 251, /* Configuration */
+ CY_CH9_CONFIG_ATTR_RESERVED_BIT7|CY_CH9_CONFIG_ATTR_SELF_POWERED, /* Configuration Attributes */
+ 50
+ }
+ ,
+ /* Interface Descriptor */
+ {
+ sizeof(CyCh9InterfaceDesc), /* Desc Length */
+ CY_CH9_GD_INTERFACE, /* Desc Type */
+ 0, /* Interface Num */
+ 0, /* Alternate Interface */
+ /*nxz-debug-z 2,*/ /* Number of Endpoints */
+ 3, /* Number of Endpoints */
+ 0xff, /* IF class */
+ 0x00, /* IF sub-class */
+ 0x00, /* IF protocol */
+ 251 /* IF string */
+ }
+ ,
+ {
+ /* EP3_OUT */
+ {
+ sizeof(CyCh9EndpointDesc), /* Desc Length */
+ CY_CH9_GD_ENDPOINT, /* Desc Type */
+ CY_CH9_MK_EP_ADDR(CY_CH9_ENDPOINT_DIR_OUT, 3),
+ CY_CH9_ENDPOINT_ATTR_BULK,
+ 64,
+ 255
+ },
+ /* EP5_IN */
+ {
+ sizeof(CyCh9EndpointDesc), /* Desc Length */
+ CY_CH9_GD_ENDPOINT, /* Desc Type */
+ CY_CH9_MK_EP_ADDR(CY_CH9_ENDPOINT_DIR_IN, 5),
+ CY_CH9_ENDPOINT_ATTR_BULK,
+ 64,
+ 255
+ },
+ /* nxz-debug-z EP7_INT */
+ {
+ sizeof(CyCh9EndpointDesc), /* Desc Length */
+ CY_CH9_GD_ENDPOINT, /* Desc Type */
+ CY_CH9_MK_EP_ADDR(CY_CH9_ENDPOINT_DIR_IN, 7),
+ CY_CH9_ENDPOINT_ATTR_INTERRUPT,
+ 64,
+ 0
+ }
+
+ }
+};
+
+static MyConfigDesc ConfigHSDesc =
+{
+ /*Configuration Descriptor*/
+ {
+ sizeof(CyCh9ConfigurationDesc), /* Desc Length */
+ CY_CH9_GD_CONFIGURATION, /* Desc Type */
+ /*nxz-debug-z sizeof(CyCh9ConfigurationDesc)+ sizeof(CyCh9InterfaceDesc) + 2 * sizeof(CyCh9EndpointDesc),*/
+ sizeof(CyCh9ConfigurationDesc)+ sizeof(CyCh9InterfaceDesc) + 3 * sizeof(CyCh9EndpointDesc),
+ 1, /* Num of Interface */
+ 1, /* Configuration Value */
+ 251, /* Configuration */
+ CY_CH9_CONFIG_ATTR_RESERVED_BIT7, /* Configuration Attributes */
+ 50
+ }
+ ,
+ /* Interface Descriptor */
+ {
+ sizeof(CyCh9InterfaceDesc), /* Desc Length */
+ CY_CH9_GD_INTERFACE, /* Desc Type */
+ 0, /* Interface Num */
+ 0, /* Alternate Interface */
+ /*nxz-debug-z2, */ /* Number of Endpoints */
+ 3, /* Number of Endpoints */
+ 0xff, /* IF class */
+ 0x00, /* IF sub-class */
+ 0x00, /* IF protocol */
+ 251 /* IF string */
+ }
+ ,
+ {
+ /* EP3_OUT */
+ {
+ sizeof(CyCh9EndpointDesc), /* Desc Length */
+ CY_CH9_GD_ENDPOINT, /* Desc Type */
+ CY_CH9_MK_EP_ADDR(CY_CH9_ENDPOINT_DIR_OUT, 3),
+ CY_CH9_ENDPOINT_ATTR_BULK,
+ 512,
+ 0
+ },
+ /* EP5_IN */
+ {
+ sizeof(CyCh9EndpointDesc), /* Desc Length */
+ CY_CH9_GD_ENDPOINT, /* Desc Type */
+ CY_CH9_MK_EP_ADDR(CY_CH9_ENDPOINT_DIR_IN, 5),
+ CY_CH9_ENDPOINT_ATTR_BULK,
+ 512,
+ 0
+ },
+ /* nxz-debug-z EP7_INT */
+ {
+ sizeof(CyCh9EndpointDesc), /* Desc Length */
+ CY_CH9_GD_ENDPOINT, /* Desc Type */
+ CY_CH9_MK_EP_ADDR(CY_CH9_ENDPOINT_DIR_IN, 7),
+ CY_CH9_ENDPOINT_ATTR_INTERRUPT,
+ 64,
+ 0
+ }
+ }
+};
+#endif
+#endif /*DEBUG_ZERO*/
+
+#endif
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyascast.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,36 @@
+/* Cypress West Bridge API header file (cyasdevice.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASCAST_H_
+#define _INCLUDED_CYASCAST_H_
+
+#ifndef __doxygen__
+#define CyCastInt2UInt16(v) ((uint16_t)(v))
+#if 0 /*nxz*/
+#ifdef _DEBUG
+#define CyCastInt2UInt16(v) (CyAsHalAssert(v < 65536), (uint16_t)(v))
+#else /* _DEBUG */
+#define CyCastInt2UInt16(v) ((uint16_t)(v))
+#endif /* _DEBUG */
+#endif
+
+#endif /* __doxygen__ */
+#endif /* _INCLUDED_CYASCAST_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasdevice.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,756 @@
+/* Cypress West Bridge API header file (cyasdevice.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef __INCLUDED_CYASDEVICE_H__
+#define __INCLUDED_CYASDEVICE_H__
+
+#include "cyashal.h"
+#include "cyasprotocol.h"
+#include "cyasusb.h"
+#include "cyasstorage.h"
+#include "cyasmtp.h"
+#include "cyas_cplus_start.h"
+
+/*****************************************************************************
+ * West Bridge Constants
+ ****************************************************************************/
+
+/* The endpoints used by West Bridge for the P port to S port path */
+#define CY_AS_P2S_WRITE_ENDPOINT (0x04)
+#define CY_AS_P2S_READ_ENDPOINT (0x08)
+
+/* The endpoint to use for firmware download */
+#define CY_AS_FIRMWARE_ENDPOINT (0x02)
+
+/* The maximum size of the firmware image West Bridge can accept */
+#define CY_AS_MAXIMUM_FIRMWARE_SIZE (24 * 1024)
+
+/* The maximum size of a write for EP0 and EP1 */
+#define CY_AS_EP0_MAX_WRITE_SIZE (128)
+#define CY_AS_EP1_MAX_WRITE_SIZE (64)
+
+/* The bitfields for the device state value */
+#define CY_AS_DEVICE_STATE_PIN_STANDBY (0x00000001) /* The device is in StandBy mode */
+#define CY_AS_DEVICE_STATE_CONFIGURED (0x00000002) /* The device has been configured */
+#define CY_AS_DEVICE_STATE_FIRMWARE_LOADED (0x00000004) /* The firmware has been loaded into the device */
+#define CY_AS_DEVICE_STATE_LOWLEVEL_MODULE (0x00000008) /* The interrupt module has been initialized */
+#define CY_AS_DEVICE_STATE_DMA_MODULE (0x00000010) /* The DMA module has been initialized */
+#define CY_AS_DEVICE_STATE_INTR_MODULE (0x00000020) /* The interrupt module has been initialized */
+#define CY_AS_DEVICE_STATE_STORAGE_MODULE (0x00000040) /* The storage module has been initialized */
+#define CY_AS_DEVICE_STATE_USB_MODULE (0x00000080) /* The USB module has been initialized */
+#define CY_AS_DEVICE_STATE_STORAGE_SCSIMSG (0x00000100) /* If set, the API wants SCSI messages */
+#define CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING (0x00000200) /* If set, an ASYNC storage operation is pending */
+#define CY_AS_DEVICE_STATE_USB_CONNECTED (0x00000400) /* If set, the USB port is connected */
+#define CY_AS_DEVICE_STATE_USB_HIGHSPEED (0x00000800) /* If set and USB is connected, it is high speed */
+#define CY_AS_DEVICE_STATE_IN_CALLBACK (0x00001000) /* If set, we are in a callback */
+#define CY_AS_DEVICE_STATE_IN_SETUP_PACKET (0x00004000) /* If set, we are processing a setup packet */
+#define CY_AS_DEVICE_STATE_REGISTER_STANDBY (0x00008000) /* The device was placed in standby via register */
+#define CY_AS_DEVICE_STATE_CRYSTAL (0x00010000) /* If set, the device is using a crystal */
+#define CY_AS_DEVICE_STATE_WAKING (0x00020000) /* If set, wakeup has been called */
+#define CY_AS_DEVICE_STATE_EP0_STALLED (0x00040000) /* If set, EP0 has been stalled. */
+#define CY_AS_DEVICE_STATE_SUSPEND (0x00080000) /* If set, device is in suspend mode. */
+#define CY_AS_DEVICE_STATE_RESETP (0x00100000) /* If set, device is a reset is pending. */
+#define CY_AS_DEVICE_STATE_STANDP (0x00200000) /* If set, device is a standby is pending. */
+#define CY_AS_DEVICE_STATE_SSSP (0x00400000) /* If set, device has a storage start or stop pending. */
+#define CY_AS_DEVICE_STATE_USSP (0x00800000) /* If set, device has a usb start or stop pending. */
+#define CY_AS_DEVICE_STATE_MSSP (0x01000000) /* If set, device has a mtp start or stop pending. */
+
+
+/* The bitfields for the endpoint state value */
+#define CY_AS_DMA_ENDPOINT_STATE_ENABLED (0x0001) /* DMA requests are accepted into the queue */
+#define CY_AS_DMA_ENDPOINT_STATE_SLEEPING (0x0002) /* The endpoint has a sleeping client, waiting on a queue drain */
+#define CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING (0x0004) /* The DMA backend to hardware is running */
+#define CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT (0x0008) /* There is an outstanding DMA entry deployed to the HAL */
+#define CY_AS_DMA_ENDPOINT_STATE_DIRECTION (0x0010) /* 0 = OUT (West Bridge -> P Port), 1 = IN (P Port -> West Bridge) */
+
+/* The state values for the request list */
+#define CY_AS_REQUEST_LIST_STATE_MASK (0x0f) /* Mask for getting the state information */
+#define CY_AS_REQUEST_LIST_STATE_QUEUED (0x00) /* The request is queued, nothing further */
+#define CY_AS_REQUEST_LIST_STATE_WAITING (0x01) /* The request is sent, waiting for response */
+#define CY_AS_REQUEST_LIST_STATE_RECEIVED (0x02) /* The response has been received, processing reponse */
+#define CY_AS_REQUEST_LIST_STATE_CANCELING (0x03) /* The request/response is being canceled */
+#define CY_AS_REQUEST_LIST_STATE_SYNC (0x80) /* The request is synchronous */
+
+/* The flag values for a LL RequestResponse */
+#define CY_AS_REQUEST_RESPONSE_DELAY_ACK (0x01) /* This request requires an ACK to be sent after it is completed */
+#define CY_AS_REQUEST_RESPONSE_EX (0x02) /* This request originated from a version V1.1 function call */
+#define CY_AS_REQUEST_RESPONSE_MS (0x04) /* This request originated from a version V1.2 function call */
+
+
+#define CY_AS_DEVICE_HANDLE_SIGNATURE (0x01211219)
+
+/*
+ * This macro returns the endpoint pointer given the device pointer and an endpoint number
+ */
+#define CY_AS_NUM_EP(dev_p, num) ((dev_p)->endp[(num)])
+
+/*****************************************************************************
+ * West Bridge Data Structures
+ ****************************************************************************/
+
+typedef struct CyAsDevice CyAsDevice ;
+
+/* Summary
+ This type defines a callback function that will be called on completion of a DMA operation.
+
+ Description
+ This function definition is for a function that is called when the DMA operation is complete. This
+ function is called with the endpoint number, operation type, buffer pointer and size.
+
+ See Also
+ * CyAsDmaOper
+ * CyAsDmaQueueWrite
+ */
+typedef void (*CyAsDmaCallback)(
+ CyAsDevice * dev_p, /* The device that completed DMA */
+ CyAsEndPointNumber_t ep, /* The endpoint that completed DMA */
+ void * mem_p, /* The pointer to the buffer that completed DMA */
+ uint32_t size, /* The amount of data transferred */
+ CyAsReturnStatus_t error /* The error code for this DMA xfer */
+ ) ;
+
+/* Summary
+ This structure defines a DMA request that is queued
+
+ Description
+ This structure contains the information about a DMA request that is queued and is to
+ be sent when possible.
+*/
+typedef struct CyAsDmaQueueEntry
+{
+ void * buf_p ; /* Pointer to memory buffer for this request */
+ uint32_t size ; /* Size of the memory buffer for DMA operation */
+ uint32_t offset ; /* Offset into memory buffer for next DMA operation */
+ CyBool packet ; /* If TRUE and IN request */
+ CyBool readreq ; /* If TRUE, this is a read request */
+ CyAsDmaCallback cb ; /* Callback function for when DMA is complete */
+ struct CyAsDmaQueueEntry * next_p ; /* Pointer to next entry in queue */
+} CyAsDmaQueueEntry ;
+
+/* Summary
+ This structure defines the endpoint data for a given
+
+ Description
+ This structure defines all of the information required to manage DMA for a given
+ endpoint.
+*/
+typedef struct CyAsDmaEndPoint
+{
+ CyAsEndPointNumber_t ep ; /* The endpoint number */
+ uint8_t state ; /* The state of this endpoint */
+ uint16_t maxhwdata ; /* The maximum amount of data accepted in a packet by the hw */
+ uint32_t maxhaldata ; /* The maximum amount of data accepted by the HAL layer */
+ CyAsDmaQueueEntry * queue_p ; /* The queue for DMA operations */
+ CyAsDmaQueueEntry * last_p ; /* The last entry in the DMA queue */
+ CyAsHalSleepChannel channel ; /* This sleep channel is used to wait while the DMA queue drains for a given endpoint */
+} CyAsDmaEndPoint ;
+
+#define CyAsEndPointNumberIsUsb(n) ((n) != 2 && (n) != 4 && (n) != 6 && (n) != 8)
+#define CyAsEndPointNumberIsStorage(n) ((n) == 2 || (n) == 4 || (n) == 6 || (n) == 8)
+
+#define CyAsDmaEndPointIsEnabled(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_ENABLED)
+#define CyAsDmaEndPointEnable(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_ENABLED)
+#define CyAsDmaEndPointDisable(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_ENABLED)
+
+#define CyAsDmaEndPointIsSleeping(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_SLEEPING)
+#define CyAsDmaEndPointSetSleepState(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_SLEEPING)
+#define CyAsDmaEndPointSetWakeState(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_SLEEPING)
+
+#define CyAsDmaEndPointIsRunning(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING)
+#define CyAsDmaEndPointSetRunning(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING)
+#define CyAsDmaEndPointSetStopped(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_DMA_RUNNING)
+
+#define CyAsDmaEndPointInTransit(ep) ((ep)->state & CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT)
+#define CyAsDmaEndPointSetInTransit(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT)
+#define CyAsDmaEndPointClearInTransit(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_IN_TRANSIT)
+
+#define CyAsDmaEndPointIsDirectionIn(ep) (((ep)->state & CY_AS_DMA_ENDPOINT_STATE_DIRECTION) == CY_AS_DMA_ENDPOINT_STATE_DIRECTION)
+#define CyAsDmaEndPointIsDirectionOut(ep) (((ep)->state & CY_AS_DMA_ENDPOINT_STATE_DIRECTION) == 0)
+#define CyAsDmaEndPointSetDirectionIn(ep) ((ep)->state |= CY_AS_DMA_ENDPOINT_STATE_DIRECTION)
+#define CyAsDmaEndPointSetDirectionOut(ep) ((ep)->state &= ~CY_AS_DMA_ENDPOINT_STATE_DIRECTION)
+
+#define CyAsDmaEndPointIsUsb(p) CyAsEndPointNumberIsUsb((p)->ep)
+#define CyAsDmaEndPointIsStorage(p) CyAsEndPointNumberIsStorage((p)->ep)
+
+typedef struct CyAsLLRequestResponse
+{
+ uint16_t box0 ; /* The mbox[0] contents - see low level comm section of API doc */
+ uint16_t stored ; /* The amount of data stored in this request/response in bytes */
+ uint16_t length ; /* Length of this request in words */
+ uint16_t flags ; /* Additional status information about the request */
+ uint16_t data[1] ; /* Note: This is over indexed and contains the request/response data */
+} CyAsLLRequestResponse ;
+
+/*
+ * The callback function for responses
+ */
+typedef void (*CyAsResponseCallback)(
+ CyAsDevice * dev_p, /* The device that had the response */
+ uint8_t context, /* The context receiving a response */
+ CyAsLLRequestResponse * rqt, /* The request data */
+ CyAsLLRequestResponse * resp, /* The response data */
+ CyAsReturnStatus_t status /* The status of the request */
+ ) ;
+
+typedef struct CyAsLLRequestListNode
+{
+ CyAsLLRequestResponse * rqt ; /* The request to send */
+ CyAsLLRequestResponse * resp ; /* The associated response for the request */
+ uint16_t length ; /* Length of the response */
+ CyAsResponseCallback callback ; /* The callback to call when done */
+ uint8_t state ; /* The state of the request */
+ struct CyAsLLRequestListNode * next ; /* The next request in the list */
+} CyAsLLRequestListNode ;
+
+#define CyAsRequestGetNodeState(node_p) ((node_p)->state & CY_AS_REQUEST_LIST_STATE_MASK)
+#define CyAsRequestSetNodeState(node_p, st) ((node_p)->state = ((node_p)->state & ~CY_AS_REQUEST_LIST_STATE_MASK) | (st))
+
+#define CyAsRequestNodeIsSync(node_p) ((node_p)->state & CY_AS_REQUEST_LIST_STATE_SYNC)
+#define CyAsRequestNodeSetSync(node_p) ((node_p)->state |= CY_AS_REQUEST_LIST_STATE_SYNC)
+#define CyAsRequestNodeClearSync(node_p) ((node_p)->state &= ~CY_AS_REQUEST_LIST_STATE_SYNC)
+
+#ifndef __doxygen__
+typedef enum CyAsCBNodeType
+{
+ CYAS_INVALID,
+ CYAS_USB_FUNC_CB,
+ CYAS_USB_IO_CB,
+ CYAS_STORAGE_IO_CB,
+ CYAS_FUNC_CB
+} CyAsCBNodeType ;
+
+typedef struct CyAsFuncCBNode
+{
+ CyAsCBNodeType nodeType ;
+ CyAsFunctionCallback cb_p ;
+ uint32_t client_data ;
+ /*CyAsFunctCBType dataType ; nxz */
+ uint32_t dataType ;
+ void* data ;
+ struct CyAsFuncCBNode * next_p ;
+} CyAsFuncCBNode;
+
+extern CyAsFuncCBNode*
+CyAsCreateFuncCBNodeData(CyAsFunctionCallback cb, uint32_t client, CyAsFunctCBType type, void* data) ;
+
+extern CyAsFuncCBNode*
+CyAsCreateFuncCBNode(CyAsFunctionCallback cb, uint32_t client) ;
+
+extern void
+CyAsDestroyFuncCBNode(CyAsFuncCBNode* node) ;
+
+typedef struct CyAsMTPFuncCBNode
+{
+ CyAsCBNodeType type ;
+ CyAsMTPFunctionCallback cb_p ;
+ uint32_t client_data;
+ struct CyAsMTPFuncCBNode * next_p ;
+} CyAsMTPFuncCBNode;
+
+extern CyAsMTPFuncCBNode*
+CyAsCreateMTPFuncCBNode(CyAsMTPFunctionCallback cb, uint32_t client) ;
+
+extern void
+CyAsDestroyMTPFuncCBNode(CyAsMTPFuncCBNode* node) ;
+
+typedef struct CyAsUsbFuncCBNode
+{
+ CyAsCBNodeType type ;
+ CyAsUsbFunctionCallback cb_p ;
+ uint32_t client_data;
+ struct CyAsUsbFuncCBNode * next_p ;
+} CyAsUsbFuncCBNode;
+
+extern CyAsUsbFuncCBNode*
+CyAsCreateUsbFuncCBNode(CyAsUsbFunctionCallback cb, uint32_t client) ;
+
+extern void
+CyAsDestroyUsbFuncCBNode(CyAsUsbFuncCBNode* node) ;
+
+typedef struct CyAsUsbIoCBNode
+{
+ CyAsCBNodeType type ;
+ CyAsUsbIoCallback cb_p ;
+ struct CyAsUsbIoCBNode * next_p ;
+} CyAsUsbIoCBNode;
+
+extern CyAsUsbIoCBNode*
+CyAsCreateUsbIoCBNode(CyAsUsbIoCallback cb) ;
+
+extern void
+CyAsDestroyUsbIoCBNode(CyAsUsbIoCBNode* node) ;
+
+typedef struct CyAsStorageIoCBNode
+{
+ CyAsCBNodeType type ;
+ CyAsStorageCallback cb_p ;
+ CyAsMediaType media ; /* The media for the currently outstanding async storage request */
+ uint32_t device_index ; /* The device index for the currently outstanding async storage request */
+ uint32_t unit ; /* The unit index for the currently outstanding async storage request */
+ uint32_t block_addr ; /* The block address for the currently outstanding async storage request */
+ CyAsOperType oper ; /* The operation for the currently outstanding async storage request */
+ CyAsLLRequestResponse* req_p ;
+ CyAsLLRequestResponse* reply_p ;
+ struct CyAsStorageIoCBNode* next_p ;
+} CyAsStorageIoCBNode;
+
+extern CyAsStorageIoCBNode*
+CyAsCreateStorageIoCBNode(CyAsStorageCallback cb, CyAsMediaType media, uint32_t device_index,
+ uint32_t unit, uint32_t block_addr, CyAsOperType oper,
+ CyAsLLRequestResponse* req_p, CyAsLLRequestResponse* reply_p) ;
+
+extern void
+CyAsDestroyStorageIoCBNode(CyAsStorageIoCBNode* node) ;
+
+typedef struct CyAsCBQueue
+{
+ void * head_p;
+ void * tail_p;
+ uint32_t count ;
+ CyAsCBNodeType type ;
+} CyAsCBQueue ;
+
+extern CyAsCBQueue *
+CyAsCreateCBQueue(CyAsCBNodeType type) ;
+
+extern void
+CyAsDestroyCBQueue(CyAsCBQueue* queue) ;
+
+/* Allocates a new CyAsCBNode */
+extern void
+CyAsInsertCBNode(CyAsCBQueue * queue_p, void* cbnode) ;
+
+/* Removes the first CyAsCBNode from the queue and frees it */
+extern void
+CyAsRemoveCBNode(CyAsCBQueue * queue_p) ;
+
+/* Remove the last CyAsCBNode from the queue and frees it */
+extern void
+CyAsRemoveCBTailNode(CyAsCBQueue *queue_p) ;
+
+/* Removes and frees all pending callbacks */
+extern void
+CyAsClearCBQueue(CyAsCBQueue * queue_p) ;
+
+extern CyAsReturnStatus_t
+CyAsMiscSendRequest(CyAsDevice* dev_p,
+ CyAsFunctionCallback cb,
+ uint32_t client,
+ CyAsFunctCBType type,
+ void* data,
+ CyAsCBQueue* queue,
+ uint16_t req_type,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsResponseCallback rcb) ;
+
+extern void
+CyAsMiscCancelExRequests(CyAsDevice* dev_p) ;
+
+/* Summary
+ Free all memory allocated by and zero all structures initialized
+ by CyAsUsbStart.
+ */
+extern void
+CyAsUsbCleanup (
+ CyAsDevice *dev_p) ;
+
+/* Summary
+ Free all memory allocated and zero all structures initialized
+ by CyAsStorageStart.
+ */
+extern void
+CyAsStorageCleanup (
+ CyAsDevice *dev_p) ;
+#endif
+
+/* Summary
+ This structure defines the data structure to support a given command context
+
+ Description
+ All commands send to the West Bridge device via the mailbox registers are sent via a context.
+ Each context is independent and there can be a parallel stream of requests and responses on
+ each context. This structure is used to manage a single context.
+*/
+typedef struct CyAsContext
+{
+ uint8_t number ; /* The context number for this context */
+ CyAsHalSleepChannel channel ; /* This sleep channel is used to sleep while waiting on a response from the
+ West Bridge device for a request. */
+ CyAsLLRequestResponse * req_p ; /* The buffer for received requests */
+ uint16_t request_length ; /* The length of the request being received */
+ CyAsResponseCallback request_callback ; /* The callback for the next request received */
+
+ CyAsLLRequestListNode * request_queue_p ; /* A list of low level requests to go to the firmware */
+ CyAsLLRequestListNode * last_node_p ; /* The list node in the request queue */
+
+ uint16_t queue_index ; /* Index upto which data is stored. */
+ uint16_t rqt_index ; /* Index to the next request in the queue. */
+ uint16_t data_queue[128] ; /* Queue of data stored */
+
+} CyAsContext ;
+
+#define CyAsContextIsWaiting(ctxt) ((ctxt)->state & CY_AS_CTXT_STATE_WAITING_RESPONSE)
+#define CyAsContextSetWaiting(ctxt) ((ctxt)->state |= CY_AS_CTXT_STATE_WAITING_RESPONSE)
+#define CyAsContextClearWaiting(ctxt) ((ctxt)->state &= ~CY_AS_CTXT_STATE_WAITING_RESPONSE)
+
+
+
+/* Summary
+ This data structure stores SDIO function parameters for a SDIO card
+
+ Description
+*/
+typedef struct CyAsSDIODevice
+{
+ uint8_t function_init_map; /* Keeps track of IO functions initialized*/
+ uint8_t function_suspended_map;
+ CyAsSDIOCard card; /* Function 0 (Card Common) properties*/
+ CyAsSDIOFunc function[7]; /* Function 1-7 (Mapped to array element 0-6) properties.*/
+
+}CyAsSDIODevice;
+
+/* Summary
+Macros to access the SDIO card properties
+*/
+//GetFunction Code
+#define CyAsSdioGetFunctionCode(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].function_code
+
+//Get Function Extended Code
+#define CyAsSdioGetFunctionExtCode(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].extended_func_code
+
+//Get Function Product Serial number
+#define CyAsSdioGetFunctionPSN(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].card_psn
+
+//Get Function Block Size
+#define CyAsSdioGetFunctionBlocksize(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].blocksize
+
+//Get Function Max Block Size
+#define CyAsSdioGetFunctionMaxBlocksize(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].maxblocksize
+
+//Get Function CSA support
+#define CyAsSdioGetFunctionCsaSupport(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1].csa_bits
+
+//Get Function Wakeup Support
+#define CyAsSdioGetFunctionWakeupSupport(handle,bus,i) ((CyAsDevice *)handle)->sdiocard[bus].function[i-1]. wakeup_support
+
+#define CyAsSdioSetFunctionBlockSize(handle,bus,i,blocksize) (((CyAsDevice *)handle)->sdiocard[bus].function[i-1].blocksize = blocksize)
+
+//Get Number of funtions on card
+#define CyAsSdioGetCardNumFunctions(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.num_functions
+
+//Check if memory is present on the card
+#define CyAsSdioGetCardMemPresent(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.memory_present
+
+//Get Card manufaturer ID
+#define CyAsSdioGetCardManfId(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.manufacturer_Id
+
+//Get Card manufacturer Information
+#define CyAsSdioGetCardManfInfo(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.manufacturer_info
+
+//Get Card Block Size
+#define CyAsSdioGetCardBlocksize(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.blocksize
+
+//Get Card max Block Size
+#define CyAsSdioGetCardMaxBlocksize(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.maxblocksize
+
+//Get SDIO version supported by card
+#define CyAsSdioGetCardSDIOVersion(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.sdio_version
+
+//Get Card capabillity register
+#define CyAsSdioGetCardCapability(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].card.card_capability
+
+//Get function initialization map
+#define CyAsSdioGetFunctionInitMap(handle,bus) ((CyAsDevice *)handle)->sdiocard[bus].function_init_map
+
+//Check if function i has been initialized
+#define CyAsSdioCheckFunctionInitialized(handle,bus,i) (((CyAsSdioGetFunctionInitMap(handle,bus))& (0x01<<i))?1:0)
+
+//Set the Card functio 0 block size
+#define CyAsSdioSetCardBlockSize(handle,bus,blocksize) (((CyAsDevice *)handle)->sdiocard[bus].card.blocksize = blocksize)
+
+//Check if the Card supports Bus suspend.
+#define CyAsSdioCheckSupportBusSuspend(handle,bus) ((CyAsSdioGetCardCapability(handle,bus) & CY_SDIO_SBS)?1:0)
+
+//Check if a fuction is in suspended state
+#define CyAsSdioCheckFunctionSuspended(handle,bus,i) ((((CyAsDevice *)handle)->sdiocard[bus].function_suspended_map & (0x01<<i))?1:0)
+
+//Set a function state to suspended
+#define CyAsSdioSetFunctionSuspended(handle,bus,i) ((((CyAsDevice *)handle)->sdiocard[bus].function_suspended_map) |= (0x01<<i))
+
+//Clear a function suspended state
+#define CyAsSdioClearFunctionSuspended(handle,bus,i) ((((CyAsDevice *)handle)->sdiocard[bus].function_suspended_map) &= (~(0x01<<i)))
+
+/* Summary
+ This data structure represents a single device.
+
+ Description
+*/
+struct CyAsDevice
+{
+ /* General stuff */
+ uint32_t sig ; /* A signature to insure we have a valid handle */
+ uint16_t silicon_id ; /* The ID of the silicon */
+ struct CyAsDevice * next_p ; /* Pointer to the next device */
+ CyAsHalDeviceTag tag ; /* This is the client specific tag for this device */
+ uint32_t state ; /* This contains various state information about the device */
+ CyBool use_int_drq ; /* Flag indicating whether INT# pin is used for DRQ */
+
+ /* DMA related */
+ CyAsDmaEndPoint * endp[16] ; /* The endpoint pointers associated with this device */
+ CyAsDmaQueueEntry * dma_freelist_p ; /* List of queue entries that can be used for xfers */
+
+ /* Low level comm related */
+ CyAsContext * context[CY_RQT_CONTEXT_COUNT] ; /* The contexts available in this device */
+ CyAsReturnStatus_t ll_error ; /* The low level error returned from sending an async request */
+ CyBool ll_sending_rqt ; /* A request is currently being sent to West Bridge. */
+ CyBool ll_abort_curr_rqt ; /* The current mailbox request should be aborted. */
+ CyBool ll_queued_data ; /* Indicates that the LL layer has queued mailbox data. */
+
+ /* MISC API related */
+ CyAsMiscEventCallback misc_event_cb ; /* Misc callback */
+
+ /* Storage Related */
+ uint32_t storage_count ; /* The reference count for the Storage API */
+ CyAsStorageEventCallback_dep storage_event_cb ; /* Callback for storage events */
+ CyAsStorageEventCallback storage_event_cb_ms ; /* V1.2+ callback for storage events */
+ CyAsReturnStatus_t storage_error ; /* The error for a sleeping storage operation */
+ CyBool storage_wait ; /* Flag indicating that the storage stack is waiting for an operation */
+ CyAsLLRequestResponse * storage_rw_req_p ; /* Request used for storage read/writes. */
+ CyAsLLRequestResponse * storage_rw_resp_p ; /* Response used for storage read/writes. */
+ CyAsStorageCallback_dep storage_cb ; /* The storage callback */
+ CyAsStorageCallback storage_cb_ms ; /* The V1.2+ storage callback */
+ CyAsBusNumber_t storage_bus_index ; /* The bus index for the currently outstanding async storage request */
+ uint32_t storage_device_index ; /* The device index for the currently outstanding async storage request */
+ uint32_t storage_unit ; /* The unit index for the currently outstanding async storage request */
+ uint32_t storage_block_addr ; /* The block address for the currently outstanding async storage request */
+ CyAsOperType storage_oper ; /* The operation for the currently outstanding async storage request */
+ CyAsEndPointNumber_t storage_read_endpoint ; /* The endpoint used to read Storage data */
+ CyAsEndPointNumber_t storage_write_endpoint ; /* The endpoint used to write endpoint data */
+ CyAsDeviceDesc storage_device_info[CY_AS_MAX_BUSES][CY_AS_MAX_STORAGE_DEVICES] ;
+ /* The information on each device on each bus */
+
+ /* USB Related */
+ uint16_t epasync ; /* This conatins the endpoint async state */
+ uint32_t usb_count ; /* The reference count for the USB API */
+ uint8_t usb_phy_config ; /* The physical endpoint configuration */
+ CyAsCBQueue * usb_func_cbs ; /* The callbacks for async func calls */
+ CyAsUsbEndPointConfig usb_config[16] ; /* Endpoint configuration information */
+ CyAsUsbEventCallback_dep usb_event_cb ; /* The USB callback */
+ CyAsUsbEventCallback usb_event_cb_ms ; /* The V1.2+ USB callback */
+ CyAsReturnStatus_t usb_error ; /* The error for a sleeping usb operation */
+ CyAsUsbIoCallback usb_cb[16] ; /* The USB callback for a pending storage operation */
+ void * usb_pending_buffer ; /* The buffer pending from a USB operation */
+ uint32_t usb_pending_size ; /* The size of the buffer pending from a USB operation */
+ CyBool usb_spacket[16] ; /* If true, send a short packet */
+ uint32_t usb_actual_cnt ; /* The amount of data actually xferred */
+ uint8_t usb_ep1cfg[2] ; /* EP1OUT and EP1IN config register contents */
+ uint16_t usb_lepcfg[10] ; /* LEP config register contents */
+ uint16_t usb_pepcfg[4] ; /* PEP config register contents */
+ uint8_t * usb_ep_data ; /* Buffer for EP0 and EP1 data sent via mailboxes */
+ uint32_t usb_delay_ack_count ; /* Used to track how many ack requests are pending */
+ uint32_t usb_max_tx_size ; /* Maximum transfer size for USB endpoints. */
+
+ CyAsLLRequestResponse * usb_ep0_dma_req ; /* Request for sending EP0 data to West Bridge */
+ CyAsLLRequestResponse * usb_ep0_dma_resp ; /* Response for EP0 data sent to West Bridge */
+ CyAsLLRequestResponse * usb_ep1_dma_req ; /* Request for sending EP1 data to West Bridge */
+ CyAsLLRequestResponse * usb_ep1_dma_resp ; /* Response for EP1 data sent to West Bridge */
+
+ CyAsLLRequestResponse * usb_ep0_dma_req_save ;
+ CyAsLLRequestResponse * usb_ep0_dma_resp_save ;
+
+ /* MTP Related */
+ uint32_t mtp_count ; /* The reference count for the MTP API */
+ CyAsMTPEventCallback mtp_event_cb ; /* The MTP event callback supplied by the client */
+ CyAsMTPBlockTable* mtp_blk_tbl ; /* The current block table to be transfered */
+
+ CyAsCBQueue * func_cbs_mtp ;
+ CyAsCBQueue * func_cbs_usb ;
+ CyAsCBQueue * func_cbs_stor ;
+ CyAsCBQueue * func_cbs_misc ;
+ CyAsCBQueue * func_cbs_res ;
+
+ CyAsUsbEvent usb_last_event ; /* The last USB event that was received */
+ uint8_t media_supported[CY_AS_MAX_BUSES] ; /* Types of storage media supported by the firmware */
+
+ CyAsSDIODevice sdiocard[CY_AS_MAX_BUSES]; /* SDIO card parameters*/
+ CyBool is_mtp_firmware ; /* if true, MTP enabled Firmware. */
+ CyBool is_mtp_data_pending ; /* if true, mailbox message has come already */
+ CyBool mtp_turbo_active ; /* True between the time an Init was called and the complete event is generated */
+ uint16_t mtp_data_len ; /* mbox reported EP 2 data len */
+ CyAsReturnStatus_t mtp_error ; /* The error for mtp EP4 write operation */
+ CyAsFunctionCallback mtp_cb ; /* mtp send/get operation callback */
+ uint32_t mtp_client ; /* mtp send/get operation client id */
+ CyAsFunctCBType mtp_op ; /* mtp operation type. To be used in callback */
+
+ CyBool is_storage_only_mode ; /* Firmware is running in P2S only mode. */
+ uint32_t stby_int_mask ; /* Interrupt mask value during device standby. */
+} ;
+
+#define CyAsDeviceIsConfigured(dp) ((dp)->state & CY_AS_DEVICE_STATE_CONFIGURED)
+#define CyAsDeviceSetConfigured(dp) ((dp)->state |= CY_AS_DEVICE_STATE_CONFIGURED)
+#define CyAsDeviceSetUnconfigured(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_CONFIGURED)
+
+#define CyAsDeviceIsDmaRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_DMA_MODULE)
+#define CyAsDeviceSetDmaRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_DMA_MODULE)
+#define CyAsDeviceSetDmaStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_DMA_MODULE)
+
+#define CyAsDeviceIsLowLevelRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_LOWLEVEL_MODULE)
+#define CyAsDeviceSetLowLevelRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_LOWLEVEL_MODULE)
+#define CyAsDeviceSetLowLevelStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_LOWLEVEL_MODULE)
+
+#define CyAsDeviceIsIntrRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_INTR_MODULE)
+#define CyAsDeviceSetIntrRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_INTR_MODULE)
+#define CyAsDeviceSetIntrStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_INTR_MODULE)
+
+#define CyAsDeviceIsFirmwareLoaded(dp) ((dp)->state & CY_AS_DEVICE_STATE_FIRMWARE_LOADED)
+#define CyAsDeviceSetFirmwareLoaded(dp) ((dp)->state |= CY_AS_DEVICE_STATE_FIRMWARE_LOADED)
+#define CyAsDeviceSetFirmwareNotLoaded(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_FIRMWARE_LOADED)
+
+#define CyAsDeviceIsStorageRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_STORAGE_MODULE)
+#define CyAsDeviceSetStorageRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STORAGE_MODULE)
+#define CyAsDeviceSetStorageStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STORAGE_MODULE)
+
+#define CyAsDeviceIsUsbRunning(dp) ((dp)->state & CY_AS_DEVICE_STATE_USB_MODULE)
+#define CyAsDeviceSetUsbRunning(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USB_MODULE)
+#define CyAsDeviceSetUsbStopped(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USB_MODULE)
+
+#define CyAsDeviceWantsScsiMessages(dp) (((dp)->state & CY_AS_DEVICE_STATE_STORAGE_SCSIMSG) ? CyTrue : CyFalse)
+#define CyAsDeviceSetScsiMessages(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STORAGE_SCSIMSG)
+#define CyAsDeviceClearScsiMessages(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STORAGE_SCSIMSG)
+
+#define CyAsDeviceIsStorageAsyncPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING)
+#define CyAsDeviceSetStorageAsyncPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING)
+#define CyAsDeviceClearStorageAsyncPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STORAGE_ASYNC_PENDING)
+
+#define CyAsDeviceIsUsbConnected(dp) ((dp)->state & CY_AS_DEVICE_STATE_USB_CONNECTED)
+#define CyAsDeviceSetUsbConnected(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USB_CONNECTED)
+#define CyAsDeviceClearUsbConnected(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USB_CONNECTED)
+
+#define CyAsDeviceIsUsbHighSpeed(dp) ((dp)->state & CY_AS_DEVICE_STATE_USB_HIGHSPEED)
+#define CyAsDeviceSetUsbHighSpeed(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USB_HIGHSPEED)
+#define CyAsDeviceClearUsbHighSpeed(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USB_HIGHSPEED)
+
+#define CyAsDeviceIsInCallback(dp) ((dp)->state & CY_AS_DEVICE_STATE_IN_CALLBACK)
+#define CyAsDeviceSetInCallback(dp) ((dp)->state |= CY_AS_DEVICE_STATE_IN_CALLBACK)
+#define CyAsDeviceClearInCallback(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_IN_CALLBACK)
+
+#define CyAsDeviceIsSetupIOPerformed(dp) ((dp)->state & CY_AS_DEVICE_STATE_SETUP_IO_PERFORMED)
+#define CyAsDeviceSetSetupIOPerformed(dp) ((dp)->state |= CY_AS_DEVICE_STATE_SETUP_IO_PERFORMED)
+#define CyAsDeviceClearSetupIOPerformed(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_SETUP_IO_PERFORMED)
+
+#define CyAsDeviceIsAckDelayed(dp) ((dp)->usb_delay_ack_count > 0)
+#define CyAsDeviceSetAckDelayed(dp) ((dp)->usb_delay_ack_count++)
+#define CyAsDeviceRemAckDelayed(dp) ((dp)->usb_delay_ack_count--)
+#define CyAsDeviceClearAckDelayed(dp) ((dp)->usb_delay_ack_count = 0)
+
+#define CyAsDeviceIsSetupPacket(dp) ((dp)->state & CY_AS_DEVICE_STATE_IN_SETUP_PACKET)
+#define CyAsDeviceSetSetupPacket(dp) ((dp)->state |= CY_AS_DEVICE_STATE_IN_SETUP_PACKET)
+#define CyAsDeviceClearSetupPacket(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_IN_SETUP_PACKET)
+
+#define CyAsDeviceIsEp0Stalled(dp) ((dp)->state & CY_AS_DEVICE_STATE_EP0_STALLED)
+#define CyAsDeviceSetEp0Stalled(dp) ((dp)->state |= CY_AS_DEVICE_STATE_EP0_STALLED)
+#define CyAsDeviceClearEp0Stalled(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_EP0_STALLED)
+
+#define CyAsDeviceIsRegisterStandby(dp) ((dp)->state & CY_AS_DEVICE_STATE_REGISTER_STANDBY)
+#define CyAsDeviceSetRegisterStandby(dp) ((dp)->state |= CY_AS_DEVICE_STATE_REGISTER_STANDBY)
+#define CyAsDeviceClearRegisterStandby(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_REGISTER_STANDBY)
+
+#define CyAsDeviceIsPinStandby(dp) ((dp)->state & CY_AS_DEVICE_STATE_PIN_STANDBY)
+#define CyAsDeviceSetPinStandby(dp) ((dp)->state |= CY_AS_DEVICE_STATE_PIN_STANDBY)
+#define CyAsDeviceClearPinStandby(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_PIN_STANDBY)
+
+#define CyAsDeviceIsCrystal(dp) ((dp)->state & CY_AS_DEVICE_STATE_CRYSTAL)
+#define CyAsDeviceIsExternalClock(dp) (!((dp)->state & CY_AS_DEVICE_STATE_CRYSTAL))
+#define CyAsDeviceSetCrystal(dp) ((dp)->state |= CY_AS_DEVICE_STATE_CRYSTAL)
+#define CyAsDeviceSetExternalClock(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_CRYSTAL)
+
+#define CyAsDeviceIsWaking(dp) ((dp)->state & CY_AS_DEVICE_STATE_WAKING)
+#define CyAsDeviceSetWaking(dp) ((dp)->state |= CY_AS_DEVICE_STATE_WAKING)
+#define CyAsDeviceClearWaking(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_WAKING)
+
+#define CyAsDeviceIsInSuspendMode(dp) ((dp)->state & CY_AS_DEVICE_STATE_SUSPEND)
+#define CyAsDeviceSetSuspendMode(dp) ((dp)->state |= CY_AS_DEVICE_STATE_SUSPEND)
+#define CyAsDeviceClearSuspendMode(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_SUSPEND)
+
+#define CyAsDeviceIsResetPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_RESETP)
+#define CyAsDeviceSetResetPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_RESETP)
+#define CyAsDeviceClearResetPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_RESETP)
+
+#define CyAsDeviceIsStandbyPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_STANDP)
+#define CyAsDeviceSetStandbyPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_STANDP)
+#define CyAsDeviceClearStandbyPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_STANDP)
+
+#define CyAsDeviceIsSSSPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_SSSP)
+#define CyAsDeviceSetSSSPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_SSSP)
+#define CyAsDeviceClearSSSPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_SSSP)
+
+#define CyAsDeviceIsUSSPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_USSP)
+#define CyAsDeviceSetUSSPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_USSP)
+#define CyAsDeviceClearUSSPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_USSP)
+
+#define CyAsDeviceIsMSSPending(dp) ((dp)->state & CY_AS_DEVICE_STATE_MSSP)
+#define CyAsDeviceSetMSSPending(dp) ((dp)->state |= CY_AS_DEVICE_STATE_MSSP)
+#define CyAsDeviceClearMSSPending(dp) ((dp)->state &= ~CY_AS_DEVICE_STATE_MSSP)
+
+#define CyAsDeviceIsUsbAsyncPending(dp, ep) ((dp)->epasync & (1 << ep))
+#define CyAsDeviceSetUsbAsyncPending(dp, ep) ((dp)->epasync |= (1 << ep))
+#define CyAsDeviceClearUsbAsyncPending(dp, ep) ((dp)->epasync &= ~(1 << ep))
+
+#define CyAsDeviceIsNandStorageSupported(dp) ((dp)->media_supported[0] & 1)
+
+/* Macros to check the type of West Bridge device. */
+#define CyAsDeviceIsAstoriaDev(dp) (((dp)->silicon_id == CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_VALUE) || \
+ ((dp)->silicon_id == CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_FPGA_VALUE))
+#define CyAsDeviceIsAntiochDev(dp) ((dp)->silicon_id == CY_AS_MEM_CM_WB_CFG_ID_HDID_ANTIOCH_VALUE)
+
+#ifdef CY_AS_LOG_SUPPORT
+extern void CyAsLogDebugMessage(int value, const char *msg) ;
+#else
+#define CyAsLogDebugMessage(value, msg)
+#endif
+
+/* Summary
+ This function finds the device object given the HAL tag
+
+ Description
+ The user associats a device TAG with each West Bridge device created. This tag is passed from the
+ API functions to and HAL functions that need to ID a specific West Bridge device. This tag is also
+ passed in from the user back into the API via interrupt functions. This function allows the API
+ to find the device structure associated with a given tag.
+
+ Notes
+ This function does a simple linear search for the device based on the TAG. This function is
+ called each time an West Bridge interrupt handler is called. Therefore this works fine for a small
+ number of West Bridge devices (e.g. less than five). Anything more than this and this methodology
+ will need to be updated.
+
+ Returns
+ Pointer to a CyAsDevice associated with the tag
+*/
+extern CyAsDevice *
+CyAsDeviceFindFromTag(
+ CyAsHalDeviceTag tag
+ ) ;
+
+#include "cyas_cplus_end.h"
+
+#endif /* __INCLUDED_CYASDEVICE_H__ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasdma.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1054 @@
+/* Cypress West Bridge API source file (cyasdma.c)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+#include "cyashal.h"
+#include "cyasdma.h"
+#include "cyaslowlevel.h"
+#include "cyaserr.h"
+#include "cyasregs.h"
+
+/*
+ * Add the DMA queue entry to the free list to be re-used later
+ */
+static void
+CyAsDmaAddRequestToFreeQueue(CyAsDevice *dev_p, CyAsDmaQueueEntry *req_p)
+{
+ uint32_t imask ;
+ imask = CyAsHalDisableInterrupts() ;
+
+ req_p->next_p = dev_p->dma_freelist_p ;
+ dev_p->dma_freelist_p = req_p ;
+
+ CyAsHalEnableInterrupts(imask) ;
+}
+
+/*
+ * Get a DMA queue entry from the free list.
+ */
+static CyAsDmaQueueEntry *
+CyAsDmaGetDmaQueueEntry(CyAsDevice *dev_p)
+{
+ CyAsDmaQueueEntry *req_p ;
+ uint32_t imask ;
+
+ CyAsHalAssert(dev_p->dma_freelist_p != 0) ;
+
+ imask = CyAsHalDisableInterrupts() ;
+ req_p = dev_p->dma_freelist_p ;
+ dev_p->dma_freelist_p = req_p->next_p ;
+ CyAsHalEnableInterrupts(imask) ;
+
+ return req_p ;
+}
+
+/*
+ * Set the maximum size that the West Bridge hardware can handle in a single DMA operation. This size
+ * may change for the P <-> U endpoints as a function of the endpoint type and whether we are running
+ * at full speed or high speed.
+ */
+CyAsReturnStatus_t
+CyAsDmaSetMaxDmaSize(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, uint32_t size)
+{
+ /* In MTP mode, EP2 is allowed to have all max sizes. */
+ if ((!dev_p->is_mtp_firmware) || (ep != 0x02))
+ {
+ if (size < 64 || size > 1024)
+ return CY_AS_ERROR_INVALID_SIZE ;
+ }
+
+ CY_AS_NUM_EP(dev_p, ep)->maxhwdata = (uint16_t)size ;
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+ * The callback for requests sent to West Bridge to relay endpoint data. Endpoint
+ * data for EP0 and EP1 are sent using mailbox requests. This is the callback that
+ * is called when a response to a mailbox request to send data is received.
+ */
+static void
+CyAsDmaRequestCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *resp_p,
+ CyAsReturnStatus_t ret)
+{
+ uint16_t v ;
+ uint16_t datacnt ;
+ CyAsEndPointNumber_t ep ;
+
+ (void)context ;
+
+ CyAsLogDebugMessage(5, "CyAsDmaRequestCallback called") ;
+
+ /*
+ * Extract the return code from the firmware
+ */
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (CyAsLLRequestResponse_GetCode(resp_p) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(resp_p, 0) ;
+ }
+
+ /*
+ * Extract the endpoint number and the transferred byte count
+ * from the request.
+ */
+ v = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ ep = (CyAsEndPointNumber_t)((v >> 13) & 0x01) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ /*
+ * If the firmware returns success, all of the data requested was
+ * transferred. There are no partial transfers.
+ */
+ datacnt = v & 0x3FF ;
+ }
+ else
+ {
+ /*
+ * If the firmware returned an error, no data was transferred.
+ */
+ datacnt = 0 ;
+ }
+
+ /*
+ * Queue the request and response data structures for use with the
+ * next EP0 or EP1 request.
+ */
+ if (ep == 0)
+ {
+ dev_p->usb_ep0_dma_req = req_p ;
+ dev_p->usb_ep0_dma_resp = resp_p ;
+ }
+ else
+ {
+ dev_p->usb_ep1_dma_req = req_p ;
+ dev_p->usb_ep1_dma_resp = resp_p ;
+ }
+
+ /*
+ * Call the DMA complete function so we can signal that this portion of the
+ * transfer has completed. If the low level request was canceled, we do not
+ * need to signal the completed function as the only way a cancel can happen
+ * is via the DMA cancel function.
+ */
+ if (ret != CY_AS_ERROR_CANCELED)
+ CyAsDmaCompletedCallback(dev_p->tag, ep, datacnt, ret) ;
+}
+
+/*
+ * Set the DRQ mask register for the given endpoint number. If state is
+ * CyTrue, the DRQ interrupt for the given endpoint is enabled, otherwise
+ * it is disabled.
+ */
+static void
+CyAsDmaSetDrq(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, CyBool state)
+{
+ uint16_t mask ;
+ uint16_t v ;
+ uint32_t intval ;
+
+ /*
+ * There are not DRQ register bits for EP0 and EP1
+ */
+ if (ep == 0 || ep == 1)
+ return ;
+
+ /*
+ * Disable interrupts while we do this to be sure the state of the
+ * DRQ mask register is always well defined.
+ */
+ intval = CyAsHalDisableInterrupts() ;
+
+ /*
+ * Set the DRQ bit to the given state for the ep given
+ */
+ mask = (1 << ep) ;
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_DRQ_MASK) ;
+
+ if (state)
+ v |= mask ;
+ else
+ v &= ~mask ;
+
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_DRQ_MASK, v) ;
+ CyAsHalEnableInterrupts(intval) ;
+}
+
+/*
+* Send the next DMA request for the endpoint given
+*/
+static void
+CyAsDmaSendNextDmaRequest(CyAsDevice *dev_p, CyAsDmaEndPoint *ep_p)
+{
+ uint32_t datacnt ;
+ void *buf_p ;
+ CyAsDmaQueueEntry *dma_p ;
+
+ CyAsLogDebugMessage(6, "CyAsDmaSendNextDmaRequest called") ;
+
+ /* If the queue is empty, nothing to do */
+ dma_p = ep_p->queue_p ;
+ if (dma_p == 0)
+ {
+ /*
+ * There are not pending DMA requests for this endpoint. Disable
+ * the DRQ mask bits to insure no interrupts will be triggered by this
+ * endpoint until someone is interested in the data.
+ */
+ CyAsDmaSetDrq(dev_p, ep_p->ep, CyFalse) ;
+ return ;
+ }
+
+ CyAsDmaEndPointSetRunning(ep_p) ;
+
+ /*
+ * Get the number of words that still need to be xferred in
+ * this request.
+ */
+ datacnt = dma_p->size - dma_p->offset ;
+ CyAsHalAssert(datacnt >= 0) ;
+
+ /*
+ * The HAL layer should never limit the size of the transfer to
+ * something less than the maxhwdata otherwise, the data will be
+ * sent in packets that are not correct in size.
+ */
+ CyAsHalAssert(ep_p->maxhaldata == CY_AS_DMA_MAX_SIZE_HW_SIZE || ep_p->maxhaldata >= ep_p->maxhwdata) ;
+
+ /*
+ * Update the number of words that need to be xferred yet
+ * based on the limits of the HAL layer.
+ */
+ if (ep_p->maxhaldata == CY_AS_DMA_MAX_SIZE_HW_SIZE)
+ {
+ if (datacnt > ep_p->maxhwdata)
+ datacnt = ep_p->maxhwdata ;
+ }
+ else
+ {
+ if (datacnt > ep_p->maxhaldata)
+ datacnt = ep_p->maxhaldata ;
+ }
+
+ /*
+ * Find a pointer to the data that needs to be transferred
+ */
+ buf_p = (((char *)dma_p->buf_p) + dma_p->offset);
+
+ /*
+ * Mark a request in transit
+ */
+ CyAsDmaEndPointSetInTransit(ep_p) ;
+
+ if (ep_p->ep == 0 || ep_p->ep == 1)
+ {
+ /*
+ * If this is a WRITE request on EP0 and EP1, we write the data via an EP_DATA request
+ * to West Bridge via the mailbox registers. If this is a READ request, we do nothing and the data will
+ * arrive via an EP_DATA request from West Bridge. In the request handler for the USB context we will pass
+ * the data back into the DMA module.
+ */
+ if (dma_p->readreq == CyFalse)
+ {
+ uint16_t v ;
+ uint16_t len ;
+ CyAsLLRequestResponse *resp_p ;
+ CyAsLLRequestResponse *req_p ;
+ CyAsReturnStatus_t ret ;
+
+ len = (uint16_t)(datacnt / 2) ;
+ if (datacnt % 2)
+ len++ ;
+
+ len++ ;
+
+ if (ep_p->ep == 0)
+ {
+ req_p = dev_p->usb_ep0_dma_req ;
+ resp_p = dev_p->usb_ep0_dma_resp ;
+ dev_p->usb_ep0_dma_req = 0 ;
+ dev_p->usb_ep0_dma_resp = 0 ;
+ }
+ else
+ {
+ req_p = dev_p->usb_ep1_dma_req ;
+ resp_p = dev_p->usb_ep1_dma_resp ;
+ dev_p->usb_ep1_dma_req = 0 ;
+ dev_p->usb_ep1_dma_resp = 0 ;
+ }
+
+ CyAsHalAssert(req_p != 0) ;
+ CyAsHalAssert(resp_p != 0) ;
+ CyAsHalAssert(len <= 64) ;
+
+ CyAsLLInitRequest(req_p, CY_RQT_USB_EP_DATA, CY_RQT_USB_RQT_CONTEXT, len) ;
+
+ v = (uint16_t)(datacnt | (ep_p->ep << 13) | (1 << 14)) ;
+ if (dma_p->offset == 0)
+ v |= (1 << 12) ; /* Set the first packet bit */
+ if (dma_p->offset + datacnt == dma_p->size)
+ v |= (1 << 11) ; /* Set the last packet bit */
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, v) ;
+ CyAsLLRequestResponse_Pack(req_p, 1, datacnt, buf_p) ;
+
+ CyAsLLInitResponse(resp_p, 1) ;
+
+ ret = CyAsLLSendRequest(dev_p, req_p, resp_p, CyFalse, CyAsDmaRequestCallback) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ CyAsLogDebugMessage(5, "+++ Send EP 0/1 data via mailbox registers") ;
+ else
+ CyAsLogDebugMessage(5, "+++ Error Sending EP 0/1 data via mailbox registers - CY_AS_ERROR_TIMEOUT") ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsDmaCompletedCallback(dev_p->tag, ep_p->ep, 0, ret) ;
+ }
+ }
+ else
+ {
+ /*
+ * This is a DMA request on an endpoint that is accessible via the P port. Ask the
+ * HAL DMA capabilities to perform this. The amount of data sent is limited by the
+ * HAL max size as well as what we need to send. If the ep_p->maxhaldata is set to
+ * a value larger than the endpoint buffer size, then we will pass more than a single
+ * buffer worth of data to the HAL layer and expect the HAL layer to divide the data
+ * into packets. The last parameter here (ep_p->maxhwdata) gives the packet size for
+ * the data so the HAL layer knows what the packet size should be.
+ */
+ if (CyAsDmaEndPointIsDirectionIn(ep_p))
+ CyAsHalDmaSetupWrite(dev_p->tag, ep_p->ep, buf_p, datacnt, ep_p->maxhwdata) ;
+ else
+ CyAsHalDmaSetupRead(dev_p->tag, ep_p->ep, buf_p, datacnt, ep_p->maxhwdata) ;
+
+ /*
+ * The DRQ interrupt for this endpoint should be enabled so that the data
+ * transfer progresses at interrupt time.
+ */
+ CyAsDmaSetDrq(dev_p, ep_p->ep, CyTrue) ;
+ }
+}
+
+/*
+ * This function is called when the HAL layer has completed the last requested DMA
+ * operation. This function sends/receives the next batch of data associated with the
+ * current DMA request, or it is is complete, moves to the next DMA request.
+ */
+void
+CyAsDmaCompletedCallback(CyAsHalDeviceTag tag, CyAsEndPointNumber_t ep, uint32_t cnt, CyAsReturnStatus_t status)
+{
+ uint32_t mask ;
+ CyAsDmaQueueEntry *req_p ;
+ CyAsDmaEndPoint *ep_p ;
+ CyAsDevice *dev_p = CyAsDeviceFindFromTag(tag) ;
+
+ /* Make sure the HAL layer gave us good parameters */
+ CyAsHalAssert(dev_p != 0) ;
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE) ;
+ CyAsHalAssert(ep < 16) ;
+
+
+ /* Get the endpoint ptr */
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+ CyAsHalAssert(ep_p->queue_p != 0) ;
+
+ /* Get a pointer to the current entry in the queue */
+ mask = CyAsHalDisableInterrupts() ;
+ req_p = ep_p->queue_p ;
+
+ /* Update the offset to reflect the data actually received or sent */
+ req_p->offset += cnt ;
+
+ /*
+ * If we are still sending/receiving the current packet, send/receive the next chunk
+ * Basically we keep going if we have not sent/received enough data, and we are not doing
+ * a packet operation, and the last packet sent or received was a full sized packet. In
+ * other words, when we are NOT doing a packet operation, a less than full size packet
+ * (a short packet) will terminate the operation.
+ *
+ * Note: If this is EP1 request and the request has timed out, it means the buffer is not free.
+ * We have to resend the data.
+ *
+ * Note: For the MTP data transfers, the DMA transfer for the next packet can only be started
+ * asynchronously, after a firmware event notifies that the device is ready.
+ */
+ if (((req_p->offset != req_p->size) && (req_p->packet == CyFalse) && ((cnt == ep_p->maxhaldata) ||
+ ((cnt == ep_p->maxhwdata) && ((ep != CY_AS_MTP_READ_ENDPOINT) || (cnt == dev_p->usb_max_tx_size)))))
+ || ((ep == 1) && (status == CY_AS_ERROR_TIMEOUT)))
+ {
+ CyAsHalEnableInterrupts(mask) ;
+
+ /*
+ * And send the request again to send the next block of data. Special handling for
+ * MTP transfers on EPs 2 and 6. The SendNextRequest will be processed based on the
+ * event sent by the firmware.
+ */
+ if ((ep == CY_AS_MTP_WRITE_ENDPOINT) || (
+ (ep == CY_AS_MTP_READ_ENDPOINT) && (!CyAsDmaEndPointIsDirectionIn (ep_p))))
+ CyAsDmaEndPointSetStopped(ep_p) ;
+ else
+ CyAsDmaSendNextDmaRequest(dev_p, ep_p) ;
+ }
+ else
+ {
+ /*
+ * We get here if ...
+ * we have sent or received all of the data
+ * or
+ * we are doing a packet operation
+ * or
+ * we receive a short packet
+ */
+
+ /*
+ * Remove this entry from the DMA queue for this endpoint.
+ */
+ CyAsDmaEndPointClearInTransit(ep_p) ;
+ ep_p->queue_p = req_p->next_p ;
+ if (ep_p->last_p == req_p)
+ {
+ /*
+ * We have removed the last packet from the DMA queue, disable the
+ * interrupt associated with this interrupt.
+ */
+ ep_p->last_p = 0 ;
+ CyAsHalEnableInterrupts(mask) ;
+ CyAsDmaSetDrq(dev_p, ep, CyFalse) ;
+ }
+ else
+ CyAsHalEnableInterrupts(mask) ;
+
+ if (req_p->cb)
+ {
+ /*
+ * If the request has a callback associated with it, call the callback
+ * to tell the interested party that this DMA request has completed.
+ *
+ * Note, we set the InCallback bit to insure that we cannot recursively
+ * call an API function that is synchronous only from a callback.
+ */
+ CyAsDeviceSetInCallback(dev_p) ;
+ (*req_p->cb)(dev_p, ep, req_p->buf_p, req_p->offset, status) ;
+ CyAsDeviceClearInCallback(dev_p) ;
+ }
+
+ /*
+ * We are done with this request, put it on the freelist to be
+ * reused at a later time.
+ */
+ CyAsDmaAddRequestToFreeQueue(dev_p, req_p) ;
+
+ if (ep_p->queue_p == 0)
+ {
+ /*
+ * If the endpoint is out of DMA entries, set it the endpoint as
+ * stopped.
+ */
+ CyAsDmaEndPointSetStopped(ep_p) ;
+
+ /*
+ * The DMA queue is empty, wake any task waiting on the QUEUE to
+ * drain.
+ */
+ if (CyAsDmaEndPointIsSleeping(ep_p))
+ {
+ CyAsDmaEndPointSetWakeState(ep_p) ;
+ CyAsHalWake(&ep_p->channel) ;
+ }
+ }
+ else
+ {
+ /*
+ * If the queued operation is a MTP transfer, wait until firmware event
+ * before sending down the next DMA request.
+ */
+ if ((ep == CY_AS_MTP_WRITE_ENDPOINT) || (
+ (ep == CY_AS_MTP_READ_ENDPOINT) && (!CyAsDmaEndPointIsDirectionIn (ep_p))))
+ CyAsDmaEndPointSetStopped(ep_p) ;
+ else
+ CyAsDmaSendNextDmaRequest(dev_p, ep_p) ;
+ }
+ }
+}
+
+/*
+* This function is used to kick start DMA on a given channel. If DMA is already running
+* on the given endpoint, nothing happens. If DMA is not running, the first entry is pulled
+* from the DMA queue and sent/recevied to/from the West Bridge device.
+*/
+CyAsReturnStatus_t
+CyAsDmaKickStart(CyAsDevice *dev_p, CyAsEndPointNumber_t ep)
+{
+ CyAsDmaEndPoint *ep_p ;
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE) ;
+
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+
+ /* We are already running */
+ if (CyAsDmaEndPointIsRunning(ep_p))
+ return CY_AS_ERROR_SUCCESS ;
+
+ CyAsDmaSendNextDmaRequest(dev_p, ep_p);
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+ * This function stops the given endpoint. Stopping and endpoint cancels
+ * any pending DMA operations and frees all resources associated with the
+ * given endpoint.
+ */
+static CyAsReturnStatus_t
+CyAsDmaStopEndPoint(CyAsDevice *dev_p, CyAsEndPointNumber_t ep)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsDmaEndPoint *ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+
+ /*
+ * Cancel any pending DMA requests associated with this endpoint. This
+ * cancels any DMA requests at the HAL layer as well as dequeues any request
+ * that is currently pending.
+ */
+ ret = CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_CANCELED) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /*
+ * Destroy the sleep channel
+ */
+ if (!CyAsHalDestroySleepChannel(&ep_p->channel) && ret == CY_AS_ERROR_SUCCESS)
+ ret = CY_AS_ERROR_DESTROY_SLEEP_CHANNEL_FAILED ;
+
+ /*
+ * Free the memory associated with this endpoint
+ */
+ CyAsHalFree(ep_p) ;
+
+ /*
+ * Set the data structure ptr to something sane since the
+ * previous pointer is now free.
+ */
+ dev_p->endp[ep] = 0 ;
+
+ return ret ;
+}
+
+/*
+ * This method stops the USB stack. This is an internal function that does
+ * all of the work of destroying the USB stack without the protections that
+ * we provide to the API (i.e. stopping at stack that is not running).
+ */
+static CyAsReturnStatus_t
+CyAsDmaStopInternal(CyAsDevice *dev_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsReturnStatus_t lret ;
+ CyAsEndPointNumber_t i ;
+
+ /*
+ * Stop all of the endpoints. This cancels all DMA requests, and
+ * frees all resources associated with each endpoint.
+ */
+ for(i = 0 ; i < sizeof(dev_p->endp)/(sizeof(dev_p->endp[0])) ; i++)
+ {
+ lret = CyAsDmaStopEndPoint(dev_p, i) ;
+ if (lret != CY_AS_ERROR_SUCCESS && ret == CY_AS_ERROR_SUCCESS)
+ ret = lret ;
+ }
+
+ /*
+ * Now, free the list of DMA requests structures that we use to manage
+ * DMA requests.
+ */
+ while (dev_p->dma_freelist_p)
+ {
+ CyAsDmaQueueEntry *req_p ;
+ uint32_t imask = CyAsHalDisableInterrupts() ;
+
+ req_p = dev_p->dma_freelist_p ;
+ dev_p->dma_freelist_p = req_p->next_p ;
+
+ CyAsHalEnableInterrupts(imask) ;
+
+ CyAsHalFree(req_p) ;
+ }
+
+ CyAsLLDestroyRequest(dev_p, dev_p->usb_ep0_dma_req) ;
+ CyAsLLDestroyRequest(dev_p, dev_p->usb_ep1_dma_req) ;
+ CyAsLLDestroyResponse(dev_p, dev_p->usb_ep0_dma_resp) ;
+ CyAsLLDestroyResponse(dev_p, dev_p->usb_ep1_dma_resp) ;
+
+ return ret ;
+}
+
+
+/*
+ * CyAsDmaStop()
+ *
+ * This function shuts down the DMA module. All resources associated with the DMA module
+ * will be freed. This routine is the API stop function. It insures that we are stopping
+ * a stack that is actually running and then calls the internal function to do the work.
+ */
+CyAsReturnStatus_t
+CyAsDmaStop(CyAsDevice *dev_p)
+{
+ CyAsReturnStatus_t ret ;
+
+ ret = CyAsDmaStopInternal(dev_p) ;
+ CyAsDeviceSetDmaStopped(dev_p) ;
+
+ return ret ;
+}
+
+/*
+ * CyAsDmaStart()
+ *
+ * This function intializes the DMA module to insure it is up and running.
+ */
+CyAsReturnStatus_t
+CyAsDmaStart(CyAsDevice *dev_p)
+{
+ CyAsEndPointNumber_t i ;
+ uint16_t cnt ;
+
+ if (CyAsDeviceIsDmaRunning(dev_p))
+ return CY_AS_ERROR_ALREADY_RUNNING ;
+
+ /*
+ * Pre-allocate DMA Queue structures to be used in the interrupt context
+ */
+ for(cnt = 0 ; cnt < 32 ; cnt++)
+ {
+ CyAsDmaQueueEntry *entry_p = (CyAsDmaQueueEntry *)CyAsHalAlloc(sizeof(CyAsDmaQueueEntry)) ;
+ if (entry_p == 0)
+ {
+ CyAsDmaStopInternal(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ CyAsDmaAddRequestToFreeQueue(dev_p, entry_p) ;
+ }
+
+ /*
+ * Pre-allocate the DMA requests for sending EP0 and EP1 data to West Bridge
+ */
+ dev_p->usb_ep0_dma_req = CyAsLLCreateRequest(dev_p, CY_RQT_USB_EP_DATA, CY_RQT_USB_RQT_CONTEXT, 64) ;
+ dev_p->usb_ep1_dma_req = CyAsLLCreateRequest(dev_p, CY_RQT_USB_EP_DATA, CY_RQT_USB_RQT_CONTEXT, 64) ;
+ if (dev_p->usb_ep0_dma_req == 0 || dev_p->usb_ep1_dma_req == 0)
+ {
+ CyAsDmaStopInternal(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ dev_p->usb_ep0_dma_req_save = dev_p->usb_ep0_dma_req ;
+
+ dev_p->usb_ep0_dma_resp = CyAsLLCreateResponse(dev_p, 1) ;
+ dev_p->usb_ep1_dma_resp = CyAsLLCreateResponse(dev_p, 1) ;
+ if (dev_p->usb_ep0_dma_resp == 0 || dev_p->usb_ep1_dma_resp == 0)
+ {
+ CyAsDmaStopInternal(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ dev_p->usb_ep0_dma_resp_save = dev_p->usb_ep0_dma_resp ;
+
+ /*
+ * Set the dev_p->endp to all zeros to insure cleanup is possible if
+ * an error occurs during initialization.
+ */
+ CyAsHalMemSet(dev_p->endp, 0, sizeof(dev_p->endp)) ;
+
+ /*
+ * Now, iterate through each of the endpoints and initialize each
+ * one.
+ */
+ for(i = 0 ; i < sizeof(dev_p->endp)/sizeof(dev_p->endp[0]) ; i++)
+ {
+ dev_p->endp[i] = (CyAsDmaEndPoint *)CyAsHalAlloc(sizeof(CyAsDmaEndPoint)) ;
+ if (dev_p->endp[i] == 0)
+ {
+ CyAsDmaStopInternal(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ CyAsHalMemSet(dev_p->endp[i], 0, sizeof(CyAsDmaEndPoint)) ;
+
+ dev_p->endp[i]->ep = i ;
+ dev_p->endp[i]->queue_p = 0 ;
+ dev_p->endp[i]->last_p = 0 ;
+
+ CyAsDmaSetDrq(dev_p, i, CyFalse) ;
+
+ if (!CyAsHalCreateSleepChannel(&dev_p->endp[i]->channel))
+ return CY_AS_ERROR_CREATE_SLEEP_CHANNEL_FAILED ;
+ }
+
+ /*
+ * Tell the HAL layer who to call when the HAL layer completes a DMA request
+ */
+ CyAsHalDmaRegisterCallback(dev_p->tag, CyAsDmaCompletedCallback) ;
+
+ /*
+ * Mark DMA as up and running on this device
+ */
+ CyAsDeviceSetDmaRunning(dev_p) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+* Wait for all entries in the DMA queue associated the given endpoint to be drained. This
+* function will not return until all the DMA data has been transferred.
+*/
+CyAsReturnStatus_t
+CyAsDmaDrainQueue(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, CyBool kickstart)
+{
+ CyAsDmaEndPoint *ep_p ;
+ int loopcount = 1000 ;
+ uint32_t mask ;
+
+ /*
+ * Make sure the endpoint is valid
+ */
+ if (ep >= sizeof(dev_p->endp)/sizeof(dev_p->endp[0]))
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* Get the endpoint pointer based on the endpoint number */
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+
+ /*
+ * If the endpoint is empty of traffic, we return
+ * with success immediately
+ */
+ mask = CyAsHalDisableInterrupts() ;
+ if (ep_p->queue_p == 0)
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ return CY_AS_ERROR_SUCCESS ;
+ }
+ else
+ {
+ /*
+ * Add 10 seconds to the time out value for each 64 KB segment
+ * of data to be transferred.
+ */
+ if (ep_p->queue_p->size > 0x10000)
+ loopcount += ((ep_p->queue_p->size / 0x10000) * 1000) ;
+ }
+ CyAsHalEnableInterrupts(mask) ;
+
+ /* If we are already sleeping on this endpoint, it is an error */
+ if (CyAsDmaEndPointIsSleeping(ep_p))
+ return CY_AS_ERROR_NESTED_SLEEP ;
+
+ /*
+ * We disable the endpoint while the queue drains to
+ * prevent any additional requests from being queued while we are waiting
+ */
+ CyAsDmaEnableEndPoint(dev_p, ep, CyFalse, CyAsDirectionDontChange) ;
+
+ if (kickstart)
+ {
+ /*
+ * Now, kick start the DMA if necessary
+ */
+ CyAsDmaKickStart(dev_p, ep) ;
+ }
+
+ /*
+ * Check one last time before we begin sleeping to see if the
+ * queue is drained.
+ */
+ if (ep_p->queue_p == 0)
+ {
+ CyAsDmaEnableEndPoint(dev_p, ep, CyTrue, CyAsDirectionDontChange) ;
+ return CY_AS_ERROR_SUCCESS ;
+ }
+
+ while (loopcount-- > 0)
+ {
+ /*
+ * Sleep for 10 ms maximum (per loop) while waiting for the transfer
+ * to complete.
+ */
+ CyAsDmaEndPointSetSleepState(ep_p) ;
+ CyAsHalSleepOn(&ep_p->channel, 10) ;
+
+ /* If we timed out, the sleep bit will still be set */
+ CyAsDmaEndPointSetWakeState(ep_p) ;
+
+ /* Check the queue to see if is drained */
+ if (ep_p->queue_p == 0)
+ {
+ /*
+ * Clear the endpoint running and in transit flags for the endpoint,
+ * now that its DMA queue is empty.
+ */
+ CyAsDmaEndPointClearInTransit(ep_p) ;
+ CyAsDmaEndPointSetStopped(ep_p) ;
+
+ CyAsDmaEnableEndPoint(dev_p, ep, CyTrue, CyAsDirectionDontChange) ;
+ return CY_AS_ERROR_SUCCESS ;
+ }
+ }
+
+ /*
+ * The DMA operation that has timed out can be cancelled, so that later
+ * operations on this queue can proceed.
+ */
+ CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_TIMEOUT) ;
+ CyAsDmaEnableEndPoint(dev_p, ep, CyTrue, CyAsDirectionDontChange) ;
+ return CY_AS_ERROR_TIMEOUT ;
+}
+
+/*
+* This function queues a write request in the DMA queue for a given endpoint. The direction of the
+* entry will be inferred from the endpoint direction.
+*/
+CyAsReturnStatus_t
+CyAsDmaQueueRequest(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *mem_p, uint32_t size, CyBool pkt, CyBool readreq, CyAsDmaCallback cb)
+{
+ uint32_t mask ;
+ CyAsDmaQueueEntry *entry_p ;
+ CyAsDmaEndPoint *ep_p ;
+
+ /*
+ * Make sure the endpoint is valid
+ */
+ if (ep >= sizeof(dev_p->endp)/sizeof(dev_p->endp[0]))
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* Get the endpoint pointer based on the endpoint number */
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+
+ if (!CyAsDmaEndPointIsEnabled(ep_p))
+ return CY_AS_ERROR_ENDPOINT_DISABLED ;
+
+ entry_p = CyAsDmaGetDmaQueueEntry(dev_p) ;
+
+ entry_p->buf_p = mem_p ;
+ entry_p->cb = cb ;
+ entry_p->size = size ;
+ entry_p->offset = 0 ;
+ entry_p->packet = pkt ;
+ entry_p->readreq = readreq ;
+
+ mask = CyAsHalDisableInterrupts() ;
+ entry_p->next_p = 0 ;
+ if (ep_p->last_p)
+ ep_p->last_p->next_p = entry_p ;
+ ep_p->last_p = entry_p ;
+ if (ep_p->queue_p == 0)
+ ep_p->queue_p = entry_p ;
+ CyAsHalEnableInterrupts(mask) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+* This function enables or disables and endpoint for DMA queueing. If an endpoint is disabled, any queued
+* requests continue to be processed, but no new requests can be queued.
+*/
+CyAsReturnStatus_t
+CyAsDmaEnableEndPoint(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, CyBool enable, CyAsDmaDirection dir)
+{
+ CyAsDmaEndPoint *ep_p ;
+
+ /*
+ * Make sure the endpoint is valid
+ */
+ if (ep >= sizeof(dev_p->endp)/sizeof(dev_p->endp[0]))
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* Get the endpoint pointer based on the endpoint number */
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+
+ if (dir == CyAsDirectionOut)
+ CyAsDmaEndPointSetDirectionOut(ep_p) ;
+ else if (dir == CyAsDirectionIn)
+ CyAsDmaEndPointSetDirectionIn(ep_p) ;
+
+ /*
+ * Get the maximum size of data buffer the HAL layer can accept. This is used when
+ * the DMA module is sending DMA requests to the HAL. The DMA module will never send
+ * down a request that is greater than this value.
+ *
+ * For EP0 and EP1, we can send no more than 64 bytes of data at one time as this is the
+ * maximum size of a packet that can be sent via these endpoints.
+ */
+ if (ep == 0 || ep == 1)
+ ep_p->maxhaldata = 64 ;
+ else
+ ep_p->maxhaldata = CyAsHalDmaMaxRequestSize(dev_p->tag, ep) ;
+
+ if (enable)
+ CyAsDmaEndPointEnable(ep_p) ;
+ else
+ CyAsDmaEndPointDisable(ep_p) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+ * This function cancels any DMA operations pending with the HAL layer as well
+ * as any DMA operation queued on the endpoint.
+ */
+CyAsReturnStatus_t
+CyAsDmaCancel(
+ CyAsDevice *dev_p,
+ CyAsEndPointNumber_t ep,
+ CyAsReturnStatus_t err)
+{
+ uint32_t mask ;
+ CyAsDmaEndPoint *ep_p ;
+ CyAsDmaQueueEntry *entry_p ;
+ CyBool epstate ;
+
+ /*
+ * Make sure the endpoint is valid
+ */
+ if (ep >= sizeof(dev_p->endp)/sizeof(dev_p->endp[0]))
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* Get the endpoint pointer based on the endpoint number */
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+
+ if (ep_p)
+ {
+ /* Remember the state of the endpoint */
+ epstate = CyAsDmaEndPointIsEnabled(ep_p) ;
+
+ /*
+ * Disable the endpoint so no more DMA packets can be
+ * queued.
+ */
+ CyAsDmaEnableEndPoint(dev_p, ep, CyFalse, CyAsDirectionDontChange) ;
+
+ /*
+ * Don't allow any interrupts from this endpoint while we get the
+ * most current request off of the queue.
+ */
+ CyAsDmaSetDrq(dev_p, ep, CyFalse) ;
+
+ /*
+ * Cancel any pending request queued in the HAL layer
+ */
+ if (CyAsDmaEndPointInTransit(ep_p))
+ CyAsHalDmaCancelRequest(dev_p->tag, ep_p->ep) ;
+
+ /*
+ * Shutdown the DMA for this endpoint so no more data is transferred
+ */
+ CyAsDmaEndPointSetStopped(ep_p) ;
+
+ /*
+ * Mark the endpoint as not in transit, because we are going to consume
+ * any queued requests
+ */
+ CyAsDmaEndPointClearInTransit(ep_p) ;
+
+ /*
+ * Now, remove each entry in the queue and call the associated callback
+ * stating that the request was canceled.
+ */
+ ep_p->last_p = 0 ;
+ while (ep_p->queue_p != 0)
+ {
+ /* Disable interrupts to manipulate the queue */
+ mask = CyAsHalDisableInterrupts() ;
+
+ /* Remove an entry from the queue */
+ entry_p = ep_p->queue_p ;
+ ep_p->queue_p = entry_p->next_p ;
+
+ /* Ok, the queue has been updated, we can turn interrupts back on */
+ CyAsHalEnableInterrupts(mask) ;
+
+ /* Call the callback indicating we have canceled the DMA */
+ if (entry_p->cb)
+ entry_p->cb(dev_p, ep, entry_p->buf_p, entry_p->size, err) ;
+
+ CyAsDmaAddRequestToFreeQueue(dev_p, entry_p) ;
+ }
+
+ if (ep == 0 || ep == 1)
+ {
+ /*
+ * If this endpoint is zero or one, we need to clear the queue of any pending
+ * CY_RQT_USB_EP_DATA requests as these are pending requests to send data to
+ * the West Bridge device.
+ */
+ CyAsLLRemoveEpDataRequests(dev_p, ep) ;
+ }
+
+ if (epstate)
+ {
+ /*
+ * The endpoint started out enabled, so we re-enable the endpoint here.
+ */
+ CyAsDmaEnableEndPoint(dev_p, ep, CyTrue, CyAsDirectionDontChange) ;
+ }
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+CyAsReturnStatus_t
+CyAsDmaReceivedData(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, uint32_t dsize, void *data)
+{
+ CyAsDmaQueueEntry *dma_p ;
+ uint8_t *src_p, *dest_p ;
+ CyAsDmaEndPoint *ep_p ;
+ uint32_t xfersize ;
+
+ /*
+ * Make sure the endpoint is valid
+ */
+ if (ep != 0 && ep != 1)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* Get the endpoint pointer based on the endpoint number */
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+ dma_p = ep_p->queue_p ;
+ if (dma_p == 0)
+ return CY_AS_ERROR_SUCCESS ;
+
+ /*
+ * If the data received exceeds the size of the DMA buffer, clip the data to the size
+ * of the buffer. This can lead to loosing some data, but is not different than doing
+ * non-packet reads on the other endpoints.
+ */
+ if (dsize > dma_p->size - dma_p->offset)
+ dsize = dma_p->size - dma_p->offset ;
+
+ /*
+ * Copy the data from the request packet to the DMA buffer for the endpoint
+ */
+ src_p = (uint8_t *)data ;
+ dest_p = ((uint8_t *)(dma_p->buf_p)) + dma_p->offset ;
+ xfersize = dsize ;
+ while (xfersize-- > 0)
+ *dest_p++ = *src_p++ ;
+
+ /* Signal the DMA module that we have received data for this EP request */
+ CyAsDmaCompletedCallback(dev_p->tag, ep, dsize, CY_AS_ERROR_SUCCESS) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasdma.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,312 @@
+/* Cypress West Bridge API header file (cyasdma.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASDMA_H_
+#define _INCLUDED_CYASDMA_H_
+
+#include "cyashal.h"
+#include "cyasdevice.h"
+
+#include "cyas_cplus_start.h"
+
+
+/*@@DMA Overview
+ This module manages the DMA operations to/from the West Bridge device. The
+ DMA module maintains a DMA queue for each endpoint so multiple DMA requests
+ may be queued and they will complete at some future time.
+
+ The DMA module must be started before it can be used. It is started by
+ calling CyAsDmaStart(). This function intializes all of the endpoint
+ data structures.
+
+ In order to perform DMA on a particular endpoint, the endpoint must be
+ enabled by calling CyAsDmaEnableEndPoint(). In addition to enabling or
+ disabling the endpoint, this function also sets the direction for a
+ given endpoint. Direction is given in USB terms. For P port to West Bridge
+ traffic, the endpoint is a CyAsDirectionIn endpoint. For West Bridge to P
+ port traffic, the endpoint is a CyAsDirectionOut endpoint.
+
+ Once DMA is started and an endpoint is enabled, DMA requests are issued by
+ calling CyAsDmaQueueRequest(). This function queue either a DMA read or
+ DMA write request. The callback associated with the request is called once
+ the request has been fulfilled.
+
+ See Also
+ * CyAsDmaStart
+ * CyAsDmaEnableEndPoint
+ * CyAsDmaDirection
+ * CyAsDmaQueueRequest
+ */
+
+/*****************************************************************************
+ * West Bridge Constants
+ ****************************************************************************/
+#define CY_AS_DMA_MAX_SIZE_HW_SIZE (0xffffffff)
+
+/*****************************************************************************
+ * West Bridge Data Structures
+ ****************************************************************************/
+
+/* Summary
+ This type specifies the direction of an endpoint to the CyAsDmaEnableEndPoint function.
+
+ Description
+ When an endpoint is enabled, the direction of the endpoint can also be set.
+ This type is used to specify the endpoint type. Note that the direction is specified in
+ USB terms. Therefore, if the DMA is from the P port to West Bridge, the direction is IN.
+
+ See Also
+ * CyAsDmaEnableEndPoint
+*/
+typedef enum CyAsDmaDirection
+{
+ CyAsDirectionIn = 0, /* Set the endpoint to type IN (P -> West Bridge) */
+ CyAsDirectionOut = 1, /* Set the endpoint to type OUT (West Bridge -> P) */
+ CyAsDirectionInOut = 2, /* Only valid for EP 0 */
+ CyAsDirectionDontChange = 3 /* Do no change the endpoint type */
+} CyAsDmaDirection ;
+
+/*****************************************************************************
+ * West Bridge Functions
+ ****************************************************************************/
+
+/* Summary
+ Initialize the DMA module and ready the module for receiving data
+
+ Description
+ This function initializes the DMA module by initializing all of the endpoint data
+ structures associated with the device given. This function also register a DMA
+ complete callback with the HAL DMA code. This callback is called whenever the
+ HAL DMA subsystem completes a requested DMA operation.
+
+ Returns
+ CY_AS_ERROR_SUCCESS - the module initialized sucessfully
+ CY_AS_ERROR_OUT_OF_MEMORY - memory allocation failed during initialization
+ CY_AS_ERROR_ALREADY_RUNNING - the DMA module was already running
+
+ See Also
+ * CyAsDmaStop
+*/
+extern CyAsReturnStatus_t
+CyAsDmaStart(
+ CyAsDevice * dev_p /* The device to start */
+ ) ;
+
+/* Summary
+ Shutdown the DMA module
+
+ Description
+ This function shuts down the DMA module for this device by canceling any DMA requests
+ associated with each endpoint and then freeing the resources associated with each DMA
+ endpoint.
+
+ Returns
+ CY_AS_ERROR_SUCCESS - the module shutdown sucessfully
+ CY_AS_ERROR_NOT_RUNNING - the DMA module was not running
+
+ See Also
+ * CyAsDmaStart
+ * CyAsDmaCancel
+*/
+extern CyAsReturnStatus_t
+CyAsDmaStop(
+ CyAsDevice * dev_p /* The device to stop */
+ ) ;
+
+/* Summary
+ This function cancels all outstanding DMA requests on a given endpoint
+
+ Description
+ This function cancels any DMA requests outstanding on a given endpoint by
+ disabling the transfer of DMA requests from the queue to the HAL layer and
+ then removing any pending DMA requests from the queue. The callback associated
+ with any DMA requests that are being removed is called with an error code of
+ CY_AS_ERROR_CANCELED.
+
+ Notes
+ If a request has already been sent to the HAL layer it will be completed and
+ not canceled. Only requests that have not been sent to the HAL layer will be
+ canceled.
+
+ Returns
+ CY_AS_ERROR_SUCCESS - the traffic on the endpoint is canceled sucessfully
+
+ See Also
+*/
+extern CyAsReturnStatus_t
+CyAsDmaCancel(
+ CyAsDevice * dev_p, /* The device of interest */
+ CyAsEndPointNumber_t ep, /* The endpoint to cancel */
+ CyAsReturnStatus_t err
+ ) ;
+
+/* Summary
+ This function enables a single endpoint for DMA operations
+
+ Description
+ In order to enable the queuing of DMA requests on a given endpoint, the endpoint
+ must be enabled for DMA. This function enables a given endpoint. In addition, this
+ function sets the direction of the DMA operation.
+
+ Returns
+ * CY_AS_ERROR_INVALID_ENDPOINT - invalid endpoint number
+ * CY_AS_ERROR_SUCCESS - endpoint was enabled or disabled successfully
+
+ See Also
+ * CyAsDmaQueueRequest
+*/
+extern CyAsReturnStatus_t
+CyAsDmaEnableEndPoint(
+ CyAsDevice * dev_p, /* The device of interest */
+ CyAsEndPointNumber_t ep, /* The endpoint to enable or disable */
+ CyBool enable, /* CyTrue to enable, CyFalse to disable */
+ CyAsDmaDirection dir /* The direction of the endpoint */
+ ) ;
+
+/* Summary
+ This function queue a DMA request for a given endpoint
+
+ Description
+ When an West Bridge API module wishes to do a DMA operation, this function is called on the
+ associated endpoint to queue a DMA request. When the DMA request has been fulfilled, the
+ callback associated with the DMA operation is called.
+
+ Notes
+ The buffer associated with the DMA request, must remain valid until after the callback
+ function is calld.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the DMA operation was queued successfully
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint number was invalid
+ * CY_AS_ERROR_ENDPOINT_DISABLED - the endpoint was disabled
+ * CY_AS_ERROR_OUT_OF_MEMORY - out of memory processing the request
+
+ See Also
+ * CyAsDmaEnableEndPoint
+ * CyAsDmaCancel
+*/
+extern CyAsReturnStatus_t
+CyAsDmaQueueRequest(
+ CyAsDevice * dev_p, /* The device of interest */
+ CyAsEndPointNumber_t ep, /* The endpoint to receive a new request */
+ void * mem_p, /* The memory buffer for the DMA request - must be valid until after the callback has been called */
+ uint32_t size, /* The size of the DMA request in bytes */
+ CyBool packet, /* If true and a DMA read request, return the next packet regardless of size */
+ CyBool readreq, /* If true, this is a read request, otherwise it is a write request */
+ CyAsDmaCallback cb /* The callback to call when the DMA request is complete, either successfully or via an error */
+ ) ;
+
+/* Summary
+ This function waits until all DMA requests on a given endpoint have been processed and then return
+
+ Description
+ There are times when a module in the West Bridge API needs to wait until the DMA operations have been
+ queued. This function sleeps until all DMA requests have been fulfilled and only then returns to the caller.
+
+ Notes
+ I don't think we will need a list of sleeping clients to support multiple parallel client modules
+ sleeping on a single endpoint, but if we do instead of having a single sleep channel in the endpoint, each
+ client will have to supply a sleep channel and we will have to maintain a list of sleep channels to wake.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the queue has drained sucessfully
+ * CY_AS_ERROR_INVALID_ENDPOINT - the endpoint given is not valid
+ * CY_AS_ERROR_NESTED_SLEEP - CyAsDmaQueueRequest() was requested on an endpoint where CyAsDmaQueueRequest was already called
+*/
+extern CyAsReturnStatus_t
+CyAsDmaDrainQueue(
+ CyAsDevice * dev_p, /* The device of interest */
+ CyAsEndPointNumber_t ep, /* The endpoint to drain */
+ CyBool kickstart /* If CyTrue, call kickstart to start the DMA process,
+ If CyFalse, West Bridge will start the DMA process */
+ ) ;
+
+/* Summary
+ Sets the maximum amount of data West Bridge can accept in a single DMA Operation for the given endpoint
+
+ Description
+ Depending on the configuration of the West Bridge device endpoint, the amount of data that can be
+ accepted varies. This function sets the maximum amount of data West Bridge can accept in a single
+ DMA operation. The value is stored with the endpoint and passed to the HAL layer in the
+ CyAsHalDmaSetupWrite() and CyAsHalDmaSetupRead() functoins.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the value was set sucessfully
+ * CY_AS_ERROR_INVALID_SIZE - the size value was not valid
+*/
+extern CyAsReturnStatus_t
+CyAsDmaSetMaxDmaSize(
+ CyAsDevice * dev_p, /* The device of interest */
+ CyAsEndPointNumber_t ep, /* The endpoint to change */
+ uint32_t size /* The max size of this endpoint in bytes */
+ ) ;
+
+/* Summary
+ This function starts the DMA process on a given channel.
+
+ Description
+ When transferring data from the P port processor to West Bridge, the DMA operation must be initiated
+ P Port software for the first transfer. Subsequent transferrs will be handled at the interrupt level.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+*/
+extern CyAsReturnStatus_t
+CyAsDmaKickStart(
+ CyAsDevice * dev_p, /* The device of interest */
+ CyAsEndPointNumber_t ep /* The endpoint to change */
+ ) ;
+
+/* Summary
+ This function receives endpoint data from a request.
+
+ Description
+ For endpoint 0 and 1 the endpoint data is transferred from the West Bridge device to the DMA via a lowlevel
+ requests (via the mailbox registers).
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+*/
+extern CyAsReturnStatus_t
+CyAsDmaReceivedData(
+ CyAsDevice * dev_p, /* The device of interest */
+ CyAsEndPointNumber_t ep, /* The endpoint that received data */
+ uint32_t dsize, /* The data size */
+ void * data /* The data buffer */
+ );
+
+/* Summary
+ This function is called when the DMA operation on an endpoint has been completed.
+
+ Returns
+ * void
+ */
+extern void
+CyAsDmaCompletedCallback (
+ CyAsHalDeviceTag tag, /* Tag to HAL completing the DMA operation. */
+ CyAsEndPointNumber_t ep, /* Endpoint on which DMA has been completed. */
+ uint32_t length, /* Length of data received. */
+ CyAsReturnStatus_t status /* Status of DMA operation. */
+ ) ;
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYASDMA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasintr.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,141 @@
+/* Cypress West Bridge API source file (cyasintr.c)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#include "cyashal.h"
+#include "cyasdevice.h"
+#include "cyasregs.h"
+#include "cyaserr.h"
+
+extern void CyAsMailBoxInterruptHandler(CyAsDevice *) ;
+
+void
+CyAsMcuInterruptHandler(CyAsDevice *dev_p)
+{
+ /* Read and clear the interrupt. */
+ uint16_t v ;
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_MCU_STAT) ;
+ v = v ;
+}
+
+void
+CyAsPowerManagementInterruptHandler(CyAsDevice *dev_p)
+{
+ uint16_t v ;
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_PWR_MAGT_STAT) ;
+ v = v ;
+}
+
+void
+CyAsPllLockLossInterruptHandler(CyAsDevice *dev_p)
+{
+ uint16_t v ;
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_PLL_LOCK_LOSS_STAT) ;
+ v = v ;
+}
+
+uint32_t CyAsIntrStart(CyAsDevice *dev_p, CyBool dmaintr)
+{
+ uint16_t v ;
+
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE) ;
+
+ if (CyAsDeviceIsIntrRunning(dev_p) != 0)
+ return CY_AS_ERROR_ALREADY_RUNNING ;
+
+ v = CY_AS_MEM_P0_INT_MASK_REG_MMCUINT |
+ CY_AS_MEM_P0_INT_MASK_REG_MMBINT |
+ CY_AS_MEM_P0_INT_MASK_REG_MPMINT ;
+
+ if (dmaintr)
+ v |= CY_AS_MEM_P0_INT_MASK_REG_MDRQINT ;
+
+ /* Enable the interrupts of interest */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_INT_MASK_REG, v) ;
+
+ /* Mark the interrupt module as initialized */
+ CyAsDeviceSetIntrRunning(dev_p) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+uint32_t CyAsIntrStop(CyAsDevice *dev_p)
+{
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE) ;
+
+ if (CyAsDeviceIsIntrRunning(dev_p) == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_INT_MASK_REG, 0) ;
+ CyAsDeviceSetIntrStopped(dev_p) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+void CyAsIntrServiceInterrupt(CyAsHalDeviceTag tag)
+{
+ uint16_t v ;
+ CyAsDevice *dev_p ;
+
+ dev_p = CyAsDeviceFindFromTag(tag) ;
+
+ /*
+ Only power management interrupts can occur before the Antioch API setup is complete.
+ If this is a PM interrupt, handle it here; otherwise output a warning message.
+ */
+ if (dev_p == 0)
+ {
+ v = CyAsHalReadRegister(tag, CY_AS_MEM_P0_INTR_REG) ;
+ if (v == CY_AS_MEM_P0_INTR_REG_PMINT)
+ {
+ /* Read the PWR_MAGT_STAT register to clear this interrupt. */
+ v = CyAsHalReadRegister(tag, CY_AS_MEM_PWR_MAGT_STAT) ;
+ }
+ else
+ ;//CyAsHalPrintMessage("Stray Antioch interrupt detected, tag not associated with any created device.") ;
+ return ;
+ }
+
+ /* Make sure we got a valid object from CyAsDeviceFindFromTag */
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE) ;
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_INTR_REG) ;
+
+ if (v & CY_AS_MEM_P0_INTR_REG_MCUINT)
+ CyAsMcuInterruptHandler(dev_p) ;
+
+ if (v & CY_AS_MEM_P0_INTR_REG_PMINT)
+ CyAsPowerManagementInterruptHandler(dev_p) ;
+
+ if (v & CY_AS_MEM_P0_INTR_REG_PLLLOCKINT)
+ CyAsPllLockLossInterruptHandler(dev_p) ;
+
+ /* If the interrupt module is not running, no mailbox interrupts are expected
+ * from the Antioch. */
+ if (CyAsDeviceIsIntrRunning(dev_p) == 0)
+ return ;
+
+ if (v & CY_AS_MEM_P0_INTR_REG_MBINT)
+ CyAsMailBoxInterruptHandler(dev_p) ;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasintr.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,92 @@
+/* Cypress West Bridge API header file (cyasintr.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASINTR_H_
+#define _INCLUDED_CYASINTR_H_
+
+#include "cyasdevice.h"
+
+#include "cyas_cplus_start.h"
+
+/* Summary
+ Initialize the interrupt manager module
+
+ Description
+ This function is called to initialize the interrupt module. This module enables interrupts
+ as well as servies West Bridge related interrupts by determining the source of the interrupt and
+ calling the appropriate handler function.
+
+ Notes
+ If the dmaintr parameter is TRUE, the initialization code initializes the interrupt mask to
+ have the DMA related interrupt enabled via the general purpose interrupt. However, the interrupt
+ service function assumes that the DMA interrupt is handled by the HAL layer before the interrupt
+ module handler function is called.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the interrupt module was initialized correctly
+ * CY_AS_ERROR_ALREADY_RUNNING - the interrupt module was already started
+
+ See Also
+ * CyAsIntrStop
+ * CyAsServiceInterrupt
+*/
+extern CyAsReturnStatus_t
+CyAsIntrStart(
+ CyAsDevice * dev_p, /* Device being initialized */
+ CyBool dmaintr /* If true, enable the DMA interrupt through the INT signal */
+ ) ;
+
+/* Summary
+ Stop the interrupt manager module
+
+ Description
+ This function stops the interrupt module and masks all interrupts from the West Bridge device.
+
+ Returns
+ * CY_AS_ERROR_SUCCESS - the interrupt module was stopped sucessfully
+ * CY_AS_ERROR_NOT_RUNNING - the interrupt module was not running
+
+ See Also
+ * CyAsIntrStart
+ * CyAsServiceInterrupt
+*/
+extern CyAsReturnStatus_t
+CyAsIntrStop(
+ CyAsDevice * dev_p /* Device bein stopped */
+ ) ;
+
+
+/* Summary
+ The interrupt service routine for West Bridge
+
+ Description
+ When an interrupt is detected, this function is called to service the West Bridge interrupt. It is safe
+ and efficient for this function to be called when no West Bridge interrupt has occurred. This function
+ will determine it is not an West Bridge interrupt quickly and return.
+*/
+extern void CyAsIntrServiceInterrupt(
+ CyAsHalDeviceTag tag /* The USER supplied tag for this device */
+ ) ;
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYASINTR_H_ */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyaslep2pep.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,337 @@
+/* Cypress West Bridge API source file (cyasusb.c)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+#include "cyashal.h"
+#include "cyasusb.h"
+#include "cyaserr.h"
+#include "cyaslowlevel.h"
+#include "cyasdma.h"
+
+typedef enum CyAsPhysicalEndpointState
+{
+ CyAsEPFree,
+ CyAsEPIn,
+ CyAsEPOut,
+ CyAsEPIsoIn,
+ CyAsEPIsoOut
+} CyAsPhysicalEndpointState;
+
+
+/*
+* This map is used to map an index between 1 and 10 to a logical endpoint number. This
+* is used to map LEP register indexes into actual EP numbers.
+*/
+static CyAsEndPointNumber_t EndPointMap[] = { 3, 5, 7, 9, 10, 11, 12, 13, 14, 15 } ;
+
+#define CY_AS_EPCFG_1024 (1 << 3)
+#define CY_AS_EPCFG_DBL (0x02)
+#define CY_AS_EPCFG_TRIPLE (0x03)
+#define CY_AS_EPCFG_QUAD (0x00)
+
+/*
+ * NB: This table contains the register values for PEP1 and PEP3. PEP2 and PEP4 only
+ * have a bit to change the direction of the PEP and therefre are not represented
+ * in this table.
+ */
+static uint8_t PepRegisterValues[12][4] =
+{
+ /* Bit 1:0 buffering, 0 = quad, 2 = double, 3 = triple */
+ /* Bit 3 size, 0 = 512, 1 = 1024 */
+ {
+ CY_AS_EPCFG_DBL,
+ CY_AS_EPCFG_DBL,
+ }, /* Config 1 - PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 512), PEP4 (2 * 512) */
+ {
+ CY_AS_EPCFG_DBL,
+ CY_AS_EPCFG_QUAD,
+ }, /* Config 2 - PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (4 * 512), PEP4 (N/A) */
+ {
+ CY_AS_EPCFG_DBL,
+ CY_AS_EPCFG_DBL | CY_AS_EPCFG_1024,
+ }, /* Config 3 - PEP1 (2 * 512), PEP2 (2 * 512), PEP3 (2 * 1024), PEP4(N/A) */
+ {
+ CY_AS_EPCFG_QUAD,
+ CY_AS_EPCFG_DBL,
+ }, /* Config 4 - PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512) */
+ {
+ CY_AS_EPCFG_QUAD,
+ CY_AS_EPCFG_QUAD,
+ }, /* Config 5 - PEP1 (4 * 512), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A) */
+ {
+ CY_AS_EPCFG_QUAD,
+ CY_AS_EPCFG_1024 | CY_AS_EPCFG_DBL,
+ }, /* Config 6 - PEP1 (4 * 512), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A) */
+ {
+ CY_AS_EPCFG_1024 | CY_AS_EPCFG_DBL,
+ CY_AS_EPCFG_DBL,
+ }, /* Config 7 - PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 512), PEP4 (2 * 512) */
+ {
+ CY_AS_EPCFG_1024 | CY_AS_EPCFG_DBL,
+ CY_AS_EPCFG_QUAD,
+ }, /* Config 8 - PEP1 (2 * 1024), PEP2 (N/A), PEP3 (4 * 512), PEP4 (N/A) */
+ {
+ CY_AS_EPCFG_1024 | CY_AS_EPCFG_DBL,
+ CY_AS_EPCFG_1024 | CY_AS_EPCFG_DBL,
+ }, /* Config 9 - PEP1 (2 * 1024), PEP2 (N/A), PEP3 (2 * 1024), PEP4 (N/A)*/
+ {
+ CY_AS_EPCFG_TRIPLE,
+ CY_AS_EPCFG_TRIPLE,
+ }, /* Config 10 - PEP1 (3 * 512), PEP2 (N/A), PEP3 (3 * 512), PEP4 (2 * 512)*/
+ {
+ CY_AS_EPCFG_TRIPLE | CY_AS_EPCFG_1024,
+ CY_AS_EPCFG_DBL,
+ }, /* Config 11 - PEP1 (3 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (2 * 512) */
+ {
+ CY_AS_EPCFG_QUAD | CY_AS_EPCFG_1024,
+ CY_AS_EPCFG_DBL,
+ }, /* Config 12 - PEP1 (4 * 1024), PEP2 (N/A), PEP3 (N/A), PEP4 (N/A) */
+} ;
+
+static CyAsReturnStatus_t
+FindEndpointDirections(CyAsDevice *dev_p, CyAsPhysicalEndpointState epstate[4])
+{
+ int i ;
+ CyAsPhysicalEndpointState desired ;
+
+ /*
+ * Note, there is no error checking here becuase ISO error checking happens when
+ * the API is called.
+ */
+ for(i = 0 ; i < 10 ; i++)
+ {
+ int epno = EndPointMap[i] ;
+ if (dev_p->usb_config[epno].enabled)
+ {
+ int pep = dev_p->usb_config[epno].physical ;
+ if (dev_p->usb_config[epno].type == CyAsUsbIso)
+ {
+ /*
+ * Marking this as an ISO endpoint, removes the physical EP from consideration when
+ * mapping the remaining EPs.
+ */
+ if (dev_p->usb_config[epno].dir == CyAsUsbIn)
+ desired = CyAsEPIsoIn ;
+ else
+ desired = CyAsEPIsoOut ;
+ }
+ else
+ {
+ if (dev_p->usb_config[epno].dir == CyAsUsbIn)
+ desired = CyAsEPIn ;
+ else
+ desired = CyAsEPOut ;
+ }
+
+ /* NB: Note the API calls insure that an ISO endpoint has a physical and logical
+ * EP number that are the same, therefore this condition is not enforced here.
+ */
+ if (epstate[pep - 1] != CyAsEPFree && epstate[pep - 1] != desired)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ epstate[pep - 1] = desired ;
+ }
+ }
+
+ /*
+ * Create the EP1 config values directly.
+ * Both EP1OUT and EP1IN are invalid by default.
+ */
+ dev_p->usb_ep1cfg[0] = 0 ;
+ dev_p->usb_ep1cfg[1] = 0 ;
+ if (dev_p->usb_config[1].enabled)
+ {
+ if ((dev_p->usb_config[1].dir == CyAsUsbOut) || (dev_p->usb_config[1].dir == CyAsUsbInOut))
+ {
+ /* Set the valid bit and type field. */
+ dev_p->usb_ep1cfg[0] = (1 << 7) ;
+ if (dev_p->usb_config[1].type == CyAsUsbBulk)
+ dev_p->usb_ep1cfg[0] |= (2 << 4) ;
+ else
+ dev_p->usb_ep1cfg[0] |= (3 << 4) ;
+ }
+
+ if ((dev_p->usb_config[1].dir == CyAsUsbIn) || (dev_p->usb_config[1].dir == CyAsUsbInOut))
+ {
+ /* Set the valid bit and type field. */
+ dev_p->usb_ep1cfg[1] = (1 << 7) ;
+ if (dev_p->usb_config[1].type == CyAsUsbBulk)
+ dev_p->usb_ep1cfg[1] |= (2 << 4) ;
+ else
+ dev_p->usb_ep1cfg[1] |= (3 << 4) ;
+ }
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+CreateRegisterSettings(CyAsDevice *dev_p, CyAsPhysicalEndpointState epstate[4])
+{
+ int i ;
+ uint8_t v ;
+
+ for(i = 0 ; i < 4 ; i++)
+ {
+ if (i == 0)
+ dev_p->usb_pepcfg[i] = PepRegisterValues[dev_p->usb_phy_config - 1][0] ; /* Start with the values that specify size */
+ else if (i == 2)
+ dev_p->usb_pepcfg[i] = PepRegisterValues[dev_p->usb_phy_config - 1][1] ; /* Start with the values that specify size */
+ else
+ dev_p->usb_pepcfg[i] = 0 ;
+
+ if (epstate[i] == CyAsEPIsoIn || epstate[i] == CyAsEPIn)
+ dev_p->usb_pepcfg[i] |= (1 << 6) ; /* Adjust direction if it is in */
+ }
+
+ /* Configure the logical EP registers */
+ for(i = 0 ; i < 10 ; i++)
+ {
+ int val ;
+ int epnum = EndPointMap[i] ;
+
+ v = 0x10 ; /* PEP 1, Bulk Endpoint, EP not valid */
+ if (dev_p->usb_config[epnum].enabled)
+ {
+ v |= (1 << 7) ; /* Enabled */
+
+ val = dev_p->usb_config[epnum].physical - 1 ;
+ CyAsHalAssert(val >= 0 && val <= 3) ;
+ v |= (val << 5) ;
+
+ switch(dev_p->usb_config[epnum].type)
+ {
+ case CyAsUsbBulk:
+ val = 2 ;
+ break ;
+ case CyAsUsbInt:
+ val = 3 ;
+ break ;
+ case CyAsUsbIso:
+ val = 1 ;
+ break ;
+ default:
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+ v |= (val << 3) ;
+ }
+
+ dev_p->usb_lepcfg[i] = v ;
+ }
+}
+
+
+CyAsReturnStatus_t
+CyAsUsbMapLogical2Physical(CyAsDevice *dev_p)
+{
+ CyAsReturnStatus_t ret ;
+
+ /* Physical EPs 3 5 7 9 respectively in the array */
+ CyAsPhysicalEndpointState epstate[4] = { CyAsEPFree, CyAsEPFree, CyAsEPFree, CyAsEPFree } ;
+
+ /* Find the direction for the endpoints */
+ ret = FindEndpointDirections(dev_p, epstate) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /*
+ * Now create the register settings based on the given assigned of logical EPs to
+ * physical endpoints.
+ */
+ CreateRegisterSettings(dev_p, epstate) ;
+
+ return ret ;
+}
+
+static uint16_t
+GetMaxDmaSize(CyAsDevice *dev_p, CyAsEndPointNumber_t ep)
+{
+ uint16_t size = dev_p->usb_config[ep].size ;
+
+ if (size == 0)
+ {
+ switch(dev_p->usb_config[ep].type)
+ {
+ case CyAsUsbControl:
+ size = 64 ;
+ break ;
+
+ case CyAsUsbBulk:
+ size = CyAsDeviceIsUsbHighSpeed(dev_p) ? 512 : 64 ;
+ break ;
+
+ case CyAsUsbInt:
+ size = CyAsDeviceIsUsbHighSpeed(dev_p) ? 1024 : 64 ;
+ break ;
+
+ case CyAsUsbIso:
+ size = CyAsDeviceIsUsbHighSpeed(dev_p) ? 1024 : 1023 ;
+ break ;
+ }
+ }
+
+ return size ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSetDmaSizes(CyAsDevice *dev_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint32_t i ;
+
+ for(i = 0 ; i < 10 ; i++)
+ {
+ CyAsUsbEndPointConfig *config_p = &dev_p->usb_config[EndPointMap[i]] ;
+ if (config_p->enabled)
+ {
+ ret = CyAsDmaSetMaxDmaSize(dev_p, EndPointMap[i], GetMaxDmaSize(dev_p, EndPointMap[i])) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ break ;
+ }
+ }
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSetupDma(CyAsDevice *dev_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint32_t i ;
+
+ for(i = 0 ; i < 10 ; i++)
+ {
+ CyAsUsbEndPointConfig *config_p = &dev_p->usb_config[EndPointMap[i]] ;
+ if (config_p->enabled)
+ {
+ /* Map the endpoint direction to the DMA direction */
+ CyAsDmaDirection dir = CyAsDirectionOut ;
+ if (config_p->dir == CyAsUsbIn)
+ dir = CyAsDirectionIn ;
+
+ ret = CyAsDmaEnableEndPoint(dev_p, EndPointMap[i], CyTrue, dir) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ break ;
+ }
+ }
+
+ return ret ;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyaslep2pep.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,36 @@
+/* Cypress West Bridge API header file (cyaslep2pep.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASLEP2PEP_H_
+#define _INCLUDED_CYASLEP2PEP_H_
+
+#include "cyasdevice.h"
+
+extern CyAsReturnStatus_t
+CyAsUsbMapLogical2Physical(CyAsDevice *dev_p) ;
+
+extern CyAsReturnStatus_t
+CyAsUsbSetupDma(CyAsDevice *dev_p) ;
+
+extern CyAsReturnStatus_t
+CyAsUsbSetDmaSizes(CyAsDevice *dev_p) ;
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyaslowlevel.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1207 @@
+/* Cypress West Bridge API source file (cyaslowlevel.c)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+#include "cyashal.h"
+#include "cyascast.h"
+#include "cyasdevice.h"
+#include "cyaslowlevel.h"
+#include "cyasintr.h"
+#include "cyaserr.h"
+#include "cyasregs.h"
+
+static const uint32_t CyAsLowLevelTimeoutCount = 65536 * 4 ;
+
+/* Forward declaration */
+static CyAsReturnStatus_t CyAsSendOne(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p) ;
+
+/*
+* This array holds the size of the largest request we will ever recevie from
+* the West Bridge device per context. The size is in 16 bit words. Note a size of
+* 0xffff indicates that there will be no requests on this context from West Bridge.
+*/
+static uint16_t MaxRequestLength[CY_RQT_CONTEXT_COUNT] =
+{
+ 8, /* CY_RQT_GENERAL_RQT_CONTEXT - CY_RQT_INITIALIZATION_COMPLETE */
+ 8, /* CY_RQT_RESOURCE_RQT_CONTEXT - none */
+ 8, /* CY_RQT_STORAGE_RQT_CONTEXT - CY_RQT_MEDIA_CHANGED */
+ 128, /* CY_RQT_USB_RQT_CONTEXT - CY_RQT_USB_EVENT */
+ 8 /* CY_RQT_TUR_RQT_CONTEXT - CY_RQT_TURBO_CMD_FROM_HOST */
+} ;
+
+/*
+* For the given context, this function removes the request node at the head of the
+* queue from the context. This is called after all processing has occurred on
+* the given request and response and we are ready to remove this entry from the
+* queue.
+*/
+static void
+CyAsLLRemoveRequestQueueHead(CyAsDevice *dev_p, CyAsContext *ctxt_p)
+{
+ uint32_t mask, state ;
+ CyAsLLRequestListNode *node_p ;
+
+ (void)dev_p ;
+ CyAsHalAssert(ctxt_p->request_queue_p != 0) ;
+
+ mask = CyAsHalDisableInterrupts() ;
+ node_p = ctxt_p->request_queue_p ;
+ ctxt_p->request_queue_p = node_p->next ;
+ CyAsHalEnableInterrupts(mask) ;
+
+ node_p->callback = 0 ;
+ node_p->rqt = 0 ;
+ node_p->resp = 0 ;
+
+ /*
+ * Note that the caller allocates and destroys the request and response. Generally the
+ * destroy happens in the callback for async requests and after the wait returns for
+ * sync. The request and response may not actually be destroyed but may be managed in other
+ * ways as well. It is the responsibilty of the caller to deal with these in any case. The
+ * caller can do this in the request/response callback function.
+ */
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node_p) ;
+ CyAsHalEnableInterrupts(state) ;
+}
+
+/*
+* For the context given, this function sends the next request to
+* West Bridge via the mailbox register, if the next request is ready to
+* be sent and has not already been sent.
+*/
+static void
+CyAsLLSendNextRequest(CyAsDevice *dev_p, CyAsContext *ctxt_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ /*
+ * ret == ret is equivalent to while (1) but eliminates compiler warnings for
+ * some compilers.
+ */
+ while (ret == ret)
+ {
+ CyAsLLRequestListNode *node_p = ctxt_p->request_queue_p ;
+ if (node_p == 0)
+ break ;
+
+ if (CyAsRequestGetNodeState(node_p) != CY_AS_REQUEST_LIST_STATE_QUEUED)
+ break ;
+
+ CyAsRequestSetNodeState(node_p, CY_AS_REQUEST_LIST_STATE_WAITING) ;
+ ret = CyAsSendOne(dev_p, node_p->rqt) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ break ;
+ }
+
+ /*
+ * If an error occurs in sending the request, tell the requester
+ * about the error and remove the request from the queue.
+ */
+ CyAsRequestSetNodeState(node_p, CY_AS_REQUEST_LIST_STATE_RECEIVED) ;
+ node_p->callback(dev_p, ctxt_p->number, node_p->rqt, node_p->resp, ret) ;
+ CyAsLLRemoveRequestQueueHead(dev_p, ctxt_p) ;
+
+ /*
+ * This falls through to the while loop to send the next request since
+ * the previous request did not get sent.
+ */
+ }
+}
+
+/*
+* This method removes an entry from the request queue of a given context. The entry
+* is removed only if it is not in transit.
+*/
+CyAsRemoveRequestResult_t
+CyAsLLRemoveRequest(CyAsDevice *dev_p, CyAsContext *ctxt_p, CyAsLLRequestResponse *req_p, CyBool force)
+{
+ uint32_t imask ;
+ CyAsLLRequestListNode *node_p ;
+ CyAsLLRequestListNode *tmp_p ;
+ uint32_t state ;
+
+ imask = CyAsHalDisableInterrupts() ;
+ if (ctxt_p->request_queue_p != 0 && ctxt_p->request_queue_p->rqt == req_p)
+ {
+ node_p = ctxt_p->request_queue_p ;
+ if ((CyAsRequestGetNodeState(node_p) == CY_AS_REQUEST_LIST_STATE_WAITING) && (!force))
+ {
+ CyAsHalEnableInterrupts(imask) ;
+ return CyAsRemoveRequestInTransit ;
+ }
+
+ ctxt_p->request_queue_p = node_p->next ;
+ }
+ else
+ {
+ tmp_p = ctxt_p->request_queue_p ;
+ while (tmp_p != 0 && tmp_p->next != 0 && tmp_p->next->rqt != req_p)
+ tmp_p = tmp_p->next ;
+
+ if (tmp_p == 0 || tmp_p->next == 0)
+ {
+ CyAsHalEnableInterrupts(imask) ;
+ return CyAsRemoveRequestNotFound ;
+ }
+
+ node_p = tmp_p->next ;
+ tmp_p->next = node_p->next ;
+ }
+
+ if (node_p->callback)
+ node_p->callback(dev_p, ctxt_p->number, node_p->rqt, node_p->resp, CY_AS_ERROR_CANCELED) ;
+
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node_p) ;
+ CyAsHalEnableInterrupts(state) ;
+
+ CyAsHalEnableInterrupts(imask) ;
+ return CyAsRemoveRequestSucessful ;
+}
+
+void
+CyAsLLRemoveAllRequests(CyAsDevice *dev_p, CyAsContext *ctxt_p)
+{
+ CyAsLLRequestListNode *node = ctxt_p->request_queue_p ;
+
+ while(node)
+ {
+ if(CyAsRequestGetNodeState(ctxt_p->request_queue_p) != CY_AS_REQUEST_LIST_STATE_RECEIVED)
+ CyAsLLRemoveRequest(dev_p, ctxt_p, node->rqt, CyTrue) ;
+ node = node->next ;
+ }
+}
+
+static CyBool
+CyAsLLIsInQueue(CyAsContext *ctxt_p, CyAsLLRequestResponse *req_p)
+{
+ uint32_t mask ;
+ CyAsLLRequestListNode *node_p ;
+
+ mask = CyAsHalDisableInterrupts() ;
+ node_p = ctxt_p->request_queue_p ;
+ while (node_p)
+ {
+ if (node_p->rqt == req_p)
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ return CyTrue ;
+ }
+ node_p = node_p->next ;
+ }
+ CyAsHalEnableInterrupts(mask) ;
+ return CyFalse ;
+}
+
+/*
+* This is the handler for mailbox data when we are trying to send data to the West Bridge firmware. The
+* firmware may be trying to send us data and we need to queue this data to allow the firmware to move
+* forward and be in a state to receive our request. Here we just queue the data and it is processed
+* at a later time by the mailbox interrupt handler.
+*/
+void
+CyAsLLQueueMailboxData(CyAsDevice *dev_p)
+{
+ CyAsContext *ctxt_p ;
+ uint8_t context ;
+ uint16_t data[4] ;
+ int32_t i ;
+
+ /* Read the data from mailbox 0 to determine what to do with the data */
+ for(i = 3 ; i >= 0 ; i--)
+ data[i] = CyAsHalReadRegister(dev_p->tag, CyCastInt2UInt16(CY_AS_MEM_P0_MAILBOX0 + i)) ;
+
+ context = CyAsMboxGetContext(data[0]) ;
+ if (context >= CY_RQT_CONTEXT_COUNT)
+ {
+ CyAsHalPrintMessage("Mailbox request/response received with invalid context value (%d)\n", context) ;
+ return ;
+ }
+
+ ctxt_p = dev_p->context[context] ;
+
+ /*
+ * If we have queued too much data, drop future data.
+ */
+ CyAsHalAssert(ctxt_p->queue_index * sizeof(uint16_t) + sizeof(data) <= sizeof(ctxt_p->data_queue)) ;
+
+ for(i = 0 ; i < 4 ; i++)
+ ctxt_p->data_queue[ctxt_p->queue_index++] = data[i] ;
+
+ CyAsHalAssert((ctxt_p->queue_index % 4) == 0) ;
+ dev_p->ll_queued_data = CyTrue ;
+}
+
+void
+CyAsMailBoxProcessData(CyAsDevice *dev_p, uint16_t *data)
+{
+ CyAsContext *ctxt_p ;
+ uint8_t context ;
+ uint16_t *len_p ;
+ CyAsLLRequestResponse *rec_p ;
+ uint8_t st ;
+ uint16_t src, dest ;
+
+ context = CyAsMboxGetContext(data[0]) ;
+ if (context >= CY_RQT_CONTEXT_COUNT)
+ {
+ CyAsHalPrintMessage("Mailbox request/response received with invalid context value (%d)\n", context) ;
+ return ;
+ }
+
+ ctxt_p = dev_p->context[context] ;
+
+ if (CyAsMboxIsRequest(data[0]))
+ {
+ CyAsHalAssert(ctxt_p->req_p != 0) ;
+ rec_p = ctxt_p->req_p ;
+ len_p = &ctxt_p->request_length ;
+
+ }
+ else
+ {
+ if (ctxt_p->request_queue_p == 0 || CyAsRequestGetNodeState(ctxt_p->request_queue_p) != CY_AS_REQUEST_LIST_STATE_WAITING)
+ {
+ CyAsHalPrintMessage("Mailbox response received on context that was not expecting a response\n") ;
+ CyAsHalPrintMessage(" Context: %d\n", context) ;
+ CyAsHalPrintMessage(" Contents: 0x%04x 0x%04x 0x%04x 0x%04x\n", data[0], data[1], data[2], data[3]) ;
+ if (ctxt_p->request_queue_p != 0)
+ CyAsHalPrintMessage(" State: 0x%02x\n", ctxt_p->request_queue_p->state) ;
+ return ;
+ }
+
+ /* Make sure the request has an associated response */
+ CyAsHalAssert(ctxt_p->request_queue_p->resp != 0) ;
+
+ rec_p = ctxt_p->request_queue_p->resp ;
+ len_p = &ctxt_p->request_queue_p->length ;
+ }
+
+ if (rec_p->stored == 0)
+ {
+ /*
+ * This is the first cycle of the response
+ */
+ CyAsLLRequestResponse_SetCode(rec_p, CyAsMboxGetCode(data[0])) ;
+ CyAsLLRequestResponse_SetContext(rec_p, context) ;
+
+ if (CyAsMboxIsLast(data[0]))
+ {
+ /* This is a single cycle response */
+ *len_p = rec_p->length ;
+ st = 1 ;
+ }
+ else
+ {
+ /* Ensure that enough memory has been reserved for the response. */
+ CyAsHalAssert(rec_p->length >= data[1]) ;
+ *len_p = (data[1] < rec_p->length) ? data[1] : rec_p->length ;
+ st = 2 ;
+ }
+ }
+ else
+ st = 1 ;
+
+ /* Trasnfer the data from the mailboxes to the response */
+ while (rec_p->stored < *len_p && st < 4)
+ rec_p->data[rec_p->stored++] = data[st++] ;
+
+ if (CyAsMboxIsLast(data[0]))
+ {
+ /* NB: The call-back that is made below can cause the addition of more data
+ in this queue, thus causing a recursive overflow of the queue. This is prevented
+ by removing the request entry that is currently being passed up from the data
+ queue. If this is done, the queue only needs to be as long as two request
+ entries from West Bridge.
+ */
+ if ((ctxt_p->rqt_index > 0) && (ctxt_p->rqt_index <= ctxt_p->queue_index))
+ {
+ dest = 0 ;
+ src = ctxt_p->rqt_index ;
+
+ while (src < ctxt_p->queue_index)
+ ctxt_p->data_queue[dest++] = ctxt_p->data_queue[src++] ;
+
+ ctxt_p->rqt_index = 0 ;
+ ctxt_p->queue_index = dest ;
+ CyAsHalAssert((ctxt_p->queue_index % 4) == 0) ;
+ }
+
+ if (ctxt_p->request_queue_p != 0 && rec_p == ctxt_p->request_queue_p->resp)
+ {
+ /*
+ * If this is the last cycle of the response, call the callback and
+ * reset for the next response.
+ */
+ CyAsLLRequestResponse *resp_p = ctxt_p->request_queue_p->resp ;
+ resp_p->length = ctxt_p->request_queue_p->length ;
+ CyAsRequestSetNodeState(ctxt_p->request_queue_p, CY_AS_REQUEST_LIST_STATE_RECEIVED) ;
+
+ CyAsDeviceSetInCallback(dev_p) ;
+ ctxt_p->request_queue_p->callback(dev_p, context, ctxt_p->request_queue_p->rqt, resp_p, CY_AS_ERROR_SUCCESS) ;
+ CyAsDeviceClearInCallback(dev_p) ;
+
+ CyAsLLRemoveRequestQueueHead(dev_p, ctxt_p) ;
+ CyAsLLSendNextRequest(dev_p, ctxt_p) ;
+ }
+ else
+ {
+ /* Send the request to the appropriate module to handle */
+ CyAsLLRequestResponse *request_p = ctxt_p->req_p ;
+ ctxt_p->req_p = 0 ;
+ if (ctxt_p->request_callback)
+ {
+ CyAsDeviceSetInCallback(dev_p) ;
+ ctxt_p->request_callback(dev_p, context, request_p, 0, CY_AS_ERROR_SUCCESS) ;
+ CyAsDeviceClearInCallback(dev_p) ;
+ }
+ CyAsLLInitRequest(request_p, 0, context, request_p->length) ;
+ ctxt_p->req_p = request_p ;
+ }
+ }
+}
+
+/*
+* This is the handler for processing queued mailbox data
+*/
+void
+CyAsMailBoxQueuedDataHandler(CyAsDevice *dev_p)
+{
+ uint16_t i ;
+
+ /*
+ * If more data gets queued in between our entering this call and the
+ * end of the iteration on all contexts; we should continue processing the
+ * queued data.
+ */
+ while (dev_p->ll_queued_data)
+ {
+ dev_p->ll_queued_data = CyFalse ;
+ for(i = 0 ; i < CY_RQT_CONTEXT_COUNT ; i++)
+ {
+ uint16_t offset ;
+ CyAsContext *ctxt_p = dev_p->context[i] ;
+ CyAsHalAssert((ctxt_p->queue_index % 4) == 0) ;
+
+ offset = 0 ;
+ while (offset < ctxt_p->queue_index)
+ {
+ ctxt_p->rqt_index = offset + 4 ;
+ CyAsMailBoxProcessData(dev_p, ctxt_p->data_queue + offset) ;
+ offset = ctxt_p->rqt_index ;
+ }
+ ctxt_p->queue_index = 0 ;
+ }
+ }
+}
+
+/*
+* This is the handler for the mailbox interrupt. This function reads data from the mailbox registers
+* until a complete request or response is received. When a complete request is received, the callback
+* associated with requests on that context is called. When a complete response is recevied, the callback
+* associated with the request that generated the reponse is called.
+*/
+void
+CyAsMailBoxInterruptHandler(CyAsDevice *dev_p)
+{
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE) ;
+
+ /*
+ * Queue the mailbox data to preserve order for later processing.
+ */
+ CyAsLLQueueMailboxData(dev_p) ;
+
+ /*
+ * Process what was queued and anything that may be pending
+ */
+ CyAsMailBoxQueuedDataHandler(dev_p) ;
+}
+
+CyAsReturnStatus_t
+CyAsLLStart(CyAsDevice *dev_p)
+{
+ uint16_t i ;
+
+ if (CyAsDeviceIsLowLevelRunning(dev_p))
+ return CY_AS_ERROR_ALREADY_RUNNING ;
+
+ dev_p->ll_sending_rqt = CyFalse ;
+ dev_p->ll_abort_curr_rqt = CyFalse ;
+
+ for(i = 0 ; i < CY_RQT_CONTEXT_COUNT ; i++)
+ {
+ dev_p->context[i] = (CyAsContext *)CyAsHalAlloc(sizeof(CyAsContext)) ;
+ if (dev_p->context[i] == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ dev_p->context[i]->number = (uint8_t)i ;
+ dev_p->context[i]->request_callback = 0 ;
+ dev_p->context[i]->request_queue_p = 0 ;
+ dev_p->context[i]->last_node_p = 0 ;
+ dev_p->context[i]->req_p = CyAsLLCreateRequest(dev_p, 0, (uint8_t)i, MaxRequestLength[i]) ;
+ dev_p->context[i]->queue_index = 0 ;
+
+ if (!CyAsHalCreateSleepChannel(&dev_p->context[i]->channel))
+ return CY_AS_ERROR_CREATE_SLEEP_CHANNEL_FAILED ;
+ }
+
+ CyAsDeviceSetLowLevelRunning(dev_p) ;
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+* Shutdown the low level communications module. This operation will also cancel any
+* queued low level requests.
+*/
+CyAsReturnStatus_t
+CyAsLLStop(CyAsDevice *dev_p)
+{
+ uint8_t i ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsContext *ctxt_p ;
+ uint32_t mask ;
+
+ for(i = 0 ; i < CY_RQT_CONTEXT_COUNT ; i++)
+ {
+ ctxt_p = dev_p->context[i] ;
+ if (!CyAsHalDestroySleepChannel(&ctxt_p->channel))
+ return CY_AS_ERROR_DESTROY_SLEEP_CHANNEL_FAILED ;
+
+ /*
+ * Now, free any queued requests and assocaited responses
+ */
+ while (ctxt_p->request_queue_p)
+ {
+ uint32_t state ;
+ CyAsLLRequestListNode *node_p = ctxt_p->request_queue_p ;
+
+ /* Mark this pair as in a cancel operation */
+ CyAsRequestSetNodeState(node_p, CY_AS_REQUEST_LIST_STATE_CANCELING) ;
+
+ /* Tell the caller that we are canceling this request */
+ /* NB: The callback is responsible for destroying the request and the
+ response. We cannot count on the contents of these two after
+ calling the callback.
+ */
+ node_p->callback(dev_p, i, node_p->rqt, node_p->resp, CY_AS_ERROR_CANCELED) ;
+
+ /* Remove the pair from the queue */
+ mask = CyAsHalDisableInterrupts() ;
+ ctxt_p->request_queue_p = node_p->next ;
+ CyAsHalEnableInterrupts(mask) ;
+
+ /* Free the list node */
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node_p) ;
+ CyAsHalEnableInterrupts(state) ;
+ }
+
+ CyAsLLDestroyRequest(dev_p, dev_p->context[i]->req_p) ;
+ CyAsHalFree(dev_p->context[i]) ;
+ dev_p->context[i] = 0 ;
+
+ }
+ CyAsDeviceSetLowLevelStopped(dev_p) ;
+
+ return ret ;
+}
+
+void
+CyAsLLInitRequest(CyAsLLRequestResponse *req_p, uint16_t code, uint16_t context, uint16_t length)
+{
+ uint16_t totallen = sizeof(CyAsLLRequestResponse) + (length - 1) * sizeof(uint16_t) ;
+
+ CyAsHalMemSet(req_p, 0, totallen) ;
+ req_p->length = length ;
+ CyAsLLRequestResponse_SetCode(req_p, code) ;
+ CyAsLLRequestResponse_SetContext(req_p, context) ;
+ CyAsLLRequestResponse_SetRequest(req_p) ;
+}
+
+/*
+* Create a new request.
+*/
+CyAsLLRequestResponse *
+CyAsLLCreateRequest(CyAsDevice *dev_p, uint16_t code, uint8_t context, uint16_t length)
+{
+ CyAsLLRequestResponse *req_p ;
+ uint32_t state ;
+ uint16_t totallen = sizeof(CyAsLLRequestResponse) + (length - 1) * sizeof(uint16_t) ;
+
+ (void)dev_p ;
+
+ state = CyAsHalDisableInterrupts() ;
+ req_p = (CyAsLLRequestResponse *)CyAsHalCBAlloc(totallen) ;
+ CyAsHalEnableInterrupts(state) ;
+ if(req_p)
+ CyAsLLInitRequest(req_p, code, context, length) ;
+
+ return req_p ;
+}
+
+/*
+* Destroy a request.
+*/
+void
+CyAsLLDestroyRequest(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ uint32_t state ;
+ (void)dev_p ;
+ (void)req_p ;
+
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(req_p) ;
+ CyAsHalEnableInterrupts(state) ;
+
+}
+
+void
+CyAsLLInitResponse(CyAsLLRequestResponse *req_p, uint16_t length)
+{
+ uint16_t totallen = sizeof(CyAsLLRequestResponse) + (length - 1) * sizeof(uint16_t) ;
+
+ CyAsHalMemSet(req_p, 0, totallen) ;
+ req_p->length = length ;
+ CyAsLLRequestResponse_SetResponse(req_p) ;
+}
+
+/*
+* Create a new response
+*/
+CyAsLLRequestResponse *
+CyAsLLCreateResponse(CyAsDevice *dev_p, uint16_t length)
+{
+ CyAsLLRequestResponse *req_p ;
+ uint32_t state ;
+ uint16_t totallen = sizeof(CyAsLLRequestResponse) + (length - 1) * sizeof(uint16_t) ;
+
+ (void)dev_p ;
+
+ state = CyAsHalDisableInterrupts() ;
+ req_p = (CyAsLLRequestResponse *)CyAsHalCBAlloc(totallen) ;
+ CyAsHalEnableInterrupts(state) ;
+ if(req_p)
+ CyAsLLInitResponse(req_p, length) ;
+
+ return req_p ;
+}
+
+/*
+* Destroy the new response
+*/
+void
+CyAsLLDestroyResponse(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ uint32_t state ;
+ (void)dev_p ;
+ (void)req_p ;
+
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(req_p) ;
+ CyAsHalEnableInterrupts(state) ;
+}
+
+static uint16_t
+CyAsReadIntrStatus(
+ CyAsDevice *dev_p)
+{
+ uint32_t mask ;
+ CyBool bloop = CyTrue ;
+ uint16_t v = 0, last = 0xffff;
+
+ /*
+ * Before determining if the mailboxes are ready for more data, we first check the
+ * mailbox interrupt to see if we need to receive data. This prevents a dead-lock
+ * condition that can occur when both sides are trying to receive data.
+ */
+ while (last == last)
+ {
+ /*
+ * Disable interrupts to be sure we don't process the mailbox here and have the
+ * interrupt routine try to read this data as well.
+ */
+ mask = CyAsHalDisableInterrupts() ;
+
+ /*
+ * See if there is data to be read.
+ */
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_INTR_REG) ;
+ if ((v & CY_AS_MEM_P0_INTR_REG_MBINT) == 0)
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ break ;
+ }
+
+ /*
+ * Queue the mailbox data for later processing. This allows the firmware to move
+ * forward and service the requst from the P port.
+ */
+ CyAsLLQueueMailboxData(dev_p) ;
+
+ /*
+ * Enable interrupts again to service mailbox interrupts appropriately
+ */
+ CyAsHalEnableInterrupts(mask) ;
+ }
+
+ /*
+ * Now, all data is received
+ */
+ last = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MB_STAT) & CY_AS_MEM_P0_MCU_MBNOTRD ;
+ while (bloop)
+ {
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MB_STAT) & CY_AS_MEM_P0_MCU_MBNOTRD ;
+ if (v == last)
+ break ;
+
+ last = v ;
+ }
+
+ return v ;
+}
+
+/*
+* Send a single request or response using the mail box register. This function does not deal
+* with the internal queues at all, but only sends the request or response across to the firmware
+*/
+static CyAsReturnStatus_t
+CyAsSendOne(
+ CyAsDevice *dev_p,
+ CyAsLLRequestResponse *req_p)
+{
+ int i ;
+ uint16_t mb0, v ;
+ int32_t loopcount ;
+ uint32_t intStat ;
+
+#ifdef _DEBUG
+ if (CyAsLLRequestResponse_IsRequest(req_p))
+ {
+ switch(CyAsLLRequestResponse_GetContext(req_p))
+ {
+ case CY_RQT_GENERAL_RQT_CONTEXT:
+ CyAsHalAssert(req_p->length * 2 + 2 < CY_CTX_GEN_MAX_DATA_SIZE) ;
+ break ;
+
+ case CY_RQT_RESOURCE_RQT_CONTEXT:
+ CyAsHalAssert(req_p->length * 2 + 2 < CY_CTX_RES_MAX_DATA_SIZE) ;
+ break ;
+
+ case CY_RQT_STORAGE_RQT_CONTEXT:
+ CyAsHalAssert(req_p->length * 2 + 2 < CY_CTX_STR_MAX_DATA_SIZE) ;
+ break ;
+
+ case CY_RQT_USB_RQT_CONTEXT:
+ CyAsHalAssert(req_p->length * 2 + 2 < CY_CTX_USB_MAX_DATA_SIZE) ;
+ break ;
+ }
+ }
+#endif
+
+ /* Write the request to the mail box registers */
+ if (req_p->length > 3)
+ {
+ uint16_t length = req_p->length ;
+ int which = 0 ;
+ int st = 1 ;
+
+ dev_p->ll_sending_rqt = CyTrue ;
+ while (which < length)
+ {
+ loopcount = CyAsLowLevelTimeoutCount ;
+ do
+ {
+ v = CyAsReadIntrStatus(dev_p) ;
+
+ } while (v && loopcount-- > 0) ;
+
+ if (v)
+ {
+ CyAsHalPrintMessage(">>>>>> LOW LEVEL TIMEOUT %x %x %x %x\n",
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX0),
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX1),
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX2),
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX3)) ;
+ return CY_AS_ERROR_TIMEOUT ;
+ }
+
+ if (dev_p->ll_abort_curr_rqt)
+ {
+ dev_p->ll_sending_rqt = CyFalse ;
+ dev_p->ll_abort_curr_rqt = CyFalse ;
+ return CY_AS_ERROR_CANCELED ;
+ }
+
+ intStat = CyAsHalDisableInterrupts () ;
+
+ /*
+ * Check again whether the mailbox is free. It is possible that an ISR came in
+ * and wrote into the mailboxes since we last checked the status.
+ */
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MB_STAT) & CY_AS_MEM_P0_MCU_MBNOTRD ;
+ if (v)
+ {
+ /* Go back to the original check since the mailbox is not free. */
+ CyAsHalEnableInterrupts(intStat) ;
+ continue ;
+ }
+
+ if (which == 0)
+ {
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX1, length) ;
+ st = 2 ;
+ }
+ else
+ {
+ st = 1;
+ }
+
+ while ((which < length) && (st < 4))
+ {
+ CyAsHalWriteRegister(dev_p->tag, CyCastInt2UInt16(CY_AS_MEM_MCU_MAILBOX0 + st), req_p->data[which++]) ;
+ st++ ;
+ }
+
+ mb0 = req_p->box0 ;
+ if (which == length)
+ {
+ dev_p->ll_sending_rqt = CyFalse ;
+ mb0 |= CY_AS_REQUEST_RESPONSE_LAST_MASK ;
+ }
+
+ if (dev_p->ll_abort_curr_rqt)
+ {
+ dev_p->ll_sending_rqt = CyFalse ;
+ dev_p->ll_abort_curr_rqt = CyFalse ;
+ CyAsHalEnableInterrupts (intStat) ;
+ return CY_AS_ERROR_CANCELED ;
+ }
+
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX0, mb0) ;
+
+ /* Wait for the MBOX interrupt to be high */
+ CyAsHalSleep150() ;
+ CyAsHalEnableInterrupts (intStat) ;
+ }
+ }
+ else
+ {
+CheckMailboxAvailability:
+ /*
+ * Wait for the mailbox registers to become available. This should be a very quick
+ * wait as the firmware is designed to accept requests at interrupt time and queue
+ * them for future processing.
+ */
+ loopcount = CyAsLowLevelTimeoutCount ;
+ do
+ {
+ v = CyAsReadIntrStatus(dev_p) ;
+
+ } while (v && loopcount-- > 0) ;
+
+ if (v)
+ {
+ CyAsHalPrintMessage(">>>>>> LOW LEVEL TIMEOUT %x %x %x %x\n",
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX0),
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX1),
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX2),
+ CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX3)) ;
+ return CY_AS_ERROR_TIMEOUT ;
+ }
+
+ intStat = CyAsHalDisableInterrupts ();
+
+ /*
+ * Check again whether the mailbox is free. It is possible that an ISR came in
+ * and wrote into the mailboxes since we last checked the status.
+ */
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_MCU_MB_STAT) & CY_AS_MEM_P0_MCU_MBNOTRD ;
+ if (v)
+ {
+ /* Go back to the original check since the mailbox is not free. */
+ CyAsHalEnableInterrupts(intStat) ;
+ goto CheckMailboxAvailability ;
+ }
+
+ /* Write the data associated with the request into the mbox registers 1 - 3 */
+ v = 0 ;
+ for(i = req_p->length - 1 ; i >= 0 ; i--)
+ CyAsHalWriteRegister(dev_p->tag, CyCastInt2UInt16(CY_AS_MEM_MCU_MAILBOX1 + i), req_p->data[i]) ;
+
+ /* Write the mbox register 0 to trigger the interrupt */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_MCU_MAILBOX0, req_p->box0 | CY_AS_REQUEST_RESPONSE_LAST_MASK) ;
+
+ CyAsHalSleep150() ;
+ CyAsHalEnableInterrupts (intStat);
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+* This function queues a single request to be sent to the firmware.
+*/
+extern CyAsReturnStatus_t
+CyAsLLSendRequest(
+ CyAsDevice *dev_p,
+ CyAsLLRequestResponse *req, /* The request to send */
+ CyAsLLRequestResponse *resp, /* Storage for a reply, must be sure it is of sufficient size */
+ CyBool sync, /* If true, this is a synchronous request */
+ CyAsResponseCallback cb /* Callback to call when reply is received */
+ )
+{
+ CyAsContext *ctxt_p ;
+ uint16_t box0 = req->box0 ;
+ uint8_t context ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestListNode *node_p ;
+ uint32_t mask, state ;
+
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE);
+
+ context = CyAsMboxGetContext(box0) ;
+ CyAsHalAssert(context < CY_RQT_CONTEXT_COUNT) ;
+ ctxt_p = dev_p->context[context] ;
+
+ /* Allocate the list node */
+ state = CyAsHalDisableInterrupts() ;
+ node_p = (CyAsLLRequestListNode *)CyAsHalCBAlloc(sizeof(CyAsLLRequestListNode)) ;
+ CyAsHalEnableInterrupts(state) ;
+
+ if (node_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Initialize the list node */
+ node_p->callback = cb ;
+ node_p->length = 0 ;
+ node_p->next = 0 ;
+ node_p->resp = resp ;
+ node_p->rqt = req ;
+ node_p->state = CY_AS_REQUEST_LIST_STATE_QUEUED ;
+ if (sync)
+ CyAsRequestNodeSetSync(node_p) ;
+
+ /* Put the request into the queue */
+ mask = CyAsHalDisableInterrupts() ;
+ if (ctxt_p->request_queue_p == 0)
+ {
+ /* Empty queue */
+ ctxt_p->request_queue_p = node_p ;
+ ctxt_p->last_node_p = node_p ;
+ }
+ else
+ {
+ ctxt_p->last_node_p->next = node_p ;
+ ctxt_p->last_node_p = node_p ;
+ }
+ CyAsHalEnableInterrupts(mask) ;
+ CyAsLLSendNextRequest(dev_p, ctxt_p) ;
+
+ if (!CyAsDeviceIsInCallback(dev_p))
+ {
+ mask = CyAsHalDisableInterrupts() ;
+ CyAsMailBoxQueuedDataHandler(dev_p) ;
+ CyAsHalEnableInterrupts(mask) ;
+ }
+
+ return ret ;
+}
+
+static void
+CyAsLLSendCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ (void)rqt ;
+ (void)resp ;
+ (void)ret ;
+
+
+ CyAsHalAssert(dev_p->sig == CY_AS_DEVICE_HANDLE_SIGNATURE) ;
+
+ /*
+ * Storage the state to return to the caller
+ */
+ dev_p->ll_error = ret ;
+
+ /*
+ * Now wake the caller
+ */
+ CyAsHalWake(&dev_p->context[context]->channel) ;
+}
+
+CyAsReturnStatus_t
+CyAsLLSendRequestWaitReply(
+ CyAsDevice *dev_p,
+ CyAsLLRequestResponse *req, /* The request to send */
+ CyAsLLRequestResponse *resp /* Storage for a reply, must be sure it is of sufficient size */
+ )
+{
+ CyAsReturnStatus_t ret ;
+ uint8_t context ;
+ uint32_t loopcount = 800 ; /* Larger 8 sec time-out to handle the init delay for slower storage devices in USB FS. */
+ CyAsContext *ctxt_p ;
+
+ /* Get the context for the request */
+ context = CyAsLLRequestResponse_GetContext(req) ;
+ CyAsHalAssert(context < CY_RQT_CONTEXT_COUNT) ;
+ ctxt_p = dev_p->context[context] ;
+
+ ret = CyAsLLSendRequest(dev_p, req, resp, CyTrue, CyAsLLSendCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ while (loopcount-- > 0)
+ {
+ /*
+ * Sleep while we wait on the response. Receiving the reply will
+ * wake this thread. We will wait, at most 2 seconds (10 ms * 200
+ * tries) before we timeout. Note if the reply arrives, we will not
+ * sleep the entire 10 ms, just til the reply arrives.
+ */
+ CyAsHalSleepOn(&ctxt_p->channel, 10) ;
+
+ /*
+ * If the request has left the queue, it means the request has been sent
+ * and the reply has been received. This means we can return to the caller
+ * and be sure the reply has been received.
+ */
+ if (!CyAsLLIsInQueue(ctxt_p, req))
+ return dev_p->ll_error ;
+ }
+
+ /* Remove the QueueListNode for this request. */
+ CyAsLLRemoveRequest(dev_p, ctxt_p, req, CyTrue) ;
+
+ return CY_AS_ERROR_TIMEOUT ;
+}
+
+CyAsReturnStatus_t
+CyAsLLRegisterRequestCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsResponseCallback cb)
+{
+ CyAsContext *ctxt_p ;
+ CyAsHalAssert(context < CY_RQT_CONTEXT_COUNT) ;
+ ctxt_p = dev_p->context[context] ;
+
+ ctxt_p->request_callback = cb ;
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+void
+CyAsLLRequestResponse_Pack(
+ CyAsLLRequestResponse *req_p,
+ uint32_t offset,
+ uint32_t length,
+ void *data_p)
+{
+ uint16_t dt ;
+ uint8_t *dp = (uint8_t *)data_p ;
+
+ while (length > 1)
+ {
+ dt = ((*dp++) << 8) ;
+ dt |= (*dp++) ;
+ CyAsLLRequestResponse_SetWord(req_p, offset, dt) ;
+ offset++ ;
+ length -= 2 ;
+ }
+
+ if (length == 1)
+ {
+ dt = (*dp << 8) ;
+ CyAsLLRequestResponse_SetWord(req_p, offset, dt) ;
+ }
+}
+
+void
+CyAsLLRequestResponse_Unpack(
+ CyAsLLRequestResponse *req_p,
+ uint32_t offset,
+ uint32_t length,
+ void *data_p)
+{
+ uint8_t *dp = (uint8_t *)data_p ;
+
+ while (length-- > 0)
+ {
+ uint16_t val = CyAsLLRequestResponse_GetWord(req_p, offset++) ;
+ *dp++ = (uint8_t)((val >> 8) & 0xff) ;
+
+ if (length)
+ {
+ length-- ;
+ *dp++ = (uint8_t)(val & 0xff) ;
+ }
+ }
+}
+
+extern CyAsReturnStatus_t
+CyAsLLSendStatusResponse(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ uint16_t code,
+ uint8_t clear_storage)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse resp ;
+ CyAsLLRequestResponse *resp_p = &resp ;
+
+ CyAsHalMemSet(resp_p, 0, sizeof(resp)) ;
+ resp_p->length = 1 ;
+ CyAsLLRequestResponse_SetResponse(resp_p) ;
+ CyAsLLRequestResponse_SetContext(resp_p, context) ;
+
+ if (clear_storage)
+ CyAsLLRequestResponse_SetClearStorageFlag(resp_p) ;
+
+ CyAsLLRequestResponse_SetCode(resp_p, CY_RESP_SUCCESS_FAILURE) ;
+ CyAsLLRequestResponse_SetWord(resp_p, 0, code) ;
+
+ ret = CyAsSendOne(dev_p, resp_p) ;
+
+ return ret ;
+}
+
+extern CyAsReturnStatus_t
+CyAsLLSendDataResponse(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ uint16_t code,
+ uint16_t length,
+ void *data)
+{
+ CyAsLLRequestResponse *resp_p ;
+ uint16_t wlen ;
+ uint8_t respbuf[256] ;
+
+ if (length > 192)
+ return CY_AS_ERROR_INVALID_SIZE ;
+
+ wlen = length / 2 ; /* Word length for bytes */
+ if (length % 2) /* If byte length odd, add one more */
+ wlen++ ;
+ wlen++ ; /* One for the length of field */
+
+ resp_p = (CyAsLLRequestResponse *)respbuf ;
+ CyAsHalMemSet(resp_p, 0, sizeof(respbuf)) ;
+ resp_p->length = wlen ;
+ CyAsLLRequestResponse_SetContext(resp_p, context) ;
+ CyAsLLRequestResponse_SetCode(resp_p, code) ;
+
+ CyAsLLRequestResponse_SetWord(resp_p, 0, length) ;
+ CyAsLLRequestResponse_Pack(resp_p, 1, length, data) ;
+
+ return CyAsSendOne(dev_p, resp_p) ;
+}
+
+static CyBool
+CyAsLLIsEPTransferRelatedRequest(CyAsLLRequestResponse *rqt_p, CyAsEndPointNumber_t ep)
+{
+ uint16_t v ;
+ uint8_t type = CyAsLLRequestResponse_GetCode(rqt_p) ;
+
+ if (CyAsLLRequestResponse_GetContext(rqt_p) != CY_RQT_USB_RQT_CONTEXT)
+ return CyFalse ;
+
+ /*
+ * When cancelling outstanding EP0 data transfers, any pending
+ * Setup ACK requests also need to be cancelled.
+ */
+ if ((ep == 0) && (type == CY_RQT_ACK_SETUP_PACKET))
+ return CyTrue ;
+
+ if (type != CY_RQT_USB_EP_DATA)
+ return CyFalse ;
+
+ v = CyAsLLRequestResponse_GetWord(rqt_p, 0) ;
+ if ((CyAsEndPointNumber_t)((v >> 13) & 1) != ep)
+ return CyFalse ;
+
+ return CyTrue ;
+}
+
+CyAsReturnStatus_t
+CyAsLLRemoveEpDataRequests(CyAsDevice *dev_p, CyAsEndPointNumber_t ep)
+{
+ CyAsContext *ctxt_p ;
+ CyAsLLRequestListNode *node_p ;
+ uint32_t imask ;
+
+ /*
+ * First, remove any queued requests
+ */
+ ctxt_p = dev_p->context[CY_RQT_USB_RQT_CONTEXT] ;
+ if (ctxt_p)
+ {
+ for(node_p = ctxt_p->request_queue_p ; node_p ; node_p = node_p->next)
+ {
+ if (CyAsLLIsEPTransferRelatedRequest(node_p->rqt, ep))
+ {
+ CyAsLLRemoveRequest(dev_p, ctxt_p, node_p->rqt, CyFalse) ;
+ break ;
+ }
+ }
+
+ /*
+ * Now, deal with any request that may be in transit
+ */
+ imask = CyAsHalDisableInterrupts() ;
+
+ if (ctxt_p->request_queue_p != 0 &&
+ CyAsLLIsEPTransferRelatedRequest(ctxt_p->request_queue_p->rqt, ep) &&
+ CyAsRequestGetNodeState(ctxt_p->request_queue_p) == CY_AS_REQUEST_LIST_STATE_WAITING)
+ {
+ CyAsHalPrintMessage("Need to remove an in-transit request to Antioch\n") ;
+
+ /*
+ * If the request has not been fully sent to West Bridge yet, abort sending.
+ * Otherwise, terminate the request with a CANCELED status. Firmware will
+ * already have terminated this transfer.
+ */
+ if (dev_p->ll_sending_rqt)
+ dev_p->ll_abort_curr_rqt = CyTrue ;
+ else
+ {
+ uint32_t state ;
+
+ node_p = ctxt_p->request_queue_p ;
+ if (node_p->callback)
+ node_p->callback(dev_p, ctxt_p->number, node_p->rqt, node_p->resp, CY_AS_ERROR_CANCELED) ;
+
+ ctxt_p->request_queue_p = node_p->next ;
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node_p) ;
+ CyAsHalEnableInterrupts(state) ;
+ }
+ }
+
+ CyAsHalEnableInterrupts(imask) ;
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyaslowlevel.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,306 @@
+/* Cypress West Bridge API header file (cyaslowlevel.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASLOWLEVEL_H_
+#define _INCLUDED_CYASLOWLEVEL_H_
+
+/*@@Low Level Communications
+
+ Summary
+ The low level communications module is responsible for communications between
+ the West Bridge device and the P port processor. Communications is organized as
+ a series of requests and subsequent responses. For each request there is a
+ one and only one response. Requests may go from the West Bridge device to the P port
+ processor, or from the P Port processor to the West Bridge device.
+
+ Description
+ Requests are issued across what is called a context. A context is a single
+ channel of communications from one processor to another processor. There can
+ be only a single request outstanding on a context at a given time. Contexts
+ are used to identify subsystems that can only process a single request at a
+ time, but are independent of other contexts in the system. For instance, there
+ is a context for communicating storage commands from the P port processor to the
+ West Bridge device. There is also a context for communicating USB commands from
+ the P port processor to the West Bridge device.
+
+ Requests and responses are identical with the exception of the type bit in the
+ request/response header. If the type bit is one, the packet is a request. If
+ this bit is zero, the packet is a response. Also encoded within the header of
+ the request/response is the code. The code is a command code for a request, or
+ a response code for a response. For a request, the code is a function of the
+ context. The code 0 has one meaning for the storage context and a different
+ meaning for the USB context. The code is treated differently in the response.
+ If the code in the response is less than 16, then the meaning of the response is
+ global across all contexts. If the response is greater than or equal to 16,
+ then the response is specific to the associated context.
+
+ Requests and responses are transferred between processors through the mailbox
+ registers. It may take one or more cycles to transmit a complete request or
+ response. The context is encoded into each cycle of the transfer to insure the
+ receiving processor can route the data to the appropriate context for processing.
+ In this way, the traffic from multiple contexts can be multiplexed into a single
+ data stream through the mailbox registers by the sending processor, and
+ demultiplexed from the mailbox registers by the receiving processor.
+
+ * Firmware Assumptions *
+ The firmware assumes that mailbox contents will be consumed immediately. Therefore
+ for multi-cycle packets, the data is sent in a tight polling loop from the firmware.
+ This implies that the data must be read from the mailbox register on the P port side
+ and processed immediately or performance of the firmware will suffer. In order to
+ insure this is the case, the data from the mailboxes is read and stored immediately
+ in a per context buffer. This occurs until the entire packet is received at which
+ time the request packet is processed. Since the protocol is designed to allow for
+ only one outstanding packet at a time, the firmware can never be in a position of
+ waiting on the mailbox registers while the P port is processing a request. Only after
+ the response to the previous request is sent will another request be sent.
+*/
+
+#include "cyashal.h"
+#include "cyasdevice.h"
+
+#include "cyas_cplus_start.h"
+
+/*
+ * Constants
+ */
+#define CY_AS_REQUEST_RESPONSE_CODE_MASK (0x00ff)
+#define CY_AS_REQUEST_RESPONSE_CONTEXT_MASK (0x0F00)
+#define CY_AS_REQUEST_RESPONSE_CONTEXT_SHIFT (8)
+#define CY_AS_REQUEST_RESPONSE_TYPE_MASK (0x4000)
+#define CY_AS_REQUEST_RESPONSE_LAST_MASK (0x8000)
+#define CY_AS_REQUEST_RESPONSE_CLEAR_STR_FLAG (0x1000)
+
+/*
+ * These macros extract the data from a 16 bit value
+ */
+#define CyAsMboxGetCode(c) ((uint8_t)((c) & CY_AS_REQUEST_RESPONSE_CODE_MASK))
+#define CyAsMboxGetContext(c) ((uint8_t)(((c) & CY_AS_REQUEST_RESPONSE_CONTEXT_MASK) >> CY_AS_REQUEST_RESPONSE_CONTEXT_SHIFT))
+#define CyAsMboxIsLast(c) ((c) & CY_AS_REQUEST_RESPONSE_LAST_MASK)
+#define CyAsMboxIsRequest(c) (((c) & CY_AS_REQUEST_RESPONSE_TYPE_MASK) != 0)
+#define CyAsMboxIsResponse(c) (((c) & CY_AS_REQUEST_RESPONSE_TYPE_MASK) == 0)
+
+/*
+ * These macros (not yet written) pack data into or extract data
+ * from the m_box0 field of the request or response
+ */
+#define CyAsLLRequestResponse_SetCode(req, code) \
+ ((req)->box0 = ((req)->box0 & ~CY_AS_REQUEST_RESPONSE_CODE_MASK) | \
+ (code & CY_AS_REQUEST_RESPONSE_CODE_MASK))
+
+#define CyAsLLRequestResponse_GetCode(req) CyAsMboxGetCode((req)->box0)
+
+#define CyAsLLRequestResponse_SetContext(req, context) \
+ ((req)->box0 |= ((context) << CY_AS_REQUEST_RESPONSE_CONTEXT_SHIFT))
+
+#define CyAsLLRequestResponse_SetClearStorageFlag(req) \
+ ((req)->box0 |= CY_AS_REQUEST_RESPONSE_CLEAR_STR_FLAG)
+
+#define CyAsLLRequestResponse_GetContext(req) CyAsMboxGetContext((req)->box0)
+
+#define CyAsLLRequestResponse_IsLast(req) CyAsMboxIsLast((req)->box0)
+
+#define CYAnLLRequestResponse__SetLast(req) \
+ ((req)->box0 |= CY_AS_REQUEST_RESPONSE_LAST_MASK)
+
+#define CyAsLLRequestResponse_IsRequest(req) CyAsMboxIsRequest((req)->box0)
+
+#define CyAsLLRequestResponse_SetRequest(req) \
+ ((req)->box0 |= CY_AS_REQUEST_RESPONSE_TYPE_MASK)
+
+#define CyAsLLRequestResponse_SetResponse(req) \
+ ((req)->box0 &= ~CY_AS_REQUEST_RESPONSE_TYPE_MASK)
+
+#define CyAsLLRequestResponse_IsResponse(req) CyAsMboxIsResponse((req)->box0)
+
+#define CyAsLLRequestResponse_GetWord(req, offset) ((req)->data[(offset)])
+
+#define CyAsLLRequestResponse_SetWord(req, offset, value) ((req)->data[(offset)] = value)
+
+typedef enum CyAsRemoveRequestResult_t
+{
+ CyAsRemoveRequestSucessful,
+ CyAsRemoveRequestInTransit,
+ CyAsRemoveRequestNotFound
+} CyAsRemoveRequestResult_t ;
+
+/* Summary
+ Start the low level communications module
+
+ Description
+*/
+CyAsReturnStatus_t
+CyAsLLStart(
+ CyAsDevice *dev_p
+ ) ;
+
+CyAsReturnStatus_t
+CyAsLLStop(
+ CyAsDevice *dev_p
+ ) ;
+
+
+CyAsLLRequestResponse *
+CyAsLLCreateRequest(
+ CyAsDevice *dev_p,
+ uint16_t code,
+ uint8_t context,
+ uint16_t length /* Length of the request in 16 bit words */
+ ) ;
+
+void
+CyAsLLInitRequest(
+ CyAsLLRequestResponse *req_p,
+ uint16_t code,
+ uint16_t context,
+ uint16_t length) ;
+
+void
+CyAsLLInitResponse(
+ CyAsLLRequestResponse *req_p,
+ uint16_t length) ;
+
+void
+CyAsLLDestroyRequest(
+ CyAsDevice *dev_p,
+ CyAsLLRequestResponse *) ;
+
+CyAsLLRequestResponse *
+CyAsLLCreateResponse(
+ CyAsDevice *dev_p,
+ uint16_t length /* Length of the request in 16 bit words */
+ ) ;
+
+CyAsRemoveRequestResult_t
+CyAsLLRemoveRequest(
+ CyAsDevice *dev_p,
+ CyAsContext *ctxt_p,
+ CyAsLLRequestResponse *req_p,
+ CyBool force
+ ) ;
+void
+CyAsLLRemoveAllRequests(CyAsDevice *dev_p,
+ CyAsContext *ctxt_p) ;
+
+void
+CyAsLLDestroyResponse(
+ CyAsDevice *dev_p,
+ CyAsLLRequestResponse *) ;
+
+CyAsReturnStatus_t
+CyAsLLSendRequest(
+ CyAsDevice * dev_p, /* The West Bridge device */
+ CyAsLLRequestResponse * req, /* The request to send */
+ CyAsLLRequestResponse * resp, /* Storage for a reply, must be sure it is of sufficient size */
+ CyBool sync, /* If true, this is a sync request */
+ CyAsResponseCallback cb /* Callback to call when reply is received */
+) ;
+
+CyAsReturnStatus_t
+CyAsLLSendRequestWaitReply(
+ CyAsDevice * dev_p, /* The West Bridge device */
+ CyAsLLRequestResponse * req, /* The request to send */
+ CyAsLLRequestResponse * resp /* Storage for a reply, must be sure it is of sufficient size */
+) ;
+
+/* Summary
+ This function registers a callback function to be called when a request arrives on a given
+ context.
+
+ Description
+
+ Returns
+ * CY_AS_ERROR_SUCCESS
+*/
+extern CyAsReturnStatus_t
+CyAsLLRegisterRequestCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsResponseCallback cb
+ ) ;
+
+/* Summary
+ This function packs a set of bytes given by the data_p pointer into a request, reply
+ structure.
+*/
+extern void
+CyAsLLRequestResponse_Pack(
+ CyAsLLRequestResponse *req, /* The destintation request or response */
+ uint32_t offset, /* The offset of where to pack the data */
+ uint32_t length, /* The length of the data to pack in bytes */
+ void *data_p /* The data to pack */
+ ) ;
+
+/* Summary
+ This function unpacks a set of bytes from a request/reply structure into a segment of memory given
+ by the data_p pointer.
+*/
+extern void
+CyAsLLRequestResponse_Unpack(
+ CyAsLLRequestResponse *req, /* The source of the data to unpack */
+ uint32_t offset, /* The offset of the data to unpack */
+ uint32_t length, /* The length of the data to unpack in bytes */
+ void *data_p /* The destination of the unpack operation */
+ ) ;
+
+/* Summary
+ This function sends a status response back to the West Bridge device in response to a
+ previously send request
+*/
+extern CyAsReturnStatus_t
+CyAsLLSendStatusResponse(
+ CyAsDevice *dev_p, /* The West Bridge device */
+ uint8_t context, /* The context to send the response on */
+ uint16_t code, /* The success/failure code to send */
+ uint8_t clear_storage) ; /* Flag to clear wait on storage context */
+
+/* Summary
+ This function sends a response back to the West Bridge device.
+
+ Description
+ This function sends a response back to the West Bridge device. The response is sent on the
+ context given by the 'context' variable. The code for the response is given by the 'code'
+ argument. The data for the response is given by the data and length arguments.
+*/
+extern CyAsReturnStatus_t
+CyAsLLSendDataResponse(
+ CyAsDevice *dev_p, /* The West Bridge device */
+ uint8_t context, /* The context to send the response on */
+ uint16_t code, /* The response code to use */
+ uint16_t length, /* The length of the data for the response */
+ void *data /* The data for the response */
+) ;
+
+/* Summary
+ This function removes any requests of the given type from the given context.
+
+ Description
+ This function removes requests of a given type from the context given via the
+ context number.
+*/
+extern CyAsReturnStatus_t
+CyAsLLRemoveEpDataRequests(
+ CyAsDevice *dev_p, /* The West Bridge device */
+ CyAsEndPointNumber_t ep
+ ) ;
+
+#include "cyas_cplus_end.h"
+
+#endif /* _INCLUDED_CYASLOWLEVEL_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasmisc.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,3359 @@
+/* Cypress West Bridge API source file (cyasmisc.c)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+#include "cyashal.h"
+#include "cyasmisc.h"
+#include "cyasdma.h"
+#include "cyasintr.h"
+#include "cyaserr.h"
+#include "cyasregs.h"
+#include "cyaslowlevel.h"
+#include "cyasprotocol.h"
+
+/*
+* The device list, the only global in the API
+*/
+static CyAsDevice *gDeviceList = 0 ;
+
+/*
+ * The current debug level
+ */
+static uint8_t DebugLevel = 0 ;
+
+/*
+ * This function sets the debug level for the API
+ *
+ */
+void
+CyAsMiscSetLogLevel(uint8_t level)
+{
+ DebugLevel = level ;
+}
+
+#ifdef CY_AS_LOG_SUPPORT
+
+/*
+ * This function is a low level logger for the API.
+ */
+void
+CyAsLogDebugMessage(int level, const char *str)
+{
+ if (level <= DebugLevel)
+ CyAsHalPrintMessage("Log %d: %s\n", level, str) ;
+}
+
+#endif
+
+#define CyAsCheckDeviceReady(dev_p) \
+{ \
+ if (!(dev_p) ||((dev_p)->sig != CY_AS_DEVICE_HANDLE_SIGNATURE)) \
+ return CY_AS_ERROR_INVALID_HANDLE ; \
+ \
+ if (!CyAsDeviceIsConfigured(dev_p)) \
+ return CY_AS_ERROR_NOT_CONFIGURED ; \
+ \
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p)) \
+ return CY_AS_ERROR_NO_FIRMWARE ; \
+}
+
+/* Find an West Bridge device based on a TAG */
+CyAsDevice *
+CyAsDeviceFindFromTag(CyAsHalDeviceTag tag)
+{
+ CyAsDevice *dev_p ;
+
+ for(dev_p = gDeviceList; dev_p != 0; dev_p = dev_p->next_p)
+ {
+ if (dev_p->tag == tag)
+ return dev_p ;
+ }
+
+ return 0 ;
+}
+
+/* Map a pre-V1.2 media type to the V1.2+ bus number */
+static void
+CyAsBusFromMediaType(CyAsMediaType type,
+ CyAsBusNumber_t* bus)
+{
+ if (type == CyAsMediaNand)
+ {
+ *bus = 0 ;
+ }
+ else
+ {
+ *bus = 1 ;
+ }
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseNoData(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*
+* Create a new West Bridge device
+*/
+CyAsReturnStatus_t
+CyAsMiscCreateDevice(CyAsDeviceHandle *handle_p, CyAsHalDeviceTag tag)
+{
+ CyAsDevice *dev_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscCreateDevice called") ;
+
+ dev_p = (CyAsDevice *)CyAsHalAlloc(sizeof(CyAsDevice)) ;
+ if (dev_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ CyAsHalMemSet(dev_p, 0, sizeof(CyAsDevice)) ;
+
+ /*
+ * Dynamically allocating this buffer to ensure that it is
+ * word aligned.
+ */
+ dev_p->usb_ep_data = (uint8_t *)CyAsHalAlloc(64 * sizeof(uint8_t)) ;
+ if (dev_p->usb_ep_data == 0)
+ {
+ CyAsHalFree(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ dev_p->sig = CY_AS_DEVICE_HANDLE_SIGNATURE ;
+ dev_p->tag = tag ;
+ dev_p->usb_max_tx_size = 0x40 ;
+
+ dev_p->storage_write_endpoint = CY_AS_P2S_WRITE_ENDPOINT ;
+ dev_p->storage_read_endpoint = CY_AS_P2S_READ_ENDPOINT ;
+
+ dev_p->func_cbs_misc = CyAsCreateCBQueue(CYAS_FUNC_CB) ;
+ if(dev_p->func_cbs_misc == 0)
+ goto destroy ;
+
+ dev_p->func_cbs_res = CyAsCreateCBQueue(CYAS_FUNC_CB) ;
+ if(dev_p->func_cbs_res == 0)
+ goto destroy ;
+
+ dev_p->func_cbs_stor = CyAsCreateCBQueue(CYAS_FUNC_CB) ;
+ if(dev_p->func_cbs_stor == 0)
+ goto destroy ;
+
+ dev_p->func_cbs_usb = CyAsCreateCBQueue(CYAS_FUNC_CB) ;
+ if(dev_p->func_cbs_usb == 0)
+ goto destroy ;
+
+ dev_p->func_cbs_mtp = CyAsCreateCBQueue(CYAS_FUNC_CB) ;
+ if(dev_p->func_cbs_mtp == 0)
+ goto destroy ;
+
+ /*
+ * Allocate memory for the DMA module here. It is then marked idle, and
+ * will be activated when CyAsMiscConfigureDevice is called.
+ */
+ ret = CyAsDmaStart(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ CyAsDeviceSetDmaStopped(dev_p) ;
+
+ /*
+ * Allocate memory for the low level module here. This module is also
+ * activated only when CyAsMiscConfigureDevice is called.
+ */
+ ret = CyAsLLStart(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ CyAsDeviceSetLowLevelStopped(dev_p) ;
+
+ dev_p->next_p = gDeviceList ;
+ gDeviceList = dev_p ;
+
+ *handle_p = dev_p ;
+ CyAsHalInitDevRegisters(tag, CyFalse) ;
+ return CY_AS_ERROR_SUCCESS ;
+
+destroy:
+ /* Free any queues that were successfully allocated. */
+ if (dev_p->func_cbs_misc) CyAsDestroyCBQueue(dev_p->func_cbs_misc) ;
+ if (dev_p->func_cbs_res) CyAsDestroyCBQueue(dev_p->func_cbs_res) ;
+ if (dev_p->func_cbs_stor) CyAsDestroyCBQueue(dev_p->func_cbs_stor) ;
+ if (dev_p->func_cbs_usb) CyAsDestroyCBQueue(dev_p->func_cbs_usb) ;
+ if (dev_p->func_cbs_mtp) CyAsDestroyCBQueue(dev_p->func_cbs_mtp) ;
+
+ CyAsHalFree(dev_p->usb_ep_data) ;
+ CyAsHalFree(dev_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ else
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+}
+
+/*
+* Destroy an existing West Bridge device
+*/
+CyAsReturnStatus_t
+CyAsMiscDestroyDevice(CyAsDeviceHandle handle)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscDestroyDevice called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * If the USB stack is still running, it must be stopped first
+ */
+ if (dev_p->usb_count > 0)
+ return CY_AS_ERROR_STILL_RUNNING ;
+
+ /*
+ * If the STORAGE stack is still running, it must be stopped first
+ */
+ if (dev_p->storage_count > 0)
+ return CY_AS_ERROR_STILL_RUNNING ;
+
+ if(CyAsDeviceIsIntrRunning(dev_p))
+ ret = CyAsIntrStop(dev_p) ;
+
+ ret = CyAsLLStop(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsIntrStart(dev_p, dev_p->use_int_drq) ;
+ return ret ;
+ }
+
+ ret = CyAsDmaStop(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsIntrStart(dev_p, dev_p->use_int_drq) ;
+ return ret ;
+ }
+
+ /* Reset the West Bridge device. */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_RST_CTRL_REG, CY_AS_MEM_RST_CTRL_REG_HARD) ;
+
+ /*
+ * Remove the device from the device list
+ */
+ if (gDeviceList == dev_p)
+ {
+ gDeviceList = dev_p->next_p ;
+ }
+ else
+ {
+ CyAsDevice *tmp_p = gDeviceList ;
+ while (tmp_p && tmp_p->next_p != dev_p)
+ tmp_p = tmp_p->next_p ;
+
+ CyAsHalAssert(tmp_p != 0) ;
+ tmp_p->next_p = dev_p->next_p ;
+ }
+
+ /*
+ * Reset the signature so this will not be detected
+ * as a valid handle
+ */
+ dev_p->sig = 0 ;
+
+ CyAsDestroyCBQueue(dev_p->func_cbs_misc) ;
+ CyAsDestroyCBQueue(dev_p->func_cbs_res) ;
+ CyAsDestroyCBQueue(dev_p->func_cbs_stor) ;
+ CyAsDestroyCBQueue(dev_p->func_cbs_usb) ;
+ CyAsDestroyCBQueue(dev_p->func_cbs_mtp) ;
+
+ /*
+ * Free the memory associated with the device
+ */
+ CyAsHalFree(dev_p->usb_ep_data) ;
+ CyAsHalFree(dev_p) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+* Determine the endian mode for the processor we are running on, then
+* set the endian mode register
+*/
+static void
+CyAsSetupEndianMode(CyAsDevice *dev_p)
+{
+ /*
+ * BWG: In general, we always set West Bridge into the little endian mode. This
+ * causes the data on bit 0 internally to come out on data line 0 externally
+ * and it is generally what we want regardless of the endian mode of the
+ * processor. This capability in West Bridge should be labeled as a "SWAP" capability
+ * and can be used to swap the bytes of data in and out of West Bridge. This is
+ * useful if there is DMA hardware that requires this for some reason I cannot
+ * imagine at this time. Basically if the wires are connected correctly, we should
+ * never need to change the endian-ness of West Bridge.
+ */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_ENDIAN, CY_AS_LITTLE_ENDIAN) ;
+}
+
+/*
+* Query the West Bridge device and determine if we are an standby mode
+*/
+CyAsReturnStatus_t
+CyAsMiscInStandby(CyAsDeviceHandle handle, CyBool *standby)
+{
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscInStandby called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (CyAsDeviceIsPinStandby(dev_p) || CyAsDeviceIsRegisterStandby(dev_p))
+ {
+ *standby = CyTrue ;
+ }
+ else
+ *standby = CyFalse ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+CyAsMiscFuncCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret) ;
+
+
+static void
+MyMiscCallback(CyAsDevice *dev_p, uint8_t context, CyAsLLRequestResponse *req_p, CyAsLLRequestResponse *resp_p,
+ CyAsReturnStatus_t ret)
+{
+ (void)resp_p ;
+ (void)context ;
+ (void)ret ;
+
+ switch (CyAsLLRequestResponse_GetCode(req_p))
+ {
+ case CY_RQT_INITIALIZATION_COMPLETE:
+ {
+ uint16_t v ;
+
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_GENERAL_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ CyAsDeviceSetFirmwareLoaded(dev_p) ;
+
+ if (CyAsDeviceIsWaking(dev_p))
+ {
+ /*
+ * This is a callback from a CyAsMiscLeaveStandby() request. In this case we call the
+ * standby callback and clear the waking state.
+ */
+ if (dev_p->misc_event_cb)
+ dev_p->misc_event_cb((CyAsDeviceHandle)dev_p, CyAsEventMiscAwake, 0) ;
+ CyAsDeviceClearWaking(dev_p) ;
+ }
+ else
+ {
+ v = CyAsLLRequestResponse_GetWord(req_p, 3) ;
+
+ /*
+ * Store the media supported on each of the device buses.
+ */
+ dev_p->media_supported[0] = (uint8_t)(v & 0xFF) ;
+ dev_p->media_supported[1] = (uint8_t)((v >> 8) & 0xFF) ;
+
+ v = CyAsLLRequestResponse_GetWord(req_p, 4) ;
+ dev_p->is_mtp_firmware = (CyBool)((v >> 8) & 0xFF) ;
+
+ if (dev_p->misc_event_cb)
+ dev_p->misc_event_cb((CyAsDeviceHandle)dev_p, CyAsEventMiscInitialized, 0) ;
+ }
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_VM_SET) ;
+ if (v & CY_AS_MEM_P0_VM_SET_CFGMODE)
+ CyAsHalPrintMessage("Initialization Message Recieved, but config bit still set\n") ;
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_RST_CTRL_REG) ;
+ if ((v & CY_AS_MEM_RST_RSTCMPT) ==0)
+ CyAsHalPrintMessage("Initialization Message Recieved, but reset complete bit still not set\n") ;
+ }
+ break ;
+
+ case CY_RQT_OUT_OF_SUSPEND:
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_GENERAL_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ CyAsDeviceClearSuspendMode(dev_p) ;
+
+ /*
+ * If the wakeup was caused by an async CyAsMiscLeaveSuspend call, we have to
+ * call the corresponding callback.
+ */
+ if (dev_p->func_cbs_misc->count > 0)
+ {
+ CyAsFuncCBNode *node = (CyAsFuncCBNode*)dev_p->func_cbs_misc->head_p ;
+ CyAsHalAssert(node) ;
+
+ if (CyAsFunctCBTypeGetType(node->dataType) == CY_FUNCT_CB_MISC_LEAVESUSPEND)
+ {
+ CyAsHalAssert(node->cb_p != 0) ;
+ node->cb_p((CyAsDeviceHandle)dev_p, CY_AS_ERROR_SUCCESS, node->client_data,
+ CY_FUNCT_CB_MISC_LEAVESUSPEND, 0) ;
+ CyAsRemoveCBNode(dev_p->func_cbs_misc) ;
+ }
+ }
+
+ if (dev_p->misc_event_cb)
+ dev_p->misc_event_cb((CyAsDeviceHandle)dev_p, CyAsEventMiscWakeup, 0) ;
+ break ;
+
+ case CY_RQT_DEBUG_MESSAGE:
+ if ((req_p->data[0] == 0) && (req_p->data[1] == 0) && (req_p->data[2] == 0))
+ {
+ if (dev_p->misc_event_cb)
+ dev_p->misc_event_cb((CyAsDeviceHandle)dev_p, CyAsEventMiscHeartBeat, 0) ;
+ }
+ else
+ {
+ CyAsHalPrintMessage("**** Debug Message: %02x %02x %02x %02x %02x %02x\n",
+ req_p->data[0] & 0xff, (req_p->data[0] >> 8) & 0xff,
+ req_p->data[1] & 0xff, (req_p->data[1] >> 8) & 0xff,
+ req_p->data[2] & 0xff, (req_p->data[2] >> 8) & 0xff) ;
+ }
+ break ;
+
+ case CY_RQT_WB_DEVICE_MISMATCH:
+ {
+ if (dev_p->misc_event_cb)
+ dev_p->misc_event_cb((CyAsDeviceHandle)dev_p, CyAsEventMiscDeviceMismatch, 0) ;
+ }
+ break ;
+
+ case CY_RQT_BOOTLOAD_NO_FIRMWARE:
+ {
+ /* TODO Handle case when firmware is not found during bootloading. */
+ CyAsHalPrintMessage("No firmware image found during bootload. Device not started\n") ;
+ }
+ break ;
+
+ default:
+ CyAsHalAssert (0) ;
+ }
+}
+
+static CyBool
+IsValidSiliconId(uint16_t v)
+{
+ CyBool idok = CyFalse ;
+
+ /*
+ * Remove the revision number from the ID value
+ */
+ v = v & CY_AS_MEM_CM_WB_CFG_ID_HDID_MASK ;
+
+ /*
+ * If this is West Bridge, then we are OK.
+ */
+ if (v == CY_AS_MEM_CM_WB_CFG_ID_HDID_ANTIOCH_VALUE ||
+ v == CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_FPGA_VALUE ||
+ v == CY_AS_MEM_CM_WB_CFG_ID_HDID_ASTORIA_VALUE)
+ idok = CyTrue ;
+
+ return idok ;
+}
+
+/*
+* Configure the West Bridge device hardware
+*/
+CyAsReturnStatus_t
+CyAsMiscConfigureDevice(CyAsDeviceHandle handle, CyAsDeviceConfig *config_p)
+{
+ CyAsReturnStatus_t ret ;
+ CyBool standby ;
+ CyAsDevice *dev_p ;
+ uint16_t v ;
+ uint16_t fw_present;
+ CyAsLogDebugMessage(6, "CyAsMiscConfigureDevice called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /* Setup big endian vs little endian */
+ CyAsSetupEndianMode(dev_p) ;
+
+ /* Now, confirm that we can talk to the West Bridge device */
+ dev_p->silicon_id = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ;
+ fw_present = CyAsHalReadRegister(dev_p->tag,CY_AS_MEM_RST_CTRL_REG ) ;
+ if (!(fw_present & CY_AS_MEM_RST_RSTCMPT))
+ {
+ if (!IsValidSiliconId(dev_p->silicon_id))
+ return CY_AS_ERROR_NO_ANTIOCH ;
+ }
+ /* Check for standby mode */
+ ret = CyAsMiscInStandby(handle, &standby) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ if (ret)
+ return CY_AS_ERROR_IN_STANDBY ;
+
+ /* Setup P-port interface mode (CRAM / SRAM). */
+ if (CyAsDeviceIsAstoriaDev(dev_p))
+ {
+ if (config_p->srammode)
+ v = CY_AS_MEM_P0_VM_SET_VMTYPE_SRAM ;
+ else
+ v = CY_AS_MEM_P0_VM_SET_VMTYPE_RAM ;
+ }
+ else
+ v = CY_AS_MEM_P0_VM_SET_VMTYPE_RAM ;
+
+ /* Setup synchronous versus asynchronous mode */
+ if (config_p->sync)
+ v |= CY_AS_MEM_P0_VM_SET_IFMODE ;
+ if (config_p->dackmode == CyAsDeviceDackAck)
+ v |= CY_AS_MEM_P0_VM_SET_DACKEOB ;
+ if (config_p->drqpol)
+ v |= CY_AS_MEM_P0_VM_SET_DRQPOL ;
+ if (config_p->dackpol)
+ v |= CY_AS_MEM_P0_VM_SET_DACKPOL ;
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_VM_SET, v) ;
+
+ if (config_p->crystal)
+ CyAsDeviceSetCrystal(dev_p) ;
+ else
+ CyAsDeviceSetExternalClock(dev_p) ;
+
+ /* Register a callback to handle MISC requests from the firmware */
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_GENERAL_RQT_CONTEXT, MyMiscCallback) ;
+
+ /* Now mark the DMA and low level modules as active. */
+ CyAsDeviceSetDmaRunning(dev_p) ;
+ CyAsDeviceSetLowLevelRunning(dev_p) ;
+
+ /* Now, initialize the interrupt module */
+ dev_p->use_int_drq = config_p->dmaintr ;
+
+ ret = CyAsIntrStart(dev_p, config_p->dmaintr) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Mark the interface as initialized */
+ CyAsDeviceSetConfigured(dev_p) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+MyDmaCallback(CyAsDevice * dev_p,
+ CyAsEndPointNumber_t ep,
+ void * mem_p,
+ uint32_t size,
+ CyAsReturnStatus_t ret
+ )
+{
+ CyAsDmaEndPoint *ep_p ;
+
+ (void)size ;
+
+ /* Get the endpoint pointer based on the endpoint number */
+ ep_p = CY_AS_NUM_EP(dev_p, ep) ;
+
+ /* Check the queue to see if is drained */
+ if (ep_p->queue_p == 0)
+ {
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)dev_p->func_cbs_misc->head_p ;
+
+ CyAsHalAssert(node) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ /*
+ * Disable endpoint 2. The storage module will enable this EP if necessary.
+ */
+ CyAsDmaEnableEndPoint(dev_p, CY_AS_FIRMWARE_ENDPOINT, CyFalse, CyAsDirectionIn) ;
+
+ /*
+ * Clear the reset register. This releases the Antioch micro-controller from
+ * reset and begins running the code at address zero.
+ */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_RST_CTRL_REG, 0x00) ;
+ }
+
+ /* Call the user Callback */
+ node->cb_p((CyAsDeviceHandle)dev_p, ret, node->client_data, (CyAsFunctCBType)node->dataType, node->data) ;
+ CyAsRemoveCBNode(dev_p->func_cbs_misc) ;
+ }
+ else
+ {
+ /* This is the header data that was allocated in the download firmware function,
+ * and can be safely freed here. */
+ uint32_t state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(mem_p) ;
+ CyAsHalEnableInterrupts(state) ;
+ }
+}
+
+CyAsReturnStatus_t
+CyAsMiscDownloadFirmware(CyAsDeviceHandle handle,
+ const void *mem_p,
+ uint16_t size,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ uint8_t *header ;
+ CyAsReturnStatus_t ret ;
+ CyBool standby ;
+ CyAsDevice *dev_p ;
+ CyAsDmaCallback dmacb = 0 ;
+ uint32_t state ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscDownloadFirmware called") ;
+
+ /* Make sure we have a valid device */
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * If the device has not been initialized, we cannot download firmware
+ * to the device.
+ */
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ /*
+ * Make sure West Bridge is not in standby
+ */
+ ret = CyAsMiscInStandby(dev_p, &standby) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (standby)
+ return CY_AS_ERROR_IN_STANDBY ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /*
+ * Make sure we are in configuration mode
+ */
+ if ((CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_VM_SET) & CY_AS_MEM_P0_VM_SET_CFGMODE) == 0)
+ return CY_AS_ERROR_NOT_IN_CONFIG_MODE ;
+
+ /* Maximum firmware size is 24k */
+ if (size > CY_AS_MAXIMUM_FIRMWARE_SIZE)
+ return CY_AS_ERROR_INVALID_SIZE ;
+
+ /* Make sure the size is an even number of bytes as well */
+ if (size & 0x01)
+ return CY_AS_ERROR_ALIGNMENT_ERROR ;
+
+ /*
+ * Write the two word header that gives the base address and
+ * size of the firmware image to download
+ */
+ state = CyAsHalDisableInterrupts() ;
+ header = (uint8_t *)CyAsHalCBAlloc(4) ;
+ CyAsHalEnableInterrupts(state) ;
+ if (header == NULL)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ header[0] = 0x00 ;
+ header[1] = 0x00 ;
+ header[2] = (uint8_t)(size & 0xff) ;
+ header[3] = (uint8_t)((size >> 8) & 0xff) ;
+
+ /* Enable the firmware endpoint */
+ ret = CyAsDmaEnableEndPoint(dev_p, CY_AS_FIRMWARE_ENDPOINT, CyTrue, CyAsDirectionIn) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /*
+ * Setup DMA for 64 byte packets. This is the requirement for downloading
+ * firmware to West Bridge.
+ */
+ CyAsDmaSetMaxDmaSize(dev_p, CY_AS_FIRMWARE_ENDPOINT, 64) ;
+
+ if(cb)
+ {
+ dmacb = MyDmaCallback ;
+ }
+
+ ret = CyAsDmaQueueRequest(dev_p, CY_AS_FIRMWARE_ENDPOINT, header, 4, CyFalse, CyFalse, dmacb) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /*
+ * Write the firmware image to the West Bridge device
+ */
+ ret = CyAsDmaQueueRequest(dev_p, CY_AS_FIRMWARE_ENDPOINT, (void *)mem_p, size, CyFalse, CyFalse, dmacb) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if(cb)
+ {
+ CyAsFuncCBNode* cbnode = CyAsCreateFuncCBNodeData(cb, client, CY_FUNCT_CB_MISC_DOWNLOADFIRMWARE, 0) ;
+
+ if(cbnode == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ else
+ CyAsInsertCBNode(dev_p->func_cbs_misc, cbnode) ;
+
+ ret = CyAsDmaKickStart(dev_p, CY_AS_FIRMWARE_ENDPOINT) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+ else
+ {
+
+ ret = CyAsDmaDrainQueue(dev_p, CY_AS_FIRMWARE_ENDPOINT, CyTrue) ;
+
+ /* Free the header memory that was allocated earlier. */
+ CyAsHalCBFree(header) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ return ret ;
+ }
+ /*
+ * Disable endpoint 2. The storage module will enable this EP if necessary.
+ */
+ CyAsDmaEnableEndPoint(dev_p, CY_AS_FIRMWARE_ENDPOINT, CyFalse, CyAsDirectionIn) ;
+
+ /*
+ * Clear the reset register. This releases the West Bridge micro-controller from
+ * reset and begins running the code at address zero.
+ */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_RST_CTRL_REG, 0x00) ;
+ }
+
+ /*
+ * The firmware is not marked as loaded until the firmware initializes West Bridge and a request
+ * is sent from West Bridge to the P port processor indicating that West Bridge is ready.
+ */
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+
+static CyAsReturnStatus_t
+MyHandleResponseGetFirmwareVersion(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsGetFirmwareVersionData *data_p)
+{
+
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint16_t val ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_FIRMWARE_VERSION)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ data_p->major = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ data_p->minor = CyAsLLRequestResponse_GetWord(reply_p, 1) ;
+ data_p->build = CyAsLLRequestResponse_GetWord(reply_p, 2) ;
+ val = CyAsLLRequestResponse_GetWord(reply_p, 3) ;
+ data_p->mediaType = (uint8_t)(((val >> 8) & 0xFF) | (val & 0xFF)) ;
+ val = CyAsLLRequestResponse_GetWord(reply_p, 4) ;
+ data_p->isDebugMode = (CyBool)(val & 0xFF) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscGetFirmwareVersion(CyAsDeviceHandle handle,
+ CyAsGetFirmwareVersionData* data,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyBool standby ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ CyAsDevice *dev_p ;
+
+ (void)client ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscGetFirmwareVersion called") ;
+
+ /* Make sure we have a valid device */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /*
+ * Make sure Antioch is not in standby
+ */
+ ret = CyAsMiscInStandby(dev_p, &standby) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ if (standby)
+ return CY_AS_ERROR_IN_STANDBY ;
+
+ /* Make sure the Antioch is not in suspend mode. */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_GET_FIRMWARE_VERSION, CY_RQT_GENERAL_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Reserve space for the reply, the reply data will not exceed three words */
+ reply_p = CyAsLLCreateResponse(dev_p, 5) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* Request and response are freed in MyHandleResponseGetFirmwareVersion. */
+ ret = MyHandleResponseGetFirmwareVersion(dev_p, req_p, reply_p, data) ;
+ return ret ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_GETFIRMWAREVERSION,
+ data, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p,
+ reply_p, CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+static CyAsReturnStatus_t
+MyHandleResponseReadMCURegister(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ uint8_t *data_p)
+{
+
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_MCU_REGISTER_DATA)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ *data_p = (uint8_t)(CyAsLLRequestResponse_GetWord(reply_p, 0)) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseGetGpioValue(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ uint8_t *data_p)
+{
+
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_GPIO_STATE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ else
+ *data_p = (uint8_t)(CyAsLLRequestResponse_GetWord(reply_p, 0)) ;
+
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+
+CyAsReturnStatus_t CyAsMiscSetSDPowerPolarity(
+ CyAsDeviceHandle handle,
+ CyAsMiscSignalPolarity polarity,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SDPOLARITY , CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ {
+
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)polarity) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return (MyHandleResponseNoData(dev_p, req_p, reply_p)) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_SETSDPOLARITY,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the FuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+}
+
+
+
+
+
+CyAsReturnStatus_t
+CyAsMiscReadMCURegister(CyAsDeviceHandle handle,
+ uint16_t address,
+ uint8_t *value,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscReadMCURegister called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /* Check whether the firmware supports this command. */
+ if (CyAsDeviceIsNandStorageSupported(dev_p))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ /* Make sure the Antioch is not in suspend mode. */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_READ_MCU_REGISTER, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)address) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_MCU_REGISTER_DATA)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ *value = (uint8_t)(CyAsLLRequestResponse_GetWord(reply_p, 0)) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_READMCUREGISTER,
+ value, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+
+CyAsReturnStatus_t
+CyAsMiscWriteMCURegister(CyAsDeviceHandle handle,
+ uint16_t address,
+ uint8_t mask,
+ uint8_t value,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscWriteMCURegister called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /* Check whether the firmware supports this command. */
+ if (CyAsDeviceIsNandStorageSupported(dev_p))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ /* Make sure the Antioch is not in suspend mode. */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_WRITE_MCU_REGISTER, CY_RQT_GENERAL_RQT_CONTEXT, 2) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)address) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((mask << 8) | value)) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_WRITEMCUREGISTER,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+MyHandleResponseReset(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsResetType type)
+{
+ uint16_t v ;
+
+ (void)req_p ;
+ (void)reply_p ;
+
+ /*
+ * If the device is in suspend mode, it needs to be woken up so that the write
+ * to the reset control register succeeds. We need not however wait for the
+ * wake up procedure to be complete.
+ */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ {
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ;
+ CyAsHalSleep (1) ;
+ }
+
+ if (type == CyAsResetHard)
+ {
+ CyAsMiscCancelExRequests(dev_p) ;
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_RST_CTRL_REG, CY_AS_MEM_RST_CTRL_REG_HARD) ;
+ CyAsDeviceSetUnconfigured(dev_p) ;
+ CyAsDeviceSetFirmwareNotLoaded(dev_p) ;
+ CyAsDeviceSetDmaStopped(dev_p) ;
+ CyAsDeviceSetLowLevelStopped(dev_p) ;
+ CyAsDeviceSetIntrStopped(dev_p) ;
+ CyAsDeviceClearSuspendMode(dev_p) ;
+ CyAsUsbCleanup(dev_p) ;
+ CyAsStorageCleanup(dev_p) ;
+
+ /*
+ * Wait for a small amount of time to allow reset to be complete.
+ */
+ CyAsHalSleep(100) ;
+ }
+
+ CyAsDeviceClearResetPending(dev_p) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscReset(CyAsDeviceHandle handle,
+ CyAsResetType type,
+ CyBool flush,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+ CyAsEndPointNumber_t i ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ (void)client ;
+ (void)cb ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscResetEX called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /*
+ * Soft reset is not supported until we close on the issues in the
+ * firmware with what needs to happen.
+ */
+ if (type == CyAsResetSoft)
+ return CY_AS_ERROR_NOT_YET_SUPPORTED ;
+
+ CyAsDeviceSetResetPending(dev_p) ;
+
+ if (flush)
+ {
+
+ /* Unable to DrainQueues in polling mode */
+ if((dev_p->storage_cb || dev_p->storage_cb_ms) && CyAsHalIsPolling())
+ return CY_AS_ERROR_ASYNC_PENDING ;
+
+ /*
+ * Shutdown the endpoints so no more traffic can be queued
+ */
+ for(i = 0; i < 15; i++)
+ CyAsDmaEnableEndPoint(dev_p, i, CyFalse, CyAsDirectionDontChange) ;
+
+ /*
+ * If we are in normal mode, drain all traffic across all endpoints to be sure all traffic
+ * is flushed. If the device is suspended, data will not be coming in on any endpoint and
+ * all outstanding DMA operations can be canceled.
+ */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ {
+ for(i = 0; i < 15; i++)
+ {
+ CyAsDmaCancel(dev_p, i, CY_AS_ERROR_CANCELED) ;
+ }
+ }
+ else
+ {
+ for(i = 0; i < 15; i++)
+ {
+ if ((i == CY_AS_P2S_WRITE_ENDPOINT) || (i == CY_AS_P2S_READ_ENDPOINT))
+ CyAsDmaDrainQueue(dev_p, i, CyFalse) ;
+ else
+ CyAsDmaDrainQueue(dev_p, i, CyTrue) ;
+ }
+ }
+ }
+ else
+ {
+ /* No flush was requested, so cancel any outstanding DMAs
+ * so the user callbacks are called as needed
+ */
+ if(CyAsDeviceIsStorageAsyncPending(dev_p))
+ {
+ for(i = 0; i < 15; i++)
+ CyAsDmaCancel(dev_p, i, CY_AS_ERROR_CANCELED) ;
+ }
+ }
+
+ ret = MyHandleResponseReset(dev_p, 0, 0, type) ;
+
+ if(cb)
+ /* Even though no mailbox communication was needed, issue the callback so the
+ * user does not need to special case their code. */
+ cb((CyAsDeviceHandle)dev_p, ret, client, CY_FUNCT_CB_MISC_RESET, 0) ;
+
+ /*
+ * Initialize any registers that may have been changed when the device was reset.
+ */
+ CyAsHalInitDevRegisters(dev_p->tag, CyFalse) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+GetUnallocatedResource(CyAsDevice *dev_p, CyAsResourceType resource)
+{
+ uint8_t shift = 0 ;
+ uint16_t v ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_NOT_ACQUIRED ;
+
+ switch(resource)
+ {
+ case CyAsBusUSB:
+ shift = 4 ;
+ break ;
+ case CyAsBus_1:
+ shift = 0 ;
+ break ;
+ case CyAsBus_0:
+ shift = 2 ;
+ break ;
+ default:
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+
+ /* Get the semaphore value for this resource */
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_RSE_ALLOCATE) ;
+ v = (v >> shift) & 0x03 ;
+
+ if (v == 0x03)
+ {
+ ret = CY_AS_ERROR_RESOURCE_ALREADY_OWNED ;
+ }
+ else if ((v & 0x01) == 0)
+ {
+ /* The resource is not owned by anyone, we can try to get it */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_RSE_MASK, (0x03 << shift)) ;
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_RSE_MASK) ;
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_RSE_ALLOCATE, (0x01 << shift)) ;
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_RSE_MASK) ;
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_RSE_ALLOCATE) ;
+ v = (v >> shift) & 0x03 ;
+ if (v == 0x03)
+ ret = CY_AS_ERROR_SUCCESS ;
+ }
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseAcquireResource(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsResourceType *resource)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ ret = GetUnallocatedResource(dev_p, *resource) ;
+ if (ret != CY_AS_ERROR_NOT_ACQUIRED)
+ ret = CY_AS_ERROR_SUCCESS ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscAcquireResource(CyAsDeviceHandle handle,
+ CyAsResourceType *resource,
+ CyBool force,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret ;
+
+ CyAsDevice *dev_p ;
+
+ (void)client ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscAcquireResource called") ;
+
+ if (*resource != CyAsBusUSB && *resource != CyAsBus_0 && *resource != CyAsBus_1)
+ return CY_AS_ERROR_INVALID_RESOURCE ;
+
+
+ /* Make sure the device is ready to accept the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+
+ ret = GetUnallocatedResource(dev_p, *resource) ;
+
+ /*
+ * Make sure that the callback is called if the resource is successfully
+ * acquired at this point.
+ */
+ if ((ret == CY_AS_ERROR_SUCCESS) && (cb != 0))
+ cb(handle, ret, client, CY_FUNCT_CB_MISC_ACQUIRERESOURCE, resource) ;
+
+ if (ret != CY_AS_ERROR_NOT_ACQUIRED)
+ return ret ;
+
+ if (!force)
+ return CY_AS_ERROR_NOT_ACQUIRED ;
+
+ /* Create the request to acquire the resource */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_ACQUIRE_RESOURCE, CY_RQT_RESOURCE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)(*resource)) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_ACQUIRERESOURCE,
+ resource, dev_p->func_cbs_res, CY_AS_REQUEST_RESPONSE_EX, req_p,
+ reply_p, CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ ret = GetUnallocatedResource(dev_p, *resource) ;
+ if (ret != CY_AS_ERROR_NOT_ACQUIRED)
+ ret = CY_AS_ERROR_SUCCESS ;
+ }
+
+ return ret ;
+}
+CyAsReturnStatus_t
+CyAsMiscReleaseResource(CyAsDeviceHandle handle, CyAsResourceType resource)
+{
+ uint8_t shift = 0 ;
+ uint16_t v ;
+
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscReleaseResource called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if (resource != CyAsBusUSB && resource != CyAsBus_0 && resource != CyAsBus_1)
+ return CY_AS_ERROR_INVALID_RESOURCE ;
+
+ switch(resource)
+ {
+ case CyAsBusUSB:
+ shift = 4 ;
+ break ;
+ case CyAsBus_1:
+ shift = 0 ;
+ break ;
+ case CyAsBus_0:
+ shift = 2 ;
+ break ;
+ default:
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+
+ /* Get the semaphore value for this resource */
+ v = (CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_RSE_ALLOCATE) >> shift) & 0x03 ;
+ if (v == 0 || v == 1 || v == 2)
+ return CY_AS_ERROR_RESOURCE_NOT_OWNED ;
+
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_RSE_MASK, (0x03 << shift)) ;
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_RSE_ALLOCATE, (0x02 << shift)) ;
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_P0_RSE_MASK, 0) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscSetTraceLevel(CyAsDeviceHandle handle,
+ uint8_t level,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint32_t unit,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscSetTraceLevel called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ if (device >= CY_AS_MAX_STORAGE_DEVICES)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ if (unit > 255)
+ return CY_AS_ERROR_NO_SUCH_UNIT ;
+
+ if (level >= CYAS_FW_TRACE_MAX_LEVEL)
+ return CY_AS_ERROR_INVALID_TRACE_LEVEL ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_TRACE_LEVEL, CY_RQT_GENERAL_RQT_CONTEXT, 2) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)level) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((bus << 12) | (device << 8) | (unit))) ;
+
+ /* Reserve space for the reply, the reply data will not exceed three words */
+ reply_p = CyAsLLCreateResponse(dev_p, 2) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_NOT_SUPPORTED ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_SETTRACELEVEL,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscHeartBeatControl(CyAsDeviceHandle handle,
+ CyBool enable,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscHeartBeatControl called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_CONTROL_ANTIOCH_HEARTBEAT, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)enable) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_HEARTBEATCONTROL,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MySetSDClockFreq (
+ CyAsDevice *dev_p,
+ uint8_t cardType,
+ uint8_t setting,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ if (CyAsDeviceIsInCallback(dev_p) && (cb == 0))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_SD_CLOCK_FREQ, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)((cardType << 8) | setting)) ;
+
+ /* Reserve space for the reply, which will not exceed one word. */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if (cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_SETSDFREQ, 0,
+ dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p, CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscSetLowSpeedSDFreq(
+ CyAsDeviceHandle handle,
+ CyAsLowSpeedSDFreq setting,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscSetLowSpeedSDFreq called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if ((setting != CY_AS_SD_DEFAULT_FREQ) && (setting != CY_AS_SD_RATED_FREQ))
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ return MySetSDClockFreq(dev_p, 0, (uint8_t)setting, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscSetHighSpeedSDFreq(
+ CyAsDeviceHandle handle,
+ CyAsHighSpeedSDFreq setting,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscSetHighSpeedSDFreq called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if ((setting != CY_AS_HS_SD_FREQ_24) && (setting != CY_AS_HS_SD_FREQ_48))
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ return MySetSDClockFreq(dev_p, 1, (uint8_t)setting, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscGetGpioValue(CyAsDeviceHandle handle,
+ CyAsMiscGpio pin,
+ uint8_t *value,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsDevice *dev_p ;
+ uint16_t v ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscGetGpioValue called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /* If the pin specified is UVALID, there is no need for firmware to be loaded. */
+ if (pin == CyAsMiscGpio_UValid)
+ {
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_PMU_UPDATE) ;
+ *value = (uint8_t)(v & CY_AS_MEM_PMU_UPDATE_UVALID) ;
+
+ if (cb != 0)
+ cb(dev_p, ret, client, CY_FUNCT_CB_MISC_GETGPIOVALUE, value) ;
+
+ return ret ;
+ }
+
+ /* Check whether the firmware supports this command. */
+ if (CyAsDeviceIsNandStorageSupported(dev_p))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Make sure the pin selected is valid */
+ if ((pin != CyAsMiscGpio_1) && (pin != CyAsMiscGpio_0))
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_GET_GPIO_STATE, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, ((uint8_t)pin << 8)) ;
+
+ /* Reserve space for the reply, which will not exceed one word. */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if (cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_GPIO_STATE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ *value = (uint8_t)CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_GETGPIOVALUE,
+ value, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+
+CyAsReturnStatus_t
+CyAsMiscSetGpioValue(CyAsDeviceHandle handle,
+ CyAsMiscGpio pin,
+ uint8_t value,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsDevice *dev_p ;
+ uint16_t v ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscSetGpioValue called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /* If the pin specified is UVALID, there is no need for firmware to be loaded. */
+ if (pin == CyAsMiscGpio_UValid)
+ {
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_PMU_UPDATE) ;
+ if (value)
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_PMU_UPDATE, (v | CY_AS_MEM_PMU_UPDATE_UVALID)) ;
+ else
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_PMU_UPDATE, (v & ~CY_AS_MEM_PMU_UPDATE_UVALID)) ;
+
+ if (cb != 0)
+ cb(dev_p, ret, client, CY_FUNCT_CB_MISC_SETGPIOVALUE, 0) ;
+ return ret ;
+ }
+
+ /* Check whether the firmware supports this command. */
+ if (CyAsDeviceIsNandStorageSupported(dev_p))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Make sure the pin selected is valid */
+ if ((pin < CyAsMiscGpio_0) || (pin > CyAsMiscGpio_UValid))
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ /* Create and initialize the low level request to the firmware. */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_GPIO_STATE, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ v = (uint16_t)(((uint8_t)pin << 8) | (value > 0)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 0, v) ;
+
+ /* Reserve space for the reply, which will not exceed one word. */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if (cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_SETGPIOVALUE,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyEnterStandby(CyAsDevice *dev_p, CyBool pin)
+{
+ CyAsMiscCancelExRequests(dev_p) ;
+
+ /* Save the current values in the critical P-port registers, where necessary. */
+ CyAsHalReadRegsBeforeStandby(dev_p->tag) ;
+
+ if (pin)
+ {
+ if (CyAsHalSetWakeupPin(dev_p->tag, CyFalse))
+ CyAsDeviceSetPinStandby(dev_p) ;
+ else
+ return CY_AS_ERROR_SETTING_WAKEUP_PIN ;
+ }
+ else
+ {
+ /*
+ * Put antioch in the standby mode
+ */
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_PWR_MAGT_STAT, 0x02) ;
+ CyAsDeviceSetRegisterStandby(dev_p) ;
+ }
+
+ /*
+ * When the Antioch comes out of standby, we have to wait until
+ * the firmware initialization completes before sending other
+ * requests down.
+ */
+ CyAsDeviceSetFirmwareNotLoaded(dev_p) ;
+
+ /*
+ * Keep West Bridge interrupt disabled until the device is being woken
+ * up from standby.
+ */
+ dev_p->stby_int_mask = CyAsHalDisableInterrupts ();
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseEnterStandby(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyBool pin)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ ret = MyEnterStandby(dev_p, pin) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscEnterStandby(CyAsDeviceHandle handle,
+ CyBool pin,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyBool standby ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscEnterStandby called") ;
+
+ /* Make sure we have a valid device */
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * If we already are in standby, do not do it again and let the
+ * user know via the error return.
+ */
+ ret = CyAsMiscInStandby(handle, &standby) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (standby == CyTrue)
+ return CY_AS_ERROR_ALREADY_STANDBY ;
+
+ /*
+ * If the user wants to transition from suspend mode to standby mode,
+ * the device needs to be woken up so that it can complete all pending
+ * operations.
+ */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ CyAsMiscLeaveSuspend(dev_p, 0, 0) ;
+
+ if (dev_p->usb_count)
+ {
+ /*
+ * We do not allow West Bridge to go into standby mode when the
+ * USB stack is initialized. You must stop the USB stack in
+ * order to enter standby mode.
+ */
+ return CY_AS_ERROR_USB_RUNNING ;
+ }
+
+ /*
+ * If the storage stack is not running, the device can directly be put into
+ * sleep mode. Otherwise, the firmware needs to be signaled to prepare for
+ * going into sleep mode.
+ */
+ if (dev_p->storage_count)
+ {
+ /*
+ * If there are async storage operations pending, make one attempt to
+ * complete them.
+ */
+ if (CyAsDeviceIsStorageAsyncPending(dev_p))
+ {
+ /* DrainQueue will not work in polling mode */
+ if(CyAsHalIsPolling())
+ return CY_AS_ERROR_ASYNC_PENDING ;
+
+ CyAsDmaDrainQueue(dev_p, CY_AS_P2S_READ_ENDPOINT, CyFalse) ;
+ CyAsDmaDrainQueue(dev_p, CY_AS_P2S_WRITE_ENDPOINT, CyFalse) ;
+
+ /*
+ * If more storage operations were queued at this stage, return
+ * an error.
+ */
+ if (CyAsDeviceIsStorageAsyncPending(dev_p))
+ return CY_AS_ERROR_ASYNC_PENDING ;
+ }
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_PREPARE_FOR_STANDBY, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(!cb)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed in the HandleResponse */
+ return MyHandleResponseEnterStandby(dev_p, req_p, reply_p, pin) ;
+
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_ENTERSTANDBY,
+ (void*)pin, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p,
+ reply_p, CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+ else
+ {
+ ret = MyEnterStandby(dev_p, pin) ;
+ if(cb)
+ /* Even though no mailbox communication was needed, issue the callback so the
+ * user does not need to special case their code. */
+ cb((CyAsDeviceHandle)dev_p, ret, client, CY_FUNCT_CB_MISC_ENTERSTANDBY, 0) ;
+ }
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscEnterStandbyEXU(CyAsDeviceHandle handle,
+ CyBool pin,
+ CyBool uvalid_special,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if(uvalid_special)
+ {
+ CyAsHalWriteRegister(dev_p->tag, 0xc5, 0x4) ;
+ }
+
+ return CyAsMiscEnterStandby(handle, pin, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscLeaveStandby(CyAsDeviceHandle handle, CyAsResourceType resource)
+{
+ CyAsDevice *dev_p ;
+ uint16_t v ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint32_t count = 8 ;
+ uint8_t retry = 1 ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscLeaveStandby called") ;
+ (void)resource ;
+
+ /* Make sure we have a valid device */
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (CyAsDeviceIsRegisterStandby(dev_p))
+ {
+ /*
+ * Set a flag to indicate that the West Bridge is waking up from standby.
+ */
+ CyAsDeviceSetWaking(dev_p) ;
+
+ /*
+ * The initial read will not succeed, but will just wake the West Bridge
+ * device from standby. Successive reads should succeed and in that way
+ * we know West Bridge is awake.
+ */
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ;
+
+ do
+ {
+ /*
+ * We have initiated the operation to leave standby, now we need to wait at least
+ * N ms before trying to access the West Bridge device to insure the PLLs have locked and we
+ * can talk to the device.
+ */
+ if (CyAsDeviceIsCrystal(dev_p))
+ CyAsHalSleep(CY_AS_LEAVE_STANDBY_DELAY_CRYSTAL) ;
+ else
+ CyAsHalSleep(CY_AS_LEAVE_STANDBY_DELAY_CLOCK) ;
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ;
+
+ /*
+ * If the P-SPI interface mode is in use, there may be a need to re-synchronise the
+ * serial clock used for Astoria access.
+ */
+ if (!IsValidSiliconId(v))
+ {
+ if (CyAsHalSyncDeviceClocks(dev_p->tag) != CyTrue)
+ {
+ CyAsHalEnableInterrupts (dev_p->stby_int_mask) ;
+ return CY_AS_ERROR_TIMEOUT ;
+ }
+ }
+ } while (!IsValidSiliconId(v) && count-- > 0) ;
+
+ /*
+ * If we tried to read the register and could not, return a timeout
+ */
+ if (count == 0)
+ {
+ CyAsHalEnableInterrupts (dev_p->stby_int_mask) ;
+ return CY_AS_ERROR_TIMEOUT ;
+ }
+
+ /*
+ * The standby flag is cleared here, after the action to exit standby has
+ * been taken. The wait for firmware initialization, is ensured by marking
+ * the firmware as not loaded until the init event is received.
+ */
+ CyAsDeviceClearRegisterStandby(dev_p) ;
+
+ /*
+ * Initialize any registers that may have been changed while the device was in standby mode.
+ */
+ CyAsHalInitDevRegisters(dev_p->tag, CyTrue) ;
+ }
+ else if (CyAsDeviceIsPinStandby(dev_p))
+ {
+ /*
+ * Set a flag to indicate that the West Bridge is waking up from standby.
+ */
+ CyAsDeviceSetWaking(dev_p) ;
+
+TryWakeupAgain:
+ /*
+ * Try to set the wakeup pin, if this fails in the HAL layer, return this
+ * failure to the user.
+ */
+ if (!CyAsHalSetWakeupPin(dev_p->tag, CyTrue))
+ {
+ CyAsHalEnableInterrupts (dev_p->stby_int_mask) ;
+ return CY_AS_ERROR_SETTING_WAKEUP_PIN ;
+ }
+
+ /*
+ * We have initiated the operation to leave standby, now we need to wait at least
+ * N ms before trying to access the West Bridge device to insure the PLLs have locked and we
+ * can talk to the device.
+ */
+ if (CyAsDeviceIsCrystal(dev_p))
+ CyAsHalSleep(CY_AS_LEAVE_STANDBY_DELAY_CRYSTAL) ;
+ else
+ CyAsHalSleep(CY_AS_LEAVE_STANDBY_DELAY_CLOCK) ;
+
+ /*
+ * Initialize any registers that may have been changed while the device was in standby mode.
+ */
+ CyAsHalInitDevRegisters(dev_p->tag, CyTrue) ;
+
+ /*
+ * The standby flag is cleared here, after the action to exit standby has
+ * been taken. The wait for firmware initialization, is ensured by marking
+ * the firmware as not loaded until the init event is received.
+ */
+ CyAsDeviceClearPinStandby(dev_p) ;
+ }
+ else
+ {
+ return CY_AS_ERROR_NOT_IN_STANDBY ;
+ }
+
+ /*
+ * The West Bridge interrupt can be enabled now.
+ */
+ CyAsHalEnableInterrupts (dev_p->stby_int_mask) ;
+
+ /*
+ * Release the West Bridge Micro-Controller from reset, so that firmware initialization
+ * can complete.
+ * The attempt to release Antioch reset is made upto 8 times.
+ */
+ v = 0x03 ;
+ count = 0x08 ;
+ while ((v & 0x03) && (count))
+ {
+ CyAsHalWriteRegister(dev_p->tag, CY_AS_MEM_RST_CTRL_REG, 0x00) ;
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_RST_CTRL_REG) ;
+ count-- ;
+ }
+
+ if (v & 0x03)
+ {
+ CyAsHalPrintMessage("Failed to clear Antioch reset\n") ;
+ return CY_AS_ERROR_TIMEOUT ;
+ }
+
+ /*
+ * If the wake-up pin is being used, wait here to make sure that the wake-up event
+ * is received within a reasonable delay. Otherwise, toggle the wake-up pin again
+ * in an attempt to start the firmware properly.
+ */
+ if (retry)
+ {
+ count = 10 ;
+ while (count)
+ {
+ /* If the wake-up event has been received, we can return. */
+ if (CyAsDeviceIsFirmwareLoaded (dev_p))
+ break ;
+ /* If we are in polling mode, the interrupt may not have been serviced as yet.
+ * Read the interrupt status register. If a pending mailbox interrupt is seen,
+ * we can assume that the wake-up event will be received soon. */
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_P0_INTR_REG) ;
+ if (v & CY_AS_MEM_P0_INTR_REG_MBINT)
+ break ;
+
+ CyAsHalSleep (10) ;
+ count-- ;
+ }
+
+ if (!count)
+ {
+ retry = 0 ;
+ dev_p->stby_int_mask = CyAsHalDisableInterrupts() ;
+ CyAsHalSetWakeupPin(dev_p->tag, CyFalse) ;
+ CyAsHalSleep (10) ;
+ goto TryWakeupAgain ;
+ }
+ }
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscRegisterCallback(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsMiscEventCallback callback /* The function to call */
+ )
+{
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscRegisterCallback called") ;
+
+ /* Make sure we have a valid device */
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ dev_p->misc_event_cb = callback ;
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscStorageChanged(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyBool standby ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscStorageChanged called") ;
+
+ /* Make sure the device is ready for the command. */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /*
+ * Make sure Antioch is not in standby
+ */
+ ret = CyAsMiscInStandby(dev_p, &standby) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (standby)
+ return CY_AS_ERROR_IN_STANDBY ;
+
+ /*
+ * Make sure Westbridge is not in suspend mode.
+ */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_STORAGE_MEDIA_CHANGED, CY_RQT_GENERAL_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_STORAGECHANGED,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+
+CyAsReturnStatus_t
+CyAsMiscEnterSuspend(
+ CyAsDeviceHandle handle,
+ CyBool usb_wakeup_en,
+ CyBool gpio_wakeup_en,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyBool standby ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ uint16_t value ;
+ uint32_t int_state ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscEnterSuspend called") ;
+
+ /*
+ * Basic sanity checks to ensure that the device is initialised.
+ */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /*
+ * Make sure West Bridge is not already in standby
+ */
+ CyAsMiscInStandby(dev_p, &standby) ;
+ if (standby)
+ return CY_AS_ERROR_IN_STANDBY ;
+
+ /*
+ * Make sure that the device is not already in suspend mode.
+ */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /*
+ * Make sure there is no active USB connection.
+ */
+ if ((CyAsDeviceIsUsbConnected(dev_p)) && (dev_p->usb_last_event != CyAsEventUsbSuspend))
+ return CY_AS_ERROR_USB_CONNECTED ;
+
+ /*
+ * Make sure that there are no async requests at this point in time.
+ */
+ int_state = CyAsHalDisableInterrupts() ;
+ if ((dev_p->func_cbs_misc->count) || (dev_p->func_cbs_res->count) ||
+ (dev_p->func_cbs_stor->count) || (dev_p->func_cbs_usb->count))
+ {
+ CyAsHalEnableInterrupts(int_state) ;
+ return CY_AS_ERROR_ASYNC_PENDING ;
+ }
+ CyAsHalEnableInterrupts(int_state) ;
+
+ /* Create the request to send to the Antioch device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_ENTER_SUSPEND_MODE, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Wakeup control flags. */
+ value = 0x0001 ;
+ if (usb_wakeup_en)
+ value |= 0x04 ;
+ if (gpio_wakeup_en)
+ value |= 0x02 ;
+ CyAsLLRequestResponse_SetWord(req_p, 0, value) ;
+
+ if (cb != 0)
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_ENTERSUSPEND,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return CY_AS_ERROR_SUCCESS ;
+ }
+ else
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+
+destroy:
+ if (ret == CY_AS_ERROR_SUCCESS)
+ CyAsDeviceSetSuspendMode(dev_p) ;
+
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscLeaveSuspend(
+ CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p ;
+ uint16_t v, count ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscLeaveSuspend called") ;
+
+ /* Make sure we have a valid device */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /* Make sure we are in suspend mode. */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ {
+ if (cb)
+ {
+ CyAsFuncCBNode *cbnode = CyAsCreateFuncCBNodeData(cb, client, CY_FUNCT_CB_MISC_LEAVESUSPEND, 0) ;
+ if (cbnode == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsInsertCBNode(dev_p->func_cbs_misc, cbnode) ;
+ }
+
+ /*
+ * Do a read from the ID register so that the CE assertion will wake West Bridge.
+ * The read is repeated until the read comes back with valid data.
+ */
+ count = 8 ;
+
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ;
+
+ while (!IsValidSiliconId(v) && count-- > 0)
+ {
+ CyAsHalSleep(CY_AS_LEAVE_STANDBY_DELAY_CLOCK) ;
+ v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ;
+ }
+
+ /*
+ * If we tried to read the register and could not, return a timeout
+ */
+ if (count == 0)
+ return CY_AS_ERROR_TIMEOUT ;
+ }
+ else
+ return CY_AS_ERROR_NOT_IN_SUSPEND ;
+
+ if (cb == 0)
+ {
+ /*
+ * Wait until the in suspend mode flag is cleared.
+ */
+ count = 20 ;
+ while ((CyAsDeviceIsInSuspendMode(dev_p)) && (count--))
+ {
+ CyAsHalSleep(CY_AS_LEAVE_STANDBY_DELAY_CLOCK) ;
+ }
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ ret = CY_AS_ERROR_TIMEOUT ;
+ }
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscReserveLNABootArea(CyAsDeviceHandle handle,
+ uint8_t numzones,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyBool standby ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ CyAsDevice *dev_p ;
+
+ (void)client ;
+
+ CyAsLogDebugMessage(6, "CyAsMiscSwitchPnandMode called") ;
+
+ /* Make sure we have a valid device */
+ dev_p = (CyAsDevice *)handle ;
+ CyAsCheckDeviceReady(dev_p) ;
+
+ /*
+ * Make sure Antioch is not in standby
+ */
+ ret = CyAsMiscInStandby(dev_p, &standby) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ if (standby)
+ return CY_AS_ERROR_IN_STANDBY ;
+
+ /* Make sure the Antioch is not in suspend mode. */
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_RESERVE_LNA_BOOT_AREA, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)numzones) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MISC_RESERVELNABOOTAREA,
+ 0, dev_p->func_cbs_misc, CY_AS_REQUEST_RESPONSE_EX, req_p,
+ reply_p, CyAsMiscFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsFuncCBNode*
+CyAsCreateFuncCBNodeData(CyAsFunctionCallback cb,
+ uint32_t client,
+ CyAsFunctCBType type,
+ void* data)
+{
+ uint32_t state = CyAsHalDisableInterrupts() ;
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)CyAsHalCBAlloc(sizeof(CyAsFuncCBNode)) ;
+ CyAsHalEnableInterrupts(state) ;
+ if(node != 0)
+ {
+ node->nodeType = CYAS_FUNC_CB ;
+ node->cb_p = cb ;
+ node->client_data = client ;
+ node->dataType = type ;
+ if(data != 0)
+ node->dataType |= CY_FUNCT_CB_DATA ;
+ else
+ node->dataType |= CY_FUNCT_CB_NODATA ;
+ node->data = data ;
+ node->next_p = 0 ;
+ }
+ return node ;
+}
+
+CyAsFuncCBNode*
+CyAsCreateFuncCBNode(CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ return CyAsCreateFuncCBNodeData(cb, client, CY_FUNCT_CB_NODATA, 0) ;
+}
+
+void
+CyAsDestroyFuncCBNode(CyAsFuncCBNode* node)
+{
+ uint32_t state ;
+
+ node->nodeType = CYAS_INVALID ;
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node) ;
+ CyAsHalEnableInterrupts(state) ;
+}
+
+CyAsUsbFuncCBNode*
+CyAsCreateUsbFuncCBNode(CyAsUsbFunctionCallback cb, uint32_t client)
+{
+ uint32_t state = CyAsHalDisableInterrupts() ;
+ CyAsUsbFuncCBNode * node = (CyAsUsbFuncCBNode *)CyAsHalCBAlloc(sizeof(CyAsUsbFuncCBNode)) ;
+ CyAsHalEnableInterrupts(state) ;
+ if(node != 0)
+ {
+ node->type = CYAS_USB_FUNC_CB ;
+ node->cb_p = cb ;
+ node->client_data = client ;
+ node->next_p = 0 ;
+ }
+ return node ;
+}
+
+void
+CyAsDestroyUsbFuncCBNode(CyAsUsbFuncCBNode* node)
+{
+ uint32_t state ;
+
+ node->type = CYAS_INVALID ;
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node) ;
+ CyAsHalEnableInterrupts(state) ;
+}
+
+CyAsUsbIoCBNode*
+CyAsCreateUsbIoCBNode(CyAsUsbIoCallback cb)
+{
+ uint32_t state = CyAsHalDisableInterrupts() ;
+ CyAsUsbIoCBNode * node = (CyAsUsbIoCBNode *)CyAsHalCBAlloc(sizeof(CyAsUsbIoCBNode)) ;
+ CyAsHalEnableInterrupts(state) ;
+ if(node != 0)
+ {
+ node->type = CYAS_USB_IO_CB ;
+ node->cb_p = cb ;
+ node->next_p = 0 ;
+ }
+ return node ;
+}
+
+void
+CyAsDestroyUsbIoCBNode(CyAsUsbIoCBNode* node)
+{
+ uint32_t state ;
+
+ node->type = CYAS_INVALID ;
+
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node) ;
+ CyAsHalEnableInterrupts(state) ;
+}
+
+CyAsStorageIoCBNode*
+CyAsCreateStorageIoCBNode(CyAsStorageCallback cb, CyAsMediaType media, uint32_t device_index,
+ uint32_t unit, uint32_t block_addr, CyAsOperType oper,
+ CyAsLLRequestResponse* req_p, CyAsLLRequestResponse* reply_p)
+{
+ uint32_t state = CyAsHalDisableInterrupts() ;
+ CyAsStorageIoCBNode * node = (CyAsStorageIoCBNode *)CyAsHalCBAlloc(sizeof(CyAsStorageIoCBNode)) ;
+ CyAsHalEnableInterrupts(state) ;
+ if(node != 0)
+ {
+ node->type = CYAS_STORAGE_IO_CB ;
+ node->cb_p = cb ;
+ node->media = media ;
+ node->device_index = device_index ;
+ node->unit = unit ;
+ node->block_addr = block_addr ;
+ node->oper = oper ;
+ node->req_p = req_p ;
+ node->reply_p = reply_p ;
+ node->next_p = 0 ;
+ }
+ return node ;
+}
+
+void
+CyAsDestroyStorageIoCBNode(CyAsStorageIoCBNode* node)
+{
+ uint32_t state ;
+ node->type = CYAS_INVALID ;
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(node) ;
+ CyAsHalEnableInterrupts(state) ;
+}
+
+CyAsCBQueue *
+CyAsCreateCBQueue(CyAsCBNodeType type)
+{
+ uint32_t state = CyAsHalDisableInterrupts() ;
+ CyAsCBQueue * queue = (CyAsCBQueue *)CyAsHalCBAlloc(sizeof(CyAsCBQueue)) ;
+ CyAsHalEnableInterrupts(state) ;
+ if(queue)
+ {
+ queue->type = type ;
+ queue->head_p = 0 ;
+ queue->tail_p = 0 ;
+ queue->count = 0 ;
+ }
+
+ return queue ;
+}
+
+void
+CyAsDestroyCBQueue(CyAsCBQueue* queue)
+{
+ uint32_t state ;
+ queue->type = CYAS_INVALID ;
+ queue->head_p = 0 ;
+ queue->tail_p = 0 ;
+ queue->count = 0 ;
+ state = CyAsHalDisableInterrupts() ;
+ CyAsHalCBFree(queue) ;
+ CyAsHalEnableInterrupts(state) ;
+}
+
+/* Inserts a CyAsCBNode into the queue, the node type must match the queue type*/
+void
+CyAsInsertCBNode(CyAsCBQueue * queue_p, void* cbnode)
+{
+ uint32_t int_state ;
+
+ int_state = CyAsHalDisableInterrupts() ;
+
+ CyAsHalAssert(queue_p != 0) ;
+
+ switch (queue_p->type)
+ {
+ case CYAS_USB_FUNC_CB:
+ {
+ CyAsUsbFuncCBNode* node = (CyAsUsbFuncCBNode*)cbnode ;
+ CyAsUsbFuncCBNode* tail = (CyAsUsbFuncCBNode*)queue_p->tail_p ;
+
+ CyAsHalAssert(node->type == CYAS_USB_FUNC_CB) ;
+ CyAsHalAssert(tail == 0 || tail->type == CYAS_USB_FUNC_CB) ;
+ if(queue_p->head_p == 0)
+ queue_p->head_p = node ;
+ else
+ tail->next_p = node ;
+
+ queue_p->tail_p = node ;
+ }
+ break ;
+
+ case CYAS_USB_IO_CB:
+ {
+ CyAsUsbIoCBNode* node = (CyAsUsbIoCBNode*)cbnode ;
+ CyAsUsbIoCBNode* tail = (CyAsUsbIoCBNode*)queue_p->tail_p ;
+
+ CyAsHalAssert(node->type == CYAS_USB_IO_CB) ;
+ CyAsHalAssert(tail == 0 || tail->type == CYAS_USB_IO_CB) ;
+ if(queue_p->head_p == 0)
+ queue_p->head_p = node ;
+ else
+ tail->next_p = node ;
+
+ queue_p->tail_p = node ;
+ }
+ break ;
+
+ case CYAS_STORAGE_IO_CB:
+ {
+ CyAsStorageIoCBNode* node = (CyAsStorageIoCBNode*)cbnode ;
+ CyAsStorageIoCBNode* tail = (CyAsStorageIoCBNode*)queue_p->tail_p ;
+
+ CyAsHalAssert(node->type == CYAS_STORAGE_IO_CB) ;
+ CyAsHalAssert(tail == 0 || tail->type == CYAS_STORAGE_IO_CB) ;
+ if(queue_p->head_p == 0)
+ queue_p->head_p = node ;
+ else
+ tail->next_p = node ;
+
+ queue_p->tail_p = node ;
+ }
+ break ;
+
+ case CYAS_FUNC_CB:
+ {
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)cbnode ;
+ CyAsFuncCBNode* tail = (CyAsFuncCBNode*)queue_p->tail_p ;
+
+ CyAsHalAssert(node->nodeType == CYAS_FUNC_CB) ;
+ CyAsHalAssert(tail == 0 || tail->nodeType == CYAS_FUNC_CB) ;
+ if(queue_p->head_p == 0)
+ queue_p->head_p = node ;
+ else
+ tail->next_p = node ;
+
+ queue_p->tail_p = node ;
+ }
+ break ;
+
+ default:
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+
+ queue_p->count++ ;
+
+ CyAsHalEnableInterrupts(int_state) ;
+}
+
+/* Removes the tail node from the queue and frees it */
+void
+CyAsRemoveCBTailNode(CyAsCBQueue *queue_p)
+{
+ uint32_t int_state ;
+
+ int_state = CyAsHalDisableInterrupts () ;
+
+ if (queue_p->count > 0)
+ {
+ /*
+ * The worst case length of the queue should be under 10 elements, and the average
+ * case should be just 1 element. So, we just employ a linear search to find the node
+ * to be freed.
+ */
+ switch (queue_p->type)
+ {
+ case CYAS_FUNC_CB:
+ {
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)queue_p->head_p ;
+ CyAsFuncCBNode* tail = (CyAsFuncCBNode*)queue_p->tail_p ;
+ if (node != tail)
+ {
+ while (node->next_p != tail)
+ node = node->next_p ;
+ node->next_p = 0 ;
+ queue_p->tail_p = node ;
+ }
+ CyAsDestroyFuncCBNode (tail) ;
+ }
+ break ;
+
+ case CYAS_USB_FUNC_CB:
+ {
+ CyAsUsbFuncCBNode* node = (CyAsUsbFuncCBNode*)queue_p->head_p ;
+ CyAsUsbFuncCBNode* tail = (CyAsUsbFuncCBNode*)queue_p->tail_p ;
+ if (node != tail)
+ {
+ while (node->next_p != tail)
+ node = node->next_p ;
+ node->next_p = 0 ;
+ queue_p->tail_p = node ;
+ }
+
+ CyAsDestroyUsbFuncCBNode (tail) ;
+ }
+ break ;
+
+ case CYAS_USB_IO_CB:
+ {
+ CyAsUsbIoCBNode* node = (CyAsUsbIoCBNode*)queue_p->head_p ;
+ CyAsUsbIoCBNode* tail = (CyAsUsbIoCBNode*)queue_p->tail_p ;
+ if (node != tail)
+ {
+ while (node->next_p != tail)
+ node = node->next_p ;
+ node->next_p = 0 ;
+ queue_p->tail_p = node ;
+ }
+ CyAsDestroyUsbIoCBNode (tail) ;
+ }
+ break ;
+
+ case CYAS_STORAGE_IO_CB:
+ {
+ CyAsStorageIoCBNode* node = (CyAsStorageIoCBNode*)queue_p->head_p ;
+ CyAsStorageIoCBNode* tail = (CyAsStorageIoCBNode*)queue_p->tail_p ;
+ if (node != tail)
+ {
+ while (node->next_p != tail)
+ node = node->next_p ;
+ node->next_p = 0 ;
+ queue_p->tail_p = node ;
+ }
+ CyAsDestroyStorageIoCBNode (tail) ;
+ }
+ break ;
+
+ default:
+ CyAsHalAssert (CyFalse) ;
+ }
+
+ queue_p->count-- ;
+ if (queue_p->count == 0)
+ {
+ queue_p->head_p = 0 ;
+ queue_p->tail_p = 0 ;
+ }
+ }
+
+ CyAsHalEnableInterrupts (int_state) ;
+}
+
+/* Removes the first CyAsCBNode from the queue and frees it */
+void
+CyAsRemoveCBNode(CyAsCBQueue * queue_p)
+{
+ uint32_t int_state ;
+
+ int_state = CyAsHalDisableInterrupts() ;
+
+ CyAsHalAssert(queue_p->count >= 0) ;
+ if(queue_p->count > 0)
+ {
+ if(queue_p->type == CYAS_USB_FUNC_CB)
+ {
+ CyAsUsbFuncCBNode* node = (CyAsUsbFuncCBNode*)queue_p->head_p ;
+ queue_p->head_p = node->next_p ;
+ CyAsDestroyUsbFuncCBNode(node) ;
+ }
+ else if(queue_p->type == CYAS_USB_IO_CB)
+ {
+ CyAsUsbIoCBNode* node = (CyAsUsbIoCBNode*)queue_p->head_p ;
+ queue_p->head_p = node->next_p ;
+ CyAsDestroyUsbIoCBNode(node) ;
+ }
+ else if(queue_p->type == CYAS_STORAGE_IO_CB)
+ {
+ CyAsStorageIoCBNode* node = (CyAsStorageIoCBNode*)queue_p->head_p ;
+ queue_p->head_p = node->next_p ;
+ CyAsDestroyStorageIoCBNode(node) ;
+ }
+ else if(queue_p->type == CYAS_FUNC_CB)
+ {
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)queue_p->head_p ;
+ queue_p->head_p = node->next_p ;
+ CyAsDestroyFuncCBNode(node) ;
+ }
+ else
+ {
+ CyAsHalAssert(CyFalse) ;
+ }
+
+ queue_p->count-- ;
+ if(queue_p->count == 0)
+ {
+ queue_p->head_p = 0 ;
+ queue_p->tail_p = 0 ;
+ }
+ }
+
+ CyAsHalEnableInterrupts(int_state) ;
+}
+
+void MyPrintFuncCBNode(CyAsFuncCBNode* node)
+{
+ CyAsFunctCBType type = CyAsFunctCBTypeGetType(node->dataType) ;
+ CyAsHalPrintMessage("[cd:%2u dt:%2u cb:0x%08x d:0x%08x nt:%1i]",
+ node->client_data, type, (uint32_t)node->cb_p, (uint32_t)node->data, node->nodeType) ;
+}
+
+void MyPrintCBQueue(CyAsCBQueue* queue_p)
+{
+ uint32_t i = 0 ;
+
+ CyAsHalPrintMessage("| Count: %u Type: ", queue_p->count) ;
+
+ if(queue_p->type == CYAS_USB_FUNC_CB)
+ {
+ CyAsHalPrintMessage("USB_FUNC_CB\n") ;
+ }
+ else if(queue_p->type == CYAS_USB_IO_CB)
+ {
+ CyAsHalPrintMessage("USB_IO_CB\n") ;
+ }
+ else if(queue_p->type == CYAS_STORAGE_IO_CB)
+ {
+ CyAsHalPrintMessage("STORAGE_IO_CB\n") ;
+ }
+ else if(queue_p->type == CYAS_FUNC_CB)
+ {
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)queue_p->head_p ;
+ CyAsHalPrintMessage("FUNC_CB\n") ;
+ if(queue_p->count > 0)
+ {
+ CyAsHalPrintMessage("| Head->") ;
+
+ for(i = 0; i < queue_p->count; i++)
+ {
+ if(node)
+ {
+ CyAsHalPrintMessage("->") ;
+ MyPrintFuncCBNode(node) ;
+ node = node->next_p ;
+ }
+ else
+ CyAsHalPrintMessage("->[NULL]\n") ;
+ }
+
+ CyAsHalPrintMessage("\n| Tail->") ;
+ MyPrintFuncCBNode((CyAsFuncCBNode*)queue_p->tail_p) ;
+ CyAsHalPrintMessage("\n") ;
+ }
+ }
+ else
+ {
+ CyAsHalPrintMessage("INVALID\n") ;
+ }
+
+ CyAsHalPrintMessage("|----------\n") ;
+}
+
+
+/* Removes and frees all pending callbacks */
+void
+CyAsClearCBQueue(CyAsCBQueue * queue_p)
+{
+ uint32_t int_state = CyAsHalDisableInterrupts() ;
+
+ while(queue_p->count != 0)
+ CyAsRemoveCBNode(queue_p) ;
+
+ CyAsHalEnableInterrupts(int_state) ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscSendRequest(CyAsDevice* dev_p,
+ CyAsFunctionCallback cb,
+ uint32_t client,
+ CyAsFunctCBType type,
+ void* data,
+ CyAsCBQueue* queue,
+ uint16_t req_type,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsResponseCallback rcb)
+{
+
+ CyAsFuncCBNode* cbnode = CyAsCreateFuncCBNodeData(cb, client, type, data) ;
+ CyAsReturnStatus_t ret ;
+
+ if(cbnode == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ else
+ CyAsInsertCBNode(queue, cbnode) ;
+
+ req_p->flags |= req_type ;
+
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, rcb) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsRemoveCBTailNode(queue) ;
+ }
+
+ return ret ;
+}
+
+void
+CyAsMiscCancelExRequests(CyAsDevice *dev_p)
+{
+ int i ;
+ for(i = 0; i < CY_RQT_CONTEXT_COUNT; i++)
+ CyAsLLRemoveAllRequests(dev_p, dev_p->context[i]) ;
+}
+
+
+static void
+CyAsMiscFuncCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t stat)
+{
+ CyAsFuncCBNode* node = NULL ;
+ CyAsReturnStatus_t ret ;
+
+ CyBool exRequest = (rqt->flags & CY_AS_REQUEST_RESPONSE_EX) == CY_AS_REQUEST_RESPONSE_EX ;
+ CyBool msRequest = (rqt->flags & CY_AS_REQUEST_RESPONSE_MS) == CY_AS_REQUEST_RESPONSE_MS ;
+ uint8_t code ;
+ uint32_t type ;
+ uint8_t cntxt ;
+
+ CyAsHalAssert(exRequest || msRequest) ;
+ (void) exRequest;
+ (void) msRequest;
+ (void)context ;
+
+ cntxt = CyAsLLRequestResponse_GetContext(rqt) ;
+ code = CyAsLLRequestResponse_GetCode(rqt) ;
+
+ switch(cntxt)
+ {
+ case CY_RQT_GENERAL_RQT_CONTEXT:
+ CyAsHalAssert(dev_p->func_cbs_misc->count != 0) ;
+ CyAsHalAssert(dev_p->func_cbs_misc->type == CYAS_FUNC_CB) ;
+ node = (CyAsFuncCBNode*)dev_p->func_cbs_misc->head_p ;
+ type = CyAsFunctCBTypeGetType(node->dataType) ;
+
+ switch(code)
+ {
+ case CY_RQT_GET_FIRMWARE_VERSION:
+ CyAsHalAssert(node->data != 0) ;
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_GETFIRMWAREVERSION) ;
+ ret = MyHandleResponseGetFirmwareVersion(dev_p, rqt, resp, (CyAsGetFirmwareVersionData*)node->data) ;
+ break ;
+ case CY_RQT_READ_MCU_REGISTER:
+ CyAsHalAssert(node->data != 0) ;
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_READMCUREGISTER) ;
+ ret = MyHandleResponseReadMCURegister(dev_p, rqt, resp, (uint8_t*)node->data) ;
+ break ;
+ case CY_RQT_GET_GPIO_STATE:
+ CyAsHalAssert(node->data != 0) ;
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_GETGPIOVALUE) ;
+ ret = MyHandleResponseGetGpioValue(dev_p, rqt, resp, (uint8_t*)node->data) ;
+ break ;
+ case CY_RQT_SET_SD_CLOCK_FREQ:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_SETSDFREQ) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_CONTROL_ANTIOCH_HEARTBEAT:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_HEARTBEATCONTROL) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_WRITE_MCU_REGISTER:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_WRITEMCUREGISTER) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_STORAGE_MEDIA_CHANGED:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_STORAGECHANGED) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_SET_GPIO_STATE:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_SETGPIOVALUE) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_SET_TRACE_LEVEL:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_SETTRACELEVEL) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ if (ret == CY_AS_ERROR_INVALID_RESPONSE)
+ ret = CY_AS_ERROR_NOT_SUPPORTED ;
+ break ;
+ case CY_RQT_PREPARE_FOR_STANDBY:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_ENTERSTANDBY) ;
+ ret = MyHandleResponseEnterStandby(dev_p, rqt, resp, (CyBool)node->data) ;
+ break ;
+ case CY_RQT_ENTER_SUSPEND_MODE:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_ENTERSUSPEND) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDeviceSetSuspendMode(dev_p) ;
+ }
+ break ;
+ case CY_RQT_RESERVE_LNA_BOOT_AREA:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_RESERVELNABOOTAREA) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_SDPOLARITY:
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_SETSDPOLARITY) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+
+
+ default:
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+ break ;
+
+ case CY_RQT_RESOURCE_RQT_CONTEXT:
+ CyAsHalAssert(dev_p->func_cbs_res->count != 0) ;
+ CyAsHalAssert(dev_p->func_cbs_res->type == CYAS_FUNC_CB) ;
+ node = (CyAsFuncCBNode*)dev_p->func_cbs_res->head_p ;
+ type = CyAsFunctCBTypeGetType(node->dataType) ;
+
+ switch(code)
+ {
+ case CY_RQT_ACQUIRE_RESOURCE:
+ /* The node->data field is actually an enum value which could be
+ 0, thus no assert is done */
+ CyAsHalAssert(type == CY_FUNCT_CB_MISC_ACQUIRERESOURCE) ;
+ ret = MyHandleResponseAcquireResource(dev_p, rqt, resp, (CyAsResourceType*)node->data) ;
+ break ;
+ default:
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+ break ;
+
+ default:
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+
+ /*
+ * If the low level layer returns a direct error, use the corresponding error code.
+ * If not, use the error code based on the response from firmware.
+ */
+ if (stat == CY_AS_ERROR_SUCCESS)
+ stat = ret ;
+
+ /* Call the user Callback */
+ node->cb_p((CyAsDeviceHandle)dev_p, stat, node->client_data, (CyAsFunctCBType)node->dataType, node->data) ;
+ if(cntxt == CY_RQT_GENERAL_RQT_CONTEXT)
+ CyAsRemoveCBNode(dev_p->func_cbs_misc) ;
+ else
+ CyAsRemoveCBNode(dev_p->func_cbs_res) ;
+
+}
+
+
+/* This includes the implementation of the deprecated functions for backward
+ * compatibility
+ */
+#include "cyasmisc_dep_impl.h"
+
+/*[]*/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasmisc_dep_impl.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,71 @@
+/* Cypress West Bridge API source file (cyasmisc_dep_impl.h)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+/* This c file will contain Antioch specific implementation
+ * of the APIs that are deprecated in Astoria SDK. This is
+ * for maintaining backward compatibility
+ */
+CyAsReturnStatus_t
+CyAsMiscAcquireResource_dep(CyAsDeviceHandle handle,
+ CyAsResourceType resource,
+ CyBool force)
+{
+ CyAsResourceType *resource_p, my_resource = resource;
+ resource_p = &my_resource;
+ return CyAsMiscAcquireResource(handle, resource_p, force, 0, 0);
+}
+
+
+CyAsReturnStatus_t
+CyAsMiscGetFirmwareVersion_dep(CyAsDeviceHandle handle,
+ uint16_t *major,
+ uint16_t *minor,
+ uint16_t *build,
+ uint8_t *mediaType,
+ CyBool *isDebugMode)
+{
+ CyAsGetFirmwareVersionData data ;
+ CyAsReturnStatus_t status = CyAsMiscGetFirmwareVersion(handle, &data, 0, 0) ;
+ *major = data.major ;
+ *minor = data.minor ;
+ *build = data.build ;
+ *mediaType = data.mediaType ;
+ *isDebugMode = data.isDebugMode ;
+ return status ;
+}
+
+CyAsReturnStatus_t
+CyAsMiscSetTraceLevel_dep(CyAsDeviceHandle handle,
+ uint8_t level,
+ CyAsMediaType media,
+ uint32_t device,
+ uint32_t unit,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsBusNumber_t bus ;
+ if(media >= CyAsMediaMaxMediaValue) return CY_AS_ERROR_NOT_SUPPORTED;
+ CyAsBusFromMediaType(media, &bus) ;
+ return CyAsMiscSetTraceLevel(handle, level, bus, device, unit, cb, client) ;
+}
+
+
+/*[]*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasmtp.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1073 @@
+/* Cypress West Bridge API header file (cyasmtp.h)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+#include "cyashal.h"
+#include "cyasmtp.h"
+#include "cyaserr.h"
+#include "cyasdma.h"
+#include "cyaslowlevel.h"
+
+static void
+CyAsMTPFuncCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t stat) ;
+
+static CyAsReturnStatus_t
+IsMTPActive(CyAsDevice *dev_p)
+{
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (dev_p->mtp_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+MyMtpRequestCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *resp_p,
+ CyAsReturnStatus_t ret)
+{
+ uint16_t val, ev, status ;
+ uint16_t mtp_datalen = 0 ;
+ uint32_t bytecount_l, bytecount_h ;
+ CyAsMTPSendObjectCompleteData sendObjData ;
+ CyAsMTPGetObjectCompleteData getObjData ;
+ CyAsDmaEndPoint *ep_p ;
+
+ uint8_t code = CyAsLLRequestResponse_GetCode(req_p) ;
+
+ (void)resp_p ;
+ (void)context ;
+ (void)ret ;
+
+ switch(code)
+ {
+ case CY_RQT_MTP_EVENT:
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ status = (val >> 8) & 0xFF ; /* MSB indicates status of read/write */
+ ev = val & 0xFF ; /* event type */
+ switch(ev)
+ {
+ case 0: /* SendObject Complete */
+ {
+ bytecount_l = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ bytecount_h = CyAsLLRequestResponse_GetWord(req_p, 2) ;
+ sendObjData.byte_count = (bytecount_h << 16) | bytecount_l ;
+
+ sendObjData.status = status ;
+
+ /* use the byte count again */
+ bytecount_l = CyAsLLRequestResponse_GetWord(req_p, 3) ;
+ bytecount_h = CyAsLLRequestResponse_GetWord(req_p, 4) ;
+ sendObjData.transaction_id = (bytecount_h << 16) | bytecount_l ;
+
+ dev_p->mtp_turbo_active = CyFalse ;
+
+ if (dev_p->mtp_event_cb)
+ dev_p->mtp_event_cb((CyAsDeviceHandle)dev_p, CyAsMTPSendObjectComplete,
+ &sendObjData) ;
+ }
+ break ;
+
+ case 1: /* GetObject Complete */
+ {
+ bytecount_l = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ bytecount_h = CyAsLLRequestResponse_GetWord(req_p, 2) ;
+
+ getObjData.byte_count = (bytecount_h << 16) | bytecount_l ;
+ getObjData.status = status ;
+
+ dev_p->mtp_turbo_active = CyFalse ;
+
+ if (dev_p->mtp_event_cb)
+ dev_p->mtp_event_cb((CyAsDeviceHandle)dev_p, CyAsMTPGetObjectComplete,
+ &getObjData);
+ }
+ break ;
+
+ case 2: /* BlockTable Needed */
+ {
+ if (dev_p->mtp_event_cb)
+ dev_p->mtp_event_cb((CyAsDeviceHandle)dev_p, CyAsMTPBlockTableNeeded, 0);
+ }
+ break ;
+ default:
+ CyAsHalPrintMessage("Invalid event type\n") ;
+ CyAsLLSendDataResponse(dev_p, CY_RQT_TUR_RQT_CONTEXT, CY_RESP_MTP_INVALID_EVENT, sizeof(ev), &ev) ;
+ break ;
+ }
+ break ;
+
+ case CY_RQT_TURBO_CMD_FROM_HOST:
+ {
+ mtp_datalen = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+
+ /* Get the endpoint pointer based on the endpoint number */
+ ep_p = CY_AS_NUM_EP(dev_p, CY_AS_MTP_READ_ENDPOINT) ;
+
+ /* The event should arrive only after the DMA operation has been queued. */
+ CyAsHalAssert(ep_p->queue_p != 0) ;
+
+ /* Put the len in ep data information in dmaqueue and kick start the queue */
+ CyAsHalAssert(ep_p->queue_p->size >= mtp_datalen) ;
+
+ if (mtp_datalen == 0)
+ {
+ CyAsDmaCompletedCallback(dev_p->tag, CY_AS_MTP_READ_ENDPOINT, 0, CY_AS_ERROR_SUCCESS) ;
+ }
+ else
+ {
+ ep_p->maxhwdata = mtp_datalen ;
+
+ /*
+ * Make sure that the DMA status for this EP is not running, so that
+ * the call to CyAsDmaKickStart gets this transfer going.
+ * Note: In MTP mode, we never leave a DMA transfer of greater than one
+ * packet running. So, it is okay to override the status here and start
+ * the next packet transfer.
+ */
+ CyAsDmaEndPointSetStopped(ep_p) ;
+
+ /* Kick start the queue if it is not running */
+ CyAsDmaKickStart(dev_p, CY_AS_MTP_READ_ENDPOINT) ;
+ }
+ }
+ break ;
+
+ case CY_RQT_TURBO_START_WRITE_DMA:
+ {
+ /*
+ * Now that the firmware is ready to receive the next packet of data, start
+ * the corresponding DMA transfer. First, ensure that a DMA operation is still
+ * pending in the queue for the write endpoint.
+ */
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_TUR_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+
+ ep_p = CY_AS_NUM_EP(dev_p, CY_AS_MTP_WRITE_ENDPOINT) ;
+ CyAsHalAssert (ep_p->queue_p != 0) ;
+
+ CyAsDmaEndPointSetStopped(ep_p) ;
+ CyAsDmaKickStart(dev_p, CY_AS_MTP_WRITE_ENDPOINT) ;
+ }
+ break ;
+
+ default:
+ CyAsHalPrintMessage("Invalid request received on TUR context\n") ;
+ val = req_p->box0 ;
+ CyAsLLSendDataResponse(dev_p, CY_RQT_TUR_RQT_CONTEXT, CY_RESP_INVALID_REQUEST, sizeof(val), &val) ;
+ break ;
+ }
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseNoData(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseMTPStart(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ dev_p->mtp_count++ ;
+
+ CyAsDmaEnableEndPoint(dev_p, CY_AS_MTP_READ_ENDPOINT, CyTrue, CyAsDirectionOut) ;
+ dev_p->usb_config[CY_AS_MTP_READ_ENDPOINT].enabled = CyTrue ;
+ dev_p->usb_config[CY_AS_MTP_READ_ENDPOINT].dir = CyAsUsbOut ;
+ dev_p->usb_config[CY_AS_MTP_READ_ENDPOINT].type = CyAsUsbBulk ;
+
+ CyAsDmaEnableEndPoint(dev_p, CY_AS_MTP_WRITE_ENDPOINT, CyTrue, CyAsDirectionIn) ;
+ dev_p->usb_config[CY_AS_MTP_WRITE_ENDPOINT].enabled = CyTrue ;
+ dev_p->usb_config[CY_AS_MTP_WRITE_ENDPOINT].dir = CyAsUsbIn ;
+ dev_p->usb_config[CY_AS_MTP_WRITE_ENDPOINT].type = CyAsUsbBulk ;
+
+ CyAsDmaSetMaxDmaSize(dev_p, 0x02, 0x0200) ; /* Packet size is 512 bytes */
+ CyAsDmaSetMaxDmaSize(dev_p, 0x06, 0x40) ; /* Packet size is 64 bytes until a switch to high speed happens. */
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_TUR_RQT_CONTEXT, 0) ;
+
+ CyAsDeviceClearMSSPending(dev_p) ;
+
+ return ret ;
+}
+
+
+CyAsReturnStatus_t
+CyAsMTPStart(CyAsDeviceHandle handle,
+ CyAsMTPEventCallback eventCB,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice* dev_p ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if(CyAsDeviceIsMSSPending(dev_p))
+ return CY_AS_ERROR_STARTSTOP_PENDING ;
+
+ if (dev_p->storage_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ if (dev_p->usb_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ if (dev_p->is_mtp_firmware == 0)
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ CyAsDeviceSetMSSPending(dev_p) ;
+
+ if (dev_p->mtp_count == 0)
+ {
+
+ dev_p->mtp_event_cb = eventCB ;
+ /*
+ * We register here becuase the start request may cause events to occur before the
+ * response to the start request.
+ */
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_TUR_RQT_CONTEXT, MyMtpRequestCallback) ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_START_MTP, CY_RQT_TUR_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ {
+ CyAsDeviceClearMSSPending(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsDeviceClearMSSPending(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseMTPStart(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MTP_START,
+ 0, dev_p->func_cbs_mtp, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMTPFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+ else
+ {
+ dev_p->mtp_count++ ;
+ if (cb)
+ cb(handle, ret, client, CY_FUNCT_CB_MTP_START, 0) ;
+ }
+
+ CyAsDeviceClearMSSPending(dev_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseMTPStop(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /*
+ * We sucessfully shutdown the stack, so decrement to make the count
+ * zero.
+ */
+ dev_p->mtp_count-- ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_TUR_RQT_CONTEXT, 0) ;
+
+ CyAsDeviceClearMSSPending(dev_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMTPStop(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsLLRequestResponse *req_p = 0, *reply_p = 0 ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsMTPStop called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsMTPActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if(CyAsDeviceIsMSSPending(dev_p))
+ return CY_AS_ERROR_STARTSTOP_PENDING ;
+
+ CyAsDeviceSetMSSPending(dev_p) ;
+
+ if (dev_p->mtp_count == 1)
+ {
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_STOP_MTP, CY_RQT_TUR_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseMTPStop(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MTP_STOP,
+ 0, dev_p->func_cbs_mtp, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMTPFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+ else if (dev_p->mtp_count > 1)
+ {
+
+ dev_p->mtp_count-- ;
+
+ if (cb)
+ cb(handle, ret, client, CY_FUNCT_CB_MTP_STOP, 0) ;
+ }
+
+ CyAsDeviceClearMSSPending(dev_p) ;
+
+ return ret ;
+}
+
+static void
+MtpWriteCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ CyAsHalAssert(context == CY_RQT_TUR_RQT_CONTEXT) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (CyAsLLRequestResponse_GetCode(resp) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) ;
+ }
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ /* Firmware failed the request. Cancel the DMA transfer. */
+ CyAsDmaCancel(dev_p, 0x04, CY_AS_ERROR_CANCELED) ;
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+ }
+
+ CyAsLLDestroyResponse(dev_p, resp) ;
+ CyAsLLDestroyRequest(dev_p, rqt) ;
+}
+
+static void
+AsyncWriteRequestCallback(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *buf_p, uint32_t size, CyAsReturnStatus_t err)
+{
+ CyAsDeviceHandle h ;
+ CyAsFunctionCallback cb ;
+
+ (void)size ;
+ (void)buf_p ;
+ (void)ep ;
+
+
+ CyAsLogDebugMessage(6, "AsyncWriteRequestCallback called") ;
+
+ h = (CyAsDeviceHandle)dev_p ;
+
+ cb = dev_p->mtp_cb ;
+ dev_p->mtp_cb = 0 ;
+
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+
+ if (cb)
+ cb(h, err, dev_p->mtp_client, dev_p->mtp_op, 0) ;
+
+}
+
+static void
+SyncMTPCallback(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *buf_p, uint32_t size, CyAsReturnStatus_t err)
+{
+ (void)ep ;
+ (void)buf_p ;
+ (void)size ;
+
+ dev_p->mtp_error = err ;
+}
+
+static CyAsReturnStatus_t
+CyAsMTPOperation(CyAsDevice *dev_p,
+ CyAsMTPBlockTable* blk_table,
+ uint32_t num_bytes,
+ uint32_t transaction_id,
+ CyAsFunctionCallback cb,
+ uint32_t client,
+ uint8_t rqttype
+ )
+{
+ CyAsLLRequestResponse *req_p = 0, *reply_p = 0 ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint32_t mask = 0 ;
+ CyAsFunctCBType mtp_cb_op = (CyAsFunctCBType)0 ;
+ uint16_t size = 2 ;
+
+ if(dev_p->mtp_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ if (rqttype == CY_RQT_INIT_SEND_OBJECT)
+ {
+ mtp_cb_op = CY_FUNCT_CB_MTP_INIT_SEND_OBJECT ;
+ dev_p->mtp_turbo_active = CyTrue ;
+ }
+ else if (rqttype == CY_RQT_INIT_GET_OBJECT)
+ {
+ mtp_cb_op = CY_FUNCT_CB_MTP_INIT_GET_OBJECT ;
+ dev_p->mtp_turbo_active = CyTrue ;
+ }
+ else
+ mtp_cb_op = CY_FUNCT_CB_MTP_SEND_BLOCK_TABLE ;
+
+ ret = IsMTPActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CY_RQT_INIT_GET_OBJECT == rqttype)
+ {
+ size = 4 ;
+ }
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, rqttype, CY_RQT_TUR_RQT_CONTEXT, size) ;
+ if (req_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)(num_bytes & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((num_bytes >> 16) & 0xFFFF)) ;
+
+ /* If it is GET_OBJECT, send transaction id as well */
+ if (CY_RQT_INIT_GET_OBJECT == rqttype)
+ {
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(transaction_id & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 3, (uint16_t)((transaction_id >> 16) & 0xFFFF)) ;
+ }
+
+ if(cb == 0)
+ {
+ /* Queue the DMA request for block table write */
+ ret = CyAsDmaQueueRequest(dev_p, 4, blk_table, sizeof(CyAsMTPBlockTable), CyFalse, CyFalse, SyncMTPCallback) ;
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, 4, CY_AS_ERROR_CANCELED) ;
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+
+ goto destroy ;
+ }
+
+ ret = CyAsDmaDrainQueue(dev_p, 4, CyTrue) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = dev_p->mtp_error ;
+ goto destroy ;
+ }
+ else
+ {
+#if 0
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MTP_INIT_SEND_OBJECT,
+ 0, dev_p->func_cbs_mtp, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMTPFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+#endif
+
+ /* Protection from interrupt driven code */
+ /* since we are using storage EP4 check if any storage activity is pending */
+ mask = CyAsHalDisableInterrupts() ;
+ if ((CyAsDeviceIsStorageAsyncPending(dev_p)) || (dev_p->storage_wait))
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ return CY_AS_ERROR_ASYNC_PENDING ;
+ }
+ CyAsDeviceSetStorageAsyncPending(dev_p) ;
+ CyAsHalEnableInterrupts(mask) ;
+
+ dev_p->mtp_cb = cb ;
+ dev_p->mtp_client = client ;
+ dev_p->mtp_op = mtp_cb_op ;
+
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, MtpWriteCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = CyAsDmaQueueRequest(dev_p, 4, blk_table, sizeof(CyAsMTPBlockTable), CyFalse, CyFalse, AsyncWriteRequestCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Kick start the queue if it is not running */
+ CyAsDmaKickStart(dev_p, 4) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMTPInitSendObject(CyAsDeviceHandle handle,
+ CyAsMTPBlockTable* blk_table,
+ uint32_t num_bytes,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsDevice* dev_p ;
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ return CyAsMTPOperation(dev_p, blk_table, num_bytes, 0, cb, client, CY_RQT_INIT_SEND_OBJECT) ;
+
+}
+
+CyAsReturnStatus_t
+CyAsMTPInitGetObject(CyAsDeviceHandle handle,
+ CyAsMTPBlockTable* blk_table,
+ uint32_t num_bytes,
+ uint32_t transaction_id,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsDevice* dev_p ;
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ return CyAsMTPOperation(dev_p, blk_table, num_bytes, transaction_id, cb, client, CY_RQT_INIT_GET_OBJECT) ;
+
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseCancelSendObject(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMTPCancelSendObject(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsLLRequestResponse *req_p = 0, *reply_p = 0 ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice*dev_p ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if(dev_p->mtp_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_CANCEL_SEND_OBJECT, CY_RQT_TUR_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseCancelSendObject(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MTP_CANCEL_SEND_OBJECT,
+ 0, dev_p->func_cbs_mtp, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMTPFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseCancelGetObject(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMTPCancelGetObject(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsLLRequestResponse *req_p = 0, *reply_p = 0 ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice*dev_p ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if(dev_p->mtp_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_CANCEL_GET_OBJECT, CY_RQT_TUR_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseCancelGetObject(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MTP_CANCEL_GET_OBJECT,
+ 0, dev_p->func_cbs_mtp, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMTPFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsMTPSendBlockTable(CyAsDeviceHandle handle,
+ CyAsMTPBlockTable* blk_table,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsDevice* dev_p ;
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ return CyAsMTPOperation(dev_p, blk_table, 0, 0, cb, client, CY_RQT_SEND_BLOCK_TABLE) ;
+}
+
+static void
+CyAsMTPFuncCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t stat)
+{
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)dev_p->func_cbs_mtp->head_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t code ;
+ CyBool delay_callback = CyFalse ;
+
+ CyAsHalAssert(dev_p->func_cbs_mtp->count != 0) ;
+ CyAsHalAssert(dev_p->func_cbs_mtp->type == CYAS_FUNC_CB) ;
+
+ (void)context ;
+
+ /* The Handlers are responsible for Deleting the rqt and resp when
+ * they are finished
+ */
+ code = CyAsLLRequestResponse_GetCode(rqt) ;
+ switch(code)
+ {
+ case CY_RQT_START_MTP:
+ ret = MyHandleResponseMTPStart(dev_p, rqt, resp, stat) ;
+ break ;
+ case CY_RQT_STOP_MTP:
+ ret = MyHandleResponseMTPStop(dev_p, rqt, resp, stat) ;
+ break ;
+#if 0
+ case CY_RQT_INIT_SEND_OBJECT:
+ ret = MyHandleResponseInitSendObject(dev_p, rqt, resp, stat, CyTrue) ;
+ delay_callback = CyTrue ;
+ break ;
+#endif
+ case CY_RQT_CANCEL_SEND_OBJECT:
+ ret = MyHandleResponseCancelSendObject(dev_p, rqt, resp, stat) ;
+ break ;
+#if 0
+ case CY_RQT_INIT_GET_OBJECT:
+ ret = MyHandleResponseInitGetObject(dev_p, rqt, resp, stat, CyTrue) ;
+ delay_callback = CyTrue ;
+ break ;
+#endif
+ case CY_RQT_CANCEL_GET_OBJECT:
+ ret = MyHandleResponseCancelGetObject(dev_p, rqt, resp, stat) ;
+ break ;
+#if 0
+ case CY_RQT_SEND_BLOCK_TABLE:
+ ret = MyHandleResponseSendBlockTable(dev_p, rqt, resp, stat, CyTrue) ;
+ delay_callback = CyTrue ;
+ break ;
+#endif
+ case CY_RQT_ENABLE_USB_PATH:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ dev_p->is_storage_only_mode = CyFalse ;
+ break ;
+ default:
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+
+ /*
+ * If the low level layer returns a direct error, use the corresponding error code.
+ * If not, use the error code based on the response from firmware.
+ */
+ if (stat == CY_AS_ERROR_SUCCESS)
+ stat = ret ;
+
+ if(!delay_callback)
+ {
+ node->cb_p((CyAsDeviceHandle)dev_p, stat, node->client_data, (CyAsFunctCBType)node->dataType, node->data) ;
+ CyAsRemoveCBNode(dev_p->func_cbs_mtp) ;
+ }
+}
+
+CyAsReturnStatus_t
+CyAsMTPStorageOnlyStart(CyAsDeviceHandle handle)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (dev_p->storage_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ dev_p->is_storage_only_mode = CyTrue ;
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+CyAsReturnStatus_t
+CyAsMTPStorageOnlyStop(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (dev_p->storage_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ if (dev_p->is_storage_only_mode == CyFalse)
+ return CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_ENABLE_USB_PATH, CY_RQT_TUR_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = MyHandleResponseNoData(dev_p, req_p, reply_p) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ dev_p->is_storage_only_mode = CyFalse ;
+ return ret ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_MTP_STOP_STORAGE_ONLY,
+ 0, dev_p->func_cbs_mtp, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsMTPFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasprotocol.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,3718 @@
+/* Cypress West Bridge API header file (cyasprotocol.h)
+ ## ===========================
+ ##
+ ## Copyright Cypress Semiconductor Corporation, 2006-2009,
+ ## All Rights Reserved
+ ## UNPUBLISHED, LICENSED SOFTWARE.
+ ##
+ ## CONFIDENTIAL AND PROPRIETARY INFORMATION
+ ## WHICH IS THE PROPERTY OF CYPRESS.
+ ##
+ ## Use of this file is governed
+ ## by the license agreement included in the file
+ ##
+ ## <install>/license/license.txt
+ ##
+ ## where <install> is the Cypress software
+ ## installation root directory path.
+ ##
+ ## ===========================
+*/
+
+#ifndef _INCLUDED_CYASPROTOCOL_H_
+#define _INCLUDED_CYASPROTOCOL_H_
+
+/*
+ * Constants defining the per context buffer sizes
+ */
+#ifndef __doxygen__
+#define CY_CTX_GEN_MAX_DATA_SIZE (8)
+#define CY_CTX_RES_MAX_DATA_SIZE (8)
+#define CY_CTX_STR_MAX_DATA_SIZE (64)
+#define CY_CTX_USB_MAX_DATA_SIZE (130 + 23)
+#define CY_CTX_TUR_MAX_DATA_SIZE (12)
+#endif
+
+/* Summary
+ This response indicates a command has been processed and returned a status.
+
+ Direction
+ West Bridge -> P Port Processor
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = all
+ * Response Code = 0
+
+ D0
+ * 0 = success (CY_AS_ERROR_SUCCESS)
+ * non-zero = error code
+
+ Description
+ This response indicates that a request was processed and no data
+ was generated as a result of the request beyond a single 16 bit
+ status value. This response contains the 16 bit data value.
+ */
+#define CY_RESP_SUCCESS_FAILURE (0)
+
+/* Summary
+ This response indicates an invalid request was sent
+
+ Direction
+ West Bridge -> P Port Processor
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = all
+ * Response Code = 1
+
+ D0
+ * Mailbox contents for invalid request
+
+ Description
+ This response is returned when a request is sent that contains an invalid
+ context or request code.
+*/
+#define CY_RESP_INVALID_REQUEST (1)
+
+/* Summary
+ This response indicates a request of invalid length was sent
+
+ Direction
+ West Bridge -> P Port Processor
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = all
+ * Response Code = 2
+
+ D0
+ * Mailbox contenxt for invalid request
+ * Length for invalid request
+
+ Description
+ The software API and firmware sends requests across the P Port to West Bridge
+ interface on different contexts. Each contexts has a maximum size of the
+ request packet that can be received. The size of a request can be determined
+ during the first cycle of a request transfer. If the request is larger
+ than can be handled by the receiving context this response is returned. Note
+ that the complete request is received before this response is sent, but that
+ the request is dropped after this response is sent.
+*/
+#define CY_RESP_INVALID_LENGTH (2)
+
+
+/* Summary
+ This response indicates a request was made to an invalid storage address.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = all
+ * Response Code = 0
+
+ D0
+ Bits 15 - 12 : Media Type
+ * 0 = NAND
+ * 1 = SD Flash
+ * 2 = MMC Flash
+ * 3 = CE-ATA
+
+ Bits 11 - 8 : Zero based device index
+
+ Bits 7 - 0 : Zero based unit index
+
+ D1
+ Upper 16 bits of block address
+
+ D2
+ Lower 16 bits of block address
+
+ D3
+ Portion of address that is invalid
+ * 0 = Media Type
+ * 1 = Device Index
+ * 2 = Unit Index
+ * 3 = Block Address
+
+ Description
+ This response indicates a request to an invalid storage media
+ address
+ */
+#define CY_RESP_NO_SUCH_ADDRESS (3)
+
+
+/******************************************************/
+
+/*@@General requests
+ Summary
+ The general requests include:
+ * CY_RQT_GET_FIRMWARE_VERSION
+ * CY_RQT_SET_TRACE_LEVEL
+ * CY_RQT_INITIALIZATION_COMPLETE
+ * CY_RQT_READ_MCU_REGISTER
+ * CY_RQT_WRITE_MCU_REGISTER
+ * CY_RQT_STORAGE_MEDIA_CHANGED
+ * CY_RQT_CONTROL_ANTIOCH_HEARTBEAT
+ * CY_RQT_PREPARE_FOR_STANDBY
+ * CY_RQT_ENTER_SUSPEND_MODE
+ * CY_RQT_OUT_OF_SUSPEND
+ * CY_RQT_GET_GPIO_STATE
+ * CY_RQT_SET_GPIO_STATE
+ * CY_RQT_SET_SD_CLOCK_FREQ
+ * CY_RQT_WB_DEVICE_MISMATCH
+ * CY_RQT_BOOTLOAD_NO_FIRMWARE
+ * CY_RQT_RESERVE_LNA_BOOT_AREA
+ * CY_RQT_ABORT_P2S_XFER
+ */
+
+#ifndef __doxygen__
+#define CY_RQT_GENERAL_RQT_CONTEXT (0)
+#endif
+
+/* Summary
+ This command returns the firmware version number, media types supported and
+ debug/release mode information.
+
+ Direction
+ P Port Processor-> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 0
+ * Request Code = 0
+
+ Description
+ The response contains the 16-bit major version, the 16-bit minor version,
+ the 16 bit build number, media types supported and release/debug mode
+ information.
+
+ Responses
+ * CY_RESP_FIRMWARE_VERSION
+ */
+#define CY_RQT_GET_FIRMWARE_VERSION (0)
+
+
+/* Summary
+ This command changes the trace level and trace information destination within
+ the West Bridge firmware.
+
+ Direction
+ P Port Processor-> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 0
+ * Request Code = 1
+
+ D0
+ Trace Level
+ * 0 = no trace information
+ * 1 = state information
+ * 2 = function call
+ * 3 = function call with args/return value
+
+ D1
+ Bits 12 - 15 : MediaType
+ * 0 = NAND
+ * 1 = SDIO Flash
+ * 2 = MMC Flash
+ * 3 = CE-ATA
+
+ Bits 8 - 11 : Zero based device index
+
+ Bits 0 - 7 : Zero based unit index
+
+ Description
+ The West Bridge firmware contains debugging facilities that can be used to trace the
+ execution of the firmware. This request sets the level of tracing information that
+ is stored and the location where it is stored.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_NO_SUCH_ADDRESS
+ */
+#define CY_RQT_SET_TRACE_LEVEL (1)
+
+/* Summary
+ This command indicates that the firmware is up and ready for communications with the
+ P port processor.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 0
+ * Request Code = 3
+
+ D0
+ Major Version
+
+ D1
+ Minor Version
+
+ D2
+ Build Number
+
+ D3
+ Bits 15-8: Media types supported on Bus 1.
+ Bits 7-0: Media types supported on Bus 0.
+ Bits 8, 0: NAND support.
+ * 0: NAND is not supported.
+ * 1: NAND is supported.
+ Bits 9, 1: SD memory card support.
+ * 0: SD memory card is not supported.
+ * 1: SD memory card is supported.
+ Bits 10, 2: MMC card support.
+ * 0: MMC card is not supported.
+ * 1: MMC card is supported.
+ Bits 11, 3: CEATA drive support
+ * 0: CEATA drive is not supported.
+ * 1: CEATA drive is supported.
+ Bits 12, 4: SD IO card support.
+ * 0: SD IO card is not supported.
+ * 1: SD IO card is supported.
+
+ D4
+ Bits 15 - 8 : MTP information
+ * 0 : MTP not supported in firmware
+ * 1 : MTP supported in firmware
+ Bits 7 - 0 : Debug/Release mode information.
+ * 0 : Release mode
+ * 1 : Debug mode
+
+ Description
+ When the West Bridge firmware is loaded it being by performing initialization. Initialization must
+ be complete before West Bridge is ready to accept requests from the P port processor. This request
+ is sent from West Bridge to the P port processor to indicate that initialization is complete.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_INITIALIZATION_COMPLETE (3)
+
+/* Summary
+ This command requests the firmware to read and return the contents of a MCU accessible
+ register.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 4
+
+ D0
+ Address of register to read
+
+ Description
+ This debug command allows the processor to read the contents of a MCU accessible register.
+
+ Responses
+ * CY_RESP_MCU_REGISTER_DATA
+ */
+#define CY_RQT_READ_MCU_REGISTER (4)
+
+/* Summary
+ This command requests the firmware to write to an MCU accessible register.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 5
+
+ D0
+ Address of register to be written
+
+ D1
+ Bits 15 - 8 : Mask to be applied to existing data.
+ Bits 7 - 0 : Data to be ORed with masked data.
+
+ Description
+ This debug command allows the processor to write to an MCU accessible register.
+ Note: This has to be used with caution, and is supported by the firmware only
+ in special debug builds.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_WRITE_MCU_REGISTER (5)
+
+/* Summary
+ This command tells the West Bridge firmware that a change in storage media has been detected.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 6
+
+ Description
+ If the insertion or removal of SD or MMC cards is detected by hardware external to West Bridge,
+ this command is used to tell the West Bridge firmware to re-initialize the storage controlled by
+ the device.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+*/
+#define CY_RQT_STORAGE_MEDIA_CHANGED (6)
+
+/* Summary
+ This command enables/disables the periodic heartbeat message from the West Bridge firmware to
+ the processor.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 7
+
+ Description
+ This command enables/disables the periodic heartbeat message from the West Bridge firmware to
+ the processor. The heartbeat message is left enabled by default, and can lead to a loss
+ in performance on the P port interface.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_CONTROL_ANTIOCH_HEARTBEAT (7)
+
+/* Summary
+ This command requests the West Bridge firmware to prepare for the device going into standby
+ mode.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 8
+
+ Description
+ This command is sent by the processor to the West Bridge as preparation for going into
+ standby mode. The request allows the firmware to complete any pending/cached storage
+ operations before going into the low power state.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_PREPARE_FOR_STANDBY (8)
+
+/* Summary
+ Requests the firmware to go into suspend mode.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 9
+
+ D0
+ Bits 7-0: Wakeup control information.
+
+ Description
+ This command is sent by the processor to the West Bridge to request the device
+ to be placed in suspend mode. The firmware will complete any pending/cached storage
+ operations before going into the low power state.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_ENTER_SUSPEND_MODE (9)
+
+/* Summary
+ Indicates that the device has left suspend mode.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 10
+
+ Description
+ This message is sent by the West Bridge to the Processor to indicate that the device
+ has woken up from suspend mode, and is ready to accept new requests.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_OUT_OF_SUSPEND (10)
+
+/* Summary
+ Request to get the current state of an West Bridge GPIO pin.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 11
+
+ D0
+ Bits 15 - 8 : GPIO pin identifier
+
+ Responses
+ * CY_RESP_GPIO_STATE
+
+ Description
+ Request from the processor to get the current state of an West Bridge GPIO pin.
+ */
+#define CY_RQT_GET_GPIO_STATE (11)
+
+/* Summary
+ Request to update the output value on an West Bridge GPIO pin.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 12
+
+ D0
+ Bits 15 - 8 : GPIO pin identifier
+ Bit 0 : Desired output state
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+
+ Description
+ Request from the processor to update the output value on an West Bridge GPIO pin.
+ */
+#define CY_RQT_SET_GPIO_STATE (12)
+
+/* Summary
+ Set the clock frequency on the SD interface of the West Bridge device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 13
+
+ D0
+ Bit 8: Type of SD/MMC media
+ 0 = low speed media
+ 1 = high speed media
+ Bit 0: Clock frequency selection
+ 0 = Default frequency
+ 1 = Alternate frequency (24 MHz in both cases)
+
+ Description
+ This request is sent by the processor to set the operating clock
+ frequency used on the SD interface of the device.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_SET_SD_CLOCK_FREQ (13)
+
+/* Summary
+ Indicates the firmware downloaded to West Bridge cannot run on the active device.
+
+ Direction
+ West Bridge -> P Port processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 14
+
+ Description
+ Some versions of West Bridge firmware can only run on specific types/versions of
+ the West Bridge device. This error is returned when a firmware image is downloaded
+ onto a device that does not support it.
+
+ Responses
+ * None
+ */
+#define CY_RQT_WB_DEVICE_MISMATCH (14)
+
+/* Summary
+ This command is indicates that no firmware was found in the storage media.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 0
+ * Request code = 15
+
+ Description
+ The command is received only in case of silicon with bootloader ROM. The device sends
+ the request if there is no firmware image found in the storage media or the image is
+ corrupted. The device is waiting for P port to download a valid firmware image.
+
+ Responses
+ * None
+ */
+#define CY_RQT_BOOTLOAD_NO_FIRMWARE (15)
+
+/* Summary
+ This command reserves first numzones zones of nand device for storing processor boot image.
+
+ Direction
+ P Port Processor-> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 0
+ * Request Code = 16
+
+ D0
+ Bits 7-0: numzones
+
+ Description
+ The first numzones zones in nand device will be used for storing proc boot image. LNA firmware in Astoria will
+ work on this nand area and boots the processor which will then use the remaining nand for usual purposes.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_RESERVE_LNA_BOOT_AREA (16)
+
+/* Summary
+ This command cancels the processing of a P2S operation in firmware.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 0
+ * Request Code = 17
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+*/
+#define CY_RQT_ABORT_P2S_XFER (17)
+
+/*
+ * Used for debugging, ignore for normal operations
+ */
+#ifndef __doxygen__
+#define CY_RQT_DEBUG_MESSAGE (127)
+#endif
+
+/******************************************************/
+
+/*@@General responses
+ Summary
+ The general responses include:
+ * CY_RESP_FIRMWARE_VERSION
+ * CY_RESP_MCU_REGISTER_DATA
+ * CY_RESP_GPIO_STATE
+ */
+
+
+/* Summary
+ This response indicates success and contains the firmware version number, media types supported
+ by the firmware and release/debug mode information.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 0
+ * Response Code = 16
+
+ D0
+ Major Version
+
+ D1
+ Minor Version
+
+ D2
+ Build Number
+
+ D3
+ Bits 15-8: Media types supported on Bus 1.
+ Bits 7-0: Media types supported on Bus 0.
+ Bits 8, 0: NAND support.
+ * 0: NAND is not supported.
+ * 1: NAND is supported.
+ Bits 9, 1: SD memory card support.
+ * 0: SD memory card is not supported.
+ * 1: SD memory card is supported.
+ Bits 10, 2: MMC card support.
+ * 0: MMC card is not supported.
+ * 1: MMC card is supported.
+ Bits 11, 3: CEATA drive support
+ * 0: CEATA drive is not supported.
+ * 1: CEATA drive is supported.
+ Bits 12, 4: SD IO card support.
+ * 0: SD IO card is not supported.
+ * 1: SD IO card is supported.
+
+ D4
+ Bits 15 - 8 : MTP information
+ * 0 : MTP not supported in firmware
+ * 1 : MTP supported in firmware
+ Bits 7 - 0 : Debug/Release mode information.
+ * 0 : Release mode
+ * 1 : Debug mode
+
+ Description
+ This reponse is sent to return the firmware version number to the requestor.
+ */
+#define CY_RESP_FIRMWARE_VERSION (16)
+
+/* Summary
+ This response returns the contents of a MCU accessible register to the processor.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 0
+ * Response code = 17
+
+ D0
+ Bits 7 - 0 : MCU register contents
+
+ Description
+ This response is sent by the firmware in response to the CY_RQT_READ_MCU_REGISTER
+ command.
+ */
+#define CY_RESP_MCU_REGISTER_DATA (17)
+
+/* Summary
+ Reports the current state of an West Bridge GPIO pin.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 0
+ * Request code = 18
+
+ D0
+ Bit 0: Current state of the GP input pin
+
+ Description
+ This response is sent by the West Bridge to report the current state observed on
+ a general purpose input pin.
+ */
+#define CY_RESP_GPIO_STATE (18)
+
+
+/* Summary
+ This command notifies West Bridge the polarity of the SD power pin
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 0
+ * Request Code = 19
+ D0: CyAnMiscActivehigh / CyAnMiscActivelow
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+
+ */
+
+#define CY_RQT_SDPOLARITY (19)
+
+/********************************************************************/
+
+/*@@Resource requests
+ Summary
+
+ The resource requests include:
+ * CY_RQT_ACQUIRE_RESOURCE
+ * CY_RQT_RELEASE_RESOURCE
+ */
+
+
+
+
+
+#ifndef __doxygen__
+#define CY_RQT_RESOURCE_RQT_CONTEXT (1)
+#endif
+
+
+/* Summary
+ This command is a request from the P port processor for ownership
+ of a resource.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 1
+ * Request Code = 0
+
+ D0
+ Resource
+ * 0 = USB
+ * 1 = SDIO/MMC
+ * 2 = NAND
+
+ D1
+ Force Flag
+ * 0 = Normal
+ * 1 = Force
+
+ Description
+ The resource may be the USB pins, the SDIO/MMC bus, or the NAND bus.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_NOT_RELEASED
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_BAD_RESOURCE
+ */
+#define CY_RQT_ACQUIRE_RESOURCE (0)
+
+
+/* Summary
+ This command is a request from the P port processor to release
+ ownership of a resource.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 1
+ * Request Code = 1
+
+ D0
+ Resource
+ * 0 = USB
+ * 1 = SDIO/MMC
+ * 2 = NAND
+
+ Description
+ The resource may be the USB pins, the SDIO/MMC bus, or the NAND bus.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_NOT_OWNER
+ */
+#define CY_RQT_RELEASE_RESOURCE (1)
+
+
+/******************************************************/
+
+/*@@Storage requests
+ Summary
+ The storage commands include:
+ * CY_RQT_START_STORAGE
+ * CY_RQT_STOP_STORAGE
+ * CY_RQT_CLAIM_STORAGE
+ * CY_RQT_RELEASE_STORAGE
+ * CY_RQT_QUERY_MEDIA
+ * CY_RQT_QUERY_DEVICE
+ * CY_RQT_QUERY_UNIT
+ * CY_RQT_READ_BLOCK
+ * CY_RQT_WRITE_BLOCK
+ * CY_RQT_MEDIA_CHANGED
+ * CY_RQT_ANTIOCH_CLAIM
+ * CY_RQT_ANTIOCH_RELEASE
+ * CY_RQT_SD_INTERFACE_CONTROL
+ * CY_RQT_SD_REGISTER_READ
+ * CY_RQT_CHECK_CARD_LOCK
+ * CY_RQT_QUERY_BUS
+ * CY_RQT_PARTITION_STORAGE
+ * CY_RQT_PARTITION_ERASE
+ * CY_RQT_GET_TRANSFER_AMOUNT
+ * CY_RQT_ERASE
+ * CY_RQT_SDIO_READ_DIRECT
+ * CY_RQT_SDIO_WRITE_DIRECT
+ * CY_RQT_SDIO_READ_EXTENDED
+ * CY_RQT_SDIO_WRITE_EXTENDED
+ * CY_RQT_SDIO_INIT_FUNCTION
+ * CY_RQT_SDIO_QUERY_CARD
+ * CY_RQT_SDIO_GET_TUPLE
+ * CY_RQT_SDIO_ABORT_IO
+ * CY_RQT_SDIO_INTR
+ * CY_RQT_SDIO_SUSPEND
+ * CY_RQT_SDIO_RESUME
+ * CY_RQT_SDIO_RESET_DEV
+ * CY_RQT_P2S_DMA_START
+ */
+#ifndef __doxygen__
+#define CY_RQT_STORAGE_RQT_CONTEXT (2)
+#endif
+
+/* Summary
+ This command requests initialization of the storage stack.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 0
+
+ Description
+ This command is required before any other storage related command
+ can be send to the West Bridge firmware.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_ALREADY_RUNNING
+ */
+#define CY_RQT_START_STORAGE (0)
+
+
+/* Summary
+ This command requests shutdown of the storage stack.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 1
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_NOT_RUNNING
+ */
+#define CY_RQT_STOP_STORAGE (1)
+
+
+/* Summary
+ This command requests ownership of the given media type by the P port processor.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 2
+
+ D0
+ Bits 12 - 15 : Bus Index
+ Bits 8 - 11 : Zero based device index
+
+ Responses
+ * CY_RESP_MEDIA_CLAIMED_RELEASED
+ * CY_RESP_NO_SUCH_ADDRESS
+ */
+#define CY_RQT_CLAIM_STORAGE (2)
+
+
+/* Summary
+ This command releases ownership of a given media type by the P port processor.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 3
+
+ D0
+ Bits 12 - 15 : Bus Index
+ Bits 8 - 11 : Zero based device index
+
+ Responses
+ * CY_RESP_MEDIA_CLAIMED_RELEASED
+ * CY_RESP_NO_SUCH_ADDRESS
+ */
+#define CY_RQT_RELEASE_STORAGE (3)
+
+
+/* Summary
+ This command returns the total number of logical devices of the given type of media.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 4
+
+ D0
+ Bits 12 - 15 : MediaType
+ * 0 = NAND
+ * 1 = SDIO Flash
+ * 2 = MMC Flash
+ * 3 = CE-ATA
+
+ Bits 8 - 11 : Not Used
+
+ Bits 0 - 7 : Not Used
+
+ Responses
+ * CY_RESP_MEDIA_DESCRIPTOR
+ * CY_RESP_NO_SUCH_ADDRESS
+ */
+#define CY_RQT_QUERY_MEDIA (4)
+
+
+/* Summary
+ This command queries a given device to determine information about the number
+ of logical units on the given device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 5
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Not Used
+
+ Responses
+ * CY_RESP_DEVICE_DESCRIPTOR
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_INVALID_PARTITION_TABLE
+ * CY_RESP_NO_SUCH_ADDRESS
+ */
+#define CY_RQT_QUERY_DEVICE (5)
+
+
+/* Summary
+ This command queries a given device to determine information about the size
+ and location of a logical unit located on a physical device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 6
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based unit index
+
+ Responses
+ * CY_RESP_UNIT_DESCRIPTOR
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_INVALID_PARTITION_TABLE
+ * CY_RESP_NO_SUCH_ADDRESS
+ */
+#define CY_RQT_QUERY_UNIT (6)
+
+
+/* Summary
+ This command initiates the read of a specific block from the given media,
+ device and unit.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 2
+ * Request Code = 7
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based unit index
+
+ D1
+ Upper 16 bits of block address
+
+ D2
+ Lower 16 bits of block address
+
+ D3
+ BIT 8 - 15 : Upper 8 bits of Number of blocks
+
+ BIT 0 - 7 : Reserved
+
+ * D4 *
+ BITS 8 - 15 : Lower 8 bits of Number of blocks
+ BITS 1 - 7 : Not Used
+ BIT 0 : Indicates whether this command is a part of a P2S only burst.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_ANTIOCH_DEFERRED_ERROR
+ */
+#define CY_RQT_READ_BLOCK (7)
+
+
+/* Summary
+ This command initiates the write of a specific block from the given media,
+ device and unit.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 2
+ * Request Code = 8
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based unit index
+
+ D1
+ Upper 16 bits of block address
+
+ D2
+ Lower 16 bits of block address
+
+ D3
+ BIT 8 - 15 : Upper 8 bits of Number of blocks
+
+ BIT 0 - 7 : Reserved
+
+ * D4 *
+ BITS 8 - 15 : Lower 8 bits of Number of blocks
+ BITS 1 - 7 : Not Used
+ BIT 0 : Indicates whether this command is a part of a P2S only burst.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_ANTIOCH_DEFERRED_ERROR
+ */
+#define CY_RQT_WRITE_BLOCK (8)
+
+/* Summary
+ This request is sent when the West Bridge device detects a change in the status
+ of the media.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request Code = 9
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 0 - 7 : Media type
+
+ D1
+ Bit 0 : Action
+ * 0 = Inserted
+ * 1 = Removed
+
+ Description
+ When the media manager detects the insertion or removal of a media from the West Bridge
+ port, this request is sent from the West Bridge device to the P Port processor to inform
+ the processor of the change in status of the media. This request is sent for both an
+ insert operation and a removal operation.
+
+ Responses
+ * CY_RESPO_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_MEDIA_CHANGED (9)
+
+/* Summary
+ This request is sent when the USB module wishes to claim storage media.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request Code = 10
+
+ D0
+ Bit 0:
+ * 0 = do not release NAND
+ * 1 = release NAND
+
+ Bit 1:
+ * 0 = do not release SD Flash
+ * 1 = release SD Flash
+
+ Bit 2:
+ * 0 = do not release MMC flash
+ * 1 = release MMC flash
+
+ Bit 3:
+ * 0 = do not release CE-ATA storage
+ * 1 = release CE-ATA storage
+
+ Bit 8:
+ * 0 = do not release storage on bus 0
+ * 1 = release storage on bus 0
+
+ Bit 9:
+ * 0 = do not release storage on bus 1
+ * 1 = release storage on bus 1
+
+ Description
+ When the USB cable is attached to the West Bridge device, West Bridge will enumerate the storage
+ devices per the USB initialization of West Bridge. In order for West Bridge to respond to requests
+ received via USB for the mass storage devices, the USB module must claim the storeage. This
+ request is a request to the P port processor to release the storage medium. The medium will
+ not be visible on the USB host, until it has been released by the processor.
+*/
+#define CY_RQT_ANTIOCH_CLAIM (10)
+
+/* Summary
+ This request is sent when the P port has asked West Bridge to release storage media, and the
+ West Bridge device has completed this.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request Code = 11
+
+ D0
+ Bit 0:
+ * 0 = No change in ownership of NAND storage
+ * 1 = NAND ownership has been given to processor
+
+ Bit 1:
+ * 0 = No change in ownership of SD storage
+ * 1 = SD ownership has been given to processor
+
+ Bit 2:
+ * 0 = No change in ownership of MMC storage
+ * 1 = MMC ownership has been given to processor
+
+ Bit 3:
+ * 0 = No change in ownership of CE-ATA storage
+ * 1 = CE-ATA ownership has been given to processor
+
+ Bit 4:
+ * 0 = No change in ownership of SD IO device
+ * 1 = SD IO device ownership has been given to processor
+
+ Bit 8:
+ * 0 = No change in ownership of storage on bus 0
+ * 1 = Bus 0 ownership has been given to processor
+
+ Bit 9:
+ * 0 = No change in ownership of storage on bus 1
+ * 1 = Bus 1 ownership has been given to processor
+
+ Description
+ When the P port asks for control of a particular media, West Bridge may be able to release the
+ media immediately. West Bridge may also need to complete the flush of buffers before releasing
+ the media. In the later case, West Bridge will indicated a release is not possible immediately
+ and West Bridge will send this request to the P port when the release has been completed.
+*/
+#define CY_RQT_ANTIOCH_RELEASE (11)
+
+/* Summary
+ This request is sent by the Processor to enable/disable the handling of SD card
+ detection and SD card write protection by the firmware.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 12
+
+ D0
+ Bit 8: Enable/disable handling of card detection.
+ Bit 1: SDAT_3 = 0, GIPO_0 = 1
+ Bit 0: Enable/disable handling of write protection.
+
+ Description
+ This request is sent by the Processor to enable/disable the handling of SD card
+ detection and SD card write protection by the firmware.
+ */
+#define CY_RQT_SD_INTERFACE_CONTROL (12)
+
+/* Summary
+ Request from the processor to read a register on the SD card, and return the
+ contents.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 13
+
+ D0
+ Bits 12 - 15 : MediaType
+ * 0 = Reserved
+ * 1 = SDIO Flash
+ * 2 = MMC Flash
+ * 3 = Reserved
+
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Type of register to read
+
+ Description
+ This request is sent by the processor to instruct the West Bridge to read a register
+ on the SD/MMC card, and send the contents back through the CY_RESP_SD_REGISTER_DATA
+ response.
+ */
+#define CY_RQT_SD_REGISTER_READ (13)
+
+/* Summary
+ Check if the SD/MMC card connected to West Bridge is password locked.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 14
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+
+ Description
+ This request is sent by the processor to check if the SD/MMC connected to the West Bridge
+ is locked with a password.
+ */
+#define CY_RQT_CHECK_CARD_LOCK (14)
+
+/* Summary
+ This command returns the total number of logical devices on the given bus
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 15
+
+ D0
+ Bits 12 - 15 : Bus Number
+
+ Bits 0 - 11: Not Used
+
+ Responses
+ * CY_RESP_BUS_DESCRIPTOR
+ * CY_RESP_NO_SUCH_BUS
+ */
+#define CY_RQT_QUERY_BUS (15)
+
+/* Summary
+ Divide a storage device into two partitions.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request code = 16
+
+ D0
+ Bits 12 - 15 : Bus number
+ Bits 8 - 11 : Device number
+ Bits 0 - 7 : Not used
+
+ D1
+ Size of partition 0 (MS word)
+
+ D2
+ Size of partition 0 (LS word)
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_PARTITION_STORAGE (16)
+
+/* Summary
+ Remove the partition table and unify all partitions on a storage device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request code = 17
+
+ D0
+ Bits 12 - 15 : Bus number
+ Bits 8 - 11 : Device number
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_PARTITION_ERASE (17)
+
+/* Summary
+ Requests the current transfer amount.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request code = 18
+
+ D0
+ Bits 12 - 15 : Bus number
+ Bits 8 - 11 : Device number
+
+ Responses
+ * CY_RESP_TRANSFER_COUNT
+ */
+#define CY_RQT_GET_TRANSFER_AMOUNT (18)
+
+/* Summary
+ Erases.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 2
+ * Request code = 19
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based unit index
+
+ D1
+ Upper 16 bits of erase unit
+
+ D2
+ Lower 16 bits of erase unit
+
+ D3
+ BIT 8 - 15 : Upper 8 bits of Number of erase units
+ BIT 0 - 7 : Reserved
+
+ * D4 *
+ BIT 8 - 15 : Lower 8 bits of Number of erase units
+ BIT 0 - 7 : Not Used
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ */
+#define CY_RQT_ERASE (19)
+
+/* Summary
+ This command reads 1 byte from an SDIO card.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 23
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+ D1
+ Bits 8 - 15 : 0
+ Bit 7 : 0 to indicate a read
+ Bits 4 - 6 : Function number
+ Bit 3 : 0
+ Bit 2 : 1 if SDIO interrupt needs to be re-enabled.
+ Bits 0 - 1 : Two Most significant bits of Read address
+
+ D2
+ Bits 1 - 15 : 15 Least significant bits of Read address
+ Bit 0 : 0
+
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ * CY_RESP_SDIO_DIRECT
+*/
+#define CY_RQT_SDIO_READ_DIRECT (23)
+
+/* Summary
+ This command writes 1 byte to an SDIO card.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 24
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+ D1
+ Bits 8 - 15 : Data to write
+ Bit 7 : 1 to indicate a write
+ Bits 4 - 6 : Function number
+ Bit 3 : 1 if Read after write is enabled
+ Bit 2 : 1 if SDIO interrupt needs to be re-enabled.
+ Bits 0 - 1 : Two Most significant bits of write address
+
+ D2
+ Bits 1 - 15 : 15 Least significant bits of write address
+ Bit 0 : 0
+
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SDIO_DIRECT
+*/
+#define CY_RQT_SDIO_WRITE_DIRECT (24)
+
+/* Summary
+ This command reads performs a multi block/byte read from an SDIO card.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 25
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+ D1
+ Bit 15 : 0 to indicate a read
+ Bit 12 - 14 : Function Number
+ Bit 11 : Block Mode
+ Bit 10 : OpCode
+ Bits 0 - 9 : 10 Most significant bits of Read address
+
+ D2
+ Bits 9 - 15 : 7 Least significant bits of address
+ Bits 0 - 8 : Block/Byte Count
+
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SDIO_EXT
+*/
+#define CY_RQT_SDIO_READ_EXTENDED (25)
+
+/* Summary
+ This command reads performs a multi block/byte write to an SDIO card.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 26
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+ D1
+ Bit 15 : 1 to indicate a write
+ Bit 12 - 14 : Function Number
+ Bit 11 : Block Mode
+ Bit 10 : OpCode
+ Bits 0 - 9 : 10 Most significant bits of Read address
+
+ D2
+ Bits 9 - 15 : 7 Least significant bits of address
+ Bits 0 - 8 : Block/Byte Count
+
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SDIO_EXT
+*/
+#define CY_RQT_SDIO_WRITE_EXTENDED (26)
+
+/* Summary
+ This command initialises an IO function on the SDIO card.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 27
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_SDIO_INIT_FUNCTION (27)
+
+/* Summary
+ This command gets properties of the SDIO card.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 28
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_QUERY_CARD
+*/
+#define CY_RQT_SDIO_QUERY_CARD (28)
+
+/* Summary
+ This command reads a tuple from the CIS of an SDIO card.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 29
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+ D1
+ Bits 8 - 15 : Tuple ID to read
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SDIO_GET_TUPLE
+*/
+#define CY_RQT_SDIO_GET_TUPLE (29)
+
+/* Summary
+ This command Aborts an IO operation.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 30
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_SDIO_ABORT_IO (30)
+
+/* Summary
+ SDIO Interrupt request sent to the processor from the West Bridge device.
+
+ Direction
+ West Bridge ->P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 31
+
+ D0
+ Bits 0 - 7 : Bus Index
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_SDIO_INTR (31)
+
+/* Summary
+ This command Suspends an IO operation.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 32
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_SDIO_SUSPEND (32)
+
+/* Summary
+ This command resumes a suspended operation.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 33
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based function number
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SDIO_RESUME
+*/
+#define CY_RQT_SDIO_RESUME (33)
+
+/* Summary
+ This command resets an SDIO device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request Code = 34
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : 0
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_SDIO_RESET_DEV (34)
+
+/* Summary
+ This command asks the API to start the DMA transfer for a P2S operation.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Request code = 35
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_P2S_DMA_START (35)
+
+/******************************************************/
+
+/*@@Storage responses
+ Summary
+ The storage responses include:
+ * CY_RESP_MEDIA_CLAIMED_RELEASED
+ * CY_RESP_MEDIA_DESCRIPTOR
+ * CY_RESP_DEVICE_DESCRIPTOR
+ * CY_RESP_UNIT_DESCRIPTOR
+ * CY_RESP_ANTIOCH_DEFERRED_ERROR
+ * CY_RESP_SD_REGISTER_DATA
+ * CY_RESP_SD_LOCK_STATUS
+ * CY_RESP_BUS_DESCRIPTOR
+ * CY_RESP_TRANSFER_COUNT
+ * CY_RESP_SDIO_EXT
+ * CY_RESP_SDIO_INIT_FUNCTION
+ * CY_RESP_SDIO_QUERY_CARD
+ * CY_RESP_SDIO_GET_TUPLE
+ * CY_RESP_SDIO_DIRECT
+ * CY_RESP_SDIO_INVALID_FUNCTION
+ * CY_RESP_SDIO_RESUME
+ */
+
+/* Summary
+ Based on the request sent, the state of a given media was changed as indicated
+ by this response.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Response Code = 16
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+
+ D1
+ State of Media
+ * 0 = released
+ * 1 = claimed
+ */
+#define CY_RESP_MEDIA_CLAIMED_RELEASED (16)
+
+
+/* Summary
+ This response gives the number of physical devices associated with a given
+ media type.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Response Code = 17
+
+ D0
+ Media Type
+ Bits 12 - 15
+ * 0 = NAND
+ * 1 = SDIO Flash
+ * 2 = MMC Flash
+ * 3 = CE-ATA
+
+ D1
+ Number of devices
+ */
+#define CY_RESP_MEDIA_DESCRIPTOR (17)
+
+
+/* Summary
+ This response gives description of a physical device.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 2
+ * Response Code = 18
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Type of media present on bus
+
+ D1
+ Block Size in bytes
+
+ D2
+ Bit 15 : Is device removable
+ Bit 9 : Is device password locked
+ Bit 8 : Is device writeable
+ Bits 0 - 7 : Number Of Units
+
+ D3
+ ERASE_UNIT_SIZE high 16 bits
+
+ D4
+ ERASE_UNIT_SIZE low 16 bits
+
+ */
+#define CY_RESP_DEVICE_DESCRIPTOR (18)
+
+
+/* Summary
+ This response gives description of a unit on a physical device.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 6
+
+ MailBox0
+ * Context = 2
+ * Response Code = 19
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based unit index
+
+ D1
+ Bits 0 - 7 : Media type
+ * 1 = NAND
+ * 2 = SD FLASH
+ * 4 = MMC FLASH
+ * 8 = CEATA
+ * 16 = SD IO
+
+ D2
+ Block Size in bytes
+
+ D3
+ Start Block Low 16 bits
+
+ D4
+ Start Block High 16 bits
+
+ D5
+ Unit Size Low 16 bits
+
+ D6
+ Unit Size High 16 bits
+ */
+#define CY_RESP_UNIT_DESCRIPTOR (19)
+
+
+/* Summary
+ This response is sent as error status for P2S
+ Storage operation.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 2
+ * Request Code = 20
+
+ D0
+ Bit 8 : Type of operation (Read / Write)
+ Bits 7 - 0 : Error code
+
+ D1
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Zero based unit index
+
+ *D2 - D3*
+ Address where the error occurred.
+
+ D4
+ Length of the operation in blocks.
+
+ Description
+ This error is returned by the West Bridge to the processor if a
+ storage operation fails due to a medium error.
+*/
+#define CY_RESP_ANTIOCH_DEFERRED_ERROR (20)
+
+/* Summary
+ Contents of a register on the SD/MMC card connected to West Bridge.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ Variable
+
+ Mailbox0
+ * Context = 2
+ * Request code = 21
+
+ D0
+ Length of data in bytes
+
+ D1 - Dn
+ The register contents
+
+ Description
+ This is the response to a CY_RQT_SD_REGISTER_READ request.
+*/
+#define CY_RESP_SD_REGISTER_DATA (21)
+
+/* Summary
+ Status of whether the SD card is password locked.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 22
+
+ D0
+ Bit 0 : The card's lock status
+
+ Description
+ Status of whether the SD card is password locked.
+*/
+#define CY_RESP_SD_LOCK_STATUS (22)
+
+
+/* Summary
+ This response gives the types of physical devices attached to a given bus.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 2
+ * Response Code = 23
+
+ D0
+ Bus Number
+ Bits 12 - 15
+
+ D1
+ Media present on addressed bus
+ */
+#define CY_RESP_BUS_DESCRIPTOR (23)
+
+/* Summary
+ Amount of data read/written through the USB mass storage/MTP device.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 2
+ * Request code = 24
+
+ D0
+ MS 16 bits of number of sectors written
+
+ D1
+ LS 16 bits of number of sectors written
+
+ D2
+ MS 16 bits of number of sectors read
+
+ D3
+ LS 16 bits of number of sectors read
+
+ Description
+ This is the response to the CY_RQT_GET_TRANSFER_AMOUNT request, and
+ represents the number of sectors of data that has been written to or
+ read from the storage device through the USB Mass storage or MTP
+ interface.
+ */
+#define CY_RESP_TRANSFER_COUNT (24)
+
+/* Summary
+ Status of SDIO Extended read/write operation.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 34
+
+ D0
+ Bit 8 : 1 if Read response, 0 if write response
+ Bits 0-7: Error Status
+
+ Description
+ Status of SDIO Extended read write operation.
+*/
+
+#define CY_RESP_SDIO_EXT (34)
+
+/* Summary
+ Status of SDIO operation to Initialize a function
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 2
+ * Request code = 35
+
+
+ D0
+ Bits 8-15 : Function Interface Code
+ Bits 0-7: Extended Function Interface Code
+
+ D1
+ Bits 0-15 : Function Block Size
+
+ D2
+ Bits 0-15 : Most significant Word of Function PSN
+
+ D3
+ Bits 0-15 : Least significant Word of Function PSN
+
+ D4
+ Bit 15 : CSA Enabled Status
+ Bit 14 : CSA Support Status
+ Bit 9 : CSA No Format Status
+ Bit 8 : CSA Write Protect Status
+ Bit 0 : Function Wake Up Support status
+
+ Description
+ Status of SDIO Function Initialization operation.
+*/
+#define CY_RESP_SDIO_INIT_FUNCTION (35)
+
+/* Summary
+ Status of SDIO operation to query the Card
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 2
+ * Request code = 36
+
+
+ D0
+ Bits 8-15 : Number of IO functions present
+ Bit 0: 1 if memory is present
+
+ D1
+ Bits 0-15 : Card Manufacturer ID
+
+ D2
+ Bits 0-15 : Card Manufacturer Additional Information
+
+ D3
+ Bits 0-15 : Function 0 Block Size
+
+ D4
+ Bits 8-15 :SDIO Card Capability register
+ Bits 0-7: SDIO Version
+
+
+ Description
+ Status of SDIO Card Query operation.
+ */
+#define CY_RESP_SDIO_QUERY_CARD (36)
+/* Summary
+ Status of SDIO CIS read operation
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 37
+
+ D0
+ Bit 8 : 1
+ Bits 0-7: Error Status
+
+ D1
+ Bits 0 - 7 : Size of data read.
+
+ Description
+ Status of SDIO Get Tuple Read operation.
+ */
+#define CY_RESP_SDIO_GET_TUPLE (37)
+
+/* Summary
+ Status of SDIO Direct read/write operation.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 38
+
+ D0
+ Bit 8 : Error Status
+ Bits 0-7: Data Read(If any)
+
+ Description
+ Status of SDIO Direct read write operation.
+
+*/
+#define CY_RESP_SDIO_DIRECT (38)
+
+/* Summary
+ Indicates an un-initialized function has been used for IO
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 39
+
+ Description
+ Indicates an IO request on an uninitialized function.
+*/
+#define CY_RESP_SDIO_INVALID_FUNCTION (39)
+
+/* Summary
+ Response to a Resume request
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 2
+ * Request code = 40
+
+ D0
+ Bits 8-15 : Error Status
+ Bit 0: 1 if data is available. 0 otherwise.
+
+ Description
+ Response to a Resume request. Indicates if data is available after resum or not.
+*/
+#define CY_RESP_SDIO_RESUME (40)
+
+/******************************************************/
+
+/*@@USB requests
+ Summary
+ The USB requests include:
+ * CY_RQT_START_USB
+ * CY_RQT_STOP_USB
+ * CY_RQT_SET_CONNECT_STATE
+ * CY_RQT_GET_CONNECT_STATE
+ * CY_RQT_SET_USB_CONFIG
+ * CY_RQT_GET_USB_CONFIG
+ * CY_RQT_STALL_ENDPOINT
+ * CY_RQT_GET_STALL
+ * CY_RQT_SET_DESCRIPTOR
+ * CY_RQT_GET_DESCRIPTOR
+ * CY_RQT_SET_USB_CONFIG_REGISTERS
+ * CY_RQT_USB_EVENT
+ * CY_RQT_USB_EP_DATA
+ * CY_RQT_ENDPOINT_SET_NAK
+ * CY_RQT_GET_ENDPOINT_NAK
+ * CY_RQT_ACK_SETUP_PACKET
+ * CY_RQT_SCSI_INQUIRY_COMMAND
+ * CY_RQT_SCSI_START_STOP_COMMAND
+ * CY_RQT_SCSI_UNKNOWN_COMMAND
+ * CY_RQT_USB_REMOTE_WAKEUP
+ * CY_RQT_CLEAR_DESCRIPTORS
+ * CY_RQT_USB_STORAGE_MONITOR
+ * CY_RQT_USB_ACTIVITY_UPDATE
+ * CY_RQT_MS_PARTITION_SELECT
+ */
+#ifndef __doxygen__
+#define CY_RQT_USB_RQT_CONTEXT (3)
+#endif
+
+/* Summary
+ This command requests initialization of the USB stack.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 0
+
+ Description
+ This command is required before any other USB related command can be
+ sent to the West Bridge firmware.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_ALREADY_RUNNING
+ */
+#define CY_RQT_START_USB (0)
+
+
+/* Summary
+ This command requests shutdown of the USB stack.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 1
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_STOP_USB (1)
+
+
+/* Summary
+ This command requests that the USB pins be connected or disconnected to/from
+ the West Bridge device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 2
+
+ D0
+ Desired Connect State
+ * 0 = DISCONNECTED
+ * 1 = CONNECTED
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_SET_CONNECT_STATE (2)
+
+
+/* Summary
+ This command requests the connection state of the West Bridge USB pins.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 3
+
+ Responses
+ * CY_RESP_CONNECT_STATE
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_GET_CONNECT_STATE (3)
+
+
+/* Summary
+ This request configures the USB subsystem.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 3
+ * Request Code = 4
+
+ D0
+ Bits 8 - 15: Media to enumerate (bit mask)
+ Bits 0 - 7: Enumerate Mass Storage (bit mask)
+ * 1 = Enumerate device on bus 0
+ * 2 = Enumerate device on bus 1
+
+ D1
+ Enumeration Methodology
+ * 1 = West Bridge enumeration
+ * 0 = P Port enumeration
+
+ D2
+ Mass storage interface number - Interface number to be used for the mass storage interface
+
+ D3
+ Mass storage callbacks
+ * 1 = relay to P port
+ * 0 = completely handle in firmware
+
+ Description
+ This indicates how enumeration should be handled. Enumeration can be handled by the
+ West Bridge device or by the P port processor.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_INVALID_MASK
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_INVALID_STORAGE_MEDIA
+ */
+#define CY_RQT_SET_USB_CONFIG (4)
+
+
+/* Summary
+ This request retrieves the current USB configuration from the West Bridge device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 5
+
+ Responses
+ * CY_RESP_USB_CONFIG
+ */
+#define CY_RQT_GET_USB_CONFIG (5)
+
+
+/* Summary
+ This request stalls the given endpoint.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 6
+
+ D0
+ Endpoint Number
+
+ D1
+ * 1 = Stall Endpoint
+ * 0 = Clear Stall
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_INVALID_ENDPOINT
+ */
+#define CY_RQT_STALL_ENDPOINT (6)
+
+
+/* Summary
+ This request retrieves the stall status of the requested endpoint.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 7
+
+ D0
+ Endpoint number
+
+ Responses
+ * CY_RESP_ENDPOINT_STALL
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_INVALID_ENDPOINT
+ */
+#define CY_RQT_GET_STALL (7)
+
+
+/* Summary
+ This command sets the contents of a descriptor.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 8
+
+ D0
+ Bit 15 - Bit 8
+ Descriptor Index
+
+ Bit 7 - Bit 0
+ Descriptor Type
+ * Device = 1
+ * Device Qualifier = 2
+ * Full Speed Configuration = 3
+ * High Speed Configuration = 4
+
+ * D1 - DN *
+ Actual data for the descriptor
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_BAD_TYPE
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_BAD_INDEX
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_BAD_LENGTH
+ */
+#define CY_RQT_SET_DESCRIPTOR (8)
+
+/* Summary
+ This command gets the contents of a descriptor.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 9
+
+ D0
+ Bit 15 - Bit 8
+ Descriptor Index
+
+ Bit 7 - Bit 0
+ Descriptor Type
+ * Device = 1
+ * Device Qualifier = 2
+ * Full Speed Configuration = 3
+ * High Speed Configuration = 4
+
+ Responses
+ * CY_RESP_USB_DESCRIPTOR
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_BAD_TYPE
+ * CY_RESP_SUCCESS_FAILURE:CY_ERR_BAD_INDEX
+ */
+#define CY_RQT_GET_DESCRIPTOR (9)
+
+/* Summary
+ This request is sent from the P port processor to the West Bridge device to
+ physically configure the endpoints in the device.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 3
+
+ MailBox0
+ * Context = 3
+ * Request Code = 10
+
+ D0
+ Bit 15 - Bit 8
+ EP1OUTCFG register value
+ Bit 7 - Bit 0
+ EP1INCFG register value
+
+ * D1 - D2 *
+ PEPxCFS register values where x = 3, 5, 7, 9
+
+ * D3 - D7 *
+ LEPxCFG register values where x = 3, 5, 7, 9, 10, 11, 12, 13, 14, 15
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_SET_USB_CONFIG_REGISTERS (10)
+
+/* Summary
+ This request is sent to the P port processor when a USB event occurs
+ and needs to be relayed to the P port.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 3
+ * Request Code = 11
+
+ D0
+ Event Type
+ * 0 = Reserved
+ * 1 = Reserved
+ * 2 = USB Suspend
+ * 3 = USB Resume
+ * 4 = USB Reset
+ * 5 = USB Set Configuration
+ * 6 = USB Speed change
+
+ D1
+ If EventTYpe is USB Speed change
+ * 0 = Full Speed
+ * 1 = High Speed
+
+ If EventType is USB Set Configuration
+ * The number of the configuration to use (may be zero to unconfigure)
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_USB_EVENT (11)
+
+/* Summary
+ This request is sent in both directions to transfer endpoint data for
+ endpoints 0 and 1.
+
+ Direction
+ West Bridge -> P Port Processor
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ Variable
+
+ Mailbox0
+ * Context = 3
+ * Request Code = 12
+
+ D0
+ Bit 15 - 14 Data Type
+ * 0 = Setup (payload should be the 8 byte setup packet)
+ * 1 = Data
+ * 2 = Status (payload should be empty)
+
+ Bit 13 Endpoint Number (only 0 and 1 supported)
+ Bit 12 First Packet (only supported for Host -> West Bridge traffic)
+ Bit 11 Last Packet (only supported for Host -> West Bridge traffic)
+
+ Bit 9 - 0 Data Length (real max data length is 64 bytes for EP0 and EP1)
+
+ *D1-Dn*
+ Endpoint data
+*/
+#define CY_RQT_USB_EP_DATA (12)
+
+
+/* Summary
+ This request sets the NAK bit on an endpoint.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 13
+
+ D0
+ Endpoint Number
+
+ D1
+ * 1 = NAK Endpoint
+ * 0 = Clear NAK
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_INVALID_ENDPOINT
+ */
+#define CY_RQT_ENDPOINT_SET_NAK (13)
+
+
+/* Summary
+ This request retrieves the NAK config status of the requested endpoint.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Request Code = 14
+
+ D0
+ Endpoint number
+
+ Responses
+ * CY_RESP_ENDPOINT_NAK
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_INVALID_ENDPOINT
+ */
+#define CY_RQT_GET_ENDPOINT_NAK (14)
+
+/* Summary
+ This request acknowledges a setup packet that does not require any data transfer.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox
+ * Context = 3
+ * Request Code = 15
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_ACK_SETUP_PACKET (15)
+
+/* Summary
+ This request is sent when the USB storage driver within West Bridge receives an Inquiry request.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ x - variable
+
+ Mailbox0
+ * Context = 3
+ * Request Code = 16
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Media type being addressed
+
+ D1
+ Bits 8 : EVPD bit from request
+ Bits 0 - 7 : Codepage from the inquiry request
+
+ D2
+ Length of the inquiry response in bytes
+
+ * D3 - Dn *
+ The inquiry response
+
+ Description
+ When the West Bridge firmware receives an SCSI Inquiry request from the USB host, the response to this
+ mass storage command is created by West Bridge and forwarded to the P port processor. The P port processor
+ may change this response before it is returned to the USB host. This request is the method by which
+ this may happen.
+*/
+#define CY_RQT_SCSI_INQUIRY_COMMAND (16)
+
+/* Summary
+ This request is sent when the USB storage driver within West Bridge receives a Start/Stop request.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 3
+ * Request Code = 17
+
+ D0
+ Bits 12 - 15 : Bus index
+ Bits 8 - 11 : Zero based device index
+ Bits 0 - 7 : Media type being addressed
+
+ D1
+ Bit 1
+ * LoEj Bit (See SCSI-3 specification)
+
+ Bit 0
+ * Start Bit (See SCSI-3 specification)
+
+ Description
+ When the West Bridge firmware received a SCSI Start/Stop request from the USB host, this request is relayed to
+ the P port processor. This request is used to relay the command. The USB firmware will not response to the
+ USB command until the response to this request is recevied by the firmware.
+*/
+#define CY_RQT_SCSI_START_STOP_COMMAND (17)
+
+/* Summary
+ This request is sent when the USB storage driver receives an unknown CBW on mass storage.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 4
+
+ Mailbox0
+ * Context = 3
+ * Request Code = 18
+
+ D0
+ Bits 12 - 15 : MediaType
+ * 0 = NAND
+ * 1 = SDIO Flash
+ * 2 = MMC Flash
+ * 3 = CE-ATA
+
+ D1
+ The length of the request in bytes
+
+ D2 - Dn
+ CBW command block from the SCSI host controller.
+
+ Description
+ When the firmware recevies a SCSI request that is not understood, this request is relayed to the
+ P port processor.
+*/
+#define CY_RQT_SCSI_UNKNOWN_COMMAND (18)
+
+/* Summary
+ Request the West Bridge to signal remote wakeup to the USB host.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 3
+ * Request code = 19
+
+ Description
+ Request from the processor to West Bridge, to signal remote wakeup to the USB host.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_USB_REMOTE_WAKEUP (19)
+
+/* Summary
+ Request the West Bridge to clear all descriptors that were set previously
+ using the Set Descriptor calls.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 3
+ * Request code = 20
+
+ Description
+ Request from the processor to West Bridge, to clear all descriptor information
+ that was previously stored on the West Bridge using CyAnUsbSetDescriptor calls.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_CLEAR_DESCRIPTORS (20)
+
+/* Summary
+ Request the West Bridge to monitor USB to storage activity and send
+ periodic updates.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 3
+ * Request code = 21
+
+ D0
+ Upper 16 bits of write threshold
+
+ D1
+ Lower 16 bits of write threshold
+
+ D2
+ Upper 16 bits of read threshold
+
+ D3
+ Lower 16 bits of read threshold
+
+ Description
+ Request from the processor to West Bridge, to start monitoring the level
+ of read/write activity on the USB mass storage drive and to set the
+ threshold level at which progress reports are sent.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_USB_STORAGE_MONITOR (21)
+
+/* Summary
+ Event from the West Bridge showing that U2S activity since the last event has
+ crossed the threshold.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 3
+ * Request code = 22
+
+ D0
+ Upper 16 bits of sectors written since last event.
+
+ D1
+ Lower 16 bits of sectors written since last event.
+
+ D2
+ Upper 16 bits of sectors read since last event.
+
+ D3
+ Lower 16 bits of sectors read since last event.
+
+ Description
+ Event notification from the West Bridge indicating that the number of
+ read/writes on the USB mass storage device have crossed a pre-defined
+ threshold level.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_USB_ACTIVITY_UPDATE (22)
+
+/* Summary
+ Request to select the partitions to be enumerated on a storage device with
+ partitions.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 3
+ * Request code = 23
+
+ D0
+ Bits 8-15 : Bus index
+ Bits 0- 7 : Device index
+
+ D1
+ Bits 8-15 : Control whether to enumerate partition 1.
+ Bits 0- 7 : Control whether to enumerate partition 0.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE
+ */
+#define CY_RQT_MS_PARTITION_SELECT (23)
+
+/******************************************************/
+
+/*@@USB responses
+ Summary
+ The USB responses include:
+ * CY_RESP_USB_CONFIG
+ * CY_RESP_ENDPOINT_CONFIG
+ * CY_RESP_ENDPOINT_STALL
+ * CY_RESP_CONNECT_STATE
+ * CY_RESP_USB_DESCRIPTOR
+ * CY_RESP_USB_INVALID_EVENT
+ * CY_RESP_ENDPOINT_NAK
+ * CY_RESP_INQUIRY_DATA
+ * CY_RESP_UNKNOWN_SCSI_COMMAND
+ */
+
+/* Summary
+ This response contains the enumeration configuration information for the USB module.
+
+ Direction
+ 8051->P
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Response Code = 32
+
+ D0
+ Bits 8 - 15: Media to enumerate (bit mask)
+ Bits 0 - 7: Buses to enumerate (bit mask)
+ * 1 = Bus 0
+ * 2 = Bus 1
+
+ D1
+ Enumeration Methodology
+ * 0 = West Bridge enumeration
+ * 1 = P Port enumeration
+
+ D2
+ Bits 7 - 0 : Interface Count - the number of interfaces
+ Bits 15 - 8 : Mass storage callbacks
+
+ */
+#define CY_RESP_USB_CONFIG (32)
+
+
+/* Summary
+ This response contains the configuration information for the specified endpoint.
+
+ Direction
+ 8051->P
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Response Code = 33
+
+ D0
+ Bits 15 - 12 : Endpoint Number (0 - 15)
+
+ Bits 11 - 10 : Endpoint Type
+ * 0 = Control
+ * 1 = Bulk
+ * 2 = Interrupt
+ * 3 = Isochronous
+
+ Bits 9 : Endpoint Size
+ * 0 = 512
+ * 1 = 1024
+
+ Bits 8 - 7 : Buffering
+ * 0 = Double
+ * 1 = Triple
+ * 2 = Quad
+
+ Bits 6 : Bit Direction
+ * 0 = Input
+ * 1 = Output
+ */
+#define CY_RESP_ENDPOINT_CONFIG (33)
+
+
+/* Summary
+ This response contains the stall status for the specified endpoint.
+
+ Direction
+ 8051->P
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Response Code = 34
+
+ D0
+ Stall status
+ * 0 = Active
+ * 1 = Stalled
+ */
+#define CY_RESP_ENDPOINT_STALL (34)
+
+
+/* Summary
+ This response contains the connected/disconnected state of the West Bridge USB pins.
+
+ Direction
+ 8051->P
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 3
+ * Response Code = 35
+
+ D0
+ Connect state
+ * 0 = Disconnected
+ * 1 = Connected
+ */
+#define CY_RESP_CONNECT_STATE (35)
+
+/* Summary
+ This response contains the information about the USB configuration
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length
+ x bytes
+
+ Mailbox0
+ * Context = 3
+ * Response Code = 36
+
+ D0
+ Length in bytes of the descriptor
+
+ * D1 - DN *
+ Descriptor contents
+*/
+#define CY_RESP_USB_DESCRIPTOR (36)
+
+/* Summary
+ This response is sent in response to a bad USB event code
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length
+ 1 word (2 bytes)
+
+ Mailbox0
+ * Context = 3
+ * Response Code = 37
+
+ D0
+ The invalid event code in the request
+*/
+#define CY_RESP_USB_INVALID_EVENT (37)
+
+/* Summary
+ This response contains the current NAK status of a USB endpoint.
+
+ Direction
+ West Bridge -> P port processor
+
+ Length
+ 1 transfer
+
+ Mailbox0
+ * Context = 3
+ * Response Code = 38
+
+ D0
+ The NAK status of the endpoint
+ 1 : NAK bit set
+ 0 : NAK bit clear
+*/
+#define CY_RESP_ENDPOINT_NAK (38)
+
+/* Summary
+ This response gives the contents of the inquiry data back to West Bridge to
+ returns to the USB host.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length
+ Variable
+
+ MailBox0
+ * Context = 3
+ * Response Code = 39
+
+ D0
+ Length of the inquiry response
+
+ *D1 - Dn*
+ Inquiry data
+*/
+#define CY_RESP_INQUIRY_DATA (39)
+
+/* Summary
+ This response gives the status of an unknown SCSI command. This also gives three
+ bytes of sense information.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 3
+ * Response Code = 40
+
+ D0
+ The length of the reply in bytes
+
+ D1
+ * Status of the command
+ * Sense Key
+
+ D2
+ * Additional Sense Code (ASC)
+ * Additional Sense Code Qualifier (ASCQ)
+*/
+#define CY_RESP_UNKNOWN_SCSI_COMMAND (40)
+/*******************************************************/
+
+/*@@Turbo requests
+ Summary
+ The Turbo requests include:
+ * CY_RQT_START_MTP
+ * CY_RQT_STOP_MTP
+ * CY_RQT_INIT_SEND_OBJECT
+ * CY_RQT_CANCEL_SEND_OBJECT
+ * CY_RQT_INIT_GET_OBJECT
+ * CY_RQT_CANCEL_GET_OBJECT
+ * CY_RQT_SEND_BLOCK_TABLE
+ * CY_RQT_MTP_EVENT
+ * CY_RQT_TURBO_CMD_FROM_HOST
+ * CY_RQT_TURBO_SEND_RESP_DATA_TO_HOST
+ * CY_RQT_TURBO_SWITCH_ENDPOINT
+ * CY_RQT_TURBO_START_WRITE_DMA
+ * CY_RQT_ENABLE_USB_PATH
+ * CY_RQT_CANCEL_ASYNC_TRANSFER
+ */
+#ifndef __doxygen__
+#define CY_RQT_TUR_RQT_CONTEXT (4)
+#endif
+
+/* Summary
+ This command requests initialization of the MTP stack.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request Code = 0
+
+ Description
+ This command is required before any other MTP related command can be
+ sent to the West Bridge firmware.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_ALREADY_RUNNING
+ */
+#define CY_RQT_START_MTP (0)
+
+/* Summary
+ This command requests shutdown of the MTP stack.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request Code = 1
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_STOP_MTP (1)
+
+/* Summary
+ This command sets up an MTP SendObject operation.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request Code = 2
+
+ D0
+ Total bytes for send object Low 16 bits
+
+ D1
+ Total bytes for send object High 16 bits
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_INIT_SEND_OBJECT (2)
+
+/* Summary
+ This command cancels West Bridges handling of
+ an ongoing MTP SendObject operation. This
+ does NOT send an MTP response.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request Code = 3
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_NO_OPERATION_PENDING
+ */
+#define CY_RQT_CANCEL_SEND_OBJECT (3)
+
+/* Summary
+ This command sets up an MTP GetObject operation.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 4
+ * Request Code = 4
+
+ D0
+ Total bytes for get object Low 16 bits
+
+ D1
+ Total bytes for get object High 16 bits
+
+ D2
+ Transaction Id for get object Low 16 bits
+
+ D3
+ Transaction Id for get object High 16 bits
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_INIT_GET_OBJECT (4)
+
+/* Summary
+ This command notifies West Bridge of a new
+ BlockTable transfer.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request Code = 5
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_SEND_BLOCK_TABLE (5)
+
+/* Summary
+ This request is sent to the P port processor when a MTP event occurs
+ and needs to be relayed to the P port.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 4
+ * Request Code = 6
+
+ D0
+ Bits 15 - 8 : Return Status for GetObject/SendObject
+ Bits 7 - 0 : Event Type
+ * 0 = MTP SendObject Complete
+ * 1 = MTP GetObject Complete
+ * 2 = BlockTable Needed
+
+ D1
+ Lower 16 bits of the length of the data that got transferred in the Turbo Endpoint.
+ (Applicable to "MTP SendObject Complete" and "MTP GetObject Complete" events)
+
+ D2
+ Upper 16 bits of the length of the data that got transferred in the Turbo Endpoint.
+ (Applicable to "MTP SendObject Complete" and "MTP GetObject Complete" events)
+
+ D3
+ Lower 16 bits of the Transaction Id of the MTP_SEND_OBJECT command.
+ (Applicable to "MTP SendObject Complete" event)
+
+ D4
+ Upper 16 bits of the Transaction Id of the MTP_SEND_OBJECT command.
+ (Applicable to "MTP SendObject Complete" event)
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_MTP_EVENT (6)
+
+/* Summary
+ This request is sent to the P port processor when a command is received
+ from Host in a Turbo Endpoint. Upon receiving this event, P port should
+ read the data from the endpoint as soon as possible.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 4
+ * Request Code = 7
+
+ D0
+ This contains the EP number. (This will be always two now).
+
+ D1
+ Length of the data available in the Turbo Endpoint.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_TURBO_CMD_FROM_HOST (7)
+
+/* Summary
+ This request is sent to the West Bridge when the P port needs to send
+ data to the Host in a Turbo Endpoint. Upon receiving this event,
+ Firmware will make the end point avilable for the P port. If the length is
+ zero, then firmware will send a zero length packet.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ Mailbox0
+ * Context = 4
+ * Request Code = 8
+
+ D0
+ This contains the EP number. (This will be always six now).
+
+ D1
+ Lower 16 bits of the length of the data that needs to be sent in the Turbo Endpoint.
+
+ D2
+ Upper 16 bits of the length of the data that needs to be sent in the Turbo Endpoint.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+*/
+#define CY_RQT_TURBO_SEND_RESP_DATA_TO_HOST (8)
+
+/* Summary
+ This command cancels West Bridges handling of
+ an ongoing MTP GetObject operation. This
+ does NOT send an MTP response.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request Code = 9
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_NO_OPERATION_PENDING
+ */
+#define CY_RQT_CANCEL_GET_OBJECT (9)
+
+/* Summary
+ This command switches a Turbo endpoint
+ from the U port to the P port. If no data
+ is in the endpoint the endpoint is
+ primed to switch as soon as data is placed
+ in the endpoint. The endpoint will continue
+ to switch until all data has been transferd.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 2
+
+ MailBox0
+ * Context = 4
+ * Request Code = 10
+
+ D0
+ Whether the read is a packet read.
+
+ D1
+ Lower 16 bits of the length of the data to switch the Turbo Endpoint for.
+
+ D2
+ Upper 16 bits of the length of the data to switch the Turbo Endpoint for.
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ * CY_RESP_SUCCESS_FAILURE:CY_RESP_NOT_RUNNING
+ */
+#define CY_RQT_TURBO_SWITCH_ENDPOINT (10)
+
+/* Summary
+ This command requests the API to start the DMA transfer of a packet
+ of MTP data to the Antioch.
+
+ Direction
+ West Bridge -> P Port Processor
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request Code = 11
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ */
+#define CY_RQT_TURBO_START_WRITE_DMA (11)
+
+/* Summary
+ This command requests the firmware to switch the internal data paths to enable
+ USB access to the Mass storage / MTP endpoints.
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ MailBox0
+ * Context = 4
+ * Request code = 12
+
+ Responses
+ * CY_RESP_SUCCESS_FAILURE:CY_AS_ERROR_SUCCESS
+ */
+#define CY_RQT_ENABLE_USB_PATH (12)
+
+/* Summary
+ Request to cancel an asynchronous MTP write from the processor side.
+
+ Direction
+ P Port processor -> West Bridge
+
+ Length (in transfers)
+ 1
+
+ Mailbox0
+ * Context = 4
+ * Request code = 13
+
+ D0
+ * EP number
+
+ Description
+ This is a request to the firmware to update internal state so that a pending write
+ on the MTP endpoint can be cancelled.
+ */
+#define CY_RQT_CANCEL_ASYNC_TRANSFER (13)
+
+/******************************************************/
+
+/*@@Turbo responses
+ Summary
+ The Turbo responses include:
+ * CY_RESP_MTP_INVALID_EVENT
+ */
+
+/* Summary
+ This response is sent in response to a bad MTP event code
+
+ Direction
+ P Port Processor -> West Bridge
+
+ Length
+ 1 word (2 bytes)
+
+ Mailbox0
+ * Context = 4
+ * Response Code = 16
+
+ D0
+ The invalid event code in the request
+*/
+#define CY_RESP_MTP_INVALID_EVENT (16)
+
+#ifndef __doxygen__
+#define CY_RQT_CONTEXT_COUNT (5)
+#endif
+
+#endif /* _INCLUDED_CYASPROTOCOL_H_ */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasstorage.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,3941 @@
+/* Cypress West Bridge API source file (cyasstorage.c)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+/*
+* Storage Design
+*
+* The storage module is fairly straight forward once the DMA and LOWLEVEL modules
+* have been designed. The storage module simple takes requests from the user, queues the
+* associated DMA requests for action, and then sends the low level requests to the
+* West Bridge firmware.
+*
+*/
+
+#include "cyashal.h"
+#include "cyasstorage.h"
+#include "cyaserr.h"
+#include "cyasdevice.h"
+#include "cyaslowlevel.h"
+#include "cyasdma.h"
+#include "cyasregs.h"
+
+/* Map a pre-V1.2 media type to the V1.2+ bus number */
+CyAsReturnStatus_t
+CyAnMapBusFromMediaType(CyAsDevice *dev_p, CyAsMediaType type, CyAsBusNumber_t *bus)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t code = (uint8_t)(1 << type) ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+
+ if (dev_p->media_supported[0] & code)
+ {
+ if (dev_p->media_supported[1] & code)
+ {
+ /*
+ * This media type could be supported on multiple buses. So, report
+ * an address resolution error.
+ */
+ ret = CY_AS_ERROR_ADDRESS_RESOLUTION_ERROR ;
+ }
+ else
+ *bus = 0 ;
+ }
+ else
+ {
+ if (dev_p->media_supported[1] & code)
+ *bus = 1 ;
+ else
+ ret = CY_AS_ERROR_NO_SUCH_MEDIA ;
+ }
+
+ return ret ;
+}
+
+static uint16_t
+CreateAddress(CyAsBusNumber_t bus, uint32_t device, uint8_t unit)
+{
+ CyAsHalAssert(bus >= 0 && bus < CY_AS_MAX_BUSES) ;
+ CyAsHalAssert(device < 16) ;
+
+ return (uint16_t)(((uint8_t)bus << 12) | (device << 8) | unit) ;
+}
+
+CyAsMediaType
+CyAsStorageGetMediaFromAddress(uint16_t v)
+{
+ CyAsMediaType media = CyAsMediaMaxMediaValue ;
+
+ switch(v & 0xFF)
+ {
+ case 0x00:
+ break;
+ case 0x01:
+ media = CyAsMediaNand ;
+ break ;
+ case 0x02:
+ media = CyAsMediaSDFlash ;
+ break ;
+ case 0x04:
+ media = CyAsMediaMMCFlash ;
+ break ;
+ case 0x08:
+ media = CyAsMediaCEATA ;
+ break ;
+ case 0x10:
+ media = CyAsMediaSDIO ;
+ break ;
+ default:
+ CyAsHalAssert(0) ;
+ break ;
+ }
+
+ return media ;
+}
+
+CyAsBusNumber_t
+CyAsStorageGetBusFromAddress(uint16_t v)
+{
+ CyAsBusNumber_t bus = (CyAsBusNumber_t)((v >> 12) & 0x0f) ;
+ CyAsHalAssert(bus >= 0 && bus < CY_AS_MAX_BUSES) ;
+ return bus ;
+}
+
+uint32_t
+CyAsStorageGetDeviceFromAddress(uint16_t v)
+{
+ return (uint32_t)((v >> 8) & 0x0f) ;
+}
+
+static uint8_t
+GetUnitFromAddress(uint16_t v)
+{
+ return (uint8_t)(v & 0xff) ;
+}
+
+static CyAsReturnStatus_t
+CyAsMapBadAddr(uint16_t val)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_INVALID_RESPONSE ;
+
+ switch(val)
+ {
+ case 0:
+ ret = CY_AS_ERROR_NO_SUCH_BUS ;
+ break ;
+ case 1:
+ ret = CY_AS_ERROR_NO_SUCH_DEVICE ;
+ break ;
+ case 2:
+ ret = CY_AS_ERROR_NO_SUCH_UNIT ;
+ break ;
+ case 3:
+ ret = CY_AS_ERROR_INVALID_BLOCK ;
+ break ;
+ }
+
+ return ret ;
+}
+
+static void
+MyStorageRequestCallback(CyAsDevice *dev_p, uint8_t context, CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *resp_p, CyAsReturnStatus_t ret)
+{
+ uint16_t val ;
+ uint16_t addr ;
+ CyAsBusNumber_t bus;
+ uint32_t device;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+ CyAsDmaEndPoint *ep_p = NULL ;
+
+ (void)resp_p ;
+ (void)context ;
+ (void)ret ;
+
+ switch(CyAsLLRequestResponse_GetCode(req_p))
+ {
+ case CY_RQT_MEDIA_CHANGED:
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_STORAGE_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+
+ /* Media has either been inserted or removed */
+ addr = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+
+ bus = CyAsStorageGetBusFromAddress(addr);
+ device = CyAsStorageGetDeviceFromAddress(addr);
+
+ /* Clear the entry for this device to force re-query later */
+ CyAsHalMemSet(&(dev_p->storage_device_info[bus][device]), 0,
+ sizeof(dev_p->storage_device_info[bus][device])) ;
+
+ val = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ if (dev_p->storage_event_cb_ms)
+ {
+ if (val == 1)
+ dev_p->storage_event_cb_ms(h, bus, device, CyAsStorageRemoved, 0) ;
+ else
+ dev_p->storage_event_cb_ms(h, bus, device, CyAsStorageInserted, 0) ;
+ }
+ else if (dev_p->storage_event_cb)
+ {
+ if (val == 1)
+ dev_p->storage_event_cb(h, (CyAsMediaType)bus, CyAsStorageRemoved, 0) ; /*nxz*/
+ else
+ dev_p->storage_event_cb(h, (CyAsMediaType)bus, CyAsStorageInserted, 0) ; /*nxz*/
+ }
+
+ break ;
+
+ case CY_RQT_ANTIOCH_CLAIM:
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_STORAGE_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ if (dev_p->storage_event_cb || dev_p->storage_event_cb_ms)
+ {
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ if (dev_p->storage_event_cb_ms)
+ {
+ if (val & 0x0100)
+ dev_p->storage_event_cb_ms(h, 0, 0, CyAsStorageAntioch, 0) ;
+ if (val & 0x0200)
+ dev_p->storage_event_cb_ms(h, 1, 0, CyAsStorageAntioch, 0) ;
+ }
+ else
+ {
+ if (val & 0x01)
+ dev_p->storage_event_cb(h, CyAsMediaNand, CyAsStorageAntioch, 0) ;
+ if (val & 0x02)
+ dev_p->storage_event_cb(h, CyAsMediaSDFlash, CyAsStorageAntioch, 0) ;
+ if (val & 0x04)
+ dev_p->storage_event_cb(h, CyAsMediaMMCFlash, CyAsStorageAntioch, 0) ;
+ if (val & 0x08)
+ dev_p->storage_event_cb(h, CyAsMediaCEATA, CyAsStorageAntioch, 0) ;
+ }
+ }
+ break ;
+
+ case CY_RQT_ANTIOCH_RELEASE:
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_STORAGE_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ if (dev_p->storage_event_cb_ms)
+ {
+ if (val & 0x0100)
+ dev_p->storage_event_cb_ms(h, 0, 0, CyAsStorageProcessor, 0) ;
+ if (val & 0x0200)
+ dev_p->storage_event_cb_ms(h, 1, 0, CyAsStorageProcessor, 0) ;
+ }
+ else if (dev_p->storage_event_cb)
+ {
+ if (val & 0x01)
+ dev_p->storage_event_cb(h, CyAsMediaNand, CyAsStorageProcessor, 0) ;
+ if (val & 0x02)
+ dev_p->storage_event_cb(h, CyAsMediaSDFlash, CyAsStorageProcessor, 0) ;
+ if (val & 0x04)
+ dev_p->storage_event_cb(h, CyAsMediaMMCFlash, CyAsStorageProcessor, 0) ;
+ if (val & 0x08)
+ dev_p->storage_event_cb(h, CyAsMediaCEATA, CyAsStorageProcessor, 0) ;
+ }
+ break ;
+
+
+ case CY_RQT_SDIO_INTR:
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_STORAGE_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ if (dev_p->storage_event_cb_ms)
+ {
+ if (val & 0x0100)
+ dev_p->storage_event_cb_ms(h, 1, 0, CyAsSdioInterrupt, 0) ;
+ else
+ dev_p->storage_event_cb_ms(h, 0, 0, CyAsSdioInterrupt, 0) ;
+
+ }
+ else if (dev_p->storage_event_cb)
+ {
+ dev_p->storage_event_cb(h, CyAsMediaSDIO, CyAsSdioInterrupt, 0) ;
+ }
+ break;
+
+ case CY_RQT_P2S_DMA_START:
+ /* Do the DMA setup for the waiting operation. This event is used only in
+ * the MTP mode firmware. */
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_STORAGE_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ if (dev_p->storage_oper == CyAsOpRead)
+ {
+ ep_p = CY_AS_NUM_EP(dev_p, CY_AS_P2S_READ_ENDPOINT) ;
+ CyAsDmaEndPointSetStopped(ep_p) ;
+ CyAsDmaKickStart(dev_p, CY_AS_P2S_READ_ENDPOINT) ;
+ }
+ else
+ {
+ ep_p = CY_AS_NUM_EP(dev_p, CY_AS_P2S_WRITE_ENDPOINT) ;
+ CyAsDmaEndPointSetStopped(ep_p) ;
+ CyAsDmaKickStart(dev_p, CY_AS_P2S_WRITE_ENDPOINT) ;
+ }
+ break ;
+
+ default:
+ CyAsHalPrintMessage("Invalid request received on storage context\n") ;
+ val = req_p->box0 ;
+ CyAsLLSendDataResponse(dev_p, CY_RQT_STORAGE_RQT_CONTEXT, CY_RESP_INVALID_REQUEST, sizeof(val), &val) ;
+ break ;
+ }
+}
+
+static CyAsReturnStatus_t
+IsStorageActive(CyAsDevice *dev_p)
+{
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (dev_p->storage_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+CyAsStorageFuncCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret) ;
+
+static CyAsReturnStatus_t
+MyHandleResponseNoData(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseStorageStart(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (dev_p->storage_count > 0 && ret == CY_AS_ERROR_ALREADY_RUNNING)
+ ret = CY_AS_ERROR_SUCCESS ;
+
+ ret = CyAsDmaEnableEndPoint(dev_p, CY_AS_P2S_WRITE_ENDPOINT, CyTrue, CyAsDirectionIn) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = CyAsDmaSetMaxDmaSize(dev_p, CY_AS_P2S_WRITE_ENDPOINT, CY_AS_STORAGE_EP_SIZE) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = CyAsDmaEnableEndPoint(dev_p, CY_AS_P2S_READ_ENDPOINT, CyTrue, CyAsDirectionOut) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = CyAsDmaSetMaxDmaSize(dev_p, CY_AS_P2S_READ_ENDPOINT, CY_AS_STORAGE_EP_SIZE) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_STORAGE_RQT_CONTEXT, MyStorageRequestCallback) ;
+
+ /* Create the request/response used for storage reads and writes. */
+ dev_p->storage_rw_req_p = CyAsLLCreateRequest(dev_p, 0, CY_RQT_STORAGE_RQT_CONTEXT, 5) ;
+ if (dev_p->storage_rw_req_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY;
+ goto destroy;
+ }
+
+ dev_p->storage_rw_resp_p = CyAsLLCreateResponse(dev_p, 5) ;
+ if (dev_p->storage_rw_resp_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, dev_p->storage_rw_req_p) ;
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ /* Increment the storage count only if the above functionality succeeds.*/
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (dev_p->storage_count == 0)
+ {
+ CyAsHalMemSet(dev_p->storage_device_info, 0, sizeof(dev_p->storage_device_info)) ;
+ dev_p->is_storage_only_mode = CyFalse ;
+ }
+
+ dev_p->storage_count++ ;
+ }
+
+ CyAsDeviceClearSSSPending(dev_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageStart(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if(CyAsDeviceIsSSSPending(dev_p))
+ return CY_AS_ERROR_STARTSTOP_PENDING ;
+
+ CyAsDeviceSetSSSPending(dev_p) ;
+
+ if (dev_p->storage_count == 0)
+ {
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_START_STORAGE, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ {
+ CyAsDeviceClearSSSPending(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsDeviceClearSSSPending(dev_p) ;
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseStorageStart(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_START,
+ 0, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the FuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+ else
+ {
+ dev_p->storage_count++ ;
+ if (cb)
+ cb(handle, ret, client, CY_FUNCT_CB_STOR_START, 0) ;
+ }
+
+ CyAsDeviceClearSSSPending(dev_p) ;
+
+ return ret ;
+}
+
+
+static CyAsReturnStatus_t
+MyHandleResponseStorageStop(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ CyAsLLDestroyRequest(dev_p, dev_p->storage_rw_req_p) ;
+ CyAsLLDestroyResponse(dev_p, dev_p->storage_rw_resp_p) ;
+ dev_p->storage_count-- ;
+ }
+
+ CyAsDeviceClearSSSPending(dev_p) ;
+
+ return ret ;
+}
+CyAsReturnStatus_t
+CyAsStorageStop(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsStorageAsyncPending(dev_p))
+ return CY_AS_ERROR_ASYNC_PENDING ;
+
+ if(CyAsDeviceIsSSSPending(dev_p))
+ return CY_AS_ERROR_STARTSTOP_PENDING ;
+
+ CyAsDeviceSetSSSPending(dev_p) ;
+
+ if (dev_p->storage_count == 1)
+ {
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_STOP_STORAGE, CY_RQT_STORAGE_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ {
+ CyAsDeviceClearSSSPending(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsDeviceClearSSSPending(dev_p) ;
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseStorageStop(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_STOP,
+ 0, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+ else if(dev_p->storage_count > 1)
+ {
+ dev_p->storage_count-- ;
+ if (cb)
+ cb(handle, ret, client, CY_FUNCT_CB_STOR_STOP, 0) ;
+ }
+
+ CyAsDeviceClearSSSPending(dev_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageRegisterCallback(CyAsDeviceHandle handle, CyAsStorageEventCallback callback)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (dev_p->storage_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ dev_p->storage_event_cb = NULL ;
+ dev_p->storage_event_cb_ms = callback ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+
+
+static CyAsReturnStatus_t
+MyHandleResponseStorageClaim(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_NO_SUCH_ADDRESS)
+ {
+ ret = CyAsMapBadAddr(CyAsLLRequestResponse_GetWord(reply_p, 3)) ;
+ goto destroy ;
+ }
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_MEDIA_CLAIMED_RELEASED)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ /* The response must be about the address I am trying to claim or the firmware is broken */
+ if ((CyAsStorageGetBusFromAddress(CyAsLLRequestResponse_GetWord(req_p, 0)) !=
+ CyAsStorageGetBusFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 0))) ||
+ (CyAsStorageGetDeviceFromAddress(CyAsLLRequestResponse_GetWord(req_p, 0)) !=
+ CyAsStorageGetDeviceFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 0))))
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ if (CyAsLLRequestResponse_GetWord(reply_p, 1) != 1)
+ ret = CY_AS_ERROR_NOT_ACQUIRED ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyStorageClaim(CyAsDevice *dev_p,
+ void* data,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint16_t req_flags,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if(dev_p->mtp_count > 0)
+ return CY_AS_ERROR_NOT_VALID_IN_MTP ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_CLAIM_STORAGE, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, device, 0)) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 4) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseStorageClaim(dev_p, req_p, reply_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_CLAIM,
+ data, dev_p->func_cbs_stor, req_flags,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageClaim(CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ return MyStorageClaim(dev_p, NULL, bus, device, CY_AS_REQUEST_RESPONSE_MS, cb, client) ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseStorageRelease(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_NO_SUCH_ADDRESS)
+ {
+ ret = CyAsMapBadAddr(CyAsLLRequestResponse_GetWord(reply_p, 3)) ;
+ goto destroy ;
+ }
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_MEDIA_CLAIMED_RELEASED)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ /* The response must be about the address I am trying to release or the firmware is broken */
+ if ((CyAsStorageGetBusFromAddress(CyAsLLRequestResponse_GetWord(req_p, 0)) !=
+ CyAsStorageGetBusFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 0))) ||
+ (CyAsStorageGetDeviceFromAddress(CyAsLLRequestResponse_GetWord(req_p, 0)) !=
+ CyAsStorageGetDeviceFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 0))))
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+
+ if (CyAsLLRequestResponse_GetWord(reply_p, 1) != 0)
+ ret = CY_AS_ERROR_NOT_RELEASED ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyStorageRelease(CyAsDevice* dev_p,
+ void* data,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint16_t req_flags,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if(dev_p->mtp_count > 0)
+ return CY_AS_ERROR_NOT_VALID_IN_MTP ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_RELEASE_STORAGE, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, device, 0)) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 4) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseStorageRelease(dev_p, req_p, reply_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_RELEASE,
+ data, dev_p->func_cbs_stor, req_flags,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageRelease(CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ return MyStorageRelease(dev_p, NULL, bus, device, CY_AS_REQUEST_RESPONSE_MS, cb, client) ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseStorageQueryBus(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ uint32_t* count)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t code = CyAsLLRequestResponse_GetCode(reply_p) ;
+ uint16_t v ;
+
+ if (code == CY_RESP_NO_SUCH_ADDRESS)
+ {
+ ret = CY_AS_ERROR_NO_SUCH_BUS ;
+ goto destroy ;
+ }
+
+ if (code != CY_RESP_BUS_DESCRIPTOR)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ /*
+ * Verify that the response corresponds to the bus that was queried.
+ */
+ if (CyAsStorageGetBusFromAddress(CyAsLLRequestResponse_GetWord(req_p, 0)) !=
+ CyAsStorageGetBusFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 0)))
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ v = CyAsLLRequestResponse_GetWord(reply_p, 1) ;
+ if (req_p->flags & CY_AS_REQUEST_RESPONSE_MS)
+ {
+ /*
+ * This request is only for the count of devices on the bus. There
+ * is no need to check the media type.
+ */
+ if (v)
+ *count = 1 ;
+ else
+ *count = 0 ;
+ }
+ else
+ {
+ /*
+ * This request is for the count of devices of a particular type. We need
+ * to check whether the media type found matches the queried type.
+ */
+ CyAsMediaType queried = (CyAsMediaType)CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ CyAsMediaType found = CyAsStorageGetMediaFromAddress(v) ;
+
+ if (queried == found)
+ *count = 1 ;
+ else
+ *count = 0 ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+MyStorageQueryBus(CyAsDevice *dev_p,
+ CyAsBusNumber_t bus,
+ CyAsMediaType type,
+ uint16_t req_flags,
+ uint32_t *count,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsFunctCBType cbType = CY_FUNCT_CB_STOR_QUERYBUS ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Create the request to send to the Antioch device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_QUERY_BUS, CY_RQT_STORAGE_RQT_CONTEXT, 2) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, 0, 0)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)type) ;
+
+ /* Reserve space for the reply, the reply data will not exceed two words. */
+ reply_p = CyAsLLCreateResponse(dev_p, 2) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ req_p->flags |= req_flags;
+ return MyHandleResponseStorageQueryBus(dev_p, req_p, reply_p, count) ;
+ }
+ else
+ {
+ if (req_flags == CY_AS_REQUEST_RESPONSE_EX)
+ cbType = CY_FUNCT_CB_STOR_QUERYMEDIA ;
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, cbType,
+ count, dev_p->func_cbs_stor, req_flags,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageQueryBus(CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t *count,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ return MyStorageQueryBus(dev_p, bus, CyAsMediaMaxMediaValue, CY_AS_REQUEST_RESPONSE_MS,
+ count, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageQueryMedia(CyAsDeviceHandle handle,
+ CyAsMediaType type,
+ uint32_t *count,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsBusNumber_t bus ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, type, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return MyStorageQueryBus(dev_p, bus, type, CY_AS_REQUEST_RESPONSE_EX,
+ count, cb, client) ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseStorageQueryDevice(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ void* data_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint16_t v ;
+ CyAsBusNumber_t bus ;
+ CyAsMediaType type ;
+ uint32_t device ;
+ CyBool removable ;
+ CyBool writeable ;
+ CyBool locked ;
+ uint16_t block_size ;
+ uint32_t number_units ;
+ uint32_t number_eus ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_NO_SUCH_ADDRESS)
+ {
+ ret = CyAsMapBadAddr(CyAsLLRequestResponse_GetWord(reply_p, 3)) ;
+ goto destroy ;
+ }
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_DEVICE_DESCRIPTOR)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ /* Unpack the response */
+ v = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ type = CyAsStorageGetMediaFromAddress(v) ;
+ bus = CyAsStorageGetBusFromAddress(v) ;
+ device = CyAsStorageGetDeviceFromAddress(v) ;
+
+ block_size = CyAsLLRequestResponse_GetWord(reply_p, 1) ;
+
+ v = CyAsLLRequestResponse_GetWord(reply_p, 2) ;
+ removable = (v & 0x8000) ? CyTrue : CyFalse ;
+ writeable = (v & 0x0100) ? CyTrue : CyFalse ;
+ locked = (v & 0x0200) ? CyTrue : CyFalse ;
+ number_units = (v & 0xff) ;
+
+ number_eus = (CyAsLLRequestResponse_GetWord(reply_p, 3) << 16) | CyAsLLRequestResponse_GetWord(reply_p, 4) ;
+
+ /* Store the results based on the version of originating function */
+ if (req_p->flags & CY_AS_REQUEST_RESPONSE_MS)
+ {
+ CyAsStorageQueryDeviceData *store_p = (CyAsStorageQueryDeviceData*)data_p ;
+
+ /* Make sure the response is about the address we asked about - if not, firmware error */
+ if ((bus != store_p->bus) || (device != store_p->device))
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ store_p->desc_p.type = type ;
+ store_p->desc_p.removable = removable ;
+ store_p->desc_p.writeable = writeable ;
+ store_p->desc_p.block_size = block_size ;
+ store_p->desc_p.number_units = number_units ;
+ store_p->desc_p.locked = locked ;
+ store_p->desc_p.erase_unit_size = number_eus ;
+ dev_p->storage_device_info[bus][device] = store_p->desc_p ;
+ }
+ else
+ {
+ CyAsStorageQueryDeviceData_dep *store_p = (CyAsStorageQueryDeviceData_dep*)data_p ;
+
+ /* Make sure the response is about the address we asked about - if not, firmware error */
+ if ((type != store_p->type) || (device != store_p->device))
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ store_p->desc_p.type = type ;
+ store_p->desc_p.removable = removable ;
+ store_p->desc_p.writeable = writeable ;
+ store_p->desc_p.block_size = block_size ;
+ store_p->desc_p.number_units = number_units ;
+ store_p->desc_p.locked = locked ;
+ store_p->desc_p.erase_unit_size = number_eus ;
+ dev_p->storage_device_info[bus][device] = store_p->desc_p ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyStorageQueryDevice(CyAsDevice *dev_p,
+ void* data_p,
+ uint16_t req_flags,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Create the request to send to the Antioch device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_QUERY_DEVICE, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, device, 0)) ;
+
+ /* Reserve space for the reply, the reply data will not exceed five words. */
+ reply_p = CyAsLLCreateResponse(dev_p, 5) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ req_p->flags |= req_flags;
+ return MyHandleResponseStorageQueryDevice(dev_p, req_p, reply_p, data_p) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_QUERYDEVICE,
+ data_p, dev_p->func_cbs_stor, req_flags,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageQueryDevice(CyAsDeviceHandle handle,
+ CyAsStorageQueryDeviceData* data_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ return MyStorageQueryDevice(dev_p, data_p, CY_AS_REQUEST_RESPONSE_MS, data_p->bus,
+ data_p->device, cb, client) ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseStorageQueryUnit(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ void* data_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsBusNumber_t bus ;
+ uint32_t device ;
+ uint32_t unit ;
+ CyAsMediaType type ;
+ uint16_t block_size ;
+ uint32_t start_block ;
+ uint32_t unit_size ;
+ uint16_t v ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_NO_SUCH_ADDRESS)
+ {
+ ret = CyAsMapBadAddr(CyAsLLRequestResponse_GetWord(reply_p, 3)) ;
+ goto destroy ;
+ }
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_UNIT_DESCRIPTOR)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ /* Unpack the response */
+ v = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ bus = CyAsStorageGetBusFromAddress(v) ;
+ device = CyAsStorageGetDeviceFromAddress(v) ;
+ unit = GetUnitFromAddress(v) ;
+
+ type = CyAsStorageGetMediaFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 1));
+
+ block_size = CyAsLLRequestResponse_GetWord(reply_p, 2) ;
+ start_block = CyAsLLRequestResponse_GetWord(reply_p, 3) | (CyAsLLRequestResponse_GetWord(reply_p, 4) << 16) ;
+ unit_size = CyAsLLRequestResponse_GetWord(reply_p, 5) | (CyAsLLRequestResponse_GetWord(reply_p, 6) << 16) ;
+
+ /* Store the results based on the version of originating function */
+ if (req_p->flags & CY_AS_REQUEST_RESPONSE_MS)
+ {
+ CyAsStorageQueryUnitData *store_p = (CyAsStorageQueryUnitData*)data_p ;
+
+ /* Make sure the response is about the address we asked about - if not, firmware error */
+ if (bus != store_p->bus || device != store_p->device || unit != store_p->unit)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ store_p->desc_p.type = type ;
+ store_p->desc_p.block_size = block_size ;
+ store_p->desc_p.start_block = start_block ;
+ store_p->desc_p.unit_size = unit_size ;
+ }
+ else
+ {
+ CyAsStorageQueryUnitData_dep *store_p = (CyAsStorageQueryUnitData_dep*)data_p ;
+
+ /* Make sure the response is about the media type we asked about - if not, firmware error */
+ if ((type != store_p->type) || (device != store_p->device) || (unit != store_p->unit) ) {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ store_p->desc_p.type = type ;
+ store_p->desc_p.block_size = block_size ;
+ store_p->desc_p.start_block = start_block ;
+ store_p->desc_p.unit_size = unit_size ;
+ }
+
+ dev_p->storage_device_info[bus][device].type = type ;
+ dev_p->storage_device_info[bus][device].block_size = block_size ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyStorageQueryUnit(CyAsDevice *dev_p,
+ void* data_p,
+ uint16_t req_flags,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint32_t unit,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_QUERY_UNIT, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ if (device > 255)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ if (unit > 255)
+ return CY_AS_ERROR_NO_SUCH_UNIT ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, device, (uint8_t)unit)) ;
+
+ /* Reserve space for the reply, the reply data will be of seven words. */
+ reply_p = CyAsLLCreateResponse(dev_p, 7) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ req_p->flags |= req_flags ;
+ return MyHandleResponseStorageQueryUnit(dev_p, req_p, reply_p, data_p) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_QUERYUNIT,
+ data_p, dev_p->func_cbs_stor, req_flags,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageQueryUnit(CyAsDeviceHandle handle,
+ CyAsStorageQueryUnitData* data_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ return MyStorageQueryUnit(dev_p, data_p, CY_AS_REQUEST_RESPONSE_MS, data_p->bus,
+ data_p->device, data_p->unit, cb, client) ;
+}
+
+
+static CyAsReturnStatus_t
+CyAsGetBlockSize(CyAsDevice *dev_p,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsFunctionCallback cb)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_QUERY_DEVICE, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, device, 0)) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 4) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_NO_SUCH_ADDRESS)
+ {
+ ret = CY_AS_ERROR_NO_SUCH_BUS ;
+ goto destroy ;
+ }
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_DEVICE_DESCRIPTOR)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ /* Make sure the response is about the media type we asked about - if not, firmware error */
+ if ((CyAsStorageGetBusFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 0)) != bus) ||
+ (CyAsStorageGetDeviceFromAddress(CyAsLLRequestResponse_GetWord(reply_p, 0)) != device) )
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+
+ dev_p->storage_device_info[bus][device].block_size = CyAsLLRequestResponse_GetWord(reply_p, 1) ;
+ }
+ else
+ ret = CY_AS_ERROR_INVALID_REQUEST ;
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+MyStorageDeviceControl(
+ CyAsDevice *dev_p,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyBool card_detect_en,
+ CyBool write_prot_en,
+ CyAsStorageCardDetect config_detect,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret ;
+ CyBool use_gpio = CyFalse ;
+
+ (void)device ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ if (device >= CY_AS_MAX_STORAGE_DEVICES)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ /* If SD is not supported on the specified bus, then return ERROR */
+ if((dev_p->media_supported[bus] ==0 ) || (dev_p->media_supported[bus] &(1<<CyAsMediaNand)))
+ return CY_AS_ERROR_NOT_SUPPORTED;
+
+ if(config_detect == CyAsStorageDetect_GPIO)
+ use_gpio = CyTrue ;
+ else if(config_detect == CyAsStorageDetect_SDAT_3)
+ use_gpio = CyFalse ;
+ else
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SD_INTERFACE_CONTROL, CY_RQT_STORAGE_RQT_CONTEXT, 2) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, device, 0)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (((uint16_t)card_detect_en << 8) | ((uint16_t)use_gpio << 1) | (uint16_t)write_prot_en)) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+ else
+ {
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_DEVICECONTROL,
+ 0, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageDeviceControl(CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyBool card_detect_en,
+ CyBool write_prot_en,
+ CyAsStorageCardDetect config_detect,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ return MyStorageDeviceControl(dev_p, bus, device, card_detect_en, write_prot_en, config_detect, cb, client);
+}
+
+static void
+CyAsAsyncStorageCallback(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *buf_p, uint32_t size, CyAsReturnStatus_t ret)
+{
+ CyAsStorageCallback_dep cb ;
+ CyAsStorageCallback cb_ms ;
+
+ (void)size ;
+ (void)buf_p ;
+ (void)ep ;
+
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+
+ /*
+ * If the LL request callback has already been called, the user
+ * callback has to be called from here.
+ */
+ if (!dev_p->storage_wait)
+ {
+ CyAsHalAssert(dev_p->storage_cb != NULL || dev_p->storage_cb_ms != NULL) ;
+ cb = dev_p->storage_cb ;
+ cb_ms = dev_p->storage_cb_ms ;
+
+ dev_p->storage_cb = 0 ;
+ dev_p->storage_cb_ms = 0 ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ ret = dev_p->storage_error ;
+
+ if (cb_ms)
+ {
+ cb_ms((CyAsDeviceHandle)dev_p, dev_p->storage_bus_index, dev_p->storage_device_index,
+ dev_p->storage_unit, dev_p->storage_block_addr, dev_p->storage_oper, ret) ;
+ }
+ else
+ {
+ cb((CyAsDeviceHandle)dev_p,
+ dev_p->storage_device_info[dev_p->storage_bus_index][dev_p->storage_device_index].type,
+ dev_p->storage_device_index, dev_p->storage_unit, dev_p->storage_block_addr, dev_p->storage_oper, ret) ;
+ }
+ }
+ else
+ dev_p->storage_error = ret ;
+}
+
+static void
+CyAsAsyncStorageReplyCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ CyAsStorageCallback_dep cb ;
+ CyAsStorageCallback cb_ms ;
+ uint8_t reqtype ;
+ (void)rqt ;
+ (void)context ;
+
+ reqtype = CyAsLLRequestResponse_GetCode(rqt) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (CyAsLLRequestResponse_GetCode(resp) == CY_RESP_ANTIOCH_DEFERRED_ERROR)
+ {
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) & 0x00FF ;
+ }
+ else if (CyAsLLRequestResponse_GetCode(resp) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ }
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ if(reqtype == CY_RQT_READ_BLOCK)
+ CyAsDmaCancel(dev_p, dev_p->storage_read_endpoint, ret) ;
+ else
+ CyAsDmaCancel(dev_p, dev_p->storage_write_endpoint, ret) ;
+ }
+
+ dev_p->storage_wait = CyFalse ;
+
+ /*
+ * If the DMA callback has already been called, the user callback
+ * has to be called from here.
+ */
+ if (!CyAsDeviceIsStorageAsyncPending(dev_p))
+ {
+ CyAsHalAssert(dev_p->storage_cb != NULL || dev_p->storage_cb_ms != NULL) ;
+ cb = dev_p->storage_cb ;
+ cb_ms = dev_p->storage_cb_ms ;
+
+ dev_p->storage_cb = 0 ;
+ dev_p->storage_cb_ms = 0 ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ ret = dev_p->storage_error ;
+
+ if (cb_ms)
+ {
+ cb_ms((CyAsDeviceHandle)dev_p, dev_p->storage_bus_index, dev_p->storage_device_index,
+ dev_p->storage_unit, dev_p->storage_block_addr, dev_p->storage_oper, ret) ;
+ }
+ else
+ {
+ cb((CyAsDeviceHandle)dev_p,
+ dev_p->storage_device_info[dev_p->storage_bus_index][dev_p->storage_device_index].type,
+ dev_p->storage_device_index, dev_p->storage_unit, dev_p->storage_block_addr, dev_p->storage_oper, ret) ;
+ }
+ }
+ else
+ dev_p->storage_error = ret ;
+}
+
+static CyAsReturnStatus_t
+CyAsStorageAsyncOper(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, uint8_t reqtype, uint16_t req_flags,
+ CyAsBusNumber_t bus, uint32_t device, uint32_t unit,
+ uint32_t block, void *data_p, uint16_t num_blocks,
+ CyAsStorageCallback_dep callback, CyAsStorageCallback callback_ms)
+{
+ uint32_t mask ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ if (device >= CY_AS_MAX_STORAGE_DEVICES)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ if (unit > 255)
+ return CY_AS_ERROR_NO_SUCH_UNIT ;
+
+ /* We are supposed to return sucess if the number of
+ * blocks is zero
+ */
+ if (num_blocks == 0)
+ {
+ if (callback_ms)
+ callback_ms((CyAsDeviceHandle)dev_p, bus, device, unit, block,
+ ((reqtype == CY_RQT_WRITE_BLOCK) ? CyAsOpWrite : CyAsOpRead),
+ CY_AS_ERROR_SUCCESS) ;
+ else
+ callback((CyAsDeviceHandle)dev_p, dev_p->storage_device_info[bus][device].type,
+ device, unit, block, ((reqtype == CY_RQT_WRITE_BLOCK) ? CyAsOpWrite : CyAsOpRead),
+ CY_AS_ERROR_SUCCESS) ;
+
+ return CY_AS_ERROR_SUCCESS ;
+ }
+
+ if (dev_p->storage_device_info[bus][device].block_size == 0)
+ return CY_AS_ERROR_QUERY_DEVICE_NEEDED ;
+
+ /*
+ * Since async operations can be triggered by interrupt code, we must
+ * insure that we do not get multiple async operations going at one time and
+ * protect this test and set operation from interrupts.
+ * Also need to check for pending Async MTP writes
+ */
+ mask = CyAsHalDisableInterrupts() ;
+ if ((CyAsDeviceIsStorageAsyncPending(dev_p)) || (dev_p->storage_wait) || (CyAsDeviceIsUsbAsyncPending(dev_p, 6)))
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ return CY_AS_ERROR_ASYNC_PENDING ;
+ }
+
+ CyAsDeviceSetStorageAsyncPending(dev_p) ;
+ CyAsHalEnableInterrupts(mask) ;
+
+ /*
+ * Storage information about the currently outstanding request
+ */
+ dev_p->storage_cb = callback ;
+ dev_p->storage_cb_ms = callback_ms ;
+ dev_p->storage_bus_index = bus ;
+ dev_p->storage_device_index = device ;
+ dev_p->storage_unit = unit ;
+ dev_p->storage_block_addr = block ;
+
+ /* Initialise the request to send to the West Bridge. */
+ req_p = dev_p->storage_rw_req_p ;
+ CyAsLLInitRequest(req_p, reqtype, CY_RQT_STORAGE_RQT_CONTEXT, 5) ;
+
+ /* Initialise the space for reply from the West Bridge. */
+ reply_p = dev_p->storage_rw_resp_p ;
+ CyAsLLInitResponse(reply_p, 5) ;
+
+ /* Remember which version of the API originated the request */
+ req_p->flags |= req_flags ;
+
+ /* Setup the DMA request and adjust the storage operation if we are reading */
+ if (reqtype == CY_RQT_READ_BLOCK)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data_p, dev_p->storage_device_info[bus][device].block_size * num_blocks,
+ CyFalse, CyTrue, CyAsAsyncStorageCallback) ;
+ dev_p->storage_oper = CyAsOpRead ;
+ }
+ else if (reqtype == CY_RQT_WRITE_BLOCK)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data_p, dev_p->storage_device_info[bus][device].block_size * num_blocks,
+ CyFalse, CyFalse, CyAsAsyncStorageCallback) ;
+ dev_p->storage_oper = CyAsOpWrite ;
+ }
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+ return ret ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, (uint8_t)unit)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((block >> 16) & 0xffff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(block & 0xffff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 3, (uint16_t)((num_blocks >> 8) & 0x00ff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 4, (uint16_t)((num_blocks << 8) & 0xff00)) ;
+
+ /* Set the burst mode flag. */
+ if (dev_p->is_storage_only_mode)
+ req_p->data[4] |= 0x0001;
+
+ /* Send the request and wait for completion of storage request */
+ dev_p->storage_wait = CyTrue ;
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyTrue, CyAsAsyncStorageReplyCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_CANCELED) ;
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+ }
+
+ return ret ;
+}
+
+static void
+CyAsSyncStorageCallback(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *buf_p, uint32_t size, CyAsReturnStatus_t err)
+{
+ (void)ep ;
+ (void)buf_p ;
+ (void)size ;
+
+ dev_p->storage_error = err ;
+}
+
+static void
+CyAsSyncStorageReplyCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ uint8_t reqtype ;
+ (void)rqt ;
+
+ reqtype = CyAsLLRequestResponse_GetCode(rqt) ;
+
+ if (CyAsLLRequestResponse_GetCode(resp) == CY_RESP_ANTIOCH_DEFERRED_ERROR)
+ {
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) & 0x00FF ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ if(reqtype == CY_RQT_READ_BLOCK)
+ CyAsDmaCancel(dev_p, dev_p->storage_read_endpoint, ret) ;
+ else
+ CyAsDmaCancel(dev_p, dev_p->storage_write_endpoint, ret) ;
+ }
+ }
+ else if (CyAsLLRequestResponse_GetCode(resp) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+
+ dev_p->storage_wait = CyFalse ;
+ dev_p->storage_error = ret ;
+
+ /* Wake any threads/processes that are waiting on the read/write completion. */
+ CyAsHalWake (&dev_p->context[context]->channel) ;
+}
+
+static CyAsReturnStatus_t
+CyAsStorageSyncOper(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, uint8_t reqtype, CyAsBusNumber_t bus, uint32_t device,
+ uint32_t unit, uint32_t block, void *data_p, uint16_t num_blocks)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsContext *ctxt_p ;
+ uint32_t loopcount = 200 ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ if (device >= CY_AS_MAX_STORAGE_DEVICES)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ if (unit > 255)
+ return CY_AS_ERROR_NO_SUCH_UNIT ;
+
+ if ((CyAsDeviceIsStorageAsyncPending(dev_p)) || (dev_p->storage_wait))
+ return CY_AS_ERROR_ASYNC_PENDING ;
+
+ /* Also need to check for pending Async MTP writes */
+ if(CyAsDeviceIsUsbAsyncPending(dev_p, 6))
+ return CY_AS_ERROR_ASYNC_PENDING ;
+
+ /* We are supposed to return sucess if the number of
+ * blocks is zero
+ */
+ if (num_blocks == 0)
+ return CY_AS_ERROR_SUCCESS ;
+
+ if (dev_p->storage_device_info[bus][device].block_size == 0)
+ {
+ /*
+ * Normally, a given device has been queried via the query device call before a
+ * read request is issued. Therefore, this normally will not be run.
+ */
+ ret = CyAsGetBlockSize(dev_p, bus, device, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+
+ /* Initialise the request to send to the West Bridge. */
+ req_p = dev_p->storage_rw_req_p ;
+ CyAsLLInitRequest(req_p, reqtype, CY_RQT_STORAGE_RQT_CONTEXT, 5) ;
+
+ /* Initialise the space for reply from the West Bridge. */
+ reply_p = dev_p->storage_rw_resp_p ;
+ CyAsLLInitResponse(reply_p, 5) ;
+
+ /* Setup the DMA request */
+ if (reqtype == CY_RQT_READ_BLOCK)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data_p, dev_p->storage_device_info[bus][device].block_size * num_blocks, CyFalse,
+ CyTrue, CyAsSyncStorageCallback) ;
+ dev_p->storage_oper = CyAsOpRead ;
+ }
+ else if (reqtype == CY_RQT_WRITE_BLOCK)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data_p, dev_p->storage_device_info[bus][device].block_size * num_blocks, CyFalse,
+ CyFalse, CyAsSyncStorageCallback) ;
+ dev_p->storage_oper = CyAsOpWrite ;
+ }
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ return ret ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, (uint8_t)unit)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((block >> 16) & 0xffff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(block & 0xffff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 3, (uint16_t)((num_blocks >> 8) & 0x00ff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 4, (uint16_t)((num_blocks << 8) & 0xff00)) ;
+
+ /* Set the burst mode flag. */
+ if (dev_p->is_storage_only_mode)
+ req_p->data[4] |= 0x0001;
+
+ /* Send the request and wait for completion of storage request */
+ dev_p->storage_wait = CyTrue ;
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyTrue, CyAsSyncStorageReplyCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_CANCELED) ;
+ }
+ else
+ {
+ /* Setup the DMA request */
+ ctxt_p = dev_p->context[CY_RQT_STORAGE_RQT_CONTEXT] ;
+ ret = CyAsDmaDrainQueue(dev_p, ep, CyFalse) ;
+
+ while (loopcount-- > 0)
+ {
+ if (dev_p->storage_wait == CyFalse)
+ break ;
+ CyAsHalSleepOn(&ctxt_p->channel, 10) ;
+ }
+
+ if (dev_p->storage_wait == CyTrue)
+ {
+ dev_p->storage_wait = CyFalse ;
+ CyAsLLRemoveRequest(dev_p, ctxt_p, req_p, CyTrue) ;
+ ret = CY_AS_ERROR_TIMEOUT ;
+ }
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ ret = dev_p->storage_error ;
+ }
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageRead(CyAsDeviceHandle handle, CyAsBusNumber_t bus, uint32_t device, uint32_t unit, uint32_t block,
+ void *data_p, uint16_t num_blocks)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ return CyAsStorageSyncOper(dev_p, dev_p->storage_read_endpoint, CY_RQT_READ_BLOCK, bus, device,
+ unit, block, data_p, num_blocks) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageWrite(CyAsDeviceHandle handle, CyAsBusNumber_t bus, uint32_t device, uint32_t unit, uint32_t block,
+ void *data_p, uint16_t num_blocks)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if(dev_p->mtp_turbo_active)
+ return CY_AS_ERROR_NOT_VALID_DURING_MTP ;
+
+ return CyAsStorageSyncOper(dev_p, dev_p->storage_write_endpoint, CY_RQT_WRITE_BLOCK, bus, device,
+ unit, block, data_p, num_blocks) ;
+}
+
+
+CyAsReturnStatus_t
+CyAsStorageReadAsync(CyAsDeviceHandle handle, CyAsBusNumber_t bus, uint32_t device, uint32_t unit,
+ uint32_t block, void *data_p, uint16_t num_blocks, CyAsStorageCallback callback)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (callback == 0)
+ return CY_AS_ERROR_NULL_CALLBACK ;
+
+ return CyAsStorageAsyncOper(dev_p, dev_p->storage_read_endpoint, CY_RQT_READ_BLOCK,
+ CY_AS_REQUEST_RESPONSE_MS, bus, device, unit, block, data_p, num_blocks, NULL, callback);
+}
+
+CyAsReturnStatus_t
+CyAsStorageWriteAsync(CyAsDeviceHandle handle, CyAsBusNumber_t bus, uint32_t device, uint32_t unit,
+ uint32_t block, void *data_p, uint16_t num_blocks, CyAsStorageCallback callback)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (callback == 0)
+ return CY_AS_ERROR_NULL_CALLBACK ;
+
+ if(dev_p->mtp_turbo_active)
+ return CY_AS_ERROR_NOT_VALID_DURING_MTP ;
+
+ return CyAsStorageAsyncOper(dev_p, dev_p->storage_write_endpoint, CY_RQT_WRITE_BLOCK,
+ CY_AS_REQUEST_RESPONSE_MS, bus, device, unit, block, data_p, num_blocks, NULL, callback);
+}
+
+
+static void
+MyStorageCancelCallback (
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t stat)
+{
+ (void)context ;
+ (void)stat ;
+
+ /* Nothing to do here, except free up the request and response structures. */
+ CyAsLLDestroyResponse(dev_p, resp) ;
+ CyAsLLDestroyRequest(dev_p, rqt) ;
+}
+
+
+CyAsReturnStatus_t
+CyAsStorageCancelAsync(CyAsDeviceHandle handle)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (!CyAsDeviceIsStorageAsyncPending(dev_p))
+ return CY_AS_ERROR_ASYNC_NOT_PENDING ;
+
+ /*
+ * Create and send a mailbox request to firmware asking it to abort processing
+ * of the current P2S operation. The rest of the cancel processing will be
+ * driven through the callbacks for the read/write call.
+ */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_ABORT_P2S_XFER, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, MyStorageCancelCallback) ;
+ if (ret)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+ * This function does all the API side clean-up associated with
+ * CyAsStorageStop, without any communication with the firmware.
+ */
+void CyAsStorageCleanup(CyAsDevice *dev_p)
+{
+ if (dev_p->storage_count)
+ {
+ CyAsLLDestroyRequest(dev_p, dev_p->storage_rw_req_p) ;
+ CyAsLLDestroyResponse(dev_p, dev_p->storage_rw_resp_p) ;
+ dev_p->storage_count = 0 ;
+ CyAsDeviceClearScsiMessages(dev_p) ;
+ CyAsHalMemSet(dev_p->storage_device_info, 0, sizeof(dev_p->storage_device_info)) ;
+
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+ dev_p->storage_cb = 0 ;
+ dev_p->storage_cb_ms = 0 ;
+ dev_p->storage_wait = CyFalse ;
+ }
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseSDRegRead(
+ CyAsDevice *dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsStorageSDRegReadData *info)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t resp_type, i ;
+ uint16_t resp_len ;
+ uint8_t length = info->length ;
+ uint8_t *data_p = info->buf_p ;
+
+ resp_type = CyAsLLRequestResponse_GetCode(reply_p) ;
+ if (resp_type == CY_RESP_SD_REGISTER_DATA)
+ {
+ uint16_t *resp_p = reply_p->data + 1 ;
+ uint16_t temp ;
+
+ resp_len = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ CyAsHalAssert(resp_len >= length) ;
+
+ /*
+ * Copy the values into the output buffer after doing the
+ * necessary bit shifting. The bit shifting is required because
+ * the data comes out of the West Bridge with a 6 bit offset.
+ */
+ i = 0 ;
+ while (length)
+ {
+ temp = ((resp_p[i] << 6) | (resp_p[i + 1] >> 10)) ;
+ i++ ;
+
+ *data_p++ = (uint8_t)(temp >> 8) ;
+ length-- ;
+
+ if (length)
+ {
+ *data_p++ = (uint8_t)(temp & 0xFF) ;
+ length-- ;
+ }
+ }
+ }
+ else
+ {
+ if (resp_type == CY_RESP_SUCCESS_FAILURE)
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageSDRegisterRead(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint8_t device,
+ CyAsSDCardRegType regType,
+ CyAsStorageSDRegReadData *data_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t length ;
+
+ /*
+ * Sanity checks required before sending the request to the
+ * firmware.
+ */
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (device >= CY_AS_MAX_STORAGE_DEVICES)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ if (regType > CyAsSDReg_CSD)
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ /* If SD/MMC media is not supported on the addressed bus, return error. */
+ if ((dev_p->media_supported[bus] & (1 << CyAsMediaSDFlash)) == 0)
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ /*
+ * Find the amount of data to be returned. This will be the minimum of
+ * the actual data length, and the length requested.
+ */
+ switch (regType)
+ {
+ case CyAsSDReg_OCR:
+ length = CY_AS_SD_REG_OCR_LENGTH ;
+ break ;
+
+ case CyAsSDReg_CID:
+ length = CY_AS_SD_REG_CID_LENGTH ;
+ break ;
+
+ case CyAsSDReg_CSD:
+ length = CY_AS_SD_REG_CSD_LENGTH ;
+ break ;
+
+ default:
+ length = 0 ;
+ CyAsHalAssert(0) ;
+ }
+
+ if (length < data_p->length)
+ data_p->length = length ;
+ length = data_p->length ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SD_REGISTER_READ, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (CreateAddress(bus, device, 0) | (uint16_t)regType)) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, CY_AS_SD_REG_MAX_RESP_LENGTH) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if (cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseSDRegRead(dev_p, req_p, reply_p, data_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_SDREGISTERREAD,
+ data_p, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the MiscFuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageCreatePPartition(
+ CyAsDeviceHandle handle, /* Handle to the device of interest */
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint32_t size, /* of P-port only partition in blocks */
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Partitions cannot be created or deleted while the USB stack is active. */
+ if (dev_p->usb_count)
+ return CY_AS_ERROR_USB_RUNNING ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_PARTITION_STORAGE, CY_RQT_STORAGE_RQT_CONTEXT, 3) ;
+ if (req_p == 0)
+ {
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, 0x00) );
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((size >> 16) & 0xffff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(size & 0xffff)) ;
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseNoData(dev_p, req_p, reply_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_PARTITION,
+ 0, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the FuncCallback */
+ return ret ;
+
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageRemovePPartition(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Partitions cannot be created or deleted while the USB stack is active. */
+ if (dev_p->usb_count)
+ return CY_AS_ERROR_USB_RUNNING ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_PARTITION_ERASE, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ {
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, 0x00) );
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseNoData(dev_p, req_p, reply_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_NODATA,
+ 0, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the FuncCallback */
+ return ret ;
+
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseGetTransferAmount(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsMSCProgressData *data)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t code = CyAsLLRequestResponse_GetCode(reply_p) ;
+ uint16_t v1, v2 ;
+
+ if (code != CY_RESP_TRANSFER_COUNT)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ v1 = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ v2 = CyAsLLRequestResponse_GetWord(reply_p, 1) ;
+ data->wr_count = (uint32_t)((v1 << 16) | v2) ;
+
+ v1 = CyAsLLRequestResponse_GetWord(reply_p, 2) ;
+ v2 = CyAsLLRequestResponse_GetWord(reply_p, 3) ;
+ data->rd_count = (uint32_t)((v1 << 16) | v2) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageGetTransferAmount(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsMSCProgressData *data_p,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* Check if the firmware image supports this feature. */
+ if ((dev_p->media_supported[0]) && (dev_p->media_supported[0] == (1 << CyAsMediaNand)))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_GET_TRANSFER_AMOUNT, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ {
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed four words. */
+ reply_p = CyAsLLCreateResponse(dev_p, 4) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, 0x00));
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseGetTransferAmount(dev_p, req_p, reply_p, data_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_GETTRANSFERAMOUNT,
+ (void *)data_p, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the FuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+
+}
+
+CyAsReturnStatus_t
+CyAsStorageErase(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint32_t erase_unit,
+ uint16_t num_erase_units,
+ CyAsFunctionCallback cb,
+ uint32_t client
+ )
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsStorageActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ if (device >= CY_AS_MAX_STORAGE_DEVICES)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ if (dev_p->storage_device_info[bus][device].block_size == 0)
+ return CY_AS_ERROR_QUERY_DEVICE_NEEDED ;
+
+ /* If SD is not supported on the specified bus, then return ERROR */
+ if(dev_p->storage_device_info[bus][device].type != CyAsMediaSDFlash)
+ return CY_AS_ERROR_NOT_SUPPORTED;
+
+ if (num_erase_units == 0)
+ return CY_AS_ERROR_SUCCESS ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_ERASE, CY_RQT_STORAGE_RQT_CONTEXT, 5) ;
+ if (req_p == 0)
+ {
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed four words. */
+ reply_p = CyAsLLCreateResponse(dev_p, 4) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, 0x00));
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((erase_unit >> 16) & 0xffff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(erase_unit & 0xffff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 3, (uint16_t)((num_erase_units >> 8) & 0x00ff)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 4, (uint16_t)((num_erase_units << 8) & 0xff00)) ;
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = MyHandleResponseNoData(dev_p, req_p, reply_p) ;
+
+ /* If error = "invalid response", this (very likely) means that we are not using the SD-only firmware module
+ which is the only one supporting StorageErase. In this case force a "non supported" error code */
+ if (ret == CY_AS_ERROR_INVALID_RESPONSE)
+ ret = CY_AS_ERROR_NOT_SUPPORTED;
+
+ return ret ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_STOR_ERASE,
+ 0, dev_p->func_cbs_stor, CY_AS_REQUEST_RESPONSE_EX,
+ req_p, reply_p, CyAsStorageFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* The request and response are freed as part of the FuncCallback */
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static void
+CyAsStorageFuncCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t stat)
+{
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)dev_p->func_cbs_stor->head_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyBool exRequest = (rqt->flags & CY_AS_REQUEST_RESPONSE_EX) == CY_AS_REQUEST_RESPONSE_EX ;
+ CyBool msRequest = (rqt->flags & CY_AS_REQUEST_RESPONSE_MS) == CY_AS_REQUEST_RESPONSE_MS ;
+ uint8_t code ;
+ uint8_t cntxt ;
+
+ CyAsHalAssert(exRequest || msRequest) ;
+ CyAsHalAssert(dev_p->func_cbs_stor->count != 0) ;
+ CyAsHalAssert(dev_p->func_cbs_stor->type == CYAS_FUNC_CB) ;
+ (void) exRequest;
+ (void) msRequest;
+
+ (void)context ;
+
+ cntxt = CyAsLLRequestResponse_GetContext(rqt) ;
+ CyAsHalAssert(cntxt == CY_RQT_STORAGE_RQT_CONTEXT) ;
+
+ code = CyAsLLRequestResponse_GetCode(rqt) ;
+ switch(code)
+ {
+ case CY_RQT_START_STORAGE:
+ ret = MyHandleResponseStorageStart(dev_p, rqt, resp, stat) ;
+ break ;
+ case CY_RQT_STOP_STORAGE:
+ ret = MyHandleResponseStorageStop(dev_p, rqt, resp, stat) ;
+ break ;
+ case CY_RQT_CLAIM_STORAGE:
+ ret = MyHandleResponseStorageClaim(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_RELEASE_STORAGE:
+ ret = MyHandleResponseStorageRelease(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_QUERY_MEDIA:
+ CyAsHalAssert(CyFalse) ; /* Not used any more. */
+ break ;
+ case CY_RQT_QUERY_BUS:
+ CyAsHalAssert(node->data != 0) ;
+ ret = MyHandleResponseStorageQueryBus(dev_p, rqt, resp, (uint32_t*)node->data) ;
+ break ;
+ case CY_RQT_QUERY_DEVICE:
+ CyAsHalAssert(node->data != 0) ;
+ ret = MyHandleResponseStorageQueryDevice(dev_p, rqt, resp, node->data) ;
+ break ;
+ case CY_RQT_QUERY_UNIT:
+ CyAsHalAssert(node->data != 0) ;
+ ret = MyHandleResponseStorageQueryUnit(dev_p, rqt, resp, node->data) ;
+ break ;
+ case CY_RQT_SD_INTERFACE_CONTROL:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_SD_REGISTER_READ:
+ CyAsHalAssert(node->data != 0) ;
+ ret = MyHandleResponseSDRegRead(dev_p, rqt, resp, (CyAsStorageSDRegReadData *)node->data) ;
+ break ;
+ case CY_RQT_PARTITION_STORAGE:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp);
+ break ;
+ case CY_RQT_PARTITION_ERASE:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_GET_TRANSFER_AMOUNT:
+ CyAsHalAssert(node->data != 0) ;
+ ret = MyHandleResponseGetTransferAmount(dev_p, rqt, resp, (CyAsMSCProgressData *)node->data) ;
+ break ;
+ case CY_RQT_ERASE:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+
+ /* If error = "invalid response", this (very likely) means that we are not using the SD-only firmware module
+ which is the only one supporting StorageErase. In this case force a "non supported" error code */
+ if (ret == CY_AS_ERROR_INVALID_RESPONSE)
+ ret = CY_AS_ERROR_NOT_SUPPORTED;
+
+ break ;
+
+ default:
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+
+ /*
+ * If the low level layer returns a direct error, use the corresponding error code.
+ * If not, use the error code based on the response from firmware.
+ */
+ if (stat == CY_AS_ERROR_SUCCESS)
+ stat = ret ;
+
+ /* Call the user callback, if there is one */
+ if (node->cb_p)
+ node->cb_p((CyAsDeviceHandle)dev_p, stat, node->client_data, (CyAsFunctCBType)node->dataType, node->data) ;
+ CyAsRemoveCBNode(dev_p->func_cbs_stor) ;
+}
+
+
+static void
+CyAsSdioSyncReplyCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ (void)rqt ;
+
+ if ((CyAsLLRequestResponse_GetCode(resp) == CY_RESP_SDIO_GET_TUPLE )||
+ (CyAsLLRequestResponse_GetCode(resp) == CY_RESP_SDIO_EXT))
+ {
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) ;
+ if ((ret & 0x00FF) != CY_AS_ERROR_SUCCESS)
+ {
+ if(CyAsLLRequestResponse_GetCode(rqt) == CY_RQT_SDIO_READ_EXTENDED)
+ CyAsDmaCancel(dev_p, dev_p->storage_read_endpoint, ret) ;
+ else
+ CyAsDmaCancel(dev_p, dev_p->storage_write_endpoint, ret) ;
+ }
+ }
+ else
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+
+ dev_p->storage_rw_resp_p=resp;
+ dev_p->storage_wait = CyFalse ;
+ if(((ret & 0x00FF) == CY_AS_ERROR_IO_ABORTED) || ((ret & 0x00FF) == CY_AS_ERROR_IO_SUSPENDED))
+ dev_p->storage_error = (ret & 0x00FF);
+ else
+ dev_p->storage_error = (ret & 0x00FF)? CY_AS_ERROR_INVALID_RESPONSE : CY_AS_ERROR_SUCCESS ;
+
+ /* Wake any threads/processes that are waiting on the read/write completion. */
+ CyAsHalWake (&dev_p->context[context]->channel);
+}
+
+CyAsReturnStatus_t
+CyAsSdioDeviceCheck(
+ CyAsDevice* dev_p,
+ CyAsBusNumber_t bus,
+ uint32_t device)
+{
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (bus < 0 || bus >= CY_AS_MAX_BUSES)
+ return CY_AS_ERROR_NO_SUCH_BUS ;
+
+ if (device >= CY_AS_MAX_STORAGE_DEVICES)
+ return CY_AS_ERROR_NO_SUCH_DEVICE ;
+
+ if (!CyAsDeviceIsAstoriaDev(dev_p))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ return (IsStorageActive(dev_p)) ;
+}
+
+CyAsReturnStatus_t
+CyAsSdioDirectIo(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint32_t address,
+ uint8_t miscBuf,
+ uint16_t argument,
+ uint8_t isWrite,
+ uint8_t * data_p )
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint16_t resp_data;
+
+ /*
+ * Sanity checks required before sending the request to the
+ * firmware.
+ */
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+ if(CyAsSdioCheckFunctionSuspended(handle,bus,nFunctionNo))
+ return CY_AS_ERROR_FUNCTION_SUSPENDED;
+
+ req_p = CyAsLLCreateRequest(dev_p, (isWrite==CyTrue)?CY_RQT_SDIO_WRITE_DIRECT:CY_RQT_SDIO_READ_DIRECT,
+ CY_RQT_STORAGE_RQT_CONTEXT, 3) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /*Setting up request*/
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo) ) ;
+ /* D1 */
+ if(isWrite==CyTrue)
+ {
+ CyAsLLRequestResponse_SetWord(req_p, 1, ((argument<<8)|0x0080|(nFunctionNo<<4)|
+ ((miscBuf&CY_SDIO_RAW)<<3)|((miscBuf&CY_SDIO_REARM_INT)>>5)|(uint16_t)(address>>15)));
+ }
+ else
+ {
+ CyAsLLRequestResponse_SetWord(req_p, 1, (nFunctionNo<<4)|((miscBuf&CY_SDIO_REARM_INT)>>5)|
+ (uint16_t)(address>>15));
+ }
+ /* D2 */
+ CyAsLLRequestResponse_SetWord(req_p, 2, ((uint16_t)((address&0x00007fff)<<1))) ;
+
+ /*Create response*/
+ reply_p = CyAsLLCreateResponse(dev_p, 2) ;
+
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /*Sending the request*/
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /*Check reply type*/
+ if ( CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_SDIO_DIRECT)
+ {
+ resp_data = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if(resp_data>>8)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ else if (data_p!=0)
+ *(uint8_t*)(data_p)=(uint8_t)(resp_data&0x00ff);
+ }
+ else
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+
+destroy:
+ if(req_p!=0)
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ if(reply_p!=0)
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+}
+
+
+CyAsReturnStatus_t
+CyAsSdioDirectRead(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint32_t address,
+ uint8_t miscBuf,
+ uint8_t * data_p)
+{
+ return (CyAsSdioDirectIo(handle,bus,device, nFunctionNo, address, miscBuf, 0x00, CyFalse, data_p));
+}
+
+CyAsReturnStatus_t
+CyAsSdioDirectWrite(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint32_t address,
+ uint8_t miscBuf,
+ uint16_t argument,
+ uint8_t * data_p)
+{
+ return (CyAsSdioDirectIo(handle,bus,device, nFunctionNo, address, miscBuf, argument, CyTrue, data_p));
+}
+
+/*Cmd53 IO*/
+CyAsReturnStatus_t
+CyAsSdioExtendedIO(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint32_t address,
+ uint8_t miscBuf,
+ uint16_t argument,
+ uint8_t isWrite,
+ uint8_t * data_p ,
+ uint8_t isResume)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t resp_type;
+ uint8_t reqtype;
+ uint16_t resp_data;
+ CyAsContext *ctxt_p ;
+ uint32_t dmasize,loopcount = 200;
+ CyAsEndPointNumber_t ep;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+ if(CyAsSdioCheckFunctionSuspended(handle,bus,nFunctionNo))
+ return CY_AS_ERROR_FUNCTION_SUSPENDED;
+
+
+ if ((CyAsDeviceIsStorageAsyncPending(dev_p)) || (dev_p->storage_wait))
+ return CY_AS_ERROR_ASYNC_PENDING ;
+
+ /* Request for 0 bytes of blocks is returned as a success*/
+ if(argument == 0)
+ return CY_AS_ERROR_SUCCESS;
+
+ /* Initialise the request to send to the West Bridge device. */
+ if(isWrite == CyTrue)
+ {
+ reqtype =CY_RQT_SDIO_WRITE_EXTENDED;
+ ep=dev_p->storage_write_endpoint;
+ }
+ else
+ {
+ reqtype=CY_RQT_SDIO_READ_EXTENDED;
+ ep=dev_p->storage_read_endpoint;
+ }
+
+ req_p = dev_p->storage_rw_req_p ;
+ CyAsLLInitRequest(req_p, reqtype, CY_RQT_STORAGE_RQT_CONTEXT, 3) ;
+
+ /* Initialise the space for reply from the Antioch. */
+ reply_p = dev_p->storage_rw_resp_p ;
+ CyAsLLInitResponse(reply_p, 2) ;
+
+ /* Setup the DMA request */
+ if(!(miscBuf&CY_SDIO_BLOCKMODE))
+ {
+ if(argument > dev_p->sdiocard[bus].function[nFunctionNo-1].blocksize)
+ return CY_AS_ERROR_INVALID_BLOCKSIZE;
+
+ }
+ else
+ {
+ if( argument > 511)
+ {
+ return CY_AS_ERROR_INVALID_BLOCKSIZE;
+ }
+ }
+
+ if(argument == 512)
+ argument =0;
+
+ dmasize=((miscBuf&CY_SDIO_BLOCKMODE) !=0)? dev_p->sdiocard[bus].function[nFunctionNo-1].blocksize*argument:argument;
+
+ ret = CyAsDmaQueueRequest(dev_p, ep, (void*)(data_p), dmasize, CyFalse,
+ (isWrite & CyTrue)?CyFalse:CyTrue, CyAsSyncStorageCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ return ret ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo|((isResume)?0x80:0x00) )) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, ((uint16_t)nFunctionNo)<<12|
+ ((uint16_t)(miscBuf&(CY_SDIO_BLOCKMODE|CY_SDIO_OP_INCR)))<<9|
+ (uint16_t)(address>>7)|((isWrite==CyTrue)?0x8000:0x0000 )) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, ((uint16_t)(address&0x0000ffff)<<9) | argument) ;
+
+
+ /* Send the request and wait for completion of storage request */
+ dev_p->storage_wait = CyTrue ;
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyTrue, CyAsSdioSyncReplyCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_CANCELED) ;
+ }
+ else
+ {
+ /* Setup the DMA request */
+ ctxt_p = dev_p->context[CY_RQT_STORAGE_RQT_CONTEXT] ;
+ ret = CyAsDmaDrainQueue(dev_p, ep, CyTrue) ;
+
+ while (loopcount-- > 0)
+ {
+ if (dev_p->storage_wait == CyFalse)
+ break;
+ CyAsHalSleepOn(&ctxt_p->channel, 10) ;
+ }
+ if (dev_p->storage_wait == CyTrue)
+ {
+ dev_p->storage_wait = CyFalse ;
+ CyAsLLRemoveRequest(dev_p, ctxt_p, req_p, CyTrue) ;
+ dev_p->storage_error = CY_AS_ERROR_TIMEOUT ;
+ }
+
+ ret=dev_p->storage_error;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ return ret ;
+ }
+
+
+ resp_type = CyAsLLRequestResponse_GetCode(dev_p->storage_rw_resp_p) ;
+ if (resp_type == CY_RESP_SDIO_EXT)
+ {
+ resp_data = CyAsLLRequestResponse_GetWord(reply_p, 0)&0x00ff ;
+ if(resp_data)
+ {
+ ret = CY_AS_ERROR_INVALID_REQUEST ;
+ }
+
+ }
+ else
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ }
+ return ret;
+
+}
+
+static void
+CyAsSdioAsyncReplyCallback(
+ CyAsDevice* dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse* rqt,
+ CyAsLLRequestResponse* resp,
+ CyAsReturnStatus_t ret )
+{
+ CyAsStorageCallback cb_ms ;
+ uint8_t reqtype ;
+ uint32_t pendingblocks;
+ (void)rqt ;
+ (void)context ;
+
+ pendingblocks = 0;
+ reqtype = CyAsLLRequestResponse_GetCode(rqt) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if ((CyAsLLRequestResponse_GetCode(resp) == CY_RESP_SUCCESS_FAILURE) ||
+ (CyAsLLRequestResponse_GetCode(resp) == CY_RESP_SDIO_EXT))
+ {
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) ;
+ ret &= 0x00FF ;
+ }
+ else
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ }
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ if(reqtype == CY_RQT_SDIO_READ_EXTENDED)
+ CyAsDmaCancel(dev_p, dev_p->storage_read_endpoint, ret) ;
+ else
+ CyAsDmaCancel(dev_p, dev_p->storage_write_endpoint, ret) ;
+
+ dev_p->storage_error = ret;
+ }
+
+
+
+ dev_p->storage_wait = CyFalse ;
+
+ /*
+ * If the DMA callback has already been called, the user callback
+ * has to be called from here.
+ */
+ if (!CyAsDeviceIsStorageAsyncPending(dev_p))
+ {
+ CyAsHalAssert(dev_p->storage_cb_ms != NULL) ;
+ cb_ms = dev_p->storage_cb_ms ;
+
+ dev_p->storage_cb = 0 ;
+ dev_p->storage_cb_ms = 0 ;
+
+ if ((ret == CY_AS_ERROR_SUCCESS) || (ret == CY_AS_ERROR_IO_ABORTED) || (ret == CY_AS_ERROR_IO_SUSPENDED))
+ {
+ ret = dev_p->storage_error ;
+ pendingblocks = ((uint32_t)CyAsLLRequestResponse_GetWord(resp, 1))<<16;
+ }
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE;
+
+ cb_ms((CyAsDeviceHandle)dev_p, dev_p->storage_bus_index, dev_p->storage_device_index,
+ (dev_p->storage_unit | pendingblocks), dev_p->storage_block_addr, dev_p->storage_oper, ret) ;
+ }
+ else
+ dev_p->storage_error = ret ;
+}
+
+
+CyAsReturnStatus_t
+CyAsSdioExtendedIOAsync(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint32_t address,
+ uint8_t miscBuf,
+ uint16_t argument,
+ uint8_t isWrite,
+ uint8_t * data_p,
+ CyAsStorageCallback callback )
+{
+
+ uint32_t mask ;
+ uint32_t dmasize;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ uint8_t reqtype;
+ CyAsEndPointNumber_t ep;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+ if(CyAsSdioCheckFunctionSuspended(handle,bus,nFunctionNo))
+ return CY_AS_ERROR_FUNCTION_SUSPENDED;
+
+ if (callback == 0)
+ return CY_AS_ERROR_NULL_CALLBACK ;
+
+ /* We are supposed to return sucess if the number of
+ * blocks is zero
+ */
+ if(((miscBuf&CY_SDIO_BLOCKMODE)!=0)&&(argument==0))
+ {
+ callback(handle, bus, device,nFunctionNo,address,((isWrite) ? CyAsOpWrite : CyAsOpRead), CY_AS_ERROR_SUCCESS) ;
+ return CY_AS_ERROR_SUCCESS ;
+ }
+
+
+ /*
+ * Since async operations can be triggered by interrupt code, we must
+ * insure that we do not get multiple async operations going at one time and
+ * protect this test and set operation from interrupts.
+ */
+ mask = CyAsHalDisableInterrupts() ;
+ if ((CyAsDeviceIsStorageAsyncPending(dev_p)) || (dev_p->storage_wait))
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ return CY_AS_ERROR_ASYNC_PENDING ;
+ }
+ CyAsDeviceSetStorageAsyncPending(dev_p) ;
+ CyAsHalEnableInterrupts(mask) ;
+
+
+ /*
+ * Storage information about the currently outstanding request
+ */
+ dev_p->storage_cb_ms = callback ;
+ dev_p->storage_bus_index = bus ;
+ dev_p->storage_device_index = device ;
+ dev_p->storage_unit = nFunctionNo ;
+ dev_p->storage_block_addr = address ;
+
+ if(isWrite == CyTrue)
+ {
+ reqtype =CY_RQT_SDIO_WRITE_EXTENDED;
+ ep=dev_p->storage_write_endpoint;
+ }
+ else
+ {
+ reqtype=CY_RQT_SDIO_READ_EXTENDED;
+ ep=dev_p->storage_read_endpoint;
+ }
+
+ /* Initialise the request to send to the West Bridge. */
+ req_p = dev_p->storage_rw_req_p ;
+ CyAsLLInitRequest(req_p, reqtype, CY_RQT_STORAGE_RQT_CONTEXT, 3) ;
+
+ /* Initialise the space for reply from the West Bridge. */
+ reply_p = dev_p->storage_rw_resp_p ;
+ CyAsLLInitResponse(reply_p, 2) ;
+
+ if(!(miscBuf&CY_SDIO_BLOCKMODE))
+ {
+ if(argument > dev_p->sdiocard[bus].function[nFunctionNo-1].blocksize)
+ return CY_AS_ERROR_INVALID_BLOCKSIZE;
+
+ }
+ else
+ {
+ if( argument > 511)
+ {
+ return CY_AS_ERROR_INVALID_BLOCKSIZE;
+ }
+ }
+
+ if(argument == 512)
+ argument =0;
+ dmasize=((miscBuf&CY_SDIO_BLOCKMODE) !=0)? dev_p->sdiocard[bus].function[nFunctionNo-1].blocksize*argument:argument;
+
+ /* Setup the DMA request and adjust the storage operation if we are reading */
+ if (reqtype == CY_RQT_SDIO_READ_EXTENDED)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, (void*)data_p,dmasize , CyFalse, CyTrue,CyAsAsyncStorageCallback) ;
+ dev_p->storage_oper = CyAsOpRead ;
+ }
+ else if (reqtype == CY_RQT_SDIO_WRITE_EXTENDED)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, (void*)data_p, dmasize, CyFalse, CyFalse,CyAsAsyncStorageCallback) ;
+ dev_p->storage_oper = CyAsOpWrite ;
+ }
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+ return ret ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo )) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, ((uint16_t)nFunctionNo)<<12|
+ ((uint16_t)(miscBuf&(CY_SDIO_BLOCKMODE|CY_SDIO_OP_INCR)))<<9|
+ (uint16_t)(address>>7)|((isWrite==CyTrue)?0x8000:0x0000 )) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, ((uint16_t)(address&0x0000ffff)<<9) | argument) ;
+
+
+ /* Send the request and wait for completion of storage request */
+ dev_p->storage_wait = CyTrue ;
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyTrue, CyAsSdioAsyncReplyCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_CANCELED) ;
+ CyAsDeviceClearStorageAsyncPending(dev_p) ;
+ }
+ else
+ {
+ CyAsDmaKickStart(dev_p, ep) ;
+ }
+
+ return ret ;
+}
+
+/* CMD53 Extended Read*/
+CyAsReturnStatus_t
+CyAsSdioExtendedRead(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint32_t address,
+ uint8_t miscBuf,
+ uint16_t argument,
+ uint8_t * data_p,
+ CyAsSdioCallback callback )
+{
+ if (callback==0)
+ return CyAsSdioExtendedIO(handle,bus,device,nFunctionNo,address,miscBuf,argument,CyFalse,data_p,0);
+
+ return CyAsSdioExtendedIOAsync(handle,bus,device,nFunctionNo,address,miscBuf,argument,CyFalse,data_p,callback);
+}
+
+/* CMD53 Extended Write*/
+CyAsReturnStatus_t
+CyAsSdioExtendedWrite(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint32_t address,
+ uint8_t miscBuf,
+ uint16_t argument,
+ uint8_t * data_p,
+ CyAsSdioCallback callback )
+{
+ if (callback==0)
+ return CyAsSdioExtendedIO(handle,bus,device,nFunctionNo,address,miscBuf,argument,CyTrue,data_p,0);
+
+ return CyAsSdioExtendedIOAsync(handle,bus,device,nFunctionNo,address,miscBuf,argument,CyTrue,data_p,callback);
+}
+
+
+/* Read the CIS info tuples for the given function and Tuple ID*/
+CyAsReturnStatus_t
+CyAsSdioGetCISInfo(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint16_t tupleId,
+ uint8_t * data_p )
+{
+
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint16_t resp_data;
+ CyAsContext *ctxt_p ;
+ uint32_t loopcount = 200;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!( CyAsSdioCheckFunctionInitialized(handle,bus,0) ))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+
+ if ((CyAsDeviceIsStorageAsyncPending(dev_p)) || (dev_p->storage_wait))
+ return CY_AS_ERROR_ASYNC_PENDING ;
+
+
+ /* Initialise the request to send to the Antioch. */
+ req_p = dev_p->storage_rw_req_p ;
+ CyAsLLInitRequest(req_p, CY_RQT_SDIO_GET_TUPLE, CY_RQT_STORAGE_RQT_CONTEXT, 2) ;
+
+ /* Initialise the space for reply from the Antioch. */
+ reply_p = dev_p->storage_rw_resp_p ;
+ CyAsLLInitResponse(reply_p, 3) ;
+
+ /* Setup the DMA request */
+ ret = CyAsDmaQueueRequest(dev_p, dev_p->storage_read_endpoint, data_p+1, 255, CyFalse, CyTrue,
+ CyAsSyncStorageCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ return ret ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo )) ;
+
+ /* Set tuple id to fetch. */
+ CyAsLLRequestResponse_SetWord(req_p, 1, tupleId<<8) ;
+
+ /* Send the request and wait for completion of storage request */
+ dev_p->storage_wait = CyTrue ;
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyTrue, CyAsSdioSyncReplyCallback) ;
+
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, dev_p->storage_read_endpoint, CY_AS_ERROR_CANCELED) ;
+ }
+ else
+ {
+ /* Setup the DMA request */
+ ctxt_p = dev_p->context[CY_RQT_STORAGE_RQT_CONTEXT] ;
+ ret = CyAsDmaDrainQueue(dev_p, dev_p->storage_read_endpoint, CyTrue) ;
+
+ while (loopcount-- > 0)
+ {
+ if (dev_p->storage_wait == CyFalse)
+ break;
+ CyAsHalSleepOn(&ctxt_p->channel, 10) ;
+ }
+
+ if (dev_p->storage_wait == CyTrue)
+ {
+ dev_p->storage_wait = CyFalse ;
+ CyAsLLRemoveRequest(dev_p, ctxt_p, req_p, CyTrue) ;
+ return CY_AS_ERROR_TIMEOUT ;
+ }
+ ret = dev_p->storage_error ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ return ret ;
+ }
+
+ if ( CyAsLLRequestResponse_GetCode(dev_p->storage_rw_resp_p) == CY_RESP_SDIO_GET_TUPLE)
+ {
+ resp_data = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if(resp_data)
+ {
+ ret = CY_AS_ERROR_INVALID_REQUEST ;
+ }
+ else if (data_p!=0)
+ *(uint8_t*)data_p=(uint8_t)(CyAsLLRequestResponse_GetWord(reply_p, 0)&0x00ff);
+ }
+ else
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ }
+ return ret;
+}
+
+/*Query Device*/
+CyAsReturnStatus_t
+CyAsSdioQueryCard(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsSDIOCard* data_p )
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ uint8_t resp_type;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ /* Allocating memory to the SDIO device structure in dev_p */
+
+ CyAsHalMemSet(& dev_p->sdiocard[bus],0,sizeof(CyAsSDIODevice));
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SDIO_QUERY_CARD, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, 0 )) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 5) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ resp_type = CyAsLLRequestResponse_GetCode(reply_p);
+ if ( resp_type == CY_RESP_SDIO_QUERY_CARD)
+ {
+ dev_p->sdiocard[bus].card.num_functions = (uint8_t)((reply_p->data[0]&0xff00)>>8);
+ dev_p->sdiocard[bus].card.memory_present = (uint8_t)reply_p->data[0]&0x0001;
+ dev_p->sdiocard[bus].card.manufacturer_Id = reply_p->data[1];
+ dev_p->sdiocard[bus].card.manufacturer_info = reply_p->data[2];
+ dev_p->sdiocard[bus].card.blocksize = reply_p->data[3];
+ dev_p->sdiocard[bus].card.maxblocksize = reply_p->data[3];
+ dev_p->sdiocard[bus].card.card_capability = (uint8_t)((reply_p->data[4]&0xff00)>>8);
+ dev_p->sdiocard[bus].card.sdio_version = (uint8_t)(reply_p->data[4]&0x00ff);
+ dev_p->sdiocard[bus].function_init_map = 0x01;
+ data_p->num_functions = dev_p->sdiocard[bus].card.num_functions;
+ data_p->memory_present = dev_p->sdiocard[bus].card.memory_present;
+ data_p->manufacturer_Id = dev_p->sdiocard[bus].card.manufacturer_Id;
+ data_p->manufacturer_info = dev_p->sdiocard[bus].card.manufacturer_info;
+ data_p->blocksize = dev_p->sdiocard[bus].card.blocksize;
+ data_p->maxblocksize = dev_p->sdiocard[bus].card.maxblocksize;
+ data_p->card_capability = dev_p->sdiocard[bus].card.card_capability;
+ data_p->sdio_version = dev_p->sdiocard[bus].card.sdio_version;
+ }
+ else
+ {
+ if (resp_type == CY_RESP_SUCCESS_FAILURE)
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+destroy:
+ if(req_p!=0)
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ if(reply_p!=0)
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+}
+
+/*Reset SDIO card. */
+CyAsReturnStatus_t
+CyAsSdioResetCard(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device )
+{
+
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t resp_type;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(dev_p->sdiocard != 0)
+ {
+ dev_p->sdiocard[bus].function_init_map=0;
+ dev_p->sdiocard[bus].function_suspended_map = 0;
+ }
+
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SDIO_RESET_DEV, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /*Setup mailbox */
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, 0) ) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 2) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+
+ resp_type = CyAsLLRequestResponse_GetCode(reply_p) ;
+
+
+ if (resp_type == CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if(ret == CY_AS_ERROR_SUCCESS)
+ {
+ ret = CyAsSdioQueryCard(handle,bus,device,0);
+ }
+ }
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+
+destroy:
+ if(req_p!=0)
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ if(reply_p!=0)
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+}
+
+/* Initialise an IO function*/
+CyAsReturnStatus_t
+CyAsSdioInitFunction(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint8_t miscBuf )
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t resp_type;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,0)))
+ return CY_AS_ERROR_NOT_RUNNING;
+
+ if((CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ {
+ if(miscBuf&CY_SDIO_FORCE_INIT)
+ dev_p->sdiocard[bus].function_init_map&=(~(1<<nFunctionNo));
+ else
+ return CY_AS_ERROR_ALREADY_RUNNING;
+ }
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SDIO_INIT_FUNCTION, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo )) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 5) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ resp_type = CyAsLLRequestResponse_GetCode(reply_p) ;
+
+ if (resp_type == CY_RESP_SDIO_INIT_FUNCTION)
+ {
+
+ dev_p->sdiocard[bus].function[nFunctionNo-1].function_code = (uint8_t)((reply_p->data[0]&0xff00)>>8);
+ dev_p->sdiocard[bus].function[nFunctionNo-1].extended_func_code = (uint8_t)reply_p->data[0]&0x00ff;
+ dev_p->sdiocard[bus].function[nFunctionNo-1].blocksize = reply_p->data[1];
+ dev_p->sdiocard[bus].function[nFunctionNo-1].maxblocksize = reply_p->data[1];
+ dev_p->sdiocard[bus].function[nFunctionNo-1].card_psn = (uint32_t)(reply_p->data[2])<<16;
+ dev_p->sdiocard[bus].function[nFunctionNo-1].card_psn |=(uint32_t)(reply_p->data[3]);
+ dev_p->sdiocard[bus].function[nFunctionNo-1].csa_bits = (uint8_t)((reply_p->data[4]&0xff00)>>8);
+ dev_p->sdiocard[bus].function[nFunctionNo-1].wakeup_support = (uint8_t)(reply_p->data[4]&0x0001);
+ dev_p->sdiocard[bus].function_init_map |= (1<<nFunctionNo);
+ CyAsSdioClearFunctionSuspended(handle,bus,nFunctionNo);
+
+ }
+ else
+ {
+ if (resp_type == CY_RESP_SUCCESS_FAILURE)
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ else
+ ret = CY_AS_ERROR_INVALID_FUNCTION ;
+ }
+
+destroy:
+ if(req_p!=0)
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ if(reply_p!=0)
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+}
+
+/*Query individual functions. */
+CyAsReturnStatus_t
+CyAsSdioQueryFunction(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ CyAsSDIOFunc* data_p )
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsReturnStatus_t ret;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+
+ data_p->blocksize = dev_p->sdiocard[bus].function[nFunctionNo-1].blocksize;
+ data_p->card_psn = dev_p->sdiocard[bus].function[nFunctionNo-1].card_psn;
+ data_p->csa_bits = dev_p->sdiocard[bus].function[nFunctionNo-1].csa_bits;
+ data_p->extended_func_code = dev_p->sdiocard[bus].function[nFunctionNo-1].extended_func_code;
+ data_p->function_code = dev_p->sdiocard[bus].function[nFunctionNo-1].function_code;
+ data_p->maxblocksize = dev_p->sdiocard[bus].function[nFunctionNo-1].maxblocksize;
+ data_p->wakeup_support = dev_p->sdiocard[bus].function[nFunctionNo-1].wakeup_support;
+
+
+ return CY_AS_ERROR_SUCCESS;
+}
+
+/* Abort the Current Extended IO Operation*/
+CyAsReturnStatus_t
+CyAsSdioAbortFunction(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t resp_type;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+
+ if ((CyAsDeviceIsStorageAsyncPending(dev_p)) || (dev_p->storage_wait))
+ {
+ if(!(CyAsSdioGetCardCapability(handle,bus) & CY_SDIO_SDC ))
+ {
+ return CY_AS_ERROR_INVALID_COMMAND;
+ }
+ }
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SDIO_ABORT_IO, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /*Setup mailbox */
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo) ) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 2) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ resp_type = CyAsLLRequestResponse_GetCode(reply_p) ;
+
+ if (resp_type == CY_RESP_SUCCESS_FAILURE)
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+
+
+destroy:
+ if(req_p!=0)
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ if(reply_p!=0)
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+}
+
+/* Suspend IO to current function*/
+CyAsReturnStatus_t
+CyAsSdioSuspend(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+ if(!(CyAsSdioCheckSupportBusSuspend(handle,bus)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+ if(!(CyAsSdioGetCardCapability(handle,bus) & CY_SDIO_SDC))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+ if(CyAsSdioCheckFunctionSuspended(handle,bus,nFunctionNo))
+ return CY_AS_ERROR_FUNCTION_SUSPENDED;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SDIO_SUSPEND, CY_RQT_GENERAL_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /*Setup mailbox */
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo) ) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 2) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ ret = CyAsLLRequestResponse_GetCode(reply_p) ;
+ CyAsSdioSetFunctionSuspended(handle,bus,nFunctionNo);
+ }
+
+ if(req_p!=0)
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ if(reply_p!=0)
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*Resume suspended function*/
+CyAsReturnStatus_t
+CyAsSdioResume(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ CyAsOperType op,
+ uint8_t miscBuf,
+ uint16_t pendingblockcount,
+ uint8_t *data_p
+ )
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t resp_data, ret = CY_AS_ERROR_SUCCESS ;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+
+ /* If suspend resume is not supported return */
+ if(!(CyAsSdioCheckSupportBusSuspend(handle,bus)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+
+ /* if the function is not suspended return. */
+ if(!(CyAsSdioCheckFunctionSuspended(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SDIO_RESUME, CY_RQT_STORAGE_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /*Setup mailbox */
+ CyAsLLRequestResponse_SetWord(req_p, 0, CreateAddress(bus, (uint8_t)device, nFunctionNo) ) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 2) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+
+ if ( CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_SDIO_RESUME)
+ {
+ resp_data = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if(resp_data & 0x00ff)
+ {
+ /* Send extended read request to resume the read. */
+ if(op == CyAsOpRead)
+ {
+ ret = CyAsSdioExtendedIO(handle,bus,device,nFunctionNo,0,miscBuf,pendingblockcount,CyFalse,data_p,1);
+ }
+ else
+ {
+ ret = CyAsSdioExtendedIO(handle,bus,device,nFunctionNo,0,miscBuf,pendingblockcount,CyTrue,data_p,1);
+ }
+ }
+ else
+ {
+ ret= CY_AS_ERROR_SUCCESS;
+ }
+
+ }
+ else
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+
+destroy:
+ CyAsSdioClearFunctionSuspended(handle,bus,nFunctionNo);
+ if(req_p!=0)
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ if(reply_p!=0)
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+
+}
+
+/*Set function blocksize. Size cannot exceed max block size for the function*/
+CyAsReturnStatus_t
+CyAsSdioSetBlocksize(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo,
+ uint16_t blocksize)
+{
+ CyAsReturnStatus_t ret;
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ ret = CyAsSdioDeviceCheck(dev_p,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_INVALID_FUNCTION;
+ if( nFunctionNo == 0)
+ {
+ if ( blocksize > CyAsSdioGetCardMaxBlocksize(handle,bus))
+ return CY_AS_ERROR_INVALID_BLOCKSIZE;
+ else if (blocksize == CyAsSdioGetCardBlocksize(handle,bus))
+ return CY_AS_ERROR_SUCCESS;
+ }
+ else
+ {
+ if ( blocksize > CyAsSdioGetFunctionMaxBlocksize(handle,bus,nFunctionNo))
+ return CY_AS_ERROR_INVALID_BLOCKSIZE;
+ else if (blocksize == CyAsSdioGetFunctionBlocksize(handle,bus,nFunctionNo))
+ return CY_AS_ERROR_SUCCESS;
+ }
+
+ ret = CyAsSdioDirectWrite(handle,bus,device,0,(uint16_t)(nFunctionNo<<8)|0x10,0,blocksize&0x00ff,0);
+ if(ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+ ret = CyAsSdioDirectWrite(handle,bus,device,0,(uint16_t)(nFunctionNo<<8)|0x11,0,(blocksize&0xff00)>>8,0);
+ if (ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(nFunctionNo ==0)
+ CyAsSdioSetCardBlockSize(handle,bus,blocksize);
+ else
+ CyAsSdioSetFunctionBlockSize(handle,bus,nFunctionNo,blocksize);
+ return ret;
+}
+
+/* Deinitialize an SDIO function*/
+CyAsReturnStatus_t
+CyAsSdioDeInitFunction(
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ uint8_t nFunctionNo)
+{
+ CyAsReturnStatus_t ret;
+ uint8_t temp;
+
+ if(nFunctionNo == 0)
+ return CY_AS_ERROR_INVALID_FUNCTION;
+
+ ret = CyAsSdioDeviceCheck((CyAsDevice*)handle,bus,device);
+ if( ret != CY_AS_ERROR_SUCCESS )
+ return ret;
+
+ if(!(CyAsSdioCheckFunctionInitialized(handle,bus,nFunctionNo)))
+ return CY_AS_ERROR_SUCCESS;
+
+ temp =(uint8_t)(((CyAsDevice*)handle)->sdiocard[bus].function_init_map & (~(1<<nFunctionNo)));
+ CyAsSdioDirectWrite(handle,bus,device,0,0x02,0,temp,0);
+ ((CyAsDevice*)handle)->sdiocard[bus].function_init_map &= (~(1<<nFunctionNo));
+
+ return CY_AS_ERROR_SUCCESS;
+}
+
+/* This includes the implementation of the deprecated functions for backward
+ * compatibility
+ */
+#include "cyasstorage_dep_impl.h"
+
+/*[]*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasstorage_dep_impl.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,396 @@
+/* Cypress West Bridge API source file (cyasstorage_dep_impl.h)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+/* This c file will contain Antioch specific implementation
+ * of the APIs that are deprecated in Astoria SDK. This is
+ * for maintaining backward compatibility
+ */
+CyAsReturnStatus_t
+CyAsStorageRegisterCallback_dep(CyAsDeviceHandle handle, CyAsStorageEventCallback_dep callback)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (dev_p->storage_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ dev_p->storage_event_cb = callback ;
+ dev_p->storage_event_cb_ms = NULL ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+
+CyAsReturnStatus_t
+CyAsStorageClaim_dep_EX(CyAsDeviceHandle handle,
+ CyAsMediaType* type,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsReturnStatus_t ret ;
+ CyAsBusNumber_t bus ;
+
+ if (*type == CyAsMediaSDIO)
+ return CY_AS_ERROR_SUCCESS;
+
+ if (*type != CyAsMediaNand && *type != CyAsMediaSDFlash && *type != CyAsMediaMMCFlash && *type != CyAsMediaCEATA)
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, *type, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return MyStorageClaim(dev_p, type, bus, 0, CY_AS_REQUEST_RESPONSE_EX, cb, client) ;
+}
+
+
+CyAsReturnStatus_t
+CyAsStorageRelease_dep_EX(CyAsDeviceHandle handle,
+ CyAsMediaType* type,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus ;
+ CyAsReturnStatus_t ret ;
+
+ if (*type != CyAsMediaNand && *type != CyAsMediaSDFlash && *type != CyAsMediaMMCFlash && *type != CyAsMediaCEATA)
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, *type, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return MyStorageRelease(dev_p, type, bus, 0, CY_AS_REQUEST_RESPONSE_EX, cb, client) ;
+}
+
+
+CyAsReturnStatus_t
+CyAsStorageQueryDevice_dep_EX(CyAsDeviceHandle handle,
+ CyAsStorageQueryDeviceData_dep* data_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus ;
+ CyAsReturnStatus_t ret ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, data_p->type, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return MyStorageQueryDevice(dev_p, data_p, CY_AS_REQUEST_RESPONSE_EX, bus, data_p->device, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageQueryUnit_dep_EX(CyAsDeviceHandle handle,
+ CyAsStorageQueryUnitData_dep* data_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus;
+ CyAsReturnStatus_t ret ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, data_p->type, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return MyStorageQueryUnit(dev_p, data_p, CY_AS_REQUEST_RESPONSE_EX, bus,
+ data_p->device, data_p->unit, cb, client) ;
+}
+
+
+CyAsReturnStatus_t
+CyAsStorageRead_dep(CyAsDeviceHandle handle, CyAsMediaType media, uint32_t device, uint32_t unit, uint32_t block,
+ void *data_p, uint16_t num_blocks)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus ;
+ CyAsReturnStatus_t ret ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (media != CyAsMediaNand && media != CyAsMediaSDFlash && media != CyAsMediaMMCFlash && media != CyAsMediaCEATA)
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, media, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsStorageSyncOper(dev_p, dev_p->storage_read_endpoint, CY_RQT_READ_BLOCK, bus, device,
+ unit, block, data_p, num_blocks) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageWrite_dep(CyAsDeviceHandle handle, CyAsMediaType media, uint32_t device, uint32_t unit, uint32_t block,
+ void *data_p, uint16_t num_blocks)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus ;
+ CyAsReturnStatus_t ret ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (media != CyAsMediaNand && media != CyAsMediaSDFlash && media != CyAsMediaMMCFlash && media != CyAsMediaCEATA)
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, media, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsStorageSyncOper(dev_p, dev_p->storage_write_endpoint, CY_RQT_WRITE_BLOCK, bus, device,
+ unit, block, data_p, num_blocks) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageReadAsync_dep(CyAsDeviceHandle handle, CyAsMediaType media, uint32_t device, uint32_t unit,
+ uint32_t block, void *data_p, uint16_t num_blocks, CyAsStorageCallback_dep callback)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus ;
+ CyAsReturnStatus_t ret ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (media != CyAsMediaNand && media != CyAsMediaSDFlash && media != CyAsMediaMMCFlash && media != CyAsMediaCEATA)
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ if (callback == 0)
+ return CY_AS_ERROR_NULL_CALLBACK ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, media, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsStorageAsyncOper(dev_p, dev_p->storage_read_endpoint, CY_RQT_READ_BLOCK,
+ CY_AS_REQUEST_RESPONSE_EX, bus, device, unit, block, data_p, num_blocks, callback, NULL);
+}
+
+CyAsReturnStatus_t
+CyAsStorageWriteAsync_dep(CyAsDeviceHandle handle, CyAsMediaType media, uint32_t device, uint32_t unit,
+ uint32_t block, void *data_p, uint16_t num_blocks, CyAsStorageCallback_dep callback)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus ;
+ CyAsReturnStatus_t ret ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (media != CyAsMediaNand && media != CyAsMediaSDFlash && media != CyAsMediaMMCFlash && media != CyAsMediaCEATA)
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ if (callback == 0)
+ return CY_AS_ERROR_NULL_CALLBACK ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, media, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsStorageAsyncOper(dev_p, dev_p->storage_write_endpoint, CY_RQT_WRITE_BLOCK,
+ CY_AS_REQUEST_RESPONSE_EX, bus, device, unit, block, data_p, num_blocks, callback, NULL);
+}
+
+CyAsReturnStatus_t
+CyAsStorageSDRegisterRead_dep_EX(
+ CyAsDeviceHandle handle,
+ CyAsMediaType type,
+ uint8_t device,
+ CyAsSDCardRegType regType,
+ CyAsStorageSDRegReadData *data_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus;
+ CyAsReturnStatus_t ret ;
+
+ if (type != CyAsMediaSDFlash && type != CyAsMediaMMCFlash)
+ return CY_AS_ERROR_INVALID_PARAMETER ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, type, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsStorageSDRegisterRead(handle, bus, device, regType, data_p, cb, client);
+}
+
+
+CyAsReturnStatus_t
+CyAsStorageSDRegisterRead_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType type,
+ uint8_t device,
+ CyAsSDCardRegType regType,
+ uint8_t readLen,
+ uint8_t *data_p)
+{
+ CyAsStorageSDRegReadData info ;
+ CyAsReturnStatus_t ret ;
+
+ info.buf_p = data_p ;
+ info.length = readLen ;
+
+ ret = CyAsStorageSDRegisterRead_dep_EX(handle, type, device, regType, &info, 0, 0) ;
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageRelease_dep(CyAsDeviceHandle handle,
+ CyAsMediaType type)
+{
+ CyAsMediaType* t = &type ;
+ return CyAsStorageRelease_dep_EX(handle, t, 0, 0) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageQueryUnit_dep(CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ uint32_t unit,
+ CyAsUnitDesc *desc_p)
+{
+ CyAsReturnStatus_t status ;
+ CyAsStorageQueryUnitData_dep data ;
+ data.device = device ;
+ data.type = media ;
+ data.unit = unit ;
+
+ status = CyAsStorageQueryUnit_dep_EX(handle, &data, 0, 0) ;
+
+ desc_p->block_size = data.desc_p.block_size ;
+ desc_p->start_block = data.desc_p.start_block ;
+ desc_p->type = data.desc_p.type ;
+ desc_p->unit_size = data.desc_p.unit_size ;
+
+ return status ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageQueryDevice_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ CyAsDeviceDesc *desc_p)
+{
+ CyAsReturnStatus_t status ;
+ CyAsStorageQueryDeviceData_dep data ;
+ data.device = device ;
+ data.type = media ;
+
+ status = CyAsStorageQueryDevice_dep_EX(handle, &data, 0, 0) ;
+
+ desc_p->block_size = data.desc_p.block_size ;
+ desc_p->number_units = data.desc_p.number_units ;
+ desc_p->removable = data.desc_p.removable ;
+ desc_p->type = data.desc_p.type ;
+ desc_p->writeable = data.desc_p.writeable ;
+ desc_p->locked = data.desc_p.locked ;
+ desc_p->erase_unit_size = data.desc_p.erase_unit_size ;
+
+ return status ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageClaim_dep(CyAsDeviceHandle handle,
+ CyAsMediaType type)
+{
+ CyAsMediaType* t = &type ;
+
+ return CyAsStorageClaim_dep_EX(handle, t, 0, 0) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageDeviceControl_dep(CyAsDeviceHandle handle,
+ CyBool card_detect_en,
+ CyBool write_prot_en,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ return MyStorageDeviceControl(dev_p, CyAsBus_1, 0, card_detect_en, write_prot_en, CyAsStorageDetect_GPIO, cb, client);
+}
+
+CyAsReturnStatus_t
+CyAsStorageCreatePPartition_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ uint32_t size,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsReturnStatus_t ret ;
+ CyAsBusNumber_t bus ;
+
+ if ((media == CyAsMediaSDIO) || (media == CyAsMediaCEATA))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ if ((media != CyAsMediaNand) && (media != CyAsMediaSDFlash) && (media != CyAsMediaMMCFlash))
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, media, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsStorageCreatePPartition(handle, bus, device, size, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsStorageRemovePPartition_dep(
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsReturnStatus_t ret ;
+ CyAsBusNumber_t bus ;
+
+ if ((media == CyAsMediaSDIO) || (media == CyAsMediaCEATA))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ if ((media != CyAsMediaNand) && (media != CyAsMediaSDFlash) && (media != CyAsMediaMMCFlash))
+ return CY_AS_ERROR_NO_SUCH_MEDIA ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, media, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsStorageRemovePPartition(handle, bus, device, cb, client) ;
+}
+
+/*[]*/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasusb.c Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,3613 @@
+/* Cypress West Bridge API source file (cyasusb.c)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+#include "cyashal.h"
+#include "cyasusb.h"
+#include "cyaserr.h"
+#include "cyasdma.h"
+#include "cyaslowlevel.h"
+#include "cyaslep2pep.h"
+#include "cyasregs.h"
+#include "cyasstorage.h"
+
+extern CyAsMediaType
+CyAsStorageGetMediaFromAddress(uint16_t v) ;
+
+extern CyAsBusNumber_t
+CyAsStorageGetBusFromAddress(uint16_t v) ;
+
+extern uint32_t
+CyAsStorageGetDeviceFromAddress(uint16_t v) ;
+
+static CyAsReturnStatus_t
+CyAsUsbAckSetupPacket(
+ CyAsDeviceHandle handle, /* Handle to the West Bridge device */
+ CyAsFunctionCallback cb, /* The callback if async call */
+ uint32_t client /* Client supplied data */
+ ) ;
+
+static void
+CyAsUsbFuncCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret) ;
+/*
+* Reset the USB EP0 state
+*/
+static void
+CyAsUsbResetEP0State(CyAsDevice *dev_p)
+{
+ CyAsLogDebugMessage(6, "CyAsUsbResetEP0State called") ;
+
+ CyAsDeviceClearAckDelayed(dev_p) ;
+ CyAsDeviceClearSetupPacket(dev_p) ;
+ if (CyAsDeviceIsUsbAsyncPending(dev_p, 0))
+ CyAsUsbCancelAsync((CyAsDeviceHandle)dev_p, 0) ;
+
+ dev_p->usb_pending_buffer = 0 ;
+}
+
+/*
+* External function to map logical endpoints to physical endpoints
+*/
+static CyAsReturnStatus_t
+IsUsbActive(CyAsDevice *dev_p)
+{
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (dev_p->usb_count == 0)
+ return CY_AS_ERROR_NOT_RUNNING ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+UsbAckCallback(CyAsDeviceHandle h,
+ CyAsReturnStatus_t status,
+ uint32_t client,
+ CyAsFunctCBType type,
+ void* data)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)h ;
+
+ (void)client ;
+ (void)status ;
+ (void)data ;
+
+ CyAsHalAssert(type == CY_FUNCT_CB_NODATA) ;
+
+ if (dev_p->usb_pending_buffer)
+ {
+ CyAsUsbIoCallback cb ;
+
+ cb = dev_p->usb_cb[0] ;
+ dev_p->usb_cb[0] = 0 ;
+ CyAsDeviceClearUsbAsyncPending(dev_p, 0) ;
+ if (cb)
+ cb(h, 0, dev_p->usb_pending_size, dev_p->usb_pending_buffer, dev_p->usb_error) ;
+
+ dev_p->usb_pending_buffer = 0 ;
+ }
+
+ CyAsDeviceClearSetupPacket(dev_p) ;
+}
+
+static void
+MyUsbRequestCallbackUsbEvent(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ uint16_t ev ;
+ uint16_t val ;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+
+ ev = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ switch(ev)
+ {
+ case 0: /* Reserved */
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_INVALID_REQUEST, 0) ;
+ break ;
+
+ case 1: /* Reserved */
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_INVALID_REQUEST, 0) ;
+ break ;
+
+ case 2: /* USB Suspend */
+ dev_p->usb_last_event = CyAsEventUsbSuspend ;
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbSuspend, 0) ;
+ else if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbSuspend, 0) ;
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ break;
+
+ case 3: /* USB Resume */
+ dev_p->usb_last_event = CyAsEventUsbResume ;
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbResume, 0) ;
+ else if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbResume, 0) ;
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ break ;
+
+ case 4: /* USB Reset */
+ /*
+ * If we get a USB reset, the USB host did not understand our response
+ * or we timed out for some reason. Reset our internal state to be ready for
+ * another set of enumeration based requests.
+ */
+ if (CyAsDeviceIsAckDelayed(dev_p))
+ {
+ CyAsUsbResetEP0State(dev_p) ;
+ }
+
+ dev_p->usb_last_event = CyAsEventUsbReset ;
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbReset, 0) ;
+ else if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbReset, 0) ;
+
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ CyAsDeviceClearUsbHighSpeed(dev_p) ;
+ CyAsUsbSetDmaSizes(dev_p) ;
+ dev_p->usb_max_tx_size = 0x40 ;
+ CyAsDmaSetMaxDmaSize(dev_p, 0x06, 0x40) ;
+ break ;
+
+ case 5: /* USB Set Configuration */
+ val = CyAsLLRequestResponse_GetWord(req_p, 1) ; /* The configuration to set */
+ dev_p->usb_last_event = CyAsEventUsbSetConfig ;
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbSetConfig, &val) ;
+ else if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbSetConfig, &val) ;
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ break ;
+
+ case 6: /* USB Speed change */
+ val = CyAsLLRequestResponse_GetWord(req_p, 1) ; /* Connect speed */
+ dev_p->usb_last_event = CyAsEventUsbSpeedChange ;
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbSpeedChange, &val) ;
+ else if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbSpeedChange, &val) ;
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ CyAsDeviceSetUsbHighSpeed(dev_p) ;
+ CyAsUsbSetDmaSizes(dev_p) ;
+ dev_p->usb_max_tx_size = 0x200 ;
+ CyAsDmaSetMaxDmaSize(dev_p, 0x06, 0x200) ;
+ break ;
+
+ case 7: /* USB Clear Feature */
+ val = CyAsLLRequestResponse_GetWord(req_p, 1) ; /* EP Number */
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbClearFeature, &val) ;
+ if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbClearFeature, &val) ;
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ break ;
+
+ default:
+ CyAsHalPrintMessage("Invalid event type\n") ;
+ CyAsLLSendDataResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_RESP_USB_INVALID_EVENT, sizeof(ev), &ev) ;
+ break ;
+ }
+}
+
+static void
+MyUsbRequestCallbackUsbData(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ CyAsEndPointNumber_t ep ;
+ uint8_t type ;
+ uint16_t len ;
+ uint16_t val ;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ ep = (CyAsEndPointNumber_t)((val >> 13) & 0x01) ;
+ len = (val & 0x1ff) ;
+
+ CyAsHalAssert(len <= 64) ;
+ CyAsLLRequestResponse_Unpack(req_p, 1, len, dev_p->usb_ep_data) ;
+
+ type = (uint8_t)((val >> 14) & 0x03) ;
+ if (type == 0)
+ {
+ if (CyAsDeviceIsAckDelayed(dev_p))
+ {
+ /*
+ * A setup packet has arrived while we are processing a previous setup packet.
+ * Reset our state with respect to EP0 to be ready to process the new packet.
+ */
+ CyAsUsbResetEP0State(dev_p) ;
+ }
+
+ if (len != 8)
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_INVALID_REQUEST, 0) ;
+ else
+ {
+ CyAsDeviceClearEp0Stalled(dev_p) ;
+ CyAsDeviceSetSetupPacket(dev_p) ;
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbSetupPacket, dev_p->usb_ep_data) ;
+ else
+ dev_p->usb_event_cb(h, CyAsEventUsbSetupPacket, dev_p->usb_ep_data) ;
+
+ if ((!CyAsDeviceIsAckDelayed(dev_p)) && (!CyAsDeviceIsEp0Stalled(dev_p)))
+ {
+ CyAsUsbAckSetupPacket(h, UsbAckCallback, 0) ;
+ }
+ }
+ }
+ else if (type == 2)
+ {
+ if (len != 0)
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_INVALID_REQUEST, 0) ;
+ else
+ {
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbStatusPacket, 0) ;
+ else
+ dev_p->usb_event_cb(h, CyAsEventUsbStatusPacket, 0) ;
+
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ }
+ }
+ else if (type == 1)
+ {
+ /*
+ * We need to hand the data associated with these endpoints to the DMA
+ * module.
+ */
+ CyAsDmaReceivedData(dev_p, ep, len, dev_p->usb_ep_data) ;
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+ }
+}
+
+static void
+MyUsbRequestCallbackInquiry(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ CyAsUsbInquiryData_dep cbdata ;
+ CyAsUsbInquiryData cbdata_ms ;
+ void *data ;
+ uint16_t val ;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+ uint8_t def_inq_data[64] ;
+ uint8_t evpd ;
+ uint8_t codepage ;
+ CyBool updated ;
+ uint16_t length ;
+
+ CyAsBusNumber_t bus ;
+ uint32_t device ;
+ CyAsMediaType media ;
+
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ bus = CyAsStorageGetBusFromAddress(val) ;
+ device = CyAsStorageGetDeviceFromAddress(val) ;
+ media = CyAsStorageGetMediaFromAddress(val) ;
+
+ val = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ evpd = (uint8_t)((val >> 8) & 0x01) ;
+ codepage = (uint8_t)(val & 0xff) ;
+
+ length = CyAsLLRequestResponse_GetWord(req_p, 2) ;
+ data = (void *)def_inq_data ;
+
+ updated = CyFalse ;
+
+ if (dev_p->usb_event_cb_ms)
+ {
+ cbdata_ms.bus = bus ;
+ cbdata_ms.device = device ;
+ cbdata_ms.updated = updated ;
+ cbdata_ms.evpd = evpd ;
+ cbdata_ms.codepage = codepage ;
+ cbdata_ms.length = length ;
+ cbdata_ms.data = data ;
+
+ CyAsHalAssert(cbdata_ms.length <= sizeof(def_inq_data)) ;
+ CyAsLLRequestResponse_Unpack(req_p, 3, cbdata_ms.length, cbdata_ms.data) ;
+
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbInquiryBefore, &cbdata_ms) ;
+
+ updated = cbdata_ms.updated;
+ data = cbdata_ms.data ;
+ length = cbdata_ms.length ;
+ }
+ else if (dev_p->usb_event_cb)
+ {
+ cbdata.media = media ;
+ cbdata.updated = updated ;
+ cbdata.evpd = evpd ;
+ cbdata.codepage = codepage ;
+ cbdata.length = length ;
+ cbdata.data = data ;
+
+ CyAsHalAssert(cbdata.length <= sizeof(def_inq_data)) ;
+ CyAsLLRequestResponse_Unpack(req_p, 3, cbdata.length, cbdata.data) ;
+
+ dev_p->usb_event_cb(h, CyAsEventUsbInquiryBefore, &cbdata) ;
+
+ updated = cbdata.updated ;
+ data = cbdata.data ;
+ length = cbdata.length ;
+ }
+
+ if (updated && length > 192)
+ CyAsHalPrintMessage("An inquiry result from a CyAsEventUsbInquiryBefore event was greater than 192 bytes.") ;
+
+ /* Now send the reply with the data back to the West Bridge device */
+ if (updated && length <= 192)
+ {
+ /*
+ * The callback function modified the inquiry data, ship the data back
+ * to the West Bridge firmware.
+ */
+ CyAsLLSendDataResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_RESP_INQUIRY_DATA, length, data) ;
+ }
+ else
+ {
+ /*
+ * The callback did not modify the data, just acknowledge that we
+ * processed the request
+ */
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 1) ;
+ }
+
+ if (dev_p->usb_event_cb_ms)
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbInquiryAfter, &cbdata_ms) ;
+ else if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbInquiryAfter, &cbdata) ;
+}
+
+static void
+MyUsbRequestCallbackStartStop(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ CyAsBusNumber_t bus ;
+ CyAsMediaType media ;
+ uint32_t device ;
+ uint16_t val ;
+
+ if (dev_p->usb_event_cb_ms || dev_p->usb_event_cb)
+ {
+ CyBool loej ;
+ CyBool start ;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ bus = CyAsStorageGetBusFromAddress(val) ;
+ device = CyAsStorageGetDeviceFromAddress(val) ;
+ media = CyAsStorageGetMediaFromAddress(val) ;
+
+ val = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ loej = (val & 0x02) ? CyTrue : CyFalse ;
+ start = (val & 0x01) ? CyTrue: CyFalse ;
+
+ if (dev_p->usb_event_cb_ms)
+ {
+ CyAsUsbStartStopData cbdata_ms ;
+
+ cbdata_ms.bus = bus ;
+ cbdata_ms.device = device ;
+ cbdata_ms.loej = loej ;
+ cbdata_ms.start = start ;
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbStartStop, &cbdata_ms) ;
+ }
+ else if (dev_p->usb_event_cb)
+ {
+ CyAsUsbStartStopData_dep cbdata ;
+
+ cbdata.media = media ;
+ cbdata.loej = loej ;
+ cbdata.start = start ;
+ dev_p->usb_event_cb(h, CyAsEventUsbStartStop, &cbdata) ;
+ }
+ }
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 1) ;
+}
+
+static void
+MyUsbRequestCallbackUknownCBW(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ uint16_t val ;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+ uint8_t buf[16] ;
+
+ uint8_t response[4] ;
+ uint16_t reqlen ;
+ void *request ;
+ uint8_t status ;
+ uint8_t key ;
+ uint8_t asc ;
+ uint8_t ascq ;
+
+ val = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ status = 1 ; /* Failed by default */
+ key = 0x05 ; /* Invalid command */
+ asc = 0x20 ; /* Invalid command */
+ ascq = 0x00 ; /* Invalid command */
+ reqlen = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ request = buf ;
+
+ CyAsHalAssert(reqlen <= sizeof(buf)) ;
+ CyAsLLRequestResponse_Unpack(req_p, 2, reqlen, request) ;
+
+ if (dev_p->usb_event_cb_ms)
+ {
+ CyAsUsbUnknownCommandData cbdata_ms ;
+ cbdata_ms.bus = CyAsStorageGetBusFromAddress(val) ;
+ cbdata_ms.device = CyAsStorageGetDeviceFromAddress(val) ;
+ cbdata_ms.reqlen = reqlen ;
+ cbdata_ms.request = request ;
+ cbdata_ms.status = status ;
+ cbdata_ms.key = key ;
+ cbdata_ms.asc = asc ;
+ cbdata_ms.ascq = ascq ;
+
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbUnknownStorage, &cbdata_ms) ;
+ status = cbdata_ms.status ;
+ key = cbdata_ms.key ;
+ asc = cbdata_ms.asc ;
+ ascq = cbdata_ms.ascq ;
+ }
+ else if (dev_p->usb_event_cb)
+ {
+ CyAsUsbUnknownCommandData_dep cbdata ;
+ cbdata.media = CyAsStorageGetMediaFromAddress(val) ;
+ cbdata.reqlen = reqlen ;
+ cbdata.request = request ;
+ cbdata.status = status ;
+ cbdata.key = key ;
+ cbdata.asc = asc ;
+ cbdata.ascq = ascq ;
+
+ dev_p->usb_event_cb(h, CyAsEventUsbUnknownStorage, &cbdata) ;
+ status = cbdata.status ;
+ key = cbdata.key ;
+ asc = cbdata.asc ;
+ ascq = cbdata.ascq ;
+ }
+
+ response[0] = status ;
+ response[1] = key ;
+ response[2] = asc ;
+ response[3] = ascq ;
+ CyAsLLSendDataResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_RESP_UNKNOWN_SCSI_COMMAND, sizeof(response), response) ;
+}
+
+static void
+MyUsbRequestCallbackMSCProgress(CyAsDevice *dev_p, CyAsLLRequestResponse *req_p)
+{
+ uint16_t val1, val2 ;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+
+ if ((dev_p->usb_event_cb) || (dev_p->usb_event_cb_ms))
+ {
+ CyAsMSCProgressData cbdata ;
+
+ val1 = CyAsLLRequestResponse_GetWord(req_p, 0) ;
+ val2 = CyAsLLRequestResponse_GetWord(req_p, 1) ;
+ cbdata.wr_count = (uint32_t)((val1 << 16) | val2) ;
+
+ val1 = CyAsLLRequestResponse_GetWord(req_p, 2) ;
+ val2 = CyAsLLRequestResponse_GetWord(req_p, 3) ;
+ cbdata.rd_count = (uint32_t)((val1 << 16) | val2) ;
+
+ if (dev_p->usb_event_cb)
+ dev_p->usb_event_cb(h, CyAsEventUsbMSCProgress, &cbdata) ;
+ else
+ dev_p->usb_event_cb_ms(h, CyAsEventUsbMSCProgress, &cbdata) ;
+ }
+
+ CyAsLLSendStatusResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_AS_ERROR_SUCCESS, 0) ;
+}
+
+/*
+* This function processes the requests delivered from the firmware within the West Bridge
+* device that are delivered in the USB context. These requests generally are EP0 and
+* EP1 related requests or USB events.
+*/
+static void
+MyUsbRequestCallback(CyAsDevice *dev_p, uint8_t context, CyAsLLRequestResponse *req_p, CyAsLLRequestResponse *resp_p,
+ CyAsReturnStatus_t ret)
+{
+ uint16_t val ;
+ uint8_t code = CyAsLLRequestResponse_GetCode(req_p) ;
+
+ (void)resp_p ;
+ (void)context ;
+ (void)ret ;
+
+ switch(code)
+ {
+ case CY_RQT_USB_EVENT:
+ MyUsbRequestCallbackUsbEvent(dev_p, req_p) ;
+ break ;
+
+ case CY_RQT_USB_EP_DATA:
+ dev_p->usb_last_event = CyAsEventUsbSetupPacket ;
+ MyUsbRequestCallbackUsbData(dev_p, req_p) ;
+ break ;
+
+ case CY_RQT_SCSI_INQUIRY_COMMAND:
+ dev_p->usb_last_event = CyAsEventUsbInquiryAfter ;
+ MyUsbRequestCallbackInquiry(dev_p, req_p) ;
+ break ;
+
+ case CY_RQT_SCSI_START_STOP_COMMAND:
+ dev_p->usb_last_event = CyAsEventUsbStartStop ;
+ MyUsbRequestCallbackStartStop(dev_p, req_p) ;
+ break ;
+
+ case CY_RQT_SCSI_UNKNOWN_COMMAND:
+ dev_p->usb_last_event = CyAsEventUsbUnknownStorage ;
+ MyUsbRequestCallbackUknownCBW(dev_p, req_p) ;
+ break ;
+
+ case CY_RQT_USB_ACTIVITY_UPDATE:
+ dev_p->usb_last_event = CyAsEventUsbMSCProgress ;
+ MyUsbRequestCallbackMSCProgress(dev_p, req_p) ;
+ break ;
+
+ default:
+ CyAsHalPrintMessage("Invalid request received on USB context\n") ;
+ val = req_p->box0 ;
+ CyAsLLSendDataResponse(dev_p, CY_RQT_USB_RQT_CONTEXT, CY_RESP_INVALID_REQUEST, sizeof(val), &val) ;
+ break ;
+ }
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseUsbStart(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /*
+ * Mark EP 0 and EP1 as 64 byte endpoints
+ */
+ CyAsDmaSetMaxDmaSize(dev_p, 0, 64) ;
+ CyAsDmaSetMaxDmaSize(dev_p, 1, 64) ;
+
+ dev_p->usb_count++ ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDestroyCBQueue(dev_p->usb_func_cbs) ;
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_USB_RQT_CONTEXT, 0) ;
+ }
+
+ CyAsDeviceClearUSSPending(dev_p) ;
+
+ return ret ;
+
+}
+
+/*
+* This function starts the USB stack. The stack is reference counted so if the stack is already
+* started, this function just increments the count. If the stack has not been started, a start
+* request is sent to the West Bridge device.
+*
+* Note: Starting the USB stack does not cause the USB signals to be connected to the USB pins. To do
+* this and therefore initiate enumeration, CyAsUsbConnect() must be called.
+*/
+CyAsReturnStatus_t
+CyAsUsbStart(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p, *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbStart called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if(CyAsDeviceIsUSSPending(dev_p))
+ return CY_AS_ERROR_STARTSTOP_PENDING ;
+
+ CyAsDeviceSetUSSPending(dev_p) ;
+
+ if (dev_p->usb_count == 0)
+ {
+ /*
+ * Since we are just starting the stack, mark USB as not connected to the
+ * remote host
+ */
+ CyAsDeviceClearUsbConnected(dev_p) ;
+ dev_p->usb_phy_config = 0 ;
+
+ /* Queue for 1.0 Async Requests, kept for backwards compatibility */
+ dev_p->usb_func_cbs = CyAsCreateCBQueue(CYAS_USB_FUNC_CB) ;
+ if(dev_p->usb_func_cbs == 0)
+ {
+ CyAsDeviceClearUSSPending(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reset the EP0 state */
+ CyAsUsbResetEP0State(dev_p) ;
+
+ /*
+ * We register here becuase the start request may cause events to occur before the
+ * response to the start request.
+ */
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_USB_RQT_CONTEXT, MyUsbRequestCallback) ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_START_USB, CY_RQT_USB_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ {
+ CyAsDestroyCBQueue(dev_p->usb_func_cbs) ;
+ dev_p->usb_func_cbs = 0 ;
+ CyAsDeviceClearUSSPending(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsDestroyCBQueue(dev_p->usb_func_cbs) ;
+ dev_p->usb_func_cbs = 0 ;
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsDeviceClearUSSPending(dev_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseUsbStart(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_START,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+ else
+ {
+ dev_p->usb_count++ ;
+ if (cb)
+ cb(handle, ret, client, CY_FUNCT_CB_USB_START, 0) ;
+ }
+
+ CyAsDeviceClearUSSPending(dev_p) ;
+
+ return ret ;
+}
+
+void
+CyAsUsbReset(CyAsDevice *dev_p)
+{
+ int i ;
+
+ CyAsDeviceClearUsbConnected(dev_p) ;
+
+ for(i = 0 ; i < sizeof(dev_p->usb_config)/sizeof(dev_p->usb_config[0]) ; i++)
+ {
+ /*
+ * Cancel all pending USB read/write operations, as it is possible
+ * that the USB stack comes up in a different configuration with a
+ * different set of endpoints.
+ */
+ if (CyAsDeviceIsUsbAsyncPending(dev_p, i))
+ CyAsUsbCancelAsync(dev_p, (CyAsEndPointNumber_t)i) ;
+
+ dev_p->usb_cb[i] = 0 ;
+ dev_p->usb_config[i].enabled = CyFalse ;
+ }
+
+ dev_p->usb_phy_config = 0 ;
+}
+
+/*
+ * This function does all the API side clean-up associated with CyAsUsbStop,
+ * without any communication with firmware. This needs to be done when the
+ * device is being reset while the USB stack is active.
+ */
+void
+CyAsUsbCleanup(CyAsDevice *dev_p)
+{
+ if (dev_p->usb_count)
+ {
+ CyAsUsbResetEP0State(dev_p) ;
+ CyAsUsbReset(dev_p) ;
+ CyAsHalMemSet(dev_p->usb_config, 0, sizeof(dev_p->usb_config)) ;
+ CyAsDestroyCBQueue(dev_p->usb_func_cbs) ;
+
+ dev_p->usb_count = 0 ;
+ }
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseUsbStop(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /*
+ * We sucessfully shutdown the stack, so decrement to make the count
+ * zero.
+ */
+ CyAsUsbCleanup(dev_p) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsLLRegisterRequestCallback(dev_p, CY_RQT_USB_RQT_CONTEXT, 0) ;
+
+ CyAsDeviceClearUSSPending(dev_p) ;
+
+ return ret ;
+}
+
+/*
+* This function stops the USB stack. The USB stack is reference counted so first is reference count is
+* decremented. If the reference count is then zero, a request is sent to the West Bridge device to stop the USB
+* stack on the West Bridge device.
+*/
+CyAsReturnStatus_t
+CyAsUsbStop(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p = 0, *reply_p = 0 ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbStop called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsUsbConnected(dev_p))
+ return CY_AS_ERROR_USB_CONNECTED ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if(CyAsDeviceIsUSSPending(dev_p))
+ return CY_AS_ERROR_STARTSTOP_PENDING ;
+
+ CyAsDeviceSetUSSPending(dev_p) ;
+
+ if (dev_p->usb_count == 1)
+ {
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_STOP_USB, CY_RQT_USB_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseUsbStop(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_STOP,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+ else if (dev_p->usb_count > 1)
+ {
+ /*
+ * Reset all LEPs to inactive state, after cleaning up any
+ * pending async read/write calls.
+ */
+ CyAsUsbReset(dev_p) ;
+ dev_p->usb_count-- ;
+
+ if (cb)
+ cb(handle, ret, client, CY_FUNCT_CB_USB_STOP, 0) ;
+ }
+
+ CyAsDeviceClearUSSPending(dev_p) ;
+
+ return ret ;
+}
+
+/*
+* This function registers a callback to be called when USB events are processed
+*/
+CyAsReturnStatus_t
+CyAsUsbRegisterCallback(CyAsDeviceHandle handle, CyAsUsbEventCallback callback)
+{
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbRegisterCallback called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ dev_p->usb_event_cb = NULL ;
+ dev_p->usb_event_cb_ms = callback ;
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+
+static CyAsReturnStatus_t
+MyHandleResponseNoData(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseConnect(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ CyAsDeviceSetUsbConnected(dev_p) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+
+/*
+* This method asks the West Bridge device to connect the internal USB D+ and D- signals to the USB
+* pins, thus starting the enumeration processes if the external pins are connnected to a USB host.
+* If the external pins are not connect to a USB host, enumeration will begin as soon as the USB
+* pins are connected to a host.
+*/
+CyAsReturnStatus_t
+CyAsUsbConnect(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbConnect called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_CONNECT_STATE, CY_RQT_USB_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* 1 = Connect request */
+ CyAsLLRequestResponse_SetWord(req_p, 0, 1) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseConnect(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_CONNECT,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseDisconnect(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsReturnStatus_t ret)
+{
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ CyAsDeviceClearUsbConnected(dev_p) ;
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+/*
+* This method forces a disconnect of the D+ and D- pins external to the West Bridge device from the
+* D+ and D- signals internally, effectively disconnecting the West Bridge device from any connectec
+* USB host.
+*/
+CyAsReturnStatus_t
+CyAsUsbDisconnect(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbDisconnect called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if (!CyAsDeviceIsUsbConnected(dev_p))
+ return CY_AS_ERROR_USB_NOT_CONNECTED ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_CONNECT_STATE, CY_RQT_USB_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, 0) ;
+
+ /* Reserve space for the reply, the reply data will not exceed two bytes */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseDisconnect(dev_p, req_p, reply_p, ret) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_DISCONNECT,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseSetEnumConfig(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ /*
+ * We configured the West Bridge device and enumeration is going to happen
+ * on the P port processor. Now we must enable endpoint zero
+ */
+ CyAsUsbEndPointConfig config ;
+
+ config.dir = CyAsUsbInOut ;
+ config.type = CyAsUsbControl ;
+ config.enabled = CyTrue ;
+
+ ret = CyAsUsbSetEndPointConfig((CyAsDeviceHandle*)dev_p, 0, &config) ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*
+* This method sets how the USB is enumerated and should be called before the
+* CyAsUsbConnect() is called.
+*/
+static CyAsReturnStatus_t
+MyUsbSetEnumConfig(CyAsDevice *dev_p,
+ uint8_t bus_mask,
+ uint8_t media_mask,
+ CyBool use_antioch_enumeration,
+ uint8_t mass_storage_interface,
+ uint8_t mtp_interface,
+ CyBool mass_storage_callbacks,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbSetEnumConfig called") ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsUsbConnected(dev_p))
+ return CY_AS_ERROR_USB_CONNECTED ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /* if we are using MTP firmware: */
+ if (dev_p->is_mtp_firmware == 1)
+ {
+ if (mass_storage_interface != 0) /* we can not enemurate MSC */
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ if (bus_mask == 0)
+ {
+ if (mtp_interface != 0)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+ }
+ else if (bus_mask == 2)
+ {
+ /* enable EP 1 as it will be used */
+ CyAsDmaEnableEndPoint(dev_p, 1, CyTrue, CyAsDirectionIn) ;
+ dev_p->usb_config[1].enabled = CyTrue ;
+ dev_p->usb_config[1].dir = CyAsUsbIn ;
+ dev_p->usb_config[1].type = CyAsUsbInt ;
+ }
+ else
+ {
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+ }
+ }
+ else if (mtp_interface != 0) /* if we are not using MTP firmware, we can not enumerate MTP */
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ /*
+ * If we are not enumerating mass storage, we should not be providing an interface
+ * number.
+ */
+ if (bus_mask == 0 && mass_storage_interface != 0)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ /*
+ * If we are going to use mtp_interface, bus mask must be 2.
+ */
+ if (mtp_interface != 0 && bus_mask != 2)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_USB_CONFIG, CY_RQT_USB_RQT_CONTEXT, 4) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Marshal the structure */
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)((media_mask << 8) | bus_mask)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)use_antioch_enumeration) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, dev_p->is_mtp_firmware ? mtp_interface : mass_storage_interface) ;
+ CyAsLLRequestResponse_SetWord(req_p, 3, (uint16_t)mass_storage_callbacks) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseSetEnumConfig(dev_p, req_p, reply_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_SETENUMCONFIG,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*
+ * This method sets how the USB is enumerated and should be called before the
+ * CyAsUsbConnect() is called.
+ */
+CyAsReturnStatus_t
+CyAsUsbSetEnumConfig(CyAsDeviceHandle handle,
+ CyAsUsbEnumControl *config_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ uint8_t bus_mask, media_mask ;
+ uint32_t bus, device ;
+ CyAsReturnStatus_t ret ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if ((CyAsDeviceIsInCallback(dev_p)) && (cb != 0))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /* Since we are mapping the media types to bus with NAND to 0 and the rest
+ * to 1, and we are only allowing for enumerating all the devices on a bus
+ * we just scan the array for any positions where there a device is enabled
+ * and mark the bus to be enumerated.
+ */
+ bus_mask = 0 ;
+ media_mask = 0 ;
+ media_mask = 0 ;
+ for( bus = 0; bus < CY_AS_MAX_BUSES; bus++)
+ {
+ for( device = 0; device < CY_AS_MAX_STORAGE_DEVICES; device++)
+ {
+ if (config_p->devices_to_enumerate[bus][device] == CyTrue)
+ {
+ bus_mask |= (0x01 << bus) ;
+ media_mask |= dev_p->media_supported[bus] ;
+ media_mask |= dev_p->media_supported[bus] ;
+ }
+ }
+ }
+
+ return MyUsbSetEnumConfig(dev_p, bus_mask,media_mask,
+ config_p->antioch_enumeration,
+ config_p->mass_storage_interface,
+ config_p->mtp_interface,
+ config_p->mass_storage_callbacks,
+ cb,
+ client
+ ) ;
+}
+
+
+static CyAsReturnStatus_t
+MyHandleResponseGetEnumConfig(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ void* config_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint16_t val ;
+ uint8_t bus_mask ;
+ uint32_t bus ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_USB_CONFIG)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ /* Marshal the reply */
+ if (req_p->flags & CY_AS_REQUEST_RESPONSE_MS)
+ {
+ uint32_t device ;
+ CyBool state;
+ CyAsUsbEnumControl *ms_config_p = (CyAsUsbEnumControl*)config_p;
+
+ bus_mask = (uint8_t)(CyAsLLRequestResponse_GetWord(reply_p, 0) & 0xFF) ;
+ for( bus = 0; bus < CY_AS_MAX_BUSES; bus++)
+ {
+ if (bus_mask & (1 << bus))
+ state = CyTrue ;
+ else
+ state = CyFalse ;
+
+ for( device = 0; device < CY_AS_MAX_STORAGE_DEVICES; device++)
+ {
+ ms_config_p->devices_to_enumerate[bus][device] = state ;
+ }
+ }
+
+ ms_config_p->antioch_enumeration = (CyBool)CyAsLLRequestResponse_GetWord(reply_p, 1) ;
+
+ val = CyAsLLRequestResponse_GetWord(reply_p, 2) ;
+ if (dev_p->is_mtp_firmware)
+ {
+ ms_config_p->mass_storage_interface = 0 ;
+ ms_config_p->mtp_interface = (uint8_t)(val & 0xFF) ;
+ }
+ else
+ {
+ ms_config_p->mass_storage_interface = (uint8_t)(val & 0xFF) ;
+ ms_config_p->mtp_interface = 0 ;
+ }
+ ms_config_p->mass_storage_callbacks = (CyBool)(val >> 8) ;
+
+ /*
+ * Firmware returns an invalid interface number for mass storage,
+ * if mass storage is not enabled. This needs to be converted to zero
+ * to match the input configuration.
+ */
+ if (bus_mask == 0)
+ {
+ if (dev_p->is_mtp_firmware)
+ ms_config_p->mtp_interface = 0 ;
+ else
+ ms_config_p->mass_storage_interface = 0 ;
+ }
+ }
+ else
+ {
+ CyAsUsbEnumControl_dep *ex_config_p = (CyAsUsbEnumControl_dep*)config_p;
+
+ ex_config_p->enum_mass_storage = (uint8_t)((CyAsLLRequestResponse_GetWord(reply_p, 0) >> 8) & 0xFF) ;
+ ex_config_p->antioch_enumeration = (CyBool)CyAsLLRequestResponse_GetWord(reply_p, 1) ;
+
+ val = CyAsLLRequestResponse_GetWord(reply_p, 2) ;
+ ex_config_p->mass_storage_interface = (uint8_t)(val & 0xFF) ;
+ ex_config_p->mass_storage_callbacks = (CyBool)(val >> 8) ;
+
+ /*
+ * Firmware returns an invalid interface number for mass storage,
+ * if mass storage is not enabled. This needs to be converted to zero
+ * to match the input configuration.
+ */
+ if (ex_config_p->enum_mass_storage == 0)
+ ex_config_p->mass_storage_interface = 0 ;
+ }
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*
+* This sets up the request for the enumerateion configuration information, based on if the request is from
+* the old pre-1.2 functions.
+*/
+static CyAsReturnStatus_t
+MyUsbGetEnumConfig(CyAsDeviceHandle handle,
+ uint16_t req_flags,
+ void* config_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbGetEnumConfig called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_GET_USB_CONFIG, CY_RQT_USB_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Reserve space for the reply, the reply data will not exceed two bytes */
+ reply_p = CyAsLLCreateResponse(dev_p, 3) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ /* we need to know the type of request to know how to manage the data */
+ req_p->flags |= req_flags;
+ return MyHandleResponseGetEnumConfig(dev_p, req_p, reply_p, config_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_GETENUMCONFIG,
+ config_p, dev_p->func_cbs_usb, req_flags, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*
+ * This method returns the enumerateion configuration information from the West Bridge device.
+ * Generally this is not used by client software but is provided mostly for debug information.
+ * We want a method to read all state information from the device.
+ */
+CyAsReturnStatus_t
+CyAsUsbGetEnumConfig(CyAsDeviceHandle handle,
+ CyAsUsbEnumControl *config_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ return MyUsbGetEnumConfig(handle, CY_AS_REQUEST_RESPONSE_MS, config_p, cb, client);
+}
+
+
+/*
+* This method sets the USB descriptor for a given entity.
+*/
+CyAsReturnStatus_t
+CyAsUsbSetDescriptor(CyAsDeviceHandle handle,
+ CyAsUsbDescType type,
+ uint8_t index,
+ void *desc_p,
+ uint16_t length,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint16_t pktlen ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbSetDescriptor called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if (length > CY_AS_MAX_USB_DESCRIPTOR_SIZE)
+ return CY_AS_ERROR_INVALID_DESCRIPTOR ;
+
+ pktlen = (uint16_t)length / 2 ;
+ if (length % 2)
+ pktlen++ ;
+ pktlen += 2 ; /* 1 for type, 1 for length */
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_DESCRIPTOR, CY_RQT_USB_RQT_CONTEXT, (uint16_t)pktlen) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)((uint8_t)type | (index << 8))) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)length) ;
+ CyAsLLRequestResponse_Pack(req_p, 2, length, desc_p) ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseNoData(dev_p, req_p, reply_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_SETDESCRIPTOR,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*
+ * This method clears all descriptors that were previously stored on the West Bridge
+ * through CyAsUsbSetDescriptor calls.
+ */
+CyAsReturnStatus_t
+CyAsUsbClearDescriptors(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbClearDescriptors called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if ((CyAsDeviceIsInCallback(dev_p)) && (cb == 0))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_CLEAR_DESCRIPTORS, CY_RQT_USB_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseNoData(dev_p, req_p, reply_p) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_CLEARDESCRIPTORS,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseGetDescriptor(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyAsGetDescriptorData* data)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint32_t retlen ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ goto destroy ;
+ }
+ else if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_USB_DESCRIPTOR)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ retlen = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ if (retlen > data->length)
+ {
+ ret = CY_AS_ERROR_INVALID_SIZE ;
+ goto destroy ;
+ }
+
+ ret = CY_AS_ERROR_SUCCESS ;
+ CyAsLLRequestResponse_Unpack(reply_p, 1, retlen, data->desc_p) ;
+
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+/*
+* This method retreives the USB descriptor for a given type.
+*/
+CyAsReturnStatus_t
+CyAsUsbGetDescriptor(CyAsDeviceHandle handle,
+ CyAsUsbDescType type,
+ uint8_t index,
+ CyAsGetDescriptorData* data,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbGetDescriptor called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_GET_DESCRIPTOR, CY_RQT_USB_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)((uint8_t)type | (index << 8))) ;
+
+ /* Add one for the length field */
+ reply_p = CyAsLLCreateResponse(dev_p, CY_AS_MAX_USB_DESCRIPTOR_SIZE + 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return MyHandleResponseGetDescriptor(dev_p, req_p, reply_p, data) ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_GETDESCRIPTOR,
+ data, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSetPhysicalConfiguration(CyAsDeviceHandle handle, uint8_t config)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbSetPhysicalConfiguration called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsUsbConnected(dev_p))
+ return CY_AS_ERROR_USB_CONNECTED ;
+
+ if (config < 1 || config > 12)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ dev_p->usb_phy_config = config ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static CyBool
+IsPhysicalValid(uint8_t config, CyAsEndPointNumber_t ep)
+{
+ static uint8_t validmask[12] =
+ {
+ 0x0f, /* Config 1 - 1, 2, 3, 4 */
+ 0x07, /* Config 2 - 1, 2, 3 */
+ 0x07, /* Config 3 - 1, 2, 3 */
+ 0x0d, /* Config 4 - 1, 3, 4 */
+ 0x05, /* Config 5 - 1, 3 */
+ 0x05, /* Config 6 - 1, 3 */
+ 0x0d, /* Config 7 - 1, 3, 4 */
+ 0x05, /* Config 8 - 1, 3 */
+ 0x05, /* Config 9 - 1, 3 */
+ 0x0d, /* Config 10 - 1, 3, 4 */
+ 0x09, /* Config 11 - 1, 4 */
+ 0x01 /* Config 12 - 1 */
+ } ;
+
+ return (validmask[config - 1] & (1 << (ep - 1))) ? CyTrue : CyFalse ;
+}
+
+/*
+* This method sets the configuration for an endpoint
+*/
+CyAsReturnStatus_t
+CyAsUsbSetEndPointConfig(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyAsUsbEndPointConfig *config_p)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbSetEndPointConfig called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsUsbConnected(dev_p))
+ return CY_AS_ERROR_USB_CONNECTED ;
+
+ if (ep >= 16 || ep == 2 || ep == 4 || ep == 6 || ep == 8)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ if (ep == 0)
+ {
+ /* Endpoint 0 must be 64 byte, dir IN/OUT, and control type */
+ if (config_p->dir != CyAsUsbInOut || config_p->type != CyAsUsbControl)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+ }
+ else if (ep == 1)
+ {
+ if ((dev_p->is_mtp_firmware == 1) && (dev_p->usb_config[1].enabled == CyTrue))
+ {
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+ }
+
+ /*
+ * EP1 can only be used either as an OUT ep, or as an IN ep.
+ */
+ if ((config_p->type == CyAsUsbControl) || (config_p->type == CyAsUsbIso) || (config_p->dir == CyAsUsbInOut))
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+ }
+ else
+ {
+ if (config_p->dir == CyAsUsbInOut || config_p->type == CyAsUsbControl)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ if (!IsPhysicalValid(dev_p->usb_phy_config, config_p->physical))
+ return CY_AS_ERROR_INVALID_PHYSICAL_ENDPOINT ;
+
+ /*
+ * ISO endpoints must be on EPs 3, 5, 7 or 9 as they need to align directly
+ * with the underlying physical endpoint.
+ */
+ if (config_p->type == CyAsUsbIso)
+ {
+ if (ep != 3 && ep != 5 && ep != 7 && ep != 9)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ if (ep == 3 && config_p->physical != 1)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ if (ep == 5 && config_p->physical != 2)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ if (ep == 7 && config_p->physical != 3)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+
+ if (ep == 9 && config_p->physical != 4)
+ return CY_AS_ERROR_INVALID_CONFIGURATION ;
+ }
+ }
+
+ /* Store the configuration information until a CyAsUsbCommitConfig is done */
+ dev_p->usb_config[ep] = *config_p ;
+
+ /* If the endpoint is enabled, enable DMA associated with the endpoint */
+ /*
+ * We make some assumptions that we check here. We assume that the direction fields for the
+ * DMA module are the same values as the direction values for the USB module. At some point these should
+ * be consolidated into a single enumerated type. - BWG
+ */
+ CyAsHalAssert((int)CyAsUsbIn == (int)CyAsDirectionIn);
+ CyAsHalAssert((int)CyAsUsbOut == (int)CyAsDirectionOut);
+ CyAsHalAssert((int)CyAsUsbInOut == (int)CyAsDirectionInOut) ;
+
+ return CyAsDmaEnableEndPoint(dev_p, ep, config_p->enabled, (CyAsDmaDirection)config_p->dir) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbGetEndPointConfig(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyAsUsbEndPointConfig *config_p)
+{
+ CyAsReturnStatus_t ret ;
+
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbGetEndPointConfig called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (ep >= 16 || ep == 2 || ep == 4 || ep == 6 || ep == 8)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ *config_p = dev_p->usb_config[ep] ;
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+* Commit the configuration of the various endpoints to the hardware.
+*/
+CyAsReturnStatus_t
+CyAsUsbCommitConfig(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ uint32_t i ;
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ CyAsDevice*dev_p ;
+ uint16_t data ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbCommitConfig called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsUsbConnected(dev_p))
+ return CY_AS_ERROR_USB_CONNECTED ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /*
+ * This performs the mapping based on informatation that was previously
+ * stored on the device about the various endpoints and how they are configured. The
+ * output of this mapping is setting the the 14 register values contained in usb_lepcfg
+ * and usb_pepcfg
+ */
+ ret = CyAsUsbMapLogical2Physical(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /*
+ * Now, package the information about the various logical and physical
+ * endpoint configuration registers and send it across to the West Bridge
+ * device.
+ */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_SET_USB_CONFIG_REGISTERS, CY_RQT_USB_RQT_CONTEXT, 8) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsHalPrintMessage("USB Configuration: %d\n", dev_p->usb_phy_config) ;
+ CyAsHalPrintMessage("EP1OUT: 0x%02x EP1IN: 0x%02x\n", dev_p->usb_ep1cfg[0], dev_p->usb_ep1cfg[1]) ;
+ CyAsHalPrintMessage("PEP Registers: 0x%02x 0x%02x 0x%02x 0x%02x\n", dev_p->usb_pepcfg[0],
+ dev_p->usb_pepcfg[1], dev_p->usb_pepcfg[2], dev_p->usb_pepcfg[3]) ;
+
+ CyAsHalPrintMessage("LEP Registers: 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x 0x%02x\n",
+ dev_p->usb_lepcfg[0],dev_p->usb_lepcfg[1], dev_p->usb_lepcfg[2], dev_p->usb_lepcfg[3],
+ dev_p->usb_lepcfg[4],dev_p->usb_lepcfg[5], dev_p->usb_lepcfg[6], dev_p->usb_lepcfg[7],
+ dev_p->usb_lepcfg[8],dev_p->usb_lepcfg[9]) ;
+
+ /* Write the EP1OUTCFG and EP1INCFG data in the first word. */
+ data = (uint16_t)((dev_p->usb_ep1cfg[0] << 8) | dev_p->usb_ep1cfg[1]) ;
+ CyAsLLRequestResponse_SetWord(req_p, 0, data) ;
+
+ /* Write the PEP CFG data in the next 2 words */
+ for(i = 0 ; i < 4 ; i += 2)
+ {
+ data = (uint16_t)((dev_p->usb_pepcfg[i] << 8) | dev_p->usb_pepcfg[i + 1]) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1 + i / 2, data) ;
+ }
+
+ /* Write the LEP CFG data in the next 5 words */
+ for(i = 0 ; i < 10 ; i += 2)
+ {
+ data = (uint16_t)((dev_p->usb_lepcfg[i] << 8) | dev_p->usb_lepcfg[i + 1]) ;
+ CyAsLLRequestResponse_SetWord(req_p, 3 + i / 2, data) ;
+ }
+
+ /* A single status word response type */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ ret = MyHandleResponseNoData(dev_p, req_p, reply_p) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ ret = CyAsUsbSetupDma(dev_p) ;
+
+ return ret ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_COMMITCONFIG,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static void
+SyncRequestCallback(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *buf_p, uint32_t size, CyAsReturnStatus_t err)
+{
+ (void)ep ;
+ (void)buf_p ;
+
+ dev_p->usb_error = err ;
+ dev_p->usb_actual_cnt = size ;
+}
+
+static void
+AsyncReadRequestCallback(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *buf_p, uint32_t size, CyAsReturnStatus_t err)
+{
+ CyAsDeviceHandle h ;
+
+ CyAsLogDebugMessage(6, "AsyncReadRequestCallback called") ;
+
+ h = (CyAsDeviceHandle)dev_p ;
+
+ if (ep == 0 && CyAsDeviceIsAckDelayed(dev_p))
+ {
+ dev_p->usb_pending_buffer = buf_p ;
+ dev_p->usb_pending_size = size ;
+ dev_p->usb_error = err ;
+ CyAsUsbAckSetupPacket(h, UsbAckCallback, 0) ;
+ }
+ else
+ {
+ CyAsUsbIoCallback cb ;
+
+ cb = dev_p->usb_cb[ep] ;
+ dev_p->usb_cb[ep] = 0 ;
+ CyAsDeviceClearUsbAsyncPending(dev_p, ep) ;
+ if (cb)
+ cb(h, ep, size, buf_p, err) ;
+ }
+}
+
+static void
+AsyncWriteRequestCallback(CyAsDevice *dev_p, CyAsEndPointNumber_t ep, void *buf_p, uint32_t size, CyAsReturnStatus_t err)
+{
+ CyAsDeviceHandle h ;
+
+ CyAsLogDebugMessage(6, "AsyncWriteRequestCallback called") ;
+
+ h = (CyAsDeviceHandle)dev_p ;
+
+ if (ep == 0 && CyAsDeviceIsAckDelayed(dev_p))
+ {
+ dev_p->usb_pending_buffer = buf_p ;
+ dev_p->usb_pending_size = size ;
+ dev_p->usb_error = err ;
+
+ /* The west bridge protocol generates ZLPs as required. */
+ CyAsUsbAckSetupPacket(h, UsbAckCallback, 0) ;
+ }
+ else
+ {
+ CyAsUsbIoCallback cb ;
+
+ cb = dev_p->usb_cb[ep] ;
+ dev_p->usb_cb[ep] = 0 ;
+
+ CyAsDeviceClearUsbAsyncPending(dev_p, ep) ;
+ if (cb)
+ cb(h, ep, size, buf_p, err) ;
+ }
+}
+
+static void
+MyTurboRqtCallback(CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t stat)
+{
+ uint8_t code ;
+
+ (void)context ;
+ (void)stat ;
+
+ /* The Handlers are responsible for Deleting the rqt and resp when
+ * they are finished
+ */
+ code = CyAsLLRequestResponse_GetCode(rqt) ;
+ switch(code)
+ {
+ case CY_RQT_TURBO_SWITCH_ENDPOINT:
+ CyAsHalAssert(stat == CY_AS_ERROR_SUCCESS) ;
+ CyAsLLDestroyRequest(dev_p, rqt) ;
+ CyAsLLDestroyResponse(dev_p, resp) ;
+ break;
+ default:
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+}
+
+/* Send a mailbox request to prepare the endpoint for switching */
+static CyAsReturnStatus_t
+MySendTurboSwitch(CyAsDevice* dev_p, uint32_t size, CyBool pktread)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+
+ /* Create the request to send to the West Bridge device */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_TURBO_SWITCH_ENDPOINT, CY_RQT_TUR_RQT_CONTEXT, 3) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)pktread) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((size >> 16) & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(size & 0xFFFF)) ;
+
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, MyTurboRqtCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyRequest(dev_p, reply_p) ;
+ return ret ;
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbReadData(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyBool pktread, uint32_t dsize, uint32_t *dataread, void *data)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbReadData called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if (ep >= 16 || ep == 4 || ep == 6 || ep == 8)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* EP2 is available for reading when MTP is active */
+ if(dev_p->mtp_count == 0 && ep == CY_AS_MTP_READ_ENDPOINT)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* If the endpoint is disabled, we cannot write data to the endpoint */
+ if (!dev_p->usb_config[ep].enabled)
+ return CY_AS_ERROR_ENDPOINT_DISABLED ;
+
+ if (dev_p->usb_config[ep].dir != CyAsUsbOut)
+ return CY_AS_ERROR_USB_BAD_DIRECTION ;
+
+ ret = CyAsDmaQueueRequest(dev_p, ep, data, dsize, pktread, CyTrue, SyncRequestCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (ep == CY_AS_MTP_READ_ENDPOINT )
+ {
+ ret = MySendTurboSwitch(dev_p, dsize, pktread) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, ep, ret) ;
+ return ret ;
+ }
+
+ ret = CyAsDmaDrainQueue(dev_p, ep, CyFalse) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+ else
+ {
+ ret = CyAsDmaDrainQueue(dev_p, ep, CyTrue) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+
+ ret = dev_p->usb_error ;
+ *dataread = dev_p->usb_actual_cnt ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbReadDataAsync(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyBool pktread, uint32_t dsize, void *data, CyAsUsbIoCallback cb)
+{
+ CyAsReturnStatus_t ret ;
+ uint32_t mask ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbReadDataAsync called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (ep >= 16 || ep == 4 || ep == 6 || ep == 8)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* EP2 is available for reading when MTP is active */
+ if(dev_p->mtp_count == 0 && ep == CY_AS_MTP_READ_ENDPOINT)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* If the endpoint is disabled, we cannot write data to the endpoint */
+ if (!dev_p->usb_config[ep].enabled)
+ return CY_AS_ERROR_ENDPOINT_DISABLED ;
+
+ if (dev_p->usb_config[ep].dir != CyAsUsbOut && dev_p->usb_config[ep].dir != CyAsUsbInOut)
+ return CY_AS_ERROR_USB_BAD_DIRECTION ;
+
+ /*
+ * Since async operations can be triggered by interrupt code, we must
+ * insure that we do not get multiple async operations going at one time and
+ * protect this test and set operation from interrupts.
+ */
+ mask = CyAsHalDisableInterrupts() ;
+ if (CyAsDeviceIsUsbAsyncPending(dev_p, ep))
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ return CY_AS_ERROR_ASYNC_PENDING ;
+ }
+ CyAsDeviceSetUsbAsyncPending(dev_p, ep) ;
+
+ /*
+ * If this is for EP0, we set this bit to delay the ACK response
+ * until after this read has completed.
+ */
+ if (ep == 0)
+ CyAsDeviceSetAckDelayed(dev_p) ;
+
+ CyAsHalEnableInterrupts(mask) ;
+
+ CyAsHalAssert(dev_p->usb_cb[ep] == 0) ;
+ dev_p->usb_cb[ep] = cb ;
+
+ ret = CyAsDmaQueueRequest(dev_p, ep, data, dsize, pktread, CyTrue, AsyncReadRequestCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (ep == CY_AS_MTP_READ_ENDPOINT)
+ {
+ ret = MySendTurboSwitch(dev_p, dsize, pktread) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, ep, ret) ;
+ return ret ;
+ }
+ }
+ else
+ {
+ /* Kick start the queue if it is not running */
+ CyAsDmaKickStart(dev_p, ep) ;
+ }
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbWriteData(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, uint32_t dsize, void *data)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbWriteData called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if (ep >= 16 || ep == 2 || ep == 4 || ep == 8)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* EP6 is available for writing when MTP is active */
+ if(dev_p->mtp_count == 0 && ep == CY_AS_MTP_WRITE_ENDPOINT)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* If the endpoint is disabled, we cannot write data to the endpoint */
+ if (!dev_p->usb_config[ep].enabled)
+ return CY_AS_ERROR_ENDPOINT_DISABLED ;
+
+ if (dev_p->usb_config[ep].dir != CyAsUsbIn && dev_p->usb_config[ep].dir != CyAsUsbInOut)
+ return CY_AS_ERROR_USB_BAD_DIRECTION ;
+
+ /* Write on Turbo endpoint */
+ if (ep == CY_AS_MTP_WRITE_ENDPOINT)
+ {
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_TURBO_SEND_RESP_DATA_TO_HOST, CY_RQT_TUR_RQT_CONTEXT, 3) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, 0x0006) ; /* EP number to use. */
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((dsize >> 16) & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(dsize & 0xFFFF)) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if (dsize)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data, dsize, CyFalse, CyFalse, SyncRequestCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ }
+
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ if (dsize)
+ CyAsDmaCancel(dev_p, ep, ret) ;
+ return ret ;
+ }
+
+ /* If this is a zero-byte write, firmware will handle it.
+ * There is no need to do any work here.
+ */
+ if (!dsize)
+ return CY_AS_ERROR_SUCCESS ;
+ }
+ else
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data, dsize, CyFalse, CyFalse, SyncRequestCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+
+ if (ep != CY_AS_MTP_WRITE_ENDPOINT)
+ ret = CyAsDmaDrainQueue(dev_p, ep, CyTrue) ;
+ else
+ ret = CyAsDmaDrainQueue(dev_p, ep, CyFalse) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ ret = dev_p->usb_error ;
+ return ret ;
+}
+
+static void
+MtpWriteCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ CyAsUsbIoCallback cb ;
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+
+ CyAsHalAssert(context == CY_RQT_TUR_RQT_CONTEXT) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (CyAsLLRequestResponse_GetCode(resp) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) ;
+ }
+
+ /* If this was a zero byte transfer request, we can call the callback from
+ * here. */
+ if ((CyAsLLRequestResponse_GetWord(rqt, 1) == 0) &&
+ (CyAsLLRequestResponse_GetWord(rqt, 2) == 0))
+ {
+ cb = dev_p->usb_cb[CY_AS_MTP_WRITE_ENDPOINT] ;
+ dev_p->usb_cb[CY_AS_MTP_WRITE_ENDPOINT] = 0 ;
+ CyAsDeviceClearUsbAsyncPending(dev_p, CY_AS_MTP_WRITE_ENDPOINT) ;
+ if (cb)
+ cb(h, CY_AS_MTP_WRITE_ENDPOINT, 0, 0, ret) ;
+
+ goto destroy ;
+ }
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ /* Firmware failed the request. Cancel the DMA transfer. */
+ CyAsDmaCancel(dev_p, 0x06, CY_AS_ERROR_CANCELED) ;
+ dev_p->usb_cb[0x06] = 0 ;
+ CyAsDeviceClearUsbAsyncPending(dev_p, 0x06) ;
+ }
+
+destroy:
+ CyAsLLDestroyResponse(dev_p, resp) ;
+ CyAsLLDestroyRequest(dev_p, rqt) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbWriteDataAsync(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, uint32_t dsize, void *data, CyBool spacket, CyAsUsbIoCallback cb)
+{
+ uint32_t mask ;
+ CyAsReturnStatus_t ret ;
+ CyAsDevice *dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbWriteDataAsync called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (ep >= 16 || ep == 2 || ep == 4 || ep == 8)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* EP6 is available for writing when MTP is active */
+ if(dev_p->mtp_count == 0 && ep == CY_AS_MTP_WRITE_ENDPOINT)
+ return CY_AS_ERROR_INVALID_ENDPOINT ;
+
+ /* If the endpoint is disabled, we cannot write data to the endpoint */
+ if (!dev_p->usb_config[ep].enabled)
+ return CY_AS_ERROR_ENDPOINT_DISABLED ;
+
+ if (dev_p->usb_config[ep].dir != CyAsUsbIn && dev_p->usb_config[ep].dir != CyAsUsbInOut)
+ return CY_AS_ERROR_USB_BAD_DIRECTION ;
+
+ /*
+ * Since async operations can be triggered by interrupt code, we must
+ * insure that we do not get multiple async operations going at one time and
+ * protect this test and set operation from interrupts.
+ */
+ mask = CyAsHalDisableInterrupts() ;
+ if (CyAsDeviceIsUsbAsyncPending(dev_p, ep))
+ {
+ CyAsHalEnableInterrupts(mask) ;
+ return CY_AS_ERROR_ASYNC_PENDING ;
+ }
+
+ CyAsDeviceSetUsbAsyncPending(dev_p, ep) ;
+
+ if (ep == 0)
+ CyAsDeviceSetAckDelayed(dev_p) ;
+
+ CyAsHalEnableInterrupts(mask) ;
+
+ CyAsHalAssert(dev_p->usb_cb[ep] == 0) ;
+ dev_p->usb_cb[ep] = cb ;
+ dev_p->usb_spacket[ep] = spacket ;
+
+ /* Write on Turbo endpoint */
+ if (ep == CY_AS_MTP_WRITE_ENDPOINT)
+ {
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_TURBO_SEND_RESP_DATA_TO_HOST, CY_RQT_TUR_RQT_CONTEXT, 3) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, 0x0006) ; /* EP number to use. */
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)((dsize >> 16) & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)(dsize & 0xFFFF)) ;
+
+ /* Reserve space for the reply, the reply data will not exceed one word */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if (dsize)
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data, dsize, CyFalse, CyFalse, AsyncWriteRequestCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, MtpWriteCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ if (dsize)
+ CyAsDmaCancel(dev_p, ep, ret) ;
+ return ret ;
+ }
+
+ /* Firmware will handle a zero byte transfer without any DMA transfers. */
+ if (!dsize)
+ return CY_AS_ERROR_SUCCESS ;
+ }
+ else
+ {
+ ret = CyAsDmaQueueRequest(dev_p, ep, data, dsize, CyFalse, CyFalse, AsyncWriteRequestCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+ }
+
+ /* Kick start the queue if it is not running */
+ if (ep != CY_AS_MTP_WRITE_ENDPOINT)
+ {
+ CyAsDmaKickStart(dev_p, ep) ;
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+MyUsbCancelAsyncCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ uint8_t ep ;
+ (void)context ;
+
+ ep = (uint8_t)CyAsLLRequestResponse_GetWord(rqt, 0) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (CyAsLLRequestResponse_GetCode(resp) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) ;
+ }
+
+ CyAsLLDestroyRequest(dev_p, rqt) ;
+ CyAsLLDestroyResponse(dev_p, resp) ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_CANCELED) ;
+ dev_p->usb_cb[ep] = 0 ;
+ CyAsDeviceClearUsbAsyncPending(dev_p, ep) ;
+ }
+}
+
+CyAsReturnStatus_t
+CyAsUsbCancelAsync(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p, *reply_p ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ep &= 0x7F; /* Remove the direction bit. */
+ if (!CyAsDeviceIsUsbAsyncPending(dev_p, ep))
+ return CY_AS_ERROR_ASYNC_NOT_PENDING;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInSuspendMode(dev_p))
+ return CY_AS_ERROR_IN_SUSPEND ;
+
+ if ((ep == CY_AS_MTP_WRITE_ENDPOINT) || (ep == CY_AS_MTP_READ_ENDPOINT))
+ {
+ /* Need firmware support for the cancel operation. */
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_CANCEL_ASYNC_TRANSFER, CY_RQT_TUR_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)ep) ;
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, MyUsbCancelAsyncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ return ret ;
+ }
+ }
+ else
+ {
+ ret = CyAsDmaCancel(dev_p, ep, CY_AS_ERROR_CANCELED) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ dev_p->usb_cb[ep] = 0 ;
+ CyAsDeviceClearUsbAsyncPending(dev_p, ep) ;
+ }
+
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+static void
+CyAsUsbAckCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t ret)
+{
+ CyAsFuncCBNode* node = (CyAsFuncCBNode*)dev_p->func_cbs_usb->head_p ;
+
+ (void)context ;
+
+ if (ret == CY_AS_ERROR_SUCCESS)
+ {
+ if (CyAsLLRequestResponse_GetCode(resp) != CY_RESP_SUCCESS_FAILURE)
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ else
+ ret = CyAsLLRequestResponse_GetWord(resp, 0) ;
+ }
+
+ node->cb_p((CyAsDeviceHandle)dev_p, ret, node->client_data, (CyAsFunctCBType)node->dataType, node->data) ;
+ CyAsRemoveCBNode(dev_p->func_cbs_usb) ;
+
+ CyAsLLDestroyRequest(dev_p, rqt) ;
+ CyAsLLDestroyResponse(dev_p, resp) ;
+ CyAsDeviceClearAckDelayed(dev_p) ;
+}
+
+static CyAsReturnStatus_t
+CyAsUsbAckSetupPacket(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p ;
+ CyAsLLRequestResponse *reply_p ;
+ CyAsFuncCBNode* cbnode ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p) && cb == 0)
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ CyAsHalAssert(cb != 0) ;
+
+ cbnode = CyAsCreateFuncCBNode(cb, client);
+ if( cbnode == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ req_p = CyAsLLCreateRequest(dev_p, 0, CY_RQT_USB_RQT_CONTEXT, 2) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if(reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ CyAsLLInitRequest(req_p, CY_RQT_ACK_SETUP_PACKET, CY_RQT_USB_RQT_CONTEXT, 1) ;
+ CyAsLLInitResponse(reply_p, 1) ;
+
+ req_p->flags |= CY_AS_REQUEST_RESPONSE_EX ;
+
+ CyAsInsertCBNode(dev_p->func_cbs_usb, cbnode) ;
+
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, CyAsUsbAckCallback) ;
+
+ return ret ;
+}
+
+/*
+ * Flush all data in logical EP that is being NAK-ed or Stall-ed,
+ * so that this does not continue to block data on other LEPs that
+ * use the same physical EP.
+ */
+static void
+CyAsUsbFlushLogicalEP(
+ CyAsDevice *dev_p,
+ uint16_t ep)
+{
+ uint16_t addr, val, count ;
+
+ addr = CY_AS_MEM_P0_EP2_DMA_REG + ep - 2 ;
+ val = CyAsHalReadRegister(dev_p->tag, addr) ;
+
+ while (val)
+ {
+ count = ((val & 0xFFF) + 1) / 2 ;
+ while (count--)
+ {
+ val = CyAsHalReadRegister(dev_p->tag, ep) ;
+ }
+
+ CyAsHalWriteRegister(dev_p->tag, addr, 0) ;
+ val = CyAsHalReadRegister(dev_p->tag, addr) ;
+ }
+}
+
+static CyAsReturnStatus_t
+CyAsUsbNakStallRequest(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ uint16_t request,
+ CyBool state,
+ CyAsUsbFunctionCallback cb,
+ CyAsFunctionCallback fcb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ uint16_t data ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if(cb)
+ CyAsHalAssert(fcb == 0) ;
+ if(fcb)
+ CyAsHalAssert(cb == 0) ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p) && cb == 0 && fcb == 0)
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ req_p = CyAsLLCreateRequest(dev_p, request, CY_RQT_USB_RQT_CONTEXT, 2) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* A single status word response type */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Set the endpoint */
+ data = (uint8_t)ep ;
+ CyAsLLRequestResponse_SetWord(req_p, 0, data) ;
+
+ /* Set stall state to stalled */
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint8_t)state) ;
+
+ if (cb || fcb)
+ {
+ void * cbnode ;
+ CyAsCBQueue* queue ;
+ if(cb)
+ {
+ cbnode = CyAsCreateUsbFuncCBNode(cb, client) ;
+ queue = dev_p->usb_func_cbs ;
+ }
+ else
+ {
+ cbnode = CyAsCreateFuncCBNode(fcb, client) ;
+ queue = dev_p->func_cbs_usb ;
+ req_p->flags |= CY_AS_REQUEST_RESPONSE_EX ;
+ }
+
+ if(cbnode == 0)
+ {
+ ret = CY_AS_ERROR_OUT_OF_MEMORY ;
+ goto destroy ;
+ }
+ else
+ CyAsInsertCBNode(queue, cbnode) ;
+
+
+ if (CyAsDeviceIsSetupPacket(dev_p))
+ {
+ /* No Ack is needed on a stall request on EP0 */
+ if ((state == CyTrue) && (ep == 0))
+ {
+ CyAsDeviceSetEp0Stalled(dev_p) ;
+ }
+ else
+ {
+ CyAsDeviceSetAckDelayed(dev_p) ;
+ req_p->flags |= CY_AS_REQUEST_RESPONSE_DELAY_ACK ;
+ }
+ }
+
+ ret = CyAsLLSendRequest(dev_p, req_p, reply_p, CyFalse, CyAsUsbFuncCallback) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ if (req_p->flags & CY_AS_REQUEST_RESPONSE_DELAY_ACK)
+ CyAsDeviceRemAckDelayed(dev_p) ;
+ CyAsRemoveCBTailNode(queue) ;
+
+ goto destroy ;
+ }
+ }
+ else
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) != CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+
+ if ((ret == CY_AS_ERROR_SUCCESS) && (request == CY_RQT_STALL_ENDPOINT))
+ {
+ if ((ep > 1) && (state != 0) && (dev_p->usb_config[ep].dir == CyAsUsbOut))
+ CyAsUsbFlushLogicalEP(dev_p, ep) ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+ }
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseGetStall(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyBool *state_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t code = CyAsLLRequestResponse_GetCode(reply_p) ;
+
+ if (code == CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ goto destroy ;
+ }
+ else if (code != CY_RESP_ENDPOINT_STALL)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ *state_p = (CyBool)CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ ret = CY_AS_ERROR_SUCCESS ;
+
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+MyHandleResponseGetNak(CyAsDevice* dev_p,
+ CyAsLLRequestResponse *req_p,
+ CyAsLLRequestResponse *reply_p,
+ CyBool *state_p)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+ uint8_t code = CyAsLLRequestResponse_GetCode(reply_p) ;
+
+ if (code == CY_RESP_SUCCESS_FAILURE)
+ {
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ goto destroy ;
+ }
+ else if (code != CY_RESP_ENDPOINT_NAK)
+ {
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ goto destroy ;
+ }
+
+ *state_p = (CyBool)CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ ret = CY_AS_ERROR_SUCCESS ;
+
+
+destroy :
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static CyAsReturnStatus_t
+CyAsUsbGetNakStall(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ uint16_t request,
+ uint16_t response,
+ CyBool *state_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ uint16_t data ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+
+ (void)response ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p) && !cb)
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ req_p = CyAsLLCreateRequest(dev_p, request, CY_RQT_USB_RQT_CONTEXT, 1) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* Set the endpoint */
+ data = (uint8_t)ep ;
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)ep) ;
+
+ /* A single status word response type */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if(cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if(request == CY_RQT_GET_STALL)
+ return MyHandleResponseGetStall(dev_p, req_p, reply_p, state_p) ;
+ else
+ return MyHandleResponseGetNak(dev_p, req_p, reply_p, state_p) ;
+
+ }
+ else
+ {
+ CyAsFunctCBType type ;
+
+ if(request == CY_RQT_GET_STALL)
+ type = CY_FUNCT_CB_USB_GETSTALL ;
+ else
+ type = CY_FUNCT_CB_USB_GETNAK ;
+
+ ret = CyAsMiscSendRequest(dev_p, cb, client, type,
+ state_p, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSetNak(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ if(dev_p->mtp_count > 0)
+ return CY_AS_ERROR_NOT_VALID_IN_MTP ;
+
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_ENDPOINT_SET_NAK, CyTrue, 0, cb, client) ;
+}
+
+
+CyAsReturnStatus_t
+CyAsUsbClearNak(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ if(dev_p->mtp_count > 0)
+ return CY_AS_ERROR_NOT_VALID_IN_MTP ;
+
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_ENDPOINT_SET_NAK, CyFalse, 0, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbGetNak(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ CyBool *nak_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ if(dev_p->mtp_count > 0)
+ return CY_AS_ERROR_NOT_VALID_IN_MTP ;
+
+ return CyAsUsbGetNakStall(handle, ep, CY_RQT_GET_ENDPOINT_NAK, CY_RESP_ENDPOINT_NAK, nak_p, cb, client ) ;
+}
+
+
+CyAsReturnStatus_t
+CyAsUsbSetStall(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ if(dev_p->mtp_turbo_active)
+ return CY_AS_ERROR_NOT_VALID_DURING_MTP ;
+
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_STALL_ENDPOINT, CyTrue, 0, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbClearStall(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ if(dev_p->mtp_turbo_active)
+ return CY_AS_ERROR_NOT_VALID_DURING_MTP ;
+
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_STALL_ENDPOINT, CyFalse, 0, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbGetStall(CyAsDeviceHandle handle,
+ CyAsEndPointNumber_t ep,
+ CyBool *stall_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ if(dev_p->mtp_turbo_active)
+ return CY_AS_ERROR_NOT_VALID_DURING_MTP ;
+
+ return CyAsUsbGetNakStall(handle, ep, CY_RQT_GET_STALL, CY_RESP_ENDPOINT_STALL, stall_p, cb, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSignalRemoteWakeup(CyAsDeviceHandle handle,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if (CyAsDeviceIsInCallback(dev_p))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ if (dev_p->usb_last_event != CyAsEventUsbSuspend)
+ return CY_AS_ERROR_NOT_IN_SUSPEND ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_USB_REMOTE_WAKEUP, CY_RQT_USB_RQT_CONTEXT, 0) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* A single status word response type */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ if (cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_SUCCESS_FAILURE)
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_SIGNALREMOTEWAKEUP,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSetMSReportThreshold(CyAsDeviceHandle handle,
+ uint32_t wr_sectors,
+ uint32_t rd_sectors,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ if ((cb == 0) && (CyAsDeviceIsInCallback(dev_p)))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ /* Check if the firmware version supports this feature. */
+ if ((dev_p->media_supported[0]) && (dev_p->media_supported[0] == (1 << CyAsMediaNand)))
+ return CY_AS_ERROR_NOT_SUPPORTED ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_USB_STORAGE_MONITOR, CY_RQT_USB_RQT_CONTEXT, 4) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* A single status word response type */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Set the read and write count parameters into the request structure. */
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)((wr_sectors >> 16) & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 1, (uint16_t)(wr_sectors & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 2, (uint16_t)((rd_sectors >> 16) & 0xFFFF)) ;
+ CyAsLLRequestResponse_SetWord(req_p, 3, (uint16_t)(rd_sectors & 0xFFFF)) ;
+
+ if (cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_SUCCESS_FAILURE)
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_USB_SET_MSREPORT_THRESHOLD,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSelectMSPartitions (
+ CyAsDeviceHandle handle,
+ CyAsBusNumber_t bus,
+ uint32_t device,
+ CyAsUsbMSType_t type,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsLLRequestResponse *req_p , *reply_p ;
+ uint16_t val ;
+
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = IsUsbActive(dev_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ /* This API has to be made before SetEnumConfig is called. */
+ if (dev_p->usb_config[0].enabled)
+ return CY_AS_ERROR_INVALID_CALL_SEQUENCE ;
+
+ if ((cb == 0) && (CyAsDeviceIsInCallback(dev_p)))
+ return CY_AS_ERROR_INVALID_IN_CALLBACK ;
+
+ req_p = CyAsLLCreateRequest(dev_p, CY_RQT_MS_PARTITION_SELECT, CY_RQT_USB_RQT_CONTEXT, 2) ;
+ if (req_p == 0)
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+
+ /* A single status word response type */
+ reply_p = CyAsLLCreateResponse(dev_p, 1) ;
+ if (reply_p == 0)
+ {
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ return CY_AS_ERROR_OUT_OF_MEMORY ;
+ }
+
+ /* Set the read and write count parameters into the request structure. */
+ CyAsLLRequestResponse_SetWord(req_p, 0, (uint16_t)((bus << 8) | device)) ;
+
+ val = 0 ;
+ if ((type == CyAsUsbMSUnit0) || (type == CyAsUsbMSBoth))
+ val |= 1 ;
+ if ((type == CyAsUsbMSUnit1) || (type == CyAsUsbMSBoth))
+ val |= (1 << 8) ;
+
+ CyAsLLRequestResponse_SetWord(req_p, 1, val) ;
+
+ if (cb == 0)
+ {
+ ret = CyAsLLSendRequestWaitReply(dev_p, req_p, reply_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+
+ if (CyAsLLRequestResponse_GetCode(reply_p) == CY_RESP_SUCCESS_FAILURE)
+ ret = CyAsLLRequestResponse_GetWord(reply_p, 0) ;
+ else
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ }
+ else
+ {
+ ret = CyAsMiscSendRequest(dev_p, cb, client, CY_FUNCT_CB_NODATA,
+ 0, dev_p->func_cbs_usb, CY_AS_REQUEST_RESPONSE_EX, req_p, reply_p,
+ CyAsUsbFuncCallback) ;
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ goto destroy ;
+ return ret ;
+ }
+
+destroy:
+ CyAsLLDestroyRequest(dev_p, req_p) ;
+ CyAsLLDestroyResponse(dev_p, reply_p) ;
+
+ return ret ;
+}
+
+static void
+CyAsUsbFuncCallback(
+ CyAsDevice *dev_p,
+ uint8_t context,
+ CyAsLLRequestResponse *rqt,
+ CyAsLLRequestResponse *resp,
+ CyAsReturnStatus_t stat)
+{
+ CyAsUsbFuncCBNode* node = (CyAsUsbFuncCBNode*)dev_p->usb_func_cbs->head_p ;
+ CyAsFuncCBNode* fnode = (CyAsFuncCBNode*)dev_p->func_cbs_usb->head_p ;
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;
+
+ CyAsDeviceHandle h = (CyAsDeviceHandle)dev_p ;
+ CyBool delayed_ack = (rqt->flags & CY_AS_REQUEST_RESPONSE_DELAY_ACK) == CY_AS_REQUEST_RESPONSE_DELAY_ACK;
+ CyBool exRequest = (rqt->flags & CY_AS_REQUEST_RESPONSE_EX) == CY_AS_REQUEST_RESPONSE_EX ;
+ CyBool msRequest = (rqt->flags & CY_AS_REQUEST_RESPONSE_MS) == CY_AS_REQUEST_RESPONSE_MS ;
+ uint8_t code ;
+ uint8_t ep, state ;
+
+ if(!exRequest && !msRequest)
+ {
+ CyAsHalAssert(dev_p->usb_func_cbs->count != 0) ;
+ CyAsHalAssert(dev_p->usb_func_cbs->type == CYAS_USB_FUNC_CB) ;
+ }
+ else
+ {
+ CyAsHalAssert(dev_p->func_cbs_usb->count != 0) ;
+ CyAsHalAssert(dev_p->func_cbs_usb->type == CYAS_FUNC_CB) ;
+ }
+
+ (void)context ;
+
+ /* The Handlers are responsible for Deleting the rqt and resp when
+ * they are finished
+ */
+ code = CyAsLLRequestResponse_GetCode(rqt) ;
+ switch(code)
+ {
+ case CY_RQT_START_USB:
+ ret = MyHandleResponseUsbStart(dev_p, rqt, resp, stat) ;
+ break ;
+ case CY_RQT_STOP_USB:
+ ret = MyHandleResponseUsbStop(dev_p, rqt, resp, stat) ;
+ break ;
+ case CY_RQT_SET_CONNECT_STATE:
+ if(!CyAsLLRequestResponse_GetWord(rqt, 0))
+ ret = MyHandleResponseDisconnect(dev_p, rqt, resp, stat) ;
+ else
+ ret = MyHandleResponseConnect(dev_p, rqt, resp, stat) ;
+ break ;
+ case CY_RQT_GET_CONNECT_STATE:
+ break ;
+ case CY_RQT_SET_USB_CONFIG:
+ ret = MyHandleResponseSetEnumConfig(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_GET_USB_CONFIG:
+ CyAsHalAssert(fnode->data != 0) ;
+ ret = MyHandleResponseGetEnumConfig(dev_p, rqt, resp, fnode->data) ;
+ break ;
+ case CY_RQT_STALL_ENDPOINT:
+ ep = (uint8_t)CyAsLLRequestResponse_GetWord(rqt, 0) ;
+ state = (uint8_t)CyAsLLRequestResponse_GetWord(rqt, 1) ;
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ if ((ret == CY_AS_ERROR_SUCCESS) && (ep > 1) && (state != 0) && (dev_p->usb_config[ep].dir == CyAsUsbOut))
+ CyAsUsbFlushLogicalEP(dev_p, ep) ;
+ break ;
+ case CY_RQT_GET_STALL:
+ CyAsHalAssert(fnode->data != 0) ;
+ ret = MyHandleResponseGetStall(dev_p, rqt, resp, (CyBool*)fnode->data) ;
+ break ;
+ case CY_RQT_SET_DESCRIPTOR:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_GET_DESCRIPTOR:
+ CyAsHalAssert(fnode->data != 0) ;
+ ret = MyHandleResponseGetDescriptor(dev_p, rqt, resp, (CyAsGetDescriptorData*)fnode->data) ;
+ break;
+ case CY_RQT_SET_USB_CONFIG_REGISTERS:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ if (ret == CY_AS_ERROR_SUCCESS)
+ ret = CyAsUsbSetupDma(dev_p) ;
+ break ;
+ case CY_RQT_ENDPOINT_SET_NAK:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_GET_ENDPOINT_NAK:
+ CyAsHalAssert(fnode->data != 0) ;
+ ret = MyHandleResponseGetNak(dev_p, rqt, resp, (CyBool*)fnode->data) ;
+ break ;
+ case CY_RQT_ACK_SETUP_PACKET:
+ break ;
+ case CY_RQT_USB_REMOTE_WAKEUP:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_CLEAR_DESCRIPTORS:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_USB_STORAGE_MONITOR:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ case CY_RQT_MS_PARTITION_SELECT:
+ ret = MyHandleResponseNoData(dev_p, rqt, resp) ;
+ break ;
+ default:
+ ret = CY_AS_ERROR_INVALID_RESPONSE ;
+ CyAsHalAssert(CyFalse) ;
+ break ;
+ }
+
+ /*
+ * If the low level layer returns a direct error, use the corresponding error code.
+ * If not, use the error code based on the response from firmware.
+ */
+ if (stat == CY_AS_ERROR_SUCCESS)
+ stat = ret ;
+
+ if(exRequest || msRequest)
+ {
+ fnode->cb_p((CyAsDeviceHandle)dev_p, stat, fnode->client_data, (CyAsFunctCBType)fnode->dataType, fnode->data) ;
+ CyAsRemoveCBNode(dev_p->func_cbs_usb) ;
+ }
+ else
+ {
+ node->cb_p((CyAsDeviceHandle)dev_p, stat, node->client_data) ;
+ CyAsRemoveCBNode(dev_p->usb_func_cbs) ;
+ }
+
+ if(delayed_ack)
+ {
+ CyAsHalAssert(CyAsDeviceIsAckDelayed(dev_p)) ;
+ CyAsDeviceRemAckDelayed(dev_p) ;
+
+ /*
+ * Send the ACK if required.
+ */
+ if (!CyAsDeviceIsAckDelayed(dev_p))
+ CyAsUsbAckSetupPacket(h, UsbAckCallback, 0) ;
+ }
+}
+
+/* This includes the implementation of the deprecated functions for backward
+ * compatibility
+ */
+#include "cyasusb_dep_impl.h"
+
+/*[]*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/api/src/cyasusb_dep_impl.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,230 @@
+/* Cypress West Bridge API source file (cyasusb_dep_impl.h)
+## ===========================
+##
+## Copyright Cypress Semiconductor Corporation, 2006-2009,
+## All Rights Reserved
+## UNPUBLISHED, LICENSED SOFTWARE.
+##
+## CONFIDENTIAL AND PROPRIETARY INFORMATION
+## WHICH IS THE PROPERTY OF CYPRESS.
+##
+## Use of this file is governed
+## by the license agreement included in the file
+##
+## <install>/license/license.txt
+##
+## where <install> is the Cypress software
+## installation root directory path.
+##
+## ===========================
+*/
+
+/* This c file will contain Antioch specific implementation
+ * of the APIs that are deprecated in Astoria SDK. This is
+ * for maintaining backward compatibility
+ */
+
+#include "cyasusb.h"
+/*
+* This function registers a callback to be called when USB events are processed
+*/
+CyAsReturnStatus_t
+CyAsUsbRegisterCallback_dep(CyAsDeviceHandle handle, CyAsUsbEventCallback_dep callback)
+{
+ CyAsDevice*dev_p ;
+
+ CyAsLogDebugMessage(6, "CyAsUsbRegisterCallback called") ;
+
+ dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ dev_p->usb_event_cb = callback ;
+ dev_p->usb_event_cb_ms = NULL ;
+ return CY_AS_ERROR_SUCCESS ;
+}
+
+/*
+* This method sets how the USB is enumerated and should be called before the
+* CyAsUsbConnect() is called.
+*/
+CyAsReturnStatus_t
+CyAsUsbSetEnumConfig_dep(CyAsDeviceHandle handle,
+ CyAsUsbEnumControl_dep *config_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ uint8_t enum_bus = 0 ;
+ uint8_t bus ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ if (!CyAsDeviceIsConfigured(dev_p))
+ return CY_AS_ERROR_NOT_CONFIGURED ;
+
+ if (!CyAsDeviceIsFirmwareLoaded(dev_p))
+ return CY_AS_ERROR_NO_FIRMWARE ;
+
+ /*
+ * Map the storage devices to be enumerated to the storage
+ * buses to be enumerated.
+ */
+ for (bus = 0; bus < CY_AS_MAX_BUSES; bus++)
+ {
+ if (config_p->enum_mass_storage & dev_p->media_supported[bus])
+ enum_bus |= (0x01 << bus) ;
+ }
+
+ return MyUsbSetEnumConfig(dev_p, enum_bus,
+ config_p->enum_mass_storage,
+ config_p->antioch_enumeration,
+ config_p->mass_storage_interface,
+ 0,
+ config_p->mass_storage_callbacks,
+ cb,
+ client
+ ) ;
+}
+
+/*
+* This method returns the enumerateion configuration information from the Antioch device. Generally this is not
+* used by client software but is provided mostly for debug information. We want a method to read all state information
+* from the Antioch device.
+*/
+CyAsReturnStatus_t
+CyAsUsbGetEnumConfig_dep(CyAsDeviceHandle handle,
+ CyAsUsbEnumControl_dep *config_p,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ return MyUsbGetEnumConfig(handle, CY_AS_REQUEST_RESPONSE_EX, config_p, cb, client);
+}
+
+
+CyAsReturnStatus_t
+CyAsUsbGetDescriptor_dep(CyAsDeviceHandle handle,
+ CyAsUsbDescType type,
+ uint8_t index,
+ void *desc_p,
+ uint32_t *length_p)
+{
+ CyAsGetDescriptorData data ;
+ CyAsReturnStatus_t status;
+
+ data.desc_p = desc_p;
+ data.length = *length_p;
+ status = CyAsUsbGetDescriptor(handle, type, index, &data, 0, 0) ;
+ *length_p = data.length ;
+
+ return status ;
+}
+
+
+CyAsReturnStatus_t
+CyAsUsbSetNak_dep(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyAsUsbFunctionCallback cb, uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_ENDPOINT_SET_NAK, CyTrue, cb, 0, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbClearNak_dep(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyAsUsbFunctionCallback cb, uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_ENDPOINT_SET_NAK, CyFalse, cb, 0, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbSetStall_dep(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyAsUsbFunctionCallback cb, uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_STALL_ENDPOINT, CyTrue, cb, 0, client) ;
+}
+
+CyAsReturnStatus_t
+CyAsUsbClearStall_dep(CyAsDeviceHandle handle, CyAsEndPointNumber_t ep, CyAsUsbFunctionCallback cb, uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ /*
+ * We send the firmware the EP# with the appropriate direction bit, regardless
+ * of what the user gave us.
+ */
+ ep &= 0x0f ;
+ if (dev_p->usb_config[ep].dir == CyAsUsbIn)
+ ep |= 0x80 ;
+
+ return CyAsUsbNakStallRequest(handle, ep, CY_RQT_STALL_ENDPOINT, CyFalse, cb, 0, client) ;
+}
+
+extern CyAsReturnStatus_t
+CyAnMapBusFromMediaType (
+ CyAsDevice *dev_p,
+ CyAsMediaType type,
+ CyAsBusNumber_t *bus) ;
+
+CyAsReturnStatus_t
+CyAsUsbSelectMSPartitions_dep (
+ CyAsDeviceHandle handle,
+ CyAsMediaType media,
+ uint32_t device,
+ CyAsUsbMSType_t type,
+ CyAsFunctionCallback cb,
+ uint32_t client)
+{
+ CyAsDevice *dev_p = (CyAsDevice *)handle ;
+ CyAsBusNumber_t bus ;
+ CyAsReturnStatus_t ret ;
+
+ if (!dev_p ||(dev_p->sig != CY_AS_DEVICE_HANDLE_SIGNATURE))
+ return CY_AS_ERROR_INVALID_HANDLE ;
+
+ ret = CyAnMapBusFromMediaType(dev_p, media, &bus) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ return ret ;
+
+ return CyAsUsbSelectMSPartitions(handle, bus, device, type, cb, client) ;
+}
+
+/*[]*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/bld.inf Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,19 @@
+// ===========================
+//
+// Copyright Cypress Semiconductor Corporation, 2006-2009,
+// All Rights Reserved
+// UNPUBLISHED, LICENSED SOFTWARE.
+//
+// CONFIDENTIAL AND PROPRIETARY INFORMATION
+// WHICH IS THE PROPERTY OF CYPRESS.
+//
+// ===========================
+
+PRJ_PLATFORMS
+ARMV5
+
+PRJ_EXPORTS
+./drivers/CyAsSymbianStorageDriver.h assp/omap3530_assp/
+
+PRJ_MMPFILES
+wb
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/def/eabi/wbu.def Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,18 @@
+EXPORTS
+ _ZN24CyAsSymbianStorageDriver4OpenEv @ 1 NONAME
+ _ZN24CyAsSymbianStorageDriver5CloseEv @ 2 NONAME
+ _ZN24CyAsSymbianStorageDriver4ReadEiiPv @ 3 NONAME
+ _ZN24CyAsSymbianStorageDriver5WriteEiiPv @ 4 NONAME
+
+ _ZN24CyAsSymbianStorageDriver12GetMediaTypeEv @ 5 NONAME
+ _ZN24CyAsSymbianStorageDriver14GetIsRemovableEv @ 6 NONAME
+ _ZN24CyAsSymbianStorageDriver14GetIsWriteableEv @ 7 NONAME
+ _ZN24CyAsSymbianStorageDriver12GetBlockSizeEv @ 8 NONAME
+ _ZN24CyAsSymbianStorageDriver16GetNumberOfUnitsEv @ 9 NONAME
+ _ZN24CyAsSymbianStorageDriver11GetIsLockedEv @ 10 NONAME
+ _ZN24CyAsSymbianStorageDriver17GetEraseBlockSizeEv @ 11 NONAME
+ _ZN24CyAsSymbianStorageDriver11GetUnitSizeEv @ 12 NONAME
+ _ZN24CyAsSymbianStorageDriver13GetStartBlockEv @ 13 NONAME
+ _ZN24CyAsSymbianStorageDriver12GetMediaSizeEv @ 14 NONAME
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/drivers/CyAsSymbianStorageDriver.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,233 @@
+
+#include <kern_priv.h>
+//#include <beagle/beagle_gpio.h>
+#include <beagle/variant.h>
+//#include <assp/omap3530_assp/omap3530_assp_priv.h>
+//#include <assp/omap3530_assp/omap3530_irqmap.h> // GPIO interrupts
+//#include <assp/omap3530_assp/omap3530_gpio.h>
+
+//#include <assp.h> // Required for definition of TIsr
+
+#include <cyastoria.h>
+#include <cyasmtp.h>
+#include <cyasusbinit.h>
+//#include <cyasusbdescs.h>
+#include "CyAsSymbianStorageDriver.h"
+
+extern TmtpAstDev g_AstDevice;
+extern TmtpAstDev * g_pAstDevice;
+
+_LIT(KLitWbAPIMutex,"WBAPIMutex");
+static DMutex *WbApiMutex;
+const TUint8 KMutexOrdWB = 0x11; /**< @internalComponent */
+
+TInt64 iMediaTotalSize;
+EXPORT_C int CyAsSymbianStorageDriver::Open(void)
+{
+ //CyAsHalDeviceTag tag;
+ CyAsDeviceHandle h;
+ CyAsReturnStatus_t ret ;
+ char *media_name = "SD";
+ uint32_t count = 0 ;
+
+ Kern::MutexCreate(WbApiMutex, KLitWbAPIMutex, KMutexOrdWB);
+ //tag = g_pAstDevice->astHalTag ;
+ h = g_pAstDevice->astDevHandle ;
+
+ Kern::Printf("*** CyAsStorageStart...\n") ;
+ ret = CyAsStorageStart(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("CyAsSymbianStorageOpen: CyAsStorageStart returned error code %d\n", ret) ;
+ return 0 ;
+ }
+
+ Kern::Printf("*** CyAsStorageQueryMedia...\n") ;
+ ret = CyAsStorageQueryMedia(h, CyAsMediaSDFlash, &count, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("CyAsSymbianStorageOpen: Cannot query %s device count - Reason code %d\n", media_name, ret) ;
+ return 0 ;
+ }
+ Kern::Printf("%d %s device(s) found\n", count, media_name) ;
+
+ Kern::Printf("*** CyAsStorageClaim...\n") ;
+ ret = CyAsStorageClaim(h, CyAsBus_1, 0, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("CyAsSymbianStorageOpen: Cannot claim %s media - Reason code %d\n", media_name, ret) ;
+ return 0;
+ }
+
+ /* We know that there is only one */
+ g_pAstDevice->dev_data.bus = CyAsBus_1 ;
+ g_pAstDevice->dev_data.device = 0 ;
+ ret = CyAsStorageQueryDevice(h, &(g_pAstDevice->dev_data), 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("CyAsSymbianStorageOpen: Cannot query %s device - Reason code %d\n", media_name, ret) ;
+ return 0 ;
+ }
+
+ g_pAstDevice->unit_data.bus = CyAsBus_1 ;
+ g_pAstDevice->unit_data.device = 0 ;
+ g_pAstDevice->unit_data.unit = 0 ;
+
+ /* We know that there is only one */
+ ret = CyAsStorageQueryUnit(h, &(g_pAstDevice->unit_data), 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("CyAsSymbianStorageOpen: Cannot query %s device unit - Reason code %d\n", media_name, ret) ;
+ return 0 ;
+ }
+
+ iMediaTotalSize = (TInt64)g_pAstDevice->dev_data.desc_p.block_size * (TInt64)g_pAstDevice->unit_data.desc_p.unit_size;
+
+#if 0
+ Kern::Printf("========================================================") ;
+ Kern::Printf("WBStorageInfo.type - %d", g_pAstDevice->dev_data.desc_p.type) ;
+ Kern::Printf("WBStorageInfo.removable - %d", g_pAstDevice->dev_data.desc_p.removable) ;
+ Kern::Printf("WBStorageInfo.writeable - %d", g_pAstDevice->dev_data.desc_p.writeable) ;
+ Kern::Printf("WBStorageInfo.block_size - %d Bytes", g_pAstDevice->dev_data.desc_p.block_size) ;
+ Kern::Printf("WBStorageInfo.number_units - %d", g_pAstDevice->dev_data.desc_p.number_units) ;
+ Kern::Printf("WBStorageInfo.locked - %d", g_pAstDevice->dev_data.desc_p.locked) ;
+ Kern::Printf("WBStorageInfo.erase_unit_size - %d Bytes", g_pAstDevice->dev_data.desc_p.erase_unit_size) ;
+ Kern::Printf("WBStorageInfo.unit_size - %d", g_pAstDevice->unit_data.desc_p.unit_size) ;
+ Kern::Printf("WBStorageInfo.start_block - %d", g_pAstDevice->unit_data.desc_p.start_block) ;
+ Kern::Printf("WBStorageInfo.totalsize - %d Bytes", iMediaTotalSize) ;
+ Kern::Printf("========================================================\n") ;
+#endif
+ return 1;
+}
+EXPORT_C int CyAsSymbianStorageDriver::Close(void)
+{
+ CyAsDeviceHandle h;
+ CyAsReturnStatus_t ret ;
+
+ //tag = g_pAstDevice->astHalTag ;
+ h = g_pAstDevice->astDevHandle ;
+ Kern::Printf("*** CyAsStorageStop...\n") ;
+ ret = CyAsStorageStop(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("CyAsStorageStop: CyAsStorageStop returned error code %d\n", ret) ;
+ return 0 ;
+ }
+ return 1;
+}
+
+EXPORT_C int CyAsSymbianStorageDriver::Read(int pos, int num_block, void* cybuf)
+{
+ //CyAsHalDeviceTag tag;
+ CyAsDeviceHandle h;
+ CyAsReturnStatus_t ret ;
+ char *tmpbuf;
+
+ Kern::MutexWait(*WbApiMutex);
+
+ tmpbuf = (char *)cybuf;
+ //tag = g_pAstDevice->astHalTag ;
+ h = g_pAstDevice->astDevHandle ;
+ //CyAsHalPrintMessage("Read SD card\n");
+ ret = CyAsStorageRead( h, 1, 0, 0, pos, tmpbuf, num_block);
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ Kern::Printf("CyAsSymbianStorageRead: Cannot read sector %d (%d@%d)\n", ret, num_block, pos) ;
+ return 0 ;
+ }
+ Kern::MutexSignal(*WbApiMutex);
+
+ return 1;
+}
+
+
+EXPORT_C int CyAsSymbianStorageDriver::Write(int pos, int num_block, void* cybuf)
+{
+ //CyAsHalDeviceTag tag;
+ CyAsDeviceHandle h;
+ CyAsReturnStatus_t ret ;
+ char *tmpbuf;
+
+ Kern::MutexWait(*WbApiMutex);
+
+ tmpbuf = (char *)cybuf;
+ //tag = g_pAstDevice->astHalTag ;
+ h = g_pAstDevice->astDevHandle ;
+
+ ret = CyAsStorageWrite(h, 1, 0, 0, pos, tmpbuf, num_block);
+ if ( ret != CY_AS_ERROR_SUCCESS )
+ {
+ Kern::Printf("CyAsSymbianStorageWrite: Cannot write to first sector of SD card\n") ;
+ return 0 ;
+ }
+ Kern::MutexSignal(*WbApiMutex);
+
+ return 1;
+}
+
+EXPORT_C TInt CyAsSymbianStorageDriver::GetMediaType(void)
+{
+ /* Type of device */
+ return (TInt)g_pAstDevice->dev_data.desc_p.type;
+}
+
+EXPORT_C TInt CyAsSymbianStorageDriver::GetIsRemovable(void)
+{
+ /* Is the device removable */
+ return g_pAstDevice->dev_data.desc_p.removable;
+}
+
+EXPORT_C TInt CyAsSymbianStorageDriver::GetIsWriteable(void)
+{
+ /* Is the device writeable */
+ return g_pAstDevice->dev_data.desc_p.writeable;
+}
+
+EXPORT_C TUint16 CyAsSymbianStorageDriver::GetBlockSize(void)
+{
+ /* Basic block size for device */
+ return g_pAstDevice->dev_data.desc_p.block_size;
+}
+
+EXPORT_C TUint CyAsSymbianStorageDriver::GetNumberOfUnits(void)
+{
+ /* Number of LUNs on the device */
+ return g_pAstDevice->dev_data.desc_p.number_units;
+}
+
+EXPORT_C TInt CyAsSymbianStorageDriver::GetIsLocked(void)
+{
+ /* Is the device password locked */
+ return g_pAstDevice->dev_data.desc_p.locked;
+}
+
+EXPORT_C TUint CyAsSymbianStorageDriver::GetEraseBlockSize(void)
+{
+ /* Size in bytes of an Erase Unit. Block erase operation is only supported for SD storage,
+ and the erase_unit_size is invalid for all other kinds of storage. */
+ return g_pAstDevice->dev_data.desc_p.erase_unit_size;
+}
+
+EXPORT_C TUint CyAsSymbianStorageDriver::GetUnitSize(void)
+{
+ /* Number of blocks in the LUN */
+ return g_pAstDevice->unit_data.desc_p.unit_size;
+}
+
+EXPORT_C TUint CyAsSymbianStorageDriver::GetStartBlock(void)
+{
+ /* Physical start block for LUN */
+ return g_pAstDevice->unit_data.desc_p.start_block;
+}
+
+EXPORT_C TInt64 CyAsSymbianStorageDriver::GetMediaSize(void)
+{
+
+ /*(Basic block size for device x Number of LUNs on the device)
+ g_pAstDevice->dev_data.desc_p.block_size * g_pAstDevice->dev_data.desc_p.number_units */
+ return iMediaTotalSize;
+}
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/drivers/CyAsSymbianStorageDriver.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,28 @@
+
+#ifndef ASTORIAAPISTORAGE_H
+#define ASTORIAAPISTORAGE_H
+
+
+class CyAsSymbianStorageDriver
+{
+
+public:
+ IMPORT_C static int Open(void);
+ IMPORT_C static int Close(void);
+ IMPORT_C static int Read(int, int, void*);
+ IMPORT_C static int Write(int, int, void*);
+
+ IMPORT_C static TInt GetMediaType(void);
+ IMPORT_C static TInt GetIsRemovable(void);
+ IMPORT_C static TInt GetIsWriteable(void);
+ IMPORT_C static TUint16 GetBlockSize(void);
+ IMPORT_C static TUint GetNumberOfUnits(void);
+ IMPORT_C static TInt GetIsLocked(void);
+ IMPORT_C static TUint GetEraseBlockSize(void);
+ IMPORT_C static TUint GetUnitSize(void);
+ IMPORT_C static TUint GetStartBlock(void);
+ IMPORT_C static TInt64 GetMediaSize(void);
+
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/drivers/cyasusbinit.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,1306 @@
+#include <kern_priv.h>
+#include <beagle/beagle_gpio.h>
+#include <beagle/variant.h>
+#include <assp/omap3530_assp/omap3530_assp_priv.h>
+#include <assp/omap3530_assp/omap3530_irqmap.h> // GPIO interrupts
+#include <assp/omap3530_assp/omap3530_gpio.h>
+
+#include <assp.h> // Required for definition of TIsr
+
+#include <cyastoria.h>
+#include <cyasmtp.h>
+#include <cyasusbinit.h>
+#include <cyasusbdescs.h>
+
+TmtpAstDev g_AstDevice;
+TmtpAstDev * g_pAstDevice = &g_AstDevice ;
+
+static uint16_t replybuf[512] ;
+static uint8_t *replyptr = (uint8_t *) replybuf ;
+
+static uint8_t *
+GetReplyArea(void)
+{
+ /*assert(replyptr != 0) ;*/
+ replyptr = 0 ;
+ return (uint8_t *) replybuf ;
+}
+
+static void
+RestoreReplyArea(void)
+{
+ replyptr = (uint8_t *) replybuf ;
+}
+
+/* Globals */
+/*static uint8_t pktbuffer3[512] ;*/
+
+#ifdef CY_AS_USB_TB_FOUR
+static uint8_t pktbuffer7[512] ;
+#endif
+
+#ifdef CY_AS_USB_TB_SIX
+static uint8_t pktbuffer11[512] ;
+#endif
+
+/*static uint8_t turbopktbuffer[512] ;*/
+
+static CyBool gUsbTestDone = CyFalse ;
+static volatile CyBool gSetConfig = CyFalse ;
+static volatile CyBool gAsyncStallDone = CyFalse ;
+
+static volatile CyBool gStorageReleaseBus0 = CyFalse ;
+static volatile CyBool gStorageReleaseBus1 = CyFalse ;
+
+static volatile CyAsHalDeviceTag g_tag ;
+
+static uint8_t MyConfiguration = 0 ;
+static CyCh9ConfigurationDesc *desc_p = 0 ;
+static CyCh9ConfigurationDesc *other_p = 0 ;
+static CyBool gSetupPending = CyFalse ;
+
+static volatile uint8_t gAsyncStallStale = 0;
+
+/* Forward declarations */
+static int SetupUSBPPort(CyAsDeviceHandle h, uint8_t media, CyBool isTurbo) ;
+static void MyUsbEventCallbackMS(CyAsDeviceHandle h, CyAsUsbEvent ev, void *evdata) ;
+static void PrintData(const char *name, uint8_t *data, uint16_t size) ;
+
+static void
+StallCallback(CyAsDeviceHandle h, CyAsReturnStatus_t status, uint32_t tag, CyAsFunctCBType cbtype, void *cbdata)
+{
+ (void)h ;
+ (void)cbtype ;
+ (void)cbdata ;
+
+ if (tag == 1)
+ CyAsHalPrintMessage("*** Nak callback - status = %d\n", status) ;
+ else
+ CyAsHalPrintMessage("*** Stall callback - status = %d\n", status) ;
+}
+
+static void
+StallCallbackEX(CyAsDeviceHandle h,
+ CyAsReturnStatus_t status,
+ uint32_t tag,
+ CyAsFunctCBType type,
+ void* data)
+{
+ (void)h ;
+ (void)type ;
+ (void)data ;
+ (void)status ;
+
+ if(tag == 18)
+ {
+ CyAsReturnStatus_t ret = CyAsUsbClearStall(h, 3, StallCallbackEX, 21);
+ CyAsHalAssert(ret == CY_AS_ERROR_SUCCESS) ;
+ }
+ else
+ gAsyncStallDone = CyTrue ;
+}
+
+static void
+StallCallbackAsync(CyAsDeviceHandle h, CyAsReturnStatus_t status, uint32_t tag, CyAsFunctCBType cbtype, void *cbdata)
+{
+ CyAsReturnStatus_t ret ;
+ (void)cbtype ;
+ (void)cbdata ;
+ (void)tag ;
+ (void)status ;
+
+ if(gAsyncStallStale == 0)
+ {
+ gAsyncStallStale++;
+ ret = CyAsUsbClearStall(h, 3, StallCallbackAsync, 21);
+ CyAsHalAssert(ret == CY_AS_ERROR_SUCCESS) ;
+ }
+ else
+ {
+ gAsyncStallDone = CyTrue ;
+ }
+}
+
+static void
+MyStorageEventCBMS(CyAsDeviceHandle h, CyAsBusNumber_t bus, uint32_t device, CyAsStorageEvent evtype, void *evdata)
+{
+ (void)h ;
+ (void)evdata ;
+
+ switch (evtype)
+ {
+ case CyAsStorageAntioch:
+ CyAsHalPrintMessage("CyAsStorageAntioch Event: bus=%d, device=%d\n", bus, device) ;
+ switch (bus)
+ {
+ case 0:
+ gStorageReleaseBus0 = CyTrue ;
+ break;
+ case 1:
+ gStorageReleaseBus1 = CyTrue ;
+ break;
+ default:
+ break;
+ }
+ break;
+
+ case CyAsStorageProcessor:
+ CyAsHalPrintMessage("CyAsStorageProcessor Event: bus=%d, device %d\n", bus, device) ;
+ break;
+
+ case CyAsStorageRemoved:
+ CyAsHalPrintMessage("Bus %d, device %d has been removed\n", bus, device) ;
+ break;
+
+ case CyAsStorageInserted:
+ CyAsHalPrintMessage("Bus %d, device %d has been inserted\n", bus, device) ;
+ break;
+
+ default:
+ break;
+ }
+}
+
+
+/*
+* This function exercises the USB module
+*/
+int CyAsAPIUsbInit(const char *pgm, CyAsDeviceHandle h, CyAsHalDeviceTag tag)
+{
+ CyAsReturnStatus_t ret ;
+ /*char buffer[16] ;*/
+
+ g_tag = tag ;
+ memset(g_pAstDevice,0, sizeof(g_AstDevice));
+ g_pAstDevice->astHalTag = tag ;
+ g_pAstDevice->astDevHandle = h ;
+
+ /*
+ * Give a delay to allow any equipment to be ready (e.g. CATC)
+ */
+ /*CyAsHalPrintMessage("Press enter to begin USB operation (%s): ", "P Port Enumeration") ;
+ fgets(buffer, sizeof(buffer), stdin) ;*/
+
+ CyAsHalPrintMessage("*** CyAsStorageStart...\n") ;
+ ret = CyAsStorageStart(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: CyAsStorageStart returned error code %d\n", pgm, ret) ;
+ return 0 ;
+ }
+ CyAsHalPrintMessage("*** CyAsStorageStart...Done\n") ;
+ /*
+ * Register a storage event call-back so that the USB attached storage can be
+ * release when the USB connection has been made.
+ */
+ CyAsHalPrintMessage("*** CyAsStorageRegisterCallback...\n") ;
+ ret = CyAsStorageRegisterCallback(h, MyStorageEventCBMS) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: CyAsStorageRegisterCallbackMS returned error code %d\n", pgm, ret) ;
+ return 0 ;
+ }
+ CyAsHalPrintMessage("*** CyAsStorageRegisterCallback...Done\n") ;
+
+ ret = CyAsStorageRelease(h, 1, 0, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsStorageReleaseMS returned error code %d\n", ret) ;
+ return 0 ;
+ }
+ gStorageReleaseBus1 = CyFalse ;
+
+ /*
+ * Use the 24 MHz operating frequency, if the SD card is a low speed one.
+ */
+ ret = CyAsMiscSetLowSpeedSDFreq(h, CY_AS_SD_RATED_FREQ, 0, 0) ;
+ if ((ret != CY_AS_ERROR_SUCCESS) && (ret != CY_AS_ERROR_INVALID_RESPONSE))
+ {
+ CyAsHalPrintMessage("%s: CyAsMiscSetLowSpeedSDFreq returned error code %d\n", pgm, ret) ;
+ return 0 ;
+ }
+
+ /*
+ * We are using P Port based enumeration
+ */
+#ifdef DEBUG_ZERO
+ if (!SetupUSBPPort(h, 2, 0))
+#else
+ if (!SetupUSBPPort(h, 2, 1))
+#endif
+ return 0 ;
+ /*
+ * Now we let the enumeration process happen via callbacks. When the set configuration
+ * request is processed, we are done with enumeration and ready to perform our function.
+ */
+ while (!gSetConfig)
+ CyAsHalSleep(100) ;
+
+ CyAsHalPrintMessage("*** Configuration complete, starting echo function\n") ;
+
+ return 1 ;
+}
+
+static void
+MyCyAsMTPEventCallback(
+ CyAsDeviceHandle handle,
+ CyAsMTPEvent evtype,
+ void* evdata)
+{
+ (void) handle;
+ switch(evtype)
+ {
+ case CyAsMTPSendObjectComplete:
+ {
+ CyAsMTPSendObjectCompleteData* sendObjData = (CyAsMTPSendObjectCompleteData*) evdata ;
+ CyAsHalPrintMessage("MTP EVENT: SendObjectComplete\n");
+ CyAsHalPrintMessage("Bytes sent = %d\nSend status = %d",sendObjData->byte_count,sendObjData->status);
+ g_pAstDevice->tmtpSendCompleteData.byte_count = sendObjData->byte_count;
+ g_pAstDevice->tmtpSendCompleteData.status = sendObjData->status;
+ g_pAstDevice->tmtpSendCompleteData.transaction_id = sendObjData->transaction_id ;
+ g_pAstDevice->tmtpSendComplete = CyTrue ;
+ break;
+ }
+ case CyAsMTPGetObjectComplete:
+ {
+ CyAsMTPGetObjectCompleteData* getObjData = (CyAsMTPGetObjectCompleteData*) evdata ;
+ CyAsHalPrintMessage("MTP EVENT: GetObjectComplete\n");
+ CyAsHalPrintMessage("Bytes got = %d\nGet status = %d",getObjData->byte_count,getObjData->status);
+ g_pAstDevice->tmtpGetCompleteData.byte_count = getObjData->byte_count;
+ g_pAstDevice->tmtpGetCompleteData.status = getObjData->status ;
+ g_pAstDevice->tmtpGetComplete = CyTrue ;
+ break;
+ }
+ case CyAsMTPBlockTableNeeded:
+ g_pAstDevice->tmtpNeedNewBlkTbl = CyTrue ;
+ break;
+ default:
+ ;
+ }
+
+}
+/*
+* This function is responsible for initializing the USB function within West Bridge. This
+* function initializes West Bridge for P port based enumeration.
+*/
+int SetupUSBPPort(CyAsDeviceHandle h, uint8_t bus, CyBool isTurbo)
+{
+ CyAsReturnStatus_t ret ;
+ CyAsUsbEnumControl config ;
+#ifdef DEBUG_ZERO
+ CyAsUsbEndPointConfig epconfig ;
+#endif
+ uint32_t count = 0 ;
+ char *media_name = "SD";
+
+ gUsbTestDone = CyFalse ;
+
+ CyAsHalPrintMessage("*** SetupUSBPPort...\n") ;
+ /*
+ * Intialize the primary descriptor to be the full speed descriptor and the
+ * other descriptor to by the high speed descriptor. This will swap if we see a
+ * high speed event.
+ */
+#ifdef DEBUG_ZERO
+ desc_p = (CyCh9ConfigurationDesc *)&ConfigFSDesc ;
+ other_p = (CyCh9ConfigurationDesc *)&ConfigHSDesc ;
+#else
+ desc_p = (CyCh9ConfigurationDesc *)&ZeroDesc ;
+ other_p = (CyCh9ConfigurationDesc *)&ZeroDesc ;
+#endif
+ /* Step 1: Release the USB D+ and D- pins
+ *
+ * This code releases control of the D+ and D- pins if they have been previously
+ * acquired by the P Port processor. The physical D+ and D- pins are controlled either by
+ * West Bridge, or by some other hardware external to West Bridge. If external hardware is using
+ * these pins, West Bridge must put these pins in a high impedence state in order to insure there
+ * is no coflict over the use of the pins. Before we can initialize the USB capabilities of
+ * West Bridge, we must be sure West Bridge has ownership of the D+ and D- signals. West Bridge will take
+ * ownership of these pins as long as the P port processor has released them. This call
+ * releases control of these pins. Before calling the CyAsMiscReleaseResource(), the P port API
+ * must configure the hardware to release control of the D+ and D- pins by any external hardware.
+ *
+ * Note that this call can be made anywhere in the intialization sequence as long as it is done
+ * before the call to CyAsUsbConnect(). If not, when the CyAsUsbConnect() call is made, West Bridge
+ * will detect that it does not own the D+ and D- pins and the call to CyAsUsbConnect will fail.
+ */
+ ret = CyAsMiscReleaseResource(h, CyAsBusUSB) ;
+ if (ret != CY_AS_ERROR_SUCCESS && ret != CY_AS_ERROR_RESOURCE_NOT_OWNED)
+ {
+ CyAsHalPrintMessage("Cannot Release USB reousrce: CyAsMiscReleaseResourceMS failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+ /*
+ * Step 2: Start the USB stack
+ *
+ * This code initializes the USB stack. It takes a handle to an West Bridge device
+ * previously created with a call to CyAsMiscCreateDevice().
+ */
+ ret = CyAsUsbStart(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsUsbStart failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+ /*
+ * Step 3: Register a callback
+ *
+ * This code registers a callback to handle USB events. This callback function will handle
+ * all setup packets during enumeration as well as other USB events (SUSPEND, RESUME, CONNECT,
+ * DISCONNECT, etc.)
+ */
+ ret = CyAsUsbRegisterCallback(h, MyUsbEventCallbackMS) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsUsbRegisterCallbackMS failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+#ifdef DEBUG_ZERO
+ if ( isTurbo )
+#endif
+ {
+ /*
+ * The SD/MMC resource needs to be released before the device
+ * can be successfully initialized by the firmware.
+ */
+ ret = CyAsMiscReleaseResource(h, CyAsBus_1) ;
+ if (ret != CY_AS_ERROR_SUCCESS && ret != CY_AS_ERROR_RESOURCE_NOT_OWNED)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: CyAsMiscReleaseResource failed with error code %d\n", ret) ;
+ return -ret;
+ }
+
+ ret = CyAsStorageStart(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: CyAsStorageStart failed with error code %d\n", ret) ;
+ return -ret;
+ }
+
+ ret = CyAsStorageQueryMedia(h, CyAsMediaSDFlash, &count, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: Cannot query %s device count - Reason code %d\n", media_name, ret) ;
+ return -ret ;
+ }
+ CyAsHalPrintMessage("CyAsMtpApp: %d %s device(s) found\n", count, media_name) ;
+
+ ret = CyAsStorageClaim(h, CyAsBus_1, 0, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: Cannot claim %s media - Reason code %d\n", media_name, ret) ;
+ return -ret;
+ }
+
+ /* We know that there is only one */
+ g_pAstDevice->dev_data.bus = CyAsBus_1 ;
+ g_pAstDevice->dev_data.device = 0 ;
+ ret = CyAsStorageQueryDevice(h, &(g_pAstDevice->dev_data), 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: Cannot query %s device - Reason code %d\n", media_name, ret) ;
+ return -ret ;
+ }
+ CyAsHalPrintMessage("CyAsMtpApp: blocksize %d, %d units found\n",
+ g_pAstDevice->dev_data.desc_p.block_size, g_pAstDevice->dev_data.desc_p.number_units) ;
+
+ g_pAstDevice->unit_data.bus = CyAsBus_1 ;
+ g_pAstDevice->unit_data.device = 0 ;
+ g_pAstDevice->unit_data.unit = 0 ;
+ /* We know that there is only one */
+ ret = CyAsStorageQueryUnit(h, &(g_pAstDevice->unit_data), 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: Cannot query %s device unit - Reason code %d\n", media_name, ret) ;
+ return -ret ;
+ }
+ CyAsHalPrintMessage("CyAsMtpApp: blocksize %d, %d Block(s) found\n",
+ g_pAstDevice->unit_data.desc_p.block_size, g_pAstDevice->unit_data.desc_p.unit_size) ;
+
+ CyAsHalPrintMessage("CyAsMtpApp: Starting TMTP...\n");
+ ret = CyAsMTPStart(h, MyCyAsMTPEventCallback, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsMTPStart failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+ }
+
+ /*
+ * Step 4: Setup the enumeration mode
+ *
+ * This code tells the West Bridge API how enumeration will be done. Specifically in this
+ * example we are configuring the API for P Port processor based enumeraton. This will cause
+ * all setup packets to be relayed to the P port processor via the USB event callback. See
+ * the function CyAsUsbRegisterEventCallback() for more information about this callback.
+ */
+ config.antioch_enumeration = CyFalse ; /* P port will do enumeration, not West Bridge */
+
+ /* Set the media to enumerate through USB */
+#ifdef DEBUG_ZERO
+ config.devices_to_enumerate[0][0] = CyFalse;
+ config.devices_to_enumerate[1][0] = CyFalse;
+#else
+ config.devices_to_enumerate[0][0] = (bus & CY_TEST_BUS_0) ? CyTrue : CyFalse;
+ config.devices_to_enumerate[1][0] = (bus & CY_TEST_BUS_1) ? CyTrue : CyFalse;
+#endif
+
+ if (isTurbo)
+ {
+ /* Force SD bus */
+ config.devices_to_enumerate[0][0] = CyFalse;
+ config.devices_to_enumerate[1][0] = CyTrue ;
+ /* No MSC in Turbo */
+ config.mass_storage_interface = 0 ;
+ config.mtp_interface = 1 ;
+ }
+ else
+ {
+ /* not Turbo here */
+ config.mtp_interface = 0 ;
+
+#ifndef DEBUG_MSC
+ config.mass_storage_interface = 0 ;
+ config.mass_storage_callbacks = CyFalse ;
+#else
+ /* Force SD bus */
+ config.devices_to_enumerate[1][0] = CyTrue ;
+ config.mass_storage_interface = 1 ;
+ config.mass_storage_callbacks = CyTrue ;
+#endif
+ }
+ ret = CyAsUsbSetEnumConfig(h, &config, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsUsbSetEnumConfigMS failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+#ifndef DEBUG_MSC
+ /*
+ * Step 5: set physical configuration
+ */
+#ifdef DEBUG_ZERO
+ /*nxz-debug-z ret = CyAsUsbSetPhysicalConfiguration(h, 5) ;*/
+ ret = CyAsUsbSetPhysicalConfiguration(h, 1) ;
+#else
+ ret = CyAsUsbSetPhysicalConfiguration(h, 5) ;
+#endif
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsUsbSetPhysicalConfiguration failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+ /*
+ * Step 5: Commit the endpoint configuration
+ */
+#ifdef DEBUG_ZERO
+ epconfig.enabled = CyTrue ;
+ epconfig.dir = CyAsUsbOut ;
+ epconfig.type = CyAsUsbBulk ;
+ epconfig.size = 0 ;
+ epconfig.physical = 1 ;
+ ret = CyAsUsbSetEndPointConfig(h, 3, &epconfig) ;
+ if ( ret != CY_AS_ERROR_SUCCESS )
+ {
+ CyAsHalPrintMessage("CyAsUsbSetEndPointConfig failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+ epconfig.enabled = CyTrue ;
+ epconfig.dir = CyAsUsbIn ;
+ epconfig.type = CyAsUsbBulk ;
+ epconfig.size = 0 ;
+ epconfig.physical = 3 ;
+ ret = CyAsUsbSetEndPointConfig(h, 5, &epconfig) ;
+ if ( ret != CY_AS_ERROR_SUCCESS )
+ {
+ CyAsHalPrintMessage("CyAsUsbSetEndPointConfig failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+ /*nxz-debug-z */
+ epconfig.enabled = CyTrue ;
+ epconfig.dir = CyAsUsbIn ;
+ epconfig.type = CyAsUsbInt ;
+ epconfig.size = 64 ;
+ epconfig.physical = 2 ;
+ ret = CyAsUsbSetEndPointConfig(h, 7, &epconfig) ;
+ if ( ret != CY_AS_ERROR_SUCCESS )
+ {
+ CyAsHalPrintMessage("CyAsUsbSetEndPointConfig failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+#endif
+
+ /*
+ * This code commits the endpoint configuration to the West Bridge hardware.
+ */
+ ret = CyAsUsbCommitConfig(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsUsbCommitConfig failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+#endif
+ /*
+ * Step 6: Connect to the USB host.
+ *
+ * This code actually connects the D+ and D- signals internal to West Bridge to the D+ and D- pins
+ * on the device. If the host is already physically connected, this will begin the enumeration
+ * process. Otherwise, the enumeration process will being when the host is connected.
+ */
+ ret = CyAsUsbConnect(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("CyAsUsbConnect failed with error code %d\n", ret) ;
+ return 0 ;
+ }
+
+ CyAsHalPrintMessage("*** SetupUSBPPort...Done\n") ;
+ return 1 ;
+}
+
+/*
+* Print a block of data, useful for displaying data during debug.
+*/
+static void PrintData(const char *name_p, uint8_t *data, uint16_t size)
+{
+ uint32_t i = 0 ;
+ uint32_t linecnt = 0 ;
+
+ while (i < size)
+ {
+ if (linecnt == 0)
+ CyAsHalPrintMessage("%s @ %02x:", name_p, i) ;
+
+ CyAsHalPrintMessage(" %02x", data[i]) ;
+
+ linecnt++ ;
+ i++ ;
+
+ if (linecnt == 16)
+ {
+ CyAsHalPrintMessage("\n") ;
+ linecnt = 0 ;
+ }
+ }
+
+ if (linecnt != 0)
+ CyAsHalPrintMessage("\n") ;
+}
+
+/*
+* This is the write callback for writes that happen as part of the setup operation.
+*/
+static void SetupWriteCallback(CyAsDeviceHandle h, CyAsEndPointNumber_t ep, uint32_t count, void *buf_p, CyAsReturnStatus_t status)
+{
+ (void)count ;
+ (void)h ;
+ (void)buf_p ;
+
+ /*assert(ep == 0) ;
+ assert(buf_p == replybuf) ;*/
+
+ RestoreReplyArea() ;
+ if (status != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("Error returned in SetupWriteCallback - %d\n", status) ;
+
+ gSetupPending = CyFalse ;
+}
+
+static CyAsReturnStatus_t
+SetupWrite(CyAsDeviceHandle h, uint32_t requested, uint32_t dsize, void *data)
+{
+ CyBool spacket = CyTrue ;
+
+ if (requested == dsize)
+ spacket = CyFalse ;
+
+ return CyAsUsbWriteDataAsync(h, 0, dsize, data, spacket, SetupWriteCallback) ;
+}
+
+int mystrlen(char* str)
+{
+ int len = 0 ;
+
+ while( str && (*str != '\0') )
+ {
+ len++;
+ str++;
+ }
+
+ return len ;
+}
+/*
+* Send the USB host a string descriptor. If the index is zero, send the
+* array of supported languages, otherwise send the string itself per the USB
+* Ch9 specification.
+*/
+static void SendStringDescriptor(CyAsDeviceHandle h, uint8_t *data)
+{
+ CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS;
+ int i = data[2] ;
+ int langid = data[4] | (data[5] << 8) ;
+ uint16_t reqlen = data[6] | (data[7] << 8) ;
+
+ CyAsHalPrintMessage("**** CY_CH9_GD_STRING - %d\n", i) ;
+ if (i == 0)
+ {
+ uint8_t *reply ;
+
+ reply = GetReplyArea() ;
+ reply[0] = 4 ;
+ reply[1] = CY_CH9_GD_STRING ;
+ reply[2] = CY_CH9_LANGID_ENGLISH_UNITED_STATES & 0xff ;
+ reply[3] = (CY_CH9_LANGID_ENGLISH_UNITED_STATES >> 8) & 0xff ;
+ ret = SetupWrite(h, reqlen, 4, reply) ;
+ }
+ else if (i <= sizeof(UsbStrings)/sizeof(UsbStrings[0]) && langid == CY_CH9_LANGID_ENGLISH_UNITED_STATES)
+ {
+ uint8_t *reply ;
+ uint16_t len = (uint16_t)mystrlen(UsbStrings[i - 1]) ;
+
+ CyAsHalPrintMessage("*** Sending string '%s'\n", UsbStrings[i - 1]) ;
+
+ reply = GetReplyArea() ;
+ reply[0] = (uint8_t)(len * 2 + 2) ;
+ reply[1] = CY_CH9_GD_STRING ;
+ /* nxz-linux-port */
+ /*memcpy(reply + 2, UsbStrings[i - 1], len ) ;
+ ret = SetupWrite(h, reqlen, len + 2, reply) ;*/
+ {
+ uint16_t index ;
+ uint16_t *rpy = (uint16_t *)(reply + 2) ;
+ for (index = 0; index < len; index++)
+ {
+ *rpy = (uint16_t)(UsbStrings[i - 1][index]) ;
+ rpy++ ;
+ }
+ }
+ ret = SetupWrite(h, reqlen, len * 2 + 2, reply) ;
+ }
+ else
+ {
+ /*
+ * If the host asks for an invalid string, we must stall EP 0
+ */
+ ret = CyAsUsbSetStall(h, 0, StallCallback, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("**** cannot set stall state on EP 0\n") ;
+
+ CyAsHalPrintMessage("Host asked for invalid string or langid, index = 0x%04x, langid = 0x%04x\n", i, langid) ;
+ }
+
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ else
+ CyAsHalPrintMessage("** Write Sucessful\n") ;
+}
+
+static CyAsReturnStatus_t
+SendSetupData(CyAsDeviceHandle h, uint32_t reqlen, uint32_t size, void *data_p)
+{
+ CyAsReturnStatus_t ret ;
+ uint8_t *reply ;
+
+ /*
+ * Never send more data than was requested
+ */
+ if (size > reqlen)
+ size = reqlen ;
+
+ reply = GetReplyArea() ;
+ /*assert(reply != 0) ;*/
+
+ memcpy(reply, data_p, size) ;
+ ret = SetupWrite(h, reqlen, size, reply) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ RestoreReplyArea() ;
+
+ return ret ;
+}
+
+/*
+* This function processes the GET DESCRIPTOR usb request.
+*/
+static void ProcessGetDescriptorRequest(CyAsDeviceHandle h, uint8_t *data)
+{
+ CyAsReturnStatus_t ret ;
+ uint16_t reqlen = data[6] | (data[7] << 8) ;
+
+ if (data[3] == CY_CH9_GD_DEVICE)
+ {
+ /*
+ * Return the device descriptor
+ */
+ CyAsHalPrintMessage("**** CY_CH9_GD_DEVICE (size = %d)\n", sizeof(pport_device_desc)) ;
+ PrintData("DD", (uint8_t *)&pport_device_desc, sizeof(pport_device_desc)) ;
+
+ ret = SendSetupData(h, reqlen, sizeof(pport_device_desc), &pport_device_desc) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ else
+ CyAsHalPrintMessage("** Write Sucessful\n") ;
+ }
+ else if (data[3] == CY_CH9_GD_DEVICE_QUALIFIER)
+ {
+ /*
+ * Return the device descriptor
+ */
+ CyAsHalPrintMessage("**** CY_CH9_GD_DEVICE (size = %d)\n", sizeof(device_qualifier)) ;
+ PrintData("DD", (uint8_t *)&device_qualifier, sizeof(device_qualifier)) ;
+
+ ret = SendSetupData(h, reqlen, sizeof(device_qualifier), &device_qualifier) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ else
+ CyAsHalPrintMessage("** Write Sucessful\n") ;
+ }
+ else if (data[3] == CY_CH9_GD_CONFIGURATION)
+ {
+ const char *desc_name_p ;
+ uint16_t size ;
+
+ /*
+ * Return the CONFIGURATION descriptor.
+ */
+ if (desc_p == (CyCh9ConfigurationDesc *)&ConfigHSDesc)
+ {
+ desc_name_p = "HighSpeed" ;
+ size = sizeof(ConfigHSDesc) ;
+ }
+ else if (desc_p == (CyCh9ConfigurationDesc *)&ConfigFSDesc)
+ {
+ desc_name_p = "FullSpeed" ;
+ size = sizeof(ConfigFSDesc) ;
+ }
+ else if (desc_p == &ZeroDesc)
+ {
+ desc_name_p = "ZeroDesc" ;
+ size = sizeof(ZeroDesc) ;
+ }
+ else
+ {
+ desc_name_p = "UNKNOWN" ;
+ size = 0 ;
+ }
+ CyAsHalPrintMessage("**** CY_CH9_GD_CONFIGURATION - %s (size = %d)\n", desc_name_p, size) ;
+ if (size > 0)
+ {
+ PrintData("CFG", (uint8_t *)desc_p, size) ;
+ desc_p->bDescriptorType = CY_CH9_GD_CONFIGURATION;
+ ret = SendSetupData(h, reqlen, size, desc_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ else
+ CyAsHalPrintMessage("** Write Sucessful\n") ;
+ }
+ }
+ else if (data[3] == CY_CH9_GD_OTHER_SPEED_CONFIGURATION)
+ {
+ const char *desc_name_p ;
+ uint16_t size ;
+
+ /*
+ * Return the CONFIGURATION descriptor.
+ */
+ if (other_p == (CyCh9ConfigurationDesc *)&ConfigHSDesc)
+ {
+ desc_name_p = "HighSpeed" ;
+ size = sizeof(ConfigHSDesc) ;
+ }
+ else if (other_p == (CyCh9ConfigurationDesc *)&ConfigFSDesc)
+ {
+ desc_name_p = "FullSpeed" ;
+ size = sizeof(ConfigFSDesc) ;
+ }
+ else if (other_p == &ZeroDesc)
+ {
+ desc_name_p = "ZeroDesc" ;
+ size = sizeof(ZeroDesc) ;
+ }
+ else
+ {
+ desc_name_p = "UNKNOWN" ;
+ size = 0 ;
+ }
+ CyAsHalPrintMessage("**** CY_CH9_GD_OTHER_SPEED_CONFIGURATION - %s (size = %d)\n", desc_name_p, size) ;
+ if (size > 0)
+ {
+ PrintData("CFG", (uint8_t *)other_p, size) ;
+ other_p->bDescriptorType = CY_CH9_GD_OTHER_SPEED_CONFIGURATION;
+ ret = SendSetupData(h, reqlen, size, other_p) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ else
+ CyAsHalPrintMessage("** Write Sucessful\n") ;
+ }
+ }
+ else if (data[3] == CY_CH9_GD_STRING)
+ {
+ SendStringDescriptor(h, data) ;
+ }
+ else if (data[3] == CY_CH9_GD_REPORT)
+ {
+ CyAsHalPrintMessage("**** CY_CH9_GD_REPORT\n") ;
+ }
+ else if (data[3] == CY_CH9_GD_HID)
+ {
+ CyAsHalPrintMessage("**** CY_CH9_GD_HID\n") ;
+ }
+ else
+ {
+ CyAsHalPrintMessage("**** Unknown Descriptor request\n") ;
+ }
+}
+
+/*
+static void EP0DataCallback(CyAsDeviceHandle h, CyAsEndPointNumber_t ep, uint32_t count, void *buf_p, CyAsReturnStatus_t status)
+{
+ (void)ep ;
+ (void)h ;
+
+ if (status == CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("Read data phase of setup packet from EP0\n") ;
+ PrintData("SetupData", buf_p, (uint16_t)count) ;
+ }
+ else
+ {
+ CyAsHalPrintMessage("Error reading data from EP0\n") ;
+ }
+}
+*/
+
+static void
+ProcessSetupPacketRequest(CyAsDeviceHandle h, uint8_t *data)
+{
+ CyAsReturnStatus_t ret ;
+ uint16_t reqlen = data[6] | (data[7] << 8) ;
+
+ RestoreReplyArea() ;
+
+ if ((data[0] & CY_CH9_SETUP_TYPE_MASK) == CY_CH9_SETUP_STANDARD_REQUEST)
+ {
+ switch(data[1])
+ {
+ case CY_CH9_SC_GET_DESCRIPTOR:
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_GET_DESCRIPTOR request\n") ;
+ ProcessGetDescriptorRequest(h, data) ;
+ break ;
+
+ case CY_CH9_SC_GET_INTERFACE:
+ {
+ uint8_t *response = GetReplyArea() ;
+
+ *response = 0 ;
+ CyAsHalPrintMessage("************* USB EP0: CY_CH9_SC_GET_INTERFACE request - RETURNING ZERO\n") ;
+ ret = SetupWrite(h, reqlen, 1, response) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ }
+ }
+ break ;
+
+ case CY_CH9_SC_SET_INTERFACE:
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_SET_INTERFACE request\n") ;
+ break ;
+
+ case CY_CH9_SC_SET_CONFIGURATION:
+ {
+ /*CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS ;*/
+
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_SET_CONFIGURATION request (%02x)\n", data[2]) ;
+ {
+ gAsyncStallDone = CyFalse ;
+ gAsyncStallStale = 0;
+ CyAsUsbSetStall(h, 3, StallCallbackEX, 18);
+ }
+ gSetConfig = CyTrue ;
+ g_pAstDevice->configDone = 1 ;
+ MyConfiguration = data[2];
+
+ /* Set configuration is the last step before host send MTP data to EP2 */
+#if 0
+ ret = CyAsUsbReadDataAsync(g_pAstDevice->astDevHandle,
+ CY_AS_MTP_BULK_OUT_EP, CyFalse, 512,
+ g_pAstDevice->astEPBuf, TmtpReadCallback) ;
+ if(ret != CY_AS_ERROR_SUCCESS && ret != CY_AS_ERROR_ASYNC_PENDING)
+ {
+ /*handle error in reading*/
+ CyAsHalPrintMessage("CyAsMtpApp: CyAsUsbReadDataAsync Failed. Reason code: %d\n",ret) ;
+ return ;
+ }
+#endif
+ }
+ break ;
+
+ case CY_CH9_SC_GET_CONFIGURATION:
+ {
+ uint8_t *response = GetReplyArea() ;
+
+ *response = MyConfiguration ;
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_GET_INTERFACE request\n") ;
+ ret = SetupWrite(h, reqlen, 1, response) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ }
+ }
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_GET_CONFIGURATION request\n") ;
+ break ;
+
+ case CY_CH9_SC_GET_STATUS:
+ {
+ uint16_t *response = (uint16_t *)GetReplyArea() ;
+
+ *response = 0 ;
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_GET_STATUS request\n") ;
+ ret = SetupWrite(h, reqlen, 2, response) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("****** ERROR WRITING USB DATA - %d\n", ret) ;
+ }
+ }
+ break ;
+
+ case CY_CH9_SC_CLEAR_FEATURE:
+ {
+ uint16_t feature = data[2] | (data[3] << 8) ;
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_CLEAR_FEATURE request\n") ;
+
+ if ((data[0] & CY_CH9_SETUP_DEST_MASK) == CY_CH9_SETUP_DEST_ENDPOINT && feature == 0)
+ {
+ CyAsEndPointNumber_t ep = data[4] | (data[5] << 8) ;
+ /* This is a clear feature/endpoint halt on an endpoint */
+ CyAsHalPrintMessage("Calling ClearStall on EP %d\n", ep) ;
+ ret = CyAsUsbClearStall(h, ep, StallCallback, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("******* ERROR SEND CLEAR STALL REQUEST - %d\n", ret) ;
+ }
+ }
+ }
+ break ;
+
+ case CY_CH9_SC_SET_FEATURE:
+ {
+ uint16_t feature = data[2] | (data[3] << 8) ;
+ CyAsHalPrintMessage("USB EP0 : CY_CH9_SC_SET_FEATURE request\n") ;
+
+ if ((data[0] & CY_CH9_SETUP_DEST_MASK) == CY_CH9_SETUP_DEST_ENDPOINT && feature == 0)
+ {
+ CyAsEndPointNumber_t ep = data[4] | (data[5] << 8) ;
+ /* This is a clear feature/endpoint halt on an endpoint */
+ CyAsHalPrintMessage("Calling SetStall on EP %d\n", ep) ;
+ ret = CyAsUsbSetStall(h, ep, StallCallback, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("******* ERROR SEND SET STALL REQUEST - %d\n", ret) ;
+ }
+ }
+ }
+ break;
+ }
+ }
+ else if ((data[0] & CY_CH9_SETUP_TYPE_MASK) == CY_CH9_SETUP_CLASS_REQUEST)
+ {
+ /*
+ * Handle class requests other than Mass Storage
+ */
+ ret = CyAsUsbSetStall(h, 0, StallCallback, 0) ;
+ CyAsHalPrintMessage("Sending stall request\n") ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ CyAsHalPrintMessage("**** cannot set stall state on EP 0\n") ;
+ }
+ else
+ {
+ static char buf[1024] ;
+
+ if ((data[0] & 0x80) == 0)
+ {
+ if (reqlen != 0)
+ {
+ CyAsHalPrintMessage("OUT setup request with additional data\n") ;
+ /* This is an OUT setup request, with additional data to follow */
+ /*ret = CyAsUsbReadDataAsync(h, 0, CyFalse, reqlen, buf, EP0DataCallback) ;
+ if(ret != CY_AS_ERROR_SUCCESS && ret != CY_AS_ERROR_ASYNC_PENDING)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: CyAsUsbReadDataAsync Failed. Reason code: %d\n",ret) ;
+ }*/
+ }
+ else
+ {
+ CyAsHalPrintMessage("Call setnak\n") ;
+ ret = CyAsUsbSetNak(h, 3, StallCallback, 1) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("Error in CyAsUsbSetNak - %d\n", ret) ;
+ }
+ }
+ }
+ else
+ {
+ if (reqlen != 0)
+ {
+ /*
+ * This is an unknown setup packet, probably some type of generated packet or a class
+ * packet we do not understand. We just send back some data.
+ */
+ CyAsHalMemSet(buf, 0x44, sizeof(buf)) ;
+ ret = SendSetupData(h, reqlen, reqlen, buf) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("Error ending setup data in response to unknown packet\n") ;
+ }
+ else
+ {
+ CyAsHalPrintMessage("Sent setup data associated with the unknown setup packet\n") ;
+ }
+ }
+ else
+ {
+ CyAsHalPrintMessage("Call setnak\n") ;
+ ret = CyAsUsbSetNak(h, 3, StallCallback, 1) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("Error in CyAsUsbSetNak - %d\n", ret) ;
+ }
+ }
+ }
+ }
+}
+
+static void
+MyUsbEventCallbackMS(CyAsDeviceHandle h, CyAsUsbEvent ev, void *evdata)
+{
+ CyAsHalPrintMessage("------------------------------ IN -------------------------------------\n") ;
+ switch(ev)
+ {
+ case CyAsEventUsbSuspend:
+ CyAsHalPrintMessage("CyAsEventUsbSuspend received\n") ;
+ break ;
+ case CyAsEventUsbResume:
+ {
+ /*CyAsReturnStatus_t ret = CY_AS_ERROR_SUCCESS;*/
+ CyAsHalPrintMessage("CyAsEventUsbResume received\n") ;
+ /*ret = CyAsUsbReadDataAsync(g_pAstDevice->astDevHandle, CY_AS_MTP_BULK_OUT_EP,
+ CyFalse, 512, g_pAstDevice->astEPBuf,
+ TmtpReadCallback) ;
+
+ if(ret != CY_AS_ERROR_SUCCESS && ret != CY_AS_ERROR_ASYNC_PENDING)
+ {
+ CyAsHalPrintMessage("CyAsMtpApp: CyAsUsbReadDataAsync Failed. Reason code: %d\n",ret) ;
+ return ;
+ }*/
+ }
+ break ;
+ case CyAsEventUsbReset:
+#ifdef DEBUG_ZERO
+ desc_p = (CyCh9ConfigurationDesc *)&ConfigFSDesc ;
+ other_p = (CyCh9ConfigurationDesc *)&ConfigHSDesc ;
+#else
+ desc_p = (CyCh9ConfigurationDesc *)&ZeroDesc ;
+ other_p = (CyCh9ConfigurationDesc *)&ZeroDesc ;
+#endif
+ CyAsHalPrintMessage("CyAsEventUsbReset received\n") ;
+ break ;
+ case CyAsEventUsbSpeedChange:
+
+#ifdef DEBUG_ZERO
+ desc_p = (CyCh9ConfigurationDesc *)&ConfigHSDesc ;
+ other_p = (CyCh9ConfigurationDesc *)&ConfigFSDesc ;
+#else
+ desc_p = (CyCh9ConfigurationDesc *)&ZeroDesc ;
+ other_p = (CyCh9ConfigurationDesc *)&ZeroDesc ;
+#endif
+ CyAsHalPrintMessage("CyAsEventUsbSpeedChange received\n") ;
+ break ;
+ case CyAsEventUsbSetConfig:
+ CyAsHalPrintMessage("CyAsEventUsbSetConfig received\n") ;
+ gSetConfig = CyTrue ;
+ break ;
+ case CyAsEventUsbSetupPacket:
+ PrintData("CyAsEventUsbSetupPacket received: ", (uint8_t*)evdata, 8) ;
+ ProcessSetupPacketRequest(h, (uint8_t *)evdata) ;
+ break ;
+ case CyAsEventUsbStatusPacket:
+ CyAsHalPrintMessage("CyAsEventUsbStatusPacket received\n") ;
+ break ;
+ case CyAsEventUsbInquiryBefore:
+ CyAsHalPrintMessage("CyAsEventUsbInquiryBefore received\n") ;
+ {
+ CyAsUsbInquiryData *data = (CyAsUsbInquiryData *)evdata ;
+ data->updated = CyTrue ;
+ data = data ;
+ }
+ break ;
+ case CyAsEventUsbInquiryAfter:
+ CyAsHalPrintMessage("CyAsEventUsbInquiryAfter received\n") ;
+ break ;
+ case CyAsEventUsbStartStop:
+ CyAsHalPrintMessage("CyAsEventUsbStartStop received\n") ;
+ {
+ CyAsUsbStartStopData *data = (CyAsUsbStartStopData *)evdata ;
+ data = data ;
+ }
+ break ;
+ default:
+ break;
+ }
+ CyAsHalPrintMessage("------------------------------ OUT -------------------------------------\n") ;
+}
+
+
+int CyAsSymbianStorageTest(const char *pgm, CyAsDeviceHandle h, CyAsHalDeviceTag tag)
+{
+ CyAsReturnStatus_t ret ;
+ uint32_t count = 0 ;
+ char *media_name = "SD";
+
+ g_tag = tag ;
+ memset(g_pAstDevice,0, sizeof(g_AstDevice));
+ g_pAstDevice->astHalTag = tag ;
+ g_pAstDevice->astDevHandle = h ;
+
+ /*
+ * Give a delay to allow any equipment to be ready (e.g. CATC)
+ */
+ /*CyAsHalPrintMessage("Press enter to begin USB operation (%s): ", "P Port Enumeration") ;
+ fgets(buffer, sizeof(buffer), stdin) ;*/
+
+ CyAsHalPrintMessage("*** CyAsStorageStart...\n") ;
+ ret = CyAsStorageStart(h, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: CyAsStorageStart returned error code %d\n", pgm, ret) ;
+ return 0 ;
+ }
+
+ CyAsHalPrintMessage("*** CyAsStorageQueryMedia...\n") ;
+ ret = CyAsStorageQueryMedia(h, CyAsMediaSDFlash, &count, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: Cannot query %s device count - Reason code %d\n", pgm, media_name, ret) ;
+ return 0 ;
+ }
+ CyAsHalPrintMessage("%d %s device(s) found\n", count, media_name) ;
+
+ CyAsHalPrintMessage("*** CyAsStorageClaim...\n") ;
+ ret = CyAsStorageClaim(h, CyAsBus_1, 0, 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: Cannot claim %s media - Reason code %d\n", pgm, media_name, ret) ;
+ return 0;
+ }
+
+ /* We know that there is only one */
+ g_pAstDevice->dev_data.bus = CyAsBus_1 ;
+ g_pAstDevice->dev_data.device = 0 ;
+ ret = CyAsStorageQueryDevice(h, &(g_pAstDevice->dev_data), 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: Cannot query %s device - Reason code %d\n", pgm, media_name, ret) ;
+ return 0 ;
+ }
+ CyAsHalPrintMessage("blocksize %d, %d units found\n",
+ g_pAstDevice->dev_data.desc_p.block_size, g_pAstDevice->dev_data.desc_p.number_units) ;
+
+ g_pAstDevice->unit_data.bus = CyAsBus_1 ;
+ g_pAstDevice->unit_data.device = 0 ;
+ g_pAstDevice->unit_data.unit = 0 ;
+ /* We know that there is only one */
+ ret = CyAsStorageQueryUnit(h, &(g_pAstDevice->unit_data), 0, 0) ;
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: Cannot query %s device unit - Reason code %d\n", pgm, media_name, ret) ;
+ return 0 ;
+ }
+ CyAsHalPrintMessage("blocksize %d, %d Block(s) found\n",
+ g_pAstDevice->unit_data.desc_p.block_size, g_pAstDevice->unit_data.desc_p.unit_size) ;
+
+
+ {
+ int i = 0 , j;
+ char buf[512] = {0} ;
+ char expBuf[512] = {0} ;
+ memset(buf, 0xa5, 512);
+ memset(expBuf, 0xa5, 512);
+
+ CyAsHalPrintMessage("Read SD card\n");
+ ret = CyAsStorageRead( h, 1, 0, 0, 0, buf, 1);
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: Cannot read first sector of SD card\n", pgm) ;
+ return 0 ;
+ }
+ CyAsHalPrintMessage("Read Result\n");
+ for ( i = 0 ; i < 512; i++ )
+ {
+ if ( (i != 0 ) && (i % 16 == 0))
+ {
+
+ CyAsHalPrintMessage("\t");
+ for ( j = 0 ; j < 16 ; j++ )
+ {
+ if ( (buf[i+j] > 32) && (buf[i+j] < 127))
+ {
+ CyAsHalPrintMessage("%c",buf[i+j]);
+ }
+ else
+ {
+ CyAsHalPrintMessage(".");
+ }
+ }
+ CyAsHalPrintMessage("\n");
+ }
+ CyAsHalPrintMessage("%02x ",buf[i]);
+ }
+ CyAsHalPrintMessage("\n");
+
+ ret = CyAsStorageWrite(h, 1, 0, 0, 0, expBuf, 1);
+ if ( ret != CY_AS_ERROR_SUCCESS )
+ {
+ CyAsHalPrintMessage("%s: Cannot write to first sector of SD card\n",pgm) ;
+ return 0 ;
+ }
+
+ memset(buf, 0xa5, 512);
+ ret = CyAsStorageRead(h, 1, 0, 0, 0, buf, 1);
+ if (ret != CY_AS_ERROR_SUCCESS)
+ {
+ CyAsHalPrintMessage("%s: Cannot read first sector of SD card\n",pgm) ;
+ return 0 ;
+ }
+
+ for ( i = 0 ; i < 512; i++ )
+ {
+ if ( buf[i] != expBuf[i] )
+ {
+
+ CyAsHalPrintMessage("EXP[%d]: 0x%02x",i,expBuf[i]);
+ CyAsHalPrintMessage("ACT[%d]: 0x%02x",i,buf[i]);
+ }
+ }
+ }
+
+
+ return 1 ;
+}
+
+int CyAsAPIGetHandle( CyAsDeviceHandle h, CyAsHalDeviceTag tag)
+{
+ g_tag = tag ;
+ memset(g_pAstDevice,0, sizeof(g_AstDevice));
+ g_pAstDevice->astHalTag = tag ;
+ g_pAstDevice->astDevHandle = h ;
+
+ return 1 ;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/drivers/cyasusbinit.h Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,56 @@
+
+#ifndef ASTORIAUSBINIT_H
+#define ASTORIAUSBINIT_H
+
+/* The BUS bits */
+#define CY_TEST_BUS_0 (0x01)
+#define CY_TEST_BUS_1 (0x02)
+
+typedef struct TmtpAstDev
+{
+ CyAsHalDeviceTag astHalTag;
+ CyAsDeviceHandle astDevHandle;
+
+ /* EP related stats */
+ volatile uint8_t astEPDataAvail;
+ uint32_t astEPBuflength;
+ uint8_t astEPBuf[512];
+
+ /* Current Transaction Id */
+ uint32_t tId ;
+
+ /* Data members to be used by user-implemented MTPEventCallback() via the relevant interface methods */
+ volatile CyBool tmtpSendComplete;
+ volatile CyBool tmtpGetComplete;
+ volatile CyBool tmtpNeedNewBlkTbl;
+ CyAsStorageQueryDeviceData dev_data;
+ CyAsStorageQueryUnitData unit_data;
+ /* Data member used to store the SendObjectComplete event data */
+ CyAsMTPSendObjectCompleteData tmtpSendCompleteData;
+
+ /* Data member used to store the GetObjectComplete event data */
+ CyAsMTPGetObjectCompleteData tmtpGetCompleteData;
+
+ uint8_t configDone ;
+} TmtpAstDev;
+
+
+int
+CyAsAPIUsbInit(
+ const char *pgm,
+ CyAsDeviceHandle h,
+ CyAsHalDeviceTag tag);
+
+int
+CyAsSymbianStorageTest(
+ const char *pgm,
+ CyAsDeviceHandle h,
+ CyAsHalDeviceTag tag);
+
+int
+CyAsAPIGetHandle(
+ CyAsDeviceHandle h,
+ CyAsHalDeviceTag tag);
+
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/wb.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,37 @@
+// Copyright (c) 1994-2009 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:
+//
+// Description:
+// omap3530/beagle_drivers/led/led.cpp
+//
+
+#include <kern_priv.h>
+#include <beagle/beagle_gpio.h>
+#include <beagle/variant.h>
+#include <assp/omap3530_assp/omap3530_assp_priv.h>
+#include <assp/omap3530_assp/omap3530_irqmap.h> // GPIO interrupts
+#include <assp/omap3530_assp/omap3530_gpio.h>
+
+#include <assp.h> // Required for definition of TIsr
+
+#include <cyashalbeagleboard.h>
+
+DECLARE_STANDARD_EXTENSION()
+ {
+
+ CyAsHalAstoriaInit();
+ return KErrNone;
+ }
+
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/omap3530/beagle_drivers/wb/wb.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -0,0 +1,80 @@
+// ===========================
+//
+// Copyright Cypress Semiconductor Corporation, 2006-2009,
+// All Rights Reserved
+// UNPUBLISHED, LICENSED SOFTWARE.
+//
+// CONFIDENTIAL AND PROPRIETARY INFORMATION
+// WHICH IS THE PROPERTY OF CYPRESS.
+//
+// ===========================
+//
+// Description:
+// oamp3530/beagle_drivers/wb/wb.mmp
+// wb.dll Beagle WB driver
+//
+
+
+
+/**
+ @file
+*/
+#define __USING_ASSP_REGISTER_API__
+#define __USING_ASSP_INTERRUPT_API__
+
+#include "beagle/variant.mmh"
+#include "kernel/kern_ext.mmh"
+
+USERINCLUDE ./api/include
+USERINCLUDE ./api/hal
+USERINCLUDE ./api/src
+USERINCLUDE ./drivers
+
+//target VariantTarget(wb,dll)
+target wb.dll
+targettype kext
+romtarget wb.dll
+
+macro CY_DEFINE_BASIC_TYPES
+macro __CY_ASTORIA_BEAGLEBOARD_SPI__HAL__
+macro DEBUG_ZERO
+macro DEBUG_MSC
+//macro FIRMWARE_NOPPORT
+//macro HW_TEST
+macro OVERCLOCK_SD
+
+sourcepath .
+
+source ./api/src/cyasdma.c
+source ./api/src/cyaslep2pep.c
+source ./api/src/cyaslowlevel.c
+source ./api/src/cyasmisc.c
+source ./api/src/cyasmtp.c
+source ./api/src/cyasstorage.c
+source ./api/src/cyasusb.c
+source ./api/src/cyasintr.c
+source ./api/hal/cyashalbeagleboard_spi.cpp
+source ./api/hal/cyashalbeagleboard.cpp
+source ./drivers/CyAsSymbianStorageDriver.cpp
+source ./drivers/cyasusbinit.cpp
+source wb.cpp
+
+library VariantTarget(ecust,lib)
+library AsspTarget(gpio,lib)
+library AsspTarget(prcm,lib)
+
+deffile ./def/~/wb.def
+
+start wins
+win32_headers
+end
+
+epocallowdlldata
+
+UID 0x10004379 0x10005742
+VENDORID 0x70000001
+
+capability all
+
+SMPSAFE
+
--- a/omap3530/beagleboard/bld.inf Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagleboard/bld.inf Wed Apr 14 10:04:00 2010 +0100
@@ -46,6 +46,11 @@
PRJ_EXTENSIONS
start extension base/bootstrap
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+option INC_PATH /epoc32/include
+#else
+option INC_PATH /epoc32/include/platform
+#endif
option NAME _beagle_bootrom
option CPU arm
option MEMMODEL multiple
--- a/omap3530/beagleboard/bootstrap/beagle.s Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagleboard/bootstrap/beagle.s Wed Apr 14 10:04:00 2010 +0100
@@ -25,8 +25,8 @@
;
; Platform specific constant definitions
-DRamBankBase EQU 0x80000000 ; 128M of DRAM
-DRamBankMaxSize EQU 0x08000000
+DRamBankBase EQU 0x80000000 ; 256M of DRAM
+DRamBankMaxSize EQU 0x10000000
; HW used by bootstrap
Serial0PhysBase EQU 0x4806A000
@@ -37,9 +37,10 @@
Serial1LinBase EQU PrimaryIOBase + 0x0006C000
Serial2LinBase EQU PrimaryIOBase + 0x00420000
-SuperPageAddr EQU 0x85000000 ; boot stack goes just after this
+SuperPageAddr EQU 0x8c000000 ; boot stack goes just after this
TheHwvd EQU 0x09080001 ; this is arbitary 0908 are CPU and ASSP 01 is variant
+
;
;*******************************************************************************
;
--- a/omap3530/beagleboard/rom/beagle.oby Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagleboard/rom/beagle.oby Wed Apr 14 10:04:00 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+f// Copyright (c) 2009 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"
@@ -19,7 +19,7 @@
define LANGID 01
define BUILDNO 0
define VERSION 0.01
-
+define ROMDATE ##TODAY##
DEFAULT_LANGUAGE 01
REM Definitions specific to Beagle Board
@@ -36,6 +36,7 @@
define ROMMEGS 80 /* !! HEX !! */
define PLATFORM_NAME beagle
+
#define COLOR
#define EUSER_DLL ../../armv5/BUILD_DIR/_omap3530_euser.dll
@@ -53,6 +54,7 @@
//#define SYMBIAN_GRAPHICS_USE_GCE
//#define SYMBIAN_EXCLUDE_LOCATION // <- Can't exclude from s60 images
+#define SERIALMOUSE
#define SYMBIAN_EXCLUDE_OMA_DEVMAN
#define SYMBIAN_EXCLUDE_OMA_DATASYNC
--- a/omap3530/beagleboard/rom/kernel.iby Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagleboard/rom/kernel.iby Wed Apr 14 10:04:00 2010 +0100
@@ -36,6 +36,9 @@
extension[VARID]= \Epoc32\Release\ARMV5\##BUILD##\_omap3530_GPIO.DLL \sys\bin\gpio.dll
//extension[VARID]= \epoc32\release\ARMV5\##BUILD##\_##VARIANT##_LED.DLL \sys\bin\led.dll
+// Uncommnet to include West Bridge Astoria Symbian Storage driver
+//extension[VARID]= \epoc32\release\ARMV5\##BUILD##\_##VARIANT##_WB.DLL \sys\bin\wb.dll
+//extension[VARID]= \epoc32\release\ARMV5\##BUILD##\wb.dll \sys\bin\wb.dll
//extension[VARID]= \Epoc32\Release\ARMV5\##BUILD##\_##VARIANT##_resman.pdd \sys\bin\resman.pdd
//extension[VARID]= \Epoc32\Release\##KMAIN##\##BUILD##\resman.ldd \sys\bin\resman.ldd
@@ -64,6 +67,7 @@
file[VARID]= \epoc32\release\##KMAIN##\##BUILD##\_##VARIANT##_EKDATA.DLL \sys\bin\ekdata.dll
extension[VARID]= \epoc32\release\##KMAIN##\##BUILD##\ELOCD.LDD \sys\bin\elocd.ldd
extension[VARID]= \epoc32\release\ARMV5\##BUILD##\_##VARIANT##_MEDINT.PDD \sys\bin\medint.pdd
+// Uncommnet to include West Bridge Astoria Symbian Storage driver //extension[VARID]= \epoc32\release\ARMV5\##BUILD##\_##VARIANT##_MEDWB.PDD \sys\bin\medwb.pdd
device[VARID]= \epoc32\release\##KMAIN##\##BUILD##\PIPELIB.LDD \sys\bin\pipelib.ldd
extension[VARID]= \epoc32\release\##KMAIN##\##BUILD##\EXSTART.DLL \sys\bin\exstart.dll
--- a/omap3530/beagleboard/src/vbeagle.mmp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/beagleboard/src/vbeagle.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -31,6 +31,7 @@
linkas ecust.dll
systeminclude +/include/drivers
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
sourcepath .
source variant.cpp
--- a/omap3530/bld.inf Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/bld.inf Wed Apr 14 10:04:00 2010 +0100
@@ -1,5 +1,5 @@
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-///bld.inf" rights reserved.
+// 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
@@ -19,6 +19,10 @@
#include "beagle_drivers/keytran/bld.inf"
#include "beagle_drivers/lcd/bld.inf"
#include "beagle_drivers/led/bld.inf"
+//nxz
+#include "beagle_drivers/wb/bld.inf"
+//skkm
+#include "beagle_drivers/medwb/bld.inf"
// #include "beagle_drivers/prm/bld.inf"
#include "beagle_drivers/serialmouse/bld.inf"
#include "beagle_drivers/usbv/bld.inf"
@@ -32,3 +36,10 @@
#include "shared/mstick/bld.inf"
#include "shared/serialkeyb/bld.inf"
#include "shared/tps65950/bld.inf"
+
+// Build image armv5 for urel and udeb
+PRJ_EXTENSIONS
+start extension base/rom
+option REE_TARGET beagle
+option TYPE tshell
+end
--- a/omap3530/omap3530_drivers/i2c/i2c.mmp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/omap3530_drivers/i2c/i2c.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -29,6 +29,8 @@
USERINCLUDE .
SYSTEMINCLUDE +\include\assp\omap3530_assp
SYSTEMINCLUDE +\include\drivers
+SYMBIAN_BASE_SYSTEMINCLUDE(assp/omap3530_assp)
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
LIBRARY AsspTarget(kaomap3530,lib)
//library resman.lib
--- a/omap3530/omap3530_drivers/prcm/prcm.cpp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/omap3530_drivers/prcm/prcm.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -154,7 +154,7 @@
{ KCM_CLKSEL1_PLL_MPU, KBit19 | KBit20 | KBit21, EDivCore_1_2_4, 19 }, // EClkMpuPll_Bypass, ///< DPLL1 bypass frequency
{ KCM_CLKSEL1_PLL_IVA2, KBit19 | KBit20 | KBit21, EDivCore_1_2_4, 19 }, // EClkIva2Pll_Bypass, ///< DPLL2 bypass frequency
- { KCM_CLKSEL_WKUP, KBit1 | KBit2, EDiv_1_2, 1 }, // EClkRM_F, ///< Reset manager functional clock
+ { KCM_CLKSEL_WKUP, KBit1 | KBit2, EDiv_1_2, 1 }, // EClkRM_F, ///< Reset manager functional clock
{ KCM_CLKSEL3_PLL, 0x1F, EDivPll_1_To_16, 0 }, // EClk96M ///< 96MHz clock
{ KCM_CLKSEL5_PLL, 0x1F, EDivPll_1_To_16, 0 }, // EClk120M ///< 120MHz clock
{ KCM_CLKOUT_CTRL, KBit3 | KBit4 | KBit5, EDivClkOut_1_2_4_8_16, 3 }, // EClkSysOut
@@ -362,7 +362,7 @@
{ { KDummy, 0, 0, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClkMpuPll_Bypass, ///< DPLL1 bypass frequency
{ { KDummy, 0, 0, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClkIva2Pll_Bypass, ///< DPLL2 bypass frequency
- { { KDummy, 0, 0, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClkRM_F, ///< Reset manager functional clock
+ { { KDummy, 0, 0, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClkRM_F, ///< Reset manager functional clock
{ { KDummy, 0, 0, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClk96M, ///< 96MHz clock
{ { KDummy, 0, 0, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClk120M, ///< 120MHz clock
{ { KDummy, 0, 0, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkSysOut,
@@ -386,8 +386,8 @@
{ { KCM_FCLKEN1_CORE, KBit10, KBit10, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkMcBSP5_F,
{ { KCM_FCLKEN1_CORE, KBit18, KBit18, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkMcSpi1_F,
{ { KCM_FCLKEN1_CORE, KBit19, KBit19, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkMcSpi2_F,
- { { KCM_FCLKEN1_CORE, KBit20, KBit20, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkMcSpi3_F,
- { { KCM_FCLKEN1_CORE, KBit21, KBit21, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkMcSpi4_F,
+ { { KCM_FCLKEN1_CORE, KBit20, KBit20, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClkMcSpi3_F,
+ { { KCM_FCLKEN1_CORE, KBit21, KBit21, 0 }, { KDummy, 0, KDummyReadAsEnabled, 0 } }, // EClkMcSpi4_F,
{ { KCM_FCLKEN1_CORE, KBit15, KBit15, 0}, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkI2c1_F,
{ { KCM_FCLKEN1_CORE, KBit16, KBit16, 0}, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkI2c2_F,
{ { KCM_FCLKEN1_CORE, KBit17, KBit17, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkI2c3_F,
@@ -520,7 +520,7 @@
{ KDummy, 0, KDummyReadAsDisabled, 0 }, // EClkMpuPll_Bypass, ///< DPLL1 bypass frequency
{ KDummy, 0, KDummyReadAsDisabled, 0 }, // EClkIva2Pll_Bypass, ///< DPLL2 bypass frequency
- { KDummy, 0, KDummyReadAsDisabled, 0 }, // EClkRM_F, ///< Reset manager functional clock
+ { KDummy, 0, KDummyReadAsDisabled, 0 }, // EClkRM_F, ///< Reset manager functional clock
{ KDummy, 0, KDummyReadAsDisabled, 0 }, // EClk96M, ///< 96MHz clock
{ KDummy, 0, KDummyReadAsDisabled, 0 }, // EClk120M, ///< 120MHz clock
{ KDummy, 0, KDummyReadAsDisabled, 0 }, // EClkSysOut,
@@ -684,7 +684,7 @@
{ { KDummy, 0, KDummyReadAsDisabled, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkMpuPll_Bypass, ///< DPLL1 bypass frequency
{ { KDummy, 0, KDummyReadAsDisabled, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkIva2Pll_Bypass, ///< DPLL2 bypass frequency
- { { KDummy, 0, KDummyReadAsDisabled, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkRM_F, ///< Reset manager functional clock
+ { { KDummy, 0, KDummyReadAsDisabled, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkRM_F, ///< Reset manager functional clock
{ { KDummy, 0, KDummyReadAsDisabled, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClk96M, ///< 96MHz clock
{ { KDummy, 0, KDummyReadAsDisabled, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClk120M, ///< 120MHz clock
{ { KDummy, 0, KDummyReadAsDisabled, 0 }, { KDummy, 0, KDummyReadAsDisabled, 0 } }, // EClkSysOut,
@@ -860,7 +860,7 @@
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkMpuPll_Bypass, ///< DPLL1 bypass frequency
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkIva2Pll_Bypass, ///< DPLL2 bypass frequency
- { KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkRM_F, ///< Reset manager functional clock
+ { KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkRM_F, ///< Reset manager functional clock
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClk96M, ///< 96MHz clock
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClk120M, ///< 120MHz clock
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkSysOut,
@@ -993,7 +993,7 @@
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClk48M
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClk12M
-
+
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkSysClk
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkAltClk
{ KDummy, {-1, -1, -1, -1, -1, -1 } }, // EClkSysClk32k
@@ -1045,7 +1045,7 @@
{ KCM_CLKSEL_PER, KBit4 }, // EGpt6,
{ KCM_CLKSEL_PER, KBit5 }, // EGpt7,
{ KCM_CLKSEL_PER, KBit6 }, // EGpt8,
- { KCM_CLKSEL_PER, KBit7 }, // EGpt9,
+ { KCM_CLKSEL_PER, KBit7 }, // EGpt9,
{ KCM_CLKSEL_CORE, KBit6 }, // EGpt10,
{ KCM_CLKSEL_CORE, KBit7 }, // EGpt11,
{ KDummy, 0 }, // EGpt12 - clocked from security block
@@ -1152,7 +1152,7 @@
{ EDuplicate, Prcm::EClkSysClk32k }, // EClkGpio5_F,
{ EDuplicate, Prcm::EClkSysClk32k }, // EClkGpio6_F,
{ EDuplicate, Prcm::EClk120M }, // EClkUsb120_F,
- { EDuplicate, Prcm::EClk48M }, // EClkUsb48_F,
+ { EDuplicate, Prcm::EClk48M }, // EClkUsb48_F,
// Interface clocks
{ EDuplicate, Prcm::EClkL4Domain }, // EClkDss_I,
@@ -1692,7 +1692,7 @@
}
TInt irq = __SPIN_LOCK_IRQSAVE(iLock);
-
+
_BitClearSet( KPllMode[ aPll ].iModeRegister,
KPllModeMask << KPllMode[ aPll ].iModeShift,
newMode << KPllMode[ aPll ].iModeShift );
@@ -1700,7 +1700,7 @@
_BitClearSet( KPllMode[ aPll ].iAutoRegister,
KPllAutoMask << KPllMode[ aPll ].iAutoShift,
newAuto << KPllMode[ aPll ].iAutoShift );
-
+
__SPIN_UNLOCK_IRQRESTORE(iLock, irq);
}
@@ -1713,7 +1713,7 @@
TUint32 mode = (AsspRegister::Read32( KPllMode[ aPll ].iModeRegister ) >> KPllMode[ aPll ].iModeShift) bitand KPllModeMask;
TUint32 autoSet = (AsspRegister::Read32( KPllMode[ aPll ].iAutoRegister ) >> KPllMode[ aPll ].iAutoShift) bitand KPllAutoMask;
- static const TPllMode modeTable[8][2] =
+ static const TPllMode modeTable[8][2] =
{ // auto disabled auto enabled
{ EPllStop, EPllStop }, // not possible
{ EPllStop, EPllStop },
@@ -1879,7 +1879,7 @@
{
__KTRACE_OPT( KPRCM, Kern::Printf( "Prcm::PllBypassDivider(%x)", aPll ) );
__ASSERT_DEBUG( (TUint)aPll <= EDpll5, Panic( EPllBypassDividerBadPll ) );
-
+
TUint div = 1;
switch( aPll )
@@ -1917,7 +1917,7 @@
__ASSERT_DEBUG( (TUint)aClock < KSupportedClockCount, Panic( ESetDividerBadClock ) );
const TDividerInfo& inf = KDividerInfo[ aClock ];
-
+
TUint32 div = aDivide; // most common case, special cases handled below
switch( inf.iDivType )
@@ -2026,7 +2026,7 @@
}
// if we get here, we have a valid divider value
-
+
_LockedBitClearSet( inf.iRegister, inf.iMask, div << inf.iShift );
}
@@ -2037,7 +2037,7 @@
__ASSERT_DEBUG( (TUint)aClock < KSupportedClockCount, Panic( EGetDividerBadClock ) );
const TDividerInfo& inf = KDividerInfo[ aClock ];
-
+
TUint32 div = ( AsspRegister::Read32( inf.iRegister ) bitand inf.iMask ) >> inf.iShift;
TUint result = div; // most common case
@@ -2127,7 +2127,7 @@
__ASSERT_DEBUG( (TUint)aMode <= EPowerOn, Panic( ESetDomainModeBadMode ) );
__ASSERT_DEBUG( 0 != (KPowerDomainControl[ aDomain ].iAllowedMask bitand (1 << aMode)), Panic( ESetDomainModeUnsupportedMode ) );
-
+
TUint shift = KPowerDomainControl[ aDomain ].iShift;
_LockedBitClearSet( KPowerDomainControl[ aDomain ].iRegister,
@@ -2316,7 +2316,7 @@
const TWakeupDomainInfo& inf = KClockWakeupDomainTable[ aClock ];
TUint32 mask = 1 << (TUint)inf.iBitNumber[ aDomain ]; // unsupported bit numbers will result in a mask of 0x00000000
-
+
_LockedBitClearSet( inf.iRegister, KClearNone, mask );
}
@@ -2329,7 +2329,7 @@
const TWakeupDomainInfo& inf = KClockWakeupDomainTable[ aClock ];
TUint32 mask = 1 << (TUint)inf.iBitNumber[ aDomain ]; // unsupported bit numbers will result in a mask of 0x00000000
-
+
_LockedBitClearSet( inf.iRegister, mask, KSetNone );
}
@@ -2776,12 +2776,12 @@
div *= 4;
break;
}
-
+
currentClock = prevClock;
} // end do
// When we reach here we have worked back to the origin clock
-
+
TUint64 fSrc;
const Omap3530Assp* variant = (Omap3530Assp*)Arch::TheAsic();
@@ -2828,7 +2828,7 @@
/** Get the currently configured SysClk frequency */
EXPORT_C TSysClkFrequency SysClkFrequency()
{
-
+
switch( AsspRegister::Read32( KPRM_CLKSEL ) bitand (KBit0 | KBit1 | KBit2) )
{
case 0:
@@ -2945,13 +2945,19 @@
r = AsspRegister::Read32(KMCSPI3_SYSCONFIG);
__NK_ASSERT_ALWAYS((r & 1 << 3) == 0);
__NK_ASSERT_ALWAYS((r & 1 << 8) == 0);
+ /* nxz enable SPI 3
SetClockState( EClkMcSpi3_F, EClkOff );
- SetClockState( EClkMcSpi3_I, EClkOff );
+ SetClockState( EClkMcSpi3_I, EClkOff );*/
+ SetClockState( EClkMcSpi3_F, EClkOn );
+ SetClockState( EClkMcSpi3_I, EClkOn );
r = AsspRegister::Read32(KMCSPI4_SYSCONFIG);
__NK_ASSERT_ALWAYS((r & 1 << 3) == 0);
__NK_ASSERT_ALWAYS((r & 1 << 8) == 0);
+ /* nxz enable SPI 4
SetClockState( EClkMcSpi4_F, EClkOff );
- SetClockState( EClkMcSpi4_I, EClkOff );
+ SetClockState( EClkMcSpi4_I, EClkOff );*/
+ SetClockState( EClkMcSpi4_F, EClkOn );
+ SetClockState( EClkMcSpi4_I, EClkOn );
// UART
TInt debugport = Kern::SuperPage().iDebugPort;
@@ -3070,7 +3076,7 @@
__NK_ASSERT_ALWAYS((r & 1 << 8) == 0);
_BitClearSet(KCM_FCLKEN_WKUP, 1 << 3, 0);
_BitClearSet(KCM_ICLKEN_WKUP, 1 << 3, 0);
-
+
//r = AsspRegister::Read32(KGPIO2_SYSCONFIG);
//__NK_ASSERT_ALWAYS((r & 1 << 3) == 0);
//__NK_ASSERT_ALWAYS((r & 1 << 8) == 0);
--- a/omap3530/omap3530_drivers/usbcc/usbcc.mmp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/omap3530_drivers/usbcc/usbcc.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -19,6 +19,7 @@
systeminclude +/include/drivers
systeminclude +/include/assp/omap3530_assp
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
target AsspTarget(usbcc,dll)
targettype kext
--- a/omap3530/shared/monitor/monitor.mmp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/shared/monitor/monitor.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -24,6 +24,7 @@
target AsspTarget(exmondebug,dll)
systeminclude +/include
+OS_LAYER_SYSTEMINCLUDE
sourcepath .
source monitor.cpp
--- a/omap3530/shared/serialkeyb/serialkeyboard.cpp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/shared/serialkeyb/serialkeyboard.cpp Wed Apr 14 10:04:00 2010 +0100
@@ -99,10 +99,10 @@
/*3e*/ SHIFTED(EStdKeyFullStop), // >
/*3f*/ SHIFTED(EStdKeyForwardSlash), // ?
/*40*/ SHIFTED(EStdKeySingleQuote), // @
- /*41*/ SHIFTED('A'),
- /*42*/ SHIFTED('B'),
- /*43*/ SHIFTED('C'),
- /*44*/ SHIFTED('D'),
+ /*41*/ EStdKeyUpArrow,
+ /*42*/ EStdKeyDownArrow,
+ /*43*/ EStdKeyRightArrow,
+ /*44*/ EStdKeyLeftArrow,
/*45*/ SHIFTED('E'),
/*46*/ SHIFTED('F'),
/*47*/ SHIFTED('G'),
@@ -131,11 +131,11 @@
/*5e*/ SHIFTED('6'), // ^
/*5f*/ SHIFTED(EStdKeyMinus), // _
/*60*/ EStdKeyBacklightToggle, // Actually `
- /*61*/ 'A',
+ /*61*/ EStdKeyYes,
/*62*/ 'B',
/*63*/ 'C',
- /*64*/ 'D',
- /*65*/ 'E',
+ /*64*/ EStdKeyNo,
+ /*65*/ EStdKeyDevice1,
/*66*/ 'F',
/*67*/ 'G',
/*68*/ 'H',
@@ -147,13 +147,13 @@
/*6e*/ 'N',
/*6f*/ 'O',
/*70*/ 'P',
- /*71*/ 'Q',
+ /*71*/ EStdKeyDevice0,
/*72*/ 'R',
- /*73*/ 'S',
+ /*73*/ EStdKeyApplication0,
/*74*/ 'T',
/*75*/ 'U',
/*76*/ 'V',
- /*77*/ 'W',
+ /*77*/ EStdKeyDevice3,
/*78*/ 'X',
/*79*/ 'Y',
/*7a*/ 'Z',
@@ -231,12 +231,18 @@
__KTRACE_OPT(KBOOT,Kern::Printf("+TSerialKeyboardl::Create:PRM client ID=%x", iPrmClientId )) ;
Kern::Printf("+TSerialKeyboardl::Create:PRM client ID=%x", iPrmClientId );
+ Prcm::SetClockState(iUart.PrcmInterfaceClk(), Prcm::EClkOn);
+ Prcm::SetClockState(iUart.PrcmFunctionClk(), Prcm::EClkOn);
+
r = Interrupt::Bind( iUart.InterruptId(), UartIsr, this );
if ( r < 0 )
{
+ Kern::Printf("TSerialKeyboard Bind r=%d", r);
return r;
}
+ Kern::Printf("+TSerialKeyboard::Create bound to interrupt" );
+
// Ask power resource manager to turn on clocks to the UART
// (this could take some time but we're not in any hurry)
/*r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmFunctionClk(), Prcm::EClkOn );
@@ -304,6 +310,7 @@
}
else
{
+ Kern::Printf("Key received: %d %d", self->iKey, KScanCode[self->iKey]);
self->AddKey( KScanCode[ self->iKey ] );
}
break;
@@ -355,6 +362,8 @@
TRawEvent e;
+ Kern::Printf("AddKey %d %d %d %d", shifted, ctrl, func, stdKey);
+
if ( func )
{
e.Set( TRawEvent::EKeyDown, EStdKeyRightFunc, 0 );
--- a/omap3530/shared/serialkeyb/serialkeyboard.mmp Tue Apr 13 18:28:12 2010 +0100
+++ b/omap3530/shared/serialkeyb/serialkeyboard.mmp Wed Apr 14 10:04:00 2010 +0100
@@ -33,10 +33,12 @@
systeminclude +/include/drivers
+SYMBIAN_BASE_SYSTEMINCLUDE(drivers)
sourcepath .
source serialkeyboard.cpp
library AsspTarget(uart,lib)
+library AsspTarget(prcm,lib)
//library resman.lib
noexportlibrary