clocksource/drivers/timer-atmel-tcb: add sama5d2 support
Subsystems (5)
Alexandre Belloni
maintainerv6 cover clocksource/drivers/timer-atmel-tcb: add sama5d2 support
Hello,
This series mainly adds sama5d2 support where we need to avoid using clock index 0 because that clock is never enabled by the driver.
There is also a rework of the 32khz clock handling so it is not used for clockevents on 32 bit counter because the increased rate improves the resolution and doesn't have any drawback with that counter width. This replaces a patch that has been carried in the linux-rt tree for a while.
Changes in v6:
- Added final Rob's Reviewed by, based on:
https://lore.kernel.org/linux-arm-kernel/20200709210543.GA884561@bogus/
- fixed the clockevent periodic rate
Changes in v5:
- Rebased on top of v5.8-rc1
- Added Rob's ack
Changes in v4:
- Rework binding documentation
Changes in v3:
- Moved the child node documentation to the parent documentation
Changes in v2:
- Rebased on v5.7-rc1
- Moved the binding documentation to its proper place
- Added back the atmel,tcb-timer child node documentation
Alexandre Belloni (8):
dt-bindings: atmel-tcb: convert bindings to json-schema
dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible
ARM: dts: at91: sama5d2: add TCB GCLK clocksource/drivers/timer-atmel-tcb: rework 32khz clock selection clocksource/drivers/timer-atmel-tcb: fill tcb_config clocksource/drivers/timer-atmel-tcb: stop using the 32kHz for
clockevents
clocksource/drivers/timer-atmel-tcb: allow selecting first divider clocksource/drivers/timer-atmel-tcb: add sama5d2 support
Kamel Bouhara (1):
ARM: at91: add atmel tcb capabilities
.../devicetree/bindings/mfd/atmel-tcb.txt | 56 ------- .../soc/microchip/atmel,at91rm9200-tcb.yaml | 155 ++++++++++++++++++ arch/arm/boot/dts/sama5d2.dtsi | 12 +- drivers/clocksource/timer-atmel-tcb.c | 103 +++++++----- include/soc/at91/atmel_tcb.h | 5 + 5 files changed, 225 insertions(+), 106 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/atmel-tcb.txt create mode 100644 Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml
Signature · 1 line
2.26.2
Alexandre Belloni
maintainerPATCH v6 1/9 dt-bindings: atmel-tcb: convert bindings to json-schema
Convert Atmel Timer Counter Blocks bindings to DT schema format using json-schema.
Also move it out of mfd as it is not and has never been related to mfd.
--- .../devicetree/bindings/mfd/atmel-tcb.txt | 56 -------- .../soc/microchip/atmel,at91rm9200-tcb.yaml | 131 ++++++++++++++++++ 2 files changed, 131 insertions(+), 56 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/atmel-tcb.txt create mode 100644 Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml
Documentation/devicetree/bindings/mfd/atmel-tcb.txt deleted +0 -56
@@ -1,56 +0,0 @@ -* Device tree bindings for Atmel Timer Counter Blocks -- compatible: Should be "atmel,<chip>-tcb", "simple-mfd", "syscon". - <chip> can be "at91rm9200" or "at91sam9x5" -- reg: Should contain registers location and length -- #address-cells: has to be 1 -- #size-cells: has to be 0 -- interrupts: Should contain all interrupts for the TC block - Note that you can specify several interrupt cells if the TC - block has one interrupt per channel. -- clock-names: tuple listing input clock names. - Required elements: "t0_clk", "slow_clk" - Optional elements: "t1_clk", "t2_clk" -- clocks: phandles to input clocks. - -The TCB can expose multiple subdevices: - * a timer - - compatible: Should be "atmel,tcb-timer" - - reg: Should contain the TCB channels to be used. If the - counter width is 16 bits (at91rm9200-tcb), two consecutive - channels are needed. Else, only one channel will be used. - -Examples: - -One interrupt per TC block: - tcb0: timer@fff7c000 { - compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0xfff7c000 0x100>; - interrupts = <18 4>; - clocks = <&tcb0_clk>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; - - timer@0 { - compatible = "atmel,tcb-timer"; - reg = <0>, <1>; - }; - - timer@2 { - compatible = "atmel,tcb-timer"; - reg = <2>; - }; - }; - -One interrupt per TC channel in a TC block: - tcb1: timer@fffdc000 { - compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0xfffdc000 0x100>; - interrupts = <26 4>, <27 4>, <28 4>; - clocks = <&tcb1_clk>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; - }; - -
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml new file +131 -0
131 lines not on this page · raw message
Signature · 1 line
2.26.2
[tip: timers/core] dt-bindings: atmel-tcb: convert bindings to json-schema
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 8be8e7de604f8e51cf5d02afdcd28e1e49d3646b Gitweb: https://git.kernel.org/tip/8be8e7de604f8e51cf5d02afdcd28e1e49d3646b Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:05 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:57:02 +02:00
dt-bindings: atmel-tcb: convert bindings to json-schema
Convert Atmel Timer Counter Blocks bindings to DT schema format using json-schema.
Also move it out of mfd as it is not and has never been related to mfd.
--- Documentation/devicetree/bindings/mfd/atmel-tcb.txt | 56 +------------------------------ Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 131 insertions(+), 56 deletions(-) delete mode 100644 Documentation/devicetree/bindings/mfd/atmel-tcb.txt create mode 100644 Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml
Documentation/devicetree/bindings/mfd/atmel-tcb.txt deleted +0 -56
@@ -1,56 +0,0 @@ -* Device tree bindings for Atmel Timer Counter Blocks -- compatible: Should be "atmel,<chip>-tcb", "simple-mfd", "syscon". - <chip> can be "at91rm9200" or "at91sam9x5" -- reg: Should contain registers location and length -- #address-cells: has to be 1 -- #size-cells: has to be 0 -- interrupts: Should contain all interrupts for the TC block - Note that you can specify several interrupt cells if the TC - block has one interrupt per channel. -- clock-names: tuple listing input clock names. - Required elements: "t0_clk", "slow_clk" - Optional elements: "t1_clk", "t2_clk" -- clocks: phandles to input clocks. - -The TCB can expose multiple subdevices: - * a timer - - compatible: Should be "atmel,tcb-timer" - - reg: Should contain the TCB channels to be used. If the - counter width is 16 bits (at91rm9200-tcb), two consecutive - channels are needed. Else, only one channel will be used. - -Examples: - -One interrupt per TC block: - tcb0: timer@fff7c000 { - compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0xfff7c000 0x100>; - interrupts = <18 4>; - clocks = <&tcb0_clk>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; - - timer@0 { - compatible = "atmel,tcb-timer"; - reg = <0>, <1>; - }; - - timer@2 { - compatible = "atmel,tcb-timer"; - reg = <2>; - }; - }; - -One interrupt per TC channel in a TC block: - tcb1: timer@fffdc000 { - compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0xfffdc000 0x100>; - interrupts = <26 4>, <27 4>, <28 4>; - clocks = <&tcb1_clk>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; - }; - -
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml new file +131 -0
131 lines not on this page · raw message
Alexandre Belloni
maintainerPATCH v6 2/9 dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible
In reply to Alexandre BelloniThe sama5d2 TC block TIMER_CLOCK1 is different from the at91sam9x5 one. Instead of being MCK / 2, it is the TCB GCLK.
--- .../soc/microchip/atmel,at91rm9200-tcb.yaml | 42 +++++++++++++++---- 1 file changed, 33 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml +33 -9
@@ -19,6 +19,7 @@ properties: - enum: - atmel,at91rm9200-tcb - atmel,at91sam9x5-tcb + - atmel,sama5d2-tcb - const: simple-mfd - const: syscon
@@ -36,15 +37,6 @@ properties: description: List of clock names. Always includes t0_clk and slow clk. Also includes t1_clk and t2_clk if a clock per channel is available. - oneOf: - - items: - - const: t0_clk - - const: slow_clk - - items: - - const: t0_clk - - const: t1_clk - - const: t2_clk - - const: slow_clk minItems: 2 maxItems: 4
@@ -75,6 +67,38 @@ patternProperties: - compatible - reg +allOf: + - if: + properties: + compatible: + contains: + const: atmel,sama5d2-tcb + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: t0_clk + - const: gclk + - const: slow_clk + else: + properties: + clocks: + minItems: 2 + maxItems: 4 + clock-names: + oneOf: + - items: + - const: t0_clk + - const: slow_clk + - items: + - const: t0_clk + - const: t1_clk + - const: t2_clk + - const: slow_clk + required: - compatible - reg
Signature · 1 line
2.26.2
[tip: timers/core] dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: d777960e8f7268f82806451065f84ea3b05a3ea3 Gitweb: https://git.kernel.org/tip/d777960e8f7268f82806451065f84ea3b05a3ea3 Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:06 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:57:03 +02:00
dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible
The sama5d2 TC block TIMER_CLOCK1 is different from the at91sam9x5 one. Instead of being MCK / 2, it is the TCB GCLK.
--- Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-)
Documentation/devicetree/bindings/soc/microchip/atmel,at91rm9200-tcb.yaml +33 -9
@@ -19,6 +19,7 @@ properties: - enum: - atmel,at91rm9200-tcb - atmel,at91sam9x5-tcb + - atmel,sama5d2-tcb - const: simple-mfd - const: syscon
@@ -36,15 +37,6 @@ properties: description: List of clock names. Always includes t0_clk and slow clk. Also includes t1_clk and t2_clk if a clock per channel is available. - oneOf: - - items: - - const: t0_clk - - const: slow_clk - - items: - - const: t0_clk - - const: t1_clk - - const: t2_clk - - const: slow_clk minItems: 2 maxItems: 4
@@ -75,6 +67,38 @@ patternProperties: - compatible - reg +allOf: + - if: + properties: + compatible: + contains: + const: atmel,sama5d2-tcb + then: + properties: + clocks: + minItems: 3 + maxItems: 3 + clock-names: + items: + - const: t0_clk + - const: gclk + - const: slow_clk + else: + properties: + clocks: + minItems: 2 + maxItems: 4 + clock-names: + oneOf: + - items: + - const: t0_clk + - const: slow_clk + - items: + - const: t0_clk + - const: t1_clk + - const: t2_clk + - const: slow_clk + required: - compatible - reg
Alexandre Belloni
maintainerPATCH v6 3/9 ARM: dts: at91: sama5d2: add TCB GCLK
In reply to Alexandre BelloniThe sama5d2 tcbs take an extra input clock, their gclk.
--- arch/arm/boot/dts/sama5d2.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/sama5d2.dtsi +6 -6
@@ -375,23 +375,23 @@ macb0: ethernet@f8008000 { }; tcb0: timer@f800c000 { - compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon"; + compatible = "atmel,sama5d2-tcb", "simple-mfd", "syscon"; #address-cells = <1>; #size-cells = <0>; reg = <0xf800c000 0x100>; interrupts = <35 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 35>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 35>, <&pmc PMC_TYPE_GCK 35>, <&clk32k>; + clock-names = "t0_clk", "gclk", "slow_clk"; }; tcb1: timer@f8010000 { - compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon"; + compatible = "atmel,sama5d2-tcb", "simple-mfd", "syscon"; #address-cells = <1>; #size-cells = <0>; reg = <0xf8010000 0x100>; interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 36>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 36>, <&pmc PMC_TYPE_GCK 36>, <&clk32k>; + clock-names = "t0_clk", "gclk", "slow_clk"; }; hsmc: hsmc@f8014000 {
Signature · 1 line
2.26.2
[tip: timers/core] ARM: dts: at91: sama5d2: add TCB GCLK
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 44f6fa431bbd087083fca437d0348edd4b09e3c2 Gitweb: https://git.kernel.org/tip/44f6fa431bbd087083fca437d0348edd4b09e3c2 Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:07 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:57:03 +02:00
ARM: dts: at91: sama5d2: add TCB GCLK
The sama5d2 tcbs take an extra input clock, their gclk.
--- arch/arm/boot/dts/sama5d2.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/sama5d2.dtsi +6 -6
@@ -499,23 +499,23 @@ }; tcb0: timer@f800c000 { - compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon"; + compatible = "atmel,sama5d2-tcb", "simple-mfd", "syscon"; #address-cells = <1>; #size-cells = <0>; reg = <0xf800c000 0x100>; interrupts = <35 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 35>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 35>, <&pmc PMC_TYPE_GCK 35>, <&clk32k>; + clock-names = "t0_clk", "gclk", "slow_clk"; }; tcb1: timer@f8010000 { - compatible = "atmel,at91sam9x5-tcb", "simple-mfd", "syscon"; + compatible = "atmel,sama5d2-tcb", "simple-mfd", "syscon"; #address-cells = <1>; #size-cells = <0>; reg = <0xf8010000 0x100>; interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>; - clocks = <&pmc PMC_TYPE_PERIPHERAL 36>, <&clk32k>; - clock-names = "t0_clk", "slow_clk"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 36>, <&pmc PMC_TYPE_GCK 36>, <&clk32k>; + clock-names = "t0_clk", "gclk", "slow_clk"; }; hsmc: hsmc@f8014000 {
Alexandre Belloni
maintainerPATCH v6 4/9 ARM: at91: add atmel tcb capabilities
In reply to Alexandre BelloniFrom: Kamel Bouhara <[email protected]>
Some atmel socs have extra tcb capabilities that allow using a generic clock source or enabling a quadrature decoder.
--- include/soc/at91/atmel_tcb.h | 5 +++++ 1 file changed, 5 insertions(+)
include/soc/at91/atmel_tcb.h +5 -0
@@ -36,9 +36,14 @@ struct clk;/** * struct atmel_tcb_config - SoC data for a Timer/Counter Block * @counter_width: size in bits of a timer counter register +* @has_gclk: boolean indicating if a timer counter has a generic clock +* @has_qdec: boolean indicating if a timer counter has a quadrature +* decoder. */ struct atmel_tcb_config {size_t counter_width; +bool has_gclk; +bool has_qdec; };/**
Signature · 1 line
2.26.2
[tip: timers/core] ARM: at91: add atmel tcb capabilities
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 738c58ccac386bb068cba2446bd9dbabeae09b62 Gitweb: https://git.kernel.org/tip/738c58ccac386bb068cba2446bd9dbabeae09b62 Author: Kamel Bouhara <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:08 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:57:03 +02:00
ARM: at91: add atmel tcb capabilities
Some atmel socs have extra tcb capabilities that allow using a generic clock source or enabling a quadrature decoder.
--- include/soc/at91/atmel_tcb.h | 5 +++++ 1 file changed, 5 insertions(+)
include/soc/at91/atmel_tcb.h +5 -0
@@ -36,9 +36,14 @@ struct clk;/** * struct atmel_tcb_config - SoC data for a Timer/Counter Block * @counter_width: size in bits of a timer counter register +* @has_gclk: boolean indicating if a timer counter has a generic clock +* @has_qdec: boolean indicating if a timer counter has a quadrature +* decoder. */ struct atmel_tcb_config {size_t counter_width; +bool has_gclk; +bool has_qdec; };/**
Alexandre Belloni
maintainerPATCH v6 5/9 clocksource/drivers/timer-atmel-tcb: rework 32khz clock selection
In reply to Alexandre BelloniOn all the supported SoCs, the slow clock is always ATMEL_TC_TIMER_CLOCK5, avoid looking it up and pass it directly to setup_clkevents.
--- drivers/clocksource/timer-atmel-tcb.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +2 -9
@@ -346,7 +346,7 @@ static void __init tcb_setup_single_chan(struct atmel_tc *tc, int mck_divisor_idwritel (ATMEL_TC_SYNC , tcaddr +ATMEL_TC_BCR ); } -static const u8 atmel_tcb_divisors[5 ] = {2 ,8 ,32 ,128 ,0 , }; +static const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 };static const struct of_device_id atmel_tcb_of_match[] = { { .compatible ="atmel,at91rm9200-tcb" , .data = (void *)16 , },
@@ -362,7 +362,6 @@ static int __init tcb_clksrc_init(struct device_node *node)u64 (*tc_sched_clock)(void);u32 rate, divided_rate =0 ;int best_divisor_idx =-1 ; -int clk32k_divisor_idx =-1 ;int bits;int i;int ret;
@@ -416,12 +415,6 @@ static int __init tcb_clksrc_init(struct device_node *node)unsigned divisor = atmel_tcb_divisors[i];unsigned tmp; -/* remember 32 KiHz clock for later */ -if (!divisor) { - clk32k_divisor_idx = i; -continue ; - } - tmp = rate / divisor;pr_debug ("TC: %u / %-3u [%d] --> %u\n" , rate, divisor, i, tmp);if (best_divisor_idx >0 ) {
@@ -467,7 +460,7 @@ static int __init tcb_clksrc_init(struct device_node *node) goto err_disable_t1;/* channel 2: periodic and oneshot timer support */ - ret =setup_clkevents (&tc, clk32k_divisor_idx); + ret =setup_clkevents (&tc,ATMEL_TC_TIMER_CLOCK5 );if (ret) goto err_unregister_clksrc;
Signature · 1 line
2.26.2
[tip: timers/core] clocksource/drivers/timer-atmel-tcb: Rework 32khz clock selection
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 228e21848623e0ce54a1a3d7857b444813e49b2e Gitweb: https://git.kernel.org/tip/228e21848623e0ce54a1a3d7857b444813e49b2e Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:09 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:57:58 +02:00
clocksource/drivers/timer-atmel-tcb: Rework 32khz clock selection
On all the supported SoCs, the slow clock is always ATMEL_TC_TIMER_CLOCK5, avoid looking it up and pass it directly to setup_clkevents.
--- drivers/clocksource/timer-atmel-tcb.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +2 -9
@@ -346,7 +346,7 @@ static void __init tcb_setup_single_chan(struct atmel_tc *tc, int mck_divisor_idwritel (ATMEL_TC_SYNC , tcaddr +ATMEL_TC_BCR ); } -static const u8 atmel_tcb_divisors[5 ] = {2 ,8 ,32 ,128 ,0 , }; +static const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 };static const struct of_device_id atmel_tcb_of_match[] = { { .compatible ="atmel,at91rm9200-tcb" , .data = (void *)16 , },
@@ -362,7 +362,6 @@ static int __init tcb_clksrc_init(struct device_node *node)u64 (*tc_sched_clock)(void);u32 rate, divided_rate =0 ;int best_divisor_idx =-1 ; -int clk32k_divisor_idx =-1 ;int bits;int i;int ret;
@@ -416,12 +415,6 @@ static int __init tcb_clksrc_init(struct device_node *node)unsigned divisor = atmel_tcb_divisors[i];unsigned tmp; -/* remember 32 KiHz clock for later */ -if (!divisor) { - clk32k_divisor_idx = i; -continue ; - } - tmp = rate / divisor;pr_debug ("TC: %u / %-3u [%d] --> %u\n" , rate, divisor, i, tmp);if (best_divisor_idx >0 ) {
@@ -467,7 +460,7 @@ static int __init tcb_clksrc_init(struct device_node *node) goto err_disable_t1;/* channel 2: periodic and oneshot timer support */ - ret =setup_clkevents (&tc, clk32k_divisor_idx); + ret =setup_clkevents (&tc,ATMEL_TC_TIMER_CLOCK5 );if (ret) goto err_unregister_clksrc;
Alexandre Belloni
maintainerPATCH v6 6/9 clocksource/drivers/timer-atmel-tcb: fill tcb_config
In reply to Alexandre BelloniUse the tcb_config and struct atmel_tcb_config to get the timer counter width. This is necessary because atmel_tcb_config will be extended later on.
--- drivers/clocksource/timer-atmel-tcb.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +15 -3
@@ -348,9 +348,17 @@ static void __init tcb_setup_single_chan(struct atmel_tc *tc, int mck_divisor_idstatic const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 }; +static struct atmel_tcb_config tcb_rm9200_config = { + .counter_width =16 , +}; + +static struct atmel_tcb_config tcb_sam9x5_config = { + .counter_width =32 , +}; +static const struct of_device_id atmel_tcb_of_match[] = { - { .compatible ="atmel,at91rm9200-tcb" , .data = (void *)16 , }, - { .compatible ="atmel,at91sam9x5-tcb" , .data = (void *)32 , }, + { .compatible ="atmel,at91rm9200-tcb" , .data = &tcb_rm9200_config, }, + { .compatible ="atmel,at91sam9x5-tcb" , .data = &tcb_sam9x5_config, }, {/* sentinel */ } };
@@ -398,7 +406,11 @@ static int __init tcb_clksrc_init(struct device_node *node) } match =of_match_node (atmel_tcb_of_match, node->parent); - bits = (uintptr_t )match->data; +if (!match) +return -ENODEV ; + + tc.tcb_config = match->data; + bits = tc.tcb_config->counter_width;for (i =0 ; i <ARRAY_SIZE (tc.irq); i++)writel (ATMEL_TC_ALL_IRQ , tc.regs +ATMEL_TC_REG (i,IDR ));
Signature · 1 line
2.26.2
[tip: timers/core] clocksource/drivers/timer-atmel-tcb: Fill tcb_config
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: d2c60dcf86fabb542b96b4444ca81be0b1b30099 Gitweb: https://git.kernel.org/tip/d2c60dcf86fabb542b96b4444ca81be0b1b30099 Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:10 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:58:04 +02:00
clocksource/drivers/timer-atmel-tcb: Fill tcb_config
Use the tcb_config and struct atmel_tcb_config to get the timer counter width. This is necessary because atmel_tcb_config will be extended later on.
--- drivers/clocksource/timer-atmel-tcb.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +15 -3
@@ -348,9 +348,17 @@ static void __init tcb_setup_single_chan(struct atmel_tc *tc, int mck_divisor_idstatic const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 }; +static struct atmel_tcb_config tcb_rm9200_config = { + .counter_width =16 , +}; + +static struct atmel_tcb_config tcb_sam9x5_config = { + .counter_width =32 , +}; +static const struct of_device_id atmel_tcb_of_match[] = { - { .compatible ="atmel,at91rm9200-tcb" , .data = (void *)16 , }, - { .compatible ="atmel,at91sam9x5-tcb" , .data = (void *)32 , }, + { .compatible ="atmel,at91rm9200-tcb" , .data = &tcb_rm9200_config, }, + { .compatible ="atmel,at91sam9x5-tcb" , .data = &tcb_sam9x5_config, }, {/* sentinel */ } };
@@ -398,7 +406,11 @@ static int __init tcb_clksrc_init(struct device_node *node) } match =of_match_node (atmel_tcb_of_match, node->parent); - bits = (uintptr_t )match->data; +if (!match) +return -ENODEV ; + + tc.tcb_config = match->data; + bits = tc.tcb_config->counter_width;for (i =0 ; i <ARRAY_SIZE (tc.irq); i++)writel (ATMEL_TC_ALL_IRQ , tc.regs +ATMEL_TC_REG (i,IDR ));
Alexandre Belloni
maintainerPATCH v6 7/9 clocksource/drivers/timer-atmel-tcb: stop using the 32kHz for clockevents
In reply to Alexandre BelloniStop using the slow clock as the clock source for 32 bit counters because even at 10MHz, they are able to handle delays up to two minutes. This provides a way better resolution.
--- drivers/clocksource/timer-atmel-tcb.c | 63 ++++++++++++++------------- 1 file changed, 33 insertions(+), 30 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +33 -30
@@ -27,9 +27,10 @@* - Some chips support 32 bit counter. A single channel is used for * this 32 bit free-running counter. the second channel is not used. * -* - The third channel may be used to provide a 16-bit clockevent -* source, used in either periodic or oneshot mode. This runs -* at 32 KiHZ, and can handle delays of up to two seconds. +* - The third channel may be used to provide a clockevent source, used in +* either periodic or oneshot mode. For 16-bit counter its runs at 32 KiHZ, +* and can handle delays of up to two seconds. For 32-bit counters, it runs at +* the same rate as the clocksource * * REVISIT behavior during system suspend states... we should disable * all clocks and save the power. Easily done for clockevent devices,
@@ -47,6 +48,8 @@ static struct } tcb_cache[3 ];static u32 bmr_cache; +static const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 }; +static u64 tc_get_cycles (struct clocksource *cs) {unsigned long flags;
@@ -143,6 +146,7 @@ static unsigned long notrace tc_delay_timer_read32(void)struct tc_clkevt_device {struct clock_event_device clkevt;struct clk *clk; +u32 rate;void __iomem *regs; };
@@ -151,13 +155,6 @@ static struct tc_clkevt_device *to_tc_clkevt(struct clock_event_device *clkevt) return container_of(clkevt, struct tc_clkevt_device, clkevt); } -/* For now, we always use the 32K clock ... this optimizes for NO_HZ, -* because using one of the divided clocks would usually mean the -* tick rate can never be less than several dozen Hz (vs 0.5 Hz). -* -* A divided clock could be good for high resolution timers, since -* 30.5 usec resolution can seem "low". -*/ static u32 timer_clock;static int tc_shutdown (struct clock_event_device *d)
@@ -183,7 +180,7 @@ static int tc_set_oneshot(struct clock_event_device *d)clk_enable (tcd->clk); -/* slow clock, count up to RC, then irq and stop */ +/* count up to RC, then irq and stop */ writel (timer_clock |ATMEL_TC_CPCSTOP |ATMEL_TC_WAVE |ATMEL_TC_WAVESEL_UP_AUTO , regs +ATMEL_TC_REG (2 ,CMR ));writel (ATMEL_TC_CPCS , regs +ATMEL_TC_REG (2 ,IER ));
@@ -205,10 +202,10 @@ static int tc_set_periodic(struct clock_event_device *d)*/ clk_enable (tcd->clk); -/* slow clock, count up to RC, then irq and restart */ +/* count up to RC, then irq and restart */ writel (timer_clock |ATMEL_TC_WAVE |ATMEL_TC_WAVESEL_UP_AUTO , regs +ATMEL_TC_REG (2 ,CMR )); -writel ((32768 +HZ /2 ) /HZ , tcaddr +ATMEL_TC_REG (2 ,RC )); +writel ((tcd->rate +HZ /2 ) /HZ , tcaddr +ATMEL_TC_REG (2 ,RC ));/* Enable clock and interrupts on RC compare */ writel (ATMEL_TC_CPCS , regs +ATMEL_TC_REG (2 ,IER ));
@@ -256,47 +253,55 @@ static irqreturn_t ch2_irq(int irq, void *handle)return IRQ_NONE ; } -static int __init setup_clkevents (struct atmel_tc *tc,int clk32k_divisor_idx) +static int __init setup_clkevents (struct atmel_tc *tc,int divisor_idx) {int ret;struct clk *t2_clk = tc->clk[2 ];int irq = tc->irq[2 ]; - - ret =clk_prepare_enable (tc->slow_clk); -if (ret) -return ret; +int bits = tc->tcb_config->counter_width;/* try to enable t2 clk to avoid future errors in mode change */ ret =clk_prepare_enable (t2_clk); -if (ret) { -clk_disable_unprepare (tc->slow_clk); +if (ret)return ret; - } - -clk_disable (t2_clk); clkevt.regs = tc->regs; clkevt.clk = t2_clk; - timer_clock = clk32k_divisor_idx; +if (bits ==32 ) { + timer_clock = divisor_idx; + clkevt.rate =clk_get_rate (t2_clk) / atmel_tcb_divisors[divisor_idx]; + }else { + ret =clk_prepare_enable (tc->slow_clk); +if (ret) { +clk_disable_unprepare (t2_clk); +return ret; + } + + clkevt.rate =clk_get_rate (tc->slow_clk); + timer_clock =ATMEL_TC_TIMER_CLOCK5 ; + } + +clk_disable (t2_clk); clkevt.clkevt.cpumask =cpumask_of (0 ); ret =request_irq (irq, ch2_irq,IRQF_TIMER ,"tc_clkevt" , &clkevt);if (ret) {clk_unprepare (t2_clk); -clk_disable_unprepare (tc->slow_clk); +if (bits !=32 ) +clk_disable_unprepare (tc->slow_clk);return ret; } -clockevents_config_and_register (&clkevt.clkevt,32768 ,1 ,0xffff ); +clockevents_config_and_register (&clkevt.clkevt, clkevt.rate,1 ,BIT (bits) -1 );return ret; }#else /* !CONFIG_GENERIC_CLOCKEVENTS */ -static int __init setup_clkevents (struct atmel_tc *tc,int clk32k_divisor_idx) +static int __init setup_clkevents (struct atmel_tc *tc,int divisor_idx) {/* NOTHING */ return 0 ;
@@ -346,8 +351,6 @@ static void __init tcb_setup_single_chan(struct atmel_tc *tc, int mck_divisor_idwritel (ATMEL_TC_SYNC , tcaddr +ATMEL_TC_BCR ); } -static const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 }; -static struct atmel_tcb_config tcb_rm9200_config = { .counter_width =16 , };
@@ -472,7 +475,7 @@ static int __init tcb_clksrc_init(struct device_node *node) goto err_disable_t1;/* channel 2: periodic and oneshot timer support */ - ret =setup_clkevents (&tc,ATMEL_TC_TIMER_CLOCK5 ); + ret =setup_clkevents (&tc, best_divisor_idx);if (ret) goto err_unregister_clksrc;
Signature · 1 line
2.26.2
[tip: timers/core] clocksource/drivers/timer-atmel-tcb: Stop using the 32kHz for clockevents
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: ef1d6a20e06397f4a28f23524cdb4611fd629063 Gitweb: https://git.kernel.org/tip/ef1d6a20e06397f4a28f23524cdb4611fd629063 Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:11 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:58:12 +02:00
clocksource/drivers/timer-atmel-tcb: Stop using the 32kHz for clockevents
Stop using the slow clock as the clock source for 32 bit counters because even at 10MHz, they are able to handle delays up to two minutes. This provides a way better resolution.
--- drivers/clocksource/timer-atmel-tcb.c | 63 +++++++++++++------------- 1 file changed, 33 insertions(+), 30 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +33 -30
@@ -27,9 +27,10 @@* - Some chips support 32 bit counter. A single channel is used for * this 32 bit free-running counter. the second channel is not used. * -* - The third channel may be used to provide a 16-bit clockevent -* source, used in either periodic or oneshot mode. This runs -* at 32 KiHZ, and can handle delays of up to two seconds. +* - The third channel may be used to provide a clockevent source, used in +* either periodic or oneshot mode. For 16-bit counter its runs at 32 KiHZ, +* and can handle delays of up to two seconds. For 32-bit counters, it runs at +* the same rate as the clocksource * * REVISIT behavior during system suspend states... we should disable * all clocks and save the power. Easily done for clockevent devices,
@@ -47,6 +48,8 @@ static struct } tcb_cache[3 ];static u32 bmr_cache; +static const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 }; +static u64 tc_get_cycles (struct clocksource *cs) {unsigned long flags;
@@ -143,6 +146,7 @@ static unsigned long notrace tc_delay_timer_read32(void)struct tc_clkevt_device {struct clock_event_device clkevt;struct clk *clk; +u32 rate;void __iomem *regs; };
@@ -151,13 +155,6 @@ static struct tc_clkevt_device *to_tc_clkevt(struct clock_event_device *clkevt) return container_of(clkevt, struct tc_clkevt_device, clkevt); } -/* For now, we always use the 32K clock ... this optimizes for NO_HZ, -* because using one of the divided clocks would usually mean the -* tick rate can never be less than several dozen Hz (vs 0.5 Hz). -* -* A divided clock could be good for high resolution timers, since -* 30.5 usec resolution can seem "low". -*/ static u32 timer_clock;static int tc_shutdown (struct clock_event_device *d)
@@ -183,7 +180,7 @@ static int tc_set_oneshot(struct clock_event_device *d)clk_enable (tcd->clk); -/* slow clock, count up to RC, then irq and stop */ +/* count up to RC, then irq and stop */ writel (timer_clock |ATMEL_TC_CPCSTOP |ATMEL_TC_WAVE |ATMEL_TC_WAVESEL_UP_AUTO , regs +ATMEL_TC_REG (2 ,CMR ));writel (ATMEL_TC_CPCS , regs +ATMEL_TC_REG (2 ,IER ));
@@ -205,10 +202,10 @@ static int tc_set_periodic(struct clock_event_device *d)*/ clk_enable (tcd->clk); -/* slow clock, count up to RC, then irq and restart */ +/* count up to RC, then irq and restart */ writel (timer_clock |ATMEL_TC_WAVE |ATMEL_TC_WAVESEL_UP_AUTO , regs +ATMEL_TC_REG (2 ,CMR )); -writel ((32768 +HZ /2 ) /HZ , tcaddr +ATMEL_TC_REG (2 ,RC )); +writel ((tcd->rate +HZ /2 ) /HZ , tcaddr +ATMEL_TC_REG (2 ,RC ));/* Enable clock and interrupts on RC compare */ writel (ATMEL_TC_CPCS , regs +ATMEL_TC_REG (2 ,IER ));
@@ -256,47 +253,55 @@ static irqreturn_t ch2_irq(int irq, void *handle)return IRQ_NONE ; } -static int __init setup_clkevents (struct atmel_tc *tc,int clk32k_divisor_idx) +static int __init setup_clkevents (struct atmel_tc *tc,int divisor_idx) {int ret;struct clk *t2_clk = tc->clk[2 ];int irq = tc->irq[2 ]; - - ret =clk_prepare_enable (tc->slow_clk); -if (ret) -return ret; +int bits = tc->tcb_config->counter_width;/* try to enable t2 clk to avoid future errors in mode change */ ret =clk_prepare_enable (t2_clk); -if (ret) { -clk_disable_unprepare (tc->slow_clk); +if (ret)return ret; - } - -clk_disable (t2_clk); clkevt.regs = tc->regs; clkevt.clk = t2_clk; - timer_clock = clk32k_divisor_idx; +if (bits ==32 ) { + timer_clock = divisor_idx; + clkevt.rate =clk_get_rate (t2_clk) / atmel_tcb_divisors[divisor_idx]; + }else { + ret =clk_prepare_enable (tc->slow_clk); +if (ret) { +clk_disable_unprepare (t2_clk); +return ret; + } + + clkevt.rate =clk_get_rate (tc->slow_clk); + timer_clock =ATMEL_TC_TIMER_CLOCK5 ; + } + +clk_disable (t2_clk); clkevt.clkevt.cpumask =cpumask_of (0 ); ret =request_irq (irq, ch2_irq,IRQF_TIMER ,"tc_clkevt" , &clkevt);if (ret) {clk_unprepare (t2_clk); -clk_disable_unprepare (tc->slow_clk); +if (bits !=32 ) +clk_disable_unprepare (tc->slow_clk);return ret; } -clockevents_config_and_register (&clkevt.clkevt,32768 ,1 ,0xffff ); +clockevents_config_and_register (&clkevt.clkevt, clkevt.rate,1 ,BIT (bits) -1 );return ret; }#else /* !CONFIG_GENERIC_CLOCKEVENTS */ -static int __init setup_clkevents (struct atmel_tc *tc,int clk32k_divisor_idx) +static int __init setup_clkevents (struct atmel_tc *tc,int divisor_idx) {/* NOTHING */ return 0 ;
@@ -346,8 +351,6 @@ static void __init tcb_setup_single_chan(struct atmel_tc *tc, int mck_divisor_idwritel (ATMEL_TC_SYNC , tcaddr +ATMEL_TC_BCR ); } -static const u8 atmel_tcb_divisors[] = {2 ,8 ,32 ,128 }; -static struct atmel_tcb_config tcb_rm9200_config = { .counter_width =16 , };
@@ -472,7 +475,7 @@ static int __init tcb_clksrc_init(struct device_node *node) goto err_disable_t1;/* channel 2: periodic and oneshot timer support */ - ret =setup_clkevents (&tc,ATMEL_TC_TIMER_CLOCK5 ); + ret =setup_clkevents (&tc, best_divisor_idx);if (ret) goto err_unregister_clksrc;
Alexandre Belloni
maintainerPATCH v6 8/9 clocksource/drivers/timer-atmel-tcb: allow selecting first divider
In reply to Alexandre BelloniThe divider selection algorithm never allowed to get index 0. It was also continuing to look for dividers, trying to find the slow clock selection. This is not necessary anymore.
--- drivers/clocksource/timer-atmel-tcb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +2 -4
@@ -432,10 +432,8 @@ static int __init tcb_clksrc_init(struct device_node *node) tmp = rate / divisor;pr_debug ("TC: %u / %-3u [%d] --> %u\n" , rate, divisor, i, tmp); -if (best_divisor_idx >0 ) { -if (tmp <5 *1000 *1000 ) -continue ; - } +if ((best_divisor_idx >=0 ) && (tmp <5 *1000 *1000 )) +break ; divided_rate = tmp; best_divisor_idx = i; }
Signature · 1 line
2.26.2
[tip: timers/core] clocksource/drivers/timer-atmel-tcb: Allow selecting first divider
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 501465d5d7af63af5942cf6af783952bdd757c52 Gitweb: https://git.kernel.org/tip/501465d5d7af63af5942cf6af783952bdd757c52 Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:12 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:58:18 +02:00
clocksource/drivers/timer-atmel-tcb: Allow selecting first divider
The divider selection algorithm never allowed to get index 0. It was also continuing to look for dividers, trying to find the slow clock selection. This is not necessary anymore.
--- drivers/clocksource/timer-atmel-tcb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/clocksource/timer-atmel-tcb.c +2 -4
@@ -432,10 +432,8 @@ static int __init tcb_clksrc_init(struct device_node *node) tmp = rate / divisor;pr_debug ("TC: %u / %-3u [%d] --> %u\n" , rate, divisor, i, tmp); -if (best_divisor_idx >0 ) { -if (tmp <5 *1000 *1000 ) -continue ; - } +if ((best_divisor_idx >=0 ) && (tmp <5 *1000 *1000 )) +break ; divided_rate = tmp; best_divisor_idx = i; }
Alexandre Belloni
maintainerPATCH v6 9/9 clocksource/drivers/timer-atmel-tcb: add sama5d2 support
In reply to Alexandre BelloniThe first divisor for the sama5d2 is actually the gclk selector. Because the currently remaining divisors are fitting the use case, currently ensure it is skipped.
--- drivers/clocksource/timer-atmel-tcb.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/clocksource/timer-atmel-tcb.c +10 -1
@@ -359,9 +359,15 @@ static struct atmel_tcb_config tcb_sam9x5_config = { .counter_width = 32, }; +static struct atmel_tcb_config tcb_sama5d2_config = { + .counter_width =32 , + .has_gclk =1 , +}; +static const struct of_device_id atmel_tcb_of_match[] = { { .compatible ="atmel,at91rm9200-tcb" , .data = &tcb_rm9200_config, }, { .compatible ="atmel,at91sam9x5-tcb" , .data = &tcb_sam9x5_config, }, + { .compatible ="atmel,sama5d2-tcb" , .data = &tcb_sama5d2_config, }, {/* sentinel */ } };
@@ -426,7 +432,10 @@ static int __init tcb_clksrc_init(struct device_node *node)/* How fast will we be counting? Pick something over 5 MHz. */ rate = (u32 )clk_get_rate (t0_clk); -for (i =0 ; i <ARRAY_SIZE (atmel_tcb_divisors); i++) { + i =0 ; +if (tc.tcb_config->has_gclk) + i =1 ; +for (; i <ARRAY_SIZE (atmel_tcb_divisors); i++) {unsigned divisor = atmel_tcb_divisors[i];unsigned tmp;
Signature · 1 line
2.26.2
[tip: timers/core] clocksource/drivers/timer-atmel-tcb: Add sama5d2 support
The following commit has been merged into the timers/core branch of tip:
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 467ae18aa057c44417afc92896879c2fb37a8b65 Gitweb: https://git.kernel.org/tip/467ae18aa057c44417afc92896879c2fb37a8b65 Author: Alexandre Belloni <[email protected]> AuthorDate: Sat, 11 Jul 2020 01:08:13 +02:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Sat, 11 Jul 2020 18:58:24 +02:00
clocksource/drivers/timer-atmel-tcb: Add sama5d2 support
The first divisor for the sama5d2 is actually the gclk selector. Because the currently remaining divisors are fitting the use case, currently ensure it is skipped.
--- drivers/clocksource/timer-atmel-tcb.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/clocksource/timer-atmel-tcb.c +10 -1
@@ -359,9 +359,15 @@ static struct atmel_tcb_config tcb_sam9x5_config = { .counter_width = 32, }; +static struct atmel_tcb_config tcb_sama5d2_config = { + .counter_width =32 , + .has_gclk =1 , +}; +static const struct of_device_id atmel_tcb_of_match[] = { { .compatible ="atmel,at91rm9200-tcb" , .data = &tcb_rm9200_config, }, { .compatible ="atmel,at91sam9x5-tcb" , .data = &tcb_sam9x5_config, }, + { .compatible ="atmel,sama5d2-tcb" , .data = &tcb_sama5d2_config, }, {/* sentinel */ } };
@@ -426,7 +432,10 @@ static int __init tcb_clksrc_init(struct device_node *node)/* How fast will we be counting? Pick something over 5 MHz. */ rate = (u32 )clk_get_rate (t0_clk); -for (i =0 ; i <ARRAY_SIZE (atmel_tcb_divisors); i++) { + i =0 ; +if (tc.tcb_config->has_gclk) + i =1 ; +for (; i <ARRAY_SIZE (atmel_tcb_divisors); i++) {unsigned divisor = atmel_tcb_divisors[i];unsigned tmp;
Daniel Lezcano
AppliedQuoted 10 lines · Alexandre Belloni
Hello,
This series mainly adds sama5d2 support where we need to avoid using clock index 0 because that clock is never enabled by the driver.
There is also a rework of the 32khz clock handling so it is not used for clockevents on 32 bit counter because the increased rate improves the resolution and doesn't have any drawback with that counter width. This replaces a patch that has been carried in the linux-rt tree for a while.
Quoted 4 lines
Changes in v6:
- Added final Rob's Reviewed by, based on:https://lore.kernel.org/linux-arm-kernel/20200709210543.GA884561@bogus/- fixed the clockevent periodic rate
Applied, thanks
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog