summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
Commit message (Collapse)AuthorAgeFilesLines
* [POWERPC] pci32: Add flags modifying the PCI code behaviourBenjamin Herrenschmidt2007-12-205-6/+9
| | | | | | | | | | | | | | 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>
* [POWERPC] holly.c: Remove unnecessary include of linux/ide.hOlof Johansson2007-12-201-1/+0
| | | | | | | | | 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>
* [POWERPC] Push down or eliminate smp_processor_id calls in xics codeMilton Miller2007-12-202-33/+29
| | | | | | | | | | | | | | | | | | | 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>
* [POWERPC] celleb: Split machine definitionIshizaki Kou2007-12-204-80/+116
| | | | | | | | | | | 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>
* [POWERPC] Cleanup calling mmio_nvram_initIshizaki Kou2007-12-201-2/+0
| | | | | | | | | 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>
* [POWERPC] pasemi: Implement MSI supportOlof Johansson2007-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [POWERPC] iSeries: Fix unregistering HV event handlersStephen Rothwell2007-12-201-1/+1
| | | | | | | | | | | | 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>
* Merge branch 'for-2.6.25' of ↵Paul Mackerras2007-12-2012-66/+154
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/arnd/cell-2.6 into for-2.6.25
| * [POWERPC] cell: catch errors from sysfs_create_group()Jeremy Kerr2007-12-191-3/+17
| | | | | | | | | | | | | | | | | | | | | | 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>
| * [POWERPC] cell: handle SPE kernel mappings that cross segment boundariesJeremy Kerr2007-12-192-11/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [POWERPC] cell: add spu_64k_pages_available() checkJeremy Kerr2007-12-192-1/+7
| | | | | | | | | | | | | | | | 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>
| * [POWERPC] cell: use spu_load_slb for SLB setupJeremy Kerr2007-12-191-13/+10
| | | | | | | | | | | | | | | | 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>
| * [POWERPC] cell: handle kernel SLB setup in spu_base.cJeremy Kerr2007-12-192-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [POWERPC] cell: safer of_has_vicinity routineAndre Detsch2007-12-191-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [POWERPC] cell: export force_sig_info()Jeremy Kerr2007-12-191-0/+7
| | | | | | | | | | | | | | 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>
| * [POWERPC] cell: Convert #include of asm/of_{platform, device}.h into ↵Jon Loeliger2007-12-197-8/+10
| | | | | | | | | | | | | | | | 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>
| * [POWERPC] cell: add missing '\n'Ishizaki Kou2007-12-191-2/+2
| | | | | | | | | | | | | | 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>
| * [POWERPC] perfmon2: make pm_interval register read/writeKevin Corry2007-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [POWERPC] 83xx: mpc8313erdb: Fix whitespace.Scott Wood2007-12-131-2/+2
| | | | | | | | | | Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | [POWERPC] 83xx: mpc834x_mds: Fix whitespace and call of_platform_bus_probe().Scott Wood2007-12-131-2/+19
| | | | | | | | | | Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | [POWERPC] 8xx: Convert mpc866ads to the new device binding.Scott Wood2007-12-133-253/+81
| | | | | | | | | | | | | | | | 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>
* | [POWERPC] 83xx: Add platform support for MPC837x MDS boardLi Yang2007-12-113-0/+116
| | | | | | | | | | | | | | 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>
* | [POWERPC] 8xxx: Convert #include of asm/of_{platform, device}.h into ↵Jon Loeliger2007-12-115-8/+8
|/ | | | | | | | 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>
* Merge branch 'linux-2.6' into for-2.6.25Paul Mackerras2007-12-112-8/+24
|\
| * powerpc: Fix IDE legacy vs. native fixupsBenjamin Herrenschmidt2007-12-102-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PowerMac and CHRP/BriQ platforms have quirks to switch some IDE controllers from legacy mode to fully native mode. Those quirks however will not work properly anymore due to a change to the generic code to better handle legacy IDE resources. This fixes it by moving those quirk to "early" quirks (so they run before resources are probed for the devices) and clearing all BARs after the conversion to force a reallocation of sane values. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [POWERPC] EEH: Avoid a possible NULL pointer dereferenceStephen Rothwell2007-12-111-2/+2
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Merge vpdinfo.c into pci.cStephen Rothwell2007-12-114-259/+219
| | | | | | | | | | | | | | | | 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>
* | [POWERPC] iSeries: Clean up and simplify vdpinfo.cStephen Rothwell2007-12-111-54/+46
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: DeCamelCase vpdinfo.cStephen Rothwell2007-12-113-97/+95
| | | | | | | | | | | | | | This is a purely mechanical transformation. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Use SLB size from the device treeMichael Neuling2007-12-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | [POWERPC] pci_controller->arch_data really is a struct device_node *Stephen Rothwell2007-12-1110-14/+14
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Don't special case pci_domain_nr() for iSeriesStephen Rothwell2007-12-111-0/+2
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Remove some iSeries platform checks from the PCI codeStephen Rothwell2007-12-111-0/+2
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Call iSeries_pcibios_init from setup_archStephen Rothwell2007-12-112-1/+5
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Make pcibios_final_fixup not depend on pci_dnStephen Rothwell2007-12-111-15/+12
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Reduce dependence on pci_dn bussubnoStephen Rothwell2007-12-111-9/+9
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: iseries_ds_addr is only used in pci.cStephen Rothwell2007-12-112-12/+12
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Remove pci_dn dependency from iSeries_Device_InformationStephen Rothwell2007-12-113-17/+6
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Remove one layer of IO routinesStephen Rothwell2007-12-111-49/+19
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Consoldiate PCI IO error checkStephen Rothwell2007-12-111-79/+26
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Unindent and clean iSeries_pci_final_fixupStephen Rothwell2007-12-111-33/+35
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Remove some dead code from pci.cStephen Rothwell2007-12-111-18/+1
| | | | | | | | | | | | | | and an unnecessary cast. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: DeCamelCase pci.cStephen Rothwell2007-12-111-108/+108
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Cleanup PCI retry code a littleStephen Rothwell2007-12-111-4/+4
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iSeries: Move find_Device_Node to avoid a forward declarationStephen Rothwell2007-12-111-23/+16
| | | | | | | | | | | | | | Also remove another unnecessary forward declaration. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] pSeries: Remove dependency on pci_dn bussubnoStephen Rothwell2007-12-111-17/+7
| | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] iommu_free_table doesn't need the device_nodeStephen Rothwell2007-12-111-1/+1
| | | | | | | | | | | | | | | | | | It only needs the iommu_table address. It also makes use of the node name to print error messages. So just pass it the things it needs. This reduces the places that know about the pci_dn by one. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] celleb: Add support for native CBEIshizaki Kou2007-12-114-23/+85
| | | | | | | | | | | | | | | | | | This adds support for native CBE on Celleb, that is, without the BEAT hypervisor. Many codes in platforms/cell/ are used in native CBE environment. Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] cell: Fix undefined reference to mmio_nvram_initIshizaki Kou2007-12-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | This fixes the following link error with CONFIG_PPC_CELL_NATIVE=y and CONFIG_PPC_CELL_BLADE=n: arch/powerpc/platforms/built-in.o: In function `.cell_setup_arch': setup.c:(.init.text+0xe80): undefined reference to `.mmio_nvram_init' Signed-off-by: Kou Ishizaki <Kou.Ishizaki@toshiba.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] CELLEB: Fix possible NULL pointer dereferenceCyrill Gorcunov2007-12-061-3/+8
| | | | | | | | | | | | | | | | | | This adds checking for NULL returned value from of_get_property to prevent possible NULL pointer dereference in the case when expected properties are not present. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>