summaryrefslogtreecommitdiffstats
path: root/bsps/powerpc/qoriq/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bsps/powerpc/qoriq/include/bsp.h31
-rw-r--r--bsps/powerpc/qoriq/include/bsp/VMEConfig.h100
-rw-r--r--bsps/powerpc/qoriq/include/bsp/intercom.h31
-rw-r--r--bsps/powerpc/qoriq/include/bsp/irq.h87
-rw-r--r--bsps/powerpc/qoriq/include/bsp/mmu.h43
-rw-r--r--bsps/powerpc/qoriq/include/bsp/qoriq.h31
-rw-r--r--bsps/powerpc/qoriq/include/bsp/tsec-config.h31
-rw-r--r--bsps/powerpc/qoriq/include/bsp/uart-bridge.h33
-rw-r--r--bsps/powerpc/qoriq/include/tm27.h78
9 files changed, 362 insertions, 103 deletions
diff --git a/bsps/powerpc/qoriq/include/bsp.h b/bsps/powerpc/qoriq/include/bsp.h
index 75bf15cefb..5d8b711098 100644
--- a/bsps/powerpc/qoriq/include/bsp.h
+++ b/bsps/powerpc/qoriq/include/bsp.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2010, 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2010, 2017 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_POWERPC_QORIQ_BSP_H
diff --git a/bsps/powerpc/qoriq/include/bsp/VMEConfig.h b/bsps/powerpc/qoriq/include/bsp/VMEConfig.h
new file mode 100644
index 0000000000..4bb7c0d62f
--- /dev/null
+++ b/bsps/powerpc/qoriq/include/bsp/VMEConfig.h
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSBSPsPowerPCQorIQ
+ *
+ * @brief This header file provides the interfaces used by VME bus device
+ * drivers.
+ *
+ * Note that for the MVME2500, you need the PCIe support from libbsd for this to
+ * work.
+ */
+
+/*
+ * Copyright (C) 2023 embedded brains GmbH & Co. KG
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef RTEMS_BSP_VME_CONFIG_H
+#define RTEMS_BSP_VME_CONFIG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define _VME_DRIVER_TSI148
+
+/*
+ * Base address of the PCI that is used for the VME bridge. Value is set in
+ * libbsd during device discovery.
+ */
+extern uintptr_t bsp_vme_pcie_base_address;
+
+#define PCI_MEM_BASE 0
+#define PCI_DRAM_OFFSET 0
+
+/*
+ * NOTE: shared vmeconfig.c uses hardcoded window lengths that match this layout
+ *
+ * The memory length of the PCIe controllers on the P2020 processor is
+ * 0x20000000. The Tsi148 registers are mapped at the bsp_vme_pcie_base_address
+ * with a size of 0x1000. Therefore the VME windows are arranged a bit different
+ * then on other BSPs.
+ */
+#define _VME_A32_WIN0_ON_PCI (bsp_vme_pcie_base_address + 0x10000000)
+#define _VME_A24_ON_PCI (bsp_vme_pcie_base_address + 0x03000000)
+#define _VME_A16_ON_PCI (bsp_vme_pcie_base_address + 0x02000000)
+#define _VME_CSR_ON_PCI (bsp_vme_pcie_base_address + 0x01000000)
+
+/* FIXME: Make this a BSP config option */
+#define _VME_A32_WIN0_ON_VME 0x20000000
+
+/*
+ * FIXME: The fixed QORIQ_IRQ_EXT_0 is valid for the MVME2500 board. In theory
+ * there should be some possibility to get that information from the device tree
+ * or from PCI config space. But I didn't find it anywhere.
+ */
+#define BSP_VME_INSTALL_IRQ_MGR(err) \
+ do { \
+ err = qoriq_pic_set_sense_and_polarity(\
+ QORIQ_IRQ_EXT_0, \
+ QORIQ_EIRQ_TRIGGER_LEVEL_LOW, \
+ NULL \
+ ); \
+ if (err == 0) { \
+ err = vmeTsi148InstallIrqMgrAlt(0, 0, QORIQ_IRQ_EXT_0, -1); \
+ } \
+ } while (0)
+
+/* Add prototypes that are in all VMEConfig.h files */
+extern int BSP_VMEInit(void);
+extern int BSP_VMEIrqMgrInstall(void);
+extern unsigned short (*_BSP_clear_vmebridge_errors)(int);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RTEMS_BSP_VME_CONFIG_H */
diff --git a/bsps/powerpc/qoriq/include/bsp/intercom.h b/bsps/powerpc/qoriq/include/bsp/intercom.h
index c78d4c2ab0..1217fb5a69 100644
--- a/bsps/powerpc/qoriq/include/bsp/intercom.h
+++ b/bsps/powerpc/qoriq/include/bsp/intercom.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2011 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2011 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_POWERPC_QORIQ_INTERCOM_H
diff --git a/bsps/powerpc/qoriq/include/bsp/irq.h b/bsps/powerpc/qoriq/include/bsp/irq.h
index cd642fa00b..5eaf36ba4c 100644
--- a/bsps/powerpc/qoriq/include/bsp/irq.h
+++ b/bsps/powerpc/qoriq/include/bsp/irq.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,26 +9,34 @@
*/
/*
- * Copyright (c) 2010-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2010, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_POWERPC_QORIQ_IRQ_H
#define LIBBSP_POWERPC_QORIQ_IRQ_H
#include <bsp.h>
-#include <rtems/irq.h>
-#include <rtems/irq-extension.h>
-#include <rtems/score/processormask.h>
#ifdef __cplusplus
extern "C" {
@@ -266,6 +276,8 @@ extern "C" {
#define QORIQ_IRQ_EXT_10 (QORIQ_IRQ_EXT_BASE + 10)
#define QORIQ_IRQ_EXT_11 (QORIQ_IRQ_EXT_BASE + 11)
+#define QORIQ_IRQ_IS_EXT(vector) \
+ ((vector) >= QORIQ_IRQ_EXT_0 && (vector) <= QORIQ_IRQ_EXT_11)
/** @} */
/**
@@ -350,7 +362,23 @@ extern "C" {
#define QORIQ_IRQ_GT_B_2 (QORIQ_IRQ_GT_BASE + 6)
#define QORIQ_IRQ_GT_B_3 (QORIQ_IRQ_GT_BASE + 7)
-#define BSP_INTERRUPT_VECTOR_COUNT (QORIQ_IRQ_GT_B_3 + 1)
+#define QORIQ_INTERRUPT_SOURCE_COUNT (QORIQ_IRQ_GT_B_3 + 1)
+
+#define QORIQ_IS_INTERRUPT_SOURCE(vector) \
+ (((rtems_vector_number) (vector)) < QORIQ_INTERRUPT_SOURCE_COUNT)
+
+#define QORIQ_IRQ_MSI_MULTIPLEX_BASE QORIQ_INTERRUPT_SOURCE_COUNT
+
+#define QORIQ_IRQ_MSI_COUNT 256
+
+#define QORIQ_IRQ_MSI_INDEX(vector) ((vector) - QORIQ_IRQ_MSI_MULTIPLEX_BASE)
+
+#define QORIQ_IRQ_MSI_VECTOR(index) (QORIQ_IRQ_MSI_MULTIPLEX_BASE + (index))
+
+#define QORIQ_IRQ_IS_MSI(vector) \
+ (QORIQ_IRQ_MSI_INDEX(vector) < QORIQ_IRQ_MSI_COUNT)
+
+#define BSP_INTERRUPT_VECTOR_COUNT QORIQ_IRQ_MSI_VECTOR(QORIQ_IRQ_MSI_COUNT)
/** @} */
@@ -380,14 +408,39 @@ rtems_status_code qoriq_pic_set_priority(
int *old_priority
);
-rtems_status_code bsp_interrupt_set_affinity(
+rtems_status_code qoriq_pic_msi_allocate(rtems_vector_number *vector);
+
+rtems_status_code qoriq_pic_msi_free(rtems_vector_number vector);
+
+rtems_status_code qoriq_pic_msi_map(
rtems_vector_number vector,
- const Processor_mask *affinity
+ uint64_t *addr,
+ uint32_t *data
);
-rtems_status_code bsp_interrupt_get_affinity(
+typedef enum {
+ QORIQ_EIRQ_TRIGGER_EDGE_FALLING,
+ QORIQ_EIRQ_TRIGGER_EDGE_RISING,
+ QORIQ_EIRQ_TRIGGER_LEVEL_LOW,
+ QORIQ_EIRQ_TRIGGER_LEVEL_HIGH,
+} qoriq_eirq_sense_and_polarity;
+
+/**
+ * @brief Change polarity and sense settings of external interrupts.
+ *
+ * NOTE: There are only very rare edge cases where you need this function.
+ *
+ * @a vector must be the vector number of an external interrupt.
+ *
+ * Use @a new_sense_and_polarity to select the new setting. If @a
+ * old_sense_and_polarity is not NULL, the old value is returned.
+ *
+ * @returns RTEMS_SUCCSSSFUL on sucess or other values for invalid settings.
+ */
+rtems_status_code qoriq_pic_set_sense_and_polarity(
rtems_vector_number vector,
- Processor_mask *affinity
+ qoriq_eirq_sense_and_polarity new_sense_and_polarity,
+ qoriq_eirq_sense_and_polarity *old_sense_and_polarity
);
/** @} */
diff --git a/bsps/powerpc/qoriq/include/bsp/mmu.h b/bsps/powerpc/qoriq/include/bsp/mmu.h
index 8c8822f901..2c51c9930a 100644
--- a/bsps/powerpc/qoriq/include/bsp/mmu.h
+++ b/bsps/powerpc/qoriq/include/bsp/mmu.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2011-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2011, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_POWERPC_QORIQ_MMU_H
@@ -78,6 +91,8 @@ void qoriq_mmu_write_to_tlb1(qoriq_mmu_context *self, int first_tlb);
void qoriq_mmu_change_perm(uint32_t test, uint32_t set, uint32_t clear);
+int qoriq_mmu_find_free_tlb1_entry(void);
+
void qoriq_mmu_config(bool boot_processor, int first_tlb, int scratch_tlb);
void qoriq_tlb1_write(
@@ -90,6 +105,16 @@ void qoriq_tlb1_write(
int tsize
);
+void qoriq_mmu_adjust_and_write_to_tlb1(
+ int tlb,
+ uintptr_t begin,
+ uintptr_t last,
+ uint32_t mas1,
+ uint32_t mas2,
+ uint32_t mas3,
+ uint32_t mas7
+);
+
void qoriq_tlb1_invalidate(int esel);
/** @} */
diff --git a/bsps/powerpc/qoriq/include/bsp/qoriq.h b/bsps/powerpc/qoriq/include/bsp/qoriq.h
index 361dbed2f1..2cefd2e63e 100644
--- a/bsps/powerpc/qoriq/include/bsp/qoriq.h
+++ b/bsps/powerpc/qoriq/include/bsp/qoriq.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2010-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2010, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_POWERPC_QORIQ_QORIQ_H
diff --git a/bsps/powerpc/qoriq/include/bsp/tsec-config.h b/bsps/powerpc/qoriq/include/bsp/tsec-config.h
index 24f7e7611b..8827e159ef 100644
--- a/bsps/powerpc/qoriq/include/bsp/tsec-config.h
+++ b/bsps/powerpc/qoriq/include/bsp/tsec-config.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2010 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2010 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Obere Lagerstr. 30
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_POWERPC_QORIQ_TSEC_CONFIG_H
diff --git a/bsps/powerpc/qoriq/include/bsp/uart-bridge.h b/bsps/powerpc/qoriq/include/bsp/uart-bridge.h
index 3233cf5bef..3b243fd245 100644
--- a/bsps/powerpc/qoriq/include/bsp/uart-bridge.h
+++ b/bsps/powerpc/qoriq/include/bsp/uart-bridge.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,23 +9,34 @@
*/
/*
- * Copyright (c) 2011-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2011, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef LIBBSP_POWERPC_QORIQ_UART_BRIDGE_H
#define LIBBSP_POWERPC_QORIQ_UART_BRIDGE_H
-#include <rtems/termiostypes.h>
+#include <rtems/termiosdevice.h>
#include <bsp/intercom.h>
diff --git a/bsps/powerpc/qoriq/include/tm27.h b/bsps/powerpc/qoriq/include/tm27.h
index 5753d6b049..0c43823f0e 100644
--- a/bsps/powerpc/qoriq/include/tm27.h
+++ b/bsps/powerpc/qoriq/include/tm27.h
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
/**
* @file
*
@@ -7,17 +9,28 @@
*/
/*
- * Copyright (c) 2010-2015 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2010, 2015 embedded brains GmbH & Co. KG
*
- * embedded brains GmbH
- * Dornierstr. 4
- * 82178 Puchheim
- * Germany
- * <rtems@embedded-brains.de>
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * 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.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _RTEMS_TMTEST27
@@ -27,8 +40,6 @@
#ifndef TMTESTS_TM27_H
#define TMTESTS_TM27_H
-#include <assert.h>
-
#include <libcpu/powerpc-utility.h>
#include <bsp/irq.h>
@@ -40,55 +51,60 @@
#define IPI_INDEX_HIGH 2
-RTEMS_INLINE_ROUTINE void Install_tm27_vector(void (*handler)(rtems_vector_number))
+static inline void Install_tm27_vector( rtems_interrupt_handler handler )
{
- rtems_status_code sc;
+ static rtems_interrupt_entry entry_low;
+ static rtems_interrupt_entry entry_high;
rtems_vector_number low = QORIQ_IRQ_IPI_0 + IPI_INDEX_LOW;
rtems_vector_number high = QORIQ_IRQ_IPI_0 + IPI_INDEX_HIGH;
- sc = rtems_interrupt_handler_install(
+ rtems_interrupt_entry_initialize(
+ &entry_low,
+ handler,
+ NULL,
+ "tm17 low"
+ );
+ (void) rtems_interrupt_entry_install(
low,
- "tm17 low",
RTEMS_INTERRUPT_UNIQUE,
- (rtems_interrupt_handler) handler,
- NULL
+ &entry_low
);
- assert(sc == RTEMS_SUCCESSFUL);
- sc = qoriq_pic_set_priority(low, 1, NULL);
- assert(sc == RTEMS_SUCCESSFUL);
+ (void) qoriq_pic_set_priority(low, 1, NULL);
- sc = rtems_interrupt_handler_install(
+ rtems_interrupt_entry_initialize(
+ &entry_high,
+ handler,
+ NULL,
+ "tm17 high"
+ );
+ (void) rtems_interrupt_entry_install(
high,
- "tm17 high",
RTEMS_INTERRUPT_UNIQUE,
- (rtems_interrupt_handler) handler,
- NULL
+ &entry_high
);
- assert(sc == RTEMS_SUCCESSFUL);
- sc = qoriq_pic_set_priority(high, 2, NULL);
- assert(sc == RTEMS_SUCCESSFUL);
+ (void) qoriq_pic_set_priority(high, 2, NULL);
}
-RTEMS_INLINE_ROUTINE void qoriq_tm27_cause(uint32_t ipi_index)
+static inline void qoriq_tm27_cause(uint32_t ipi_index)
{
uint32_t self = ppc_processor_id();
qoriq.pic.per_cpu[self].ipidr[ipi_index].reg = UINT32_C(1) << self;
}
-RTEMS_INLINE_ROUTINE void Cause_tm27_intr(void)
+static inline void Cause_tm27_intr(void)
{
qoriq_tm27_cause(IPI_INDEX_LOW);
}
-RTEMS_INLINE_ROUTINE void Clear_tm27_intr(void)
+static inline void Clear_tm27_intr(void)
{
/* Nothing to do */
}
-RTEMS_INLINE_ROUTINE inline void Lower_tm27_intr(void)
+static inline inline void Lower_tm27_intr(void)
{
qoriq_tm27_cause(IPI_INDEX_HIGH);
}