source: rtems/bsps/arm/imx/include/bsp.h

Last change on this file was e00f443, checked in by Christian Mauderer <christian.mauderer@…>, on Oct 27, 2020 at 9:00:31 AM

imx: Move imx_iomux to arm/shared

Update #4180

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSBSPsARMimx
5 */
6
7/*
8 * Copyright (c) 2017 embedded brains GmbH.  All rights reserved.
9 *
10 *  embedded brains GmbH
11 *  Dornierstr. 4
12 *  82178 Puchheim
13 *  Germany
14 *  <info@embedded-brains.de>
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef LIBBSP_ARM_IMX_BSP_H
22#define LIBBSP_ARM_IMX_BSP_H
23
24/**
25 * @defgroup RTEMSBSPsARMimx NXP i.MX
26 *
27 * @ingroup RTEMSBSPsARM
28 *
29 * @brief NXP i.MX Board Support Package.
30 *
31 * @{
32 */
33
34#include <bspopts.h>
35
36#define BSP_FEATURE_IRQ_EXTENSION
37
38#define BSP_FDT_IS_SUPPORTED
39
40#ifndef ASM
41
42#include <rtems.h>
43
44#include <bsp/default-initial-extension.h>
45
46#ifdef __cplusplus
47extern "C" {
48#endif /* __cplusplus */
49
50extern uintptr_t imx_gic_dist_base;
51
52#define BSP_ARM_GIC_DIST_BASE imx_gic_dist_base
53
54#define BSP_ARM_GIC_CPUIF_BASE (BSP_ARM_GIC_DIST_BASE + 0x1000)
55
56#define BSP_ARM_A9MPCORE_GT_BASE 0
57
58#define BSP_ARM_A9MPCORE_SCU_BASE 0
59
60void *imx_get_reg_of_node(const void *fdt, int node);
61
62rtems_vector_number imx_get_irq_of_node(
63  const void *fdt,
64  int node,
65  size_t index
66);
67
68void imx_uart_console_drain(void);
69
70/**
71 * @brief Registers an IMX I2C bus driver.
72 *
73 * @param[in] bus_path The I2C bus driver device path, e.g. "/dev/i2c-0".
74 * @param[in] alias_or_path The FDT alias or path, e.g. "i2c0".
75 *
76 * @retval 0 Successful operation.
77 * @retval -1 An error occurred.  The errno is set to indicate the error.
78 */
79int i2c_bus_register_imx(const char *bus_path, const char *alias_or_path);
80
81/**
82 * @brief Registers an IMX ECSPI bus driver.
83 *
84 * @param[in] bus_path The ECSPI bus driver device path, e.g. "/dev/spi-0".
85 * @param[in] alias_or_path The FDT alias or path, e.g. "spi0".
86 *
87 * @retval 0 Successful operation.
88 * @retval -1 An error occurred.  The errno is set to indicate the error.
89 */
90int spi_bus_register_imx(const char *bus_path, const char *alias_or_path);
91
92#ifdef __cplusplus
93}
94#endif /* __cplusplus */
95
96#endif /* ASM */
97
98/* @} */
99
100#endif /* LIBBSP_ARM_IMX_BSP_H */
Note: See TracBrowser for help on using the repository browser.