Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v9 1/1] PRUSS UIO driver support
Date: Tue, 8 Mar 2011 11:34:59 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1103081133510.2787@localhost6.localdomain6> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB593024C008B02@dbde02.ent.ti.com>

On Fri, 4 Mar 2011, TK, Pratheesh Gangadhar wrote:

> Hi,
> > -----Original Message-----
> > From: Arnd Bergmann [mailto:arnd at arndb.de]
> > Sent: Thursday, March 03, 2011 11:46 PM
> > On Thursday 03 March 2011 19:07:57 Pratheesh Gangadhar wrote:
> > > +struct uio_pruss_dev {
> > > +       struct uio_info *info;
> > > +       struct clk *pruss_clk;
> > > +       dma_addr_t sram_paddr;
> > > +       dma_addr_t ddr_paddr;
> > > +       void __iomem *prussio_vaddr;
> > > +       void *sram_vaddr;
> > > +       void *ddr_vaddr;
> > > +       unsigned int hostirq_start;
> > > +       unsigned int pintc_base;
> > > +};
> > > +
> > > +struct pruss_priv {
> > > +       struct uio_pruss_dev *pupdev;
> > > +};
> > 
> > I cannot see the point of struct pruss_priv, I think it would be better to
> > just merge the two data structures into one. Everything else looks
> > good to me now.
> 
> pruss_priv is needed to get access to uio_pruss_dev from uio_info *info in
> UIO interrupt handler (pruss_handler) and shall be per interrupt entry.
> 
> +static irqreturn_t pruss_handler(int irq, struct uio_info *info) {
> +	struct pruss_priv *priv = info->priv;
> +	struct uio_pruss_dev *gdev = priv->pupdev;
> 
> Note that info is a pointer to array supporting 8 interrupts. This allows to
> redirect to driver structure via info->priv quickly.

struct uio_pruss_dev *dev = container_of(info, struct uio_pruss_dev, info);

Perhaps ?

Thanks,

	tglx

  reply	other threads:[~2011-03-08 10:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 18:07 [PATCH v9 0/1] Add PRUSS UIO driver support Pratheesh Gangadhar
2011-03-03 18:07 ` [PATCH v9 1/1] " Pratheesh Gangadhar
2011-03-03 18:15   ` Arnd Bergmann
2011-03-04  3:25     ` TK, Pratheesh Gangadhar
2011-03-08 10:34       ` Thomas Gleixner [this message]
2011-03-08 13:24         ` Arnd Bergmann
2011-03-08 15:01           ` Thomas Gleixner
2011-03-04  4:40     ` TK, Pratheesh Gangadhar

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=alpine.LFD.2.00.1103081133510.2787@localhost6.localdomain6 \
    --to=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox