summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/picasso/uart.c
diff options
context:
space:
mode:
authorFelix Held <felix.held@amd.corp-partner.google.com>2021-10-12 23:35:48 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-10-15 14:46:58 +0000
commitad6f87d61202984e7604a35b6ce5babee614e676 (patch)
treea6ef329a6993c254c902bd8d76a46104365287a9 /src/soc/amd/picasso/uart.c
parentcb70d836ed048b81ad8047e97c9758680cc2da2d (diff)
downloadcoreboot-ad6f87d61202984e7604a35b6ce5babee614e676.tar.gz
coreboot-ad6f87d61202984e7604a35b6ce5babee614e676.tar.bz2
coreboot-ad6f87d61202984e7604a35b6ce5babee614e676.zip
soc/amd/cezanne,picasso/uart: implement read_resource
Implement the read_resources function for the UART devices so that the resource allocator knows about their fixed MMIO resources when enabled. TEST=UART still works on Mandolin. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I4ffddee3f5f4281aca98ddfcefa639dfb7a38dae Reviewed-on: https://review.coreboot.org/c/coreboot/+/58306 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/amd/picasso/uart.c')
-rw-r--r--src/soc/amd/picasso/uart.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/soc/amd/picasso/uart.c b/src/soc/amd/picasso/uart.c
index b8532aaddf45..1ffb2fdf70dd 100644
--- a/src/soc/amd/picasso/uart.c
+++ b/src/soc/amd/picasso/uart.c
@@ -103,8 +103,13 @@ static void uart_enable(struct device *dev)
}
}
+static void uart_read_resources(struct device *dev)
+{
+ mmio_resource(dev, 0, dev->path.mmio.addr / KiB, 4);
+}
+
struct device_operations picasso_uart_mmio_ops = {
- .read_resources = noop_read_resources,
+ .read_resources = uart_read_resources,
.set_resources = noop_set_resources,
.scan_bus = scan_static_bus,
.acpi_name = uart_acpi_name,