From: 黄涛 Date: Tue, 11 Oct 2011 09:26:29 +0000 (+0800) Subject: rk29: reset: reset GRF_MEM_CON while reboot to bootloader X-Git-Tag: firefly_0821_release~9766^2~27 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=010f6ce7a6b26a710781e68b80a6c9cb379e446f;p=firefly-linux-kernel-4.4.55.git rk29: reset: reset GRF_MEM_CON while reboot to bootloader Else bootloader usb function may not work properly. This fix commit 37e7888570648a7880ebb226b587254e9d5302c6, which set GRF_MEM_CON to 0x28a when memory type is mobile ddr. --- diff --git a/arch/arm/mach-rk29/reset.c b/arch/arm/mach-rk29/reset.c index d3e4ca5b9859..c54a995965f6 100755 --- a/arch/arm/mach-rk29/reset.c +++ b/arch/arm/mach-rk29/reset.c @@ -100,6 +100,10 @@ static void __sramfunc __noreturn rk29_rb_with_softreset(void) dsb(); LOOP(10 * LOOPS_PER_USEC); + /* reset GRF_MEM_CON, else bootloader usb function may not work properly */ + writel(0, RK29_GRF_PHYS + 0xac); + dsb(); + if (reason) { __raw_writel(0, RK29_TIMER0_PHYS + 0x8); __raw_writel(reason, RK29_TIMER0_PHYS + 0x0);