Commit Graph

65056 Commits (5e14d21e3f28a4181dacff0336040e30942f4921)

Author SHA1 Message Date
Kumar Gala 5e14d21e3f [POWERPC] Add cpu feature for SPE handling
Make it so that SPE support can be determined at runtime.  This is similiar
to how we handle AltiVec.  This allows us to have SPE support built in and
work on processors with and without SPE.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:53:30 -05:00
Kumar Gala d8f1324a50 [POWERPC] 83xx: Removed PCI exclude of PHB
Now that the generic code doesn't assign resources for Freescale
PHBs we dont have to explicitly exclude it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:53:26 -05:00
Kumar Gala 1b3c5cdab4 [POWERPC] Move PCI nodes to be sibilings with SOC nodes
Updated the device trees to have the PCI nodes be at the same level as
the SOC node.  This is to make it so that the SOC nodes children address
space is just on chip registers and not other bus memory as well.

Also, for PCIe nodes added a P2P bridge to handle the virtual P2P bridge
that exists in the PHB.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:53:22 -05:00
Kumar Gala f0c8ac8083 [POWERPC] DTS cleanup
Removed the following cruft from .dts files:
* 32-bit in cpu node -- doesn't exist in any spec and not used by kernel
* removed built-in (chrp legacy)
* Removed #interrupt-cells in places they don't need to be set
* Fixed ranges on lite5200*
* Removed clock-frequency from i8259 pic node, not sure where this came from
* Removed big-endian from i8259 pic nodes, this was just bogus

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:53:16 -05:00
Kumar Gala 5d54ddcbcf [POWERPC] 85xx: Add basic Uniprocessor MPC8572 DS port
Added basic board port for MPC8572 DS reference platform that is
similiar to the MPC8544/33 DS reference platform in uniprocessor mode.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:51:54 -05:00
Kumar Gala 26caeb2ee1 [POWERPC] Handle alignment faults on SPE load/store instructions
This adds code to handle alignment traps generated by the following
SPE (signal processing engine) load/store instructions, by emulating
the instruction in the kernel (as is done for other instructions that
generate alignment traps):

evldd[x]         Vector Load Double Word into Double Word [Indexed]
evldw[x]         Vector Load Double into Two Words [Indexed]
evldh[x]         Vector Load Double into Four Half Words [Indexed]
evlhhesplat[x]   Vector Load Half Word into Half Words Even and Splat [Indexed]
evlhhousplat[x]  Vector Load Half Word into Half Word Odd Unsigned and Splat [Indexed]
evlhhossplat[x]  Vector Load Half Word into Half Word Odd Signed and Splat [Indexed]
evlwhe[x]        Vector Load Word into Two Half Words Even [Indexed]
evlwhou[x]       Vector Load Word into Two Half Words Odd Unsigned (zero-extended) [Indexed]
evlwhos[x]       Vector Load Word into Two Half Words Odd Signed (with sign extension) [Indexed]
evlwwsplat[x]    Vector Load Word into Word and Splat [Indexed]
evlwhsplat[x]    Vector Load Word into Two Half Words and Splat [Indexed]
evstdd[x]        Vector Store Double of Double [Indexed]
evstdw[x]        Vector Store Double of Two Words [Indexed]
evstdh[x]        Vector Store Double of Four Half Words [Indexed]
evstwhe[x]       Vector Store Word of Two Half Words from Even [Indexed]
evstwho[x]       Vector Store Word of Two Half Words from Odd [Indexed]
evstwwe[x]       Vector Store Word of Word from Even [Indexed]
evstwwo[x]       Vector Store Word of Word from Odd [Indexed]

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:51:48 -05:00
Scott Wood f923473611 [POWERPC] fsl_soc.c cleanup
1. Update the way get_brgfreq() finds things in the device tree.

It now uses names that are less namespace polluting.  The old names
are supported until all boards are converted.

