Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/arm/generic_timer.c
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
#include <dev/ofw/openfirm.h> | #include <dev/ofw/openfirm.h> | ||||
#include <dev/ofw/ofw_bus.h> | #include <dev/ofw/ofw_bus.h> | ||||
#include <dev/ofw/ofw_bus_subr.h> | #include <dev/ofw/ofw_bus_subr.h> | ||||
#endif | #endif | ||||
#ifdef DEV_ACPI | #ifdef DEV_ACPI | ||||
#include <contrib/dev/acpica/include/acpi.h> | #include <contrib/dev/acpica/include/acpi.h> | ||||
#include <dev/acpica/acpivar.h> | #include <dev/acpica/acpivar.h> | ||||
#include "acpi_bus_if.h" | |||||
#endif | #endif | ||||
#define GT_CTRL_ENABLE (1 << 0) | #define GT_CTRL_ENABLE (1 << 0) | ||||
#define GT_CTRL_INT_MASK (1 << 1) | #define GT_CTRL_INT_MASK (1 << 1) | ||||
#define GT_CTRL_INT_STAT (1 << 2) | #define GT_CTRL_INT_STAT (1 << 2) | ||||
#define GT_REG_CTRL 0 | #define GT_REG_CTRL 0 | ||||
#define GT_REG_TVAL 1 | #define GT_REG_TVAL 1 | ||||
▲ Show 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
#endif | #endif | ||||
#ifdef DEV_ACPI | #ifdef DEV_ACPI | ||||
static void | static void | ||||
arm_tmr_acpi_add_irq(device_t parent, device_t dev, int rid, u_int irq) | arm_tmr_acpi_add_irq(device_t parent, device_t dev, int rid, u_int irq) | ||||
{ | { | ||||
irq = ACPI_BUS_MAP_INTR(parent, dev, irq, | |||||
INTR_TRIGGER_LEVEL, INTR_POLARITY_HIGH); | |||||
BUS_SET_RESOURCE(parent, dev, SYS_RES_IRQ, rid, irq, 1); | BUS_SET_RESOURCE(parent, dev, SYS_RES_IRQ, rid, irq, 1); | ||||
} | } | ||||
static void | static void | ||||
arm_tmr_acpi_identify(driver_t *driver, device_t parent) | arm_tmr_acpi_identify(driver_t *driver, device_t parent) | ||||
{ | { | ||||
ACPI_TABLE_GTDT *gtdt; | ACPI_TABLE_GTDT *gtdt; | ||||
vm_paddr_t physaddr; | vm_paddr_t physaddr; | ||||
▲ Show 20 Lines • Show All 243 Lines • Show Last 20 Lines |