All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Neuendorffer <stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
Subject: RE: [PATCH 2/2] drivers/amba: probe via device tree
Date: Mon, 23 May 2011 08:00:15 -0700	[thread overview]
Message-ID: <1007bcf2-7786-4f03-bff7-8d8af83939f1@VA3EHSMHS019.ehs.local> (raw)
In-Reply-To: <20110521233558.GA17672-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>



> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org]
> Sent: Saturday, May 21, 2011 4:36 PM
> To: Stephen Neuendorffer
> Cc: Rob Herring; Arnd Bergmann; devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org;
Jeremy Kerr; linux-arm-
> kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> Subject: Re: [PATCH 2/2] drivers/amba: probe via device tree
> 
> On Fri, May 20, 2011 at 09:08:17AM -0700, Stephen Neuendorffer wrote:
> > > That is how it is currently, but the reality is that I only have 1
bus
> > > with both ARM Primecell peripherals and other peripherals which
are
> > > standard platform bus devices. i2c-designware is one example. It
is on
> > > the APB just like the pl011 uart. So do you propose I create a
amba
> > > driver for it? It has no peripheral ID registers, so that may not
even
> > work.
> >
> > Same here.  I don't know what the right solution for it is, but I
find
> > amba_bus
> > solution to get in the way more than help.  I had to hack the
etm/etb
> > driver
> > and the amba_bus to shreds to get it to work for me at all.
> 
> Well then you're doing something totally wrong then.  All you need to
> do to get an amba_device working is provide an apb_clk as a dummy
clock
> if you have no control over it, and declare an amba_device structure
> with the relevant physical base addresses and irq.  There's no need to
> hack anything "to shreds" to get it work work - there's nothing
platform
> specific in drivers/bus/amba.c.
> 
> That is proven by it being used on several ARM dev platforms and
several
> ST Ericsson SoCs - and it's actually ST Ericsson driving the addition
of
> the various new features to the bus level of AMBA.
> 
> So I think you're doing something wrong, rather than there being
anything
> wrong with the code.

To be specific (whether this is 'to shreds' or not, you can decide).

1. amba_bus expects the old ARM primcell ID. The one in the new A9 IP
appears to be different. (b105900d instead of b105f00d)

2. Not only does amba_bus reference apb_pclk, but the driver directly
references emu_src_clk. Neither of these has direct analogs on our
hardware.

3. Implementing the workaround for 2 that you've described requires a
dummy implementation of the 'standard' clock stuff, which is currently
not implemented by mach-xilinx, because we simply haven't needed it. 
Is the right solution here to add more machine-specific code?

4. etm is old, we have ptm and other custom cores, but the driver
combines the etm and etb functionality together. 

OK, some of this is trivial to fix, but some of it isn't.

At this point, I've sortof come full circle.  Since the mainline driver
doesn't solve the problem anyway, we'll probably just look at driving
the
trace hardware from userspace for the moment, until we figure out what
should be exported from a kernelspace driver.

I'm very intrigued by the OMAP strategy that uses platform_bus.  When I
get to return to this, I'll have to look into it in more depth.

Steve



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

WARNING: multiple messages have this Message-ID (diff)
From: stephen.neuendorffer@xilinx.com (Stephen Neuendorffer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] drivers/amba: probe via device tree
Date: Mon, 23 May 2011 08:00:15 -0700	[thread overview]
Message-ID: <1007bcf2-7786-4f03-bff7-8d8af83939f1@VA3EHSMHS019.ehs.local> (raw)
In-Reply-To: <20110521233558.GA17672@n2100.arm.linux.org.uk>



> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
> Sent: Saturday, May 21, 2011 4:36 PM
> To: Stephen Neuendorffer
> Cc: Rob Herring; Arnd Bergmann; devicetree-discuss at lists.ozlabs.org;
Jeremy Kerr; linux-arm-
> kernel at lists.infradead.org
> Subject: Re: [PATCH 2/2] drivers/amba: probe via device tree
> 
> On Fri, May 20, 2011 at 09:08:17AM -0700, Stephen Neuendorffer wrote:
> > > That is how it is currently, but the reality is that I only have 1
bus
> > > with both ARM Primecell peripherals and other peripherals which
are
> > > standard platform bus devices. i2c-designware is one example. It
is on
> > > the APB just like the pl011 uart. So do you propose I create a
amba
> > > driver for it? It has no peripheral ID registers, so that may not
even
> > work.
> >
> > Same here.  I don't know what the right solution for it is, but I
find
> > amba_bus
> > solution to get in the way more than help.  I had to hack the
etm/etb
> > driver
> > and the amba_bus to shreds to get it to work for me at all.
> 
> Well then you're doing something totally wrong then.  All you need to
> do to get an amba_device working is provide an apb_clk as a dummy
clock
> if you have no control over it, and declare an amba_device structure
> with the relevant physical base addresses and irq.  There's no need to
> hack anything "to shreds" to get it work work - there's nothing
platform
> specific in drivers/bus/amba.c.
> 
> That is proven by it being used on several ARM dev platforms and
several
> ST Ericsson SoCs - and it's actually ST Ericsson driving the addition
of
> the various new features to the bus level of AMBA.
> 
> So I think you're doing something wrong, rather than there being
anything
> wrong with the code.

To be specific (whether this is 'to shreds' or not, you can decide).

1. amba_bus expects the old ARM primcell ID. The one in the new A9 IP
appears to be different. (b105900d instead of b105f00d)

2. Not only does amba_bus reference apb_pclk, but the driver directly
references emu_src_clk. Neither of these has direct analogs on our
hardware.

3. Implementing the workaround for 2 that you've described requires a
dummy implementation of the 'standard' clock stuff, which is currently
not implemented by mach-xilinx, because we simply haven't needed it. 
Is the right solution here to add more machine-specific code?

4. etm is old, we have ptm and other custom cores, but the driver
combines the etm and etb functionality together. 

OK, some of this is trivial to fix, but some of it isn't.

At this point, I've sortof come full circle.  Since the mainline driver
doesn't solve the problem anyway, we'll probably just look at driving
the
trace hardware from userspace for the moment, until we figure out what
should be exported from a kernelspace driver.

I'm very intrigued by the OMAP strategy that uses platform_bus.  When I
get to return to this, I'll have to look into it in more depth.