2. "size" is changed from unsigned int to int, to match what
of_get_property() expects.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:51:43 -05:00
Jon Loeliger 683d00b03e [POWERPC] 85xx: Remove unnecessary loops_per_jiffy initialization code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:51:36 -05:00
Jon Loeliger d347b3291b [POWERPC] 86xx: Remove unnecessary loops_per_jiffy initialization code.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:51:32 -05:00
Guennadi Liakhovetski 7f2862c345 [POWERPC] linkstation updates
1. Fix RTC type - it is a rs5c372a, not rs5c372b
2. Configure both UART interrupts edge-triggered
3. Add a license header to ls_uart.c
4. Check for running on linkstation in a late_initcall() function. Needed
   for multiplatform builds, even though linkstation doesn't support them
   yet
5. Remove unneeded #include from linkstation.c

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-14 08:51:27 -05:00
Kumar Gala 7f50382dc8 [POWERPC] 85xx: Clean up from 85xx_ds rename
Renamed functions in 85xx_ds from 8544 to 85xx.

Kept an unique machine def/probe for the MPC8544 DS board to
handle some subtle differences between the future board based
on the DS platform.

Also fixed building w/o CONFIG_PCI and minor whitespace fixes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-13 15:45:03 -05:00
Kumar Gala 16d24060d1 [POWERPC] 85xx: Renamed mpc8544_ds.c to mpc85xx_ds.c
Renamed the mpc8544_ds.c board code to mpc85xx_ds.c to make it more
generic in prep for other boards based on the same platform.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-13 15:43:48 -05:00
Kumar Gala 89a300e85b ucc_geth: kill unused include
The ucc_geth_mii code is based on the gianfar_mii code that use to include
ocp.h.  ucc never need this and it causes issues when we want to kill
arch/ppc includes from arch/powerpc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-13 15:43:46 -05:00
Geoff Levand 75cdff9242 [POWERPC] PS3: Enhance storage probe debug output
Add some more info to the PS3 storage probe debug output.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:26 +10:00
Geert Uytterhoeven 06462d9263 [POWERPC] PS3: Add new LV1 error codes
Add new error codes that may be returned by the LV1 hypervisor

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:25 +10:00
Jeremy Kerr 85d02924a3 [POWERPC] PS3: Fix CONFIG_SMP=n, CONFIG_KEXEC=y build
Currently, the ps3 kernel fails to build without smp but with kexec, as
ps3_kexec_cpu_down needs ps3_smp_cleanup_cpu, which isn't defined on UP
kernels. This change adds an empty ps3_smp_cleanup_cpu for UP kernels.

Booted on ps3.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:25 +10:00
Olof Johansson 0d72ba930c [POWERPC] Add workaround for MPICs with broken register reads
Some versions of PWRficient 1682M have an interrupt controller in which
the first register in each pair for interrupt sources doesn't always
read with the right polarity/sense values.

To work around this, keep a software copy of the register instead.  Since
it's not modified from the mpic itself, it's a feasible solution.  Still,
keep it under a config option to avoid wasting memory on other platforms.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:25 +10:00
David Gibson 2099172d61 [POWERPC] Document and implement an improved flash device binding for powerpc
This replaces the binding for flash chips in booting-without-of.txt
with an clarified and improved version.  It also makes
drivers/mtd/maps/physmap_of.c recognize this new binding.  Finally it
revises the Ebony device tree source to use the new binding as an
example.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:25 +10:00
Linas Vepstas 3c607ce2a3 [POWERPC] setup_64.c and prom.c comment cleanup
Grammatical corrections to comments.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:24 +10:00
Linas Vepstas 70c6cc37db [POWERPC] prom.c whitespace cleanup
Whitespace cleanup: badly indented lines.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:24 +10:00
Linas Vepstas e788ff13be [POWERPC] prom_init whitespace cleanup, typo fix
Whitespace cleanup: badly indented lines.
Typo in comment.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:24 +10:00
Scott Wood bde6c6e16a [POWERPC] Check _PAGE_RW and _PAGE_PRESENT on kernel addresses
Previously, the TLB miss handlers assumed that pages above KERNELBASE are
always present and read/write.  This assumption is false in the case of
CONFIG_DEBUG_PAGEALLOC.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:23 +10:00
Scott Wood 96ebc3bfb6 [POWERPC] bootwrapper: Only print MAC addresses when the node is actually present
Some firmwares (such as PlanetCore) only provide a base MAC address, and
expect the kernel to set certain bits to generate the addresses for the
other ports.  As such, MAC addresses are generated that may not correspond
to actual hardware.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:23 +10:00
Scott Wood 21f3fe2f7a [POWERPC] bootwrapper: Add get_path()
This will be used by the PlanetCore firmware support to construct
a linux,stdout-path from the serial node that it finds.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:23 +10:00
Scott Wood 9de782770b [POWERPC] bootwrapper: Add strtoull()
This will be needed by PlanetCore firmware support.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:23 +10:00
Scott Wood 4674f2f339 [POWERPC] bootwrapper: flatdevtree fixes
1. ft_create_node was returning the internal pointer rather than a phandle.
2. ft_find_device_rel was treating a "top" phandle of NULL as an error,
rather than as the root of the tree.  The old, absolute ft_find_device
is removed, and the relative version is renamed to ft_find_device().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:23 +10:00
Olof Johansson 6bcc4c0175 [POWERPC] Remove warning in arch/powerpc/kernel/sysfs.c
Fixes:

