From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752108AbbF3IZM (ORCPT ); Tue, 30 Jun 2015 04:25:12 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:36704 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbbF3IZJ (ORCPT ); Tue, 30 Jun 2015 04:25:09 -0400 Message-ID: <55925268.4050109@linaro.org> Date: Tue, 30 Jun 2015 10:25:12 +0200 From: Daniel Lezcano User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Viresh Kumar , Thomas Gleixner CC: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Oleksij Rempel Subject: Re: [PATCH 01/41] clocksource: asm9260: Migrate to new 'set-state' interface References: <57ae9434bbb7218961c3ad45a26fbe1fffe40cbd.1434622147.git.viresh.kumar@linaro.org> In-Reply-To: <57ae9434bbb7218961c3ad45a26fbe1fffe40cbd.1434622147.git.viresh.kumar@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/18/2015 12:54 PM, Viresh Kumar wrote: > Migrate asm9260 driver to the new 'set-state' interface provided by > clockevents core, the earlier 'set-mode' interface is marked obsolete > now. > > This also enables us to implement callbacks for new states of clockevent > devices, for example: ONESHOT_STOPPED. Could you add in the changelog the subtle change with set_mode(RESUME) and this code. As a default the timer was stopped when entering in the set_mode function, now with the new API, this is done explicitly. > Cc: Oleksij Rempel > Signed-off-by: Viresh Kumar > --- [ ... ] > +static int asm9260_timer_shutdown(struct clock_event_device *evt) > { > /* stop timer0 */ > writel_relaxed(BM_C0_EN, priv.base + HW_TCR + CLR_REG); > + return 0; > +} > + > +static int asm9260_timer_set_oneshot(struct clock_event_device *evt) > +{ > + /* stop timer0 */ > + writel_relaxed(BM_C0_EN, priv.base + HW_TCR + CLR_REG); Can you replace this line with a call to asm9260_timer_shutdown ? > + /* enable reset and stop on match */ > + writel_relaxed(BM_MCR_RES_EN(0) | BM_MCR_STOP_EN(0), > + priv.base + HW_MCR + SET_REG); > + return 0; > +} [ ... ] > +static int asm9260_timer_set_periodic(struct clock_event_device *evt) > +{ > + /* stop timer0 */ > + writel_relaxed(BM_C0_EN, priv.base + HW_TCR + CLR_REG); idem. Thanks -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog From mboxrd@z Thu Jan 1 00:00:00 1970 From: daniel.lezcano@linaro.org (Daniel Lezcano) Date: Tue, 30 Jun 2015 10:25:12 +0200 Subject: [PATCH 01/41] clocksource: asm9260: Migrate to new 'set-state' interface In-Reply-To: <57ae9434bbb7218961c3ad45a26fbe1fffe40cbd.1434622147.git.viresh.kumar@linaro.org> References: <57ae9434bbb7218961c3ad45a26fbe1fffe40cbd.1434622147.git.viresh.kumar@linaro.org> Message-ID: <55925268.4050109@linaro.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 06/18/2015 12:54 PM, Viresh Kumar wrote: > Migrate asm9260 driver to the new 'set-state' interface provided by > clockevents core, the earlier 'set-mode' interface is marked obsolete > now. > > This also enables us to implement callbacks for new states of clockevent > devices, for example: ONESHOT_STOPPED. Could you add in the changelog the subtle change with set_mode(RESUME) and this code. As a default the timer was stopped when entering in the set_mode function, now with the new API, this is done explicitly. > Cc: Oleksij Rempel > Signed-off-by: Viresh Kumar > --- [ ... ] > +static int asm9260_timer_shutdown(struct clock_event_device *evt) > { > /* stop timer0 */ > writel_relaxed(BM_C0_EN, priv.base + HW_TCR + CLR_REG); > + return 0; > +} > + > +static int asm9260_timer_set_oneshot(struct clock_event_device *evt) > +{ > + /* stop timer0 */ > + writel_relaxed(BM_C0_EN, priv.base + HW_TCR + CLR_REG); Can you replace this line with a call to asm9260_timer_shutdown ? > + /* enable reset and stop on match */ > + writel_relaxed(BM_MCR_RES_EN(0) | BM_MCR_STOP_EN(0), > + priv.base + HW_MCR + SET_REG); > + return 0; > +} [ ... ] > +static int asm9260_timer_set_periodic(struct clock_event_device *evt) > +{ > + /* stop timer0 */ > + writel_relaxed(BM_C0_EN, priv.base + HW_TCR + CLR_REG); idem. Thanks -- Daniel -- Linaro.org ? Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog