summaryrefslogtreecommitdiffstats
path: root/drivers/clocksource (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'devicetree-for-3.16' of ↵Linus Torvalds2014-06-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into next Pull DeviceTree updates from Rob Herring: - Another round of clean-up of FDT related code in architecture code. This removes knowledge of internal FDT details from most architectures except powerpc. - Conversion of kernel's custom FDT parsing code to use libfdt. - DT based initialization for generic serial earlycon. The introduction of generic serial earlycon support went in through the tty tree. - Improve the platform device naming for DT probed devices to ensure unique naming and use parent names instead of a global index. - Fix a race condition in of_update_property. - Unify the various linker section OF match tables and fix several function prototype errors. - Update platform_get_irq_byname to work in deferred probe cases. - 2 binding doc updates * tag 'devicetree-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (58 commits) of: handle NULL node in next_child iterators of/irq: provide more wrappers for !CONFIG_OF devicetree: bindings: Document micrel vendor prefix dt: bindings: dwc2: fix required value for the phy-names property of_pci_irq: kill useless variable in of_irq_parse_pci() of/irq: do irq resolution in platform_get_irq_byname() of: Add a testcase for of_find_node_by_path() of: Make of_find_node_by_path() handle /aliases of: Create unlocked version of for_each_child_of_node() lib: add glibc style strchrnul() variant of: Handle memory@0 node on PPC32 only pci/of: Remove dead code of: fix race between search and remove in of_update_property() of: Use NULL for pointers of: Stop naming platform_device using dcr address of: Ensure unique names without sacrificing determinism tty/serial: pl011: add DT based earlycon support of/fdt: add FDT serial scanning for earlycon of/fdt: add FDT address translation support serial: earlycon: add DT support ...
| * of: consolidate linker section OF match table declarationsRob Herring2014-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | We now have several OF match tables using linker sections that are nearly the same definition. The only variation is the callback function prototype. Create a common define for creating linker section OF match table entries which each table declaration can use. Acked-by: Grant Likely <grant.likely@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org>
* | clocksource: versatile: Use sched_clock_register()Thomas Gleixner2014-06-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | The newly merged versatile sched clock support uses a deprecated interface. Of course that patch got routed through the ARM tree instead of going through the relevant maintainer tree. Use the proper interface so we can get rid of the cruft. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge tag 'drivers-for-3.16' of ↵Linus Torvalds2014-06-031-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into next Pull ARM SoC driver changes from Olof Johansson: "SoC-near driver changes that we're merging through our tree. Mostly because they depend on other changes we have staged, but in some cases because the driver maintainers preferred that we did it this way. This contains a largeish cleanup series of the omap_l3_noc bus driver, cpuidle rework for Exynos, some reset driver conversions and a long branch of TI EDMA fixes and cleanups, with more to come next release. The TI EDMA cleanups is a shared branch with the dmaengine tree, with a handful of Davinci-specific fixes on top. After discussion at last year's KS (and some more on the mailing lists), we are here adding a drivers/soc directory. The purpose of this is to keep per-vendor shared code that's needed by different drivers but that doesn't fit into the MFD (nor drivers/platform) model. We expect to keep merging contents for this hierarchy through arm-soc so we can keep an eye on what the vendors keep adding here and not making it a free-for-all to shove in crazy stuff" * tag 'drivers-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (101 commits) cpufreq: exynos: Fix driver compilation with ARCH_MULTIPLATFORM tty: serial: msm: Remove direct access to GSBI power: reset: keystone-reset: introduce keystone reset driver Documentation: dt: add bindings for keystone pll control controller Documentation: dt: add bindings for keystone reset driver soc: qcom: fix of_device_id table ARM: EXYNOS: Fix kernel panic when unplugging CPU1 on exynos ARM: EXYNOS: Move the driver to drivers/cpuidle directory ARM: EXYNOS: Cleanup all unneeded headers from cpuidle.c ARM: EXYNOS: Pass the AFTR callback to the platform_data ARM: EXYNOS: Move S5P_CHECK_SLEEP into pm.c ARM: EXYNOS: Move the power sequence call in the cpu_pm notifier ARM: EXYNOS: Move the AFTR state function into pm.c ARM: EXYNOS: Encapsulate the AFTR code into a function ARM: EXYNOS: Disable cpuidle for exynos5440 ARM: EXYNOS: Encapsulate boot vector code into a function for cpuidle ARM: EXYNOS: Pass wakeup mask parameter to function for cpuidle ARM: EXYNOS: Remove ifdef for scu_enable in pm ARM: EXYNOS: Move scu_enable in the cpu_pm notifier ARM: EXYNOS: Use the cpu_pm notifier for pm ...
| * \ Merge tag 'samsung-drivers' of ↵Olof Johansson2014-05-221-0/+8
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/drivers Merge "Samsung driver update for 3.16" from Kukjin Kim: exynos_mct update for v3.16 - register sched_clock callback to use clocksource mct-frc * tag 'samsung-drivers' of http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: clocksource: exynos_mct: register sched_clock callback Signed-off-by: Olof Johansson <olof@lixom.net>
| | * clocksource: exynos_mct: register sched_clock callbackVincent Guittot2014-05-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use the clocksource mct-frc for sched_clock Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* | | Merge tag 'boards-for-3.16' of ↵Linus Torvalds2014-06-033-680/+1305
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc into next Pull ARM SoC board support updates from Olof Johansson: "The bulk of this branch is updates for Renesas Shmobile. They are still doing some enablement for classic boards first, and then come up with DT bindings when they've had a chance to learn more about the hardware. Not necessarily a bad way to go about it, and they're looking at moving some of the temporary board code resulting from it to drivers/staging instead to avoid the churn here. As a result of the shmobile clock cleanups, we end up merging quite a bit of SH code here as well. We ended up merging it here instead of in the cleanup branch due to the other board changes depending on it" * tag 'boards-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (130 commits) ARM: davinci: remove checks for CONFIG_USB_MUSB_PERIPHERAL ARM: add drivers for Colibri T30 to multi_v7_defconfig ARM: shmobile: Remove Genmai reference DTS ARM: shmobile: Let Genmai multiplatform boot with Genmai DTB ARM: shmobile: Sync Genmai DTS with Genmai reference DTS ARM: shmobile: genmai-reference: Remove legacy clock support ARM: shmobile: Remove non-multiplatform Genmai reference support ARM: configs: enable XHCI mvebu support in multi_v7_defconfig ARM: OMAP: replace checks for CONFIG_USB_GADGET_OMAP ARM: OMAP: AM3517EVM: remove check for CONFIG_PANEL_SHARP_LQ043T1DG01 ARM: OMAP: SX1: remove check for CONFIG_SX1_OLD_FLASH ARM: OMAP: remove some dead code ARM: OMAP: omap3stalker: remove two Kconfig macros ARM: tegra: tegra_defconfig updates ARM: shmobile: r7s72100: use workaround for non DT-clocks ARM: shmobile: Add forward declaration of struct clk to silence warning ARM: shmobile: r7s72100: remove SPI DT clocks from legacy clock support ARM: shmobile: r7s72100: add spi clocks to dtsi ARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock support ARM: shmobile: r7s72100: add i2c clocks to dtsi ...
| * \ \ Merge branch 'depends/clockevents-cleanups' into next/boardsOlof Johansson2014-05-213-680/+1305
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bringing in as an external dependency that the renesas/clock-cleanup2 branch relies on. * depends/clockevents-cleanups: (52 commits) clocksource: sh_mtu2: Sort headers alphabetically clocksource: sh_mtu2: Remove FSF mail address from GPL notice clocksource: sh_mtu2: Rename clock to "fck" in the non-legacy case clocksource: sh_mtu2: Add support for multiple channels per device clocksource: sh_mtu2: Hardcode MTU2 clock event rating to 200 clocksource: sh_mtu2: Set cpumask to cpu_possible_mask clocksource: sh_mtu2: Replace hardcoded register values with macros clocksource: sh_mtu2: Allocate channels dynamically clocksource: sh_mtu2: Replace kmalloc + memset with kzalloc clocksource: sh_mtu2: Add index to struct sh_mtu2_channel clocksource: sh_mtu2: Add memory base to sh_mtu2_channel structure clocksource: sh_mtu2: Constify name argument to sh_mtu2_register() clocksource: sh_mtu2: Split channel setup to separate function clocksource: sh_mtu2: Rename struct sh_mtu2_priv to sh_mtu2_device clocksource: sh_mtu2: Split channel fields from sh_mtu2_priv clocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variables clocksource: sh_mtu2: Use request_irq() instead of setup_irq() clocksource: sh_tmu: Sort headers alphabetically clocksource: sh_tmu: Remove FSF mail address from GPL notice clocksource: sh_tmu: Rename clock to "fck" in the non-legacy case ... Signed-off-by: Olof Johansson <olof@lixom.net>
| | * | clocksource: sh_mtu2: Sort headers alphabeticallyLaurent Pinchart2014-04-161-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps locating duplicates and inserting new headers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Remove FSF mail address from GPL noticeLaurent Pinchart2014-04-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Rename clock to "fck" in the non-legacy caseLaurent Pinchart2014-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sh_mtu2 driver gets the MTU2 functional clock using a connection ID of "mtu2_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "mtu2_fck" connection ID, the ARM SoCs use the device ID only with a NULL connection ID. This works on legacy platforms but will break on ARM with DT boot. Fix the situation by using a connection ID of "fck" in the non-legacy platform data case. Clock lookup entries will be renamed to use the device ID as well as the connection ID as platforms get moved to new platform data. The legacy code will eventually be dropped, leaving us with device ID based clock lookup, compatible with DT boot. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Add support for multiple channels per deviceLaurent Pinchart2014-04-161-54/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MTU2 hardware devices can support multiple channels, with global registers and per-channel registers. The sh_mtu2 driver currently models the hardware with one Linux device per channel. This model makes it difficult to handle global registers in a clean way. Add support for a new model that uses one Linux device per timer with multiple channels per device. This requires changes to platform data, add new channel configuration fields. Support for the legacy model is kept and will be removed after all platforms switch to the new model. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Hardcode MTU2 clock event rating to 200Laurent Pinchart2014-04-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All boards use clock event ratings of 200 for the MTU2, hardcode it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Set cpumask to cpu_possible_maskLaurent Pinchart2014-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The MTU2 is not tied to CPU0, make it usable on any CPU. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Replace hardcoded register values with macrosLaurent Pinchart2014-04-161-6/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Define symbolic macros for all used registers bits. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Allocate channels dynamicallyLaurent Pinchart2014-04-161-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This prepares the driver for multi-channel support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Replace kmalloc + memset with kzallocLaurent Pinchart2014-04-161-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | One kzalloc a day keeps the bugs away. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Add index to struct sh_mtu2_channelLaurent Pinchart2014-04-161-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the index as the timer start/stop bit and when printing messages to identify the channel. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Add memory base to sh_mtu2_channel structureLaurent Pinchart2014-04-161-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The channel memory base is channel-specific, add it to the channel structure in preparation for support of multiple channels per device. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Constify name argument to sh_mtu2_register()Laurent Pinchart2014-04-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name argument is assigned to const structure fields only, constify it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Split channel setup to separate functionLaurent Pinchart2014-04-161-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the channel setup code from sh_mtu2_setup to a new sh_mtu2_setup_channel function and call it from sh_mtu2_setup. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Rename struct sh_mtu2_priv to sh_mtu2_deviceLaurent Pinchart2014-04-161-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Channel data is private as well, rename priv to device to make the distrinction between the core device and the channels clearer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Split channel fields from sh_mtu2_privLaurent Pinchart2014-04-161-56/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new sh_mtu2_channel structure to hold the channel-specific fields in preparation for multiple channels per device support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variablesLaurent Pinchart2014-04-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rate and periodic fields are used in a single function only, as local variables. Remove them from the structure. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_mtu2: Use request_irq() instead of setup_irq()Laurent Pinchart2014-04-161-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver claims it needs to register an interrupt handler too early for request_irq(). This might have been true in the past, but the only meaningful difference between request_irq() and setup_irq() today is an additional kzalloc() call in request_irq(). As the driver calls kmalloc() itself we know that the slab allocator is available, we can thus switch to request_irq(). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Wolfram Sang <wsa@sang-engineering.com>
| | * | clocksource: sh_tmu: Sort headers alphabeticallyLaurent Pinchart2014-04-161-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | This helps locating duplicates and inserting new headers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Remove FSF mail address from GPL noticeLaurent Pinchart2014-04-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Rename clock to "fck" in the non-legacy caseLaurent Pinchart2014-04-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sh_tmu driver gets the TMU functional clock using a connection ID of "tmu_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "tmu_fck" connection ID, the ARM SoCs use the device ID only with a NULL connection ID. This works on legacy platforms but will break on ARM with DT boot. Fix the situation by using a connection ID of "fck" in the non-legacy platform data case. Clock lookup entries will be renamed to use the device ID as well as the connection ID as platforms get moved to new platform data. The legacy code will eventually be dropped, leaving us with device ID based clock lookup, compatible with DT boot. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Add support for multiple channels per deviceLaurent Pinchart2014-04-161-61/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TMU hardware devices can support multiple channels, with global registers and per-channel registers. The sh_tmu driver currently models the hardware with one Linux device per channel. This model makes it difficult to handle global registers in a clean way. Add support for a new model that uses one Linux device per timer with multiple channels per device. This requires changes to platform data, add new channel configuration fields. Support for the legacy model is kept and will be removed after all platforms switch to the new model. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Hardcode TMU clock event and source ratings to 200Laurent Pinchart2014-04-161-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All boards use clock event and clock source ratings of 200 for the TMU, hardcode it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Replace hardcoded register values with macrosLaurent Pinchart2014-04-161-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | Define symbolic macros for all used registers bits. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Allocate channels dynamicallyLaurent Pinchart2014-04-161-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | This prepares the driver for multi-channel support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Replace kmalloc + memset with kzallocLaurent Pinchart2014-04-161-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | One kzalloc a day keeps the bugs away. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Add index to struct sh_tmu_channelLaurent Pinchart2014-04-161-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the index as the timer start/stop bit and when printing messages to identify the channel. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Add memory base to sh_tmu_channel structureLaurent Pinchart2014-04-161-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The channel memory base is channel-specific, add it to the channel structure in preparation for support of multiple channels per device. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Constify name argument to sh_tmu_register()Laurent Pinchart2014-04-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The name argument is assigned to const structure fields only, constify it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Split channel setup to separate functionLaurent Pinchart2014-04-161-13/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the channel setup code from sh_tmu_setup to a new sh_tmu_setup_channel function and call it from sh_tmu_setup. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Rename struct sh_tmu_priv to sh_tmu_deviceLaurent Pinchart2014-04-161-34/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Channel data is private as well, rename priv to device to make the distrinction between the core device and the channels clearer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Split channel fields from sh_tmu_privLaurent Pinchart2014-04-161-110/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new sh_tmu_channel structure to hold the channel-specific field in preparation for multiple channels per device support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_tmu: Use request_irq() instead of setup_irq()Laurent Pinchart2014-04-161-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver claims it needs to register an interrupt handler too early for request_irq(). This might have been true in the past, but the only meaningful difference between request_irq() and setup_irq() today is an additional kzalloc() call in request_irq(). As the driver calls kmalloc() itself we know that the slab allocator is available, we can thus switch to request_irq(). Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Request IRQ for clock event device onlyLaurent Pinchart2014-04-161-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clock sources don't need an IRQ, request the IRQ only for channels used as clock event devices. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Sort headers alphabeticallyLaurent Pinchart2014-04-161-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | This helps locating duplicates and inserting new headers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Remove FSF mail address from GPL noticeLaurent Pinchart2014-04-161-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not include the paragraph about writing to the Free Software Foundation's mailing address from the sample GPL notice. The FSF has changed addresses in the past, and may do so again. Linux already includes a copy of the GPL. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Rename clock to "fck" in the non-legacy caseLaurent Pinchart2014-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sh_cmt driver gets the CMT functional clock using a connection ID of "cmt_fck". While all SH SoCs create clock lookup entries with a NULL device ID and a "cmt_fck" connection ID, the ARM SoCs use the device ID only with a NULL connection ID. This works on legacy platforms but will break on ARM with DT boot. Fix the situation by using a connection ID of "fck" in the non-legacy platform data case. Clock lookup entries will be renamed to use the device ID as well as the connection ID as platforms get moved to new platform data. The legacy code will eventually be dropped, leaving us with device ID based clock lookup, compatible with DT boot. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Add support for multiple channels per deviceLaurent Pinchart2014-04-161-68/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CMT hardware devices can support multiple channels, with global registers and per-channel registers. The sh_cmt driver currently models the hardware with one Linux device per channel. This model makes it difficult to handle global registers in a clean way. Add support for a new model that uses one Linux device per timer with multiple channels per device. This requires changes to platform data, add new channel configuration fields. Support for the legacy model is kept and will be removed after all platforms switch to the new model. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Hardcode CMT clock source rating to 125Laurent Pinchart2014-04-161-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All boards use or should use a clock source rating of 125 for the CMT, hardcode it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Hardcode CMT clock event rating to 125Laurent Pinchart2014-04-161-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All boards use or should use a clock event rating of 125 for the CMT, hardcode it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Set cpumask to cpu_possible_maskLaurent Pinchart2014-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMT is a global timer not restricted to a single CPU. It has a lower rating than the TMU or ARM architected timer, but is still useful on systems where the other timers are stopped during CPU sleep. When multiple timers are available the timers core selects which timer to use based on timer ratings. On SMP systems where timer broadcasting is required, one dummy timer is instantiated per CPU with a rating of 100. On those systems the CMT timer has a rating of 80, which makes the dummy timer selected by default on all CPUs. The CMT is then available, and will be used as a broadcast timer. On UP systems no dummy timer is instantiated. The CMT timer has a rating of 125 on those systems and is used directly as a clock event device for CPU0 without broadcasting. The CMT rating shouldn't depend on whether we boot a UP or SMP system. We can't raise the CMT rating to 125 on SMP systems. This would select CMT as the clock event device for CPU0 as its rating is higher than the dummy timer rating, and would leave the system without a broadcast timer. We could instead lower the rating to 80 on all systems, but that wouldn't reflect reality as ratings between 1 and 99 are documented as "unfit for real use". We should raise the rating above 99 and still have the CMT selected as a broadcast timer. This can be done by changing the cpumask from cpumask_of(0) to cpu_possible_mask. In that case the timer selection logic will prefer the previously probed and already selected dummy timer for all CPUs based on the fact that already selected per-cpu timers are preferred over new global timers, regardless of their respective ratings. This also better reflects reality, as the CMT is not tied to the boot CPU. Ideally the timer selection logic should realize that the CMT needs to be used as a broadcast timer on SMP systems as no other broadcast timer is available, regardless of the cpumask and rating. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Replace hardcoded register values with macrosLaurent Pinchart2014-04-161-12/+44
| | | | | | | | | | | | | | | | | | | | | | | | Define symbolic macros for all used registers bits. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
| | * | clocksource: sh_cmt: Split static information from sh_cmt_deviceLaurent Pinchart2014-04-161-70/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a new sh_cmt_info structure to hold static information about the device model and reference that structure from the sh_cmt_device structure. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>