omap3530/assp/src/omap3530_assp.cia
changeset 0 6663340f3fc9
equal deleted inserted replaced
-1:000000000000 0:6663340f3fc9
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // omap3530/assp/src/omap3530_assp.cia
       
    15 // omap3530ASSP architecture layer
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 #include <e32cia.h>
       
    21 #include <assp/omap3530_assp/omap3530_assp_priv.h>
       
    22 
       
    23 __NAKED__ TUint64 DoRead64(TLinAddr /*aAddr*/)
       
    24 	{	
       
    25 	asm("ldmia	r0, {r0-r1} ");
       
    26 	__JUMP(,lr);	
       
    27 	}
       
    28 	
       
    29 
       
    30 __NAKED__ void DoWrite64(TLinAddr aAddr, TUint64 aValue)
       
    31 	{
       
    32 #ifdef __EABI__
       
    33 	asm("stmia	r0, {r2-r3} ");
       
    34 #else
       
    35 	asm("stmia	r0, {r1-r2} ");
       
    36 #endif
       
    37 	__JUMP(,lr);	            
       
    38 	}
       
    39 		
       
    40 EXPORT_C __NAKED__ void Omap3530Assp::BootWaitMilliSeconds(TInt aDuration)
       
    41 //
       
    42 // Active waiting loop (not to be used after System Tick timer has been set up - Init3()
       
    43 //
       
    44 	{
       
    45 	//
       
    46 	// TO DO: (optional)
       
    47 	//
       
    48 	// Program a Hardware Timer to generate the required duration, and then loop until the timer expires.
       
    49 	// Do NOT use interrupts!
       
    50 	//
       
    51 	}
       
    52 
       
    53 
       
    54 __NAKED__ void Omap3530Assp::NanoWait(TUint32 aInterval)
       
    55 //
       
    56 // Wait for aInterval nanoseconds
       
    57 //
       
    58 	{
       
    59 	// TO DO: work out the correct values for the hardware
       
    60 	
       
    61 	asm("sub r0, r0, #100");
       
    62 	asm("1:");
       
    63 	asm("subs r0, r0, #20");
       
    64 	asm("bgt 1b");	
       
    65 	__JUMP(,lr);
       
    66 	}