MLK-20510-3 mx7ulp: Change is_boot_from_usb to use get_boot_device
The get_boot_device will return USB type from ROM info if booting from serial download, so change the is_boot_from_usb to use this function. Signed-off-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
parent
006b18a5c5
commit
643cb9468b
|
|
@ -1144,8 +1144,9 @@ struct usbphy_regs {
|
||||||
u32 usb1_pfda_ctrl1_tog; /* 0x14c */
|
u32 usb1_pfda_ctrl1_tog; /* 0x14c */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#define is_boot_from_usb(void) (!(readl(USB_PHY0_BASE_ADDR) & (1<<20)))
|
bool is_usb_boot(void);
|
||||||
|
#define is_boot_from_usb is_usb_boot
|
||||||
#define disconnect_from_pc(void) writel(0x0, USBOTG0_RBASE + 0x140)
|
#define disconnect_from_pc(void) writel(0x0, USBOTG0_RBASE + 0x140)
|
||||||
|
|
||||||
struct bootrom_sw_info {
|
struct bootrom_sw_info {
|
||||||
|
|
|
||||||
|
|
@ -416,6 +416,11 @@ enum boot_device get_boot_device(void)
|
||||||
return boot_dev;
|
return boot_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_usb_boot(void)
|
||||||
|
{
|
||||||
|
return get_boot_device() == USB_BOOT;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_FSL_FASTBOOT
|
#ifdef CONFIG_FSL_FASTBOOT
|
||||||
#ifdef CONFIG_SERIAL_TAG
|
#ifdef CONFIG_SERIAL_TAG
|
||||||
void get_board_serial(struct tag_serialnr *serialnr)
|
void get_board_serial(struct tag_serialnr *serialnr)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue