Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

static int spi_enable_interrupt ( struct mxc_spi master_data,
unsigned int  irqs 
) [static]

This function enables CSPI interrupt(s)

Parameters:
master_data the pointer to mxc_spi structure
irqs the irq(s) to set (can be a combination)
Returns:
This function returns 0 if successful, -1 otherwise.

Definition at line 467 of file mxc_spi.c.

Referenced by mxc_spi_transfer().

{
      if (irqs & ~((1 << master_data->spi_ver_def->intr_bit_shift) - 1)) {
            return -1;
      }

      __raw_writel((irqs | __raw_readl(MXC_CSPIINT + master_data->ctrl_addr)),
                 MXC_CSPIINT + master_data->ctrl_addr);
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index