]> git.sur5r.net Git - u-boot/commitdiff
armv8: ls2080ardb: invert irq pins polarity for AQR405 PHY
authorShaohui Xie <Shaohui.Xie@nxp.com>
Thu, 28 Jan 2016 07:38:15 +0000 (15:38 +0800)
committerYork Sun <york.sun@nxp.com>
Mon, 21 Mar 2016 19:42:10 +0000 (12:42 -0700)
To use AQR405 PHY's interrupt, we need to invert the relative IRQ pins
polarity by setting IRQCR register, because AQR405 interrupt is low
active but GIC accepts high active.

Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
arch/arm/include/asm/arch-fsl-layerscape/immap_lsch3.h
board/freescale/ls2080ardb/ls2080ardb.c
include/configs/ls2080ardb.h

index 91f3ce843ad492565afcac00307e9bd2a3425301..17c150ac8bb8ce2c97d1dbd7300989663f37cd76 100644 (file)
 #define DCFG_DCSR_BASE         0X700100000ULL
 #define DCFG_DCSR_PORCR1               0x000
 
+/* Interrupt Sampling Control */
+#define ISC_BASE               0x01F70000
+#define IRQCR_OFFSET           0x14
+
 /* Supplemental Configuration */
 #define SCFG_BASE              0x01fc0000
 #define SCFG_USB3PRM1CR                        0x000
index c63b639625051882edb00d108e14f5620f9a3ae9..12638dfb1420a2bb4f961809d47d86718245430a 100644 (file)
@@ -149,6 +149,7 @@ int board_init(void)
 {
        char *env_hwconfig;
        u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE;
+       u32 __iomem *irq_ccsr = (u32 __iomem *)ISC_BASE;
        u32 val;
 
        init_final_memctl_regs();
@@ -170,6 +171,9 @@ int board_init(void)
 
        QIXIS_WRITE(rst_ctl, QIXIS_RST_CTL_RESET_EN);
 
+       /* invert AQR405 IRQ pins polarity */
+       out_le32(irq_ccsr + IRQCR_OFFSET / 4, AQR405_IRQ_MASK);
+
        return 0;
 }
 
index b2c0181132aa3da0176b945cf4115af3c7f4a24d..14635b7d812a07ecf9458d71f19813b1f3269a95 100644 (file)
@@ -355,6 +355,7 @@ unsigned long get_board_sys_clk(void);
 #define AQ_PHY_ADDR2           0x01
 #define AQ_PHY_ADDR3           0x02
 #define AQ_PHY_ADDR4           0x03
+#define AQR405_IRQ_MASK                0x36
 
 #define CONFIG_MII
 #define CONFIG_ETHPRIME                "DPNI1"