]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
16 years ago[POWERPC] Various fixes to pcibios_enable_device()
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:55:00 +0000 (14:55 +1100)]
[POWERPC] Various fixes to pcibios_enable_device()

Our implementation of pcibios_enable_device() has a couple of problems.

One is that it should not check IORESOURCE_UNSET, as this might be
left dangling after resource assignment (shouldn't but there are
bugs), but instead, we make it check resource->parent which should
be a reliable indication that the resource has been successfully
claimed (it's in the resource tree).

Then, we also need to skip ROM resources that haven't been enabled
as x86 does.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Clear pci_probe_only on 64 bits PowerMac
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:58 +0000 (14:54 +1100)]
[POWERPC] Clear pci_probe_only on 64 bits PowerMac

It should now be safe to re-assign unassigned resources on 64 bits PowerMac
machines (G5s).  This clears pci_probe_only on those.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fixup powermac enable device hook
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:57 +0000 (14:54 +1100)]
[POWERPC] Fixup powermac enable device hook

Powermac's use of the pcibios_enable_device_hook() got slightly
broken by the recent PCI merge in that it won't be called for
the "initial" case of assigning resources to a previously
unassigned device.  This was an abuse of that hook anyway, so
instead we now use a header quirk.

While at it, we move a #ifdef CONFIG_PPC32 to enclose more code
that is only ever used on 32 bits.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge 32 and 64 bits pcibios_enable_device
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:57 +0000 (14:54 +1100)]
[POWERPC] Merge 32 and 64 bits pcibios_enable_device

This merge the two implementations, based on the previously
fixed up 32 bits one.  The pcibios_enable_device_hook in ppc_md
is now available for ppc64 use.  Also remove the new unused
"initial" parameter from it and fixup users.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Updates/fixes to 32 bits pcibios_enable_device()
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:56 +0000 (14:54 +1100)]
[POWERPC] Updates/fixes to 32 bits pcibios_enable_device()

Our implementation of pcibios_enable_device() incorrectly ignores
the mask argument and always checks that all resources have been
allocated, which isn't the right thing to do anymore.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] fix iSeries PCI resource management
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:55 +0000 (14:54 +1100)]
[POWERPC] fix iSeries PCI resource management

The way iSeries manages PCI IO and Memory resources is a bit strange
and is based on overriding the content of those resources with home
cooked ones afterward.

This changes it a bit to better integrate with the new resource handling
so that the "virtual" tokens that iSeries replaces resources with are
done from the proper per-device fixup hook, and bridge resources are
set to enclose that token space.  This fixes various things such as
the output of /proc/iomem & ioports, among others.  This also fixes up
various boot messages as well.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge PCI resource allocation & assignment
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:53 +0000 (14:54 +1100)]
[POWERPC] Merge PCI resource allocation & assignment

The 32 bits PCI code now uses the generic code for assigning unassigned
resources and an algorithm similar to x86 for claiming existing ones.

This works far better than the 64 bits code which basically can only
claim existing ones (pci_probe_only=1) or would fall apart completely.

This merges them so that the new 32 bits implementation is used for both.

64 bits now gets the new PCI flags for controlling the behaviour, though
the old pci_probe_only global is still there for now to be cleared if you
want to.

I kept a pcibios_claim_one_bus() function mostly based on the old 64
bits code for use by the DLPAR hotplug. This will have to be cleaned
up, thought I hope it will work in the meantime.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge PCI resource fixups
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:51 +0000 (14:54 +1100)]
[POWERPC] Merge PCI resource fixups

The PCI code in 32 and 64 bits fixes up resources differently.

32 bits uses a header quirk plus handles bridges in pcibios_fixup_bus()
while 64 bits does things in various places depending on whether you
are using OF probing, using PCI hotplug, etc...

This merges those by basically using the 32 bits approach for both,
with various tweaks to make 64 bits work with the new approach.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge pcibios_resource_to_bus/bus_to_resource
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:50 +0000 (14:54 +1100)]
[POWERPC] Merge pcibios_resource_to_bus/bus_to_resource

This merges the PowerPC 32 and 64 bits version of pcibios_resource_to_bus
and pcibios_bus_to_resource().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci32: Add platform option to enable /proc PCI domains
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:49 +0000 (14:54 +1100)]
[POWERPC] pci32: Add platform option to enable /proc PCI domains

This adds flags the platforms can use to enable domain numbers
in /proc/bus/pci.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci32: Remove obsolete PowerMac bus number hack
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:48 +0000 (14:54 +1100)]
[POWERPC] pci32: Remove obsolete PowerMac bus number hack

The 32 bits PCI code carries an old hack that was only useful for G5
machines.  Nowdays, the 32 bits kernel doesn't support any of those
machines anymore so the hack is basically never used, so remove it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci32: Add flags modifying the PCI code behaviour
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:46 +0000 (14:54 +1100)]
[POWERPC] pci32: Add flags modifying the PCI code behaviour

This adds to the 32 bits PCI code some flags, replacing the old
pci_assign_all_busses global, that allow us to control various
aspects of the PCI probing, such as whether to re-assign all
resources or not, or to not try to assign anything at all.

This also adds the flag x86 already has to avoid ISA alignment
on bridges that don't have ISA forwarding enabled (no legacy
devices on the top level bus) and sets it for PowerMacs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci32: Remove PowerMac P2P bridge IO hack
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:44 +0000 (14:54 +1100)]
[POWERPC] pci32: Remove PowerMac P2P bridge IO hack

