OSL_IRQ_FUNC(static irqreturn_t,adp_timer_handler,irq,para)
{
	u32 ret_value = 0;
	u32 timer_id_phy;
	struct adp_timer_control *pAdp_timer_control;

	pAdp_timer_control = (struct adp_timer_control *)para;
	/* performance with divide operation is low, had better save a pointer
	 * in structure adp_timer_control, which pointers to bsp_hardtimer_ctl
         */
	timer_id_phy = ((unsigned long)pAdp_timer_control - (unsigned long)adp_timer_ctrl)/sizeof(struct adp_timer_control);

	timer_callback_stamp_dbg(pAdp_timer_control);
	ret_value = bsp_hardtimer_int_status(timer_id_phy);
	if(0x0 !=ret_value)
	{
		bsp_hardtimer_int_clear(timer_id_phy);
		if(pAdp_timer_control->mode == TIMER_ONCE_COUNT)
		(void)bsp_hardtimer_disable(timer_id_phy);
		if(NULL!=pAdp_timer_control->routine)
		{
			pAdp_timer_control->routine(adp_timer_ctrl[timer_id_phy].args);
		}
	}

	return IRQ_HANDLED;
}
Ejemplo n.º 2
0
OSL_IRQ_FUNC(static irqreturn_t,adp_timer_handler,irq,para)
{
    u32 ret_value = 0;
    u32 timer_id_phy;
    timer_id_phy =(u32)para;
    timer_callback_stamp_dbg(timer_id_phy);
    ret_value = bsp_hardtimer_int_status(timer_id_phy);
    if(0x0 !=ret_value)
    {
        bsp_hardtimer_int_clear(timer_id_phy);
        if(adp_timer_ctrl[timer_id_phy].mode == TIMER_ONCE_COUNT)
            (void)bsp_hardtimer_disable(timer_id_phy);
        if(NULL!=adp_timer_ctrl[timer_id_phy].routine)
        {
            adp_timer_ctrl[timer_id_phy].routine(adp_timer_ctrl[timer_id_phy].args);
        }
    }

    return IRQ_HANDLED;
}
OSL_IRQ_FUNC(static irqreturn_t,adp_timer_handler,irq,para)
{
	u32 ret_value = 0;
	u32 timer_id_phy;
	timer_id_phy =(u32)para;
	timer_callback_stamp_dbg(timer_id_phy);
	#ifdef K3_TIMER_FEATURE
	/*k3 形态,modem侧8个timer,timer枚举号大于8个的,自动调用k3接口*/
		if(timer_id_phy >= 8)
			ret_value = bsp_hardtimer_int_status_k3(timer_id_phy);
		else
	ret_value = bsp_hardtimer_int_status(timer_id_phy);
	#else
		ret_value = bsp_hardtimer_int_status(timer_id_phy);
	#endif
	if(0x0 !=ret_value)
	{
		#ifdef K3_TIMER_FEATURE
			if(timer_id_phy >= 8)
				bsp_hardtimer_int_clear_k3(timer_id_phy);
			else
				bsp_hardtimer_int_clear(timer_id_phy);
		#else
			bsp_hardtimer_int_clear(timer_id_phy);
			if(adp_timer_ctrl[timer_id_phy].mode == TIMER_ONCE_COUNT)
				(void)bsp_hardtimer_disable(timer_id_phy);
		#endif
		if(NULL!=adp_timer_ctrl[timer_id_phy].routine)
		{
			/*lint -save -e522*/
			adp_timer_ctrl[timer_id_phy].routine(adp_timer_ctrl[timer_id_phy].args);
			/*lint -restore +e522*/
		}
	}
	return IRQ_HANDLED;
}