use aprint_*

This commit is contained in:
kochi 2006-02-20 12:17:49 +00:00
parent 25f0b1dc0a
commit 6f20259365
17 changed files with 171 additions and 154 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi.c,v 1.82 2006/02/16 09:23:23 kochi Exp $ */
/* $NetBSD: acpi.c,v 1.83 2006/02/20 12:17:49 kochi Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.82 2006/02/16 09:23:23 kochi Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.83 2006/02/20 12:17:49 kochi Exp $");
#include "opt_acpi.h"
#include "opt_pcifixup.h"
@ -282,17 +282,18 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpibus_attach_args *aa = aux;
ACPI_STATUS rv;
printf("\n");
aprint_naive(": Advacned Configuration and Power Interface\n");
aprint_normal(": Advacned Configuration and Power Interface\n");
if (acpi_softc != NULL)
panic("acpi_attach: ACPI has already been attached");
sysmon_power_settype("acpi");
printf("%s: using Intel ACPI CA subsystem version %08x\n",
aprint_verbose("%s: using Intel ACPI CA subsystem version %08x\n",
sc->sc_dev.dv_xname, ACPI_CA_VERSION);
printf("%s: X/RSDT: OemId <%6.6s,%8.8s,%08x>, AslId <%4.4s,%08x>\n",
aprint_verbose("%s: X/RSDT: OemId <%6.6s,%8.8s,%08x>, AslId <%4.4s,%08x>\n",
sc->sc_dev.dv_xname,
AcpiGbl_XSDT->OemId, AcpiGbl_XSDT->OemTableId,
AcpiGbl_XSDT->OemRevision,
@ -318,7 +319,7 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiEnableSubsystem(0);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to enable ACPI: %s\n",
aprint_error("%s: unable to enable ACPI: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}
@ -330,7 +331,7 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInitializeObjects(0);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to initialize ACPI objects: %s\n",
aprint_error("%s: unable to initialize ACPI objects: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}
@ -341,8 +342,8 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
/* Show SCI interrupt. */
if (AcpiGbl_FADT != NULL)
printf("%s: SCI interrupting at int %d\n",
sc->sc_dev.dv_xname, AcpiGbl_FADT->SciInt);
aprint_verbose("%s: SCI interrupting at int %d\n",
sc->sc_dev.dv_xname, AcpiGbl_FADT->SciInt);
/*
* Check for fixed-hardware features.
*/
@ -380,7 +381,7 @@ acpi_attach(struct device *parent, struct device *self, void *aux)
*/
sc->sc_sdhook = shutdownhook_establish(acpi_shutdown, sc);
if (sc->sc_sdhook == NULL)
printf("%s: WARNING: unable to register shutdown hook\n",
aprint_error("%s: WARNING: unable to register shutdown hook\n",
sc->sc_dev.dv_xname);
#ifdef ACPI_DEBUGGER
@ -528,16 +529,16 @@ acpi_activate_device(ACPI_HANDLE handle, ACPI_DEVICE_INFO **di)
buf.Length = ACPI_ALLOCATE_BUFFER;
#ifdef ACPI_DEBUG
printf("acpi_activate_device: %s, old status=%x\n",
aprint_normal("acpi_activate_device: %s, old status=%x\n",
(*di)->HardwareId.Value, (*di)->CurrentStatus);
#endif
rv = acpi_allocate_resources(handle);
if (ACPI_FAILURE(rv)) {
printf("acpi: activate failed for %s\n",
aprint_error("acpi: activate failed for %s\n",
(*di)->HardwareId.Value);
} else {
printf("acpi: activated %s\n", (*di)->HardwareId.Value);
aprint_normal("acpi: activated %s\n", (*di)->HardwareId.Value);
}
(void)AcpiGetObjectInfo(handle, &buf);
@ -545,7 +546,7 @@ acpi_activate_device(ACPI_HANDLE handle, ACPI_DEVICE_INFO **di)
*di = buf.Pointer;
#ifdef ACPI_DEBUG
printf("acpi_activate_device: %s, new status=%x\n",
aprint_normal("acpi_activate_device: %s, new status=%x\n",
(*di)->HardwareId.Value, (*di)->CurrentStatus);
#endif
}
@ -578,7 +579,7 @@ acpi_make_devnode(ACPI_HANDLE handle, UINT32 level, void *context,
rv = AcpiGetObjectInfo(handle, &buf);
if (ACPI_FAILURE(rv)) {
#ifdef ACPI_DEBUG
printf("%s: AcpiGetObjectInfo failed: %s\n",
aprint_normal("%s: AcpiGetObjectInfo failed: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
#endif
goto out; /* XXX why return OK */
@ -618,18 +619,18 @@ acpi_make_devnode(ACPI_HANDLE handle, UINT32 level, void *context,
goto out;
#ifdef ACPI_EXTRA_DEBUG
printf("%s: HID %s found in scope %s level %d\n",
aprint_normal("%s: HID %s found in scope %s level %d\n",
sc->sc_dev.dv_xname,
ad->ad_devinfo->HardwareId.Value,
as->as_name, ad->ad_level);
if (ad->ad_devinfo->Valid & ACPI_VALID_UID)
printf(" UID %s\n",
aprint_normal(" UID %s\n",
ad->ad_devinfo->UniqueId.Value);
if (ad->ad_devinfo->Valid & ACPI_VALID_ADR)
printf(" ADR 0x%016qx\n",
aprint_normal(" ADR 0x%016qx\n",
ad->ad_devinfo->Address);
if (ad->ad_devinfo->Valid & ACPI_VALID_STA)
printf(" STA 0x%08x\n",
aprint_normal(" STA 0x%08x\n",
ad->ad_devinfo->CurrentStatus);
#endif
}
@ -670,7 +671,7 @@ acpi_print(void *aux, const char *pnp)
sizeof(acpi_knowndevs[0]); i++) {
if (strcmp(acpi_knowndevs[i].pnp,
pnpstr) == 0) {
printf("[%s] ",
aprint_normal("[%s] ",
acpi_knowndevs[i].str);
}
}
@ -727,20 +728,20 @@ acpi_enable_fixed_events(struct acpi_softc *sc)
*/
if (AcpiGbl_FADT != NULL && AcpiGbl_FADT->PwrButton == 0) {
printf("%s: fixed-feature power button present\n",
aprint_normal("%s: fixed-feature power button present\n",
sc->sc_dev.dv_xname);
sc->sc_smpsw_power.smpsw_name = sc->sc_dev.dv_xname;
sc->sc_smpsw_power.smpsw_type = PSWITCH_TYPE_POWER;
if (sysmon_pswitch_register(&sc->sc_smpsw_power) != 0) {
printf("%s: unable to register fixed power button "
"with sysmon\n", sc->sc_dev.dv_xname);
aprint_error("%s: unable to register fixed power "
"button with sysmon\n", sc->sc_dev.dv_xname);
} else {
rv = AcpiInstallFixedEventHandler(
ACPI_EVENT_POWER_BUTTON,
acpi_fixed_button_handler, &sc->sc_smpsw_power);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to install handler for "
"fixed power button: %s\n",
aprint_error("%s: unable to install handler "
"for fixed power button: %s\n",
sc->sc_dev.dv_xname,
AcpiFormatException(rv));
}
@ -748,20 +749,20 @@ acpi_enable_fixed_events(struct acpi_softc *sc)
}
if (AcpiGbl_FADT != NULL && AcpiGbl_FADT->SleepButton == 0) {
printf("%s: fixed-feature sleep button present\n",
aprint_normal("%s: fixed-feature sleep button present\n",
sc->sc_dev.dv_xname);
sc->sc_smpsw_sleep.smpsw_name = sc->sc_dev.dv_xname;
sc->sc_smpsw_sleep.smpsw_type = PSWITCH_TYPE_SLEEP;
if (sysmon_pswitch_register(&sc->sc_smpsw_power) != 0) {
printf("%s: unable to register fixed sleep button "
"with sysmon\n", sc->sc_dev.dv_xname);
aprint_error("%s: unable to register fixed sleep "
"button with sysmon\n", sc->sc_dev.dv_xname);
} else {
rv = AcpiInstallFixedEventHandler(
ACPI_EVENT_SLEEP_BUTTON,
acpi_fixed_button_handler, &sc->sc_smpsw_sleep);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to install handler for "
"fixed sleep button: %s\n",
aprint_error("%s: unable to install handler "
"for fixed sleep button: %s\n",
sc->sc_dev.dv_xname,
AcpiFormatException(rv));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_acad.c,v 1.17 2005/12/11 12:21:01 christos Exp $ */
/* $NetBSD: acpi_acad.c,v 1.18 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.17 2005/12/11 12:21:01 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi_acad.c,v 1.18 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -159,7 +159,8 @@ acpiacad_attach(struct device *parent, struct device *self, void *aux)
struct acpi_attach_args *aa = aux;
ACPI_STATUS rv;
printf(": ACPI AC Adapter\n");
aprint_naive(": ACPI AC Adapter\n");
aprint_normal(": ACPI AC Adapter\n");
sc->sc_node = aa->aa_node;
simple_lock_init(&sc->sc_lock);
@ -167,7 +168,7 @@ acpiacad_attach(struct device *parent, struct device *self, void *aux)
sc->sc_smpsw.smpsw_name = sc->sc_dev.dv_xname;
sc->sc_smpsw.smpsw_type = PSWITCH_TYPE_ACADAPTER;
if (sysmon_pswitch_register(&sc->sc_smpsw) != 0) {
printf("%s: unable to register with sysmon\n",
aprint_error("%s: unable to register with sysmon\n",
sc->sc_dev.dv_xname);
return;
}
@ -175,7 +176,7 @@ acpiacad_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_DEVICE_NOTIFY, acpiacad_notify_handler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
aprint_error("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}
@ -184,7 +185,7 @@ acpiacad_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_SYSTEM_NOTIFY, acpiacad_notify_handler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to register SYSTEM NOTIFY handler: %s\n",
aprint_error("%s: unable to register SYSTEM NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}
@ -318,7 +319,7 @@ acpiacad_init_envsys(struct acpiacad_softc *sc)
sc->sc_sysmon.sme_envsys_version = 1000;
if (sysmon_envsys_register(&sc->sc_sysmon))
printf("%s: unable to register with sysmon\n",
aprint_error("%s: unable to register with sysmon\n",
sc->sc_dev.dv_xname);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_bat.c,v 1.42 2006/02/16 06:19:26 kochi Exp $ */
/* $NetBSD: acpi_bat.c,v 1.43 2006/02/20 12:17:49 kochi Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@ -86,7 +86,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.42 2006/02/16 06:19:26 kochi Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.43 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -262,7 +262,8 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
struct acpi_attach_args *aa = aux;
ACPI_STATUS rv;
printf(": ACPI Battery (Control Method)\n");
aprint_naive(": ACPI Battery (Control Method)\n");
aprint_normal(": ACPI Battery (Control Method)\n");
sc->sc_node = aa->aa_node;
simple_lock_init(&sc->sc_lock);
@ -271,7 +272,7 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
ACPI_DEVICE_NOTIFY,
acpibat_notify_handler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
aprint_error("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}
@ -281,7 +282,7 @@ acpibat_attach(struct device *parent, struct device *self, void *aux)
ACPI_SYSTEM_NOTIFY,
acpibat_notify_handler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to register SYSTEM NOTIFY handler: %s\n",
aprint_error("%s: unable to register SYSTEM NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_button.c,v 1.19 2006/02/16 06:19:26 kochi Exp $ */
/* $NetBSD: acpi_button.c,v 1.20 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright 2001, 2003 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_button.c,v 1.19 2006/02/16 06:19:26 kochi Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi_button.c,v 1.20 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -128,12 +128,13 @@ acpibut_attach(struct device *parent, struct device *self, void *aux)
panic("acpibut_attach: impossible");
}
printf(": ACPI %s Button\n", desc);
aprint_naive(": ACPI %s Button\n", desc);
aprint_normal(": ACPI %s Button\n", desc);
sc->sc_node = aa->aa_node;
if (sysmon_pswitch_register(&sc->sc_smpsw) != 0) {
printf("%s: unable to register with sysmon\n",
aprint_error("%s: unable to register with sysmon\n",
sc->sc_dev.dv_xname);
return;
}
@ -141,7 +142,7 @@ acpibut_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_DEVICE_NOTIFY, acpibut_notify_handler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
aprint_error("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_ec.c,v 1.36 2006/02/16 06:19:26 kochi Exp $ */
/* $NetBSD: acpi_ec.c,v 1.37 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -172,7 +172,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.36 2006/02/16 06:19:26 kochi Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.37 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -491,7 +491,8 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
ACPI_FUNCTION_TRACE(__FUNCTION__);
printf(": ACPI Embedded Controller\n");
aprint_naive(": ACPI Embedded Controller\n");
aprint_normal(": ACPI Embedded Controller\n");
lockinit(&sc->sc_lock, PWAIT, "eclock", 0, 0);
simple_lock_init(&sc->sc_slock);
@ -515,12 +516,12 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiRemoveAddressSpaceHandler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_EC, EcSpaceHandler);
if (ACPI_FAILURE(rv))
printf("ERROR: RemoveAddressSpaceHandler: %s\n",
aprint_error("ERROR: RemoveAddressSpaceHandler: %s\n",
AcpiFormatException(rv));
rv = AcpiRemoveGpeHandler(NULL, ecdt_sc->sc_gpebit,
EcGpeHandler);
if (ACPI_FAILURE(rv))
printf("ERROR: RemoveAddressSpaceHandler: %s\n",
aprint_error("ERROR: RemoveAddressSpaceHandler: %s\n",
AcpiFormatException(rv));
bus_space_unmap(ecdt_sc->sc_csr_st,
@ -537,13 +538,13 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
sc->sc_data_st = aa->aa_iot;
io0 = acpi_res_io(&res, 0);
if (io0 == NULL) {
printf("%s: unable to find data register resource\n",
aprint_error("%s: unable to find data register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
if (bus_space_map(sc->sc_data_st, io0->ar_base, io0->ar_length,
0, &sc->sc_data_sh) != 0) {
printf("%s: unable to map data register\n",
aprint_error("%s: unable to map data register\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -551,13 +552,13 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
sc->sc_csr_st = aa->aa_iot;
io1 = acpi_res_io(&res, 1);
if (io1 == NULL) {
printf("%s: unable to find csr register resource\n",
aprint_error("%s: unable to find csr register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
if (bus_space_map(sc->sc_csr_st, io1->ar_base, io1->ar_length,
0, &sc->sc_csr_sh) != 0) {
printf("%s: unable to map csr register\n",
aprint_error("%s: unable to map csr register\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -569,7 +570,7 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
rv = acpi_eval_integer(sc->sc_handle, "_GLK", &v);
if (ACPI_FAILURE(rv)) {
if (rv != AE_NOT_FOUND)
printf("%s: unable to evaluate _GLK: %s\n",
aprint_error("%s: unable to evaluate _GLK: %s\n",
sc->sc_dev.dv_xname,
AcpiFormatException(rv));
sc->sc_glk = 0;
@ -584,7 +585,7 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
*/
rv = acpi_eval_integer(sc->sc_handle, "_GPE", &v);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to evaluate _GPE: %s\n",
aprint_error("%s: unable to evaluate _GPE: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
goto out;
}
@ -601,21 +602,21 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallGpeHandler(NULL, sc->sc_gpebit,
ACPI_GPE_EDGE_TRIGGERED, EcGpeHandler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to install GPE handler: %s\n",
aprint_error("%s: unable to install GPE handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
goto out;
}
rv = AcpiSetGpeType(NULL, sc->sc_gpebit, ACPI_GPE_TYPE_RUNTIME);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to set GPE type: %s\n",
aprint_error("%s: unable to set GPE type: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
goto out2;
}
rv = AcpiEnableGpe(NULL, sc->sc_gpebit, ACPI_NOT_ISR);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to enable GPE: %s\n",
aprint_error("%s: unable to enable GPE: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
goto out2;
}
@ -624,7 +625,7 @@ acpiec_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallAddressSpaceHandler(sc->sc_handle,
ACPI_ADR_SPACE_EC, EcSpaceHandler, EcSpaceSetup, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to install address space handler: %s\n",
aprint_error("%s: unable to install address space handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
goto out2;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_lid.c,v 1.18 2006/02/16 06:19:26 kochi Exp $ */
/* $NetBSD: acpi_lid.c,v 1.19 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright 2001, 2003 Wasabi Systems, Inc.
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.18 2006/02/16 06:19:26 kochi Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi_lid.c,v 1.19 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -100,14 +100,15 @@ acpilid_attach(struct device *parent, struct device *self, void *aux)
struct acpi_attach_args *aa = aux;
ACPI_STATUS rv;
printf(": ACPI Lid Switch\n");
aprint_naive(": ACPI Lid Switch\n");
aprint_normal(": ACPI Lid Switch\n");
sc->sc_node = aa->aa_node;
sc->sc_smpsw.smpsw_name = sc->sc_dev.dv_xname;
sc->sc_smpsw.smpsw_type = PSWITCH_TYPE_LID;
if (sysmon_pswitch_register(&sc->sc_smpsw) != 0) {
printf("%s: unable to register with sysmon\n",
aprint_error("%s: unable to register with sysmon\n",
sc->sc_dev.dv_xname);
return;
}
@ -115,7 +116,7 @@ acpilid_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_node->ad_handle,
ACPI_DEVICE_NOTIFY, acpilid_notify_handler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to register DEVICE NOTIFY handler: %s\n",
aprint_error("%s: unable to register DEVICE NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: acpi_tz.c,v 1.17 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: acpi_tz.c,v 1.18 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2003 Jared D. McNeill <jmcneill@invisible.ca>
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.17 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.18 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -172,18 +172,19 @@ acpitz_attach(struct device *parent, struct device *self, void *aux)
#endif
sc->sc_devnode = aa->aa_node;
printf(": ACPI Thermal Zone\n");
aprint_naive(": ACPI Thermal Zone\n");
aprint_normal(": ACPI Thermal Zone\n");
rv = acpi_eval_integer(sc->sc_devnode->ad_handle, "_TZP", &v);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to get polling interval; using default of",
aprint_verbose("%s: unable to get polling interval; using default of",
sc->sc_dev.dv_xname);
sc->sc_zone.tzp = ATZ_TZP_RATE;
} else {
sc->sc_zone.tzp = v;
printf("%s: polling interval is", sc->sc_dev.dv_xname);
aprint_verbose("%s: polling interval is", sc->sc_dev.dv_xname);
}
printf(" %d.%ds\n", sc->sc_zone.tzp / 10, sc->sc_zone.tzp % 10);
aprint_verbose(" %d.%ds\n", sc->sc_zone.tzp / 10, sc->sc_zone.tzp % 10);
/* XXX a value of 0 means "polling is not necessary" */
if (sc->sc_zone.tzp == 0)
@ -197,7 +198,7 @@ acpitz_attach(struct device *parent, struct device *self, void *aux)
rv = AcpiInstallNotifyHandler(sc->sc_devnode->ad_handle,
ACPI_SYSTEM_NOTIFY, acpitz_notify_handler, sc);
if (ACPI_FAILURE(rv)) {
printf("%s: unable to install SYSTEM NOTIFY handler: %s\n",
aprint_error("%s: unable to install SYSTEM NOTIFY handler: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: atppc_acpi.c,v 1.6 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: atppc_acpi.c,v 1.7 2006/02/20 12:17:49 kochi Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.6 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: atppc_acpi.c,v 1.7 2006/02/20 12:17:49 kochi Exp $");
#include "opt_atppc.h"
@ -121,7 +121,8 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dev_ok = ATPPC_NOATTACH;
printf(": AT Parallel Port\n");
aprint_naive(": AT Parallel Port\n");
aprint_normal(": AT Parallel Port\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
@ -132,7 +133,7 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -140,7 +141,7 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -149,7 +150,7 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our DRQ */
drq = acpi_res_drq(&res, 0);
if (drq == NULL) {
printf("%s: unable to find drq resource\n",
aprint_error("%s: unable to find drq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -164,7 +165,7 @@ atppc_acpi_attach(struct device *parent, struct device *self, void *aux)
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length, 0,
&sc->sc_ioh) != 0) {
printf("%s: attempt to map bus space failed, device not "
aprintf_error("%s: attempt to map bus space failed, device not "
"properly attached.\n", self->dv_xname);
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: attimer_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: attimer_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: attimer_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: attimer_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -124,7 +124,8 @@ attimer_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_io *io;
ACPI_STATUS rv;
printf(": AT Timer\n");
aprint_naive(": AT Timer\n");
aprint_normal(": AT Timer\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
@ -135,7 +136,7 @@ attimer_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -143,7 +144,7 @@ attimer_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = aa->aa_iot;
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length,
0, &sc->sc_ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: com_acpi.c,v 1.17 2005/12/11 18:48:51 rpaulo Exp $ */
/* $NetBSD: com_acpi.c,v 1.18 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: com_acpi.c,v 1.17 2005/12/11 18:48:51 rpaulo Exp $");
__KERNEL_RCSID(0, "$NetBSD: com_acpi.c,v 1.18 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -102,7 +102,8 @@ com_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_irq *irq;
ACPI_STATUS rv;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
@ -113,7 +114,7 @@ com_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -121,7 +122,7 @@ com_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -130,17 +131,17 @@ com_acpi_attach(struct device *parent, struct device *self, void *aux)
if (!com_is_console(aa->aa_iot, io->ar_base, &sc->sc_ioh)) {
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length,
0, &sc->sc_ioh)) {
printf("%s: can't map i/o space\n",
aprint_error("%s: can't map i/o space\n",
sc->sc_dev.dv_xname);
goto out;
}
}
sc->sc_iobase = io->ar_base;
printf("%s", sc->sc_dev.dv_xname);
aprint_normal("%s", sc->sc_dev.dv_xname);
if (comprobe1(sc->sc_iot, sc->sc_ioh) == 0) {
printf(": com probe failed\n");
aprint_error(": com probe failed\n");
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: fdc_acpi.c,v 1.27 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: fdc_acpi.c,v 1.28 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fdc_acpi.c,v 1.27 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: fdc_acpi.c,v 1.28 2006/02/20 12:17:49 kochi Exp $");
#include "rnd.h"
@ -118,7 +118,8 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_resources res;
ACPI_STATUS rv;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
sc->sc_ic = aa->aa_ic;
asc->sc_node = aa->aa_node;
@ -132,7 +133,7 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -140,7 +141,7 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -148,7 +149,7 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our DRQ */
drq = acpi_res_drq(&res, 0);
if (drq == NULL) {
printf("%s: unable to find drq resource\n",
aprint_error("%s: unable to find drq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -157,7 +158,7 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = aa->aa_iot;
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length,
0, &asc->sc_baseioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
goto out;
}
@ -168,13 +169,13 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
case 6:
if (bus_space_subregion(sc->sc_iot, asc->sc_baseioh, 2, 4,
&sc->sc_ioh)) {
printf("%s: unable to subregion i/o space\n",
aprint_error("%s: unable to subregion i/o space\n",
sc->sc_dev.dv_xname);
goto out;
}
break;
default:
printf("%s: unknown size: %d of io mapping\n",
aprint_error("%s: unknown size: %d of io mapping\n",
sc->sc_dev.dv_xname, io->ar_length);
goto out;
}
@ -187,16 +188,16 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
if (ctlio == NULL) {
if (bus_space_map(sc->sc_iot, io->ar_base + io->ar_length + 1,
1, 0, &sc->sc_fdctlioh)) {
printf("%s: unable to force map ctl i/o space\n",
aprint_error("%s: unable to force map ctl i/o space\n",
sc->sc_dev.dv_xname);
goto out;
}
printf("%s: ctl io %x did't probe. Forced attach\n",
aprint_verbose("%s: ctl io %x did't probe. Forced attach\n",
sc->sc_dev.dv_xname, io->ar_base + io->ar_length + 1);
} else {
if (bus_space_map(sc->sc_iot, ctlio->ar_base, ctlio->ar_length,
0, &sc->sc_fdctlioh)) {
printf("%s: unable to map ctl i/o space\n",
aprint_error("%s: unable to map ctl i/o space\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -217,7 +218,7 @@ fdc_acpi_attach(struct device *parent, struct device *self, void *aux)
* probe without pnp
*/
#ifdef ACPI_FDC_DEBUG
printf("%s: unable to enumerate, attempting normal probe\n",
aprint_debug("%s: unable to enumerate, attempting normal probe\n",
sc->sc_dev.dv_xname);
#endif
}
@ -241,19 +242,19 @@ fdc_acpi_enumerate(struct fdc_acpi_softc *asc)
rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDE", &abuf);
if (ACPI_FAILURE(rv)) {
#ifdef ACPI_FDC_DEBUG
printf("%s: failed to evaluate _FDE: %s\n",
aprint_normal("%s: failed to evaluate _FDE: %s\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv));
#endif
return drives;
}
fde = (ACPI_OBJECT *)abuf.Pointer;
if (fde->Type != ACPI_TYPE_BUFFER) {
printf("%s: expected BUFFER, got %d\n", sc->sc_dev.dv_xname,
aprint_error("%s: expected BUFFER, got %d\n", sc->sc_dev.dv_xname,
fde->Type);
goto out;
}
if (fde->Buffer.Length < 5 * sizeof(UINT32)) {
printf("%s: expected buffer len of %lu, got %d\n",
aprint_error("%s: expected buffer len of %lu, got %d\n",
sc->sc_dev.dv_xname,
(unsigned long)(5 * sizeof(UINT32)), fde->Buffer.Length);
goto out;
@ -269,7 +270,7 @@ fdc_acpi_enumerate(struct fdc_acpi_softc *asc)
for (i = 0; i < 4; i++) {
if (p[i]) drives |= (1 << i);
#ifdef ACPI_FDC_DEBUG
printf("%s: drive %d %sattached\n", sc->sc_dev.dv_xname, i,
aprint_normal("%s: drive %d %sattached\n", sc->sc_dev.dv_xname, i,
p[i] ? "" : "not ");
#endif
}
@ -304,7 +305,7 @@ fdc_acpi_getknownfds(struct fdc_acpi_softc *asc)
rv = acpi_eval_struct(asc->sc_node->ad_handle, "_FDI", &abuf);
if (ACPI_FAILURE(rv)) {
#ifdef ACPI_FDC_DEBUG
printf("%s: failed to evaluate _FDI: %s on drive %d\n",
aprint_normal("%s: failed to evaluate _FDI: %s on drive %d\n",
sc->sc_dev.dv_xname, AcpiFormatException(rv), i);
#endif
/* XXX if _FDI fails, assume 1.44MB floppy */
@ -313,7 +314,7 @@ fdc_acpi_getknownfds(struct fdc_acpi_softc *asc)
}
fdi = (ACPI_OBJECT *)abuf.Pointer;
if (fdi->Type != ACPI_TYPE_PACKAGE) {
printf("%s: expected PACKAGE, got %d\n",
aprint_error("%s: expected PACKAGE, got %d\n",
sc->sc_dev.dv_xname, fdi->Type);
goto out;
}
@ -351,7 +352,7 @@ fdc_acpi_nvtotype(char *fdc, int nvraminfo, int drive)
return &fdc_acpi_fdtypes[4];
default:
#ifdef ACPI_FDC_DEBUG
printf("%s: drive %d: unknown device type 0x%x\n",
aprint_normal("%s: drive %d: unknown device type 0x%x\n",
fdc, drive, type);
#endif
return NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: joy_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: joy_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: joy_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: joy_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -129,7 +129,8 @@ joy_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_io *io;
ACPI_STATUS rv;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
@ -140,7 +141,7 @@ joy_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -148,7 +149,7 @@ joy_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = aa->aa_iot;
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length,
0, &sc->sc_ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt_acpi.c,v 1.11 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: lpt_acpi.c,v 1.12 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lpt_acpi.c,v 1.11 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: lpt_acpi.c,v 1.12 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -95,7 +95,8 @@ lpt_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_irq *irq;
ACPI_STATUS rv;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
@ -106,7 +107,7 @@ lpt_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -114,7 +115,7 @@ lpt_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -122,7 +123,7 @@ lpt_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = aa->aa_iot;
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length,
0, &sc->sc_ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mpu_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: mpu_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mpu_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: mpu_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -134,7 +134,8 @@ mpu_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_irq *irq;
ACPI_STATUS rv;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dev, aa->aa_node->ad_handle, "_CRS",
@ -145,7 +146,7 @@ mpu_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dev.dv_xname);
goto out;
}
@ -153,14 +154,14 @@ mpu_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_dev.dv_xname);
goto out;
}
sc->iot = aa->aa_iot;
if (bus_space_map(sc->iot, io->ar_base, io->ar_length, 0, &sc->ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dev.dv_xname);
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbc_acpi.c,v 1.16 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: pckbc_acpi.c,v 1.17 2006/02/20 12:17:49 kochi Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.16 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: pckbc_acpi.c,v 1.17 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -163,7 +163,8 @@ pckbc_acpi_attach(struct device *parent,
panic("pckbc_acpi_attach: impossible");
}
printf(": %s port\n", pckbc_slot_names[psc->sc_slot]);
aprint_naive("\n");
aprint_normal(": %s port\n", pckbc_slot_names[psc->sc_slot]);
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dv, aa->aa_node->ad_handle, "_CRS",
@ -174,7 +175,7 @@ pckbc_acpi_attach(struct device *parent,
/* find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n", sc->sc_dv.dv_xname);
aprint_error("%s: unable to find irq resource\n", sc->sc_dv.dv_xname);
goto out;
}
psc->sc_irq = irq->ar_irq;
@ -188,7 +189,7 @@ pckbc_acpi_attach(struct device *parent,
io0 = acpi_res_io(&res, 0);
if (io0 == NULL) {
printf("%s: unable to find i/o resources\n",
aprint_error("%s: unable to find i/o resources\n",
sc->sc_dv.dv_xname);
goto out;
}
@ -202,7 +203,7 @@ pckbc_acpi_attach(struct device *parent,
} else {
io1 = acpi_res_io(&res, 1);
if (io1 == NULL) {
printf("%s: unable to find i/o resources\n",
aprint_error("%s: unable to find i/o resources\n",
sc->sc_dv.dv_xname);
goto out;
}
@ -259,10 +260,10 @@ pckbc_acpi_intr_establish(struct pckbc_softc *sc,
if (i < pckbc_cd.cd_ndevs)
rv = isa_intr_establish(ic, irq, ist, IPL_TTY, pckbcintr, sc);
if (rv == NULL) {
printf("%s: unable to establish interrupt for %s slot\n",
aprint_error("%s: unable to establish interrupt for %s slot\n",
sc->sc_dv.dv_xname, pckbc_slot_names[slot]);
} else {
printf("%s: using irq %d for %s slot\n", sc->sc_dv.dv_xname,
aprint_normal("%s: using irq %d for %s slot\n", sc->sc_dv.dv_xname,
irq, pckbc_slot_names[slot]);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcppi_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: pcppi_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcppi_acpi.c,v 1.2 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: pcppi_acpi.c,v 1.3 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -129,7 +129,8 @@ pcppi_acpi_attach(struct device *parent, struct device *self, void *aux)
struct acpi_io *io;
ACPI_STATUS rv;
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
/* parse resources */
rv = acpi_resource_parse(&sc->sc_dv, aa->aa_node->ad_handle, "_CRS",
@ -140,7 +141,7 @@ pcppi_acpi_attach(struct device *parent, struct device *self, void *aux)
/* find our i/o registers */
io = acpi_res_io(&res, 0);
if (io == NULL) {
printf("%s: unable to find i/o register resource\n",
aprint_error("%s: unable to find i/o register resource\n",
sc->sc_dv.dv_xname);
goto out;
}
@ -148,7 +149,7 @@ pcppi_acpi_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = aa->aa_iot;
if (bus_space_map(sc->sc_iot, io->ar_base, io->ar_length,
0, &sc->sc_ppi_ioh)) {
printf("%s: can't map i/o space\n", sc->sc_dv.dv_xname);
aprint_error("%s: can't map i/o space\n", sc->sc_dv.dv_xname);
goto out;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wss_acpi.c,v 1.14 2005/12/11 12:21:02 christos Exp $ */
/* $NetBSD: wss_acpi.c,v 1.15 2006/02/20 12:17:49 kochi Exp $ */
/*
* Copyright (c) 2002 Jared D. McNeill <jmcneill@invisible.ca>
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.14 2005/12/11 12:21:02 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: wss_acpi.c,v 1.15 2006/02/20 12:17:49 kochi Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -124,7 +124,8 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
ACPI_STATUS rv;
struct wss_acpi_hint *wah;
printf(": NeoMagic 256AV audio\n");
aprint_naive(": NeoMagic 256AV audio\n");
aprint_normal(": NeoMagic 256AV audio\n");
wah = &wss_acpi_hints[
wss_acpi_hints_index(aa->aa_node->ad_devinfo->HardwareId.Value)];
@ -141,19 +142,19 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
dspio = acpi_res_io(&res, wah->io_region_idx_ad1848);
oplio = acpi_res_io(&res, wah->io_region_idx_opl);
if (dspio == NULL || oplio == NULL) {
printf("%s: unable to find i/o registers resource\n",
aprint_error("%s: unable to find i/o registers resource\n",
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
goto out;
}
if (bus_space_map(sc->sc_iot, dspio->ar_base, dspio->ar_length,
0, &sc->sc_ioh) != 0) {
printf("%s: unable to map i/o registers\n",
aprint_error("%s: unable to map i/o registers\n",
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
goto out;
}
if (bus_space_map(sc->sc_iot, oplio->ar_base, oplio->ar_length,
0, &sc->sc_opl_ioh) != 0) {
printf("%s: unable to map opl i/o registers\n",
aprint_error("%s: unable to map opl i/o registers\n",
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
goto out;
}
@ -163,7 +164,7 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
/* Find our IRQ */
irq = acpi_res_irq(&res, 0);
if (irq == NULL) {
printf("%s: unable to find irq resource\n",
aprint_error("%s: unable to find irq resource\n",
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
/* XXX bus_space_unmap */
goto out;
@ -174,7 +175,7 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
playdrq = acpi_res_drq(&res, 0);
recdrq = acpi_res_drq(&res, 1);
if (playdrq == NULL || recdrq == NULL) {
printf("%s: unable to find drq resources\n",
aprint_error("%s: unable to find drq resources\n",
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
/* XXX bus_space_unmap */
goto out;
@ -188,13 +189,13 @@ wss_acpi_attach(struct device *parent, struct device *self, void *aux)
/* Look for the ad1848 */
if (!ad1848_isa_probe(&sc->sc_ad1848)) {
printf("%s: ad1848 probe failed\n",
aprint_error("%s: ad1848 probe failed\n",
sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
/* XXX cleanup */
goto out;
}
printf("%s", sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
aprint_normal("%s", sc->sc_ad1848.sc_ad1848.sc_dev.dv_xname);
/* Attach our wss device */
wssattach(sc);