linux-mips
[Top] [All Lists]

[PATCH 11/14] MIPS: Octeon: Use I/O clock rate for calculations.

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 11/14] MIPS: Octeon: Use I/O clock rate for calculations.
From: David Daney <ddaney@caviumnetworks.com>
Date: Thu, 7 Oct 2010 16:03:50 -0700
Cc: David Daney <ddaney@caviumnetworks.com>
In-reply-to: <1286492633-26885-1-git-send-email-ddaney@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1286492633-26885-1-git-send-email-ddaney@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
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>
---
 arch/mips/cavium-octeon/octeon-platform.c |    2 +-
 arch/mips/cavium-octeon/serial.c          |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/cavium-octeon/octeon-platform.c 
b/arch/mips/cavium-octeon/octeon-platform.c
index c32d40d..49c3320 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -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;
 
diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c
index 638adab..3075324 100644
--- a/arch/mips/cavium-octeon/serial.c
+++ b/arch/mips/cavium-octeon/serial.c
@@ -65,7 +65,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;
 }
-- 
1.7.2.3


<Prev in Thread] Current Thread [Next in Thread>