Skip to content

Commit 2edb6d2

Browse files
glneokartben
authored andcommitted
drivers: timer: ti_dmtimer: Do not require systick_timer node label
This driver currently only supports one instance of this timer and uses it as the system clock. The instance is selected by being the first one listed in DT in all places except sys_clock_driver_init() where it uses the node label "systick_timer". This driver should be fixed to correctly support multiple instances of this timer, and the one used for the system timer should be selected based on a flag or alias, not based on label. For now simply use the 0th instance like everywhere else which removes the need to have this node labeled a special way and makes no functional changes to current users. Signed-off-by: Andrew Davis <[email protected]>
1 parent 49f520f commit 2edb6d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/timer/ti_dmtimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static int sys_clock_driver_init(void)
157157
{
158158
struct ti_dm_timer_data *data;
159159

160-
systick_timer_dev = DEVICE_DT_GET(DT_NODELABEL(systick_timer));
160+
systick_timer_dev = DEVICE_DT_GET(DT_DRV_INST(0));
161161

162162
data = systick_timer_dev->data;
163163

0 commit comments

Comments
 (0)