[PATCH v3 3/6] remoteproc: pru: Add support for PRU specific interrupt configuration

Grzegorz Jaszczyk grzegorz.jaszczyk at linaro.org
Tue Dec 8 09:03:32 EST 2020


Hi Mathieu

On Mon, 7 Dec 2020 at 18:37, Mathieu Poirier <mathieu.poirier at 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



More information about the linux-arm-kernel mailing list