diff options
author | Paul Mackerras <paulus@samba.org> | 2006-01-15 01:30:44 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-15 01:30:44 -0500 |
commit | a7fdd90bc43e3e9cb08bc1b13650024d419b89e5 (patch) | |
tree | 5c99a41b9d157186668ed63c001f72a09965143b /arch/ppc/kernel | |
parent | e8625d463560198cff7cb3eb22886c47d728d501 (diff) |
[PATCH] ppc: Remove powermac support from ARCH=ppc
This makes it possible to build kernels for PReP and/or CHRP
with ARCH=ppc by removing the (non-building) powermac support.
It's now also possible to select PReP and CHRP independently.
Powermac users should now build with ARCH=powerpc instead of
ARCH=ppc. (This does mean that it is no longer possible to
build a 32-bit kernel for a G5.)
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/misc.S | 72 | ||||
-rw-r--r-- | arch/ppc/kernel/pci.c | 240 | ||||
-rw-r--r-- | arch/ppc/kernel/ppc_ksyms.c | 9 | ||||
-rw-r--r-- | arch/ppc/kernel/setup.c | 34 | ||||
-rw-r--r-- | arch/ppc/kernel/traps.c | 13 |
6 files changed, 12 insertions, 358 deletions
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile index ca0201300868..647da4c1d219 100644 --- a/arch/ppc/kernel/Makefile +++ b/arch/ppc/kernel/Makefile | |||
@@ -9,7 +9,6 @@ extra-$(CONFIG_44x) := head_44x.o | |||
9 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o | 9 | extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o |
10 | extra-$(CONFIG_8xx) := head_8xx.o | 10 | extra-$(CONFIG_8xx) := head_8xx.o |
11 | extra-$(CONFIG_6xx) += idle_6xx.o | 11 | extra-$(CONFIG_6xx) += idle_6xx.o |
12 | extra-$(CONFIG_POWER4) += idle_power4.o | ||
13 | extra-y += vmlinux.lds | 12 | extra-y += vmlinux.lds |
14 | 13 | ||
15 | obj-y := entry.o traps.o idle.o time.o misc.o \ | 14 | obj-y := entry.o traps.o idle.o time.o misc.o \ |
@@ -17,7 +16,6 @@ obj-y := entry.o traps.o idle.o time.o misc.o \ | |||
17 | ppc_htab.o | 16 | ppc_htab.o |
18 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o | 17 | obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o |
19 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o | 18 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o |
20 | obj-$(CONFIG_POWER4) += cpu_setup_power4.o | ||
21 | obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o | 19 | obj-$(CONFIG_MODULES) += module.o ppc_ksyms.o |
22 | obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o | 20 | obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-mapping.o |
23 | obj-$(CONFIG_PCI) += pci.o | 21 | obj-$(CONFIG_PCI) += pci.o |
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index fb5658bba285..c3427eed8345 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -204,78 +204,6 @@ _GLOBAL(call_setup_cpu) | |||
204 | mtctr r5 | 204 | mtctr r5 |
205 | bctr | 205 | bctr |
206 | 206 | ||
207 | #if defined(CONFIG_CPU_FREQ_PMAC) && defined(CONFIG_6xx) | ||
208 | |||
209 | /* This gets called by via-pmu.c to switch the PLL selection | ||
210 | * on 750fx CPU. This function should really be moved to some | ||
211 | * other place (as most of the cpufreq code in via-pmu | ||
212 | */ | ||
213 | _GLOBAL(low_choose_750fx_pll) | ||
214 | /* Clear MSR:EE */ | ||
215 | mfmsr r7 | ||
216 | rlwinm r0,r7,0,17,15 | ||
217 | mtmsr r0 | ||
218 | |||
219 | /* If switching to PLL1, disable HID0:BTIC */ | ||
220 | cmplwi cr0,r3,0 | ||
221 | beq 1f | ||
222 | mfspr r5,SPRN_HID0 | ||
223 | rlwinm r5,r5,0,27,25 | ||
224 | sync | ||
225 | mtspr SPRN_HID0,r5 | ||
226 | isync | ||
227 | sync | ||
228 | |||
229 | 1: | ||
230 | /* Calc new HID1 value */ | ||
231 | mfspr r4,SPRN_HID1 /* Build a HID1:PS bit from parameter */ | ||
232 | rlwinm r5,r3,16,15,15 /* Clear out HID1:PS from value read */ | ||
233 | rlwinm r4,r4,0,16,14 /* Could have I used rlwimi here ? */ | ||
234 | or r4,r4,r5 | ||
235 | mtspr SPRN_HID1,r4 | ||
236 | |||
237 | /* Store new HID1 image */ | ||
238 | rlwinm r6,r1,0,0,18 | ||
239 | lwz r6,TI_CPU(r6) | ||
240 | slwi r6,r6,2 | ||
241 | addis r6,r6,nap_save_hid1@ha | ||
242 | stw r4,nap_save_hid1@l(r6) | ||
243 | |||
244 | /* If switching to PLL0, enable HID0:BTIC */ | ||
245 | cmplwi cr0,r3,0 | ||
246 | bne 1f | ||
247 | mfspr r5,SPRN_HID0 | ||
248 | ori r5,r5,HID0_BTIC | ||
249 | sync | ||
250 | mtspr SPRN_HID0,r5 | ||
251 | isync | ||
252 | sync | ||
253 | |||
254 | 1: | ||
255 | /* Return */ | ||
256 | mtmsr r7 | ||
257 | blr | ||
258 | |||
259 | _GLOBAL(low_choose_7447a_dfs) | ||
260 | /* Clear MSR:EE */ | ||
261 | mfmsr r7 | ||
262 | rlwinm r0,r7,0,17,15 | ||
263 | mtmsr r0 | ||
264 | |||
265 | /* Calc new HID1 value */ | ||
266 | mfspr r4,SPRN_HID1 | ||
267 | insrwi r4,r3,1,9 /* insert parameter into bit 9 */ | ||
268 | sync | ||
269 | mtspr SPRN_HID1,r4 | ||
270 | sync | ||
271 | isync | ||
272 | |||
273 | /* Return */ | ||
274 | mtmsr r7 | ||
275 | blr | ||
276 | |||
277 | #endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */ | ||
278 | |||
279 | /* | 207 | /* |
280 | * complement mask on the msr then "or" some values on. | 208 | * complement mask on the msr then "or" some values on. |
281 | * _nmask_and_or_msr(nmask, value_to_or) | 209 | * _nmask_and_or_msr(nmask, value_to_or) |
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 704c846b2b0f..04d04c5bfdd0 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Common pmac/prep/chrp pci routines. -- Cort | 2 | * Common prep/chrp pci routines. -- Cort |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
@@ -50,8 +50,7 @@ static void fixup_cpc710_pci64(struct pci_dev* dev); | |||
50 | static u8* pci_to_OF_bus_map; | 50 | static u8* pci_to_OF_bus_map; |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | /* By default, we don't re-assign bus numbers. We do this only on | 53 | /* By default, we don't re-assign bus numbers. |
54 | * some pmacs | ||
55 | */ | 54 | */ |
56 | int pci_assign_all_buses; | 55 | int pci_assign_all_buses; |
57 | 56 | ||
@@ -780,17 +779,6 @@ pci_busdev_to_OF_node(struct pci_bus *bus, int devfn) | |||
780 | return NULL; | 779 | return NULL; |
781 | 780 | ||
782 | /* Fixup bus number according to what OF think it is. */ | 781 | /* Fixup bus number according to what OF think it is. */ |
783 | #ifdef CONFIG_PPC_PMAC | ||
784 | /* The G5 need a special case here. Basically, we don't remap all | ||
785 | * busses on it so we don't create the pci-OF-map. However, we do | ||
786 | * remap the AGP bus and so have to deal with it. A future better | ||
787 | * fix has to be done by making the remapping per-host and always | ||
788 | * filling the pci_to_OF map. --BenH | ||
789 | */ | ||
790 | if (_machine == _MACH_Pmac && busnr >= 0xf0) | ||
791 | busnr -= 0xf0; | ||
792 | else | ||
793 | #endif | ||
794 | if (pci_to_OF_bus_map) | 782 | if (pci_to_OF_bus_map) |
795 | busnr = pci_to_OF_bus_map[busnr]; | 783 | busnr = pci_to_OF_bus_map[busnr]; |
796 | if (busnr == 0xff) | 784 | if (busnr == 0xff) |
@@ -1040,216 +1028,6 @@ void pcibios_add_platform_entries(struct pci_dev *pdev) | |||
1040 | } | 1028 | } |
1041 | 1029 | ||
1042 | 1030 | ||
1043 | #ifdef CONFIG_PPC_PMAC | ||
1044 | /* | ||
1045 | * This set of routines checks for PCI<->PCI bridges that have closed | ||
1046 | * IO resources and have child devices. It tries to re-open an IO | ||
1047 | * window on them. | ||
1048 | * | ||
1049 | * This is a _temporary_ fix to workaround a problem with Apple's OF | ||
1050 | * closing IO windows on P2P bridges when the OF drivers of cards | ||
1051 | * below this bridge don't claim any IO range (typically ATI or | ||
1052 | * Adaptec). | ||
1053 | * | ||
1054 | * A more complete fix would be to use drivers/pci/setup-bus.c, which | ||
1055 | * involves a working pcibios_fixup_pbus_ranges(), some more care about | ||
1056 | * ordering when creating the host bus resources, and maybe a few more | ||
1057 | * minor tweaks | ||
1058 | */ | ||
1059 | |||
1060 | /* Initialize bridges with base/limit values we have collected */ | ||
1061 | static void __init | ||
1062 | do_update_p2p_io_resource(struct pci_bus *bus, int enable_vga) | ||
1063 | { | ||
1064 | struct pci_dev *bridge = bus->self; | ||
1065 | struct pci_controller* hose = (struct pci_controller *)bridge->sysdata; | ||
1066 | u32 l; | ||
1067 | u16 w; | ||
1068 | struct resource res; | ||
1069 | |||
1070 | if (bus->resource[0] == NULL) | ||
1071 | return; | ||
1072 | res = *(bus->resource[0]); | ||
1073 | |||
1074 | DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge)); | ||
1075 | res.start -= ((unsigned long) hose->io_base_virt - isa_io_base); | ||
1076 | res.end -= ((unsigned long) hose->io_base_virt - isa_io_base); | ||
1077 | DBG(" IO window: %08lx-%08lx\n", res.start, res.end); | ||
1078 | |||
1079 | /* Set up the top and bottom of the PCI I/O segment for this bus. */ | ||
1080 | pci_read_config_dword(bridge, PCI_IO_BASE, &l); | ||
1081 | l &= 0xffff000f; | ||
1082 | l |= (res.start >> 8) & 0x00f0; | ||
1083 | l |= res.end & 0xf000; | ||
1084 | pci_write_config_dword(bridge, PCI_IO_BASE, l); | ||
1085 | |||
1086 | if ((l & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) { | ||
1087 | l = (res.start >> 16) | (res.end & 0xffff0000); | ||
1088 | pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, l); | ||
1089 | } | ||
1090 | |||
1091 | pci_read_config_word(bridge, PCI_COMMAND, &w); | ||
1092 | w |= PCI_COMMAND_IO; | ||
1093 | pci_write_config_word(bridge, PCI_COMMAND, w); | ||
1094 | |||
1095 | #if 0 /* Enabling this causes XFree 4.2.0 to hang during PCI probe */ | ||
1096 | if (enable_vga) { | ||
1097 | pci_read_config_word(bridge, PCI_BRIDGE_CONTROL, &w); | ||
1098 | w |= PCI_BRIDGE_CTL_VGA; | ||
1099 | pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, w); | ||
1100 | } | ||
1101 | #endif | ||
1102 | } | ||
1103 | |||
1104 | /* This function is pretty basic and actually quite broken for the | ||
1105 | * general case, it's enough for us right now though. It's supposed | ||
1106 | * to tell us if we need to open an IO range at all or not and what | ||
1107 | * size. | ||
1108 | */ | ||
1109 | static int __init | ||
1110 | check_for_io_childs(struct pci_bus *bus, struct resource* res, int *found_vga) | ||
1111 | { | ||
1112 | struct pci_dev *dev; | ||
1113 | int i; | ||
1114 | int rc = 0; | ||
1115 | |||
1116 | #define push_end(res, size) do { unsigned long __sz = (size) ; \ | ||
1117 | res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \ | ||
1118 | } while (0) | ||
1119 | |||
1120 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
1121 | u16 class = dev->class >> 8; | ||
1122 | |||
1123 | if (class == PCI_CLASS_DISPLAY_VGA || | ||
1124 | class == PCI_CLASS_NOT_DEFINED_VGA) | ||
1125 | *found_vga = 1; | ||
1126 | if (class >> 8 == PCI_BASE_CLASS_BRIDGE && dev->subordinate) | ||
1127 | rc |= check_for_io_childs(dev->subordinate, res, found_vga); | ||
1128 | if (class == PCI_CLASS_BRIDGE_CARDBUS) | ||
1129 | push_end(res, 0xfff); | ||
1130 | |||
1131 | for (i=0; i<PCI_NUM_RESOURCES; i++) { | ||
1132 | struct resource *r; | ||
1133 | unsigned long r_size; | ||
1134 | |||
1135 | if (dev->class >> 8 == PCI_CLASS_BRIDGE_PCI | ||
1136 | && i >= PCI_BRIDGE_RESOURCES) | ||
1137 | continue; | ||
1138 | r = &dev->resource[i]; | ||
1139 | r_size = r->end - r->start; | ||
1140 | if (r_size < 0xfff) | ||
1141 | r_size = 0xfff; | ||
1142 | if (r->flags & IORESOURCE_IO && (r_size) != 0) { | ||
1143 | rc = 1; | ||
1144 | push_end(res, r_size); | ||
1145 | } | ||
1146 | } | ||
1147 | } | ||
1148 | |||
1149 | return rc; | ||
1150 | } | ||
1151 | |||
1152 | /* Here we scan all P2P bridges of a given level that have a closed | ||
1153 | * IO window. Note that the test for the presence of a VGA card should | ||
1154 | * be improved to take into account already configured P2P bridges, | ||
1155 | * currently, we don't see them and might end up configuring 2 bridges | ||
1156 | * with VGA pass through enabled | ||
1157 | */ | ||
1158 | static void __init | ||
1159 | do_fixup_p2p_level(struct pci_bus *bus) | ||
1160 | { | ||
1161 | struct pci_bus *b; | ||
1162 | int i, parent_io; | ||
1163 | int has_vga = 0; | ||
1164 | |||
1165 | for (parent_io=0; parent_io<4; parent_io++) | ||
1166 | if (bus->resource[parent_io] | ||
1167 | && bus->resource[parent_io]->flags & IORESOURCE_IO) | ||
1168 | break; | ||
1169 | if (parent_io >= 4) | ||
1170 | return; | ||
1171 | |||
1172 | list_for_each_entry(b, &bus->children, node) { | ||
1173 | struct pci_dev *d = b->self; | ||
1174 | struct pci_controller* hose = (struct pci_controller *)d->sysdata; | ||
1175 | struct resource *res = b->resource[0]; | ||
1176 | struct resource tmp_res; | ||
1177 | unsigned long max; | ||
1178 | int found_vga = 0; | ||
1179 | |||
1180 | memset(&tmp_res, 0, sizeof(tmp_res)); | ||
1181 | tmp_res.start = bus->resource[parent_io]->start; | ||
1182 | |||
1183 | /* We don't let low addresses go through that closed P2P bridge, well, | ||
1184 | * that may not be necessary but I feel safer that way | ||
1185 | */ | ||
1186 | if (tmp_res.start == 0) | ||
1187 | tmp_res.start = 0x1000; | ||
1188 | |||
1189 | if (!list_empty(&b->devices) && res && res->flags == 0 && | ||
1190 | res != bus->resource[parent_io] && | ||
1191 | (d->class >> 8) == PCI_CLASS_BRIDGE_PCI && | ||
1192 | check_for_io_childs(b, &tmp_res, &found_vga)) { | ||
1193 | u8 io_base_lo; | ||
1194 | |||
1195 | printk(KERN_INFO "Fixing up IO bus %s\n", b->name); | ||
1196 | |||
1197 | if (found_vga) { | ||
1198 | if (has_vga) { | ||
1199 | printk(KERN_WARNING "Skipping VGA, already active" | ||
1200 | " on bus segment\n"); | ||
1201 | found_vga = 0; | ||
1202 | } else | ||
1203 | has_vga = 1; | ||
1204 | } | ||
1205 | pci_read_config_byte(d, PCI_IO_BASE, &io_base_lo); | ||
1206 | |||
1207 | if ((io_base_lo & PCI_IO_RANGE_TYPE_MASK) == PCI_IO_RANGE_TYPE_32) | ||
1208 | max = ((unsigned long) hose->io_base_virt | ||
1209 | - isa_io_base) + 0xffffffff; | ||
1210 | else | ||
1211 | max = ((unsigned long) hose->io_base_virt | ||
1212 | - isa_io_base) + 0xffff; | ||
1213 | |||
1214 | *res = tmp_res; | ||
1215 | res->flags = IORESOURCE_IO; | ||
1216 | res->name = b->name; | ||
1217 | |||
1218 | /* Find a resource in the parent where we can allocate */ | ||
1219 | for (i = 0 ; i < 4; i++) { | ||
1220 | struct resource *r = bus->resource[i]; | ||
1221 | if (!r) | ||
1222 | continue; | ||
1223 | if ((r->flags & IORESOURCE_IO) == 0) | ||
1224 | continue; | ||
1225 | DBG("Trying to allocate from %08lx, size %08lx from parent" | ||
1226 | " res %d: %08lx -> %08lx\n", | ||
1227 | res->start, res->end, i, r->start, r->end); | ||
1228 | |||
1229 | if (allocate_resource(r, res, res->end + 1, res->start, max, | ||
1230 | res->end + 1, NULL, NULL) < 0) { | ||
1231 | DBG("Failed !\n"); | ||
1232 | continue; | ||
1233 | } | ||
1234 | do_update_p2p_io_resource(b, found_vga); | ||
1235 | break; | ||
1236 | } | ||
1237 | } | ||
1238 | do_fixup_p2p_level(b); | ||
1239 | } | ||
1240 | } | ||
1241 | |||
1242 | static void | ||
1243 | pcibios_fixup_p2p_bridges(void) | ||
1244 | { | ||
1245 | struct pci_bus *b; | ||
1246 | |||
1247 | list_for_each_entry(b, &pci_root_buses, node) | ||
1248 | do_fixup_p2p_level(b); | ||
1249 | } | ||
1250 | |||
1251 | #endif /* CONFIG_PPC_PMAC */ | ||
1252 | |||
1253 | static int __init | 1031 | static int __init |
1254 | pcibios_init(void) | 1032 | pcibios_init(void) |
1255 | { | 1033 | { |
@@ -1290,9 +1068,6 @@ pcibios_init(void) | |||
1290 | pcibios_allocate_bus_resources(&pci_root_buses); | 1068 | pcibios_allocate_bus_resources(&pci_root_buses); |
1291 | pcibios_allocate_resources(0); | 1069 | pcibios_allocate_resources(0); |
1292 | pcibios_allocate_resources(1); | 1070 | pcibios_allocate_resources(1); |
1293 | #ifdef CONFIG_PPC_PMAC | ||
1294 | pcibios_fixup_p2p_bridges(); | ||
1295 | #endif /* CONFIG_PPC_PMAC */ | ||
1296 | pcibios_assign_resources(); | 1071 | pcibios_assign_resources(); |
1297 | 1072 | ||
1298 | /* Call machine dependent post-init code */ | 1073 | /* Call machine dependent post-init code */ |
@@ -1722,17 +1497,6 @@ long sys_pciconfig_iobase(long which, unsigned long bus, unsigned long devfn) | |||
1722 | struct pci_controller* hose; | 1497 | struct pci_controller* hose; |
1723 | long result = -EOPNOTSUPP; | 1498 | long result = -EOPNOTSUPP; |
1724 | 1499 | ||
1725 | /* Argh ! Please forgive me for that hack, but that's the | ||
1726 | * simplest way to get existing XFree to not lockup on some | ||
1727 | * G5 machines... So when something asks for bus 0 io base | ||
1728 | * (bus 0 is HT root), we return the AGP one instead. | ||
1729 | */ | ||
1730 | #ifdef CONFIG_PPC_PMAC | ||
1731 | if (_machine == _MACH_Pmac && machine_is_compatible("MacRISC4")) | ||
1732 | if (bus == 0) | ||
1733 | bus = 0xf0; | ||
1734 | #endif /* CONFIG_PPC_PMAC */ | ||
1735 | |||
1736 | hose = pci_bus_to_hose(bus); | 1500 | hose = pci_bus_to_hose(bus); |
1737 | if (!hose) | 1501 | if (!hose) |
1738 | return -ENODEV; | 1502 | return -ENODEV; |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index fb0da7c209db..3a6e4bcb3c53 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/pci-bridge.h> | 35 | #include <asm/pci-bridge.h> |
36 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
37 | #include <asm/pmac_feature.h> | ||
38 | #include <asm/dma.h> | 37 | #include <asm/dma.h> |
39 | #include <asm/machdep.h> | 38 | #include <asm/machdep.h> |
40 | #include <asm/hw_irq.h> | 39 | #include <asm/hw_irq.h> |
@@ -58,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs); | |||
58 | extern void alignment_exception(struct pt_regs *regs); | 57 | extern void alignment_exception(struct pt_regs *regs); |
59 | extern void program_check_exception(struct pt_regs *regs); | 58 | extern void program_check_exception(struct pt_regs *regs); |
60 | extern void single_step_exception(struct pt_regs *regs); | 59 | extern void single_step_exception(struct pt_regs *regs); |
61 | extern int pmac_newworld; | ||
62 | extern int sys_sigreturn(struct pt_regs *regs); | 60 | extern int sys_sigreturn(struct pt_regs *regs); |
63 | 61 | ||
64 | long long __ashrdi3(long long, int); | 62 | long long __ashrdi3(long long, int); |
@@ -213,10 +211,6 @@ EXPORT_SYMBOL(adb_try_handler_change); | |||
213 | EXPORT_SYMBOL(cuda_request); | 211 | EXPORT_SYMBOL(cuda_request); |
214 | EXPORT_SYMBOL(cuda_poll); | 212 | EXPORT_SYMBOL(cuda_poll); |
215 | #endif /* CONFIG_ADB_CUDA */ | 213 | #endif /* CONFIG_ADB_CUDA */ |
216 | #ifdef CONFIG_PPC_PMAC | ||
217 | EXPORT_SYMBOL(sys_ctrler); | ||
218 | EXPORT_SYMBOL(pmac_newworld); | ||
219 | #endif | ||
220 | #ifdef CONFIG_PPC_OF | 214 | #ifdef CONFIG_PPC_OF |
221 | EXPORT_SYMBOL(find_devices); | 215 | EXPORT_SYMBOL(find_devices); |
222 | EXPORT_SYMBOL(find_type_devices); | 216 | EXPORT_SYMBOL(find_type_devices); |
@@ -241,9 +235,6 @@ EXPORT_SYMBOL(of_node_put); | |||
241 | #if defined(CONFIG_BOOTX_TEXT) | 235 | #if defined(CONFIG_BOOTX_TEXT) |
242 | EXPORT_SYMBOL(btext_update_display); | 236 | EXPORT_SYMBOL(btext_update_display); |
243 | #endif | 237 | #endif |
244 | #if defined(CONFIG_SCSI) && defined(CONFIG_PPC_PMAC) | ||
245 | EXPORT_SYMBOL(note_scsi_host); | ||
246 | #endif | ||
247 | #ifdef CONFIG_VT | 238 | #ifdef CONFIG_VT |
248 | EXPORT_SYMBOL(kd_mksound); | 239 | EXPORT_SYMBOL(kd_mksound); |
249 | #endif | 240 | #endif |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index e707c6f6e61b..c08ab432e958 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Common prep/pmac/chrp boot and setup code. | 2 | * Common prep/chrp boot and setup code. |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/config.h> | 5 | #include <linux/config.h> |
@@ -35,7 +35,6 @@ | |||
35 | #include <asm/machdep.h> | 35 | #include <asm/machdep.h> |
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | #include <asm/system.h> | 37 | #include <asm/system.h> |
38 | #include <asm/pmac_feature.h> | ||
39 | #include <asm/sections.h> | 38 | #include <asm/sections.h> |
40 | #include <asm/nvram.h> | 39 | #include <asm/nvram.h> |
41 | #include <asm/xmon.h> | 40 | #include <asm/xmon.h> |
@@ -55,7 +54,6 @@ | |||
55 | 54 | ||
56 | extern void platform_init(unsigned long r3, unsigned long r4, | 55 | extern void platform_init(unsigned long r3, unsigned long r4, |
57 | unsigned long r5, unsigned long r6, unsigned long r7); | 56 | unsigned long r5, unsigned long r6, unsigned long r7); |
58 | extern void bootx_init(unsigned long r4, unsigned long phys); | ||
59 | extern void identify_cpu(unsigned long offset, unsigned long cpu); | 57 | extern void identify_cpu(unsigned long offset, unsigned long cpu); |
60 | extern void do_cpu_ftr_fixups(unsigned long offset); | 58 | extern void do_cpu_ftr_fixups(unsigned long offset); |
61 | extern void reloc_got2(unsigned long offset); | 59 | extern void reloc_got2(unsigned long offset); |
@@ -80,8 +78,6 @@ EXPORT_SYMBOL(_machine); | |||
80 | 78 | ||
81 | extern void prep_init(unsigned long r3, unsigned long r4, | 79 | extern void prep_init(unsigned long r3, unsigned long r4, |
82 | unsigned long r5, unsigned long r6, unsigned long r7); | 80 | unsigned long r5, unsigned long r6, unsigned long r7); |
83 | extern void pmac_init(unsigned long r3, unsigned long r4, | ||
84 | unsigned long r5, unsigned long r6, unsigned long r7); | ||
85 | extern void chrp_init(unsigned long r3, unsigned long r4, | 81 | extern void chrp_init(unsigned long r3, unsigned long r4, |
86 | unsigned long r5, unsigned long r6, unsigned long r7); | 82 | unsigned long r5, unsigned long r6, unsigned long r7); |
87 | 83 | ||
@@ -324,20 +320,15 @@ early_init(int r3, int r4, int r5) | |||
324 | identify_cpu(offset, 0); | 320 | identify_cpu(offset, 0); |
325 | do_cpu_ftr_fixups(offset); | 321 | do_cpu_ftr_fixups(offset); |
326 | 322 | ||
327 | #if defined(CONFIG_PPC_MULTIPLATFORM) | 323 | #if defined(CONFIG_PPC_OF) |
328 | reloc_got2(offset); | 324 | reloc_got2(offset); |
329 | 325 | ||
330 | /* If we came here from BootX, clear the screen, | ||
331 | * set up some pointers and return. */ | ||
332 | if ((r3 == 0x426f6f58) && (r5 == 0)) | ||
333 | bootx_init(r4, phys); | ||
334 | |||
335 | /* | 326 | /* |
336 | * don't do anything on prep | 327 | * don't do anything on prep |
337 | * for now, don't use bootinfo because it breaks yaboot 0.5 | 328 | * for now, don't use bootinfo because it breaks yaboot 0.5 |
338 | * and assume that if we didn't find a magic number, we have OF | 329 | * and assume that if we didn't find a magic number, we have OF |
339 | */ | 330 | */ |
340 | else if (*(unsigned long *)(0) != 0xdeadc0de) | 331 | if (*(unsigned long *)(0) != 0xdeadc0de) |
341 | phys = prom_init(r3, r4, (prom_entry)r5); | 332 | phys = prom_init(r3, r4, (prom_entry)r5); |
342 | 333 | ||
343 | reloc_got2(-offset); | 334 | reloc_got2(-offset); |
@@ -424,6 +415,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
424 | } | 415 | } |
425 | #endif | 416 | #endif |
426 | 417 | ||
418 | #ifdef CONFIG_PPC_OF | ||
427 | have_of = 1; | 419 | have_of = 1; |
428 | 420 | ||
429 | /* prom_init has already been called from __start */ | 421 | /* prom_init has already been called from __start */ |
@@ -495,19 +487,17 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
495 | #endif /* CONFIG_ADB */ | 487 | #endif /* CONFIG_ADB */ |
496 | 488 | ||
497 | switch (_machine) { | 489 | switch (_machine) { |
498 | #ifdef CONFIG_PPC_PMAC | ||
499 | case _MACH_Pmac: | ||
500 | pmac_init(r3, r4, r5, r6, r7); | ||
501 | break; | ||
502 | #endif | ||
503 | #ifdef CONFIG_PPC_CHRP | 490 | #ifdef CONFIG_PPC_CHRP |
504 | case _MACH_chrp: | 491 | case _MACH_chrp: |
505 | chrp_init(r3, r4, r5, r6, r7); | 492 | chrp_init(r3, r4, r5, r6, r7); |
506 | break; | 493 | break; |
507 | #endif | 494 | #endif |
508 | } | 495 | } |
496 | #endif /* CONFIG_PPC_OF */ | ||
509 | } | 497 | } |
498 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | ||
510 | 499 | ||
500 | #ifdef CONFIG_PPC_OF | ||
511 | #ifdef CONFIG_SERIAL_CORE_CONSOLE | 501 | #ifdef CONFIG_SERIAL_CORE_CONSOLE |
512 | extern char *of_stdout_device; | 502 | extern char *of_stdout_device; |
513 | 503 | ||
@@ -564,7 +554,7 @@ static int __init set_preferred_console(void) | |||
564 | } | 554 | } |
565 | console_initcall(set_preferred_console); | 555 | console_initcall(set_preferred_console); |
566 | #endif /* CONFIG_SERIAL_CORE_CONSOLE */ | 556 | #endif /* CONFIG_SERIAL_CORE_CONSOLE */ |
567 | #endif /* CONFIG_PPC_MULTIPLATFORM */ | 557 | #endif /* CONFIG_PPC_OF */ |
568 | 558 | ||
569 | struct bi_record *find_bootinfo(void) | 559 | struct bi_record *find_bootinfo(void) |
570 | { | 560 | { |
@@ -747,14 +737,6 @@ void __init setup_arch(char **cmdline_p) | |||
747 | if (ppc_md.init_early) | 737 | if (ppc_md.init_early) |
748 | ppc_md.init_early(); | 738 | ppc_md.init_early(); |
749 | 739 | ||
750 | #ifdef CONFIG_PPC_MULTIPLATFORM | ||
751 | /* This could be called "early setup arch", it must be done | ||
752 | * now because xmon need it | ||
753 | */ | ||
754 | if (_machine == _MACH_Pmac) | ||
755 | pmac_feature_init(); /* New cool way */ | ||
756 | #endif | ||
757 | |||
758 | #ifdef CONFIG_XMON | 740 | #ifdef CONFIG_XMON |
759 | xmon_init(1); | 741 | xmon_init(1); |
760 | if (strstr(cmd_line, "xmon")) | 742 | if (strstr(cmd_line, "xmon")) |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 9dbc4d28fa28..6d0a1838d94c 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -38,9 +38,6 @@ | |||
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | #include <asm/reg.h> | 39 | #include <asm/reg.h> |
40 | #include <asm/xmon.h> | 40 | #include <asm/xmon.h> |
41 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
42 | #include <asm/backlight.h> | ||
43 | #endif | ||
44 | #include <asm/pmc.h> | 41 | #include <asm/pmc.h> |
45 | 42 | ||
46 | #ifdef CONFIG_XMON | 43 | #ifdef CONFIG_XMON |
@@ -85,12 +82,6 @@ int die(const char * str, struct pt_regs * fp, long err) | |||
85 | int nl = 0; | 82 | int nl = 0; |
86 | console_verbose(); | 83 | console_verbose(); |
87 | spin_lock_irq(&die_lock); | 84 | spin_lock_irq(&die_lock); |
88 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
89 | if (_machine == _MACH_Pmac) { | ||
90 | set_backlight_enable(1); | ||
91 | set_backlight_level(BACKLIGHT_MAX); | ||
92 | } | ||
93 | #endif | ||
94 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); | 85 | printk("Oops: %s, sig: %ld [#%d]\n", str, err, ++die_counter); |
95 | #ifdef CONFIG_PREEMPT | 86 | #ifdef CONFIG_PREEMPT |
96 | printk("PREEMPT "); | 87 | printk("PREEMPT "); |
@@ -159,7 +150,7 @@ void _exception(int signr, struct pt_regs *regs, int code, unsigned long addr) | |||
159 | */ | 150 | */ |
160 | static inline int check_io_access(struct pt_regs *regs) | 151 | static inline int check_io_access(struct pt_regs *regs) |
161 | { | 152 | { |
162 | #if defined CONFIG_PPC_PMAC || defined CONFIG_8xx | 153 | #if defined CONFIG_8xx |
163 | unsigned long msr = regs->msr; | 154 | unsigned long msr = regs->msr; |
164 | const struct exception_table_entry *entry; | 155 | const struct exception_table_entry *entry; |
165 | unsigned int *nip = (unsigned int *)regs->nip; | 156 | unsigned int *nip = (unsigned int *)regs->nip; |
@@ -196,7 +187,7 @@ static inline int check_io_access(struct pt_regs *regs) | |||
196 | return 1; | 187 | return 1; |
197 | } | 188 | } |
198 | } | 189 | } |
199 | #endif /* CONFIG_PPC_PMAC */ | 190 | #endif /* CONFIG_8xx */ |
200 | return 0; | 191 | return 0; |
201 | } | 192 | } |
202 | 193 | ||