Signed-off-by: Mike Frysinger <vapier@gentoo.org>
ulong load_addr = CONFIG_SYS_LOAD_ADDR; /* Default Load Address */
static bootm_headers_t images; /* pointers to os/initrd/fdt images */
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)
{
/* Allow for arch specific config before we boot */
void __arch_preboot_os(void)
{
# error Unknown CPU type
#endif
# 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)
ulong mem_start;
phys_size_t mem_size;
ulong mem_start;
phys_size_t mem_size;
- void *os_hdr;
- int ret;
-
- memset ((void *)&images, 0, sizeof (images));
- images.verify = getenv_yesno ("verify");
arch_lmb_reserve(&images.lmb);
board_lmb_reserve(&images.lmb);
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,
/* get kernel image header, start address and length */
os_hdr = boot_get_kernel (cmdtp, flag, argc, argv,
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
#ifndef CONFIG_MAX_MEM_MAPPED
#if defined(CONFIG_4xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
#define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30)
#ifndef CONFIG_MAX_MEM_MAPPED
#if defined(CONFIG_4xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx)
#define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30)
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
#ifndef _ASM_CONFIG_H_
#define _ASM_CONFIG_H_
#define BOOTM_STATE_OS_GO (0x00000080)
int state;
#define BOOTM_STATE_OS_GO (0x00000080)
int state;
struct lmb lmb; /* for memory mgmt */
#endif
} bootm_headers_t;
struct lmb lmb; /* for memory mgmt */
#endif
} bootm_headers_t;
{
return type->region[region_nr].size;
}
{
return type->region[region_nr].size;
}
+
+void board_lmb_reserve(struct lmb *lmb);
+void arch_lmb_reserve(struct lmb *lmb);
+
#endif /* __KERNEL__ */
#endif /* _LINUX_LMB_H */
#endif /* __KERNEL__ */
#endif /* _LINUX_LMB_H */
COBJS-y += display_options.o
COBJS-y += div64.o
COBJS-y += gunzip.o
COBJS-y += display_options.o
COBJS-y += div64.o
COBJS-y += gunzip.o
+COBJS-$(CONFIG_LMB) += lmb.o
COBJS-y += ldiv.o
COBJS-$(CONFIG_MD5) += md5.o
COBJS-y += net_utils.o
COBJS-y += ldiv.o
COBJS-$(CONFIG_MD5) += md5.o
COBJS-y += net_utils.o
+
+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")));