summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
Commit message (Collapse)AuthorAgeFilesLines
* 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>