[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHTX3dJLa3e_za-wx8VY9FWqc-GMe_hB-hwzOZqyP-u3hD=3Mw@mail.gmail.com>
Date: Mon, 10 Dec 2012 08:34:15 +0100
From: Michal Simek <monstr@...str.eu>
To: Grant Likely <grant.likely@...retlab.ca>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-arm <linux-arm-kernel@...ts.infradead.org>,
Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
linux-arch@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
John Linn <John.Linn@...inx.com>,
John Williams <jwilliams@...inx.com>, linux-pci@...r.kernel.org
Subject: Re: Sharing PCIE driver between Microblaze and Arm zynq
2012/12/7 Grant Likely <grant.likely@...retlab.ca>:
> On Fri, 07 Dec 2012 10:45:01 +0100, Michal Simek <monstr@...str.eu> wrote:
>> On 12/06/2012 10:27 PM, Bjorn Helgaas wrote:
>> > [+cc linux-pci]
>> >
>> > On Thu, Dec 6, 2012 at 7:23 AM, Michal Simek <michal.simek@...inx.com> wrote:
>> >> Hi guys,
>> >>
>> >> I have a question regarding to sharing generic OF pcie driver between
>> >> two architectures MB and ARM Zynq.
>> >> Is drivers/pci/pcie location good for it?
>> >> Make no sense to have the same driver in two locations.
>> >
>> > I think you're talking about a PCI host bridge driver. It would
>> > definitely be nice to move toward a generic, shared driver. Host
>> > bridge drivers are responsible for enumerating the PCI hierarchy below
>> > the bridge. Enumeration is not really PCIe-specific, so I wouldn't
>> > put it in drivers/pci/pcie.
>>
>> Not a PCI expert, just trying to find out the proper location for this shared driver.
>>
>>
>> >> Is using readl/writel IO functions in this driver the best option
>> >> which we can have?
>> >> Or is there any other recommendation?
>> >
>> > I'm not really a driver person, but if you're writing a new driver,
>> > wouldn't you use the iomap interfaces (ioremap(), ioread32(), etc)
>> > rather than readl()?
>>
>> That driver exists but it is not in mainline and it is better to directly
>> add it to proper location with correct io functions.
>> The question is if ioread/iowrite functions are correct one.
>> PowerPC io-defs.h suggests that readl/writel should be used for PCI.
>>
>>
>> >> Also just want to check if it is correct to use pcie device_type.
>> >
>> > I don't know what you're asking here. Can you elaborate or give a
>> > specific example?
>>
>> If node property device_type pcie should be used.
>> device_type = "pcie";
>>
>> For pci it is device_type = "pci";
>> For network it is device_type = "network"
>> the same for serial, watchdogs.
>>
>> Do we have any list of device_types which we should use?
>
> Don't use them unless a binding requires it. PCI address lookup code
> uses it, so we put it in those nodes. Otherwise device_type is
> deprecated and has been for a long time now. You should not be using it
> in .dts files.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists