Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
b4039a54
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,发现更多精彩内容 >>
提交
b4039a54
编写于
10月 23, 2010
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.denx.de/u-boot-usb
上级
678150f1
09c83a45
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
22 deletion
+28
-22
common/usb_storage.c
common/usb_storage.c
+1
-1
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hcd.c
+1
-1
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-pci.c
+4
-0
drivers/usb/host/ehci.h
drivers/usb/host/ehci.h
+1
-1
drivers/usb/musb/musb_core.c
drivers/usb/musb/musb_core.c
+1
-1
drivers/usb/musb/musb_core.h
drivers/usb/musb/musb_core.h
+1
-1
drivers/usb/musb/musb_hcd.c
drivers/usb/musb/musb_hcd.c
+19
-17
未找到文件。
common/usb_storage.c
浏览文件 @
b4039a54
...
...
@@ -70,7 +70,7 @@
/* direction table -- this indicates the direction of the data
* transfer for each command code -- a 1 indicates input
*/
unsigned
char
us_direction
[
256
/
8
]
=
{
static
const
unsigned
char
us_direction
[
256
/
8
]
=
{
0x28
,
0x81
,
0x14
,
0x14
,
0x20
,
0x01
,
0x90
,
0x77
,
0x0C
,
0x20
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x01
,
...
...
drivers/usb/host/ehci-hcd.c
浏览文件 @
b4039a54
...
...
@@ -205,12 +205,12 @@ static int handshake(uint32_t *ptr, uint32_t mask, uint32_t done, int usec)
uint32_t
result
;
do
{
result
=
ehci_readl
(
ptr
);
udelay
(
5
);
if
(
result
==
~
(
uint32_t
)
0
)
return
-
1
;
result
&=
mask
;
if
(
result
==
done
)
return
0
;
udelay
(
1
);
usec
--
;
}
while
(
usec
>
0
);
return
-
1
;
...
...
drivers/usb/host/ehci-pci.c
浏览文件 @
b4039a54
...
...
@@ -53,6 +53,10 @@ int ehci_hcd_init(void)
hcor
=
(
struct
ehci_hcor
*
)((
uint32_t
)
hccr
+
HC_LENGTH
(
ehci_readl
(
&
hccr
->
cr_capbase
)));
debug
(
"EHCI-PCI init hccr 0x%x and hcor 0x%x hc_length %d
\n
"
,
(
uint32_t
)
hccr
,
(
uint32_t
)
hcor
,
(
uint32_t
)
HC_LENGTH
(
ehci_readl
(
&
hccr
->
cr_capbase
)));
return
0
;
}
...
...
drivers/usb/host/ehci.h
浏览文件 @
b4039a54
...
...
@@ -175,7 +175,7 @@ struct qTD {
uint32_t
qt_buffer_hi
[
5
];
/* Appendix B */
/* pad struct for 32 byte alignment */
uint32_t
unused
[
3
];
}
__attribute__
((
aligned
(
32
)))
;
};
/* Queue Head (QH). */
struct
QH
{
...
...
drivers/usb/musb/musb_core.c
浏览文件 @
b4039a54
...
...
@@ -76,7 +76,7 @@ void musb_start(void)
* epinfo - Pointer to EP configuration table
* cnt - Number of entries in the EP conf table.
*/
void
musb_configure_ep
(
struct
musb_epinfo
*
epinfo
,
u8
cnt
)
void
musb_configure_ep
(
const
struct
musb_epinfo
*
epinfo
,
u8
cnt
)
{
u16
csr
;
u16
fifoaddr
=
64
;
/* First 64 bytes of FIFO reserved for EP0 */
...
...
drivers/usb/musb/musb_core.h
浏览文件 @
b4039a54
...
...
@@ -357,7 +357,7 @@ extern struct musb_regs *musbr;
/* exported functions */
extern
void
musb_start
(
void
);
extern
void
musb_configure_ep
(
struct
musb_epinfo
*
epinfo
,
u8
cnt
);
extern
void
musb_configure_ep
(
const
struct
musb_epinfo
*
epinfo
,
u8
cnt
);
extern
void
write_fifo
(
u8
ep
,
u32
length
,
void
*
fifo_data
);
extern
void
read_fifo
(
u8
ep
,
u32
length
,
void
*
fifo_data
);
...
...
drivers/usb/musb/musb_hcd.c
浏览文件 @
b4039a54
...
...
@@ -29,7 +29,7 @@
#define USB_MSC_BBB_GET_MAX_LUN 0xFE
/* Endpoint configuration information */
static
struct
musb_epinfo
epinfo
[
3
]
=
{
static
const
struct
musb_epinfo
epinfo
[
3
]
=
{
{
MUSB_BULK_EP
,
1
,
512
},
/* EP1 - Bluk Out - 512 Bytes */
{
MUSB_BULK_EP
,
0
,
512
},
/* EP1 - Bluk In - 512 Bytes */
{
MUSB_INTR_EP
,
0
,
64
}
/* EP2 - Interrupt IN - 64 Bytes */
...
...
@@ -41,7 +41,7 @@ static int rh_devnum;
static
u32
port_status
;
/* Device descriptor */
static
u8
root_hub_dev_des
[]
=
{
static
const
u8
root_hub_dev_des
[]
=
{
0x12
,
/* __u8 bLength; */
0x01
,
/* __u8 bDescriptorType; Device */
0x00
,
/* __u16 bcdUSB; v1.1 */
...
...
@@ -63,7 +63,7 @@ static u8 root_hub_dev_des[] = {
};
/* Configuration descriptor */
static
u8
root_hub_config_des
[]
=
{
static
const
u8
root_hub_config_des
[]
=
{
0x09
,
/* __u8 bLength; */
0x02
,
/* __u8 bDescriptorType; Configuration */
0x19
,
/* __u16 wTotalLength; */
...
...
@@ -96,14 +96,14 @@ static u8 root_hub_config_des[] = {
0xff
/* __u8 ep_bInterval; 255 ms */
};
static
unsigned
char
root_hub_str_index0
[]
=
{
static
const
unsigned
char
root_hub_str_index0
[]
=
{
0x04
,
/* __u8 bLength; */
0x03
,
/* __u8 bDescriptorType; String-descriptor */
0x09
,
/* __u8 lang ID */
0x04
,
/* __u8 lang ID */
};
static
unsigned
char
root_hub_str_index1
[]
=
{
static
const
unsigned
char
root_hub_str_index1
[]
=
{
0x1c
,
/* __u8 bLength; */
0x03
,
/* __u8 bDescriptorType; String-descriptor */
'M'
,
/* __u8 Unicode */
...
...
@@ -557,7 +557,7 @@ static int musb_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
int
len
=
0
;
int
stat
=
0
;
u32
datab
[
4
];
u8
*
data_buf
=
(
u8
*
)
datab
;
const
u8
*
data_buf
=
(
u8
*
)
datab
;
u16
bmRType_bReq
;
u16
wValue
;
u16
wIndex
;
...
...
@@ -778,25 +778,27 @@ static int musb_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
break
;
case
RH_GET_DESCRIPTOR
|
RH_CLASS
:
case
RH_GET_DESCRIPTOR
|
RH_CLASS
:
{
u8
*
_data_buf
=
(
u8
*
)
datab
;
debug
(
"RH_GET_DESCRIPTOR | RH_CLASS
\n
"
);
data_buf
[
0
]
=
0x09
;
/* min length; */
data_buf
[
1
]
=
0x29
;
data_buf
[
2
]
=
0x1
;
/* 1 port */
data_buf
[
3
]
=
0x01
;
/* per-port power switching */
data_buf
[
3
]
|=
0x10
;
/* no overcurrent reporting */
_
data_buf
[
0
]
=
0x09
;
/* min length; */
_
data_buf
[
1
]
=
0x29
;
_
data_buf
[
2
]
=
0x1
;
/* 1 port */
_
data_buf
[
3
]
=
0x01
;
/* per-port power switching */
_
data_buf
[
3
]
|=
0x10
;
/* no overcurrent reporting */
/* Corresponds to data_buf[4-7] */
data_buf
[
4
]
=
0
;
data_buf
[
5
]
=
5
;
data_buf
[
6
]
=
0
;
data_buf
[
7
]
=
0x02
;
data_buf
[
8
]
=
0xff
;
_
data_buf
[
4
]
=
0
;
_
data_buf
[
5
]
=
5
;
_
data_buf
[
6
]
=
0
;
_
data_buf
[
7
]
=
0x02
;
_
data_buf
[
8
]
=
0xff
;
len
=
min_t
(
unsigned
int
,
leni
,
min_t
(
unsigned
int
,
data_buf
[
0
],
wLength
));
break
;
}
case
RH_GET_CONFIGURATION
:
debug
(
"RH_GET_CONFIGURATION
\n
"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录