arch/powerpc/kernel/sysfs.c: In function 'cpu_add_sysdev_attr_group':
arch/powerpc/kernel/sysfs.c:388: warning: ignoring return value of
	'sysfs_create_group', declared with attribute warn_unused_result

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:22 +10:00
Olof Johansson a416561bf7 [POWERPC] Move lowlevel runlatch calls under cpu feature control
There's no need to call the runlatch on functions on processors that
don't implement them (CPU_FTR_CTRL).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:22 +10:00
Olof Johansson 01f1c735f5 [POWERPC] Remove unused platform_machine_check()
Remove leftover cruft from ARCH=ppc.

There are no users of platform_machine_check() in ARCH=powerpc, and none
should be added (they should use ppc_md.machine_check_handler instead).

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:22 +10:00
Olof Johansson 3850169dbd [POWERPC] pasemi: Move pasemi_idle_init() to late_initcall()
Move pasemi_idle_init() to be a late_initcall instead of being called from
setup_arch().  This way the cpufreq driver has a chance to initialize and
save away the boot time astate before we go to idle for the first time.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:22 +10:00
Olof Johansson cd7834167f [POWERPC] pasemi: Print more information at machine check
Add printout of some SoC error status registers, and dump the SLB contents
for those machine check events where it makes sense.

Since we can't go about and ioremap registers at machine check time,
and we generally want to do as little as possible to print out the
information, pre-build a table of the registers to dump and their address
in the common PCI config space range.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:21 +10:00
Olof Johansson 2e1957fd47 [POWERPC] pasemi: Export more SPRs to sysfs when CONFIG_DEBUG_KERNEL=y
Export some of the implementation-specific registers via sysfs.
Useful when debugging, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:21 +10:00
Olof Johansson 4d442331e5 [POWERPC] pasemi: Add workaround for erratum 5945
Erratum 5945 causes some of the registers on the PCIe root ports to
not read correctly.  Do a small dance to avoid this: Write an unused
register, read the value and write it back.  Thankfully this is not in
a hot code path.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:21 +10:00
Olof Johansson 68c8404c74 [POWERPC] pasemi: Add pasemi_pci_getcfgaddr()
Add pasemi_pci_getcfgaddr(), to get the remapped address of a specific
config register for a PCI device.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:21 +10:00
Olof Johansson a302cb9d95 [POWERPC] Export new __io{re,un}map_at() symbols
Export new __io{re,un}map_at() symbols so modules can use them.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:21 +10:00
Michael Ellerman 60b332e755 [POWERPC] Export virq mapping via debugfs
This adds a debugfs file "powerpc/virq_mapping", which shows the virtual
to real mapping of irq numbers.  Enable it with CONFIG_VIRQ_DEBUG.

Signed-off-by: Zhang Wei <wei.zhang@freescale.com>
Signed-off-by: Chen Gong <G.Chen@freescale.com>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:20 +10:00
Michael Ellerman 7866291d4c [POWERPC] Initialise hwirq for legacy irqs
Although no one uses the hwirq value for legacy irqs at the moment, we
should really setup the correct value in the irq_map.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:20 +10:00
Michael Ellerman 6815800601 [POWERPC] Provide a default irq_host match, which matches on an exact of_node
The most common match semantic is an exact match based on the device node.
So provide a default implementation that does this, and hook it up if no
match routine is specified.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:20 +10:00
Michael Ellerman 8528ab84eb [POWERPC] Invert null match behaviour for irq_hosts
Currently if you don't specify a match callback for your irq_host it's
assumed you match everything. This is a kind of opt-out approach, and
turns out to be the exception rather than the rule.