Steve



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

  parent reply	other threads:[~2011-05-23 15:00 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 18:28 [PATCH v2 0/2] amba bus device tree probing Rob Herring
2011-05-19 18:28 ` Rob Herring
     [not found] ` <1305829704-11774-1-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-05-19 18:28   ` [PATCH 1/2] dt: check for devices already created fron DT scan Rob Herring
2011-05-19 18:28     ` Rob Herring
     [not found]     ` <1305829704-11774-2-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-05-19 19:54       ` Grant Likely
2011-05-19 19:54         ` Grant Likely
2011-05-19 18:28   ` [PATCH 2/2] drivers/amba: probe via device tree Rob Herring
2011-05-19 18:28     ` Rob Herring
     [not found]     ` <1305829704-11774-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-05-19 20:01       ` Grant Likely
2011-05-19 20:01         ` Grant Likely
     [not found]         ` <20110519200158.GW5109-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-05-19 23:30           ` Rob Herring
2011-05-19 23:30             ` Rob Herring
2011-05-19 23:39             ` Grant Likely
2011-05-19 23:39               ` Grant Likely
     [not found]               ` <20110519233958.GB18181-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-05-20 13:24                 ` Rob Herring
2011-05-20 13:24                   ` Rob Herring
     [not found]                   ` <4DD66B8A.5040404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-05-20 14:21                     ` Arnd Bergmann
2011-05-20 14:21                       ` Arnd Bergmann
     [not found]                       ` <201105201621.03801.arnd-r2nGTMty4D4@public.gmane.org>
2011-05-20 15:17                         ` Rob Herring
2011-05-20 15:17                           ` Rob Herring
     [not found]                           ` <4DD68614.6090209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-05-20 16:08                             ` Stephen Neuendorffer
2011-05-20 16:08                               ` Stephen Neuendorffer
2011-05-21 17:42                               ` Grant Likely
2011-05-21 17:42                                 ` Grant Likely
2011-05-21 23:47                                 ` Russell King - ARM Linux
2011-05-21 23:47                                   ` Russell King - ARM Linux
2011-05-21 23:47                                   ` Russell King - ARM Linux
2011-05-22 10:00                                   ` Rafael J. Wysocki
2011-05-22 10:00                                     ` Rafael J. Wysocki
2011-05-22 10:00                                     ` Rafael J. Wysocki
2011-05-22 15:46                                   ` Rob Herring
2011-05-22 15:46                                     ` Rob Herring
2011-05-22 15:46                                     ` Rob Herring
2011-05-23 15:23                                   ` Grant Likely
2011-05-23 15:23                                     ` Grant Likely
2011-05-22 10:03                                 ` Arnd Bergmann
2011-05-22 10:03                                   ` Arnd Bergmann
2011-05-22 10:03                                   ` Arnd Bergmann
2011-05-25  9:03                                   ` Linus Walleij
2011-05-25  9:03                                     ` Linus Walleij
2011-05-23  9:37                                 ` Kristoffer Glembo
2011-05-23  9:37                                   ` Kristoffer Glembo
2011-05-23  9:37                                   ` Kristoffer Glembo
2011-05-23  9:58                                   ` Russell King - ARM Linux
2011-05-23  9:58                                     ` Russell King - ARM Linux
2011-05-23 15:09                                     ` Grant Likely
2011-05-23 15:09                                       ` Grant Likely
2011-05-23 15:09                                       ` Grant Likely
2011-05-24 15:03                                       ` Rob Herring
2011-05-24 15:03                                         ` Rob Herring
2011-05-24 15:03                                         ` Rob Herring
2011-05-25  3:02                                         ` Shawn Guo
2011-05-25  3:02                                           ` Shawn Guo
2011-05-25  3:02                                           ` Shawn Guo
2011-05-25  9:07                                         ` Linus Walleij
2011-05-25  9:07                                           ` Linus Walleij
     [not found]                               ` <a42f0c27-2811-4b68-bedf-7dfaa7bff6ff-+Ck8Kgl/v0/6UOWq+LNw4LjjLBE8jN/0@public.gmane.org>
2011-05-21 23:35                                 ` Russell King - ARM Linux
2011-05-21 23:35                                   ` Russell King - ARM Linux
     [not found]                                   ` <20110521233558.GA17672-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-05-23 15:00                                     ` Stephen Neuendorffer [this message]
2011-05-23 15:00                                       ` Stephen Neuendorffer
     [not found]                                       ` <1007bcf2-7786-4f03-bff7-8d8af83939f1-+Ck8Kgl/v0+GljRhoabY2LjjLBE8jN/0@public.gmane.org>
2011-05-23 15:47                                         ` Russell King - ARM Linux
2011-05-23 15:47                                           ` Russell King - ARM Linux
2011-05-21  4:00                             ` Segher Boessenkool
2011-05-21  4:00                               ` Segher Boessenkool
     [not found]                               ` <80f20ac921a33e9f0bf3e249f539a8ef-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2011-05-21 14:55                                 ` Rob Herring
2011-05-21 14:55                                   ` Rob Herring
     [not found]                                   ` <4DD7D24D.2070604-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-05-21 15:18                                     ` Segher Boessenkool
2011-05-21 15:18                                       ` Segher Boessenkool
     [not found]                                       ` <ad5605c2a3d4b36f63f36f52afe89cfd-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org>
2011-05-21 17:43                                         ` Grant Likely
2011-05-21 17:43                                           ` Grant Likely

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=1007bcf2-7786-4f03-bff7-8d8af83939f1@VA3EHSMHS019.ehs.local \
    --to=stephen.neuendorffer-gjffaj9ahvfqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.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.