Skip to content

Commit

Permalink
MIPS: Remove redundant definitions of device_tree_init()
Browse files Browse the repository at this point in the history
There exists many same definitions of device_tree_init() for various
platforms, add a weak function in arch/mips/kernel/prom.c to clean
up the related code.

Signed-off-by: Tiezhu Yang <[email protected]>
Signed-off-by: Thomas Bogendoerfer <[email protected]>
  • Loading branch information
seehearfeel authored and tsbogend committed Mar 14, 2022
1 parent 89fa126 commit cd04d58
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 41 deletions.
5 changes: 0 additions & 5 deletions arch/mips/ath79/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,3 @@ void __init arch_init_irq(void)
{
irqchip_init();
}

void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}
5 changes: 5 additions & 0 deletions arch/mips/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ int __init __dt_register_buses(const char *bus0, const char *bus1)
return 0;
}

void __weak __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}

#endif
5 changes: 0 additions & 5 deletions arch/mips/lantiq/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ void __init plat_mem_setup(void)
__dt_setup_arch(dtb);
}

void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}

void __init prom_init(void)
{
/* call the soc specific detetcion code and get it to fill soc_info */
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/loongson64/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,3 @@ void __init plat_mem_setup(void)
if (loongson_fdt_blob)
__dt_setup_arch(loongson_fdt_blob);
}

void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}
1 change: 0 additions & 1 deletion arch/mips/mti-malta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Copyright (C) 2008 Wind River Systems, Inc.
# written by Ralf Baechle <[email protected]>
#
obj-y += malta-dt.o
obj-y += malta-dtshim.o
obj-y += malta-init.o
obj-y += malta-int.o
Expand Down
15 changes: 0 additions & 15 deletions arch/mips/mti-malta/malta-dt.c

This file was deleted.

5 changes: 0 additions & 5 deletions arch/mips/pic32/pic32mzda/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ void __init prom_init(void)
pic32_init_cmdline((int)fw_arg0, (char **)fw_arg1);
}

void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}

static struct pic32_sdhci_platform_data sdhci_data = {
.setup_dma = pic32_set_sdhci_adma_fifo_threshold,
};
Expand Down
5 changes: 0 additions & 5 deletions arch/mips/ralink/of.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ __iomem void *plat_of_remap_node(const char *node)
return ioremap(res.start, resource_size(&res));
}

void __init device_tree_init(void)
{
unflatten_and_copy_device_tree();
}

void __init plat_mem_setup(void)
{
void *dtb;
Expand Down

0 comments on commit cd04d58

Please sign in to comment.