aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/timer.c
Commit message (Collapse)AuthorAge
* microblaze: Prefer to use pr_XXX instead of printk(KERN_XX)Michal Simek2012-10-04
| | | | | | Fix reset.c, timer.c, setup.c file. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Added fdt chosen capability for timerMichal Simek2012-10-04
| | | | | | | | | | This lets a dts author flag a particular timer in the system as the system timer. If the chosen node contains a "system-timer=<&foo>" entry than that handle will be used to determine the system timer. In no such entry exists then the first found timer will be used (current behaviour). Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* Merge tag 'split-asm_system_h-for-linus-20120328' of ↵Linus Torvalds2012-03-28
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system Pull "Disintegrate and delete asm/system.h" from David Howells: "Here are a bunch of patches to disintegrate asm/system.h into a set of separate bits to relieve the problem of circular inclusion dependencies. I've built all the working defconfigs from all the arches that I can and made sure that they don't break. The reason for these patches is that I recently encountered a circular dependency problem that came about when I produced some patches to optimise get_order() by rewriting it to use ilog2(). This uses bitops - and on the SH arch asm/bitops.h drags in asm-generic/get_order.h by a circuituous route involving asm/system.h. The main difficulty seems to be asm/system.h. It holds a number of low level bits with no/few dependencies that are commonly used (eg. memory barriers) and a number of bits with more dependencies that aren't used in many places (eg. switch_to()). These patches break asm/system.h up into the following core pieces: (1) asm/barrier.h Move memory barriers here. This already done for MIPS and Alpha. (2) asm/switch_to.h Move switch_to() and related stuff here. (3) asm/exec.h Move arch_align_stack() here. Other process execution related bits could perhaps go here from asm/processor.h. (4) asm/cmpxchg.h Move xchg() and cmpxchg() here as they're full word atomic ops and frequently used by atomic_xchg() and atomic_cmpxchg(). (5) asm/bug.h Move die() and related bits. (6) asm/auxvec.h Move AT_VECTOR_SIZE_ARCH here. Other arch headers are created as needed on a per-arch basis." Fixed up some conflicts from other header file cleanups and moving code around that has happened in the meantime, so David's testing is somewhat weakened by that. We'll find out anything that got broken and fix it.. * tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits) Delete all instances of asm/system.h Remove all #inclusions of asm/system.h Add #includes needed to permit the removal of asm/system.h Move all declarations of free_initmem() to linux/mm.h Disintegrate asm/system.h for OpenRISC Split arch_align_stack() out from asm-generic/system.h Split the switch_to() wrapper out of asm-generic/system.h Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h Create asm-generic/barrier.h Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h Disintegrate asm/system.h for Xtensa Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] Disintegrate asm/system.h for Tile Disintegrate asm/system.h for Sparc Disintegrate asm/system.h for SH Disintegrate asm/system.h for Score Disintegrate asm/system.h for S390 Disintegrate asm/system.h for PowerPC Disintegrate asm/system.h for PA-RISC Disintegrate asm/system.h for MN10300 ...
| * Disintegrate asm/system.h for MicroblazeDavid Howells2012-03-28
| | | | | | | | | | | | | | Disintegrate asm/system.h for Microblaze. Not compiled. Signed-off-by: David Howells <dhowells@redhat.com> cc: microblaze-uclinux@itee.uq.edu.au
* | microblaze: Use node name instead of compatible stringMichal Simek2012-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Change report in bootlog: Origin: xlnx,xps-intc-1.00.a #0 at 0xc8000000, num_irq=6, edge=0x4 xlnx,xps-timer-1.00.a #0 at 0xc8004000, irq=2 New: interrupt-controller #0 at 0xc8000000, num_irq=6, edge=0x4 system-timer #0 at 0xc8004000, irq=2 Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: trivial: Fix typo fault in timer.cMichal Simek2012-03-19
|/ | | | Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Remove eprintk macroMichal Simek2012-01-05
| | | | | | | | eprintk macro was used for printing early_printk messages. Early console registration was changed that's why this is not needed. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Use irq_of_parse_and_map for timerMichal Simek2012-01-05
| | | | | | | | It is necessary to call generic function for irq finding. The main reason is that this generic function calls irq_create_of_mapping which can add some shift because of NO_IRQ. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Use of_find_compatible_node for timer and intcMichal Simek2012-01-05
| | | | | | | Calling of_find_compatible_node instead of calling private code which does the same. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Clear top bit from cnt32_to_63Michal Simek2011-10-14
| | | | | | | | | | Top bit is used as garbage and it must be clear explicitly. It is causing the problem with soft lookup code because it checks delays which are long when top bit is setup. Signed-off-by: Michal Simek <monstr@monstr.eu>
* Merge branch 'consolidate-clksrc-i8253' of ↵Thomas Gleixner2011-05-14
|\ | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:~rmk/linux-2.6-arm into timers/clocksource Conflicts: arch/ia64/kernel/cyclone.c arch/mips/kernel/i8253.c arch/x86/kernel/i8253.c Reason: Resolve conflicts so further cleanups do not conflict further Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * microblaze: Fix sparse warning - timer.cMichal Simek2011-03-09
| | | | | | | | | | | | | | | | | | | | | | | | Variables and init_microblaze_timecounter should be static. Warning log: CHECK arch/microblaze/kernel/timer.c arch/microblaze/kernel/timer.c:41:14: warning: symbol 'freq_div_hz' was not declared. Should it be static? arch/microblaze/kernel/timer.c:42:14: warning: symbol 'timer_clock_freq' was not declared. Should it be static? arch/microblaze/kernel/timer.c:205:12: warning: symbol 'init_microblaze_timecounter' was not declared. Should it be static? Signed-off-by: Michal Simek <monstr@monstr.eu>
* | microblaze: convert to clocksource_register_hz/khzJohn Stultz2011-02-21
|/ | | | | | | | | This converts the microblaze clocksources to use clocksource_register_hz/khz CC: Michal Simek <monstr@monstr.eu> CC: Thomas Gleixner <tglx@linutronix.de> Tested-by: Michal Simek <monstr@monstr.eu> Signed-off-by: John Stultz <johnstul@us.ibm.com>
* microblaze: Support timer on AXI liteMichal Simek2010-10-21
| | | | | | | | | | | New microblaze systems uses two buses. One for memories and flashes and the second for low-speed peripherals which can run on different CLK. This is the reason why the kernel is trying to read clock-frequency directly from node. If there is then the kernel will work with it. If not then cpu CLK is used. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Add support for little-endian MicroblazeMichal Simek2010-10-21
| | | | | | | | | | | | | Microblaze little-endian toolchain exports __MICROBLAZEEL__ which is used in the kernel to identify little/big endian. The most of the changes are in loading values from DTB which is always big endian. Little endian platforms are based on new AXI bus which has impact to early uartlite initialization. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Remove additional compatible propertiesMichal Simek2010-10-21
| | | | | | | Device-tree BSP generates longer compatible properties that's why we can remove extra/old one. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Use static const char * const where possibleJoe Perches2010-10-21
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Report if only one timer is usedMichal Simek2010-10-21
| | | | | | | | | Kernel needs two timers because of clocksource and clockevent. It is better to show warning message directly on early console if available. If it isn't available kernel log buffer contains it. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Decrease time shifting valuesMichal Simek2010-08-04
| | | | | | | Lower shifting values ensure that shifted 32bit counter value doesn't exceed 64bit cycle variable too fast. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Improve ftrace time measuringMichal Simek2010-08-04
| | | | | | | I had to comment sched_clock generic function because of broken toolchain. It is fine grain timing. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Register timecounter/cyclecounterMichal Simek2009-12-14
| | | | | | | It is the same counter as we use as free running one. I would like to use it for ftrace. Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: Sane handling of missing timer/intc in device treeJohn Williams2009-08-18
| | | | | | | | | | This code path doesn't test any returned pointers for NULL, leading to a bad kernel page fault if there's no timer/intc found. Slightly better is to BUG(), but even better still would be a printk beforehand. Signed-off-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze: add parameter to microblaze_read()Coly Li2009-04-23
| | | | | | | | | | This patch modifies parameter of microblaze_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: Michal Simek <monstr@monstr.eu> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Michal Simek <monstr@monstr.eu>
* microblaze_v8: Interrupt handling and timer supportMichal Simek2009-03-27
Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Ingo Molnar <mingo@elte.hu> Reviewed-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: John Linn <john.linn@xilinx.com> Acked-by: John Williams <john.williams@petalogix.com> Signed-off-by: Michal Simek <monstr@monstr.eu>