From 536cb2cbc8a692f3c6d6b8a072abf4521af21ce9 Mon Sep 17 00:00:00 2001 From: yangkai Date: Tue, 13 Nov 2012 17:56:07 +0800 Subject: [PATCH] fix fiq infinite loop when otg id change --- arch/arm/common/fiq_debugger.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); -- 2.34.1