Commit Graph

51487 Commits

Author SHA1 Message Date
Akinobu Mita 928370c676 [POWERPC] Enable make install
make help on powerpc says make install is available.
But it failed due to no rule to make install.

This patch enables make install to work.

Signed-off-by: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 21:13:43 +10:00
Benjamin Herrenschmidt 57647a4dad [POWERPC] Always use -mno-string
The string load/store instructions are unimplemented on some processors
and slow (microcoded) on some others.  It's simplest to just not use
them at all.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 21:13:35 +10:00
Anton Blanchard f13659e0b3 [POWERPC] Fix WARN_ON when entering xmon
Whenever we enter xmon we get a WARN_ON out of the rtas code since it
thinks interrupts are still on:

Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xd000000000080008
cpu 0x3: Vector: 300 (Data Access) at [c0000000075dba00]
    pc: d000000000080008: .doit+0x8/0x40 [oopser]
    lr: c000000000077704: .sys_init_module+0x1664/0x1824
    sp: c0000000075dbc80
   msr: 9000000000009032
   dar: 0
 dsisr: 42000000
  current = 0xc000000003fa64b0
  paca    = 0xc000000000694280
    pid   = 2260, comm = insmod

------------[ cut here ]------------
Badness at arch/powerpc/kernel/entry_64.S:651
Call Trace:
[C0000000075DAE70] [C00000000000EB64] .show_stack+0x68/0x1b0 (unreliable)
[C0000000075DAF10] [C000000000216254] .report_bug+0x94/0xe8
[C0000000075DAFA0] [C00000000047B140] __kprobes_text_start+0x178/0x584
[C0000000075DB040] [C0000000000044F4] program_check_common+0xf4/0x100

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 21:13:28 +10:00
Will Schmidt e7273d2a08 [POWERPC] Replace if-then-else with a switch statement
Convert a compound if-else blob to a switch statement.
This better fits the kernel coding style.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 21:13:21 +10:00
Domen Puncer 5dd60166c2 [POWERPC] Fix typos in booting-without-of.txt
Fix typos + some cosmetic changes.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 21:13:14 +10:00
Olof Johansson 2e0c3370b3 [POWERPC] pasemi: Cpufreq driver
Cpufreq driver for PA Semi PWRficient processors.

Signed-off-by: Egor Martovetsky <egor@pasemi.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 15:51:57 +10:00
Olof Johansson 116ab40df8 [POWERPC] pasemi: Kconfig for gpio_mdio
arch/powerpc/platforms/pasemi/gpio_mdio.c really depends on CONFIG_PHYLIB.
Add a config option for it, allow for it to be disabled if needed and fix
the dependency.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 15:51:56 +10:00
Olof Johansson 952418cd38 [POWERPC] pasemi: Remove build warning
arch/powerpc/platforms/pasemi/setup.c: In function 'pasemi_publish_devices':
arch/powerpc/platforms/pasemi/setup.c:220: warning: implicit declaration of function 'of_platform_bus_probe'

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 15:51:56 +10:00
Stephen Rothwell 5bcec54f02 [POWERPC] Partially revert a7edd0e676
Due to conflicts with the network drivers tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 15:51:56 +10:00
Stephen Rothwell 01b2726dd1 [POWERPC] Rename get_property to of_get_property: partial drivers
This does drivers/machintosh and the hvc code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-27 15:51:56 +10:00
Paul Mackerras a48141db68 Revert "[POWERPC] Rename get_property to of_get_property: drivers"
This reverts commit d05c7a80cf,
which included changes which should go via other subsystem
maintainers.
2007-04-26 22:24:31 +10:00
Paul Mackerras 0999ed7f57 Revert "[POWERPC] DMA 4GB boundary protection"
This reverts commit 618d3adc35, because
it is superseded by 569975591c.
2007-04-26 19:48:15 +10:00
Alan Cox c78f830547 [POWERPC] via-pmu: Switch to ref counting PCI API
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:13:18 +10:00
Alan Cox ab4627683a [POWERPC] pci_32.c: Switch to ref counting PCI API
pci_find_slot isn't hot-plug safe.  Move this code to the pci hotplug
safe equivalent and hold a refcount properly while doing
make_one_node_map.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:12:20 +10:00
David Gibson 37f01d64d8 [POWERPC] Abolish PHYS_FMT macro from arch/powerpc
32-bit powerpc systems define a macro, PHYS_FMT, giving a printf
format string fragment for displaying physical addresses, since most
32-bit powerpc platforms use 32-bit physical addresses but a few use
64-bit physical addresses.

This macro is used in exactly one place, a rare error message, where
we can solve the problem more simply by just unconditionally casting
the address up to 64-bit quantity before formatting it.

