Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
u-boot-2015.04
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vesta
u-boot-2015.04
Commits
3e3f766a
Commit
3e3f766a
authored
17 years ago
by
Kumar Gala
Committed by
Wolfgang Denk
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix warnings introduced by I2C bus speed setting patch
Signed-off-by:
Kumar Gala
<
galak@kernel.crashing.org
>
parent
3c735e74
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/i2c/fsl_i2c.c
+3
-4
3 additions, 4 deletions
drivers/i2c/fsl_i2c.c
with
3 additions
and
4 deletions
drivers/i2c/fsl_i2c.c
+
3
−
4
View file @
3e3f766a
...
...
@@ -117,7 +117,6 @@ static unsigned int set_i2c_bus_speed(const struct fsl_i2c *dev,
{
unsigned
short
divider
=
min
(
i2c_clk
/
speed
,
(
unsigned
short
)
-
1
);
unsigned
int
i
;
u8
fdr
,
dfsr
;
/*
* We want to choose an FDR/DFSR that generates an I2C bus speed that
...
...
@@ -128,15 +127,15 @@ static unsigned int set_i2c_bus_speed(const struct fsl_i2c *dev,
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
fsl_i2c_speed_map
);
i
++
)
if
(
fsl_i2c_speed_map
[
i
].
divider
>=
divider
)
{
u8
fdr
,
dfsr
;
dfsr
=
fsl_i2c_speed_map
[
i
].
dfsr
;
fdr
=
fsl_i2c_speed_map
[
i
].
fdr
;
speed
=
i2c_clk
/
fsl_i2c_speed_map
[
i
].
divider
;
writeb
(
fdr
,
&
dev
->
fdr
);
/* set bus speed */
writeb
(
dfsr
,
&
dev
->
dfsrr
);
/* set default filter */
break
;
}
writeb
(
fdr
,
&
dev
->
fdr
);
/* set bus speed */
writeb
(
dfsr
,
&
dev
->
dfsrr
);
/* set default filter */
return
speed
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment