summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2020-10-27 10:00:31 +0100
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2020-11-20 08:53:18 +0100
commite00f4434281bad6d06fdc7d0f940de8710976e06 (patch)
tree1fbb5c655e099ed8003bdfd05e92ebaef30cbc95
parentc13fd2dbd8b938322f89665bdefc0e5298db2e19 (diff)
downloadrtems-e00f4434281bad6d06fdc7d0f940de8710976e06.tar.bz2
imx: Move imx_iomux to arm/shared
Update #4180
-rw-r--r--bsps/arm/imx/headers.am2
-rw-r--r--bsps/arm/imx/include/bsp.h2
-rw-r--r--bsps/arm/imx/spi/imx-ecspi.c1
-rw-r--r--bsps/arm/shared/headers.am6
-rw-r--r--bsps/arm/shared/include/arm/freescale/imx/imx_iomuxreg.h (renamed from bsps/arm/imx/include/arm/freescale/imx/imx_iomuxreg.h)0
-rw-r--r--bsps/arm/shared/include/arm/freescale/imx/imx_iomuxvar.h (renamed from bsps/arm/imx/include/arm/freescale/imx/imx_iomuxvar.h)0
-rw-r--r--bsps/arm/shared/include/bsp/imx-iomux.h49
-rw-r--r--bsps/arm/shared/pins/imx_iomux.c (renamed from bsps/arm/imx/start/imx_iomux.c)0
-rw-r--r--c/src/lib/libbsp/arm/imx/Makefile.am2
-rw-r--r--spec/build/bsps/arm/imx/bspimx.yml10
10 files changed, 63 insertions, 9 deletions
diff --git a/bsps/arm/imx/headers.am b/bsps/arm/imx/headers.am
index 9863f34300..e7a2418dea 100644
--- a/bsps/arm/imx/headers.am
+++ b/bsps/arm/imx/headers.am
@@ -11,8 +11,6 @@ include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/
include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_ecspireg.h
include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_gpcreg.h
include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_i2creg.h
-include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_iomuxreg.h
-include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_iomuxvar.h
include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_srcreg.h
include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_uartreg.h
include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/imx/include/arm/freescale/imx/imx_wdogreg.h
diff --git a/bsps/arm/imx/include/bsp.h b/bsps/arm/imx/include/bsp.h
index 99b7a0d1d7..8b95a79535 100644
--- a/bsps/arm/imx/include/bsp.h
+++ b/bsps/arm/imx/include/bsp.h
@@ -59,8 +59,6 @@ extern uintptr_t imx_gic_dist_base;
void *imx_get_reg_of_node(const void *fdt, int node);
-int imx_iomux_configure_pins(const void *fdt, uint32_t phandle);
-
rtems_vector_number imx_get_irq_of_node(
const void *fdt,
int node,
diff --git a/bsps/arm/imx/spi/imx-ecspi.c b/bsps/arm/imx/spi/imx-ecspi.c
index 26ba812f62..1ffc4d9798 100644
--- a/bsps/arm/imx/spi/imx-ecspi.c
+++ b/bsps/arm/imx/spi/imx-ecspi.c
@@ -15,6 +15,7 @@
#include <bsp.h>
#include <bsp/fdt.h>
#include <bsp/imx-gpio.h>
+#include <bsp/imx-iomux.h>
#include <libfdt.h>
#include <arm/freescale/imx/imx_ccmvar.h>
#include <arm/freescale/imx/imx_ecspireg.h>
diff --git a/bsps/arm/shared/headers.am b/bsps/arm/shared/headers.am
new file mode 100644
index 0000000000..4fd7238f81
--- /dev/null
+++ b/bsps/arm/shared/headers.am
@@ -0,0 +1,6 @@
+## This file was generated by "./boostrap -H".
+
+include_arm_freescale_imxdir = $(includedir)/arm/freescale/imx
+include_arm_freescale_imx_HEADERS =
+include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/shared/include/arm/freescale/imx/imx_iomuxreg.h
+include_arm_freescale_imx_HEADERS += ../../../../../../bsps/arm/shared/include/arm/freescale/imx/imx_iomuxvar.h
diff --git a/bsps/arm/imx/include/arm/freescale/imx/imx_iomuxreg.h b/bsps/arm/shared/include/arm/freescale/imx/imx_iomuxreg.h
index b84fde26de..b84fde26de 100644
--- a/bsps/arm/imx/include/arm/freescale/imx/imx_iomuxreg.h
+++ b/bsps/arm/shared/include/arm/freescale/imx/imx_iomuxreg.h
diff --git a/bsps/arm/imx/include/arm/freescale/imx/imx_iomuxvar.h b/bsps/arm/shared/include/arm/freescale/imx/imx_iomuxvar.h
index 8050b56a84..8050b56a84 100644
--- a/bsps/arm/imx/include/arm/freescale/imx/imx_iomuxvar.h
+++ b/bsps/arm/shared/include/arm/freescale/imx/imx_iomuxvar.h
diff --git a/bsps/arm/shared/include/bsp/imx-iomux.h b/bsps/arm/shared/include/bsp/imx-iomux.h
new file mode 100644
index 0000000000..60421807c0
--- /dev/null
+++ b/bsps/arm/shared/include/bsp/imx-iomux.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSBSPsARM
+ *
+ * @brief Functions for imx iomux.
+ */
+
+/*
+ * Copyright (C) 2020 embedded brains GmbH (http://www.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.
+ *
+ * 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_ARM_SHARED_IMX_IOMUX_H
+#define LIBBSP_ARM_SHARED_IMX_IOMUX_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+int imx_iomux_configure_pins(const void *fdt, uint32_t phandle);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LIBBSP_ARM_SHARED_IMX_IOMUX_H */
diff --git a/bsps/arm/imx/start/imx_iomux.c b/bsps/arm/shared/pins/imx_iomux.c
index d97e35deef..d97e35deef 100644
--- a/bsps/arm/imx/start/imx_iomux.c
+++ b/bsps/arm/shared/pins/imx_iomux.c
diff --git a/c/src/lib/libbsp/arm/imx/Makefile.am b/c/src/lib/libbsp/arm/imx/Makefile.am
index ad221f7576..80871a286c 100644
--- a/c/src/lib/libbsp/arm/imx/Makefile.am
+++ b/c/src/lib/libbsp/arm/imx/Makefile.am
@@ -43,7 +43,7 @@ librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/cp15/arm-cp15-set-ttb
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/imx/start/bspreset.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/imx/start/bspstart.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/imx/start/ccm.c
-librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/imx/start/imx_iomux.c
+librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/pins/imx_iomux.c
if HAS_SMP
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/shared/start/arm-a9mpcore-smp.c
librtemsbsp_a_SOURCES += ../../../../../../bsps/arm/imx/start/bspsmp.c
diff --git a/spec/build/bsps/arm/imx/bspimx.yml b/spec/build/bsps/arm/imx/bspimx.yml
index 48d41890c7..442c631b3a 100644
--- a/spec/build/bsps/arm/imx/bspimx.yml
+++ b/spec/build/bsps/arm/imx/bspimx.yml
@@ -8,7 +8,8 @@ copyrights:
cppflags: []
enabled-by: true
family: imx
-includes: []
+includes:
+ - bsps/arm/shared/include
install:
- destination: ${BSP_INCLUDEDIR}
source:
@@ -20,8 +21,8 @@ install:
- bsps/arm/imx/include/arm/freescale/imx/imx_ecspireg.h
- bsps/arm/imx/include/arm/freescale/imx/imx_gpcreg.h
- bsps/arm/imx/include/arm/freescale/imx/imx_i2creg.h
- - bsps/arm/imx/include/arm/freescale/imx/imx_iomuxreg.h
- - bsps/arm/imx/include/arm/freescale/imx/imx_iomuxvar.h
+ - bsps/arm/shared/include/arm/freescale/imx/imx_iomuxreg.h
+ - bsps/arm/shared/include/arm/freescale/imx/imx_iomuxvar.h
- bsps/arm/imx/include/arm/freescale/imx/imx_srcreg.h
- bsps/arm/imx/include/arm/freescale/imx/imx_uartreg.h
- bsps/arm/imx/include/arm/freescale/imx/imx_wdogreg.h
@@ -29,6 +30,7 @@ install:
source:
- bsps/arm/imx/include/bsp/imx-gpio.h
- bsps/arm/imx/include/bsp/irq.h
+ - bsps/arm/shared/include/bsp/imx-iomux.h
- destination: ${BSP_INCLUDEDIR}/dev/clock
source:
- bsps/include/dev/clock/arm-generic-timer.h
@@ -88,7 +90,7 @@ source:
- bsps/arm/imx/start/bspstart.c
- bsps/arm/imx/start/bspstarthooks.c
- bsps/arm/imx/start/ccm.c
-- bsps/arm/imx/start/imx_iomux.c
+- bsps/arm/shared/pins/imx_iomux.c
- bsps/arm/shared/cache/cache-cp15.c
- bsps/arm/shared/cache/cache-v7ar-disable-data.S
- bsps/shared/dev/clock/arm-generic-timer.c