Use the hpet defines in the source.
Also shortened some defines using "TN" instead of "TIMER". It's also the same scheme used in the specs git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33334 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -33,14 +33,15 @@
|
|||||||
#define HPET_IS_LEGACY(regs) (((regs)->config & HPET_CONF_MASK_LEGACY) >> 1)
|
#define HPET_IS_LEGACY(regs) (((regs)->config & HPET_CONF_MASK_LEGACY) >> 1)
|
||||||
|
|
||||||
/* Timer Configuration */
|
/* Timer Configuration */
|
||||||
#define HPET_TIMER_INT_ENB_CNF 0x00000004
|
#define HPET_TN_INT_TYPE_CNF 0x00000002
|
||||||
#define HPET_TIMER_TYPE_CNF 0x00000008
|
#define HPET_TN_INT_ENB_CNF 0x00000004
|
||||||
#define HPET_TIMER_PER_INT_CAP 0x00000010
|
#define HPET_TN_TYPE_CNF 0x00000008
|
||||||
#define HPET_TIMER_SIZE_CAP 0x00000020
|
#define HPET_TN_PER_INT_CAP 0x00000010
|
||||||
#define HPET_TIMER_VAL_SET_CNF 0x00000040
|
#define HPET_TN_SIZE_CAP 0x00000020
|
||||||
#define HPET_TIMER_32MODE_CNF 0x00000100
|
#define HPET_TN_VAL_SET_CNF 0x00000040
|
||||||
#define HPET_TIMER_TN_FSB_EN_CNF 0x00004000
|
#define HPET_TN_32MODE_CNF 0x00000100
|
||||||
#define HPET_TIMER_TN_FSB_INT_DEL_CAP 0x00008000
|
#define HPET_TN_FSB_EN_CNF 0x00004000
|
||||||
|
#define HPET_TN_FSB_INT_DEL_CAP 0x00008000
|
||||||
|
|
||||||
|
|
||||||
#define ACPI_HPET_SIGNATURE "HPET"
|
#define ACPI_HPET_SIGNATURE "HPET"
|
||||||
|
|||||||
@@ -71,10 +71,10 @@ hpet_set_hardware_timer(bigtime_t relativeTimeout)
|
|||||||
sHPETRegs->timer[2].config &= (~31 << 9);
|
sHPETRegs->timer[2].config &= (~31 << 9);
|
||||||
|
|
||||||
// Non-periodic mode, edge triggered
|
// Non-periodic mode, edge triggered
|
||||||
sHPETRegs->timer[2].config &= ~(0x8 & 0x2);
|
sHPETRegs->timer[2].config &= ~(HPET_TN_TYPE_CNF & HPET_TN_INT_TYPE_CNF);
|
||||||
|
|
||||||
// Enable timer
|
// Enable timer
|
||||||
sHPETRegs->timer[2].config |= 0x4;
|
sHPETRegs->timer[2].config |= HPET_TN_INT_ENB_CNF;
|
||||||
|
|
||||||
restore_interrupts(state);
|
restore_interrupts(state);
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ static status_t
|
|||||||
hpet_clear_hardware_timer()
|
hpet_clear_hardware_timer()
|
||||||
{
|
{
|
||||||
// Disable timer
|
// Disable timer
|
||||||
sHPETRegs->timer[2].config &= ~0x4;
|
sHPETRegs->timer[2].config &= ~HPET_TN_INT_ENB_CNF;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user