aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* powerpc/fsl_msi: Handle msi-available-ranges betterScott Wood2011-03-152-37/+64
| | | | | | | | | | | | | Now handles multiple ranges, doesn't make assumptions about interrupt specifier format, and doesn't claim interrupts that don't correspond to an available range. Also has some better error checking. The device tree binding is updated to clarify some existing assumptions. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* drivers/serial/ucc_uart.c: Add of_node_put to avoid memory leakJulia Lawall2011-03-151-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a call to of_node_put in the error handling code following a call to of_find_compatible_node or of_find_node_by_type. This patch also substantially reorganizes the error handling code in the function, to that it is possible first to jump to code that frees qe_port and then to jump to code that also puts np. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ local idexpression x; expression E,E1,E2; statement S; @@ *x = (of_find_node_by_path |of_find_node_by_name |of_find_node_by_phandle |of_get_parent |of_get_next_parent |of_get_next_child |of_find_compatible_node |of_match_node |of_find_node_by_type |of_find_node_with_property |of_find_matching_node |of_parse_phandle )(...); ... if (x == NULL) S <... when != x = E *if (...) { ... when != of_node_put(x) when != if (...) { ... of_node_put(x); ... } ( return <+...x...+>; | * return ...; ) } ...> ( E2 = x; | of_node_put(x); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Timur Tabi <timur@freescale.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: Fix SPE float to integer conversion failureShan Hai2011-03-151-4/+8
| | | | | | | | | | | | | | | | | | | | | | | Conversion from float to integer should based on both the instruction encoding and the sign of the operand. A simple testcase to show the issue: static float fm; static signed int si_min = (-2147483647 - 1); static unsigned int ui; int main() { fm = (float) si_min; ; ui = (unsigned int)fm; printf("ui=%d, should be %d\n", ui, si_min); return 0; } Result: ui=-1, should be -2147483648 Signed-off-by: Shan Hai <shan.hai@windriver.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: Update sata controller compatible for p1022ds boardXulei2011-03-151-2/+2
| | | | | | | | | | Update p1022 sata compatible to "fsl,p1022-sata", "fsl,pq-sata-v2". p1022ds sata controller is v2 version comparing previous FSL sata controller, for example, mpc8536. Signed-off-by: Lei Xu <B33228@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* ATA: Add FSL sata v2 controller supportXulei2011-03-151-7/+18
| | | | | | | | | | | | In FSL sata v2 block, the snoop bit of PRDT Word3 description information is at bit28 instead of bit22. This patch adds FSL sata v2 probe and resolve this difference. Signed-off-by: Lei Xu <B33228@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Acked-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/mpc8xxx_gpio: simplify searching for 'fsl, qoriq-gpio' compatiableAnatolij Gustschin2011-03-151-3/+1
| | | | | | | | | | | | | | | Commit da3ed89e7ce272ebcc918487e2a28736ca0dd6bb added 'fsl,qoriq-gpio' compatiable searching in the old way using for_each_compatible_node(). But the driver have previously been changed to use a struct of_device_id compatible list passed to for_each_matching_node(). Add 'fsl,qoriq-gpio' compatiable to the existing compatible list instead of adding another for_each_compatible_node() loop. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/8xx: remove obsolete mgsuvd boardHolger Brunck2011-03-155-343/+0
| | | | | | | | | | | | The MPC852 based mgsuvd board from Keymile was initially ported, but later on not developed further. This patch removes the respective files to decrease merging conflicts and unneeded maintenance. Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Acked-by: Heiko Schocher<hs@denx.de> Cc: Vitaly Bordug <vitb@kernel.crashing.org> Cc: Marcelo Tosatti <marcelo@kvack.org> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/82xx: rename and update mgcoge board supportHolger Brunck2011-03-154-48/+72
| | | | | | | | | | | | | | | | | | The mgcoge board from keymile is now base for some other similar boards. Therefore the board specific name mgcoge was renamed to a generic name km82xx. Additionally some enhancements were made: - rework partition table in dts file - add cpm2_pio_c gpio controller in dts file - update defconfig - add pin description for SCC1 - add pin description and configuration for USB Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Acked-by: Heiko Schocher <hs@denx.de> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Heiko Schocher <hs@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/83xx: rename and update kmeter1Holger Brunck2011-03-154-53/+71
| | | | | | | | | | | | | | | | Beside the MPC 8360 based board kmeter1 other km83xx boards from keymile will follow. Therefore the board specific naming kmeter1 for functions and files were replaced with km83xx. Additionally some updates were made: - update defconfig for 2.6.38 - rework flash partitioning in dts file - add gpio controller for qe_pio_c in dts Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Acked-by: Heiko Schocher <hs@denx.de> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: Heiko Schocher <hs@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: Workaroudn e500 CPU erratum A005Liu Yu2011-03-152-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | | This erratum can occur if a single-precision floating-point, double-precision floating-point or vector floating-point instruction on a mispredicted branch path signals one of the floating-point data interrupts which are enabled by the SPEFSCR (FINVE, FDBZE, FUNFE or FOVFE bits). This interrupt must be recorded in a one-cycle window when the misprediction is resolved. If this extremely rare event should occur, the result could be: The SPE Data Exception from the mispredicted path may be reported erroneously if a single-precision floating-point, double-precision floating-point or vector floating-point instruction is the second instruction on the correct branch path. According to errata description, some efp instructions which are not supposed to trigger SPE exceptions can trigger the exceptions in this case. However, as we haven't emulated these instructions here, a signal will send to userspace, and userspace application would exit. This patch re-issue the efp instruction that we haven't emulated, so that hardware can properly execute it again if this case happen. Signed-off-by: Liu Yu <yu.liu@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/fsl_pci: Add support for FSL PCIe controllers v2.xPrabhakar Kushwaha2011-03-152-11/+21
| | | | | | | | | | | | | | | | | | | | | | | FSL PCIe controller v2.1: - New MSI inbound window - Same Inbound windows address as PCIe controller v1.x Added new pit_t member(pmit) to struct ccsr_pci for MSI inbound window FSL PCIe controller v2.2 and v2.3: - Different addresses for PCIe inbound window 3,2,1 - Exposed PCIe inbound window 0 - New PCIe interrupt status register Added new config and interrupt Status register to struct ccsr_pci & updated pit_t array size to reflect the 4 inbound windows. Device tree is used to maintain backward compatibility i.e. update inbound window 1 index depending upon "compatible" field witin PCIE node. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Acked-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/85xx: Fix writing to spin table 'cpu-release-addr' on ppc64eKumar Gala2011-03-151-1/+5
| | | | | | | | | | | | | | | | | If the spin table is located in the linear mapping (which can happen if we have 4G or more of memory) we need to access the spin table via a cacheable coherent mapping like we do on ppc32 (and do explicit cache flush). See the following commit for the ppc32 version of this issue: commit d1d47ec6e62ab08d2ebb925fd9203abfad3adfbf Author: Peter Tyser <ptyser@xes-inc.com> Date: Fri Dec 18 16:50:37 2009 -0600 powerpc/85xx: Fix SMP when "cpu-release-addr" is in lowmem Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/pseries: Disable MSI using new interface if possibleNishanth Aravamudan2011-03-111-2/+12
| | | | | | | | | | | | | | | On upcoming hardware, we have a PCI adapter with two functions, one of which uses MSI and the other uses MSI-X. This adapter, when MSI is disabled using the "old" firmware interface (RTAS_CHANGE_FN), still signals an MSI-X interrupt and triggers an EEH. We are working with the vendor to ensure that the hardware is not at fault, but if we use the "new" interface (RTAS_CHANGE_MSI_FN) to disable MSI, we also automatically disable MSI-X and the adapter does not appear to signal any stray MSI-X interrupt. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Enable GENERIC_HARDIRQS_NO_DEPRECATED.Lennert Buytenhek2011-03-101-0/+1
| | | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: core irq_data conversion.Lennert Buytenhek2011-03-102-16/+28
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/xilinx_intc irq_data conversion.Lennert Buytenhek2011-03-101-23/+25
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/uic irq_data conversion.Lennert Buytenhek2011-03-101-29/+30
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/tsi108_pci irq_data conversion.Lennert Buytenhek2011-03-101-22/+19
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/qe_lib/qe_ic irq_data conversion.Lennert Buytenhek2011-03-102-18/+26
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/mv64x60_pic irq_data conversion.Lennert Buytenhek2011-03-101-23/+23
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/mpc8xxx_gpio irq_data conversion.Lennert Buytenhek2011-03-101-21/+21
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/mpc8xx_pic irq_data conversion.Lennert Buytenhek2011-03-101-16/+16
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/ipic irq_data conversion.Lennert Buytenhek2011-03-101-27/+27
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/i8259 irq_data conversion.Lennert Buytenhek2011-03-101-21/+21
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/fsl_msi irq_data conversion.Lennert Buytenhek2011-03-101-9/+10
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/cpm2_pic irq_data conversion.Lennert Buytenhek2011-03-101-16/+16
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: sysdev/cpm1 irq_data conversion.Lennert Buytenhek2011-03-101-9/+9
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/pseries irq_data conversion.Lennert Buytenhek2011-03-102-43/+51
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/ps3 irq_data conversion.Lennert Buytenhek2011-03-101-20/+20
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/powermac irq_data conversion.Lennert Buytenhek2011-03-101-23/+25
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/iseries irq_data conversion.Lennert Buytenhek2011-03-101-19/+24
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/embedded6xx irq_data conversion.Lennert Buytenhek2011-03-102-36/+37
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/chrp irq_data conversion.Lennert Buytenhek2011-03-101-1/+4
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/cell irq_data conversion.Lennert Buytenhek2011-03-105-54/+64
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/8xx irq_data conversion.Lennert Buytenhek2011-03-101-2/+7
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/86xx irq_data conversion.Lennert Buytenhek2011-03-102-12/+15
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/85xx irq_data conversion.Lennert Buytenhek2011-03-107-26/+32
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/82xx irq_data conversion.Lennert Buytenhek2011-03-101-14/+13
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/52xx irq_data conversion.Lennert Buytenhek2011-03-103-63/+64
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: platforms/512x irq_data conversion.Lennert Buytenhek2011-03-101-7/+7
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: mpic irq_data conversion.Lennert Buytenhek2011-03-106-90/+98
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/pseries: Add support for dynamic dma windowsNishanth Aravamudan2011-03-042-0/+591
| | | | | | | | | | If firmware allows us to map all of a partition's memory for DMA on a particular bridge, create a 1:1 mapping of that memory. Add hooks for dealing with hotplug events. Dynamic DMA windows can use larger than the default page size, and we use the largest one possible. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Cleanup definition of the PID registerTseng-Hui (Frank) Lin2011-03-042-3/+10
| | | | | | | Move SPRN_PID declearations in various locations into one place. Signed-off-by: Tseng-Hui (Frank) Lin <thlin@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/pseries/nvram: Capture oops/panic reports in ibm, oops-log partitionJim Keniston2011-03-041-3/+115
| | | | | | | | | Create the lnx,oops-log NVRAM partition, and capture the end of the printk buffer in it when there's an oops or panic. If we can't create the lnx,oops-log partition, capture the oops/panic report in ibm,rtas-log. Signed-off-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/nvram: Generalize code for OS partitions in NVRAMJim Keniston2011-03-043-64/+113
| | | | | | | | Adapt the functions used to create and write to the RTAS-log partition to work with any OS-type partition. Signed-off-by: Jim Keniston <jkenisto@us.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Fix memory limits when starting at a non-zero addressScott Wood2011-03-022-2/+2
| | | | | | | | memblock_enforce_memory_limit() takes the desired maximum quantity of memory to end up with, not an address above which memory will not be used. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/pseries: Reduce HVCS driver insanityBenjamin Herrenschmidt2011-03-021-31/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HVCS driver, for those who don't know, is a driver for the "server" side of the IBM virtual terminal mechanism allowing Linux partitions to act as terminal servers under IBM PowerVM hypervisor. It's almost never used on the field at the moment. However, it's part of our configs, and in its current incarnation, will allocate the tty driver & major (with 64 minors) and create a kernel thread whether it's used or not, ie, whether the hypervisor did put a virtual terminal server device node in the partition or not (or whether running on a pseries machine or not even). This in turns causes modern distro's udev's to start trying to open all those 64 minors at boot, which, since they aren't linked to anything, causes the driver to spew errors in the kernel log for each of them. Not nice. This moves all that initialization to a function which is now only called the first time a terminal server virtual IO device is actually probed (that is almost never). There's still a _LOT_ of cleanup that can be done in this driver, some simple (almost all printk's statements in there shall either just be removed or in some case turned into better written & more informative messages, including using the dev_* variants etc...). This is left as an exercise for whoever actually cares about that driver. One could also try to be smart and dispose of all the tty related resources when the last instance of the VIO server device is removed (Hotplug anybody ?). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Mask smp_processor_id() false positivePaul E. McKenney2011-03-021-1/+2
| | | | | | | | | | The rtas_event_scan() function uses smp_processor_id() to select a starting point in cpu_online_mask, and does so under the protection of get_online_cpus(). This might not select the current processor in any case, so switch to raw_smp_processor_id(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/eeh: Remove one to many l's in the word.Justin Mattock2011-03-021-1/+1
| | | | | | | The patch below removes an extra "l" in the word. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/macintosh: Fix __devexit annotation in rack-meter.cGrant Likely2011-03-021-1/+1
| | | | | | | | | | | | | | | | | The following warning was seen building rack-meter.c WARNING: drivers/built-in.o(.text+0xac784): Section mismatch in reference from the function rackmeter_shutdown() to the function .devexit.text:rackmeter_stop_cpu_sniffer() The function rackmeter_shutdown() references a function in an exit section. Often the function rackmeter_stop_cpu_sniffer() has valid usage outside the exit section and the fix is to remove the __devexit annotation of rackmeter_stop_cpu_sniffer. This patch resolves the warning by removing the __devexit annotation from rackmeter_stop_cpu_sniffer(). Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>