title: MT7621 Soc Crypto Engine - IRQ not mapped
body: <p>I am using the latest Openwrt trunk firmware (kernel 4.3) and have successfully compiled the driver for its CryptoEngine, an internal ipsec accelerator of MT7621 Soc (which as far as I understood is on an internal bus called AMBA / APB). </p>
  
  <p>The driver seems to work (CryptoEngine gets configured successfully by sending and receiving packets, so it does "react" on memory mapped registers).</p>
  
  <p>However the driver is unable to hook up the irq (so it works only in polling mode), because request_irq always fails with error code 89 (EDESTADDRREQ Destination address required) on IRQ 19 (driver log does not give any error before) and I can't understand why (I am not a linux device driver expert, just a basic understanding, let's say that I managed to recompile the driver). </p>
  
  <p>Any idea why this happens ? Could it be a problem with the board dts file ? Here follows the dmesg log and a link to the dts files used (<a href="http://pastebin.com/T5VDtEK5" rel="nofollow">Dmesg Log</a> too long to include, Soc dtsi (dev.openwrt.org/browser/trunk/target/linux/ramips/dts/mt7621.dtsi) and <a href="https://dev.openwrt.org/browser/trunk/target/linux/ramips/dts/WITI.dts" rel="nofollow">Board dts</a>))</p>
  
  <p>CryptoEngine memory map 0x1E004000-0x1E004FFF </p>
  
  <blockquote>
    <p><BR/>
    root@OpenWrt:/# lspci<BR/>
    00:00.0 PCI bridge: Device 0e8d:0801 (rev 01)<BR/>
    00:01.0 PCI bridge: Device 0e8d:0801 (rev 01)<BR/>
    00:02.0 PCI bridge: Device 0e8d:0801 (rev 01)<BR/>
    01:00.0 Network controller: MEDIATEK Corp. MT7662E 802.11ac PCI Express Wireless Network Adapter<BR/>
    02:00.0 Network controller: MEDIATEK Corp. MT7662E 802.11ac PCI Express Wireless Network Adapter<BR/>
    03:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01)<BR/>
    <BR/>
    root@OpenWrt:/# cat /proc/interrupts<BR/>
              CPU0       CPU1       CPU2       CPU3<BR/>
     8:      63126      63253      63143      63987  MIPS GIC Local   1  timer<BR/>
    10:       1513          0          0          0  MIPS GIC  10  1e100000.ethernet<BR/>
    11:          2          0          0          0  MIPS GIC  11  mt76pci<BR/>
    29:          0          0          0          0  MIPS GIC  29  xhci-hcd:usb1<BR/>
    31:          2          0          0          0  MIPS GIC  31  mt76pci<BR/>
    33:       7976          0          0          0  MIPS GIC  33  serial<BR/>
    63:       1178          0          0          0  MIPS GIC  63  IPI call<BR/>
    64:          0       1305          0          0  MIPS GIC  64  IPI call<BR/>
    65:          0          0       1257          0  MIPS GIC  65  IPI call<BR/>
    66:          0          0          0       1087  MIPS GIC  66  IPI call<BR/>
    67:     144709          0          0          0  MIPS GIC  67  IPI resched<BR/>
    68:          0      25822          0          0  MIPS GIC  68  IPI resched<BR/>
    69:          0          0      97134          0  MIPS GIC  69  IPI resched<BR/>
    70:          0          0          0      43037  MIPS GIC  70  IPI resched<BR/>
    <BR/>
    root@OpenWrt:/# cat /proc/ioports<BR/>
    ffffffff-ffffffff : /pcie@1e140000<BR/></p>
  </blockquote>