summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/bootmem.h4
-rw-r--r--src/include/console/usb.h2
-rw-r--r--src/include/device/device.h3
-rw-r--r--src/include/stdbool.h16
-rw-r--r--src/include/stdint.h9
-rw-r--r--src/include/types.h3
6 files changed, 22 insertions, 15 deletions
diff --git a/src/include/bootmem.h b/src/include/bootmem.h
index 2e33fcdf76..53e2d0f9db 100644
--- a/src/include/bootmem.h
+++ b/src/include/bootmem.h
@@ -16,9 +16,9 @@
#ifndef BOOTMEM_H
#define BOOTMEM_H
-#include <memrange.h>
-#include <stdint.h>
#include <boot/coreboot_tables.h>
+#include <memrange.h>
+#include <types.h>
/**
* Bootmem types match to LB_MEM tags, except for the following:
diff --git a/src/include/console/usb.h b/src/include/console/usb.h
index 33edbf6e5f..ad57d522dc 100644
--- a/src/include/console/usb.h
+++ b/src/include/console/usb.h
@@ -17,7 +17,7 @@
#ifndef _CONSOLE_USB_H_
#define _CONSOLE_USB_H_
-#include <stdint.h>
+#include <types.h>
void usbdebug_init(void);
int usbdebug_hw_init(bool force);
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 405d816e15..b1c1651ec9 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -9,11 +9,10 @@
*/
#if !defined(__ROMCC__)
-#include <stdint.h>
-#include <stddef.h>
#include <device/resource.h>
#include <device/path.h>
#include <device/pci_type.h>
+#include <types.h>
struct device;
struct pci_operations;
diff --git a/src/include/stdbool.h b/src/include/stdbool.h
new file mode 100644
index 0000000000..2eeb70ef5b
--- /dev/null
+++ b/src/include/stdbool.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __STDBOOL_H__
+#define __STDBOOL_H__
+
+#include <stdint.h>
+
+#ifdef __ROMCC__
+typedef uint8_t bool;
+#else
+typedef _Bool bool;
+#endif
+#define true 1
+#define false 0
+
+#endif /* __STDBOOL_H__ */
diff --git a/src/include/stdint.h b/src/include/stdint.h
index 0a8e153d6a..67b0b0be08 100644
--- a/src/include/stdint.h
+++ b/src/include/stdint.h
@@ -101,13 +101,4 @@ typedef uint64_t u64;
#define UINTMAX_MAX UINT64_MAX
#endif
-/* TODO: move into stdbool.h */
-#ifdef __ROMCC__
-typedef uint8_t bool;
-#else
-typedef _Bool bool;
-#endif
-#define true 1
-#define false 0
-
#endif /* STDINT_H */
diff --git a/src/include/types.h b/src/include/types.h
index 5902bc268a..30f243ff99 100644
--- a/src/include/types.h
+++ b/src/include/types.h
@@ -16,7 +16,8 @@
#ifndef __TYPES_H
#define __TYPES_H
-/* types.h is supposed to provide stdint and stddef defined in here: */
+/* types.h is supposed to provide the standard headers defined in here: */
+#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>