The 32 bits PowerPC PCI code has a hack for use by some PowerMacs
to try to re-open PCI<->PCI bridge IO resources that were closed
by the firmware.  This is no longer necessary as the generic code
will now do that for us.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci32: Use generic pci_assign_unassign_resources
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:43 +0000 (14:54 +1100)]
[POWERPC] pci32: Use generic pci_assign_unassign_resources

This makes the 32 bits PowerPC PCI code use the generic code to assign
resources to devices that had unassigned or conflicting resources.

This allow us to remove the local implementation that was incomplete and
could not assign for example a PCI<->PCI bridge from scratch, which is
needed on various embedded platforms.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci32: Remove bogus alignment message
Benjamin Herrenschmidt [Thu, 20 Dec 2007 03:54:42 +0000 (14:54 +1100)]
[POWERPC] pci32: Remove bogus alignment message

There's a stale & bogus piece of code in 32 bits PCI code that
complains about ISA related alignment issues.  Just remove it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Use embedded dtc in kernel builds
David Gibson [Tue, 18 Dec 2007 04:07:20 +0000 (15:07 +1100)]
[POWERPC] Use embedded dtc in kernel builds

This patch alters the kernel makefiles to build dtc from the sources
embedded in the previous patch.  It also changes the
arch/powerpc/boot/wrapper script to use the embedded dtc, rather than
expecting a copy of dtc already installed on the system.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge dtc upstream source
David Gibson [Tue, 18 Dec 2007 04:06:42 +0000 (15:06 +1100)]
[POWERPC] Merge dtc upstream source

This incorporates a copy of dtc into the kernel source, in
arch/powerpc/boot/dtc-src.  This commit only imports the upstream
sources verbatim, a later commit will actually link it into the kernel
Makefiles and use the embedded code during the kernel build.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] holly.c: Remove unnecessary include of linux/ide.h
Olof Johansson [Mon, 17 Dec 2007 23:04:34 +0000 (10:04 +1100)]
[POWERPC] holly.c: Remove unnecessary include of linux/ide.h

There's nothing in holly.c that needs linux/ide.h, just remove it from
the list of includes.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] include/asm-ppc/: Spelling fixes
joe@perches.com [Mon, 17 Dec 2007 19:30:15 +0000 (06:30 +1100)]
[POWERPC] include/asm-ppc/: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] arch/ppc/: Spelling fixes
joe@perches.com [Mon, 17 Dec 2007 19:30:14 +0000 (06:30 +1100)]
[POWERPC] arch/ppc/: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] include/asm-powerpc/: Spelling fixes
joe@perches.com [Mon, 17 Dec 2007 19:30:13 +0000 (06:30 +1100)]
[POWERPC] include/asm-powerpc/: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] arch/powerpc/: Spelling fixes
joe@perches.com [Mon, 17 Dec 2007 19:30:12 +0000 (06:30 +1100)]
[POWERPC] arch/powerpc/: Spelling fixes

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Implement pci_set_dma_mask() in terms of the dma_ops
Michael Ellerman [Mon, 17 Dec 2007 06:35:53 +0000 (17:35 +1100)]
[POWERPC] Implement pci_set_dma_mask() in terms of the dma_ops

PowerPC currently doesn't implement pci_set_dma_mask(), which means drivers
calling it will get the generic version in drivers/pci/pci.c.

The powerpc dma mapping ops include a dma_set_mask() hook, which luckily is
not implemented by anyone - so there is no bug in the fact that the hook
is currently never called.

However in future we'll add implementation(s) of dma_set_mask(), and so we
need pci_set_dma_mask() to call the hook.

To save adding a hook to the dma mapping ops, pci-set_consistent_dma_mask()
simply calls the dma_set_mask() hook and then copies the new mask into
dev.coherenet_dma_mask.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Optimize account_system_vtime
Milton Miller [Fri, 14 Dec 2007 04:52:20 +0000 (15:52 +1100)]
[POWERPC] Optimize account_system_vtime

We have multiple calls to has_feature being inlined, but gcc can't
be sure that the store via get_paca() doesn't alias the path to
cur_cpu_spec->feature.

Reorder to put the calls to read_purr and read_spurr adjacent to each
other.  To add a sense of consistency, reorder the remaining lines to
perform parallel steps on purr and scaled purr of each line instead of
calculating and then using one value before going on to the next.

In addition, we can tell gcc that no SPURR means no PURR.  The test is
completely hidden in the PURR case, and in the !PURR case the second test
is eliminated resulting in the simple register copy in the out-of-line
branch.

Further, gcc sees get_paca()->system_time referenced several times and
allocates a register to address it (shadowing r13) instead of caching its
value.  Reading into a local varable saves the shadow of r13 and removes
a potentially duplicate load (between the nested if and its parent).

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Depend on ->initialized in calc_steal_time
Milton Miller [Fri, 14 Dec 2007 04:52:19 +0000 (15:52 +1100)]
[POWERPC] Depend on ->initialized in calc_steal_time

If CPU_FTR_PURR is not set, we will never set cpu_purr_data->initialized.
Checking via __get_cpu_var on 64 bit avoids one dependent load compared
to cpu_has_feature in the not-present case, and is always required when
it is present.  The code is under CONFIG_VIRT_CPU_ACCOUNTING so 32 bit
will not be affected.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Timer interrupt: use a struct for two per_cpu varables
Milton Miller [Fri, 14 Dec 2007 04:52:15 +0000 (15:52 +1100)]
[POWERPC] Timer interrupt: use a struct for two per_cpu varables

timer_interrupt() was calculating per_cpu_offset several times, having to
start from the toc because of potential aliasing issues.

