From 532d5e69a1642bd8d1c1f928d3a35b414bbce81b Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Sat, 14 Mar 2015 17:21:24 +0800 Subject: MLK-10774-7 Auto check if boot from usb If boot from usb, reset environment to default value. Auto apply mfgtools setting and boot mfgtools kernel. Signed-off-by: Frank Li Signed-off-by: Nitin Garg Signed-off-by: Peng Fan Signed-off-by: Peng Fan --- arch/arm/include/asm/arch-mx6/imx-regs.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h b/arch/arm/include/asm/arch-mx6/imx-regs.h index f572c7b..20273e4 100644 --- a/arch/arm/include/asm/arch-mx6/imx-regs.h +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h @@ -1154,4 +1154,11 @@ extern void vadc_power_down(void); #endif #endif /* __ASSEMBLER__*/ + +/* + * If ROM fail back to USB recover mode, USBPH0_PWD will be clear to use USB + * If boot from the other mode, USB0_PWD will keep reset value + */ +#define is_boot_from_usb(void) (!(readl(USB_PHY0_BASE_ADDR) & (1<<20))) + #endif /* __ASM_ARCH_MX6_IMX_REGS_H__ */ -- cgit v1.1