diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/Kconfig | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/am33xx/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/boot-common.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap3/emif4.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap5/abb.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap5/hw_data.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sysinfo-common.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/utils.c | 20 |
8 files changed, 38 insertions, 15 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 89c91d1b77..72832ad099 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig @@ -170,4 +170,7 @@ source "board/ti/am335x/Kconfig" source "board/compulab/cm_t335/Kconfig" source "board/compulab/cm_t43/Kconfig" +config SPL_LDSCRIPT + default "arch/arm/mach-omap2/u-boot-spl.lds" + endif diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig index d8abba992a..7260d27877 100644 --- a/arch/arm/mach-omap2/am33xx/Kconfig +++ b/arch/arm/mach-omap2/am33xx/Kconfig @@ -81,6 +81,7 @@ config TARGET_AM335X_SHC select DM select DM_SERIAL select DM_GPIO + imply CMD_SPL config TARGET_AM335X_SL50 bool "Support am335x_sl50" diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c index 700e6c2f79..26245aa169 100644 --- a/arch/arm/mach-omap2/boot-common.c +++ b/arch/arm/mach-omap2/boot-common.c @@ -10,6 +10,7 @@ #include <common.h> #include <ahci.h> +#include <environment.h> #include <spl.h> #include <asm/omap_common.h> #include <asm/arch/omap.h> @@ -240,8 +241,8 @@ void arch_preboot_os(void) int fb_set_reboot_flag(void) { printf("Setting reboot to fastboot flag ...\n"); - setenv("dofastboot", "1"); - saveenv(); + env_set("dofastboot", "1"); + env_save(); return 0; } #endif diff --git a/arch/arm/mach-omap2/omap3/emif4.c b/arch/arm/mach-omap2/omap3/emif4.c index d540cf08d2..8197e7b032 100644 --- a/arch/arm/mach-omap2/omap3/emif4.c +++ b/arch/arm/mach-omap2/omap3/emif4.c @@ -76,7 +76,7 @@ static void do_emif4_init(void) regval |= (1<<10); writel(regval, &emif4_base->sdram_iodft_tlgc); /*Wait till that bit clears*/ - while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) == 0x1); + while ((readl(&emif4_base->sdram_iodft_tlgc) & (1<<10)) != 0x0); /*Re-verify the DDR PHY status*/ while ((readl(&emif4_base->sdram_sts) & (1<<2)) == 0x0); diff --git a/arch/arm/mach-omap2/omap5/abb.c b/arch/arm/mach-omap2/omap5/abb.c index 3bf88979e5..1882c49e7d 100644 --- a/arch/arm/mach-omap2/omap5/abb.c +++ b/arch/arm/mach-omap2/omap5/abb.c @@ -28,8 +28,8 @@ s8 abb_setup_ldovbb(u32 fuse, u32 ldovbb) { u32 vset; - u32 fuse_enable_mask = OMAP5_ABB_FUSE_ENABLE_MASK; - u32 fuse_vset_mask = OMAP5_ABB_FUSE_VSET_MASK; + u32 fuse_enable_mask = OMAP5_PROD_ABB_FUSE_ENABLE_MASK; + u32 fuse_vset_mask = OMAP5_PROD_ABB_FUSE_VSET_MASK; if (!is_omap54xx()) { /* DRA7 */ diff --git a/arch/arm/mach-omap2/omap5/hw_data.c b/arch/arm/mach-omap2/omap5/hw_data.c index a8a6b8a869..4ad6b530d2 100644 --- a/arch/arm/mach-omap2/omap5/hw_data.c +++ b/arch/arm/mach-omap2/omap5/hw_data.c @@ -329,6 +329,15 @@ struct vcores_data omap5430_volts_es2 = { .mm.addr = SMPS_REG_ADDR_45_IVA, .mm.pmic = &palmas, .mm.abb_tx_done_mask = OMAP_ABB_MM_TXDONE_MASK, + + .mpu.efuse.reg[OPP_NOM] = OMAP5_ES2_PROD_MPU_OPNO_VMIN, + .mpu.efuse.reg_bits = OMAP5_ES2_PROD_REGBITS, + + .core.efuse.reg[OPP_NOM] = OMAP5_ES2_PROD_CORE_OPNO_VMIN, + .core.efuse.reg_bits = OMAP5_ES2_PROD_REGBITS, + + .mm.efuse.reg[OPP_NOM] = OMAP5_ES2_PROD_MM_OPNO_VMIN, + .mm.efuse.reg_bits = OMAP5_ES2_PROD_REGBITS, }; /* diff --git a/arch/arm/mach-omap2/sysinfo-common.c b/arch/arm/mach-omap2/sysinfo-common.c index 1dc7051ab3..4dab12a8d7 100644 --- a/arch/arm/mach-omap2/sysinfo-common.c +++ b/arch/arm/mach-omap2/sysinfo-common.c @@ -16,6 +16,15 @@ */ u32 get_device_type(void) { +#if defined(CONFIG_OMAP34XX) + /* + * On OMAP3 systems we call this early enough that we must just + * use the direct offset for safety. + */ + return (readl(OMAP34XX_CTRL_BASE + 0x2f0) & DEVICE_TYPE_MASK) >> + DEVICE_TYPE_SHIFT; +#else return (readl((*ctrl)->control_status) & DEVICE_TYPE_MASK) >> DEVICE_TYPE_SHIFT; +#endif } diff --git a/arch/arm/mach-omap2/utils.c b/arch/arm/mach-omap2/utils.c index 1946641eb9..0b0bf1837c 100644 --- a/arch/arm/mach-omap2/utils.c +++ b/arch/arm/mach-omap2/utils.c @@ -40,7 +40,7 @@ static void omap_set_fastboot_cpu(void) printf("Warning: fastboot.cpu: unknown CPU rev: %u\n", cpu_rev); } - setenv("fastboot.cpu", cpu); + env_set("fastboot.cpu", cpu); } static void omap_set_fastboot_secure(void) @@ -63,18 +63,18 @@ static void omap_set_fastboot_secure(void) printf("Warning: fastboot.secure: unknown CPU sec: %u\n", dev); } - setenv("fastboot.secure", secure); + env_set("fastboot.secure", secure); } static void omap_set_fastboot_board_rev(void) { const char *board_rev; - board_rev = getenv("board_rev"); + board_rev = env_get("board_rev"); if (board_rev == NULL) printf("Warning: fastboot.board_rev: unknown board revision\n"); - setenv("fastboot.board_rev", board_rev); + env_set("fastboot.board_rev", board_rev); } #ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV @@ -118,7 +118,7 @@ static void omap_set_fastboot_userdata_size(void) sprintf(buf, "%u", sz_kb); } - setenv("fastboot.userdata_size", buf); + env_set("fastboot.userdata_size", buf); } #else static inline void omap_set_fastboot_userdata_size(void) @@ -169,11 +169,11 @@ void omap_die_id_serial(void) omap_die_id((unsigned int *)&die_id); - if (!getenv("serial#")) { + if (!env_get("serial#")) { snprintf(serial_string, sizeof(serial_string), "%08x%08x", die_id[0], die_id[3]); - setenv("serial#", serial_string); + env_set("serial#", serial_string); } } @@ -182,7 +182,7 @@ void omap_die_id_get_board_serial(struct tag_serialnr *serialnr) char *serial_string; unsigned long long serial; - serial_string = getenv("serial#"); + serial_string = env_get("serial#"); if (serial_string) { serial = simple_strtoull(serial_string, NULL, 16); @@ -202,7 +202,7 @@ void omap_die_id_usbethaddr(void) omap_die_id((unsigned int *)&die_id); - if (!getenv("usbethaddr")) { + if (!env_get("usbethaddr")) { /* * Create a fake MAC address from the processor ID code. * First byte is 0x02 to signify locally administered. @@ -214,7 +214,7 @@ void omap_die_id_usbethaddr(void) mac[4] = die_id[0] & 0xff; mac[5] = (die_id[0] >> 8) & 0xff; - eth_setenv_enetaddr("usbethaddr", mac); + eth_env_set_enetaddr("usbethaddr", mac); } } |