diff options
author | Przemyslaw Marczak <p.marczak@samsung.com> | 2014-09-01 13:50:44 +0200 |
---|---|---|
committer | Minkyu Kang <mk7.kang@samsung.com> | 2014-09-05 13:58:49 +0900 |
commit | 4fb4d55a353e952b76785507f2487f21acc1e1bf (patch) | |
tree | 3d262898ea0594642711335d79c1314e324d556d /arch/arm/include/asm/arch-exynos/power.h | |
parent | 19f1b629bfa5ae412c0185ac0a1d8e531a40585f (diff) | |
download | u-boot-imx-4fb4d55a353e952b76785507f2487f21acc1e1bf.zip u-boot-imx-4fb4d55a353e952b76785507f2487f21acc1e1bf.tar.gz u-boot-imx-4fb4d55a353e952b76785507f2487f21acc1e1bf.tar.bz2 |
arch:exynos: boot mode: add get_boot_mode(), code cleanup
This patch introduces code clean-up for exynos boot mode check.
It includes:
- removal of typedef: boot_mode
- move the boot mode enum to arch-exynos/power.h
- add bootmode for sequence: eMMC 4.4 ch4 / SD ch2
- add new function: get_boot_mode() for OM[5:1] pin check
- update spl boot code
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Changes v5:
- exynos: boot mode: add missing bootmode (1st:EMMC 4.4 / 2nd:SD ch2)
Changes v6:
- none
changes v7:
- change boot mode name: BOOT_MODE_MMC to BOOT_MODE_SD
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'arch/arm/include/asm/arch-exynos/power.h')
-rw-r--r-- | arch/arm/include/asm/arch-exynos/power.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-exynos/power.h b/arch/arm/include/asm/arch-exynos/power.h index 4f2447b..e8a98a5 100644 --- a/arch/arm/include/asm/arch-exynos/power.h +++ b/arch/arm/include/asm/arch-exynos/power.h @@ -1670,6 +1670,27 @@ struct exynos5420_power { }; #endif /* __ASSEMBLY__ */ +#define OM_PIN_BITS 0x1f +#define OM_PIN_SHIFT 0x1 +#define OM_PIN_MASK (OM_PIN_BITS << OM_PIN_SHIFT) + +enum { + /* + * Assign the OM pin values for respective boot modes. + * Exynos4 does not support spi boot and the mmc boot OM + * pin values are the same across Exynos4 and Exynos5. + */ + BOOT_MODE_SD = 4, /* SD_CH2 | USB */ + BOOT_MODE_EMMC = 8, /* EMMC4.4 | USB */ + BOOT_MODE_EMMC_SD = 40, /* EMMC4.4 | SD_CH2 */ + BOOT_MODE_SERIAL = 20, + /* Boot based on Operating Mode pin settings */ + BOOT_MODE_OM = 32, + BOOT_MODE_USB, /* Boot using USB download */ +}; + +unsigned int get_boot_mode(void); + void set_mipi_phy_ctrl(unsigned int dev_index, unsigned int enable); #define EXYNOS_MIPI_PHY_ENABLE (1 << 0) |