blob: 3aeea1a017b95048afa262e4cf8036cb6d1bc671 (
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
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2020 Pengutronix e.K.
*
*/
#include <common.h>
#include <init.h>
#include <asm/system_info.h>
static int virt_probe(struct device_d *dev)
{
char *hostname = "virt";
if (cpu_is_cortex_a7())
hostname = "virt-a7";
else if (cpu_is_cortex_a15())
hostname = "virt-a15";
barebox_set_model("ARM QEMU virt");
barebox_set_hostname(hostname);
return 0;
}
static const struct of_device_id virt_of_match[] = {
{ .compatible = "linux,dummy-virt" },
{ /* Sentinel */},
};
static struct driver_d virt_board_driver = {
.name = "board-qemu-virt",
.probe = virt_probe,
.of_compatible = virt_of_match,
};
postcore_platform_driver(virt_board_driver);
|