diff options
author | Chandrakala Chavva <cchavva@caviumnetworks.com> | 2011-02-17 16:57:52 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-05-19 04:55:49 -0400 |
commit | 7716e6548abed1582a7759666e79d5c612a906c7 (patch) | |
tree | ebd12144faf525408ed82f6415804b02ee712440 | |
parent | b32ee693eb106172f89639acff88dc8fee8ba3e2 (diff) |
Octeon: Fix interrupt irq settings for performance counters.
Octeon uses different interrupt irq for timer and performance counters.
Set CvmCtl[IPPCI] to correct irq value very early.
Signed-off-by: Chandrakala Chavva <cchavva@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Cc: Chandrakala Chavva <cchavva@caviumnetworks.com>
Patchwork: https://patchwork.linux-mips.org/patch/2085/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/cavium-octeon/setup.c | 7 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index 0707fae3f0ee..2d9028f1474c 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
@@ -288,7 +288,6 @@ void octeon_user_io_init(void) | |||
288 | union octeon_cvmemctl cvmmemctl; | 288 | union octeon_cvmemctl cvmmemctl; |
289 | union cvmx_iob_fau_timeout fau_timeout; | 289 | union cvmx_iob_fau_timeout fau_timeout; |
290 | union cvmx_pow_nw_tim nm_tim; | 290 | union cvmx_pow_nw_tim nm_tim; |
291 | uint64_t cvmctl; | ||
292 | 291 | ||
293 | /* Get the current settings for CP0_CVMMEMCTL_REG */ | 292 | /* Get the current settings for CP0_CVMMEMCTL_REG */ |
294 | cvmmemctl.u64 = read_c0_cvmmemctl(); | 293 | cvmmemctl.u64 = read_c0_cvmmemctl(); |
@@ -392,12 +391,6 @@ void octeon_user_io_init(void) | |||
392 | CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE, | 391 | CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE, |
393 | CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE * 128); | 392 | CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE * 128); |
394 | 393 | ||
395 | /* Move the performance counter interrupts to IRQ 6 */ | ||
396 | cvmctl = read_c0_cvmctl(); | ||
397 | cvmctl &= ~(7 << 7); | ||
398 | cvmctl |= 6 << 7; | ||
399 | write_c0_cvmctl(cvmctl); | ||
400 | |||
401 | /* Set a default for the hardware timeouts */ | 394 | /* Set a default for the hardware timeouts */ |
402 | fau_timeout.u64 = 0; | 395 | fau_timeout.u64 = 0; |
403 | fau_timeout.s.tout_val = 0xfff; | 396 | fau_timeout.s.tout_val = 0xfff; |
diff --git a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h index 0b2b5eb22e9b..dedef7d2b01f 100644 --- a/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h +++ b/arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h | |||
@@ -63,6 +63,11 @@ | |||
63 | # CN30XX Disable instruction prefetching | 63 | # CN30XX Disable instruction prefetching |
64 | or v0, v0, 0x2000 | 64 | or v0, v0, 0x2000 |
65 | skip: | 65 | skip: |
66 | # First clear off CvmCtl[IPPCI] bit and move the performance | ||
67 | # counters interrupt to IRQ 6 | ||
68 | li v1, ~(7 << 7) | ||
69 | and v0, v0, v1 | ||
70 | ori v0, v0, (6 << 7) | ||
66 | # Write the cavium control register | 71 | # Write the cavium control register |
67 | dmtc0 v0, CP0_CVMCTL_REG | 72 | dmtc0 v0, CP0_CVMCTL_REG |
68 | sync | 73 | sync |