[PATCH] clk: versal: Move pm_query_id out of clock driver

Michal Simek monstr at monstr.eu
Thu Aug 20 10:04:38 CEST 2020


pá 24. 7. 2020 v 14:26 odesílatel Michal Simek <michal.simek at xilinx.com> napsal:
>
> There is no reason to have firmware specific structure in clock driver.
> Move it to generic location and also initialize enum values which is based
> on https://lore.kernel.org/linux-arm-kernel/20200318125003.GA2727094@kroah.com/
> recommended way to go to make sure that values guaranteed by compiler.
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
>  drivers/clk/clk_versal.c  | 17 -----------------
>  include/zynqmp_firmware.h | 17 +++++++++++++++++
>  2 files changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/clk/clk_versal.c b/drivers/clk/clk_versal.c
> index 6f82b60f04db..d93b860aed35 100644
> --- a/drivers/clk/clk_versal.c
> +++ b/drivers/clk/clk_versal.c
> @@ -68,23 +68,6 @@
>  #define CLOCK_NODE_TYPE_DIV    4
>  #define CLOCK_NODE_TYPE_GATE   6
>
> -enum pm_query_id {
> -       PM_QID_INVALID,
> -       PM_QID_CLOCK_GET_NAME,
> -       PM_QID_CLOCK_GET_TOPOLOGY,
> -       PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS,
> -       PM_QID_CLOCK_GET_PARENTS,
> -       PM_QID_CLOCK_GET_ATTRIBUTES,
> -       PM_QID_PINCTRL_GET_NUM_PINS,
> -       PM_QID_PINCTRL_GET_NUM_FUNCTIONS,
> -       PM_QID_PINCTRL_GET_NUM_FUNCTION_GROUPS,
> -       PM_QID_PINCTRL_GET_FUNCTION_NAME,
> -       PM_QID_PINCTRL_GET_FUNCTION_GROUPS,
> -       PM_QID_PINCTRL_GET_PIN_GROUPS,
> -       PM_QID_CLOCK_GET_NUM_CLOCKS,
> -       PM_QID_CLOCK_GET_MAX_DIVISOR,
> -};
> -
>  enum clk_type {
>         CLK_TYPE_OUTPUT,
>         CLK_TYPE_EXTERNAL,
> diff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h
> index 93d771ece26a..98e20a466e24 100644
> --- a/include/zynqmp_firmware.h
> +++ b/include/zynqmp_firmware.h
> @@ -62,6 +62,23 @@ enum pm_api_id {
>         PM_API_MAX,
>  };
>
> +enum pm_query_id {
> +       PM_QID_INVALID = 0,
> +       PM_QID_CLOCK_GET_NAME = 1,
> +       PM_QID_CLOCK_GET_TOPOLOGY = 2,
> +       PM_QID_CLOCK_GET_FIXEDFACTOR_PARAMS = 3,
> +       PM_QID_CLOCK_GET_PARENTS = 4,
> +       PM_QID_CLOCK_GET_ATTRIBUTES = 5,
> +       PM_QID_PINCTRL_GET_NUM_PINS = 6,
> +       PM_QID_PINCTRL_GET_NUM_FUNCTIONS = 7,
> +       PM_QID_PINCTRL_GET_NUM_FUNCTION_GROUPS = 8,
> +       PM_QID_PINCTRL_GET_FUNCTION_NAME = 9,
> +       PM_QID_PINCTRL_GET_FUNCTION_GROUPS = 10,
> +       PM_QID_PINCTRL_GET_PIN_GROUPS = 11,
> +       PM_QID_CLOCK_GET_NUM_CLOCKS = 12,
> +       PM_QID_CLOCK_GET_MAX_DIVISOR = 13,
> +};
> +
>  #define PM_SIP_SVC      0xc2000000
>
>  #define ZYNQMP_PM_VERSION_MAJOR         1
> --
> 2.27.0
>

Applied.
M

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


More information about the U-Boot mailing list