MLK-14312 mx7ulp: Fix incorrect DTB modification after using USB
authorYe Li <ye.li@nxp.com>
Thu, 2 Mar 2017 03:35:49 +0000 (11:35 +0800)
committerYe Li <ye.li@nxp.com>
Wed, 5 Apr 2017 09:24:35 +0000 (17:24 +0800)
commit001798e98623b131898b0d9edad59d2b0fb3082d
tree085d18b49a3937113f47f72d5980ff3886f27112
parent63c2e1de37e1e24f35279f50efa5a330e2cb3d07
MLK-14312 mx7ulp: Fix incorrect DTB modification after using USB

u-boot has feature that when booting for mfgtool, the u-boot will modify the DTB
to disable SD 1.8v switch. But the judgement for mfgtool boot has a problem, it
only checks whether the USB PHY power status is enabled. When a USB device
(for example a USB ethernet) is used in u-boot, the power status is also enabled.
So the u-boot incorrectly disable the SD 1.8v switch.

The patch changes the get_boot_device to use the boot SW info provided by ROM. Only if
it is a USB boot, we will start the DTB modification for SD.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 1fb61cd80af59c39d1ca01d833f566628ba48f32)
arch/arm/cpu/armv7/mx7ulp/soc.c
arch/arm/include/asm/arch-mx7ulp/imx-regs.h
arch/arm/include/asm/imx-common/boot_mode.h