Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
fee98a3b
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,发现更多精彩内容 >>
提交
fee98a3b
编写于
10月 02, 2020
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'rpi-next' of
https://gitlab.denx.de/u-boot/custodians/u-boot-raspberrypi
into next
上级
7e373a1a
0db912de
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
9 deletion
+12
-9
drivers/pinctrl/broadcom/pinctrl-bcm283x.c
drivers/pinctrl/broadcom/pinctrl-bcm283x.c
+12
-9
未找到文件。
drivers/pinctrl/broadcom/pinctrl-bcm283x.c
浏览文件 @
fee98a3b
...
...
@@ -63,7 +63,7 @@ static int bcm2835_gpio_get_func_id(struct udevice *dev, unsigned int gpio)
int
bcm283x_pinctrl_set_state
(
struct
udevice
*
dev
,
struct
udevice
*
config
)
{
u32
pin_arr
[
MAX_PINS_PER_BANK
];
u32
function
;
int
function
;
int
i
,
len
,
pin_count
=
0
;
if
(
!
dev_read_prop
(
config
,
"brcm,pins"
,
&
len
)
||
!
len
||
...
...
@@ -104,17 +104,11 @@ static const struct udevice_id bcm2835_pinctrl_id[] = {
{}
};
int
bcm283x_pinctl_
probe
(
struct
udevice
*
dev
)
int
bcm283x_pinctl_
ofdata_to_platdata
(
struct
udevice
*
dev
)
{
struct
bcm283x_pinctrl_priv
*
priv
;
int
ret
;
struct
udevice
*
pdev
;
priv
=
dev_get_priv
(
dev
);
if
(
!
priv
)
{
debug
(
"%s: Failed to get private
\n
"
,
__func__
);
return
-
EINVAL
;
}
priv
->
base_reg
=
dev_read_addr_ptr
(
dev
);
if
(
!
priv
->
base_reg
)
{
...
...
@@ -122,6 +116,14 @@ int bcm283x_pinctl_probe(struct udevice *dev)
return
-
EINVAL
;
}
return
0
;
}
int
bcm283x_pinctl_probe
(
struct
udevice
*
dev
)
{
int
ret
;
struct
udevice
*
pdev
;
/* Create GPIO device as well */
ret
=
device_bind
(
dev
,
lists_driver_lookup_name
(
"gpio_bcm2835"
),
"gpio_bcm2835"
,
NULL
,
dev_of_offset
(
dev
),
&
pdev
);
...
...
@@ -147,10 +149,11 @@ U_BOOT_DRIVER(pinctrl_bcm283x) = {
.
name
=
"bcm283x_pinctrl"
,
.
id
=
UCLASS_PINCTRL
,
.
of_match
=
of_match_ptr
(
bcm2835_pinctrl_id
),
.
ofdata_to_platdata
=
bcm283x_pinctl_ofdata_to_platdata
,
.
priv_auto_alloc_size
=
sizeof
(
struct
bcm283x_pinctrl_priv
),
.
ops
=
&
bcm283x_pinctrl_ops
,
.
probe
=
bcm283x_pinctl_probe
,
#if
!CONFIG_IS_ENABLED(OF_CONTROL) ||
CONFIG_IS_ENABLED(OF_BOARD)
#if CONFIG_IS_ENABLED(OF_BOARD)
.
flags
=
DM_FLAG_PRE_RELOC
,
#endif
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录