linux/drivers/net/ethernet/ti/davinci_emac.c
/**
 * emac_int_disable - Disable EMAC module interrupt (from adapter)
 * @priv: The DaVinci EMAC private adapter structure
 *
 * Disable EMAC interrupt on the adapter
 *
 */
Disable EMAC module interrupt (from adapter)
@priv: The DaVinci EMAC private adapter structure

Disable EMAC interrupt on the adapter
Disable EMAC module interrupt ( from adapter ) @priv : The DaVinci EMAC private adapter structure Disable EMAC interrupt on the adapter
static void emac_int_disable(struct emac_priv *priv)
{
	if (priv->version == EMAC_VERSION_2) {
		unsigned long flags;
		local_irq_save(flags);
		emac_ctrl_write(EMAC_DM646X_CMRXINTEN, 0x0);
		emac_ctrl_write(EMAC_DM646X_CMTXINTEN, 0x0);
		if (priv->int_disable)
			priv->int_disable();
		emac_write(EMAC_DM646X_MACEOIVECTOR,
			EMAC_DM646X_MAC_EOI_C0_RXEN);
		emac_write(EMAC_DM646X_MACEOIVECTOR,
			EMAC_DM646X_MAC_EOI_C0_TXEN);
		local_irq_restore(flags);
	} else {
		emac_ctrl_write(EMAC_CTRL_EWCTL, 0x0);
	}
}
static void emac_int_disable ( struct emac_priv * priv ) { if ( priv -> version == EMAC_VERSION_2 ) { unsigned long flags ; local_irq_save ( flags ) ; emac_ctrl_write ( EMAC_DM646X_CMRXINTEN , 0x0 ) ; emac_ctrl_write ( EMAC_DM646X_CMTXINTEN , 0x0 ) ; if ( priv -> int_disable ) priv -> int_disable ( ) ; emac_write ( EMAC_DM646X_MACEOIVECTOR , EMAC_DM646X_MAC_EOI_C0_RXEN ) ; emac_write ( EMAC_DM646X_MACEOIVECTOR , EMAC_DM646X_MAC_EOI_C0_TXEN ) ; local_irq_restore ( flags ) ; } else { emac_ctrl_write ( EMAC_CTRL_EWCTL , 0x0 ) ; } }
emac_int_disable - Disable EMAC module interrupt (from adapter)
 @priv: The DaVinci EMAC private adapter structure
emac_int_disable - Disable EMAC module interrupt ( from adapter ) @priv : The DaVinci EMAC private adapter structure
/* Program C0_Int_En to zero to turn off
		* interrupts to the CPU */ /* NOTE: Rx Threshold and Misc interrupts are not disabled */ /* NOTE: Rx Threshold and Misc interrupts are not enabled */ /* ack rxen only then a new pulse will be generated */ /* ack txen- only then a new pulse will be generated */ /* Set DM644x control registers for interrupt control */