From 9b7a1da8047ba630ea05f6969728af2fd14ce9b4 Mon Sep 17 00:00:00 2001 From: Alex White Date: Thu, 18 May 2023 13:47:30 -0500 Subject: bsps/microblaze: Add device tree support to GPIO --- .../microblaze_fpga/include/bsp/microblaze-gpio.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h') diff --git a/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h b/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h index a3d79ff70f..e8f569c8fd 100644 --- a/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h +++ b/bsps/microblaze/microblaze_fpga/include/bsp/microblaze-gpio.h @@ -129,6 +129,24 @@ typedef struct { bool has_interrupts; } Microblaze_GPIO_context; +#ifdef BSP_MICROBLAZE_FPGA_USE_FDT +/** + * @brief Initialize GPIO context from FDT. + * + * @param[in] context the GPIO context to initialize + * @param[in] index the zero-based GPIO index in the FDT + * + * @retval RTEMS_SUCCESSFUL on success + * @retval RTEMS_INVALID_NUMBER if the index is invalid or the node is missing a + * required property + * @retval RTEMS_INVALID_ADDRESS if the context is NULL + */ +rtems_status_code microblaze_gpio_init_context_from_fdt( + Microblaze_GPIO_context *context, + int index +); +#endif /* BSP_MICROBLAZE_FPGA_USE_FDT */ + /** * @brief Set pin configuration for the specified GPIO channel. * -- cgit v1.2.3