Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom allow board-specific ioctl() handlers
details: https://anonhg.NetBSD.org/src/rev/408934dfa55f
branches: trunk
changeset: 332068:408934dfa55f
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Sep 05 21:15:42 2014 +0000
description:
allow board-specific ioctl() handlers
diffstat:
sys/arch/arm/broadcom/bcm2835_genfb.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (52 lines):
diff -r 7bd5d900831d -r 408934dfa55f sys/arch/arm/broadcom/bcm2835_genfb.c
--- a/sys/arch/arm/broadcom/bcm2835_genfb.c Fri Sep 05 20:55:11 2014 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_genfb.c Fri Sep 05 21:15:42 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_genfb.c,v 1.6 2014/07/24 21:35:12 riastradh Exp $ */
+/* $NetBSD: bcm2835_genfb.c,v 1.7 2014/09/05 21:15:42 macallan Exp $ */
/*-
* Copyright (c) 2013 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_genfb.c,v 1.6 2014/07/24 21:35:12 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_genfb.c,v 1.7 2014/09/05 21:15:42 macallan Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -61,9 +61,11 @@
static bool bcmgenfb_shutdown(device_t, int);
void bcmgenfb_set_console_dev(device_t);
+void bcmgenfb_set_ioctl(int(*)(void *, void *, u_long, void *, int, struct lwp *));
void bcmgenfb_ddb_trap_callback(int);
static device_t bcmgenfb_console_dev = NULL;
+int (*bcmgenfb_ioctl_handler)(void *, void *, u_long, void *, int, struct lwp *) = NULL;
CFATTACH_DECL_NEW(bcmgenfb, sizeof(struct bcmgenfb_softc),
bcmgenfb_match, bcmgenfb_attach, NULL, NULL);
@@ -152,6 +154,8 @@
return ret;
}
default:
+ if (bcmgenfb_ioctl_handler != NULL)
+ return bcmgenfb_ioctl_handler(v, vs, cmd, data, flag, l);
return EPASSTHROUGH;
}
}
@@ -182,6 +186,12 @@
}
void
+bcmgenfb_set_ioctl(int(*boo)(void *, void *, u_long, void *, int, struct lwp *))
+{
+ bcmgenfb_ioctl_handler = boo;
+}
+
+void
bcmgenfb_ddb_trap_callback(int where)
{
if (bcmgenfb_console_dev == NULL)
Home |
Main Index |
Thread Index |
Old Index