当前位置: 首页>>代码示例>>C++>>正文


C++ set_irq_chained_handler函数代码示例

本文整理汇总了C++中set_irq_chained_handler函数的典型用法代码示例。如果您正苦于以下问题:C++ set_irq_chained_handler函数的具体用法?C++ set_irq_chained_handler怎么用?C++ set_irq_chained_handler使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了set_irq_chained_handler函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: mpic_init_IRQ

static void __init mpic_init_IRQ(void)
{
	struct device_node *dn;
	struct mpic *mpic;
	unsigned int virq;

	for (dn = NULL;
	     (dn = of_find_node_by_name(dn, "interrupt-controller"));) {
		if (!of_device_is_compatible(dn, "CBEA,platform-open-pic"))
			continue;

		/* The MPIC driver will get everything it needs from the
		 * device-tree, just pass 0 to all arguments
		 */
		mpic = mpic_alloc(dn, 0, 0, 0, 0, " MPIC     ");
		if (mpic == NULL)
			continue;
		mpic_init(mpic);

		virq = irq_of_parse_and_map(dn, 0);
		if (virq == NO_IRQ)
			continue;

		printk(KERN_INFO "%s : hooking up to IRQ %d\n",
		       dn->full_name, virq);
		set_irq_data(virq, mpic);
		set_irq_chained_handler(virq, cell_mpic_cascade);
	}
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:29,代码来源:setup.c

示例2: sapphire_init_gpio

int sapphire_init_gpio(void)
{
	int i;
	if (!machine_is_sapphire())
		return 0;

	DBG("%d,%d\r\n",SAPPHIRE_INT_START, SAPPHIRE_INT_END);
	DBG("NR_MSM_IRQS=%d, NR_GPIO_IRQS=%d\r\n", NR_MSM_IRQS, NR_GPIO_IRQS);
	for(i = SAPPHIRE_INT_START; i <= SAPPHIRE_INT_END; i++) {
		set_irq_chip(i, &sapphire_gpio_irq_chip);
		set_irq_handler(i, handle_edge_irq);
		set_irq_flags(i, IRQF_VALID);
	}

	register_gpio_chip(&sapphire_gpio_chip);
	register_gpio_chip(&sapphire_h2w_gpio_chip);

	/*setup CPLD INT connecting to SOC's gpio 17 */
	set_irq_type(MSM_GPIO_TO_INT(17), IRQF_TRIGGER_HIGH);
	set_irq_chained_handler(MSM_GPIO_TO_INT(17), sapphire_gpio_irq_handler);
	set_irq_wake(MSM_GPIO_TO_INT(17), 1);

	if(sysdev_class_register(&sapphire_sysdev_class) == 0)
		sysdev_register(&sapphire_irq_device);

	return 0;
}
开发者ID:Soaa-,项目名称:-lightspeed,代码行数:27,代码来源:board-sapphire-gpio.c

示例3: tx4927_irq_init

void __init tx4927_irq_init(void)
{
	mips_cpu_irq_init();
	txx9_irq_init(TX4927_IRC_REG & 0xfffffffffULL);
	set_irq_chained_handler(MIPS_CPU_IRQ_BASE + TX4927_IRC_INT,
				handle_simple_irq);
}
开发者ID:HappyASR,项目名称:LinuxKernel2.6.27,代码行数:7,代码来源:irq_tx4927.c

示例4: iq80310_init_irq

void __init iq80310_init_irq(void)
{
	volatile char *mask = (volatile char *)IQ80310_INT_MASK;
	unsigned int i;

	iop310_init_irq();

	/*
	 * Setup PIRSR to route PCI interrupts into xs80200
	 */
	*IOP310_PIRSR = 0xff;

	/*
	 * Setup the IRQs in the FE820000/FE860000 registers
	 */
	for (i = IQ80310_IRQ_OFS; i <= IRQ_IQ80310_INTD; i++) {
		set_irq_chip(i, &iq80310_irq_chip);
		set_irq_handler(i, do_level_IRQ);
		set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
	}

	/*
	 * Setup the PCI IRQs
	 */
	for (i = IRQ_IQ80310_INTA; i < IRQ_IQ80310_INTC; i++) {
		set_irq_chip(i, &ext_chip);
		set_irq_handler(i, do_level_IRQ);
		set_irq_flags(i, IRQF_VALID);
	}

	*mask = 0xff;  /* mask all sources */

	set_irq_chained_handler(IRQ_XS80200_EXTIRQ,
				&iq80310_cpld_irq_handler);
}
开发者ID:sarnobat,项目名称:knoppix,代码行数:35,代码来源:iq80310-irq.c

示例5: lh7a40x_init_board_irq

void __init lh7a40x_init_board_irq (void)
{
    int irq;

    for (irq = IRQ_KEV7A400_CPLD;
         irq < IRQ_KEV7A400_CPLD + NR_IRQ_BOARD; ++irq) {
        set_irq_chip (irq, &kev7a400_cpld_chip);
        set_irq_handler (irq, handle_edge_irq);
        set_irq_flags (irq, IRQF_VALID);
    }
    set_irq_chained_handler (IRQ_CPLD, kev7a400_cpld_handler);

        /* Clear all CPLD interrupts */
    CPLD_CL_INT = 0xff; /* CPLD_INTR_MMC_CD | CPLD_INTR_ETH_INT; */

    GPIO_GPIOINTEN = 0;        /* Disable all GPIO interrupts */
    barrier();

#if 0
    GPIO_INTTYPE1
        = (GPIO_INTR_PCC1_CD | GPIO_INTR_PCC1_CD); /* Edge trig. */
    GPIO_INTTYPE2 = 0;        /* Falling edge & low-level */
    GPIO_GPIOFEOI = 0xff;        /* Clear all GPIO interrupts */
    GPIO_GPIOINTEN = 0xff;        /* Enable all GPIO interrupts */

    init_FIQ();
#endif
}
开发者ID:274914765,项目名称:C,代码行数:28,代码来源:arch-kev7a400.c

示例6: versatile_init_irq

void __init versatile_init_irq(void)
{
	unsigned int i;

	vic_init(VA_VIC_BASE, IRQ_VIC_START, ~0);

	set_irq_chained_handler(IRQ_VICSOURCE31, sic_handle_irq);

	/* Do second interrupt controller */
	writel(~0, VA_SIC_BASE + SIC_IRQ_ENABLE_CLEAR);

	for (i = IRQ_SIC_START; i <= IRQ_SIC_END; i++) {
		if ((PIC_MASK & (1 << (i - IRQ_SIC_START))) == 0) {
			set_irq_chip(i, &sic_chip);
			set_irq_handler(i, do_level_IRQ);
			set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
		}
	}

	/*
	 * Interrupts on secondary controller from 0 to 8 are routed to
	 * source 31 on PIC.
	 * Interrupts from 21 to 31 are routed directly to the VIC on
	 * the corresponding number on primary controller. This is controlled
	 * by setting PIC_ENABLEx.
	 */
	writel(PIC_MASK, VA_SIC_BASE + SIC_INT_PIC_ENABLE);
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:28,代码来源:core.c

示例7: gef_pic_init

/*
 * Initialisation of PIC, this should be called in BSP
 */
void __init gef_pic_init(struct device_node *np)
{
    unsigned long flags;

    /* Map the devices registers into memory */
    gef_pic_irq_reg_base = of_iomap(np, 0);

    spin_lock_irqsave(&gef_pic_lock, flags);

    /* Initialise everything as masked. */
    out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_INTR_MASK, 0);
    out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU1_INTR_MASK, 0);

    out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU0_MCP_MASK, 0);
    out_be32(gef_pic_irq_reg_base + GEF_PIC_CPU1_MCP_MASK, 0);

    spin_unlock_irqrestore(&gef_pic_lock, flags);

    /* Map controller */
    gef_pic_cascade_irq = irq_of_parse_and_map(np, 0);
    if (gef_pic_cascade_irq == NO_IRQ) {
        printk(KERN_ERR "SBC610: failed to map cascade interrupt");
        return;
    }

    /* Setup an irq_host structure */
    gef_pic_irq_host = irq_alloc_host(np, IRQ_HOST_MAP_LINEAR,
                                      GEF_PIC_NUM_IRQS,
                                      &gef_pic_host_ops, NO_IRQ);
    if (gef_pic_irq_host == NULL)
        return;

    /* Chain with parent controller */
    set_irq_chained_handler(gef_pic_cascade_irq, gef_pic_cascade);
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:38,代码来源:gef_pic.c

