[PATCH v9 1/1] PRUSS UIO driver support
From: TK, Pratheesh Gangadhar <hidden>
Date: 2011-03-04 03:25:58
Also in:
lkml
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:quoted
+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.
Thanks,
Pratheesh