Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1727da5 authored by Grant Likely's avatar Grant Likely
Browse files

of: consolidate definition of early_init_dt_alloc_memory_arch()



Most architectures use the same implementation. Collapse the common ones
into a single weak function that can be overridden.

Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
parent 7e0bdf15
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -18,12 +18,6 @@
#include <asm/clk.h>
#include <asm/mach_desc.h>

/* called from unflatten_device_tree() to bootstrap devicetree itself */
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
	return __va(memblock_alloc(size, align));
}

/**
 * setup_machine_fdt - Machine setup when an dtb was passed to the kernel
 * @dt:		virtual address pointer to dt blob
+0 −5
Original line number Diff line number Diff line
@@ -190,11 +190,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
	memblock_add(base, size);
}

void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
	return __va(memblock_alloc(size, align));
}

/*
 * Limit the memory size that was specified via FDT.
 */
+0 −5
Original line number Diff line number Diff line
@@ -45,8 +45,3 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
{
	c6x_add_memory(base, size);
}

void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
	return __va(memblock_alloc(size, align));
}
+0 −5
Original line number Diff line number Diff line
@@ -46,11 +46,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
	memblock_add(base, size);
}

void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
	return __va(memblock_alloc(size, align));
}

#ifdef CONFIG_EARLY_PRINTK
static char *stdout;

+0 −5
Original line number Diff line number Diff line
@@ -55,11 +55,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
	memblock_add(base, size);
}

void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
{
	return __va(memblock_alloc(size, align));
}

void __init early_init_devtree(void *params)
{
	void *alloc;
Loading