SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
Macros | Functions | Variables
sys-dram.c File Reference
#include <barrier.h>
#include <io.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <types.h>
#include <jmp.h>
#include <log.h>
#include <sys-dram.h>
#include <sys-rtc.h>
Include dependency graph for sys-dram.c:

Macros

#define INIT_DRAM_BIN_BASE   0x48000
 
#define SUNXI_RTC_BASE   (0x07000000)
 
#define SUNXI_RTC_DATA_BASE   (SUNXI_RTC_BASE + 0x100)
 
#define RTC_FEL_INDEX   2
 

Functions

uint32_t sunxi_dram_init (void *para)
 Initialize the DRAM.
 

Variables

uint8_t __ddr_bin_start []
 
uint8_t __ddr_bin_end []
 

Macro Definition Documentation

◆ INIT_DRAM_BIN_BASE

#define INIT_DRAM_BIN_BASE   0x48000

◆ RTC_FEL_INDEX

#define RTC_FEL_INDEX   2

◆ SUNXI_RTC_BASE

#define SUNXI_RTC_BASE   (0x07000000)

◆ SUNXI_RTC_DATA_BASE

#define SUNXI_RTC_DATA_BASE   (SUNXI_RTC_BASE + 0x100)

Function Documentation

◆ sunxi_dram_init()

uint32_t sunxi_dram_init ( void *  para)

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
paraA 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
paraA 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.

Variable Documentation

◆ __ddr_bin_end

uint8_t __ddr_bin_end[]
extern

◆ __ddr_bin_start

uint8_t __ddr_bin_start[]
extern