Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
3fcb00be
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,发现更多精彩内容 >>
提交
3fcb00be
编写于
6月 30, 2018
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.denx.de/u-boot-usb
上级
ee322f3c
9c22aec4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
27 addition
and
14 deletion
+27
-14
arch/arm/include/asm/arch-sunxi/clock_sun6i.h
arch/arm/include/asm/arch-sunxi/clock_sun6i.h
+7
-3
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
+5
-4
drivers/usb/host/ehci-sunxi.c
drivers/usb/host/ehci-sunxi.c
+6
-2
drivers/usb/host/ohci-sunxi.c
drivers/usb/host/ohci-sunxi.c
+8
-4
drivers/usb/host/ohci.h
drivers/usb/host/ohci.h
+1
-1
未找到文件。
arch/arm/include/asm/arch-sunxi/clock_sun6i.h
浏览文件 @
3fcb00be
...
@@ -275,9 +275,13 @@ struct sunxi_ccm_reg {
...
@@ -275,9 +275,13 @@ struct sunxi_ccm_reg {
* These are EHCI1 - EHCI3 in the datasheet (EHCI0 is for the OTG) we call
* These are EHCI1 - EHCI3 in the datasheet (EHCI0 is for the OTG) we call
* them 0 - 2 like they were called on older SoCs.
* them 0 - 2 like they were called on older SoCs.
*/
*/
#define AHB_GATE_OFFSET_USB_OHCI3 31
#define AHB_GATE_OFFSET_USB_OHCI2 30
#define AHB_GATE_OFFSET_USB_OHCI1 29
#define AHB_GATE_OFFSET_USB_OHCI0 28
#define AHB_GATE_OFFSET_USB_OHCI0 28
#define AHB_GATE_OFFSET_USB_EHCI2 27
#define AHB_GATE_OFFSET_USB_EHCI3 27
#define AHB_GATE_OFFSET_USB_EHCI1 26
#define AHB_GATE_OFFSET_USB_EHCI2 26
#define AHB_GATE_OFFSET_USB_EHCI1 25
#define AHB_GATE_OFFSET_USB_EHCI0 24
#define AHB_GATE_OFFSET_USB_EHCI0 24
#elif defined(CONFIG_MACH_SUN50I)
#elif defined(CONFIG_MACH_SUN50I)
#define AHB_GATE_OFFSET_USB_OHCI0 28
#define AHB_GATE_OFFSET_USB_OHCI0 28
...
@@ -290,7 +294,7 @@ struct sunxi_ccm_reg {
...
@@ -290,7 +294,7 @@ struct sunxi_ccm_reg {
#define AHB_GATE_OFFSET_USB_EHCI1 27
#define AHB_GATE_OFFSET_USB_EHCI1 27
#define AHB_GATE_OFFSET_USB_EHCI0 26
#define AHB_GATE_OFFSET_USB_EHCI0 26
#endif
#endif
#if
def CONFIG_MACH_SUN50I
#if
defined(CONFIG_MACH_SUN50I) || defined(CONFIG_MACH_SUNXI_H3_H5)
#define AHB_GATE_OFFSET_USB0 23
#define AHB_GATE_OFFSET_USB0 23
#elif !defined(CONFIG_MACH_SUN8I_R40)
#elif !defined(CONFIG_MACH_SUN8I_R40)
#define AHB_GATE_OFFSET_USB0 24
#define AHB_GATE_OFFSET_USB0 24
...
...
arch/arm/include/asm/arch-sunxi/cpu_sun4i.h
浏览文件 @
3fcb00be
...
@@ -63,10 +63,11 @@
...
@@ -63,10 +63,11 @@
#ifdef CONFIG_SUNXI_GEN_SUN6I
#ifdef CONFIG_SUNXI_GEN_SUN6I
#if defined(CONFIG_MACH_SUNXI_H3_H5) || defined(CONFIG_MACH_SUN50I)
#if defined(CONFIG_MACH_SUNXI_H3_H5) || defined(CONFIG_MACH_SUN50I)
#define SUNXI_USBPHY_BASE 0x01c19000
#define SUNXI_USBPHY_BASE 0x01c19000
#define SUNXI_USB0_BASE 0x01c1a000
#define SUNXI_USB0_BASE SUNXI_USBPHY_BASE
#define SUNXI_USB1_BASE 0x01c1b000
#define SUNXI_USB1_BASE 0x01c1a000
#define SUNXI_USB2_BASE 0x01c1c000
#define SUNXI_USB2_BASE 0x01c1b000
#define SUNXI_USB3_BASE 0x01c1d000
#define SUNXI_USB3_BASE 0x01c1c000
#define SUNXI_USB4_BASE 0x01c1d000
#else
#else
#define SUNXI_USB0_BASE 0x01c19000
#define SUNXI_USB0_BASE 0x01c19000
#define SUNXI_USB1_BASE 0x01c1a000
#define SUNXI_USB1_BASE 0x01c1a000
...
...
drivers/usb/host/ehci-sunxi.c
浏览文件 @
3fcb00be
...
@@ -17,8 +17,10 @@
...
@@ -17,8 +17,10 @@
#include <generic-phy.h>
#include <generic-phy.h>
#ifdef CONFIG_SUNXI_GEN_SUN4I
#ifdef CONFIG_SUNXI_GEN_SUN4I
#define BASE_DIST 0x8000
#define AHB_CLK_DIST 2
#define AHB_CLK_DIST 2
#else
#else
#define BASE_DIST 0x1000
#define AHB_CLK_DIST 1
#define AHB_CLK_DIST 1
#endif
#endif
...
@@ -47,6 +49,7 @@ static int ehci_usb_probe(struct udevice *dev)
...
@@ -47,6 +49,7 @@ static int ehci_usb_probe(struct udevice *dev)
struct
ehci_hccr
*
hccr
=
(
struct
ehci_hccr
*
)
devfdt_get_addr
(
dev
);
struct
ehci_hccr
*
hccr
=
(
struct
ehci_hccr
*
)
devfdt_get_addr
(
dev
);
struct
ehci_hcor
*
hcor
;
struct
ehci_hcor
*
hcor
;
int
extra_ahb_gate_mask
=
0
;
int
extra_ahb_gate_mask
=
0
;
u8
reg_mask
=
0
;
int
phys
,
ret
;
int
phys
,
ret
;
priv
->
cfg
=
(
const
struct
ehci_sunxi_cfg
*
)
dev_get_driver_data
(
dev
);
priv
->
cfg
=
(
const
struct
ehci_sunxi_cfg
*
)
dev_get_driver_data
(
dev
);
...
@@ -86,10 +89,11 @@ no_phy:
...
@@ -86,10 +89,11 @@ no_phy:
* This should go away once we've moved to the driver model for
* This should go away once we've moved to the driver model for
* clocks resp. phys.
* clocks resp. phys.
*/
*/
reg_mask
=
((
uintptr_t
)
hccr
-
SUNXI_USB1_BASE
)
/
BASE_DIST
;
priv
->
ahb_gate_mask
=
1
<<
AHB_GATE_OFFSET_USB_EHCI0
;
priv
->
ahb_gate_mask
=
1
<<
AHB_GATE_OFFSET_USB_EHCI0
;
extra_ahb_gate_mask
=
priv
->
cfg
->
extra_ahb_gate_mask
;
extra_ahb_gate_mask
=
priv
->
cfg
->
extra_ahb_gate_mask
;
priv
->
ahb_gate_mask
<<=
phys
*
AHB_CLK_DIST
;
priv
->
ahb_gate_mask
<<=
reg_mask
*
AHB_CLK_DIST
;
extra_ahb_gate_mask
<<=
phys
*
AHB_CLK_DIST
;
extra_ahb_gate_mask
<<=
reg_mask
*
AHB_CLK_DIST
;
setbits_le32
(
&
priv
->
ccm
->
ahb_gate0
,
setbits_le32
(
&
priv
->
ccm
->
ahb_gate0
,
priv
->
ahb_gate_mask
|
extra_ahb_gate_mask
);
priv
->
ahb_gate_mask
|
extra_ahb_gate_mask
);
...
...
drivers/usb/host/ohci-sunxi.c
浏览文件 @
3fcb00be
...
@@ -17,8 +17,10 @@
...
@@ -17,8 +17,10 @@
#include <generic-phy.h>
#include <generic-phy.h>
#ifdef CONFIG_SUNXI_GEN_SUN4I
#ifdef CONFIG_SUNXI_GEN_SUN4I
#define BASE_DIST 0x8000
#define AHB_CLK_DIST 2
#define AHB_CLK_DIST 2
#else
#else
#define BASE_DIST 0x1000
#define AHB_CLK_DIST 1
#define AHB_CLK_DIST 1
#endif
#endif
...
@@ -33,9 +35,9 @@ struct ohci_sunxi_cfg {
...
@@ -33,9 +35,9 @@ struct ohci_sunxi_cfg {
};
};
struct
ohci_sunxi_priv
{
struct
ohci_sunxi_priv
{
ohci_t
ohci
;
struct
sunxi_ccm_reg
*
ccm
;
struct
sunxi_ccm_reg
*
ccm
;
u32
*
reset0_cfg
;
u32
*
reset0_cfg
;
ohci_t
ohci
;
int
ahb_gate_mask
;
/* Mask of ahb_gate0 clk gate bits for this hcd */
int
ahb_gate_mask
;
/* Mask of ahb_gate0 clk gate bits for this hcd */
int
usb_gate_mask
;
/* Mask of usb_clk_cfg clk gate bits for this hcd */
int
usb_gate_mask
;
/* Mask of usb_clk_cfg clk gate bits for this hcd */
struct
phy
phy
;
struct
phy
phy
;
...
@@ -48,6 +50,7 @@ static int ohci_usb_probe(struct udevice *dev)
...
@@ -48,6 +50,7 @@ static int ohci_usb_probe(struct udevice *dev)
struct
ohci_sunxi_priv
*
priv
=
dev_get_priv
(
dev
);
struct
ohci_sunxi_priv
*
priv
=
dev_get_priv
(
dev
);
struct
ohci_regs
*
regs
=
(
struct
ohci_regs
*
)
devfdt_get_addr
(
dev
);
struct
ohci_regs
*
regs
=
(
struct
ohci_regs
*
)
devfdt_get_addr
(
dev
);
int
extra_ahb_gate_mask
=
0
;
int
extra_ahb_gate_mask
=
0
;
u8
reg_mask
=
0
;
int
phys
,
ret
;
int
phys
,
ret
;
priv
->
cfg
=
(
const
struct
ohci_sunxi_cfg
*
)
dev_get_driver_data
(
dev
);
priv
->
cfg
=
(
const
struct
ohci_sunxi_cfg
*
)
dev_get_driver_data
(
dev
);
...
@@ -89,12 +92,13 @@ no_phy:
...
@@ -89,12 +92,13 @@ no_phy:
* This should go away once we've moved to the driver model for
* This should go away once we've moved to the driver model for
* clocks resp. phys.
* clocks resp. phys.
*/
*/
reg_mask
=
((
uintptr_t
)
regs
-
(
SUNXI_USB1_BASE
+
0x400
))
/
BASE_DIST
;
priv
->
ahb_gate_mask
=
1
<<
AHB_GATE_OFFSET_USB_OHCI0
;
priv
->
ahb_gate_mask
=
1
<<
AHB_GATE_OFFSET_USB_OHCI0
;
extra_ahb_gate_mask
=
priv
->
cfg
->
extra_ahb_gate_mask
;
extra_ahb_gate_mask
=
priv
->
cfg
->
extra_ahb_gate_mask
;
priv
->
usb_gate_mask
=
CCM_USB_CTRL_OHCI0_CLK
;
priv
->
usb_gate_mask
=
CCM_USB_CTRL_OHCI0_CLK
;
priv
->
ahb_gate_mask
<<=
phys
*
AHB_CLK_DIST
;
priv
->
ahb_gate_mask
<<=
reg_mask
*
AHB_CLK_DIST
;
extra_ahb_gate_mask
<<=
phys
*
AHB_CLK_DIST
;
extra_ahb_gate_mask
<<=
reg_mask
*
AHB_CLK_DIST
;
priv
->
usb_gate_mask
<<=
phys
;
priv
->
usb_gate_mask
<<=
reg_mask
;
setbits_le32
(
&
priv
->
ccm
->
ahb_gate0
,
setbits_le32
(
&
priv
->
ccm
->
ahb_gate0
,
priv
->
ahb_gate_mask
|
extra_ahb_gate_mask
);
priv
->
ahb_gate_mask
|
extra_ahb_gate_mask
);
...
...
drivers/usb/host/ohci.h
浏览文件 @
3fcb00be
...
@@ -359,7 +359,7 @@ typedef struct
...
@@ -359,7 +359,7 @@ typedef struct
}
urb_priv_t
;
}
urb_priv_t
;
#define URB_DEL 1
#define URB_DEL 1
#define NUM_EDS
8
/* num of preallocated endpoint descriptors */
#define NUM_EDS
32
/* num of preallocated endpoint descriptors */
#define NUM_TD 64
/* we need more TDs than EDs */
#define NUM_TD 64
/* we need more TDs than EDs */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录