]> Git Repo - u-boot.git/blame - test/boot/bootstd_common.h
arm: qemu: Move GUIDs to the C file
[u-boot.git] / test / boot / bootstd_common.h
CommitLineData
fb1451be
SG
1/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Common header file for bootdev, bootflow, bootmeth tests
4 *
5 * Copyright 2021 Google LLC
6 * Written by Simon Glass <[email protected]>
7 */
8
9#ifndef __bootstd_common_h
10#define __bootstd_common_h
11
bfdfc5d8
SG
12#include <version_string.h>
13
fb1451be
SG
14/* Declare a new bootdev test */
15#define BOOTSTD_TEST(_name, _flags) \
16 UNIT_TEST(_name, _flags, bootstd_test)
17
bfdfc5d8
SG
18#define NVDATA_START_BLK ((0x400 + 0x400) / MMC_MAX_BLOCK_LEN)
19#define VERSION_START_BLK ((0x400 + 0x800) / MMC_MAX_BLOCK_LEN)
20#define TEST_VERSION "U-Boot v2022.04-local2"
21#define TEST_VERNUM 0x00010002
22
18552d2a 23enum {
662cfa03 24 MAX_HUNTER = 9,
18552d2a
SG
25 MMC_HUNTER = 3, /* ID of MMC hunter */
26};
27
fb1451be
SG
28struct unit_test_state;
29
30/**
31 * bootstd_test_drop_bootdev_order() - Remove the existing boot order
32 *
33 * Drop the boot order so that all bootdevs are used in their alias order
34 *
35 * @uts: Unit test state to use for ut_assert...() functions
36 */
37int bootstd_test_drop_bootdev_order(struct unit_test_state *uts);
38
bfdfc5d8
SG
39/**
40 * bootstd_setup_for_tests() - Set up MMC data for VBE tests
41 *
42 * Some data is needed for VBE tests to work. This function sets that up.
43 *
44 * @return 0 if OK, -ve on error
45 */
46int bootstd_setup_for_tests(void);
47
66e3dce7
SG
48/**
49 * bootstd_test_check_mmc_hunter() - Check that the mmc bootdev hunter was used
50 *
51 * @uts: Unit test state to use for ut_assert...() functions
52 * Returns: 0 if OK (used), other value on error (not used)
53 */
54int bootstd_test_check_mmc_hunter(struct unit_test_state *uts);
55
fb1451be 56#endif
This page took 0.049201 seconds and 4 git commands to generate.