aboutsummaryrefslogtreecommitdiffstats
path: root/arch (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-10-26powerpc: Merge 32-bit CHRP support.Paul Mackerras12-37/+1256
SMP still needs more work but UP gets as far as starting userspace at least. This uses the 64-bit-style code for spinning up the cpus. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26powerpc: Don't limit pmac_get_rtc_time to return only positive valuesPaul Mackerras1-4/+0
If the machine's clock is set to a bogus value, this check resulted in userland waiting effectively forever for the RTC value to change, so remove the check. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26powerpc: Fix interrupt-tree parsingPaul Mackerras1-14/+26
The interrupt-tree parsing code wasn't offsetting interrupt numbers by 16 on 32-bit platforms with an i8259 interrupt controller, and it was confused about the encoding of interrupt sense and level (which is different for i8259 and openpic interrupt controllers, just to make things interesting). Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26powerpc: Pull out MPC106 (grackle) initialization code into its own filePaul Mackerras4-44/+71
This is so that the 32-bit CHRP code can use it. The MPC106 initialization code is now in arch/powerpc/sysdev/grackle.c and is controlled by CONFIG_PPC_MPC106. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26powerpc: Pull common bits of setup_{32,64}.c into setup-common.cPaul Mackerras4-248/+417
This creates a new arch/powerpc/kernel/setup-common.c with various bits that setup_32.c and setup_64.c had in common - functions like machine_shutdown/restart/power_off, show_cpuinfo, set_preferred_console etc. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26powerpc: Merge rtas.c into arch/powerpc/kernelPaul Mackerras13-199/+256
This splits arch/ppc64/kernel/rtas.c into arch/powerpc/kernel/rtas.c, which contains generic RTAS functions useful on any CHRP platform, and arch/powerpc/platforms/pseries/rtas-fw.[ch], which contain some pSeries-specific firmware flashing bits. The parts of rtas.c that are to do with pSeries-specific error logging are protected by a new CONFIG_RTAS_ERROR_LOGGING symbol. The inclusion of rtas.o is controlled by the CONFIG_PPC_RTAS symbol, and the relevant platforms select that. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26powerpc: Merge i8259.c into arch/powerpc/sysdevPaul Mackerras18-270/+97
This changes the parameters for i8259_init so that it takes two parameters: a physical address for generating an interrupt acknowledge cycle, and an interrupt number offset. i8259_init now sets the irq_desc[] for its interrupts; all the callers were doing this, and that code is gone now. This also defines a CONFIG_PPC_I8259 symbol to select i8259.o for inclusion, and makes the platforms that need it select that symbol. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26ppc: Use the indirect_pci.c from arch/powerpc/sysdevPaul Mackerras7-156/+58
This defines a CONFIG_INDIRECT_PCI symbol to control whether it gets used or not, and fixes the Kconfig to select that symbol for platforms that need it. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26[PATCH] powerpc: Move ras.c into arch/powerpc/platforms/pseriesMichael Ellerman3-8/+7
ras.o is only built for CONFIG_PPC_PSERIES, so move it into arch/powerpc/platforms/pseries. Update Makefiles to suit. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26[PATCH] powerpc: Some minor cleanups to setup_32.cKumar Gala2-40/+8
* Removed of_show_percpuinfo and just report CPU frequency in generic show_cpuinfo code. * Killed OCP and PPC_SYS related code which doesn't belong in the merge tree Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26[PATCH] powerpc: Add support for Book-E timer config to generic_calibrate_decrKumar Gala1-0/+11
We need to initialize some control SPRS for timers on Book-E before we start taking decrementer interrupts. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26[PATCH] ppc: Fix m82xx_pci buildBecky Bruce1-1/+1
A recent patch updated the name of pci_assign_all_busses to pci_assign_all_buses. This instance of its use wasn't corrected by the original patch to use the new name. Builds cleanly on ads8272. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26[PATCH] powerpc: some prom.c cleanupsKumar Gala1-0/+4
On !CONFIG_PPC_MULTIPLATFORM _machine is defined as 0. This is ok, but we can't assign a value to _machine then. We may not have CONFIG_PCI available, so only build in support for find_parent_pci_resource(), request_OF_resource(), release_OF_resource() if PCI is enabled. This is probably not the long term fix but works out for now. Make reg_property64 contain 64-bit elements on a 32-bit machine. Mark the deprecated prom.c functions as __deprecated. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26[PATCH] powerpc: Make sure we have an RTC before trying to adjust itKumar Gala1-1/+1
Its valid for ppc_md.set_rtc_time to be NULL. We need to check that its non-NULL before trying to update the RTC. Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-24powerpc: Add a shutdown member to vio_driverStephen Rothwell1-0/+11
Add a shutdown member to struct vio_driver. We also need vio_bus_shutdown() which converts from struct device to struct vio_dev and knows how to extract the struct vio_driver. Original patch adjusted for different location of vio.c. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24powerpc: iseries: Fix a bogus commentStephen Rothwell1-5/+1
A comment in lpevents.c refers to code that's actually in HvCallEvent.h. The code in HvCallEvent.h is pretty obvious, so just remove the comment altogether. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24powerpc: don't duplicate name between vio_driver and device_driverStephen Rothwell1-2/+1
Just set the name field directly in the device_driver structure contained in the vio_driver struct. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24powerpc: Merge arch/ppc64/kernel/vio.c into arch/powerpc/kernel/vio.cStephen Rothwell3-1/+1
Merge arch/ppc64/kernel/vio.c into arch/powerpc/kernel/vio.c, update the Makefiles to make it work, and make ARCH=ppc64 still work. Michael's version put vio.c in arch/powerpc/sysedv but after consolting Paulus, this one puts it in arch/powerpc/kernel. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-23powerpc: Make coff boot wrapper load the kernel at 8MPaul Mackerras1-1/+1
Previously it claimed 7MB starting at the 9M point and loaded the kernel there. That meant that prom_init put the flattened device tree above 16M. On the 601 that caused the early device tree scan to fail, since only 16MB are mapped with BATs on the 601. Moving this down to 8MB allows prom_init to put the flattened device tree between 15M and 16M, so it works on the 601. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-23powerpc: Run on old powermacs.Paul Mackerras3-27/+106
Old powermacs have a number of differences from current machines: - there is no interrupt tree in the device tree, just interrupt or AAPL,interrupt properties - the chosen node in the device tree is called /chosen@0 - the OF claim method doesn't map the memory, so we have to do an explicit map call as well - there is no /chosen/cpu property on SMP machines - the NVRAM isn't structured as a set of partitions. This adapts the merged powermac support code to cope with these issues. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-23powerpc: Fix time code for 601 processorsPaul Mackerras1-23/+56
The 601 doesn't have the timebase register; instead it has an RTCL register that counts nanoseconds and wraps at 1000000000, and an RTCU register that counts seconds. This makes the necessary changes for the merged time code to use the RTCL/U registers when the kernel is running on a 601. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22Merge changes from linux-2.6 by handPaul Mackerras61-1253/+1425
2005-10-22ppc64: Use arch/powerpc/platforms/powermac for powermac build.Paul Mackerras10-3581/+6
This switches the ARCH=ppc64 build to use arch/powerpc/platforms/powermac instead of arch/ppc64/kernel/pmac*, and deletes the latter set of files. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22powerpc: Merge in 64-bit powermac support.Paul Mackerras14-813/+1136
This brings in a lot of changes from arch/ppc64/kernel/pmac_*.c to arch/powerpc/platforms/powermac/*.c and makes various minor tweaks elsewhere. On the powermac we now initialize ppc_md by copying the whole pmac_md structure into it, which required some changes in the ordering of initializations of individual fields of it. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64: Simplify secondary CPU startup on powermacsPaul Mackerras2-31/+15
... for consistency with ppc32, and because this way is neater. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64: Rearrange btext initialization for consistency with ppc32Paul Mackerras3-49/+46
Moved init_boot_display from arch/ppc64/kernel/pmac_setup.c to arch/ppc64/kernel/btext.c and declared it in asm-ppc64/btext.h. Call it from init_early rather than pmac_init_early. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64: Add a `primary' argument to pci_process_bridge_OF_rangesPaul Mackerras3-11/+33
... for consistency with ppc32 and to make the powermac merge easier. Also make it use just a single resource in the host bridge for multiple consecutive elements of the ranges property. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64/powerpc: Fix time initialization on SMP systemsPaul Mackerras2-28/+1
This moves smp_space_timers from arch/ppc64/kernel/smp.c to arch/powerpc/kernel/time.c and makes it initialize last_jiffy[] instead of paca[].next_jiffy_update_tb, since last_jiffy[] is now what the time code uses. It also declares smp_space_timers in include/asm-powerpc/time.h and gets rid of an ifdef in div128_by_32. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22ppc64: Fix delivery of RT signals to 32-bit processes.Paul Mackerras1-2/+1
An error in merging led to 32-bit processes getting the wrong link register value on entry to RT signal handlers, and the wrong stack chain as well. This fixes it. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-22powerpc: Move agp_special_page export to where it is definedPaul Mackerras4-8/+2
... instead of exporting it in arch/*/kernel/ppc_ksyms.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21[PATCH] typo fix in last cpufreq powernow patchChris Wright1-1/+1
Not sure how it slipped by, but here's a trivial typo fix for powernow. Signed-off-by: Chris Wright <chrisw@osdl.org> [ It's "nurter" backwards.. Maybe we have a hillbilly The Shining fan? ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21[PATCH] cpufreq: fix pending powernow timer stuck conditionDave Jones1-11/+19
AMD recently discovered that on some hardware, there is a race condition possible when a C-state change request goes onto the bus at the same time as a P-state change request. Both requests happen, but the southbridge hardware only acknowledges the C-state change. The PowerNow! driver is then stuck in a loop, waiting for the P-state change acknowledgement. The driver eventually times out, but can no longer perform P-state changes. It turns out the solution is to resend the P-state change, which the southbridge will acknowledge normally. Thanks to Johannes Winkelmann for reporting this and testing the fix. Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21[PATCH] ppc64: Fix typo bug in iSeries hash codeDavid Gibson1-1/+1
This fixes a stupid typo bug in the iSeries hash table code. When we place a hash PTE in the secondary bucket, instead of setting the SECONDARY flag bit, as we should, we (redundantly) set the VALID flag. This was introduced with the patch abolishing bitfields from the hash table code. Mea culpa, oops. It hasn't been noticed until now because in practice we don't hit the secondary bucket terribly often. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds3-10/+31
2005-10-21[PATCH] ppc64: Fix pages marked dirty abusivelyBenjamin Herrenschmidt1-2/+1
While working on 64K pages, I found this little buglet in our update_mmu_cache() implementation. The code calls __hash_page() passing it an "access" parameter (the type of access that triggers the hash) containing the bits _PAGE_RW and _PAGE_USER of the linux PTE. The latter is useless in this case and the former is wrong. In fact, if we have a writeable PTE and we pass _PAGE_RW to hash_page(), it will set _PAGE_DIRTY (since we track dirty that way, by hash faulting !dirty) which is not what we want. In fact, the correct fix is to always pass 0. That means that only read-only or already dirty read write PTEs will be preloaded. The (hopefully rare) case of a non dirty read write PTE can't be preloaded this way, it will have to fault in hash_page on the actual access. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21[PATCH] ppc64: Fix typo in time calculationsPaul Mackerras1-1/+1
This fixes a typo in the div128_by_32 function used in the timekeeping calculations on ppc64. If you look at the code it's quite obvious that we need (rb + c) rather than (rb + b). The "b" is clearly just a typo. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21[PATCH] powerpc: Fix mmap returning 64 bit addressesMichael Ellerman1-1/+1
The merge of syscalls.c & sys_ppc32.c (30286ef6e044bc3d9019c3d8b900572e3fa05e65) broke mmap, if the mmap returned a 64 bit address. do_mmap2 was taking the return value from do_mmap_pgoff (an unsigned long), and storing it in an int, before returning it to sys_mmap as an unsigned long. So we were losing the high bits of the address. You would have thought the compiler could catch this for us ... Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21[PATCH] powerpc: Don't blow away load_addr in start_threadMichael Ellerman1-1/+5
The patch to make process.c work for 32-bit and 64-bit (06d67d54741a5bfefa31945ef195dfa748c29025) broke some 64-bit binaries. We were blowing away load_addr in gpr[2], so we weren't properly relocating the entry point. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21[PATCH] powerpc: Merge thread_info.hDavid Gibson9-26/+22
Merge ppc32 and ppc64 versions of thread_info.h. They were pretty similar already, the chief changes are: - Instead of inline asm to implement current_thread_info(), which needs to be different for ppc32 and ppc64, we use C with an asm("r1") register variable. gcc turns it into the same asm as we used to have for both platforms. - We replace ppc32's 'local_flags' with the ppc64 'syscall_noerror' field. The noerror flag was in fact the only thing in the local_flags field anyway, so the ppc64 approach is simpler, and means we only need a load-immediate/store instead of load/mask/store when clearing the flag. - In readiness for 64k pages, when THREAD_SIZE will be less than a page, ppc64 used kmalloc() rather than get_free_pages() to allocate the kernel stack. With this patch we do the same for ppc32, since there's no strong reason not to. - For ppc64, we no longer export THREAD_SHIFT and THREAD_SIZE via asm-offsets, thread_info.h can now be safely included in asm, as on ppc32. Built and booted on G4 Powerbook (ARCH=ppc and ARCH=powerpc) and Power5 (ARCH=ppc64 and ARCH=powerpc). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21[PATCH] Fix broken initialization of conswitchp for ARCH=ppc64David Gibson1-0/+4
In the merge tree, commit 0458060c1c59c5378d8fb5daabe18cf4681c35cd broke boot on some machines because the initialization of conswitchp was moved to arch/powerpc/kernel/setup_64.c, but a corresponding copy was not added to arch/ppc64/kernel/setup.c. This patch fixes it. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21[ARM] Fix Integrator IM/PD-1 supportRussell King1-7/+8
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-20[ARM] 3027/1: BAST - reduce NAND timings slightlyBen Dooks1-3/+3
Patch from Ben Dooks The current Simtec BAST nand area timings are a little too slow to be obtained by a 2410 running at 266MHz, so reduce the timings slightly to bring them into the acceptable range. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-20[ARM] 3025/1: Add I2S platform device for PXAMatt Reimer1-0/+20
Patch from Matt Reimer Adds an I2S platform_device for PXA. I2S is used to interface with sound chips on systems like iPAQ h1910/h2200/hx4700 and Asus 716. Signed-off-by: mreimer@vpop.net Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-20powerpc: Fix some bugs in the new merged time codePaul Mackerras2-4/+3
I had the sense of the test for when to use the old 601-style RTC registers inverted. pmac_calibrate_decr and via_calibrate_decr weren't setting ppc_tb_freq, on which all the further calculations depended. Lastly, update_gtod was losing the top 32 bits of the new tb_to_xs value. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc/ppc/ppc64: Various compile fixes.Paul Mackerras2-3/+3
This declares powersave_nap in system.h and makes it an int everywhere, fixes typos for the maple platform, fixes a couple of places where I missed removing the last two arguments from a message_pass function, and makes ppc64 consistent with ppc32 in the type of the pci_bridge.cfg_data field. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20ppc64: Use the merged mpic.cPaul Mackerras3-889/+2
This means we now compile in arch/powerpc/sysdev for ARCH=ppc64. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc: Move some calculations from xxx_calibrate_decr to time_initPaul Mackerras2-27/+14
Previously the individual xxx_calibrate_decr functions would each print the timebase and cpu frequency and calculate several values such as tb_to_us and tb_to_xs. This moves those printks and calculations into time_init just after the call to the platform's calibrate_decr function. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20ppc64: Move init_boot_text call and conswitchp init into setup_archPaul Mackerras2-4/+8
This way they get done in one place for all platforms, and it is more consistent with what ppc32 does. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20ppc: rename pci_assign_all_busses to pci_assign_all_busesPaul Mackerras8-16/+16
... for consistency with ppc64 and to make merging easier. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20powerpc: Fix places where ppc_md.show_[per]cpuinfo was treated as intPaul Mackerras3-58/+26
I missed a few places where ppc code was still assuming that the ppc_md.show_[per]cpuinfo functions returned int. Signed-off-by: Paul Mackerras <paulus@samba.org>