Placing both decrementer per_cpu varables in a struct and calculating
the address once with __get_cpu_var results in better code on both 32
and 64 bit.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Use __get_cpu_var in time.c
Milton Miller [Fri, 14 Dec 2007 04:52:10 +0000 (15:52 +1100)]
[POWERPC] Use __get_cpu_var in time.c

Use __get_cpu_var(x) instead of per_cpu(x, smp_processor_id()), as it
is optimized on ppc64 to access the current cpu's per-cpu offset directly;
it's local_paca.offset instead of TOC->paca[local_paca->processor_id].offset.

This is the trivial portion, two functions with one use each.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] init_decrementer_clockevent can be static __init
Milton Miller [Fri, 14 Dec 2007 04:52:10 +0000 (15:52 +1100)]
[POWERPC] init_decrementer_clockevent can be static __init

as its only called from time_init, which is __init.

Also remove unneeded forward declaration.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Push down or eliminate smp_processor_id calls in xics code
Milton Miller [Fri, 14 Dec 2007 04:52:09 +0000 (15:52 +1100)]
[POWERPC] Push down or eliminate smp_processor_id calls in xics code

The per-processor interrupt request register and current processor
priority register are only accessed on the current cpu.  In fact the
hypervisor doesn't even let us choose which cpu's registers to access.

The only function to use cpu twice is xics_migrate_irqs_away, not a fast
path.  But we can cache the result of get_hard_processor_id() instead of
calling get_hard_smp_processor_id(cpu) in a loop across the call to rtas.

Years ago the irq code passed smp_processor_id into get_irq, I thought
we might initialize the CPPR third party at boot as an extra measure of
saftey, and it made the code symmetric with the qirr (queued interrupt
for software generated interrupts), but now it is just extra and
sometimes unneeded work to pass it down.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] celleb: Split machine definition
Ishizaki Kou [Thu, 13 Dec 2007 10:13:14 +0000 (21:13 +1100)]
[POWERPC] celleb: Split machine definition

This splits the machine definition for celleb into two definitions,
one for celleb_beat, and the other for celleb_native.  Though this
looks complex because of sorting some functions, there are no
more semantic changes than that for the splitting.

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Cleanup calling mmio_nvram_init
Ishizaki Kou [Thu, 13 Dec 2007 10:11:36 +0000 (21:11 +1100)]
[POWERPC] Cleanup calling mmio_nvram_init

This makes mmio_nvram_init() callable unconditionally by providing
a dummy definition when CONFIG_MMIO_NVRAM is not defined.

Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pasemi: Implement MSI support
Olof Johansson [Wed, 12 Dec 2007 06:44:46 +0000 (17:44 +1100)]
[POWERPC] pasemi: Implement MSI support

Implement MSI support for PA Semi PWRficient platforms. MSI is done
through a special range of sources on the openpic controller, and they're
unfortunately breaking the usual concepts of how sources are programmed:

* The source is calculated as 512 + the value written into the MSI
  register
* The vector for this source is added to the source and reported
  through IACK

This means that for simplicity, it makes much more sense to just set the
vector to 0 for the source, since that's really the vector we expect to
see from IACK.

Also, the affinity/priority registers will affect 16 sources at a
time. To avoid most (simple) users from being limited by this, allocate
16 sources per device but use only one. This means that there's a total
of 32 sources.

If we get usage scenarions that need more sources, the allocator should
probably be revised to take an alignment argument and size, not just do
natural alignment.

Finally, since I'm already touching the MPIC names on pasemi, rename
the base one from the somewhat odd " PAS-OPIC  " to "PASEMI-OPIC".

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Fix unregistering HV event handlers
Stephen Rothwell [Wed, 12 Dec 2007 04:00:56 +0000 (15:00 +1100)]
[POWERPC] iSeries: Fix unregistering HV event handlers

Commit fbd568a3e61a7decb8a754ad952aaa5b5c82e9e5 ("Change
synchronize_kernel to _rcu and _sched") changed the deprecated
synchronize_kernel() in HvLpEvent_unregisterHandler() to
synchronize_rcu().  It turns out that it should have been
synchronize_sched().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] wrapper: Treat NULL as root node in devp_offset; add devp_offset_find()
Scott Wood [Tue, 11 Dec 2007 21:23:05 +0000 (08:23 +1100)]
[POWERPC] wrapper: Treat NULL as root node in devp_offset; add devp_offset_find()

Many operations, as currently used in the wrapper, assume they can
pass NULL and have it be treated as the root node.  However, libfdt-wrapper
converts NULL to -1, which is only appropriate when searching for nodes,
and will cause an error otherwise.

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>
16 years ago[POWERPC] wrapper: Rename offset in offset_devp()
Scott Wood [Tue, 11 Dec 2007 21:23:04 +0000 (08:23 +1100)]
[POWERPC] wrapper: Rename offset in offset_devp()

fdt_wrapper_create_node passes a variable called offset to offset_devp(),
which uses said parameter to initialize a local variable called offset.

Due to one of the odder aspects of the C language, the result is an
undefined variable, with no error or warning.

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>
16 years ago[POWERPC] Fake NUMA emulation for PowerPC
Balbir Singh [Fri, 7 Dec 2007 22:37:14 +0000 (09:37 +1100)]
[POWERPC] Fake NUMA emulation for PowerPC

Here's a dumb simple implementation of fake NUMA nodes for PowerPC.
Fake NUMA nodes can be specified using the following command line option

numa=fake=<node range>

node range is of the format <range1>,<range2>,...<rangeN>

Each of the rangeX parameters is passed using memparse().  I find this
useful for fake NUMA emulation on my simple PowerPC machine.  I've
tested it on a non-numa box with the following arguments:

