/**
@brief		shmem-specific interrupt handler for MCU_IPC interrupt

1) Gets a free snapshot slot.\n
2) Reads the RXQ status and saves the status to the free mst slot.\n
3) Invokes mem_irq_handler that is common to all memory-type interfaces.\n

@param data	the pointer to a mem_link_device instance
*/
static void shmem_irq_handler(void *data)
{
	struct mem_link_device *mld = (struct mem_link_device *)data;
	struct mst_buff *msb;

	msb = mem_take_snapshot(mld, RX);
	if (!msb)
		return;

	mem_irq_handler(mld, msb);
}
/**
@brief	interrupt handler for a MIPI-LLI IPC interrupt

1) Get a free mst buffer\n
2) Reads the RXQ status and saves the status to the mst buffer\n
3) Saves the interrupt value to the mst buffer\n
4) Invokes mem_irq_handler that is common to all memory-type interfaces\n

@param data	the pointer to a mem_link_device instance
@param intr	the interrupt value
*/
static void lli_irq_handler(void *data, u32 intr)
{
	struct mem_link_device *mld = (struct mem_link_device *)data;
	struct mst_buff *msb;

	/* Prohibit CP from going to sleep */
	if (gpio_get_value(mld->gpio_cp_status) == 0
	    || gpio_get_value(mld->gpio_ap_status) == 0)
		print_pm_status(mld);

	msb = mem_take_snapshot(mld, RX);
	if (!msb)
		return;
	msb->snapshot.int2ap = (u16)intr;

	mem_irq_handler(mld, msb);
}
예제 #3
0
/**
@brief	interrupt handler for a MIPI-LLI IPC interrupt

1) Get a free mst buffer\n
2) Reads the RXQ status and saves the status to the mst buffer\n
3) Saves the interrupt value to the mst buffer\n
4) Invokes mem_irq_handler that is common to all memory-type interfaces\n

@param data	the pointer to a mem_link_device instance
@param intr	the interrupt value
*/
static void lli_irq_handler(void *data, enum mipi_lli_event event, u32 intr)
{
    struct mem_link_device *mld = (struct mem_link_device *)data;
    struct mst_buff *msb;

    if (event == LLI_EVENT_SIG) {

        msb = mem_take_snapshot(mld, RX);
        if (!msb)
            return;
        msb->snapshot.int2ap = (u16)intr;

        mem_irq_handler(mld, msb);
    } else {
        struct link_device *ld = &mld->link_dev;
        struct modem_link_pm *pm = &ld->pm;

        check_lli_irq(pm, event);
    }
}