diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-05-02 20:04:00 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-05-02 20:04:00 +0000 |
commit | c54de82204db5ae68b2ad2840c8388c2fd725727 (patch) | |
tree | 9908feb6c411b2e70372074dd82c802375b168bc | |
parent | 836c350061600e6cde14b73417b9d073b00b0f69 (diff) | |
download | edk2-platforms-c54de82204db5ae68b2ad2840c8388c2fd725727.tar.xz |
ArmPlatformPkg/PL35xSmc: Added function PL35xSmcSetRefresh
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13254 6f19259b-4bc3-4df7-8a09-765794883524
-rwxr-xr-x | ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S | 13 | ||||
-rwxr-xr-x | ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm | 10 | ||||
-rw-r--r-- | ArmPlatformPkg/Include/Drivers/PL35xSmc.h | 10 |
3 files changed, 25 insertions, 8 deletions
diff --git a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S b/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S index 7c2a09c69f..3630389f81 100755 --- a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S +++ b/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S @@ -1,10 +1,10 @@ #
-# Copyright (c) 2011, ARM Limited. All rights reserved.
+# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
-# http:#opensource.org/licenses/bsd-license.php
+# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@@ -22,6 +22,7 @@ .align 3
GCC_ASM_EXPORT(PL35xSmcInitialize)
+GCC_ASM_EXPORT(PL35xSmcSetRefresh)
// IN r1 Smc Base Address
// IN r2 Smc Configuration Start Address
@@ -50,4 +51,10 @@ ASM_PFX(PL35xSmcInitialize): add r2, #0xC
b ASM_PFX(PL35xSmcInitialize)
-ASM_FUNCTION_REMOVE_IF_UNREFERENCED
\ No newline at end of file +// IN r1 Smc Base Address
+// IN r2 Smc Refresh Period 0
+// IN r3 Smc Refresh Period 1
+ASM_PFX(PL35xSmcSetRefresh):
+ str r2, [r1, #PL350_SMC_REFRESH_0_OFFSET]
+ str r3, [r1, #PL350_SMC_REFRESH_1_OFFSET]
+ blx lr
diff --git a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm b/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm index 8edc6c1028..297b2d77ab 100755 --- a/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm +++ b/ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm @@ -1,5 +1,5 @@ //
-// Copyright (c) 2011, ARM Limited. All rights reserved.
+// Copyright (c) 2011-2012, ARM Limited. All rights reserved.
//
// This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
@@ -19,6 +19,7 @@ INCLUDE AsmMacroIoLib.inc
EXPORT PL35xSmcInitialize
+ EXPORT PL35xSmcSetRefresh
PRESERVE8
AREA ModuleInitializeSMC, CODE, READONLY
@@ -50,3 +51,10 @@ PL35xSmcInitialize add r2, #0xC
b PL35xSmcInitialize
+// IN r1 Smc Base Address
+// IN r2 Smc Refresh Period 0
+// IN r3 Smc Refresh Period 1
+PL35xSmcSetRefresh
+ str r2, [r1, #PL350_SMC_REFRESH_0_OFFSET]
+ str r3, [r1, #PL350_SMC_REFRESH_1_OFFSET]
+ blx lr
diff --git a/ArmPlatformPkg/Include/Drivers/PL35xSmc.h b/ArmPlatformPkg/Include/Drivers/PL35xSmc.h index 52d64f482b..750f5088b6 100644 --- a/ArmPlatformPkg/Include/Drivers/PL35xSmc.h +++ b/ArmPlatformPkg/Include/Drivers/PL35xSmc.h @@ -1,6 +1,6 @@ /** @file
*
-* Copyright (c) 2011, ARM Limited. All rights reserved.
+* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
*
* This program and the accompanying materials
* are licensed and made available under the terms and conditions of the BSD License
@@ -15,9 +15,11 @@ #ifndef PL35xSMC_H_
#define PL35xSMC_H_
-#define PL350_SMC_DIRECT_CMD_OFFSET 0x10
-#define PL350_SMC_SET_CYCLES_OFFSET 0x14
-#define PL350_SMC_SET_OPMODE_OFFSET 0x18
+#define PL350_SMC_DIRECT_CMD_OFFSET 0x10
+#define PL350_SMC_SET_CYCLES_OFFSET 0x14
+#define PL350_SMC_SET_OPMODE_OFFSET 0x18
+#define PL350_SMC_REFRESH_0_OFFSET 0x20
+#define PL350_SMC_REFRESH_1_OFFSET 0x24
#define PL350_SMC_DIRECT_CMD_ADDR(addr) ((addr) & 0xFFFFF)
#define PL350_SMC_DIRECT_CMD_ADDR_SET_CRE (1 << 20)
|