mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-14 18:36:34 +00:00
of: remove early_init_dt_setup_initrd_arch
All arches do essentially the same thing now for early_init_dt_setup_initrd_arch, so it can now be removed. Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Mark Salter <msalter@redhat.com> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Jonas Bonn <jonas@southpole.se> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Cc: Chris Zankel <chris@zankel.net> Cc: Max Filippov <jcmvbkbc@gmail.com> Acked-by: Grant Likely <grant.likely@linaro.org>
This commit is contained in:
parent
ec2eaa73b3
commit
29eb45a9ab
12 changed files with 10 additions and 104 deletions
|
|
@ -125,10 +125,3 @@ void __init free_initrd_mem(unsigned long start, unsigned long end)
|
||||||
free_reserved_area((void *)start, (void *)end, -1, "initrd");
|
free_reserved_area((void *)start, (void *)end, -1, "initrd");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_OF_FLATTREE
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
pr_err("%s(%llx, %llx)\n", __func__, start, end);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_OF_FLATTREE */
|
|
||||||
|
|
|
||||||
|
|
@ -77,14 +77,6 @@ static int __init parse_tag_initrd2(const struct tag *tag)
|
||||||
|
|
||||||
__tagtable(ATAG_INITRD2, parse_tag_initrd2);
|
__tagtable(ATAG_INITRD2, parse_tag_initrd2);
|
||||||
|
|
||||||
#if defined(CONFIG_OF_FLATTREE) && defined(CONFIG_BLK_DEV_INITRD)
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (unsigned long)__va(start);
|
|
||||||
initrd_end = (unsigned long)__va(end);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_OF_FLATTREE */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This keeps memory configuration data used by a couple memory
|
* This keeps memory configuration data used by a couple memory
|
||||||
* initialization functions, as well as show_mem() for the skipping
|
* initialization functions, as well as show_mem() for the skipping
|
||||||
|
|
|
||||||
|
|
@ -10,18 +10,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/initrd.h>
|
|
||||||
#include <linux/memblock.h>
|
#include <linux/memblock.h>
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (unsigned long)__va(start);
|
|
||||||
initrd_end = (unsigned long)__va(end);
|
|
||||||
initrd_below_start_ok = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void __init early_init_dt_add_memory_arch(u64 base, u64 size)
|
void __init early_init_dt_add_memory_arch(u64 base, u64 size)
|
||||||
{
|
{
|
||||||
c6x_add_memory(base, size);
|
c6x_add_memory(base, size);
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@
|
||||||
#include <linux/percpu.h>
|
#include <linux/percpu.h>
|
||||||
#include <linux/memblock.h>
|
#include <linux/memblock.h>
|
||||||
#include <linux/initrd.h>
|
#include <linux/initrd.h>
|
||||||
#include <linux/of_fdt.h>
|
|
||||||
|
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
|
|
@ -405,11 +404,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
|
||||||
"initrd");
|
"initrd");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_OF_FLATTREE
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
pr_err("%s(%llx, %llx)\n",
|
|
||||||
__func__, start, end);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_OF_FLATTREE */
|
|
||||||
|
|
|
||||||
|
|
@ -114,15 +114,6 @@ void __init early_init_devtree(void *params)
|
||||||
pr_debug(" <- early_init_devtree()\n");
|
pr_debug(" <- early_init_devtree()\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (unsigned long)__va(start);
|
|
||||||
initrd_end = (unsigned long)__va(end);
|
|
||||||
initrd_below_start_ok = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*******
|
/*******
|
||||||
*
|
*
|
||||||
* New implementation of the OF "find" APIs, return a refcounted
|
* New implementation of the OF "find" APIs, return a refcounted
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/bootmem.h>
|
#include <linux/bootmem.h>
|
||||||
#include <linux/initrd.h>
|
|
||||||
#include <linux/debugfs.h>
|
#include <linux/debugfs.h>
|
||||||
#include <linux/of.h>
|
#include <linux/of.h>
|
||||||
#include <linux/of_fdt.h>
|
#include <linux/of_fdt.h>
|
||||||
|
|
@ -48,15 +47,6 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
|
||||||
return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
|
return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (unsigned long)__va(start);
|
|
||||||
initrd_end = (unsigned long)__va(end);
|
|
||||||
initrd_below_start_ok = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int __init early_init_dt_scan_model(unsigned long node, const char *uname,
|
int __init early_init_dt_scan_model(unsigned long node, const char *uname,
|
||||||
int depth, void *data)
|
int depth, void *data)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,3 @@ void __init early_init_devtree(void *params)
|
||||||
early_init_dt_scan(params);
|
early_init_dt_scan(params);
|
||||||
memblock_allow_resize();
|
memblock_allow_resize();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (unsigned long)__va(start);
|
|
||||||
initrd_end = (unsigned long)__va(end);
|
|
||||||
initrd_below_start_ok = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
||||||
|
|
@ -546,15 +546,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
|
||||||
memblock_add(base, size);
|
memblock_add(base, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (unsigned long)__va(start);
|
|
||||||
initrd_end = (unsigned long)__va(end);
|
|
||||||
initrd_below_start_ok = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void __init early_reserve_mem_dt(void)
|
static void __init early_reserve_mem_dt(void)
|
||||||
{
|
{
|
||||||
unsigned long i, len, dt_root;
|
unsigned long i, len, dt_root;
|
||||||
|
|
|
||||||
|
|
@ -51,15 +51,6 @@ void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
|
||||||
return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
|
return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (unsigned long)__va(start);
|
|
||||||
initrd_end = (unsigned long)__va(end);
|
|
||||||
initrd_below_start_ok = 1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void __init add_dtb(u64 data)
|
void __init add_dtb(u64 data)
|
||||||
{
|
{
|
||||||
initial_dtb = data + offsetof(struct setup_data, data);
|
initial_dtb = data + offsetof(struct setup_data, data);
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,8 @@ extern struct rtc_ops no_rtc_ops;
|
||||||
struct rtc_ops *rtc_ops;
|
struct rtc_ops *rtc_ops;
|
||||||
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
extern void *initrd_start;
|
extern unsigned long initrd_start;
|
||||||
extern void *initrd_end;
|
extern unsigned long initrd_end;
|
||||||
int initrd_is_mapped = 0;
|
int initrd_is_mapped = 0;
|
||||||
extern int initrd_below_start_ok;
|
extern int initrd_below_start_ok;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -149,8 +149,8 @@ static int __init parse_tag_initrd(const bp_tag_t* tag)
|
||||||
{
|
{
|
||||||
meminfo_t* mi;
|
meminfo_t* mi;
|
||||||
mi = (meminfo_t*)(tag->data);
|
mi = (meminfo_t*)(tag->data);
|
||||||
initrd_start = __va(mi->start);
|
initrd_start = (unsigned long)__va(mi->start);
|
||||||
initrd_end = __va(mi->end);
|
initrd_end = (unsigned long)__va(mi->end);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -167,13 +167,6 @@ static int __init parse_tag_fdt(const bp_tag_t *tag)
|
||||||
|
|
||||||
__tagtable(BP_TAG_FDT, parse_tag_fdt);
|
__tagtable(BP_TAG_FDT, parse_tag_fdt);
|
||||||
|
|
||||||
void __init early_init_dt_setup_initrd_arch(u64 start, u64 end)
|
|
||||||
{
|
|
||||||
initrd_start = (void *)__va(start);
|
|
||||||
initrd_end = (void *)__va(end);
|
|
||||||
initrd_below_start_ok = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* CONFIG_OF */
|
#endif /* CONFIG_OF */
|
||||||
|
|
||||||
#endif /* CONFIG_BLK_DEV_INITRD */
|
#endif /* CONFIG_BLK_DEV_INITRD */
|
||||||
|
|
|
||||||
|
|
@ -624,7 +624,7 @@ int __init of_scan_flat_dt_by_path(const char *path,
|
||||||
* early_init_dt_check_for_initrd - Decode initrd location from flat tree
|
* early_init_dt_check_for_initrd - Decode initrd location from flat tree
|
||||||
* @node: reference to node containing initrd location ('chosen')
|
* @node: reference to node containing initrd location ('chosen')
|
||||||
*/
|
*/
|
||||||
void __init early_init_dt_check_for_initrd(unsigned long node)
|
static void __init early_init_dt_check_for_initrd(unsigned long node)
|
||||||
{
|
{
|
||||||
u64 start, end;
|
u64 start, end;
|
||||||
unsigned long len;
|
unsigned long len;
|
||||||
|
|
@ -642,12 +642,15 @@ void __init early_init_dt_check_for_initrd(unsigned long node)
|
||||||
return;
|
return;
|
||||||
end = of_read_number(prop, len/4);
|
end = of_read_number(prop, len/4);
|
||||||
|
|
||||||
early_init_dt_setup_initrd_arch(start, end);
|
initrd_start = (unsigned long)__va(start);
|
||||||
|
initrd_end = (unsigned long)__va(end);
|
||||||
|
initrd_below_start_ok = 1;
|
||||||
|
|
||||||
pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n",
|
pr_debug("initrd_start=0x%llx initrd_end=0x%llx\n",
|
||||||
(unsigned long long)start, (unsigned long long)end);
|
(unsigned long long)start, (unsigned long long)end);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
inline void early_init_dt_check_for_initrd(unsigned long node)
|
static inline void early_init_dt_check_for_initrd(unsigned long node)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BLK_DEV_INITRD */
|
#endif /* CONFIG_BLK_DEV_INITRD */
|
||||||
|
|
|
||||||
|
|
@ -96,22 +96,12 @@ extern int of_scan_flat_dt_by_path(const char *path,
|
||||||
|
|
||||||
extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
|
extern int early_init_dt_scan_chosen(unsigned long node, const char *uname,
|
||||||
int depth, void *data);
|
int depth, void *data);
|
||||||
extern void early_init_dt_check_for_initrd(unsigned long node);
|
|
||||||
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
|
extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
|
||||||
int depth, void *data);
|
int depth, void *data);
|
||||||
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
|
extern void early_init_dt_add_memory_arch(u64 base, u64 size);
|
||||||
extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align);
|
extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align);
|
||||||
extern u64 dt_mem_next_cell(int s, __be32 **cellp);
|
extern u64 dt_mem_next_cell(int s, __be32 **cellp);
|
||||||
|
|
||||||
/*
|
|
||||||
* If BLK_DEV_INITRD, the fdt early init code will call this function,
|
|
||||||
* to be provided by the arch code. start and end are specified as
|
|
||||||
* physical addresses.
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
|
||||||
extern void early_init_dt_setup_initrd_arch(u64 start, u64 end);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Early flat tree scan hooks */
|
/* Early flat tree scan hooks */
|
||||||
extern int early_init_dt_scan_root(unsigned long node, const char *uname,
|
extern int early_init_dt_scan_root(unsigned long node, const char *uname,
|
||||||
int depth, void *data);
|
int depth, void *data);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue