aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@linux.vnet.ibm.com>2007-05-07 17:25:22 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-07 21:54:20 -0400
commit08390db07a012b972189629a30eb695cdcb0ec14 (patch)
tree0ce87b8f402ca96f75eab323f7e25c4c0cd7e65f
parentfb39a96e23d4d1115f8e7e0b9916d0e9c23d8f65 (diff)
[POWERPC] Add tsi108_pci.h for common PCI functions
Add a header file for the common PCI routines used for the TSI bridge Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c5
-rw-r--r--arch/powerpc/sysdev/tsi108_pci.c1
-rw-r--r--include/asm-powerpc/tsi108_pci.h45
3 files changed, 47 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index 366702e8c038..06c86a1b4fb0 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -41,6 +41,7 @@
41#include <asm/reg.h> 41#include <asm/reg.h>
42#include <mm/mmu_decl.h> 42#include <mm/mmu_decl.h>
43#include "mpc7448_hpc2.h" 43#include "mpc7448_hpc2.h"
44#include <asm/tsi108_pci.h>
44#include <asm/tsi108_irq.h> 45#include <asm/tsi108_irq.h>
45#include <asm/mpic.h> 46#include <asm/mpic.h>
46 47
@@ -57,10 +58,7 @@ isa_mem_base = MPC7448_HPC2_ISA_MEM_BASE;
57pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET; 58pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
58#endif 59#endif
59 60
60extern int tsi108_setup_pci(struct device_node *dev);
61extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val); 61extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
62extern void tsi108_pci_int_init(struct device_node *node);
63extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);
64 62
65int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn) 63int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn)
66{ 64{
@@ -210,7 +208,6 @@ static int __init mpc7448_hpc2_probe(void)
210 208
211static int mpc7448_machine_check_exception(struct pt_regs *regs) 209static int mpc7448_machine_check_exception(struct pt_regs *regs)
212{ 210{
213 extern void tsi108_clear_pci_cfg_error(void);
214 const struct exception_table_entry *entry; 211 const struct exception_table_entry *entry;
215 212
216 /* Are we prepared to handle this fault */ 213 /* Are we prepared to handle this fault */
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index 58b9e7f8abf2..76c32be4a6b0 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -35,6 +35,7 @@
35#include <asm/machdep.h> 35#include <asm/machdep.h>
36#include <asm/pci-bridge.h> 36#include <asm/pci-bridge.h>
37#include <asm/tsi108.h> 37#include <asm/tsi108.h>
38#include <asm/tsi108_pci.h>
38#include <asm/tsi108_irq.h> 39#include <asm/tsi108_irq.h>
39#include <asm/prom.h> 40#include <asm/prom.h>
40 41
diff --git a/include/asm-powerpc/tsi108_pci.h b/include/asm-powerpc/tsi108_pci.h
new file mode 100644
index 000000000000..f3be7d90d267
--- /dev/null
+++ b/include/asm-powerpc/tsi108_pci.h
@@ -0,0 +1,45 @@
1/*
2 * Copyright 2007 IBM Corp
3 *
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 * MA 02111-1307 USA
19 */
20
21#ifndef _ASM_PPC_TSI108_PCI_H
22#define _ASM_PPC_TSI108_PCI_H
23
24#include <asm/tsi108.h>
25
26/* Register definitions */
27#define TSI108_PCI_P2O_BAR0 (TSI108_PCI_OFFSET + 0x10)
28#define TSI108_PCI_P2O_BAR0_UPPER (TSI108_PCI_OFFSET + 0x14)
29#define TSI108_PCI_P2O_BAR2 (TSI108_PCI_OFFSET + 0x18)
30#define TSI108_PCI_P2O_BAR2_UPPER (TSI108_PCI_OFFSET + 0x1c)
31#define TSI108_PCI_P2O_PAGE_SIZES (TSI108_PCI_OFFSET + 0x4c)
32#define TSI108_PCI_PFAB_BAR0 (TSI108_PCI_OFFSET + 0x204)
33#define TSI108_PCI_PFAB_BAR0_UPPER (TSI108_PCI_OFFSET + 0x208)
34#define TSI108_PCI_PFAB_IO (TSI108_PCI_OFFSET + 0x20c)
35#define TSI108_PCI_PFAB_IO_UPPER (TSI108_PCI_OFFSET + 0x210)
36#define TSI108_PCI_PFAB_MEM32 (TSI108_PCI_OFFSET + 0x214)
37#define TSI108_PCI_PFAB_PFM3 (TSI108_PCI_OFFSET + 0x220)
38#define TSI108_PCI_PFAB_PFM4 (TSI108_PCI_OFFSET + 0x230)
39
40extern int tsi108_setup_pci(struct device_node *dev);
41extern void tsi108_pci_int_init(struct device_node *node);
42extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);
43extern void tsi108_clear_pci_cfg_error(void);
44
45#endif /* _ASM_PPC_TSI108_PCI_H */