Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
c44d3cd1
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,发现更多精彩内容 >>
提交
c44d3cd1
编写于
11月 19, 2014
作者:
T
Tom Rini
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
git://git.denx.de/u-boot-i2c
上级
f10834e1
c469703b
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
350 addition
and
45 deletion
+350
-45
drivers/i2c/Makefile
drivers/i2c/Makefile
+1
-1
drivers/i2c/adi_i2c.c
drivers/i2c/adi_i2c.c
+305
-0
include/configs/bct-brettl2.h
include/configs/bct-brettl2.h
+2
-2
include/configs/bf518f-ezbrd.h
include/configs/bf518f-ezbrd.h
+2
-2
include/configs/bf526-ezbrd.h
include/configs/bf526-ezbrd.h
+2
-2
include/configs/bf527-ad7160-eval.h
include/configs/bf527-ad7160-eval.h
+2
-2
include/configs/bf527-ezkit.h
include/configs/bf527-ezkit.h
+2
-2
include/configs/bf527-sdp.h
include/configs/bf527-sdp.h
+2
-2
include/configs/bf537-minotaur.h
include/configs/bf537-minotaur.h
+2
-2
include/configs/bf537-pnav.h
include/configs/bf537-pnav.h
+2
-2
include/configs/bf537-srv1.h
include/configs/bf537-srv1.h
+2
-2
include/configs/bf537-stamp.h
include/configs/bf537-stamp.h
+2
-2
include/configs/bf538f-ezkit.h
include/configs/bf538f-ezkit.h
+2
-2
include/configs/bf548-ezkit.h
include/configs/bf548-ezkit.h
+2
-2
include/configs/bf609-ezkit.h
include/configs/bf609-ezkit.h
+2
-2
include/configs/bfin_adi_common.h
include/configs/bfin_adi_common.h
+2
-2
include/configs/br4.h
include/configs/br4.h
+2
-2
include/configs/cm-bf527.h
include/configs/cm-bf527.h
+2
-2
include/configs/cm-bf537e.h
include/configs/cm-bf537e.h
+2
-2
include/configs/cm-bf537u.h
include/configs/cm-bf537u.h
+2
-2
include/configs/cm-bf548.h
include/configs/cm-bf548.h
+2
-2
include/configs/pr1.h
include/configs/pr1.h
+2
-2
include/configs/tcm-bf518.h
include/configs/tcm-bf518.h
+2
-2
include/configs/tcm-bf537.h
include/configs/tcm-bf537.h
+2
-2
未找到文件。
drivers/i2c/Makefile
浏览文件 @
c44d3cd1
...
...
@@ -5,7 +5,7 @@
# SPDX-License-Identifier: GPL-2.0+
#
obj-$(CONFIG_
BFIN_TWI_I2C)
+=
bfin-tw
i_i2c.o
obj-$(CONFIG_
SYS_I2C_ADI)
+=
ad
i_i2c.o
obj-$(CONFIG_I2C_MV)
+=
mv_i2c.o
obj-$(CONFIG_PCA9564_I2C)
+=
pca9564_i2c.o
obj-$(CONFIG_TSI108_I2C)
+=
tsi108_i2c.o
...
...
drivers/i2c/
bfin-tw
i_i2c.c
→
drivers/i2c/
ad
i_i2c.c
浏览文件 @
c44d3cd1
/*
* i2c.c - driver for
Blackfin on-chip
TWI/I2C
* i2c.c - driver for
ADI
TWI/I2C
*
* Copyright (c) 2006-201
0
Analog Devices Inc.
* Copyright (c) 2006-201
4
Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/
...
...
@@ -9,9 +9,11 @@
#include <common.h>
#include <i2c.h>
#include <asm/blackfin.h>
#include <asm/clock.h>
#include <asm/mach-common/bits/twi.h>
#include <asm/twi.h>
#include <asm/io.h>
static
struct
twi_regs
*
i2c_get_base
(
struct
i2c_adapter
*
adap
);
/* Every register is 32bit aligned, but only 16bits in size */
#define ureg(name) u16 name; u16 __pad_##name;
...
...
@@ -36,25 +38,12 @@ struct twi_regs {
};
#undef ureg
/* U-Boot I2C framework allows only one active device at a time. */
#ifdef TWI_CLKDIV
#define TWI0_CLKDIV TWI_CLKDIV
#endif
static
volatile
struct
twi_regs
*
twi
=
(
void
*
)
TWI0_CLKDIV
;
#ifdef DEBUG
# define dmemset(s, c, n) memset(s, c, n)
#else
# define dmemset(s, c, n)
#endif
#define debugi(fmt, args...) \
debug( \
"MSTAT:0x%03x FSTAT:0x%x ISTAT:0x%02x\t%-20s:%-3i: " fmt "\n", \
twi->master_stat, twi->fifo_stat, twi->int_stat, \
__func__, __LINE__, ## args)
#ifdef CONFIG_TWICLK_KHZ
# error do not define CONFIG_TWICLK_KHZ ... use CONFIG_SYS_I2C_SPEED
# ifdef CONFIG_SYS_MAX_I2C_BUS
# undef CONFIG_SYS_MAX_I2C_BUS
# endif
#define CONFIG_SYS_MAX_I2C_BUS 1
#endif
/*
...
...
@@ -70,7 +59,7 @@ static volatile struct twi_regs *twi = (void *)TWI0_CLKDIV;
#define SYS_I2C_DUTY I2C_SPEED_TO_DUTY(CONFIG_SYS_I2C_SPEED)
/* Note: duty is inverse of speed, so the comparisons below are correct */
#if SYS_I2C_DUTY < I2C_DUTY_MAX || SYS_I2C_DUTY > I2C_DUTY_MIN
# error "The
Blackfin
I2C hardware can only operate 20KHz - 400KHz"
# error "The I2C hardware can only operate 20KHz - 400KHz"
#endif
/* All transfers are described by this data structure */
...
...
@@ -92,55 +81,52 @@ struct i2c_msg {
* wait_for_completion - manage the actual i2c transfer
* @msg: the i2c msg
*/
static
int
wait_for_completion
(
struct
i2c_msg
*
msg
)
static
int
wait_for_completion
(
struct
twi_regs
*
twi
,
struct
i2c_msg
*
msg
)
{
u
int16_t
int_stat
;
u
16
int_stat
,
ctl
;
ulong
timebase
=
get_timer
(
0
);
do
{
int_stat
=
twi
->
int_stat
;
int_stat
=
readw
(
&
twi
->
int_stat
)
;
if
(
int_stat
&
XMTSERV
)
{
debugi
(
"processing XMTSERV"
);
twi
->
int_stat
=
XMTSERV
;
SSYNC
();
writew
(
XMTSERV
,
&
twi
->
int_stat
);
if
(
msg
->
alen
)
{
twi
->
xmt_data8
=
*
(
msg
->
abuf
++
);
writew
(
*
(
msg
->
abuf
++
),
&
twi
->
xmt_data8
);
--
msg
->
alen
;
}
else
if
(
!
(
msg
->
flags
&
I2C_M_COMBO
)
&&
msg
->
len
)
{
twi
->
xmt_data8
=
*
(
msg
->
buf
++
);
writew
(
*
(
msg
->
buf
++
),
&
twi
->
xmt_data8
);
--
msg
->
len
;
}
else
{
twi
->
master_ctl
|=
(
msg
->
flags
&
I2C_M_COMBO
)
?
RSTART
|
MDIR
:
STOP
;
SSYNC
();
ctl
=
readw
(
&
twi
->
master_ctl
);
if
(
msg
->
flags
&
I2C_M_COMBO
)
writew
(
ctl
|
RSTART
|
MDIR
,
&
twi
->
master_ctl
);
else
writew
(
ctl
|
STOP
,
&
twi
->
master_ctl
);
}
}
if
(
int_stat
&
RCVSERV
)
{
debugi
(
"processing RCVSERV"
);
twi
->
int_stat
=
RCVSERV
;
SSYNC
();
writew
(
RCVSERV
,
&
twi
->
int_stat
);
if
(
msg
->
len
)
{
*
(
msg
->
buf
++
)
=
twi
->
rcv_data8
;
*
(
msg
->
buf
++
)
=
readw
(
&
twi
->
rcv_data8
)
;
--
msg
->
len
;
}
else
if
(
msg
->
flags
&
I2C_M_STOP
)
{
twi
->
master_ctl
|=
STOP
;
SSYNC
(
);
ctl
=
readw
(
&
twi
->
master_ctl
)
;
writew
(
ctl
|
STOP
,
&
twi
->
master_ctl
);
}
}
if
(
int_stat
&
MERR
)
{
debugi
(
"processing MERR"
);
twi
->
int_stat
=
MERR
;
SSYNC
();
writew
(
MERR
,
&
twi
->
int_stat
);
return
msg
->
len
;
}
if
(
int_stat
&
MCOMP
)
{
debugi
(
"processing MCOMP"
);
twi
->
int_stat
=
MCOMP
;
SSYNC
();
writew
(
MCOMP
,
&
twi
->
int_stat
);
if
(
msg
->
flags
&
I2C_M_COMBO
&&
msg
->
len
)
{
twi
->
master_ctl
=
(
twi
->
master_ctl
&
~
RSTART
)
|
ctl
=
readw
(
&
twi
->
master_ctl
);
ctl
=
(
ctl
&
~
RSTART
)
|
(
min
(
msg
->
len
,
0xff
)
<<
6
)
|
MEN
|
MDIR
;
SSYNC
(
);
writew
(
ctl
,
&
twi
->
master_ctl
);
}
else
break
;
}
...
...
@@ -154,15 +140,12 @@ static int wait_for_completion(struct i2c_msg *msg)
return
msg
->
len
;
}
/**
* i2c_transfer - setup an i2c transfer
* @return: 0 if things worked, non-0 if things failed
*
* Here we just get the i2c stuff all prepped and ready, and then tail off
* into wait_for_completion() for all the bits to go.
*/
static
int
i2c_transfer
(
uchar
chip
,
uint
addr
,
int
alen
,
uchar
*
buffer
,
int
len
,
u8
flags
)
static
int
i2c_transfer
(
struct
i2c_adapter
*
adap
,
uint8_t
chip
,
uint
addr
,
int
alen
,
uint8_t
*
buffer
,
int
len
,
uint8_t
flags
)
{
struct
twi_regs
*
twi
=
i2c_get_base
(
adap
);
int
ret
;
u16
ctl
;
uchar
addr_buffer
[]
=
{
(
addr
>>
0
),
(
addr
>>
8
),
...
...
@@ -175,205 +158,148 @@ static int i2c_transfer(uchar chip, uint addr, int alen, uchar *buffer, int len,
.
abuf
=
addr_buffer
,
.
alen
=
alen
,
};
int
ret
;
dmemset
(
buffer
,
0xff
,
len
);
debugi
(
"chip=0x%x addr=0x%02x alen=%i buf[0]=0x%02x len=%i flags=0x%02x[%s] "
,
chip
,
addr
,
alen
,
buffer
[
0
],
len
,
flags
,
(
flags
&
I2C_M_READ
?
"rd"
:
"wr"
));
/* wait for things to settle */
while
(
twi
->
master_stat
&
BUSBUSY
)
while
(
readw
(
&
twi
->
master_stat
)
&
BUSBUSY
)
if
(
ctrlc
())
return
1
;
/* Set Transmit device address */
twi
->
master_addr
=
chip
;
writew
(
chip
,
&
twi
->
master_addr
)
;
/* Clear the FIFO before starting things */
twi
->
fifo_ctl
=
XMTFLUSH
|
RCVFLUSH
;
SSYNC
();
twi
->
fifo_ctl
=
0
;
SSYNC
();
writew
(
XMTFLUSH
|
RCVFLUSH
,
&
twi
->
fifo_ctl
);
writew
(
0
,
&
twi
->
fifo_ctl
);
/* prime the pump */
if
(
msg
.
alen
)
{
len
=
(
msg
.
flags
&
I2C_M_COMBO
)
?
msg
.
alen
:
msg
.
alen
+
len
;
debugi
(
"first byte=0x%02x"
,
*
msg
.
abuf
);
twi
->
xmt_data8
=
*
(
msg
.
abuf
++
);
writew
(
*
(
msg
.
abuf
++
),
&
twi
->
xmt_data8
);
--
msg
.
alen
;
}
else
if
(
!
(
msg
.
flags
&
I2C_M_READ
)
&&
msg
.
len
)
{
debugi
(
"first byte=0x%02x"
,
*
msg
.
buf
);
twi
->
xmt_data8
=
*
(
msg
.
buf
++
);
writew
(
*
(
msg
.
buf
++
),
&
twi
->
xmt_data8
);
--
msg
.
len
;
}
/* clear int stat */
twi
->
master_stat
=
-
1
;
twi
->
int_stat
=
-
1
;
twi
->
int_mask
=
0
;
SSYNC
();
writew
(
-
1
,
&
twi
->
master_stat
);
writew
(
-
1
,
&
twi
->
int_stat
);
writew
(
0
,
&
twi
->
int_mask
);
/* Master enable */
twi
->
master_ctl
=
(
twi
->
master_ctl
&
FAST
)
|
(
min
(
len
,
0xff
)
<<
6
)
|
MEN
|
((
msg
.
flags
&
I2C_M_READ
)
?
MDIR
:
0
);
SSYNC
();
debugi
(
"CTL=0x%04x"
,
twi
->
master_ctl
);
ctl
=
readw
(
&
twi
->
master_ctl
);
ctl
=
(
ctl
&
FAST
)
|
(
min
(
len
,
0xff
)
<<
6
)
|
MEN
|
((
msg
.
flags
&
I2C_M_READ
)
?
MDIR
:
0
);
writew
(
ctl
,
&
twi
->
master_ctl
);
/* process the rest */
ret
=
wait_for_completion
(
&
msg
);
debugi
(
"ret=%d"
,
ret
);
ret
=
wait_for_completion
(
twi
,
&
msg
);
if
(
ret
)
{
twi
->
master_ctl
&=
~
MEN
;
twi
->
control
&=
~
TWI_ENA
;
SSYNC
();
twi
->
control
|=
TWI_ENA
;
SSYNC
();
ctl
=
readw
(
&
twi
->
master_ctl
)
&
~
MEN
;
writew
(
ctl
,
&
twi
->
master_ctl
);
ctl
=
readw
(
&
twi
->
control
)
&
~
TWI_ENA
;
writew
(
ctl
,
&
twi
->
control
);
ctl
=
readw
(
&
twi
->
control
)
|
TWI_ENA
;
writew
(
ctl
,
&
twi
->
control
);
}
return
ret
;
}
/**
* i2c_set_bus_speed - set i2c bus speed
* @speed: bus speed (in HZ)
*/
int
i2c_set_bus_speed
(
unsigned
int
speed
)
static
uint
adi_i2c_setspeed
(
struct
i2c_adapter
*
adap
,
uint
speed
)
{
struct
twi_regs
*
twi
=
i2c_get_base
(
adap
);
u16
clkdiv
=
I2C_SPEED_TO_DUTY
(
speed
);
/* Set TWI interface clock */
if
(
clkdiv
<
I2C_DUTY_MAX
||
clkdiv
>
I2C_DUTY_MIN
)
return
-
1
;
twi
->
clkdiv
=
(
clkdiv
<<
8
)
|
(
clkdiv
&
0xff
);
clkdiv
=
(
clkdiv
<<
8
)
|
(
clkdiv
&
0xff
);
writew
(
clkdiv
,
&
twi
->
clkdiv
);
/* Don't turn it on */
twi
->
master_ctl
=
(
speed
>
100000
?
FAST
:
0
);
writew
(
speed
>
100000
?
FAST
:
0
,
&
twi
->
master_ctl
);
return
0
;
}
/**
* i2c_get_bus_speed - get i2c bus speed
* @speed: bus speed (in HZ)
*/
unsigned
int
i2c_get_bus_speed
(
void
)
{
/* 10 MHz / (2 * CLKDIV) -> 5 MHz / CLKDIV */
return
5000000
/
(
twi
->
clkdiv
&
0xff
);
}
/**
* i2c_init - initialize the i2c bus
* @speed: bus speed (in HZ)
* @slaveaddr: address of device in slave mode (0 - not slave)
*
* Slave mode isn't actually implemented. It'll stay that way until
* we get a real request for it.
*/
void
i2c_init
(
int
speed
,
int
slaveaddr
)
static
void
adi_i2c_init
(
struct
i2c_adapter
*
adap
,
int
speed
,
int
slaveaddr
)
{
uint8_t
prescale
=
((
get_i2c_clk
()
/
1000
/
1000
+
5
)
/
10
)
&
0x7F
;
struct
twi_regs
*
twi
=
i2c_get_base
(
adap
);
u16
prescale
=
((
get_i2c_clk
()
/
1000
/
1000
+
5
)
/
10
)
&
0x7F
;
/* Set TWI internal clock as 10MHz */
twi
->
control
=
prescale
;
writew
(
prescale
,
&
twi
->
control
)
;
/* Set TWI interface clock as specified */
i2c_set_bus_speed
(
speed
);
/* Enable it */
twi
->
control
=
TWI_ENA
|
prescale
;
SSYNC
();
debugi
(
"CONTROL:0x%04x CLKDIV:0x%04x"
,
twi
->
control
,
twi
->
clkdiv
);
#if CONFIG_SYS_I2C_SLAVE
# error I2C slave support not tested/supported
/* If they want us as a slave, do it */
if
(
slaveaddr
)
{
twi
->
slave_addr
=
slaveaddr
;
twi
->
slave_ctl
=
SEN
;
}
#endif
writew
(
TWI_ENA
|
prescale
,
&
twi
->
control
);
}
/**
* i2c_probe - test if a chip exists at a given i2c address
* @chip: i2c chip addr to search for
* @return: 0 if found, non-0 if not found
*/
int
i2c_probe
(
uchar
chip
)
static
int
adi_i2c_read
(
struct
i2c_adapter
*
adap
,
uint8_t
chip
,
uint
addr
,
int
alen
,
uint8_t
*
buffer
,
int
len
)
{
u8
byte
;
return
i2c_read
(
chip
,
0
,
0
,
&
byte
,
1
);
return
i2c_transfer
(
adap
,
chip
,
addr
,
alen
,
buffer
,
len
,
alen
?
I2C_M_COMBO
:
I2C_M_READ
);
}
/**
* i2c_read - read data from an i2c device
* @chip: i2c chip addr
* @addr: memory (register) address in the chip
* @alen: byte size of address
* @buffer: buffer to store data read from chip
* @len: how many bytes to read
* @return: 0 on success, non-0 on failure
*/
int
i2c_read
(
uchar
chip
,
uint
addr
,
int
alen
,
uchar
*
buffer
,
int
len
)
static
int
adi_i2c_write
(
struct
i2c_adapter
*
adap
,
uint8_t
chip
,
uint
addr
,
int
alen
,
uint8_t
*
buffer
,
int
len
)
{
return
i2c_transfer
(
chip
,
addr
,
alen
,
buffer
,
len
,
(
alen
?
I2C_M_COMBO
:
I2C_M_READ
)
);
return
i2c_transfer
(
adap
,
chip
,
addr
,
alen
,
buffer
,
len
,
0
);
}
/**
* i2c_write - write data to an i2c device
* @chip: i2c chip addr
* @addr: memory (register) address in the chip
* @alen: byte size of address
* @buffer: buffer holding data to write to chip
* @len: how many bytes to write
* @return: 0 on success, non-0 on failure
*/
int
i2c_write
(
uchar
chip
,
uint
addr
,
int
alen
,
uchar
*
buffer
,
int
len
)
static
int
adi_i2c_probe
(
struct
i2c_adapter
*
adap
,
uint8_t
chip
)
{
return
i2c_transfer
(
chip
,
addr
,
alen
,
buffer
,
len
,
0
);
u8
byte
;
return
adi_i2c_read
(
adap
,
chip
,
0
,
0
,
&
byte
,
1
);
}
/**
* i2c_set_bus_num - change active I2C bus
* @bus: bus index, zero based
* @returns: 0 on success, non-0 on failure
*/
int
i2c_set_bus_num
(
unsigned
int
bus
)
static
struct
twi_regs
*
i2c_get_base
(
struct
i2c_adapter
*
adap
)
{
switch
(
bus
)
{
#if CONFIG_SYS_MAX_I2C_BUS > 0
case
0
:
twi
=
(
void
*
)
TWI0_CLKDIV
;
return
0
;
switch
(
adap
->
hwadapnr
)
{
#if CONFIG_SYS_MAX_I2C_BUS > 2
case
2
:
return
(
struct
twi_regs
*
)
TWI2_CLKDIV
;
#endif
#if CONFIG_SYS_MAX_I2C_BUS > 1
case
1
:
twi
=
(
void
*
)
TWI1_CLKDIV
;
return
0
;
case
1
:
return
(
struct
twi_regs
*
)
TWI1_CLKDIV
;
#endif
#if CONFIG_SYS_MAX_I2C_BUS > 2
case
2
:
twi
=
(
void
*
)
TWI2_CLKDIV
;
return
0
;
#endif
default:
return
-
1
;
case
0
:
return
(
struct
twi_regs
*
)
TWI0_CLKDIV
;
default:
printf
(
"wrong hwadapnr: %d
\n
"
,
adap
->
hwadapnr
);
}
return
NULL
;
}
/**
* i2c_get_bus_num - returns index of active I2C bus
*/
unsigned
int
i2c_get_bus_num
(
void
)
{
switch
((
unsigned
long
)
twi
)
{
#if CONFIG_SYS_MAX_I2C_BUS > 0
case
TWI0_CLKDIV
:
return
0
;
#endif
U_BOOT_I2C_ADAP_COMPLETE
(
adi_i2c0
,
adi_i2c_init
,
adi_i2c_probe
,
adi_i2c_read
,
adi_i2c_write
,
adi_i2c_setspeed
,
CONFIG_SYS_I2C_SPEED
,
0
,
0
)
#if CONFIG_SYS_MAX_I2C_BUS > 1
case
TWI1_CLKDIV
:
return
1
;
U_BOOT_I2C_ADAP_COMPLETE
(
adi_i2c1
,
adi_i2c_init
,
adi_i2c_probe
,
adi_i2c_read
,
adi_i2c_write
,
adi_i2c_setspeed
,
CONFIG_SYS_I2C_SPEED
,
0
,
1
)
#endif
#if CONFIG_SYS_MAX_I2C_BUS > 2
case
TWI2_CLKDIV
:
return
2
;
U_BOOT_I2C_ADAP_COMPLETE
(
adi_i2c2
,
adi_i2c_init
,
adi_i2c_probe
,
adi_i2c_read
,
adi_i2c_write
,
adi_i2c_setspeed
,
CONFIG_SYS_I2C_SPEED
,
0
,
2
)
#endif
default:
return
-
1
;
}
}
include/configs/bct-brettl2.h
浏览文件 @
c44d3cd1
...
...
@@ -122,8 +122,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf518f-ezbrd.h
浏览文件 @
c44d3cd1
...
...
@@ -134,8 +134,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf526-ezbrd.h
浏览文件 @
c44d3cd1
...
...
@@ -131,8 +131,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf527-ad7160-eval.h
浏览文件 @
c44d3cd1
...
...
@@ -119,8 +119,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf527-ezkit.h
浏览文件 @
c44d3cd1
...
...
@@ -134,8 +134,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf527-sdp.h
浏览文件 @
c44d3cd1
...
...
@@ -103,8 +103,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf537-minotaur.h
浏览文件 @
c44d3cd1
...
...
@@ -121,8 +121,8 @@
/*
* I2C settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
#define CONFIG_SYS_I2C_SPEED 50000
#define CONFIG_SYS_I2C_SLAVE 0
...
...
include/configs/bf537-pnav.h
浏览文件 @
c44d3cd1
...
...
@@ -142,8 +142,8 @@
/*
* I2C settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf537-srv1.h
浏览文件 @
c44d3cd1
...
...
@@ -120,8 +120,8 @@
/*
* I2C settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
#define CONFIG_SYS_I2C_SPEED 50000
#define CONFIG_SYS_I2C_SLAVE 0
...
...
include/configs/bf537-stamp.h
浏览文件 @
c44d3cd1
...
...
@@ -128,8 +128,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf538f-ezkit.h
浏览文件 @
c44d3cd1
...
...
@@ -126,8 +126,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf548-ezkit.h
浏览文件 @
c44d3cd1
...
...
@@ -134,8 +134,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/bf609-ezkit.h
浏览文件 @
c44d3cd1
...
...
@@ -81,8 +81,8 @@
#define CONFIG_PHYLIB
/* i2c Settings */
#define CONFIG_
BFIN_TWI
_I2C
#define CONFIG_
HARD_I2C
#define CONFIG_
SYS
_I2C
#define CONFIG_
SYS_I2C_ADI
/*
* Flash Settings
...
...
include/configs/bfin_adi_common.h
浏览文件 @
c44d3cd1
...
...
@@ -73,7 +73,7 @@
# ifdef CONFIG_SPI_FLASH
# define CONFIG_CMD_SF
# endif
# if defined(CONFIG_
HARD
_I2C) || defined(CONFIG_SYS_I2C_SOFT)
# if defined(CONFIG_
SYS
_I2C) || defined(CONFIG_SYS_I2C_SOFT)
# define CONFIG_CMD_I2C
# define CONFIG_SOFT_I2C_READ_REPEATED_START
# endif
...
...
@@ -301,7 +301,7 @@
/*
* I2C Settings
*/
#if defined(CONFIG_
HARD
_I2C) || defined(CONFIG_SYS_I2C_SOFT)
#if defined(CONFIG_
SYS
_I2C) || defined(CONFIG_SYS_I2C_SOFT)
# ifndef CONFIG_SYS_I2C_SPEED
# define CONFIG_SYS_I2C_SPEED 50000
# endif
...
...
include/configs/br4.h
浏览文件 @
c44d3cd1
...
...
@@ -102,8 +102,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI
_I2C
#define CONFIG_
HARD_I2C
#define CONFIG_
SYS
_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/cm-bf527.h
浏览文件 @
c44d3cd1
...
...
@@ -113,8 +113,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/cm-bf537e.h
浏览文件 @
c44d3cd1
...
...
@@ -122,8 +122,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/cm-bf537u.h
浏览文件 @
c44d3cd1
...
...
@@ -120,8 +120,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/cm-bf548.h
浏览文件 @
c44d3cd1
...
...
@@ -104,8 +104,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/pr1.h
浏览文件 @
c44d3cd1
...
...
@@ -102,8 +102,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI
_I2C
#define CONFIG_
HARD_I2C
#define CONFIG_
SYS
_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/tcm-bf518.h
浏览文件 @
c44d3cd1
...
...
@@ -103,8 +103,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
include/configs/tcm-bf537.h
浏览文件 @
c44d3cd1
...
...
@@ -122,8 +122,8 @@
/*
* I2C Settings
*/
#define CONFIG_
BFIN_TWI_I2C 1
#define CONFIG_
HARD_I2C 1
#define CONFIG_
SYS_I2C
#define CONFIG_
SYS_I2C_ADI
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录