X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fppc4xx%2Fi2c.c;h=47c264e222c4aa4ea01f5703c727f6e7165ecada;hb=42ed33ffe135f618680f9d6e9712eb35a85bcb62;hp=0b056a15de23e54d68c46f017ddfcd5460c01741;hpb=90b0cf47eb23e5f3461d3d957f6898386907fd99;p=oweals%2Fu-boot.git diff --git a/cpu/ppc4xx/i2c.c b/cpu/ppc4xx/i2c.c index 0b056a15de..47c264e222 100644 --- 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) { - sys_info_t sysInfo; 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 */ - 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) @@ -460,6 +458,7 @@ int i2c_set_bus_num(unsigned int bus) return 0; } +#endif /* CONFIG_I2C_MULTI_BUS */ /* 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; } -#endif /* CONFIG_I2C_MULTI_BUS */ #endif /* CONFIG_HARD_I2C */