aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/sh_cmt.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-02-19 11:00:31 -0500
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-04-16 06:03:12 -0400
commitb7fcbb0f830e6cccc9d358c24f8463e5d8018649 (patch)
treec07cbf1241f686a84d7a27f4207388ae88ebdef8 /drivers/clocksource/sh_cmt.c
parentf1ebe1e47e1979393a8492bfe751176908a830ae (diff)
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 <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/clocksource/sh_cmt.c')
-rw-r--r--drivers/clocksource/sh_cmt.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
index 926abe288126..75b1f83a60a8 100644
--- a/drivers/clocksource/sh_cmt.c
+++ b/drivers/clocksource/sh_cmt.c
@@ -768,14 +768,14 @@ static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
768} 768}
769 769
770static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch, 770static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
771 const char *name, unsigned long rating) 771 const char *name)
772{ 772{
773 struct clock_event_device *ced = &ch->ced; 773 struct clock_event_device *ced = &ch->ced;
774 774
775 ced->name = name; 775 ced->name = name;
776 ced->features = CLOCK_EVT_FEAT_PERIODIC; 776 ced->features = CLOCK_EVT_FEAT_PERIODIC;
777 ced->features |= CLOCK_EVT_FEAT_ONESHOT; 777 ced->features |= CLOCK_EVT_FEAT_ONESHOT;
778 ced->rating = rating; 778 ced->rating = 125;
779 ced->cpumask = cpu_possible_mask; 779 ced->cpumask = cpu_possible_mask;
780 ced->set_next_event = sh_cmt_clock_event_next; 780 ced->set_next_event = sh_cmt_clock_event_next;
781 ced->set_mode = sh_cmt_clock_event_mode; 781 ced->set_mode = sh_cmt_clock_event_mode;
@@ -788,11 +788,10 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
788} 788}
789 789
790static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name, 790static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
791 unsigned long clockevent_rating, 791 bool clockevent, unsigned long clocksource_rating)
792 unsigned long clocksource_rating)
793{ 792{
794 if (clockevent_rating) 793 if (clockevent)
795 sh_cmt_register_clockevent(ch, name, clockevent_rating); 794 sh_cmt_register_clockevent(ch, name);
796 795
797 if (clocksource_rating) 796 if (clocksource_rating)
798 sh_cmt_register_clocksource(ch, name, clocksource_rating); 797 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,
827 raw_spin_lock_init(&ch->lock); 826 raw_spin_lock_init(&ch->lock);
828 827
829 ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev), 828 ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
830 cfg->clockevent_rating, 829 cfg->clockevent_rating != 0,
831 cfg->clocksource_rating); 830 cfg->clocksource_rating);
832 if (ret) { 831 if (ret) {
833 dev_err(&cmt->pdev->dev, "ch%u: registration failed\n", 832 dev_err(&cmt->pdev->dev, "ch%u: registration failed\n",