Merge branch 'acpi-ec'
[linux-drm-fsl-dcu.git] / arch / arm64 / kernel / pci.c
1 /*
2  * Code borrowed from powerpc/kernel/pci-common.c
3  *
4  * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM
5  * Copyright (C) 2014 ARM Ltd.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * version 2 as published by the Free Software Foundation.
10  *
11  */
12
13 #include <linux/init.h>
14 #include <linux/io.h>
15 #include <linux/kernel.h>
16 #include <linux/mm.h>
17 #include <linux/of_pci.h>
18 #include <linux/of_platform.h>
19 #include <linux/slab.h>
20
21 #include <asm/pci-bridge.h>
22
23 /*
24  * Called after each bus is probed, but before its children are examined
25  */
26 void pcibios_fixup_bus(struct pci_bus *bus)
27 {
28         /* nothing to do, expected to be removed in the future */
29 }
30
31 /*
32  * We don't have to worry about legacy ISA devices, so nothing to do here
33  */
34 resource_size_t pcibios_align_resource(void *data, const struct resource *res,
35                                 resource_size_t size, resource_size_t align)
36 {
37         return res->start;
38 }
39
40 /*
41  * Try to assign the IRQ number from DT when adding a new device
42  */
43 int pcibios_add_device(struct pci_dev *dev)
44 {
45         dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
46
47         return 0;
48 }