numa=fake=1G
numa=fake=1G,2G
name=fake=1G,512M,2G
numa=fake=1500M,2800M mem=3500M
numa=fake=1G mem=512M
numa=fake=1G mem=1G

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Add machine initcall macros
Grant Likely [Sun, 2 Dec 2007 06:10:28 +0000 (17:10 +1100)]
[POWERPC] Add machine initcall macros

The machine initcall macros allow initcalls to be registered which
test machine_is() before executing the initcall.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] MPIC: Minor optimization of ipi handler
Olof Johansson [Fri, 19 Oct 2007 23:49:50 +0000 (09:49 +1000)]
[POWERPC] MPIC: Minor optimization of ipi handler

Optimize MPIC IPIs, by passing in the IPI number as the argument to the
handler, since all we did was translate it back based on which mpic
the interrupt came though on (and that was always the primary mpic).

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/cell...
Paul Mackerras [Thu, 20 Dec 2007 03:41:27 +0000 (14:41 +1100)]
Merge branch 'for-2.6.25' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/cell-2.6 into for-2.6.25

16 years ago[POWERPC] powermac: Use generic suspend code
Johannes Berg [Tue, 11 Dec 2007 14:25:59 +0000 (01:25 +1100)]
[POWERPC] powermac: Use generic suspend code

This adds platform_suspend_ops for PMU based machines, directly in
the PMU driver.  This allows suspending via /sys/power/state
on powerbooks.

The patch also replaces the PMU ioctl with a simple call to
pm_suspend(PM_SUSPEND_MEM).

Additionally, it cleans up some debug code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix sleep on powerbook 3400
Paul Mackerras [Wed, 19 Dec 2007 11:45:31 +0000 (22:45 +1100)]
[POWERPC] Fix sleep on powerbook 3400

Sleep on the powerbook 3400 has been broken since the change that made
powerbook_sleep_3400 call pmac_suspend_devices(), which disables
interrupts.  There are a couple of loops in powerbook_sleep_3400 that
depend on interrupts being enabled, and in fact it has to have
interrupts enabled at the point of going to sleep since it is an
interrupt from the PMU that wakes it up.

This fixes it by using pmu_wait_complete() instead of a spinloop, and
by explicitly enabling interrupts before putting the CPU into sleep
mode (which is OK since all interrupts except the PMU interrupt have
been disabled at the interrupt controller by this stage).

This changes the logic so that it keeps putting the CPU into sleep mode
until the completion of the interrupt transaction from the PMU that
signals the end of sleep.  Also, we now call pmu_unlock() before sleep
so that the via_pmu_interrupt() code can process the interrupt event
from the PMU properly.

Now that generic code saves and restores PCI state, it is no longer
necessary to do that here.  Thus pbook_pci_save/restore and related
functions are no longer necessary, so this removes them.

Lastly, this moves the ioremap of the memory controller to init code
rather than doing it on every sleep/wakeup cycle.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Convert therm_windtunnel.c to use the kthread API
Paul Mackerras [Thu, 13 Dec 2007 04:57:45 +0000 (15:57 +1100)]
[POWERPC] Convert therm_windtunnel.c to use the kthread API

This is fairly straightforward, and lets us get rid of x.completion
as well.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Convert therm_pm72.c to use the kthread API
Paul Mackerras [Thu, 13 Dec 2007 04:54:45 +0000 (15:54 +1100)]
[POWERPC] Convert therm_pm72.c to use the kthread API

This converts the therm_pm72.c driver to use the kthread API.  I
thought about making it use kthread_stop() instead of the `state'
variable and the `ctrl_complete' completion, but that isn't simple and
will require changing the way that `state' is used.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Convert adb.c to use kthread API and not spin on ADB requests
Paul Mackerras [Thu, 13 Dec 2007 04:11:22 +0000 (15:11 +1100)]
[POWERPC] Convert adb.c to use kthread API and not spin on ADB requests

This converts adb.c to use the kthread API.

It also changes adb_request so that if the ADBREQ_SYNC flag is
specified, we now sleep waiting for the request to finish using an
on-stack completion rather than spinning.  To implement this, we now
require that if the ADBREQ_SYNC flag is set, the `done' parameter must
be NULL.  All of the existing callers of adb_request that pass
ADBREQ_SYNC appear to be in process context and have done == NULL.
Doing this allows us to get rid of an awful hack in adb_request()
where we used to test whether the request was coming from the adb
probe task and use a completion if it was, and otherwise spin.

This also gets rid of a static request block that was used if the req
parameter to adb_request was NULL.  None of the callers do that any
more, so the static request block is no longer necessary.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Convert media-bay.c to use the kthread API
Paul Mackerras [Thu, 13 Dec 2007 03:12:58 +0000 (14:12 +1100)]
[POWERPC] Convert media-bay.c to use the kthread API

We aren't supposed to use kernel_thread directly in drivers any more,
and in fact using kthread_run is a bit simpler.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] via-pmu: Kill sleep notifiers completely
Johannes Berg [Tue, 11 Dec 2007 14:21:26 +0000 (01:21 +1100)]
[POWERPC] via-pmu: Kill sleep notifiers completely

This kills off the remnants of the old sleep notifiers now that they
are no longer used.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] adb: Replace sleep notifier with platform driver suspend/resume hooks
Johannes Berg [Tue, 11 Dec 2007 14:21:25 +0000 (01:21 +1100)]
[POWERPC] adb: Replace sleep notifier with platform driver suspend/resume hooks

