]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Library/I2CLibPei/I2CAccess.h
Vlv2TbltDevicePkg:Signal EndOfDxe Event.
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / I2CLibPei / I2CAccess.h
CommitLineData
4e522096
DW
1/** @file\r
2 Misc Registers Definition.\r
3 \r
4 Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>\r
5 \r
6 This program and the accompanying materials are licensed and made available under\r
7 the terms and conditions of the BSD License that accompanies this distribution. \r
8 The full text of the license may be found at \r
9 http://opensource.org/licenses/bsd-license.php. \r
10 \r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13 \r
14--*/\r
15\r
16#ifndef _I2C_ACCESS_H_\r
17#define _I2C_ACCESS_H_\r
18\r
19#include "I2CIoLibPei.h"\r
20\r
21#define DEFAULT_PCI_BUS_NUMBER_PCH 0\r
22\r
23#define PCI_DEVICE_NUMBER_PCH_LPC 31\r
24#define PCI_FUNCTION_NUMBER_PCH_LPC 0\r
25\r
26#define R_PCH_LPC_ACPI_BASE 0x40 // ABASE, 16bit\r
27#define R_PCH_LPC_ACPI_BASEADR 0x400 // ABASE, 16bit\r
28#define B_PCH_LPC_ACPI_BASE_EN BIT1 // Enable Bit\r
29#define B_PCH_LPC_ACPI_BASE_BAR 0x0000FF80 // Base Address, 128 Bytes\r
30#define V_PCH_ACPI_PM1_TMR_MAX_VAL 0x1000000 // The timer is 24 bit overflow\r
31#define B_PCH_ACPI_PM1_TMR_VAL 0xFFFFFF // The timer value mask\r
32\r
33#define R_PCH_ACPI_PM1_TMR 0x08 // Power Management 1 Timer\r
34#define V_PCH_ACPI_PM1_TMR_FREQUENCY 3579545 // Timer Frequency\r
35\r
36\r
37#define PchLpcPciCfg8(Register) I2CLibPeiMmioRead8 (MmPciAddress (0, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_LPC, 0, Register))\r
38\r
39#define PCIEX_BASE_ADDRESS 0xE0000000\r
40#define PCI_EXPRESS_BASE_ADDRESS ((VOID *) (UINTN) PCIEX_BASE_ADDRESS)\r
41\r
42#define MmPciAddress( Segment, Bus, Device, Function, Register ) \\r
43 ( (UINTN)PCI_EXPRESS_BASE_ADDRESS + \\r
44 (UINTN)(Bus << 20) + \\r
45 (UINTN)(Device << 15) + \\r
46 (UINTN)(Function << 12) + \\r
47 (UINTN)(Register) \\r
48 )\r
49#endif\r
50\r