MIPS: Octeon: Use I/O clock rate for calculations.
authorDavid Daney <ddaney@caviumnetworks.com>
Thu, 7 Oct 2010 23:03:50 +0000 (16:03 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 29 Oct 2010 18:08:41 +0000 (19:08 +0100)
The I2C and UARTS are clocked by the I/O clock, use its rate for these
devices.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1670/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/cavium-octeon/octeon-platform.c
arch/mips/cavium-octeon/serial.c

index c32d40db6ba6bf661fd4c103afa74bd4a8dff9e8..49c33202843b2fb1d47814d93fd2bc014fea9e99 100644 (file)
@@ -199,7 +199,7 @@ static int __init octeon_i2c_device_init(void)
                num_ports = 1;
 
        for (port = 0; port < num_ports; port++) {
-               octeon_i2c_data[port].sys_freq = octeon_get_clock_rate();
+               octeon_i2c_data[port].sys_freq = octeon_get_io_clock_rate();
                /*FIXME: should be examined. At the moment is set for 100Khz */
                octeon_i2c_data[port].i2c_freq = 100000;
 
index 12dbf533b77dc2da263c4e0bfe9e4c2fa86c51d8..057f0ae88c994e6052892d4fc44620c0da7d26fa 100644 (file)
@@ -66,7 +66,7 @@ static void __init octeon_uart_set_common(struct plat_serial8250_port *p)
                /* Make simulator output fast*/
                p->uartclk = 115200 * 16;
        else
-               p->uartclk = mips_hpt_frequency;
+               p->uartclk = octeon_get_io_clock_rate();
        p->serial_in = octeon_serial_in;
        p->serial_out = octeon_serial_out;
 }