blob: ac44c459b3bf1e44c1b69e92d2fc16b4b87bf649 [file] [log] [blame]
Simon Glass2ea09c82015-04-28 20:25:07 -06001/*
2 * Copyright (c) 2015 Google, Inc
3 *
4 * (C) Copyright 2000-2002
5 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 *
7 * SPDX-License-Identifier: GPL-2.0+
8 */
9
10#ifndef __DISPLAY_OPTIONS_H
11#define __DISPLAY_OPTIONS_H
12
13/**
14 * print_size() - Print a size with a suffix
15 *
16 * Print sizes as "xxx KiB", "xxx.y KiB", "xxx MiB", "xxx.y MiB",
17 * xxx GiB, xxx.y GiB, etc as needed; allow for optional trailing string
18 * (like "\n")
19 *
20 * @size: Size to print
21 * @suffix String to print after the size
22 */
23void print_size(uint64_t size, const char *suffix);
24
25/**
Simon Glass33eac2d2015-04-29 07:56:43 -060026 * print_freq() - Print a frequency with a suffix
27 *
28 * Print frequencies as "x.xx GHz", "xxx KHz", etc as needed; allow for
29 * optional trailing string (like "\n")
30 *
31 * @freq: Frequency to print in Hz
32 * @suffix String to print after the frequency
33 */
34void print_freq(uint64_t freq, const char *suffix);
35
36/**
Simon Glass2ea09c82015-04-28 20:25:07 -060037 * print_buffer() - Print data buffer in hex and ascii form
38 *
39 * Data reads are buffered so that each memory address is only read once.
40 * This is useful when displaying the contents of volatile registers.
41 *
42 * @addr: Starting address to display at start of line
43 * @data: pointer to data buffer
44 * @width: data value width. May be 1, 2, or 4.
45 * @count: number of values to display
46 * @linelen: Number of values to print per line; specify 0 for default length
47 */
48int print_buffer(ulong addr, const void *data, uint width, uint count,
49 uint linelen);
50
51/**
52 * display_options() - display the version string / build tag
53 *
54 * This displays the U-Boot version string. If a build tag is available this
55 * is displayed also.
56 */
57int display_options(void);
58
59#endif