All of lore.kernel.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: mvebu: tclk detection for armada-xp and marvell packet processor with integrated CPU
Date: Mon, 17 Nov 2014 09:34:37 +0100	[thread overview]
Message-ID: <20141117093437.0ca5a3ef@free-electrons.com> (raw)
In-Reply-To: <546959A3.9040206@alliedtelesis.co.nz>

Dear Chris Packham,

On Mon, 17 Nov 2014 02:12:51 +0000, Chris Packham wrote:

> One of the first problems I encountered looking at the Marvell Packet 
> Processor with integrated CPU (I'll refer to that as 'the PP' throughout 
> the rest of this email) was that it has a different TCLK to the armada-xp.
> 
> It appears that for both the PP and the armada-xp the TCLK is hard-coded 
> (to 200MHz and 250MHz respectively) and cannot be detected as far as I 
> can see from the various data-sheets. I was hoping to re-use 
> drivers/clk/mvebu/armada-xp.c but I need to figure out how to make 
> axp_get_tclk_freq() give me an appropriate answer depending on the SoC. 
> If this were in the mach-mvebu code I could just use mvebu_get_soc_id() 
> to fetch the device id. Is there an equivalent I could use in generic code?
> 
> One option would be to use a different compatible string in the dts. 
> That would also give me a way of handling other differences (the 
> clock-gating is a subset of what's available on the armada-xp). How 
> different would things have to be before it's worth spinning the PP code 
> out into a file of it's own?

To me, it indeed seems like you need a different compatible string
here. Whether a separate file from drivers/clk/mvebu/armada-xp.c is
needed or not will depend on whether only the tclk frequency differs,
or whether also the ratios with other clocks differ.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-11-17  8:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17  2:12 mvebu: tclk detection for armada-xp and marvell packet processor with integrated CPU Chris Packham
2014-11-17  8:34 ` Thomas Petazzoni [this message]
2014-11-17 14:18   ` Andrew Lunn
2014-11-17 20:18     ` Chris Packham
2014-11-17 21:32       ` Andrew Lunn
2014-11-17 20:14   ` Chris Packham
2014-11-17 21:55     ` Andrew Lunn
2014-11-17 22:07       ` Chris Packham
2014-11-18  0:39         ` Marcin Wojtas

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=20141117093437.0ca5a3ef@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.