Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141940779
D54511.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D54511.diff
View Options
diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES
--- a/sys/amd64/conf/NOTES
+++ b/sys/amd64/conf/NOTES
@@ -43,9 +43,6 @@
# Optional devices:
#
-# vt(4) drivers.
-device vt_efifb # EFI framebuffer
-
# 3Dfx Voodoo Graphics, Voodoo II /dev/3dfx CDEV support. This will create
# the /dev/3dfx0 device to work with glide implementations. This should get
# linked to /dev/3dfx and /dev/voodoo. Note that this is not the same as
@@ -116,6 +113,10 @@
# EFI RTC
device efirtc
+# Apple System Management Controller (SMC)
+device asmc
+options ASMC_DEBUG # Enable asmc(4)-specific debug logic.
+
#
# Intel QuickAssist driver with OpenCrypto support
#
diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64
--- a/sys/conf/options.amd64
+++ b/sys/conf/options.amd64
@@ -68,3 +68,6 @@
# x86 specific uart options
UART_NS8250_EARLY_PORT opt_uart.h
+
+# Enable asmc(4)-specific debug logic.
+ASMC_DEBUG opt_asmc.h
diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -34,6 +34,8 @@
* Inspired by the Linux applesmc driver.
*/
+#include "opt_asmc.h"
+
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/conf.h>
@@ -83,7 +85,7 @@
static int asmc_sms_intrfast(void *arg);
static void asmc_sms_printintr(device_t dev, uint8_t);
static void asmc_sms_task(void *arg, int pending);
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
void asmc_dumpall(device_t);
static int asmc_key_dump(device_t, int);
#endif
@@ -515,7 +517,7 @@
*/
#define _COMPONENT ACPI_OEM
ACPI_MODULE_NAME("ASMC")
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
#define ASMC_DPRINTF(str) device_printf(dev, str)
#else
#define ASMC_DPRINTF(str)
@@ -828,7 +830,7 @@
return (0);
}
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
void asmc_dumpall(device_t dev)
{
struct asmc_softc *sc = device_get_softc(dev);
@@ -939,7 +941,7 @@
sc->sc_nkeys = 0;
}
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
asmc_dumpall(dev);
#endif
@@ -974,19 +976,19 @@
static int
asmc_wait(device_t dev, uint8_t val)
{
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
struct asmc_softc *sc;
#endif
if (asmc_wait_ack(dev, val, 1000) == 0)
return (0);
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
sc = device_get_softc(dev);
#endif
val = val & ASMC_STATUS_MASK;
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, val,
ASMC_CMDPORT_READ(sc));
#endif
@@ -1009,7 +1011,7 @@
}
}
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, command,
ASMC_CMDPORT_READ(sc));
#endif
@@ -1055,7 +1057,7 @@
return (error);
}
-#ifdef DEBUG
+#ifdef ASMC_DEBUG
static int
asmc_key_dump(device_t dev, int number)
{
diff --git a/sys/modules/asmc/Makefile b/sys/modules/asmc/Makefile
--- a/sys/modules/asmc/Makefile
+++ b/sys/modules/asmc/Makefile
@@ -1,6 +1,6 @@
.PATH: ${SRCTOP}/sys/dev/asmc
KMOD= asmc
-SRCS= asmc.c opt_acpi.h acpi_if.h bus_if.h device_if.h
+SRCS= asmc.c opt_acpi.h opt_asmc.h acpi_if.h bus_if.h device_if.h
.include <bsd.kmod.mk>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 14, 4:26 PM (16 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27621180
Default Alt Text
D54511.diff (2 KB)
Attached To
Mode
D54511: Add ASMC_DEBUG make option
Attached
Detach File
Event Timeline
Log In to Comment