summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-11-03 11:35:59 -0500
committerWolfgang Denk <wd@denx.de>2010-01-21 22:26:00 +0100
commita16028da63c78001823bfb375b3f6d9d86e5a534 (patch)
treeaea901c9aabc6df0cf0db97e55ec39a55d76b653 /common
parentdac4d7e8849d275023ea2fcae6caf941db91c042 (diff)
downloadu-boot-imx-a16028da63c78001823bfb375b3f6d9d86e5a534.zip
u-boot-imx-a16028da63c78001823bfb375b3f6d9d86e5a534.tar.gz
u-boot-imx-a16028da63c78001823bfb375b3f6d9d86e5a534.tar.bz2
lmb: only force on arches that use it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_bootm.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 05feb39..f28e88f 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -153,18 +153,6 @@ static boot_os_fn *boot_os[] = {
ulong load_addr = CONFIG_SYS_LOAD_ADDR; /* Default Load Address */
static bootm_headers_t images; /* pointers to os/initrd/fdt images */
-void __board_lmb_reserve(struct lmb *lmb)
-{
- /* please define platform specific board_lmb_reserve() */
-}
-void board_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__board_lmb_reserve")));
-
-void __arch_lmb_reserve(struct lmb *lmb)
-{
- /* please define platform specific arch_lmb_reserve() */
-}
-void arch_lmb_reserve(struct lmb *lmb) __attribute__((weak, alias("__arch_lmb_reserve")));
-
/* Allow for arch specific config before we boot */
void __arch_preboot_os(void)
{
@@ -200,15 +188,11 @@ void arch_preboot_os(void) __attribute__((weak, alias("__arch_preboot_os")));
# error Unknown CPU type
#endif
-static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static void bootm_start_lmb(void)
{
+#ifdef CONFIG_LMB
ulong mem_start;
phys_size_t mem_size;
- void *os_hdr;
- int ret;
-
- memset ((void *)&images, 0, sizeof (images));
- images.verify = getenv_yesno ("verify");
lmb_init(&images.lmb);
@@ -219,6 +203,20 @@ static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
arch_lmb_reserve(&images.lmb);
board_lmb_reserve(&images.lmb);
+#else
+# define lmb_reserve(lmb, base, size)
+#endif
+}
+
+static int bootm_start(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+ void *os_hdr;
+ int ret;
+
+ memset ((void *)&images, 0, sizeof (images));
+ images.verify = getenv_yesno ("verify");
+
+ bootm_start_lmb();
/* get kernel image header, start address and length */
os_hdr = boot_get_kernel (cmdtp, flag, argc, argv,