]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/display_options.h
54bd41d10de66681a396efb4905db3e51cd19700
[karo-tx-uboot.git] / include / display_options.h
1 /*
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  */
23 void print_size(uint64_t size, const char *suffix);
24
25 /**
26  * print_buffer() - Print data buffer in hex and ascii form
27  *
28  * Data reads are buffered so that each memory address is only read once.
29  * This is useful when displaying the contents of volatile registers.
30  *
31  * @addr:       Starting address to display at start of line
32  * @data:       pointer to data buffer
33  * @width:      data value width.  May be 1, 2, or 4.
34  * @count:      number of values to display
35  * @linelen:    Number of values to print per line; specify 0 for default length
36  */
37 int print_buffer(ulong addr, const void *data, uint width, uint count,
38                  uint linelen);
39
40 /**
41  * display_options() - display the version string / build tag
42  *
43  * This displays the U-Boot version string. If a build tag is available this
44  * is displayed also.
45  */
46 int display_options(void);
47
48 #endif