public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: gerg@snapgear•com (Greg Ungerer)
To: linux-arm-kernel@lists•infradead.org
Subject: Freescale fec.c driver breakage
Date: Tue, 5 Jun 2012 22:36:30 +1000	[thread overview]
Message-ID: <4FCDFD4E.1000906@snapgear.com> (raw)
In-Reply-To: <20120605122444.GS23408@opensource.wolfsonmicro.com>

On 06/05/2012 10:24 PM, Mark Brown wrote:
> On Tue, Jun 05, 2012 at 10:17:02PM +1000, Greg Ungerer wrote:
>> On 06/05/2012 07:41 PM, Mark Brown wrote:
>
>>> Yes, if it's a reusable IP then it's going to have a fixed set of clocks
>>> which go into it regardless of which platform it's hooked up to.
>
>> I really don't think you can make that assumption here. Freescale have
>> come up with a number of weird and slightly different permutations of
>> this ethernet core.
>
> That's just sounding like a standard "driver needs to take care of chip
> revisions" thing though?
 >
>>> clkdev
>>> provides an abstraction which can map these onto the platform, even if
>>> you don't use the generic clk API clkdev is still very useful and will
>>> help with a lot of these issues.
>
>> In this specific case I don't know what the ipg or ahb clocks are on iMX
>> (Sascha?), but there is nothing equivalent to them in the FEC cores used
>> on existing ColdFire CPUs. They seem to be platform specific (iMX) more
>> than FEC driver specific.
>
> It's possible both are just always on in the ColdFire systems, at least
> when Linux is running.  The AHB will be the I/O bus for the device (AHB
> is a standard for interfacing between IPs) and I suspect IPG is the main
> clock for the IP, both of which sound like they will always be there
> even if there's no soft control of them.

I am pretty sure AHB was bolted on later. This FEC core has progressed
from very old Motorola PowerPC platforms to ColdFire/M68k to ARM, over
something coming close to a 20 year period. In the earlier uses of it
there is quite a few differences (including some quite odd register
layout differences).

There may be other things that are somewhat like an ahb clock and ipg
clock, but really these are things that have come along later with a
specific platform implementation.


> FWIW I'm about to send a patch which will make devm_clk_get() available
> with HAVE_CLK, though it would still be good to start looking at moving
> ColdFire to the common clock infrastructure.

Sure, agreed.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     gerg at snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close,                            FAX:         +61 7 3891 3630
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com

  reply	other threads:[~2012-06-05 12:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04  4:42 Freescale fec.c driver breakage Greg Ungerer
2012-06-04  8:19 ` Sascha Hauer
2012-06-04  9:16   ` Mark Brown
2012-06-05  6:55     ` Greg Ungerer
2012-06-05  9:41       ` Mark Brown
2012-06-05 12:17         ` Greg Ungerer
2012-06-05 12:24           ` Mark Brown
2012-06-05 12:36             ` Greg Ungerer [this message]
2012-06-05 12:40               ` Mark Brown
2012-06-05 12:48           ` Sascha Hauer
2012-06-05 13:24             ` Greg Ungerer
2012-06-05 13:41               ` Mark Brown
2012-06-05 14:35                 ` Steven King
2012-06-06  7:41                   ` Greg Ungerer
2012-06-07 23:36                     ` Mark Brown
2012-06-05 13:42               ` Sascha Hauer

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=4FCDFD4E.1000906@snapgear.com \
    --to=gerg@snapgear$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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