linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Thomas Gleixner <tglx@linutronix.de>, Roman Volkov <v1ron@mail.ru>
Cc: arm@kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Alexey Charkov <alchark@gmail.com>,
	Roman Volkov <rvolkov@v1ros.org>,
	Tony Prisk <linux@prisktech.co.nz>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Bill Gatliff <bgat@billgatliff.com>
Subject: Re: [PATCH v2 RESEND 1/3] clocksource/vt8500: Use MIN_OSCR_DELTA from PXA
Date: Fri, 01 Jan 2016 21:23:48 +0100	[thread overview]
Message-ID: <871ta1f3qj.fsf@belgarion.home> (raw)
In-Reply-To: <20160101023208.7721e085@v1ron-s7> (Roman Volkov's message of "Fri, 1 Jan 2016 02:32:08 +0300")

Roman Volkov <v1ron@mail.ru> writes:

> В Thu, 31 Dec 2015 23:33:45 +0100 (CET)
> Thomas Gleixner <tglx@linutronix.de> пишет:
>
>> Roman,
>> 
>> On Thu, 31 Dec 2015, Roman Volkov wrote:
>> > Since vt8500 and PXA timers are identical, use MIN_OSCR_DELTA from
>> > PXA, which is bigger than existing value. It is required to
>> > determine the minimum delay which hardware can generate.  
>> 
>> Now that brings up the obvious question:
>> 
>> If the vt8500 and PXA timers are identical why has vt8500 it's own
>> slightly different implementation and does not use the PXA timer?
>
> Thomas,
>
> I occasionally noticed that the PXA can be reused, when working on the
> bugfix for vt8500. Another good question would be how exactly this code
> can be reused. We may rework PXA driver to make it working under
> vt8500, or include the C code from the vt8500 and get two slightly
> different modules. You may look at our previous discussion with Alexey:
>
> https://lkml.org/lkml/2015/12/21/437
>
> Adding Robert and Bill to get more opinions. At this step, fixing the
> vt8500 nanosleep bug is a priority.

Personnaly I'm not very thrilled by combining pxa and vt8500 drivers into one.

The rationale I have behind is that :
 - the new driver will have new ifs to switch form vt8500 to pxa
   For example, suspend/resume functions will be different.
   Moreover in order to not impact the pxa runtime some ifs will be necessary
   (will that be if (IS_ENABLED(CONFIG_ARCH_PXA) && ...)
 - the IPs do not look that similar to me
   They seems inter-operable, but that seems to me to be just because of the 3
   common register placement : register at match (@0x00), counter (@0x10) and
   interrupt enabled (@0x1c).
   The register acces semantics are different (vt8500 needs a bit to access),
   the input clock seems different.

For ~140 lines of code, I prefer the simplicity brought by drivers
separation. The diffstat should be pretty equivalent between 2 drivers and 1
combined driver with many ifs.

Cheers.

-- 
Robert

  reply	other threads:[~2016-01-01 20:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-31 18:02 [PATCH v2 RESEND 0/3] clocksource/vt8500: Fix hangs in small delays Roman Volkov
2015-12-31 18:02 ` [PATCH v2 RESEND 1/3] clocksource/vt8500: Use MIN_OSCR_DELTA from PXA Roman Volkov
2015-12-31 22:33   ` Thomas Gleixner
2015-12-31 23:32     ` Roman Volkov
2016-01-01 20:23       ` Robert Jarzmik [this message]
2016-01-01  9:58   ` Thomas Gleixner
2015-12-31 18:02 ` [PATCH v2 RESEND 2/3] clocksource/vt8500: Remove the 'loops' variable Roman Volkov
2015-12-31 18:02 ` [PATCH v2 RESEND 3/3] clocksource/vt8500: Add register R/W functions Roman Volkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871ta1f3qj.fsf@belgarion.home \
    --to=robert.jarzmik@free.fr \
    --cc=alchark@gmail.com \
    --cc=arm@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bgat@billgatliff.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@prisktech.co.nz \
    --cc=rvolkov@v1ros.org \
    --cc=tglx@linutronix.de \
    --cc=v1ron@mail.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).