mirror of
				https://git.proxmox.com/git/mirror_edk2
				synced 2025-10-31 05:28:13 +00:00 
			
		
		
		
	 fcea0fcb23
			
		
	
	
		fcea0fcb23
		
	
	
	
	
		
			
			Problems have been encountered because some of the source files have execute permission set. This can cause git to report them as changed when they are checked out onto a file system with inherited permissions. This has been seen using Cygwin, MinGW and PowerShell Git. This patch makes no change to source file content, and only aims to correct the file modes/permissions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19787 6f19259b-4bc3-4df7-8a09-765794883524
		
			
				
	
	
		
			63 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			NASM
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			NASM
		
	
	
	
	
	
| //
 | |
| //  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
 | |
| //
 | |
| //  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 | |
| //  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | |
| //
 | |
| //
 | |
| 
 | |
| #include <AsmMacroIoLib.h>
 | |
| #include <Library/PcdLib.h>
 | |
| #include <Drivers/PL35xSmc.h>
 | |
| #include <AutoGen.h>
 | |
| 
 | |
|   INCLUDE AsmMacroIoLib.inc
 | |
| 
 | |
|   EXPORT  PL35xSmcInitialize
 | |
|   EXPORT  PL35xSmcSetRefresh
 | |
| 
 | |
|   PRESERVE8
 | |
|   AREA    ModuleInitializeSMC, CODE, READONLY
 | |
| 
 | |
| // IN r1 Smc Base Address
 | |
| // IN r2 Smc Configuration Start Address
 | |
| // IN r3 Smc Configuration End Address
 | |
| // NOTE: This code is been called before any stack has been setup. It means some registers
 | |
| //       could be overwritten (case of 'r0')
 | |
| PL35xSmcInitialize
 | |
|   // While (SmcConfigurationStart < SmcConfigurationEnd)
 | |
|   cmp   r2, r3
 | |
|   blxge lr
 | |
| 
 | |
|   // Write to set_cycle register(holding register for NOR 1 cycle register or NAND cycle register)
 | |
|   ldr   r0, [r2, #0x4]
 | |
|   str   r0, [r1, #PL350_SMC_SET_CYCLES_OFFSET]
 | |
| 
 | |
|   // Write to set_opmode register(holding register for NOR 1 opomode register or NAND opmode register)
 | |
|   ldr   r0, [r2, #0x8]
 | |
|   str   r0, [r1, #PL350_SMC_SET_OPMODE_OFFSET]
 | |
| 
 | |
|   // Write to direct_cmd register so that the NOR 1 registers(set-cycles and opmode) are updated with holding registers
 | |
|   ldr   r0, =PL350_SMC_DIRECT_CMD_ADDR_CMD_UPDATE
 | |
|   ldr   r4, [r2, #0x0]
 | |
|   orr   r0, r0, r4
 | |
|   str   r0, [r1, #PL350_SMC_DIRECT_CMD_OFFSET]
 | |
| 
 | |
|   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
 | |
| 
 | |
|   END
 |