1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2013 Google, Inc
11 #if CONFIG_IS_ENABLED(DM_WARN)
12 #define dm_warn(fmt...) log(LOGC_DM, LOGL_WARNING, ##fmt)
14 #define dm_warn(fmt...) log(LOGC_DM, LOGL_DEBUG, ##fmt)
20 * Dump out a tree of all devices starting @uclass
22 * @dev_name: udevice name
23 * @extended: true if forword-matching expected
24 * @sort: Sort by uclass name
26 void dm_dump_tree(char *dev_name, bool extended, bool sort);
29 * Dump out a list of uclasses and their devices
31 * @uclass: uclass name
32 * @extended: true if forword-matching expected
34 void dm_dump_uclass(char *uclass, bool extended);
36 #ifdef CONFIG_DEBUG_DEVRES
37 /* Dump out a list of device resources */
38 void dm_dump_devres(void);
40 static inline void dm_dump_devres(void)
45 /* Dump out a list of drivers */
46 void dm_dump_drivers(void);
48 /* Dump out a list with each driver's compatibility strings */
49 void dm_dump_driver_compat(void);
51 /* Dump out a list of drivers with static platform data */
52 void dm_dump_static_driver_info(void);
55 * dm_dump_mem() - Dump stats on memory usage in driver model
59 void dm_dump_mem(struct dm_stats *stats);
61 #if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY)
62 void *dm_priv_to_rw(void *priv);
64 static inline void *dm_priv_to_rw(void *priv)