From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751562AbdB1ReR (ORCPT ); Tue, 28 Feb 2017 12:34:17 -0500 Received: from mx2.suse.de ([195.135.220.15]:53071 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751026AbdB1ReO (ORCPT ); Tue, 28 Feb 2017 12:34:14 -0500 Subject: Re: [PATCH v3 05/25] clocksource: owl: Add S900 support To: Daniel Lezcano References: <20170228063535.32069-1-afaerber@suse.de> <20170228063535.32069-6-afaerber@suse.de> Cc: arm@kernel.org, support@lemaker.org, linux-kernel@vger.kernel.org, mp-cs@actions-semi.com, 96boards@ucrobotics.com, Thomas Gleixner , linux-arm-kernel@lists.infradead.org From: =?UTF-8?Q?Andreas_F=c3=a4rber?= Organization: SUSE Linux GmbH Message-ID: <6fffb7b4-6346-ffb2-ba2c-d6feed0e1294@suse.de> Date: Tue, 28 Feb 2017 18:16:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170228063535.32069-6-afaerber@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Daniel, Am 28.02.2017 um 07:35 schrieb Andreas Färber: > The Actions Semi S900 SoC provides four 32-bit timers, TIMER0/1/2/3, > but no 2Hz timers. > > Deal with the S500 having less timers. > > An S900 datasheet can be found in 96Boards documentation: > https://github.com/96boards/documentation/blob/master/ConsumerEdition/Bubblegum-96/HardwareDocs/SoC_bubblegum96.pdf > > Signed-off-by: Andreas Färber [...] > @@ -126,10 +127,20 @@ static irqreturn_t owl_timer1_interrupt(int irq, void *dev_id) > static const struct owl_timer_info s500_timer_info = { > .timer_offset[0] = 0x08, > .timer_offset[1] = 0x14, > + .timer_offset[2] = -1, > + .timer_offset[3] = -1, > +}; > + > +static const struct owl_timer_info s900_timer_info = { > + .timer_offset[0] = 0x08, > + .timer_offset[1] = 0x14, > + .timer_offset[2] = 0x30, > + .timer_offset[3] = 0x3c, > }; I noticed later that the S900 manual describes TIMER2/3 as "used only in Secure mode". My driver code resetting them seems to work though. Should we just drop these extra timer initializations then to make the driver simpler and more performant again? I'd still like to keep the two compatible strings in the DT though, and we may want to disable the 2Hz timers on S500 just in case. Regards, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg)