Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
92915741
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
92915741
编写于
2月 15, 2008
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://www.denx.de/git/u-boot-avr32
上级
d9da0a39
d38da537
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
45 addition
and
20 deletion
+45
-20
board/atmel/atngw100/atngw100.c
board/atmel/atngw100/atngw100.c
+3
-0
board/atmel/atstk1000/atstk1000.c
board/atmel/atstk1000/atstk1000.c
+3
-0
board/atmel/atstk1000/flash.c
board/atmel/atstk1000/flash.c
+22
-9
cpu/at32ap/hsdramc.c
cpu/at32ap/hsdramc.c
+5
-1
include/asm-avr32/arch-at32ap700x/clk.h
include/asm-avr32/arch-at32ap700x/clk.h
+3
-0
include/asm-avr32/sdram.h
include/asm-avr32/sdram.h
+3
-0
include/configs/atngw100.h
include/configs/atngw100.h
+3
-7
include/configs/atstk1002.h
include/configs/atstk1002.h
+2
-2
include/configs/atstk1004.h
include/configs/atstk1004.h
+1
-1
未找到文件。
board/atmel/atngw100/atngw100.c
浏览文件 @
92915741
...
...
@@ -23,6 +23,7 @@
#include <asm/io.h>
#include <asm/sdram.h>
#include <asm/arch/clk.h>
#include <asm/arch/gpio.h>
#include <asm/arch/hmatrix2.h>
...
...
@@ -40,6 +41,8 @@ static const struct sdram_info sdram = {
.
trcd
=
2
,
.
tras
=
5
,
.
txsr
=
5
,
/* 7.81 us */
.
refresh_period
=
(
781
*
(
SDRAMC_BUS_HZ
/
1000
))
/
100000
,
};
int
board_early_init_f
(
void
)
...
...
board/atmel/atstk1000/atstk1000.c
浏览文件 @
92915741
...
...
@@ -23,6 +23,7 @@
#include <asm/io.h>
#include <asm/sdram.h>
#include <asm/arch/clk.h>
#include <asm/arch/gpio.h>
#include <asm/arch/hmatrix2.h>
...
...
@@ -40,6 +41,8 @@ static const struct sdram_info sdram = {
.
trcd
=
2
,
.
tras
=
5
,
.
txsr
=
5
,
/* 15.6 us */
.
refresh_period
=
(
156
*
(
SDRAMC_BUS_HZ
/
1000
))
/
10000
,
};
int
board_early_init_f
(
void
)
...
...
board/atmel/atstk1000/flash.c
浏览文件 @
92915741
...
...
@@ -159,7 +159,7 @@ int __flashprog write_buff(flash_info_t *info, uchar *src,
{
unsigned
long
flags
;
uint16_t
*
base
,
*
p
,
*
s
,
*
end
;
uint16_t
word
,
status
;
uint16_t
word
,
status
,
status1
;
int
ret
=
ERR_OK
;
if
(
addr
<
info
->
start
[
0
]
...
...
@@ -194,20 +194,33 @@ int __flashprog write_buff(flash_info_t *info, uchar *src,
sync_write_buffer
();
/* Wait for completion */
status1
=
readw
(
p
);
do
{
/* TODO: Timeout */
status
=
readw
(
p
);
}
while
((
status
!=
word
)
&&
!
(
status
&
0x28
));
status
=
status1
;
status1
=
readw
(
p
);
}
while
(((
status
^
status1
)
&
0x40
)
/* toggled */
&&
!
(
status1
&
0x28
));
/* error bits */
writew
(
0xf0
,
base
);
readw
(
base
);
if
(
status
!=
word
)
{
printf
(
"Flash write error at address 0x%p: 0x%02x
\n
"
,
p
,
status
);
/*
* We'll need to check once again for toggle bit
* because the toggle bit may stop toggling as I/O5
* changes to "1" (ref at49bv642.pdf p9)
*/
status1
=
readw
(
p
);
status
=
readw
(
p
);
if
((
status
^
status1
)
&
0x40
)
{
printf
(
"Flash write error at address 0x%p: "
"0x%02x != 0x%02x
\n
"
,
p
,
status
,
word
);
ret
=
ERR_PROG_ERROR
;
writew
(
0xf0
,
base
);
readw
(
base
);
break
;
}
writew
(
0xf0
,
base
);
readw
(
base
);
}
if
(
flags
)
...
...
cpu/at32ap/hsdramc.c
浏览文件 @
92915741
...
...
@@ -38,6 +38,10 @@ unsigned long sdram_init(const struct sdram_info *info)
unsigned
long
bus_hz
;
unsigned
int
i
;
if
(
!
info
->
refresh_period
)
panic
(
"ERROR: SDRAM refresh period == 0. "
"Please update the board code
\n
"
);
tmp
=
(
HSDRAMC1_BF
(
NC
,
info
->
col_bits
-
8
)
|
HSDRAMC1_BF
(
NR
,
info
->
row_bits
-
11
)
|
HSDRAMC1_BF
(
NB
,
info
->
bank_bits
-
1
)
...
...
@@ -113,7 +117,7 @@ unsigned long sdram_init(const struct sdram_info *info)
* 15.6 us is a typical value for a burst of length one
*/
bus_hz
=
get_sdram_clk_rate
();
hsdramc1_writel
(
TR
,
(
156
*
(
bus_hz
/
1000
))
/
10000
);
hsdramc1_writel
(
TR
,
info
->
refresh_period
);
printf
(
"SDRAM: %u MB at address 0x%08lx
\n
"
,
sdram_size
>>
20
,
info
->
phys_addr
);
...
...
include/asm-avr32/arch-at32ap700x/clk.h
浏览文件 @
92915741
...
...
@@ -75,4 +75,7 @@ static inline unsigned long get_mci_clk_rate(void)
}
#endif
/* Board code may need the SDRAM base clock as a compile-time constant */
#define SDRAMC_BUS_HZ (MAIN_CLK_RATE >> CFG_CLKDIV_HSB)
#endif
/* __ASM_AVR32_ARCH_CLK_H__ */
include/asm-avr32/sdram.h
浏览文件 @
92915741
...
...
@@ -26,6 +26,9 @@ struct sdram_info {
unsigned
long
phys_addr
;
unsigned
int
row_bits
,
col_bits
,
bank_bits
;
unsigned
int
cas
,
twr
,
trc
,
trp
,
trcd
,
tras
,
txsr
;
/* SDRAM refresh period in cycles */
unsigned
long
refresh_period
;
};
extern
unsigned
long
sdram_init
(
const
struct
sdram_info
*
info
);
...
...
include/configs/atngw100.h
浏览文件 @
92915741
...
...
@@ -170,13 +170,9 @@
#define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16)
#define CFG_LONGHELP 1
#define CFG_MEMTEST_START \
({ DECLARE_GLOBAL_DATA_PTR; gd->bd->bi_dram[0].start; })
#define CFG_MEMTEST_END \
({ \
DECLARE_GLOBAL_DATA_PTR; \
gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size; \
})
#define CFG_MEMTEST_START CFG_SDRAM_BASE
#define CFG_MEMTEST_END (CFG_MEMTEST_START + 0x1f00000)
#define CFG_BAUDRATE_TABLE { 115200, 38400, 19200, 9600, 2400 }
#endif
/* __CONFIG_H */
include/configs/atstk1002.h
浏览文件 @
92915741
...
...
@@ -184,8 +184,8 @@
#define CFG_MALLOC_LEN (256*1024)
#define CFG_DMA_ALLOC_LEN (16384)
/* Allow
2
MB for the kernel run-time image */
#define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 0x00
2
00000)
/* Allow
4
MB for the kernel run-time image */
#define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 0x00
4
00000)
#define CFG_BOOTPARAMS_LEN (16 * 1024)
/* Other configuration settings that shouldn't have to change all that often */
...
...
include/configs/atstk1004.h
浏览文件 @
92915741
...
...
@@ -167,7 +167,7 @@
#define CFG_MALLOC_LEN (256*1024)
/* Allow
4
MB for the kernel run-time image */
/* Allow
2
MB for the kernel run-time image */
#define CFG_LOAD_ADDR (CFG_SDRAM_BASE + 0x00200000)
#define CFG_BOOTPARAMS_LEN (16 * 1024)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录