public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* questions about drivers/dma/amba-pl08x.c
@ 2012-04-10  7:30 Kassey Lee
  2012-04-10  8:32 ` Linus Walleij
  0 siblings, 1 reply; 7+ messages in thread
From: Kassey Lee @ 2012-04-10  7:30 UTC (permalink / raw)
  To: linux-arm-kernel

hi, Linus, Walleij:

             I found the dma controller driver for amba-pl08x.
             may i have two questions for you ? Thank you very much!

             1) how to add the devices resource for this driver ? i
did not find any info in the kernel but this driver.
             2) in the below function, if the slave is set true,
kernel will panic, because slave_channels is NULL, and nobody
initialize this member, should this member be initialized by vendor ?


static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x,
                struct dma_device *dmadev, unsigned int channels, bool slave)
{
        struct pl08x_dma_chan *chan;
        int i;

        INIT_LIST_HEAD(&dmadev->channels);

        /*
         * Register as many many memcpy as we have physical channels,
         * we won't always be able to use all but the code will have
         * to cope with that situation.
         */
        for (i = 0; i < channels; i++) {
                chan = kzalloc(sizeof(*chan), GFP_KERNEL);
                if (!chan) {
                        dev_err(&pl08x->adev->dev,
                                "%s no memory for channel\n", __func__);
                        return -ENOMEM;
                }

                chan->host = pl08x;
                chan->state = PL08X_CHAN_IDLE;

                if (slave) {
                        chan->cd = &pl08x->pd->slave_channels[i];
                        pl08x_dma_slave_init(chan);
                } else {

-- 
Best regards
Kassey

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-04-11  8:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10  7:30 questions about drivers/dma/amba-pl08x.c Kassey Lee
2012-04-10  8:32 ` Linus Walleij
2012-04-10  8:32   ` Viresh Kumar
2012-04-10  9:22     ` Viresh Kumar
2012-04-10  8:35   ` Russell King - ARM Linux
2012-04-10 10:42   ` Kassey Lee
2012-04-11  8:19     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox