|
1 /* |
|
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * ne1_tb\specific\power.cia |
|
16 * NE1_TBVariant Power Management |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 #ifdef __SMP__ |
|
23 |
|
24 #include <kernel.h> |
|
25 #include "ne1_tb_power.h" |
|
26 #include <naviengine.h> |
|
27 #include <naviengine_priv.h> |
|
28 |
|
29 __NAKED__ TInt DNE1_TBPowerController::ClearTimerInterrupt() |
|
30 { |
|
31 asm("ldr r1, __KHwTimersBase "); // Base address of timer 0 |
|
32 asm("mov r2, #%a0" : : "i" ((TInt)KNETimerGTIInt_TCI)); |
|
33 asm("str r2, [r1, #%a0]" : : "i" _FOFF(NETimer,iGTInterrupt)); // clear interrupt |
|
34 asm("ldr r1,__KGICAddr"); |
|
35 asm("ldr r0, [r1, #%a0]" : : "i" ((TInt) (((KIntIdOstMatchMsTimer>>5)<<2)+ _FOFF(GicDistributor, iPendingClear)))); |
|
36 asm("orr r0,r0,#%a0" : : "i" ((TInt) (0x1<<(KIntIdOstMatchMsTimer&0x1f)))); |
|
37 asm("str r0, [r1, #%a0]" : : "i" ((TInt) (((KIntIdOstMatchMsTimer>>5)<<2)+ _FOFF(GicDistributor, iPendingClear)))); |
|
38 __JUMP(,lr); |
|
39 asm("__KHwTimersBase: "); |
|
40 asm(".word %a0" : : "i" ((TInt)KHwTimersBase)); |
|
41 asm("__KGICAddr:"); |
|
42 asm(".word %a0" : : "i" ((TInt)KHwBaseGlobalIntDist)); |
|
43 } |
|
44 |
|
45 |
|
46 extern "C" __NAKED__ void __arm_sev() |
|
47 { |
|
48 ARM_SEV; |
|
49 __JUMP(, lr); |
|
50 } |
|
51 |
|
52 #endif // ifdef __SMP__ |