*MBOX_IGU1_ISRC = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
*MBOX_IGU1_IER = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
- enable_irq(PPE_MAILBOX_IGU1_INT);
+ enable_irq(g_atm_priv_data.irq);
}
/* set port */
/* disable irq */
if ( g_atm_priv_data.conn_table == 0 )
- disable_irq(PPE_MAILBOX_IGU1_INT);
+ disable_irq(g_atm_priv_data.irq);
/* release bandwidth */
switch ( vcc->qos.txtp.traffic_class )
else if (*MBOX_IGU1_ISR >> (FIRST_QSB_QID + 16)) /* TX queue */
tasklet_schedule(&g_dma_tasklet);
else
- enable_irq(PPE_MAILBOX_IGU1_INT);
+ enable_irq(g_atm_priv_data.irq);
}
static irqreturn_t mailbox_irq_handler(int irq, void *dev_id)
if ( !*MBOX_IGU1_ISR )
return IRQ_HANDLED;
- disable_irq_nosync(PPE_MAILBOX_IGU1_INT);
+ disable_irq_nosync(g_atm_priv_data.irq);
tasklet_schedule(&g_dma_tasklet);
return IRQ_HANDLED;
}
}
+ g_atm_priv_data.irq = platform_get_irq(pdev, 0);
+ if (g_atm_priv_data.irq < 0) {
+ pr_err("platform_get_irq fail");
+ goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
+ }
+
/* register interrupt handler */
- ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, 0, "atm_mailbox_isr", &g_atm_priv_data);
+ ret = request_irq(g_atm_priv_data.irq, mailbox_irq_handler, 0, "atm_mailbox_isr", &g_atm_priv_data);
if ( ret ) {
if ( ret == -EBUSY ) {
pr_err("IRQ may be occupied by other driver, please reconfig to disable it.\n");
} else {
- pr_err("request_irq fail irq:%d\n", PPE_MAILBOX_IGU1_INT);
+ pr_err("request_irq fail irq:%d\n", g_atm_priv_data.irq);
}
goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
}
- disable_irq(PPE_MAILBOX_IGU1_INT);
+ disable_irq(g_atm_priv_data.irq);
ret = ops->start(0);
return 0;
PP32_START_FAIL:
- free_irq(PPE_MAILBOX_IGU1_INT, &g_atm_priv_data);
+ free_irq(g_atm_priv_data.irq, &g_atm_priv_data);
REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL:
ATM_DEV_REGISTER_FAIL:
while ( port_num-- > 0 )
ops->stop(0);
- free_irq(PPE_MAILBOX_IGU1_INT, &g_atm_priv_data);
+ free_irq(g_atm_priv_data.irq, &g_atm_priv_data);
for ( port_num = 0; port_num < ATM_PORT_NUMBER; port_num++ )
atm_dev_deregister(g_atm_priv_data.port[port_num].dev);