summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2024-10-08 00:46:30 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2024-10-08 00:46:30 +0000
commit4febe13de8e3ef7f4ecd4f5c31bc50f5c46c9ad8 (patch)
tree379d9d0e7a3d34a1761a88e5c2ab25a7fb2f91c7 /sys
parentb7fa881ee5b78c51852a6c341fc0b4a80df211b3 (diff)
set activate for ufshci_acpi and ufshci_fdt
tested by mglocker@ with pci, acpi and fdt attachments ok mglocker@ deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpi/ufshci_acpi.c5
-rw-r--r--sys/dev/fdt/ufshci_fdt.c6
-rw-r--r--sys/dev/ic/ufshci.c5
-rw-r--r--sys/dev/ic/ufshcivar.h4
-rw-r--r--sys/dev/pci/ufshci_pci.c13
5 files changed, 14 insertions, 19 deletions
diff --git a/sys/dev/acpi/ufshci_acpi.c b/sys/dev/acpi/ufshci_acpi.c
index 804247ef8ca..4df7060b751 100644
--- a/sys/dev/acpi/ufshci_acpi.c
+++ b/sys/dev/acpi/ufshci_acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufshci_acpi.c,v 1.2 2024/01/06 17:47:43 mglocker Exp $ */
+/* $OpenBSD: ufshci_acpi.c,v 1.3 2024/10/08 00:46:29 jsg Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
*
@@ -45,7 +45,8 @@ int ufshci_acpi_match(struct device *, void *, void *);
void ufshci_acpi_attach(struct device *, struct device *, void *);
const struct cfattach ufshci_acpi_ca = {
- sizeof(struct ufshci_acpi_softc), ufshci_acpi_match, ufshci_acpi_attach
+ sizeof(struct ufshci_acpi_softc), ufshci_acpi_match, ufshci_acpi_attach,
+ NULL, ufshci_activate
};
const char *ufshci_hids[] = {
diff --git a/sys/dev/fdt/ufshci_fdt.c b/sys/dev/fdt/ufshci_fdt.c
index 92ea5ca4caf..88742d441f3 100644
--- a/sys/dev/fdt/ufshci_fdt.c
+++ b/sys/dev/fdt/ufshci_fdt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufshci_fdt.c,v 1.1 2024/07/31 10:07:33 mglocker Exp $ */
+/* $OpenBSD: ufshci_fdt.c,v 1.2 2024/10/08 00:46:29 jsg Exp $ */
/*
* Copyright (c) 2024 Marcus Glocker <mglocker@openbsd.org>
*
@@ -36,7 +36,9 @@ void ufshci_fdt_attach(struct device *, struct device *, void *);
const struct cfattach ufshci_fdt_ca = {
sizeof(struct ufshci_softc),
ufshci_fdt_match,
- ufshci_fdt_attach
+ ufshci_fdt_attach,
+ NULL,
+ ufshci_activate
};
int
diff --git a/sys/dev/ic/ufshci.c b/sys/dev/ic/ufshci.c
index 434aebfcc53..db08cbaae2a 100644
--- a/sys/dev/ic/ufshci.c
+++ b/sys/dev/ic/ufshci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufshci.c,v 1.41 2024/08/30 18:22:41 mglocker Exp $ */
+/* $OpenBSD: ufshci.c,v 1.42 2024/10/08 00:46:29 jsg Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@@ -1380,8 +1380,9 @@ ufshci_xfer_complete(struct ufshci_softc *sc)
}
int
-ufshci_activate(struct ufshci_softc *sc, int act)
+ufshci_activate(struct device *self, int act)
{
+ struct ufshci_softc *sc = (struct ufshci_softc *)self;
int rv = 0;
switch (act) {
diff --git a/sys/dev/ic/ufshcivar.h b/sys/dev/ic/ufshcivar.h
index bdd7a210180..d41e58f557e 100644
--- a/sys/dev/ic/ufshcivar.h
+++ b/sys/dev/ic/ufshcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufshcivar.h,v 1.9 2024/05/29 00:48:15 jsg Exp $ */
+/* $OpenBSD: ufshcivar.h,v 1.10 2024/10/08 00:46:29 jsg Exp $ */
/*
* Copyright (c) 2022 Marcus Glocker <mglocker@openbsd.org>
@@ -83,4 +83,4 @@ struct ufshci_softc {
int ufshci_intr(void *);
int ufshci_attach(struct ufshci_softc *);
-int ufshci_activate(struct ufshci_softc *, int);
+int ufshci_activate(struct device *, int);
diff --git a/sys/dev/pci/ufshci_pci.c b/sys/dev/pci/ufshci_pci.c
index f265d2064cd..a44232f6c94 100644
--- a/sys/dev/pci/ufshci_pci.c
+++ b/sys/dev/pci/ufshci_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufshci_pci.c,v 1.4 2024/05/24 09:51:13 mglocker Exp $ */
+/* $OpenBSD: ufshci_pci.c,v 1.5 2024/10/08 00:46:29 jsg Exp $ */
/*
* Copyright (c) 2024 Marcus Glocker <mglocker@openbsd.org>
@@ -41,14 +41,13 @@ struct ufshci_pci_softc {
int ufshci_pci_match(struct device *, void *, void *);
void ufshci_pci_attach(struct device *, struct device *, void *);
int ufshci_pci_detach(struct device *, int);
-int ufshci_pci_activate(struct device *, int);
const struct cfattach ufshci_pci_ca = {
sizeof(struct ufshci_pci_softc),
ufshci_pci_match,
ufshci_pci_attach,
ufshci_pci_detach,
- ufshci_pci_activate
+ ufshci_activate
};
int
@@ -108,11 +107,3 @@ ufshci_pci_detach(struct device *self, int flags)
{
return 0;
}
-
-int
-ufshci_pci_activate(struct device *self, int act)
-{
- struct ufshci_pci_softc *psc = (struct ufshci_pci_softc *)self;
-
- return ufshci_activate(&psc->psc_ufshci, act);
-}