hal_ram_cfg.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _HAL_PSRAM_DDR_H_
  13. #define _HAL_PSRAM_DDR_H_
  14. #include <stdint.h>
  15. #include <stdbool.h>
  16. #include <stddef.h>
  17. #include "hal_config.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #ifdef CONFIG_SOC_8910
  22. #if defined(CONFIG_USE_DDR) && (CONFIG_DEFAULT_MEMBUS_FREQ == 200000000) && (CONFIG_RAM_SIZE == (32 << 20))
  23. #include "8910/hal_ddr_32m_200mhz_cfg.h"
  24. #elif defined(CONFIG_USE_DDR) && (CONFIG_DEFAULT_MEMBUS_FREQ == 400000000) && (CONFIG_RAM_SIZE == (32 << 20))
  25. #include "8910/hal_ddr_32m_400mhz_cfg.h"
  26. #elif defined(CONFIG_USE_DDR) && (CONFIG_DEFAULT_MEMBUS_FREQ == 200000000) && (CONFIG_RAM_SIZE == (64 << 20))
  27. #include "8910/hal_ddr_64m_200mhz_cfg.h"
  28. #elif defined(CONFIG_USE_PSRAM) && (CONFIG_DEFAULT_MEMBUS_FREQ == 200000000)
  29. #include "8910/hal_psram_200mhz_cfg.h"
  30. #else
  31. #error "Invalid PSRAM/DDR configuration"
  32. #endif
  33. #endif
  34. #ifdef CONFIG_SOC_8850
  35. #include "8850/hal_psram_fpga_cfg.h"
  36. #endif
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif