summaryrefslogtreecommitdiff
path: root/include/pbl.h
blob: 7dc4fa3092579b54413acbc01e3bfae69632962f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
 */

#ifndef __PBL_H__
#define __PBL_H__

#include <linux/types.h>

extern unsigned long free_mem_ptr;
extern unsigned long free_mem_end_ptr;

void pbl_barebox_uncompress(void *dest, void *compressed_start, unsigned int len);

#ifdef __PBL__
#define IN_PBL	1
#else
#define IN_PBL	0
#endif

void fdt_find_mem(const void *fdt, unsigned long *membase, unsigned long *memsize);

struct fdt_device_id {
	const char *compatible;
	const void *data;
};

const void *
fdt_device_get_match_data(const void *fdt, const char *nodepath,
			  const struct fdt_device_id ids[]);

int pbl_barebox_verify(const void *compressed_start, unsigned int len,
		       const void *hash, unsigned int hash_len);

#endif /* __PBL_H__ */