Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Add amdsmn(4) and amdccp(4) power management stubs.



details:   https://anonhg.NetBSD.org/src/rev/3ea4eb4553fe
branches:  trunk
changeset: 372667:3ea4eb4553fe
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Sun Dec 18 15:50:32 2022 +0000

description:
Add amdsmn(4) and amdccp(4) power management stubs.

diffstat:

 sys/arch/x86/pci/amdsmn.c  |  8 ++++++--
 sys/dev/acpi/amdccp_acpi.c |  5 +++--
 sys/dev/fdt/amdccp_fdt.c   |  5 +++--
 sys/dev/pci/amdccp_pci.c   |  5 +++--
 4 files changed, 15 insertions(+), 8 deletions(-)

diffs (110 lines):

diff -r d31ae0fba0c3 -r 3ea4eb4553fe sys/arch/x86/pci/amdsmn.c
--- a/sys/arch/x86/pci/amdsmn.c Sun Dec 18 12:02:46 2022 +0000
+++ b/sys/arch/x86/pci/amdsmn.c Sun Dec 18 15:50:32 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: amdsmn.c,v 1.14 2022/10/01 15:50:05 msaitoh Exp $      */
+/*     $NetBSD: amdsmn.c,v 1.15 2022/12/18 15:50:32 reinoud Exp $      */
 
 /*-
  * Copyright (c) 2017, 2019 Conrad Meyer <cem%FreeBSD.org@localhost>
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.14 2022/10/01 15:50:05 msaitoh Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.15 2022/12/18 15:50:32 reinoud Exp $ ");
 
 /*
  * Driver for the AMD Family 15h (model 60+) and 17h CPU
@@ -159,6 +159,8 @@
 
        // aprint_normal(": AMD Family 17h System Management Network\n");
        aprint_normal(": AMD System Management Network\n");
+
+       pmf_device_register(self, NULL, NULL);
        amdsmn_rescan(self, NULL, NULL);
 }
 
@@ -178,6 +180,8 @@
 {
        struct amdsmn_softc *sc = device_private(self);
 
+       pmf_device_deregister(self);
+
        mutex_destroy(&sc->smn_lock);
        aprint_normal_dev(self,"detach!\n");
 
diff -r d31ae0fba0c3 -r 3ea4eb4553fe sys/dev/acpi/amdccp_acpi.c
--- a/sys/dev/acpi/amdccp_acpi.c        Sun Dec 18 12:02:46 2022 +0000
+++ b/sys/dev/acpi/amdccp_acpi.c        Sun Dec 18 15:50:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdccp_acpi.c,v 1.5 2021/01/29 15:49:55 thorpej Exp $ */
+/* $NetBSD: amdccp_acpi.c,v 1.6 2022/12/18 15:50:32 reinoud Exp $ */
 
 /*
  * Copyright (c) 2018 Jonathan A. Kollasch
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdccp_acpi.c,v 1.5 2021/01/29 15:49:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdccp_acpi.c,v 1.6 2022/12/18 15:50:32 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -103,6 +103,7 @@
 #endif
 
        amdccp_common_attach(sc);
+       pmf_device_register(self, NULL, NULL);
 
 done:
        acpi_resource_cleanup(&res);
diff -r d31ae0fba0c3 -r 3ea4eb4553fe sys/dev/fdt/amdccp_fdt.c
--- a/sys/dev/fdt/amdccp_fdt.c  Sun Dec 18 12:02:46 2022 +0000
+++ b/sys/dev/fdt/amdccp_fdt.c  Sun Dec 18 15:50:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdccp_fdt.c,v 1.6 2021/01/27 03:10:21 thorpej Exp $ */
+/* $NetBSD: amdccp_fdt.c,v 1.7 2022/12/18 15:50:32 reinoud Exp $ */
 
 /*
  * Copyright (c) 2018 Jonathan A. Kollasch
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: amdccp_fdt.c,v 1.6 2021/01/27 03:10:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdccp_fdt.c,v 1.7 2022/12/18 15:50:32 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,4 +89,5 @@
        aprint_normal(": AMD CCP\n");
 
        amdccp_common_attach(sc);
+       pmf_device_register(self, NULL, NULL);
 }
diff -r d31ae0fba0c3 -r 3ea4eb4553fe sys/dev/pci/amdccp_pci.c
--- a/sys/dev/pci/amdccp_pci.c  Sun Dec 18 12:02:46 2022 +0000
+++ b/sys/dev/pci/amdccp_pci.c  Sun Dec 18 15:50:32 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amdccp_pci.c,v 1.3 2022/10/26 13:35:25 msaitoh Exp $ */
+/* $NetBSD: amdccp_pci.c,v 1.4 2022/12/18 15:50:32 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amdccp_pci.c,v 1.3 2022/10/26 13:35:25 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amdccp_pci.c,v 1.4 2022/12/18 15:50:32 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -122,4 +122,5 @@
        }
 
        amdccp_common_attach(sc);
+       pmf_device_register(self, NULL, NULL);
 }



Home | Main Index | Thread Index | Old Index