projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[ppc] Fix build breakage for all non-4xx PowerPC variants.
[oweals/u-boot.git]
/
cpu
/
ppc4xx
/
i2c.c
diff --git
a/cpu/ppc4xx/i2c.c
b/cpu/ppc4xx/i2c.c
index 0b056a15de23e54d68c46f017ddfcd5460c01741..47c264e222c4aa4ea01f5703c727f6e7165ecada 100644
(file)
--- a/
cpu/ppc4xx/i2c.c
+++ b/
cpu/ppc4xx/i2c.c
@@
-91,7
+91,6
@@
static void _i2c_bus_reset(void)
void i2c_init(int speed, int slaveadd)
{
void i2c_init(int speed, int slaveadd)
{
- sys_info_t sysInfo;
unsigned long freqOPB;
int val, divisor;
int bus;
unsigned long freqOPB;
int val, divisor;
int bus;
@@
-124,8
+123,7
@@
void i2c_init(int speed, int slaveadd)
/* Clock divide Register */
/* get OPB frequency */
/* Clock divide Register */
/* get OPB frequency */
- get_sys_info(&sysInfo);
- freqOPB = sysInfo.freqPLB / sysInfo.pllOpbDiv;
+ freqOPB = get_OPB_freq();
/* set divisor according to freqOPB */
divisor = (freqOPB - 1) / 10000000;
if (divisor == 0)
/* set divisor according to freqOPB */
divisor = (freqOPB - 1) / 10000000;
if (divisor == 0)
@@
-460,6
+458,7
@@
int i2c_set_bus_num(unsigned int bus)
return 0;
}
return 0;
}
+#endif /* CONFIG_I2C_MULTI_BUS */
/* TODO: add 100/400k switching */
unsigned int i2c_get_bus_speed(void)
/* TODO: add 100/400k switching */
unsigned int i2c_get_bus_speed(void)
@@
-474,5
+473,4
@@
int i2c_set_bus_speed(unsigned int speed)
return 0;
}
return 0;
}
-#endif /* CONFIG_I2C_MULTI_BUS */
#endif /* CONFIG_HARD_I2C */
#endif /* CONFIG_HARD_I2C */