- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a problem, return to the -22 error in the request_irq function call.
Register interrupt device is the FPGA side PushButton, offset address is 0x000100c0 The following is the content of the button_pio device tree. The priority of button_pio is FPGA_IRQ5,Find in Handbook, The 77 is the corresponding interrupt number(#define FPGA_BUTTON_DSR_IRQ 77). button_pio: gpio@0x1000100C0 {compatible = "ALTR,pio-13.1", "ALTR,pio-1.0", "altr,pio-1.0"; reg = < 0x00000001 0x000100C0 0x00000010 >; interrupt-parent = < &hps_0_arm_gic_0 >; interrupts = < 0 45 1 >; width = < 2 >; /* embeddedsw.dts.params.width type NUMBER */ resetvalue = < 0 >; /* embeddedsw.dts.params.resetvalue type NUMBER */ edge_type = < 1 >; /* embeddedsw.dts.params.edge_type type NUMBER */ level_trigger = < 0 >; /* embeddedsw.dts.params.level_trigger type NUMBER */ #gpio-cells = < 2 >; gpio-controller; The following is the driver code. writel(pst_pio->np_pioedgecapture|0x1, &pst_pio->np_pioedgecapture); writel(pst_pio->np_piodirection&0xfffffffe, &pst_pio->np_piodirection); ret = request_irq(FPGA_BUTTON_DSR_IRQ, button_dsr_isr, IRQF_DISABLED, "button_dsr_fpga", (void*)(pst_dev)); if (ret != 0) { printk("button_dsr: unable to register interrupt %d\n", ret); return -1; } writel(pst_pio->np_piointerruptmask|1, &pst_pio->np_piointerruptmask); comment out "interrupts = < 0 45 1 >;" after successful registration, interrupt can also be normal response. what is the reason? If you have any ideas would be greatly appreciated.ThanksLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Help please! Somebody help me!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page