aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powermac (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-02-10Merge ../powerpc-mergePaul Mackerras3-50/+44
2006-02-08[PATCH] powermac pci iomem annotationsAl Viro1-46/+43
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07[PATCH] bogus extern in low_i2c.cAl Viro1-2/+1
extern in function definition is an odd thing.. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07[PATCH] drive_info removal outside of arch/i386Al Viro1-2/+0
drive_info is used only by hd.c and that happens under #ifdef __i386__. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07[PATCH] powerpc: cleanup pmac_newworld variable usageOlaf Hering1-4/+4
remove extern declarations of pmac_newworld move pmac_newworld to bss if there is any "interrupt-controller" device, then it is newworld. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-01[PATCH] powerpc: enable irq's for platform functions.Ben Collins1-3/+10
Make the platform function interrupt functions actually work. Calls irq_enable() for the first in the list, and irq_disable() for the last. Added *func to struct irq_client so the the user can pass just that to pmf_unregister_irq_client(). Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-31[SUNGEM]: Unbreak Sun GEM chips.David S. Miller1-4/+2
Revert: 40727198bfb2ce5842a6e8c7f89cf8a40ff7bf14 These PHY changes hang the sungem driver on startup with Sun chips on sparc64. Hopefully we can redo these changes in a way that doesn't break non-Apple systems. Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-23[SUNGEM]: Make PM of PHYs more reliable (#2)Benjamin Herrenschmidt1-2/+4
On my latest laptop, I've had occasional PHY dead on wakeup from sleep... the PHY would be totally unresponsive even to toggling the hard reset line until the machine is powered down... Looking closely at the code, I found some possible issues in the way we setup the MDIO lines during suspend along with slight divergences from what Darwin does when resetting it that may explain the problem. That patch change these and the problem appear to be gone for me at least... I also fixed an mdelay -> msleep while I was at it to the pmac feature code that is called when toggling the PHY reset line since sungem doesn't call it in an atomic context anymore. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>b Signed-off-by: David S. Miller <davem@davemloft.net>
2006-01-12[PATCH] powerpc: pmac namespace cleanupArnd Bergmann1-1/+1
pmac_setup_arch is only used in the file that it is defined in, so it should not be in the global namespace. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-11[PATCH] powerpc: Make early debugging configurable via KconfigMichael Ellerman1-1/+1
This patch adds Kconfig entries to control the early debugging options, currently in setup_64.c. Doing this via Kconfig rather than #defines means you can have one source tree, which is buildable for multiple platforms - and you can enable the correct early debug option for each platform via .config. I made udbg_early_init() a static inline because otherwise GCC is to daft to optimise it away when debugging is off. Now that we have udbg_init_rtas() we can make call_rtas_display_status* static. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-10spelling: s/retreive/retrieve/Adrian Bunk1-1/+1
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-01-09[PATCH] 4/5 powerpc: Add cpufreq support for all desktop G5Benjamin Herrenschmidt1-47/+449
This patch adds cpufreq support for all desktop "tower" G5 models. The only G5 models still lacking cpufreq support at this point are the Xserve and possibly the new iMac iSight (not tested). I'll have those added soon. That patch uses the new platform functions interpreter to implement frequency and voltage switching on most models. Note that in order to find the low frequency value, I had to hack something that might now work properly on all models, so if the frequency value reported when running low speed looks bogus to you, please report it to me. (Appart from a bogus reported value, things should work fine). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] 3/5 powerpc: Add platform functions interpreterBenjamin Herrenschmidt6-42/+1743
This is the platform function interpreter itself along with the backends for UniN/U3/U4, mac-io, GPIOs and i2c. It adds the ability to execute those do-platform-* scripts in the device-tree (at least for most devices for which a backend is provided). This should replace the clock spreading hacks properly. It might also have an impact on all sort of machines since some of the scripts marked "at init" will now be executed on boot (or some other on sleep/wakeup), those will possibly do things that the kernel didn't do at all, like setting some values into some i2c devices (changing thermal sensor calibration or conversion rate) etc... Thus regression testing is MUCH welcome. Also loook for errors in dmesg. That's also why I've left rather verbose debugging enabled in this version of the patch. (I do expect some Windtunnel G4s to show some errors as they have an i2c clock chip on the PMU bus that uses some primitives that the i2c backend doesn't implement yet. I really need users that have one of those machine to come back to me so we can get that done right, though the errors themselves should be harmless, I suspect the machine might not run at full speed). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] 2/5 powerpc: Rework PowerMac i2c part 2Benjamin Herrenschmidt2-89/+247
This is the continuation of the previous patch. This one removes the old PowerMac i2c drivers (i2c-keywest and i2c-pmac-smu) and replaces them both with a single stub driver that uses the new PowerMac low i2c layer. Now that i2c-keywest is gone, the low-i2c code is extended to support interrupt driver transfers. All i2c busses now appear as platform devices. Compatibility with existing drivers should be maintained as the i2c bus names have been kept identical, except for the SMU bus but in that later case, all users has been fixed. With that patch added, matching a device node to an i2c_adapter becomes trivial. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] 1/5 powerpc: Rework PowerMac i2c part 1Benjamin Herrenschmidt4-348/+730
This is the first part of a rework of the PowerMac i2c code. It completely reworks the "low_i2c" layer. It is now more flexible, supports KeyWest, SMU and PMU i2c busses, and provides functions to match device nodes to i2c busses and adapters. This patch also extends & fix some bugs in the SMU driver related to i2c support and removes the clock spreading hacks from the pmac feature code rather than adapting them to the new API since they'll be replaced by the platform function code completely in patch 3/5 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: added a udbg_progressKumar Gala1-7/+1
Added a common udbg_progress for use by ppc_md.progress() Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Experimental support for new G5 Macs (#2)Benjamin Herrenschmidt5-232/+447
This adds some very basic support for the new machines, including the Quad G5 (tested), and other new dual core based machines and iMac G5 iSight (untested). This is still experimental ! There is no thermal control yet, there is no proper handing of MSIs, etc.. but it boots, I have all 4 cores up on my machine. Compared to the previous version of this patch, this one adds DART IOMMU support for the U4 chipset and thus should work fine on setups with more than 2Gb of RAM. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Remove device_node addrs/n_addrBenjamin Herrenschmidt7-313/+381
The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Add arch dependent basic infrastructure for Kdump.Michael Ellerman1-0/+1
Implementing the machine_crash_shutdown which will be called by crash_kexec (called in case of a panic, sysrq etc.). Disable the interrupts, shootdown cpus using debugger IPI and collect regs for all CPUs. elfcorehdr= specifies the location of elf core header stored by the crashed kernel. This command line option will be passed by the kexec-tools to capture kernel. savemaxmem= specifies the actual memory size that the first kernel has and this value will be used for dumping in the capture kernel. This command line option will be passed by the kexec-tools to capture kernel. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Fixups for kernel linked at 32 MBMichael Ellerman1-9/+7
There's a few places where we need to fix things up for the kernel to work if it's linked at 32MB: - platforms/powermac/smp.c To start secondary cpus on pmac we patch the reset vector, which is fine. Except if we're above 32MB we don't have enough bits for an absolute branch, it needs to relative. - kernel/head_64.s - A few branches in the cpu hold code need to load the full target address and do a bctr. - after_prom_start needs to load PHYSICAL_START as the dest address, not 0. - The exception prolog needs to load the low word of the target adddress, not just the low halfword. - Fixup handling of the initial stab address. - kernel/setup_64.c smp_release_cpus() needs to write 1 to the spinloop flag near 0, not 32 MB. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: minor cleanup of void ptr dereflinas1-1/+1
Minor: use macro to perform void pointer deref; this may someday help avoid pointer typecasting errors. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Update OF address parsersBenjamin Herrenschmidt1-1/+1
This updates the OF address parsers to return the IO flags indicating the type of address obtained. It also adds a PCI call for converting physical addresses that hit IO space into into IO tokens, and add routines that return the translated addresses into struct resource Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: udbg updatesBenjamin Herrenschmidt2-6/+6
The udbg low level io layer has an issue with udbg_getc() returning a char (unsigned on ppc) instead of an int, thus the -1 if you had no available input device could end up turned into 0xff, filling your display with bogus characters. This fixes it, along with adding a little blob to xmon to do a delay before exiting when getting an EOF and fixing the detection of ADB keyboards in udbg_adb.c Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: powermac adb fix udbg_adb_use_btext warningAndy Whitcroft1-2/+2
When compiling without BOOTX_TEXT the following warning is emitted. Fix up the definition to only be made when required. CC arch/powerpc/platforms/powermac/udbg_adb.o .../arch/powerpc/platforms/powermac/udbg_adb.c:41: warning: `udbg_adb_use_btext' defined but not used Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: powermac adb fix dependency on btext_drawcharAndy Whitcroft1-2/+5
udbg_adb_init() has become dependent on btext_drawchar, even when BOOTX_TEXT support is not selected. This leads to the error below. Make the check dependant on BOOTX_TEXT. LD .tmp_vmlinux1 arch/powerpc/platforms/built-in.o(.toc1+0xa40): undefined reference to `btext_drawchar' Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Fix g5 build with xmonBenjamin Herrenschmidt1-2/+2
My previous patches inadvertently broke building a G5 kernel with CONFIG_XMON enabled. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Add back support for booting from BootX (#2)Benjamin Herrenschmidt2-0/+550
ARCH=powerpc couldn't boot from BootX as it uses a "different" way of getting in the kernel. This patch adds the necessary trampolines, creating a flattened device-tree from the tree passed from MacOS, and initializing the btext engine early for really-early debugging. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Unify udbg (#2)Benjamin Herrenschmidt7-63/+470
This patch unifies udbg for both ppc32 and ppc64 when building the merged achitecture. xmon now has a single "back end". The powermac udbg stuff gets enriched with some ADB capabilities and btext output. In addition, the early_init callback is now called on ppc32 as well, approx. in the same order as ppc64 regarding device-tree manipulations. The init sequences of ppc32 and ppc64 are getting closer, I'll unify them in a later patch. For now, you can force udbg to the scc using "sccdbg" or to btext using "btextdbg" on powermacs. I'll implement a cleaner way of forcing udbg output to something else than the autodetected OF output device in a later patch. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-01-09[PATCH] powerpc: Merge kexecMichael Ellerman2-0/+6
This patch merges, to some extent, the PPC32 and PPC64 kexec implementations. We adopt the PPC32 approach of having ppc_md callbacks for the kexec functions. The current PPC64 implementation becomes the "default" implementation for PPC64 which platforms can select if they need no special treatment. I've added these default callbacks to pseries/maple/cell/powermac, this means iSeries no longer supports kexec - but it never worked anyway. I've renamed PPC32's machine_kexec_simple to default_machine_kexec, inline with PPC64. Judging by the comments it might be better named machine_kexec_non_of, or something, but at the moment it's the only implementation for PPC32 so it's the "default". Kexec requires machine_shutdown(), which is in machine_kexec.c on PPC32, but we already have in setup-common.c on powerpc. All this does is call ppc_md.nvram_sync, which only powermac implements, so instead make machine_shutdown a ppc_md member and have it call core99_nvram_sync directly on powermac. I've also stuck relocate_kernel.S into misc_32.S for powerpc. Built for ARCH=ppc, and 32 & 64 bit ARCH=powerpc, with KEXEC=y/n. Booted on P5 LPAR and successfully kexec'ed. Should apply on top of 493f25ef4087395891c99fcfe2c72e62e293e89f. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-12[PATCH] powerpc: Fix clock spreading setting on some powermacsBenjamin Herrenschmidt1-5/+16
The code that sets the clock spreading feature of the Intrepid ASIC must not be run on some machine models or those won't boot. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19powerpc: Fix bug in timebase synchronization on 32-bit SMP powermacPaul Mackerras1-2/+4
We were using udelay in the loop on the primary cpu waiting for the secondary cpu to take the timebase value. Unfortunately now that udelay uses the timebase, and the timebase is stopped at this point, the udelay never terminated. This fixes it by not using udelay, and increases the number of loops before we time out to compensate. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] powerpc: add new powerbooks to feature tableOlof Johansson1-0/+8
Hi, The previous PowerBook patch didn't contain the feature table updates for ARCH=powerpc. Here they are. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-16[PATCH] powerpc: pci_64 fixes & cleanupsBenjamin Herrenschmidt1-30/+32
I discovered that in some cases (PowerMac for example) we wouldn't properly map the PCI IO space on recent kernels. In addition, the code for initializing PCI host bridges was scattered all over the place with some duplication between platforms. This patch fixes the problem and does a small cleanup by creating a pcibios_alloc_controller() in pci_64.c that is similar to the one in pci_32.c (just takes an additional device node argument) that takes care of all the grunt allocation and initialisation work. It should work for both boot time and dynamically allocated PHBs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-15powerpc: Remove __init from a function used in suspend/resume.Paul Mackerras1-1/+2
Suspend/resume on powermacs uses the pmac_get_boot_time function, so it can't be marked as __init. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14[PATCH] powerpc: kill ppc64 rtc.c, use genrtc insteadBenjamin Herrenschmidt1-1/+1
This moves the rtas RTC callbacks to rtas-rtc.c in arch/powerpc/kernel, and kills the rest of arch/ppc64/kernel/rtc.c which was just a duplicate of the genrtc functionality. Also enable build of genrtc for CONFIG_PPC64 (it just works are we already have the required callbacks) and enable it in all defconfigs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14[PATCH] powerpc: vdso fixes (take #2)Benjamin Herrenschmidt1-4/+4
This fixes various errors in the new functions added in the vDSO's, I've now verified all functions on both 32 and 64 bits vDSOs. It also fix a sign extension bug getting the initial time of day at boot that could cause the monotonic clock value to be completely on bogus for 64 bits applications (with either the vDSO or the syscall) on powermacs. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-10[PATCH] ppc64: fix PCI IO mappingBenjamin Herrenschmidt1-3/+0
phbs_remap_io(), which maps the PCI IO space into the kernel virtual space, is called too early on powermac, and thus doesn't work. This fixes it by removing the call from all platforms and putting it back into the ppc64 common code where it belongs, after the actual probing of the bus. That means that before that call, only the ISA IO space (if any) is mapped, any PIO access (from quirks for example) will fail. This happens not to be a problem for now, but we'll have to rework that code if it becomes one in the future. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-10powerpc: Fixes for 32-bit powermac SMPPaul Mackerras1-20/+31
A couple of bugs crept in with the merge of smp.c... Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-09powerpc: merge irq.cStephen Rothwell1-0/+3
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-11-08powerpc: Fix typo in pmac_cpufreq_resumePaul Mackerras1-1/+1
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-08[PATCH] ppc64: SMU based macs cpufreq supportBenjamin Herrenschmidt4-22/+334
CPU freq support using 970FX powertune facility for iMac G5 and SMU based single CPU desktop. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-03[PATCH] powerpc: always init nvram on 64-bit powermacDavid Woodhouse1-1/+1
Currently there is no Kconfig symbol to indicate that we want nvram support on 64-bit kernels; it's assumed we always want it, so make the powermac setup code always initialize the pmac nvram code if 64-bit. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-02powerpc: include lmb.h in arch/powerpc/platforms/powermac/setup.cPaul Mackerras1-0/+1
since it uses the lmb stuff in one place. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-02powerpc: exclude powerbook sleep code with CONFIG_PPC64 and CONFIG_PMPaul Mackerras1-4/+4
We were getting powerbook sleep code included, and giving compile errors, with CONFIG_PM=y on a 64-bit build. This excludes that code so the kernel will compile. One day BenH will implement on sleep on the G5... Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-27powerpc: Fix new-world powermac detectionPaul Mackerras1-1/+3
My G5 was being reported as an OldWorld in /proc/cpuinfo, which is obviously not right... :) Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-26powerpc: Merge 32-bit CHRP support.Paul Mackerras1-4/+0
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: Pull out MPC106 (grackle) initialization code into its own filePaul Mackerras1-44/+1
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-26[PATCH] powerpc: Some minor cleanups to setup_32.cKumar Gala1-3/+0
* 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-23powerpc: Run on old powermacs.Paul Mackerras1-2/+8
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>