From 63d2008308ce485d5a1c37f55496b63a5361cdb8 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 16 Feb 2021 01:35:27 +0100 Subject: soc/amd/cezanne/uart: write ACPI tables Signed-off-by: Felix Held Change-Id: I0faa94fb20daa50c69f25eae3e99e4519323bf5b Reviewed-on: https://review.coreboot.org/c/coreboot/+/50781 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson --- src/soc/amd/cezanne/uart.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/soc/amd/cezanne/uart.c b/src/soc/amd/cezanne/uart.c index 9d10fd0eff..6c82f1a948 100644 --- a/src/soc/amd/cezanne/uart.c +++ b/src/soc/amd/cezanne/uart.c @@ -47,6 +47,18 @@ void set_uart_config(unsigned int idx) program_gpios(uart_info[idx].mux, 2); } +static const char *uart_acpi_name(const struct device *dev) +{ + switch (dev->path.mmio.addr) { + case APU_UART0_BASE: + return "FUR0"; + case APU_UART1_BASE: + return "FUR1"; + default: + return NULL; + } +} + /* Even though this is called enable, it gets called for both enabled and disabled devices. */ static void uart_enable(struct device *dev) { @@ -77,4 +89,6 @@ struct device_operations cezanne_uart_mmio_ops = { .set_resources = noop_set_resources, .scan_bus = scan_static_bus, .enable = uart_enable, + .acpi_name = uart_acpi_name, + .acpi_fill_ssdt = uart_inject_ssdt, }; -- cgit v1.2.3