summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* powerpc: Fix CHRP PCI config access for indirect_pciBenjamin Herrenschmidt2008-10-151-1/+1
| | | | | | | | | | | | | | Recently, indirect_pci was changed to test if the bus number requested is the one hanging straight off the PHB, then it substitutes the bus number with another one contained in a new "self_busno" field of the pci_controller structure. However, this breaks CHRP which didn't initialize this new field, and which relies on having the right bus number passed to the hardware. This fixes it by initializing this variable properly for all CHRP bridges Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/chrp: Fix detection of Python PCI host bridge on IBM CHRPsBenjamin Herrenschmidt2008-10-151-1/+1
| | | | | | | | | | | | | The detection of the IBM "Python" PCI host bridge on IBM CHRP machines such as old RS6000 was broken when we changed of_device_is_compatible() from strncasecmp to strcasecmp (dropped the "n" variant) due to the way IBM encodes the chip version. We fix that by instead doing a match on the model property like we do for others bridges in that file. It should be good enough for those machines. If yours is still broken, let me know. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Fix 32-bit SMP boot on CHRPBenjamin Herrenschmidt2008-10-151-0/+6
| | | | | | | | | | | | prom_init was changed to take a new argument, the address where the kernel is loaded, which is now used to copy the SMP spin loop down before use. However, only head_64.S was adapted to pass this new value, not head_32.S, thus breaking SMP boot on 32-bit SMP CHRP machines. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Fix link errors on 32-bit machines using legacy DMABenjamin Herrenschmidt2008-10-151-0/+6
| | | | | | | | | | The new merged DMA code will try to access isa_bridge_pcidev when trying to DMA to/from legacy devices. This is however only defined on 64-bit. Fixes this for now by adding the variable, even if it stays NULL. In the long run, we'll make isa-bridge.c common to 32 and 64-bit. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/pci: Improve detection of unassigned bridge resourcesBenjamin Herrenschmidt2008-10-151-47/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the powerpc PCI layer is not configured to re-assign everything, it currently fails to detect that a PCI to PCI bridge has been left unassigned by the firmware and tries to allocate resource for the default window values in the bridge (0...X) (with the notable exception of a hack we have in there that detects some Apple firmware unassigned bridge resources). This results in resource allocation failures, which are generally fixed up later on but it causes scary warnings in the logs and we have seen the fixup code fall over in some circumstances (a different issue to fix as well). This code improves that by providing a more complete & useful function to intuit that a bridge was left unassigned by the firmware, and thus force a full re-allocation by the PCI code without trying to allocate the existing useless resources first. The algorithm we use basically considers unassigned a window that starts at 0 (PCI address) if the corresponding address space enable bit is not set. In addition, for memory space, it considers such a resource unassigned also if the host bridge isn't configured to forward cycles to address 0 (ie, the resource basically overlaps main memory). This fixes a range of problems with things like Bare-Metal support on pSeries machines, or attempt to use partial firmware PCI setup. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* hvc_console: Fix free_irq in spinlocked sectionChristian Borntraeger2008-10-151-5/+5
| | | | | | | | | | | | | commit 611e097d7707741a336a0677d9d69bec40f29f3d Author: Christian Borntraeger <borntraeger@de.ibm.com> hvc_console: rework setup to replace irq functions with callbacks introduced a spinlock recursion problem. The notifier_del is called with a lock held, and in turns calls free_irq which then complains when manipulating procfs. This fixes it by moving the call to the notifier to outside of the locked section. Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Get USE_STRICT_MM_TYPECHECKS working againDavid Gibson2008-10-146-22/+24
| | | | | | | | | | | | The typesafe version of the powerpc pagetable handling (with USE_STRICT_MM_TYPECHECKS defined) has bitrotted again. This patch makes a bunch of small fixes to get it back to building status. It's still not enabled by default as gcc still generates worse code with it for some reason. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Reflect the used arguments in machine_init() prototypeSebastian Andrzej Siewior2008-10-141-1/+1
| | | | | | | | The "phys" argument to machine_init() isn't used and isn't likely to ever be so let's remove it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Fix DMA offset for non-coherent DMABenjamin Herrenschmidt2008-10-142-3/+7
| | | | | | | | | | After Becky's work we can almost have different DMA offsets between on-chip devices and PCI. Almost because there's a problem with the non-coherent DMA code that basically ignores the programmed offset to use the global one for everything. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Merge commit 'kumar/kumar-next'Benjamin Herrenschmidt2008-10-1466-174/+900
|\
| * powerpc: fix fsl_upm nand driver modular buildAnton Vorontsov2008-10-132-48/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fsl_upm nand driver fails to build because fsl_lbc_lock isn't exported, the lock is needed by the inlined fsl_upm_run_pattern() function: ERROR: "fsl_lbc_lock" [drivers/mtd/nand/fsl_upm.ko] undefined! Dave Jones purposed to export the lock, but it is better to just uninline the fsl_upm_run_pattern(). When uninlined we also no longer need the exported fsl_lbc_regs, and both fsl_lbc_lock and fsl_lbc_regs could be marked static. While at it, also add some missing includes that we should have included explicitly. Reported-by: Dave Jones <davej@redhat.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/83xx: add NAND support for the MPC8360E-RDK boardsAnton Vorontsov2008-10-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | The StMicro NAND chip (512Mbit, 64MB) is connected to the local bus, the first local bus' user-programmable machine is configured by the firmware to work with NAND chips. QE GPIO pin is used to poll the NAND's Ready-Not-Busy signal. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: FPGA support for GE Fanuc SBC610Martyn Welch2008-10-132-0/+44
| | | | | | | | | | | | | | | | | | | | | | Support for the SBC610 VPX Single Board Computer from GE Fanuc (PowerPC MPC8641D). This patch adds support for the registers held in the devices main FPGA, exposing extra information about the revision of the board through cpuinfo. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * i2c: MPC8349E-mITX Power Management and GPIO expander driverAnton Vorontsov2008-10-133-0/+221
| | | | | | | | | | | | | | | | | | | | On MPC8349E-mITX, MPC8315E-RDB and MPC837x-RDB boards there is a Freescale MC9S08QG8 (MCU) chip with the custom firmware pre-programmed. The chip is used to power-off the board by the software, and to control some GPIO pins. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: reserve two DMA channels for audio in MPC8610 HPCD device treeTimur Tabi2008-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The Freescale Elo DMA driver binds to all DMA channels in the device tree that are compatible with "fsl,eloplus-dma-channel". This conflicts with the sound drivers for the MPC8610 HPCD. On this board, the SSI uses two DMA channels and therefore those channels are not available for general purpose use. We change the compatible properties for these channels "fsl,ssi-dma-channel". This works because the sound drivers don't actually check the compatible property when it grabs channels. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: document the "fsl,ssi-dma-channel" compatible propertyTimur Tabi2008-10-132-8/+25
| | | | | | | | | | | | | | | | | | | | The "fsl,ssi-dma-channel" compatible property is used to specify a DMA channel on the Freescale Elo DMA controller that should be used exclusively by the Freescale SSI audio controller. When a property is marked as such, the Elo DMA driver will ignore it, and so it will be available for the sound drivers. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: disable CHRP and PMAC support in various defconfigsTimur Tabi2008-10-1321-1/+44
| | | | | | | | | | | | | | | | Because CHRP and PMAC are by default enabled, several non-CHRP and non-PMAC PowerPC defconfigs will have these Kconfig options set erroneously. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * OF: add fsl,mcu-mpc8349emitx to the exception listAnton Vorontsov2008-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of/base.c matches on the first (most specific) entries, which isn't quite practical but it was discussed[1] that this won't change. The bindings specifies verbose information for the devices, but it doesn't fit in the I2C ID's 20 characters limit. The limit won't change[2], and the bindings won't change either as they're correct. So we have to put an exception for the MPC8349E-mITX-compatible MCUs. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/83xx: add DS1374 RTC support for the MPC837xE-MDS boardsAnton Vorontsov2008-10-133-0/+21
| | | | | | | | | | | | | | | | The RTC is sitting on the I2C1 bus at address 0x68. RTC interrupt signal is connected to the IPIC's EXT3 interrupt line. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: remove support for bootmem-allocated memory for the DIU driverTimur Tabi2008-10-133-46/+1
| | | | | | | | | | | | | | | | | | | | Early versions of the Freescale DIU framebuffer driver depended on a bootmem allocation of memory for the video buffer. The need for this feature was removed in commit 6b51d51a, so now we can remove the platform-specific code that allocated that memory. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: remove non-dependent load fsl_booke PTE_64BITMilton Miller2008-10-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | b38fd42ff46a4a31dced8533e8a6e549693500b6 added false dependencys to order the load of upper and lower halfs of the pte, but only adjusted whitespace instead of deleting the old load in the iside handler, letting the hardware see the non-dependent load. This patch removes the extra load. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/5121: Add PCI support.John Rigby2008-10-134-3/+16
| | | | | | | | | | | | | | | | | | | | | | Uses mpc83xx_add_bridge in fsl_pci.c Adds second register tuple to pci node register property as done for 83xx device trees in a previous patch. Signed-off-by: John Rigby <jrigby@freescale.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: 83xx: pci: Remove need for get_immrbase from mpc83xx_add_bridge.John Rigby2008-10-1318-37/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify mpc83xx_add_bridge to get config space register base address from the device tree instead of immr + hardcoded offset. 83xx pci nodes have this change: register properties now contain two address length tuples: First is the pci bridge register base, this has always been there. Second is the config base, this is new. This is documented in dts-bindings/fsl/83xx-512x-pci.txt The changes accomplish these things: mpc83xx_add_bridge no longer needs to call get_immrbase it uses hard coded addresses if the second register value is missing Signed-off-by: John Rigby <jrigby@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/fsl: Hide MPC5121 pci bridge.John Rigby2008-10-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | The class of the MPC5121 pci host bridge is PCI_CLASS_BRIDGE_OTHER while other freescale host bridges have class set to PCI_CLASS_PROCESSOR_POWERPC. This patch makes fixup_hide_host_resource_fsl match PCI_CLASS_BRIDGE_OTHER in addition to PCI_CLASS_PROCESSOR_POWERPC. Signed-off-by: John Rigby <jrigby@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/83xx: don't probe broken PCI on mpc837x_mds boardsAnton Vorontsov2008-10-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the standalone setup the board's CPLD disables the PCI internal arbiter, thus any access to the PCI bus will hang the board. The common way to disable particular devices in the device tree is to put the "status" property with any value other than "ok" or "okay" into the device node we want to disable. So, when there is no PCI arbiter on the bus the u-boot adds status = "broken (no arbiter)" property into the PCI controller's node, and so marks the PCI controller as unavailable. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/QE: move QE_GPIO Kconfig symbol into the platforms/KconfigAnton Vorontsov2008-10-132-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | Specifying user-selectable option in the qe_lib/Kconfig was a bad idea because the qe_lib/Kconfig is included into the top level Kconfig, and thus the QE_GPIO option appears at the top level menu. This patch effectively moves the QE_GPIO option under the platform menu instead. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: make Freescale QE support a selectable Kconfig optionTimur Tabi2008-10-133-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | Modify the Kconfig so that Freescale QUICC Engine (QE) support is a selectable option, thereby allowing users to compile kernels without any QE support. The drawback is that QE support is now disabled by default on platforms that have a QE, and so a defconfig is needed to enable QE and QE devices (like UCC GETH). Fortunately, all the current relevant defconfigs do that already. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc: GE Fanuc's FPGA based PIC controller on the SBC610Martyn Welch2008-10-135-6/+327
| | | | | | | | | | | | | | | | | | | | | | | | Support for the SBC610 VPX Single Board Computer from GE Fanuc (PowerPC MPC8641D). A number of MPC8641D based route interrupts for on-board interrupts through a FPGA based interrupt controller, which is chained with the MPC8641D's mpic. This patch provides a basic driver to allow basic routing of interrupts to the mpic. Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * powerpc/85xx: Wire up RTC interrupt on MPC8536DSKumar Gala2008-10-131-0/+2
| | | | | | | | | | | | Add interrupt info to the MPC8536DS .dts for the RTC Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | Merge commit 'gcl/gcl-next'Benjamin Herrenschmidt2008-10-145-11/+16
|\ \ | |/ |/|
| * OF: add fsl,mcu-mpc8349emitx to the exception listAnton Vorontsov2008-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of/base.c matches on the first (most specific) entries, which isn't quite practical but it was discussed[1] that this won't change. The bindings specifies verbose information for the devices, but it doesn't fit in the I2C ID's 20 characters limit. The limit won't change[2], and the bindings won't change either as they're correct. So we have to put an exception for the MPC8349E-mITX-compatible MCUs. [1] http://www.mail-archive.com/linuxppc-dev@ozlabs.org/msg21196.html [2] http://www.nabble.com/-PATCH-1-2--i2c:-expand-I2C's-id.name-to-23-characters-td19577063.html Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc/mpc5200: Silence warnings in arch/powerpc/platforms/52xx/mpc52xx_pci.cTony Breeds2008-10-081-4/+9
| | | | | | | | | | | | | | | | Explicitly cast resource fields to unsigned long long, and match format specifier. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * i2c-mpc: suppress I2C device probingWolfgang Grandegger2008-10-081-1/+0
| | | | | | | | | | | | | | | | | | | | This patch suppresses I2C device probing by clearing the class field of the "struct i2c_adapter" for the MPC I2C bus adapters. Some board configurations which rely on probing must be fixed up by adding a proper I2C device node to the DTS file, like the TQM85xx modules. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc/mpc5200: trivial printk-fixes in mpc52xx_commonWolfram Sang2008-10-081-2/+3
| | | | | | | | | | | | | | | | - one printk was missing a loglevel - remove double space while we are here Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * powerpc/mpc5200: fix build warnings on mpc52xx_psc_spi driverGrant Likely2008-10-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The register definitions have been changed for the mpc5200 PSC ports to cover some of the changes in the mpc5200b. One change is that the ccr register is now a u32 instead of a u16. However, for the purposes of this driver we want to continue to use 16 bit access to avoid changing the existing (working) behaviour. This patch allows the driver to continue to do 16 bit accesses without the compiler complaining about it. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | powerpc/smp: No need to set_need_resched when getting a resched IPIMilton Miller2008-10-131-2/+1
| | | | | | | | | | | | | | | | | | The comment in the code was asking "Do we have to do this?", and according to x86 and s390 the answer is no, the scheduler will do it before calling the arch hook. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Reduce and comment xics IPI use of memory barriersMilton Miller2008-10-131-4/+1
| | | | | | | | | | | | | | | | | | | | A single full sync (mb()) is requrired to order the mmio to the qirr reg with the set or clear of the message word. However, test_and_clear_bit has the effect of smp_mb() and we are not doing any other io from here, so we don't need a mb per bit processed. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Make printk format strings fit on one lineMilton Miller2008-10-131-18/+18
| | | | | | | | | | | | | | | | | | | | Several printks were broken at word boundaries for line length. Some even referred to old function names. Using __func__ and changing the text slightly for the format allows these printk formats to fit on one line. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Mark xics IPI interrupt as per-cpuMilton Miller2008-10-131-4/+4
| | | | | | | | | | | | | | It is physically per-cpu, and we want the irq layer to treat it that way. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: EOI xics ipi by hand in kexecMilton Miller2008-10-131-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EOI normally has the side effect of returning the cpu to the base priority to recieve the next interrupt. This is actually controlled by the top byte of the xirr register. When we are exiting the kernel in kexec we must eoi the ipi for the next kernel because we never return from the handler, but we want to leave interrupt delivery blocked until the next kernel takes action. Since the hardware ipi vector is fixed, its easiest to just do the eoi explicitly. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Factor out cpu joining/unjoining the GIQMilton Miller2008-10-131-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | This factors out processors joining and unjoining the Global Interrupt Queue into a separate function. There is a bit of math to calculate the arguments to rtas to join or leave the global interrupt queue, and a warning on failure afterwards. Make a helper for the 3 callers. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Initialization code cleanupsMilton Miller2008-10-131-12/+8
| | | | | | | | | | | | | | | | | | | | | | We only need to check the ibm,interrupt-server#-size property once, not once per global server and thread. We can use !CONFIG_SMP cpu masks and hard_smp_processor_id() to avoid an ifdef. Put the node when breaking out of the loop on lpar systems. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Trim #include listMilton Miller2008-10-131-4/+1
| | | | | | | | | | | | | | | | | | Trim unneeded includes from xics.c. We don't use signals or gfp flags, we use only OF functions and don't need prom, and the 8259 is now handled by our caller. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Change *_xirr_info_set() prototype to avoid castsMilton Miller2008-10-131-6/+5
| | | | | | | | | | | | | | | | | | The xirr is 32 bits in hardware, but the hypervisor requries the upper bits of the register to be clear on the hcall. By changing the type from signed to unsigned int we can drop masking it back to 32 bits. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Rearrange file to group code by functionMilton Miller2008-10-131-215/+217
| | | | | | | | | | | | | | | | | | Now that xics_update_irq_servers is called only from init and hotplug code, it becomes possible to clean up the ordering of functions in the file, grouping them but the interfaces they implement. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Consolidate ipi message encode and decodeMilton Miller2008-10-133-57/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xics supports only one ipi per cpu, and expects software to use some queue to know why the interrupt was sent. In Linux, we use a an array of bitmaps indexed by cpu to identify the message. Currently the bits are set in smp.c and decoded in xics.c, with the data structure in a header file. Consolidate the code in xics.c similar to mpic and other interrupt controllers. Also, while making the the array static, the message word doesn't need to be volatile as set_bit and test_clear_bit take care of it for us, and put it under ifdef smp. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc: Make ppc32 respect the boot cpu id for !CONFIG_SMPKumar Gala2008-10-131-1/+2
| | | | | | | | | | | | | | | | | | Previously the FDT header field boot_cpuid_phys wasn't actually used on ppc32. Instead the physical boot cpuid was assumed to be 0 for !CONFIG_SMP. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc: Remove old Makefile workaround for arch/ppcJosh Boyer2008-10-131-3/+0
| | | | | | | | | | | | | | | | | | | | There is an old workaround in the sysdev/Makefile for dealing with arch/ppc vs. arch/powerpc compiles. This is no longer needed as arch/ppc is dead. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | of: Add new helper of_parse_phandles_with_args()Anton Vorontsov2008-10-133-62/+131
| | | | | | | | | | | | | | | | The helper is factored out of of_get_gpio(). Will be used by the QE pin multiplexing functions (they need to parse the gpios = <> too). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* | powerpc/xics: Update default_server during migrate_irqs_awayMilton Miller2008-10-131-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, every time we determine which irq server to use, we check if default_server, which is the id of the bootcpu, is still online. But default_server is a hardware cpu, not the logical cpu id needed to index cpu_online_map. Since the default server can only go offline during a cpu hotplug event, explicitly check the default server and choose the new one when we move irqs away from the cpu being offlined. This has the added benefit of only needing the boot_cpuid to be updated and not relying on the cpu being marked offline during migrate_irqs_away. Also, since xics_update_irq_servers only reads device tree information, we can call it before xics_init_host in xics_init_IRQ and then default_server will always be valid when we can reach get_irq_server via the host ops. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>