aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-05-09[POWERPC] Change rheap functions to use ulongs instead of pointersTimur Tabi5-41/+41
The rheap allocation functions return a pointer, but the actual value is based on how the heap was initialized, and so it can be anything, e.g. an offset into a buffer. A ulong is a better representation of the value returned by the allocation functions. This patch changes all of the relevant rheap functions to use a unsigned long integers instead of a pointer. In case of an error, the value returned is a negative error code that has been cast to an unsigned long. The caller can use the IS_ERR_VALUE() macro to check for this. All code which calls the rheap functions is updated accordingly. Macros IS_MURAM_ERR() and IS_DPERR(), have been deleted in favor of IS_ERR_VALUE(). Also added error checking to rh_attach_region(). Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-05-09[POWERPC] fsl_soc: Make mac_addr const in fs_enet_of_init().Scott Wood1-1/+1
of_get_mac_address() returns a const pointer, so the result should be stored in a const pointer. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-08[POWERPC] Abolish powerpc_flash_init()David Gibson2-33/+0
powerpc_flash_init() implements a broken way of probing for flash devices supported by the physmap_of driver. It finds all nodes in the device tree with device_type=="rom" and instantiates of_platform devices for them. This is fundamentally incompatible with the normal and correct way of probing for of_platform_bus_probe(). Platforms which relied on powerpc_flash_init()s behaviour (none are in-tree) will have to update their platform probing code to correctly probe busses containing flash devices. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-08[POWERPC] MPIC U3/U4 MSI backendMichael Ellerman4-6/+205
MPIC U3/U4 MSI backend. Based on code from Segher, heavily hacked by me. This only deals with MSI on U3/U4 MPICs, aka. CPC 9x5. If we find a U3/U4 then we enable this backend, ie. take over the ppc_md MSI hooks. We might need more elaborate logic in future to decide which backend is enabled. We need our own irq_chip so that we can do MSI masking/unmasking on the device itself. We also need to mask explicitly on shutdown to make sure we don't get bitten by lazy-disable semantics. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-08[POWERPC] MPIC MSI allocatorMichael Ellerman4-1/+217
To support MSI on MPIC we need a way to reserve and allocate hardware irq numbers, this patch implements an allocator for that purpose. New firmware platforms must define a "msi-available-ranges" property on their MPIC node for MSI to work. For U3/U4 we do a best-guess setup. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-08[POWERPC] Enable MSI mappings for MPICMichael Ellerman1-0/+45
On some Apple machines the HT MSI mappings are not enabled by firmware, so we need to do it by hand. We can't use the pci routines as this code runs too early. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-08[POWERPC] Generalize tsi108 PCI setupJosh Boyer1-5/+6
Generalize tsi108_setup_pci to take the config space physical address and primary bus designator as a parameter. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-08[POWERPC] Generalize tsi108 PHY typesJosh Boyer1-2/+5
Add a phy_type field to the tsi108 ethernet structures to indicate which PHY is used on a board. This is derived from the "compatible" property in the ethernet-phy node of the device tree. The default remains the MV88E PHY. Also, convert the setup code to use of_get_mac_address instead of hard coding a lookup for the "address" property in the ethernet node. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-08[POWERPC] Add tsi108_pci.h for common PCI functionsJosh Boyer1-0/+1
Add a header file for the common PCI routines used for the TSI bridge Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-07[POWERPC] DART iommu suspendJohannes Berg1-0/+46
This implements save and restore hooks for IOMMUs and implements it the DART iommu. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-07[POWERPC] Rename device_is_compatible to of_device_is_compatibleStephen Rothwell1-1/+1
for consistency with other Open Firmware interfaces (and Sparc). This is just a straight replacement. This leaves the compatibility define in place. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-07[POWERPC] MPIC sys_device & suspend/resumeJohannes Berg1-1/+95
This adds mpic to the system devices and implements suspend and resume for them. This is necessary to get interrupts for modules back to where they were before a suspend to disk. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-02[POWERPC] Fix spurious vectors on weird MPICJosh Boyer1-1/+4
The weird TSI 10x MPIC needs an EOI after getting a spurious vector. This patch uses the existing MPIC_SPV_EOI flag to fix this issue. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds16-110/+784
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits) [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c [POWERPC] remove kernel module option for booke wdt [POWERPC] Avoid putting cpu node twice [POWERPC] Spinlock initializer cleanup [POWERPC] ppc4xx_sgdma needs dma-mapping.h [POWERPC] arch/powerpc/sysdev/timer.c build fix [POWERPC] get_property cleanups [POWERPC] Remove the unused HTDMSOUND driver [POWERPC] cell: cbe_cpufreq cleanup and crash fix [POWERPC] Declare enable_kernel_spe in a header [POWERPC] Add dt_xlate_addr() to bootwrapper [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards. [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files [POWERPC] Add uartlite boot console driver for the zImage wrapper [POWERPC] Stop using ppc_sys for Xilinx Virtex boards [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices [POWERPC] Merge common virtex header files [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform [POWERPC] Clean up cpufreq Kconfig dependencies ...
2007-04-30[POWERPC] arch/powerpc/sysdev/timer.c build fixSrinivasa Ds1-0/+1
arch/powerpc/sysdev/timer.c:51: error: variable `timer_sysclass' has initializer but incomplete type arch/powerpc/sysdev/timer.c:52: error: unknown field `resume' specified in initializer <etc> Signed-off-by: Srinivasa Ds <srinivasa@in.ibm.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30[POWERPC] get_property cleanupsStephen Rothwell1-4/+4
Just another pass through arch/powerpc for old usages. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-28ucc_geth: Implement Transmit on Demand supportMichael Reiss1-0/+3
Transmit on Demand: Fix spelling in config option, and make it actually enable TOD. Signed-off-by: Michael Reiss <michael.f.reiss@freescale.com> Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-24[POWERPC] Rename MPIC_BROKEN_U3 to MPIC_U3_HT_IRQSMichael Ellerman1-12/+12
Rename MPIC_BROKEN_U3 to something a little more descriptive. Its effect is to enable support for HT irqs behind the PCI-X/HT bridge on U3/U4 (aka. CPC9x5) parts. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24[POWERPC] Add arch/powerpc driver for UIC, PPC4xx interrupt controllerDavid Gibson2-0/+343
This patch adds a driver to arch/powerpc/sysdev for the UIC, the on-chip interrupt controller from IBM/AMCC 4xx chips. It uses the new irq host mapping infrastructure. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-23[POWERPC] add of_iomap functionChristian Krafft1-17/+2
The of_iomap function maps memory for a given device_node and returns a pointer to that memory. This is used at some places, so it makes sense to a seperate function. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] pmi probe device by device-typeChristian Krafft1-0/+1
At the moment the pmi device driver is probing for devices with a given type and a given name. As there may be devices of the same type but with a different name, probing should be done also for device type only. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] add check for initialized driver data to pmi driverChristian Krafft1-2/+7
This patch adds a check for the private driver data to be initialized. The bug showed up, as the caller found a pmi device by it's type. Whereas the pmi driver probes for the type and the name. Since the name was not as the driver expected, it did not initialize. A more relaxed probing will be supplied with an extra patch, too. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-13[POWERPC] Rename get_property to of_get_property: arch/powerpcStephen Rothwell7-67/+73
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-13Merge branch 'linux-2.6' into for-2.6.22Paul Mackerras2-4/+4
2007-03-29[POWERPC] qe: Fix QUICC Engine SDMA setup errorsChuck Meade1-3/+3
Correct the alignment of the internal buffer used by the QUICC Engine SDMA controller to 4Kbytes. Correct the shift direction in the logic that sets up the SDMR register for the QUICC Engine SDMA controller. Signed-off-by: Chuck Meade <chuckmeade@mindspring.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-03-29[POWERPC] Fix dcr_unmap()Jean-Christophe Dubois1-1/+1
Fix a bug in dcr_unmap(). At unmap time the DCR offset need to be added instead of substracted. Signed-off-by: Jean-Christophe Dubois <jdubois@mc.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-26[POWERPC] QE: fix invalid pointer usage in ucc_slow_init()Timur Tabi1-2/+2
In two places, ucc_slow_init() passes a physical address instead of the virtual address to functions that were expecting the latter, causing a kernel panic. us_info->regs contains the physical address of the UCC register set. The registers are ioremap'd to kernel space, and the virtual pointers are stored in us_regs. The code was using us_info->regs when it should have been using us_regs. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-03-26[POWERPC] QE: automatically select QE optionsTimur Tabi1-8/+2
Change the Kconfig files so that the Freescale QE options are automatically selected if a QE device is selected. Previously, you'd need to manually select UCC_FAST if you want any "fast" UCC devices, such as Gigabit Ethernet. Now, the QE Gigabit Ethernet option is always available if the device has a QE, and UCC_FAST is automatically enabled. A side-effect is that the "QE Options" menu no longer exists. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-03-26[POWERPC] 86xx/85xx: Unify Freescale PCI Express memory map registers structureZang Roy-r619111-0/+94
Unify PCI Express memory map registers structure define to arch/pwoerpc/sysdev/fsl_pcie.h for Freescale 85xx/86xx processor family. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-03-26[POWERPC] 86xx/85xx: Move 8641 PCI-Express to arch/powerpc/sysdev/fsl_pcie.c.Jon Loeliger2-0/+172
This move sets the stage for the use of generic PCI Express code in 85xx and 86xx parts from FSL. Subsequent patches for 8548 and 8544 will be able to use this shared code. Signed-off-by: Jon Loeliger <jdl@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-03-26[POWERPC] Generic time suspend/resume codeJohannes Berg2-0/+73
This removes the time suspend/restore code that was done through a PMU notifier in arch/platforms/powermac/time.c. Instead, introduce arch/powerpc/sysdev/timer.c which creates a sys device and handles time of day suspend/resume through that. This should probably be replaced by using the generic RTC framework but for now it gets rid of the arcane powermac specific hack. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-09[POWERPC] Create and use set_pci_dma_opsStephen Rothwell1-2/+2
This will allow us to build without PCI easier. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-17[POWERPC] QE: clean up ucc_slow.c and ucc_fast.cTimur Tabi2-186/+114
Refactored and cleaned up ucc_fast.c and ucc_slow.c so that the two files look more alike and are easier to read. Removed uccf_printk() and related functions, because they were just front-ends to printk(). Fixed some spacing and tabbing issues. Minor optimizations of some code. Changed the type of some variables to their proper type (mostly buffer descriptors). Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-17[POWERPC] add of_get_mac_address and update fsl_soc.c to use itTimur Tabi1-12/+7
Add function of_get_mac_address(), which obtains the best MAC address to use from the device tree by checking various properties in order. The order is: 'mac-address', then 'local-mac-address', then 'address'. It skips properties that contain invalid MAC addresses, which were probably not initialized by U-Boot. Update gfar_of_init() and fs_enet_of_init() in fsl_soc.c to call of_get_mac_address(). Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-16[POWERPC] mpic: set IPIs to be per-CPUJohannes Berg1-1/+1
This patch changes the MPIC IPIs to be per-CPU to avoid getting a warning ("Cannot set affinity for irq 251") when taking a CPU offline via sysfs or during suspend. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-16[POWERPC] Add PMI driver for cell bladeChristian Krafft2-0/+306
This adds driver code for the PMI device found in future IBM products. PMI stands for "Platform Management Interrupt" and is a way to communicate with the BMC (Baseboard Management Controller). It provides bidirectional communication with a low latency. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Acked-by: Heiko J Schick <schickhj@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-14[POWERPC] Move MPIC smp routines into mpic.cMichael Ellerman1-0/+21
Move a couple of MPIC smp routines into mpic.c, they're inside an SMP block in mpic.c - so they're still only built for SMP. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-09Merge branch '83xx' into for_paulusKumar Gala1-19/+59
2007-02-08[POWERPC] QE: Rename ucc_slow_info.us_regs to ucc_slow_info.regsTimur Tabi1-3/+3
Rename the 'us_regs' field of the ucc_slow_info structure in ucc_slow.h to just 'regs'. The equivalent field in the ucc_fast_info structure is also called 'regs', so this patch makes them comparable, and makes the code a little easier to read, because there already is a 'us_regs' in another ucc_slow structure. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-08[POWERPC] 83xx: Add platform_device for USB DR peripheral driverLi Yang1-19/+59
Add platform_device setup code for OTG/peripheral mode of 834x DR module. It is needed for USB client driver to work. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-07[POWERPC] Assign all PCI busses on G3 Blue & WhitePavel Roskin1-0/+2
G3 Blue & White is misconfigured by default so that CardBus controllers in PCI slots don't work. The PCI bridge is programmed to only allow access to bus 1 but not higher busses. The patch forces the PCI busses to be reassigned if a Grackle controller is found and the machine identifies itself as "PowerMac1,1" Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07[POWERPC] cpm2: CPM2 interrupt controller fixVitaly Bordug2-63/+89
This contains important fixes for the CPM2 PIC code. Eliminated CPM_IRQ_OFFSET, pulling the respective interrupt numbers from the interrupt mapping. Updated devicetree files to reflect that. Changed direct IC-related IO accesses to the IO accessors. Fixed all the sense values to keep coherency with ipic. In the current code, CPM2 stuff will have no IRQs and hence could be hardly usable. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07[POWERPC] MPIC: support more than 256 sourcesOlof Johansson1-22/+42
Allow more than the default 256 MPIC sources. Allocates a new flag (MPIC_LARGE_VECTORS) to be used by platform code when instantiating the mpic. I picked 11 bits worth right now since it would cover the number of sources on any hardware I have seen. It can always be increased later if needed. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07[POWERPC] 8xx: powerpc port of core CPM PICVitaly Bordug5-0/+1352
This covers common CPM access functions, CPM interrupt controller code, micropatch and a few compatibility things to kee the same driver base working with arch/ppc. This version is refined with all the comments (mostly PIC-related) addressed. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07[POWERPC] 8xx: platform related changes to the fsl_socVitaly Bordug1-2/+272
Added 8xx SoC peripherials: fec for Ethernet and smc for UARTs. Ordinary routines to extract values from the device tree and insert respective platform devices Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-26[POWERPC] Remove fastcall function attributeKumar Gala1-2/+2
fastcall is an x86 specific function attribute and has no business in ppc code Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-26[POWERPC] 83xx: Return a point to the struct ipic from ipic_init()Kumar Gala1-6/+9
It's useful to have access to struct ipic handle that just got created in ipic_init(). For example, if we want to setup an external IRQ with out a device node we need access ipic->irqhost to create the virtual to HW IRQ mapping and to set the IRQ sense. With this we can mimic the old sense array concept that existed in arch/ppc. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-24[POWERPC] arch/powerpc/sysdev/cpm2_pic.c of_node_get cleanupMariusz Kozlowski1-3/+1
Remove redundant argument check for of_node_get(). It's ok to remove 'node' check because in real life cpm2_pic_init() never gets called with node == NULL. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24[POWERPC] arch/powerpc/sysdev/qe_lib of_node_get cleanupMariusz Kozlowski1-1/+1
No need for ?: as of_node_get() can handle NULL argument. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> arch/powerpc/sysdev/qe_lib/qe_ic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24[POWERPC] arch/powerpc/sysdev/mpic.c of_node_get cleanupMariusz Kozlowski1-1/+1
No need for ?: because of_node_get() can handle NULL argument. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Paul Mackerras <paulus@samba.org>