[rtems commit] arm/raspberrypi: ensure that correct RPI_PERIPHERAL_BASE is provided by raspberrypi.h

Pavel Pisa ppisa at rtems.org
Sun Oct 2 08:47:07 UTC 2016


Module:    rtems
Branch:    4.11
Commit:    b5501ba492535a9868d182d77dd7c62529fc1c19
Changeset: http://git.rtems.org/rtems/commit/?id=b5501ba492535a9868d182d77dd7c62529fc1c19

Author:    Pavel Pisa <ppisa at pikron.com>
Date:      Sat May 21 23:50:31 2016 +0200

arm/raspberrypi: ensure that correct RPI_PERIPHERAL_BASE is provided by raspberrypi.h

If the raspberrypi.h has been included without preceding inclussion
of bsp.h then BSP_IS_RPI2 has not been set for Raspberry Pi 2
BSP variant and bad things happen later.

The patch includes bspopts.h by raspberrypi.h and even includes
bsp.h in critical peripherals support.

Updates #2783

---

 c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h | 1 +
 c/src/lib/libbsp/arm/raspberrypi/misc/timer.c          | 1 +
 2 files changed, 2 insertions(+)

diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h b/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h
index c33e22a..e7bcd98 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h
+++ b/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h
@@ -20,6 +20,7 @@
 #ifndef LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H
 #define LIBBSP_ARM_RASPBERRYPI_RASPBERRYPI_H
 
+#include <bspopts.h>
 #include <stdint.h>
 #include <bsp/utility.h>
 
diff --git a/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c b/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
index e90af08..1047b3e 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/misc/timer.c
@@ -16,6 +16,7 @@
  *
  */
 
+#include <bsp.h>
 #include <rtems.h>
 #include <rtems/btimer.h>
 #include <bsp/raspberrypi.h>




More information about the vc mailing list