From f10ed9a31d69362f71919d4634e621c9f1bb7911 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 9 Feb 2011 14:46:03 +0000 Subject: [PATCH] xloader: Panda - kill OTG and reset PHY in case ROM started them It'd be better if we didn't let the OS or next bootloader see that the ROM set things up differently than usual. Signed-off-by: Andy Green Signed-off-by: Anand Gadiyar --- board/omap4430panda/omap4430panda.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/board/omap4430panda/omap4430panda.c b/board/omap4430panda/omap4430panda.c index ce45e6d..4cedd8f 100644 --- a/board/omap4430panda/omap4430panda.c +++ b/board/omap4430panda/omap4430panda.c @@ -527,6 +527,26 @@ static void ddr_init(void) *****************************************/ int board_init(void) { + unsigned int v; + + /* + * If the ROM has started the OTG stuff, stop it and + * make it look as if uninitialized for Linux or U-Boot + */ + + /* hold OTG phy in reset */ + + v = __raw_readl(OMAP44XX_GPIO_BASE2 + 0x134); + __raw_writel((v & ~(0x01 << 30)), OMAP44XX_GPIO_BASE2 + 0x134); + + v = __raw_readl(OMAP44XX_GPIO_BASE2 + 0x13c); + __raw_writel((v & ~(0x01 << 30)), OMAP44XX_GPIO_BASE2 + 0x13c); + + /* kill USB PLL */ + + v = __raw_readl(0x4a008100 + 0x80); + __raw_writel((v & ~(7 << 0)) | 1, 0x4a008100 + 0x80); + return 0; } -- 2.39.5