blob: 47a22889285f33db32b83c542e643b742133681e [file] [log] [blame]
Paul Burtone8823d22015-05-22 16:51:02 +01001/*
2 * Copyright (C) 2015 Imagination Technologies
3 * Author: Paul Burton <paul.burton@imgtec.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 */
10
11#include <linux/clk-provider.h>
12#include <linux/init.h>
13#include <linux/of_fdt.h>
14#include <linux/of_platform.h>
15
16void __init device_tree_init(void)
17{
18 unflatten_and_copy_device_tree();
19}
20
21static const struct of_device_id bus_ids[] __initconst = {
22 { .compatible = "simple-bus", },
23 { .compatible = "isa", },
24 {},
25};
26
27static int __init publish_devices(void)
28{
29 if (!of_have_populated_dt())
30 return 0;
31
32 return of_platform_bus_probe(NULL, bus_ids, NULL);
33}
34device_initcall(publish_devices);