| /linux/tools/testing/selftests/kvm/arm64/ |
| H A D | vgic_irq.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * vgic_irq.c - Test userspace injection of IRQs 5 * This test validates the injection of IRQs from userspace using various 27 u32 nr_irqs; /* number of KVM supported IRQs. */ 37 * 0x00 (highest priority) - 0xF8 (lowest priority), in steps of 8 45 #define LOWEST_PRIO (KVM_NUM_PRIOS - 1) 47 #define IRQ_DEFAULT_PRIO (LOWEST_PRIO - 1) 68 u32 num; member 75 u32 num, int level, bool expect_failure); 81 #define _KVM_INJECT_MULTI(cmd, intid, num, expect_failure) \ argument [all …]
|
| /linux/drivers/gpio/ |
| H A D | gpio-reg.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * gpio-reg: single register individually fixed-direction GPIOs 19 #include <linux/gpio/gpio-reg.h> 28 const int *irqs; member 37 return r->direction & BIT(offset) ? GPIO_LINE_DIRECTION_IN : in gpio_reg_get_direction() 46 if (r->direction & BIT(offset)) in gpio_reg_direction_output() 47 return -ENOTSUPP; in gpio_reg_direction_output() 49 gc->set(gc, offset, value); in gpio_reg_direction_output() 57 return r->direction & BIT(offset) ? 0 : -ENOTSUPP; in gpio_reg_direction_input() 66 spin_lock_irqsave(&r->lock, flags); in gpio_reg_set() [all …]
|
| /linux/drivers/usb/gadget/udc/ |
| H A D | goku_udc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Toshiba TC86C001 ("Goku-S") USB Device Controller driver 5 * Copyright (C) 2000-2002 Lineo 12 * This device has ep0 and three semi-configurable bulk/interrupt endpoints. 14 * - Endpoint numbering is fixed: ep{1,2,3}-bulk 15 * - Gadget drivers can choose ep maxpacket (8/16/32/64) 16 * - Gadget drivers can choose direction (IN, OUT) 17 * - DMA works with ep1 (OUT transfers) and ep2 (IN transfers). 21 // #define USB_TRACE /* packet-level success messages */ 49 #define DRIVER_VERSION "30-Oct 2003" [all …]
|
| H A D | gr_udc.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 * - Andreas Larsson <andreas@gaisler.com> 15 * - Marko Isomaki 36 #include <linux/dma-mapping.h> 64 /* ---------------------------------------------------------------------- */ 93 int buflen = ep->is_in ? req->req.length : req->req.actual; in gr_dbgprint_request() 97 dev_dbg(ep->dev->dev, "%s: 0x%p, %d bytes data%s:\n", str, req, buflen, in gr_dbgprint_request() 100 rowlen, 4, req->req.buf, plen, false); in gr_dbgprint_request() 106 dev_vdbg(dev->dev, "REQ: %02x.%02x v%04x i%04x l%04x\n", in gr_dbgprint_devreq() 119 /* ---------------------------------------------------------------------- */ [all …]
|
| H A D | net2280.c | 1 // SPDX-License-Identifier: GPL-2.0+ 27 * Copyright (C) 2003-2005 PLX Technology, Inc. 28 * Copyright (C) 2014 Ricardo Ribalda - Qtechnology/AS 39 #include <linux/dma-mapping.h> 87 EP_INFO("ep-a", 89 EP_INFO("ep-b", 91 EP_INFO("ep-c", 93 EP_INFO("ep- 3095 u32 num, scratch; handle_stat0_irqs() local 3363 u32 tmp, num, mask, scratch; handle_stat1_irqs() local [all...] |
| /linux/drivers/base/ |
| H A D | platform.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * platform.c - platform 'pseudo' bus for legacy devices 5 * Copyright (c) 2002-3 Patrick Mochel 6 * Copyright (c) 2002-3 Open Source Development Labs 8 * Please see Documentation/driver-api/driver-model/platform.rst for more 20 #include <linux/dma-mapping.h> 28 #include <linux/clk/clk-conf.h> 34 #include <linux/dma-map-ops.h> 48 * platform_get_resource - get a resource for a device 51 * @num: resource index [all …]
|
| /linux/drivers/irqchip/ |
| H A D | irq-imgpdc.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright 2010-2013 Imagination Technologies Ltd. 66 * struct pdc_intc_priv - private pdc interrupt data. 71 * @domain: IRQ domain for PDC peripheral and syswake IRQs. 92 iowrite32(data, priv->pdc_base + reg_offs); in pdc_write() 98 return ioread32(priv->pdc_base + reg_offs); in pdc_read() 112 return hw - SYS0_HWIRQ; in hwirq_to_syswake() 122 return (struct pdc_intc_priv *)data->domain->host_data; in irqd_to_priv() 135 raw_spin_lock(&priv->lock); in perip_irq_mask() 136 priv->irq_route &= ~data->mask; in perip_irq_mask() [all …]
|
| H A D | irq-mbigen.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 /* 64 irqs (Pin0-pin63) are reserved for each mbigen chip */ 57 * struct mbigen_device - holds the information of mbigen device. 85 hwirq -= RESERVED_IRQ_PER_MBIGEN_CHIP; in get_mbigen_vec_reg() 97 hwirq -= RESERVED_IRQ_PER_MBIGEN_CHIP; in get_mbigen_type_reg() 118 void __iomem *base = data->chip_data; in mbigen_eoi_irq() 121 get_mbigen_clear_reg(data->hwirq, &mask, &addr); in mbigen_eoi_irq() 130 void __iomem *base = data->chip_data; in mbigen_set_type() 134 return -EINVAL; in mbigen_set_type() 136 get_mbigen_type_reg(data->hwirq, &mask, &addr); in mbigen_set_type() [all …]
|
| /linux/Documentation/devicetree/bindings/interrupt-controller/ |
| H A D | img,pdc-intc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/interrupt-controller/img,pdc-intc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - James Hogan <jhogan@kernel.org> 19 const: img,pdc-intc 24 interrupt-controller: true 26 '#interrupt-cells': 28 <1st-cell>: The interrupt-number that identifies the interrupt source. 29 0-7: Peripheral interrupts [all …]
|
| /linux/drivers/s390/cio/ |
| H A D | airq.c | 1 // SPDX-License-Identifier: GPL-2.0 36 * register_adapter_interrupt() - register adapter interrupt handler 39 * Returns 0 on success, or -EINVAL. 45 if (!airq->handler || airq->isc > MAX_ISC) in register_adapter_interrupt() 46 return -EINVAL; in register_adapter_interrupt() 47 if (!airq->lsi_ptr) { in register_adapter_interrupt() 48 airq->lsi_ptr = cio_dma_zalloc(1); in register_adapter_interrupt() 49 if (!airq->lsi_ptr) in register_adapter_interrupt() 50 return -ENOMEM; in register_adapter_interrupt() 51 airq->flags |= AIRQ_PTR_ALLOCATED; in register_adapter_interrupt() [all …]
|
| /linux/drivers/vdpa/solidrun/ |
| H A D | snet_main.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2022-2023 SolidRun 7 * Author: Alvaro Karsz <alvaro.karsz@solid-run.com> 42 if (likely(snet->cb.callback)) in snet_cfg_irq_hndlr() 43 return snet->cb.callback(snet->cb.private); in snet_cfg_irq_hndlr() 52 if (likely(vq->cb.callback)) in snet_vq_irq_hndlr() 53 return vq->cb.callback(vq->cb.private); in snet_vq_irq_hndlr() 60 struct psnet *psnet = snet->psnet; in snet_free_irqs() 64 /* Which Device allcoated the IRQs? */ in snet_free_irqs() 66 pdev = snet->pdev->physfn; in snet_free_irqs() [all …]
|
| H A D | snet_vdpa.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 5 * Copyright (C) 2022-2023 SolidRun 7 * Author: Alvaro Karsz <alvaro.karsz@solid-run.com> 18 #define SNET_ERR(pdev, fmt, ...) dev_err(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__) 19 #define SNET_WARN(pdev, fmt, ...) dev_warn(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__) 20 #define SNET_INFO(pdev, fmt, ...) dev_info(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__) 21 #define SNET_DBG(pdev, fmt, ...) dev_dbg(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__) 22 #define SNET_HAS_FEATURE(s, f) ((s)->negotiated_features & BIT_ULL(f)) 24 #define SNET_CFG_VER(snet, ver) ((snet)->psnet->negotiated_cfg_ver >= (ver)) 39 u32 num; member [all …]
|
| /linux/drivers/bcma/ |
| H A D | driver_gpio.c | 6 * Copyright 2012, Hauke Mehrtens <hauke@hauke-m.de> 103 .name = "BCMA-GPIO", 113 struct gpio_chip *gc = &cc->gpio; in bcma_gpio_irq_handler() 117 unsigned long irqs = (val ^ pol) & mask; in bcma_gpio_irq_handler() local 120 if (!irqs) in bcma_gpio_irq_handler() 123 for_each_set_bit(gpio, &irqs, gc->ngpio) in bcma_gpio_irq_handler() 124 generic_handle_domain_irq_safe(gc->irq.domain, gpio); in bcma_gpio_irq_handler() 125 bcma_chipco_gpio_polarity(cc, irqs, val & irqs); in bcma_gpio_irq_handler() 132 struct gpio_chip *chip = &cc->gpio; in bcma_gpio_irq_init() 133 struct gpio_irq_chip *girq = &chip->irq; in bcma_gpio_irq_init() [all …]
|
| /linux/drivers/i2c/busses/ |
| H A D | i2c-riic.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Copyright (C) 2013 Wolfram Sang <wsa@sang-engineering.com> 86 #define RIIC_INIT_MSG -1 106 const struct riic_irq_desc *irqs; member 134 writeb(val, riic->base + riic->info->regs[offset]); in riic_writeb() 139 return readb(riic->base + riic->info->regs[offset]); in riic_readb() 156 ret = readb_poll_timeout(riic->base + riic->info->regs[RIIC_ICCR2], val, in riic_bus_barrier() 157 !(val & ICCR2_BBSY), 10, riic->adapter.timeout); in riic_bus_barrier() 159 return i2c_recover_bus(&riic->adapter); in riic_bus_barrier() 163 return i2c_recover_bus(&riic->adapter); in riic_bus_barrier() [all …]
|
| /linux/include/linux/gpio/ |
| H A D | gpio-reg.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 13 int base, int num, const char *label, u32 direction, u32 def_out, 14 const char *const *names, struct irq_domain *irqdom, const int *irqs);
|
| /linux/drivers/thermal/qcom/ |
| H A D | tsens.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <linux/nvmem-consumer.h> 26 * struct tsens_irq_data - IRQ status and temperature violations 29 * @up_irq_mask: mask register for upper threshold irqs 30 * @up_irq_clear: clear register for uppper threshold irqs 33 * @low_irq_mask: mask register for lower threshold irqs 34 * @low_irq_clear: clear register for lower threshold irqs 37 * @crit_irq_mask: mask register for critical threshold irqs 38 * @crit_irq_clear: clear register for critical threshold irqs 81 if (priv->num_sensors > MAX_SENSORS) in tsens_read_calibration() [all …]
|
| /linux/arch/arm/mach-sa1100/ |
| H A D | neponset.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * linux/arch/arm/mach-sa1100/neponset.c 7 #include <linux/gpio/gpio-reg.h> 20 #include <asm/mach-types.h> 28 #include <mach/irqs.h> 85 .dev_id = "sa11x0-uart.1", 87 GPIO_LOOKUP("neponset-mdm-ctl0", 2, "rts", GPIO_ACTIVE_LOW), 88 GPIO_LOOKUP("neponset-mdm-ctl0", 3, "dtr", GPIO_ACTIVE_LOW), 89 GPIO_LOOKUP("neponset-mdm-ctl1", 3, "cts", GPIO_ACTIVE_LOW), 90 GPIO_LOOKUP("neponset-mdm-ctl1", 4, "dsr", GPIO_ACTIVE_LOW), [all …]
|
| /linux/arch/arm64/boot/dts/freescale/ |
| H A D | imx8-ss-img.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Copyright 2019-2021 NXP 6 img_ipg_clk: clock-img-ipg { 7 compatible = "fixed-clock"; 8 #clock-cells = <0>; 9 clock-frequency = <200000000>; 10 clock-output-names = "img_ipg_clk"; 13 img_pxl_clk: clock-img-pxl { 14 compatible = "fixed-clock"; 15 #clock-cells = <0>; [all …]
|
| H A D | imx8qm-ss-lvds.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 9 clock-indices = <IMX_LPCG_CLK_4>; 15 clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>; 21 clock-indices = <IMX_LPCG_CLK_0>, <IMX_LPCG_CLK_4>; 35 interrupt-parent = <&irqsteer_lvds0>; 37 irqsteer_lvds0: interrupt-controller@56240000 { 38 compatible = "fsl,imx8qm-irqsteer", "fsl,imx-irqsteer"; 41 interrupt-controller; 42 interrupt-parent = <&gic>; 43 #interrupt-cells = <1>; [all …]
|
| /linux/drivers/vdpa/octeon_ep/ |
| H A D | octep_vdpa_main.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 #include <linux/io-64-nonatomic-lo-hi.h> 44 return oct_vdpa->oct_hw; in vdpa_to_octep_hw() 54 * round-robin fashion. in octep_vdpa_intr_handler() 57 * 0 -> 0, 8, 16, 24, 32, 40, 48, 56; in octep_vdpa_intr_handler() 58 * 1 -> 1, 9, 17, 25, 33, 41, 49, 57; in octep_vdpa_intr_handler() 60 * 7 -> 7, 15, 23, 31, 39, 47, 55, 63; in octep_vdpa_intr_handler() 63 for (i = irq - oct_hw->irqs[0]; i < oct_hw->nr_vring; i += oct_hw->nb_irqs) { in octep_vdpa_intr_handler() 64 if (ioread8(oct_hw->vqs[i].cb_notify_addr)) { in octep_vdpa_intr_handler() 66 iowrite8(0, oct_hw->vqs[i].cb_notify_addr); in octep_vdpa_intr_handler() [all …]
|
| /linux/drivers/pcmcia/ |
| H A D | pcmcia_resource.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * PCMCIA 16-bit resource management functions 10 * Copyright (C) 2004-2010 Dominik Brodowski 39 if (s->resource_ops->validate_mem) in pcmcia_validate_mem() 40 return s->resource_ops->validate_mem(s); in pcmcia_validate_mem() 45 struct resource *pcmcia_find_mem_region(u_long base, u_long num, u_long align, in pcmcia_find_mem_region() argument 48 if (s->resource_ops->find_mem) in pcmcia_find_mem_region() 49 return s->resource_ops->find_mem(base, num, align, low, s); in pcmcia_find_mem_region() 55 * release_io_space() - release IO ports allocated with alloc_io_space() 62 resource_size_t num = resource_size(res); in release_io_space() local [all …]
|
| /linux/arch/sparc/kernel/ |
| H A D | of_device_64.c | 1 // SPDX-License-Identifier: GPL-2.0 4 #include <linux/dma-mapping.h> 20 unsigned long ret = res->start + offset; in of_ioremap() 23 if (res->flags & IORESOURCE_MEM) in of_ioremap() 36 if (res->flags & IORESOURCE_MEM) in of_iounmap() 58 * parent as-is, not with the PCI translate in of_bus_pci_match() 113 /* Special exception, we can map a 64-bit address into in of_bus_pci_map() 114 * a 32-bit range. in of_bus_pci_map() 120 return -EINVAL; in of_bus_pci_map() 124 na - 1, ns)) in of_bus_pci_map() [all …]
|
| /linux/arch/powerpc/sysdev/ |
| H A D | mpic_timer.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 43 #define TIMER_OFFSET(num) (1 << (TIMERS_PER_GROUP - 1 - num)) argument 87 *time = (u64)div_u64(ticks, priv->timerfreq); in convert_ticks_to_time() 96 max_value = div_u64(ULLONG_MAX, priv->timerfreq); in convert_time_to_ticks() 99 return -EINVAL; in convert_time_to_ticks() 101 *ticks = (u64)time * (u64)priv->timerfreq; in convert_time_to_ticks() 113 unsigned int num; in detect_idle_cascade_timer() local 119 spin_lock_irqsave(&priv->lock, flags); in detect_idle_cascade_timer() 120 map = casc_priv->cascade_map & priv->idle; in detect_idle_cascade_timer() 121 if (map == casc_priv->cascade_map) { in detect_idle_cascade_timer() [all …]
|
| /linux/arch/arm/boot/dts/nxp/imx/ |
| H A D | imx7d.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ OR MIT 7 #include <dt-bindings/reset/imx7-reset.h> 18 clock-frequency = <996000000>; 19 operating-points-v2 = <&cpu0_opp_table>; 20 #cooling-cells = <2>; 21 nvmem-cells = <&fuse_grade>; 22 nvmem-cell-names = "speed_grade"; 26 compatible = "arm,cortex-a7"; 29 clock-frequency = <996000000>; 30 operating-points-v2 = <&cpu0_opp_table>; [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | pci_irq.c | 1 // SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB 21 /* min num of vectors for SFs to be enabled */ 52 return mlx5_core_ec_vf_vport_base(dev) + func - 1; in mlx5_core_func_to_vport() 56 * mlx5_get_default_msix_vec_count - Get the default number of MSI-X vectors 72 /* Limit maximum number of MSI-X vectors so the default configuration in mlx5_get_default_msix_vec_count() 74 * the number of vectors in a VF without having to first size-down other in mlx5_get_default_msix_vec_count() 81 * mlx5_set_msix_vec_count - Set dynamically allocated MSI-X on the VF 84 * @msix_vec_count: Number of MSI-X vectors to set 102 return -EOPNOTSUPP; in mlx5_set_msix_vec_count() 108 return -EINVAL; in mlx5_set_msix_vec_count() [all …]
|