From fb8c5327b3c6c78b74a27a3c42e4f32b2cc30a04 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 13 Jun 2019 14:40:42 -0300 Subject: docs: driver-api: add xilinx driver API documentation The current file there (emmi) provides a description of the driver uAPI and kAPI. Signed-off-by: Mauro Carvalho Chehab --- Documentation/driver-api/index.rst | 1 + Documentation/driver-api/xilinx/eemi.rst | 67 +++++++++++++++++++++++++++++++ Documentation/driver-api/xilinx/index.rst | 16 ++++++++ Documentation/xilinx/eemi.rst | 67 ------------------------------- Documentation/xilinx/index.rst | 17 -------- 5 files changed, 84 insertions(+), 84 deletions(-) create mode 100644 Documentation/driver-api/xilinx/eemi.rst create mode 100644 Documentation/driver-api/xilinx/index.rst delete mode 100644 Documentation/xilinx/eemi.rst delete mode 100644 Documentation/xilinx/index.rst diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst index d1c6513dd20d..77322753c1bc 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst @@ -93,6 +93,7 @@ available subsections can be seen below. sync_file vfio-mediated-device vfio + xilinx/index xillybus zorro diff --git a/Documentation/driver-api/xilinx/eemi.rst b/Documentation/driver-api/xilinx/eemi.rst new file mode 100644 index 000000000000..9dcbc6f18d75 --- /dev/null +++ b/Documentation/driver-api/xilinx/eemi.rst @@ -0,0 +1,67 @@ +==================================== +Xilinx Zynq MPSoC EEMI Documentation +==================================== + +Xilinx Zynq MPSoC Firmware Interface +------------------------------------- +The zynqmp-firmware node describes the interface to platform firmware. +ZynqMP has an interface to communicate with secure firmware. Firmware +driver provides an interface to firmware APIs. Interface APIs can be +used by any driver to communicate with PMC(Platform Management Controller). + +Embedded Energy Management Interface (EEMI) +---------------------------------------------- +The embedded energy management interface is used to allow software +components running across different processing clusters on a chip or +device to communicate with a power management controller (PMC) on a +device to issue or respond to power management requests. + +EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC. +The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops +structure. Any driver who want to communicate with PMC using EEMI APIs +can call zynqmp_pm_get_eemi_ops(). + +Example of EEMI ops:: + + /* zynqmp-firmware driver maintain all EEMI APIs */ + struct zynqmp_eemi_ops { + int (*get_api_version)(u32 *version); + int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out); + }; + + static const struct zynqmp_eemi_ops eemi_ops = { + .get_api_version = zynqmp_pm_get_api_version, + .query_data = zynqmp_pm_query_data, + }; + +Example of EEMI ops usage:: + + static const struct zynqmp_eemi_ops *eemi_ops; + u32 ret_payload[PAYLOAD_ARG_CNT]; + int ret; + + eemi_ops = zynqmp_pm_get_eemi_ops(); + if (IS_ERR(eemi_ops)) + return PTR_ERR(eemi_ops); + + ret = eemi_ops->query_data(qdata, ret_payload); + +IOCTL +------ +IOCTL API is for device control and configuration. It is not a system +IOCTL but it is an EEMI API. This API can be used by master to control +any device specific configuration. IOCTL definitions can be platform +specific. This API also manage shared device configuration. + +The following IOCTL IDs are valid for device control: +- IOCTL_SET_PLL_FRAC_MODE 8 +- IOCTL_GET_PLL_FRAC_MODE 9 +- IOCTL_SET_PLL_FRAC_DATA 10 +- IOCTL_GET_PLL_FRAC_DATA 11 + +Refer EEMI API guide [0] for IOCTL specific parameters and other EEMI APIs. + +References +---------- +[0] Embedded Energy Management Interface (EEMI) API guide: + https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf diff --git a/Documentation/driver-api/xilinx/index.rst b/Documentation/driver-api/xilinx/index.rst new file mode 100644 index 000000000000..13f7589ed442 --- /dev/null +++ b/Documentation/driver-api/xilinx/index.rst @@ -0,0 +1,16 @@ + +=========== +Xilinx FPGA +=========== + +.. toctree:: + :maxdepth: 1 + + eemi + +.. only:: subproject and html + + Indices + ======= + + * :ref:`genindex` diff --git a/Documentation/xilinx/eemi.rst b/Documentation/xilinx/eemi.rst deleted file mode 100644 index 9dcbc6f18d75..000000000000 --- a/Documentation/xilinx/eemi.rst +++ /dev/null @@ -1,67 +0,0 @@ -==================================== -Xilinx Zynq MPSoC EEMI Documentation -==================================== - -Xilinx Zynq MPSoC Firmware Interface -------------------------------------- -The zynqmp-firmware node describes the interface to platform firmware. -ZynqMP has an interface to communicate with secure firmware. Firmware -driver provides an interface to firmware APIs. Interface APIs can be -used by any driver to communicate with PMC(Platform Management Controller). - -Embedded Energy Management Interface (EEMI) ----------------------------------------------- -The embedded energy management interface is used to allow software -components running across different processing clusters on a chip or -device to communicate with a power management controller (PMC) on a -device to issue or respond to power management requests. - -EEMI ops is a structure containing all eemi APIs supported by Zynq MPSoC. -The zynqmp-firmware driver maintain all EEMI APIs in zynqmp_eemi_ops -structure. Any driver who want to communicate with PMC using EEMI APIs -can call zynqmp_pm_get_eemi_ops(). - -Example of EEMI ops:: - - /* zynqmp-firmware driver maintain all EEMI APIs */ - struct zynqmp_eemi_ops { - int (*get_api_version)(u32 *version); - int (*query_data)(struct zynqmp_pm_query_data qdata, u32 *out); - }; - - static const struct zynqmp_eemi_ops eemi_ops = { - .get_api_version = zynqmp_pm_get_api_version, - .query_data = zynqmp_pm_query_data, - }; - -Example of EEMI ops usage:: - - static const struct zynqmp_eemi_ops *eemi_ops; - u32 ret_payload[PAYLOAD_ARG_CNT]; - int ret; - - eemi_ops = zynqmp_pm_get_eemi_ops(); - if (IS_ERR(eemi_ops)) - return PTR_ERR(eemi_ops); - - ret = eemi_ops->query_data(qdata, ret_payload); - -IOCTL ------- -IOCTL API is for device control and configuration. It is not a system -IOCTL but it is an EEMI API. This API can be used by master to control -any device specific configuration. IOCTL definitions can be platform -specific. This API also manage shared device configuration. - -The following IOCTL IDs are valid for device control: -- IOCTL_SET_PLL_FRAC_MODE 8 -- IOCTL_GET_PLL_FRAC_MODE 9 -- IOCTL_SET_PLL_FRAC_DATA 10 -- IOCTL_GET_PLL_FRAC_DATA 11 - -Refer EEMI API guide [0] for IOCTL specific parameters and other EEMI APIs. - -References ----------- -[0] Embedded Energy Management Interface (EEMI) API guide: - https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf diff --git a/Documentation/xilinx/index.rst b/Documentation/xilinx/index.rst deleted file mode 100644 index 01cc1a0714df..000000000000 --- a/Documentation/xilinx/index.rst +++ /dev/null @@ -1,17 +0,0 @@ -:orphan: - -=========== -Xilinx FPGA -=========== - -.. toctree:: - :maxdepth: 1 - - eemi - -.. only:: subproject and html - - Indices - ======= - - * :ref:`genindex` -- cgit v1.2.1