示例8: ixdp2x01_init_irq

/*
 * We only do anything if we are the master NPU on the board.
 * The slave NPU only has the ethernet chip going directly to
 * the PCIB interrupt input.
 */
void __init ixdp2x01_init_irq(void)
{
	int irq = 0;

	/* initialize chip specific interrupts */
	ixp2000_init_irq();

	if (machine_is_ixdp2401())
		valid_irq_mask = IXDP2401_VALID_IRQ_MASK;
	else
		valid_irq_mask = IXDP2801_VALID_IRQ_MASK;

	/* Mask all interrupts from CPLD, disable simulation */
	ixp2000_reg_write(IXDP2X01_INT_MASK_SET_REG, 0xffffffff);
	ixp2000_reg_write(IXDP2X01_INT_SIM_REG, 0);

	for (irq = NR_IXP2000_IRQS; irq < NR_IXDP2X01_IRQS; irq++) {
		if (irq & valid_irq_mask) {
			set_irq_chip(irq, &ixdp2x01_irq_chip);
			set_irq_handler(irq, do_level_IRQ);
			set_irq_flags(irq, IRQF_VALID);
		} else {
			set_irq_flags(irq, 0);
		}
	}

	/* Hook into PCI interrupts */
	set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x01_irq_handler);
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:34,代码来源:ixdp2x01.c

