summaryrefslogtreecommitdiff
path: root/src/soc/amd/cezanne/uart.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-02-16 01:35:27 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-02-17 10:35:26 +0000
commit63d2008308ce485d5a1c37f55496b63a5361cdb8 (patch)
tree6915df9a3c7300cc6a2d5178f991f4c604c0768a /src/soc/amd/cezanne/uart.c
parentb1b0294e6fd565497ec8175986b4913b925fc587 (diff)
soc/amd/cezanne/uart: write ACPI tables
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I0faa94fb20daa50c69f25eae3e99e4519323bf5b Reviewed-on: https://review.coreboot.org/c/coreboot/+/50781 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/soc/amd/cezanne/uart.c')
-rw-r--r--src/soc/amd/cezanne/uart.c14
1 files changed, 14 insertions, 0 deletions
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,
};