Kyösti Mälkki | a1ebbc4 | 2014-10-17 22:33:22 +0300 | [diff] [blame^] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2011 Advanced Micro Devices, Inc. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA02110-1301 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef _SMBUS_SPD_H_ |
| 21 | #define _SMBUS_SPD_H_ |
| 22 | |
| 23 | #define READ_BIT 0x01 |
| 24 | |
| 25 | #define SMBUS_INTERRUPT_MASK 0x02 |
| 26 | #define HOSTBUSY_MASK 0x01 |
| 27 | |
| 28 | #define SMBUS_READ_BYTE_COMMAND 0x48 |
| 29 | #define SMBUS_READ_COMMAND 0x44 |
| 30 | |
| 31 | #define MAX_READ_TSC_COUNT (2000000000 / 10) |
| 32 | |
| 33 | #define PMIO_INDEX_REG 0xCD6 |
| 34 | #define PMIO_DATA_REG 0xCD7 |
| 35 | |
| 36 | #define SMBUS_BAR_LOW_BYTE 0x2C |
| 37 | #define SMBUS_BAR_HIGH_BYTE 0x2D |
| 38 | |
| 39 | #define SMBUS_STATUS_REG 0x00 |
| 40 | #define SMBUS_SLAVE_STATUS_REG 0x01 |
| 41 | #define SMBUS_COMMAND_REG 0x02 |
| 42 | #define SMBUS_CONTROL_REG 0x03 |
| 43 | #define SMBUS_HOST_CMD_REG 0x04 |
| 44 | #define SMBUS_DATA0_REG 0x05 |
| 45 | #define SMBUS_CLOCK_REG 0x0E |
| 46 | |
| 47 | #define STATUS__COMPLETED_SUCCESSFULLY 0x02 |
| 48 | |
| 49 | #define SMBUS_FREQUENCY_CONST 66000000 / 4 |
| 50 | |
| 51 | #endif |