VSF Documented
Main Page
Related Pages
Topics
Namespaces
Data Structures
Files
File List
Globals
source
hal
driver
Allwinner
F1CX00S
common
dram
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"
24
#include "
utilities/vsf_utilities.h
"
25
26
/*============================ MACROS ========================================*/
27
/*============================ MACROFIED FUNCTIONS ===========================*/
28
/*============================ TYPES =========================================*/
29
30
enum
f1cx00s_dram_type_t
{
31
DRAM_TYPE_SDR
= 0,
32
DRAM_TYPE_DDR
= 1,
33
DRAM_TYPE_MDDR
= 2,
34
};
35
36
typedef
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 */
43
enum
f1cx00s_dram_type_t
sdr_ddr
;
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 */
49
}
f1cx00s_dram_param_t
;
50
51
/*============================ GLOBAL VARIABLES ==============================*/
52
/*============================ INCLUDES ======================================*/
53
/*============================ PROTOTYPES ====================================*/
54
55
// return dram size in MB if > 0, else error
56
extern
int
f1cx00s_dram_init
(
f1cx00s_dram_param_t
*param);
57
58
#endif
59
/* EOF */
f1cx00s_dram_type_t
f1cx00s_dram_type_t
Definition
dram.h:30
DRAM_TYPE_MDDR
@ DRAM_TYPE_MDDR
Definition
dram.h:33
DRAM_TYPE_DDR
@ DRAM_TYPE_DDR
Definition
dram.h:32
DRAM_TYPE_SDR
@ DRAM_TYPE_SDR
Definition
dram.h:31
f1cx00s_dram_init
int f1cx00s_dram_init(f1cx00s_dram_param_t *param)
Definition
dram.c:309
uint32_t
unsigned int uint32_t
Definition
lvgl.h:43
f1cx00s_dram_param_t
Definition
dram.h:36
f1cx00s_dram_param_t::size
uint32_t size
Definition
dram.h:38
f1cx00s_dram_param_t::row_width
uint32_t row_width
Definition
dram.h:46
f1cx00s_dram_param_t::cs_num
uint32_t cs_num
Definition
dram.h:41
f1cx00s_dram_param_t::col_width
uint32_t col_width
Definition
dram.h:45
f1cx00s_dram_param_t::bwidth
uint32_t bwidth
Definition
dram.h:44
f1cx00s_dram_param_t::cas
uint32_t cas
Definition
dram.h:48
f1cx00s_dram_param_t::base
uint32_t base
Definition
dram.h:37
f1cx00s_dram_param_t::ddr8_remap
uint32_t ddr8_remap
Definition
dram.h:42
f1cx00s_dram_param_t::access_mode
uint32_t access_mode
Definition
dram.h:40
f1cx00s_dram_param_t::sdr_ddr
enum f1cx00s_dram_type_t sdr_ddr
Definition
dram.h:43
f1cx00s_dram_param_t::bank_size
uint32_t bank_size
Definition
dram.h:47
f1cx00s_dram_param_t::clk
uint32_t clk
Definition
dram.h:39
vsf_hal_cfg.h
vsf_utilities.h
Generated by
1.9.8