aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-06-19 19:00:15 -0400
committerArnd Bergmann <arnd@arndb.de>2013-06-19 19:00:15 -0400
commit596fd95ea606548adaa8310a7c05a6dcfec46f16 (patch)
tree2d1f5bb81dff7a40ab030a87d6c7fb5ae2bcf559
parent99ff1830426ed59cc722091eadffd17736bdf148 (diff)
parentf55b2b56cd37fa8bcfcb75248c27094eaf09e04c (diff)
Merge tag 'integrator-pci-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/soc
From Linus Walleij: This is a patch series that: - Pulls the Integrator/AP PCI bridge driver into one file - Adds full device tree support for it - Keeps ATAG support around for the time being * tag 'integrator-pci-for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: integrator: basic PCIv3 device tree support ARM: integrator: move static ioremapping into PCIv3 driver ARM: integrator: move VGA base assignment ARM: integrator: remap PCIv3 base dynamically ARM: integrator: move V3 register definitions into driver ARM: integrator: move PCI base address grab to probe ARM: integrator: grab PCI error IRQ in probe() ARM: integrator: convert PCIv3 bridge to platform device ARM: integrator: merge PCIv3 driver into one file ARM: pci: create pci_common_init_dev() Documentation/devicetree: add a small note on PCI Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--Documentation/devicetree/bindings/pci/pci.txt9
-rw-r--r--Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt15
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt1
-rw-r--r--arch/arm/boot/dts/integratorap.dts41
-rw-r--r--arch/arm/include/asm/hardware/pci_v3.h186
-rw-r--r--arch/arm/include/asm/mach/pci.h17
-rw-r--r--arch/arm/kernel/bios32.c9
-rw-r--r--arch/arm/mach-integrator/Makefile2
-rw-r--r--arch/arm/mach-integrator/include/mach/platform.h23
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c31
-rw-r--r--arch/arm/mach-integrator/pci.c113
-rw-r--r--arch/arm/mach-integrator/pci_v3.c532
-rw-r--r--arch/arm/mach-integrator/pci_v3.h2
13 files changed, 575 insertions, 406 deletions
diff --git a/Documentation/devicetree/bindings/pci/pci.txt b/Documentation/devicetree/bindings/pci/pci.txt
new file mode 100644
index 000000000000..41aeed38926d
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/pci.txt
@@ -0,0 +1,9 @@
1PCI bus bridges have standardized Device Tree bindings:
2
3PCI Bus Binding to: IEEE Std 1275-1994
4http://www.openfirmware.org/ofwg/bindings/pci/pci2_1.pdf
5
6And for the interrupt mapping part:
7
8Open Firmware Recommended Practice: Interrupt Mapping
9http://www.openfirmware.org/1275/practice/imap/imap0_9d.pdf
diff --git a/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
new file mode 100644
index 000000000000..30b364e504ba
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
@@ -0,0 +1,15 @@
1V3 Semiconductor V360 EPC PCI bridge
2
3This bridge is found in the ARM Integrator/AP (Application Platform)
4
5Integrator-specific notes:
6
7- syscon: should contain a link to the syscon device node (since
8 on the Integrator, some registers in the syscon are required to
9 operate the V3).
10
11V360 EPC specific notes:
12
13- reg: should contain the base address of the V3 adapter.
14- interrupts: should contain a reference to the V3 error interrupt
15 as routed on the system.
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 6931c4348d24..d247d1003987 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -59,6 +59,7 @@ ste ST-Ericsson
59stericsson ST-Ericsson 59stericsson ST-Ericsson
60ti Texas Instruments 60ti Texas Instruments
61toshiba Toshiba Corporation 61toshiba Toshiba Corporation
62v3 V3 Semiconductor
62via VIA Technologies, Inc. 63via VIA Technologies, Inc.
63wlf Wolfson Microelectronics 64wlf Wolfson Microelectronics
64wm Wondermedia Technologies, Inc. 65wm Wondermedia Technologies, Inc.
diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts
index c9c3fa344647..03f23b7a0ab5 100644
--- a/arch/arm/boot/dts/integratorap.dts
+++ b/arch/arm/boot/dts/integratorap.dts
@@ -39,6 +39,47 @@
39 valid-mask = <0x003fffff>; 39 valid-mask = <0x003fffff>;
40 }; 40 };
41 41
42 pci: pciv3@62000000 {
43 compatible = "v3,v360epc-pci";
44 #interrupt-cells = <1>;
45 #size-cells = <2>;
46 #address-cells = <3>;
47 reg = <0x62000000 0x10000>;
48 interrupt-parent = <&pic>;
49 interrupts = <17>; /* Bus error IRQ */
50 ranges = <0x00000000 0 0x61000000 /* config space */
51 0x61000000 0 0x00100000 /* 16 MiB @ 61000000 */
52 0x01000000 0 0x60000000 /* I/O space */
53 0x60000000 0 0x00100000 /* 16 MiB @ 60000000 */
54 0x02000000 0 0x40000000 /* non-prefectable memory */
55 0x40000000 0 0x10000000 /* 256 MiB @ 40000000 */
56 0x42000000 0 0x50000000 /* prefetchable memory */
57 0x50000000 0 0x10000000>; /* 256 MiB @ 50000000 */
58 interrupt-map-mask = <0xf800 0 0 0x7>;
59 interrupt-map = <
60 /* IDSEL 9 */
61 0x4800 0 0 1 &pic 13 /* INT A on slot 9 is irq 13 */
62 0x4800 0 0 2 &pic 14 /* INT B on slot 9 is irq 14 */
63 0x4800 0 0 3 &pic 15 /* INT C on slot 9 is irq 15 */
64 0x4800 0 0 4 &pic 16 /* INT D on slot 9 is irq 16 */
65 /* IDSEL 10 */
66 0x5000 0 0 1 &pic 14 /* INT A on slot 10 is irq 14 */
67 0x5000 0 0 2 &pic 15 /* INT B on slot 10 is irq 15 */
68 0x5000 0 0 3 &pic 16 /* INT C on slot 10 is irq 16 */
69 0x5000 0 0 4 &pic 13 /* INT D on slot 10 is irq 13 */
70 /* IDSEL 11 */
71 0x5800 0 0 1 &pic 15 /* INT A on slot 11 is irq 15 */
72 0x5800 0 0 2 &pic 16 /* INT B on slot 11 is irq 16 */
73 0x5800 0 0 3 &pic 13 /* INT C on slot 11 is irq 13 */
74 0x5800 0 0 4 &pic 14 /* INT D on slot 11 is irq 14 */
75 /* IDSEL 12 */
76 0x6000 0 0 1 &pic 16 /* INT A on slot 12 is irq 16 */
77 0x6000 0 0 2 &pic 13 /* INT B on slot 12 is irq 13 */
78 0x6000 0 0 3 &pic 14 /* INT C on slot 12 is irq 14 */
79 0x6000 0 0 4 &pic 15 /* INT D on slot 12 is irq 15 */
80 >;
81 };
82
42 fpga { 83 fpga {
43 /* 84 /*
44 * The Integator/AP predates the idea to have magic numbers 85 * The Integator/AP predates the idea to have magic numbers
diff --git a/arch/arm/include/asm/hardware/pci_v3.h b/arch/arm/include/asm/hardware/pci_v3.h
deleted file mode 100644
index 2811c7e2cfdf..000000000000
--- a/arch/arm/include/asm/hardware/pci_v3.h
+++ /dev/null
@@ -1,186 +0,0 @@
1/*
2 * arch/arm/include/asm/hardware/pci_v3.h
3 *
4 * Internal header file PCI V3 chip
5 *
6 * Copyright (C) ARM Limited
7 * Copyright (C) 2000-2001 Deep Blue Solutions Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef ASM_ARM_HARDWARE_PCI_V3_H
24#define ASM_ARM_HARDWARE_PCI_V3_H
25
26/* -------------------------------------------------------------------------------
27 * V3 Local Bus to PCI Bridge definitions
28 * -------------------------------------------------------------------------------
29 * Registers (these are taken from page 129 of the EPC User's Manual Rev 1.04
30 * All V3 register names are prefaced by V3_ to avoid clashing with any other
31 * PCI definitions. Their names match the user's manual.
32 *
33 * I'm assuming that I20 is disabled.
34 *
35 */
36#define V3_PCI_VENDOR 0x00000000
37#define V3_PCI_DEVICE 0x00000002
38#define V3_PCI_CMD 0x00000004
39#define V3_PCI_STAT 0x00000006
40#define V3_PCI_CC_REV 0x00000008
41#define V3_PCI_HDR_CFG 0x0000000C
42#define V3_PCI_IO_BASE 0x00000010
43#define V3_PCI_BASE0 0x00000014
44#define V3_PCI_BASE1 0x00000018
45#define V3_PCI_SUB_VENDOR 0x0000002C
46#define V3_PCI_SUB_ID 0x0000002E
47#define V3_PCI_ROM 0x00000030
48#define V3_PCI_BPARAM 0x0000003C
49#define V3_PCI_MAP0 0x00000040
50#define V3_PCI_MAP1 0x00000044
51#define V3_PCI_INT_STAT 0x00000048
52#define V3_PCI_INT_CFG 0x0000004C
53#define V3_LB_BASE0 0x00000054
54#define V3_LB_BASE1 0x00000058
55#define V3_LB_MAP0 0x0000005E
56#define V3_LB_MAP1 0x00000062
57#define V3_LB_BASE2 0x00000064
58#define V3_LB_MAP2 0x00000066
59#define V3_LB_SIZE 0x00000068
60#define V3_LB_IO_BASE 0x0000006E
61#define V3_FIFO_CFG 0x00000070
62#define V3_FIFO_PRIORITY 0x00000072
63#define V3_FIFO_STAT 0x00000074
64#define V3_LB_ISTAT 0x00000076
65