X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cpu%2Fppc4xx%2Fi2c.c;h=d8be2cef1f7b9b3ea64d82c28114a2c438c737b9;hb=20a71d93d62add9c5330a0b9895a497995ffaec7;hp=8f4da8621dde85bd2b3f75cac6659407e66ecc27;hpb=e50b791b3f8b696e32000bbaa6e2d1f098c4bc04;p=oweals%2Fu-boot.git diff --git a/cpu/ppc4xx/i2c.c b/cpu/ppc4xx/i2c.c index 8f4da8621d..d8be2cef1f 100644 --- a/cpu/ppc4xx/i2c.c +++ b/cpu/ppc4xx/i2c.c @@ -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)