<div dir="ltr"><div class="gmail_default" style="font-size:small">Ping.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thank you,</div><div class="gmail_default" style="font-size:small">Niteesh.</div><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 3, 2020 at 2:37 AM G S Niteesh Babu <<a href="mailto:niteesh.gs@gmail.com">niteesh.gs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This commit move the bsp/fdt.h header to cpukit/include/rtems.<br>
The reason for this is, with inclusion of libfreebsd there are<br>
cases where their is need for bsp_fdt_get(). And with this<br>
header under bsps directory it is not possible to include it<br>
under a cpukit directory.<br>
---<br>
bsps/include/bsp/fdt.h | 86 +++++++++++++-------------------------<br>
cpukit/include/rtems/fdt.h | 69 ++++++++++++++++++++++++++++++<br>
2 files changed, 99 insertions(+), 56 deletions(-)<br>
create mode 100644 cpukit/include/rtems/fdt.h<br>
<br>
diff --git a/bsps/include/bsp/fdt.h b/bsps/include/bsp/fdt.h<br>
index 4ed05b136c..4a7c3dfb24 100644<br>
--- a/bsps/include/bsp/fdt.h<br>
+++ b/bsps/include/bsp/fdt.h<br>
@@ -1,67 +1,41 @@<br>
-/*<br>
- * Copyright (c) 2015, 2017 embedded brains GmbH. All rights reserved.<br>
- *<br>
- * embedded brains GmbH<br>
- * Dornierstr. 4<br>
- * 82178 Puchheim<br>
- * Germany<br>
- * <<a href="mailto:rtems@embedded-brains.de" target="_blank">rtems@embedded-brains.de</a>><br>
- *<br>
- * The license and distribution terms for this file may be<br>
- * found in the file LICENSE in this distribution or at<br>
- * <a href="http://www.rtems.org/license/LICENSE" rel="noreferrer" target="_blank">http://www.rtems.org/license/LICENSE</a>.<br>
- */<br>
-<br>
-#ifndef LIBBSP_SHARED_FDT_H<br>
-#define LIBBSP_SHARED_FDT_H<br>
-<br>
-#include <bsp.h><br>
-<br>
-#ifdef __cplusplus<br>
-extern "C" {<br>
-#endif /* __cplusplus */<br>
-<br>
-/*<br>
- * BSPs that implement the FDT support functions must define<br>
- * BSP_FDT_IS_SUPPORTED.<br>
- */<br>
+/* SPDX-License-Identifier: BSD-2-Clause */<br>
<br>
/**<br>
- * @brief Copies the specified source FDT to a dedicated global data area.<br>
+ * @file<br>
*<br>
- * The source FDT is usually provided by a bootloader and may be located in a<br>
- * memory area that is used by the program. The low-level initialization<br>
- * should copy the FDT for later use.<br>
+ * @ingroup RTEMSBSPsShared<br>
*<br>
- * The copy can be accessed by bsp_fdt_get().<br>
- *<br>
- * @param[in] src The source FDT.<br>
*/<br>
-void bsp_fdt_copy(const void *src);<br>
<br>
-/**<br>
- * @brief Returns the FDT of the BSP.<br>
- *<br>
- * @return The FDT of the BSP.<br>
+/*<br>
+ * Copyright (C) <2020>, Niteesh G S <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>><br>
+ *<br>
+ * Redistribution and use in source and binary forms, with or without<br>
+ * modification, are permitted provided that the following conditions<br>
+ * are met:<br>
+ * 1. Redistributions of source code must retain the above copyright<br>
+ * notice, this list of conditions and the following disclaimer.<br>
+ * 2. Redistributions in binary form must reproduce the above copyright<br>
+ * notice, this list of conditions and the following disclaimer in the<br>
+ * documentation and/or other materials provided with the distribution.<br>
+ *<br>
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE<br>
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS<br>
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<br>
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE<br>
+ * POSSIBILITY OF SUCH DAMAGE.<br>
*/<br>
-const void *bsp_fdt_get(void);<br>
<br>
-/**<br>
- * @brief Maps the interrupt number of the FDT to the interrupt vector used by<br>
- * the interrupt management.<br>
- *<br>
- * This function is used by the libbsd to implement the OFW_BUS_MAP_INTR bus<br>
- * method.<br>
- *<br>
- * @param[in] intr The FDT interrupt number cells.<br>
- * @param[in] icells The FDT interrupt cell count.<br>
- *<br>
- * @return The interrupt vector of the FDT interrupt number.<br>
- */<br>
-uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells);<br>
+#ifndef LIBBSP_SHARED_FDT_H<br>
+#define LIBBSP_SHARED_FDT_H<br>
<br>
-#ifdef __cplusplus<br>
-}<br>
-#endif /* __cplusplus */<br>
+#include <bsp.h><br>
+#include <rtems/fdt.h><br>
<br>
#endif /* LIBBSP_SHARED_FDT_H */<br>
diff --git a/cpukit/include/rtems/fdt.h b/cpukit/include/rtems/fdt.h<br>
new file mode 100644<br>
index 0000000000..149f7ff906<br>
--- /dev/null<br>
+++ b/cpukit/include/rtems/fdt.h<br>
@@ -0,0 +1,69 @@<br>
+/*<br>
+ * Copyright (c) 2015, 2017 embedded brains GmbH. All rights reserved.<br>
+ *<br>
+ * embedded brains GmbH<br>
+ * Dornierstr. 4<br>
+ * 82178 Puchheim<br>
+ * Germany<br>
+ * <<a href="mailto:rtems@embedded-brains.de" target="_blank">rtems@embedded-brains.de</a>><br>
+ *<br>
+ * Modified by Niteesh G S <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>><br>
+ *<br>
+ * The license and distribution terms for this file may be<br>
+ * found in the file LICENSE in this distribution or at<br>
+ * <a href="http://www.rtems.org/license/LICENSE" rel="noreferrer" target="_blank">http://www.rtems.org/license/LICENSE</a>.<br>
+ */<br>
+<br>
+#ifndef RTEMS_FDT_H<br>
+#define RTEMS_FDT_H<br>
+<br>
+#include <rtems.h><br>
+<br>
+#ifdef __cplusplus<br>
+extern "C" {<br>
+#endif /* __cplusplus */<br>
+<br>
+/*<br>
+ * BSPs that implement the FDT support functions must define<br>
+ * BSP_FDT_IS_SUPPORTED.<br>
+ */<br>
+<br>
+/**<br>
+ * @brief Copies the specified source FDT to a dedicated global data area.<br>
+ *<br>
+ * The source FDT is usually provided by a bootloader and may be located in a<br>
+ * memory area that is used by the program. The low-level initialization<br>
+ * should copy the FDT for later use.<br>
+ *<br>
+ * The copy can be accessed by bsp_fdt_get().<br>
+ *<br>
+ * @param[in] src The source FDT.<br>
+ */<br>
+void bsp_fdt_copy(const void *src);<br>
+<br>
+/**<br>
+ * @brief Returns the FDT of the BSP.<br>
+ *<br>
+ * @return The FDT of the BSP.<br>
+ */<br>
+const void *bsp_fdt_get(void);<br>
+<br>
+/**<br>
+ * @brief Maps the interrupt number of the FDT to the interrupt vector used by<br>
+ * the interrupt management.<br>
+ *<br>
+ * This function is used by the libbsd to implement the OFW_BUS_MAP_INTR bus<br>
+ * method.<br>
+ *<br>
+ * @param[in] intr The FDT interrupt number cells.<br>
+ * @param[in] icells The FDT interrupt cell count.<br>
+ *<br>
+ * @return The interrupt vector of the FDT interrupt number.<br>
+ */<br>
+uint32_t bsp_fdt_map_intr(const uint32_t *intr, size_t icells);<br>
+<br>
+#ifdef __cplusplus<br>
+}<br>
+#endif /* __cplusplus */<br>
+<br>
+#endif /* RTEMS_FDT_H */<br>
-- <br>
2.17.1<br>
<br>
</blockquote></div>