Example #1
0
void msm_mpm_exit_sleep(bool from_idle)
{
	unsigned long pending;
	int i;
	int k;

	for (i = 0; i < MSM_MPM_REG_WIDTH; i++) {
		pending = msm_mpm_read(MSM_MPM_STATUS_REG_PENDING, i);

		if ((MSM_MPM_DEBUG_PENDING_IRQ & msm_mpm_debug_mask) ||
			((!from_idle) && (MSM_MPM_DEBUG_SUSPEND_PENDING_IRQ & msm_mpm_debug_mask)))
			pr_info("%s: pending.%d: 0x%08lx\n", __func__,
				i, pending);

		k = find_first_bit(&pending, 32);
		while (k < 32) {
			unsigned int mpm_irq = 32 * i + k;
			unsigned int apps_irq = msm_mpm_get_irq_m2a(mpm_irq);
			struct irq_desc *desc = apps_irq ?
						irq_to_desc(apps_irq) : NULL;

			/*
			 * This function is called when only CPU 0 is
			 * running and when both preemption and irqs
			 * are disabled.  There is no need to lock desc.
			 */
			if (desc && (desc->status & IRQ_TYPE_EDGE_BOTH)) {
				desc->status |= IRQ_PENDING;
				if (from_idle)
					check_irq_resend(desc, apps_irq);
			}

			k = find_next_bit(&pending, 32, k + 1);
		}
	}

	msm_mpm_set(!from_idle);
}
Example #2
0
void msm_mpm_enter_sleep(bool from_idle)
{
	msm_mpm_set(!from_idle);
}
void msm_mpm_enter_sleep(uint32_t sclk_count, bool from_idle)
{
	msm_mpm_set(!from_idle);
}