# HG changeset patch # User Lukasz Forynski # Date 1282526981 -3600 # Node ID 254b9435d75e62901d6a1f8f960da46538bee020 # Parent 23f868c54bc5c07e8a3060c9cd21152e9326237f Fixed build warnings diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/medwb/medwb.cpp --- a/omap3530/beagle_drivers/medwb/medwb.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/medwb/medwb.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -495,9 +495,9 @@ { Int64 pos = iCurrentReq.Pos(); Int64 length = iCurrentReq.Length(); - TInt r; + TInt r = KErrGeneral; if (length<0 || pos<0 || (pos+length)>KMaxTInt) - return KErrGeneral; + return r; TInt p=(TInt)pos; TInt l=(TInt)length; diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/serialmouse/serialmouse.cpp --- a/omap3530/beagle_drivers/serialmouse/serialmouse.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/serialmouse/serialmouse.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -34,7 +34,9 @@ #include "serialmouse.h" +#ifdef USE_SYMBIAN_PRM _LIT( KName, "SERMOUSE" ); +#endif #ifdef _FRAME_BUFFER_CURSOR_ # define CURSOR_SIZE 5 @@ -98,14 +100,15 @@ } */ +#ifdef USE_SYMBIAN_PRM // Register with the power resource manager - //r = PowerResourceManager::RegisterClient( iPrmClientId, KName ); - //if( r != KErrNone ) - // { - // return r; - // } - - //__KTRACE_OPT(KBOOT,Kern::Printf("+TSerialMouse::Init:PRM client ID=%x", iPrmClientId )) ; + r = PowerResourceManager::RegisterClient( iPrmClientId, KName ); + __KTRACE_OPT(KBOOT,Kern::Printf("+TSerialMouse::Init:PRM client ID=%x, r=%d", iPrmClientId, r )) ; + if( r != KErrNone ) + { + return r; + } +#endif Prcm::SetClockState(iUart.PrcmInterfaceClk(), Prcm::EClkOn); Prcm::SetClockState(iUart.PrcmFunctionClk(), Prcm::EClkOn); @@ -117,19 +120,21 @@ return r; } +#ifdef USE_SYMBIAN_PRM // 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::EClkAuto ); - //if( KErrNone != r ) - // { - // return r; - // } - - //r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmInterfaceClk(), Prcm::EClkAuto ); - //if( KErrNone != r ) - // { - // return r; - // } + r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmFunctionClk(), Prcm::EClkAuto ); + if( r = KErrNone ) + { + r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmInterfaceClk(), Prcm::EClkAuto ); + } + + if( r != KErrNone ) + { + __KTRACE_OPT(KBOOT, Kern::Printf("+TSerialMouse:PRM ChangeResourceState(clock(s)) failed, client ID=%x, err=%d", iPrmClientId, r)); + return r; + } +#endif iUart.Init(); iUart.DefineMode( Omap3530Uart::TUart::EUart ); diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/usbv/usbv.cpp --- a/omap3530/beagle_drivers/usbv/usbv.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/usbv/usbv.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -182,8 +182,8 @@ return NULL; } - TInt r; - if ((r = phy->Construct()) != KErrNone) + TInt r = phy->Construct(); + if (r != KErrNone) { __KTRACE_OPT(KPANIC, Kern::Printf(" Error: Construction of TBeagleUsbPhy failed (%d)", r)); delete phy; diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/wb/api/hal/cyashalbeagleboard.h --- a/omap3530/beagle_drivers/wb/api/hal/cyashalbeagleboard.h Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/wb/api/hal/cyashalbeagleboard.h Mon Aug 23 02:29:41 2010 +0100 @@ -280,15 +280,23 @@ #define CyAnHalDisablePolling() #define CyAnHalEnablePolling() -#define CyAsHalPrintMessage -//#define CyAsHalPrintMessage Kern::Printf -#define CyAnHalPrintMessage CyAsHalPrintMessage +// #define PRINT_DEBUG_INFO // uncomment for debug info.. +#ifdef PRINT_DEBUG_INFO +#define CyAsHalPrintMessage(...) Kern::Printf(__VA_ARGS__) +#else +#define CyAsHalPrintMessage(...) +#endif +#define CyAnHalPrintMessage CyAsHalPrintMessage (...) void CyAsHalPrintMessage2(const char* msg); -/*#define CyAsHalAssert(cond) if (!(cond)) { CyAsHalPrintMessage ("Assertion failed at %s:%d\n", __FILE__, __LINE__); }*/ +#ifdef PRINT_DEBUG_INFO +#define CyAsHalAssert(cond) if (!(cond)) { CyAsHalPrintMessage ("Assertion failed at %s:%d\n", __FILE__, __LINE__); } +#else #define CyAsHalAssert(cond) +#endif + #define CyAnHalAssert(cond) CyAsHalAssert(cond) /* diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/wb/api/src/cyasmisc.c --- a/omap3530/beagle_drivers/wb/api/src/cyasmisc.c Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/wb/api/src/cyasmisc.c Mon Aug 23 02:29:41 2010 +0100 @@ -36,7 +36,8 @@ /* * The current debug level */ -static uint8_t DebugLevel = 0 ; +#ifdef CY_AS_LOG_SUPPORT +static uint8_t DebugLevel = 0 ; //commented out as it's not /* * This function sets the debug level for the API @@ -48,7 +49,7 @@ DebugLevel = level ; } -#ifdef CY_AS_LOG_SUPPORT +//#ifdef CY_AS_LOG_SUPPORT /* * This function is a low level logger for the API. @@ -1146,8 +1147,6 @@ CyAsLLRequestResponse *reply_p, CyAsResetType type) { - uint16_t v ; - (void)req_p ; (void)reply_p ; @@ -1158,7 +1157,7 @@ */ if (CyAsDeviceIsInSuspendMode(dev_p)) { - v = CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ; + CyAsHalReadRegister(dev_p->tag, CY_AS_MEM_CM_WB_CFG_ID) ; CyAsHalSleep (1) ; } @@ -1520,7 +1519,7 @@ if (CyAsDeviceIsInSuspendMode(dev_p)) return CY_AS_ERROR_IN_SUSPEND ; - if (bus < 0 || bus >= CY_AS_MAX_BUSES) + if (bus >= CY_AS_MAX_BUSES) return CY_AS_ERROR_NO_SUCH_BUS ; if (device >= CY_AS_MAX_STORAGE_DEVICES) @@ -3092,9 +3091,8 @@ 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) ; + node->client_data, CyAsFunctCBTypeGetType(node->dataType), (uint32_t)node->cb_p, (uint32_t)node->data, node->nodeType) ; } void MyPrintCBQueue(CyAsCBQueue* queue_p) @@ -3332,7 +3330,7 @@ CyAsHalAssert(CyFalse) ; break ; } - + (void) type; /* * 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. @@ -3346,7 +3344,6 @@ CyAsRemoveCBNode(dev_p->func_cbs_misc) ; else CyAsRemoveCBNode(dev_p->func_cbs_res) ; - } diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/wb/api/src/cyasstorage.c --- a/omap3530/beagle_drivers/wb/api/src/cyasstorage.c Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/wb/api/src/cyasstorage.c Mon Aug 23 02:29:41 2010 +0100 @@ -755,7 +755,7 @@ { CyAsDevice *dev_p = (CyAsDevice *)handle ; - if (bus < 0 || bus >= CY_AS_MAX_BUSES) + if (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) ; @@ -875,7 +875,7 @@ { CyAsDevice *dev_p = (CyAsDevice *)handle ; - if (bus < 0 || bus >= CY_AS_MAX_BUSES) + if (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) ; @@ -1482,7 +1482,7 @@ if (CyAsDeviceIsInSuspendMode(dev_p)) return CY_AS_ERROR_IN_SUSPEND ; - if (bus < 0 || bus >= CY_AS_MAX_BUSES) + if (bus >= CY_AS_MAX_BUSES) return CY_AS_ERROR_NO_SUCH_BUS ; if (device >= CY_AS_MAX_STORAGE_DEVICES) @@ -1691,7 +1691,7 @@ if (ret != CY_AS_ERROR_SUCCESS) return ret ; - if (bus < 0 || bus >= CY_AS_MAX_BUSES) + if (bus >= CY_AS_MAX_BUSES) return CY_AS_ERROR_NO_SUCH_BUS ; if (device >= CY_AS_MAX_STORAGE_DEVICES) @@ -1858,7 +1858,7 @@ if (ret != CY_AS_ERROR_SUCCESS) return ret ; - if (bus < 0 || bus >= CY_AS_MAX_BUSES) + if (bus >= CY_AS_MAX_BUSES) return CY_AS_ERROR_NO_SUCH_BUS ; if (device >= CY_AS_MAX_STORAGE_DEVICES) @@ -2161,7 +2161,7 @@ CyAsLLDestroyResponse(dev_p, reply_p) ; CyAsLLDestroyRequest(dev_p, req_p) ; - + (void)resp_len; return ret ; } @@ -2534,7 +2534,7 @@ if (ret != CY_AS_ERROR_SUCCESS) return ret ; - if (bus < 0 || bus >= CY_AS_MAX_BUSES) + if (bus >= CY_AS_MAX_BUSES) return CY_AS_ERROR_NO_SUCH_BUS ; if (device >= CY_AS_MAX_STORAGE_DEVICES) @@ -2626,7 +2626,7 @@ CyAsHalAssert(dev_p->func_cbs_stor->type == CYAS_FUNC_CB) ; (void) exRequest; (void) msRequest; - + (void)cntxt; (void)context ; cntxt = CyAsLLRequestResponse_GetContext(rqt) ; @@ -2756,7 +2756,7 @@ 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) + if (bus >= CY_AS_MAX_BUSES) return CY_AS_ERROR_NO_SUCH_BUS ; if (device >= CY_AS_MAX_STORAGE_DEVICES) diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/wb/api/src/cyasusb.c --- a/omap3530/beagle_drivers/wb/api/src/cyasusb.c Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/wb/api/src/cyasusb.c Mon Aug 23 02:29:41 2010 +0100 @@ -3032,8 +3032,6 @@ { CyAsReturnStatus_t ret ; CyAsLLRequestResponse *req_p , *reply_p ; - uint16_t data ; - CyAsDevice *dev_p = (CyAsDevice *)handle ; (void)response ; @@ -3053,7 +3051,6 @@ 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 */ diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagle_drivers/wb/drivers/cyasusbinit.cpp --- a/omap3530/beagle_drivers/wb/drivers/cyasusbinit.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagle_drivers/wb/drivers/cyasusbinit.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -16,22 +16,14 @@ 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] ;*/ @@ -45,7 +37,6 @@ /*static uint8_t turbopktbuffer[512] ;*/ -static CyBool gUsbTestDone = CyFalse ; static volatile CyBool gSetConfig = CyFalse ; static volatile CyBool gAsyncStallDone = CyFalse ; @@ -57,7 +48,6 @@ 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; @@ -103,7 +93,9 @@ static void StallCallbackAsync(CyAsDeviceHandle h, CyAsReturnStatus_t status, uint32_t tag, CyAsFunctCBType cbtype, void *cbdata) { - CyAsReturnStatus_t ret ; +#ifdef PRINT_DEBUG_INFO + CyAsReturnStatus_t ret ; +#endif (void)cbtype ; (void)cbdata ; (void)tag ; @@ -112,7 +104,10 @@ if(gAsyncStallStale == 0) { gAsyncStallStale++; - ret = CyAsUsbClearStall(h, 3, StallCallbackAsync, 21); +#ifdef PRINT_DEBUG_INFO + ret = +#endif + CyAsUsbClearStall(h, 3, StallCallbackAsync, 21); CyAsHalAssert(ret == CY_AS_ERROR_SUCCESS) ; } else @@ -289,11 +284,9 @@ CyAsUsbEnumControl config ; #ifdef DEBUG_ZERO CyAsUsbEndPointConfig epconfig ; + (void)epconfig; #endif uint32_t count = 0 ; - char *media_name = "SD"; - - gUsbTestDone = CyFalse ; CyAsHalPrintMessage("*** SetupUSBPPort...\n") ; /* @@ -383,7 +376,7 @@ 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) ; + CyAsHalPrintMessage("CyAsMtpApp: Cannot query SD device count - Reason code %d\n", ret) ; return -ret ; } CyAsHalPrintMessage("CyAsMtpApp: %d %s device(s) found\n", count, media_name) ; @@ -391,7 +384,7 @@ 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) ; + CyAsHalPrintMessage("CyAsMtpApp: Cannot claim SD media - Reason code %d\n", ret) ; return -ret; } @@ -401,7 +394,7 @@ 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) ; + CyAsHalPrintMessage("CyAsMtpApp: Cannot query SD device - Reason code %d\n", ret) ; return -ret ; } CyAsHalPrintMessage("CyAsMtpApp: blocksize %d, %d units found\n", @@ -414,7 +407,7 @@ 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) ; + CyAsHalPrintMessage("CyAsMtpApp: Cannot query SD device unit - Reason code %d\n", ret) ; return -ret ; } CyAsHalPrintMessage("CyAsMtpApp: blocksize %d, %d Block(s) found\n", @@ -603,14 +596,8 @@ (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 @@ -715,12 +702,9 @@ 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 ; } @@ -740,7 +724,6 @@ */ 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) ; @@ -754,7 +737,6 @@ */ 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) ; @@ -763,32 +745,36 @@ } else if (data[3] == CY_CH9_GD_CONFIGURATION) { - const char *desc_name_p ; - uint16_t size ; +#ifdef PRINT_DEBUG_INFO + const char *desc_name_p = "UNKNOWN" ; +#endif + uint16_t size = 0 ; /* * Return the CONFIGURATION descriptor. */ if (desc_p == (CyCh9ConfigurationDesc *)&ConfigHSDesc) { +#ifdef PRINT_DEBUG_INFO desc_name_p = "HighSpeed" ; +#endif size = sizeof(ConfigHSDesc) ; } else if (desc_p == (CyCh9ConfigurationDesc *)&ConfigFSDesc) { +#ifdef PRINT_DEBUG_INFO desc_name_p = "FullSpeed" ; +#endif size = sizeof(ConfigFSDesc) ; } else if (desc_p == &ZeroDesc) { +#ifdef PRINT_DEBUG_INFO desc_name_p = "ZeroDesc" ; +#endif 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) { @@ -803,32 +789,36 @@ } else if (data[3] == CY_CH9_GD_OTHER_SPEED_CONFIGURATION) { - const char *desc_name_p ; - uint16_t size ; +#ifdef PRINT_DEBUG_INFO + const char *desc_name_p = "UNKNOWN" ; +#endif + uint16_t size = 0 ; /* * Return the CONFIGURATION descriptor. */ if (other_p == (CyCh9ConfigurationDesc *)&ConfigHSDesc) { +#ifdef PRINT_DEBUG_INFO desc_name_p = "HighSpeed" ; +#endif size = sizeof(ConfigHSDesc) ; } else if (other_p == (CyCh9ConfigurationDesc *)&ConfigFSDesc) { +#ifdef PRINT_DEBUG_INFO desc_name_p = "FullSpeed" ; +#endif size = sizeof(ConfigFSDesc) ; } else if (other_p == &ZeroDesc) { +#ifdef PRINT_DEBUG_INFO desc_name_p = "ZeroDesc" ; +#endif 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) { @@ -882,8 +872,7 @@ { CyAsReturnStatus_t ret ; uint16_t reqlen = data[6] | (data[7] << 8) ; - - RestoreReplyArea() ; + (void)ret; if ((data[0] & CY_CH9_SETUP_TYPE_MASK) == CY_CH9_SETUP_STANDARD_REQUEST) { @@ -1162,7 +1151,6 @@ { CyAsReturnStatus_t ret ; uint32_t count = 0 ; - char *media_name = "SD"; g_tag = tag ; memset(g_pAstDevice,0, sizeof(g_AstDevice)); @@ -1187,7 +1175,7 @@ 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) ; + CyAsHalPrintMessage("%s: Cannot query SD device count - Reason code %d\n", pgm, ret) ; return 0 ; } CyAsHalPrintMessage("%d %s device(s) found\n", count, media_name) ; @@ -1196,7 +1184,7 @@ 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) ; + CyAsHalPrintMessage("%s: Cannot claim SD media - Reason code %d\n", pgm, ret) ; return 0; } @@ -1206,7 +1194,7 @@ 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) ; + CyAsHalPrintMessage("%s: Cannot query SD device - Reason code %d\n", pgm, ret) ; return 0 ; } CyAsHalPrintMessage("blocksize %d, %d units found\n", @@ -1219,7 +1207,7 @@ 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) ; + CyAsHalPrintMessage("%s: Cannot query SD device unit - Reason code %d\n", pgm, ret) ; return 0 ; } CyAsHalPrintMessage("blocksize %d, %d Block(s) found\n", diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagleboard/bootstrap/beagle.s --- a/omap3530/beagleboard/bootstrap/beagle.s Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagleboard/bootstrap/beagle.s Mon Aug 23 02:29:41 2010 +0100 @@ -174,7 +174,7 @@ MOV pc, lr 1 ; DRAM has been set-up by boot loader so no need to configure or probe - DCD DRamBankBase | RAM_VERBATIM, DRamBankMaxSize + DCD DRamBankBase :OR: RAM_VERBATIM, DRamBankMaxSize DCD 0,0 ; terminator diff -r 23f868c54bc5 -r 254b9435d75e omap3530/beagleboard/src/variant.cia --- a/omap3530/beagleboard/src/variant.cia Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/beagleboard/src/variant.cia Mon Aug 23 02:29:41 2010 +0100 @@ -56,7 +56,7 @@ __NAKED__ void ArmWaitForInterrupt() { //ARM_WFI; - asm(".word %a0" : : "i" ((TInt)(0x0320f003 | ((14)<<28) )) ); + asm(".word %a0" : : "i" ((TInt)(0x0320f003 | ((14u)<<28) )) ); asm(" bx lr"); } diff -r 23f868c54bc5 -r 254b9435d75e omap3530/omap3530_drivers/i2c/i2c.cpp --- a/omap3530/omap3530_drivers/i2c/i2c.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/omap3530_drivers/i2c/i2c.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -29,7 +29,10 @@ #include //#include +#ifdef USE_SYMBIAN_PRM _LIT(KDfcName, "I2C_DFC"); // Not used by the I2c dfc! +#endif + DECLARE_STANDARD_EXTENSION() { return KErrNone; @@ -73,6 +76,7 @@ // The DFC for this unit - it runs on the thread associated with the active transfer TDfc iDfc; + // the slave devices on this unit's bus TDeviceControl iDevice[KMaxDevicesPerUnit]; TInt iNumDevices; @@ -162,8 +166,11 @@ EXPORT_C THandle Open(const TConfigPb& aConfig) { +#ifdef USE_SYMBIAN_PRM //TInt r = PowerResourceManager::RegisterClient( prmClientId, KDfcName ); //__NK_ASSERT_ALWAYS(r==KErrNone); +#error FIXME: the DFC, along with the associated dfcq have to be created (e.g. in DLL entry point?) +#endif THandle h; __NK_ASSERT_ALWAYS(aConfig.iVersion == I2C_VERSION); if (aConfig.iUnit >= E1 && aConfig.iUnit <= E3) diff -r 23f868c54bc5 -r 254b9435d75e omap3530/omap3530_drivers/uart/uart.cpp --- a/omap3530/omap3530_drivers/uart/uart.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/omap3530_drivers/uart/uart.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -18,12 +18,13 @@ #include #include - +#ifdef _DEBUG LOCAL_C void ClientPanic( TInt aLine ) { _LIT( KString, "uart.cpp" ); Kern::PanicCurrentThread( KString, aLine ); } +#endif namespace Omap3530Uart diff -r 23f868c54bc5 -r 254b9435d75e omap3530/shared/serialkeyb/serialkeyboard.cpp --- a/omap3530/shared/serialkeyb/serialkeyboard.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/shared/serialkeyb/serialkeyboard.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -353,23 +353,23 @@ TInt r = KErrNone; const Omap3530Uart::TUartNumber portNumber( Omap3530Assp::DebugPortNumber() ); - + if( portNumber >= 0 ) { +#ifdef USE_SYMBIAN_PRM // Register with the power resource manager _LIT( KName, "serkey" ); - /*r = PowerResourceManager::RegisterClient( iPrmClientId, KName ); + r = PowerResourceManager::RegisterClient( iPrmClientId, KName ); + __KTRACE_OPT(KBOOT,Kern::Printf("+TSerialKeyboardl::Create:PRM client ID=%x, err=%d", iPrmClientId, r)); if( r != KErrNone ) { return r; - }*/ - - __KTRACE_OPT(KBOOT,Kern::Printf("+TSerialKeyboardl::Create:PRM client ID=%x", iPrmClientId )) ; - Kern::Printf("+TSerialKeyboardl::Create:PRM client ID=%x", iPrmClientId ); + } +#endif Prcm::SetClockState(iUart.PrcmInterfaceClk(), Prcm::EClkOn); Prcm::SetClockState(iUart.PrcmFunctionClk(), Prcm::EClkOn); - + r = Interrupt::Bind( iUart.InterruptId(), UartIsr, this ); if ( r < 0 ) { @@ -378,21 +378,22 @@ } Kern::Printf("+TSerialKeyboard::Create bound to interrupt" ); - + +#ifdef USE_SYMBIAN_PRM // 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 ); - if( KErrNone != r ) + r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmFunctionClk(), Prcm::EClkOn ); + if( r == KErrNone ) { + r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmInterfaceClk(), Prcm::EClkOn ); + } + + if( r != KErrNone ) + { + __KTRACE_OPT(KBOOT, Kern::Printf("+TSerialKeyboardl:PRM ChangeResourceState(clock(s)) failed, client ID=%x, err=%d", iPrmClientId, r)); return r; - }*/ - - /*r = PowerResourceManager::ChangeResourceState( iPrmClientId, iUart.PrmInterfaceClk(), Prcm::EClkOn ); - if( KErrNone != r ) - { - return r; - }*/ - + } +#endif // We can assume that the debug output code has already initialized the UART, we just need to prepare it for RX iUart.EnableFifo( Omap3530Uart::TUart::EEnabled, Omap3530Uart::TUart::ETriggerUnchanged, Omap3530Uart::TUart::ETrigger8 ); iUart.EnableInterrupt( Omap3530Uart::TUart::EIntRhr ); diff -r 23f868c54bc5 -r 254b9435d75e omap3530/shared/tps65950/tps65950.cpp --- a/omap3530/shared/tps65950/tps65950.cpp Fri Jul 30 11:17:10 2010 +0100 +++ b/omap3530/shared/tps65950/tps65950.cpp Mon Aug 23 02:29:41 2010 +0100 @@ -84,7 +84,7 @@ // Spinlock to protect queue when adding or removing items //static TSpinLock QueueLock(TSpinLock::EOrderGenericIrqLow1+1); -static TSpinLock QueueLock(); +//static TSpinLock QueueLock(); GLDEF_D TDfcQue* TheDfcQue; @@ -99,12 +99,12 @@ { Kern::Fault( "tps65950", aLine ); } - +#ifdef _DEBUG LOCAL_C void PanicClient( TPS65950::TPanic aPanic ) { Kern::PanicCurrentThread( KDriverNameDes, aPanic ); } - +#endif namespace TPS65950 { void CompletionDfcFunction( TAny* aParam );