diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 11:01:12 +0100 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2016-01-12 11:01:12 +0100 | 
| commit | 1f16f116b01c110db20ab808562c8b8bc3ee3d6e (patch) | |
| tree | 44db563f64cf5f8d62af8f99a61e2b248c44ea3a /arch/arm/kernel/bios32.c | |
| parent | 03724ac3d48f8f0e3caf1d30fa134f8fd96c94e2 (diff) | |
| parent | f9eccf24615672896dc13251410c3f2f33a14f95 (diff) | |
Merge branches 'clockevents/4.4-fixes' and 'clockevents/4.5-fixes' of http://git.linaro.org/people/daniel.lezcano/linux into timers/urgent
Pull in fixes from Daniel Lezcano:
 - Fix the vt8500 timer leading to a system lock up when dealing with too
   small delta (Roman Volkov)
 - Select the CLKSRC_MMIO when the fsl_ftm_timer is enabled with COMPILE_TEST
   (Daniel Lezcano)
 - Prevent to compile timers using the 'iomem' API when the architecture has
   not HAS_IOMEM set (Richard Weinberger)
Diffstat (limited to 'arch/arm/kernel/bios32.c')
| -rw-r--r-- | arch/arm/kernel/bios32.c | 19 | 
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 6551d28c27e6..066f7f9ba411 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -17,11 +17,6 @@  #include <asm/mach/pci.h>  static int debug_pci; -static resource_size_t (*align_resource)(struct pci_dev *dev, -		  const struct resource *res, -		  resource_size_t start, -		  resource_size_t size, -		  resource_size_t align) = NULL;  /*   * We can't use pci_get_device() here since we are @@ -461,7 +456,6 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,  		sys->busnr   = busnr;  		sys->swizzle = hw->swizzle;  		sys->map_irq = hw->map_irq; -		align_resource = hw->align_resource;  		INIT_LIST_HEAD(&sys->resources);  		if (hw->private_data) @@ -470,6 +464,8 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,  		ret = hw->setup(nr, sys);  		if (ret > 0) { +			struct pci_host_bridge *host_bridge; +  			ret = pcibios_init_resources(nr, sys);  			if (ret)  {  				kfree(sys); @@ -491,6 +487,9 @@ static void pcibios_init_hw(struct device *parent, struct hw_pci *hw,  			busnr = sys->bus->busn_res.end + 1;  			list_add(&sys->node, head); + +			host_bridge = pci_find_host_bridge(sys->bus); +			host_bridge->align_resource = hw->align_resource;  		} else {  			kfree(sys);  			if (ret < 0) @@ -578,14 +577,18 @@ resource_size_t pcibios_align_resource(void *data, const struct resource *res,  {  	struct pci_dev *dev = data;  	resource_size_t start = res->start; +	struct pci_host_bridge *host_bridge;  	if (res->flags & IORESOURCE_IO && start & 0x300)  		start = (start + 0x3ff) & ~0x3ff;  	start = (start + align - 1) & ~(align - 1); -	if (align_resource) -		return align_resource(dev, res, start, size, align); +	host_bridge = pci_find_host_bridge(dev->bus); + +	if (host_bridge->align_resource) +		return host_bridge->align_resource(dev, res, +				start, size, align);  	return start;  }  | 
