MIPS: OCTEON: More OCTEONIII support
Read clock rate from the correct CSR. Don't clear COP0_DCACHE for OCTEONIII. Signed-off-by: Chandrakala Chavva <cchavva@caviumnetworks.com> Signed-off-by: Aleksey Makarov <aleksey.makarov@auriga.com> Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/8945/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:

committed by
Ralf Baechle

parent
920cda3870
commit
ac6d9b3a03
@@ -41,6 +41,7 @@
|
||||
#include <asm/octeon/octeon.h>
|
||||
#include <asm/octeon/pci-octeon.h>
|
||||
#include <asm/octeon/cvmx-mio-defs.h>
|
||||
#include <asm/octeon/cvmx-rst-defs.h>
|
||||
|
||||
extern struct plat_smp_ops octeon_smp_ops;
|
||||
|
||||
@@ -653,11 +654,16 @@ void __init prom_init(void)
|
||||
sysinfo->dfa_ref_clock_hz = octeon_bootinfo->dfa_ref_clock_hz;
|
||||
sysinfo->bootloader_config_flags = octeon_bootinfo->config_flags;
|
||||
|
||||
if (OCTEON_IS_OCTEON2() || OCTEON_IS_OCTEON3()) {
|
||||
if (OCTEON_IS_OCTEON2()) {
|
||||
/* I/O clock runs at a different rate than the CPU. */
|
||||
union cvmx_mio_rst_boot rst_boot;
|
||||
rst_boot.u64 = cvmx_read_csr(CVMX_MIO_RST_BOOT);
|
||||
octeon_io_clock_rate = 50000000 * rst_boot.s.pnr_mul;
|
||||
} else if (OCTEON_IS_OCTEON3()) {
|
||||
/* I/O clock runs at a different rate than the CPU. */
|
||||
union cvmx_rst_boot rst_boot;
|
||||
rst_boot.u64 = cvmx_read_csr(CVMX_RST_BOOT);
|
||||
octeon_io_clock_rate = 50000000 * rst_boot.s.pnr_mul;
|
||||
} else {
|
||||
octeon_io_clock_rate = sysinfo->cpu_clock_hz;
|
||||
}
|
||||
|
Reference in New Issue
Block a user