aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTudor Laurentiu <b10716@freescale.com>2014-08-13 09:55:13 -0400
committerScott Wood <scottwood@freescale.com>2014-09-03 19:02:14 -0400
commit67e35c3a79b7349a9b0dbe1dd0bf82def0296714 (patch)
treedf00bfb2ab1a950f13e239ee9dc0faf9a1693d4a
parent84f44cc56c0994df7778bde55c8d5e9aa9fff8f5 (diff)
powerpc/fsl_msi: support vmpic msi with mpic 4.3
The new MSI block in MPIC 4.3 added the MSIIR1 register, with a different layout, in order to support 16 MSIR registers. The msi binding was also updated so that the "reg" reflects the newly introduced MSIIR1 register. Virtual machines advertise these msi nodes by using the compatible "fsl,vmpic-msi-v4.3" so add support for it. Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com> Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index 77efbaec7b9c..9fadc6e4dc47 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -180,7 +180,8 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
180 np = of_parse_phandle(hose->dn, "fsl,msi", 0); 180 np = of_parse_phandle(hose->dn, "fsl,msi", 0);
181 if (np) { 181 if (np) {
182 if (of_device_is_compatible(np, "fsl,mpic-msi") || 182 if (of_device_is_compatible(np, "fsl,mpic-msi") ||
183 of_device_is_compatible(np, "fsl,vmpic-msi")) 183 of_device_is_compatible(np, "fsl,vmpic-msi") ||
184 of_device_is_compatible(np, "fsl,vmpic-msi-v4.3"))
184 phandle = np->phandle; 185 phandle = np->phandle;
185 else { 186 else {
186 dev_err(&pdev->dev, 187 dev_err(&pdev->dev,
@@ -466,7 +467,8 @@ static int fsl_of_msi_probe(struct platform_device *dev)
466 467
467 p = of_get_property(dev->dev.of_node, "msi-available-ranges", &len); 468 p = of_get_property(dev->dev.of_node, "msi-available-ranges", &len);
468 469
469 if (of_device_is_compatible(dev->dev.of_node, "fsl,mpic-msi-v4.3")) { 470 if (of_device_is_compatible(dev->dev.of_node, "fsl,mpic-msi-v4.3") ||
471 of_device_is_compatible(dev->dev.of_node, "fsl,vmpic-msi-v4.3")) {
470 msi->srs_shift = MSIIR1_SRS_SHIFT; 472 msi->srs_shift = MSIIR1_SRS_SHIFT;
471 msi->ibs_shift = MSIIR1_IBS_SHIFT; 473 msi->ibs_shift = MSIIR1_IBS_SHIFT;
472 if (p) 474 if (p)
@@ -572,6 +574,10 @@ static const struct of_device_id fsl_of_msi_ids[] = {
572 .compatible = "fsl,vmpic-msi", 574 .compatible = "fsl,vmpic-msi",
573 .data = &vmpic_msi_feature, 575 .data = &vmpic_msi_feature,
574 }, 576 },
577 {
578 .compatible = "fsl,vmpic-msi-v4.3",
579 .data = &vmpic_msi_feature,
580 },
575#endif 581#endif
576 {} 582 {}
577}; 583};