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>
This commit is contained in:
Felix Held 2021-10-12 23:35:48 +02:00 committed by Felix Held
parent cb70d836ed
commit ad6f87d612
2 changed files with 12 additions and 2 deletions

View File

@ -85,8 +85,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 cezanne_uart_mmio_ops = {
.read_resources = noop_read_resources,
.read_resources = uart_read_resources,
.set_resources = noop_set_resources,
.scan_bus = scan_static_bus,
.enable = uart_enable,

View File

@ -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,