diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-17 00:00:18 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-17 00:00:18 -0400 |
commit | b627b4ed3d056c5d00e8f3cb32d033b0ee6619a9 (patch) | |
tree | 40f8571f9f4a5b543f43a3bd6298366d42bcaa9a | |
parent | 84971bb401866d79c6b353cb1d8861c2b4621867 (diff) |
sh: pci: Move se7780 INTC fixups out of pci-sh7780.c.
These fixups belong in the board INTC setup code, not in the middle of
pci-sh7780.c.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/boards/mach-se/7780/irq.c | 10 | ||||
-rw-r--r-- | arch/sh/drivers/pci/pci-sh7780.c | 24 |
2 files changed, 8 insertions, 26 deletions
diff --git a/arch/sh/boards/mach-se/7780/irq.c b/arch/sh/boards/mach-se/7780/irq.c index 66ad292c9fc3..44b61a597a15 100644 --- a/arch/sh/boards/mach-se/7780/irq.c +++ b/arch/sh/boards/mach-se/7780/irq.c | |||
@@ -12,10 +12,13 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <asm/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <asm/io.h> | 16 | #include <linux/io.h> |
17 | #include <mach-se/mach/se7780.h> | 17 | #include <mach-se/mach/se7780.h> |
18 | 18 | ||
19 | #define INTC_BASE 0xffd00000 | ||
20 | #define INTC_ICR1 (INTC_BASE+0x1c) | ||
21 | |||
19 | /* | 22 | /* |
20 | * Initialize IRQ setting | 23 | * Initialize IRQ setting |
21 | */ | 24 | */ |
@@ -43,4 +46,7 @@ void __init init_se7780_IRQ(void) | |||
43 | ctrl_outw((IRQPIN_PCCPW << IRQPOS_PCCPW), FPGA_INTSEL3); | 46 | ctrl_outw((IRQPIN_PCCPW << IRQPOS_PCCPW), FPGA_INTSEL3); |
44 | 47 | ||
45 | plat_irq_setup_pins(IRQ_MODE_IRQ); /* install handlers for IRQ0-7 */ | 48 | plat_irq_setup_pins(IRQ_MODE_IRQ); /* install handlers for IRQ0-7 */ |
49 | |||
50 | /* ICR1: detect low level(for 2ndcut) */ | ||
51 | ctrl_outl(0xAAAA0000, INTC_ICR1); | ||
46 | } | 52 | } |
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c index b826c7bc62b9..45fa423f2e53 100644 --- a/arch/sh/drivers/pci/pci-sh7780.c +++ b/arch/sh/drivers/pci/pci-sh7780.c | |||
@@ -22,20 +22,6 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include "pci-sh4.h" | 23 | #include "pci-sh4.h" |
24 | 24 | ||
25 | #define INTC_BASE 0xffd00000 | ||
26 | #define INTC_ICR0 (INTC_BASE+0x0) | ||
27 | #define INTC_ICR1 (INTC_BASE+0x1c) | ||
28 | #define INTC_INTPRI (INTC_BASE+0x10) | ||
29 | #define INTC_INTREQ (INTC_BASE+0x24) | ||
30 | #define INTC_INTMSK0 (INTC_BASE+0x44) | ||
31 | #define INTC_INTMSK1 (INTC_BASE+0x48) | ||
32 | #define INTC_INTMSK2 (INTC_BASE+0x40080) | ||
33 | #define INTC_INTMSKCLR0 (INTC_BASE+0x64) | ||
34 | #define INTC_INTMSKCLR1 (INTC_BASE+0x68) | ||
35 | #define INTC_INTMSKCLR2 (INTC_BASE+0x40084) | ||
36 | #define INTC_INT2MSKR (INTC_BASE+0x40038) | ||
37 | #define INTC_INT2MSKCR (INTC_BASE+0x4003c) | ||
38 | |||
39 | /* | 25 | /* |
40 | * Initialization. Try all known PCI access methods. Note that we support | 26 | * Initialization. Try all known PCI access methods. Note that we support |
41 | * using both PCI BIOS and direct access: in such cases, we use I/O ports | 27 | * using both PCI BIOS and direct access: in such cases, we use I/O ports |
@@ -75,16 +61,6 @@ int __init sh7780_pci_init(struct pci_channel *chan) | |||
75 | return -ENODEV; | 61 | return -ENODEV; |
76 | } | 62 | } |
77 | 63 | ||
78 | /* Setup the INTC */ | ||
79 | if (mach_is_7780se()) { | ||
80 | /* ICR0: IRL=use separately */ | ||
81 | ctrl_outl(0x00C00020, INTC_ICR0); | ||
82 | /* ICR1: detect low level(for 2ndcut) */ | ||
83 | ctrl_outl(0xAAAA0000, INTC_ICR1); | ||
84 | /* INTPRI: priority=3(all) */ | ||
85 | ctrl_outl(0x33333333, INTC_INTPRI); | ||
86 | } | ||
87 | |||
88 | if ((ret = sh4_pci_check_direct(chan)) != 0) | 64 | if ((ret = sh4_pci_check_direct(chan)) != 0) |
89 | return ret; | 65 | return ret; |
90 | 66 | ||