Deleted Added
full compact
macgpio.c (217065) macgpio.c (218184)
1/*-
2 * Copyright 2008 by Nathan Whitehorn. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
20 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
1/*-
2 * Copyright 2008 by Nathan Whitehorn. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 8 unchanged lines hidden (view full) ---

17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
20 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
21 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE.
24 *
25 * $FreeBSD: head/sys/powerpc/powermac/macgpio.c 217065 2011-01-06 20:19:01Z andreast $
25 * $FreeBSD: head/sys/powerpc/powermac/macgpio.c 218184 2011-02-02 05:58:51Z marcel $
26 */
27
28/*
29 * Driver for MacIO GPIO controller
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>

--- 152 unchanged lines hidden (view full) ---

186
187 resource_list_init(&dinfo->mdi_resources);
188
189 if (OF_getprop(child, "interrupts", &irq, sizeof(irq)) ==
190 sizeof(irq)) {
191 OF_searchprop(child, "interrupt-parent", &iparent,
192 sizeof(iparent));
193 resource_list_add(&dinfo->mdi_resources, SYS_RES_IRQ,
26 */
27
28/*
29 * Driver for MacIO GPIO controller
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>

--- 152 unchanged lines hidden (view full) ---

186
187 resource_list_init(&dinfo->mdi_resources);
188
189 if (OF_getprop(child, "interrupts", &irq, sizeof(irq)) ==
190 sizeof(irq)) {
191 OF_searchprop(child, "interrupt-parent", &iparent,
192 sizeof(iparent));
193 resource_list_add(&dinfo->mdi_resources, SYS_RES_IRQ,
194 0, INTR_VEC(iparent, irq), INTR_VEC(iparent, irq),
194 0, MAP_IRQ(iparent, irq), MAP_IRQ(iparent, irq),
195 1);
196 }
197
198 /* Fix messed-up offsets */
199 if (dinfo->gpio_num > 0x50)
200 dinfo->gpio_num -= 0x50;
201
202 cdev = device_add_child(dev, NULL, -1);

--- 161 unchanged lines hidden ---
195 1);
196 }
197
198 /* Fix messed-up offsets */
199 if (dinfo->gpio_num > 0x50)
200 dinfo->gpio_num -= 0x50;
201
202 cdev = device_add_child(dev, NULL, -1);

--- 161 unchanged lines hidden ---