summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorG S Niteesh <gsnb.gn@gmail.com>2020-01-03 08:56:14 +0530
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2020-01-07 17:55:13 +0100
commiteca25efe2790b528e30b8e31eb1457be10b3666d (patch)
tree92d1803b949af535724eaf94ff4de3d9e4114375
parentf1f6cd95c9f421bdd5683258670a9cea98b794ee (diff)
downloadrtems-eca25efe2790b528e30b8e31eb1457be10b3666d.tar.bz2
bsp/raspberrypi: Enable FDT support.
This commit adds FDT support to the BSP.
-rw-r--r--bsps/arm/raspberrypi/include/bsp.h4
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/Makefile.am1
-rw-r--r--c/src/lib/libbsp/arm/raspberrypi/configure.ac12
3 files changed, 17 insertions, 0 deletions
diff --git a/bsps/arm/raspberrypi/include/bsp.h b/bsps/arm/raspberrypi/include/bsp.h
index 1075cb1771..b81d19cd76 100644
--- a/bsps/arm/raspberrypi/include/bsp.h
+++ b/bsps/arm/raspberrypi/include/bsp.h
@@ -41,6 +41,10 @@ extern "C" {
#define BSP_FEATURE_IRQ_EXTENSION
+#if BSP_START_COPY_FDT_FROM_U_BOOT
+#define BSP_FDT_IS_SUPPORTED
+#endif
+
#define RPI_L2_CACHE_ENABLE 1
#define BSP_GPIO_PIN_COUNT 32
diff --git a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
index 5326deb8a3..be154bf675 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
+++ b/c/src/lib/libbsp/arm/raspberrypi/Makefile.am
@@ -45,6 +45,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/sbrk.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/stackalloc.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/start/bsp-start-memcpy.S
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/shared/start/bsp-fdt.c
# Startup
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/raspberrypi/start/bspstart.c
diff --git a/c/src/lib/libbsp/arm/raspberrypi/configure.ac b/c/src/lib/libbsp/arm/raspberrypi/configure.ac
index 452aa4d029..84780db4c0 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/configure.ac
+++ b/c/src/lib/libbsp/arm/raspberrypi/configure.ac
@@ -15,6 +15,18 @@ RTEMS_CANONICAL_TARGET_CPU
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
RTEMS_BSP_CONFIGURE
+RTEMS_BSPOPTS_SET([BSP_START_COPY_FDT_FROM_U_BOOT],[*],[1])
+RTEMS_BSPOPTS_HELP([BSP_START_COPY_FDT_FROM_U_BOOT],[copy the U-Boot provided FDT to an internal storage])
+
+RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_SIZE_MAX],[*],[262144])
+RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_SIZE_MAX],[maximum size of the FDT blob in bytes])
+
+RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_READ_ONLY],[*],[1])
+RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_READ_ONLY],[place the FDT blob into the read-only data area])
+
+RTEMS_BSPOPTS_SET([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[*],[1])
+RTEMS_BSPOPTS_HELP([BSP_FDT_BLOB_COPY_TO_READ_ONLY_LOAD_AREA],[copy the FDT blob into the read-only load area via bsp_fdt_copy()])
+
RTEMS_BSPOPTS_SET([BSP_START_RESET_VECTOR],[*],[])
RTEMS_BSPOPTS_HELP([BSP_START_RESET_VECTOR],[reset vector address for BSP start])