This replaces the pmu sleep notifier that adb had with suspend/resume
hooks in a new platform driver/device.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] cell: catch errors from sysfs_create_group()
Jeremy Kerr [Wed, 5 Dec 2007 02:49:31 +0000 (13:49 +1100)]
[POWERPC] cell: catch errors from sysfs_create_group()

We're currently getting a warning from not checking the result of
sysfs_create_group, which is declared as __must_check.

This change introduces appropriate error-handling for
spu_add_sysdev_attr_group()

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: handle SPE kernel mappings that cross segment boundaries
Jeremy Kerr [Wed, 5 Dec 2007 02:49:31 +0000 (13:49 +1100)]
[POWERPC] cell: handle SPE kernel mappings that cross segment boundaries

Currently, we have a possibilty that the SLBs setup during context
switch don't cover the entirety of the necessary lscsa and code
regions, if these regions cross a segment boundary.

This change checks the start and end of each region, and inserts a SLB
entry for each, if unique. We also remove the assumption that the
spu_save_code and spu_restore_code reside in the same segment, by using
the specific code array for save and restore.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: add spu_64k_pages_available() check
Jeremy Kerr [Wed, 5 Dec 2007 02:49:31 +0000 (13:49 +1100)]
[POWERPC] cell: add spu_64k_pages_available() check

Add a function spu_64k_pages_available(), so that we can abstract the
explicity use of mmu_psize_defs() in lssca_alloc.c

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: use spu_load_slb for SLB setup
Jeremy Kerr [Wed, 5 Dec 2007 02:49:31 +0000 (13:49 +1100)]
[POWERPC] cell: use spu_load_slb for SLB setup

Now that we have a helper function to setup a SPU SLB, use it for
__spu_trap_data_seq.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: handle kernel SLB setup in spu_base.c
Jeremy Kerr [Wed, 5 Dec 2007 02:49:31 +0000 (13:49 +1100)]
[POWERPC] cell: handle kernel SLB setup in spu_base.c

Currently, the SPU context switch code (spufs/switch.c) sets up the
SPU's SLBs directly, which requires some low-level mm stuff.

This change moves the kernel SLB setup to spu_base.c, by exposing
a function spu_setup_kernel_slbs() to do this setup. This allows us
to remove the low-level mm code from switch.c, making it possible
to later move switch.c to the spufs module.

Also, add a struct spu_slb for the cases where we need to deal with
SLB entries.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: safer of_has_vicinity routine
Andre Detsch [Wed, 5 Dec 2007 02:49:31 +0000 (13:49 +1100)]
[POWERPC] cell: safer of_has_vicinity routine

This patch changes the way we check for the existence of
vicinity property in spe device nodes.

The new implementation does not depend on having an initialized
cbe_spu_info[0].spus, and checks for presence of vicinity in all
nodes, not only in the first one.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: export force_sig_info()
Jeremy Kerr [Wed, 5 Dec 2007 02:49:31 +0000 (13:49 +1100)]
[POWERPC] cell: export force_sig_info()

Export force_sig_info to allow signals to be sent from a modular spufs.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: Convert #include of asm/of_{platform, device}.h into linux/of_{platfo...
Jon Loeliger [Tue, 13 Nov 2007 17:10:58 +0000 (11:10 -0600)]
[POWERPC] cell: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] cell: add missing '\n'
Ishizaki Kou [Thu, 1 Nov 2007 10:04:04 +0000 (19:04 +0900)]
[POWERPC] cell: add missing '\n'

Two printk() calls were missing the terminating '\n'.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] OProfile: fix cbe pm signal routing problem
Bob Nelson [Fri, 17 Aug 2007 16:06:09 +0000 (11:06 -0500)]
[POWERPC] OProfile: fix cbe pm signal routing problem

Fix debug_bus_control and group_control PMU register values set up in
set_pm_event().  Initialize variables before calling set_pm_event().
Delete unused static array and code that initialized it.
Rename constant to better reflect usage.

Signed-off-by: Bob Nelson <rrnelson@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] perfmon2: make pm_interval register read/write
Kevin Corry [Tue, 11 Dec 2007 12:49:17 +0000 (13:49 +0100)]
[POWERPC] perfmon2: make pm_interval register read/write

The pm_interval register in the Cell PMU is read/write, but was implemented in
the kernel as write-only. Previously, the written value was saved in a "shadow"
copy so calls to cbe_read_pm() could return the value.

Perfmon2 needs to be able to read the current values of pm_interval, so change
cbe_read_pm() to read the actual register instead of the "shadow" copy. There
is currently no code in the kernel that tries to read the pm_interval register
with cbe_read_pm() (expecting to receive the "shadow" value), so this should
not break any existing code.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 years ago[POWERPC] ucc_geth: use rx-clock-name and tx-clock-name device tree properties
Timur Tabi [Mon, 3 Dec 2007 21:17:59 +0000 (15:17 -0600)]
[POWERPC] ucc_geth: use rx-clock-name and tx-clock-name device tree properties

Updates the ucc_geth device driver to check the new rx-clock-name and
tx-clock-name properties first.  If present, it uses the new function
qe_clock_source() to obtain the clock source.  Otherwise, it checks the
deprecated rx-clock and tx-clock properties.

Update the device trees for 832x, 836x, and 8568 to contain the new property
names only.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] qe: add function qe_clock_source()
Timur Tabi [Mon, 3 Dec 2007 21:17:58 +0000 (15:17 -0600)]
[POWERPC] qe: add function qe_clock_source()

Add function qe_clock_source() which takes a string containing the name of a
QE clock source (as is typically found in device trees) and returns the
matching enum qe_clock value.

