diff --git a/bsps/arm/include/libcpu/am335x.h b/bsps/arm/include/libcpu/am335x.h
index c29ae6c761..367e97cae9 100644
--- a/bsps/arm/include/libcpu/am335x.h
+++ b/bsps/arm/include/libcpu/am335x.h
@@ -16,6 +16,9 @@
  * ones, and merge with some other header files.
  */
 
+#if !defined(_AM335X_H_)
+#define _AM335X_H_
+
 /* Interrupt controller memory map */
 #define OMAP3_DM37XX_INTR_BASE 0x48200000 /* INTCPS physical address */
 
@@ -485,7 +488,6 @@
 #define AM335X_PWMSS_SYSCONFIG     0x4
 #define AM335X_PWMSS_CLKCONFIG     0x8
 #define AM335X_PWMSS_CLK_EN_ACK        0x100
-#define AM335X_PWMSS_CLKSTATUS     0xC
 #define AM335X_EPWM_TBCTL          0x0
 #define AM335X_EPWM_TBSTS          0x2
 #define AM335X_EPWM_TBPHSHR        0x4
@@ -536,7 +538,6 @@
 #define AM335X_EPWM_TBCTL_CTRMODE             (0x0003u)
 #define AM335X_EPWM_COUNTER_MODE_MASK         AM335X_EPWM_TBCTL_CTRMODE
 #define AM335X_TBCTL_FREERUN                  (2 << 14)
-#define AM335X_TBCTL_CTRMODE_UP               (0x0000u)
 #define AM335X_TBCTL_CTRMODE_SHIFT            (0x0000u)
 #define AM335X_EPWM_COUNT_UP                  (AM335X_TBCTL_CTRMODE_UP << \
                                                      AM335X_TBCTL_CTRMODE_SHIFT)
@@ -699,3 +700,5 @@
 #define AM335X_I2C_IRQSTATUS_RAW_BB   (0x00001000u)
 #define AM335X_CM_PER_OCPWP_L3_CLKSTCTRL_CLKACTIVITY_OCPWP_L4_GCLK (0x00000020u)
 #define AM335X_I2C_INT_STOP_CONDITION AM335X_I2C_IRQSTATUS_BF
