From: Linus WALLEIJ on
[Dan]

> What happens when two primecell dma devices are present on one soc?
> Can that happen?

Of course it can happen. In theory... There is no such system that
I'm aware of.

Peter's PL08x driver even model the PL08x as a singleton, i.e. a
static struct in the driver file.

> In that case we'll have conflicting providers of
> dma_set_ambaconfig().

Yes...

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Linus WALLEIJ on
[Dan]

> >> +void dma_set_ambaconfig(struct dma_chan *chan,
> >> + � � � � � � � � � � � struct amba_dma_channel_config *config)
> >
> > What happens when two primecell dma devices are present on one soc?
> > Can that happen? �In that case we'll have conflicting providers of
> > dma_set_ambaconfig().
> >
>
> ...the ->device_control() method is already approaching an ioctl()
> let's just add the argument parameter to complete the capability,
> i.e.:
>
> int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
> unsigned long arg);

So the unsigned long arg is to match an ioctl? Okidoki...

If it was only for in-kernel use a void* would be preferred
I believe since assuming unsigned long to be == bus width
is ... well, disturbing, since we'll be casting this into
a struct pointer.

So this should also be used for the AMBA configuration stuff
then, so I have to make first a patch to convert all the
device_control functions and then a patch on top of that to
implement the AMBA call as a device_control() thingie?

(Should work out...)

Just a bit of work, so will take some more hours :-)

I will just have to make a proof-of-concept for the AMBA config
interface for Russell first, then I'll be on the ioctl-like API.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/