summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/misc'Sascha Hauer2017-04-071-1/+1
|\
| * clocksource: mvebu: don't request the used iomem resourceUwe Kleine-König2017-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | The register ranges of the device nodes timer@20300 and watchdog@20300 overlap, so it is impossible that both devices properly use request_iomem_region (e.g. by using dev_request_mem_resource). In Linux only the watchdog driver is registered in /proc/iomem, do the same for barebox. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clocksource: at91: Add DT compatibility tableAndrey Smirnov2017-03-301-0/+9
|/ | | | | | Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* efi: clocksoure: make sure the meassured frequency is validMichael Olbrich2017-03-151-0/+4
| | | | | | | | | Some EFI implementations have a even slower tick rate and the meassured frequency may be zero. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rpi'Sascha Hauer2017-03-131-13/+22
|\
| * clocksource: bcm2835: use clock-frequency property when availableEnrico Joerns2017-03-021-13/+22
| | | | | | | | | | | | | | | | | | If the clock frequency is given by a DT property, use this and don't try to use the clock handle. Signed-off-by: Enrico Joerns <ejo@pengutronix.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/efi'Sascha Hauer2017-03-134-0/+199
|\ \
| * | efi: clocksoure: add EFI event timerJean-Christophe PLAGNIOL-VILLARD2017-03-093-0/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with this we can be hw generic If the EFI implement timestamp protocol we could use instead of event but even EDK2 Never Ever compile it for any target. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | efi: move x86 clocksource to device/driverJean-Christophe PLAGNIOL-VILLARD2017-03-093-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so we can dynamicly register the device As we may need to use HW IP for clocksource. As on EFI we could use Timestamp GUID if present (Not often the case as it's not even enabled by default on any Target on EDK II not even OVMF) Or if we choose we could use a Simulated Timestamp driver that work on Event (Add Later) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | efi: move x86 clocksource init at core initcall levelJean-Christophe PLAGNIOL-VILLARD2017-03-091-1/+4
| | | | | | | | | | | | | | | | | | | | | so we can use device/driver model Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | efi: move x86 efi boot support to x86 archJean-Christophe PLAGNIOL-VILLARD2017-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | prepare to drop the efi arch as efi boot up is not arch sepecific Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | efi: move bus driver to driver/efiJean-Christophe PLAGNIOL-VILLARD2017-02-241-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | efi: move clocksource out of archJean-Christophe PLAGNIOL-VILLARD2017-02-243-0/+63
| |/ | | | | | | | | | | | | as efi is not an arch but a boot mode from where barebox is started Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / clocksource: at91: Move to 'drivers/clocksource'Andrey Smirnov2017-03-093-0/+119
|/ | | | | | | | | Move PIT driver code to 'drivers/clocsource' and accomodate it by adjusting Kconfig variables. Rename the file to 'timer-atmel-pit.c' to re-align the driver with code in Linux kernel. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: Add rk3288 timer driverWadim Egorov2016-08-263-0/+78
| | | | | | | This driver comes from the u-boot (v2016.01). Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-078-24/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dev_request_mem_region doesn't work properly one some SoCs on which PTR_ERR() values clash with valid return values from dev_request_mem_region. Replace them with dev_request_mem_resource where possible. This patch has been generated with the following semantic patch: // <smpl> @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { ... - return PTR_ERR(io); -} + return PTR_ERR(iores); +} +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) - return PTR_ERR(io); -} + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); -if (IS_ERR(io)) { - ret = PTR_ERR(io); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) { + ret = PTR_ERR(iores); ... } +io = IOMEM(iores->start); ...+> } @@ expression d; expression n; expression io; identifier func; @@ func(...) { +struct resource *iores; <+... -io = dev_request_mem_region(d, n); +iores = dev_request_mem_resource(d, n); +if (IS_ERR(iores)) + return PTR_ERR(iores); +io = IOMEM(iores->start); ...+> } @@ identifier func; @@ func(...) { <+... struct resource *iores; -struct resource *iores; ...+> } // </smpl> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bcm2835: introduce mach-bcm283xAlexander Aring2016-01-042-3/+3
| | | | | | | | | | | | This patch changes the most part of mach-bcm2835 to mach-bcm283x. This prepares to add RPi2 support which is a bcm2836. This patch changes the Kconfig entry namens to BCM283X for drivers only. These drivers should working the same in bcm2836. While updating defconfig I added LED support/trigger option. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clock: incorporate dummy clocksource into core clock codeAntony Pavlov2014-12-173-73/+10
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Reuse init_clock() return value for clocksource driversAlexander Shiyan2014-11-108-21/+8
| | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-168-6/+19
| | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: add driver for Canon DIGIC timerAntony Pavlov2014-07-293-0/+98
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: mvebu: split initialization for Armada 370/XPSebastian Hesselbarth2014-06-241-25/+40
| | | | | | | | | | | Timers found on Marvell Armada 370 and XP require different setup. While timer clock on Armada 370 can be derived from a divided reference clocks, Armada XP always uses a 25MHz reference. This also updates compatibles to destinguish timers for both SoCs and fixes some whitespace issues on defines. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* clocksource: add uemd clocksourceAntony Pavlov2014-05-263-0/+135
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: add dummy software-only clocksourceAntony Pavlov2014-03-193-0/+80
| | | | | | | | | | | This driver is very handy for initial barebox porting. It was used for running barebox on DiGiC2-based camera and initial porting barebox to Loongson-1 and ar9331. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reported-by: Alexander Aring <alex.aring@gmail.com> Reported-by: Alexander Shiyan <shc_work@mail.ru>
* ARM: bcm2835: register the clocksource driver earlierAndre Heider2013-10-221-1/+1
| | | | | | | | | | RPi's mailbox driver is used early and it needs clock functions to handle timeouts. Promote to a core_initcall(). Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: arm_smp_twd: Add devicetree supportSascha Hauer2013-09-051-0/+9
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: mvebu: add DT supportSebastian Hesselbarth2013-07-051-0/+6
| | | | | | | | This adds device tree support to mvebu timer and also converts clk_get to clk_lookup to find TCLK without device name reference. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: mvebu: lookup clock by physbaseSebastian Hesselbarth2013-07-051-2/+1
| | | | | | | | This converts Armada 370/XP SoC init to register tclk alias for timer by physbase instead of name. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: orion: add DT supportSebastian Hesselbarth2013-07-051-0/+6
| | | | | | | | This adds device tree support to orion timer and also converts clk_get to clk_lookup to find TCLK without device name reference. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: orion: lookup clock by physbaseSebastian Hesselbarth2013-07-051-1/+1
| | | | | | | | This converts Kirkwood and Dove SoC init to register tclk alias for timer by physbase instead of name. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: fix Marvell timer read-back valueSebastian Hesselbarth2013-06-292-2/+2
| | | | | | | | | Clocksource read callback expects incrementing timer values, while internal timer on Marvell SoCs counts backwards. Fix value returned by Marvell MVEBU and Orion clocksource drivers. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: initial support for Marvell Dove SoCsSebastian Hesselbarth2013-05-153-0/+81
| | | | | | | | | | This commit adds minimal support for the Marvell Dove SoC (88AP510) as first SoC of the Marvell Orion family. Orion SoCs have a different timer, therefore current mach-mvebu and Armada 370/XP Kconfig and Makefiles are slightly modified and a new clocksource drivers is added. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: initial support for Marvell Armada 370/XP SoCsThomas Petazzoni2013-05-133-0/+95
| | | | | | | | | This commit adds minimal support for the Armada 370 and Armada XP SoCs from Marvell. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: clps711x: Add clocksource driverAlexander Shiyan2013-03-113-0/+66
| | | | | | | | This patch adds clocksource driver for CLPS711X targets and adds support to platform to use this new driver. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* sp804: introduce amba_is_arm_sp804 to detect if the sp804 is present at the ↵Jean-Christophe PLAGNIOL-VILLARD2013-02-121-3/+3
| | | | | | | address Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: add ARM AMBA SP804 supportJean-Christophe PLAGNIOL-VILLARD2013-02-113-0/+99
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* BCM2835: add clocksource driverCarlo Caione2012-10-213-0/+95
| | | | | Signed-off-by: Carlo Caione <carlo.caione@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* arm: move nomadik timer to drivers/clocksourceJean-Christophe PLAGNIOL-VILLARD2012-10-043-0/+152
| | | | | | as this timer is shared with multiple arch Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* arm: add generic smp twd timerJean-Christophe PLAGNIOL-VILLARD2012-10-043-0/+105
on Cortex A9 and Cortex A5 we have a generic timer which we can use as clocksource Limit the timer frequency to < 25Mhz Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>