1 | /* |
---|
2 | * Copyright (c) 2017 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Dornierstr. 4 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <info@embedded-brains.de> |
---|
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 | #include <bspopts.h> |
---|
19 | |
---|
20 | #define BSP_FEATURE_IRQ_EXTENSION |
---|
21 | |
---|
22 | #define BSP_FDT_IS_SUPPORTED |
---|
23 | |
---|
24 | #ifndef ASM |
---|
25 | |
---|
26 | #include <rtems.h> |
---|
27 | |
---|
28 | #include <bsp/default-initial-extension.h> |
---|
29 | |
---|
30 | #ifdef __cplusplus |
---|
31 | extern "C" { |
---|
32 | #endif /* __cplusplus */ |
---|
33 | |
---|
34 | #define BSP_ARM_GIC_DIST_BASE 0x31001000 |
---|
35 | |
---|
36 | #define BSP_ARM_GIC_CPUIF_BASE 0x31002000 |
---|
37 | |
---|
38 | #define BSP_ARM_A9MPCORE_GT_BASE 0 |
---|
39 | |
---|
40 | #define BSP_ARM_A9MPCORE_SCU_BASE 0 |
---|
41 | |
---|
42 | void arm_generic_timer_get_config(uint32_t *frequency, uint32_t *irq); |
---|
43 | |
---|
44 | void *imx_get_reg_of_node(const void *fdt, int node); |
---|
45 | |
---|
46 | int imx_iomux_configure_pins(const void *fdt, uint32_t phandle); |
---|
47 | |
---|
48 | rtems_vector_number imx_get_irq_of_node( |
---|
49 | const void *fdt, |
---|
50 | int node, |
---|
51 | size_t index |
---|
52 | ); |
---|
53 | |
---|
54 | void imx_uart_console_drain(void); |
---|
55 | |
---|
56 | /** |
---|
57 | * @brief Registers an IMX I2C bus driver. |
---|
58 | * |
---|
59 | * @param[in] bus_path The I2C bus driver device path, e.g. "/dev/i2c-0". |
---|
60 | * @param[in] alias_or_path The FDT alias or path, e.g. "i2c0". |
---|
61 | * |
---|
62 | * @retval 0 Successful operation. |
---|
63 | * @retval -1 An error occurred. The errno is set to indicate the error. |
---|
64 | */ |
---|
65 | int i2c_bus_register_imx(const char *bus_path, const char *alias_or_path); |
---|
66 | |
---|
67 | /** |
---|
68 | * @brief Registers an IMX ECSPI bus driver. |
---|
69 | * |
---|
70 | * @param[in] bus_path The ECSPI bus driver device path, e.g. "/dev/spi-0". |
---|
71 | * @param[in] alias_or_path The FDT alias or path, e.g. "spi0". |
---|
72 | * |
---|
73 | * @retval 0 Successful operation. |
---|
74 | * @retval -1 An error occurred. The errno is set to indicate the error. |
---|
75 | */ |
---|
76 | int spi_bus_register_imx(const char *bus_path, const char *alias_or_path); |
---|
77 | |
---|
78 | #ifdef __cplusplus |
---|
79 | } |
---|
80 | #endif /* __cplusplus */ |
---|
81 | |
---|
82 | #endif /* ASM */ |
---|
83 | |
---|
84 | #endif /* LIBBSP_ARM_IMX_BSP_H */ |
---|