Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
b919a3f2
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,发现更多精彩内容 >>
提交
b919a3f2
编写于
4月 24, 2010
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.denx.de/u-boot-i2c
上级
a47a12be
26a33504
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
3 deletion
+27
-3
README
README
+11
-0
drivers/i2c/fsl_i2c.c
drivers/i2c/fsl_i2c.c
+13
-3
include/i2c.h
include/i2c.h
+3
-0
未找到文件。
README
浏览文件 @
b919a3f2
...
...
@@ -1509,6 +1509,17 @@ The following options need to be configured:
custom i2c_init_board() routine in boards/xxx/board.c
is run early in the boot sequence.
CONFIG_SYS_I2C_BOARD_LATE_INIT
An alternative to CONFIG_SYS_I2C_INIT_BOARD. If this option is
defined a custom i2c_board_late_init() routine in
boards/xxx/board.c is run AFTER the operations in i2c_init()
is completed. This callpoint can be used to unreset i2c bus
using CPU i2c controller register accesses for CPUs whose i2c
controller provide such a method. It is called at the end of
i2c_init() to allow i2c_init operations to setup the i2c bus
controller on the CPU (e.g. setting bus speed & slave address).
CONFIG_I2CFAST (PPC405GP|PPC405EP only)
This option enables configuration of bi_iic_fast[] flags
...
...
drivers/i2c/fsl_i2c.c
浏览文件 @
b919a3f2
...
...
@@ -221,9 +221,10 @@ i2c_init(int speed, int slaveadd)
unsigned
int
temp
;
#ifdef CONFIG_SYS_I2C_INIT_BOARD
/* call board specific i2c bus reset routine before accessing the */
/* environment, which might be in a chip on that bus. For details */
/* about this problem see doc/I2C_Edge_Conditions. */
/* Call board specific i2c bus reset routine before accessing the
* environment, which might be in a chip on that bus. For details
* about this problem see doc/I2C_Edge_Conditions.
*/
i2c_init_board
();
#endif
dev
=
(
struct
fsl_i2c
*
)
(
CONFIG_SYS_IMMR
+
CONFIG_SYS_I2C_OFFSET
);
...
...
@@ -249,6 +250,15 @@ i2c_init(int speed, int slaveadd)
writeb
(
0x0
,
&
dev
->
sr
);
/* clear status register */
writeb
(
I2C_CR_MEN
,
&
dev
->
cr
);
/* start I2C controller */
#endif
#ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT
/* Call board specific i2c bus reset routine AFTER the bus has been
* initialized. Use either this callpoint or i2c_init_board;
* which is called before i2c_init operations.
* For details about this problem see doc/I2C_Edge_Conditions.
*/
i2c_board_late_init
();
#endif
}
static
int
...
...
include/i2c.h
浏览文件 @
b919a3f2
...
...
@@ -111,6 +111,9 @@ void i2c_init(int speed, int slaveaddr);
#ifdef CONFIG_SYS_I2C_INIT_BOARD
void
i2c_init_board
(
void
);
#endif
#ifdef CONFIG_SYS_I2C_BOARD_LATE_INIT
void
i2c_board_late_init
(
void
);
#endif
#if defined(CONFIG_I2C_MUX)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录