ethdrivers,tx2: Disable MMC event counters These envent counters create interrupt storms if they are about to overflow. Disabling them from counting prevents this.
diff --git a/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c b/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c index 8e1d64a..7f57a2d 100644 --- a/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c +++ b/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.c
@@ -776,6 +776,8 @@ eqos->last_rx_desc = (d->rx_ring_phys + ((EQOS_DESCRIPTORS_RX) * (uintptr_t)(sizeof(struct eqos_desc)))); eqos->last_tx_desc = (d->tx_ring_phys + ((EQOS_DESCRIPTORS_TX) * (uintptr_t)(sizeof(struct eqos_desc)))); + /* Disable MMC event counters */ + *(uint32_t *)(eqos->regs + REG_DWCEQOS_ETH_MMC_CONTROL) |= REG_DWCEQOS_MMC_CNTFREEZ; return 0;
diff --git a/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.h b/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.h index dee4bcf..20e0098 100644 --- a/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.h +++ b/libethdrivers/src/plat/tx2/uboot/dwc_eth_qos.h
@@ -261,10 +261,13 @@ clock_sys_t *clock_sys; }; +#define REG_DWCEQOS_ETH_MMC_CONTROL 0x0700 +#define REG_DWCEQOS_MMC_CNTFREEZ BIT(3) + #define REG_DWCEQOS_DMA_CH0_STA 0x1160 #define DWCEQOS_DMA_IS_DC0IS BIT(0) #define DWCEQOS_DMA_IS_MTLIS BIT(16) -#define DWCEQOS_DMA_IS_MACIS BIT(17) +#define DWCEQOS_DDWCEQOSMA_IS_MACIS BIT(17) #define DWCEQOS_DMA_CH0_IS_TI BIT(0) #define DWCEQOS_DMA_CH0_IS_RI BIT(6) #define DWCEQOS_MAC_IS_MMC_INT BIT(8)