Changeset View
Changeset View
Standalone View
Standalone View
sys/i386/i386/elan-mmcr.c
Show All 12 Lines | |||||
case '-': | case '-': | ||||
default: | default: | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
return (0); | return (0); | ||||
} | } | ||||
SYSCTL_OID(_machdep, OID_AUTO, elan_gpio_config, CTLTYPE_STRING | CTLFLAG_RW, | SYSCTL_OID(_machdep, OID_AUTO, elan_gpio_config, | ||||
NULL, 0, sysctl_machdep_elan_gpio_config, "A", "Elan CPU GPIO pin config"); | CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
NULL, 0, sysctl_machdep_elan_gpio_config, "A", | |||||
"Elan CPU GPIO pin config"); | |||||
#ifdef CPU_ELAN_PPS | #ifdef CPU_ELAN_PPS | ||||
static void | static void | ||||
elan_poll_pps(struct timecounter *tc) | elan_poll_pps(struct timecounter *tc) | ||||
{ | { | ||||
static int state; | static int state; | ||||
int i; | int i; | ||||
uint16_t u, x, y, z; | uint16_t u, x, y, z; | ||||
Show All 24 Lines | |||||
f = elan_timecounter.tc_frequency * 4; | f = elan_timecounter.tc_frequency * 4; | ||||
error = sysctl_handle_int(oidp, &f, 0, req); | error = sysctl_handle_int(oidp, &f, 0, req); | ||||
if (error == 0 && req->newptr != NULL) | if (error == 0 && req->newptr != NULL) | ||||
elan_timecounter.tc_frequency = (f + 3) / 4; | elan_timecounter.tc_frequency = (f + 3) / 4; | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_machdep, OID_AUTO, elan_freq, CTLTYPE_UINT | CTLFLAG_RW, | SYSCTL_PROC(_machdep, OID_AUTO, elan_freq, | ||||
0, sizeof (u_int), sysctl_machdep_elan_freq, "IU", ""); | CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
0, sizeof (u_int), sysctl_machdep_elan_freq, "IU", | |||||
""); | |||||
/* | /* | ||||
* Positively identifying the Elan can only be done through the PCI id of | * Positively identifying the Elan can only be done through the PCI id of | ||||
* the host-bridge, this function is called from i386/pci/pci_bus.c. | * the host-bridge, this function is called from i386/pci/pci_bus.c. | ||||
*/ | */ | ||||
void | void | ||||
init_AMD_Elan_sc520(void) | init_AMD_Elan_sc520(void) | ||||
{ | { | ||||
Show All 12 Lines |