aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/timer.c
Commit message (Collapse)AuthorAge
* microblaze: include the new timecounter header.Richard Cochran2015-01-02
| | | | | | | The timecounter/cyclecounter code has moved, so users need the new include. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* microblaze: Make timer driver endian awareMichal Simek2014-04-07
| | | | | | | Detect endianess directly on the hardware and use ioread/iowrite functions. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Rename global function heartbeat()Guenter Roeck2014-03-12
| | | | | | | | | | | | | microblaze:allmodconfig complains for some configurations that 'heartbeat' is redefined as different kind of symbol. This is seen in test compiles of watchdog drivers, which often use 'heartbeat' as ststic variable. Since 'heartbeat' is an unfortunate name for a global function, rename it to microblaze_heartbeat. Also rename the setup function to microblaze_setup_heartbeat. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: timer: Do not initialized system timer twiceMichal Simek2014-01-27
| | | | | | | Only one system timer can be setup. Do not initialize more system timers. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: timer: Use generic sched_clock implementationMichal Simek2014-01-27
| | | | | | | | | | Remove sched_clock from the driver and use sched_clock_register function. Inspired-by: "arch_timer: Move to generic sched_clock framework" (sha1: 65cd4f6c99c1170bd0114dbd71b978012ea44d28) Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Add support for CCFMichal Simek2014-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for CCF for Microblaze. Old binding: system_timer: system-timer@41c00000 { clock-frequency = <75000000>; ... } New binding: system_timer: system-timer@41c00000 { clocks = <&clk_bus>; ... } Both should be supported for a while Microblaze clock binding: clocks { #address-cells = <1>; #size-cells = <0>; clk_bus: bus { #clock-cells = <0>; clock-frequency = <75000000>; clock-output-names = "bus"; compatible = "fixed-clock"; reg = <1>; } ; clk_cpu: cpu { #clock-cells = <0>; clock-frequency = <75000000>; clock-output-names = "cpu"; compatible = "fixed-clock"; reg = <0>; } ; } ; Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge tag 'devicetree-for-3.13' of ↵Linus Torvalds2013-11-12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: "DeviceTree updates for 3.13. This is a bit larger pull request than usual for this cycle with lots of clean-up. - Cross arch clean-up and consolidation of early DT scanning code. - Clean-up and removal of arch prom.h headers. Makes arch specific prom.h optional on all but Sparc. - Addition of interrupts-extended property for devices connected to multiple interrupt controllers. - Refactoring of DT interrupt parsing code in preparation for deferred probe of interrupts. - ARM cpu and cpu topology bindings documentation. - Various DT vendor binding documentation updates" * tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits) powerpc: add missing explicit OF includes for ppc dt/irq: add empty of_irq_count for !OF_IRQ dt: disable self-tests for !OF_IRQ of: irq: Fix interrupt-map entry matching MIPS: Netlogic: replace early_init_devtree() call of: Add Panasonic Corporation vendor prefix of: Add Chunghwa Picture Tubes Ltd. vendor prefix of: Add AU Optronics Corporation vendor prefix of/irq: Fix potential buffer overflow of/irq: Fix bug in interrupt parsing refactor. of: set dma_mask to point to coherent_dma_mask of: add vendor prefix for PHYTEC Messtechnik GmbH DT: sort vendor-prefixes.txt of: Add vendor prefix for Cadence of: Add empty for_each_available_child_of_node() macro definition arm/versatile: Fix versatile irq specifications. of/irq: create interrupts-extended property microblaze/pci: Drop PowerPC-ism from irq parsing of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code. of/irq: Use irq_of_parse_and_map() ...
| * microblaze: clean-up prom.h implicit includesRob Herring2013-10-09
| | | | | | | | | | | | | | | | | | | | | | | | While powerpc is a mess of implicit includes by prom.h, microblaze just copied this and is easily fixed. Add the necessary explicit includes and remove unnecessary includes and other parts from prom.h Signed-off-by: Rob Herring <rob.herring@calxeda.com> Acked-by: Grant Likely <grant.likely@linaro.org> Cc: Michal Simek <monstr@monstr.eu> Cc: microblaze-uclinux@itee.uq.edu.au Cc: netdev@vger.kernel.org
* | microblaze: Remove deprecated IRQF_DISABLEDMichal Simek2013-11-08
|/ | | | | | Removed IRQF_DISABLED as it's no-op and should be removed. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: timer: Replace microblaze_ prefix by xilinx_Michal Simek2013-09-03
| | | | | | | The main reason that this driver can be used by ARM and PPC. The part of preparing of move to generic location. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: timer: Update headerMichal Simek2013-09-03
| | | | | | Update dates in header and add Xilinx to it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: timer: Remove unused headerMichal Simek2013-09-03
| | | | | | Remove unused headers. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: timer: Clear driver init functionMichal Simek2013-09-03
| | | | | | | | - Use of_iomap - Use of_property_read_u32 - Fix printk Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: timer: Use CLKSRC_OF initializationMichal Simek2013-09-03
| | | | | | | | | Simplify timer initialization and prepare the driver for moving to drivers/clocksource folder. Also remove system-timer property from binding because the name is too generic. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* microblaze: Remove selfmodified featureMichal Simek2013-09-03
| | | | | | | | This was experimental feature which has never been widely used because it expects GCC behaviour. Also remove INTC_BASE and TIMER_BASE macros. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* 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>