This patch does so, meaning that as we bring MMU definitions from
asm-ppc over to asm-powerpc, cleaning them up in the process, we don't
need to implement this ugly macro (which additionally has a very bad
name for something global).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:11:16 +10:00
Stephen Rothwell 30686ba6d5 [POWERPC] Remove old interface find_devices
Replace uses with of_find_node_by_name and for_each_node_by_name.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:09:02 +10:00
Stephen Rothwell 1658ab6678 [POWERPC] Remove old interface find_type_devices
Replaced by of_find_node_by_type.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:09:01 +10:00
Stephen Rothwell 8c8dc32248 [POWERPC] Remove old interface find_path_device
Replaced by of_find_node_by_path.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:08:59 +10:00
Stephen Rothwell 112466b4d0 [POWERPC] Remove find_all_nodes
This old interface has no more users.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:08:58 +10:00
Stephen Rothwell 4bf56e1725 [POWERPC] Remove find_compatible_devices
This is an old interface and is replaced by of_find_compatible_node.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:08:57 +10:00
David Gibson 6210230725 [POWERPC] Cleanup and fix breakage in tlbflush.h
BenH's commit a741e67969 in powerpc.git,
although (AFAICT) only intended to affect ppc64, also has side-effects
which break 44x.  I think 40x, 8xx and Freescale Book E are also
affected, though I haven't tested them.

The problem lies in unconditionally removing flush_tlb_pending() from
the versions of flush_tlb_mm(), flush_tlb_range() and
flush_tlb_kernel_range() used on ppc64 - which are also used the
embedded platforms mentioned above.

The patch below cleans up the convoluted #ifdef logic in tlbflush.h,
in the process restoring the necessary flushes for the software TLB
platforms.  There are three sets of definitions for the flushing
hooks: the software TLB versions (revised to avoid using names which
appear to related to TLB batching), the 32-bit hash based versions
(external functions) amd the 64-bit hash based versions (which
implement batching).

It also moves the declaration of update_mmu_cache() to always be in
tlbflush.h (previously it was in tlbflush.h except for PPC64, where it
was in pgtable.h).

