stm32_sdmmc2.h 827 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2017-2021, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32_SDMMC2_H
  7. #define STM32_SDMMC2_H
  8. #include <stdbool.h>
  9. #include <drivers/mmc.h>
  10. #include <drivers/st/regulator.h>
  11. struct stm32_sdmmc2_params {
  12. uintptr_t reg_base;
  13. unsigned int clk_rate;
  14. unsigned int bus_width;
  15. unsigned int flags;
  16. struct mmc_device_info *device_info;
  17. unsigned int pin_ckin;
  18. unsigned int negedge;
  19. unsigned int dirpol;
  20. unsigned int clock_id;
  21. unsigned int reset_id;
  22. unsigned int max_freq;
  23. bool use_dma;
  24. struct rdev *vmmc_regu;
  25. };
  26. unsigned long long stm32_sdmmc2_mmc_get_device_size(void);
  27. int stm32_sdmmc2_mmc_init(struct stm32_sdmmc2_params *params);
  28. bool plat_sdmmc2_use_dma(unsigned int instance, unsigned int memory);
  29. #endif /* STM32_SDMMC2_H */