sync with OpenBSD -current

This commit is contained in:
purplerain 2024-06-20 01:49:10 +00:00
parent efaa6fdefb
commit e1c03975e3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
6 changed files with 55 additions and 32 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: agintc.c,v 1.56 2024/05/13 01:15:50 jsg Exp $ */
/* $OpenBSD: agintc.c,v 1.57 2024/06/19 22:10:45 patrick Exp $ */
/*
* Copyright (c) 2007, 2009, 2011, 2017 Dale Rahn <drahn@dalerahn.com>
* Copyright (c) 2018 Mark Kettenis <kettenis@openbsd.org>
@ -312,6 +312,7 @@ agintc_attach(struct device *parent, struct device *self, void *aux)
uint32_t pmr, oldpmr;
uint32_t ctrl, bits;
uint32_t affinity;
uint64_t redist_stride;
int i, nbits, nintr;
int offset, nredist;
#ifdef MULTIPROCESSOR
@ -434,15 +435,20 @@ agintc_attach(struct device *parent, struct device *self, void *aux)
/* find the redistributors. */
offset = 0;
redist_stride = OF_getpropint64(faa->fa_node, "redistributor-stride", 0);
for (nredist = 0; ; nredist++) {
int32_t sz = (64 * 1024 * 2);
uint64_t typer;
int32_t sz;
typer = bus_space_read_8(sc->sc_iot, sc->sc_redist_base,
offset + GICR_TYPER);
if (typer & GICR_TYPER_VLPIS)
sz += (64 * 1024 * 2);
if (redist_stride == 0) {
sz = (64 * 1024 * 2);
if (typer & GICR_TYPER_VLPIS)
sz += (64 * 1024 * 2);
} else
sz = redist_stride;
#ifdef DEBUG_AGINTC
printf("probing redistributor %d %x\n", nredist, offset);
@ -466,14 +472,18 @@ agintc_attach(struct device *parent, struct device *self, void *aux)
/* submap and configure the redistributors. */
offset = 0;
for (nredist = 0; nredist < sc->sc_num_redist; nredist++) {
int32_t sz = (64 * 1024 * 2);
uint64_t typer;
int32_t sz;
typer = bus_space_read_8(sc->sc_iot, sc->sc_redist_base,
offset + GICR_TYPER);
if (typer & GICR_TYPER_VLPIS)
sz += (64 * 1024 * 2);
if (redist_stride == 0) {
sz = (64 * 1024 * 2);
if (typer & GICR_TYPER_VLPIS)
sz += (64 * 1024 * 2);
} else
sz = redist_stride;
affinity = bus_space_read_8(sc->sc_iot,
sc->sc_redist_base, offset + GICR_TYPER) >> 32;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: smmu_acpi.c,v 1.7 2022/09/08 19:30:05 kettenis Exp $ */
/* $OpenBSD: smmu_acpi.c,v 1.8 2024/06/19 21:25:41 patrick Exp $ */
/*
* Copyright (c) 2021 Patrick Wildt <patrick@blueri.se>
*
@ -152,7 +152,8 @@ smmu_acpi_foundqcom(struct aml_node *node, void *arg)
if (strcmp(dev, "QCOM0409") == 0 || /* SC8180X/XP */
strcmp(dev, "QCOM0609") == 0 || /* SC8280XP */
strcmp(dev, "QCOM0809") == 0) /* SC7180 */
strcmp(dev, "QCOM0809") == 0 || /* SC7180 */
strcmp(dev, "QCOM0C09") == 0) /* X1E80100 */
sc->sc_is_qcom = 1;
return 0;

View file

@ -1,4 +1,4 @@
/* $OpenBSD: qciic.c,v 1.5 2022/11/06 15:36:13 patrick Exp $ */
/* $OpenBSD: qciic.c,v 1.6 2024/06/19 21:27:22 patrick Exp $ */
/*
* Copyright (c) 2022 Mark Kettenis <kettenis@openbsd.org>
*
@ -107,6 +107,7 @@ int qciic_acpi_found_ihidev(struct qciic_softc *,
const char *qciic_hids[] = {
"QCOM0610",
"QCOM0811",
"QCOM0C10",
NULL
};

View file

@ -1,4 +1,4 @@
/* $OpenBSD: xhci_acpi.c,v 1.11 2022/10/30 15:34:54 patrick Exp $ */
/* $OpenBSD: xhci_acpi.c,v 1.12 2024/06/19 21:31:10 patrick Exp $ */
/*
* Copyright (c) 2018 Mark Kettenis
*
@ -62,6 +62,9 @@ const char *xhci_hids[] = {
"QCOM0826", /* SC7180 USB */
"QCOM24B6", /* SDM850 URS */
"QCOM24B7",
"QCOM0C8B", /* X1E80100 URS */
"QCOM0C8C",
"QCOM0D07",
NULL
};
@ -108,7 +111,10 @@ xhci_acpi_attach(struct device *parent, struct device *self, void *aux)
strcmp(aaa->aaa_dev, "QCOM068B") == 0 ||
strcmp(aaa->aaa_dev, "QCOM068C") == 0 ||
strcmp(aaa->aaa_dev, "QCOM24B6") == 0 ||
strcmp(aaa->aaa_dev, "QCOM24B7") == 0) {
strcmp(aaa->aaa_dev, "QCOM24B7") == 0 ||
strcmp(aaa->aaa_dev, "QCOM0C8B") == 0 ||
strcmp(aaa->aaa_dev, "QCOM0C8C") == 0 ||
strcmp(aaa->aaa_dev, "QCOM0D07") == 0) {
SIMPLEQ_FOREACH(node, &sc->sc_node->son, sib) {
if (strncmp(node->name, "USB", 3) == 0) {
aaa->aaa_node = node;