Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 Benjamin Herrenschmidt, IBM Corp. |
| 3 | * <benh@kernel.crashing.org> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * as published by the Free Software Foundation; either version |
| 8 | * 2 of the License, or (at your option) any later version. |
| 9 | */ |
| 10 | |
| 11 | #ifndef _ASM_MICROBLAZE_OF_PLATFORM_H |
| 12 | #define _ASM_MICROBLAZE_OF_PLATFORM_H |
| 13 | |
| 14 | /* This is just here during the transition */ |
| 15 | #include <linux/of_platform.h> |
| 16 | |
| 17 | /* |
| 18 | * The list of OF IDs below is used for matching bus types in the |
| 19 | * system whose devices are to be exposed as of_platform_devices. |
| 20 | * |
| 21 | * This is the default list valid for most platforms. This file provides |
| 22 | * functions who can take an explicit list if necessary though |
| 23 | * |
| 24 | * The search is always performed recursively looking for children of |
| 25 | * the provided device_node and recursively if such a children matches |
| 26 | * a bus type in the list |
| 27 | */ |
| 28 | |
| 29 | static const struct of_device_id of_default_bus_ids[] = { |
| 30 | { .type = "soc", }, |
| 31 | { .compatible = "soc", }, |
| 32 | { .type = "plb5", }, |
| 33 | { .type = "plb4", }, |
| 34 | { .type = "opb", }, |
| 35 | { .type = "simple", }, |
| 36 | {}, |
| 37 | }; |
| 38 | |
Michal Simek | 12e8414 | 2009-03-27 14:25:12 +0100 | [diff] [blame] | 39 | /* Platform devices and busses creation */ |
| 40 | extern struct of_device *of_platform_device_create(struct device_node *np, |
| 41 | const char *bus_id, |
| 42 | struct device *parent); |
| 43 | /* pseudo "matches" value to not do deep probe */ |
| 44 | #define OF_NO_DEEP_PROBE ((struct of_device_id *)-1) |
| 45 | |
| 46 | extern int of_platform_bus_probe(struct device_node *root, |
| 47 | const struct of_device_id *matches, |
| 48 | struct device *parent); |
| 49 | |
| 50 | extern struct of_device *of_find_device_by_phandle(phandle ph); |
| 51 | |
| 52 | extern void of_instantiate_rtc(void); |
| 53 | |
| 54 | #endif /* _ASM_MICROBLAZE_OF_PLATFORM_H */ |