summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-12-23 18:18:56 +1100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-01-25 08:45:26 +0100
commit2afb22b7e1ebcbe40373ff7e0efae7d207c655a9 (patch)
tree44759efe9374f13200a97e96d91bd9a2b7e5ce2a /bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h
parentMAINTAINERS: Add myself to Write After Approval. (diff)
downloadrtems-2afb22b7e1ebcbe40373ff7e0efae7d207c655a9.tar.bz2
Remove make preinstall
A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
Diffstat (limited to 'bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h')
-rw-r--r--bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h170
1 files changed, 170 insertions, 0 deletions
diff --git a/bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h b/bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h
new file mode 100644
index 0000000000..b432b9cecd
--- /dev/null
+++ b/bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h
@@ -0,0 +1,170 @@
+/**
+ * @file
+ *
+ * @ingroup mpc55xx
+ *
+ * @brief Low-level configuration.
+ */
+
+/*
+ * Copyright (c) 2008-2012 embedded brains GmbH. All rights reserved.
+ *
+ * embedded brains GmbH
+ * Obere Lagerstr. 30
+ * 82178 Puchheim
+ * Germany
+ * <rtems@embedded-brains.de>
+ *
+ * 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.
+ */
+
+#ifndef LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
+#define LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
+
+#include <stddef.h>
+
+#include <libcpu/powerpc-utility.h>
+
+#include <bsp/start.h>
+
+#include <mpc55xx/regs.h>
+#include <mpc55xx/regs-mmu.h>
+#include <mpc55xx/siu.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+typedef struct {
+ uint32_t index : 10;
+ uint32_t count : 10;
+ uint32_t output : 1;
+ union SIU_PCR_tag pcr;
+} mpc55xx_siu_pcr_config;
+
+extern BSP_START_DATA_SECTION const mpc55xx_siu_pcr_config
+ mpc55xx_start_config_siu_pcr [];
+
+extern BSP_START_DATA_SECTION const size_t
+ mpc55xx_start_config_siu_pcr_count [];
+
+extern BSP_START_DATA_SECTION const struct
+ MMU_tag mpc55xx_start_config_mmu_early [];
+
+extern BSP_START_DATA_SECTION const size_t
+ mpc55xx_start_config_mmu_early_count [];
+
+extern BSP_START_DATA_SECTION const struct
+ MMU_tag mpc55xx_start_config_mmu [];
+
+extern BSP_START_DATA_SECTION const size_t
+ mpc55xx_start_config_mmu_count [];
+
+#ifdef MPC55XX_HAS_FMPLL
+ typedef struct {
+ union FMPLL_SYNCR_tag syncr_tmp;
+ union FMPLL_SYNCR_tag syncr_final;
+ } mpc55xx_clock_config;
+#endif
+
+#ifdef MPC55XX_HAS_FMPLL_ENHANCED
+ typedef struct {
+ union FMPLL_ESYNCR2_tag esyncr2_tmp;
+ union FMPLL_ESYNCR2_tag esyncr2_final;
+ union FMPLL_ESYNCR1_tag esyncr1_final;
+ } mpc55xx_clock_config;
+#endif
+
+#ifdef MPC55XX_HAS_MODE_CONTROL
+ typedef struct {
+ struct {
+ PLLD_CR_32B_tag cr;
+ PLLD_MR_32B_tag mr;
+ } fmpll [2];
+ CGM_OC_EN_32B_tag oc_en;
+ CGM_OCDS_SC_32B_tag ocds_sc;
+ CGM_SC_DC0_3_32B_tag sc_dc0_3;
+ CGM_AUXCLK_tag auxclk [5];
+ } mpc55xx_clock_config;
+#endif
+
+extern BSP_START_DATA_SECTION const mpc55xx_clock_config
+ mpc55xx_start_config_clock [];
+
+#ifdef MPC55XX_HAS_EBI
+ typedef struct {
+ union EBI_MCR_tag ebi_mcr;
+ uint32_t siu_eccr_ebdf;
+ } mpc55xx_ebi_config;
+
+ extern BSP_START_DATA_SECTION const mpc55xx_ebi_config
+ mpc55xx_start_config_ebi [];
+
+ extern BSP_START_DATA_SECTION const size_t
+ mpc55xx_start_config_ebi_count [];
+
+ extern BSP_START_DATA_SECTION const struct EBI_CS_tag
+ mpc55xx_start_config_ebi_cs [];
+
+ extern BSP_START_DATA_SECTION const size_t
+ mpc55xx_start_config_ebi_cs_count [];
+
+ extern BSP_START_DATA_SECTION const struct EBI_CAL_CS_tag
+ mpc55xx_start_config_ebi_cal_cs [];
+
+ extern BSP_START_DATA_SECTION const size_t
+ mpc55xx_start_config_ebi_cal_cs_count [];
+#endif
+
+/**
+ * @brief Start prologue.
+ *
+ * In case the BSP enabled the MPC55XX_ENABLE_START_PROLOGUE option, then this
+ * function will be called directly after the Boot Assist Module (BAM) jumped
+ * to the start entry defined by the reset configuration.
+ *
+ * This function executes in the context initialized by the BAM. There exists
+ * no valid stack pointer and the internal RAM has an invalid ECC state.
+ *
+ * The default implementation does nothing. The application may provide its
+ * own implementation.
+ */
+void mpc55xx_start_prologue(void);
+
+void mpc55xx_start_early(void);
+
+void mpc55xx_start_flash(void);
+
+void mpc55xx_start_cache(void);
+
+void mpc55xx_start_clock(void);
+
+void mpc55xx_start_watchdog(void);
+
+void mpc55xx_start_mmu_apply_config(const struct MMU_tag *config, size_t count);
+
+uint32_t mpc55xx_get_system_clock(void);
+
+LINKER_SYMBOL(bsp_ram_start)
+LINKER_SYMBOL(bsp_ram_end)
+LINKER_SYMBOL(bsp_ram_size)
+
+LINKER_SYMBOL(bsp_ram_1_start)
+LINKER_SYMBOL(bsp_ram_1_end)
+LINKER_SYMBOL(bsp_ram_1_size)
+
+LINKER_SYMBOL(bsp_rom_start)
+LINKER_SYMBOL(bsp_rom_end)
+LINKER_SYMBOL(bsp_rom_size)
+
+#ifdef MPC55XX_BOOTFLAGS
+ extern uint32_t mpc55xx_bootflag_0 [];
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H */