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
2c96baa2
Commit
2c96baa2
authored
20 years ago
by
Stefan Roese
Browse files
Options
Downloads
Patches
Plain Diff
Fix problem in 405 i2c driver; don't try to print without console!
parent
18f71f27
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
cpu/ppc4xx/i2c.c
+3
-1
3 additions, 1 deletion
cpu/ppc4xx/i2c.c
with
3 additions
and
1 deletion
cpu/ppc4xx/i2c.c
+
3
−
1
View file @
2c96baa2
...
...
@@ -350,6 +350,7 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)
{
uchar
xaddr
[
4
];
int
ret
;
DECLARE_GLOBAL_DATA_PTR
;
if
(
alen
>
4
)
{
printf
(
"I2C read: addr len %d not supported
\n
"
,
alen
);
...
...
@@ -380,7 +381,8 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)
chip
|=
((
addr
>>
(
alen
*
8
))
&
CFG_I2C_EEPROM_ADDR_OVERFLOW
);
#endif
if
(
(
ret
=
i2c_transfer
(
1
,
chip
<<
1
,
&
xaddr
[
4
-
alen
],
alen
,
buffer
,
len
))
!=
0
)
{
printf
(
"I2c read: failed %d
\n
"
,
ret
);
if
(
gd
->
have_console
)
printf
(
"I2c read: failed %d
\n
"
,
ret
);
return
1
;
}
return
0
;
...
...
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