]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
xen/arm: zynqmp: Add PLL EEMI API definitions and passthrough get functions
authorMirela Simonovic <mirela.simonovic@aggios.com>
Tue, 23 Oct 2018 14:51:20 +0000 (16:51 +0200)
committerStefano Stabellini <sstabellini@xilinx.com>
Wed, 18 Dec 2019 19:16:19 +0000 (11:16 -0800)
PLL get functions should be allowed to every guest because guests may
need to use these APIs to calculate the PLL output frequency. Thereby,
allow passthrough of get functions to every guest.

Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Reviewed-by: Saeed Nowshadi <saeedn@xilinx.com>
Reviewed-by: Stefano Stabellini <stefanos@xilinx.com>
xen/arch/arm/platforms/xilinx-zynqmp-eemi.c
xen/include/asm-arm/platforms/xilinx-zynqmp-eemi.h

index 3bd24e85341b29c22b5cafaa3b981fb353c68630..20c4be353cf00fe109cde42eb8df7e1752a9cfe0 100644 (file)
@@ -921,6 +921,18 @@ bool zynqmp_eemi(struct cpu_user_regs *regs)
         }
         goto forward_to_fw;
 
+    case EEMI_FID(PM_PLL_GET_PARAMETER):
+    case EEMI_FID(PM_PLL_GET_MODE):
+        if ( nodeid < NODE_APLL || nodeid > NODE_IOPLL )
+        {
+            gprintk(XENLOG_WARNING, "zynqmp-pm: fn=%u Invalid pll node %u\n",
+                    pm_fn, nodeid);
+            ret = XST_PM_INVALID_PARAM;
+            goto done;
+        }
+        else
+            goto forward_to_fw;
+
     /* These calls are never allowed.  */
     case EEMI_FID(PM_SYSTEM_SHUTDOWN):
         ret = XST_PM_NO_ACCESS;
index 40762335ca43a08d016c740819638e4ab499ce0b..8412d8f0cb1c32a71a71eb556dadde2c1b49559c 100644 (file)
@@ -80,6 +80,11 @@ enum pm_api_id {
     PM_CLOCK_GETRATE,
     PM_CLOCK_SETPARENT,
     PM_CLOCK_GETPARENT,
+    /* PLL control API functions */
+    PM_PLL_SET_PARAMETER = 48,
+    PM_PLL_GET_PARAMETER,
+    PM_PLL_SET_MODE,
+    PM_PLL_GET_MODE,
     PM_GET_TRUSTZONE_VERSION = 2563,
     PM_API_MAX
 };