Skip to content

Commit b7fcbb0

Browse files
author
Laurent Pinchart
committed
clocksource: sh_cmt: Hardcode CMT clock event rating to 125
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 <[email protected]>
1 parent f1ebe1e commit b7fcbb0

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/clocksource/sh_cmt.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -768,14 +768,14 @@ static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
768768
}
769769

770770
static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
771-
const char *name, unsigned long rating)
771+
const char *name)
772772
{
773773
struct clock_event_device *ced = &ch->ced;
774774

775775
ced->name = name;
776776
ced->features = CLOCK_EVT_FEAT_PERIODIC;
777777
ced->features |= CLOCK_EVT_FEAT_ONESHOT;
778-
ced->rating = rating;
778+
ced->rating = 125;
779779
ced->cpumask = cpu_possible_mask;
780780
ced->set_next_event = sh_cmt_clock_event_next;
781781
ced->set_mode = sh_cmt_clock_event_mode;
@@ -788,11 +788,10 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
788788
}
789789

790790
static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
791-
unsigned long clockevent_rating,
792-
unsigned long clocksource_rating)
791+
bool clockevent, unsigned long clocksource_rating)
793792
{
794-
if (clockevent_rating)
795-
sh_cmt_register_clockevent(ch, name, clockevent_rating);
793+
if (clockevent)
794+
sh_cmt_register_clockevent(ch, name);
796795

797796
if (clocksource_rating)
798797
sh_cmt_register_clocksource(ch, name, clocksource_rating);
@@ -827,7 +826,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
827826
raw_spin_lock_init(&ch->lock);
828827

829828
ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
830-
cfg->clockevent_rating,
829+
cfg->clockevent_rating != 0,
831830
cfg->clocksource_rating);
832831
if (ret) {
833832
dev_err(&cmt->pdev->dev, "ch%u: registration failed\n",

0 commit comments

Comments
 (0)