[PATCH v2 2/7] arm/raspberrypi: ensure that correct RPI_PERIPHERAL_BASE is provided by raspberrypi.h
ppisa4lists at pikron.com
ppisa4lists at pikron.com
Sun May 22 00:13:05 UTC 2016
From: Pavel Pisa <ppisa at pikron.com>
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.
---
c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c | 1 +
c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h | 1 +
c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c | 1 +
c/src/lib/libbsp/arm/raspberrypi/misc/timer.c | 1 +
4 files changed, 4 insertions(+)
diff --git a/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c b/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c
index 2788d36..6c01d62 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/gpio/rpi-gpio.c
@@ -14,6 +14,7 @@
* http://www.rtems.org/license/LICENSE.
*/
+#include <bsp.h>
#include <bsp/raspberrypi.h>
#include <bsp/irq-generic.h>
#include <bsp/gpio.h>
diff --git a/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h b/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h
index d6f00e8..60645b9 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h
+++ b/c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h
@@ -21,6 +21,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/mailbox.c b/c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c
index 9d70c72..37890dd 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/misc/mailbox.c
@@ -17,6 +17,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include <bsp.h>
#include <bsp/raspberrypi.h>
#include <bsp/mailbox.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>
--
1.9.1
More information about the devel
mailing list