Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2086f848
Commit
2086f848
authored
Mar 07, 2010
by
Ben Dooks
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'next-i2c-omap' into next-i2c
parents
aaa02ab5
d84d3ea3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-omap.c
+25
-19
No files found.
drivers/i2c/busses/i2c-omap.c
View file @
2086f848
...
...
@@ -49,24 +49,24 @@
#define OMAP_I2C_TIMEOUT (msecs_to_jiffies(1000))
#define OMAP_I2C_REV_REG 0x00
#define OMAP_I2C_IE_REG 0x0
4
#define OMAP_I2C_STAT_REG 0x0
8
#define OMAP_I2C_IV_REG 0x0
c
#define OMAP_I2C_IE_REG 0x0
1
#define OMAP_I2C_STAT_REG 0x0
2
#define OMAP_I2C_IV_REG 0x0
3
/* For OMAP3 I2C_IV has changed to I2C_WE (wakeup enable) */
#define OMAP_I2C_WE_REG 0x0
c
#define OMAP_I2C_SYSS_REG 0x
10
#define OMAP_I2C_BUF_REG 0x
14
#define OMAP_I2C_CNT_REG 0x
18
#define OMAP_I2C_DATA_REG 0x
1c
#define OMAP_I2C_SYSC_REG 0x
20
#define OMAP_I2C_CON_REG 0x
24
#define OMAP_I2C_OA_REG 0x
28
#define OMAP_I2C_SA_REG 0x
2c
#define OMAP_I2C_PSC_REG 0x
30
#define OMAP_I2C_SCLL_REG 0x
34
#define OMAP_I2C_SCLH_REG 0x
38
#define OMAP_I2C_SYSTEST_REG 0x
3c
#define OMAP_I2C_BUFSTAT_REG 0x
4
0
#define OMAP_I2C_WE_REG 0x0
3
#define OMAP_I2C_SYSS_REG 0x
04
#define OMAP_I2C_BUF_REG 0x
05
#define OMAP_I2C_CNT_REG 0x
06
#define OMAP_I2C_DATA_REG 0x
07
#define OMAP_I2C_SYSC_REG 0x
08
#define OMAP_I2C_CON_REG 0x
09
#define OMAP_I2C_OA_REG 0x
0a
#define OMAP_I2C_SA_REG 0x
0b
#define OMAP_I2C_PSC_REG 0x
0c
#define OMAP_I2C_SCLL_REG 0x
0d
#define OMAP_I2C_SCLH_REG 0x
0e
#define OMAP_I2C_SYSTEST_REG 0x
0f
#define OMAP_I2C_BUFSTAT_REG 0x
1
0
/* I2C Interrupt Enable Register (OMAP_I2C_IE): */
#define OMAP_I2C_IE_XDR (1 << 14)
/* TX Buffer drain int enable */
...
...
@@ -161,6 +161,7 @@ struct omap_i2c_dev {
struct
device
*
dev
;
void
__iomem
*
base
;
/* virtual */
int
irq
;
int
reg_shift
;
/* bit shift for I2C register addresses */
struct
clk
*
iclk
;
/* Interface clock */
struct
clk
*
fclk
;
/* Functional clock */
struct
completion
cmd_complete
;
...
...
@@ -189,12 +190,12 @@ struct omap_i2c_dev {
static
inline
void
omap_i2c_write_reg
(
struct
omap_i2c_dev
*
i2c_dev
,
int
reg
,
u16
val
)
{
__raw_writew
(
val
,
i2c_dev
->
base
+
reg
);
__raw_writew
(
val
,
i2c_dev
->
base
+
(
reg
<<
i2c_dev
->
reg_shift
)
);
}
static
inline
u16
omap_i2c_read_reg
(
struct
omap_i2c_dev
*
i2c_dev
,
int
reg
)
{
return
__raw_readw
(
i2c_dev
->
base
+
reg
);
return
__raw_readw
(
i2c_dev
->
base
+
(
reg
<<
i2c_dev
->
reg_shift
)
);
}
static
int
__init
omap_i2c_get_clocks
(
struct
omap_i2c_dev
*
dev
)
...
...
@@ -924,6 +925,11 @@ omap_i2c_probe(struct platform_device *pdev)
dev
->
b_hw
=
1
;
/* Enable hardware fixes */
}
if
(
cpu_is_omap7xx
())
dev
->
reg_shift
=
1
;
else
dev
->
reg_shift
=
2
;
/* reset ASAP, clearing any IRQs */
omap_i2c_init
(
dev
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment