Skip to content

Commit

Permalink
fsl/mpic: Create and document the "single-cpu-affinity" device-tree flag
Browse files Browse the repository at this point in the history
The Freescale MPIC (and perhaps others in the future) is incapable of
routing non-IPI interrupts to more than once CPU at a time.  Currently
all of the Freescale boards msut pass the MPIC_SINGLE_DEST_CPU flag to
mpic_alloc(), but that information should really be present in the
device-tree.

Older board code can't rely on the device-tree having the property set,
but newer platforms won't need it manually specified in the code.

[BenH: Remove unrelated changes, folded in a different patch]

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Kyle Moffett authored and Benjamin Herrenschmidt committed Feb 22, 2012
1 parent 98cca25 commit 9ca163c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/powerpc/fsl/mpic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ PROPERTIES
device-trees omit this property on MPIC nodes even when the MPIC is
in fact big-endian, so certain boards override this property.

- single-cpu-affinity
Usage: optional
Value type: <empty>
If present the MPIC will be assumed to only be able to route
non-IPI interrupts to a single CPU at a time (EG: Freescale MPIC).

INTERRUPT SPECIFIER DEFINITION

Interrupt specifiers consists of 4 cells encoded as
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/boot/dts/fsl/pq3-mpic.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ mpic: pic@40000 {
compatible = "fsl,mpic";
device_type = "open-pic";
big-endian;
single-cpu-affinity;
};

timer@41100 {
Expand Down
2 changes: 2 additions & 0 deletions arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,8 @@ struct mpic * __init mpic_alloc(struct device_node *node,
flags |= MPIC_BIG_ENDIAN;
if (of_get_property(node, "pic-no-reset", NULL))
flags |= MPIC_NO_RESET;
if (of_get_property(node, "single-cpu-affinity", NULL))
flags |= MPIC_SINGLE_DEST_CPU;
if (of_device_is_compatible(node, "fsl,mpic"))
flags |= MPIC_FSL;

Expand Down

0 comments on commit 9ca163c

Please sign in to comment.