Booted on Ebony (440GP) and compiled for 64-bit and 32-bit
multiplatform.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:08:56 +10:00
Olof Johansson 687304014f [POWERPC] Save trap number in bad_stack
Save the trap number in the case of getting a bad stack in an exception
handler. It is sometimes useful to know what exception it was that caused
this to happen. Without this, no trap number is reported.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:06:59 +10:00
Michael Ellerman 6cfef5b27e [POWERPC] Rename MPIC_BROKEN_U3 to MPIC_U3_HT_IRQS
Rename MPIC_BROKEN_U3 to something a little more descriptive. Its
effect is to enable support for HT irqs behind the PCI-X/HT bridge on
U3/U4 (aka. CPC9x5) parts.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:06:58 +10:00
Grant Likely e3f64788d3 [POWERPC] Fix comment typo in Kurobox device tree
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:06:56 +10:00
Geert Uytterhoeven 4ca478e606 [POWERPC] bootwrapper: Use `unsigned long' for malloc sizes
Use `unsigned long' for malloc sizes, to match common practice and types used
by most callers and callees.
Also use `unsigned long' for integers representing pointers in simple_alloc.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@eu.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 22:06:54 +10:00
David Gibson e58923ed14 [POWERPC] Add arch/powerpc driver for UIC, PPC4xx interrupt controller
This patch adds a driver to arch/powerpc/sysdev for the UIC, the
on-chip interrupt controller from IBM/AMCC 4xx chips.  It uses the new
irq host mapping infrastructure.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:32:01 +10:00
David Gibson f65573314e [POWERPC] Re-organize Kconfig code for 4xx in arch/powerpc
Now that we always take a device tree in arch/powerpc, there's no good
reason not to allow a single kernel to support multiple embedded 4xx
boards - the correct platform code can be selected based on the device
tree information.

Therefore, this patch re-arranges the 4xx Kconfig code to allow this.
In addition we:
	- use "select" instead of depends to configure the correct
	  config options for specific 4xx CPUs and workarounds, which
	  makes the information about specific boards and CPUs less
	  scattered.
	- Some old, unused (in arch/powerpc) config options are
	  removed: WANT_EARLY_SERIAL, IBM_OCP, etc.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:32:00 +10:00
Ananth N Mavinakayanahalli e6349a958b [POWERPC] kprobes: Eliminate sstep exception if instruction can be emulated
For cases when probes are placed on instructions that can be emulated,
don't take the single-step exception.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:58 +10:00
Ananth N Mavinakayanahalli 6888199f7f [POWERPC] Emulate more instructions in software
Emulate a few more instructions in software - especially useful during
singlestepping (xmon/kprobes).

Instructions emulated with this patch are mfcr/mtcr rX, mfxer/mtxer rX,
mflr/mtlr rX, mfctr/mtctr rX and mr rA,rB.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:57 +10:00
Scott Wood 5cc5133a29 [POWERPC] bootwrapper: cuboot for 83xx
This adds cuboot support for MPC83xx platforms.

A device tree used with this must have linux,stdout-path in /chosen and
linux,network-index in any network device nodes that need mac addresses
assigned.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:56 +10:00
Scott Wood 9b1c59e256 [POWERPC] bootwrapper: Add ppcboot.h
This file describes the bd_t struct, which is used by old versions of
U-boot to pass information to the kernel.  Platform code that needs to
interoperate with such firmware can use this; it should not be used for
anything new.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:55 +10:00
Scott Wood 0fdd717ed4 [POWERPC] bootwrapper: Add a cuboot platform and a cuImage target
The cuImage target will build a uImage with bootwrapper code and a device
tree.  The default device tree and platform file are determined by the
kernel configuration.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:54 +10:00
Scott Wood 270429baa9 [POWERPC] bootwrapper: Add CONFIG_DEVICE_TREE
This provides a way to tell the bootwrapper makefile which device tree to
include by default.  The wrapper can still be invoked standalone to wrap
with a different device tree without reconfiguring the kernel, if that is
desired.

The user will only be asked to provide a device tree if the platform
selects CONFIG_WANT_DEVICE_TREE.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:53 +10:00
Olof Johansson b97d279143 [POWERPC] pasemi: GPIO MDIO of_platform driver
MDIO driver for PHY's connected via GPIO as on the PA Semi Electra
eval board.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:52 +10:00
Olof Johansson 25fc530eed [POWERPC] pasemi: PA6T oprofile support
Oprofile support for PA6T, kernel side.

Also rename the PA6T_SPRN.* defines to SPRN_PA6T.*.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:51 +10:00
Olof Johansson 7e8bddf566 [POWERPC] pasemi: Reset mpic on boot
Reset MPIC on boot to clear some timer state that firmware might
leave configured.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:50 +10:00
Olof Johansson 62357d8215 [POWERPC] pasemi: Enable one more hid bit
Minor HID change. Firmware can't know that we want this set so we have
to set it in the kernel.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:49 +10:00
Olof Johansson df7e70a2b0 [POWERPC] pasemi: Allow 8KB config space for I/O bridge
Device 0 function 0 on the root bus is really a two-function bus agent,
but only the first function is visible. Because of this, we need to
allow config accesses into the second range. Modify the check for valid
offsets accordingly.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:48 +10:00
Josh Boyer a14c4508f4 [POWERPC] Fix PowerPC 750CL and 750GX CPU features
PowerPC 750CL has high BATs.  The patch below adds a CPU_FTRS_750CL that
includes that.  Without it, the original firmware mappings in the high BATs
aren't cleared which continue to override the linux translations.

It also adds CPU_FTR_COMMON to CPU_FTRS_750GX for completeness.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:47 +10:00
will schmidt c3ea6921a6 [POWERPC] hvc_console: Typo fixes
Fix a handful of comment typos for hvc_console.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:46 +10:00
Will Schmidt b791072ba3 [POWERPC] hvc_console: Polling mode timer backoff
Add a back-off mechanism to hvc_console's polling logic.   This change
drops the timers/second ratio from ~90 to ~1/2 while the console is
idle.
This change is most noticeable when watching /proc/timer_stats output.

This only affects when the hvc_console is running in poll mode, i.e.
power4 and cell systems.

I've tested on Power4, Michael Ellerman has both contributed to the
patch and tested on cell.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:43 +10:00
Stephen Rothwell b3a6d2a54b [POWERPC] Rename last get_property calls
These got added recently.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 21:31:40 +10:00
Paul Mackerras edfedbf0cd [POWERPC] Partially revert "Add correct interrupt property for pegasos ide"
It turns out that commit e48059225c
breaks some existing systems that use the via82cxxx driver.  This
reverts the change to via82cxxx.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24 13:57:12 +10:00
Paul Mackerras b142eb3a5a Merge branch 'for-2.6.22' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6 into for-2.6.22 2007-04-24 11:46:09 +10:00
Paul Mackerras 13177c8b7e Merge branch 'spufs' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6 into for-2.6.22 2007-04-24 11:45:03 +10:00
Paul Mackerras 445c9b5507 Merge branch 'kconfig' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.22 2007-04-24 08:42:11 +10:00
Arnd Bergmann c6d344819e [POWERPC] update cell_defconfig
Sync with the Kconfig changes, and enable some options for celleb

Cc: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23 21:44:41 +02:00
Jeremy Kerr 150f7e3cfe [POWERPC] cell: enable RTAS-based PTCAL for Cell XDR memory
Enable Periodic Recalibration (PTCAL) support for Cell XDR memory,
using the new ibm,cbe-start-ptcal and ibm,cbe-stop-ptcal RTAS calls.

Tested on QS20 and QS21 (by Thomas Huth). It seems that SLOF has
problems disabling, at least on QS20; this patch should only be
used once these problems have been addressed.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23 21:44:41 +02:00
Christian Krafft 9dd855a729 [POWERPC] cell: add support for proper device-tree
This patch adds support for a proper device-tree.
A porper device-tree on cell contains be nodes
for each CBE containg nodes for SPEs and all the
other special devices on it.
Ofcourse oldschool devicetree is still supported.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23 21:44:40 +02:00
Christian Krafft 6bf05fd776 [POWERPC] add of_iomap function
The of_iomap function maps memory for a given
device_node and returns a pointer to that memory.
This is used at some places, so it makes sense to
a seperate function.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23 21:44:40 +02:00