lkml.org 
[lkml]   [2020]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 3/6] remoteproc: pru: Add support for PRU specific interrupt configuration
Hi Mathieu

On Mon, 7 Dec 2020 at 18:37, Mathieu Poirier <mathieu.poirier@linaro.org> wrote:

[...]

> > +static int pru_handle_intrmap(struct rproc *rproc)
> > +{
> > + struct device *dev = rproc->dev.parent;
> > + struct pru_rproc *pru = rproc->priv;
> > + struct pru_irq_rsc *rsc = pru->pru_interrupt_map;
> > + struct irq_fwspec fwspec;
> > + struct device_node *irq_parent;
> > + int i, ret = 0;
> > +
> > + /* not having pru_interrupt_map is not an error */
> > + if (!rsc)
> > + return 0;
> > +
> > + /* currently supporting only type 0 */
> > + if (rsc->type != 0) {
> > + dev_err(dev, "unsupported rsc type: %d\n", rsc->type);
> > + return -EINVAL;
> > + }
> > +
> > + if (rsc->num_evts > MAX_PRU_SYS_EVENTS)
> > + return -EINVAL;
> > +
> > + if (sizeof(*rsc) + rsc->num_evts * sizeof(struct pruss_int_map) !=
> > + pru->pru_interrupt_map_sz)
> > + return -EINVAL;
> > +
> > + pru->evt_count = rsc->num_evts;
> > + pru->mapped_irq = kcalloc(pru->evt_count, sizeof(int), GFP_KERNEL);
>
> sizeof(unsigned int)

Sure, I will post v4 addressing this comment and sorry for missing that.

Thank you,
Grzegorz

\
 
 \ /
  Last update: 2020-12-08 15:07    [W:0.074 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site