diff options
author | John Crispin <blogic@openwrt.org> | 2011-03-30 03:27:49 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-05-19 04:55:42 -0400 |
commit | e47d488935ed0b2dd3d59d3ba4e13956ff6849c0 (patch) | |
tree | d6cdd24c6fa6d5cf4b5c461a8cc031cf9f3f1014 /arch/mips/include | |
parent | 8ec6d93508f705dacafd5fcd058c69ef405002f9 (diff) |
MIPS: Lantiq: Add PCI controller support.
The Lantiq family of SoCs have a EBU (External Bus Unit). This patch adds
the driver that allows us to use the EBU as a PCI controller. In order for
PCI to work the EBU is set to endianess swap all the data. In addition we
need to make use of SWAP_IO_SPACE for device->host DMA to work.
The clock of the PCI works in several modes (internal/external). If this
is not configured correctly the SoC will hang.
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Ralph Hempel <ralph.hempel@lantiq.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2250/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/mach-lantiq/lantiq_platform.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-lantiq/lantiq_platform.h b/arch/mips/include/asm/mach-lantiq/lantiq_platform.h new file mode 100644 index 000000000000..1f1dba6d0736 --- /dev/null +++ b/arch/mips/include/asm/mach-lantiq/lantiq_platform.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License version 2 as published | ||
4 | * by the Free Software Foundation. | ||
5 | * | ||
6 | * Copyright (C) 2010 John Crispin <blogic@openwrt.org> | ||
7 | */ | ||
8 | |||
9 | #ifndef _LANTIQ_PLATFORM_H__ | ||
10 | #define _LANTIQ_PLATFORM_H__ | ||
11 | |||
12 | #include <linux/mtd/partitions.h> | ||
13 | |||
14 | /* struct used to pass info to the pci core */ | ||
15 | enum { | ||
16 | PCI_CLOCK_INT = 0, | ||
17 | PCI_CLOCK_EXT | ||
18 | }; | ||
19 | |||
20 | #define PCI_EXIN0 0x0001 | ||
21 | #define PCI_EXIN1 0x0002 | ||
22 | #define PCI_EXIN2 0x0004 | ||
23 | #define PCI_EXIN3 0x0008 | ||
24 | #define PCI_EXIN4 0x0010 | ||
25 | #define PCI_EXIN5 0x0020 | ||
26 | #define PCI_EXIN_MAX 6 | ||
27 | |||
28 | #define PCI_GNT1 0x0040 | ||
29 | #define PCI_GNT2 0x0080 | ||
30 | #define PCI_GNT3 0x0100 | ||
31 | #define PCI_GNT4 0x0200 | ||
32 | |||
33 | #define PCI_REQ1 0x0400 | ||
34 | #define PCI_REQ2 0x0800 | ||
35 | #define PCI_REQ3 0x1000 | ||
36 | #define PCI_REQ4 0x2000 | ||
37 | #define PCI_REQ_SHIFT 10 | ||
38 | #define PCI_REQ_MASK 0xf | ||
39 | |||
40 | struct ltq_pci_data { | ||
41 | int clock; | ||
42 | int gpio; | ||
43 | int irq[16]; | ||
44 | }; | ||
45 | |||
46 | #endif | ||