Module Name: src
Committed By: khorben
Date: Sat May 11 18:01:04 UTC 2013
Modified Files:
src/sys/arch/evbarm/conf [khorben-n900]: N900
src/sys/arch/evbarm/n900 [khorben-n900]: n900_acad.c n900_audjck.c
n900_cambtn.c n900_camcvr.c n900_kbdsld.c n900_lckbtn.c
n900_prxmty.c
Log Message:
Let the device drivers on the GPIO bus use the interrupt locator.
To generate a diff of this commit:
cvs rdiff -u -r1.13.2.1 -r1.13.2.2 src/sys/arch/evbarm/conf/N900
cvs rdiff -u -r1.5 -r1.5.2.1 src/sys/arch/evbarm/n900/n900_acad.c
cvs rdiff -u -r1.1 -r1.1.2.1 src/sys/arch/evbarm/n900/n900_audjck.c \
src/sys/arch/evbarm/n900/n900_cambtn.c \
src/sys/arch/evbarm/n900/n900_camcvr.c \
src/sys/arch/evbarm/n900/n900_kbdsld.c \
src/sys/arch/evbarm/n900/n900_prxmty.c
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/arch/evbarm/n900/n900_lckbtn.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbarm/conf/N900
diff -u src/sys/arch/evbarm/conf/N900:1.13.2.1 src/sys/arch/evbarm/conf/N900:1.13.2.2
--- src/sys/arch/evbarm/conf/N900:1.13.2.1 Sat May 11 17:28:51 2013
+++ src/sys/arch/evbarm/conf/N900 Sat May 11 18:01:04 2013
@@ -1,5 +1,5 @@
#
-# $NetBSD: N900,v 1.13.2.1 2013/05/11 17:28:51 khorben Exp $
+# $NetBSD: N900,v 1.13.2.2 2013/05/11 18:01:04 khorben Exp $
#
# N900 -- Nokia N900 Kernel
#
@@ -216,25 +216,25 @@ gpio* at omapgpio?
# GPIO devices
# Charging sensor
-n900acad0 at gpio0 offset 7 mask 0x1 #intr 103
+n900acad0 at gpio0 offset 7 mask 0x1 intr 103
# Camera button
-n900cambtn0 at gpio2 offset 4 mask 0x3 #intr 164, 165
+n900cambtn0 at gpio2 offset 4 mask 0x3 intr 164 #and 165
# Keyboard slide
-n900kbdsld0 at gpio2 offset 7 mask 0x1 #intr 167
+n900kbdsld0 at gpio2 offset 7 mask 0x1 intr 167
# Proximity sensor
-n900prxmty0 at gpio2 offset 25 mask 0x1 #intr 185
+n900prxmty0 at gpio2 offset 25 mask 0x1 intr 185
# Camera cover
-n900camcvr0 at gpio3 offset 14 mask 0x1 #intr 206
+n900camcvr0 at gpio3 offset 14 mask 0x1 intr 206
# Lock button
-n900lckbtn0 at gpio3 offset 17 mask 0x1 #intr 209
+n900lckbtn0 at gpio3 offset 17 mask 0x1 intr 209
# Audio jack
-n900audjck0 at gpio5 offset 17 mask 0x1 #intr 273
+n900audjck0 at gpio5 offset 17 mask 0x1 intr 273
# System Control Module
omapscm0 at obio0 addr 0x48002000 size 0x1000
Index: src/sys/arch/evbarm/n900/n900_acad.c
diff -u src/sys/arch/evbarm/n900/n900_acad.c:1.5 src/sys/arch/evbarm/n900/n900_acad.c:1.5.2.1
--- src/sys/arch/evbarm/n900/n900_acad.c:1.5 Sat Apr 20 03:37:55 2013
+++ src/sys/arch/evbarm/n900/n900_acad.c Sat May 11 18:01:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: n900_acad.c,v 1.5 2013/04/20 03:37:55 khorben Exp $ */
+/* $NetBSD: n900_acad.c,v 1.5.2.1 2013/05/11 18:01:04 khorben Exp $ */
/*
* AC adapter driver for the Nokia N900.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_acad.c,v 1.5 2013/04/20 03:37:55 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_acad.c,v 1.5.2.1 2013/05/11 18:01:04 khorben Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,11 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: n900_acad.c,
#include <arm/omap/omap2_gpio.h>
-/* The base interrupt for the corresponding GPIO device where this driver
- * attaches. This is an ugly workaround the current limitations of gpio(4),
- * which does not seem to allow a better way to locate the interrupt yet. */
-#define N900ACAD_GPIO_BASE 96
-
#define N900ACAD_PIN_INPUT 0
#define N900ACAD_NPINS 1
@@ -127,8 +122,8 @@ n900acad_attach(device_t parent, device_
gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900ACAD_PIN_INPUT,
GPIO_PIN_INPUT);
- sc->sc_intr = intr_establish(N900ACAD_GPIO_BASE + ga->ga_offset, IPL_VM,
- IST_EDGE_RISING, n900acad_intr, sc);
+ sc->sc_intr = intr_establish(ga->ga_intr, IPL_VM, IST_EDGE_RISING,
+ n900acad_intr, sc);
if (sc->sc_intr == NULL) {
aprint_error(": couldn't establish interrupt\n");
gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);
Index: src/sys/arch/evbarm/n900/n900_audjck.c
diff -u src/sys/arch/evbarm/n900/n900_audjck.c:1.1 src/sys/arch/evbarm/n900/n900_audjck.c:1.1.2.1
--- src/sys/arch/evbarm/n900/n900_audjck.c:1.1 Mon May 6 22:56:54 2013
+++ src/sys/arch/evbarm/n900/n900_audjck.c Sat May 11 18:01:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: n900_audjck.c,v 1.1 2013/05/06 22:56:54 khorben Exp $ */
+/* $NetBSD: n900_audjck.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $ */
/*
* Audio jack driver for the Nokia N900.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_audjck.c,v 1.1 2013/05/06 22:56:54 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_audjck.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,11 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: n900_audjck.
#include <arm/omap/omap2_gpio.h>
-/* The base interrupt for the corresponding GPIO device where this driver
- * attaches. This is an ugly workaround the current limitations of gpio(4),
- * which does not seem to allow a better way to locate the interrupt yet. */
-#define N900AUDJCK_GPIO_BASE 256
-
#define N900AUDJCK_PIN_INPUT 0
#define N900AUDJCK_NPINS 1
@@ -128,8 +123,8 @@ n900audjck_attach(device_t parent, devic
gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900AUDJCK_PIN_INPUT,
GPIO_PIN_INPUT);
- sc->sc_intr = intr_establish(N900AUDJCK_GPIO_BASE + ga->ga_offset,
- IPL_VM, IST_EDGE_BOTH, n900audjck_intr, sc);
+ sc->sc_intr = intr_establish(ga->ga_intr, IPL_VM, IST_EDGE_BOTH,
+ n900audjck_intr, sc);
if (sc->sc_intr == NULL) {
aprint_error(": couldn't establish interrupt\n");
gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);
Index: src/sys/arch/evbarm/n900/n900_cambtn.c
diff -u src/sys/arch/evbarm/n900/n900_cambtn.c:1.1 src/sys/arch/evbarm/n900/n900_cambtn.c:1.1.2.1
--- src/sys/arch/evbarm/n900/n900_cambtn.c:1.1 Sat Apr 20 03:37:55 2013
+++ src/sys/arch/evbarm/n900/n900_cambtn.c Sat May 11 18:01:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: n900_cambtn.c,v 1.1 2013/04/20 03:37:55 khorben Exp $ */
+/* $NetBSD: n900_cambtn.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $ */
/*
* Camera button driver for the Nokia N900.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_cambtn.c,v 1.1 2013/04/20 03:37:55 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_cambtn.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -46,11 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: n900_cambtn.
#include <arm/omap/omap2_gpio.h>
-/* The base interrupt for the corresponding GPIO device where this driver
- * attaches. This is an ugly workaround the current limitations of gpio(4),
- * which does not seem to allow a better way to locate the interrupt yet. */
-#define N900CAMBTN_GPIO_BASE 160
-
#define N900CAMBTN_PIN_FOCUS 0
#define N900CAMBTN_PIN_CAPTURE 1
#define N900CAMBTN_NPINS 2
@@ -140,15 +135,15 @@ n900cambtn_attach(device_t parent, devic
gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900CAMBTN_PIN_FOCUS,
GPIO_PIN_INPUT);
- sc->sc_intr[0] = intr_establish(N900CAMBTN_GPIO_BASE + ga->ga_offset,
- IPL_VM, IST_EDGE_BOTH, n900cambtn_intr, sc);
+ sc->sc_intr[0] = intr_establish(ga->ga_intr, IPL_VM, IST_EDGE_BOTH,
+ n900cambtn_intr, sc);
if (sc->sc_intr[0] == NULL) {
aprint_error(": couldn't establish interrupt\n");
return;
}
- sc->sc_intr[1] = intr_establish(N900CAMBTN_GPIO_BASE + ga->ga_offset
- + 1, IPL_VM, IST_EDGE_BOTH, n900cambtn_intr, sc);
+ sc->sc_intr[1] = intr_establish(ga->ga_intr + 1, IPL_VM, IST_EDGE_BOTH,
+ n900cambtn_intr, sc);
if (sc->sc_intr[1] == NULL) {
aprint_error(": couldn't establish interrupt\n");
intr_disestablish(sc->sc_intr[0]);
Index: src/sys/arch/evbarm/n900/n900_camcvr.c
diff -u src/sys/arch/evbarm/n900/n900_camcvr.c:1.1 src/sys/arch/evbarm/n900/n900_camcvr.c:1.1.2.1
--- src/sys/arch/evbarm/n900/n900_camcvr.c:1.1 Sat Apr 20 03:37:55 2013
+++ src/sys/arch/evbarm/n900/n900_camcvr.c Sat May 11 18:01:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: n900_camcvr.c,v 1.1 2013/04/20 03:37:55 khorben Exp $ */
+/* $NetBSD: n900_camcvr.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $ */
/*
* Camera cover driver for the Nokia N900.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_camcvr.c,v 1.1 2013/04/20 03:37:55 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_camcvr.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,11 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: n900_camcvr.
#include <arm/omap/omap2_gpio.h>
-/* The base interrupt for the corresponding GPIO device where this driver
- * attaches. This is an ugly workaround the current limitations of gpio(4),
- * which does not seem to allow a better way to locate the interrupt yet. */
-#define N900CAMCVR_GPIO_BASE 192
-
#define N900CAMCVR_PIN_INPUT 0
#define N900CAMCVR_NPINS 1
@@ -127,8 +122,8 @@ n900camcvr_attach(device_t parent, devic
gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900CAMCVR_PIN_INPUT,
GPIO_PIN_INPUT);
- sc->sc_intr = intr_establish(N900CAMCVR_GPIO_BASE + ga->ga_offset,
- IPL_VM, IST_EDGE_BOTH, n900camcvr_intr, sc);
+ sc->sc_intr = intr_establish(ga->ga_intr, IPL_VM, IST_EDGE_BOTH,
+ n900camcvr_intr, sc);
if (sc->sc_intr == NULL) {
aprint_error(": couldn't establish interrupt\n");
gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);
Index: src/sys/arch/evbarm/n900/n900_kbdsld.c
diff -u src/sys/arch/evbarm/n900/n900_kbdsld.c:1.1 src/sys/arch/evbarm/n900/n900_kbdsld.c:1.1.2.1
--- src/sys/arch/evbarm/n900/n900_kbdsld.c:1.1 Sat Apr 20 03:37:55 2013
+++ src/sys/arch/evbarm/n900/n900_kbdsld.c Sat May 11 18:01:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: n900_kbdsld.c,v 1.1 2013/04/20 03:37:55 khorben Exp $ */
+/* $NetBSD: n900_kbdsld.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $ */
/*
* Keypad slide driver for the Nokia N900.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_kbdsld.c,v 1.1 2013/04/20 03:37:55 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_kbdsld.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,11 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: n900_kbdsld.
#include <arm/omap/omap2_gpio.h>
-/* The base interrupt for the corresponding GPIO device where this driver
- * attaches. This is an ugly workaround the current limitations of gpio(4),
- * which does not seem to allow a better way to locate the interrupt yet. */
-#define N900KBDSLD_GPIO_BASE 160
-
#define N900KBDSLD_PIN_INPUT 0
#define N900KBDSLD_NPINS 1
@@ -127,8 +122,8 @@ n900kbdsld_attach(device_t parent, devic
gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900KBDSLD_PIN_INPUT,
GPIO_PIN_INPUT);
- sc->sc_intr = intr_establish(N900KBDSLD_GPIO_BASE + ga->ga_offset,
- IPL_VM, IST_EDGE_BOTH, n900kbdsld_intr, sc);
+ sc->sc_intr = intr_establish(ga->ga_intr, IPL_VM, IST_EDGE_BOTH,
+ n900kbdsld_intr, sc);
if (sc->sc_intr == NULL) {
aprint_error(": couldn't establish interrupt\n");
gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);
Index: src/sys/arch/evbarm/n900/n900_prxmty.c
diff -u src/sys/arch/evbarm/n900/n900_prxmty.c:1.1 src/sys/arch/evbarm/n900/n900_prxmty.c:1.1.2.1
--- src/sys/arch/evbarm/n900/n900_prxmty.c:1.1 Mon May 6 22:56:54 2013
+++ src/sys/arch/evbarm/n900/n900_prxmty.c Sat May 11 18:01:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: n900_prxmty.c,v 1.1 2013/05/06 22:56:54 khorben Exp $ */
+/* $NetBSD: n900_prxmty.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $ */
/*
* Proximity sensor driver for the Nokia N900.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_prxmty.c,v 1.1 2013/05/06 22:56:54 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_prxmty.c,v 1.1.2.1 2013/05/11 18:01:04 khorben Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,11 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: n900_prxmty.
#include <arm/omap/omap2_gpio.h>
-/* The base interrupt for the corresponding GPIO device where this driver
- * attaches. This is an ugly workaround the current limitations of gpio(4),
- * which does not seem to allow a better way to locate the interrupt yet. */
-#define N900PRXMTY_GPIO_BASE 160
-
#define N900PRXMTY_PIN_INPUT 0
#define N900PRXMTY_NPINS 1
@@ -127,8 +122,8 @@ n900prxmty_attach(device_t parent, devic
gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900PRXMTY_PIN_INPUT,
GPIO_PIN_INPUT);
- sc->sc_intr = intr_establish(N900PRXMTY_GPIO_BASE + ga->ga_offset,
- IPL_VM, IST_EDGE_BOTH, n900prxmty_intr, sc);
+ sc->sc_intr = intr_establish(ga->ga_intr, IPL_VM, IST_EDGE_BOTH,
+ n900prxmty_intr, sc);
if (sc->sc_intr == NULL) {
aprint_error(": couldn't establish interrupt\n");
gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);
Index: src/sys/arch/evbarm/n900/n900_lckbtn.c
diff -u src/sys/arch/evbarm/n900/n900_lckbtn.c:1.3 src/sys/arch/evbarm/n900/n900_lckbtn.c:1.3.2.1
--- src/sys/arch/evbarm/n900/n900_lckbtn.c:1.3 Sat Apr 20 03:37:55 2013
+++ src/sys/arch/evbarm/n900/n900_lckbtn.c Sat May 11 18:01:04 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: n900_lckbtn.c,v 1.3 2013/04/20 03:37:55 khorben Exp $ */
+/* $NetBSD: n900_lckbtn.c,v 1.3.2.1 2013/05/11 18:01:04 khorben Exp $ */
/*
* Lock button driver for the Nokia N900.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: n900_lckbtn.c,v 1.3 2013/04/20 03:37:55 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: n900_lckbtn.c,v 1.3.2.1 2013/05/11 18:01:04 khorben Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -45,11 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: n900_lckbtn.
#include <arm/omap/omap2_gpio.h>
-/* The base interrupt for the corresponding GPIO device where this driver
- * attaches. This is an ugly workaround the current limitations of gpio(4),
- * which does not seem to allow a better way to locate the interrupt yet. */
-#define N900LCKBTN_GPIO_BASE 192
-
#define N900LCKBTN_PIN_INPUT 0
#define N900LCKBTN_NPINS 1
@@ -128,8 +123,8 @@ n900lckbtn_attach(device_t parent, devic
gpio_pin_ctl(sc->sc_gpio, &sc->sc_map, N900LCKBTN_PIN_INPUT,
GPIO_PIN_INPUT);
- sc->sc_intr = intr_establish(N900LCKBTN_GPIO_BASE + ga->ga_offset,
- IPL_VM, IST_EDGE_BOTH, n900lckbtn_intr, sc);
+ sc->sc_intr = intr_establish(ga->ga_intr, IPL_VM, IST_EDGE_BOTH,
+ n900lckbtn_intr, sc);
if (sc->sc_intr == NULL) {
aprint_error(": couldn't establish interrupt\n");
gpio_pin_unmap(sc->sc_gpio, &sc->sc_map);