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

Last change on this file since ba619b7f was ba619b7f, checked in by Joel Sherrill <joel@…>, on 03/01/22 at 21:38:20

bsps/arm/: Scripted embedded brains header file clean up

Updates #4625.

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