#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <reg/reg-dram.h>
Go to the source code of this file.
◆ SDRAM_BASE
| #define SDRAM_BASE (0x40000000) |
◆ sunxi_dram_type
| Enumerator |
|---|
| SUNXI_DRAM_TYPE_DDR2 | |
| SUNXI_DRAM_TYPE_DDR3 | |
| SUNXI_DRAM_TYPE_LPDDR2 | |
| SUNXI_DRAM_TYPE_LPDDR3 | |
◆ sunxi_dram_init()
Initialize the DRAM.
This function initializes the DRAM with the specified parameters. The initialization process may involve configuration of memory controllers and other hardware settings. The user must provide a pointer to a structure containing the necessary initialization parameters.
- Parameters
-
| para | A pointer to a structure containing the parameters needed for the initialization process. |
- Returns
- A status code indicating the result of the initialization. Typically returns zero on success and a non-zero value on failure.
Initialize the DRAM.
This function initializes the DRAM using the provided parameters encapsulated in the dram_para_t structure. It calls the init_DRAM function to perform the actual initialization and returns the result.
- Parameters
-
| para | A pointer to the dram_para_t structure that contains DRAM initialization parameters. The function casts this void pointer to a dram_para_t pointer. |
- Returns
- uint32_t Returns the result of the
init_DRAM function call, which represents the size of the initialized DRAM in MB. A return value of 0 indicates failure.
◆ sunxi_get_dram_size()
Get the size of the DRAM (Dynamic Random Access Memory).
This function retrieves the total size of the DRAM available in the system. The size is returned in bytes.
- Returns
- The size of the DRAM in bytes.