[PATCH rtems-libbsd v1] nexus: Added SDHCI driver to ZynqMP

Gedare Bloom gedare at rtems.org
Thu Jul 15 15:10:00 UTC 2021


looks fine to me

On Mon, Jul 12, 2021 at 5:14 PM Stephen Clark <stephen.clark at oarcorp.com> wrote:
>
> Made ZynqMP build with the SDHCI driver.
> ---
>  rtemsbsd/include/bsp/nexus-devices.h          |  4 +++
>  .../include/machine/rtems-bsd-nexus-bus.h     | 29 +++++++++++++++++++
>  2 files changed, 33 insertions(+)
>
> diff --git a/rtemsbsd/include/bsp/nexus-devices.h b/rtemsbsd/include/bsp/nexus-devices.h
> index 5b51de7e..fdc845c1 100644
> --- a/rtemsbsd/include/bsp/nexus-devices.h
> +++ b/rtemsbsd/include/bsp/nexus-devices.h
> @@ -119,6 +119,10 @@ RTEMS_BSD_DRIVER_XILINX_ZYNQMP_CGEM3(ZYNQMP_IRQ_ETHERNET_3);
>  RTEMS_BSD_DRIVER_E1000PHY;
>  RTEMS_BSD_DRIVER_UKPHY;
>
> +RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI0;
> +RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI1;
> +RTEMS_BSD_DRIVER_MMC;
> +
>  #elif defined(LIBBSP_ARM_ATSAM_BSP_H)
>
>  RTEMS_BSD_DRIVER_USB;
> diff --git a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> index ccf8efa6..103d5b1d 100644
> --- a/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> +++ b/rtemsbsd/include/machine/rtems-bsd-nexus-bus.h
> @@ -139,6 +139,35 @@ extern "C" {
>                                    &zynqmp_slcr_res[0])
>  #endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SLCR */
>
> +/*
> + * Xilinx ZynqMP Arasan SDIO Driver.
> + */
> +#if !defined(RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI)
> +  #define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI(_num, _base, _irq)                     \
> +    static const rtems_bsd_device_resource arasan_sdhci ## _num ## _res[] = {       \
> +      {                                                                             \
> +        .type = RTEMS_BSD_RES_MEMORY,                                               \
> +        .start_request = 0,                                                         \
> +        .start_actual = (_base)                                                     \
> +      }, {                                                                          \
> +        .type = RTEMS_BSD_RES_IRQ,                                                  \
> +        .start_request = 0,                                                         \
> +        .start_actual = (_irq)                                                      \
> +      }                                                                             \
> +    };                                                                              \
> +    RTEMS_BSD_DEFINE_NEXUS_DEVICE(arasan_sdhci, _num,                               \
> +                                  RTEMS_ARRAY_SIZE(arasan_sdhci ## _num ## _res),      \
> +                                  &arasan_sdhci ## _num ## _res[0])
> +#endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI */
> +#if !defined(RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI0)
> +  #define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI0                \
> +    RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI(0, 0xFF160000, 80)
> +#endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI0 */
> +#if !defined(RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI1)
> +  #define RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI1                \
> +    RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI(1, 0xFF170000, 81)
> +#endif /* RTEMS_BSD_DRIVER_XILINX_ZYNQMP_SDHCI1 */
> +
>  /*
>   * Xilinx Zynq Arasan SDIO Driver.
>   */
> --
> 2.27.0
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list