summaryrefslogtreecommitdiffstats
path: root/src/include/post.h
blob: 0eb2c3a2add0768aaf31a378b90a2f4c4b35e1cc (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
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef __POST_H__
#define __POST_H__

#include <stdint.h>
#include <device/device.h>

void cmos_post_init(void);
void cmos_post_code(u8 value);
void cmos_post_extra(u32 value);
void cmos_post_path(const struct device *dev);
int cmos_post_previous_boot(u8 *code, u32 *extra);

static inline void post_log_path(const struct device *dev)
{
	if (CONFIG(CMOS_POST) && dev)
		cmos_post_path(dev);
}

static inline void post_log_clear(void)
{
	if (CONFIG(CMOS_POST))
		cmos_post_extra(0);
}

#endif