Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
8a42eac7
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,发现更多精彩内容 >>
提交
8a42eac7
编写于
9月 29, 2003
作者:
D
dzu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* Adapt TRAB configuration and auto_update to new memory layout
上级
91e940d9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
91 addition
and
21 deletion
+91
-21
CHANGELOG
CHANGELOG
+2
-0
board/trab/auto_update.c
board/trab/auto_update.c
+13
-10
cpu/arm920t/usb_ohci.c
cpu/arm920t/usb_ohci.c
+75
-10
include/configs/trab.h
include/configs/trab.h
+1
-1
未找到文件。
CHANGELOG
浏览文件 @
8a42eac7
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
Changes for U-Boot 1.0.0:
Changes for U-Boot 1.0.0:
======================================================================
======================================================================
* Adapt TRAB configuration and auto_update to new memory layout
* Add configuration for wtk board
* Add configuration for wtk board
* Add support for the Sharp LQ065T9DR51U LCD display
* Add support for the Sharp LQ065T9DR51U LCD display
...
...
board/trab/auto_update.c
浏览文件 @
8a42eac7
...
@@ -105,14 +105,14 @@ struct flash_layout
...
@@ -105,14 +105,14 @@ struct flash_layout
#define AU_FL_APP_ND 0x005BFFFF
#define AU_FL_APP_ND 0x005BFFFF
#define AU_FL_DISK_ST 0x005C0000
#define AU_FL_DISK_ST 0x005C0000
#define AU_FL_DISK_ND 0x00FFFFFF
#define AU_FL_DISK_ND 0x00FFFFFF
#else
/* 8 MB Flash,
16
MB RAM */
#else
/* 8 MB Flash,
32
MB RAM */
#define AU_FL_FIRMWARE_ST 0x00000000
#define AU_FL_FIRMWARE_ST 0x00000000
#define AU_FL_FIRMWARE_ND 0x000
3
FFFF
#define AU_FL_FIRMWARE_ND 0x000
5
FFFF
#define AU_FL_KERNEL_ST 0x000
4
0000
#define AU_FL_KERNEL_ST 0x000
6
0000
#define AU_FL_KERNEL_ND 0x001
1
FFFF
#define AU_FL_KERNEL_ND 0x001
3
FFFF
#define AU_FL_APP_ST 0x001
2
0000
#define AU_FL_APP_ST 0x001
4
0000
#define AU_FL_APP_ND 0x00
3F
FFFF
#define AU_FL_APP_ND 0x00
67
FFFF
#define AU_FL_DISK_ST 0x00
40
0000
#define AU_FL_DISK_ST 0x00
68
0000
#define AU_FL_DISK_ND 0x007DFFFF
#define AU_FL_DISK_ND 0x007DFFFF
#define AU_FL_VFD_ST 0x007E0000
#define AU_FL_VFD_ST 0x007E0000
#define AU_FL_VFD_ND 0x007FFFFF
#define AU_FL_VFD_ND 0x007FFFFF
...
@@ -186,8 +186,8 @@ struct flash_layout aufl_layout[AU_MAXFILES - 3] = { \
...
@@ -186,8 +186,8 @@ struct flash_layout aufl_layout[AU_MAXFILES - 3] = { \
#define LOAD_ADDR ((unsigned char *)0x0C100100)
#define LOAD_ADDR ((unsigned char *)0x0C100100)
/* where to build strings in memory - 256 bytes should be enough */
/* where to build strings in memory - 256 bytes should be enough */
#define STRING_ADDR ((char *)0x0C100000)
#define STRING_ADDR ((char *)0x0C100000)
/* the
disk
is the largest image */
/* the
app
is the largest image */
#define MAX_LOADSZ ausize[IDX_
DISK
]
#define MAX_LOADSZ ausize[IDX_
APP
]
/* externals */
/* externals */
extern
int
fat_register_device
(
block_dev_desc_t
*
,
int
);
extern
int
fat_register_device
(
block_dev_desc_t
*
,
int
);
...
@@ -222,7 +222,7 @@ au_check_valid(int idx, long nbytes)
...
@@ -222,7 +222,7 @@ au_check_valid(int idx, long nbytes)
#endif
#endif
if
(
ntohl
(
hdr
->
ih_magic
)
!=
IH_MAGIC
||
if
(
ntohl
(
hdr
->
ih_magic
)
!=
IH_MAGIC
||
hdr
->
ih_arch
!=
IH_CPU_ARM
||
hdr
->
ih_arch
!=
IH_CPU_ARM
||
nbytes
<
ntohl
(
hdr
->
ih_size
))
nbytes
!=
(
sizeof
(
*
hdr
)
+
ntohl
(
hdr
->
ih_size
)
))
{
{
printf
(
"Image %s bad MAGIC or ARCH or SIZE
\n
"
,
aufile
[
idx
]);
printf
(
"Image %s bad MAGIC or ARCH or SIZE
\n
"
,
aufile
[
idx
]);
return
-
1
;
return
-
1
;
...
@@ -589,6 +589,9 @@ do_auto_update(void)
...
@@ -589,6 +589,9 @@ do_auto_update(void)
*/
*/
if
(
got_ctrlc
==
0
)
if
(
got_ctrlc
==
0
)
au_update_eeprom
(
i
);
au_update_eeprom
(
i
);
else
/* enable the power switch */
*
CPLD_VFD_BK
&=
~
POWER_OFF
;
}
}
usb_stop
();
usb_stop
();
/* restore the old state */
/* restore the old state */
...
...
cpu/arm920t/usb_ohci.c
浏览文件 @
8a42eac7
...
@@ -51,8 +51,6 @@
...
@@ -51,8 +51,6 @@
#define OHCI_CONTROL_INIT \
#define OHCI_CONTROL_INIT \
(OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
(OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
#define OHCI_UNLINK_TIMEOUT (CFG_HZ / 10)
#define readl(a) (*((vu_long *)(a)))
#define readl(a) (*((vu_long *)(a)))
#define writel(a, b) (*((vu_long *)(b)) = ((vu_long)a))
#define writel(a, b) (*((vu_long *)(b)) = ((vu_long)a))
...
@@ -85,6 +83,10 @@ struct ohci_hcca *phcca;
...
@@ -85,6 +83,10 @@ struct ohci_hcca *phcca;
struct
ohci_device
ohci_dev
;
struct
ohci_device
ohci_dev
;
/* urb_priv */
/* urb_priv */
urb_priv_t
urb_priv
;
urb_priv_t
urb_priv
;
/* RHSC flag */
int
got_rhsc
;
/* device which was disconnected */
struct
usb_device
*
devgone
;
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
...
@@ -952,8 +954,29 @@ static unsigned char root_hub_str_index1[] =
...
@@ -952,8 +954,29 @@ static unsigned char root_hub_str_index1[] =
/* request to virtual root hub */
/* request to virtual root hub */
static
int
ohci_submit_rh_msg
(
struct
usb_device
*
dev
,
unsigned
long
pipe
,
void
*
buffer
,
int
rh_check_port_status
(
ohci_t
*
controller
)
int
transfer_len
,
struct
devrequest
*
cmd
)
{
__u32
temp
,
ndp
,
i
;
int
res
;
res
=
-
1
;
temp
=
roothub_a
(
controller
);
ndp
=
(
temp
&
RH_A_NDP
);
for
(
i
=
0
;
i
<
ndp
;
i
++
)
{
temp
=
roothub_portstatus
(
controller
,
i
);
/* check for a device disconnect */
if
(((
temp
&
(
RH_PS_PESC
|
RH_PS_CSC
))
==
(
RH_PS_PESC
|
RH_PS_CSC
))
&&
((
temp
&
RH_PS_CCS
)
==
0
))
{
res
=
i
;
break
;
}
}
return
res
;
}
static
int
ohci_submit_rh_msg
(
struct
usb_device
*
dev
,
unsigned
long
pipe
,
void
*
buffer
,
int
transfer_len
,
struct
devrequest
*
cmd
)
{
{
void
*
data
=
buffer
;
void
*
data
=
buffer
;
int
leni
=
transfer_len
;
int
leni
=
transfer_len
;
...
@@ -1178,6 +1201,12 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
...
@@ -1178,6 +1201,12 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
int
maxsize
=
usb_maxpacket
(
dev
,
pipe
);
int
maxsize
=
usb_maxpacket
(
dev
,
pipe
);
int
timeout
;
int
timeout
;
/* device pulled? Shortcut the action. */
if
(
devgone
==
dev
)
{
dev
->
status
=
USB_ST_CRC_ERR
;
return
0
;
}
#ifdef DEBUG
#ifdef DEBUG
urb_priv
.
actual_length
=
0
;
urb_priv
.
actual_length
=
0
;
pkt_print
(
dev
,
pipe
,
buffer
,
transfer_len
,
setup
,
"SUB"
,
usb_pipein
(
pipe
));
pkt_print
(
dev
,
pipe
,
buffer
,
transfer_len
,
setup
,
"SUB"
,
usb_pipein
(
pipe
));
...
@@ -1210,7 +1239,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
...
@@ -1210,7 +1239,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
/* check whether the controller is done */
/* check whether the controller is done */
stat
=
hc_interrupt
();
stat
=
hc_interrupt
();
if
(
stat
<
0
)
{
if
(
stat
<
0
)
{
stat
=
1
;
stat
=
USB_ST_CRC_ERR
;
break
;
break
;
}
}
if
(
stat
>=
0
&&
stat
!=
0xff
)
{
if
(
stat
>=
0
&&
stat
!=
0xff
)
{
...
@@ -1220,11 +1249,33 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
...
@@ -1220,11 +1249,33 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
if
(
--
timeout
)
{
if
(
--
timeout
)
{
wait_ms
(
1
);
wait_ms
(
1
);
}
else
{
}
else
{
err
(
"CTL:TIMEOUT"
);
err
(
"CTL:TIMEOUT
"
);
stat
=
1
;
stat
=
USB_ST_CRC_ERR
;
break
;
break
;
}
}
}
}
/* we got an Root Hub Status Change interrupt */
if
(
got_rhsc
)
{
#ifdef DEBUG
ohci_dump_roothub
(
&
gohci
,
1
);
#endif
got_rhsc
=
0
;
/* abuse timeout */
timeout
=
rh_check_port_status
(
&
gohci
);
if
(
timeout
>=
0
)
{
#if 0 /* this does nothing useful, but leave it here in case that changes */
/* the called routine adds 1 to the passed value */
usb_hub_port_connect_change(gohci.rh.dev, timeout - 1);
#endif
/*
* XXX
* This is potentially dangerous because it assumes
* that only one device is ever plugged in!
*/
devgone
=
dev
;
}
}
dev
->
status
=
stat
;
dev
->
status
=
stat
;
dev
->
act_len
=
transfer_len
;
dev
->
act_len
=
transfer_len
;
...
@@ -1264,10 +1315,12 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
...
@@ -1264,10 +1315,12 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
pipe
);
pipe
);
return
-
1
;
return
-
1
;
}
}
if
(((
pipe
>>
8
)
&
0x7f
)
==
gohci
.
rh
.
devnum
)
if
(((
pipe
>>
8
)
&
0x7f
)
==
gohci
.
rh
.
devnum
)
{
gohci
.
rh
.
dev
=
dev
;
/* root hub - redirect */
/* root hub - redirect */
return
ohci_submit_rh_msg
(
dev
,
pipe
,
buffer
,
transfer_len
,
return
ohci_submit_rh_msg
(
dev
,
pipe
,
buffer
,
transfer_len
,
setup
);
setup
);
}
return
submit_common_msg
(
dev
,
pipe
,
buffer
,
transfer_len
,
setup
,
0
);
return
submit_common_msg
(
dev
,
pipe
,
buffer
,
transfer_len
,
setup
,
0
);
}
}
...
@@ -1356,9 +1409,17 @@ static int hc_start (ohci_t * ohci)
...
@@ -1356,9 +1409,17 @@ static int hc_start (ohci_t * ohci)
ohci
->
disabled
=
0
;
ohci
->
disabled
=
0
;
writel
(
ohci
->
hc_control
,
&
ohci
->
regs
->
control
);
writel
(
ohci
->
hc_control
,
&
ohci
->
regs
->
control
);
/* Choose the interrupts we care about now, others later on demand */
/* disable all interrupts */
mask
=
OHCI_INTR_MIE
|
OHCI_INTR_UE
|
OHCI_INTR_WDH
|
OHCI_INTR_SO
;
mask
=
(
OHCI_INTR_SO
|
OHCI_INTR_WDH
|
OHCI_INTR_SF
|
OHCI_INTR_RD
|
OHCI_INTR_UE
|
OHCI_INTR_FNO
|
OHCI_INTR_RHSC
|
OHCI_INTR_OC
|
OHCI_INTR_MIE
);
writel
(
mask
,
&
ohci
->
regs
->
intrdisable
);
/* clear all interrupts */
mask
&=
~
OHCI_INTR_MIE
;
writel
(
mask
,
&
ohci
->
regs
->
intrstatus
);
writel
(
mask
,
&
ohci
->
regs
->
intrstatus
);
/* Choose the interrupts we care about now - but w/o MIE */
mask
=
OHCI_INTR_RHSC
|
OHCI_INTR_UE
|
OHCI_INTR_WDH
|
OHCI_INTR_SO
;
writel
(
mask
,
&
ohci
->
regs
->
intrenable
);
#ifdef OHCI_USE_NPS
#ifdef OHCI_USE_NPS
/* required for AMD-756 and some Mac platforms */
/* required for AMD-756 and some Mac platforms */
...
@@ -1397,6 +1458,10 @@ hc_interrupt (void)
...
@@ -1397,6 +1458,10 @@ hc_interrupt (void)
/* dbg("Interrupt: %x frame: %x", ints, le16_to_cpu (ohci->hcca->frame_no)); */
/* dbg("Interrupt: %x frame: %x", ints, le16_to_cpu (ohci->hcca->frame_no)); */
if
(
ints
&
OHCI_INTR_RHSC
)
{
got_rhsc
=
1
;
}
if
(
ints
&
OHCI_INTR_UE
)
{
if
(
ints
&
OHCI_INTR_UE
)
{
ohci
->
disabled
++
;
ohci
->
disabled
++
;
err
(
"OHCI Unrecoverable Error, controller usb-%s disabled"
,
err
(
"OHCI Unrecoverable Error, controller usb-%s disabled"
,
...
...
include/configs/trab.h
浏览文件 @
8a42eac7
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
#ifdef CONFIG_OLD_VERSION
/* Old configuration: */
#ifdef CONFIG_OLD_VERSION
/* Old configuration: */
#define CONFIG_RAM_16MB
/* 16 MB SDRAM */
#define CONFIG_RAM_16MB
/* 16 MB SDRAM */
#define CONFIG_FLASH_8MB
/* 8 MB Flash */
#endif
#endif
#define CONFIG_FLASH_8MB
/* 8 MB Flash */
/*
/*
* If we are developing, we might want to start armboot from ram
* If we are developing, we might want to start armboot from ram
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录