VSF Documented
dram.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __HAL_DRIVER_ALLWINNER_F1CX00S_DRAM_H__
19#define __HAL_DRIVER_ALLWINNER_F1CX00S_DRAM_H__
20
21/*============================ INCLUDES ======================================*/
22#include "hal/vsf_hal_cfg.h"
23#include "../../__device.h"
25
26/*============================ MACROS ========================================*/
27/*============================ MACROFIED FUNCTIONS ===========================*/
28/*============================ TYPES =========================================*/
29
34};
35
36typedef struct f1cx00s_dram_param_t {
37 uint32_t base; /* dram base address */
38 uint32_t size; /* dram size (unit: MByte) */
39 uint32_t clk; /* dram work clock (unit: MHz) */
40 uint32_t access_mode; /* 0: interleave mode 1: sequence mode */
41 uint32_t cs_num; /* dram chip count 1: one chip 2: two chip */
42 uint32_t ddr8_remap; /* for 8bits data width DDR 0: normal 1: 8bits */
44 uint32_t bwidth; /* dram bus width */
45 uint32_t col_width; /* column address width */
46 uint32_t row_width; /* row address width */
47 uint32_t bank_size; /* dram bank count */
48 uint32_t cas; /* dram cas */
50
51/*============================ GLOBAL VARIABLES ==============================*/
52/*============================ INCLUDES ======================================*/
53/*============================ PROTOTYPES ====================================*/
54
55// return dram size in MB if > 0, else error
57
58#endif
59/* EOF */
f1cx00s_dram_type_t
Definition dram.h:30
@ DRAM_TYPE_MDDR
Definition dram.h:33
@ DRAM_TYPE_DDR
Definition dram.h:32
@ DRAM_TYPE_SDR
Definition dram.h:31
int f1cx00s_dram_init(f1cx00s_dram_param_t *param)
Definition dram.c:309
unsigned uint32_t
Definition stdint.h:9
Definition dram.h:36
uint32_t size
Definition dram.h:38
uint32_t row_width
Definition dram.h:46
uint32_t cs_num
Definition dram.h:41
uint32_t col_width
Definition dram.h:45
uint32_t bwidth
Definition dram.h:44
uint32_t cas
Definition dram.h:48
uint32_t base
Definition dram.h:37
uint32_t ddr8_remap
Definition dram.h:42
uint32_t access_mode
Definition dram.h:40
enum f1cx00s_dram_type_t sdr_ddr
Definition dram.h:43
uint32_t bank_size
Definition dram.h:47
uint32_t clk
Definition dram.h:39