1 /*++ 2 3 Copyright (c) 2004, Intel Corporation. All rights reserved.<BR> 4 This program and the accompanying materials 5 are licensed and made available under the terms and conditions of the BSD License 6 which accompanies this distribution. The full text of the license may be found at 7 http://opensource.org/licenses/bsd-license.php 8 9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 12 Module Name: 13 14 RtLedStatusCode.h 15 16 Abstract: 17 18 Lib to provide status code reporting via LED. 19 20 --*/ 21 22 #ifndef _EFI_LED_STATUS_CODE_H_ 23 #define _EFI_LED_STATUS_CODE_H_ 24 25 // 26 // Statements that include other files 27 // 28 #include "Tiano.h" 29 #include "EfiCommonLib.h" 30 #include "EfiRuntimeLib.h" 31 #include "EfiStatusCode.h" 32 33 // 34 // SIOINIT data 35 // 36 typedef struct { 37 UINT8 RegAddress; 38 UINT8 RegValue; 39 } SIO_INIT_DATA; 40 41 #define LED_DATA_OFFSET 0x0E 42 #define LED_STROBE_OFFSET 0x0A 43 44 #define LED_MASK_BIT 0x10 45 #define STROBE_MASK_BIT 0x08 46 47 #define GPIO_BASE(a, b) (UINT16) ((a << 8) | (b)) 48 49 #define SIO_GPIO_HIGH 0x08 50 #define SIO_GPIO_LOW 0x00 51 52 #define CONFIG_PORT0 0x2E 53 #define DATA_PORT0 0x2F 54 55 // 56 // logical device in NSPC87417 57 // 58 #define SIO_GPIO 0x7 59 60 // 61 // Global register in NSPC87417 62 // 63 #define REG_LOGICAL_DEVICE 0x07 64 65 #define REG_SERVERIO_CNF1 0x21 66 #define REG_SERVERIO_CNF2 0x22 67 #define REG_SERVERIO_CNF3 0x23 68 #define REG_SERVERIO_CNF4 0x24 69 #define REG_SERVERIO_CNF6 0x26 70 71 #define ACTIVATE 0x30 72 #define LOGICAL_DEVICE_ON 0x01 73 #define LOGICAL_DEVICE_OFF 0x00 74 #define BASE_ADDRESS_HIGH 0x60 75 #define BASE_ADDRESS_LOW 0x61 76 77 // 78 // Register for GPIO 79 // 80 #define GPIO_GPSEL 0xF0 81 82 #define GPIO_GPCFG1 0xF1 83 #define PUSH_PULL 0x02 84 #define OUTPUT_BUFFER_EN 0x01 85 86 #define GPIO_GPEVR 0xF2 87 #define GPIO_EVENT_OFF 0x00 88 89 #endif 90