aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-iop/time.c
Commit message (Collapse)AuthorAgeFilesLines
* update other arm platforms from 3.2.72 and also merge some general arm code ↵Wolfgang Wiedmeyer2015-10-231-0/+1
| | | | (boot)
* ARM: Remove duplicate linux/sched.h include from arch/arm/plat-iop/time.cJesper Juhl2011-04-101-1/+0
| | | | | | | | There's no need to include linux/sched.h more than once in arch/arm/plat-iop/time.c Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* Merge branch 'clksrc' into develRussell King2011-01-051-10/+17
|\ | | | | | | | | | | | | Conflicts: arch/arm/mach-vexpress/v2m.c arch/arm/plat-omap/counter_32k.c arch/arm/plat-versatile/Makefile
| * ARM: iop: convert sched_clock() to use new infrastructureRussell King2010-12-221-3/+12
| | | | | | | | | | | | | | Convert iop platforms to use the new sched_clock() infrastructure for extending 32bit counters to full 64-bit nanoseconds. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * ARM: ensure all sched_clock() implementations are notrace markedRussell King2010-12-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ftrace requires sched_clock() to be notrace. Ensure that all implementations are so marked. Also make sure that they include linux/sched.h Also ensure OMAP clocksource read functions are marked notrace as they're used for sched_clock() too. Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Will Deacon <will.deacon@arm.com> Tested-by: Mikael Pettersson <mikpe@it.uu.se> Tested-by: Eric Miao <eric.y.miao@gmail.com> Tested-by: Olof Johansson <olof@lixom.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * ARM: iop: update clock source registrationRussell King2010-12-221-3/+1
| | | | | | | | | | | | | | | | In d7e81c2 (clocksource: Add clocksource_register_hz/khz interface) new interfaces were added which simplify (and optimize) the selection of the divisor shift/mult constants. Switch over to using this new interface. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * ARM: clockevents: fix IOP clock events initializationRussell King2010-12-191-3/+2
| | | | | | | | | | | | | | | | Ensure that no interrupt is pending before registering the clock event device, and properly initialize the periodic tick in the ->set_mode callback. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | ARM: 6523/1: iop: ensure sched_clock() is notraceRabin Vincent2010-12-041-1/+2
|/ | | | | | | | | | | | | Include sched.h to ensure sched_clock() has the notrace annotation, and mark any functions it calls as notrace too. Include sched.h to ensure sched_clock() has the notrace annotation, and mark any functions it calls as notrace too. Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 6159/1: Move IOP to use common mult/shift calculation codeLinus Walleij2010-07-221-44/+9
| | | | | | | | | | | Since the infrastructure for determining shift/mult values from a clock rate and a minimum programmable rate is now in the kernel, lets remove this custom code. Cc: Deepak Saxena <dsaxena@plexity.net> Acked-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* iop: implement sched_clock()Mikael Pettersson2009-10-291-0/+11
| | | | | | | | | | | | This adds a better sched_clock() to the IOP platform, implemented using its new clocksource support. Tested on n2100, compile-tested for all plat-iop machines. [dan.j.williams@intel.com: allow early cp6 access] Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* iop: enable generic timeMikael Pettersson2009-10-291-29/+0
| | | | | | | | | | | | This updates the IOP platform to use the kernel's generic time framework. With clockevent support in place, this reduces to selecting GENERIC_TIME and removing the platform's private timer ->offset() operation (iop_gettimeoffset). Tested on n2100, compile-tested for all plat-iop machines. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* iop: clockevent supportMikael Pettersson2009-10-291-11/+90
| | | | | | | | | | | | | | | | | | | | | | | This updates the IOP platform to expose the interrupting timer 0 as a clockevent object. The timer interrupt handler is changed to call the clockevent ->event_handler() instead of timer_tick(), and ->set_next_event() and ->set_mode() operations are added to allow the mode of the timer to be updated (required for ONESHOT/NOHZ mode). Timer 0 must now be properly initialised, which requires a new write_tcr0() function from the mach-specific code. The mode of timer 0 must be read at the start of ->set_mode(), which requires a new read_tmr0() function from the mach- specific code. Initial setup of timer 0 is also rewritten to be more robust. Tested on n2100, compile-tested for all plat-iop machines. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* iop: clocksource supportMikael Pettersson2009-10-291-0/+45
| | | | | | | | | | | | | | This updates the IOP platform to expose the free-running timer 1 as a clocksource object. This timer is now also properly initialised, which requires a new write_tcr1() function from the mach-specific code. Apart from the explicit initialisation, there is no functional change in how timer 1 is programmed. Tested on n2100, compile-tested for all plat-iop machines. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* arch/arm/plat-iop: Use DIV_ROUND_CLOSESTJulia Lawall2009-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d but is perhaps more readable. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @haskernel@ @@ #include <linux/kernel.h> @depends on haskernel@ expression x,__divisor; @@ - (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* [ARM] Convert asm/io.h to linux/io.hRussell King2008-09-061-1/+1
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machRussell King2008-08-071-2/+2
| | | | | | This just leaves include/asm-arm/plat-* to deal with. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Remove asm/hardware.h, use asm/arch/hardware.h insteadRussell King2008-08-071-1/+1
| | | | | | | | | Remove includes of asm/hardware.h in addition to asm/arch/hardware.h. Then, since asm/hardware.h only exists to include asm/arch/hardware.h, update everything to directly include asm/arch/hardware.h and remove asm/hardware.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] xtime_seqlock: fix more ARM machines for xtime deadlockingPeter Zijlstra2008-02-041-4/+0
| | | | | | | move update_process_times() out from under xtime_lock. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4495/1: iop: combined watchdog timer driver for iop3xx and iop13xxDan Williams2007-07-201-0/+8
| | | | | | | | | | | | | | | | | | | In order for this driver to be shared across the iop architectures the iop3xx and iop13xx header files are modified to present a common interface for the iop_wdt driver. Details: * iop13xx supports disabling the timer while iop3xx does not. This requires a few 'compatibility' definitions in include/asm-arm/hardware/iop3xx.h to preclude adding #ifdef CONFIG_ARCH_IOP13XX blocks to the driver code. * The heartbeat interval is derived from the internal bus clock rate, so this this patch also exports the tick rate to the iop_wdt driver. Cc: Curt Bruns <curt.e.bruns@intel.com> Cc: Peter Milne <peter.milne@d-tacq.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Add IRQF_IRQPOLL flag on armBernhard Walle2007-05-081-1/+1
| | | | | | | | | | | | Add IRQF_IRQPOLL for each timer interrupt. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [ARM] 4340/1: iop: fix iop_getttimeoffsetDan Williams2007-04-301-4/+4
| | | | | | | | | | | Fix a typo which causes a necessary cpwait to be missed on iop3xx, Michael Brunner <mibru@gmx.de> Save a register in the assembly routine, rmk Cc: Lennert Buytenhek <kernel@wantstofly.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4187/1: iop: unify time implementation across iop32x, iop33x, and iop13xxDan Williams2007-02-171-26/+34
| | | | | | | | | | * architecture specific details are handled in asm/arch/time.h * ARCH_IOP13XX now selects PLAT_IOP * as suggested by Lennert use ifdef CONFIG_XSCALE to skip the cp_wait on XSC3 Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 4186/1: iop: remove cp6_enable/disable routinesDan Williams2007-02-171-4/+0
| | | | | | | This functionality is replaced by cp6_trap Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* Initial blind fixup for arm for irq changesLinus Torvalds2006-10-061-2/+2
| | | | | | | Untested, but this should fix up the bulk of the totally mechanical issues, and should make the actual detail fixing easier. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [ARM] 3832/1: iop3xx: coding style cleanupLennert Buytenhek2006-09-251-2/+2
| | | | | | | | | Since the iop32x code isn't iop321-specific, and the iop33x code isn't iop331-specfic, do a s/iop321/iop32x/ and s/iop331/iop33x/, and tidy up the code to conform to the coding style guidelines somewhat better. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3825/1: iop3xx: use cp6 enable/disable macrosLennert Buytenhek2006-09-251-0/+4
| | | | | | | | | | Add CP6 enable/disable sequences to the timekeeping code and the IRQ code. As a result, we can't depend on CP6 access being enabled when we enter get_irqnr_and_base anymore, so switch the latter over to using memory-mapped accesses for now. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3822/1: iop3xx: rewrite time handlingLennert Buytenhek2006-09-251-0/+94
Merge and rewrite the iop32x/iop33x time code to do lost jiffy tracking properly, and put the result in plat-iop/time.c. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>