Re: [PATCHv3 5/7] dmaengine: dw_dmac: add PCI part of the driver

From: Andy Shevchenko
Date: Thu Sep 27 2012 - 04:08:33 EST


On Thu, Sep 27, 2012 at 10:49 AM, Felipe Balbi <balbi@xxxxxx> wrote:
> On Thu, Sep 27, 2012 at 10:31:59AM +0300, Andy Shevchenko wrote:
>> From: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
>>
>> This is the PCI part of the DesignWare DMAC driver. The controller is usually
>> used in the Intel hardware such as Medfield.


>> --- /dev/null
>> +++ b/drivers/dma/dw_dmac_pci.c
>> @@ -0,0 +1,126 @@
>> +/*
>> + * PCI driver for the Synopsys DesignWare DMA Controller
>> + *
>> + * Copyright (C) 2012 Intel Corporation
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License version 2 as
>> + * published by the Free Software Foundation.
>> + */
>> +
>> +#include <linux/module.h>
>> +#include <linux/pci.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/dw_dmac.h>
>> +
>> +static struct dw_dma_platform_data pdata = {
>
> "pdata" looks like it wants a prefix.
Okay.

>> + .is_private = 1,
>> + .chan_allocation_order = CHAN_ALLOCATION_ASCENDING,
>> + .chan_priority = CHAN_PRIORITY_ASCENDING,
>> +};
>
> This is the same for all of the PCI IDs listed below, looks like it's
> best to just add it as platform_data of the dwc_dmac device directly,
> rather than passing a pointer to this via driver->data.
It potentially could be altered. I prefer to leave it as structure in
the pci driver.

>> + static int instance;
> this could be a IDA instead.
Will look at it, thanks.

--
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/