David Daney
70a26a219c
MIPS: Octeon: Add octeon_io_clk_delay() function.
...
Also cleanup and fix octeon_init_cvmcount()
Signed-off-by: David Daney <ddaney@caviumnetworks.com >
Acked-by: David S. Miller <davem@davemloft.net >
2012-08-31 11:48:48 -07:00
Paul Gortmaker
cae39d1386
mips: add export.h to files using EXPORT_SYMBOL/THIS_MODULE
...
Or else we get lots of variations on this:
arch/mips/pci/pci.c:330: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
scattered throughout the build.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com >
2011-10-31 19:30:57 -04:00
John Stultz
75c4fd8c78
mips: convert to clocksource_register_hz/khz
...
This converts the mips clocksources to use clocksource_register_hz/khz
CC: Ralf Baechle <ralf@linux-mips.org >
CC: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: John Stultz <johnstul@us.ibm.com >
2011-02-21 13:33:50 -08:00
David Daney
54954a6d6b
MIPS: Octeon: Scale Octeon2 clocks in octeon_init_cvmcount()
...
The per-CPU clocks are synchronized from IPD_CLK_COUNT, on cn63XX it must
be scaled by the clock frequency ratio.
Signed-off-by: David Daney <ddaney@caviumnetworks.com >
Patchwork: http://patchwork.linux-mips.org/patch/1667/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-10-29 19:08:38 +01:00
David Daney
ca148125e6
MIPS: Octeon: Implement delays with cycle counter.
...
Power throttling make deterministic delay loops impossible.
Re-implement delays using the cycle counter. This also allows us to
get rid of the code that calculates loops per jiffy.
Signed-off-by: David Daney <ddaney@caviumnetworks.com >
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1317/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-08-05 13:26:20 +01:00
Florian Fainelli
5c8974538a
MIPS: Octeon: Workaround link failures with gcc-4.4.x 32-bits toolchains
...
When building with a gcc-4.4.x toolchain that is configured to produce
32-bits executables by default, we will produce __lshrti3 in sched_clock()
which is never resolved so the kernel fails to link. Unconditionally use
the inline assembly version as suggested by David Daney, which works around
the issue.
Signed-off-by: Florian Fainelli <florian@openwrt.org >
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1514/
Acked-by: David Daney <ddaney@caviumnetworks.com >
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-08-05 13:25:39 +01:00
David Daney
0e8a1d8262
MIPS: Octeon: Use non-overflowing arithmetic in sched_clock
...
With typical mult and shift values, the calculation for Octeon's sched_clock
overflows when using 64-bit arithmetic. Use 128-bit calculations instead.
Signed-off-by: David Daney <ddaney@caviumnetworks.com >
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/849/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-01-12 18:19:36 +01:00
David Daney
c6a3c851a2
MIPS: Octeon: Add sched_clock() to csrc-octeon.c
...
With the advent of function graph tracing on MIPS, Octeon needs a high
precision sched_clock() implementation. Without it, most timing
numbers are reported as 0.000.
This new sched_clock just uses the 64-bit cycle counter appropriately
scaled.
Signed-off-by: David Daney <ddaney@caviumnetworks.com >
Patchwork: http://patchwork.linux-mips.org/patch/805/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2010-01-12 18:19:34 +01:00
Coly Li
d0ce9a5a47
MIPS: Cavium: Add struct clocksource * argument to octeon_cvmcount_read()
...
This patch modifies parameter of octeon_cvmcount_read() from 'void' to
'struct clocksource *cs', which fixes compile warning for incompatible
parameter type.
Signed-off-by: Coly Li <coly.li@suse.de >
Cc: David Daney <ddaney@caviumnetworks.com >
Cc: Ingo Molnar <mingo@elte.hu >
Reviewed-by: David Daney <ddaney@caviumnetworks.com >
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2009-05-14 13:50:29 +01:00
David Daney
5b3b16880f
MIPS: Add Cavium OCTEON processor support files to arch/mips/cavium-octeon.
...
These are the rest of the new files needed to add OCTEON processor
support to the Linux kernel. Other than Makefile and Kconfig which
should be obvious, we have:
csrc-octeon.c -- Clock source driver for OCTEON.
dma-octeon.c -- Helper functions for mapping DMA memory.
flash_setup.c -- Register on-board flash with the MTD subsystem.
octeon-irq.c -- OCTEON interrupt controller managment.
octeon-memcpy.S -- Optimized memcpy() implementation.
serial.c -- Register 8250 platform driver and early console.
setup.c -- Early architecture initialization.
smp.c -- OCTEON SMP support.
octeon_switch.S -- Scheduler context switch for OCTEON.
c-octeon.c -- OCTEON cache controller support.
cex-oct.S -- OCTEON cache exception handler.
asm/mach-cavium-octeon/*.h -- Architecture include files.
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com >
Signed-off-by: David Daney <ddaney@caviumnetworks.com >
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
create mode 100644 arch/mips/cavium-octeon/Kconfig
create mode 100644 arch/mips/cavium-octeon/Makefile
create mode 100644 arch/mips/cavium-octeon/csrc-octeon.c
create mode 100644 arch/mips/cavium-octeon/dma-octeon.c
create mode 100644 arch/mips/cavium-octeon/flash_setup.c
create mode 100644 arch/mips/cavium-octeon/octeon-irq.c
create mode 100644 arch/mips/cavium-octeon/octeon-memcpy.S
create mode 100644 arch/mips/cavium-octeon/serial.c
create mode 100644 arch/mips/cavium-octeon/setup.c
create mode 100644 arch/mips/cavium-octeon/smp.c
create mode 100644 arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h
create mode 100644 arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
create mode 100644 arch/mips/include/asm/mach-cavium-octeon/irq.h
create mode 100644 arch/mips/include/asm/mach-cavium-octeon/kernel-entry-init.h
create mode 100644 arch/mips/include/asm/mach-cavium-octeon/war.h
create mode 100644 arch/mips/include/asm/octeon/octeon.h
create mode 100644 arch/mips/kernel/octeon_switch.S
create mode 100644 arch/mips/mm/c-octeon.c
create mode 100644 arch/mips/mm/cex-oct.S
2009-01-11 09:57:21 +00:00