Browse Source

drivers: counter: Add vendor prefix ti to timer clock

Add vendor prefix ti to timer clock property prescale and divider.

Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
pull/74835/merge
Saravanan Sekar 3 weeks ago committed by Benjamin Cabé
parent
commit
f672430b3b
  1. 4
      drivers/counter/counter_mspm0_timer.c
  2. 4
      dts/arm/ti/mspm0/g/mspm0g.dtsi
  3. 4
      dts/bindings/timer/ti,mspm0-timer.yaml

4
drivers/counter/counter_mspm0_timer.c

@ -277,8 +277,8 @@ static void counter_mspm0_isr(void *arg)
.clockSel = MSPM0_CLOCK_PERIPH_REG_MASK( \ .clockSel = MSPM0_CLOCK_PERIPH_REG_MASK( \
DT_CLOCKS_CELL_BY_IDX(DT_INST_PARENT(n), 0, clk)), \ DT_CLOCKS_CELL_BY_IDX(DT_INST_PARENT(n), 0, clk)), \
.divideRatio = MSPM0_CLK_DIV(DT_PROP(DT_INST_PARENT(n), \ .divideRatio = MSPM0_CLK_DIV(DT_PROP(DT_INST_PARENT(n), \
clk_div)), \ ti_clk_div)), \
.prescale = DT_PROP(DT_INST_PARENT(n), clk_prescaler), \ .prescale = DT_PROP(DT_INST_PARENT(n), ti_clk_prescaler), \
}, \ }, \
.counter_info = {.max_top_value = (DT_INST_PROP(n, resolution) == 32) \ .counter_info = {.max_top_value = (DT_INST_PROP(n, resolution) == 32) \
? UINT32_MAX : UINT16_MAX, \ ? UINT32_MAX : UINT16_MAX, \

4
dts/arm/ti/mspm0/g/mspm0g.dtsi

@ -33,8 +33,8 @@
reg = <0x40084000 0x2000>; reg = <0x40084000 0x2000>;
clocks = <&ckm MSPM0_CLOCK_LFCLK>; clocks = <&ckm MSPM0_CLOCK_LFCLK>;
interrupts = <16 0>; interrupts = <16 0>;
clk-prescaler = <255>; ti,clk-prescaler = <255>;
clk-div = <1>; ti,clk-div = <1>;
status = "disabled"; status = "disabled";
counter0: counter { counter0: counter {

4
dts/bindings/timer/ti,mspm0-timer.yaml

@ -14,14 +14,14 @@ properties:
interrupts: interrupts:
required: true required: true
clk-prescaler: ti,clk-prescaler:
type: int type: int
required: true required: true
description: | description: |
TIMCLK clock source prescaler value. TIMCLK clock source prescaler value.
Valid range [0 ... 255]. Valid range [0 ... 255].
clk-div: ti,clk-div:
type: int type: int
required: true required: true
default: 1 default: 1

Loading…
Cancel
Save