+
+#endif
diff --git a/bsps/include/bsp/gpio.h b/bsps/include/bsp/gpio.h
index 7d8f67b171..64a877ae7a 100644
--- a/bsps/include/bsp/gpio.h
+++ b/bsps/include/bsp/gpio.h
@@ -42,6 +42,7 @@ extern "C" {
   #define GPIO_BANK_COUNT (BSP_GPIO_PIN_COUNT / BSP_GPIO_PINS_PER_BANK) + 1
 #else
   #define GPIO_BANK_COUNT BSP_GPIO_PIN_COUNT / BSP_GPIO_PINS_PER_BANK
+  #undef GPIO_LAST_BANK_PINS
   #define GPIO_LAST_BANK_PINS BSP_GPIO_PINS_PER_BANK
 #endif
 
diff --git a/c/src/lib/libbsp/shared/console.c b/c/src/lib/libbsp/shared/console.c
index 6d287c8726..fcdd6eeaa4 100644
--- a/c/src/lib/libbsp/shared/console.c
+++ b/c/src/lib/libbsp/shared/console.c
@@ -26,7 +26,7 @@
 
 #include <rtems/termiostypes.h>
 #include <libchip/serial.h>
-#include "console_private.h"
+#include <rtems/console_private.h>
 
 unsigned long               Console_Port_Count  = 0;
 console_tbl               **Console_Port_Tbl    = NULL;
diff --git a/c/src/lib/libbsp/shared/console_control.c b/c/src/lib/libbsp/shared/console_control.c
index 9bf029151d..fbb3308eac 100644
--- a/c/src/lib/libbsp/shared/console_control.c
+++ b/c/src/lib/libbsp/shared/console_control.c
@@ -28,7 +28,7 @@
 #include <rtems/termiostypes.h>
 #include <rtems/console.h>
 #include <libchip/serial.h>
-#include "console_private.h"
+#include <rtems/console_private.h>
 
 /*
  *  console_control
diff --git a/c/src/lib/libbsp/shared/console_read.c b/c/src/lib/libbsp/shared/console_read.c
index 407d5e61db..f9bc458d26 100644
--- a/c/src/lib/libbsp/shared/console_read.c
+++ b/c/src/lib/libbsp/shared/console_read.c
@@ -27,7 +27,7 @@
 #include <rtems/termiostypes.h>
 #include <rtems/console.h>
 #include <libchip/serial.h>
-#include "console_private.h"
+#include <rtems/console_private.h>
 
 /*
  *  console_read
diff --git a/c/src/lib/libbsp/shared/console_select.c b/c/src/lib/libbsp/shared/console_select.c
index f2f2e8b694..f7f862f9e9 100644
--- a/c/src/lib/libbsp/shared/console_select.c
+++ b/c/src/lib/libbsp/shared/console_select.c
@@ -27,7 +27,7 @@
 
 #include <rtems/termiostypes.h>
 #include <libchip/serial.h>
-#include "console_private.h"
+#include <rtems/console_private.h>
 
 /*
  * Method to return true if the device associated with the
diff --git a/c/src/lib/libbsp/shared/console_write.c b/c/src/lib/libbsp/shared/console_write.c
index cc69b83b5a..6aa683582a 100644
--- a/c/src/lib/libbsp/shared/console_write.c
+++ b/c/src/lib/libbsp/shared/console_write.c
@@ -27,7 +27,7 @@
 #include <rtems/termiostypes.h>
 #include <rtems/console.h>
 #include <libchip/serial.h>
-#include "console_private.h"
+#include <rtems/console_private.h>
 
 /*
  *  console_write
diff --git a/c/src/libchip/ide/ata.c b/c/src/libchip/ide/ata.c
index 73293b31eb..7bb3f6ec73 100644
--- a/c/src/libchip/ide/ata.c
+++ b/c/src/libchip/ide/ata.c
@@ -22,7 +22,7 @@
 #include <rtems/blkdev.h>
 #include <libchip/ide_ctrl_io.h>
 #include <libchip/ide_ctrl_cfg.h>
-#include "ata_internal.h"
+#include <libchip/ata_internal.h>
 #include <libchip/ata.h>
 
 #define ATA_DEBUG 0
diff --git a/c/src/libchip/ide/ata_util.c b/c/src/libchip/ide/ata_util.c
index 771ab7363f..68e0f0bbe5 100644
--- a/c/src/libchip/ide/ata_util.c
+++ b/c/src/libchip/ide/ata_util.c
@@ -9,13 +9,12 @@
  * http://www.rtems.org/license/LICENSE.
  */
 
-#include "ata_internal.h"
-
 #include <assert.h>
 #include <string.h>
 
 #include <libchip/ide_ctrl_io.h>
 #include <libchip/ide_ctrl_cfg.h>
+#include <libchip/ata_internal.h>
 
 /* ata_process_request_on_init_phase --
  *     Process the ATA request during system initialization. Request
diff --git a/c/src/libchip/serial/ns16550.c b/c/src/libchip/serial/ns16550.c
index e6c192a712..b1e5892c15 100644
--- a/c/src/libchip/serial/ns16550.c
+++ b/c/src/libchip/serial/ns16550.c
@@ -43,8 +43,8 @@
 
 #include <bsp.h>
 
-#include "ns16550_p.h"
-#include "ns16550.h"
+#include <libchip/ns16550_p.h>
+#include <libchip/ns16550.h>
 
 #if defined(BSP_FEATURE_IRQ_EXTENSION)
   #include <bsp/irq.h>
diff --git a/c/src/libchip/serial/ns16550-context.c b/c/src/libchip/serial/ns16550-context.c
index 3c419780ae..4267c27026 100644
--- a/c/src/libchip/serial/ns16550-context.c
+++ b/c/src/libchip/serial/ns16550-context.c
@@ -1,6 +1,6 @@
 /**
  *  @file
- *  
+ *
  *  This file contains the TTY driver for the National Semiconductor NS16550.
  *
  *  This part is widely cloned and second sourced.  It is found in a number
@@ -36,8 +36,8 @@
 
 #include <bsp.h>
 
-#include "ns16550.h"
-#include "ns16550_p.h"
+#include <libchip/ns16550.h>
+#include <libchip/ns16550_p.h>
 
 #if defined(BSP_FEATURE_IRQ_EXTENSION)
   #include <bsp/irq.h>
@@ -133,7 +133,7 @@ bool ns16550_probe(rtems_termios_device_context *base)
 
   ctx->modem_control = SP_MODEM_IRQ;
 
-  pNS16550 = ctx->port;    
+  pNS16550 = ctx->port;
   setReg   = ctx->set_reg;
   getReg   = ctx->get_reg;
 
