From mboxrd@z Thu Jan 1 00:00:00 1970 From: jgunthorpe@obsidianresearch.com (Jason Gunthorpe) Date: Tue, 18 Feb 2014 23:48:50 -0700 Subject: [PATCH v2 3/3] PCI: ARM: add support for generic PCI host controller In-Reply-To: <20140219024427.GC5394@bart.dudau.co.uk> References: <1392236171-10512-1-git-send-email-will.deacon@arm.com> <5805232.JrD2FybBlg@wuerfel> <20140214220047.GA5394@bart.dudau.co.uk> <2312919.pM61KLBcYY@wuerfel> <20140218174125.GC29304@obsidianresearch.com> <20140219024427.GC5394@bart.dudau.co.uk> Message-ID: <20140219064850.GD6186@obsidianresearch.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Feb 19, 2014 at 02:44:27AM +0000, Liviu Dudau wrote: > I wish things were easier! Yah, I've seen some of this complexity too.. A thought that crosses my head is to try and leave the entire arch support intact and build a separate 'domain-driver-based' support that completely replaces the arch support, a domain would use one or the other but never both. So pci_domain_nr could become: struct pci_domain_driver *drv = pci_get_domain_driver(bus); if (drv) return drv->domain_nr; else return _arch_pci_domain_nr(bus); And other funcs would change effectively the same way. > And if someone has a good idea on how to determine the domain # from > DT we can pluck it into the pcibios_root_bridge_prepare() function > (either the generic version or the arch specific one). You can probably start with 'of_alias_get_id'.. Jason