Update booting-without-of.txt to indicate that the UCC properties rx-clock
and tx-clock are deprecated and replaced with rx-clock-name and tx-clock-name,
which use strings instead of numbers to indicate QE clock sources.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: mpc8313erdb: Fix whitespace.
Scott Wood [Thu, 13 Dec 2007 17:16:32 +0000 (11:16 -0600)]
[POWERPC] 83xx: mpc8313erdb: Fix whitespace.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: mpc834x_mds: Fix whitespace and call of_platform_bus_probe().
Scott Wood [Thu, 13 Dec 2007 17:19:05 +0000 (11:19 -0600)]
[POWERPC] 83xx: mpc834x_mds: Fix whitespace and call of_platform_bus_probe().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Move CPM command handling into the cpm drivers
Jochen Friedrich [Mon, 26 Nov 2007 17:03:40 +0000 (18:03 +0100)]
[POWERPC] Move CPM command handling into the cpm drivers

This patch moves the CPM command handling into commproc.c
for CPM1 and cpm2_common.c. This is yet another preparation
to get rid of drivers accessing the CPM via the global cpmp.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Scott Wood <scottwood@freescale.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
16 years ago[POWERPC] Add support for PORTA and PORTB odr registers
Jochen Friedrich [Thu, 22 Nov 2007 16:54:13 +0000 (17:54 +0100)]
[POWERPC] Add support for PORTA and PORTB odr registers

PORTA and PORTB have odr registers, as well. However, the PORTB odr
register is only 16bit.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
16 years ago[POWERPC] 8xx: Convert mpc866ads to the new device binding.
Scott Wood [Sun, 25 Nov 2007 10:09:31 +0000 (13:09 +0300)]
[POWERPC] 8xx: Convert mpc866ads to the new device binding.

Verified on mpc866ads. This version has muram and brg nodes added to dts
to get the things work.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
16 years ago[POWERPC] ipic: ack only for edge interrupts
Li Yang [Tue, 4 Dec 2007 11:01:40 +0000 (19:01 +0800)]
[POWERPC] ipic: ack only for edge interrupts

Only external interrupts in edge detect mode support ack operation.
Therefore, in most cases ack is not needed.  The patch makes ipic
ack only when it's needed.  This could boost over all system performance.

Signed-off-by: Li Yang <leoli@freescale.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] FSL: Added aliases node to device trees
Kumar Gala [Wed, 12 Dec 2007 07:46:12 +0000 (01:46 -0600)]
[POWERPC] FSL: Added aliases node to device trees

Added aliases nodes for kurobox, 83xx, 85xx, and 86xx platforms.
This included added labels and cell-index properties for serial and
pci nodes.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] FSL: enet device tree cleanups
Kumar Gala [Wed, 12 Dec 2007 06:28:35 +0000 (00:28 -0600)]
[POWERPC] FSL: enet device tree cleanups

* Removed address fields in ethernet nodes
* Removed #address-cells, #size-cells from gianfar nodes
* Added cell-index to gianfar and ucc ethernet nodes
* Added enet[0..3] labels
* Renamed compatible node for gianfar mdio to "fsl,gianfar-mdio"
* Removed device_type = "mdio"

The matching for gianfar mdio still supports the old "mdio"/"gianfar" combo
but it is now considered deprecated.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] FSL: I2C device tree cleanups
Kumar Gala [Wed, 12 Dec 2007 05:17:24 +0000 (23:17 -0600)]
[POWERPC] FSL: I2C device tree cleanups

* Removed device_type = "i2c"
* Added missing second I2C controller on MPC8548 CDS, MPC8544 DS
* Added #address-cells, #size-cells, and cell-index where missing

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: Add aliases node to 8641hpcn DTS file.
Jon Loeliger [Wed, 5 Dec 2007 17:32:50 +0000 (11:32 -0600)]
[POWERPC] 86xx: Add aliases node to 8641hpcn DTS file.

The addition of the aliases node is needed for U-Boot
and, eventually, cuImage, to help locate the proper
nodes reliably when using the libfdt approach.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] QE: change qe_setbrg() to take an enum qe_clock instead of an integer
Timur Tabi [Thu, 29 Nov 2007 23:26:30 +0000 (17:26 -0600)]
[POWERPC] QE: change qe_setbrg() to take an enum qe_clock instead of an integer

qe_setbrg() currently takes an integer to indicate the BRG number.  Change that
to take an enum qe_clock instead, since this enum is intended to represent
clock sources.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: fix guts_set_dmacr() and add guts_set_pmuxcr_dma() to immap_86xx.h
Timur Tabi [Thu, 29 Nov 2007 20:19:57 +0000 (14:19 -0600)]
[POWERPC] 86xx: fix guts_set_dmacr() and add guts_set_pmuxcr_dma() to immap_86xx.h

Updated guts_set_dmacr() to enumerate the DMA controllers at 0, instead of 1,
so that it now matches other related functions.  Added function
guts_set_pmuxcr_dma() to set the external DMA control bits in the PMUXCR
register of the global utilities structure.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Add MPC837x MDS default kernel configuration
Li Yang [Fri, 19 Oct 2007 11:38:49 +0000 (19:38 +0800)]
[POWERPC] 83xx: Add MPC837x MDS default kernel configuration

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Add platform support for MPC837x MDS board
Li Yang [Fri, 19 Oct 2007 11:38:45 +0000 (19:38 +0800)]
[POWERPC] 83xx: Add platform support for MPC837x MDS board

