diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-06-19 06:50:55 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-24 08:53:47 +0200 |
commit | b90af8c6b56954987105dfd2d557edce7837c7c2 (patch) | |
tree | ed9552cd4d2789774f8950ae3f4c1f2fe83831c0 /arch/riscv/boards/beaglev/board.c | |
parent | ad256e2499dbc2ec462318dfe9b30047f31db8bb (diff) | |
download | barebox-b90af8c6b56954987105dfd2d557edce7837c7c2.tar.gz barebox-b90af8c6b56954987105dfd2d557edce7837c7c2.tar.xz |
RISC-V: StarFive: add board support for BeagleV Starlight
With the different drivers now in place, we have everything to start a
barebox image.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210619045055.779-30-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/riscv/boards/beaglev/board.c')
-rw-r--r-- | arch/riscv/boards/beaglev/board.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/riscv/boards/beaglev/board.c b/arch/riscv/boards/beaglev/board.c new file mode 100644 index 0000000000..110754ea95 --- /dev/null +++ b/arch/riscv/boards/beaglev/board.c @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2021 Ahmad Fatoum, Pengutronix + */ + +#include <common.h> +#include <driver.h> +#include <bbu.h> +#include <envfs.h> + +static int beaglev_probe(struct device_d *dev) +{ + barebox_set_hostname("beaglev-starlight"); + + defaultenv_append_directory(defaultenv_beaglev); + + return 0; +} + +static const struct of_device_id beaglev_of_match[] = { + { .compatible = "beagle,beaglev-starlight-jh7100" }, + { /* sentinel */ }, +}; + +static struct driver_d beaglev_board_driver = { + .name = "board-beaglev", + .probe = beaglev_probe, + .of_compatible = beaglev_of_match, +}; +device_platform_driver(beaglev_board_driver); |