Paul Burton | e8823d2 | 2015-05-22 16:51:02 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 16 | void __init device_tree_init(void) |
| 17 | { |
| 18 | unflatten_and_copy_device_tree(); |
| 19 | } |
| 20 | |
| 21 | static const struct of_device_id bus_ids[] __initconst = { |
| 22 | { .compatible = "simple-bus", }, |
| 23 | { .compatible = "isa", }, |
| 24 | {}, |
| 25 | }; |
| 26 | |
| 27 | static 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 | } |
| 34 | device_initcall(publish_devices); |