Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
reform-boundary-uboot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Jack Humbert
reform-boundary-uboot
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
Tags containing commit
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)
...
@@ -350,6 +350,7 @@ int i2c_read (uchar chip, uint addr, int alen, uchar * buffer, int len)
{
{
uchar
xaddr
[
4
];
uchar
xaddr
[
4
];
int
ret
;
int
ret
;
DECLARE_GLOBAL_DATA_PTR
;
if
(
alen
>
4
)
{
if
(
alen
>
4
)
{
printf
(
"I2C read: addr len %d not supported
\n
"
,
alen
);
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)
...
@@ -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
);
chip
|=
((
addr
>>
(
alen
*
8
))
&
CFG_I2C_EEPROM_ADDR_OVERFLOW
);
#endif
#endif
if
(
(
ret
=
i2c_transfer
(
1
,
chip
<<
1
,
&
xaddr
[
4
-
alen
],
alen
,
buffer
,
len
))
!=
0
)
{
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
1
;
}
}
return
0
;
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