aboutsummaryrefslogtreecommitdiff
path: root/include/hw/ppc/fdt.h
blob: 2e5c61af14154b911c24a8f9f4676b98bd39f1e8 (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
/*
 * QEMU PowerPC helper routines for the device tree.
 *
 * Copyright (C) 2016 IBM Corp.
 *
 * This code is licensed under the GPL version 2 or later. See the
 * COPYING file in the top-level directory.
 */

#ifndef PPC_FDT_H
#define PPC_FDT_H

#include "qemu/error-report.h"

#define _FDT(exp)                                                  \
    do {                                                           \
        int ret = (exp);                                           \
        if (ret < 0) {                                             \
            error_report("error creating device tree: %s: %s",   \
                    #exp, fdt_strerror(ret));                      \
            exit(1);                                               \
        }                                                          \
    } while (0)

#endif /* PPC_FDT_H */