]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/aboot.h
board: Switch Abilis TB-100 board to Driver Model for serial port
[people/ms/u-boot.git] / include / aboot.h
CommitLineData
e6ca1ad6
SR
1/*
2 * Copyright 2014 Broadcom Corporation.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <part.h>
8#include <sparse_format.h>
9
10#define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1))
11
12void fastboot_fail(const char *s);
13void fastboot_okay(const char *s);
14
15static inline int is_sparse_image(void *buf)
16{
17 sparse_header_t *s_header = (sparse_header_t *)buf;
18
19 if ((le32_to_cpu(s_header->magic) == SPARSE_HEADER_MAGIC) &&
20 (le16_to_cpu(s_header->major_version) == 1))
21 return 1;
22
23 return 0;
24}
25
26void write_sparse_image(block_dev_desc_t *dev_desc,
27 disk_partition_t *info, const char *part_name,
28 void *data, unsigned sz);