lkml.org 
[lkml]   [2012]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCHv3 5/7] dmaengine: dw_dmac: add PCI part of the driver
From
On Thu, Sep 27, 2012 at 1:32 PM, Vinod Koul <vinod.koul@linux.intel.com> wrote:
> On Thu, 2012-09-27 at 15:41 +0530, viresh kumar wrote:
>> On Thu, Sep 27, 2012 at 3:31 PM, Vinod Koul <vinod.koul@linux.intel.com> wrote:
>> > Let me try again.
>> >
>> > what does it take to do platform and PCI driver for this:
>> > 1. make dma h/w access (read/write) platform independent. which you have
>> > already done
>> > 2. Device registration: Create two probes, or use common probe.
>> > You smartly chose the second one BUT by creating another device.
>> > If you look closely at the probe then I would say it would be easy to
>> > create library for probe which can be used across both pci and platform
>> > driver probes. The probe library which initializes driver and registers
>> > with dmaengine needs device struct and resources can be provided by each
>> > probe.
>>
>> Or in other words... create three files
>> - dw_dmac.c
>> - dw_dmac-pltfm.c
>> - dw_dmac-pci.c...
>>
>> Don't do anything specific to platform or pci in dw_dmac.c...
>> Keep pltfm and pci files to smallest possible size, and keep as much of
>> common part in dmac.c...
>>
>> Similar is done in drivers/mmc/host/sdhci*...
> Yes that IMHO would be simpler approach :)
Oh, thanks, I got the idea. Will implement soon.

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2012-10-03 16:21    [W:0.176 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site