diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-06-28 21:02:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-06-28 21:02:15 +0000 |
commit | c9e51ac81cfde33b879215c286c6ad762304a4b3 (patch) | |
tree | 57d5b1f7db0dd503314ced8e9ef95520d49c86f6 /sys | |
parent | 04e1b2a0126198b3093d49b996d43c5bc22020a7 (diff) |
Add support for the Synopsys DesignWare UART found on the Ryzen Embedded
V1000 SoCs.
ok anton@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpi/com_acpi.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/acpi/com_acpi.c b/sys/dev/acpi/com_acpi.c index 0289ca2ea18..3efcedb962b 100644 --- a/sys/dev/acpi/com_acpi.c +++ b/sys/dev/acpi/com_acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_acpi.c,v 1.9 2022/06/28 16:29:56 anton Exp $ */ +/* $OpenBSD: com_acpi.c,v 1.10 2022/06/28 21:02:14 kettenis Exp $ */ /* * Copyright (c) 2018 Mark Kettenis * @@ -49,6 +49,7 @@ const struct cfattach com_acpi_ca = { }; const char *com_hids[] = { + "AMDI0020", "HISI0031", "PNP0501", NULL @@ -86,10 +87,14 @@ com_acpi_attach(struct device *parent, struct device *self, void *aux) printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]); printf(" irq %d", aaa->aaa_irq[0]); + sc->sc.sc_frequency = COM_FREQ; + if (strcmp(aaa->aaa_dev, "AMDI0020") == 0) + sc->sc.sc_frequency = 48000000; + sc->sc.sc_iot = aaa->aaa_bst[0]; sc->sc.sc_iobase = aaa->aaa_addr[0]; sc->sc.sc_frequency = acpi_getpropint(sc->sc_node, "clock-frequency", - COM_FREQ); + sc->sc.sc_frequency); if (com_acpi_is_designware(aaa->aaa_dev)) { intr = com_acpi_intr_designware; @@ -153,7 +158,8 @@ com_acpi_is_console(struct com_acpi_softc *sc) int com_acpi_is_designware(const char *hid) { - return strcmp("HISI0031", hid) == 0; + return strcmp(hid, "AMDI0020") == 0 || + strcmp(hid, "HISI0031") == 0; } int |