Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
8c20dc40
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,发现更多精彩内容 >>
提交
8c20dc40
编写于
1月 08, 2016
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge
git://git.denx.de/u-boot-dm
上级
67ecb84c
c5a75339
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
83 addition
and
17 deletion
+83
-17
arch/sandbox/dts/test.dts
arch/sandbox/dts/test.dts
+5
-0
common/fdt_support.c
common/fdt_support.c
+3
-4
common/usb_kbd.c
common/usb_kbd.c
+36
-0
common/usb_storage.c
common/usb_storage.c
+1
-1
drivers/net/sandbox.c
drivers/net/sandbox.c
+1
-1
include/usb.h
include/usb.h
+1
-1
net/eth.c
net/eth.c
+31
-4
net/net.c
net/net.c
+3
-4
test/dm/Makefile
test/dm/Makefile
+2
-2
未找到文件。
arch/sandbox/dts/test.dts
浏览文件 @
8c20dc40
...
...
@@ -279,6 +279,11 @@
0x38
8
>;
};
timer
{
compatible
=
"sandbox,timer"
;
clock
-
frequency
=
<
1000000
>;
};
uart0
:
serial
{
compatible
=
"sandbox,serial"
;
u
-
boot
,
dm
-
pre
-
reloc
;
...
...
common/fdt_support.c
浏览文件 @
8c20dc40
...
...
@@ -952,8 +952,7 @@ void fdt_del_node_and_alias(void *blob, const char *alias)
/* Max address size we deal with */
#define OF_MAX_ADDR_CELLS 4
#define OF_BAD_ADDR FDT_ADDR_T_NONE
#define OF_CHECK_COUNTS(na, ns) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS && \
(ns) > 0)
#define OF_CHECK_COUNTS(na) ((na) > 0 && (na) <= OF_MAX_ADDR_CELLS)
/* Debug utility */
#ifdef DEBUG
...
...
@@ -1121,7 +1120,7 @@ static u64 __of_translate_address(void *blob, int node_offset, const fdt32_t *in
/* Cound address cells & copy address locally */
bus
->
count_cells
(
blob
,
parent
,
&
na
,
&
ns
);
if
(
!
OF_CHECK_COUNTS
(
na
,
ns
))
{
if
(
!
OF_CHECK_COUNTS
(
na
))
{
printf
(
"%s: Bad cell count for %s
\n
"
,
__FUNCTION__
,
fdt_get_name
(
blob
,
node_offset
,
NULL
));
goto
bail
;
...
...
@@ -1148,7 +1147,7 @@ static u64 __of_translate_address(void *blob, int node_offset, const fdt32_t *in
/* Get new parent bus and counts */
pbus
=
&
of_busses
[
0
];
pbus
->
count_cells
(
blob
,
parent
,
&
pna
,
&
pns
);
if
(
!
OF_CHECK_COUNTS
(
pna
,
pns
))
{
if
(
!
OF_CHECK_COUNTS
(
pna
))
{
printf
(
"%s: Bad cell count for %s
\n
"
,
__FUNCTION__
,
fdt_get_name
(
blob
,
node_offset
,
NULL
));
break
;
...
...
common/usb_kbd.c
浏览文件 @
8c20dc40
...
...
@@ -611,6 +611,41 @@ static int usb_kbd_probe(struct udevice *dev)
return
ret
;
}
static
int
usb_kbd_remove
(
struct
udevice
*
dev
)
{
struct
usb_device
*
udev
=
dev_get_parent_priv
(
dev
);
struct
usb_kbd_pdata
*
data
;
struct
stdio_dev
*
sdev
;
int
ret
;
sdev
=
stdio_get_by_name
(
DEVNAME
);
if
(
!
sdev
)
{
ret
=
-
ENXIO
;
goto
err
;
}
data
=
udev
->
privptr
;
if
(
stdio_deregister_dev
(
sdev
,
true
))
{
ret
=
-
EPERM
;
goto
err
;
}
#ifdef CONFIG_CONSOLE_MUX
if
(
iomux_doenv
(
stdin
,
getenv
(
"stdin"
)))
{
ret
=
-
ENOLINK
;
goto
err
;
}
#endif
#ifdef CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE
destroy_int_queue
(
udev
,
data
->
intq
);
#endif
free
(
data
->
new
);
free
(
data
);
return
0
;
err:
printf
(
"%s: warning, ret=%d"
,
__func__
,
ret
);
return
ret
;
}
static
const
struct
udevice_id
usb_kbd_ids
[]
=
{
{
.
compatible
=
"usb-keyboard"
},
{
}
...
...
@@ -621,6 +656,7 @@ U_BOOT_DRIVER(usb_kbd) = {
.
id
=
UCLASS_KEYBOARD
,
.
of_match
=
usb_kbd_ids
,
.
probe
=
usb_kbd_probe
,
.
remove
=
usb_kbd_remove
,
};
static
const
struct
usb_device_id
kbd_id_table
[]
=
{
...
...
common/usb_storage.c
浏览文件 @
8c20dc40
...
...
@@ -65,7 +65,7 @@ static const unsigned char us_direction[256/8] = {
static
ccb
usb_ccb
__attribute__
((
aligned
(
ARCH_DMA_MINALIGN
)));
static
__u32
CBWTag
;
#define USB_MAX_STOR_DEV
5
#define USB_MAX_STOR_DEV
7
static
int
usb_max_devs
;
/* number of highest available usb device */
static
block_dev_desc_t
usb_dev_desc
[
USB_MAX_STOR_DEV
];
...
...
drivers/net/sandbox.c
浏览文件 @
8c20dc40
...
...
@@ -157,7 +157,7 @@ static int sb_eth_recv(struct udevice *dev, int flags, uchar **packetp)
struct
eth_sandbox_priv
*
priv
=
dev_get_priv
(
dev
);
if
(
skip_timeout
)
{
sandbox_timer_add_offset
(
1
0
000UL
);
sandbox_timer_add_offset
(
1
1
000UL
);
skip_timeout
=
false
;
}
...
...
include/usb.h
浏览文件 @
8c20dc40
...
...
@@ -227,7 +227,7 @@ int board_usb_cleanup(int index, enum usb_init_type init);
#ifdef CONFIG_USB_STORAGE
#define USB_MAX_STOR_DEV
5
#define USB_MAX_STOR_DEV
7
block_dev_desc_t
*
usb_stor_get_dev
(
int
index
);
int
usb_stor_scan
(
int
mode
);
int
usb_stor_info
(
void
);
...
...
net/eth.c
浏览文件 @
8c20dc40
...
...
@@ -337,14 +337,30 @@ U_BOOT_ENV_CALLBACK(ethaddr, on_ethaddr);
int
eth_init
(
void
)
{
struct
udevice
*
current
;
char
*
ethact
=
getenv
(
"ethact"
);
char
*
ethrotate
=
getenv
(
"ethrotate"
);
struct
udevice
*
current
=
NULL
;
struct
udevice
*
old_current
;
int
ret
=
-
ENODEV
;
current
=
eth_get_dev
();
/*
* When 'ethrotate' variable is set to 'no' and 'ethact' variable
* is already set to an ethernet device, we should stick to 'ethact'.
*/
if
((
ethrotate
!=
NULL
)
&&
(
strcmp
(
ethrotate
,
"no"
)
==
0
))
{
if
(
ethact
)
{
current
=
eth_get_dev_by_name
(
ethact
);
if
(
!
current
)
return
-
EINVAL
;
}
}
if
(
!
current
)
{
printf
(
"No ethernet found.
\n
"
);
return
-
ENODEV
;
current
=
eth_get_dev
();
if
(
!
current
)
{
printf
(
"No ethernet found.
\n
"
);
return
-
ENODEV
;
}
}
old_current
=
current
;
...
...
@@ -1039,6 +1055,17 @@ int eth_receive(void *packet, int length)
static
void
eth_current_changed
(
void
)
{
char
*
act
=
getenv
(
"ethact"
);
char
*
ethrotate
;
/*
* The call to eth_get_dev() below has a side effect of rotating
* ethernet device if uc_priv->current == NULL. This is not what
* we want when 'ethrotate' variable is 'no'.
*/
ethrotate
=
getenv
(
"ethrotate"
);
if
((
ethrotate
!=
NULL
)
&&
(
strcmp
(
ethrotate
,
"no"
)
==
0
))
return
;
/* update current ethernet name */
if
(
eth_get_dev
())
{
if
(
act
==
NULL
||
strcmp
(
act
,
eth_get_name
())
!=
0
)
...
...
net/net.c
浏览文件 @
8c20dc40
...
...
@@ -542,6 +542,9 @@ restart:
#ifdef CONFIG_SHOW_ACTIVITY
show_activity
(
1
);
#endif
if
(
arp_timeout_check
()
>
0
)
time_start
=
get_timer
(
0
);
/*
* Check the ethernet for a new packet. The ethernet
* receive routine will process it.
...
...
@@ -570,10 +573,6 @@ restart:
goto
done
;
}
if
(
arp_timeout_check
()
>
0
)
{
time_start
=
get_timer
(
0
);
}
/*
* Check for a timeout, and run the timeout handler
* if we have one.
...
...
test/dm/Makefile
浏览文件 @
8c20dc40
...
...
@@ -27,8 +27,8 @@ obj-y += regmap.o
obj-$(CONFIG_REMOTEPROC)
+=
remoteproc.o
obj-$(CONFIG_RESET)
+=
reset.o
obj-$(CONFIG_DM_RTC)
+=
rtc.o
obj-$(CONFIG_DM_SPI_FLASH)
+=
sf.o
obj-$(CONFIG_DM_SPI)
+=
spi.o
#
obj-$(CONFIG_DM_SPI_FLASH) += sf.o
#
obj-$(CONFIG_DM_SPI) += spi.o
obj-y
+=
syscon.o
obj-$(CONFIG_DM_USB)
+=
usb.o
obj-$(CONFIG_DM_PMIC)
+=
pmic.o
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录