Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
d67269ba
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,发现更多精彩内容 >>
提交
d67269ba
编写于
10月 28, 2015
作者:
F
Francois Retief
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sparc: leon3: Move snoop detection from startup.S to arch_cpu_init()
Signed-off-by:
N
Francois Retief
<
fgretief@spaceteq.co.za
>
上级
e17c5200
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
21 deletion
+21
-21
arch/sparc/cpu/leon3/cpu_init.c
arch/sparc/cpu/leon3/cpu_init.c
+12
-1
arch/sparc/cpu/leon3/start.S
arch/sparc/cpu/leon3/start.S
+0
-15
arch/sparc/cpu/leon3/usb_uhci.c
arch/sparc/cpu/leon3/usb_uhci.c
+4
-3
arch/sparc/include/asm/global_data.h
arch/sparc/include/asm/global_data.h
+5
-2
未找到文件。
arch/sparc/cpu/leon3/cpu_init.c
浏览文件 @
d67269ba
...
...
@@ -30,7 +30,6 @@ DECLARE_GLOBAL_DATA_PTR;
ambapp_dev_irqmp
*
irqmp
=
NULL
;
ambapp_dev_gptimer
*
gptimer
=
NULL
;
unsigned
int
gptimer_irq
=
0
;
int
leon3_snooping_avail
=
0
;
/*
* Breath some life into the CPU...
...
...
@@ -63,12 +62,24 @@ void cpu_init_f2(void)
ambapp_bus_init
(
CONFIG_AMBAPP_IOAREA
,
CONFIG_SYS_CLK_FREQ
,
&
ambapp_plb
);
}
/* If cache snooping is available in hardware the result will be set
* to 0x800000, otherwise 0.
*/
static
unsigned
int
snoop_detect
(
void
)
{
unsigned
int
result
;
asm
(
"lda [%%g0] 2, %0"
:
"=r"
(
result
));
return
result
&
0x00800000
;
}
int
arch_cpu_init
(
void
)
{
gd
->
cpu_clk
=
CONFIG_SYS_CLK_FREQ
;
gd
->
bus_clk
=
CONFIG_SYS_CLK_FREQ
;
gd
->
ram_size
=
CONFIG_SYS_SDRAM_SIZE
;
gd
->
arch
.
snooping_available
=
snoop_detect
();
return
0
;
}
...
...
arch/sparc/cpu/leon3/start.S
浏览文件 @
d67269ba
...
...
@@ -209,8 +209,6 @@ _trap_table:
SOFT_TRAP
; SOFT_TRAP; SOFT_TRAP; SOFT_TRAP; ! f8-fb
SOFT_TRAP
; SOFT_TRAP; SOFT_TRAP; SOFT_TRAP; ! fc-ff
.
extern
leon3_snooping_avail
.
section
".text"
.
extern
_nomem_amba_init
,
_nomem_memory_ctrl_init
.
align
4
...
...
@@ -401,19 +399,6 @@ prom_relocate_loop:
nop
nop
/*
If
CACHE
snooping
is
available
in
hardware
the
*
variable
leon3_snooping_avail
will
be
set
to
*
0x800000
else
0
.
*/
snoop_detect
:
sethi
%
hi
(
0x00800000
),
%
o0
lda
[%
g0
]
2
,
%
o1
and
%
o0
,
%
o1
,
%
o0
sethi
%
hi
(
leon3_snooping_avail
+
CONFIG_SYS_RELOC_MONITOR_BASE
-
CONFIG_SYS_TEXT_BASE
),
%
o1
st
%
o0
,
[%
lo
(
leon3_snooping_avail
+
CONFIG_SYS_RELOC_MONITOR_BASE
-
CONFIG_SYS_TEXT_BASE
)+%
o1
]
/*
call
relocate
*/
nop
/*
Call
relocated
init
functions
*/
jump
:
SPARC_LOAD_ADDRESS
(
cpu_init_f2
,
l7
,
o1
)
...
...
arch/sparc/cpu/leon3/usb_uhci.c
浏览文件 @
d67269ba
...
...
@@ -85,10 +85,11 @@
#include <usb.h>
#include "usb_uhci.h"
DECLARE_GLOBAL_DATA_PTR
;
#define USB_MAX_TEMP_TD 128
/* number of temporary TDs for bulk and control transfers */
#define USB_MAX_TEMP_INT_TD 32
/* number of temporary TDs for Interrupt transfers */
extern
int
leon3_snooping_avail
;
/*
#define out16r(address,data) (*(unsigned short *)(address) = \
(unsigned short)( \
...
...
@@ -573,7 +574,7 @@ void usb_check_skel(void)
if
(
qh_cntrl
.
dev_ptr
!=
0
)
{
/* it's a device assigned check if this caused IRQ */
dev
=
(
struct
usb_device
*
)
qh_cntrl
.
dev_ptr
;
/* Flush cache now that hardware updated DATA and TDs/QHs */
if
(
!
leon3_
snooping_avail
)
if
(
!
gd
->
arch
.
snooping_avail
)
sparc_dcache_flush_all
();
usb_get_td_status
(
&
tmp_td
[
0
],
dev
);
/* update status */
if
(
!
(
dev
->
status
&
USB_ST_NOT_PROC
))
{
/* is not active anymore, disconnect devices */
...
...
@@ -584,7 +585,7 @@ void usb_check_skel(void)
if
(
qh_bulk
.
dev_ptr
!=
0
)
{
/* it's a device assigned check if this caused IRQ */
dev
=
(
struct
usb_device
*
)
qh_bulk
.
dev_ptr
;
/* Flush cache now that hardware updated DATA and TDs/QHs */
if
(
!
leon3_
snooping_avail
)
if
(
!
gd
->
arch
.
snooping_avail
)
sparc_dcache_flush_all
();
usb_get_td_status
(
&
tmp_td
[
0
],
dev
);
/* update status */
if
(
!
(
dev
->
status
&
USB_ST_NOT_PROC
))
{
/* is not active anymore, disconnect devices */
...
...
arch/sparc/include/asm/global_data.h
浏览文件 @
d67269ba
...
...
@@ -2,8 +2,8 @@
* (C) Copyright 2002-2010
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* (C) Copyright 2007
* Daniel Hellstrom,
Gaisler Research
, daniel@gaisler.com.
* (C) Copyright 2007
, 2015
* Daniel Hellstrom,
Cobham, Gaisler
, daniel@gaisler.com.
*
* SPDX-License-Identifier: GPL-2.0+
*/
...
...
@@ -17,6 +17,9 @@
struct
arch_global_data
{
void
*
uart
;
unsigned
int
uart_freq
;
#ifdef CONFIG_LEON3
unsigned
int
snooping_available
;
#endif
};
#include <asm-generic/global_data.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录