blob: 7cf6607a9b7b0adb1d53c26234f8ec5a32a045e8 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glassdd6ab882014-02-26 15:59:18 -07002/*
3 * Copyright (c) 2013 Google, Inc
4 *
5 * (C) Copyright 2012
6 * Pavel Herrmann <morpheus.ibis@gmail.com>
Simon Glassdd6ab882014-02-26 15:59:18 -07007 */
8
Patrick Delaunay81313352021-04-27 11:02:19 +02009#define LOG_CATEGORY UCLASS_ROOT
10
Simon Glassdd6ab882014-02-26 15:59:18 -070011#include <errno.h>
Simon Glass528b1ef2015-01-25 08:27:16 -070012#include <fdtdec.h>
Simon Glass0f2af882020-05-10 11:40:05 -060013#include <log.h>
Simon Glassdd6ab882014-02-26 15:59:18 -070014#include <malloc.h>
Simon Glass8dee67a2021-03-15 17:25:38 +130015#include <asm-generic/sections.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060016#include <asm/global_data.h>
Masahiro Yamada75f82d02018-03-05 01:20:11 +090017#include <linux/libfdt.h>
Simon Glass719ea082020-07-07 13:11:38 -060018#include <dm/acpi.h>
Simon Glassdd6ab882014-02-26 15:59:18 -070019#include <dm/device.h>
20#include <dm/device-internal.h>
21#include <dm/lists.h>
Simon Glassf19d9f22017-05-18 20:09:08 -060022#include <dm/of.h>
23#include <dm/of_access.h>
Simon Glassdd6ab882014-02-26 15:59:18 -070024#include <dm/platdata.h>
Simon Glassf19d9f22017-05-18 20:09:08 -060025#include <dm/read.h>
Jeroen Hofsteecf0cf822014-06-25 21:57:45 +020026#include <dm/root.h>
Simon Glassdd6ab882014-02-26 15:59:18 -070027#include <dm/uclass.h>
Simon Glass51608c92021-12-16 20:59:32 -070028#include <dm/uclass-internal.h>
Simon Glassdd6ab882014-02-26 15:59:18 -070029#include <dm/util.h>
30#include <linux/list.h>
Simon Glassbdd5f812023-09-14 18:21:46 -060031#include <linux/printk.h>
Simon Glassdd6ab882014-02-26 15:59:18 -070032
33DECLARE_GLOBAL_DATA_PTR;
34
Walter Lozano95282d62020-06-25 01:10:10 -030035static struct driver_info root_info = {
Simon Glassdd6ab882014-02-26 15:59:18 -070036 .name = "root_driver",
37};
38
Heiko Schocherb74fcb42014-05-22 12:43:05 +020039struct udevice *dm_root(void)
Simon Glassdd6ab882014-02-26 15:59:18 -070040{
41 if (!gd->dm_root) {
42 dm_warn("Virtual root driver does not exist!\n");
43 return NULL;
44 }
45
46 return gd->dm_root;
47}
48
Simon Glass1b0deee2016-11-13 14:21:58 -070049void dm_fixup_for_gd_move(struct global_data *new_gd)
50{
51 /* The sentinel node has moved, so update things that point to it */
Lokesh Vutla02ba17f2017-02-13 09:21:22 +053052 if (gd->dm_root) {
Simon Glass784cd9e2020-12-19 10:40:17 -070053 new_gd->uclass_root->next->prev = new_gd->uclass_root;
54 new_gd->uclass_root->prev->next = new_gd->uclass_root;
Lokesh Vutla02ba17f2017-02-13 09:21:22 +053055 }
Simon Glass1b0deee2016-11-13 14:21:58 -070056}
57
Simon Glass43f7ea52021-03-15 17:25:17 +130058static int dm_setup_inst(void)
59{
60 DM_ROOT_NON_CONST = DM_DEVICE_GET(root);
61
Simon Glass8beeb282021-03-15 17:25:36 +130062 if (CONFIG_IS_ENABLED(OF_PLATDATA_RT)) {
63 struct udevice_rt *urt;
Simon Glass308d91b2022-03-27 14:26:20 -060064 void *start, *end;
65 int each_size;
Simon Glass8dee67a2021-03-15 17:25:38 +130066 void *base;
Simon Glass8beeb282021-03-15 17:25:36 +130067 int n_ents;
Simon Glass8dee67a2021-03-15 17:25:38 +130068 uint size;
Simon Glass8beeb282021-03-15 17:25:36 +130069
70 /* Allocate the udevice_rt table */
Simon Glass308d91b2022-03-27 14:26:20 -060071 each_size = dm_udevice_size();
72 start = ll_entry_start(struct udevice, udevice);
73 end = ll_entry_end(struct udevice, udevice);
74 size = end - start;
75 n_ents = size / each_size;
Simon Glass8beeb282021-03-15 17:25:36 +130076 urt = calloc(n_ents, sizeof(struct udevice_rt));
77 if (!urt)
78 return log_msg_ret("urt", -ENOMEM);
79 gd_set_dm_udevice_rt(urt);
Simon Glass8dee67a2021-03-15 17:25:38 +130080
81 /* Now allocate space for the priv/plat data, and copy it in */
82 size = __priv_data_end - __priv_data_start;
83
84 base = calloc(1, size);
85 if (!base)
86 return log_msg_ret("priv", -ENOMEM);
87 memcpy(base, __priv_data_start, size);
88 gd_set_dm_priv_base(base);
Simon Glass8beeb282021-03-15 17:25:36 +130089 }
90
Simon Glass43f7ea52021-03-15 17:25:17 +130091 return 0;
92}
93
Simon Glassf19d9f22017-05-18 20:09:08 -060094int dm_init(bool of_live)
Simon Glassdd6ab882014-02-26 15:59:18 -070095{
96 int ret;
97
98 if (gd->dm_root) {
99 dm_warn("Virtual root driver already exists!\n");
100 return -EINVAL;
101 }
Simon Glass6f156532021-03-15 17:25:16 +1300102 if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
103 gd->uclass_root = &uclass_head;
104 } else {
105 gd->uclass_root = &DM_UCLASS_ROOT_S_NON_CONST;
106 INIT_LIST_HEAD(DM_UCLASS_ROOT_NON_CONST);
107 }
Simon Glassdd6ab882014-02-26 15:59:18 -0700108
Simon Glass43f7ea52021-03-15 17:25:17 +1300109 if (CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
110 ret = dm_setup_inst();
111 if (ret) {
112 log_debug("dm_setup_inst() failed: %d\n", ret);
113 return ret;
114 }
115 } else {
116 ret = device_bind_by_name(NULL, false, &root_info,
117 &DM_ROOT_NON_CONST);
118 if (ret)
119 return ret;
120 if (CONFIG_IS_ENABLED(OF_CONTROL))
121 dev_set_ofnode(DM_ROOT_NON_CONST, ofnode_root());
122 ret = device_probe(DM_ROOT_NON_CONST);
123 if (ret)
124 return ret;
125 }
Simon Glassdd6ab882014-02-26 15:59:18 -0700126
AKASHI Takahiroe04f4fb2022-03-08 20:36:46 +0900127 INIT_LIST_HEAD((struct list_head *)&gd->dmtag_list);
128
Simon Glassdd6ab882014-02-26 15:59:18 -0700129 return 0;
130}
131
Simon Glass00197582014-07-23 06:55:01 -0600132int dm_uninit(void)
133{
Marek Vasutabbdbbd2021-01-24 14:32:46 -0700134 /* Remove non-vital devices first */
135 device_remove(dm_root(), DM_REMOVE_NON_VITAL);
Stefan Roese80b5bc92017-03-20 12:51:48 +0100136 device_remove(dm_root(), DM_REMOVE_NORMAL);
Simon Glass00197582014-07-23 06:55:01 -0600137 device_unbind(dm_root());
Jean-Jacques Hiblot272b67d2018-12-07 14:50:54 +0100138 gd->dm_root = NULL;
Simon Glass00197582014-07-23 06:55:01 -0600139
140 return 0;
141}
142
Stefan Roese505045d2017-03-27 10:58:53 +0200143#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
144int dm_remove_devices_flags(uint flags)
145{
146 device_remove(dm_root(), flags);
147
148 return 0;
149}
150#endif
151
Simon Glassb75b15b2020-12-03 16:55:23 -0700152int dm_scan_plat(bool pre_reloc_only)
Simon Glassdd6ab882014-02-26 15:59:18 -0700153{
154 int ret;
155
Simon Glass8beeb282021-03-15 17:25:36 +1300156 if (CONFIG_IS_ENABLED(OF_PLATDATA_DRIVER_RT)) {
Simon Glasscfd6a002020-10-03 11:31:33 -0600157 struct driver_rt *dyn;
158 int n_ents;
159
160 n_ents = ll_entry_count(struct driver_info, driver_info);
161 dyn = calloc(n_ents, sizeof(struct driver_rt));
162 if (!dyn)
163 return -ENOMEM;
164 gd_set_dm_driver_rt(dyn);
165 }
166
Simon Glassfef72b72014-07-23 06:55:03 -0600167 ret = lists_bind_drivers(DM_ROOT_NON_CONST, pre_reloc_only);
Simon Glassdd6ab882014-02-26 15:59:18 -0700168 if (ret == -ENOENT) {
169 dm_warn("Some drivers were not found\n");
170 ret = 0;
171 }
Simon Glassdd6ab882014-02-26 15:59:18 -0700172
Masahiro Yamada6cac81a2014-11-17 17:19:38 +0900173 return ret;
Simon Glassdd6ab882014-02-26 15:59:18 -0700174}
175
Simon Glass3580f6d2021-08-07 07:24:03 -0600176#if CONFIG_IS_ENABLED(OF_REAL)
Simon Glassa4dbe252017-05-17 17:18:08 -0600177/**
178 * dm_scan_fdt_node() - Scan the device tree and bind drivers for a node
179 *
180 * This scans the subnodes of a device tree node and and creates a driver
181 * for each one.
182 *
183 * @parent: Parent device for the devices that will be created
Simon Glass21a30882020-11-28 17:50:08 -0700184 * @node: Node to scan
Simon Glassa4dbe252017-05-17 17:18:08 -0600185 * @pre_reloc_only: If true, bind only drivers with the DM_FLAG_PRE_RELOC
186 * flag. If false bind all drivers.
Heinrich Schuchardt47b4c022022-01-19 18:05:50 +0100187 * Return: 0 if OK, -ve on error
Simon Glassa4dbe252017-05-17 17:18:08 -0600188 */
Simon Glass21a30882020-11-28 17:50:08 -0700189static int dm_scan_fdt_node(struct udevice *parent, ofnode parent_node,
190 bool pre_reloc_only)
Simon Glassdd6ab882014-02-26 15:59:18 -0700191{
Sean Anderson0449f062021-04-08 17:15:00 -0400192 int ret = 0, err = 0;
Simon Glass21a30882020-11-28 17:50:08 -0700193 ofnode node;
Simon Glassdd6ab882014-02-26 15:59:18 -0700194
Simon Glass21a30882020-11-28 17:50:08 -0700195 if (!ofnode_valid(parent_node))
196 return 0;
197
198 for (node = ofnode_first_subnode(parent_node);
199 ofnode_valid(node);
200 node = ofnode_next_subnode(node)) {
201 const char *node_name = ofnode_get_name(node);
Jens Wiklander651a8362018-09-25 16:40:05 +0200202
Simon Glass21a30882020-11-28 17:50:08 -0700203 if (!ofnode_is_enabled(node)) {
Masahiro Yamadaf70f39f2017-09-29 12:31:20 +0900204 pr_debug(" - ignoring disabled device\n");
Simon Glass528b1ef2015-01-25 08:27:16 -0700205 continue;
206 }
Patrice Chotardcc523cf2021-09-10 16:16:20 +0200207 err = lists_bind_fdt(parent, node, NULL, NULL, pre_reloc_only);
Simon Glassc90b9172015-08-30 16:55:17 -0600208 if (err && !ret) {
Simon Glass40717422014-07-23 06:55:18 -0600209 ret = err;
Quentin Schulz95a5a2b2024-06-11 15:04:26 +0200210 dm_warn("%s: ret=%d\n", node_name, ret);
Simon Glassc90b9172015-08-30 16:55:17 -0600211 }
Simon Glass40717422014-07-23 06:55:18 -0600212 }
Simon Glassdd6ab882014-02-26 15:59:18 -0700213
214 if (ret)
215 dm_warn("Some drivers failed to bind\n");
216
217 return ret;
218}
Simon Glass40717422014-07-23 06:55:18 -0600219
Simon Glass5d5388d2016-07-05 17:10:08 -0600220int dm_scan_fdt_dev(struct udevice *dev)
221{
Simon Glass21a30882020-11-28 17:50:08 -0700222 return dm_scan_fdt_node(dev, dev_ofnode(dev),
Simon Glass5d5388d2016-07-05 17:10:08 -0600223 gd->flags & GD_FLG_RELOC ? false : true);
224}
225
Simon Glass5039cab2020-11-28 17:50:09 -0700226int dm_scan_fdt(bool pre_reloc_only)
Simon Glass40717422014-07-23 06:55:18 -0600227{
Simon Glass21a30882020-11-28 17:50:08 -0700228 return dm_scan_fdt_node(gd->dm_root, ofnode_root(), pre_reloc_only);
Simon Glass40717422014-07-23 06:55:18 -0600229}
Simon Glassdd6ab882014-02-26 15:59:18 -0700230
Simon Glass5039cab2020-11-28 17:50:09 -0700231static int dm_scan_fdt_ofnode_path(const char *path, bool pre_reloc_only)
Rajan Vajafac64632018-08-10 01:45:33 -0700232{
233 ofnode node;
234
235 node = ofnode_path(path);
Simon Glass40916e62020-10-03 09:25:22 -0600236
Simon Glass21a30882020-11-28 17:50:08 -0700237 return dm_scan_fdt_node(gd->dm_root, node, pre_reloc_only);
Rajan Vajafac64632018-08-10 01:45:33 -0700238}
239
Simon Glass4d71d602020-11-28 17:50:10 -0700240int dm_extended_scan(bool pre_reloc_only)
Patrice Chotardbb3a45b2017-09-04 14:55:56 +0200241{
Patrick Delaunayc779e202020-02-18 15:43:46 +0100242 int ret, i;
243 const char * const nodes[] = {
244 "/chosen",
245 "/clocks",
246 "/firmware"
247 };
Patrice Chotardbb3a45b2017-09-04 14:55:56 +0200248
Simon Glass5039cab2020-11-28 17:50:09 -0700249 ret = dm_scan_fdt(pre_reloc_only);
Patrice Chotardbb3a45b2017-09-04 14:55:56 +0200250 if (ret) {
Quentin Schulz95a5a2b2024-06-11 15:04:26 +0200251 dm_warn("dm_scan_fdt() failed: %d\n", ret);
Patrice Chotardbb3a45b2017-09-04 14:55:56 +0200252 return ret;
253 }
254
Patrick Delaunayc779e202020-02-18 15:43:46 +0100255 /* Some nodes aren't devices themselves but may contain some */
256 for (i = 0; i < ARRAY_SIZE(nodes); i++) {
Simon Glass5039cab2020-11-28 17:50:09 -0700257 ret = dm_scan_fdt_ofnode_path(nodes[i], pre_reloc_only);
Patrick Delaunayc779e202020-02-18 15:43:46 +0100258 if (ret) {
Quentin Schulz95a5a2b2024-06-11 15:04:26 +0200259 dm_warn("dm_scan_fdt() scan for %s failed: %d\n",
260 nodes[i], ret);
Patrick Delaunayc779e202020-02-18 15:43:46 +0100261 return ret;
262 }
Rajan Vajae9fc81d2018-08-10 01:45:34 -0700263 }
264
Patrice Chotardbb3a45b2017-09-04 14:55:56 +0200265 return ret;
266}
Marek Vasut7f18c342019-08-31 18:03:28 +0200267#endif
Patrice Chotardbb3a45b2017-09-04 14:55:56 +0200268
Simon Glass97e22e32014-07-23 06:55:23 -0600269__weak int dm_scan_other(bool pre_reloc_only)
270{
271 return 0;
272}
273
Simon Glass781aa3e2021-03-15 17:25:40 +1300274#if CONFIG_IS_ENABLED(OF_PLATDATA_INST) && CONFIG_IS_ENABLED(READ_ONLY)
275void *dm_priv_to_rw(void *priv)
276{
277 long offset = priv - (void *)__priv_data_start;
278
279 return gd_dm_priv_base() + offset;
280}
281#endif
282
Marek Vasut11a6f582022-04-22 15:15:53 +0200283static int dm_probe_devices(struct udevice *dev, bool pre_reloc_only)
284{
Quentin Schulz446d6002022-09-22 17:53:25 +0200285 ofnode node = dev_ofnode(dev);
Marek Vasut11a6f582022-04-22 15:15:53 +0200286 struct udevice *child;
287 int ret;
288
Quentin Schulz446d6002022-09-22 17:53:25 +0200289 if (pre_reloc_only &&
290 (!ofnode_valid(node) || !ofnode_pre_reloc(node)) &&
291 !(dev->driver->flags & DM_FLAG_PRE_RELOC))
292 goto probe_children;
Marek Vasut11a6f582022-04-22 15:15:53 +0200293
Quentin Schulz446d6002022-09-22 17:53:25 +0200294 if (dev_get_flags(dev) & DM_FLAG_PROBE_AFTER_BIND) {
Marek Vasut11a6f582022-04-22 15:15:53 +0200295 ret = device_probe(dev);
296 if (ret)
297 return ret;
298 }
299
Quentin Schulz446d6002022-09-22 17:53:25 +0200300probe_children:
Marek Vasut11a6f582022-04-22 15:15:53 +0200301 list_for_each_entry(child, &dev->child_head, sibling_node)
302 dm_probe_devices(child, pre_reloc_only);
303
304 return 0;
305}
306
Simon Glassc77695b2020-12-19 10:40:16 -0700307/**
308 * dm_scan() - Scan tables to bind devices
309 *
310 * Runs through the driver_info tables and binds the devices it finds. Then runs
311 * through the devicetree nodes. Finally calls dm_scan_other() to add any
312 * special devices
313 *
314 * @pre_reloc_only: If true, bind only nodes with special devicetree properties,
315 * or drivers with the DM_FLAG_PRE_RELOC flag. If false bind all drivers.
316 */
317static int dm_scan(bool pre_reloc_only)
Simon Glassa730c5d2014-07-23 06:55:04 -0600318{
319 int ret;
320
Simon Glassb75b15b2020-12-03 16:55:23 -0700321 ret = dm_scan_plat(pre_reloc_only);
Simon Glassa730c5d2014-07-23 06:55:04 -0600322 if (ret) {
Quentin Schulz95a5a2b2024-06-11 15:04:26 +0200323 dm_warn("dm_scan_plat() failed: %d\n", ret);
Simon Glassc77695b2020-12-19 10:40:16 -0700324 return ret;
Simon Glassa730c5d2014-07-23 06:55:04 -0600325 }
Simon Glass0704b852015-02-27 22:06:41 -0700326
Simon Glass3580f6d2021-08-07 07:24:03 -0600327 if (CONFIG_IS_ENABLED(OF_REAL)) {
Simon Glass4d71d602020-11-28 17:50:10 -0700328 ret = dm_extended_scan(pre_reloc_only);
Simon Glass0704b852015-02-27 22:06:41 -0700329 if (ret) {
Quentin Schulz95a5a2b2024-06-11 15:04:26 +0200330 dm_warn("dm_extended_scan() failed: %d\n", ret);
Simon Glassc77695b2020-12-19 10:40:16 -0700331 return ret;
Simon Glass0704b852015-02-27 22:06:41 -0700332 }
Simon Glassa730c5d2014-07-23 06:55:04 -0600333 }
Simon Glass0704b852015-02-27 22:06:41 -0700334
Simon Glass97e22e32014-07-23 06:55:23 -0600335 ret = dm_scan_other(pre_reloc_only);
336 if (ret)
Simon Glassc77695b2020-12-19 10:40:16 -0700337 return ret;
338
Marek Vasut11a6f582022-04-22 15:15:53 +0200339 return dm_probe_devices(gd->dm_root, pre_reloc_only);
Simon Glassc77695b2020-12-19 10:40:16 -0700340}
341
342int dm_init_and_scan(bool pre_reloc_only)
343{
344 int ret;
345
Simon Glassc77695b2020-12-19 10:40:16 -0700346 ret = dm_init(CONFIG_IS_ENABLED(OF_LIVE));
347 if (ret) {
Quentin Schulz95a5a2b2024-06-11 15:04:26 +0200348 dm_warn("dm_init() failed: %d\n", ret);
Simon Glassc77695b2020-12-19 10:40:16 -0700349 return ret;
350 }
Simon Glass43f7ea52021-03-15 17:25:17 +1300351 if (!CONFIG_IS_ENABLED(OF_PLATDATA_INST)) {
352 ret = dm_scan(pre_reloc_only);
353 if (ret) {
354 log_debug("dm_scan() failed: %d\n", ret);
355 return ret;
356 }
Simon Glassc77695b2020-12-19 10:40:16 -0700357 }
Chanho Park5865a002023-08-18 14:11:02 +0900358 if (CONFIG_IS_ENABLED(DM_EVENT)) {
359 ret = event_notify_null(gd->flags & GD_FLG_RELOC ?
360 EVT_DM_POST_INIT_R :
361 EVT_DM_POST_INIT_F);
Simon Glassfc557362022-03-04 08:43:05 -0700362 if (ret)
363 return log_msg_ret("ev", ret);
364 }
Simon Glassa730c5d2014-07-23 06:55:04 -0600365
366 return 0;
367}
368
Simon Glass51608c92021-12-16 20:59:32 -0700369void dm_get_stats(int *device_countp, int *uclass_countp)
370{
371 *device_countp = device_get_decendent_count(gd->dm_root);
372 *uclass_countp = uclass_get_count();
373}
374
Simon Glassbe1621b2022-05-08 04:39:25 -0600375void dev_collect_stats(struct dm_stats *stats, const struct udevice *parent)
376{
377 const struct udevice *dev;
378 int i;
379
380 stats->dev_count++;
381 stats->dev_size += sizeof(struct udevice);
382 stats->dev_name_size += strlen(parent->name) + 1;
383 for (i = 0; i < DM_TAG_ATTACH_COUNT; i++) {
384 int size = dev_get_attach_size(parent, i);
385
386 if (size ||
387 (i == DM_TAG_DRIVER_DATA && parent->driver_data)) {
388 stats->attach_count[i]++;
389 stats->attach_size[i] += size;
390 stats->attach_count_total++;
391 stats->attach_size_total += size;
392 }
393 }
394
395 list_for_each_entry(dev, &parent->child_head, sibling_node)
396 dev_collect_stats(stats, dev);
397}
398
399void uclass_collect_stats(struct dm_stats *stats)
400{
401 struct uclass *uc;
402
403 list_for_each_entry(uc, gd->uclass_root, sibling_node) {
404 int size;
405
406 stats->uc_count++;
407 stats->uc_size += sizeof(struct uclass);
408 size = uc->uc_drv->priv_auto;
409 if (size) {
410 stats->uc_attach_count++;
411 stats->uc_attach_size += size;
412 }
413 }
414}
415
416void dm_get_mem(struct dm_stats *stats)
417{
418 memset(stats, '\0', sizeof(*stats));
419 dev_collect_stats(stats, gd->dm_root);
420 uclass_collect_stats(stats);
421 dev_tag_collect_stats(stats);
422
423 stats->total_size = stats->dev_size + stats->uc_size +
424 stats->attach_size_total + stats->uc_attach_size +
425 stats->tag_size;
426}
427
Sean Anderson0da49802023-10-14 16:47:47 -0400428#if CONFIG_IS_ENABLED(ACPIGEN)
Simon Glass719ea082020-07-07 13:11:38 -0600429static int root_acpi_get_name(const struct udevice *dev, char *out_name)
430{
431 return acpi_copy_name(out_name, "\\_SB");
432}
433
434struct acpi_ops root_acpi_ops = {
435 .get_name = root_acpi_get_name,
436};
437#endif
438
Simon Glassdd6ab882014-02-26 15:59:18 -0700439/* This is the root driver - all drivers are children of this */
440U_BOOT_DRIVER(root_driver) = {
441 .name = "root_driver",
442 .id = UCLASS_ROOT,
Simon Glass719ea082020-07-07 13:11:38 -0600443 ACPI_OPS_PTR(&root_acpi_ops)
Simon Glassdd6ab882014-02-26 15:59:18 -0700444};
445
446/* This is the root uclass */
447UCLASS_DRIVER(root) = {
448 .name = "root",
449 .id = UCLASS_ROOT,
450};