The MPC837x MDS is a new member of Freescale MDS reference system.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] ipic: add new interrupts introduced by new chip
Li Yang [Fri, 19 Oct 2007 11:38:43 +0000 (19:38 +0800)]
[POWERPC] ipic: add new interrupts introduced by new chip

These interrupts are introduced by the latest Freescale SoC
such as MPC837x.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] add e300c4 entry to cputable
Li Yang [Fri, 19 Oct 2007 11:38:42 +0000 (19:38 +0800)]
[POWERPC] add e300c4 entry to cputable

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 8xxx: Convert #include of asm/of_{platform, device}.h into linux/of_{platfo...
Jon Loeliger [Tue, 6 Nov 2007 18:11:13 +0000 (12:11 -0600)]
[POWERPC] 8xxx: Convert #include of asm/of_{platform, device}.h into linux/of_{platform, device}.h.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Emulate isel (Integer Select) instruction
Kumar Gala [Tue, 20 Nov 2007 03:35:29 +0000 (21:35 -0600)]
[POWERPC] Emulate isel (Integer Select) instruction

isel (Integer Select) is a new user space instruction in the
PowerISA 2.04 spec.  Not all processors implement it so lets emulate
to ensure code built with isel will run everywhere.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Add SPRN for Embedded registers specified in PowerISA 2.04
Kumar Gala [Fri, 16 Nov 2007 19:57:57 +0000 (13:57 -0600)]
[POWERPC] Add SPRN for Embedded registers specified in PowerISA 2.04

* Added SPRN for new architectural features added for embedded:
- Alternate Time Base (ATB, ATBL, ATBU)
- Doorbell Interrupts (IVOR36, IVOR37)
- SPRG8/9
- External Proxy (EPR)
- External PID load/store (EPLC, EPSC)

* Added BUCSR for Freescale Embedded Processors
* Moved around MAS7 so its in numeric order

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Early debug forces console log level to max
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:24 +0000 (14:48 +1100)]
[POWERPC] Early debug forces console log level to max

This makes the early debug option force the console loglevel
to the max.  The early debug option is meant to catch messages very
early in the kernel boot process, in many cases, before the kernel
has a chance to parse the "debug" command line argument.  Thus it
makes sense when CONFIG_PPC_EARLY_DEBUG is set, to force the console
log level to the max at boot time.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Add of_translate_dma_address
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:22 +0000 (14:48 +1100)]
[POWERPC] Add of_translate_dma_address

This adds a variant of of_translate_address that uses the dma-ranges
property instead of "ranges", it's to be used by PCI code in parsing
the dma-ranges property.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Remove useless volatiles in udbg_16550.c
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:23 +0000 (14:48 +1100)]
[POWERPC] Remove useless volatiles in udbg_16550.c

This removes "volatile" from the MMIO pointer udbg_comport
in udbg_16550.c driver, it's useless and makes checkpatch.pl
complain when adding things to this file.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Change 32-bit PCI message about resource allocation
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:21 +0000 (14:48 +1100)]
[POWERPC] Change 32-bit PCI message about resource allocation

The 32 bits PCI code will display a rather scary error message

   PCI: Cannot allocate resource region N of device XXX

at boot when the existing setup of a device as left by the
firmware doesn't match the kernel needs and the device needs
to be moved.  This is often not an error at all, as the kernel
will generally easily reallocate the device elsewhere.

This changes the message to something less scary and lowers
its level from error to warning.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix powerpc 32-bit resource fixup for 64-bit resources
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:20 +0000 (14:48 +1100)]
[POWERPC] Fix powerpc 32-bit resource fixup for 64-bit resources

The 32-bit powerpc resource fixup code uses unsigned longs to do the
offsetting of resources which overflows on platforms such as 4xx where
resources can be 64 bits.

This fixes it by using resource_size_t instead.

However, the IO stuff does rely on some 32 bits arithmetic, so we hack
by cropping the result of the fixups for IO resources with a 32 bits
mask.

This isn't the prettiest but should work for now until we change the
32 bits PCI code to do IO mappings like 64 bits does, within a reserved
are of the kernel address space.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge pci_process_bridge_OF_ranges()
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:18 +0000 (14:48 +1100)]
[POWERPC] Merge pci_process_bridge_OF_ranges()

This merges the 32-bit and 64-bit implementations of
pci_process_bridge_OF_ranges().  The new function is cleaner than both
the old ones, and supports 64 bits ranges on ppc32 which is necessary
for the 4xx port.

It also adds some better (hopefully) output to the kernel log which
should help diagnose problems and makes better use of existing OF
parsing helpers (avoiding a few bugs of both implementations along
the way).

There are still a few unfortunate ifdef's but there is no way around
these for now at least not until some other bits of the PCI code are
made common.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Make isa_mem_base common to 32 and 64 bits
Benjamin Herrenschmidt [Tue, 11 Dec 2007 03:48:17 +0000 (14:48 +1100)]
[POWERPC] Make isa_mem_base common to 32 and 64 bits

This defines isa_mem_base on both 32 and 64 bits (it used to be 32 bits
only).  This avoids a few ifdef's in later patches and potentially can
allow support for VGA text mode on 64 bits powerpc.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge branch 'linux-2.6' into for-2.6.25
Paul Mackerras [Tue, 11 Dec 2007 04:30:27 +0000 (15:30 +1100)]
Merge branch 'linux-2.6' into for-2.6.25

16 years ago[POWERPC] Update smu command definitions
Michael Hanselmann [Tue, 11 Dec 2007 00:18:46 +0000 (11:18 +1100)]
[POWERPC] Update smu command definitions

