Merge remote-tracking branch 'h8300/h8300-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Nov 2015 23:25:55 +0000 (10:25 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 4 Nov 2015 23:25:55 +0000 (10:25 +1100)
1  2 
drivers/clocksource/h8300_timer8.c

@@@ -100,11 -100,12 +100,12 @@@ static void timer8_set_next(struct time
                dev_warn(&p->pdev->dev, "delta out of range\n");
        now = timer8_get_counter(p);
        p->tcora = delta;
-       ctrl_outb(ctrl_inb(p->mapbase + _8TCR) 0x40, p->mapbase + _8TCR);
+       ctrl_outb(ctrl_inb(p->mapbase + _8TCR) & ~0x40, p->mapbase + _8TCR);
        if (delta > now)
                ctrl_outw(delta, p->mapbase + TCORA);
        else
                ctrl_outw(now + 1, p->mapbase + TCORA);
+       ctrl_outb(ctrl_inb(p->mapbase + _8TCR) | 0x40, p->mapbase + _8TCR);
  
        raw_spin_unlock_irqrestore(&p->lock, flags);
  }
@@@ -146,6 -147,7 +147,7 @@@ static void timer8_stop(struct timer8_p
        raw_spin_lock_irqsave(&p->lock, flags);
  
        ctrl_outw(0x0000, p->mapbase + _8TCR);
+       ctrl_outw(0x0000, p->mapbase + _8TCNT);
  
        raw_spin_unlock_irqrestore(&p->lock, flags);
  }
@@@ -165,7 -167,6 +167,6 @@@ static void timer8_clock_event_start(st
        ced->mult = div_sc(p->rate, NSEC_PER_SEC, ced->shift);
        ced->max_delta_ns = clockevent_delta2ns(0xffff, ced);
        ced->min_delta_ns = clockevent_delta2ns(0x0001, ced);
        timer8_set_next(p, periodic?(p->rate + HZ/2) / HZ:0x10000);
  }
  
@@@ -215,6 -216,7 +216,6 @@@ static int timer8_setup(struct timer8_p
        int irq;
        int ret;
  
 -      memset(p, 0, sizeof(*p));
        p->pdev = pdev;
  
        res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);