subr_intr.c (297676) | subr_intr.c (298738) |
---|---|
1/*- 2 * Copyright (c) 2015-2016 Svatopluk Kraus 3 * Copyright (c) 2015-2016 Michal Meloun 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2015-2016 Svatopluk Kraus 3 * Copyright (c) 2015-2016 Michal Meloun 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/kern/subr_intr.c 297676 2016-04-07 15:16:33Z skra $"); | 29__FBSDID("$FreeBSD: head/sys/kern/subr_intr.c 298738 2016-04-28 12:03:22Z mmel $"); |
30 31/* 32 * New-style Interrupt Framework 33 * 34 * TODO: - to support IPI (PPI) enabling on other CPUs if already started 35 * - to complete things for removable PICs 36 */ 37 --- 553 unchanged lines hidden (view full) --- 591 ddata->idd_data.type = INTR_MAP_DATA_FDT; 592 ddata->idd_data.fdt.ncells = ncells; 593 ddata->idd_data.fdt.cells = (pcell_t *)(ddata + 1); 594 memcpy(ddata->idd_data.fdt.cells, cells, cellsize); 595 return (ddata->idd_irq); 596} 597#endif 598 | 30 31/* 32 * New-style Interrupt Framework 33 * 34 * TODO: - to support IPI (PPI) enabling on other CPUs if already started 35 * - to complete things for removable PICs 36 */ 37 --- 553 unchanged lines hidden (view full) --- 591 ddata->idd_data.type = INTR_MAP_DATA_FDT; 592 ddata->idd_data.fdt.ncells = ncells; 593 ddata->idd_data.fdt.cells = (pcell_t *)(ddata + 1); 594 memcpy(ddata->idd_data.fdt.cells, cells, cellsize); 595 return (ddata->idd_irq); 596} 597#endif 598 |
599/* 600 * Store GPIO interrupt decription in framework and return unique interrupt 601 * number (resource handle) associated with it. 602 */ 603u_int 604intr_gpio_map_irq(device_t dev, u_int pin_num, u_int pin_flags, u_int intr_mode) 605{ 606 struct intr_dev_data *ddata; 607 608 ddata = intr_ddata_alloc(0); 609 if (ddata == NULL) 610 return (0xFFFFFFFF); /* no space left */ 611 612 ddata->idd_dev = dev; 613 ddata->idd_data.type = INTR_MAP_DATA_GPIO; 614 ddata->idd_data.gpio.gpio_pin_num = pin_num; 615 ddata->idd_data.gpio.gpio_pin_flags = pin_flags; 616 ddata->idd_data.gpio.gpio_intr_mode = intr_mode; 617 return (ddata->idd_irq); 618} 619 |
|
599#ifdef INTR_SOLO 600/* 601 * Setup filter into interrupt source. 602 */ 603static int 604iscr_setup_filter(struct intr_irqsrc *isrc, const char *name, 605 intr_irq_filter_t *filter, void *arg, void **cookiep) 606{ --- 664 unchanged lines hidden --- | 620#ifdef INTR_SOLO 621/* 622 * Setup filter into interrupt source. 623 */ 624static int 625iscr_setup_filter(struct intr_irqsrc *isrc, const char *name, 626 intr_irq_filter_t *filter, void *arg, void **cookiep) 627{ --- 664 unchanged lines hidden --- |