From: yangkai Date: Tue, 13 Nov 2012 09:56:07 +0000 (+0800) Subject: fix fiq infinite loop when otg id change X-Git-Tag: firefly_0821_release~8227 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=536cb2cbc8a692f3c6d6b8a072abf4521af21ce9;p=firefly-linux-kernel-4.4.55.git fix fiq infinite loop when otg id change --- diff --git a/arch/arm/common/fiq_debugger.c b/arch/arm/common/fiq_debugger.c index 114c98e4d0ba..da173e47c160 100644 --- a/arch/arm/common/fiq_debugger.c +++ b/arch/arm/common/fiq_debugger.c @@ -1015,6 +1015,16 @@ static void debug_fiq(struct fiq_glue_handler *h, void *regs, void *svc_sp) unsigned int this_cpu = THREAD_INFO(svc_sp)->cpu; bool need_irq; + /* RK2928 USB-UART function, otg dp/dm default in uart status; + * connect with otg cable&usb device, dp/dm will be hi-z status + * and make uart controller enter infinite fiq loop + */ +#ifdef CONFIG_RK_USB_UART + if(!(readl_relaxed(RK2928_GRF_BASE + 0x014c) & (1<<10))) //id low + { + writel_relaxed(0x34000000, RK2928_GRF_BASE + 0x190); //enter usb phy + } +#endif need_irq = debug_handle_uart_interrupt(state, this_cpu, regs, svc_sp); if (need_irq) debug_force_irq(state);