1 // SPDX-License-Identifier: GPL-2.0
3 * SDK7786 FPGA IRQ Controller Support.
5 * Copyright (C) 2010 Matt Fleming
6 * Copyright (C) 2010 Paul Mundt
23 CRYSTAL_FAIL_BIT
= 12,
27 void __init
sdk7786_init_irq(void)
31 /* Enable priority encoding for all IRLs */
32 fpga_write_reg(fpga_read_reg(INTMSR
) | 0x0303, INTMSR
);
34 /* Clear FPGA interrupt status registers */
35 fpga_write_reg(0x0000, INTASR
);
36 fpga_write_reg(0x0000, INTBSR
);
38 /* Unmask FPGA interrupts */
39 tmp
= fpga_read_reg(INTAMR
);
40 tmp
&= ~(1 << ETH_IRQ_BIT
);
41 fpga_write_reg(tmp
, INTAMR
);
43 plat_irq_setup_pins(IRQ_MODE_IRL7654_MASK
);
44 plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK
);