diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-01-16 16:59:04 +0900 |
---|---|---|
committer | Przemyslaw Marczak <p.marczak@samsung.com> | 2015-05-19 12:05:32 +0200 |
commit | 9d05b8b578f132e55178fba5b6e63c3a12f4de50 (patch) | |
tree | 2c11bec24c5936f50e10424c76d25cc5158c9144 /board | |
parent | f3ea75848866a530db0f01f64ed02548fd5e5637 (diff) | |
download | u-boot-9d05b8b578f132e55178fba5b6e63c3a12f4de50.tar.gz u-boot-9d05b8b578f132e55178fba5b6e63c3a12f4de50.tar.bz2 u-boot-9d05b8b578f132e55178fba5b6e63c3a12f4de50.zip |
Odroid-XU3: adjust to support Tizen requirements
This patch includes changes required to boot Tizen,
by varoius authors:
arm: exynos5420: Adding support for board_usb_{init|cleanup}() functions
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
samsung: common: board: call dwc3_uboot_exit() for boards with DWC3
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
config: Odroid-XU3: Support DFU download
Signed-off-by: Inha Song <ideal.song@samsung.com>
smdk5420: Add dfu_alt_info settings interface for support DFU download
Signed-off-by: Inha Song <ideal.song@samsung.com>
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
config: Odroid-XU3: Enable dwc3 usb gadget
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
config: Odroid-XU3: Add default dfu device environment
Signed-off-by: Inha Song <ideal.song@samsung.com>
usb: config: odroid XU3: Enable UMS (Mass Storage) gadget
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Odroid-XU3: Enable check board signature when download bootloader
Signed-off-by: Inha Song <ideal.song@samsung.com>
odroid-xu3: config: add platform autoboot command
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Odroid-XU3: Set rootfs device number to 0
Signed-off-by: Inha Song <ideal.song@samsung.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/samsung/common/board.c | 4 | ||||
-rw-r--r-- | board/samsung/smdk5420/smdk5420.c | 65 |
2 files changed, 69 insertions, 0 deletions
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index e359060870..b715bcdf6f 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -27,6 +27,7 @@ #include <lcd.h> #include <samsung/misc.h> #include <usb.h> +#include <dwc3-uboot.h> #include <samsung/multi-plat.h> DECLARE_GLOBAL_DATA_PTR; @@ -423,5 +424,8 @@ void reset_misc(void) int board_usb_cleanup(int index, enum usb_init_type init) { +#ifdef CONFIG_USB_DWC3 + dwc3_uboot_exit(index); +#endif return 0; } diff --git a/board/samsung/smdk5420/smdk5420.c b/board/samsung/smdk5420/smdk5420.c index 82f607b24d..cab827ddc4 100644 --- a/board/samsung/smdk5420/smdk5420.c +++ b/board/samsung/smdk5420/smdk5420.c @@ -19,6 +19,12 @@ #include <asm/arch/system.h> #include <asm/arch/dp_info.h> #include <power/tps65090_pmic.h> +#include <usb.h> +#include <dwc3-uboot.h> +#include <mmc.h> +#include <asm/arch/power.h> +#include <samsung-usb-phy-uboot.h> +#include <asm/arch/xhci-exynos.h> DECLARE_GLOBAL_DATA_PTR; @@ -75,3 +81,62 @@ int board_get_revision(void) { return 0; } + +static struct dwc3_device dwc3_device_data = { + .maximum_speed = USB_SPEED_SUPER, + .base = 0x12400000, + .dr_mode = USB_DR_MODE_PERIPHERAL, + .index = 0, +}; + +int usb_gadget_handle_interrupts(void) +{ + dwc3_uboot_handle_interrupt(0); + return 0; +} + +int board_usb_init(int index, enum usb_init_type init) +{ + struct exynos_usb3_phy *phy = (struct exynos_usb3_phy *) + samsung_get_base_usb3_phy(); + + if (!phy) { + error("usb3 phy not supported"); + return -ENODEV; + } + + set_usbdrd_phy_ctrl(POWER_USB_DRD_PHY_CTRL_EN); + exynos5_usb3_phy_init(phy); + + return dwc3_uboot_init(&dwc3_device_data); +} + +#ifdef CONFIG_SET_DFU_ALT_INFO +char *get_dfu_alt_system(char *interface, char *devstr) +{ + return getenv("dfu_alt_system"); +} + +char *get_dfu_alt_boot(char *interface, char *devstr) +{ + struct mmc *mmc; + char *alt_boot; + int dev_num; + + dev_num = simple_strtoul(devstr, NULL, 10); + + mmc = find_mmc_device(dev_num); + if (!mmc) + return NULL; + + if (mmc_init(mmc)) + return NULL; + + if (IS_SD(mmc)) + alt_boot = CONFIG_DFU_ALT_BOOT_SD; + else + alt_boot = CONFIG_DFU_ALT_BOOT_EMMC; + + return alt_boot; +} +#endif |