Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
[oweals/u-boot.git] / cpu / ppc4xx / i2c.c
index 8f4da8621dde85bd2b3f75cac6659407e66ecc27..d8be2cef1f7b9b3ea64d82c28114a2c438c737b9 100644 (file)
@@ -61,7 +61,7 @@ static void _i2c_bus_reset(void)
        /* write 1 in IRQP IRQD LA ICT XFRA to clear these fields */
        out_8((u8 *)IIC_EXTSTS, 0x8F);
 
-       /* Place chip in the reset state */
+       /* Place chip in the reset state */
        out_8((u8 *)IIC_XTCNTLSS, IIC_XTCNTLSS_SRST);
 
        /* Check if bus is free */
@@ -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)