summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/clocksource.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: i.MX: gpt: Add i.MX7 supportJuergen Borleis2017-01-191-0/+3
| | | | | Signed-off-by Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX6 gpt: Add i.MX6ul supportSascha Hauer2016-11-081-0/+3
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX27: Fix gpt compatible for latest device treesSascha Hauer2016-03-161-0/+3
| | | | | | | | In v4.2-rc3 the "fsl,imx1-gpt" compatible was replaced with "fsl,imx21-gpt" so i.MX27 currently ends up without clocksource. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* driver: replace dev_request_mem_region with dev_request_mem_resourceSascha Hauer2016-03-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ARM: imx: clocksource: add new DT compatibleStefan Christ2016-02-171-0/+3
| | | | | | | | | | Since commit 0ff58575c9d66 ("dts: update to v4.5-rc1") the compatible "fsl,imx6q-gpt" was removed from imx6dl.dtsi. Now there is only the Solo/DualLite specific compatible "fsl,imx6dl-gpt". Adapt the driver for that change. Signed-off-by: Stefan Christ <s.christ@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: imx: clocksource: add new DT compatibleLucas Stach2015-10-261-0/+3
| | | | | | | | | | The i.MX6 DL/S DT has been changed to use more specific compatibles as GPTv2 has a different programming model for modes used in Linux. This difference doesn't matter for Barebox, but the old mx31 compatible has been dropped from the DT, so we need to match on the one still present. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* resource: Let dev_request_mem_region return an error pointerSascha Hauer2014-09-161-0/+2
| | | | | | For all users fix or add the error check. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX clocksource: return successful for multiple instancesSascha Hauer2014-01-291-1/+1
| | | | | | | | With multiple instances we returned -EBUSY which will provoke a log message. Return successful instead since the i.MX27 has multiple GPTs in the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Add missing includesSascha Hauer2013-11-081-0/+1
| | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: i.MX: Make timer available earlierSascha Hauer2013-06-181-1/+1
| | | | | | | | This moves the CCM drivers to core_initcall since this has no dependencies. This way we can be sure that the clock for the clocksource is available in at postcore_initcall time. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX: get rid of imx-regs.hSascha Hauer2012-10-171-1/+0
| | | | | | | | | - remove now unused __REG definitions - include individual SoC register files instead of imx-regs.h - move IMX_GPIO_NR to generic.h - finally remove imx-regs.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/clk' into for-next/imxSascha Hauer2012-10-171-12/+0
|\ | | | | | | | | Conflicts: drivers/net/fec_imx.c
| * ARM i.MX: Enable clocks in common placeSascha Hauer2012-10-101-12/+0
| | | | | | | | | | | | | | | | On i.MX we enable all necessary clocks during startup of the clock controller driver, so we do not need the register hacking in the drivers anymore. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM i.MX/watchdog: Make i.MX watchdog driver the reset source on i.MXSascha Hauer2012-10-051-37/+0
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/fixes'Sascha Hauer2012-10-041-3/+4
|\
| * ARM i.MX clocksource: fix timer source selectionSascha Hauer2012-10-041-3/+4
| | | | | | | | | | | | | | | | | | - The i.MX1 timer does not have IPG clock as source, so rename the define accordingly - for the i.MX31 timer we want to use the per clock, not the ipg clock. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx-clk'Sascha Hauer2012-10-041-3/+15
|\ \
| * | ARM i.MX: Remove old clock supportSascha Hauer2012-10-041-1/+0
| | | | | | | | | | | | | | | | | | | | | The old clock support is now unused. Remove it. The former i.MX clko command is superseeded by generic clock manipulation commands. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ARM i.MX: Switch clocksource to clk_getSascha Hauer2012-10-041-2/+15
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
|/ | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-031-4/+0
|\ | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM i.MX: Add devicetree support for clocksource driverSascha Hauer2012-09-231-0/+13
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM i.MX: implement clocksource as driverSascha Hauer2012-09-171-9/+67
|/ | | | | | | To get rid of the register definitions in the SoC header files. platform_device_id is used to distinguish between gpt types. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM i.MX clocksource: put registers in iomem spaceSascha Hauer2012-06-301-5/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* introduce io.hSascha Hauer2011-09-221-1/+1
| | | | | | | To allow for some generic io accessors introduce io.h and use this instead of asm/io.h throughout the tree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clocksource: switch mask to CLOCKSOURCE_MASKJean-Christophe PLAGNIOL-VILLARD2010-11-291-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* reset_cpu: unify declarationRobert Schwebel2010-10-221-1/+1
| | | | | | | | include/common.h declares this as "unsigned long addr", so we unify it. This also silences a doxygen warning. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX remove wdog registers from header filesSascha Hauer2010-10-211-4/+19
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx clocksource: sparse fixesSascha Hauer2010-10-211-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx/clocksource: enable GPT1 before using it on CPUIMX25Eric Bénard2010-10-131-0/+4
| | | | Signed-off-by: Eric Bénard <eric@eukrea.com>
* i.MX clocksource: Use readl/writel instead of pointer derefSascha Hauer2010-06-241-7/+11
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make reset_cpu a __noreturn functionSascha Hauer2010-03-301-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* [ARM] Move include/asm-arm/arch-* to arch/arm/*/include/machJean-Christophe PLAGNIOL-VILLARD2009-10-221-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* imx clocksource: add frequency change supportSascha Hauer2009-05-131-0/+13
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add Freescale i.MX21 supportIvo Clarysse2009-04-071-3/+6
| | | | | Signed-off-by: Ivo Clarysse <ivo.clarysse@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* i.MX use fecclk for fec and gtpclk for gptSascha Hauer2009-02-201-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* make the clocksource work on current CPUsJuergen Beisert2007-10-181-2/+1
|
* making watchdog handling independend from ifdefsJuergen Beisert2007-10-171-7/+1
|
* i.MX clocksource: enable clocks for gpt1Sascha Hauer2007-10-091-0/+5
|
* add i.MX27 reset supportSascha Hauer2007-10-081-2/+8
|
* make independent of timer baseSascha Hauer2007-10-071-7/+12
|
* export symbolsSascha Hauer2007-10-071-0/+1
|
* whitespace cleanupSascha Hauer2007-09-131-2/+2
|
* svn_rev_664Sascha Hauer2007-07-051-1/+0
|
* svn_rev_490Sascha Hauer2007-07-051-0/+88