diff options
Diffstat (limited to 'arch/powerpc/platforms/83xx/mpc834x_sys.c')
-rw-r--r-- | arch/powerpc/platforms/83xx/mpc834x_sys.c | 56 |
1 files changed, 9 insertions, 47 deletions
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c index 3e1c16eb4a6..32df239d1c4 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_sys.c +++ b/arch/powerpc/platforms/83xx/mpc834x_sys.c | |||
@@ -43,33 +43,6 @@ unsigned long isa_io_base = 0; | |||
43 | unsigned long isa_mem_base = 0; | 43 | unsigned long isa_mem_base = 0; |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef CONFIG_PCI | ||
47 | static int | ||
48 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
49 | { | ||
50 | static char pci_irq_table[][4] = | ||
51 | /* | ||
52 | * PCI IDSEL/INTPIN->INTLINE | ||
53 | * A B C D | ||
54 | */ | ||
55 | { | ||
56 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x11 */ | ||
57 | {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x12 */ | ||
58 | {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x13 */ | ||
59 | {0, 0, 0, 0}, | ||
60 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x15 */ | ||
61 | {PIRQD, PIRQA, PIRQB, PIRQC}, /* idsel 0x16 */ | ||
62 | {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x17 */ | ||
63 | {PIRQB, PIRQC, PIRQD, PIRQA}, /* idsel 0x18 */ | ||
64 | {0, 0, 0, 0}, /* idsel 0x19 */ | ||
65 | {0, 0, 0, 0}, /* idsel 0x20 */ | ||
66 | }; | ||
67 | |||
68 | const long min_idsel = 0x11, max_idsel = 0x20, irqs_per_slot = 4; | ||
69 | return PCI_IRQ_TABLE_LOOKUP; | ||
70 | } | ||
71 | #endif /* CONFIG_PCI */ | ||
72 | |||
73 | /* ************************************************************************ | 46 | /* ************************************************************************ |
74 | * | 47 | * |
75 | * Setup the architecture | 48 | * Setup the architecture |
@@ -96,8 +69,6 @@ static void __init mpc834x_sys_setup_arch(void) | |||
96 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) | 69 | for (np = NULL; (np = of_find_node_by_type(np, "pci")) != NULL;) |
97 | add_bridge(np); | 70 | add_bridge(np); |
98 | 71 | ||
99 | ppc_md.pci_swizzle = common_swizzle; | ||
100 | ppc_md.pci_map_irq = mpc83xx_map_irq; | ||
101 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | 72 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; |
102 | #endif | 73 | #endif |
103 | 74 | ||
@@ -110,25 +81,13 @@ static void __init mpc834x_sys_setup_arch(void) | |||
110 | 81 | ||
111 | void __init mpc834x_sys_init_IRQ(void) | 82 | void __init mpc834x_sys_init_IRQ(void) |
112 | { | 83 | { |
113 | u8 senses[8] = { | 84 | struct device_node *np; |
114 | 0, /* EXT 0 */ | 85 | |
115 | IRQ_SENSE_LEVEL, /* EXT 1 */ | 86 | np = of_find_node_by_type(NULL, "ipic"); |
116 | IRQ_SENSE_LEVEL, /* EXT 2 */ | 87 | if (!np) |
117 | 0, /* EXT 3 */ | 88 | return; |
118 | #ifdef CONFIG_PCI | ||
119 | IRQ_SENSE_LEVEL, /* EXT 4 */ | ||
120 | IRQ_SENSE_LEVEL, /* EXT 5 */ | ||
121 | IRQ_SENSE_LEVEL, /* EXT 6 */ | ||
122 | IRQ_SENSE_LEVEL, /* EXT 7 */ | ||
123 | #else | ||
124 | 0, /* EXT 4 */ | ||
125 | 0, /* EXT 5 */ | ||
126 | 0, /* EXT 6 */ | ||
127 | 0, /* EXT 7 */ | ||
128 | #endif | ||
129 | }; | ||
130 | 89 | ||
131 | ipic_init(get_immrbase() + 0x00700, 0, 0, senses, 8); | 90 | ipic_init(np, 0); |
132 | 91 | ||
133 | /* Initialize the default interrupt mapping priorities, | 92 | /* Initialize the default interrupt mapping priorities, |
134 | * in case the boot rom changed something on us. | 93 | * in case the boot rom changed something on us. |
@@ -178,4 +137,7 @@ define_machine(mpc834x_sys) { | |||
178 | .time_init = mpc83xx_time_init, | 137 | .time_init = mpc83xx_time_init, |
179 | .calibrate_decr = generic_calibrate_decr, | 138 | .calibrate_decr = generic_calibrate_decr, |
180 | .progress = udbg_progress, | 139 | .progress = udbg_progress, |
140 | #ifdef CONFIG_PCI | ||
141 | .pcibios_fixup = mpc83xx_pcibios_fixup, | ||
142 | #endif | ||
181 | }; | 143 | }; |