summaryrefslogtreecommitdiffstats
path: root/bsps/arm/gumstix
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-20 10:35:35 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-20 13:52:14 +0200
commit99648958668d3a33ee57974479b36201fe303f34 (patch)
tree6f27ea790e2823c6156e71219a4f54680263fac6 /bsps/arm/gumstix
parentbsps: Move start files to bsps (diff)
downloadrtems-99648958668d3a33ee57974479b36201fe303f34.tar.bz2
bsps: Move startup files to bsps
Adjust build support files to new directory layout. This patch is a part of the BSP source reorganization. Update #3285.
Diffstat (limited to 'bsps/arm/gumstix')
-rw-r--r--bsps/arm/gumstix/start/bsp_specs9
-rw-r--r--bsps/arm/gumstix/start/bspreset.c18
-rw-r--r--bsps/arm/gumstix/start/bspstart.c40
-rw-r--r--bsps/arm/gumstix/start/linkcmds27
-rw-r--r--bsps/arm/gumstix/start/memmap.c17
5 files changed, 111 insertions, 0 deletions
diff --git a/bsps/arm/gumstix/start/bsp_specs b/bsps/arm/gumstix/start/bsp_specs
new file mode 100644
index 0000000000..47dd31d46b
--- /dev/null
+++ b/bsps/arm/gumstix/start/bsp_specs
@@ -0,0 +1,9 @@
+%rename endfile old_endfile
+%rename startfile old_startfile
+
+*startfile:
+%{!qrtems: %(old_startfile)} \
+%{!nostdlib: %{qrtems: crti.o%s crtbegin.o%s}}
+
+*endfile:
+%{!qrtems: %(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s}
diff --git a/bsps/arm/gumstix/start/bspreset.c b/bsps/arm/gumstix/start/bspreset.c
new file mode 100644
index 0000000000..ab7c5ffc8f
--- /dev/null
+++ b/bsps/arm/gumstix/start/bspreset.c
@@ -0,0 +1,18 @@
+/*
+ * By Yang Xi <hiyangxi@gmail.com>.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <bsp.h>
+#include <bsp/bootcard.h>
+#include <pxa255.h>
+
+void bsp_reset( void )
+{
+#if ON_SKYEYE == 1
+ SKYEYE_MAGIC_ADDRESS = 0xff;
+#endif
+}
diff --git a/bsps/arm/gumstix/start/bspstart.c b/bsps/arm/gumstix/start/bspstart.c
new file mode 100644
index 0000000000..f86bf3d6e3
--- /dev/null
+++ b/bsps/arm/gumstix/start/bspstart.c
@@ -0,0 +1,40 @@
+/*
+ * By Yang Xi <hiyangxi@gmail.com>.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <bsp.h>
+#include <bsp/irq-generic.h>
+#include <rtems/libcsupport.h>
+#include <rtems/libio.h>
+#include <pxa255.h>
+
+/*
+ *
+ * NAME: bsp_start_default - BSP initialization function
+ *
+ * DESCRIPTION:
+ * This function is called before RTEMS is initialized and used
+ * adjust the kernel's configuration.
+ *
+ * This function also configures the CPU's memory protection unit.
+ *
+ * RESTRICTIONS/LIMITATIONS:
+ * Since RTEMS is not configured, no RTEMS functions can be called.
+ *
+ */
+static void bsp_start_default( void )
+{
+ /* disable interrupts */
+ XSCALE_INT_ICMR = 0x0;
+ bsp_interrupt_initialize();
+} /* bsp_start */
+
+/*
+ * By making this a weak alias for bsp_start_default, a brave soul
+ * can override the actual bsp_start routine used.
+ */
+void bsp_start (void) __attribute__ ((weak, alias("bsp_start_default")));
diff --git a/bsps/arm/gumstix/start/linkcmds b/bsps/arm/gumstix/start/linkcmds
new file mode 100644
index 0000000000..08cb2fc47a
--- /dev/null
+++ b/bsps/arm/gumstix/start/linkcmds
@@ -0,0 +1,27 @@
+MEMORY {
+ SDRAM_MMU : ORIGIN = 0xa0000000, LENGTH = 16k
+ SDRAM : ORIGIN = 0xa0004000, LENGTH = 64M - 16k
+ SRAM : ORIGIN = 0x00000000, LENGTH = 16k
+}
+
+REGION_ALIAS ("REGION_START", SDRAM);
+REGION_ALIAS ("REGION_VECTOR", SDRAM);
+REGION_ALIAS ("REGION_TEXT", SDRAM);
+REGION_ALIAS ("REGION_TEXT_LOAD", SDRAM);
+REGION_ALIAS ("REGION_RODATA", SDRAM);
+REGION_ALIAS ("REGION_RODATA_LOAD", SDRAM);
+REGION_ALIAS ("REGION_DATA", SDRAM);
+REGION_ALIAS ("REGION_DATA_LOAD", SDRAM);
+REGION_ALIAS ("REGION_FAST_TEXT", SDRAM);
+REGION_ALIAS ("REGION_FAST_TEXT_LOAD", SDRAM);
+REGION_ALIAS ("REGION_FAST_DATA", SDRAM);
+REGION_ALIAS ("REGION_FAST_DATA_LOAD", SDRAM);
+REGION_ALIAS ("REGION_BSS", SDRAM);
+REGION_ALIAS ("REGION_WORK", SDRAM);
+REGION_ALIAS ("REGION_STACK", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE", SDRAM);
+REGION_ALIAS ("REGION_NOCACHE_LOAD", SDRAM);
+
+_ttbl_base = ORIGIN (SDRAM_MMU);
+
+INCLUDE linkcmds.armv4
diff --git a/bsps/arm/gumstix/start/memmap.c b/bsps/arm/gumstix/start/memmap.c
new file mode 100644
index 0000000000..8923083576
--- /dev/null
+++ b/bsps/arm/gumstix/start/memmap.c
@@ -0,0 +1,17 @@
+/*
+ * Gumstix Memory Map
+ * 2008 By Yang Xi <hiyangxi@gmail.com>
+ * Copyright (c) 2004 by Cogent Computer Systems
+ * Written by Jay Monkman <jtm@lopingdog.com>
+ */
+
+#include <rtems.h>
+#include <libcpu/mmu.h>
+
+mmu_sect_map_t mem_map[] = {
+/* <phys addr> <virt addr> <size> <flags> */
+ {0x40000000, 0x40000000, 1216, MMU_CACHE_NONE}, /*Map I/O*/
+ {0xA0000000, 0x00000000, 1, MMU_CACHE_NONE}, /*sram*/
+ {0xA0000000, 0xA0000000, 64, MMU_CACHE_WBACK}, /* SDRAM */
+ {0x00000000, 0x00000000, 0, 0} /* The end */
+};