blob: 677402470edc438648cc9492e444576136359554 [file] [log] [blame]
Andrew Scull451b8b12022-05-30 10:00:12 +00001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) 2022 Google, Inc.
4 * Written by Andrew Scull <ascull@google.com>
5 */
6
Andrew Scull451b8b12022-05-30 10:00:12 +00007#include <dm.h>
8#include <fuzzing_engine.h>
9#include <asm/fuzzing_engine.h>
10
11static int get_input(struct udevice *dev,
12 const uint8_t **data,
13 size_t *size)
14{
15 return sandbox_fuzzing_engine_get_input(data, size);
16}
17
18static const struct dm_fuzzing_engine_ops sandbox_fuzzing_engine_ops = {
19 .get_input = get_input,
20};
21
22static const struct udevice_id sandbox_fuzzing_engine_match[] = {
23 {
24 .compatible = "sandbox,fuzzing-engine",
25 },
26 {},
27};
28
29U_BOOT_DRIVER(sandbox_fuzzing_engine) = {
30 .name = "sandbox-fuzzing-engine",
31 .id = UCLASS_FUZZING_ENGINE,
32 .of_match = sandbox_fuzzing_engine_match,
33 .ops = &sandbox_fuzzing_engine_ops,
34};