From: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <robh+dt@kernel.org>,
<pawel.moll@arm.com>, <mark.rutland@arm.com>,
<ijc+devicetree@hellion.org.uk>, <galak@codeaurora.org>,
<rdunlap@infradead.org>, <linux@arm.linux.org.uk>,
<daniel.lezcano@linaro.org>, <tglx@linutronix.de>,
<thierry.reding@gmail.com>, <florian.vaussard@epfl.ch>,
<jic23@kernel.org>, <jason@lakedaemon.net>, <andrew@lunn.ch>,
<silvio.fricke@gmail.com>, <heiko.stuebner@bq.com>,
<olof@lixom.net>, <sebastian.hesselbarth@gmail.com>,
<sboyd@codeaurora.org>, <gregory.clement@free-electrons.com>,
<arnd@arndb.de>, <robherring2@gmail.com>, <marc.zyngier@arm.com>,
<maxime.ripard@free-electrons.com>, <devicetree@vger.kernel.org>,
<linux-doc@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v4 1/6] clocksource: Add support for the Mediatek SoCs
Date: Wed, 14 May 2014 10:29:38 -0700 [thread overview]
Message-ID: <2fe960fd-b145-42a8-ace2-e2cd3aaf0cdc@BN1AFFO11FD010.protection.gbl> (raw)
In-Reply-To: <1400087579-4250-2-git-send-email-matthias.bgg@gmail.com>
Hi Matthias,
just a few suggestions below. Nothing serious.
On Wed, 2014-05-14 at 07:12PM +0200, Matthias Brugger wrote:
> This patch adds a clock source and clock event for the timer found
> on the Mediatek SoCs.
>
> The Mediatek General Porpose Timer block provides five 32 bit timers and
> one 64 bit timer.
>
> Two 32 bit timers are used:
> TIMER1: clock events supporting periodic and oneshot events
> TIMER2: clock source configured as a free running counter
It is pretty common, I think, to use the free running counter also as
sched_clock. You probably want to look into this, but that's just a
possible enhancement.
[...]
> +static void __init mtk_timer_init(struct device_node *node)
> +{
> + struct mtk_clock_event_device *evt;
> + struct resource res;
> + unsigned long rate = 0;
> + struct clk *clk;
> + int ret;
> + u32 val;
> +
> + evt = kzalloc(sizeof(*evt), GFP_KERNEL);
> + if (!evt)
> + panic("Can't allocate mtk clock event driver struct");
I'm not that sure about the A7s, but on Cortex-A9 there is also a global
timer which can be used for timing. And there might be other timing
options for this SOC too. Do you really want to panic?
Sören
next prev parent reply other threads:[~2014-05-14 17:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-14 17:12 [PATCH v4 0/6] arm: Add basic support for Mediatek Cortex-A7 SoCs Matthias Brugger
2014-05-14 17:12 ` [PATCH v4 1/6] clocksource: Add support for the Mediatek SoCs Matthias Brugger
2014-05-14 17:29 ` Sören Brinkmann [this message]
2014-05-14 17:12 ` [PATCH v4 2/6] dt-bindings: add mtk-timer bindings Matthias Brugger
2014-05-14 17:44 ` Sören Brinkmann
2014-05-14 17:12 ` [PATCH v4 3/6] vendor-prefixes: add prefix for Mediaktek Inc Matthias Brugger
2014-05-14 17:12 ` [PATCH v4 4/6] arm: add basic support for Mediatek MT6589 boards Matthias Brugger
2014-05-14 17:12 ` [PATCH v4 5/6] dt-bindings: add documentation for Mediatek SoC Matthias Brugger
2014-05-14 17:12 ` [PATCH v4 6/6] arm: mediatek: add dts for Aquaris5 mobile phone Matthias Brugger
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=2fe960fd-b145-42a8-ace2-e2cd3aaf0cdc@BN1AFFO11FD010.protection.gbl \
--to=soren.brinkmann@xilinx.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=florian.vaussard@epfl.ch \
--cc=galak@codeaurora.org \
--cc=gregory.clement@free-electrons.com \
--cc=heiko.stuebner@bq.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jason@lakedaemon.net \
--cc=jic23@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=maxime.ripard@free-electrons.com \
--cc=olof@lixom.net \
--cc=pawel.moll@arm.com \
--cc=rdunlap@infradead.org \
--cc=robh+dt@kernel.org \
--cc=robherring2@gmail.com \
--cc=sboyd@codeaurora.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=silvio.fricke@gmail.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
/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
all inboxes | Powered by JetHome®