[PATCH v3 4/4] ARM/PCI: remove arch specific pcibios_enable_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The arm pcibios_enable_device() implementation exists solely
to prevent enabling PCI resources on PCI_PROBE_ONLY systems, since
on those systems the PCI resources are currently not claimed (ie
inserted in the PCI resource tree - which means their parent
pointer is not correctly set-up) therefore they can not be enabled
since this would trigger PCI set-ups failures.

After removing the pci=firmware command line option in:

commit 903589ca7165 ("ARM: 8554/1: kernel: pci: remove pci=firmware
command line parameter handling")

(that was used to set the PCI_PROBE_ONLY flag through the command line)
and by introducing resources claiming in the PCI host controllers
set-ups that have PCI_PROBE_ONLY as a probe option, there is no need for
arch specific pcibios_enable_device() implementations anymore in that
the kernel can rely on the generic pcibios_enable_device()
implementation without resorting to arch specific code to work around
the missing resources claiming enumeration step.

On !PCI_PROBE_ONLY PCI bus set-ups, resources are always assigned
either in pcibios initialization code or PCI host controllers drivers;
since the PCI resource assignment API takes care of inserting the
assigned resources in the resource tree, the resources parent pointers
are correctly set-up, which means that this patch leaves behaviour
unchanged for all arm PCI set-ups that do not set the PCI_PROBE_ONLY
flag.

Remove the pcibios_enable_device() function from the arm arch back-end
so that the kernel now uses its generic implementation.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
Acked-by: Will Deacon <will.deacon@xxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Cc: Russell King <linux@xxxxxxxxxxxxxxxx>
---
 arch/arm/kernel/bios32.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 05e61a2..488545f 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -590,18 +590,6 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,
 	return start;
 }
 
-/**
- * pcibios_enable_device - Enable I/O and memory.
- * @dev: PCI device to be enabled
- */
-int pcibios_enable_device(struct pci_dev *dev, int mask)
-{
-	if (pci_has_flag(PCI_PROBE_ONLY))
-		return 0;
-
-	return pci_enable_resources(dev, mask);
-}
-
 int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
 			enum pci_mmap_state mmap_state, int write_combine)
 {
-- 
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux