summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2004-03-09 02:51:21 +0000
committerjb <jb@FreeBSD.org>2004-03-09 02:51:21 +0000
commitee32fc5596ef77d509beaa6c5ee2b0fe0966e08d (patch)
tree1fa72642a1aee54f04720b34cf76d3a1be00ed65 /sys
parent1fdc6e57d5d3b5e473d7e3b037afcb0f08e05880 (diff)
downloadFreeBSD-src-ee32fc5596ef77d509beaa6c5ee2b0fe0966e08d.zip
FreeBSD-src-ee32fc5596ef77d509beaa6c5ee2b0fe0966e08d.tar.gz
Add #ifdef CPU_SOEKRIS in the missing places around the led_* code
that is specific to those boards. This allows this file to compile again with CPU_ELAN enabled, but not CPU_SOEKRIS, for a Compulab board.
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/i386/elan-mmcr.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/i386/i386/elan-mmcr.c b/sys/i386/i386/elan-mmcr.c
index 15e1f5e..518f342 100644
--- a/sys/i386/i386/elan-mmcr.c
+++ b/sys/i386/i386/elan-mmcr.c
@@ -75,6 +75,7 @@ static struct pps_state elan_pps;
u_int pps_a, pps_d;
u_int echo_a, echo_d;
#endif /* CPU_ELAN_PPS */
+#ifdef CPU_SOEKRIS
u_int led_cookie[32];
dev_t led_dev[32];
@@ -90,6 +91,7 @@ gpio_led(void *cookie, int state)
v ^= 0xc;
mmcrptr[v / 2] = u;
}
+#endif
static int
sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS)
@@ -97,7 +99,10 @@ sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS)
u_int u, v;
int i, np, ne;
int error;
- char buf[32], tmp[10];
+ char buf[32];
+#ifdef CPU_SOEKRIS
+ char tmp[10];
+#endif
error = SYSCTL_OUT(req, gpio_config, 33);
if (error != 0 || req->newptr == NULL)
@@ -141,11 +146,13 @@ sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS)
v = 2;
else
v = 0;
+#ifdef CPU_SOEKRIS
if (buf[i] != 'l' && buf[i] != 'L' && led_dev[i] != NULL) {
led_destroy(led_dev[i]);
led_dev[i] = NULL;
mmcrptr[(0xc2a + v) / 2] &= ~u;
}
+#endif
switch (buf[i]) {
#ifdef CPU_ELAN_PPS
case 'P':
@@ -165,6 +172,7 @@ sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS)
gpio_config[i] = buf[i];
break;
#endif /* CPU_ELAN_PPS */
+#ifdef CPU_SOEKRIS
case 'l':
case 'L':
if (buf[i] == 'L')
@@ -179,6 +187,7 @@ sysctl_machdep_elan_gpio_config(SYSCTL_HANDLER_ARGS)
mmcrptr[(0xc2a + v) / 2] |= u;
gpio_config[i] = buf[i];
break;
+#endif
case '.':
gpio_config[i] = buf[i];
break;
OpenPOWER on IntegriCloud