blob: 981de90dd701c213b88539acb7d1e01e9cc53afe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// SPDX-License-Identifier: GPL-2.0-only
#include <common.h>
#include <init.h>
struct quartz64_model {
const char *name;
const char *shortname;
};
static int quartz64_probe(struct device_d *dev)
{
const struct quartz64_model *model;
model = device_get_match_data(dev);
barebox_set_model(model->name);
barebox_set_hostname(model->shortname);
return 0;
}
static const struct quartz64_model quartz64a = {
.name = "Pine64 Quartz64 Model A",
.shortname = "quartz64a",
};
static const struct of_device_id quartz64_of_match[] = {
{
.compatible = "pine64,quartz64-a",
.data = &quartz64a,
},
{ /* sentinel */ },
};
static struct driver_d quartz64_board_driver = {
.name = "board-quartz64",
.probe = quartz64_probe,
.of_compatible = quartz64_of_match,
};
coredevice_platform_driver(quartz64_board_driver);
|