]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
of: remove early_init_dt_setup_initrd_arch
authorRob Herring <rob.herring@calxeda.com>
Fri, 30 Aug 2013 22:06:53 +0000 (17:06 -0500)
committerRob Herring <rob.herring@calxeda.com>
Wed, 9 Oct 2013 16:39:01 +0000 (11:39 -0500)
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>
12 files changed:
arch/arc/mm/init.c
arch/arm/mm/init.c
arch/c6x/kernel/devicetree.c
arch/metag/mm/init.c
arch/microblaze/kernel/prom.c
arch/mips/kernel/prom.c
arch/openrisc/kernel/prom.c
arch/powerpc/kernel/prom.c
arch/x86/kernel/devicetree.c
arch/xtensa/kernel/setup.c
drivers/of/fdt.c
include/linux/of_fdt.h

index 81279ec73a6a7873b4a10fc8ec4c3546413bfd05..55e0a85bea78050f2b8c1606995b14a2c4f5169a 100644 (file)
@@ -125,10 +125,3 @@ void __init free_initrd_mem(unsigned long start, unsigned long end)
        free_reserved_area((void *)start, (void *)end, -1, "initrd");
 }
 #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 */
index 9eeb1cd1c40144f5e99fad38cb5b5ff7be2fe24b..9d0b91dccf379cd442a32774a99738805f74745e 100644 (file)
@@ -77,14 +77,6 @@ static int __init parse_tag_initrd2(const struct tag *tag)
 
 __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
  * initialization functions, as well as show_mem() for the skipping
index d28a92fc0c52622b0a0740c871f05ad02e05ceb8..fa3e5741514e9ccfa97c97b2d3a646e63be5369d 100644 (file)
  *
  */
 #include <linux/init.h>
-#include <linux/initrd.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)
 {
        c6x_add_memory(base, size);
index 123919534b80fe3724612b61697441305d5b10a6..249fff66add37fb0c939241f8072163145e632a0 100644 (file)
@@ -12,7 +12,6 @@
 #include <linux/percpu.h>
 #include <linux/memblock.h>
 #include <linux/initrd.h>
-#include <linux/of_fdt.h>
 
 #include <asm/setup.h>
 #include <asm/page.h>
@@ -405,11 +404,3 @@ void free_initrd_mem(unsigned long start, unsigned long end)
                           "initrd");
 }
 #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 */
index 951e4d61ca2dc26bc40e934b13f79af9df65ae6b..cab6dc356119064c1e08e978fbe100b3ff35d0eb 100644 (file)
@@ -114,15 +114,6 @@ void __init early_init_devtree(void *params)
        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
index 67a4c53b2b54289752293a95ed7e4354303367d7..0b2485f9a6c12bf709f50e783ffb856103e66309 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/bootmem.h>
-#include <linux/initrd.h>
 #include <linux/debugfs.h>
 #include <linux/of.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));
 }
 
-#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 depth, void *data)
 {
index 6dbcaa85421ce3d5c61806c30b586ab082b4ff84..2aae474b44c3af93dfee0f040d4735b2c3a54be6 100644 (file)
@@ -52,12 +52,3 @@ void __init early_init_devtree(void *params)
        early_init_dt_scan(params);
        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
index b7634ce41dbc92bd67cd5ed1c6c7cd584924ccc4..a0894688daefcf123b28b3d568ec0f90d95ca1c9 100644 (file)
@@ -546,15 +546,6 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 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)
 {
        unsigned long i, len, dt_root;
index 0db805c4b9e8704ba71a8a2abd82ac361af35b3a..0e1f95b06336c09991d68726eb7775dac8fa44ac 100644 (file)
@@ -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));
 }
 
-#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)
 {
        initial_dtb = data + offsetof(struct setup_data, data);
index 65974a8f41a4b7b2a8899c1734988a8d1e839758..6e2b6638122de71374c99ac0be7df584b0cf7fd9 100644 (file)
@@ -61,8 +61,8 @@ extern struct rtc_ops no_rtc_ops;
 struct rtc_ops *rtc_ops;
 
 #ifdef CONFIG_BLK_DEV_INITRD
-extern void *initrd_start;
-extern void *initrd_end;
+extern unsigned long initrd_start;
+extern unsigned long initrd_end;
 int initrd_is_mapped = 0;
 extern int initrd_below_start_ok;
 #endif
@@ -149,8 +149,8 @@ static int __init parse_tag_initrd(const bp_tag_t* tag)
 {
        meminfo_t* mi;
        mi = (meminfo_t*)(tag->data);
-       initrd_start = __va(mi->start);
-       initrd_end = __va(mi->end);
+       initrd_start = (unsigned long)__va(mi->start);
+       initrd_end = (unsigned long)__va(mi->end);
 
        return 0;
 }
@@ -167,13 +167,6 @@ static int __init parse_tag_fdt(const bp_tag_t *tag)
 
 __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_BLK_DEV_INITRD */
index 5bc55b6e2b41e9afa791ea576527e0aa77f3f795..5f4cc88cd89ec1a4cf61154638a70551b4255985 100644 (file)
@@ -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
  * @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;
        unsigned long len;
@@ -642,12 +642,15 @@ void __init early_init_dt_check_for_initrd(unsigned long node)
                return;
        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",
                 (unsigned long long)start, (unsigned long long)end);
 }
 #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 */
index 73e16511134ed0b8a1a56a8acf23361425524ab6..b365f5ac7b54d217875fefa0186e843d9625b8d7 100644 (file)
@@ -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,
                                     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,
                                     int depth, void *data);
 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 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 */
 extern int early_init_dt_scan_root(unsigned long node, const char *uname,
                                   int depth, void *data);