blob: 818f77503a31032e1853a056ab27044f6dee4549 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Simon Glass63b17572014-02-26 15:59:23 -07002/*
3 * Copyright (c) 2013 Google, Inc
Simon Glass63b17572014-02-26 15:59:23 -07004 */
5
Tom Riniabb9a042024-05-18 20:20:43 -06006#include <common.h>
Simon Glass63b17572014-02-26 15:59:23 -07007#include <dm.h>
8#include <dm-demo.h>
9
10static const struct dm_demo_pdata red_square = {
11 .colour = "red",
12 .sides = 4.
13};
14static const struct dm_demo_pdata green_triangle = {
15 .colour = "green",
16 .sides = 3.
17};
18static const struct dm_demo_pdata yellow_hexagon = {
19 .colour = "yellow",
20 .sides = 6.
21};
22
Simon Glass1d8364a2020-12-28 20:34:54 -070023U_BOOT_DRVINFO(demo0) = {
Simon Glass63b17572014-02-26 15:59:23 -070024 .name = "demo_shape_drv",
Simon Glass71fa5b42020-12-03 16:55:18 -070025 .plat = &red_square,
Simon Glass63b17572014-02-26 15:59:23 -070026};
27
Simon Glass1d8364a2020-12-28 20:34:54 -070028U_BOOT_DRVINFO(demo1) = {
Simon Glass63b17572014-02-26 15:59:23 -070029 .name = "demo_simple_drv",
Simon Glass71fa5b42020-12-03 16:55:18 -070030 .plat = &red_square,
Simon Glass63b17572014-02-26 15:59:23 -070031};
32
Simon Glass1d8364a2020-12-28 20:34:54 -070033U_BOOT_DRVINFO(demo2) = {
Simon Glass63b17572014-02-26 15:59:23 -070034 .name = "demo_shape_drv",
Simon Glass71fa5b42020-12-03 16:55:18 -070035 .plat = &green_triangle,
Simon Glass63b17572014-02-26 15:59:23 -070036};
37
Simon Glass1d8364a2020-12-28 20:34:54 -070038U_BOOT_DRVINFO(demo3) = {
Simon Glass63b17572014-02-26 15:59:23 -070039 .name = "demo_simple_drv",
Simon Glass71fa5b42020-12-03 16:55:18 -070040 .plat = &yellow_hexagon,
Simon Glass63b17572014-02-26 15:59:23 -070041};
42
Simon Glass1d8364a2020-12-28 20:34:54 -070043U_BOOT_DRVINFO(demo4) = {
Simon Glass63b17572014-02-26 15:59:23 -070044 .name = "demo_shape_drv",
Simon Glass71fa5b42020-12-03 16:55:18 -070045 .plat = &yellow_hexagon,
Simon Glass63b17572014-02-26 15:59:23 -070046};