blob: fbc8a6b3adda18424bd485a0ea39df981143f55e [file] [log] [blame]
Simon Glass6494d702014-02-26 15:59:18 -07001/*
2 * Copyright (c) 2013 Google, Inc
3 *
4 * (C) Copyright 2012
5 * Pavel Herrmann <morpheus.ibis@gmail.com>
6 * Marek Vasut <marex@denx.de>
7 *
8 * SPDX-License-Identifier: GPL-2.0+
9 */
10
11#ifndef _DM_PLATDATA_H
12#define _DM_PLATDATA_H
13
Masahiro Yamada42c23dd2014-10-07 14:49:13 +090014#include <linker_lists.h>
15
Simon Glass0040b942014-07-23 06:55:17 -060016/**
17 * struct driver_info - Information required to instantiate a device
18 *
Masahiro Yamada81b4e752014-09-28 22:52:24 +090019 * @name: Driver name
Simon Glass0040b942014-07-23 06:55:17 -060020 * @platdata: Driver-specific platform data
21 */
Simon Glass6494d702014-02-26 15:59:18 -070022struct driver_info {
Simon Glass0040b942014-07-23 06:55:17 -060023 const char *name;
24 const void *platdata;
Simon Glass6494d702014-02-26 15:59:18 -070025};
26
27#define U_BOOT_DEVICE(__name) \
28 ll_entry_declare(struct driver_info, __name, driver_info)
29
Simon Glass10778392014-10-01 19:57:21 -060030/* Declare a list of devices. The argument is a driver_info[] array */
31#define U_BOOT_DEVICES(__name) \
32 ll_entry_declare_list(struct driver_info, __name, driver_info)
33
Simon Glass6494d702014-02-26 15:59:18 -070034#endif