]>
git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/I2CLibPei/I2CIoLibPei.h
2 Functions for access I2C MMIO register.
4 Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
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.
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.
15 #ifndef __I2C_IOLIB_PEI__
17 #define __I2C_IOLIB_PEI__
22 Reads an 8-bit MMIO register.
24 Reads the 8-bit MMIO register specified by Address. The 8-bit read value is
25 returned. This function must guarantee that all MMIO read and write
26 operations are serialized.
28 If 8-bit MMIO register operations are not supported, then ASSERT().
30 @param Address The MMIO register to read.
32 @return The value read.
44 Reads a 16-bit MMIO register.
46 Reads the 16-bit MMIO register specified by Address. The 16-bit read value is
47 returned. This function must guarantee that all MMIO read and write
48 operations are serialized.
50 If 16-bit MMIO register operations are not supported, then ASSERT().
51 If Address is not aligned on a 16-bit boundary, then ASSERT().
53 @param Address The MMIO register to read.
55 @return The value read.
66 Writes a 16-bit MMIO register.
68 Writes the 16-bit MMIO register specified by Address with the value specified
69 by Value and returns Value. This function must guarantee that all MMIO read
70 and write operations are serialized.
72 If 16-bit MMIO register operations are not supported, then ASSERT().
73 If Address is not aligned on a 16-bit boundary, then ASSERT().
75 @param Address The MMIO register to write.
76 @param Value The value to write to the MMIO register.
83 I2CLibPeiMmioWrite16 (
90 Reads a 32-bit MMIO register.
92 Reads the 32-bit MMIO register specified by Address. The 32-bit read value is
93 returned. This function must guarantee that all MMIO read and write
94 operations are serialized.
96 If 32-bit MMIO register operations are not supported, then ASSERT().
97 If Address is not aligned on a 32-bit boundary, then ASSERT().
99 @param Address The MMIO register to read.
101 @return The value read.
106 I2CLibPeiMmioRead32 (
112 Writes a 32-bit MMIO register.
114 Writes the 32-bit MMIO register specified by Address with the value specified
115 by Value and returns Value. This function must guarantee that all MMIO read
116 and write operations are serialized.
118 If 32-bit MMIO register operations are not supported, then ASSERT().
119 If Address is not aligned on a 32-bit boundary, then ASSERT().
121 @param Address The MMIO register to write.
122 @param Value The value to write to the MMIO register.
129 I2CLibPeiMmioWrite32 (
136 OR a 32-bit MMIO register.
138 OR the 32-bit MMIO register specified by Address with the value specified
139 by Value and returns Value. This function must guarantee that all MMIO read
140 and write operations are serialized.
142 If 32-bit MMIO register operations are not supported, then ASSERT().
143 If Address is not aligned on a 32-bit boundary, then ASSERT().
145 @param Address The MMIO register to write OR.
146 @param Value The value to OR to the MMIO register.