summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/board_r.c13
-rw-r--r--common/console.c12
-rw-r--r--common/spl/Kconfig12
-rw-r--r--common/spl/Makefile2
-rw-r--r--common/spl/spl_nor.c2
5 files changed, 20 insertions, 21 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 93c9c2e50da..6f4aca2077d 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -61,6 +61,7 @@
#include <wdt.h>
#include <asm-generic/gpio.h>
#include <efi_loader.h>
+#include <relocate.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -810,19 +811,15 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
if (CONFIG_IS_ENABLED(X86_64) && !IS_ENABLED(CONFIG_EFI_APP))
arch_setup_gd(new_gd);
-#ifdef CONFIG_NEEDS_MANUAL_RELOC
- int i;
-#endif
-
#if !defined(CONFIG_X86) && !defined(CONFIG_ARM) && !defined(CONFIG_ARM64)
gd = new_gd;
#endif
gd->flags &= ~GD_FLG_LOG_READY;
-#ifdef CONFIG_NEEDS_MANUAL_RELOC
- for (i = 0; i < ARRAY_SIZE(init_sequence_r); i++)
- init_sequence_r[i] += gd->reloc_off;
-#endif
+ if (IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC)) {
+ for (int i = 0; i < ARRAY_SIZE(init_sequence_r); i++)
+ MANUAL_RELOC(init_sequence_r[i]);
+ }
if (initcall_run_list(init_sequence_r))
hang();
diff --git a/common/console.c b/common/console.c
index 92b1c93be1a..dc071f1ed66 100644
--- a/common/console.c
+++ b/common/console.c
@@ -593,13 +593,13 @@ int tstc(void)
#define PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL 1
#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER)
-#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ)
+#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_VAL(PRE_CON_BUF_SZ))
static void pre_console_putc(const char c)
{
char *buffer;
- buffer = map_sysmem(CONFIG_PRE_CON_BUF_ADDR, CONFIG_PRE_CON_BUF_SZ);
+ buffer = map_sysmem(CONFIG_VAL(PRE_CON_BUF_ADDR), CONFIG_VAL(PRE_CON_BUF_SZ));
buffer[CIRC_BUF_IDX(gd->precon_buf_idx++)] = c;
@@ -615,15 +615,15 @@ static void pre_console_puts(const char *s)
static void print_pre_console_buffer(int flushpoint)
{
unsigned long in = 0, out = 0;
- char buf_out[CONFIG_PRE_CON_BUF_SZ + 1];
+ char buf_out[CONFIG_VAL(PRE_CON_BUF_SZ) + 1];
char *buf_in;
if (IS_ENABLED(CONFIG_SILENT_CONSOLE) && (gd->flags & GD_FLG_SILENT))
return;
- buf_in = map_sysmem(CONFIG_PRE_CON_BUF_ADDR, CONFIG_PRE_CON_BUF_SZ);
- if (gd->precon_buf_idx > CONFIG_PRE_CON_BUF_SZ)
- in = gd->precon_buf_idx - CONFIG_PRE_CON_BUF_SZ;
+ buf_in = map_sysmem(CONFIG_VAL(PRE_CON_BUF_ADDR), CONFIG_VAL(PRE_CON_BUF_SZ));
+ if (gd->precon_buf_idx > CONFIG_VAL(PRE_CON_BUF_SZ))
+ in = gd->precon_buf_idx - CONFIG_VAL(PRE_CON_BUF_SZ);
while (in < gd->precon_buf_idx)
buf_out[out++] = buf_in[CIRC_BUF_IDX(in++)];
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 84f2847c724..50ff113cab2 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -219,15 +219,17 @@ config SPL_BOOTCOUNT_LIMIT
config SPL_RAW_IMAGE_SUPPORT
bool "Support SPL loading and booting of RAW images"
default n if (ARCH_MX6 && (SPL_MMC || SPL_SATA))
- default y if !TI_SECURE_DEVICE
+ default y
+ depends on !TI_SECURE_DEVICE
help
SPL will support loading and booting a RAW image when this option
is y. If this is not set, SPL will move on to other available
boot media to find a suitable image.
-config SPL_LEGACY_IMAGE_SUPPORT
+config SPL_LEGACY_IMAGE_FORMAT
bool "Support SPL loading and booting of Legacy images"
- default y if !TI_SECURE_DEVICE && !SPL_LOAD_FIT
+ default y if !SPL_LOAD_FIT
+ depends on !TI_SECURE_DEVICE
help
SPL will support loading and booting Legacy images when this option
is y. If this is not set, SPL will move on to other available
@@ -235,7 +237,7 @@ config SPL_LEGACY_IMAGE_SUPPORT
config SPL_LEGACY_IMAGE_CRC_CHECK
bool "Check CRC of Legacy images"
- depends on SPL_LEGACY_IMAGE_SUPPORT
+ depends on SPL_LEGACY_IMAGE_FORMAT
select SPL_CRC32
help
Enable this to check the CRC of Legacy images. While this increases
@@ -451,7 +453,7 @@ config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
config SPL_CRC32
bool "Support CRC32"
- default y if SPL_LEGACY_IMAGE_SUPPORT || SPL_EFI_PARTITION
+ default y if SPL_LEGACY_IMAGE_FORMAT || SPL_EFI_PARTITION
default y if SPL_ENV_SUPPORT || TPL_BLOBLIST
help
Enable this to support CRC32 in uImages or FIT images within SPL.
diff --git a/common/spl/Makefile b/common/spl/Makefile
index e71e7bee664..13db3df9933 100644
--- a/common/spl/Makefile
+++ b/common/spl/Makefile
@@ -10,7 +10,7 @@ ifdef CONFIG_SPL_BUILD
obj-$(CONFIG_$(SPL_TPL_)FRAMEWORK) += spl.o
obj-$(CONFIG_$(SPL_TPL_)BOOTROM_SUPPORT) += spl_bootrom.o
obj-$(CONFIG_$(SPL_TPL_)LOAD_FIT) += spl_fit.o
-obj-$(CONFIG_$(SPL_TPL_)LEGACY_IMAGE_SUPPORT) += spl_legacy.o
+obj-$(CONFIG_$(SPL_TPL_)LEGACY_IMAGE_FORMAT) += spl_legacy.o
obj-$(CONFIG_$(SPL_TPL_)NOR_SUPPORT) += spl_nor.o
obj-$(CONFIG_$(SPL_TPL_)XIP_SUPPORT) += spl_xip.o
obj-$(CONFIG_$(SPL_TPL_)YMODEM_SUPPORT) += spl_ymodem.o
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index 0f4fff84936..067a2d42bbf 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -110,7 +110,7 @@ static int spl_nor_load_image(struct spl_image_info *spl_image,
}
/* Legacy image handling */
- if (IS_ENABLED(CONFIG_SPL_LEGACY_IMAGE_SUPPORT)) {
+ if (IS_ENABLED(CONFIG_SPL_LEGACY_IMAGE_FORMAT)) {
load.bl_len = 1;
load.read = spl_nor_load_read;
return spl_load_legacy_img(spl_image, bootdev, &load,