View Single Post
  #456 (permalink)  
Old 25th Oct 2009, 11:09 am
Molitor Molitor is offline
New Member
 
Join Date: Oct 2009
Posts: 8
Default

Flasher, isn't that function that you're looking for Scu_ClockEnable, in system\driver\clock\hwapi_scu.h? Note the ".h" extension, as it's an inline function. Your disassembly is identical in my original (good) firmware, and the firmware with the audio bug (but that may be a different bug, as it's a different player), and =0x1801C000 is SCU_CPU0_CODEBASE. Here it is, from the SDK, or am I misunderstanding?

/
Code:
**************************************************************************
* 函数名称: Scu_ClockEnable
* 函数描述:  enable a module clock
* 入口参数: Clock_Disable_t :  module IP name
* 出口参数: 无
* 返回值:      无
* 注释:
***************************************************************************/
__inline void Scu_ClockEnable(SCU_Clock_t clk_id)
{
    pSCUReg->SCU_CLKCFG &= ~(1 << clk_id);
}

void Scu_ModuleReset(Module_Reset_t Module_id, BOOL Reset);
void Scu_ClockSet(SCU_Clock_t clk_id, BOOL Enable);
void SCU_SetCodecFreq(UINT32 nKHz);
Also, there's an SDK bug flagged by the compiler that might get lost in all the other warnings. In system\driver\cache\hw_cache.c, there's two functions Cache_FlushWay and Cache_FlushDataLine. They have for loops that look like this:

Code:
    for (i = 100; i = 0; i--)
    {
        .
        .
     }
That should almost certainly be:

Code:
    for (i = 100; i == 0; i--)
    {
        .
        .
     }
Otherwise you're just assigning 0 to i, which returns a true, which causes it to skip everything inside of the loop. Of course, I've seen enough "#if 0" code in the SDK so this might be intended. This last error isn't related to anything specifically, I just thought I'd mention it.
Reply With Quote