So change the semantics to be opt-in, ie. you don't match anything unless
you provide a match callback.  This in itself isn't very useful, but will
allow us to provide a default match implementation in a subsequent patch.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:20 +10:00
Michael Ellerman 52964f87c6 [POWERPC] Add an optional device_node pointer to the irq_host
The majority of irq_host implementations (3 out of 4) are associated
with a device_node, and need to stash it somewhere. Rather than having
it somewhere different for each host, add an optional device_node pointer
to the irq_host structure.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:20 +10:00
David Gibson 0ae0b54565 [POWERPC] Move bootwrapper's strchr() and strncmp() from .h to string.S
Currently the bootwrapper has implementations of strchr() and
strncmp(), but they're inlines in flatdevtree_env.h, rather than in
string.S with all the rest of the string functions.  This moves
them to string.S.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:19 +10:00
Linas Vepstas 768cc2d3b2 [POWERPC] IOMMU virtual merge is no longer experimental
Per conversations with BenH, IOMMU virtual merging should no longer
be considered to be an "experimental" feature.  In particular,
CONFIG_VMERGE has been set to "y" in the defconfigs for quite a while.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

----
 arch/powerpc/Kconfig |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-14 01:33:19 +10:00
Paul Mackerras b2315372ea Merge branch 'linux-2.6' into for-2.6.24 2007-09-14 01:24:25 +10:00
Linus Torvalds c87ce65868 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Move serial_dev_init to device_initcall()
  [POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575 to fix compile issue
  [POWERPC] cpm2: Fix off-by-one error in setbrg().
  [PPC] 8xx: Fix r3 trashing due to 8MB TLB page instantiation
  [POWERPC] 8{5,6}xx: Fix build issue with !CONFIG_PCI
2007-09-12 12:23:51 -07:00
Rusty Russell c413fecc76 lguest: Fix guest crash when CONFIG_X86_USE_3DNOW=y
One of the very first things lguest_init() does is a memcpy.  On
Athlon/Duron/K7 or CyrixIII/VIA-C3 or Geode GX/LX, this tries to use
MMX.

memcpy -> _mmx_memcpy -> kernel_fpu_begin -> clts -> paravirt_ops.clts

But we haven't set paravirt_ops.clts yet, so we do the native version
and crash.  The simplest solution is to use __memcpy.

Thanks to Michael Rasenberger for the bug report.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12 12:19:46 -07:00
Olof Johansson ee56c47440 [POWERPC] Move serial_dev_init to device_initcall()
With the I/O space rewrite by BenH, the legacy_serial serial_dev_init()
initcall is now called before I/O space is setup, but it's dependent on
it being available.

Since there's no way to make dependencies between initcalls, we'll just
have to move it to device_initcall(). Yes, it's suboptimal but I'm not
aware of any better solution at this time, and it fixes a regression
from 2.6.22.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-13 04:09:14 +10:00
Andi Kleen 9863b78a1a i386: Fix leak of ../kernel from top level
Fix a compile error when the directory above the kernel source contains
a file named "kernel".  Originally from Ben LaHaise, modified based on
feedback from Sam Ravnborg

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ben LaHaise <bcrl@kvack.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12 09:28:06 -07:00
Andi Kleen 2966c6a03e x86_64: Prevent doing anything from cache_remove_dev() when info setup failed.
AK: Removed the unlikelies because gcc heuristics default to unlikely
AK: for test == NULL and for negative returns.

Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12 09:28:06 -07:00
Andi Kleen 95b0867996 x86_64: Add missing mask operation to vdso
vdso vgetns() didn't mask the time source offset calculation, which
could lead to time problems with 32bit HPET.  Add the masking.

Thanks to Chuck Ebbert for tracking this down.

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12 09:28:06 -07:00
Linus Torvalds 99364df764 Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: Add missing include for leds.h
2007-09-12 09:17:40 -07:00