| 1 |
|
| 2 |
|
| 3 |
#include <amdblocks/psp.h> |
| 4 |
#include <console/console.h> |
| 5 |
#include <types.h> |
| 6 |
#include "psp_def.h" |
| 7 |
|
| 8 |
void psp_set_tpm_irq_gpio(unsigned int gpio) |
| 9 |
{ |
| 10 |
int cmd_status; |
| 11 |
struct mbox_cmd_dtpm_config_buffer buffer = { |
| 12 |
.header = { |
| 13 |
.size = sizeof(buffer) |
| 14 |
}, |
| 15 |
.request_type = DTPM_REQUEST_CONFIG, |
| 16 |
.config = { |
| 17 |
.gpio = gpio |
| 18 |
} |
| 19 |
}; |
| 20 |
|
| 21 |
printk(BIOS_DEBUG, "PSP: Setting TPM GPIO to %u...", gpio); |
| 22 |
|
| 23 |
cmd_status = send_psp_command(MBOX_BIOS_CMD_I2C_TPM_ARBITRATION, &buffer); |
| 24 |
|
| 25 |
psp_print_cmd_status(cmd_status, &buffer.header); |
| 26 |
} |