]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c
4365e51d889a804b351708e447c12e75bf3af0fb
[mirror_edk2.git] / ArmPlatformPkg / ArmRealViewEbPkg / Library / NorFlashArmRealViewEbLib / NorFlashArmRealViewEb.c
1 /** @file
2
3 Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
4
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include <PiDxe.h>
16 #include <Library/NorFlashPlatformLib.h>
17 #include <ArmPlatform.h>
18
19 #define NOR_FLASH_DEVICE_COUNT 1
20
21 // RTSM
22 NOR_FLASH_DESCRIPTION mNorFlashDevices[NOR_FLASH_DEVICE_COUNT] = {
23 { // UEFI
24 ARM_EB_SMB_NOR_BASE,
25 ARM_EB_SMB_NOR_BASE,
26 SIZE_128KB * 512,
27 SIZE_128KB,
28 {0xE7223039, 0x5836, 0x41E1, 0xB5, 0x42, 0xD7, 0xEC, 0x73, 0x6C, 0x5E, 0x59}
29 }
30 };
31
32 EFI_STATUS
33 NorFlashPlatformInitialization (
34 VOID
35 )
36 {
37 return EFI_SUCCESS;
38 }
39
40 EFI_STATUS
41 NorFlashPlatformGetDevices (
42 OUT NOR_FLASH_DESCRIPTION **NorFlashDevices,
43 OUT UINT32 *Count
44 )
45 {
46 if ((NorFlashDevices == NULL) || (Count == NULL)) {
47 return EFI_INVALID_PARAMETER;
48 }
49
50 *NorFlashDevices = mNorFlashDevices;
51 *Count = NOR_FLASH_DEVICE_COUNT;
52
53 return EFI_SUCCESS;
54 }