[sw] Promulgate better use of standard headers.

Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
diff --git a/sw/device/benchmarks/coremark/top_earlgrey/core_portme.h b/sw/device/benchmarks/coremark/top_earlgrey/core_portme.h
index fdc6604..a26734c 100644
--- a/sw/device/benchmarks/coremark/top_earlgrey/core_portme.h
+++ b/sw/device/benchmarks/coremark/top_earlgrey/core_portme.h
@@ -12,6 +12,8 @@
 #ifndef CORE_PORTME_H
 #define CORE_PORTME_H
 
+#include <stddef.h>
+
 #include "sw/device/lib/common.h"
 #include "sw/device/lib/uart.h"
 
diff --git a/sw/device/boot_rom/boot_rom.c b/sw/device/boot_rom/boot_rom.c
index eefd01c..b71a2ec 100644
--- a/sw/device/boot_rom/boot_rom.c
+++ b/sw/device/boot_rom/boot_rom.c
@@ -2,8 +2,11 @@
 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
 // SPDX-License-Identifier: Apache-2.0
 
+#include <stdnoreturn.h>
+
 #include "sw/device/boot_rom/bootstrap.h"
 #include "sw/device/boot_rom/chip_info.h"  // Generated.
+#include "sw/device/lib/base/stdasm.h"
 #include "sw/device/lib/common.h"
 #include "sw/device/lib/flash_ctrl.h"
 #include "sw/device/lib/gpio.h"
diff --git a/sw/device/exts/common/_crt.c b/sw/device/exts/common/_crt.c
index e10436e..5084ee8 100644
--- a/sw/device/exts/common/_crt.c
+++ b/sw/device/exts/common/_crt.c
@@ -2,7 +2,10 @@
 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
 // SPDX-License-Identifier: Apache-2.0
 
-#include "sw/device/lib/common.h"
+#include <stddef.h>
+#include <stdnoreturn.h>
+
+#include "sw/device/lib/base/memory.h"
 #include "sw/device/lib/irq.h"
 
 extern int main(int, char **);
diff --git a/sw/device/lib/common.h b/sw/device/lib/common.h
index 8ef1c51..f8078af 100644
--- a/sw/device/lib/common.h
+++ b/sw/device/lib/common.h
@@ -5,14 +5,6 @@
 #ifndef _COMMON_H_
 #define _COMMON_H_
 
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdnoreturn.h>
-
-#include "sw/device/lib/base/stdasm.h"
-#include "sw/device/lib/base/memory.h"
-
 #ifdef SIMULATION
 #define CLK_FIXED_FREQ_HZ (500 * 1000)
 static const unsigned long UART_BAUD_RATE = 9600;
diff --git a/sw/device/lib/gpio.c b/sw/device/lib/gpio.c
index f3aedae..d8a6f05 100644
--- a/sw/device/lib/gpio.c
+++ b/sw/device/lib/gpio.c
@@ -4,6 +4,7 @@
 
 #include "sw/device/lib/gpio.h"
 
+#include "sw/device/lib/base/memory.h"
 #include "sw/device/lib/common.h"
 
 void gpio_init(uint32_t oe) { REG32(GPIO_DIRECT_OE(0)) = oe; }
diff --git a/sw/device/lib/irq.c b/sw/device/lib/irq.c
index f57f5e7..8955436 100644
--- a/sw/device/lib/irq.c
+++ b/sw/device/lib/irq.c
@@ -4,7 +4,7 @@
 
 #include "sw/device/lib/irq.h"
 
-#include "sw/device/lib/common.h"
+#include "sw/device/lib/base/stdasm.h"
 
 static const uint32_t IRQ_EXT_ENABLE_OFFSET = 11;
 static const uint32_t IRQ_TIMER_ENABLE_OFFSET = 7;
diff --git a/sw/device/lib/usb_controlep.c b/sw/device/lib/usb_controlep.c
index 79e1c48..9babc1b 100644
--- a/sw/device/lib/usb_controlep.c
+++ b/sw/device/lib/usb_controlep.c
@@ -2,12 +2,11 @@
 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
 // SPDX-License-Identifier: Apache-2.0
 
-// Get NULL from here
-#include "usb_controlep.h"
+#include "sw/device/lib/usb_controlep.h"
 
 #include "sw/device/lib/common.h"
-#include "usb_consts.h"
-#include "usbdev.h"
+#include "sw/device/lib/usb_consts.h"
+#include "sw/device/lib/usbdev.h"
 
 // Device descriptor
 static uint8_t dev_dscr[] = {
diff --git a/sw/device/lib/usb_controlep.h b/sw/device/lib/usb_controlep.h
index b10d8df..edaefa8 100644
--- a/sw/device/lib/usb_controlep.h
+++ b/sw/device/lib/usb_controlep.h
@@ -5,8 +5,10 @@
 #ifndef __USB_CONTROLEP_H__
 #define __USB_CONTROLEP_H__
 
-#include "sw/device/lib/common.h"
-#include "usbdev.h"
+#include <stddef.h>
+#include <stdint.h>
+
+#include "sw/device/lib/usbdev.h"
 
 typedef enum ctstate {
   kCtIdle,
diff --git a/sw/device/lib/usb_simpleserial.c b/sw/device/lib/usb_simpleserial.c
index 3de162f..3ce3f8d 100644
--- a/sw/device/lib/usb_simpleserial.c
+++ b/sw/device/lib/usb_simpleserial.c
@@ -2,11 +2,10 @@
 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
 // SPDX-License-Identifier: Apache-2.0
 
-// Get NULL from here
-#include "usb_simpleserial.h"
+#include "sw/device/lib/usb_simpleserial.h"
 
 #include "sw/device/lib/common.h"
-#include "usbdev.h"
+#include "sw/device/lib/usbdev.h"
 
 #define MAX_GATHER 16
 
diff --git a/sw/device/lib/usb_simpleserial.h b/sw/device/lib/usb_simpleserial.h
index dbb994a..daad16b 100644
--- a/sw/device/lib/usb_simpleserial.h
+++ b/sw/device/lib/usb_simpleserial.h
@@ -5,6 +5,9 @@
 #ifndef __USB_SIMPLESERIAL_H__
 #define __USB_SIMPLESERIAL_H__
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include "sw/device/lib/common.h"
 #include "usbdev.h"
 
diff --git a/sw/device/lib/usbdev.c b/sw/device/lib/usbdev.c
index b8a5164..499bc16 100644
--- a/sw/device/lib/usbdev.c
+++ b/sw/device/lib/usbdev.c
@@ -2,8 +2,7 @@
 // Licensed under the Apache License, Version 2.0, see LICENSE for details.
 // SPDX-License-Identifier: Apache-2.0
 
-// Get NULL from here
-#include "usbdev.h"
+#include "sw/device/lib/usbdev.h"
 
 #include "sw/device/lib/common.h"