示例9: xilinx_i8259_setup_cascade

static void __init xilinx_i8259_setup_cascade(void)
{
	struct device_node *cascade_node;
	int cascade_irq;

	/* Initialize i8259 controller */
	cascade_node = of_find_compatible_node(NULL, NULL, "chrp,iic");
	if (!cascade_node)
		return;

	cascade_irq = irq_of_parse_and_map(cascade_node, 0);
	if (!cascade_irq) {
		pr_err("virtex_ml510: Failed to map cascade interrupt\n");
		goto out;
	}

	i8259_init(cascade_node, 0);
	set_irq_chained_handler(cascade_irq, xilinx_i8259_cascade);

	/* Program irq 7 (usb/audio), 14/15 (ide) to level sensitive */
	/* This looks like a dirty hack to me --gcl */
	outb(0xc0, 0x4d0);
	outb(0xc0, 0x4d1);

 out:
	of_node_put(cascade_node);
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:27,代码来源:xilinx_intc.c

示例10: _mxc_expio_init

static int __init _mxc_expio_init(void)
{
	int i;

	initialized = 1;

	printk(KERN_INFO "MX31ADS EXPIO(CPLD) hardware\n");
	/*
	 * Configure INT line as GPIO input
	 */
	mxc_request_iomux(MX31_PIN_GPIO1_4, OUTPUTCONFIG_GPIO,
			  INPUTCONFIG_GPIO);
	mxc_set_gpio_direction(MX31_PIN_GPIO1_4, 1);

	/* disable the interrupt and clear the status */
	__raw_writew(0xFFFF, PBC_INTMASK_CLEAR_REG);
	__raw_writew(0xFFFF, PBC_INTSTATUS_REG);
	for (i = MXC_EXP_IO_BASE; i < (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES);
	     i++) {
		set_irq_chip(i, &expio_irq_chip);
		set_irq_handler(i, handle_level_irq);
		set_irq_flags(i, IRQF_VALID);
	}
	set_irq_type(EXPIO_PARENT_INT, IRQT_HIGH);
	set_irq_chained_handler(EXPIO_PARENT_INT, mxc_expio_irq_handler);

	return 0;
}
开发者ID:R0-Developers,项目名称:YP-R0_Kernel,代码行数:28,代码来源:mx31ads.c

示例11: s3c2412_irq_add

static int s3c2412_irq_add(struct sys_device *sysdev)
{
	unsigned int irqno;

	for (irqno = IRQ_EINT0; irqno <= IRQ_EINT3; irqno++) {
		set_irq_chip(irqno, &s3c2412_irq_eint0t4);
		set_irq_handler(irqno, handle_edge_irq);
		set_irq_flags(irqno, IRQF_VALID);
	}

	/* add demux support for CF/SDI */

	set_irq_chained_handler(IRQ_S3C2412_CFSDI, s3c2412_irq_demux_cfsdi);

	for (irqno = IRQ_S3C2412_SDI; irqno <= IRQ_S3C2412_CF; irqno++) {
		set_irq_chip(irqno, &s3c2412_irq_cfsdi);
		set_irq_handler(irqno, handle_level_irq);
		set_irq_flags(irqno, IRQF_VALID);
	}

	/* change RTC IRQ's set wake method */

	s3c2412_irq_rtc_chip = s3c_irq_chip;
	s3c2412_irq_rtc_chip.set_wake = s3c2412_irq_rtc_wake;

	set_irq_chip(IRQ_RTC, &s3c2412_irq_rtc_chip);

	return 0;
}
开发者ID:ForayJones,项目名称:iods,代码行数:29,代码来源:irq.c

示例12: at91_gpio_irq_setup

/* call this from board-specific init_irq */
void __init at91_gpio_irq_setup(unsigned banks)
{
	unsigned	pioc, pin, id;

	if (banks > 4)
		banks = 4;
	for (pioc = 0, pin = PIN_BASE, id = AT91C_ID_PIOA;
			pioc < banks;
			pioc++, id++) {
		struct pio_controller __iomem	*controller;
		unsigned			i;

		controller = (void __force __iomem *) pio_virt[pioc];
		__raw_writel(~0, &controller->idr);

		set_irq_data(id, (void *) pin);
		set_irq_chipdata(id, (void __force *) controller);

		for (i = 0; i < 32; i++, pin++) {
			set_irq_chip(pin, &gpio_irqchip);
			set_irq_handler(pin, do_simple_IRQ);
			set_irq_flags(pin, IRQF_VALID);
		}

		set_irq_chained_handler(id, gpio_irq_handler);

		/* enable the PIO peripheral clock */
		AT91_SYS->PMC_PCER = 1 << id;
	}
	pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, banks);
}
开发者ID:sisilet,项目名称:linux-imx21,代码行数:32,代码来源:gpio.c

