/* Returns the all unmasked interrupt status after reading the DmaStatus register.  */
u32 synopGMAC_get_interrupt_type(synopGMACdevice *gmacdev)
/* Returns the all unmasked interrupt status after reading the DmaStatus register.  */
u32 synopGMAC_get_interrupt_type(synopGMACdevice *gmacdev)
{
    u32 data;
    u32 interrupts = 0;
    data = synopGMACReadReg(gmacdev->DmaBase, DmaStatus);
    synopGMACWriteReg(gmacdev->DmaBase, DmaStatus ,data);
        plat_delay(DEFAULT_LOOP_VARIABLE);
    if(data & DmaIntErrorMask)  interrupts |= synopGMACDmaError;
    if(data & DmaIntRxNormMask) interrupts |= synopGMACDmaRxNormal;
    if(data & DmaIntRxAbnMask)  interrupts |= synopGMACDmaRxAbnormal;
    if(data & DmaIntRxStoppedMask)  interrupts |= synopGMACDmaRxStopped;
    if(data & DmaIntTxNormMask) interrupts |= synopGMACDmaTxNormal;
    if(data & DmaIntTxAbnMask)  interrupts |= synopGMACDmaTxAbnormal;
    if(data & DmaIntTxStoppedMask)  interrupts |= synopGMACDmaTxStopped;
    return interrupts;
}