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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
Generalize tsi108_setup_pci to take the config space physical address and
primary bus designator as a parameter.
Signed-off-by: Josh Boyer <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
Add a header file for the common PCI routines used for the TSI bridge
Signed-off-by: Josh Boyer <[email protected]>
Acked-by: Olof Johansson <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
This implements save and restore hooks for IOMMUs and implements
it the DART iommu.
Signed-off-by: Johannes Berg <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Cc: Olof Johansson <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Acked-by: Johannes Berg <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
Just another pass through arch/powerpc for old usages.
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
Transmit on Demand: Fix spelling in config option, and make it actually enable TOD.
Signed-off-by: Michael Reiss <[email protected]>
Signed-off-by: Michael Barkowski <[email protected]>
Signed-off-by: Kim Phillips <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
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 <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
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 <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
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 <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
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 <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
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 <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
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 <[email protected]>
Acked-by: Andy Fleming <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
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 <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Heiko J Schick <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
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 <[email protected]>
Signed-off-by: Kumar Gala <[email protected]>
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 <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
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 <[email protected]>
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 <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
No need for ?: because of_node_get() can handle NULL argument.
Signed-off-by: Mariusz Kozlowski <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
No need for ?: because of_node_get() can handle NULL argument.
Signed-off-by: Mariusz Kozlowski <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
The mmio nvram driver (used by cell only atm) isn't properly parsing
the device-tree, meaning that nvram isn't found correctly on the new
Cell blades. It works ok for old blades where the nvram is at the
root of the device tree but fails on Malta and CAB when it's hanging
off axon. This fixes it by using the proper OF parsing functions.
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
sysdev/rom.c is for arch/powerpc only. Don't compile it when building
an arch/ppc kernel.
Signed-off-by: Grant Likely <[email protected]>
Acked-by: Sylvain Munaut <[email protected]>
Signed-off-by: Paul Mackerras <[email protected]>
Only compare the exact HT capability bits against HT_CAPTYPE_IRQ,
this is a little paranoid, but doesn't hurt.
Signed-off-by: Michael Ellerman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>