diff options
Diffstat (limited to 'arch/arm/boards/pine64-quartz64')
-rw-r--r-- | arch/arm/boards/pine64-quartz64/.gitignore | 1 | ||||
-rw-r--r-- | arch/arm/boards/pine64-quartz64/Makefile | 3 | ||||
-rw-r--r-- | arch/arm/boards/pine64-quartz64/board.c | 41 | ||||
-rw-r--r-- | arch/arm/boards/pine64-quartz64/lowlevel.c | 23 |
4 files changed, 68 insertions, 0 deletions
diff --git a/arch/arm/boards/pine64-quartz64/.gitignore b/arch/arm/boards/pine64-quartz64/.gitignore new file mode 100644 index 0000000000..f458f794b5 --- /dev/null +++ b/arch/arm/boards/pine64-quartz64/.gitignore @@ -0,0 +1 @@ +sdram-init.bin diff --git a/arch/arm/boards/pine64-quartz64/Makefile b/arch/arm/boards/pine64-quartz64/Makefile new file mode 100644 index 0000000000..b37b6c870b --- /dev/null +++ b/arch/arm/boards/pine64-quartz64/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-y += board.o +lwl-y += lowlevel.o diff --git a/arch/arm/boards/pine64-quartz64/board.c b/arch/arm/boards/pine64-quartz64/board.c new file mode 100644 index 0000000000..1573dd8674 --- /dev/null +++ b/arch/arm/boards/pine64-quartz64/board.c @@ -0,0 +1,41 @@ +// 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 *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 */ }, +}; +MODULE_DEVICE_TABLE(of, quartz64_of_match); + +static struct driver quartz64_board_driver = { + .name = "board-quartz64", + .probe = quartz64_probe, + .of_compatible = quartz64_of_match, +}; +coredevice_platform_driver(quartz64_board_driver); diff --git a/arch/arm/boards/pine64-quartz64/lowlevel.c b/arch/arm/boards/pine64-quartz64/lowlevel.c new file mode 100644 index 0000000000..7723d47860 --- /dev/null +++ b/arch/arm/boards/pine64-quartz64/lowlevel.c @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: GPL-2.0-only + +#include <common.h> +#include <asm/barebox-arm.h> +#include <mach/rockchip/hardware.h> +#include <mach/rockchip/atf.h> +#include <debug_ll.h> + +extern char __dtb_rk3566_quartz64_a_start[]; + +ENTRY_FUNCTION(start_quartz64a, r0, r1, r2) +{ + putc_ll('>'); + + if (current_el() == 3) + relocate_to_adr_full(RK3568_BAREBOX_LOAD_ADDRESS); + else + relocate_to_current_adr(); + + setup_c(); + + rk3568_barebox_entry(__dtb_rk3566_quartz64_a_start); +} |