示例13: neponset_probe

static int __devinit neponset_probe(struct platform_device *dev)
{
	sa1100_register_uart_fns(&neponset_port_fns);

	/*
	 * Install handler for GPIO25.
	 */
	set_irq_type(IRQ_GPIO25, IRQ_TYPE_EDGE_RISING);
	set_irq_chained_handler(IRQ_GPIO25, neponset_irq_handler);

	/*
	 * We would set IRQ_GPIO25 to be a wake-up IRQ, but
	 * unfortunately something on the Neponset activates
	 * this IRQ on sleep (ethernet?)
	 */
#if 0
	enable_irq_wake(IRQ_GPIO25);
#endif

	/*
	 * Setup other Neponset IRQs.  SA1111 will be done by the
	 * generic SA1111 code.
	 */
	set_irq_handler(IRQ_NEPONSET_SMC9196, handle_simple_irq);
	set_irq_flags(IRQ_NEPONSET_SMC9196, IRQF_VALID | IRQF_PROBE);
	set_irq_handler(IRQ_NEPONSET_USAR, handle_simple_irq);
	set_irq_flags(IRQ_NEPONSET_USAR, IRQF_VALID | IRQF_PROBE);

	/*
	 * Disable GPIO 0/1 drivers so the buttons work on the module.
	 */
	NCR_0 = NCR_GP01_OFF;

	return 0;
}
开发者ID:12019,项目名称:android_kernel_samsung_xcover,代码行数:35,代码来源:neponset.c

示例14: ixp23xx_init_irq

void __init ixp23xx_init_irq(void)
{
    int irq;

    /* Route everything to IRQ */
    *IXP23XX_INTR_SEL1 = 0x0;
    *IXP23XX_INTR_SEL2 = 0x0;
    *IXP23XX_INTR_SEL3 = 0x0;
    *IXP23XX_INTR_SEL4 = 0x0;

    /* Mask all sources */
    *IXP23XX_INTR_EN1 = 0x0;
    *IXP23XX_INTR_EN2 = 0x0;
    *IXP23XX_INTR_EN3 = 0x0;
    *IXP23XX_INTR_EN4 = 0x0;

    /*
     * Configure all IRQs for level-sensitive operation
     */
    for (irq = 0; irq <= NUM_IXP23XX_RAW_IRQS; irq++) {
        ixp23xx_config_irq(irq, IXP23XX_IRQ_LEVEL);
    }

    for (irq = IRQ_IXP23XX_INTA; irq <= IRQ_IXP23XX_INTB; irq++) {
        set_irq_chip(irq, &ixp23xx_pci_irq_chip);
        set_irq_handler(irq, handle_level_irq);
        set_irq_flags(irq, IRQF_VALID);
    }

    set_irq_chained_handler(IRQ_IXP23XX_PCI_INT_RPH, pci_handler);
}
开发者ID:274914765,项目名称:C,代码行数:31,代码来源:core.c

示例15: bast_irq_init

static __init int bast_irq_init(void)
{
	unsigned int i;

	if (machine_is_bast()) {
		printk(KERN_INFO "BAST PC104 IRQ routing, Copyright 2005 Simtec Electronics\n");

		/* zap all the IRQs */

		__raw_writeb(0x0, BAST_VA_PC104_IRQMASK);

		set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux);

		/* register our IRQs */

		for (i = 0; i < 4; i++) {
			unsigned int irqno = bast_pc104_irqs[i];

			set_irq_chip(irqno, &bast_pc104_chip);
			set_irq_handler(irqno, handle_level_irq);
			set_irq_flags(irqno, IRQF_VALID);
		}
	}

	return 0;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:26,代码来源:bast-irq.c


注:本文中的set_irq_chained_handler函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。