GPIO INTR FIX for HTCLEO

. Cotulla Cotulla at yandex.ru
Tue Jun 29 02:16:23 CEST 2010


In current kernel (htc-msm-2.6.32) GPIO interrupts are not working.
Symptoms: After request_irq() call, hardware interrupt cause system to hang fully (cursor stop blink).
Root case: Incorrect settings of SIRS and interrupt not handled, so it try to handle it infinite.
Fix: 
In file sirc.c in function "msm_init_sirc()" you need to add following lines at start:

	writel(0, sirc_regs.int_enable);
	writel(0, sirc_regs.int_enable_clear);
	writel(0, sirc_regs.int_enable_set);
	writel(0, sirc_regs.int_type);
	writel(0, sirc_regs.int_polarity);
	writel(0, sirc_regs.int_clear);

	writel(0, (void*)SPSS_SIRC_INT_SELECT);
	writel(0, (void*)SPSS_SIRC_RAW_STATUS);
	writel(0, (void*)SPSS_SIRC_IRQ_STATUS);
	writel(0, (void*)SPSS_SIRC_IRQ1_STATUS);

This force CPU SIRC state like after bootloader. 

Suggestion: Move clear code to Haret.



-Cotulla



More information about the Mobile-linux-discuss mailing list