]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/PL35xSmc: Added function PL35xSmcSetRefresh
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 May 2012 20:04:00 +0000 (20:04 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 2 May 2012 20:04:00 +0000 (20:04 +0000)
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

ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.S
ArmPlatformPkg/Drivers/PL35xSmc/InitializeSMC.asm
ArmPlatformPkg/Include/Drivers/PL35xSmc.h

index 7c2a09c69feb04852246f86e747bd49af922835b..3630389f81da985eaa96b56abfc249a3f5df4ea7 100755 (executable)
@@ -1,10 +1,10 @@
 #\r
-#  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+#  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
 #  \r
 #  This program and the accompanying materials                          \r
 #  are licensed and made available under the terms and conditions of the BSD License         \r
 #  which accompanies this distribution.  The full text of the license may be found at        \r
-#  http:#opensource.org/licenses/bsd-license.php                                            \r
+#  http://opensource.org/licenses/bsd-license.php                                            \r
 #\r
 #  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
 #  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
@@ -22,6 +22,7 @@
 .align 3\r
 \r
 GCC_ASM_EXPORT(PL35xSmcInitialize)\r
+GCC_ASM_EXPORT(PL35xSmcSetRefresh)\r
 \r
 // IN r1 Smc Base Address\r
 // IN r2 Smc Configuration Start Address\r
@@ -50,4 +51,10 @@ ASM_PFX(PL35xSmcInitialize):
   add   r2, #0xC\r
   b     ASM_PFX(PL35xSmcInitialize)\r
 \r
-ASM_FUNCTION_REMOVE_IF_UNREFERENCED
\ No newline at end of file
+// IN r1 Smc Base Address\r
+// IN r2 Smc Refresh Period 0\r
+// IN r3 Smc Refresh Period 1\r
+ASM_PFX(PL35xSmcSetRefresh):\r
+  str   r2, [r1, #PL350_SMC_REFRESH_0_OFFSET]\r
+  str   r3, [r1, #PL350_SMC_REFRESH_1_OFFSET]\r
+  blx lr\r
index 8edc6c1028eff4473c3876b26376d8f957eaa7ac..297b2d77abf07eb87d2d5db97ebbdad1768383e5 100755 (executable)
@@ -1,5 +1,5 @@
 //\r
-//  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+//  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
 //  \r
 //  This program and the accompanying materials                          \r
 //  are licensed and made available under the terms and conditions of the BSD License         \r
@@ -19,6 +19,7 @@
   INCLUDE AsmMacroIoLib.inc\r
   \r
   EXPORT  PL35xSmcInitialize\r
+  EXPORT  PL35xSmcSetRefresh\r
 \r
   PRESERVE8\r
   AREA    ModuleInitializeSMC, CODE, READONLY\r
@@ -50,3 +51,10 @@ PL35xSmcInitialize
   add   r2, #0xC\r
   b     PL35xSmcInitialize\r
 \r
+// IN r1 Smc Base Address\r
+// IN r2 Smc Refresh Period 0\r
+// IN r3 Smc Refresh Period 1\r
+PL35xSmcSetRefresh\r
+  str   r2, [r1, #PL350_SMC_REFRESH_0_OFFSET]\r
+  str   r3, [r1, #PL350_SMC_REFRESH_1_OFFSET]\r
+  blx lr\r
index 52d64f482b95b7c6e8d3c5e9a49ddec728ef35cd..750f5088b6de5a3f6ffe191e109f9d8461a8eb28 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
 *\r
 *  This program and the accompanying materials\r
 *  are licensed and made available under the terms and conditions of the BSD License\r
 #ifndef PL35xSMC_H_\r
 #define PL35xSMC_H_\r
 \r
-#define PL350_SMC_DIRECT_CMD_OFFSET  0x10\r
-#define PL350_SMC_SET_CYCLES_OFFSET  0x14\r
-#define PL350_SMC_SET_OPMODE_OFFSET  0x18\r
+#define PL350_SMC_DIRECT_CMD_OFFSET   0x10\r
+#define PL350_SMC_SET_CYCLES_OFFSET   0x14\r
+#define PL350_SMC_SET_OPMODE_OFFSET   0x18\r
+#define PL350_SMC_REFRESH_0_OFFSET    0x20\r
+#define PL350_SMC_REFRESH_1_OFFSET    0x24\r
 \r
 #define PL350_SMC_DIRECT_CMD_ADDR(addr)                 ((addr) & 0xFFFFF)\r
 #define PL350_SMC_DIRECT_CMD_ADDR_SET_CRE               (1 << 20)\r