This updates smu.h with several new commands, and adds parameter
descriptions for existing commands.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Kill flatdevtree.c
David Gibson [Mon, 10 Dec 2007 03:28:39 +0000 (14:28 +1100)]
[POWERPC] Kill flatdevtree.c

Now that earlier patches have switched the bootwrapper to using libfdt
for device tree manipulation, this patch removes the now unused
flatdevtree.c and related files.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Use embedded libfdt in the bootwrapper
David Gibson [Mon, 10 Dec 2007 03:28:39 +0000 (14:28 +1100)]
[POWERPC] Use embedded libfdt in the bootwrapper

This incorporates libfdt (from the source embedded in an earlier
commit) into the wrapper.a library used by the bootwrapper.  This
includes adding a libfdt_env.h file, which the libfdt sources need in
order to integrate into the bootwrapper environment, and a
libfdt-wrapper.c which provides glue to connect the bootwrapper's
abstract device tree callbacks to the libfdt functions.

In addition, this changes the various wrapper and platform files to
use libfdt functions instead of the older flatdevtree.c library.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Merge libfdt upstream source
David Gibson [Mon, 10 Dec 2007 03:28:39 +0000 (14:28 +1100)]
[POWERPC] Merge libfdt upstream source

This incorporates a copy of dtc libfdt into the kernel source, in
arch/powerpc/boot/libfdt.  This only imports the upstream sources
verbatim, later patches are needed to actually link it into the kernel
Makefiles.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] EEH: Avoid a possible NULL pointer dereference
Stephen Rothwell [Fri, 7 Dec 2007 06:55:51 +0000 (17:55 +1100)]
[POWERPC] EEH: Avoid a possible NULL pointer dereference

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Merge vpdinfo.c into pci.c
Stephen Rothwell [Fri, 7 Dec 2007 05:10:22 +0000 (16:10 +1100)]
[POWERPC] iSeries: Merge vpdinfo.c into pci.c

There was only one global function in vpdinfo.c and it was only called
from pci.c, so merge them and make the function static.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: Clean up and simplify vdpinfo.c
Stephen Rothwell [Fri, 7 Dec 2007 05:09:18 +0000 (16:09 +1100)]
[POWERPC] iSeries: Clean up and simplify vdpinfo.c

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] iSeries: DeCamelCase vpdinfo.c
Stephen Rothwell [Fri, 7 Dec 2007 05:08:33 +0000 (16:08 +1100)]
[POWERPC] iSeries: DeCamelCase vpdinfo.c

This is a purely mechanical transformation.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Update xmon slb code
will schmidt [Thu, 6 Dec 2007 21:22:23 +0000 (08:22 +1100)]
[POWERPC] Update xmon slb code

This adds a bit more detail to the xmon SLB output.  When the valid
bit is set, this displays the ESID and VSID values, as well as
decoding the segment size -- 1T or 256M -- and displaying the LLP
bits.  This supresses the output for any slb entries that contain only
zeros.

sample output from power6 (1T segment support):
00 c000000008000000 40004f7ca3000500  1T  ESID=   c00000  VSID=       4f7ca3 LLP:100
01 d000000008000000 4000eb71b0000400  1T  ESID=   d00000  VSID=       eb71b0 LLP:  0
08 0000000018000000 0000c8499f8ccc80 256M ESID=        1  VSID=    c8499f8cc LLP:  0
09 00000000f8000000 0000d2c1a8e46c80 256M ESID=        f  VSID=    d2c1a8e46 LLP:  0
10 0000000048000000 0000ca87eab1dc80 256M ESID=        4  VSID=    ca87eab1d LLP:  0
43 cf00000008000000 400011b260000500  1T  ESID=   cf0000  VSID=       11b260 LLP:100

sample output from power5 (notice the non-valid but non-zero entries)
10 0000000008000000 00004fd0e077ac80 256M ESID=        0  VSID=    4fd0e077a LLP:  0
11 00000000f8000000 00005b085830fc80 256M ESID=        f  VSID=    5b085830f LLP:  0
12 0000000048000000 000052ce99fe6c80 256M ESID=        4  VSID=    52ce99fe6 LLP:  0
13 0000000018000000 000050904ed95c80 256M ESID=        1  VSID=    50904ed95 LLP:  0
14 cf00000008000000 0000d59aca40f500 256M ESID=cf0000000  VSID=    d59aca40f LLP:100
15 c000000078000000 000045cb97751500 256M ESID=c00000007  VSID=    45cb97751 LLP:100

Tested on power5 and power6.

Signed-Off-By: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Use SLB size from the device tree
Michael Neuling [Thu, 6 Dec 2007 06:24:48 +0000 (17:24 +1100)]
[POWERPC] Use SLB size from the device tree

Currently we hardwire the number of SLBs to 64, but PAPR says we
should use the ibm,slb-size property to obtain the number of SLB
entries.  This uses this property instead of assuming 64.  If no
property is found, we assume 64 entries as before.

This soft patches the SLB handler, so it shouldn't change performance
at all.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] pci_controller->arch_data really is a struct device_node *
Stephen Rothwell [Mon, 10 Dec 2007 03:33:21 +0000 (14:33 +1100)]
[POWERPC] pci_controller->arch_data really is a struct device_node *

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Don't special case pci_domain_nr() for iSeries
Stephen Rothwell [Thu, 6 Dec 2007 15:04:33 +0000 (02:04 +1100)]
[POWERPC] Don't special case pci_domain_nr() for iSeries

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Remove some iSeries platform checks from the PCI code
Stephen Rothwell [Thu, 6 Dec 2007 15:03:23 +0000 (02:03 +1100)]
[POWERPC] Remove some iSeries platform checks from the PCI code

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>